gnu: python-packaging: Update to 19.1.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 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.13")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "Cython" version))
3199 (sha256
3200 (base32
3201 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
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 ;; Disable compiler optimizations to greatly reduce the running
3234 ;; time of the test suite.
3235 (setenv "CFLAGS" "-O0")
3236
3237 (invoke "python" "runtests.py" "-vv"
3238 "-j" (number->string (parallel-job-count))))))))
3239 (home-page "https://cython.org/")
3240 (synopsis "C extensions for Python")
3241 (description "Cython is an optimising static compiler for both the Python
3242 programming language and the extended Cython programming language. It makes
3243 writing C extensions for Python as easy as Python itself.")
3244 (license license:asl2.0)
3245 (properties `((python2-variant . ,(delay python2-cython))))))
3246
3247 (define-public python2-cython
3248 (package (inherit (package-with-python2
3249 (strip-python2-variant python-cython)))
3250 (name "python2-cython")
3251 (inputs
3252 `(("python-2" ,python-2))))) ; this is not automatically changed
3253
3254 ;; The RPython toolchain currently does not support Python 3.
3255 (define-public python2-rpython
3256 (package
3257 (name "python2-rpython")
3258 (version "0.2.1")
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "rpython" version))
3263 (sha256
3264 (base32
3265 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3266 (build-system python-build-system)
3267 (arguments `(#:python ,python-2))
3268 (native-inputs
3269 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3270 (home-page "https://rpython.readthedocs.org")
3271 (synopsis "Framework for implementing interpreters and virtual machines")
3272 (description "RPython is a translation and support framework for
3273 producing implementations of dynamic languages, emphasizing a clean separation
3274 between language specification and implementation aspects.")
3275 (license license:expat)))
3276
3277 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3278 ;; python-scipy still build, as these three packages are often used together.
3279 (define-public python-numpy
3280 (package
3281 (name "python-numpy")
3282 (version "1.15.4")
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (string-append
3287 "https://github.com/numpy/numpy/releases/download/v"
3288 version "/numpy-" version ".tar.gz"))
3289 (sha256
3290 (base32
3291 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3292 (build-system python-build-system)
3293 (inputs
3294 `(("openblas" ,openblas)
3295 ("lapack" ,lapack)))
3296 (native-inputs
3297 `(("python-cython" ,python-cython)
3298 ("python-pytest" ,python-pytest)
3299 ("gfortran" ,gfortran)))
3300 (arguments
3301 `(#:phases
3302 (modify-phases %standard-phases
3303 (add-before 'build 'configure-blas-lapack
3304 (lambda* (#:key inputs #:allow-other-keys)
3305 (call-with-output-file "site.cfg"
3306 (lambda (port)
3307 (format port
3308 "[openblas]
3309 libraries = openblas
3310 library_dirs = ~a/lib
3311 include_dirs = ~a/include
3312
3313 # backslash-n to make emacs happy
3314 \n[lapack]
3315 lapack_libs = lapack
3316 library_dirs = ~a/lib
3317 include_dirs = ~a/include
3318 "
3319 (assoc-ref inputs "openblas")
3320 (assoc-ref inputs "openblas")
3321 (assoc-ref inputs "lapack")
3322 (assoc-ref inputs "lapack"))))
3323 #t))
3324 (add-before 'build 'fix-executable-paths
3325 (lambda* (#:key inputs #:allow-other-keys)
3326 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3327 ;; instead of /bin/sh.
3328 (substitute* "numpy/distutils/exec_command.py"
3329 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3330 (string-append match-start (assoc-ref inputs "bash") match-end)))
3331 ;; Use "gcc" executable, not "cc".
3332 (substitute* "numpy/distutils/system_info.py"
3333 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3334 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3335 #t))
3336 ;; Tests can only be run after the library has been installed and not
3337 ;; within the source directory.
3338 (delete 'check)
3339 (add-after 'install 'check
3340 (lambda* (#:key outputs inputs #:allow-other-keys)
3341 ;; Make installed package available for running the tests
3342 (add-installed-pythonpath inputs outputs)
3343 ;; Make sure "f2py" etc is found.
3344 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3345 ":" (getenv "PATH")))
3346 (with-directory-excursion "/tmp"
3347 (invoke "python" "-c"
3348 "import numpy; numpy.test(verbose=2)")))))))
3349 (home-page "http://www.numpy.org/")
3350 (synopsis "Fundamental package for scientific computing with Python")
3351 (description "NumPy is the fundamental package for scientific computing
3352 with Python. It contains among other things: a powerful N-dimensional array
3353 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3354 and Fortran code, useful linear algebra, Fourier transform, and random number
3355 capabilities.")
3356 (license license:bsd-3)))
3357
3358 (define-public python2-numpy
3359 (package-with-python2 python-numpy))
3360
3361 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3362 ;; interest only for legacy code going back to NumPy's predecessor
3363 ;; Numeric.
3364 (define-public python2-numpy-1.8
3365 (package (inherit python2-numpy)
3366 (version "1.8.2")
3367 (source
3368 (origin
3369 (method url-fetch)
3370 (uri (string-append
3371 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3372 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3373 (sha256
3374 (base32
3375 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3376 (arguments
3377 (substitute-keyword-arguments (package-arguments python2-numpy)
3378 ((#:phases phases)
3379 `(modify-phases ,phases
3380 (replace 'configure-blas-lapack
3381 (lambda* (#:key inputs #:allow-other-keys)
3382 (call-with-output-file "site.cfg"
3383 (lambda (port)
3384 (format port
3385 "[openblas]
3386 libraries = openblas,lapack
3387 library_dirs = ~a/lib:~a/lib
3388 include_dirs = ~a/include:~a/include
3389 "
3390 (assoc-ref inputs "openblas")
3391 (assoc-ref inputs "lapack")
3392 (assoc-ref inputs "openblas")
3393 (assoc-ref inputs "lapack"))))
3394 #t))))))
3395 (native-inputs
3396 `(("python2-nose" ,python2-nose)))
3397 (description "NumPy is the fundamental package for scientific computing
3398 with Python. It contains among other things: a powerful N-dimensional array
3399 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3400 and Fortran code, useful linear algebra, Fourier transform, and random number
3401 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3402 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3403 Numeric.")
3404 (license license:bsd-3)))
3405
3406 (define-public python-munch
3407 (package
3408 (name "python-munch")
3409 (version "2.0.4")
3410 (source
3411 (origin
3412 (method url-fetch)
3413 (uri (pypi-uri "munch" version))
3414 (sha256
3415 (base32
3416 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3417 (build-system python-build-system)
3418 (home-page "https://github.com/Infinidat/munch")
3419 (synopsis "Dot-accessible dictionary")
3420 (description "Munch is a dot-accessible dictionary similar to JavaScript
3421 objects.")
3422 (license license:expat)))
3423
3424 (define-public python2-munch
3425 (package-with-python2 python-munch))
3426
3427 (define-public python-colormath
3428 (package
3429 (name "python-colormath")
3430 (version "3.0.0")
3431 (source
3432 (origin
3433 (method url-fetch)
3434 (uri (pypi-uri "colormath" version))
3435 (sha256
3436 (base32
3437 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3438 (build-system python-build-system)
3439 (propagated-inputs
3440 `(("python-networkx" ,python-networkx)
3441 ("python-numpy" ,python-numpy)))
3442 (home-page "https://github.com/gtaylor/python-colormath")
3443 (synopsis "Color math and conversion library")
3444 (description
3445 "This is a Python library for color math and conversions.")
3446 (license license:bsd-3)))
3447
3448 (define-public python2-colormath
3449 (package-with-python2 python-colormath))
3450
3451 (define-public python-spectra
3452 (package
3453 (name "python-spectra")
3454 (version "0.0.11")
3455 (source
3456 (origin
3457 (method url-fetch)
3458 (uri (pypi-uri "spectra" version))
3459 (sha256
3460 (base32
3461 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3462 (build-system python-build-system)
3463 (arguments
3464 `(#:phases
3465 (modify-phases %standard-phases
3466 (replace 'check
3467 (lambda _ (invoke "nosetests" "-v"))))))
3468 (propagated-inputs
3469 `(("python-colormath" ,python-colormath)))
3470 (native-inputs
3471 `(("python-nose" ,python-nose)))
3472 (home-page "https://github.com/jsvine/spectra")
3473 (synopsis "Color scales and color conversion")
3474 (description
3475 "This package provides a Python library intended to make color math,
3476 color scales, and color space conversion easy. It has support for:
3477
3478 @enumerate
3479 @item Color scales
3480 @item Color ranges
3481 @item Color blending
3482 @item Brightening/darkening colors
3483 @item Saturating/desaturating colors
3484 @item Conversion to/from multiple color spaces.
3485 @end enumerate\n")
3486 (license license:expat)))
3487
3488 (define-public python2-spectra
3489 (package-with-python2 python-spectra))
3490
3491 (define-public python-numpy-documentation
3492 (package
3493 (name "python-numpy-documentation")
3494 (version (package-version python-numpy))
3495 (source (package-source python-numpy))
3496 (build-system python-build-system)
3497 (native-inputs
3498 `(("python-matplotlib" ,python-matplotlib)
3499 ("python-numpy" ,python-numpy)
3500 ("pkg-config" ,pkg-config)
3501 ("python-sphinx" ,python-sphinx)
3502 ("python-numpydoc" ,python-numpydoc)
3503 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3504 texlive-fonts-cm-super
3505 texlive-fonts-ec
3506 texlive-generic-ifxetex
3507 texlive-generic-pdftex
3508 texlive-latex-amsfonts
3509 texlive-latex-capt-of
3510 texlive-latex-cmap
3511 texlive-latex-environ
3512 texlive-latex-eqparbox
3513 texlive-latex-etoolbox
3514 texlive-latex-expdlist
3515 texlive-latex-fancyhdr
3516 texlive-latex-fancyvrb
3517 texlive-latex-fncychap
3518 texlive-latex-float
3519 texlive-latex-framed
3520 texlive-latex-geometry
3521 texlive-latex-graphics
3522 texlive-latex-hyperref
3523 texlive-latex-mdwtools
3524 texlive-latex-multirow
3525 texlive-latex-needspace
3526 texlive-latex-oberdiek
3527 texlive-latex-parskip
3528 texlive-latex-preview
3529 texlive-latex-tabulary
3530 texlive-latex-threeparttable
3531 texlive-latex-titlesec
3532 texlive-latex-trimspaces
3533 texlive-latex-ucs
3534 texlive-latex-upquote
3535 texlive-latex-url
3536 texlive-latex-varwidth
3537 texlive-latex-wrapfig)))
3538 ("texinfo" ,texinfo)
3539 ("perl" ,perl)
3540 ("scipy-sphinx-theme"
3541 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3542 (method git-fetch)
3543 (uri (git-reference
3544 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3545 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3546 (sha256
3547 (base32
3548 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3549 ,@(package-native-inputs python-numpy)))
3550 (arguments
3551 `(#:tests? #f ; we're only generating the documentation
3552 #:phases
3553 (modify-phases %standard-phases
3554 (delete 'build)
3555 (replace 'install
3556 (lambda* (#:key inputs outputs #:allow-other-keys)
3557 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3558 (doc (string-append
3559 data "/doc/" ,name "-"
3560 ,(package-version python-numpy)))
3561 (info-reader (string-append data "/info"))
3562 (html (string-append doc "/html"))
3563 (scipy-sphinx-theme "scipy-sphinx-theme")
3564 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3565 (pyver ,(string-append "PYVER=")))
3566
3567 ;; FIXME: this is needed to for texlive-union to generate
3568 ;; fonts, which are not found.
3569 (setenv "HOME" "/tmp")
3570
3571 (with-directory-excursion "doc"
3572 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3573 (mkdir-p html)
3574 (invoke "make" "html" pyver)
3575 (invoke "make" "latex" "PAPER=a4" pyver)
3576 (invoke "make" "-C" "build/latex"
3577 "all-pdf" "PAPER=a4" pyver)
3578 ;; FIXME: Generation of the info file fails.
3579 ;; (invoke "make" "info" pyver)
3580 ;; (mkdir-p info)
3581 ;; (copy-file "build/texinfo/numpy.info"
3582 ;; (string-append info "/numpy.info"))
3583 (for-each (lambda (file)
3584 (copy-file (string-append "build/latex" file)
3585 (string-append doc file)))
3586 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3587 (with-directory-excursion "build/html"
3588 (for-each (lambda (file)
3589 (let* ((dir (dirname file))
3590 (tgt-dir (string-append html "/" dir)))
3591 (unless (equal? "." dir)
3592 (mkdir-p tgt-dir))
3593 (install-file file html)))
3594 (find-files "." ".*")))))
3595 #t)))))
3596 (home-page (package-home-page python-numpy))
3597 (synopsis "Documentation for the python-numpy package")
3598 (description (package-description python-numpy))
3599 (license (package-license python-numpy))))
3600
3601 (define-public python2-numpy-documentation
3602 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3603 (package
3604 (inherit numpy-documentation)
3605 (native-inputs `(("python2-functools32" ,python2-functools32)
3606 ,@(package-native-inputs numpy-documentation))))))
3607
3608 (define-public python-pygit2
3609 (package
3610 (name "python-pygit2")
3611 (version "0.28.2")
3612 (source
3613 (origin
3614 (method url-fetch)
3615 (uri (pypi-uri "pygit2" version))
3616 (sha256
3617 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3618 (build-system python-build-system)
3619 (arguments
3620 '(#:tests? #f)) ; tests don't run correctly in our environment
3621 (propagated-inputs
3622 `(("python-six" ,python-six)
3623 ("python-cffi" ,python-cffi)
3624 ("libgit2" ,libgit2)
3625 ("python-tox" ,python-tox)))
3626 (native-inputs
3627 `(("python-pytest" ,python-pytest)))
3628 (home-page "https://github.com/libgit2/pygit2")
3629 (synopsis "Python bindings for libgit2")
3630 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3631 library, libgit2 implements Git plumbing.")
3632 ;; GPL2.0 only, with linking exception.
3633 (license license:gpl2)))
3634
3635 (define-public python2-pygit2
3636 (package-with-python2 python-pygit2))
3637
3638 (define-public python-pyparsing
3639 (package
3640 (name "python-pyparsing")
3641 (version "2.3.1")
3642 (source
3643 (origin
3644 (method url-fetch)
3645 (uri (pypi-uri "pyparsing" version))
3646 (sha256
3647 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3648 (build-system python-build-system)
3649 (outputs '("out" "doc"))
3650 (arguments
3651 `(#:tests? #f ; no test target
3652 #:phases
3653 (modify-phases %standard-phases
3654 (add-after 'install 'install-doc
3655 (lambda* (#:key outputs #:allow-other-keys)
3656 (let* ((doc (string-append (assoc-ref outputs "doc")
3657 "/share/doc/" ,name "-" ,version))
3658 (html-doc (string-append doc "/html"))
3659 (examples (string-append doc "/examples")))
3660 (mkdir-p html-doc)
3661 (mkdir-p examples)
3662 (for-each
3663 (lambda (dir tgt)
3664 (map (lambda (file)
3665 (install-file file tgt))
3666 (find-files dir ".*")))
3667 (list "docs" "htmldoc" "examples")
3668 (list doc html-doc examples))
3669 #t))))))
3670 (home-page "https://github.com/pyparsing/pyparsing")
3671 (synopsis "Python parsing class library")
3672 (description
3673 "The pyparsing module is an alternative approach to creating and
3674 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3675 of regular expressions. The pyparsing module provides a library of classes
3676 that client code uses to construct the grammar directly in Python code.")
3677 (license license:expat)))
3678
3679 (define-public python2-pyparsing
3680 (package-with-python2 python-pyparsing))
3681
3682 (define-public python-numpydoc
3683 (package
3684 (name "python-numpydoc")
3685 (version "0.8.0")
3686 (source
3687 (origin
3688 (method url-fetch)
3689 (uri (pypi-uri "numpydoc" version))
3690 (sha256
3691 (base32
3692 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3693 (build-system python-build-system)
3694 (propagated-inputs
3695 `(("python-sphinx" ,python-sphinx)))
3696 (native-inputs
3697 `(("python-nose" ,python-nose)))
3698 (home-page "https://pypi.python.org/pypi/numpydoc")
3699 (synopsis
3700 "Numpy's Sphinx extensions")
3701 (description
3702 "Sphinx extension to support docstrings in Numpy format.")
3703 (license license:bsd-2)))
3704
3705 (define-public python2-numpydoc
3706 (package-with-python2 python-numpydoc))
3707
3708 (define-public python-numexpr
3709 (package
3710 (name "python-numexpr")
3711 (version "2.6.5")
3712 (source
3713 (origin
3714 (method url-fetch)
3715 (uri (pypi-uri "numexpr" version))
3716 (sha256
3717 (base32
3718 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3719 (build-system python-build-system)
3720 (arguments `(#:tests? #f)) ; no tests included
3721 (propagated-inputs
3722 `(("python-numpy" ,python-numpy)))
3723 (home-page "https://github.com/pydata/numexpr")
3724 (synopsis "Fast numerical expression evaluator for NumPy")
3725 (description
3726 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3727 expressions that operate on arrays are accelerated and use less memory than
3728 doing the same calculation in Python. In addition, its multi-threaded
3729 capabilities can make use of all your cores, which may accelerate
3730 computations, most specially if they are not memory-bounded (e.g. those using
3731 transcendental functions).")
3732 (license license:expat)))
3733
3734 (define-public python2-numexpr
3735 (package-with-python2 python-numexpr))
3736
3737 (define-public python-cycler
3738 (package
3739 (name "python-cycler")
3740 (version "0.10.0")
3741 (source (origin
3742 (method url-fetch)
3743 (uri (pypi-uri "cycler" version))
3744 (sha256
3745 (base32
3746 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3747 (build-system python-build-system)
3748 (arguments
3749 ;; XXX: The current version requires 'coveralls' which we don't have.
3750 ;; Enable this for the next release which uses 'python-pytest'.
3751 '(#:tests? #f))
3752 (propagated-inputs
3753 `(("python-six" ,python-six)))
3754 (home-page "http://matplotlib.org/cycler/")
3755 (synopsis "Composable keyword argument iterator")
3756 (description
3757 "When using @code{matplotlib} and plotting more than one line, it is
3758 common to want to be able to want to be able to cycle over one or more artist
3759 styles; but the plotting logic can quickly become involved.
3760 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3761 @code{Cycler} class was developed.")
3762 (license license:bsd-3)))
3763
3764 (define-public python2-cycler
3765 (package-with-python2 python-cycler))
3766
3767 (define-public python-colorspacious
3768 (package
3769 (name "python-colorspacious")
3770 (version "1.1.0")
3771 (source
3772 (origin
3773 (method git-fetch)
3774 (uri (git-reference
3775 (url "https://github.com/njsmith/colorspacious.git")
3776 (commit (string-append "v" version))))
3777 (file-name (git-file-name name version))
3778 (sha256
3779 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3780 (build-system python-build-system)
3781 (propagated-inputs
3782 `(("python-numpy" ,python-numpy)))
3783 (native-inputs
3784 `(("python-nose" ,python-nose)))
3785 (arguments
3786 `(#:phases
3787 (modify-phases %standard-phases
3788 (replace 'check
3789 (lambda _
3790 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3791 (home-page "https://github.com/njsmith/colorspacious")
3792 (synopsis "Python library for colorspace conversions")
3793 (description "@code{colorspacious} is a Python library that lets you
3794 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3795 (license license:expat)))
3796
3797 (define-public python2-colorspacious
3798 (package-with-python2 python-colorspacious))
3799
3800 (define-public python-matplotlib
3801 (package
3802 (name "python-matplotlib")
3803 (version "2.2.3")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (pypi-uri "matplotlib" version))
3808 (sha256
3809 (base32
3810 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3811 (build-system python-build-system)
3812 (propagated-inputs ; the following packages are all needed at run time
3813 `(("python-cycler" ,python-cycler)
3814 ("python-kiwisolver" ,python-kiwisolver)
3815 ("python-pyparsing" ,python-pyparsing)
3816 ("python-pygobject" ,python-pygobject)
3817 ("gobject-introspection" ,gobject-introspection)
3818 ("python-tkinter" ,python "tk")
3819 ("python-dateutil" ,python-dateutil)
3820 ("python-numpy" ,python-numpy)
3821 ("python-pillow" ,python-pillow)
3822 ("python-pytz" ,python-pytz)
3823 ("python-six" ,python-six)
3824 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3825 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3826 ;; object. For this reason we need to import both libraries.
3827 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3828 ("python-pycairo" ,python-pycairo)
3829 ("python-cairocffi" ,python-cairocffi)))
3830 (inputs
3831 `(("libpng" ,libpng)
3832 ("imagemagick" ,imagemagick)
3833 ("freetype" ,freetype)
3834 ("cairo" ,cairo)
3835 ("glib" ,glib)
3836 ;; FIXME: Add backends when available.
3837 ;("python-wxpython" ,python-wxpython)
3838 ("tcl" ,tcl)
3839 ("tk" ,tk)))
3840 (native-inputs
3841 `(("pkg-config" ,pkg-config)
3842 ("python-nose" ,python-nose)
3843 ("python-mock" ,python-mock)))
3844 (arguments
3845 `(#:phases
3846 (modify-phases %standard-phases
3847 (add-before 'build 'configure-environment
3848 (lambda* (#:key outputs inputs #:allow-other-keys)
3849 (let ((cairo (assoc-ref inputs "cairo")))
3850 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3851 ;; has not effect.
3852 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3853 (setenv "HOME" (getcwd))
3854 (call-with-output-file "setup.cfg"
3855 (lambda (port)
3856 (format port "[directories]~%
3857 basedirlist = ~a,~a~%
3858 [rc_options]~%
3859 backend = TkAgg~%"
3860 (assoc-ref inputs "tcl")
3861 (assoc-ref inputs "tk")))))
3862 #t)))))
3863 (home-page "http://matplotlib.org")
3864 (synopsis "2D plotting library for Python")
3865 (description
3866 "Matplotlib is a Python 2D plotting library which produces publication
3867 quality figures in a variety of hardcopy formats and interactive environments
3868 across platforms. Matplotlib can be used in Python scripts, the python and
3869 ipython shell, web application servers, and six graphical user interface
3870 toolkits.")
3871 (license license:psfl)
3872 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3873
3874 (define-public python2-matplotlib
3875 (let ((matplotlib (package-with-python2
3876 (strip-python2-variant python-matplotlib))))
3877 (package (inherit matplotlib)
3878 ;; Make sure to use special packages for Python 2 instead
3879 ;; of those automatically rewritten by package-with-python2.
3880 (propagated-inputs
3881 `(("python2-pycairo" ,python2-pycairo)
3882 ("python2-backports-functools-lru-cache"
3883 ,python2-backports-functools-lru-cache)
3884 ("python2-functools32" ,python2-functools32)
3885 ("python2-pygobject-2" ,python2-pygobject-2)
3886 ("python2-subprocess32" ,python2-subprocess32)
3887 ("python2-tkinter" ,python-2 "tk")
3888 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3889 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3890
3891 (define-public python-matplotlib-documentation
3892 (package
3893 (name "python-matplotlib-documentation")
3894 (version (package-version python-matplotlib))
3895 (source (package-source python-matplotlib))
3896 (build-system python-build-system)
3897 (native-inputs
3898 `(("python-matplotlib" ,python-matplotlib)
3899 ("python-colorspacious" ,python-colorspacious)
3900 ("python-sphinx" ,python-sphinx)
3901 ("python-sphinx-gallery" ,python-sphinx-gallery)
3902 ("python-numpydoc" ,python-numpydoc)
3903 ("python-ipython" ,python-ipython)
3904 ("python-ipykernel" ,python-ipykernel)
3905 ("python-mock" ,python-mock)
3906 ("graphviz" ,graphviz)
3907 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3908 texlive-latex-amsmath
3909 texlive-latex-enumitem
3910 texlive-latex-expdlist
3911 texlive-latex-geometry
3912 texlive-latex-preview
3913 texlive-latex-type1cm
3914 texlive-latex-ucs
3915
3916 texlive-generic-pdftex
3917
3918 texlive-fonts-amsfonts
3919 texlive-fonts-ec
3920 texlive-fonts-adobe-times
3921 texlive-fonts-txfonts)))
3922 ("texinfo" ,texinfo)
3923 ,@(package-native-inputs python-matplotlib)))
3924 (arguments
3925 `(#:tests? #f ; we're only generating documentation
3926 #:phases
3927 (modify-phases %standard-phases
3928 (replace 'build
3929 (lambda _
3930 (chdir "doc")
3931 (setenv "PYTHONPATH"
3932 (string-append (getenv "PYTHONPATH")
3933 ":" (getcwd) "/../examples/units"))
3934 (substitute* "conf.py"
3935 ;; Don't use git.
3936 (("^SHA = check_output.*")
3937 (string-append "SHA = \"" ,version "\"\n"))
3938 ;; Don't fetch intersphinx files from the Internet
3939 (("^explicit_order_folders" m)
3940 (string-append "intersphinx_mapping = {}\n" m))
3941 (("'sphinx.ext.intersphinx',") "")
3942 ;; Disable URL embedding which requires internet access.
3943 (("'https://docs.scipy.org/doc/numpy'") "None")
3944 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3945 (invoke "make"
3946 "SPHINXBUILD=sphinx-build"
3947 "SPHINXOPTS=" ; don't abort on warnings
3948 "html" "texinfo")))
3949 (replace 'install
3950 (lambda* (#:key inputs outputs #:allow-other-keys)
3951 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3952 (doc (string-append data "/doc/python-matplotlib-" ,version))
3953 (info (string-append data "/info"))
3954 (html (string-append doc "/html")))
3955 (mkdir-p html)
3956 (mkdir-p info)
3957 (copy-recursively "build/html" html)
3958 (symlink (string-append html "/_images")
3959 (string-append info "/matplotlib-figures"))
3960 (with-directory-excursion "build/texinfo"
3961 (substitute* "matplotlib.texi"
3962 (("@image\\{([^,]*)" all file)
3963 (string-append "@image{matplotlib-figures/" file)))
3964 (symlink (string-append html "/_images")
3965 "./matplotlib-figures")
3966 (invoke "makeinfo" "--no-split"
3967 "-o" "matplotlib.info" "matplotlib.texi"))
3968 (install-file "build/texinfo/matplotlib.info" info))
3969 #t)))))
3970 (home-page (package-home-page python-matplotlib))
3971 (synopsis "Documentation for the python-matplotlib package")
3972 (description (package-description python-matplotlib))
3973 (license (package-license python-matplotlib))))
3974
3975 (define-public python2-matplotlib-documentation
3976 (package-with-python2 python-matplotlib-documentation))
3977
3978 (define-public python-matplotlib-venn
3979 (package
3980 (name "python-matplotlib-venn")
3981 (version "0.11.5")
3982 (source
3983 (origin
3984 (method url-fetch)
3985 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3986 (sha256
3987 (base32
3988 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3989 (build-system python-build-system)
3990 (arguments '(#:tests? #f)) ; tests are not included
3991 (propagated-inputs
3992 `(("python-matplotlib" ,python-matplotlib)
3993 ("python-numpy" ,python-numpy)
3994 ("python-scipy" ,python-scipy)))
3995 (native-inputs
3996 `(("unzip" ,unzip)))
3997 (home-page "https://github.com/konstantint/matplotlib-venn")
3998 (synopsis "Plot area-proportional Venn diagrams")
3999 (description
4000 "This package provides tools for plotting area-proportional two- and
4001 three-way Venn diagrams in @code{matplotlib}.")
4002 (license license:expat)))
4003
4004 (define-public python2-pysnptools
4005 (package
4006 (name "python2-pysnptools")
4007 (version "0.3.13")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "pysnptools" version))
4012 (sha256
4013 (base32
4014 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4015 (build-system python-build-system)
4016 (arguments
4017 `(#:python ,python-2 ; only Python 2.7 is supported
4018 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4019 (propagated-inputs
4020 `(("python2-numpy" ,python2-numpy)
4021 ("python2-scipy" ,python2-scipy)
4022 ("python2-pandas" ,python2-pandas)))
4023 (native-inputs
4024 `(("python2-cython" ,python2-cython)))
4025 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4026 (synopsis "Library for reading and manipulating genetic data")
4027 (description
4028 "PySnpTools is a library for reading and manipulating genetic data. It
4029 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4030 those files. It can also efficiently manipulate ranges of integers using set
4031 operators such as union, intersection, and difference.")
4032 (license license:asl2.0)))
4033
4034 (define-public python-scipy
4035 (package
4036 (name "python-scipy")
4037 (version "1.2.2")
4038 (source
4039 (origin
4040 (method url-fetch)
4041 (uri (pypi-uri "scipy" version))
4042 (sha256
4043 (base32
4044 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4045 (build-system python-build-system)
4046 (propagated-inputs
4047 `(("python-numpy" ,python-numpy)
4048 ("python-matplotlib" ,python-matplotlib)
4049 ("python-pyparsing" ,python-pyparsing)))
4050 (inputs
4051 `(("lapack" ,lapack)
4052 ("openblas" ,openblas)))
4053 (native-inputs
4054 `(("python-cython" ,python-cython)
4055 ("python-pytest" ,python-pytest)
4056 ("python-sphinx" ,python-sphinx)
4057 ("python-numpydoc" ,python-numpydoc)
4058 ("gfortran" ,gfortran)
4059 ("perl" ,perl)
4060 ("which" ,which)))
4061 (outputs '("out" "doc"))
4062 (arguments
4063 `(#:phases
4064 (modify-phases %standard-phases
4065 (add-after 'unpack 'disable-broken-tests
4066 (lambda _
4067 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4068 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4069 (string-append indent
4070 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4071 m)))
4072 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4073 (("^def test_parallel_threads\\(\\):" m)
4074 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4075 m)))
4076 #t))
4077 (add-before 'build 'configure-openblas
4078 (lambda* (#:key inputs #:allow-other-keys)
4079 (call-with-output-file "site.cfg"
4080 (lambda (port)
4081 (format port
4082 "[blas]
4083 libraries = openblas
4084 library_dirs = ~a/lib
4085 include_dirs = ~a/include
4086
4087 # backslash-n to make emacs happy
4088 \n[atlas]
4089 library_dirs = ~a/lib
4090 atlas_libs = openblas
4091 "
4092 (assoc-ref inputs "openblas")
4093 (assoc-ref inputs "openblas")
4094 (assoc-ref inputs "openblas"))))
4095 #t))
4096 (add-after 'install 'install-doc
4097 (lambda* (#:key inputs outputs #:allow-other-keys)
4098 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4099 (doc (string-append data "/doc/" ,name "-" ,version))
4100 (html (string-append doc "/html"))
4101 (pyver ,(string-append "PYVER=" (version-major+minor
4102 (package-version python))))
4103 ;; By default it tries to run sphinx-build through the Python
4104 ;; interpreter which won't work with our shell wrapper.
4105 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4106 ;; Make installed package available for building the
4107 ;; documentation
4108 (add-installed-pythonpath inputs outputs)
4109 (with-directory-excursion "doc"
4110 ;; Fix generation of images for mathematical expressions.
4111 (substitute* (find-files "source" "conf\\.py")
4112 (("pngmath_use_preview = True")
4113 "pngmath_use_preview = False"))
4114 (mkdir-p html)
4115 (invoke "make" "html" pyver sphinxbuild)
4116 (with-directory-excursion "build/html"
4117 (for-each (lambda (file)
4118 (let* ((dir (dirname file))
4119 (tgt-dir (string-append html "/" dir)))
4120 (install-file file html)))
4121 (find-files "." ".*")))))
4122 #t))
4123 ;; Tests can only be run after the library has been installed and not
4124 ;; within the source directory.
4125 (delete 'check)
4126 (add-after 'install 'check
4127 (lambda* (#:key inputs outputs #:allow-other-keys)
4128 (add-installed-pythonpath inputs outputs)
4129 (with-directory-excursion "/tmp"
4130 (invoke "python" "-c"
4131 "import scipy; scipy.test(verbose=2)")))))))
4132 (home-page "https://www.scipy.org/")
4133 (synopsis "The Scipy library provides efficient numerical routines")
4134 (description "The SciPy library is one of the core packages that make up
4135 the SciPy stack. It provides many user-friendly and efficient numerical
4136 routines such as routines for numerical integration and optimization.")
4137 (properties `((python2-variant . ,(delay python2-scipy))))
4138 (license license:bsd-3)))
4139
4140 (define-public python2-scipy
4141 (package-with-python2
4142 (strip-python2-variant python-scipy)))
4143
4144 (define-public python-socksipy-branch
4145 (package
4146 (name "python-socksipy-branch")
4147 (version "1.01")
4148 (source
4149 (origin
4150 (method url-fetch)
4151 (uri (pypi-uri "SocksiPy-branch" version))
4152 (sha256
4153 (base32
4154 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4155 (build-system python-build-system)
4156 (arguments
4157 `(#:tests? #f)) ; There are no tests
4158 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4159 (synopsis "Python SOCKS module")
4160 (description
4161 "SocksiPy - A Python SOCKS client module. It provides a
4162 socket-like interface that supports connections to any TCP
4163 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4164 The original version was developed by Dan Haim, this is a
4165 branch created by Mario Vilas to address some open issues,
4166 as the original project seems to have been abandoned circa 2007.")
4167 (license license:bsd-3)))
4168
4169 (define-public python2-socksipy-branch
4170 (package-with-python2 python-socksipy-branch))
4171
4172 (define-public python-pycodestyle
4173 (package
4174 (name "python-pycodestyle")
4175 (version "2.4.0")
4176 (source
4177 (origin
4178 (method url-fetch)
4179 (uri (pypi-uri "pycodestyle" version))
4180 (sha256
4181 (base32
4182 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4183 (build-system python-build-system)
4184 (home-page "https://pycodestyle.readthedocs.io/")
4185 (synopsis "Python style guide checker")
4186 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4187 Python code against some of the style conventions in
4188 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4189 (license license:expat)))
4190
4191 (define-public python2-pycodestyle
4192 (package-with-python2 python-pycodestyle))
4193
4194 (define-public python-multidict
4195 (package
4196 (name "python-multidict")
4197 (version "4.2.0")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (pypi-uri "multidict" version))
4202 (sha256
4203 (base32
4204 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4205 (build-system python-build-system)
4206 (native-inputs
4207 `(("python-pytest" ,python-pytest)
4208 ("python-pytest-runner" ,python-pytest-runner)))
4209 (home-page "https://github.com/aio-libs/multidict/")
4210 (synopsis "Multidict implementation")
4211 (description "Multidict is dict-like collection of key-value pairs
4212 where key might be occurred more than once in the container.")
4213 (license license:asl2.0)))
4214
4215 (define-public python-orderedmultidict
4216 (package
4217 (name "python-orderedmultidict")
4218 (version "0.7.11")
4219 (source
4220 (origin
4221 (method url-fetch)
4222 (uri (pypi-uri "orderedmultidict" version))
4223 (sha256
4224 (base32
4225 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4226 (build-system python-build-system)
4227 (arguments
4228 `(#:phases
4229 (modify-phases %standard-phases
4230 (add-after 'unpack 'fix-tests
4231 (lambda _
4232 ;; The package uses nosetest for running the tests.
4233 ;; Adding this initfile allows to run the test suite
4234 ;; without requiring nosetest.
4235 (with-output-to-file "tests/__init__.py" newline)
4236 #t)))))
4237 (propagated-inputs
4238 `(("python-six" ,python-six)))
4239 (native-inputs
4240 `(("python-pycodestyle" ,python-pycodestyle)))
4241 (home-page "https://github.com/gruns/orderedmultidict")
4242 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4243 (description "This package contains a library for ordered multivalue
4244 dictionaries. A multivalue dictionary is a dictionary that can store
4245 multiple values for the same key. An ordered multivalue dictionary is a
4246 multivalue dictionary that retains the order of insertions and deletions.")
4247 (license license:unlicense)))
4248
4249 (define-public python2-orderedmultidict
4250 (package-with-python2 python-orderedmultidict))
4251
4252 (define-public python-autopep8
4253 (package
4254 (name "python-autopep8")
4255 (version "1.3.5")
4256 (source
4257 (origin
4258 (method url-fetch)
4259 (uri (pypi-uri "autopep8" version))
4260 (sha256
4261 (base32
4262 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4263 (build-system python-build-system)
4264 (propagated-inputs
4265 `(("python-pycodestyle" ,python-pycodestyle)))
4266 (home-page "https://github.com/hhatto/autopep8")
4267 (synopsis "Format Python code according to the PEP 8 style guide")
4268 (description
4269 "@code{autopep8} automatically formats Python code to conform to
4270 the PEP 8 style guide. It uses the pycodestyle utility to determine
4271 what parts of the code needs to be formatted. @code{autopep8} is
4272 capable of fixing most of the formatting issues that can be reported
4273 by pycodestyle.")
4274 (license (license:non-copyleft
4275 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4276
4277 (define-public python2-autopep8
4278 (package-with-python2 python-autopep8))
4279
4280 (define-public python-distutils-extra
4281 (package
4282 (name "python-distutils-extra")
4283 (version "2.38")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4288 version "/+download/python-distutils-extra-"
4289 version ".tar.gz"))
4290 (sha256
4291 (base32
4292 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4293 (build-system python-build-system)
4294 (home-page "https://launchpad.net/python-distutils-extra/")
4295 (synopsis "Enhancements to Python's distutils")
4296 (description
4297 "The python-distutils-extra module enables you to easily integrate
4298 gettext support, themed icons, and scrollkeeper-based documentation into
4299 Python's distutils.")
4300 (license license:gpl2)))
4301
4302 (define-public python2-distutils-extra
4303 (package-with-python2 python-distutils-extra))
4304
4305 (define-public python2-elib.intl
4306 (package
4307 (name "python2-elib.intl")
4308 (version "0.0.3")
4309 (source
4310 (origin
4311 ;; This project doesn't tag releases or publish tarballs, so we take
4312 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4313 (method git-fetch)
4314 (uri (git-reference
4315 (url "https://github.com/dieterv/elib.intl.git")
4316 (commit "d09997cfef")))
4317 (file-name (string-append name "-" version "-checkout"))
4318 (sha256
4319 (base32
4320 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4321 (build-system python-build-system)
4322 (arguments
4323 ;; incompatible with Python 3 (exception syntax)
4324 `(#:python ,python-2
4325 #:tests? #f))
4326 (home-page "https://github.com/dieterv/elib.intl")
4327 (synopsis "Enhanced internationalization for Python")
4328 (description
4329 "The elib.intl module provides enhanced internationalization (I18N)
4330 services for your Python modules and applications.")
4331 (license license:lgpl3+)))
4332
4333 (define-public python-olefile
4334 (package
4335 (name "python-olefile")
4336 (version "0.46")
4337 (source
4338 (origin
4339 (method url-fetch)
4340 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4341 "download/v" version "/olefile-" version ".tar.gz"))
4342 (file-name (string-append name "-" version ".tar.gz"))
4343 (sha256
4344 (base32
4345 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4346 (build-system python-build-system)
4347 (home-page "https://www.decalage.info/python/olefileio")
4348 (synopsis "Read and write Microsoft OLE2 files.")
4349 (description
4350 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4351 Storage or Compound Document, Microsoft Office). It is an improved version of
4352 the OleFileIO module from PIL, the Python Image Library.")
4353 (license license:bsd-3)))
4354
4355 (define-public python2-olefile
4356 (package-with-python2 python-olefile))
4357
4358 (define-public python-pillow
4359 (package
4360 (name "python-pillow")
4361 (version "5.4.1")
4362 (source
4363 (origin
4364 (method url-fetch)
4365 (uri (pypi-uri "Pillow" version))
4366 (sha256
4367 (base32
4368 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
4369 (build-system python-build-system)
4370 (native-inputs
4371 `(("python-pytest" ,python-pytest)))
4372 (inputs
4373 `(("freetype" ,freetype)
4374 ("lcms" ,lcms)
4375 ("zlib" ,zlib)
4376 ("libjpeg" ,libjpeg)
4377 ("openjpeg" ,openjpeg)
4378 ("libtiff" ,libtiff)
4379 ("libwebp" ,libwebp)))
4380 (propagated-inputs
4381 `(("python-olefile" ,python-olefile)))
4382 (arguments
4383 `(#:phases
4384 (modify-phases %standard-phases
4385 (add-after 'unpack 'patch-ldconfig
4386 (lambda _
4387 (substitute* "setup.py"
4388 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4389 (delete 'check) ; We must run checks after python-pillow is installed.
4390 (add-after 'install 'check-installed
4391 (lambda* (#:key outputs inputs #:allow-other-keys)
4392 (begin
4393 (setenv "HOME" (getcwd))
4394 ;; Make installed package available for running the tests.
4395 (add-installed-pythonpath inputs outputs)
4396 (invoke "python" "selftest.py" "--installed")
4397 (invoke "python" "-m" "pytest" "-vv")))))))
4398 (home-page "https://python-pillow.org")
4399 (synopsis "Fork of the Python Imaging Library")
4400 (description
4401 "The Python Imaging Library adds image processing capabilities to your
4402 Python interpreter. This library provides extensive file format support, an
4403 efficient internal representation, and fairly powerful image processing
4404 capabilities. The core image library is designed for fast access to data
4405 stored in a few basic pixel formats. It should provide a solid foundation for
4406 a general image processing tool.")
4407 (license (license:x11-style
4408 "http://www.pythonware.com/products/pil/license.htm"
4409 "The PIL Software License"))))
4410
4411 (define-public python2-pillow
4412 (package-with-python2 python-pillow))
4413
4414 (define-public python-pycparser
4415 (package
4416 (name "python-pycparser")
4417 (version "2.19")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "pycparser" version))
4422 (sha256
4423 (base32
4424 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4425 (outputs '("out" "doc"))
4426 (build-system python-build-system)
4427 (native-inputs
4428 `(("pkg-config" ,pkg-config)))
4429 (arguments
4430 `(#:phases
4431 (modify-phases %standard-phases
4432 (replace 'check
4433 (lambda _
4434 (with-directory-excursion "tests"
4435 (invoke "python" "all_tests.py"))
4436 #t))
4437 (add-after 'install 'install-doc
4438 (lambda* (#:key outputs #:allow-other-keys)
4439 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4440 (doc (string-append data "/doc/" ,name "-" ,version))
4441 (examples (string-append doc "/examples")))
4442 (mkdir-p examples)
4443 (for-each (lambda (file)
4444 (copy-file (string-append "." file)
4445 (string-append doc file)))
4446 '("/README.rst" "/CHANGES" "/LICENSE"))
4447 (copy-recursively "examples" examples)
4448 #t))))))
4449 (home-page "https://github.com/eliben/pycparser")
4450 (synopsis "C parser in Python")
4451 (description
4452 "Pycparser is a complete parser of the C language, written in pure Python
4453 using the PLY parsing library. It parses C code into an AST and can serve as
4454 a front-end for C compilers or analysis tools.")
4455 (license license:bsd-3)))
4456
4457 (define-public python2-pycparser
4458 (package-with-python2 python-pycparser))
4459
4460 (define-public python-pywavelets
4461 (package
4462 (name "python-pywavelets")
4463 (version "1.0.1")
4464 (home-page "https://github.com/PyWavelets/pywt")
4465 (source (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "PyWavelets" version))
4468 (sha256
4469 (base32
4470 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4471 (build-system python-build-system)
4472 (arguments
4473 '(#:modules ((ice-9 ftw)
4474 (srfi srfi-1)
4475 (srfi srfi-26)
4476 (guix build utils)
4477 (guix build python-build-system))
4478 #:phases (modify-phases %standard-phases
4479 (replace 'check
4480 (lambda _
4481 (let ((cwd (getcwd))
4482 (libdir (find (cut string-prefix? "lib." <>)
4483 (scandir "build"))))
4484 (with-directory-excursion (string-append cwd "/build/" libdir)
4485 (invoke "nosetests" "-v" "."))))))))
4486 (native-inputs
4487 `(("python-matplotlib" ,python-matplotlib) ;for tests
4488 ("python-nose" ,python-nose)))
4489 (propagated-inputs
4490 `(("python-numpy" ,python-numpy)))
4491 (synopsis "Wavelet transforms in Python")
4492 (description
4493 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4494 mathematical basis functions that are localized in both time and frequency.
4495 Wavelet transforms are time-frequency transforms employing wavelets. They are
4496 similar to Fourier transforms, the difference being that Fourier transforms are
4497 localized only in frequency instead of in time and frequency.")
4498 (license license:expat)))
4499
4500 (define-public python2-pywavelets
4501 (package-with-python2 python-pywavelets))
4502
4503 (define-public python-xcffib
4504 (package
4505 (name "python-xcffib")
4506 (version "0.6.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (pypi-uri "xcffib" version))
4511 (sha256
4512 (base32
4513 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4514 (build-system python-build-system)
4515 (inputs
4516 `(("libxcb" ,libxcb)))
4517 (propagated-inputs
4518 `(("python-cffi" ,python-cffi) ; used at run time
4519 ("python-six" ,python-six)))
4520 (arguments
4521 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4522 #:tests? #f
4523 #:phases
4524 (modify-phases %standard-phases
4525 (add-after 'unpack 'fix-libxcb-path
4526 (lambda* (#:key inputs #:allow-other-keys)
4527 (let ((libxcb (assoc-ref inputs "libxcb")))
4528 (substitute* '("xcffib/__init__.py")
4529 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4530 #t)))
4531 (add-after 'install 'install-doc
4532 (lambda* (#:key outputs #:allow-other-keys)
4533 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4534 "/doc/" ,name "-" ,version)))
4535 (mkdir-p doc)
4536 (copy-file "README.md"
4537 (string-append doc "/README.md"))
4538 #t))))))
4539 (home-page "https://github.com/tych0/xcffib")
4540 (synopsis "XCB Python bindings")
4541 (description
4542 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4543 support for Python 3 and PyPy. It is based on cffi.")
4544 (license license:expat)))
4545
4546 (define-public python2-xcffib
4547 (package-with-python2 python-xcffib))
4548
4549 (define-public python-cairocffi
4550 (package
4551 (name "python-cairocffi")
4552 (version "0.9.0")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 (uri (pypi-uri "cairocffi" version))
4557 (sha256
4558 (base32
4559 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4560 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4561 (build-system python-build-system)
4562 (outputs '("out" "doc"))
4563 (inputs
4564 `(("glib" ,glib)
4565 ("gtk+" ,gtk+)
4566 ("gdk-pixbuf" ,gdk-pixbuf)
4567 ("cairo" ,cairo)
4568 ("pango" ,pango)))
4569 (native-inputs
4570 `(("pkg-config" ,pkg-config)
4571 ("python-pytest" ,python-pytest)
4572 ("python-pytest-cov" ,python-pytest-cov)
4573 ("python-pytest-runner" ,python-pytest-runner)
4574 ("python-sphinx" ,python-sphinx)
4575 ("python-docutils" ,python-docutils)))
4576 (propagated-inputs
4577 `(("python-xcffib" ,python-xcffib))) ; used at run time
4578 (arguments
4579 `(#:phases
4580 (modify-phases %standard-phases
4581 (add-after 'unpack 'patch-paths
4582 (lambda* (#:key inputs outputs #:allow-other-keys)
4583 (substitute* (find-files "." "\\.py$")
4584 (("dlopen\\(ffi, 'cairo'")
4585 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4586 "/lib/libcairo.so.2'"))
4587 (("dlopen\\(ffi, 'gdk-3'")
4588 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4589 "/lib/libgtk-3.so.0'"))
4590 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4591 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4592 "/lib/libgdk_pixbuf-2.0.so.0'"))
4593 (("dlopen\\(ffi, 'glib-2.0'")
4594 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4595 "/lib/libglib-2.0.so.0'"))
4596 (("dlopen\\(ffi, 'gobject-2.0'")
4597 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4598 "/lib/libgobject-2.0.so.0'"))
4599 (("dlopen\\(ffi, 'pangocairo-1.0'")
4600 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4601 "/lib/libpangocairo-1.0.so.0'"))
4602 (("dlopen\\(ffi, 'pango-1.0'")
4603 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4604 "/lib/libpango-1.0.so.0'")))
4605 #t))
4606 (add-after 'install 'install-doc
4607 (lambda* (#:key inputs outputs #:allow-other-keys)
4608 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4609 (doc (string-append data "/doc/" ,name "-" ,version))
4610 (html (string-append doc "/html")))
4611 (setenv "LD_LIBRARY_PATH"
4612 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4613 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4614 (setenv "LANG" "en_US.UTF-8")
4615 (mkdir-p html)
4616 (for-each (lambda (file)
4617 (copy-file (string-append "." file)
4618 (string-append doc file)))
4619 '("/README.rst" "/CHANGES" "/LICENSE"))
4620 (system* "python" "setup.py" "build_sphinx")
4621 (copy-recursively "docs/_build/html" html)
4622 #t))))))
4623 (home-page "https://github.com/Kozea/cairocffi")
4624 (synopsis "Python bindings and object-oriented API for Cairo")
4625 (description
4626 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4627 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4628 graphics library with support for multiple backends including image buffers,
4629 PNG, PostScript, PDF, and SVG file output.")
4630 (license license:bsd-3)))
4631
4632 (define-public python2-cairocffi
4633 (package-with-python2 python-cairocffi))
4634
4635 (define-public python-decorator
4636 (package
4637 (name "python-decorator")
4638 (version "4.3.0")
4639 (source
4640 (origin
4641 (method url-fetch)
4642 (uri (pypi-uri "decorator" version))
4643 (sha256
4644 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4645 (build-system python-build-system)
4646 (home-page "https://pypi.python.org/pypi/decorator/")
4647 (synopsis "Python module to simplify usage of decorators")
4648 (description
4649 "The aim of the decorator module is to simplify the usage of decorators
4650 for the average programmer, and to popularize decorators usage giving examples
4651 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4652 etc. The core of this module is a decorator factory.")
4653 (license license:expat)))
4654
4655 (define-public python2-decorator
4656 (package-with-python2 python-decorator))
4657
4658 (define-public python-drmaa
4659 (package
4660 (name "python-drmaa")
4661 (version "0.7.7")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "drmaa" version))
4666 (sha256
4667 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4668 (build-system python-build-system)
4669 ;; The test suite requires libdrmaa which is provided by the cluster
4670 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4671 ;; should be set to the path of the libdrmaa library.
4672 (arguments '(#:tests? #f))
4673 (native-inputs
4674 `(("python-nose" ,python-nose)))
4675 (home-page "https://pypi.python.org/pypi/drmaa")
4676 (synopsis "Python bindings for the DRMAA library")
4677 (description
4678 "A Python package for Distributed Resource Management (DRM) job
4679 submission and control. This package is an implementation of the DRMAA 1.0
4680 Python language binding specification.")
4681 (license license:bsd-3)))
4682
4683 (define-public python2-drmaa
4684 (package-with-python2 python-drmaa))
4685
4686 (define-public python-grako
4687 (package
4688 (name "python-grako")
4689 (version "3.99.9")
4690 (source
4691 (origin
4692 (method url-fetch)
4693 (uri
4694 (pypi-uri "grako" version ".zip"))
4695 (sha256
4696 (base32
4697 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4698 (build-system python-build-system)
4699 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4700 (native-inputs
4701 `(("unzip" ,unzip)
4702 ("python-pytest" ,python-pytest)
4703 ("python-pytest-runner" ,python-pytest-runner)))
4704 (home-page "https://bitbucket.org/neogeny/grako")
4705 (synopsis "EBNF parser generator")
4706 (description
4707 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4708 memoizing PEG/Packrat parser in Python.")
4709 (license license:bsd-3)))
4710
4711 (define-public python2-grako
4712 (package-with-python2 python-grako))
4713
4714 (define-public python-gridmap
4715 (package
4716 (name "python-gridmap")
4717 (version "0.13.0")
4718 (source
4719 (origin
4720 (method git-fetch)
4721 (uri (git-reference
4722 (url "https://github.com/pygridtools/gridmap.git")
4723 (commit (string-append "v" version))))
4724 (file-name (git-file-name name version))
4725 (sha256
4726 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4727 (build-system python-build-system)
4728 (arguments
4729 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4730 (propagated-inputs
4731 `(("python-psutil" ,python-psutil)
4732 ("python-drmaa" ,python-drmaa)
4733 ("python-pyzmq" ,python-pyzmq)))
4734 (home-page "https://github.com/pygridtools/gridmap")
4735 (synopsis "Create jobs on a cluster directly from Python")
4736 (description
4737 "Gridmap is a Python package to allow you to easily create jobs on the
4738 cluster directly from Python. You can directly map Python functions onto the
4739 cluster without needing to write any wrapper code yourself.")
4740 (license license:gpl3+)))
4741
4742 (define-public python2-gridmap
4743 (package-with-python2 python-gridmap))
4744
4745 (define-public python-honcho
4746 (package
4747 (name "python-honcho")
4748 (version "1.0.1")
4749 (source
4750 (origin
4751 (method git-fetch)
4752 (uri (git-reference
4753 (url "https://github.com/nickstenning/honcho.git")
4754 (commit (string-append "v" version))))
4755 (file-name (git-file-name name version))
4756 (sha256
4757 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4758 (build-system python-build-system)
4759 (native-inputs
4760 `(("python-pytest" ,python-pytest)
4761 ("python-mock" ,python-mock)
4762 ("python-tox" ,python-tox)
4763 ("which" ,which))) ;for tests
4764 (propagated-inputs
4765 `(("python-jinja2" ,python-jinja2)))
4766 (arguments
4767 `(#:phases
4768 (modify-phases %standard-phases
4769 (delete 'check)
4770 (add-after 'install 'check
4771 (lambda* (#:key outputs inputs #:allow-other-keys)
4772 ;; fix honcho path in testsuite
4773 (substitute* "tests/conftest.py"
4774 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4775 "/bin/honcho" "'")))
4776 ;; It's easier to run tests after install.
4777 ;; Make installed package available for running the tests
4778 (add-installed-pythonpath inputs outputs)
4779 (invoke "py.test" "-v"))))))
4780 (home-page "https://github.com/nickstenning/honcho")
4781 (synopsis "Manage Procfile-based applications")
4782 (description
4783 "A Procfile is a file which describes how to run an application
4784 consisting of several processes. honcho starts all listed processes.
4785 The output of all running processes is collected by honcho and
4786 displayed.")
4787 (license license:expat)))
4788
4789 (define-public python2-honcho
4790 (package-with-python2 python-honcho))
4791
4792 (define-public python-pexpect
4793 (package
4794 (name "python-pexpect")
4795 (version "4.6.0")
4796 (source
4797 (origin
4798 (method url-fetch)
4799 (uri (pypi-uri "pexpect" version))
4800 (sha256
4801 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4802 (build-system python-build-system)
4803 (arguments
4804 `(#:phases
4805 (modify-phases %standard-phases
4806 (add-before 'check 'prepare-tests
4807 (lambda _
4808 (substitute* (find-files "tests")
4809 (("/bin/ls") (which "ls"))
4810 (("/bin/echo") (which "echo"))
4811 (("/bin/which") (which "which"))
4812 ;; Many tests try to use the /bin directory which
4813 ;; is not present in the build environment.
4814 ;; Use one that's non-empty and unlikely to change.
4815 (("/bin'") "/dev'"))
4816 ;; XXX: Socket connection test gets "Connection reset by peer".
4817 ;; Why does it not work? Delete for now.
4818 (delete-file "tests/test_socket.py")
4819 #t))
4820 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4821 (native-inputs
4822 `(("python-nose" ,python-nose)
4823 ("python-pytest" ,python-pytest)
4824 ("man-db" ,man-db)
4825 ("which" ,which)
4826 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4827 (propagated-inputs
4828 `(("python-ptyprocess" ,python-ptyprocess)))
4829 (home-page "http://pexpect.readthedocs.org/")
4830 (synopsis "Controlling interactive console applications")
4831 (description
4832 "Pexpect is a pure Python module for spawning child applications;
4833 controlling them; and responding to expected patterns in their output.
4834 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4835 child application and control it as if a human were typing commands.")
4836 (license license:isc)))
4837
4838 (define-public python2-pexpect
4839 (package-with-python2 python-pexpect))
4840
4841 (define-public python-setuptools-scm
4842 (package
4843 (name "python-setuptools-scm")
4844 (version "3.1.0")
4845 (source (origin
4846 (method url-fetch)
4847 (uri (pypi-uri "setuptools_scm" version))
4848 (sha256
4849 (base32
4850 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4851 (build-system python-build-system)
4852 (home-page "https://github.com/pypa/setuptools_scm/")
4853 (synopsis "Manage Python package versions in SCM metadata")
4854 (description
4855 "Setuptools_scm handles managing your Python package versions in
4856 @dfn{software configuration management} (SCM) metadata instead of declaring
4857 them as the version argument or in a SCM managed file.")
4858 (license license:expat)))
4859
4860 (define-public python2-setuptools-scm
4861 (package-with-python2 python-setuptools-scm))
4862
4863 (define-public python-pathlib2
4864 (package
4865 (name "python-pathlib2")
4866 (version "2.3.3")
4867 (source
4868 (origin
4869 (method url-fetch)
4870 (uri (pypi-uri "pathlib2" version))
4871 (sha256
4872 (base32
4873 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4874 (build-system python-build-system)
4875 (propagated-inputs
4876 `(("python-scandir" ,python-scandir)
4877 ("python-six" ,python-six)))
4878 (home-page "https://pypi.python.org/pypi/pathlib2/")
4879 (synopsis "Object-oriented file system paths")
4880 (description "The goal of pathlib2 is to provide a backport of the
4881 standard @code{pathlib} module which tracks the standard library module, so
4882 all the newest features of the standard @code{pathlib} can be used also on
4883 older Python versions.")
4884 (license license:expat)))
4885
4886 (define-public python-importlib-metadata
4887 (package
4888 (name "python-importlib-metadata")
4889 (version "0.18")
4890 (source
4891 (origin
4892 (method url-fetch)
4893 (uri (pypi-uri "importlib_metadata" version))
4894 (sha256
4895 (base32
4896 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4897 (build-system python-build-system)
4898 (propagated-inputs
4899 `(("python-configparser" ,python-configparser)
4900 ("python-contextlib2" ,python-contextlib2)
4901 ("python-docutils" ,python-docutils)
4902 ("python-pathlib2" ,python-pathlib2)
4903 ("python-rst.linker" ,python-rst.linker)
4904 ("python-zipp" ,python-zipp)))
4905 (native-inputs
4906 `(("python-setuptools-scm" ,python-setuptools-scm)
4907 ("python-sphinx" ,python-sphinx)))
4908 (home-page "https://importlib-metadata.readthedocs.io/")
4909 (synopsis "Read metadata from Python packages")
4910 (description
4911 "@code{importlib_metadata} is a library which provides an API for
4912 accessing an installed Python package's metadata, such as its entry points or
4913 its top-level name. This functionality intends to replace most uses of
4914 @code{pkg_resources} entry point API and metadata API. Along with
4915 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4916 need to use the older and less efficient @code{pkg_resources} package.")
4917 (license license:asl2.0)))
4918
4919 (define-public python-jaraco-packaging
4920 (package
4921 (name "python-jaraco-packaging")
4922 (version "6.1")
4923 (source
4924 (origin
4925 (method url-fetch)
4926 (uri (pypi-uri "jaraco.packaging" version))
4927 (sha256
4928 (base32
4929 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4930 (build-system python-build-system)
4931 (propagated-inputs
4932 `(("python-pytest" ,python-pytest)
4933 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4934 ("python-pytest-flake8" ,python-pytest-flake8)
4935 ("python-rst.linker" ,python-rst.linker)
4936 ("python-setuptools" ,python-setuptools)
4937 ("python-setuptools-scm" ,python-setuptools-scm)
4938 ("python-six" ,python-six)
4939 ("python-sphinx" ,python-sphinx)))
4940 (home-page "https://github.com/jaraco/jaraco.packaging")
4941 (synopsis "Tools to supplement packaging Python releases")
4942 (description
4943 "This package provides various tools to supplement packaging Python
4944 releases.")
4945 (license license:expat)))
4946
4947 (define-public python-pathpy
4948 (package
4949 (name "python-pathpy")
4950 (version "11.5.0")
4951 (source
4952 (origin
4953 (method url-fetch)
4954 (uri (pypi-uri "path.py" version))
4955 (sha256
4956 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4957 (outputs '("out" "doc"))
4958 (build-system python-build-system)
4959 (propagated-inputs
4960 `(("python-appdirs" ,python-appdirs)))
4961 (native-inputs
4962 `(("python-setuptools-scm" ,python-setuptools-scm)
4963 ("python-sphinx" ,python-sphinx)
4964 ("python-rst.linker" ,python-rst.linker)
4965 ("python-pytest" ,python-pytest)
4966 ("python-pytest-runner" ,python-pytest-runner)
4967 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4968 (arguments
4969 `(#:phases
4970 (modify-phases %standard-phases
4971 (add-after 'build 'build-doc
4972 (lambda _
4973 (setenv "LANG" "en_US.UTF-8")
4974 (invoke "python" "setup.py" "build_sphinx")))
4975 (add-after 'install 'install-doc
4976 (lambda* (#:key outputs #:allow-other-keys)
4977 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4978 (doc (string-append data "/doc/" ,name "-" ,version))
4979 (html (string-append doc "/html")))
4980 (mkdir-p html)
4981 (for-each (lambda (file)
4982 (copy-file file (string-append doc "/" file)))
4983 '("README.rst" "CHANGES.rst"))
4984 (copy-recursively "build/sphinx/html" html)
4985 #t)))
4986 (replace 'check
4987 (lambda _
4988 ;; The import time test aborts if an import takes longer than
4989 ;; 100ms. It may very well take a little longer than that.
4990 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
4991 (home-page "https://github.com/jaraco/path.py")
4992 (synopsis "Python module wrapper for built-in os.path")
4993 (description
4994 "@code{path.py} implements path objects as first-class entities, allowing
4995 common operations on files to be invoked on those path objects directly.")
4996 (license license:expat)))
4997
4998 (define-public python2-pathpy
4999 (package-with-python2 python-pathpy))
5000
5001 (define-public python-simplegeneric
5002 (package
5003 (name "python-simplegeneric")
5004 (version "0.8.1")
5005 (source
5006 (origin
5007 (method url-fetch)
5008 (uri (pypi-uri "simplegeneric" version ".zip"))
5009 (sha256
5010 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5011 (build-system python-build-system)
5012 (native-inputs
5013 `(("unzip" ,unzip)))
5014 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5015 (synopsis "Python module for simple generic functions")
5016 (description
5017 "The simplegeneric module lets you define simple single-dispatch generic
5018 functions, akin to Python’s built-in generic functions like @code{len()},
5019 @code{iter()} and so on. However, instead of using specially-named methods,
5020 these generic functions use simple lookup tables, akin to those used by
5021 e.g. @code{pickle.dump()} and other generic functions found in the Python
5022 standard library.")
5023 (license license:zpl2.1)))
5024
5025 (define-public python2-simplegeneric
5026 (package-with-python2 python-simplegeneric))
5027
5028 (define-public python-ipython-genutils
5029 ;; TODO: This package is retired, check if can be removed, see description.
5030 (package
5031 (name "python-ipython-genutils")
5032 (version "0.1.0")
5033 (source
5034 (origin
5035 (method url-fetch)
5036 (uri (pypi-uri "ipython_genutils" version))
5037 (sha256
5038 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5039 (build-system python-build-system)
5040 (arguments `(#:tests? #f)) ; no tests
5041 (home-page "https://ipython.org")
5042 (synopsis "Vestigial utilities from IPython")
5043 (description
5044 "This package provides retired utilities from IPython. No packages
5045 outside IPython/Jupyter should depend on it.
5046
5047 This package shouldn't exist. It contains some common utilities shared by
5048 Jupyter and IPython projects during The Big Split. As soon as possible, those
5049 packages will remove their dependency on this, and this package will go
5050 away.")
5051 (license license:bsd-3)))
5052
5053 (define-public python2-ipython-genutils
5054 (package-with-python2 python-ipython-genutils))
5055
5056 (define-public python-traitlets
5057 (package
5058 (name "python-traitlets")
5059 (version "4.3.2")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "traitlets" version))
5064 (sha256
5065 (base32
5066 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5067 (build-system python-build-system)
5068 (arguments
5069 `(#:phases
5070 (modify-phases %standard-phases
5071 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5072 (propagated-inputs
5073 `(("python-ipython-genutils" ,python-ipython-genutils)
5074 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5075 (native-inputs
5076 `(("python-pytest" ,python-pytest)))
5077 (properties `((python2-variant . ,(delay python2-traitlets))))
5078 (home-page "https://ipython.org")
5079 (synopsis "Configuration system for Python applications")
5080 (description
5081 "Traitlets is a framework that lets Python classes have attributes with
5082 type checking, dynamically calculated default values, and ‘on change’
5083 callbacks. The package also includes a mechanism to use traitlets for
5084 configuration, loading values from files or from command line arguments. This
5085 is a distinct layer on top of traitlets, so you can use traitlets in your code
5086 without using the configuration machinery.")
5087 (license license:bsd-3)))
5088
5089 (define-public python2-traitlets
5090 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5091 (package
5092 (inherit traitlets)
5093 (propagated-inputs
5094 `(("python2-enum34" ,python2-enum34)
5095 ,@(package-propagated-inputs traitlets))))))
5096
5097 (define-public python-jupyter-core
5098 (package
5099 (name "python-jupyter-core")
5100 (version "4.4.0")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (string-append (pypi-uri "jupyter_core" version)))
5105 (sha256
5106 (base32
5107 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5108 (build-system python-build-system)
5109 ;; FIXME: not sure how to run the tests
5110 (arguments `(#:tests? #f))
5111 (propagated-inputs
5112 `(("python-traitlets" ,python-traitlets)))
5113 (home-page "http://jupyter.org/")
5114 (synopsis "Jupyter base package")
5115 (description
5116 "Jupyter core is the base package on which Jupyter projects rely.")
5117 (license license:bsd-3)))
5118
5119 (define-public python2-jupyter-core
5120 (package-with-python2 python-jupyter-core))
5121
5122 (define-public python-jupyter-client
5123 (package
5124 (name "python-jupyter-client")
5125 (version "5.2.4")
5126 (source
5127 (origin
5128 (method url-fetch)
5129 (uri (pypi-uri "jupyter_client" version))
5130 (sha256
5131 (base32
5132 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5133 (build-system python-build-system)
5134 ;; Tests fail because of missing native python kernel which I assume is
5135 ;; provided by the ipython package, which we cannot use because it would
5136 ;; cause a dependency cycle.
5137 (arguments
5138 `(#:tests? #f
5139
5140 #:phases (modify-phases %standard-phases
5141 (add-after 'unpack 'set-tool-file-names
5142 (lambda* (#:key inputs #:allow-other-keys)
5143 (let ((iproute (assoc-ref inputs "iproute")))
5144 (substitute* "jupyter_client/localinterfaces.py"
5145 (("'ip'")
5146 (string-append "'" iproute "/sbin/ip'")))
5147 #t))))))
5148 (inputs
5149 `(("iproute" ,iproute)))
5150 (propagated-inputs
5151 `(("python-pyzmq" ,python-pyzmq)
5152 ("python-traitlets" ,python-traitlets)
5153 ("python-jupyter-core" ,python-jupyter-core)))
5154 (home-page "http://jupyter.org/")
5155 (synopsis "Jupyter protocol implementation and client libraries")
5156 (description
5157 "The @code{jupyter_client} package contains the reference implementation
5158 of the Jupyter protocol. It also provides client and kernel management APIs
5159 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5160 installing @code{kernelspec}s for use with Jupyter frontends.")
5161 (license license:bsd-3)))
5162
5163 (define-public python2-jupyter-client
5164 (package-with-python2 python-jupyter-client))
5165
5166 (define-public python-ipykernel
5167 (package
5168 (name "python-ipykernel")
5169 (version "5.1.1")
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (pypi-uri "ipykernel" version))
5174 (sha256
5175 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5176 (build-system python-build-system)
5177 (arguments
5178 `(#:phases
5179 (modify-phases %standard-phases
5180 (replace 'check
5181 (lambda _
5182 (setenv "HOME" "/tmp")
5183 (invoke "pytest" "-v")
5184 #t))
5185 (add-after 'install 'set-python-file-name
5186 (lambda* (#:key outputs #:allow-other-keys)
5187 ;; Record the absolute file name of the 'python' executable in
5188 ;; 'kernel.json'.
5189 (let ((out (assoc-ref outputs "out")))
5190 (substitute* (string-append out "/share/jupyter"
5191 "/kernels/python3/kernel.json")
5192 (("\"python\"")
5193 (string-append "\"" (which "python") "\"")))
5194 #t))))))
5195 (propagated-inputs
5196 `(("python-ipython" ,python-ipython)
5197 ;; imported at runtime during connect
5198 ("python-jupyter-client" ,python-jupyter-client)))
5199 (native-inputs
5200 `(("python-pytest" ,python-pytest)
5201 ("python-nose" ,python-nose)))
5202 (home-page "https://ipython.org")
5203 (synopsis "IPython Kernel for Jupyter")
5204 (description
5205 "This package provides the IPython kernel for Jupyter.")
5206 (license license:bsd-3)))
5207
5208 ;; Version 5.1.1 and above no longer support Python 2.
5209 (define-public python2-ipykernel
5210 (package
5211 (name "python2-ipykernel")
5212 (version "5.1.0")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "ipykernel" version))
5217 (sha256
5218 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5219 (build-system python-build-system)
5220 (arguments
5221 `(#:python ,python-2
5222 #:phases
5223 (modify-phases %standard-phases
5224 (replace 'check
5225 (lambda _
5226 (setenv "HOME" "/tmp")
5227 (invoke "pytest" "-v")
5228 #t)))))
5229 (propagated-inputs
5230 `(("python2-ipython" ,python2-ipython)
5231 ;; imported at runtime during connect
5232 ("python2-jupyter-client" ,python2-jupyter-client)))
5233 (native-inputs
5234 `(("python2-pytest" ,python2-pytest)
5235 ("python2-nose" ,python2-nose)))
5236 (home-page "https://ipython.org")
5237 (synopsis "IPython Kernel for Jupyter")
5238 (description
5239 "This package provides the IPython kernel for Jupyter.")
5240 (license license:bsd-3)))
5241
5242 (define-public python-pari-jupyter
5243 (package
5244 (name "python-pari-jupyter")
5245 (version "1.3.2")
5246 (source
5247 (origin
5248 (method url-fetch)
5249 (uri (pypi-uri "pari_jupyter" version))
5250 (sha256
5251 (base32
5252 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5253 (build-system python-build-system)
5254 (propagated-inputs
5255 `(("python-ipykernel" ,python-ipykernel)))
5256 (inputs
5257 `(("pari-gp" ,pari-gp)
5258 ("readline" ,readline)))
5259 (arguments
5260 `(#:tests? #f)) ; no test suite
5261 (home-page
5262 "https://github.com/jdemeyer/pari_jupyter")
5263 (synopsis "A Jupyter kernel for PARI/GP")
5264 (description "The package provides a PARI/GP kernel for Jupyter.")
5265 (license license:gpl3+)))
5266
5267 (define-public python-backcall
5268 (package
5269 (name "python-backcall")
5270 (version "0.1.0")
5271 (source
5272 (origin
5273 (method url-fetch)
5274 (uri (pypi-uri "backcall" version))
5275 (sha256
5276 (base32
5277 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5278 (build-system python-build-system)
5279 (home-page "https://github.com/takluyver/backcall/")
5280 (synopsis "Specifications for callback functions passed in to an API")
5281 (description
5282 "If your code lets other people supply callback functions, it's important
5283 to specify the function signature you expect, and check that functions support
5284 that. Adding extra parameters later would break other peoples code unless
5285 you're careful. The @code{backcall} package provides a way of specifying the
5286 callback signature using a prototype function.")
5287 (license license:bsd-3)))
5288
5289 ;; This is the latest release of the LTS version of ipython with support for
5290 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5291 ;; dropped support for Python 2.7.
5292 (define-public python2-ipython
5293 (package
5294 (name "python2-ipython")
5295 (version "5.8.0")
5296 (source
5297 (origin
5298 (method url-fetch)
5299 (uri (pypi-uri "ipython" version ".tar.gz"))
5300 (sha256
5301 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5302 (build-system python-build-system)
5303 (propagated-inputs
5304 `(("python2-backports-shutil-get-terminal-size"
5305 ,python2-backports-shutil-get-terminal-size)
5306 ("python2-pathlib2" ,python2-pathlib2)
5307 ("python2-pyzmq" ,python2-pyzmq)
5308 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5309 ("python2-terminado" ,python2-terminado)
5310 ("python2-matplotlib" ,python2-matplotlib)
5311 ("python2-numpy" ,python2-numpy)
5312 ("python2-numpydoc" ,python2-numpydoc)
5313 ("python2-jinja2" ,python2-jinja2)
5314 ("python2-mistune" ,python2-mistune)
5315 ("python2-pexpect" ,python2-pexpect)
5316 ("python2-pickleshare" ,python2-pickleshare)
5317 ("python2-simplegeneric" ,python2-simplegeneric)
5318 ("python2-jsonschema" ,python2-jsonschema)
5319 ("python2-traitlets" ,python2-traitlets)
5320 ("python2-nbformat" ,python2-nbformat)
5321 ("python2-pygments" ,python2-pygments)))
5322 (inputs
5323 `(("readline" ,readline)
5324 ("which" ,which)))
5325 (native-inputs
5326 `(("graphviz" ,graphviz)
5327 ("pkg-config" ,pkg-config)
5328 ("python2-requests" ,python2-requests) ;; for tests
5329 ("python2-testpath" ,python2-testpath)
5330 ("python2-mock" ,python2-mock)
5331 ("python2-nose" ,python2-nose)))
5332 (arguments
5333 `(#:python ,python-2
5334 #:phases
5335 (modify-phases %standard-phases
5336 (add-before 'check 'delete-broken-tests
5337 (lambda* (#:key inputs #:allow-other-keys)
5338 ;; These tests throw errors for unknown reasons.
5339 (delete-file "IPython/core/tests/test_profile.py")
5340 (delete-file "IPython/core/tests/test_interactiveshell.py")
5341 (delete-file "IPython/core/tests/test_magic.py")
5342 #t)))))
5343 (home-page "https://ipython.org")
5344 (synopsis "IPython is a tool for interactive computing in Python")
5345 (description
5346 "IPython provides a rich architecture for interactive computing with:
5347 Powerful interactive shells, a browser-based notebook, support for interactive
5348 data visualization, embeddable interpreters and tools for parallel
5349 computing.")
5350 (license license:bsd-3)))
5351
5352 (define-public python-ipython
5353 (package
5354 (name "python-ipython")
5355 (version "7.5.0")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "ipython" version ".tar.gz"))
5360 (sha256
5361 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5362 (build-system python-build-system)
5363 (propagated-inputs
5364 `(("python-backcall" ,python-backcall)
5365 ("python-pyzmq" ,python-pyzmq)
5366 ("python-prompt-toolkit" ,python-prompt-toolkit)
5367 ("python-terminado" ,python-terminado)
5368 ("python-matplotlib" ,python-matplotlib)
5369 ("python-numpy" ,python-numpy)
5370 ("python-numpydoc" ,python-numpydoc)
5371 ("python-jedi" ,python-jedi)
5372 ("python-jinja2" ,python-jinja2)
5373 ("python-mistune" ,python-mistune)
5374 ("python-pexpect" ,python-pexpect)
5375 ("python-pickleshare" ,python-pickleshare)
5376 ("python-simplegeneric" ,python-simplegeneric)
5377 ("python-jsonschema" ,python-jsonschema)
5378 ("python-traitlets" ,python-traitlets)
5379 ("python-nbformat" ,python-nbformat)
5380 ("python-pygments" ,python-pygments)))
5381 (inputs
5382 `(("readline" ,readline)
5383 ("which" ,which)))
5384 (native-inputs
5385 `(("graphviz" ,graphviz)
5386 ("pkg-config" ,pkg-config)
5387 ("python-requests" ,python-requests) ;; for tests
5388 ("python-testpath" ,python-testpath)
5389 ("python-nose" ,python-nose)))
5390 (arguments
5391 `(#:phases
5392 (modify-phases %standard-phases
5393 ;; Tests can only be run after the library has been installed and not
5394 ;; within the source directory.
5395 (delete 'check)
5396 (add-after 'install 'check
5397 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5398 (if tests?
5399 (begin
5400 ;; Make installed package available for running the tests
5401 (add-installed-pythonpath inputs outputs)
5402 (setenv "HOME" "/tmp/") ;; required by a test
5403 ;; We only test the core because one of the other tests
5404 ;; tries to import ipykernel.
5405 (invoke "python" "IPython/testing/iptest.py"
5406 "-v" "IPython/core/tests"))
5407 #t)))
5408 (add-before 'check 'fix-tests
5409 (lambda* (#:key inputs #:allow-other-keys)
5410 (substitute* "./IPython/utils/_process_posix.py"
5411 (("/usr/bin/env', 'which") (which "which")))
5412 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5413 (("#!/usr/bin/env python")
5414 (string-append "#!" (which "python"))))
5415 ;; This test introduces a circular dependency on ipykernel
5416 ;; (which depends on ipython).
5417 (delete-file "IPython/core/tests/test_display.py")
5418 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5419 (delete-file "IPython/core/tests/test_interactiveshell.py")
5420 #t)))))
5421 (home-page "https://ipython.org")
5422 (synopsis "IPython is a tool for interactive computing in Python")
5423 (description
5424 "IPython provides a rich architecture for interactive computing with:
5425 Powerful interactive shells, a browser-based notebook, support for interactive
5426 data visualization, embeddable interpreters and tools for parallel
5427 computing.")
5428 (license license:bsd-3)))
5429
5430 (define-public python-ipython-documentation
5431 (package
5432 (inherit python-ipython)
5433 (name "python-ipython-documentation")
5434 (version (package-version python-ipython))
5435 (arguments
5436 `(#:phases
5437 (modify-phases %standard-phases
5438 (delete 'build)
5439 (delete 'check)
5440 (replace 'install
5441 (lambda* (#:key outputs #:allow-other-keys)
5442 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5443 (doc (string-append data "/doc/" ,name "-" ,version))
5444 (html (string-append doc "/html"))
5445 (man1 (string-append data "/man/man1"))
5446 (info (string-append data "/info"))
5447 (examples (string-append doc "/examples"))
5448 (python-arg (string-append "PYTHON=" (which "python"))))
5449 (setenv "LANG" "en_US.utf8")
5450 (with-directory-excursion "docs"
5451 ;; FIXME: pdf fails to build
5452 ;;(system* "make" "pdf" "PAPER=a4")
5453 (system* "make" python-arg "html")
5454 ;; FIXME: the generated texi file contains ^@^@, which trips
5455 ;; up the parser.
5456 ;; (system* "make" python-arg "info")
5457 )
5458 (copy-recursively "docs/man" man1)
5459 (copy-recursively "examples" examples)
5460 (copy-recursively "docs/build/html" html)
5461 ;; (copy-file "docs/build/latex/ipython.pdf"
5462 ;; (string-append doc "/ipython.pdf"))
5463 (mkdir-p info)
5464 ;; (copy-file "docs/build/texinfo/ipython.info"
5465 ;; (string-append info "/ipython.info"))
5466 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5467 #t)))))
5468 (inputs
5469 `(("python-ipython" ,python-ipython)
5470 ("python-ipykernel" ,python-ipykernel)))
5471 (native-inputs
5472 `(("python-sphinx" ,python-sphinx)
5473 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5474 ;; FIXME: It's possible that a smaller union would work just as well.
5475 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5476 texlive-fonts-ec
5477 texlive-generic-ifxetex
5478 texlive-generic-pdftex
5479 texlive-latex-amsfonts
5480 texlive-latex-capt-of
5481 texlive-latex-cmap
5482 texlive-latex-environ
5483 texlive-latex-eqparbox
5484 texlive-latex-etoolbox
5485 texlive-latex-expdlist
5486 texlive-latex-fancyhdr
5487 texlive-latex-fancyvrb
5488 texlive-latex-fncychap
5489 texlive-latex-float
5490 texlive-latex-framed
5491 texlive-latex-geometry
5492 texlive-latex-graphics
5493 texlive-latex-hyperref
5494 texlive-latex-mdwtools
5495 texlive-latex-multirow
5496 texlive-latex-needspace
5497 texlive-latex-oberdiek
5498 texlive-latex-parskip
5499 texlive-latex-preview
5500 texlive-latex-tabulary
5501 texlive-latex-threeparttable
5502 texlive-latex-titlesec
5503 texlive-latex-trimspaces
5504 texlive-latex-ucs
5505 texlive-latex-upquote
5506 texlive-latex-url
5507 texlive-latex-varwidth
5508 texlive-latex-wrapfig)))
5509 ("texinfo" ,texinfo)))))
5510
5511 (define-public python-urwid
5512 (package
5513 (name "python-urwid")
5514 (version "2.0.1")
5515 (source
5516 (origin
5517 (method url-fetch)
5518 (uri (pypi-uri "urwid" version))
5519 (sha256
5520 (base32
5521 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5522 (build-system python-build-system)
5523 (home-page "http://urwid.org")
5524 (synopsis "Console user interface library for Python")
5525 (description
5526 "Urwid is a curses-based UI/widget library for Python. It includes many
5527 features useful for text console applications.")
5528 (license license:lgpl2.1+)))
5529
5530 (define-public python2-urwid
5531 (package-with-python2 python-urwid))
5532
5533 (define-public python-urwidtrees
5534 (package
5535 (name "python-urwidtrees")
5536 (version "1.0.2")
5537 (source
5538 (origin
5539 (method url-fetch)
5540 ;; package author intends on distributing via github rather than pypi:
5541 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5542 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5543 version ".tar.gz"))
5544 (file-name (string-append name "-" version ".tar.gz"))
5545 (sha256
5546 (base32
5547 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5548 (build-system python-build-system)
5549 (arguments
5550 '(#:tests? #f)) ; no tests
5551 (propagated-inputs `(("python-urwid" ,python-urwid)))
5552 (home-page "https://github.com/pazz/urwidtrees")
5553 (synopsis "Tree widgets for urwid")
5554 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5555 toolkit. Use it to build trees of widgets.")
5556 (license license:gpl3+)))
5557
5558 (define-public python2-urwidtrees
5559 (package-with-python2 python-urwidtrees))
5560
5561 (define-public python-ua-parser
5562 (package
5563 (name "python-ua-parser")
5564 (version "0.8.0")
5565 (source
5566 (origin
5567 (method url-fetch)
5568 (uri (pypi-uri "ua-parser" version))
5569 (sha256
5570 (base32
5571 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5572 (build-system python-build-system)
5573 (arguments
5574 `(#:tests? #f)) ;no test suite in release
5575 (native-inputs
5576 `(("python-pyyaml" ,python-pyyaml)))
5577 (home-page "https://github.com/ua-parser/uap-python")
5578 (synopsis "User agent parser")
5579 (description
5580 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5581 (license license:asl2.0)))
5582
5583 (define-public python2-ua-parser
5584 (package-with-python2 python-ua-parser))
5585
5586 (define-public python-user-agents
5587 (package
5588 (name "python-user-agents")
5589 (version "1.1.0")
5590 (source
5591 (origin
5592 (method url-fetch)
5593 (uri (pypi-uri "user-agents" version))
5594 (sha256
5595 (base32
5596 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5597 (build-system python-build-system)
5598 (arguments
5599 `(#:tests? #f)) ;missing devices.json test file in release
5600 (propagated-inputs
5601 `(("python-ua-parser" ,python-ua-parser)))
5602 (home-page "https://github.com/selwin/python-user-agents")
5603 (synopsis "User Agent strings parsing library")
5604 (description
5605 "A library to identify devices (phones, tablets) and their capabilities by
5606 parsing (browser/HTTP) user agent strings.")
5607 (license license:expat)))
5608
5609 (define-public python2-user-agents
5610 (package-with-python2 python-user-agents))
5611
5612 (define-public python-dbus
5613 (package
5614 (name "python-dbus")
5615 (version "1.2.8")
5616 (source
5617 (origin
5618 (method url-fetch)
5619 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5620 "dbus-python-" version ".tar.gz"))
5621 (sha256
5622 (base32
5623 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5624 (build-system gnu-build-system)
5625 (arguments
5626 '(#:phases
5627 (modify-phases %standard-phases
5628 (add-before
5629 'check 'pre-check
5630 (lambda _
5631 ;; XXX: For the missing '/etc/machine-id'.
5632 (substitute* "test/run-test.sh"
5633 (("DBUS_FATAL_WARNINGS=1")
5634 "DBUS_FATAL_WARNINGS=0"))
5635 #t)))))
5636 (native-inputs
5637 `(("pkg-config" ,pkg-config)))
5638 (inputs
5639 `(("python" ,python-wrapper)
5640 ("dbus-glib" ,dbus-glib)))
5641 (synopsis "Python bindings for D-bus")
5642 (description "python-dbus provides bindings for libdbus, the reference
5643 implementation of D-Bus.")
5644 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5645 (license license:expat)))
5646
5647 (define-public python2-dbus
5648 (package (inherit python-dbus)
5649 (name "python2-dbus")
5650 (inputs `(("python" ,python-2)
5651 ,@(alist-delete "python"
5652 (package-inputs python-dbus)
5653 equal?)))
5654 ;; FIXME: on Python 2, the test_utf8 fails with:
5655 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5656 (arguments `(#:tests? #f))))
5657
5658 (define-public python-notify2
5659 (package
5660 (name "python-notify2")
5661 (version "0.3.1")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (pypi-uri "notify2" version))
5666 (sha256
5667 (base32
5668 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5669 (build-system python-build-system)
5670 (arguments `(#:tests? #f)) ; tests depend on system state
5671 (native-inputs
5672 `(("python-dbus" ,python-dbus)))
5673 (home-page "https://bitbucket.org/takluyver/pynotify2")
5674 (synopsis "Python interface to D-Bus notifications")
5675 (description
5676 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5677 It is a reimplementation of pynotify in pure Python, and an alternative to
5678 the GObject Introspection bindings to libnotify for non-GTK applications.")
5679 (license (list license:bsd-2
5680 license:lgpl2.1+))))
5681
5682 (define-public python2-notify2
5683 (package-with-python2 python-notify2))
5684
5685 (define-public python-lxml
5686 (package
5687 (name "python-lxml")
5688 (version "4.2.5")
5689 (source
5690 (origin
5691 (method url-fetch)
5692 (uri (pypi-uri "lxml" version))
5693 (sha256
5694 (base32
5695 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5696 (build-system python-build-system)
5697 (inputs
5698 `(("libxml2" ,libxml2)
5699 ("libxslt" ,libxslt)))
5700 (home-page "http://lxml.de/")
5701 (synopsis
5702 "Python XML processing library")
5703 (description
5704 "The lxml XML toolkit is a Pythonic binding for the C libraries
5705 libxml2 and libxslt.")
5706 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5707
5708 (define-public python2-lxml
5709 (package-with-python2 python-lxml))
5710
5711 ;; beautifulsoup4 has a totally different namespace than 3.x,
5712 ;; and pypi seems to put it under its own name, so I guess we should too
5713 (define-public python-beautifulsoup4
5714 (package
5715 (name "python-beautifulsoup4")
5716 (version "4.7.1")
5717 (source
5718 (origin
5719 (method url-fetch)
5720 (uri (pypi-uri "beautifulsoup4" version))
5721 (sha256
5722 (base32
5723 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5724 (build-system python-build-system)
5725 (arguments
5726 `(#:phases
5727 (modify-phases %standard-phases
5728 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5729 ;; must use this conversion script when building with Python 3. The
5730 ;; conversion script also runs the tests.
5731 ;; For more information, see the file 'convert-py3k' in the source
5732 ;; distribution.
5733 (replace 'check
5734 (lambda _ (invoke "./convert-py3k"))))))
5735 (propagated-inputs
5736 `(("python-soupsieve" ,python-soupsieve)))
5737 (home-page
5738 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5739 (synopsis
5740 "Python screen-scraping library")
5741 (description
5742 "Beautiful Soup is a Python library designed for rapidly setting up
5743 screen-scraping projects. It offers Pythonic idioms for navigating,
5744 searching, and modifying a parse tree, providing a toolkit for
5745 dissecting a document and extracting what you need. It automatically
5746 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5747 (license license:expat)
5748 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5749
5750 (define-public python2-beautifulsoup4
5751 (package
5752 (inherit (package-with-python2
5753 (strip-python2-variant python-beautifulsoup4)))
5754 (arguments `(#:python ,python-2))))
5755
5756 (define-public python-soupsieve
5757 (package
5758 (name "python-soupsieve")
5759 (version "1.9.2")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "soupsieve" version))
5764 (sha256
5765 (base32
5766 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5767 (build-system python-build-system)
5768 (arguments `(#:tests? #f))
5769 ;;XXX: 2 tests fail currently despite claming they were to be
5770 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5771 ;;don't want to create a circular dependency.
5772 (home-page "https://github.com/facelessuser/soupsieve")
5773 (synopsis "CSS selector library")
5774 (description
5775 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5776 Soup 4. It aims to provide selecting, matching, and filtering using modern
5777 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5778 specifications up through the latest CSS level 4 drafts and beyond (though
5779 some are not yet implemented).")
5780 (properties `((python2-variant . ,(delay python2-soupsieve))))
5781 (license license:expat)))
5782
5783 (define-public python2-soupsieve
5784 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5785 (package
5786 (inherit base)
5787 (propagated-inputs
5788 `(("python2-backports-functools-lru-cache"
5789 ,python2-backports-functools-lru-cache)
5790 ,@(package-propagated-inputs base))))))
5791
5792 (define-public python-netifaces
5793 (package
5794 (name "python-netifaces")
5795 (version "0.10.7")
5796 (source
5797 (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "netifaces" version))
5800 (sha256
5801 (base32
5802 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5803 (build-system python-build-system)
5804 (home-page "https://github.com/al45tair/netifaces")
5805 (synopsis
5806 "Python module for portable network interface information")
5807 (description
5808 "Netifaces is a Python module providing information on network
5809 interfaces in an easy and portable manner.")
5810 (license license:expat)))
5811
5812 (define-public python2-netifaces
5813 (package-with-python2 python-netifaces))
5814
5815 (define-public python-networkx
5816 (package
5817 (name "python-networkx")
5818 (version "2.2")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "networkx" version ".zip"))
5823 (sha256
5824 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5825 (build-system python-build-system)
5826 ;; python-decorator is needed at runtime.
5827 (propagated-inputs
5828 `(("python-decorator" ,python-decorator)))
5829 (native-inputs
5830 `(("python-nose" ,python-nose)
5831 ("unzip" ,unzip)))
5832 (home-page "https://networkx.github.io/")
5833 (synopsis "Python module for creating and manipulating graphs and networks")
5834 (description
5835 "NetworkX is a Python package for the creation, manipulation, and study
5836 of the structure, dynamics, and functions of complex networks.")
5837 (license license:bsd-3)))
5838
5839 (define-public python2-networkx
5840 (package-with-python2 python-networkx))
5841
5842 (define-public python-datrie
5843 (package
5844 (name "python-datrie")
5845 (version "0.7.1")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "datrie" version))
5850 (sha256
5851 (base32
5852 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5853 (build-system python-build-system)
5854 (arguments
5855 `(#:phases (modify-phases %standard-phases
5856 (add-before 'build 'cythonize
5857 (lambda _
5858 ;; Regenerate Cython classes to solve ABI issues with Python
5859 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5860 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5861 "src/stdio_ext.pxd" "-a"))))))
5862 (native-inputs
5863 `(("python-cython" ,python-cython)
5864 ("python-hypothesis" ,python-hypothesis)
5865 ("python-pytest" ,python-pytest)
5866 ("python-pytest-runner" ,python-pytest-runner)))
5867 (home-page "https://github.com/kmike/datrie")
5868 (synopsis "Fast, efficiently stored trie for Python")
5869 (description
5870 "This package provides a fast, efficiently stored trie implementation for
5871 Python.")
5872 (license license:lgpl2.1+)))
5873
5874 (define-public snakemake
5875 (package
5876 (name "snakemake")
5877 (version "5.2.4")
5878 (source
5879 (origin
5880 (method url-fetch)
5881 (uri (pypi-uri "snakemake" version))
5882 (sha256
5883 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5884 (build-system python-build-system)
5885 (arguments
5886 ;; TODO: Package missing test dependencies.
5887 '(#:tests? #f
5888 #:phases
5889 (modify-phases %standard-phases
5890 ;; For cluster execution Snakemake will call Python. Since there is
5891 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5892 ;; this by calling the snakemake wrapper instead.
5893 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5894 (lambda* (#:key outputs #:allow-other-keys)
5895 (substitute* "snakemake/executors.py"
5896 (("\\{sys.executable\\} -m snakemake")
5897 (string-append (assoc-ref outputs "out")
5898 "/bin/snakemake")))
5899 #t)))))
5900 (propagated-inputs
5901 `(("python-gitpython" ,python-gitpython)
5902 ("python-wrapt" ,python-wrapt)
5903 ("python-requests" ,python-requests)
5904 ("python-appdirs" ,python-appdirs)
5905 ("python-configargparse" ,python-configargparse)
5906 ("python-datrie" ,python-datrie)
5907 ("python-docutils" ,python-docutils)
5908 ("python-jinja2" ,python-jinja2)
5909 ("python-jsonschema" ,python-jsonschema)
5910 ("python-networkx" ,python-networkx)
5911 ("python-pyyaml" ,python-pyyaml)
5912 ("python-ratelimiter" ,python-ratelimiter)))
5913 (home-page "https://snakemake.readthedocs.io")
5914 (synopsis "Python-based execution environment for make-like workflows")
5915 (description
5916 "Snakemake aims to reduce the complexity of creating workflows by
5917 providing a clean and modern domain specific specification language (DSL) in
5918 Python style, together with a fast and comfortable execution environment.")
5919 (license license:expat)))
5920
5921 ;; This is currently needed for the pigx-* packages.
5922 (define-public snakemake-4
5923 (package (inherit snakemake)
5924 (version "4.4.0")
5925 (source
5926 (origin
5927 (method url-fetch)
5928 (uri (pypi-uri "snakemake" version))
5929 (sha256
5930 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5931 (propagated-inputs
5932 `(("python-wrapt" ,python-wrapt)
5933 ("python-requests" ,python-requests)
5934 ("python-appdirs" ,python-appdirs)
5935 ("python-configargparse" ,python-configargparse)
5936 ("python-pyyaml" ,python-pyyaml)
5937 ("python-ratelimiter" ,python-ratelimiter)))))
5938
5939 (define-public python-pyqrcode
5940 (package
5941 (name "python-pyqrcode")
5942 (version "1.2.1")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "PyQRCode" version))
5947 (sha256
5948 (base32
5949 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5950 (build-system python-build-system)
5951 (home-page
5952 "https://github.com/mnooner256/pyqrcode")
5953 (synopsis "QR code generator")
5954 (description
5955 "Pyqrcode is a QR code generator written purely in Python with
5956 SVG, EPS, PNG and terminal output.")
5957 (license license:bsd-3)))
5958
5959 (define-public python-seaborn
5960 (package
5961 (name "python-seaborn")
5962 (version "0.9.0")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (pypi-uri "seaborn" version))
5967 (sha256
5968 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5969 (build-system python-build-system)
5970 (arguments
5971 `(#:phases
5972 (modify-phases %standard-phases
5973 (add-before 'check 'start-xserver
5974 (lambda* (#:key inputs #:allow-other-keys)
5975 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5976 ;; There must be a running X server and make check doesn't
5977 ;; start one. Therefore we must do it.
5978 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5979 (setenv "DISPLAY" ":1")
5980 #t)))
5981 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5982 (propagated-inputs
5983 `(("python-pandas" ,python-pandas)
5984 ("python-matplotlib" ,python-matplotlib)
5985 ("python-numpy" ,python-numpy)
5986 ("python-scipy" ,python-scipy)))
5987 (native-inputs
5988 `(("python-pytest" ,python-pytest)
5989 ("xorg-server" ,xorg-server)))
5990 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5991 (synopsis "Statistical data visualization")
5992 (description
5993 "Seaborn is a library for making attractive and informative statistical
5994 graphics in Python. It is built on top of matplotlib and tightly integrated
5995 with the PyData stack, including support for numpy and pandas data structures
5996 and statistical routines from scipy and statsmodels.")
5997 (license license:bsd-3)))
5998
5999 (define-public python2-seaborn
6000 (package-with-python2 python-seaborn))
6001
6002 (define-public python-mpmath
6003 (package
6004 (name "python-mpmath")
6005 (version "0.19")
6006 (source (origin
6007 (method url-fetch)
6008 (uri (string-append "http://mpmath.org/files/mpmath-"
6009 version ".tar.gz"))
6010 (sha256
6011 (base32
6012 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6013 (build-system python-build-system)
6014 (arguments
6015 '(#:phases
6016 (modify-phases %standard-phases
6017 (replace 'check
6018 (lambda _
6019 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6020 (home-page "http://mpmath.org")
6021 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6022 (description
6023 "@code{mpmath} can be used as an arbitrary-precision substitute for
6024 Python's float/complex types and math/cmath modules, but also does much
6025 more advanced mathematics.")
6026 (license license:bsd-3)))
6027
6028 (define-public python2-mpmath
6029 (package-with-python2 python-mpmath))
6030
6031 (define-public python-bigfloat
6032 (package
6033 (name "python-bigfloat")
6034 (version "0.3.0")
6035 (source
6036 (origin
6037 (method url-fetch)
6038 (uri (pypi-uri "bigfloat" version))
6039 (sha256
6040 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6041 (build-system python-build-system)
6042 (inputs
6043 `(("mpfr" ,mpfr)))
6044 (home-page "https://github.com/mdickinson/bigfloat")
6045 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6046 (description
6047 "This package provides a Python interface to the MPFR library for
6048 multiprecision arithmetic.")
6049 (license license:lgpl3+)))
6050
6051 (define-public python2-bigfloat
6052 (package-with-python2 python-bigfloat))
6053
6054 (define-public python-sympy
6055 (package
6056 (name "python-sympy")
6057 (version "1.1.1")
6058 (source
6059 (origin
6060 (method url-fetch)
6061 (uri (string-append
6062 "https://github.com/sympy/sympy/releases/download/sympy-"
6063 version "/sympy-" version ".tar.gz"))
6064 (sha256
6065 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6066 (build-system python-build-system)
6067 (arguments
6068 `(#:phases
6069 (modify-phases %standard-phases
6070 ;; Run the core tests after installation. By default it would run
6071 ;; *all* tests, which take a very long time to complete and are known
6072 ;; to be flaky.
6073 (delete 'check)
6074 (add-after 'install 'check
6075 (lambda* (#:key outputs #:allow-other-keys)
6076 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6077 #t)))))
6078 (propagated-inputs
6079 `(("python-mpmath" ,python-mpmath)))
6080 (home-page "http://www.sympy.org/")
6081 (synopsis "Python library for symbolic mathematics")
6082 (description
6083 "SymPy is a Python library for symbolic mathematics. It aims to become a
6084 full-featured computer algebra system (CAS) while keeping the code as simple
6085 as possible in order to be comprehensible and easily extensible.")
6086 (license license:bsd-3)))
6087
6088 (define-public python2-sympy
6089 (package
6090 (inherit (package-with-python2 python-sympy))
6091 (arguments
6092 `(#:phases
6093 (modify-phases %standard-phases
6094 ;; Run the core tests after installation. By default it would run
6095 ;; *all* tests, which take a very long time to complete and are known
6096 ;; to be flaky.
6097 (delete 'check)
6098 (add-after 'install 'check
6099 (lambda* (#:key outputs #:allow-other-keys)
6100 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6101 #t)))))))
6102
6103 (define-public python-q
6104 (package
6105 (name "python-q")
6106 (version "2.6")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "q" version))
6111 (sha256
6112 (base32
6113 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6114 (build-system python-build-system)
6115 (home-page "https://github.com/zestyping/q")
6116 (synopsis "Quick-and-dirty debugging output for tired programmers")
6117 (description
6118 "q is a Python module for \"print\" style of debugging Python code. It
6119 provides convenient short API for print out of values, tracebacks, and
6120 falling into the Python interpreter.")
6121 (license license:asl2.0)))
6122
6123 (define-public python2-q
6124 (package-with-python2 python-q))
6125
6126 (define-public python2-xlib
6127 (package
6128 (name "python2-xlib")
6129 (version "0.14")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6133 "/" version "/"
6134 "python-xlib-" version ".tar.gz"))
6135 (sha256
6136 (base32
6137 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6138 (build-system python-build-system)
6139 (arguments
6140 `(#:python ,python-2 ;Python 2 only
6141 #:tests? #f)) ;no tests
6142 (home-page "http://python-xlib.sourceforge.net/")
6143 (synopsis "Python X11 client library")
6144 (description
6145 "The Python X Library is intended to be a fully functional X client
6146 library for Python programs. It is useful to implement low-level X clients.
6147 It is written entirely in Python.")
6148 (license license:gpl2+)))
6149
6150 (define-public python-singledispatch
6151 (package
6152 (name "python-singledispatch")
6153 (version "3.4.0.3")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "singledispatch" version))
6158 (sha256
6159 (base32
6160 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6161 (build-system python-build-system)
6162 (native-inputs
6163 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6164 (home-page
6165 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6166 (synopsis "Backport of singledispatch feature from Python 3.4")
6167 (description
6168 "This library brings functools.singledispatch from Python 3.4 to Python
6169 2.6-3.3.")
6170 (license license:expat)))
6171
6172 (define-public python2-singledispatch
6173 (package-with-python2 python-singledispatch))
6174
6175 ;; the python- version can be removed with python-3.5
6176 (define-public python-backports-abc
6177 (package
6178 (name "python-backports-abc")
6179 (version "0.5")
6180 (source
6181 (origin
6182 (method url-fetch)
6183 (uri (pypi-uri "backports_abc" version))
6184 (sha256
6185 (base32
6186 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6187 (build-system python-build-system)
6188 (home-page "https://github.com/cython/backports_abc")
6189 (synopsis "Backport of additions to the 'collections.abc' module")
6190 (description
6191 "Python-backports-abc provides a backport of additions to the
6192 @code{collections.abc} module in Python-3.5.")
6193 (license license:psfl)))
6194
6195 (define-public python2-backports-abc
6196 (package-with-python2 python-backports-abc))
6197
6198 (define-public python-backports-csv
6199 (package
6200 (name "python-backports-csv")
6201 (version "1.0.5")
6202 (source
6203 (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "backports.csv" version))
6206 (sha256
6207 (base32
6208 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6209 (build-system python-build-system)
6210 (home-page "https://github.com/ryanhiebert/backports.csv")
6211 (synopsis "Backport of Python 3's csv module for Python 2")
6212 (description
6213 "Provides a backport of Python 3's @code{csv} module for parsing
6214 comma separated values. The API of the @code{csv} module in Python 2
6215 is drastically different from the @code{csv} module in Python 3.
6216 This is due, for the most part, to the difference between str in
6217 Python 2 and Python 3.")
6218 (license license:psfl)))
6219
6220 (define-public python2-backports-csv
6221 (package-with-python2 python-backports-csv))
6222
6223 (define-public python2-backports-shutil-get-terminal-size
6224 (package
6225 (name "python2-backports-shutil-get-terminal-size")
6226 (version "1.0.0")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6231 (sha256
6232 (base32
6233 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6234 (build-system python-build-system)
6235 (arguments
6236 `(#:python ,python-2
6237 #:phases
6238 (modify-phases %standard-phases
6239 (replace 'check
6240 (lambda _
6241 (invoke "py.test" "-v"))))))
6242 (native-inputs
6243 `(("python2-pytest" ,python2-pytest)))
6244 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6245 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6246 (description
6247 "This package provides a backport of the @code{get_terminal_size
6248 function} from Python 3.3's @code{shutil}.
6249 Unlike the original version it is written in pure Python rather than C,
6250 so it might be a tiny bit slower.")
6251 (license license:expat)))
6252
6253 (define-public python-waf
6254 (package
6255 (name "python-waf")
6256 (version "2.0.11")
6257 (source (origin
6258 (method url-fetch)
6259 (uri (string-append "https://waf.io/"
6260 "waf-" version ".tar.bz2"))
6261 (sha256
6262 (base32
6263 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6264 (build-system python-build-system)
6265 (arguments
6266 '(#:phases
6267 (modify-phases %standard-phases
6268 (replace 'build
6269 (lambda _
6270 (invoke "python" "waf-light" "configure" "build")))
6271 (replace 'check
6272 (lambda _
6273 (invoke "python" "waf" "--version")))
6274 (replace 'install
6275 (lambda* (#:key outputs #:allow-other-keys)
6276 (let ((out (assoc-ref outputs "out")))
6277 (install-file "waf" (string-append out "/bin")))
6278 #t))
6279 ;; waf breaks when it is wrapped.
6280 (delete 'wrap))))
6281 (home-page "https://waf.io/")
6282 (synopsis "Python-based build system")
6283 (description
6284 "Waf is a Python-based framework for configuring, compiling and installing
6285 applications.")
6286 (license license:bsd-3)))
6287
6288 (define-public python2-waf
6289 (package-with-python2 python-waf))
6290
6291 (define-public python-pyzmq
6292 (package
6293 (name "python-pyzmq")
6294 (version "17.1.2")
6295 (source
6296 (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "pyzmq" version))
6299 (sha256
6300 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6301 (build-system python-build-system)
6302 (arguments
6303 `(#:configure-flags
6304 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6305 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6306 ;; --inplace' for 'python setup.py test' to work.
6307 #:tests? #f))
6308 (inputs
6309 `(("zeromq" ,zeromq)))
6310 (native-inputs
6311 `(("pkg-config" ,pkg-config)
6312 ("python-nose" ,python-nose)))
6313 (home-page "https://github.com/zeromq/pyzmq")
6314 (synopsis "Python bindings for 0MQ")
6315 (description
6316 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6317 (license license:bsd-4)))
6318
6319 (define-public python2-pyzmq
6320 (package-with-python2 python-pyzmq))
6321
6322 (define-public python-pep8
6323 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6324 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6325 ;; some dependents' test suites, and nothing more.
6326 (package
6327 (name "python-pep8")
6328 (version "1.7.0")
6329 (source
6330 (origin
6331 (method url-fetch)
6332 (uri (pypi-uri "pep8" version))
6333 (sha256
6334 (base32
6335 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6336 (build-system python-build-system)
6337 (home-page "https://pep8.readthedocs.org/")
6338 (synopsis "Python style guide checker")
6339 (description
6340 "This tools checks Python code against some of the style conventions in
6341 PEP 8.")
6342 (license license:expat)))
6343
6344 (define-public python2-pep8
6345 (package-with-python2 python-pep8))
6346
6347 (define-public python-pyflakes
6348 (package
6349 (name "python-pyflakes")
6350 (version "2.0.0")
6351 (source
6352 (origin
6353 (method url-fetch)
6354 (uri (pypi-uri "pyflakes" version))
6355 (sha256
6356 (base32
6357 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6358 (build-system python-build-system)
6359 (home-page
6360 "https://github.com/pyflakes/pyflakes")
6361 (synopsis "Passive checker of Python programs")
6362 (description
6363 "Pyflakes statically checks Python source code for common errors.")
6364 (license license:expat)))
6365
6366 (define-public python2-pyflakes
6367 (package-with-python2 python-pyflakes))
6368
6369 (define-public python-mccabe
6370 (package
6371 (name "python-mccabe")
6372 (version "0.6.1")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (pypi-uri "mccabe" version))
6377 (sha256
6378 (base32
6379 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6380 (build-system python-build-system)
6381 (native-inputs
6382 `(("python-pytest" ,python-pytest-bootstrap)
6383 ("python-pytest-runner" ,python-pytest-runner)))
6384 (home-page "https://github.com/flintwork/mccabe")
6385 (synopsis "McCabe checker, plugin for flake8")
6386 (description
6387 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6388 complexity of Python source code.")
6389 (license license:expat)))
6390
6391 (define-public python2-mccabe
6392 (package-with-python2 python-mccabe))
6393
6394 (define-public python-mccabe-0.2.1
6395 (package (inherit python-mccabe)
6396 (version "0.2.1")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (pypi-uri "mccabe" version))
6401 (sha256
6402 (base32
6403 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6404
6405 (define-public python2-mccabe-0.2.1
6406 (package-with-python2 python-mccabe-0.2.1))
6407
6408 ;; Flake8 2.4.1 requires an older version of pep8.
6409 ;; This should be removed ASAP.
6410 (define-public python-pep8-1.5.7
6411 (package (inherit python-pep8)
6412 (version "1.5.7")
6413 (source
6414 (origin
6415 (method url-fetch)
6416 (uri (pypi-uri "pep8" version))
6417 (sha256
6418 (base32
6419 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6420 (arguments
6421 ;; XXX Tests not compatible with Python 3.5.
6422 '(#:tests? #f))))
6423
6424 (define-public python2-pep8-1.5.7
6425 (package-with-python2 python-pep8-1.5.7))
6426
6427 ;; Flake8 2.4.1 requires an older version of pyflakes.
6428 ;; This should be removed ASAP.
6429 (define-public python-pyflakes-0.8.1
6430 (package (inherit python-pyflakes)
6431 (version "0.8.1")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "pyflakes" version))
6436 (sha256
6437 (base32
6438 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6439 (arguments
6440 ;; XXX Tests not compatible with Python 3.5.
6441 '(#:tests? #f))))
6442
6443 (define-public python2-pyflakes-0.8.1
6444 (package-with-python2 python-pyflakes-0.8.1))
6445
6446 ;; This package is used by hypothesis which has thousands of dependent packages.
6447 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6448 (define-public python-flake8-3.5
6449 (package
6450 (name "python-flake8")
6451 (version "3.5.0")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "flake8" version))
6456 (sha256
6457 (base32
6458 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6459 (build-system python-build-system)
6460 (arguments
6461 `(#:phases
6462 (modify-phases %standard-phases
6463 ;; Two errors don't seem to have assigned codes.
6464 (add-after 'unpack 'delete-broken-test
6465 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6466 (add-after 'unpack 'fix-problem-with-pycodestyle
6467 (lambda _
6468 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6469 ;; This should no longer be needed with the next release.
6470 (substitute* "setup.py"
6471 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6472 "PEP8_PLUGIN('break_after_binary_operator'),\
6473 PEP8_PLUGIN('break_before_binary_operator'),"))
6474 #t))
6475 (delete 'check)
6476 (add-after 'install 'check
6477 (lambda* (#:key inputs outputs #:allow-other-keys)
6478 (add-installed-pythonpath inputs outputs)
6479 (invoke "pytest" "-v")
6480 #t)))))
6481 (propagated-inputs
6482 `(("python-pycodestyle" ,python-pycodestyle)
6483 ("python-pyflakes" ,python-pyflakes)
6484 ("python-mccabe" ,python-mccabe)))
6485 (native-inputs
6486 `(("python-mock" ,python-mock)
6487 ("python-pytest" ,python-pytest-bootstrap)
6488 ("python-pytest-runner" ,python-pytest-runner)))
6489 (home-page "https://gitlab.com/pycqa/flake8")
6490 (synopsis
6491 "The modular source code checker: pep8, pyflakes and co")
6492 (description
6493 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6494 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6495 (license license:expat)))
6496
6497 (define-public python2-flake8-3.5
6498 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6499 (package (inherit base)
6500 (propagated-inputs
6501 `(("python2-configparser" ,python2-configparser)
6502 ("python2-enum34" ,python2-enum34)
6503 ,@(package-propagated-inputs base))))))
6504
6505 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6506 ;; this newer version. Keep it as a separate variable for now to avoid
6507 ;; rebuilding "python-hypothesis"; this should be removed in the next
6508 ;; rebuild cycle.
6509 (define-public python-flake8
6510 (package
6511 (inherit python-flake8-3.5)
6512 (version "3.6.0")
6513 (source (origin
6514 (method url-fetch)
6515 (uri (pypi-uri "flake8" version))
6516 (sha256
6517 (base32
6518 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6519 (arguments
6520 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6521 ((#:phases phases)
6522 `(modify-phases ,phases
6523 (delete 'delete-broken-test)
6524 (delete 'fix-problem-with-pycodestyle)))))
6525 (properties `((python2-variant . ,(delay python2-flake8))))))
6526
6527 (define-public python2-flake8
6528 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6529 (package (inherit base)
6530 (propagated-inputs
6531 (package-propagated-inputs python2-flake8-3.5)))))
6532
6533 ;; python-hacking requires flake8 <2.6.0.
6534 (define-public python-flake8-2.5
6535 (package
6536 (inherit python-flake8)
6537 (version "2.5.5")
6538 (source (origin
6539 (method url-fetch)
6540 (uri (pypi-uri "flake8" version))
6541 (sha256
6542 (base32
6543 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6544 (propagated-inputs
6545 `(("python-pep8" ,python-pep8)
6546 ,@(package-propagated-inputs python-flake8)))
6547 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6548
6549 (define-public python2-flake8-2.5
6550 (package
6551 (inherit python2-flake8)
6552 (version (package-version python-flake8-2.5))
6553 (source (origin
6554 (inherit (package-source python-flake8-2.5))))
6555 (propagated-inputs
6556 `(("python2-pep8" ,python2-pep8)
6557 ,@(package-propagated-inputs python2-flake8)))))
6558
6559 (define-public python-flake8-polyfill
6560 (package
6561 (name "python-flake8-polyfill")
6562 (version "1.0.2")
6563 (source
6564 (origin
6565 (method url-fetch)
6566 (uri (pypi-uri "flake8-polyfill" version))
6567 (sha256
6568 (base32
6569 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6570 (build-system python-build-system)
6571 (arguments
6572 '(#:phases
6573 (modify-phases %standard-phases
6574 (replace 'check
6575 (lambda _
6576 (setenv "PYTHONPATH"
6577 (string-append (getcwd) "/build/lib:"
6578 (getenv "PYTHONPATH")))
6579 (invoke "py.test" "-v"))))))
6580 (native-inputs
6581 `(("python-flake8" ,python-flake8)
6582 ("python-mock" ,python-mock)
6583 ("python-pep8" ,python-pep8)
6584 ("python-pycodestyle" ,python-pycodestyle)
6585 ("python-pytest" ,python-pytest)))
6586 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6587 (synopsis "Polyfill package for Flake8 plugins")
6588 (description
6589 "This package that provides some compatibility helpers for Flake8
6590 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6591 (license license:expat)))
6592
6593 (define-public python2-flake8-polyfill
6594 (package-with-python2 python-flake8-polyfill))
6595
6596 (define-public python-mistune
6597 (package
6598 (name "python-mistune")
6599 (version "0.8.4")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "mistune" version))
6604 (sha256
6605 (base32
6606 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6607 (build-system python-build-system)
6608 (native-inputs
6609 `(("python-nose" ,python-nose)
6610 ("python-cython" ,python-cython)))
6611 (home-page "https://github.com/lepture/mistune")
6612 (synopsis "Markdown parser in pure Python")
6613 (description "This package provides a fast markdown parser in pure
6614 Python.")
6615 (license license:bsd-3)))
6616
6617 (define-public python2-mistune
6618 (package-with-python2 python-mistune))
6619
6620 (define-public python-markdown
6621 (package
6622 (name "python-markdown")
6623 (version "3.1.1")
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "Markdown" version))
6628 (sha256
6629 (base32
6630 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6631 (build-system python-build-system)
6632 (native-inputs
6633 `(("python-nose" ,python-nose)
6634 ("python-pyyaml" ,python-pyyaml)))
6635 (home-page "https://python-markdown.github.io/")
6636 (synopsis "Python implementation of Markdown")
6637 (description
6638 "This package provides a Python implementation of John Gruber's
6639 Markdown. The library features international input, various Markdown
6640 extensions, and several HTML output formats. A command line wrapper
6641 markdown_py is also provided to convert Markdown files to HTML.")
6642 (license license:bsd-3)))
6643
6644 (define-public python2-markdown
6645 (package-with-python2 python-markdown))
6646
6647 (define-public python-ptyprocess
6648 (package
6649 (name "python-ptyprocess")
6650 (version "0.5.2")
6651 (source
6652 (origin
6653 (method url-fetch)
6654 (uri (pypi-uri "ptyprocess" version))
6655 (sha256
6656 (base32
6657 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6658 (build-system python-build-system)
6659 (native-inputs
6660 `(("python-nose" ,python-nose)))
6661 (arguments
6662 `(#:phases
6663 (modify-phases %standard-phases
6664 (replace 'check
6665 (lambda _ (invoke "nosetests"))))))
6666 (home-page "https://github.com/pexpect/ptyprocess")
6667 (synopsis "Run a subprocess in a pseudo terminal")
6668 (description
6669 "This package provides a Python library used to launch a subprocess in a
6670 pseudo terminal (pty), and interact with both the process and its pty.")
6671 (license license:isc)))
6672
6673 (define-public python2-ptyprocess
6674 (package-with-python2 python-ptyprocess))
6675
6676 (define-public python-cram
6677 (package
6678 (name "python-cram")
6679 (version "0.7")
6680 (home-page "https://bitheap.org/cram/")
6681 (source (origin
6682 (method url-fetch)
6683 (uri (list (string-append home-page "cram-"
6684 version ".tar.gz")
6685 (pypi-uri "cram" version)))
6686 (sha256
6687 (base32
6688 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6689 (arguments
6690 '(#:phases
6691 (modify-phases %standard-phases
6692 (add-after 'unpack 'patch-source
6693 (lambda _
6694 (substitute* (find-files "cram" ".*\\.py$")
6695 ;; Replace default shell path.
6696 (("/bin/sh") (which "sh")))
6697 (substitute* (find-files "tests" ".*\\.t$")
6698 (("md5") "md5sum")
6699 (("/bin/bash") (which "bash"))
6700 (("/bin/sh") (which "sh")))
6701 (substitute* "cram/_test.py"
6702 ;; This hack works around a bug triggered by substituting
6703 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6704 ;; "cram -h", which breaks the output at 80 characters. This
6705 ;; causes the line showing the default shell to break into two
6706 ;; lines, but the test expects a single line...
6707 (("env\\['COLUMNS'\\] = '80'")
6708 "env['COLUMNS'] = '160'"))
6709 #t))
6710 (delete 'check)
6711 (add-after 'install 'check
6712 ;; The test phase uses the built library and executable.
6713 ;; It's easier to run it after install since the build
6714 ;; directory contains version-specific PATH.
6715 (lambda* (#:key inputs outputs #:allow-other-keys)
6716 (add-installed-pythonpath inputs outputs)
6717 (setenv "PATH" (string-append (getenv "PATH") ":"
6718 (assoc-ref outputs "out") "/bin"))
6719 (invoke "make" "test"))))))
6720 (build-system python-build-system)
6721 (native-inputs
6722 `(("python-coverage" ,python-coverage)
6723 ("which" ,which)))
6724 (synopsis "Simple testing framework for command line applications")
6725 (description
6726 "Cram is a functional testing framework for command line applications.
6727 Cram tests look like snippets of interactive shell sessions. Cram runs each
6728 command and compares the command output in the test with the command’s actual
6729 output.")
6730 (license license:gpl2+)))
6731
6732 (define-public python2-cram
6733 (package-with-python2 python-cram))
6734
6735 (define-public python-straight-plugin
6736 (package
6737 (name "python-straight-plugin")
6738 (version "1.4.1")
6739 (source
6740 (origin
6741 (method url-fetch)
6742 (uri (pypi-uri "straight.plugin" version))
6743 (sha256
6744 (base32
6745 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6746 (build-system python-build-system)
6747 (home-page "https://github.com/ironfroggy/straight.plugin")
6748 (synopsis "Simple namespaced plugin facility")
6749 (description "Straight Plugin provides a type of plugin you can create from
6750 almost any existing Python modules, and an easy way for outside developers to
6751 add functionality and customization to your projects with their own plugins.")
6752 (license license:expat)))
6753
6754 (define-public python2-straight-plugin
6755 (package-with-python2 python-straight-plugin))
6756
6757 (define-public python-fonttools
6758 (package
6759 (name "python-fonttools")
6760 (version "3.28.0")
6761 (source (origin
6762 (method url-fetch)
6763 (uri (pypi-uri "fonttools" version ".zip"))
6764 (sha256
6765 (base32
6766 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6767 (build-system python-build-system)
6768 (native-inputs
6769 `(("unzip" ,unzip)
6770 ("python-pytest" ,python-pytest)
6771 ("python-pytest-runner" ,python-pytest-runner)))
6772 (home-page "https://github.com/behdad/fonttools")
6773 (synopsis "Tools to manipulate font files")
6774 (description
6775 "FontTools/TTX is a library to manipulate font files from Python. It
6776 supports reading and writing of TrueType/OpenType fonts, reading and writing
6777 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6778 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6779 from an XML-based format.")
6780 (license license:expat)))
6781
6782 (define-public python2-fonttools
6783 (package-with-python2 python-fonttools))
6784
6785 (define-public python-ly
6786 (package
6787 (name "python-ly")
6788 (version "0.9.5")
6789 (source
6790 (origin
6791 (method url-fetch)
6792 (uri (pypi-uri name version))
6793 (sha256
6794 (base32
6795 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6796 (build-system python-build-system)
6797 (arguments
6798 ;; FIXME: Some tests need network access.
6799 '(#:tests? #f))
6800 (synopsis "Tool and library for manipulating LilyPond files")
6801 (description "This package provides a Python library to parse, manipulate
6802 or create documents in LilyPond format. A command line program ly is also
6803 provided that can be used to do various manipulations with LilyPond files.")
6804 (home-page "https://pypi.python.org/pypi/python-ly")
6805 (license license:gpl2+)))
6806
6807 (define-public python-appdirs
6808 (package
6809 (name "python-appdirs")
6810 (version "1.4.3")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "appdirs" version))
6815 (sha256
6816 (base32
6817 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6818 (build-system python-build-system)
6819 (home-page "https://github.com/ActiveState/appdirs")
6820 (synopsis
6821 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6822 (description
6823 "This module provides a portable way of finding out where user data
6824 should be stored on various operating systems.")
6825 (license license:expat)))
6826
6827 (define-public python2-appdirs
6828 (package-with-python2 python-appdirs))
6829
6830 (define-public python-llfuse
6831 (package
6832 (name "python-llfuse")
6833 (version "1.3.5")
6834 (source (origin
6835 (method url-fetch)
6836 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6837 (sha256
6838 (base32
6839 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6840 (build-system python-build-system)
6841 (inputs
6842 `(("fuse" ,fuse)
6843 ("attr" ,attr)))
6844 (native-inputs
6845 `(("pkg-config" ,pkg-config)))
6846 (synopsis "Python bindings for FUSE")
6847 (description
6848 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6849 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6850 (license license:lgpl2.0+)
6851 (properties `((python2-variant . ,(delay python2-llfuse))))))
6852
6853 (define-public python2-llfuse
6854 (package (inherit (package-with-python2
6855 (strip-python2-variant python-llfuse)))
6856 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6857
6858 ;; For attic-0.16
6859 (define-public python-llfuse-0.41
6860 (package (inherit python-llfuse)
6861 (version "0.41.1")
6862 (source (origin
6863 (method url-fetch)
6864 (uri (string-append
6865 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6866 "llfuse-" version ".tar.bz2"))
6867 (sha256
6868 (base32
6869 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6870 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6871 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6872 (license (list license:expat license:lgpl2.0+))))
6873
6874 (define-public python-msgpack
6875 (package
6876 (name "python-msgpack")
6877 (version "0.5.6")
6878 (source (origin
6879 (method url-fetch)
6880 (uri (pypi-uri "msgpack" version))
6881 (sha256
6882 (base32
6883 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6884 (build-system python-build-system)
6885 (arguments
6886 `(#:modules ((guix build utils)
6887 (guix build python-build-system)
6888 (ice-9 ftw)
6889 (srfi srfi-1)
6890 (srfi srfi-26))
6891 #:phases
6892 (modify-phases %standard-phases
6893 (replace 'check
6894 (lambda _
6895 (let ((cwd (getcwd)))
6896 (setenv "PYTHONPATH"
6897 (string-append cwd "/build/"
6898 (find (cut string-prefix? "lib" <>)
6899 (scandir (string-append cwd "/build")))
6900 ":"
6901 (getenv "PYTHONPATH")))
6902 (invoke "pytest" "-v" "test")))))))
6903 (native-inputs
6904 `(("python-pytest" ,python-pytest)))
6905 (synopsis "MessagePack (de)serializer")
6906 (description "MessagePack is a fast, compact binary serialization format,
6907 suitable for similar data to JSON. This package provides CPython bindings for
6908 reading and writing MessagePack data.")
6909 (home-page "https://pypi.python.org/pypi/msgpack/")
6910 (license license:asl2.0)))
6911
6912 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6913 ;; release 0.5. Some packages like borg still call it by the old name for now.
6914 ;; <https://bugs.gnu.org/30662>
6915 (define-public python-msgpack-transitional
6916 (package
6917 (inherit python-msgpack)
6918 (name "python-msgpack-transitional")
6919 (arguments
6920 (substitute-keyword-arguments (package-arguments python-msgpack)
6921 ((#:phases phases)
6922 `(modify-phases ,phases
6923 (add-after 'unpack 'configure-transitional
6924 (lambda _
6925 ;; Keep using the old name.
6926 (substitute* "setup.py"
6927 (("TRANSITIONAL = False")
6928 "TRANSITIONAL = 1"))
6929 #t))))))))
6930
6931 (define-public python2-msgpack
6932 (package-with-python2 python-msgpack))
6933
6934 (define-public python-netaddr
6935 (package
6936 (name "python-netaddr")
6937 (version "0.7.19")
6938 (source
6939 (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "netaddr" version))
6942 (sha256
6943 (base32
6944 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6945 (build-system python-build-system)
6946 (arguments `(#:tests? #f)) ;; No tests.
6947 (home-page "https://github.com/drkjam/netaddr/")
6948 (synopsis "Pythonic manipulation of network addresses")
6949 (description
6950 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6951 and MAC network addresses.")
6952 (license license:bsd-3)))
6953
6954 (define-public python2-netaddr
6955 (package-with-python2 python-netaddr))
6956
6957 (define-public python2-pyroute2
6958 (package
6959 (name "python2-pyroute2")
6960 (version "0.5.6")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "pyroute2" version))
6965 (sha256
6966 (base32
6967 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6968 (build-system python-build-system)
6969 (arguments
6970 `(#:python ,python-2)) ;Python 3.x is not supported
6971 (home-page "https://github.com/svinota/pyroute2")
6972 (synopsis "Python netlink library")
6973 (description
6974 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6975 Supported netlink families and protocols include:
6976 @itemize
6977 @item rtnl, network settings - addresses, routes, traffic controls
6978 @item nfnetlink - netfilter API: ipset, nftables, ...
6979 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6980 @item devlink - manage and monitor devlink-enabled hardware
6981 @item generic - generic netlink families
6982 @itemize
6983 @item nl80211 - wireless functions API (basic support)
6984 @item taskstats - extended process statistics
6985 @item acpi_events - ACPI events monitoring
6986 @item thermal_events - thermal events monitoring
6987 @item VFS_DQUOT - disk quota events monitoring
6988 @end itemize
6989 @end itemize")
6990 (license license:gpl2+)))
6991
6992 (define-public python-wrapt
6993 (package
6994 (name "python-wrapt")
6995 (version "1.11.1")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "wrapt" version))
7000 (sha256
7001 (base32
7002 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
7003 (build-system python-build-system)
7004 (arguments
7005 ;; Tests are not included in the tarball, they are only available in the
7006 ;; git repository.
7007 `(#:tests? #f))
7008 (home-page "https://github.com/GrahamDumpleton/wrapt")
7009 (synopsis "Module for decorators, wrappers and monkey patching")
7010 (description
7011 "The aim of the wrapt module is to provide a transparent object proxy for
7012 Python, which can be used as the basis for the construction of function
7013 wrappers and decorator functions.")
7014 (license license:bsd-2)))
7015
7016 (define-public python2-wrapt
7017 (package-with-python2 python-wrapt))
7018
7019 (define-public python-xlrd
7020 (package
7021 (name "python-xlrd")
7022 (version "1.0.0")
7023 (source (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "xlrd" version))
7026 (sha256
7027 (base32
7028 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7029 (build-system python-build-system)
7030 (arguments
7031 `(#:phases
7032 (modify-phases %standard-phases
7033 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7034 ;; run tests instead for now.
7035 (replace 'check (lambda _ (invoke "nosetests"))))))
7036 (native-inputs `(("python-nose" ,python-nose)))
7037 (home-page "http://www.python-excel.org/")
7038 (synopsis "Library for extracting data from Excel files")
7039 (description "This package provides a library to extract data from
7040 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7041 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7042 Unicode-aware. It is not intended as an end-user tool.")
7043 (license license:bsd-3)))
7044
7045 (define-public python2-xlrd
7046 (package-with-python2 python-xlrd))
7047
7048 (define-public python-prettytable
7049 (package
7050 (name "python-prettytable")
7051 (version "0.7.2")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7056 (sha256
7057 (base32
7058 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7059 (build-system python-build-system)
7060 (home-page "http://code.google.com/p/prettytable/")
7061 (synopsis "Display tabular data in an ASCII table format")
7062 (description
7063 "A library designed to represent tabular data in visually appealing ASCII
7064 tables. PrettyTable allows for selection of which columns are to be printed,
7065 independent alignment of columns (left or right justified or centred) and
7066 printing of sub-tables by specifying a row range.")
7067 (license license:bsd-3)))
7068
7069 (define-public python2-prettytable
7070 (package-with-python2 python-prettytable))
7071
7072 (define-public python-tables
7073 (package
7074 (name "python-tables")
7075 (version "3.4.4")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "tables" version))
7080 (sha256
7081 (base32
7082 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7083 (modules '((guix build utils)))
7084 (snippet
7085 '(begin
7086 ;; Remove pre-compiled .pyc files from source.
7087 (for-each delete-file-recursively
7088 (find-files "." "__pycache__" #:directories? #t))
7089 (for-each delete-file (find-files "." "\\.pyc$"))
7090 #t))))
7091 (build-system python-build-system)
7092 (arguments
7093 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7094 ;; or "check", so we must override the build and check phases.
7095 #:phases
7096 (modify-phases %standard-phases
7097 (add-after 'unpack 'use-gcc
7098 (lambda _
7099 (substitute* "setup.py"
7100 (("compiler = new_compiler\\(\\)" line)
7101 (string-append line
7102 "\ncompiler.set_executables(compiler='gcc',"
7103 "compiler_so='gcc',"
7104 "linker_exe='gcc',"
7105 "linker_so='gcc -shared')")))
7106 #t))
7107 (replace 'build
7108 (lambda* (#:key inputs #:allow-other-keys)
7109 (invoke "python" "setup.py" "build"
7110 (string-append "--hdf5="
7111 (assoc-ref inputs "hdf5")))))
7112 (replace 'check
7113 (lambda* (#:key inputs #:allow-other-keys)
7114 (invoke "python" "setup.py" "check"
7115 (string-append "--hdf5="
7116 (assoc-ref inputs "hdf5"))))))))
7117 (propagated-inputs
7118 `(("python-numexpr" ,python-numexpr)
7119 ("python-numpy" ,python-numpy)))
7120 (native-inputs
7121 `(("python-cython" ,python-cython)
7122 ("pkg-config" ,pkg-config)))
7123 (inputs
7124 `(("hdf5" ,hdf5)
7125 ("bzip2" ,bzip2)
7126 ("zlib" ,zlib)))
7127 (home-page "http://www.pytables.org/")
7128 (synopsis "Hierarchical datasets for Python")
7129 (description "PyTables is a package for managing hierarchical datasets and
7130 designed to efficiently cope with extremely large amounts of data.")
7131 (license license:bsd-3)))
7132
7133 (define-public python2-tables
7134 (package-with-python2 python-tables))
7135
7136 (define-public python-pyasn1
7137 (package
7138 (name "python-pyasn1")
7139 (version "0.4.3")
7140 (source
7141 (origin
7142 (method url-fetch)
7143 (uri (pypi-uri "pyasn1" version))
7144 (sha256
7145 (base32
7146 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7147 (build-system python-build-system)
7148 (home-page "http://pyasn1.sourceforge.net/")
7149 (synopsis "ASN.1 types and codecs")
7150 (description
7151 "This is an implementation of ASN.1 types and codecs in Python. It is
7152 suitable for a wide range of protocols based on the ASN.1 specification.")
7153 (license license:bsd-2)))
7154
7155 (define-public python2-pyasn1
7156 (package-with-python2 python-pyasn1))
7157
7158 (define-public python-pyasn1-modules
7159 (package
7160 (name "python-pyasn1-modules")
7161 (version "0.2.2")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "pyasn1-modules" version))
7166 (sha256
7167 (base32
7168 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7169 (build-system python-build-system)
7170 (propagated-inputs
7171 `(("python-pyasn1" ,python-pyasn1)))
7172 (home-page "https://sourceforge.net/projects/pyasn1/")
7173 (synopsis "ASN.1 codec implementations")
7174 (description
7175 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7176 implementations of ASN.1-based codecs and protocols.")
7177 (license license:bsd-3)))
7178
7179 (define-public python2-pyasn1-modules
7180 (package-with-python2 python-pyasn1-modules))
7181
7182 (define-public python-ipaddress
7183 (package
7184 (name "python-ipaddress")
7185 (version "1.0.22")
7186 (source (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "ipaddress" version))
7189 (sha256
7190 (base32
7191 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7192 (build-system python-build-system)
7193 (home-page "https://github.com/phihag/ipaddress")
7194 (synopsis "IP address manipulation library")
7195 (description
7196 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7197 in Python. This library is used to create, poke at, and manipulate IPv4 and
7198 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7199 module to older versions of Python.")
7200 (license license:psfl)))
7201
7202 (define-public python2-ipaddress
7203 (package-with-python2 python-ipaddress))
7204
7205 (define-public python2-ipaddr
7206 (package
7207 (name "python2-ipaddr")
7208 (version "2.1.11")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (pypi-uri "ipaddr" version))
7213 (sha256
7214 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7215 (build-system python-build-system)
7216 (arguments
7217 `(#:python ,python-2 ;version 2 only
7218 #:phases
7219 (modify-phases %standard-phases
7220 (replace 'check
7221 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7222 (home-page "https://github.com/google/ipaddr-py")
7223 (synopsis "IP address manipulation library")
7224 (description
7225 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7226 IPv6 addresses and networks.
7227
7228 For new implementations you may prefer to use the standard module
7229 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7230 versions of Python.")
7231 (license license:asl2.0)))
7232
7233 (define-public python-idna
7234 (package
7235 (name "python-idna")
7236 (version "2.8")
7237 (source
7238 (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "idna" version))
7241 (sha256
7242 (base32
7243 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7244 (build-system python-build-system)
7245 (home-page "https://github.com/kjd/idna")
7246 (synopsis "Internationalized domain names in applications")
7247 (description
7248 "This is a library to support the Internationalised Domain Names in
7249 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7250 protocol is often referred to as “IDNA2008” and can produce different results
7251 from the earlier standard from 2003. The library is also intended to act as a
7252 suitable drop-in replacement for the “encodings.idna” module that comes with
7253 the Python standard library but currently only supports the older 2003
7254 specification.")
7255 (license license:bsd-4)))
7256
7257 (define-public python-idna-2.7
7258 (package (inherit python-idna)
7259 (version "2.7")
7260 (source (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "idna" version))
7263 (sha256
7264 (base32
7265 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7266
7267
7268 (define-public python2-idna
7269 (package-with-python2 python-idna))
7270
7271 (define-public python-idna-ssl
7272 (package
7273 (name "python-idna-ssl")
7274 (version "1.0.1")
7275 (source
7276 (origin
7277 (method url-fetch)
7278 (uri (pypi-uri "idna-ssl" version))
7279 (sha256
7280 (base32
7281 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7282 (build-system python-build-system)
7283 (arguments
7284 `(#:tests? #f)) ;circular dependency with python-aiohttp
7285 (home-page "https://github.com/aio-libs/idna-ssl")
7286 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7287 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7288 domains support.")
7289 (license license:expat)))
7290
7291 (define-public python-pretend
7292 (package
7293 (name "python-pretend")
7294 (version "1.0.9")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (pypi-uri "pretend" version))
7299 (sha256
7300 (base32
7301 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7302 (build-system python-build-system)
7303 (home-page "https://github.com/alex/pretend")
7304 (synopsis "Library for stubbing in Python")
7305 (description
7306 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7307 technique for writing tests. You may hear the term mixed up with mocks,
7308 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7309 responses, rather than doing any computation.")
7310 (license license:bsd-3)))
7311
7312 (define-public python2-pretend
7313 (package-with-python2 python-pretend))
7314
7315 (define-public python-pip
7316 (package
7317 (name "python-pip")
7318 (version "18.1")
7319 (source
7320 (origin
7321 (method url-fetch)
7322 (uri (pypi-uri "pip" version))
7323 (sha256
7324 (base32
7325 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7326 (build-system python-build-system)
7327 (arguments
7328 '(#:tests? #f)) ; there are no tests in the pypi archive.
7329 (home-page "https://pip.pypa.io/")
7330 (synopsis "Package manager for Python software")
7331 (description
7332 "Pip is a package manager for Python software, that finds packages on the
7333 Python Package Index (PyPI).")
7334 (license license:expat)))
7335
7336 (define-public python2-pip
7337 (package-with-python2 python-pip))
7338
7339 (define-public python-tlsh
7340 (package
7341 (name "python-tlsh")
7342 (version "3.4.5")
7343 (home-page "https://github.com/trendmicro/tlsh")
7344 (source
7345 (origin
7346 (method git-fetch)
7347 (uri (git-reference
7348 (url "https://github.com/trendmicro/tlsh.git")
7349 (commit (string-append "v" version))))
7350 (file-name (git-file-name name version))
7351 (sha256
7352 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7353 (build-system cmake-build-system)
7354 (arguments
7355 '(#:out-of-source? #f
7356 #:phases (modify-phases %standard-phases
7357 (replace
7358 'install
7359 (lambda* (#:key outputs #:allow-other-keys)
7360 ;; Build and install the Python bindings. The underlying
7361 ;; C++ library is apparently not meant to be installed.
7362 (let ((out (assoc-ref outputs "out")))
7363 (with-directory-excursion "py_ext"
7364 (and (system* "python" "setup.py" "build")
7365 (system* "python" "setup.py" "install"
7366 (string-append "--prefix=" out))))))))))
7367 (inputs `(("python" ,python-wrapper))) ;for the bindings
7368 (synopsis "Fuzzy matching library for Python")
7369 (description
7370 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7371 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7372 value which can be used for similarity comparisons. Similar objects have
7373 similar hash values, which allows for the detection of similar objects by
7374 comparing their hash values. The byte stream should have a sufficient amount
7375 of complexity; for example, a byte stream of identical bytes will not generate
7376 a hash value.")
7377 (license license:asl2.0)))
7378
7379 (define-public python2-tlsh
7380 (package
7381 (inherit python-tlsh)
7382 (name "python2-tlsh")
7383 (inputs `(("python" ,python-2)))))
7384
7385 (define-public python-termcolor
7386 (package
7387 (name "python-termcolor")
7388 (version "1.1.0")
7389 (source
7390 (origin
7391 (method url-fetch)
7392 (uri (pypi-uri "termcolor" version))
7393 (sha256
7394 (base32
7395 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7396 (build-system python-build-system)
7397 (arguments
7398 ;; There are no tests.
7399 `(#:tests? #f))
7400 (home-page "https://pypi.python.org/pypi/termcolor")
7401 (synopsis "ANSII Color formatting for terminal output")
7402 (description
7403 "This package provides ANSII Color formatting for output in terminals.")
7404 (license license:expat)))
7405
7406 (define-public python2-termcolor
7407 (package-with-python2 python-termcolor))
7408
7409 (define-public python-libarchive-c
7410 (package
7411 (name "python-libarchive-c")
7412 (version "2.8")
7413 (source (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "libarchive-c" version))
7416 (sha256
7417 (base32
7418 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7419 (build-system python-build-system)
7420 (arguments
7421 '(#:phases (modify-phases %standard-phases
7422 (add-before
7423 'build 'reference-libarchive
7424 (lambda* (#:key inputs #:allow-other-keys)
7425 ;; Retain the absolute file name of libarchive.so.
7426 (let ((libarchive (assoc-ref inputs "libarchive")))
7427 (substitute* "libarchive/ffi.py"
7428 (("find_library\\('archive'\\)")
7429 (string-append "'" libarchive
7430 "/lib/libarchive.so'"))))))
7431 (replace 'check
7432 (lambda _ (invoke "pytest" "-vv"))))))
7433 (native-inputs
7434 `(("python-mock" ,python-mock)
7435 ("python-pytest" ,python-pytest)))
7436 (inputs
7437 `(("libarchive" ,libarchive)))
7438 (home-page "https://github.com/Changaco/python-libarchive-c")
7439 (synopsis "Python interface to libarchive")
7440 (description
7441 "This package provides Python bindings to libarchive, a C library to
7442 access possibly compressed archives in many different formats. It uses
7443 Python's @code{ctypes} foreign function interface (FFI).")
7444 (license license:lgpl2.0+)))
7445
7446 (define-public python2-libarchive-c
7447 (package-with-python2 python-libarchive-c))
7448
7449 (define-public python-file
7450 (package
7451 (inherit file)
7452 (name "python-file")
7453 (build-system python-build-system)
7454 (arguments
7455 '(#:tests? #f ;no tests
7456 #:configure-flags '("--single-version-externally-managed" "--root=/")
7457 #:phases (modify-phases %standard-phases
7458 (add-before 'build 'change-directory
7459 (lambda _
7460 (chdir "python")
7461 #t))
7462 (add-before 'build 'set-library-file-name
7463 (lambda* (#:key inputs #:allow-other-keys)
7464 (let ((file (assoc-ref inputs "file")))
7465 (substitute* "magic.py"
7466 (("find_library\\('magic'\\)")
7467 (string-append "'" file "/lib/libmagic.so'")))
7468 #t))))))
7469 (inputs `(("file" ,file)))
7470 (native-inputs (if (%current-target-system)
7471 `(("self" ,this-package))
7472 '()))
7473 (synopsis "Python bindings to the libmagic file type guesser. Note that
7474 this module and the python-magic module both provide a \"magic.py\" file;
7475 these two modules, which are different and were developed separately, both
7476 serve the same purpose: provide Python bindings for libmagic.")))
7477
7478 (define-public python2-file
7479 (package-with-python2 python-file))
7480
7481 (define-public python-debian
7482 (package
7483 (name "python-debian")
7484 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7485 (version "0.1.28")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri name version))
7490 (sha256
7491 (base32
7492 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7493 (build-system python-build-system)
7494 (propagated-inputs
7495 `(("python-six" ,python-six)))
7496 (synopsis "Debian package related modules")
7497 (description
7498 ;; XXX: Use @enumerate instead of @itemize to work around
7499 ;; <http://bugs.gnu.org/21772>.
7500 "This package provides Python modules that abstract many formats of
7501 Debian-related files, such as:
7502
7503 @enumerate
7504 @item Debtags information;
7505 @item @file{debian/changelog} files;
7506 @item packages files, pdiffs;
7507 @item control files of single or multiple RFC822-style paragraphs---e.g.
7508 @file{debian/control}, @file{.changes}, @file{.dsc};
7509 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7510 contained files and meta-information.
7511 @end enumerate\n")
7512
7513 ;; Modules are either GPLv2+ or GPLv3+.
7514 (license license:gpl3+)))
7515
7516 (define-public python2-debian
7517 (package-with-python2 python-debian))
7518
7519 (define-public python-nbformat
7520 (package
7521 (name "python-nbformat")
7522 (version "4.4.0")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "nbformat" version))
7527 (sha256
7528 (base32
7529 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7530 (build-system python-build-system)
7531 (arguments `(#:tests? #f)) ; no test target
7532 (propagated-inputs
7533 `(("python-ipython-genutils" ,python-ipython-genutils)
7534 ("python-jsonschema" ,python-jsonschema)
7535 ("python-jupyter-core" ,python-jupyter-core)
7536 ("python-traitlets" ,python-traitlets)))
7537 (home-page "http://jupyter.org")
7538 (synopsis "Jupyter Notebook format")
7539 (description "This package provides the reference implementation of the
7540 Jupyter Notebook format and Python APIs for working with notebooks.")
7541 (license license:bsd-3)))
7542
7543 (define-public python2-nbformat
7544 (package-with-python2 python-nbformat))
7545
7546 (define-public python-bleach
7547 (package
7548 (name "python-bleach")
7549 (version "1.4.3")
7550 (source
7551 (origin
7552 (method url-fetch)
7553 (uri (pypi-uri "bleach" version))
7554 (sha256
7555 (base32
7556 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7557 (build-system python-build-system)
7558 (propagated-inputs
7559 `(("python-html5lib" ,python-html5lib-0.9)
7560 ("python-six" ,python-six)))
7561 (native-inputs
7562 `(("python-nose" ,python-nose)))
7563 (home-page "https://github.com/jsocol/bleach")
7564 (synopsis "Whitelist-based HTML-sanitizing tool")
7565 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7566 (license license:asl2.0)))
7567
7568 (define-public python2-bleach
7569 (package-with-python2 python-bleach))
7570
7571 (define-public python-entrypoints
7572 (package
7573 (name "python-entrypoints")
7574 (version "0.3")
7575 (source
7576 (origin
7577 (method url-fetch)
7578 (uri (pypi-uri "entrypoints" version))
7579 (sha256
7580 (base32
7581 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7582 (build-system python-build-system)
7583 ;; The package does not come with a setup.py file, so we have to generate
7584 ;; one ourselves.
7585 (arguments
7586 `(#:tests? #f
7587 #:phases
7588 (modify-phases %standard-phases
7589 (add-after 'unpack 'create-setup.py
7590 (lambda _
7591 (call-with-output-file "setup.py"
7592 (lambda (port)
7593 (format port "\
7594 from setuptools import setup
7595 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7596 " ,version))))))))
7597 (home-page "https://github.com/takluyver/entrypoints")
7598 (synopsis "Discover and load entry points from installed Python packages")
7599 (description "Entry points are a way for Python packages to advertise
7600 objects with some common interface. The most common examples are
7601 @code{console_scripts} entry points, which define shell commands by
7602 identifying a Python function to run. The @code{entrypoints} module contains
7603 functions to find and load entry points.")
7604 (license license:expat)))
7605
7606 (define-public python2-entrypoints
7607 (package-with-python2 python-entrypoints))
7608
7609 (define-public python-nbconvert
7610 (package
7611 (name "python-nbconvert")
7612 (version "5.0.0b1")
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "nbconvert" version))
7617 (sha256
7618 (base32
7619 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7620 (build-system python-build-system)
7621 (arguments
7622 `(;; The "bdist_egg" target is disabled by default, causing the installation
7623 ;; to fail.
7624 #:configure-flags (list "bdist_egg")
7625 ;; FIXME: 5 failures, 40 errors.
7626 #:tests? #f))
7627 ;; #:phases
7628 ;; (modify-phases %standard-phases
7629 ;; (replace 'check
7630 ;; (lambda _
7631 ;; (zero? (system* "py.test" "-v")))))
7632 (native-inputs
7633 `(("python-pytest" ,python-pytest)))
7634 (propagated-inputs
7635 `(("python-bleach" ,python-bleach)
7636 ("python-entrypoints" ,python-entrypoints)
7637 ("python-jinja2" ,python-jinja2)
7638 ("python-jupyter-core" ,python-jupyter-core)
7639 ("python-mistune" ,python-mistune)
7640 ("python-nbformat" ,python-nbformat)
7641 ("python-pygments" ,python-pygments)
7642 ("python-traitlets" ,python-traitlets)))
7643 (home-page "http://jupyter.org")
7644 (synopsis "Converting Jupyter Notebooks")
7645 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7646 notebooks to various other formats via Jinja templates. It allows you to
7647 convert an @code{.ipynb} notebook file into various static formats including:
7648
7649 @enumerate
7650 @item HTML
7651 @item LaTeX
7652 @item PDF
7653 @item Reveal JS
7654 @item Markdown (md)
7655 @item ReStructured Text (rst)
7656 @item executable script
7657 @end enumerate\n")
7658 (license license:bsd-3)))
7659
7660 (define-public python2-nbconvert
7661 (package-with-python2 python-nbconvert))
7662
7663 (define-public python-notebook
7664 (package
7665 (name "python-notebook")
7666 (version "5.7.4")
7667 (source (origin
7668 (method url-fetch)
7669 (uri (pypi-uri "notebook" version))
7670 (sha256
7671 (base32
7672 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7673 (build-system python-build-system)
7674 (arguments
7675 `(#:phases
7676 (modify-phases %standard-phases
7677 (replace 'check
7678 (lambda _
7679 ;; These tests require a browser
7680 (delete-file-recursively "notebook/tests/selenium")
7681 ;; Some tests need HOME
7682 (setenv "HOME" "/tmp")
7683 ;; This file contains "warningfilters", which are not supported
7684 ;; by this version of nose.
7685 (delete-file "setup.cfg")
7686 (with-directory-excursion "/tmp"
7687 (invoke "nosetests" "-v"))
7688 #t)))))
7689 (propagated-inputs
7690 `(("python-jupyter-core" ,python-jupyter-core)
7691 ("python-nbformat" ,python-nbformat)
7692 ("python-nbconvert" ,python-nbconvert)
7693 ("python-prometheus-client" ,python-prometheus-client)
7694 ("python-send2trash" ,python-send2trash)
7695 ("python-terminado" ,python-terminado)))
7696 (native-inputs
7697 `(("python-nose" ,python-nose)
7698 ("python-sphinx" ,python-sphinx)
7699 ("python-requests" ,python-requests)))
7700 (home-page "http://jupyter.org/")
7701 (synopsis "Web-based notebook environment for interactive computing")
7702 (description
7703 "The Jupyter HTML notebook is a web-based notebook environment for
7704 interactive computing.")
7705 (properties `((python2-variant . ,(delay python2-notebook))))
7706 (license license:bsd-3)))
7707
7708 (define-public python2-notebook
7709 (let ((base (package-with-python2
7710 (strip-python2-variant python-notebook))))
7711 (package (inherit base)
7712 (native-inputs
7713 `(("python2-mock" ,python2-mock)
7714 ,@(package-native-inputs base)))
7715 (arguments
7716 (substitute-keyword-arguments (package-arguments base)
7717 ((#:phases phases)
7718 `(modify-phases ,phases
7719 (add-before 'check 'disable-test-case
7720 ;; The test requires network access to localhost. Curiously it
7721 ;; fails with Python 2 only. Simply make the test-case return
7722 ;; immediately.
7723 (lambda _
7724 (substitute*
7725 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7726 (("formats = self.nbconvert_api") "return #")))))))))))
7727
7728 (define-public python-widgetsnbextension
7729 (package
7730 (name "python-widgetsnbextension")
7731 (version "3.4.2")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "widgetsnbextension" version))
7736 (sha256
7737 (base32
7738 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7739 (build-system python-build-system)
7740 (propagated-inputs
7741 `(("python-ipykernel" ,python-ipykernel)
7742 ("python-notebook" ,python-notebook)))
7743 (native-inputs
7744 `(("python-certifi" ,python-certifi)
7745 ("python-nose" ,python-nose)))
7746 (home-page "https://ipython.org")
7747 (synopsis "IPython HTML widgets for Jupyter")
7748 (description "This package provides interactive HTML widgets for Jupyter
7749 notebooks.")
7750 (license license:bsd-3)))
7751
7752 (define-public python2-widgetsnbextension
7753 (package-with-python2 python-widgetsnbextension))
7754
7755 (define-public python-ipywidgets
7756 (package
7757 (name "python-ipywidgets")
7758 (version "5.2.2")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "ipywidgets" version))
7763 (sha256
7764 (base32
7765 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7766 (build-system python-build-system)
7767 (propagated-inputs
7768 `(("python-ipython" ,python-ipython)
7769 ("python-traitlets" ,python-traitlets)
7770 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7771 (native-inputs
7772 `(("python-nose" ,python-nose)
7773 ("python-pytest" ,python-pytest)))
7774 (home-page "https://ipython.org")
7775 (synopsis "IPython HTML widgets for Jupyter")
7776 (description "Ipywidgets are interactive HTML widgets for Jupyter
7777 notebooks and the IPython kernel. Notebooks come alive when interactive
7778 widgets are used. Users gain control of their data and can visualize changes
7779 in the data.")
7780 (license license:bsd-3)))
7781
7782 (define-public python2-ipywidgets
7783 (package-with-python2 python-ipywidgets))
7784
7785 (define-public python-jupyter-console
7786 (package
7787 (name "python-jupyter-console")
7788 (version "6.0.0")
7789 (source
7790 (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "jupyter_console" version))
7793 (sha256
7794 (base32
7795 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7796 (build-system python-build-system)
7797 (propagated-inputs
7798 `(("python-ipykernel" ,python-ipykernel)
7799 ("python-jupyter-client" ,python-jupyter-client)
7800 ("python-prompt-toolkit" ,python-prompt-toolkit)
7801 ("python-pygments" ,python-pygments)))
7802 (native-inputs
7803 `(("python-nose" ,python-nose)))
7804 (home-page "https://jupyter.org")
7805 (synopsis "Jupyter terminal console")
7806 (description "This package provides a terminal-based console frontend for
7807 Jupyter kernels. It also allows for console-based interaction with non-Python
7808 Jupyter kernels such as IJulia and IRKernel.")
7809 (license license:bsd-3)))
7810
7811 (define-public python2-jupyter-console
7812 (package
7813 (name "python2-jupyter-console")
7814 (version "5.2.0")
7815 (source
7816 (origin
7817 (method url-fetch)
7818 (uri (pypi-uri "jupyter_console" version))
7819 (sha256
7820 (base32
7821 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7822 (build-system python-build-system)
7823 ;; Tests only run in an TTY.
7824 (arguments `(#:tests? #f))
7825 (propagated-inputs
7826 `(("python2-ipykernel" ,python2-ipykernel)
7827 ("python2-jupyter-client" ,python2-jupyter-client)
7828 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7829 ("python2-pygments" ,python2-pygments)))
7830 (native-inputs
7831 `(("python2-nose" ,python2-nose)))
7832 (home-page "https://jupyter.org")
7833 (synopsis "Jupyter terminal console")
7834 (description "This package provides a terminal-based console frontend for
7835 Jupyter kernels. It also allows for console-based interaction with non-Python
7836 Jupyter kernels such as IJulia and IRKernel.")
7837 (license license:bsd-3)))
7838
7839 ;; The python-ipython and python-jupyter-console require each other. To get
7840 ;; the functionality in both packages working, strip down the
7841 ;; python-jupyter-console package when using it as an input to python-ipython.
7842 (define python-jupyter-console-minimal
7843 (package
7844 (inherit python-jupyter-console)
7845 (name "python-jupyter-console-minimal")
7846 (arguments
7847 (substitute-keyword-arguments
7848 (package-arguments python-jupyter-console)
7849 ((#:phases phases)
7850 `(modify-phases ,phases
7851 (add-after 'install 'delete-bin
7852 (lambda* (#:key outputs #:allow-other-keys)
7853 ;; Delete the bin files, to avoid conflicts in profiles
7854 ;; where python-ipython and python-jupyter-console are
7855 ;; both present.
7856 (delete-file-recursively
7857 (string-append
7858 (assoc-ref outputs "out") "/bin"))))))))
7859 ;; Remove the python-ipython propagated input, to avoid the cycle
7860 (propagated-inputs
7861 (alist-delete
7862 "python-ipython"
7863 (package-propagated-inputs python-jupyter-console)))))
7864
7865 (define-public python-qtconsole
7866 (package
7867 (name "python-qtconsole")
7868 (version "4.4.3")
7869 (source
7870 (origin
7871 (method url-fetch)
7872 (uri (pypi-uri "qtconsole" version))
7873 (sha256
7874 (base32
7875 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7876 (build-system python-build-system)
7877 (arguments
7878 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7879 ;; but we only have the LTS version 5.x. This means that there might be
7880 ;; runtime errors, but since this is a dependency of the Jupyter package,
7881 ;; and Jupyter can be used without the qtconsole we can overlook this for
7882 ;; now.
7883 `(#:tests? #f
7884 #:phases
7885 (modify-phases %standard-phases
7886 (add-before 'check 'pre-check
7887 (lambda _
7888 (setenv "QT_QPA_PLATFORM" "offscreen")
7889 #t)))))
7890 (propagated-inputs
7891 `(("python-ipykernel" ,python-ipykernel)
7892 ("python-ipython" ,python-ipython)))
7893 (native-inputs
7894 `(("python-pytest" ,python-pytest)))
7895 (home-page "http://jupyter.org")
7896 (synopsis "Jupyter Qt console")
7897 (description "This package provides a Qt-based console for Jupyter with
7898 support for rich media output.")
7899 (license license:bsd-3)))
7900
7901 (define-public jupyter
7902 (package
7903 (name "jupyter")
7904 (version "1.0.0")
7905 (source
7906 (origin
7907 (method url-fetch)
7908 (uri (pypi-uri "jupyter" version))
7909 (sha256
7910 (base32
7911 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7912 (build-system python-build-system)
7913 (arguments '(#:tests? #f)) ; there are none.
7914 (propagated-inputs
7915 `(("python-ipykernel" ,python-ipykernel)
7916 ("python-ipywidgets" ,python-ipywidgets)
7917 ("python-jupyter-console" ,python-jupyter-console)
7918 ("python-nbconvert" ,python-nbconvert)
7919 ("python-notebook" ,python-notebook)
7920 ("python-qtconsole" ,python-qtconsole)))
7921 (native-search-paths
7922 (list (search-path-specification
7923 (variable "JUPYTER_PATH")
7924 (files '("share/jupyter")))))
7925 (home-page "https://jupyter.org")
7926 (synopsis "Web application for interactive documents")
7927 (description
7928 "The Jupyter Notebook is a web application that allows you to create and
7929 share documents that contain live code, equations, visualizations and
7930 explanatory text. Uses include: data cleaning and transformation, numerical
7931 simulation, statistical modeling, machine learning and much more.")
7932 (license license:bsd-3)))
7933
7934 (define-public python-chardet
7935 (package
7936 (name "python-chardet")
7937 (version "3.0.4")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "chardet" version))
7942 (sha256
7943 (base32
7944 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7945 (native-inputs
7946 `(("python-hypothesis" ,python-hypothesis)
7947 ("python-pytest" ,python-pytest)
7948 ("python-pytest-runner" ,python-pytest-runner)))
7949 (build-system python-build-system)
7950 (home-page "https://github.com/chardet/chardet")
7951 (synopsis "Universal encoding detector for Python 2 and 3")
7952 (description
7953 "This package provides @code{chardet}, a Python module that can
7954 automatically detect a wide range of file encodings.")
7955 (license license:lgpl2.1+)))
7956
7957 (define-public python2-chardet
7958 (package-with-python2 python-chardet))
7959
7960 (define-public python-docopt
7961 (package
7962 (name "python-docopt")
7963 (version "0.6.2")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 ;; The release on PyPI does not include tests.
7968 (uri (string-append
7969 "https://github.com/docopt/docopt/archive/"
7970 version ".tar.gz"))
7971 (file-name (string-append name "-" version ".tar.gz"))
7972 (sha256
7973 (base32
7974 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7975 (build-system python-build-system)
7976 (native-inputs
7977 `(("python-pytest" ,python-pytest)))
7978 (arguments
7979 `(#:phases
7980 (modify-phases %standard-phases
7981 (replace 'check
7982 (lambda _ (invoke "py.test"))))))
7983 (home-page "http://docopt.org")
7984 (synopsis "Command-line interface description language for Python")
7985 (description "This library allows the user to define a command-line
7986 interface from a program's help message rather than specifying it
7987 programmatically with command-line parsers like @code{getopt} and
7988 @code{argparse}.")
7989 (license license:expat)))
7990
7991 (define-public python2-docopt
7992 (package-with-python2 python-docopt))
7993
7994 (define-public python-pythondialog
7995 (package
7996 (name "python-pythondialog")
7997 (version "3.4.0")
7998 (source
7999 (origin
8000 (method url-fetch)
8001 (uri (pypi-uri "pythondialog" version))
8002 (sha256
8003 (base32
8004 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8005 (build-system python-build-system)
8006 (arguments
8007 `(#:phases
8008 (modify-phases %standard-phases
8009 (add-after 'unpack 'patch-path
8010 (lambda* (#:key inputs #:allow-other-keys)
8011 (let* ((dialog (assoc-ref inputs "dialog")))
8012 ;; Since this library really wants to grovel the search path, we
8013 ;; must hardcode dialog's store path into it.
8014 (substitute* "dialog.py"
8015 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8016 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8017 #t))))
8018 #:tests? #f)) ; no test suite
8019 (propagated-inputs
8020 `(("dialog" ,dialog)))
8021 (home-page "http://pythondialog.sourceforge.net/")
8022 (synopsis "Python interface to the UNIX dialog utility")
8023 (description "A Python wrapper for the dialog utility. Its purpose is to
8024 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8025 This allows one to make simple text-mode user interfaces on Unix-like systems")
8026 (license license:lgpl2.1)
8027 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8028
8029 (define-public python2-pythondialog
8030 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8031 (package
8032 (inherit base)
8033 (version (package-version python-pythondialog))
8034 (source (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "python2-pythondialog" version))
8037 (sha256
8038 (base32
8039 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8040
8041 (define-public python-configobj
8042 (package
8043 (name "python-configobj")
8044 (version "5.0.6")
8045 (source (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "configobj" version))
8048 (sha256
8049 (base32
8050 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8051 ;; Patch setup.py so it looks for python-setuptools, which is
8052 ;; required to parse the keyword 'install_requires' in setup.py.
8053 (patches (search-patches "python-configobj-setuptools.patch"))))
8054 (build-system python-build-system)
8055 (propagated-inputs
8056 `(("python-six" ,python-six)))
8057 (synopsis "Config file reading, writing and validation")
8058 (description "ConfigObj is a simple but powerful config file reader and
8059 writer: an ini file round tripper. Its main feature is that it is very easy to
8060 use, with a straightforward programmer’s interface and a simple syntax for
8061 config files.")
8062 (home-page "https://github.com/DiffSK/configobj")
8063 (license license:bsd-3)))
8064
8065 (define-public python2-configobj
8066 (package-with-python2 python-configobj))
8067
8068 (define-public python-configargparse
8069 (package
8070 (name "python-configargparse")
8071 (version "0.14.0")
8072 (source (origin
8073 (method url-fetch)
8074 (uri (pypi-uri "ConfigArgParse" version))
8075 (sha256
8076 (base32
8077 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8078 (build-system python-build-system)
8079 (native-inputs
8080 `(("python-pyyaml" ,python-pyyaml)))
8081 (arguments
8082 `(#:phases
8083 (modify-phases %standard-phases
8084 (replace 'check
8085 (lambda _
8086 ;; Bypass setuptools-shim because one test relies on "setup.py"
8087 ;; being the first argument passed to the python call.
8088 ;;
8089 ;; NOTE: Many tests do not run because they rely on Python's
8090 ;; built-in test.test_argparse, but we remove the unit tests from
8091 ;; our Python installation.
8092 (invoke "python" "setup.py" "test"))))))
8093 (synopsis "Replacement for argparse")
8094 (description "A drop-in replacement for argparse that allows options to also
8095 be set via config files and/or environment variables.")
8096 (home-page "https://github.com/bw2/ConfigArgParse")
8097 (license license:expat)))
8098
8099 (define-public python2-configargparse
8100 (package-with-python2 python-configargparse))
8101
8102 (define-public python-argparse-manpage
8103 (package
8104 (name "python-argparse-manpage")
8105 (version "1.1")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "argparse-manpage" version))
8110 (sha256
8111 (base32
8112 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8113 (build-system python-build-system)
8114 (home-page "https://github.com/praiskup/argparse-manpage")
8115 (synopsis "Build manual page from Python's ArgumentParser object")
8116 (description
8117 "This package provides tools to build manual pages from Python's
8118 @code{ArgumentParser} object.")
8119 (license license:asl2.0)))
8120
8121 (define-public python-contextlib2
8122 (package
8123 (name "python-contextlib2")
8124 (version "0.5.5")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "contextlib2" version))
8129 (sha256
8130 (base32
8131 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8132 (build-system python-build-system)
8133 (home-page "http://contextlib2.readthedocs.org/")
8134 (synopsis "Tools for decorators and context managers")
8135 (description "This module is primarily a backport of the Python
8136 3.2 contextlib to earlier Python versions. Like contextlib, it
8137 provides utilities for common tasks involving decorators and context
8138 managers. It also contains additional features that are not part of
8139 the standard library.")
8140 (license license:psfl)))
8141
8142 (define-public python2-contextlib2
8143 (package
8144 (name "python2-contextlib2")
8145 (version "0.5.5")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "contextlib2" version))
8150 (sha256
8151 (base32
8152 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8153 (build-system python-build-system)
8154 (arguments
8155 `(#:python ,python-2
8156 #:phases
8157 (modify-phases %standard-phases
8158 (replace 'check
8159 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8160 (native-inputs
8161 `(("python2-unittest2" ,python2-unittest2)))
8162 (home-page "http://contextlib2.readthedocs.org/")
8163 (synopsis "Tools for decorators and context managers")
8164 (description "This module is primarily a backport of the Python
8165 3.2 contextlib to earlier Python versions. Like contextlib, it
8166 provides utilities for common tasks involving decorators and context
8167 managers. It also contains additional features that are not part of
8168 the standard library.")
8169 (license license:psfl)))
8170
8171 (define-public python-texttable
8172 (package
8173 (name "python-texttable")
8174 (version "0.9.1")
8175 (source
8176 (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "texttable" version))
8179 (sha256
8180 (base32
8181 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8182 (build-system python-build-system)
8183 (arguments '(#:tests? #f)) ; no tests
8184 (home-page "https://github.com/foutaise/texttable/")
8185 (synopsis "Python module for creating simple ASCII tables")
8186 (description "Texttable is a Python module for creating simple ASCII
8187 tables.")
8188 (license license:lgpl2.1+)))
8189
8190 (define-public python2-texttable
8191 (package-with-python2 python-texttable))
8192
8193 (define-public python-atomicwrites
8194 (package
8195 (name "python-atomicwrites")
8196 (version "1.1.5")
8197 (source (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "atomicwrites" version))
8200 (sha256
8201 (base32
8202 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8203 (build-system python-build-system)
8204 (synopsis "Atomic file writes in Python")
8205 (description "Library for atomic file writes using platform dependent tools
8206 for atomic file system operations.")
8207 (home-page "https://github.com/untitaker/python-atomicwrites")
8208 (license license:expat)))
8209
8210 (define-public python2-atomicwrites
8211 (package-with-python2 python-atomicwrites))
8212
8213 (define-public python-click-threading
8214 (package
8215 (name "python-click-threading")
8216 (version "0.4.4")
8217 (source (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "click-threading" version))
8220 (sha256
8221 (base32
8222 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8223 (build-system python-build-system)
8224 (propagated-inputs
8225 `(("python-click" ,python-click)))
8226 (synopsis "Utilities for multithreading in Click")
8227 (description "This package provides utilities for multithreading in Click
8228 applications.")
8229 (home-page "https://github.com/click-contrib/click-threading")
8230 (license license:expat)))
8231
8232 (define-public python-click-log
8233 (package
8234 (name "python-click-log")
8235 (version "0.3.2")
8236 (source (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "click-log" version))
8239 (sha256
8240 (base32
8241 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8242 (build-system python-build-system)
8243 (propagated-inputs
8244 `(("python-click" ,python-click)))
8245 (synopsis "Logging for click applications")
8246 (description "This package provides a Python library for logging Click
8247 applications.")
8248 (home-page "https://github.com/click-contrib/click-log")
8249 (license license:expat)))
8250
8251 (define-public python-apipkg
8252 (package
8253 (name "python-apipkg")
8254 (version "1.4")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "apipkg" version))
8258 (sha256
8259 (base32
8260 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8261 (build-system python-build-system)
8262 (native-inputs
8263 `(("python-pytest" ,python-pytest)))
8264 (synopsis "Namespace control and lazy-import mechanism")
8265 (description "With apipkg you can control the exported namespace of a Python
8266 package and greatly reduce the number of imports for your users. It is a small
8267 pure Python module that works on virtually all Python versions.")
8268 (home-page "https://github.com/pytest-dev/apipkg")
8269 (license license:expat)))
8270
8271 (define-public python2-apipkg
8272 (package-with-python2 python-apipkg))
8273
8274 (define-public python-execnet
8275 (package
8276 (name "python-execnet")
8277 (version "1.4.1")
8278 (source (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "execnet" version))
8281 (sha256
8282 (base32
8283 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8284 (build-system python-build-system)
8285 (arguments
8286 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8287 ;; The two test failures are caused by the lack of an `ssh` executable.
8288 ;; The test suite can be run with pytest after the 'install' phase.
8289 #:tests? #f))
8290 (native-inputs
8291 `(("python-pytest" ,python-pytest)
8292 ("python-setuptools-scm" ,python-setuptools-scm)))
8293 (propagated-inputs
8294 `(("python-apipkg" ,python-apipkg)))
8295 (synopsis "Rapid multi-Python deployment")
8296 (description "Execnet provides a share-nothing model with
8297 channel-send/receive communication for distributing execution across many
8298 Python interpreters across version, platform and network barriers. It has a
8299 minimal and fast API targeting the following uses:
8300 @enumerate
8301 @item distribute tasks to (many) local or remote CPUs
8302 @item write and deploy hybrid multi-process applications
8303 @item write scripts to administer multiple environments
8304 @end enumerate")
8305 (home-page "http://codespeak.net/execnet/")
8306 (license license:expat)))
8307
8308 (define-public python2-execnet
8309 (package-with-python2 python-execnet))
8310
8311 (define-public python-icalendar
8312 (package
8313 (name "python-icalendar")
8314 (version "4.0.3")
8315 (source (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "icalendar" version))
8318 (sha256
8319 (base32
8320 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8321 (build-system python-build-system)
8322 (propagated-inputs
8323 `(("python-dateutil" ,python-dateutil)
8324 ("python-pytz" ,python-pytz)))
8325 (synopsis "Python library for parsing iCalendar files")
8326 (description "The icalendar package is a parser/generator of iCalendar
8327 files for use with Python.")
8328 (home-page "https://github.com/collective/icalendar")
8329 (license license:bsd-2)))
8330
8331 (define-public python-args
8332 (package
8333 (name "python-args")
8334 (version "0.1.0")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "args" version))
8338 (sha256
8339 (base32
8340 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8341 (build-system python-build-system)
8342 (home-page "https://github.com/kennethreitz/args")
8343 (synopsis "Command-line argument parser")
8344 (description
8345 "This library provides a Python module to parse command-line arguments.")
8346 (license license:bsd-3)))
8347
8348 (define-public python2-args
8349 (package-with-python2 python-args))
8350
8351 (define-public python-clint
8352 (package
8353 (name "python-clint")
8354 (version "0.5.1")
8355 (source (origin
8356 (method url-fetch)
8357 (uri (pypi-uri "clint" version))
8358 (sha256
8359 (base32
8360 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8361 (build-system python-build-system)
8362 (arguments
8363 '(#:phases
8364 (modify-phases %standard-phases
8365 (replace 'check
8366 (lambda _ (invoke "py.test" "-v"))))))
8367 (native-inputs
8368 `(("python-pytest" ,python-pytest)))
8369 (propagated-inputs
8370 `(("python-args" ,python-args)))
8371 (home-page "https://github.com/kennethreitz/clint")
8372 (synopsis "Command-line interface tools")
8373 (description
8374 "Clint is a Python module filled with a set of tools for developing
8375 command-line applications, including tools for colored and indented
8376 output, progress bar display, and pipes.")
8377 (license license:isc)))
8378
8379 (define-public python2-clint
8380 (package-with-python2 python-clint))
8381
8382 (define-public python-rply
8383 (package
8384 (name "python-rply")
8385 (version "0.7.5")
8386 (source (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "rply" version))
8389 (sha256
8390 (base32
8391 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8392 (build-system python-build-system)
8393 (propagated-inputs
8394 `(("python-appdirs" ,python-appdirs)))
8395 (home-page "https://github.com/alex/rply")
8396 (synopsis "Parser generator for Python")
8397 (description
8398 "This package provides a pure Python based parser generator, that also
8399 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8400 with a new public API, and RPython support.")
8401 (license license:bsd-3)))
8402
8403 (define-public python2-rply
8404 (package-with-python2 python-rply))
8405
8406 (define-public python-hy
8407 (package
8408 (name "python-hy")
8409 (version "0.13.0")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "hy" version))
8413 (sha256
8414 (base32
8415 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8416 (build-system python-build-system)
8417 (arguments
8418 '(#:phases
8419 (modify-phases %standard-phases
8420 (replace 'check
8421 (lambda _
8422 ;; Tests require write access to HOME.
8423 (setenv "HOME" "/tmp")
8424 (invoke "nosetests"))))))
8425 (native-inputs
8426 `(("python-coverage" ,python-coverage)
8427 ("python-nose" ,python-nose)))
8428 (propagated-inputs
8429 `(("python-astor" ,python-astor)
8430 ("python-clint" ,python-clint)
8431 ("python-rply" ,python-rply)))
8432 (home-page "http://hylang.org/")
8433 (synopsis "Lisp frontend to Python")
8434 (description
8435 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8436 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8437 Python at your fingertips, in Lisp form.")
8438 (license license:expat)))
8439
8440 (define-public python2-hy
8441 (package-with-python2 python-hy))
8442
8443 (define-public python2-functools32
8444 (package
8445 (name "python2-functools32")
8446 (version "3.2.3-2")
8447 (source
8448 (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "functools32" version))
8451 (sha256
8452 (base32
8453 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8454 (build-system python-build-system)
8455 (arguments
8456 `(#:python ,python-2
8457 #:tests? #f)) ; no test target
8458 (home-page "https://github.com/MiCHiLU/python-functools32")
8459 (synopsis
8460 "Backport of the functools module from Python 3.2.3")
8461 (description
8462 "This package is a backport of the @code{functools} module from Python
8463 3.2.3 for use with older versions of Python and PyPy.")
8464 (license license:expat)))
8465
8466 (define-public python2-subprocess32
8467 (package
8468 (name "python2-subprocess32")
8469 (version "3.2.7")
8470 (source (origin
8471 (method url-fetch)
8472 (uri (pypi-uri "subprocess32" version))
8473 (sha256
8474 (base32
8475 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8476 (patches
8477 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8478 (build-system python-build-system)
8479 (arguments
8480 `(#:python ,python-2
8481 ;; The test suite fails with Python > 2.7.13:
8482 ;; import test.support
8483 ;; ImportError: No module named support
8484 #:tests? #f
8485 #:phases
8486 (modify-phases %standard-phases
8487 (add-after 'unpack 'patch-/bin/sh
8488 (lambda _
8489 (substitute* '("subprocess32.py"
8490 "test_subprocess32.py")
8491 (("/bin/sh") (which "sh")))
8492 #t)))))
8493 (home-page "https://github.com/google/python-subprocess32")
8494 (synopsis "Backport of the subprocess module from Python 3.2")
8495 (description
8496 "This is a backport of the @code{subprocess} standard library module
8497 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8498 new features. On POSIX systems it is guaranteed to be reliable when used
8499 in threaded applications. It includes timeout support from Python 3.3 but
8500 otherwise matches 3.2’s API.")
8501 (license license:psfl)))
8502
8503 (define-public python2-futures
8504 (package
8505 (name "python2-futures")
8506 (version "3.2.0")
8507 (source
8508 (origin
8509 (method url-fetch)
8510 (uri (pypi-uri "futures" version))
8511 (sha256
8512 (base32
8513 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8514 (build-system python-build-system)
8515 (arguments `(#:python ,python-2
8516 ;; FIXME: Python 2.7.14 moved the test.support library,
8517 ;; but our package has not yet been adjusted. Enable
8518 ;; tests when the python2 package has been fixed.
8519 #:tests? #f))
8520 (home-page "https://github.com/agronholm/pythonfutures")
8521 (synopsis
8522 "Backport of the concurrent.futures package from Python 3.2")
8523 (description
8524 "The concurrent.futures module provides a high-level interface for
8525 asynchronously executing callables. This package backports the
8526 concurrent.futures package from Python 3.2")
8527 (license license:bsd-3)))
8528
8529 (define-public python-promise
8530 (package
8531 (name "python-promise")
8532 (version "0.4.2")
8533 (source
8534 (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "promise" version))
8537 (sha256
8538 (base32
8539 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8540 (build-system python-build-system)
8541 ;; Tests wants python-futures, which is a python2 only program, and
8542 ;; can't be found by python-promise at test time.
8543 (arguments `(#:tests? #f))
8544 (home-page "https://github.com/syrusakbary/promise")
8545 (synopsis "Promises/A+ implementation for Python")
8546 (description
8547 "Promises/A+ implementation for Python")
8548 (properties `((python2-variant . ,(delay python2-promise))))
8549 (license license:expat)))
8550
8551 (define-public python2-promise
8552 (let ((promise (package-with-python2
8553 (strip-python2-variant python-promise))))
8554 (package (inherit promise)
8555 (arguments (substitute-keyword-arguments (package-arguments promise)
8556 ((#:tests? _) #t)))
8557 (native-inputs
8558 `(("python2-futures" ,python2-futures)
8559 ("python2-pytest" ,python2-pytest)
8560 ,@(package-native-inputs promise))))))
8561
8562 (define-public python-progressbar33
8563 (package
8564 (name "python-progressbar33")
8565 (version "2.4")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "progressbar33" version))
8570 (sha256
8571 (base32
8572 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8573 (build-system python-build-system)
8574 (home-page "http://github.com/germangh/python-progressbar")
8575 (synopsis "Text progress bar library for Python")
8576 (description
8577 "This package provides a text progress bar library for Python. This
8578 version only differs from the original @code{progressbar} package in that it
8579 uses relative package imports instead of absolute imports, which is necessary
8580 for the module to work under Python 3.3.")
8581 ;; Either or both of these licenses may be selected.
8582 (license (list license:lgpl2.1+ license:bsd-3))))
8583
8584 (define-public python-colorama
8585 (package
8586 (name "python-colorama")
8587 (version "0.3.9")
8588 (source
8589 (origin
8590 (method url-fetch)
8591 (uri (pypi-uri "colorama" version))
8592 (sha256
8593 (base32
8594 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8595 (build-system python-build-system)
8596 (synopsis "Colored terminal text rendering for Python")
8597 (description "Colorama is a Python library for rendering colored terminal
8598 text.")
8599 (home-page "https://pypi.python.org/pypi/colorama")
8600 (license license:bsd-3)))
8601
8602 (define-public python2-colorama
8603 (package-with-python2 python-colorama))
8604
8605 (define-public python-rsa
8606 (package
8607 (name "python-rsa")
8608 (version "3.4.2")
8609 (source
8610 (origin
8611 (method url-fetch)
8612 (uri (pypi-uri "rsa" version))
8613 (sha256
8614 (base32
8615 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8616 (build-system python-build-system)
8617 (propagated-inputs
8618 `(("python-pyasn1" ,python-pyasn1)))
8619 (synopsis "Pure-Python RSA implementation")
8620 (description "Python-RSA is a pure-Python RSA implementation. It supports
8621 encryption and decryption, signing and verifying signatures, and key
8622 generation according to PKCS#1 version 1.5. It can be used as a Python
8623 library as well as on the command line.")
8624 (home-page "https://stuvel.eu/rsa")
8625 (license license:asl2.0)))
8626
8627 (define-public python2-rsa
8628 (package-with-python2 python-rsa))
8629
8630 (define-public python-pluggy
8631 (package
8632 (name "python-pluggy")
8633 (version "0.7.1")
8634 (source
8635 (origin
8636 (method url-fetch)
8637 (uri (pypi-uri "pluggy" version))
8638 (sha256
8639 (base32
8640 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8641 (build-system python-build-system)
8642 (native-inputs
8643 `(("python-setuptools-scm" ,python-setuptools-scm)))
8644 (synopsis "Plugin and hook calling mechanism for Python")
8645 (description "Pluggy is an extraction of the plugin manager as used by
8646 Pytest but stripped of Pytest specific details.")
8647 (home-page "https://pypi.python.org/pypi/pluggy")
8648 (license license:expat)))
8649
8650 (define-public python2-pluggy
8651 (package-with-python2 python-pluggy))
8652
8653 (define-public python-tox
8654 (package
8655 (name "python-tox")
8656 (version "2.8.1")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "tox" version))
8661 (sha256
8662 (base32
8663 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8664 (build-system python-build-system)
8665 (arguments
8666 ;; FIXME: Tests require pytest-timeout, which itself requires
8667 ;; pytest>=2.8.0 for installation.
8668 '(#:tests? #f))
8669 (propagated-inputs
8670 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8671 ("python-py" ,python-py)
8672 ("python-virtualenv" ,python-virtualenv)))
8673 (native-inputs
8674 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8675 ("python-pytest" ,python-pytest) ; >= 2.3.5
8676 ("python-setuptools-scm" ,python-setuptools-scm)))
8677 (home-page "http://tox.testrun.org/")
8678 (synopsis "Virtualenv-based automation of test activities")
8679 (description "Tox is a generic virtualenv management and test command line
8680 tool. It can be used to check that a package installs correctly with
8681 different Python versions and interpreters, or run tests in each type of
8682 supported environment, or act as a frontend to continuous integration
8683 servers.")
8684 (license license:expat)))
8685
8686 (define-public python2-tox
8687 (package-with-python2 python-tox))
8688
8689 (define-public python-jmespath
8690 (package
8691 (name "python-jmespath")
8692 (version "0.9.3")
8693 (source
8694 (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "jmespath" version))
8697 (sha256
8698 (base32
8699 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8700 (build-system python-build-system)
8701 (native-inputs
8702 `(("python-nose" ,python-nose)))
8703 (synopsis "JSON Matching Expressions")
8704 (description "JMESPath (pronounced “james path”) is a Python library that
8705 allows one to declaratively specify how to extract elements from a JSON
8706 document.")
8707 (home-page "https://github.com/jmespath/jmespath.py")
8708 (license license:expat)))
8709
8710 (define-public python2-jmespath
8711 (package-with-python2 python-jmespath))
8712
8713 (define-public python-botocore
8714 (package
8715 (name "python-botocore")
8716 (version "1.12.149")
8717 (source
8718 (origin
8719 (method url-fetch)
8720 (uri (pypi-uri "botocore" version))
8721 (sha256
8722 (base32
8723 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8724 (build-system python-build-system)
8725 (arguments
8726 ;; FIXME: Many tests are failing.
8727 '(#:tests? #f))
8728 (propagated-inputs
8729 `(("python-dateutil" ,python-dateutil)
8730 ("python-docutils" ,python-docutils)
8731 ("python-jmespath" ,python-jmespath)))
8732 (native-inputs
8733 `(("python-mock" ,python-mock)
8734 ("python-nose" ,python-nose)
8735 ("behave" ,behave)
8736 ("python-tox" ,python-tox)
8737 ("python-urllib3" ,python-urllib3)
8738 ("python-wheel" ,python-wheel)))
8739 (home-page "https://github.com/boto/botocore")
8740 (synopsis "Low-level interface to AWS")
8741 (description "Botocore is a Python library that provides a low-level
8742 interface to the Amazon Web Services (AWS) API.")
8743 (license license:asl2.0)))
8744
8745 (define-public python2-botocore
8746 (package-with-python2 python-botocore))
8747
8748 (define-public python-xdo
8749 (package
8750 (name "python-xdo")
8751 (version "0.3")
8752 (source (origin
8753 (method url-fetch)
8754 (uri (string-append
8755 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8756 "python-xdo_" version ".orig.tar.gz"))
8757 (sha256
8758 (base32
8759 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8760 (build-system python-build-system)
8761 (arguments
8762 '(#:phases
8763 (modify-phases %standard-phases
8764 (add-before 'install 'patch-libxdo-path
8765 ;; Hardcode the path of dynamically loaded libxdo library.
8766 (lambda* (#:key inputs #:allow-other-keys)
8767 (let ((libxdo (string-append
8768 (assoc-ref inputs "xdotool")
8769 "/lib/libxdo.so")))
8770 (substitute* "xdo/_xdo.py"
8771 (("find_library\\(\"xdo\"\\)")
8772 (simple-format #f "\"~a\"" libxdo)))
8773 #t))))
8774 #:tests? #f)) ; no tests provided
8775 (propagated-inputs
8776 `(("python-six" ,python-six)))
8777 (inputs
8778 `(("xdotool" ,xdotool)
8779 ("libX11" ,libx11)))
8780 (home-page "https://tracker.debian.org/pkg/python-xdo")
8781 (synopsis "Python library for simulating X11 keyboard/mouse input")
8782 (description "Provides bindings to libxdo for manipulating X11 via simulated
8783 input. (Note that this is mostly a legacy library; you may wish to look at
8784 python-xdo for newer bindings.)")
8785 (license license:bsd-3)))
8786
8787 (define-public python2-xdo
8788 (package-with-python2 python-xdo))
8789
8790 (define-public python-mako
8791 (package
8792 (name "python-mako")
8793 (version "1.0.14")
8794 (source
8795 (origin
8796 (method url-fetch)
8797 (uri (pypi-uri "Mako" version))
8798 (sha256
8799 (base32
8800 "0jvznnyidyva7n7jw7pm42qpwxlhz5pjk2x6camnk4k9qpc459pm"))))
8801 (build-system python-build-system)
8802 (propagated-inputs
8803 `(("python-markupsafe" ,python-markupsafe)))
8804 (native-inputs
8805 `(("python-mock" ,python-mock)
8806 ("python-nose" ,python-nose)
8807 ("python-pytest" ,python-pytest)))
8808 (home-page "https://www.makotemplates.org/")
8809 (synopsis "Templating language for Python")
8810 (description "Mako is a templating language for Python that compiles
8811 templates into Python modules.")
8812 (license license:expat)))
8813
8814 (define-public python2-mako
8815 (package-with-python2 python-mako))
8816
8817 (define-public python-waitress
8818 (package
8819 (name "python-waitress")
8820 (version "1.1.0")
8821 (source
8822 (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "waitress" version))
8825 (patches (search-patches "python-waitress-fix-tests.patch"))
8826 (sha256
8827 (base32
8828 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8829 (build-system python-build-system)
8830 (home-page "https://github.com/Pylons/waitress")
8831 (synopsis "Waitress WSGI server")
8832 (description "Waitress is meant to be a production-quality pure-Python WSGI
8833 server with very acceptable performance.")
8834 (license license:zpl2.1)))
8835
8836 (define-public python2-waitress
8837 (package-with-python2 python-waitress))
8838
8839 (define-public python-pyquery
8840 (package
8841 (name "python-pyquery")
8842 (version "1.2.17")
8843 (source
8844 (origin
8845 (method url-fetch)
8846 (uri (pypi-uri "pyquery" version))
8847 (sha256
8848 (base32
8849 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8850 (build-system python-build-system)
8851 (native-inputs
8852 `(("python-webob" ,python-webob)
8853 ("python-webtest" ,python-webtest)))
8854 (propagated-inputs
8855 `(("python-lxml" ,python-lxml)
8856 ("python-cssselect" ,python-cssselect)))
8857 (home-page "https://github.com/gawel/pyquery")
8858 (synopsis "Make jQuery-like queries on xml documents")
8859 (description "pyquery allows you to make jQuery queries on xml documents.
8860 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8861 fast xml and html manipulation.")
8862 (license license:bsd-3)))
8863
8864 (define-public python-anyjson
8865 (package
8866 (name "python-anyjson")
8867 (version "0.3.3")
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (pypi-uri "anyjson" version))
8872 (sha256
8873 (base32
8874 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8875 (build-system python-build-system)
8876 (arguments
8877 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8878 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8879 ;; whatever) so this transformation needs to be done before the tests
8880 ;; can be run. Maybe we could add a build step to transform beforehand
8881 ;; but it could be annoying/difficult.
8882 ;; We can enable tests for the Python 2 version, though, and do below.
8883 #:tests? #f))
8884 (home-page "https://bitbucket.org/runeh/anyjson/")
8885 (synopsis
8886 "Wraps best available JSON implementation in a common interface")
8887 (description
8888 "Anyjson loads whichever is the fastest JSON module installed
8889 and provides a uniform API regardless of which JSON implementation is used.")
8890 (license license:bsd-3)
8891 (properties `((python2-variant . ,(delay python2-anyjson))))))
8892
8893 (define-public python2-anyjson
8894 (let ((anyjson (package-with-python2
8895 (strip-python2-variant python-anyjson))))
8896 (package
8897 (inherit anyjson)
8898 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8899 #:tests? #t
8900 ,@(package-arguments anyjson)))
8901 (native-inputs `(("python2-nose" ,python2-nose))))))
8902
8903 (define-public python-amqp
8904 (package
8905 (name "python-amqp")
8906 (version "2.3.2")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "amqp" version))
8911 (sha256
8912 (base32
8913 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8914 (build-system python-build-system)
8915 (native-inputs
8916 `(("python-case" ,python-case)
8917 ("python-pytest-sugar" ,python-pytest-sugar)
8918 ("python-mock" ,python-mock)))
8919 (propagated-inputs
8920 `(("python-vine" ,python-vine)))
8921 (home-page "https://github.com/celery/py-amqp")
8922 (synopsis
8923 "Low-level AMQP client for Python (fork of amqplib)")
8924 (description
8925 "This is a fork of amqplib which was originally written by Barry Pederson.
8926 It is maintained by the Celery project, and used by kombu as a pure python
8927 alternative when librabbitmq is not available.")
8928 (license license:lgpl2.1+)
8929 (properties `((python2-variant . ,(delay python2-amqp))))))
8930
8931 (define-public python2-amqp
8932 (let ((amqp (package-with-python2
8933 (strip-python2-variant python-amqp))))
8934 (package
8935 (inherit amqp)
8936 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8937 ;; unmaintained. Weirdly, does not do this on the python 3
8938 ;; version?
8939 #:tests? #f
8940 ,@(package-arguments amqp))))))
8941
8942 (define-public python-txamqp
8943 (package
8944 (name "python-txamqp")
8945 (version "0.8.2")
8946 (source
8947 (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "txAMQP" version))
8950 (sha256
8951 (base32
8952 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8953 (build-system python-build-system)
8954 (propagated-inputs
8955 `(("python-six" ,python-six)
8956 ("python-twisted" ,python-twisted)))
8957 (home-page "https://github.com/txamqp/txamqp")
8958 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8959 (description
8960 "This package provides a Python library for communicating with AMQP peers
8961 and brokers using the asynchronous networking framework Twisted. It contains
8962 all the necessary code to connect, send and receive messages to/from an
8963 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8964 also includes support for using Thrift RPC over AMQP in Twisted
8965 applications.")
8966 (license license:asl2.0)))
8967
8968 (define-public python2-txamqp
8969 (package-with-python2 python-txamqp))
8970
8971 (define-public python-kombu
8972 (package
8973 (name "python-kombu")
8974 (version "4.2.2")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "kombu" version))
8979 (sha256
8980 (base32
8981 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8982 (build-system python-build-system)
8983 (native-inputs
8984 `(("python-mock" ,python-mock)
8985 ("python-case" ,python-case)
8986 ("python-pyro4" ,python-pyro4)
8987 ("python-pytest-sugar" ,python-pytest-sugar)
8988 ("python-pytz" ,python-pytz)))
8989 (propagated-inputs
8990 `(("python-anyjson" ,python-anyjson)
8991 ("python-amqp" ,python-amqp)
8992 ("python-redis" ,python-redis)))
8993 (home-page "https://kombu.readthedocs.io")
8994 (synopsis "Message passing library for Python")
8995 (description "The aim of Kombu is to make messaging in Python as easy as
8996 possible by providing an idiomatic high-level interface for the AMQ protocol,
8997 and also provide proven and tested solutions to common messaging problems.
8998 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8999 message orientation, queuing, routing, reliability and security, for which the
9000 RabbitMQ messaging server is the most popular implementation.")
9001 (license license:bsd-3)
9002 (properties `((python2-variant . ,(delay python2-kombu))))))
9003
9004 (define-public python2-kombu
9005 (let ((kombu (package-with-python2
9006 (strip-python2-variant python-kombu))))
9007 (package
9008 (inherit kombu)
9009 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9010 ;; It works fine on the python3 variant.
9011 #:tests? #f
9012 ,@(package-arguments kombu)))
9013 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9014 ,@(package-native-inputs kombu))))))
9015
9016 (define-public python-billiard
9017 (package
9018 (name "python-billiard")
9019 (version "3.5.0.5")
9020 (source
9021 (origin
9022 (method url-fetch)
9023 (uri (pypi-uri "billiard" version))
9024 (sha256
9025 (base32
9026 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9027 (build-system python-build-system)
9028 (native-inputs
9029 `(("python-case" ,python-case)
9030 ("python-pytest" ,python-pytest)))
9031 (home-page "https://github.com/celery/billiard")
9032 (synopsis
9033 "Python multiprocessing fork with improvements and bugfixes")
9034 (description
9035 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9036 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9037 pyprocessing package. This standalone variant is intended to be compatible with
9038 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9039 (license license:bsd-3)
9040 (properties `((python2-variant . ,(delay python2-billiard))))))
9041
9042 (define-public python2-billiard
9043 (let ((billiard (package-with-python2
9044 (strip-python2-variant python-billiard))))
9045 (package
9046 (inherit billiard)
9047 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9048 ("python2-mock" ,python2-mock)
9049 ,@(package-native-inputs billiard))))))
9050
9051 (define-public python-celery
9052 (package
9053 (name "python-celery")
9054 (version "4.2.1")
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "celery" version))
9059 (sha256
9060 (base32
9061 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9062 (build-system python-build-system)
9063 (arguments
9064 '(;; TODO The tests fail with Python 3.7
9065 ;; https://github.com/celery/celery/issues/4849
9066 #:tests? #f
9067 #:phases
9068 (modify-phases %standard-phases
9069 (add-after 'unpack 'patch-requirements
9070 (lambda _
9071 (substitute* "requirements/test.txt"
9072 (("pytest>=3\\.0,<3\\.3")
9073 "pytest>=3.0"))
9074 #t)))))
9075 (native-inputs
9076 `(("python-case" ,python-case)
9077 ("python-pytest" ,python-pytest)))
9078 (propagated-inputs
9079 `(("python-pytz" ,python-pytz)
9080 ("python-billiard" ,python-billiard)
9081 ("python-kombu" ,python-kombu)))
9082 (home-page "https://celeryproject.org")
9083 (synopsis "Distributed Task Queue")
9084 (description "Celery is an asynchronous task queue/job queue based on
9085 distributed message passing. It is focused on real-time operation, but
9086 supports scheduling as well. The execution units, called tasks, are executed
9087 concurrently on a single or more worker servers using multiprocessing,
9088 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9089 synchronously (wait until ready).")
9090 (license license:bsd-3)
9091 (properties `((python2-variant . ,(delay python2-celery))))))
9092
9093 (define-public python2-celery
9094 (let ((celery (package-with-python2
9095 (strip-python2-variant python-celery))))
9096 (package
9097 (inherit celery)
9098 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9099 ("python2-mock" ,python2-mock)
9100 ,@(package-native-inputs celery))))))
9101
9102 (define-public python-translitcodec
9103 (package
9104 (name "python-translitcodec")
9105 (version "0.4.0")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "translitcodec" version))
9110 (sha256
9111 (base32
9112 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9113 (build-system python-build-system)
9114 (arguments
9115 `(#:tests? #f)) ; no tests provided
9116 (home-page
9117 "https://github.com/claudep/translitcodec")
9118 (synopsis
9119 "Unicode to 8-bit charset transliteration codec")
9120 (description
9121 "This package contains codecs for transliterating ISO 10646 texts into
9122 best-effort representations using smaller coded character sets (ASCII,
9123 ISO 8859, etc.).")
9124 (license license:expat)))
9125
9126 (define-public python2-translitcodec
9127 (package-with-python2 python-translitcodec))
9128
9129 (define-public python-editor
9130 (package
9131 (name "python-editor")
9132 (version "0.5")
9133 (source
9134 (origin
9135 (method url-fetch)
9136 (uri (pypi-uri "python-editor" version))
9137 (sha256
9138 (base32
9139 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9140 (build-system python-build-system)
9141 (home-page
9142 "https://github.com/fmoo/python-editor")
9143 (synopsis
9144 "Programmatically open an editor, capture the result")
9145 (description
9146 "python-editor is a library that provides the editor module for
9147 programmatically interfacing with your system's $EDITOR.")
9148 (license license:asl2.0)))
9149
9150 (define-public python2-editor
9151 (package-with-python2 python-editor))
9152
9153 (define-public python-vobject
9154 (package
9155 (name "python-vobject")
9156 (version "0.9.5")
9157 (source (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "vobject" version))
9160 (sha256
9161 (base32
9162 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9163 (build-system python-build-system)
9164 (arguments
9165 '(;; The test suite relies on some non-portable Windows interfaces.
9166 #:tests? #f))
9167 (propagated-inputs
9168 `(("python-dateutil" ,python-dateutil)
9169 ("python-pyicu" ,python-pyicu)))
9170 (synopsis "Parse and generate vCard and vCalendar files")
9171 (description "Vobject is intended to be a full featured Python package for
9172 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9173 are supported and well tested. vCard 3.0 files are supported, and all data
9174 should be imported, but only a few components are understood in a sophisticated
9175 way.")
9176 (home-page "http://eventable.github.io/vobject/")
9177 (license license:asl2.0)))
9178
9179 (define-public python2-vobject
9180 (package-with-python2 python-vobject))
9181
9182 (define-public python-munkres
9183 (package
9184 (name "python-munkres")
9185 (version "1.0.8")
9186 (source (origin
9187 (method url-fetch)
9188 (uri (pypi-uri "munkres" version))
9189 (sha256
9190 (base32
9191 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9192 (build-system python-build-system)
9193 (arguments
9194 '(#:tests? #f)) ; no test suite
9195 (home-page "http://software.clapper.org/munkres/")
9196 (synopsis "Implementation of the Munkres algorithm")
9197 (description "The Munkres module provides an implementation of the Munkres
9198 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9199 useful for solving the Assignment Problem.")
9200 (license license:bsd-3)))
9201
9202 (define-public python2-munkres
9203 (package-with-python2 python-munkres))
9204
9205 (define-public python-whoosh
9206 (package
9207 (name "python-whoosh")
9208 (version "2.7.4")
9209 (source
9210 (origin
9211 (method url-fetch)
9212 (uri (pypi-uri "Whoosh" version))
9213 (sha256
9214 (base32
9215 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9216 (build-system python-build-system)
9217 (native-inputs
9218 `(("python-pytest" ,python-pytest)))
9219 (home-page "https://bitbucket.org/mchaput/whoosh")
9220 (synopsis "Full text indexing, search, and spell checking library")
9221 (description
9222 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9223 checking library.")
9224 (license license:bsd-2)))
9225
9226 (define-public python2-whoosh
9227 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9228 (package (inherit whoosh)
9229 (propagated-inputs
9230 `(("python2-backport-ssl-match-hostname"
9231 ,python2-backport-ssl-match-hostname)
9232 ,@(package-propagated-inputs whoosh))))))
9233
9234 (define-public python-pathlib
9235 (package
9236 (name "python-pathlib")
9237 (version "1.0.1")
9238 (source (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "pathlib" version))
9241 (sha256
9242 (base32
9243 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9244 (build-system python-build-system)
9245 ;; The tests depend on the internal "test" module, which does not provide
9246 ;; a stable interface.
9247 (arguments `(#:tests? #f))
9248 (home-page "https://pathlib.readthedocs.org/")
9249 (synopsis "Object-oriented file system paths")
9250 (description "Pathlib offers a set of classes to handle file system paths.
9251 It offers the following advantages over using string objects:
9252
9253 @enumerate
9254 @item No more cumbersome use of os and os.path functions. Everything can
9255 be done easily through operators, attribute accesses, and method calls.
9256 @item Embodies the semantics of different path types. For example,
9257 comparing Windows paths ignores casing.
9258 @item Well-defined semantics, eliminating any inconsistencies or
9259 ambiguities (forward vs. backward slashes, etc.).
9260 @end enumerate
9261
9262 Note: In Python 3.4, pathlib is now part of the standard library. For other
9263 Python versions please consider python-pathlib2 instead, which tracks the
9264 standard library module. This module (python-pathlib) isn't maintained
9265 anymore.")
9266 (license license:expat)))
9267
9268 (define-public python2-pathlib
9269 (package-with-python2 python-pathlib))
9270
9271 (define-public python2-pathlib2
9272 (package
9273 (name "python2-pathlib2")
9274 (version "2.3.2")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "pathlib2" version))
9278 (sha256
9279 (base32
9280 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9281 (build-system python-build-system)
9282 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9283 ;; version is 3.4 which already includes this package as part of the
9284 ;; standard library.
9285 (arguments
9286 `(#:python ,python-2))
9287 (propagated-inputs
9288 `(("python2-scandir" ,python2-scandir)
9289 ("python2-six" ,python2-six)))
9290 (home-page "https://pypi.python.org/pypi/pathlib2/")
9291 (synopsis "Object-oriented file system paths - backport of standard
9292 pathlib module")
9293 (description "The goal of pathlib2 is to provide a backport of standard
9294 pathlib module which tracks the standard library module, so all the newest
9295 features of the standard pathlib can be used also on older Python versions.
9296
9297 Pathlib offers a set of classes to handle file system paths. It offers the
9298 following advantages over using string objects:
9299
9300 @enumerate
9301 @item No more cumbersome use of os and os.path functions. Everything can
9302 be done easily through operators, attribute accesses, and method calls.
9303 @item Embodies the semantics of different path types. For example,
9304 comparing Windows paths ignores casing.
9305 @item Well-defined semantics, eliminating any inconsistencies or
9306 ambiguities (forward vs. backward slashes, etc.).
9307 @end enumerate")
9308 (license license:expat)))
9309
9310 (define-public python2-pathlib2-bootstrap
9311 (hidden-package
9312 (package
9313 (inherit python2-pathlib2)
9314 (name "python2-pathlib2-bootstrap")
9315 (propagated-inputs
9316 `(("python2-scandir" ,python2-scandir)
9317 ("python2-six" ,python2-six-bootstrap))))))
9318
9319 (define-public python-jellyfish
9320 (package
9321 (name "python-jellyfish")
9322 (version "0.5.6")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "jellyfish" version))
9326 (sha256
9327 (base32
9328 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9329 (build-system python-build-system)
9330 (native-inputs
9331 `(("python-pytest" ,python-pytest)))
9332 (home-page "https://github.com/jamesturk/jellyfish")
9333 (synopsis "Approximate and phonetic matching of strings")
9334 (description "Jellyfish uses a variety of string comparison and phonetic
9335 encoding algorithms to do fuzzy string matching.")
9336 (license license:bsd-2)
9337 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9338
9339 (define-public python2-jellyfish
9340 (let ((jellyfish (package-with-python2
9341 (strip-python2-variant python-jellyfish))))
9342 (package (inherit jellyfish)
9343 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9344 ,@(package-native-inputs jellyfish))))))
9345
9346 (define-public python2-unicodecsv
9347 (package
9348 (name "python2-unicodecsv")
9349 (version "0.14.1")
9350 (source (origin
9351 (method url-fetch)
9352 ;; The test suite is not included in the PyPi release.
9353 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9354 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9355 "archive/" version ".tar.gz"))
9356 (file-name (string-append name "-" version ".tar.gz"))
9357 (sha256
9358 (base32
9359 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9360 (build-system python-build-system)
9361 (arguments
9362 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9363 #:python ,python-2))
9364 (native-inputs
9365 `(("python2-unittest2" ,python2-unittest2)))
9366 (home-page "https://github.com/jdunck/python-unicodecsv")
9367 (synopsis "Unicode CSV module for Python 2")
9368 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9369 module, adding support for Unicode strings.")
9370 (license license:bsd-2)))
9371
9372 (define-public python-rarfile
9373 (package
9374 (name "python-rarfile")
9375 (version "2.8")
9376 (source (origin
9377 (method url-fetch)
9378 (uri (pypi-uri "rarfile" version))
9379 (sha256
9380 (base32
9381 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9382 (build-system python-build-system)
9383 (arguments
9384 '(#:phases
9385 (modify-phases %standard-phases
9386 (replace 'check
9387 ;; Many tests fail, but the installation proceeds.
9388 (lambda _ (invoke "make" "-C" "test" "test"))))))
9389 (native-inputs
9390 `(("which" ,which))) ; required for tests
9391 (propagated-inputs
9392 `(("libarchive" ,libarchive)))
9393 (home-page "https://github.com/markokr/rarfile")
9394 (synopsis "RAR archive reader for Python")
9395 (description "This is Python module for RAR archive reading. The interface
9396 is made as zipfile like as possible.")
9397 (license license:isc)))
9398
9399 (define-public python2-rarfile
9400 (package-with-python2 python-rarfile))
9401
9402 (define-public python-magic
9403 (package
9404 (name "python-magic")
9405 (version "0.4.15")
9406 (source
9407 (origin
9408 (method url-fetch)
9409 (uri (pypi-uri "python-magic" version))
9410 (sha256
9411 (base32
9412 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9413 (file-name (string-append name "-" version "-checkout"))))
9414 (build-system python-build-system)
9415 (arguments
9416 ;; The tests are unreliable, so don't run them. The tests fail
9417 ;; under Python3 because they were written for Python2 and
9418 ;; contain import statements that do not work in Python3. One of
9419 ;; the tests fails under Python2 because its assertions are
9420 ;; overly stringent; it relies on comparing output strings which
9421 ;; are brittle and can change depending on the version of
9422 ;; libmagic being used and the system on which the test is
9423 ;; running. In my case, under GuixSD 0.10.0, only one test
9424 ;; failed, and it seems to have failed only because the version
9425 ;; of libmagic that is packaged in Guix outputs a slightly
9426 ;; different (but not wrong) string than the one that the test
9427 ;; expected.
9428 '(#:tests? #f
9429 #:phases (modify-phases %standard-phases
9430 ;; Replace a specific method call with a hard-coded
9431 ;; path to the necessary libmagic.so file in the
9432 ;; store. If we don't do this, then the method call
9433 ;; will fail to find the libmagic.so file, which in
9434 ;; turn will cause any application using
9435 ;; python-magic to fail.
9436 (add-before 'build 'hard-code-path-to-libmagic
9437 (lambda* (#:key inputs #:allow-other-keys)
9438 (let ((file (assoc-ref inputs "file")))
9439 (substitute* "magic.py"
9440 (("ctypes.util.find_library\\('magic'\\)")
9441 (string-append "'" file "/lib/libmagic.so'")))
9442 #t)))
9443 (add-before 'install 'disable-egg-compression
9444 (lambda _
9445 (let ((port (open-file "setup.cfg" "a")))
9446 (display "\n[easy_install]\nzip_ok = 0\n"
9447 port)
9448 (close-port port)
9449 #t))))))
9450 (inputs
9451 ;; python-magic needs to be able to find libmagic.so.
9452 `(("file" ,file)))
9453 (home-page
9454 "https://github.com/ahupp/python-magic")
9455 (synopsis
9456 "File type identification using libmagic")
9457 (description
9458 "This module uses ctypes to access the libmagic file type
9459 identification library. It makes use of the local magic database and
9460 supports both textual and MIME-type output. Note that this module and
9461 the python-file module both provide a \"magic.py\" file; these two
9462 modules, which are different and were developed separately, both serve
9463 the same purpose: to provide Python bindings for libmagic.")
9464 (license license:expat)))
9465
9466 (define-public python2-magic
9467 (package-with-python2 python-magic))
9468
9469 (define-public python2-s3cmd
9470 (package
9471 (name "python2-s3cmd")
9472 (version "1.6.1")
9473 (source
9474 (origin
9475 (method url-fetch)
9476 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9477 "s3cmd-" version ".tar.gz"))
9478 (sha256
9479 (base32
9480 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9481 (build-system python-build-system)
9482 (arguments
9483 ;; s3cmd is written for python2 only and contains no tests.
9484 `(#:python ,python-2
9485 #:tests? #f))
9486 (propagated-inputs
9487 `(("python2-dateutil" ,python2-dateutil)
9488 ;; The python-file package also provides a magic.py module.
9489 ;; This is an unfortunate state of affairs; however, s3cmd
9490 ;; fails to install if it cannot find specifically the
9491 ;; python-magic package. Thus we include it, instead of using
9492 ;; python-file. Ironically, s3cmd sometimes works better
9493 ;; without libmagic bindings at all:
9494 ;; https://github.com/s3tools/s3cmd/issues/198
9495 ("python2-magic" ,python2-magic)))
9496 (home-page "http://s3tools.org/s3cmd")
9497 (synopsis "Command line tool for S3-compatible storage services")
9498 (description
9499 "S3cmd is a command line tool for uploading, retrieving and managing data
9500 in storage services that are compatible with the Amazon Simple Storage
9501 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9502 GnuPG encryption, and more. It also supports management of Amazon's
9503 CloudFront content delivery network.")
9504 (license license:gpl2+)))
9505
9506 (define-public python-pkgconfig
9507 (package
9508 (name "python-pkgconfig")
9509 (version "1.3.1")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "pkgconfig" version))
9514 (sha256
9515 (base32
9516 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9517 (build-system python-build-system)
9518 (native-inputs
9519 `(("python-nose" ,python-nose)))
9520 (inputs
9521 `(("pkg-config" ,pkg-config)))
9522 (arguments
9523 `(#:phases
9524 (modify-phases %standard-phases
9525 (add-before 'build 'patch
9526 ;; Hard-code the path to pkg-config.
9527 (lambda _
9528 (substitute* "pkgconfig/pkgconfig.py"
9529 (("cmd = 'pkg-config")
9530 (string-append "cmd = '" (which "pkg-config"))))
9531 #t))
9532 (replace 'check
9533 (lambda _
9534 (invoke "nosetests" "test.py"))))))
9535 (home-page "https://github.com/matze/pkgconfig")
9536 (synopsis "Python interface for pkg-config")
9537 (description "This module provides a Python interface to pkg-config. It
9538 can be used to find all pkg-config packages, check if a package exists,
9539 check if a package meets certain version requirements, query CFLAGS and
9540 LDFLAGS and parse the output to build extensions with setup.py.")
9541 (license license:expat)))
9542
9543 (define-public python2-pkgconfig
9544 (package-with-python2 python-pkgconfig))
9545
9546 (define-public python-bz2file
9547 (package
9548 (name "python-bz2file")
9549 (version "0.98")
9550 (source
9551 (origin
9552 (method url-fetch)
9553 (uri (pypi-uri "bz2file" version))
9554 (sha256
9555 (base32
9556 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9557 (build-system python-build-system)
9558 (arguments
9559 `(#:tests? #f)) ; Tests use deprecated python modules.
9560 (home-page "https://github.com/nvawda/bz2file")
9561 (synopsis "Read and write bzip2-compressed files")
9562 (description
9563 "Bz2file is a Python library for reading and writing bzip2-compressed
9564 files. It contains a drop-in replacement for the I/O interface in the
9565 standard library's @code{bz2} module, including features from the latest
9566 development version of CPython that are not available in older releases.")
9567 (license license:asl2.0)))
9568
9569 (define-public python2-bz2file
9570 (package-with-python2 python-bz2file))
9571
9572 (define-public python-future
9573 (package
9574 (name "python-future")
9575 (version "0.17.1")
9576 (source
9577 (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "future" version))
9580 (sha256
9581 (base32
9582 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9583 (build-system python-build-system)
9584 ;; Many tests connect to the network or are otherwise flawed.
9585 ;; https://github.com/PythonCharmers/python-future/issues/210
9586 (arguments
9587 `(#:tests? #f))
9588 (home-page "http://python-future.org")
9589 (synopsis "Single-source support for Python 3 and 2")
9590 (description
9591 "@code{python-future} is the missing compatibility layer between Python 2 and
9592 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9593 to support both Python 2 and Python 3 with minimal overhead.")
9594 (license license:expat)))
9595
9596 (define-public python2-future
9597 (package-with-python2 python-future))
9598
9599 (define-public python-cysignals
9600 (package
9601 (name "python-cysignals")
9602 (version "1.9.0")
9603 (source
9604 (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "cysignals" version))
9607 (sha256
9608 (base32
9609 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9610 (build-system python-build-system)
9611 (native-inputs
9612 `(("python-cython" ,python-cython)
9613 ("python-sphinx" ,python-sphinx)))
9614 (inputs
9615 `(("pari-gp" ,pari-gp)))
9616 (arguments
9617 `(#:modules ((guix build python-build-system)
9618 ((guix build gnu-build-system) #:prefix gnu:)
9619 (guix build utils))
9620 ;; FIXME: Tests are executed after installation and currently fail
9621 ;; when not installing into standard locations; the author is working
9622 ;; on a fix.
9623 #:tests? #f
9624 #:phases
9625 (modify-phases %standard-phases
9626 (add-before
9627 'build 'configure
9628 (assoc-ref gnu:%standard-phases 'configure)))))
9629 (home-page
9630 "https://github.com/sagemath/cysignals")
9631 (synopsis
9632 "Handling of interrupts and signals for Cython")
9633 (description
9634 "The cysignals package provides mechanisms to handle interrupts (and
9635 other signals and errors) in Cython code, using two related approaches,
9636 for mixed Cython/Python code or external C libraries and pure Cython code,
9637 respectively.")
9638 (license license:lgpl3+)))
9639
9640 (define-public python2-cysignals
9641 (package-with-python2 python-cysignals))
9642
9643 (define-public python2-shedskin
9644 (package
9645 (name "python2-shedskin")
9646 (version "0.9.4")
9647 (source
9648 (origin
9649 (method url-fetch)
9650 (uri (string-append "https://github.com/shedskin/shedskin/"
9651 "releases/download/v" version
9652 "/shedskin-" version ".tgz"))
9653 (sha256
9654 (base32
9655 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9656 (build-system python-build-system)
9657 (arguments
9658 `(#:python ,python-2
9659 #:phases (modify-phases %standard-phases
9660 (add-after 'unpack 'fix-resulting-include-libs
9661 (lambda* (#:key inputs #:allow-other-keys)
9662 (let ((libgc (assoc-ref inputs "libgc"))
9663 (pcre (assoc-ref inputs "pcre")))
9664 (substitute* "shedskin/makefile.py"
9665 (("variable == 'CCFLAGS':[ ]*")
9666 (string-append "variable == 'CCFLAGS':\n"
9667 " line += ' -I " pcre "/include"
9668 " -I " libgc "/include'"))
9669 (("variable == 'LFLAGS':[ ]*")
9670 (string-append "variable == 'LFLAGS':\n"
9671 " line += ' -L" pcre "/lib"
9672 " -L " libgc "/lib'")))
9673 #t))))))
9674 (inputs `(("pcre" ,pcre)
9675 ("libgc" ,libgc)))
9676 (home-page "https://shedskin.github.io/")
9677 (synopsis "Experimental Python-2 to C++ Compiler")
9678 (description (string-append "This is an experimental compiler for a subset of
9679 Python. It generates C++ code and a Makefile."))
9680 (license (list license:gpl3 license:bsd-3 license:expat))))
9681
9682 (define-public python2-rope
9683 (package
9684 (name "python2-rope")
9685 (version "0.11.0")
9686 (source
9687 (origin
9688 (method url-fetch)
9689 (uri (pypi-uri "rope" version))
9690 (sha256
9691 (base32
9692 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9693 (arguments
9694 ;; Rope has only partial python3 support, see `python-rope'
9695 `(#:python ,python-2))
9696 (build-system python-build-system)
9697 (native-inputs
9698 `(("python2-unittest2" ,python2-unittest2)))
9699 (home-page "https://github.com/python-rope/rope")
9700 (synopsis "Refactoring library for Python")
9701 (description "Rope is a refactoring library for Python. It facilitates
9702 the renaming, moving and extracting of attributes, functions, modules, fields
9703 and parameters in Python 2 source code. These refactorings can also be applied
9704 to occurrences in strings and comments.")
9705 (license license:gpl2)))
9706
9707 (define-public python-rope
9708 (package
9709 (inherit python2-rope)
9710 (name "python-rope")
9711 (arguments `(#:python ,python-wrapper
9712 ;; XXX: Only partial python3 support, results in some failing
9713 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9714 #:tests? #f))
9715 (properties `((python2-variant . ,(delay python2-rope))))))
9716
9717 (define-public python-py3status
9718 (package
9719 (name "python-py3status")
9720 (version "3.16")
9721 (source
9722 (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "py3status" version))
9725 (sha256
9726 (base32
9727 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9728 (build-system python-build-system)
9729 (inputs
9730 `(("file" ,file)))
9731 (arguments
9732 '(#:phases
9733 (modify-phases %standard-phases
9734 ;; 'file' is used for detection of configuration file encoding
9735 ;; let's make link the dependency to particular input
9736 (add-before 'build 'patch-file-path
9737 (lambda* (#:key inputs #:allow-other-keys)
9738 (let ((file-path (assoc-ref inputs "file")))
9739 (substitute* "py3status/parse_config.py"
9740 (("\\['file', '-b'")
9741 (string-append "['" file-path "/bin/file', '-b'")))
9742 #t))))
9743 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9744 (home-page "https://github.com/ultrabug/py3status")
9745 (synopsis "Extensible i3status wrapper written in Python")
9746 (description "py3status is an i3status wrapper which extends i3status
9747 functionality in a modular way, allowing you to extend your panel with your
9748 own code, responding to click events and updating clock every second.")
9749 (license license:bsd-3)))
9750
9751 (define-public python-tblib
9752 (package
9753 (name "python-tblib")
9754 (version "1.3.2")
9755 (source (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "tblib" version))
9758 (sha256 (base32
9759 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9760 (build-system python-build-system)
9761 (arguments
9762 `(#:phases
9763 (modify-phases %standard-phases
9764 (add-before 'check 'adjust-tests
9765 (lambda _
9766 (when (which "python3")
9767 ;; Adjust the example output to match that of Python 3.7:
9768 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9769 (substitute* "README.rst"
9770 (("Exception\\('fail',") "Exception('fail'"))
9771 #t)))
9772 (replace 'check
9773 (lambda _
9774 ;; Upstream runs tests after installation and the package itself
9775 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9776 ;; found.
9777 (setenv "PYTHONPATH"
9778 (string-append (getcwd) "/build/lib:"
9779 (getenv "PYTHONPATH")))
9780 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9781 (native-inputs
9782 `(("python-pytest" ,python-pytest)
9783 ("python-six" ,python-six)))
9784 (home-page "https://github.com/ionelmc/python-tblib")
9785 (synopsis "Traceback serialization library")
9786 (description
9787 "Traceback serialization allows you to:
9788
9789 @enumerate
9790 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9791 different processes. This allows better error handling when running code over
9792 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9793
9794 @item Parse traceback strings and raise with the parsed tracebacks.
9795 @end enumerate\n")
9796 (license license:bsd-3)))
9797
9798 (define-public python2-tblib
9799 (package-with-python2 python-tblib))
9800
9801 (define-public python-greenlet
9802 (package
9803 (name "python-greenlet")
9804 (version "0.4.15")
9805 (source (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "greenlet" version))
9808 (sha256
9809 (base32
9810 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9811 (build-system python-build-system)
9812 (home-page "https://greenlet.readthedocs.io/")
9813 (synopsis "Lightweight in-process concurrent programming")
9814 (description
9815 "Greenlet package is a spin-off of Stackless, a version of CPython
9816 that supports micro-threads called \"tasklets\". Tasklets run
9817 pseudo-concurrently (typically in a single or a few OS-level threads) and
9818 are synchronized with data exchanges on \"channels\".")
9819 (license (list license:psfl license:expat))))
9820
9821 (define-public python2-greenlet
9822 (package-with-python2 python-greenlet))
9823
9824 (define-public python-objgraph
9825 (package
9826 (name "python-objgraph")
9827 (version "3.4.0")
9828 (source
9829 (origin
9830 (method url-fetch)
9831 (uri (pypi-uri "objgraph" version))
9832 (sha256
9833 (base32
9834 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9835 (build-system python-build-system)
9836 (propagated-inputs
9837 `(("python-graphviz" ,python-graphviz)))
9838 (native-inputs
9839 `(("python-mock" ,python-mock)
9840 ("graphviz" ,graphviz)))
9841 (home-page "https://mg.pov.lt/objgraph/")
9842 (synopsis "Draw Python object reference graphs with graphviz")
9843 (description
9844 "This package provides tools to draw Python object reference graphs with
9845 graphviz.")
9846 (license license:expat)))
9847
9848 (define-public python-gevent
9849 (package
9850 (name "python-gevent")
9851 (version "1.3.7")
9852 (source (origin
9853 (method url-fetch)
9854 (uri (pypi-uri "gevent" version))
9855 (sha256
9856 (base32
9857 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9858 (modules '((guix build utils)))
9859 (snippet
9860 '(begin
9861 ;; unbunding libev and c-ares
9862 (delete-file-recursively "deps")
9863 #t))))
9864 (build-system python-build-system)
9865 (arguments
9866 `(#:modules ((ice-9 ftw)
9867 (ice-9 match)
9868 (srfi srfi-26)
9869 (guix build utils)
9870 (guix build python-build-system))
9871 #:phases (modify-phases %standard-phases
9872 (add-after 'unpack 'unpack-libev
9873 (lambda* (#:key inputs #:allow-other-keys)
9874 (mkdir-p "deps/libev")
9875 ;; FIXME: gevent requires building libev, even though
9876 ;; it only links against the proper one.
9877 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9878 "--strip-components=1" "-C" "deps/libev")))
9879 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9880 (lambda _
9881 (substitute* "src/gevent/subprocess.py"
9882 (("/bin/sh") (which "sh")))
9883 (for-each (lambda (file)
9884 (substitute* file
9885 (("/bin/sh") (which "sh"))
9886 (("/bin/true") (which "true"))))
9887 (find-files "src/greentest" "\\.py$"))
9888 #t))
9889 (add-before 'build 'do-not-use-bundled-sources
9890 (lambda* (#:key inputs #:allow-other-keys)
9891 (setenv "CONFIG_SHELL" (which "bash"))
9892 (setenv "LIBEV_EMBED" "false")
9893 (setenv "CARES_EMBED" "false")
9894 (setenv "EMBED" "false")
9895
9896 (let ((greenlet (string-append
9897 (assoc-ref inputs "python-greenlet")
9898 "/include")))
9899 (match (scandir greenlet
9900 (lambda (item)
9901 (string-prefix? "python" item)))
9902 ((python)
9903 (setenv "CPATH"
9904 (string-append greenlet "/" python)))))
9905 #t))
9906 (add-before 'check 'skip-timer-test
9907 (lambda _
9908 ;; XXX: Skip 'TestTimerResolution', which appears to be
9909 ;; unreliable.
9910 (substitute* "src/greentest/test__core_timer.py"
9911 (("not greentest.RUNNING_ON_CI") "False"))
9912 #t))
9913 (replace 'check
9914 (lambda _
9915 ;; Make sure the build directory is on PYTHONPATH.
9916 (setenv "PYTHONPATH"
9917 (string-append
9918 (getenv "PYTHONPATH") ":"
9919 (getcwd) "/build/"
9920 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9921 (with-directory-excursion "src/greentest"
9922 ;; XXX: Many tests require network access. Instead we only
9923 ;; run known-good tests. Unfortunately we cannot use
9924 ;; recursion here since this directory also contains
9925 ;; Python-version-specific subfolders.
9926 (apply invoke "python" "testrunner.py" "--config"
9927 "known_failures.py"
9928 (scandir "." (cut regexp-exec
9929 (make-regexp "test_+(subprocess|core)")
9930 <>)))))))))
9931 (propagated-inputs
9932 `(("python-greenlet" ,python-greenlet)
9933 ("python-objgraph" ,python-objgraph)))
9934 (native-inputs
9935 `(("libev-source" ,(package-source libev))
9936 ("python-six" ,python-six)))
9937 (inputs
9938 `(("c-ares" ,c-ares)
9939 ("libev" ,libev)))
9940 (home-page "http://www.gevent.org/")
9941 (synopsis "Coroutine-based network library")
9942 (description
9943 "gevent is a coroutine-based Python networking library that uses greenlet
9944 to provide a high-level synchronous API on top of the libev event loop.")
9945 (license license:expat)
9946 (properties `((python2-variant . ,(delay python2-gevent))))))
9947
9948 (define-public python2-gevent
9949 (let ((base (package-with-python2
9950 (strip-python2-variant python-gevent))))
9951 (package
9952 (inherit base)
9953 (native-inputs `(,@(package-native-inputs python-gevent)
9954 ("python-mock" ,python2-mock))))))
9955
9956 (define-public python-fastimport
9957 (package
9958 (name "python-fastimport")
9959 (version "0.9.6")
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "fastimport" version))
9964 (sha256
9965 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9966 (build-system python-build-system)
9967 (home-page "https://github.com/jelmer/python-fastimport")
9968 (synopsis "VCS fastimport parser and generator in Python")
9969 (description "This package provides a parser for and generator of the Git
9970 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9971 format.")
9972 (license license:gpl2+)))
9973
9974 (define-public python2-fastimport
9975 (package-with-python2 python-fastimport))
9976
9977 (define-public python-twisted
9978 (package
9979 (name "python-twisted")
9980 (version "19.2.1")
9981 (source (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9984 (sha256
9985 (base32
9986 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9987 (build-system python-build-system)
9988 (arguments
9989 '(#:tests? #f)) ; FIXME: some tests fail
9990 (propagated-inputs
9991 `(("python-zope-interface" ,python-zope-interface)
9992 ("python-pyhamcrest" ,python-pyhamcrest)
9993 ("python-incremental" ,python-incremental)
9994 ("python-hyperlink" ,python-hyperlink)
9995 ("python-constantly" ,python-constantly)
9996 ("python-automat" ,python-automat)))
9997 (home-page "https://twistedmatrix.com/")
9998 (synopsis "Asynchronous networking framework written in Python")
9999 (description
10000 "Twisted is an extensible framework for Python programming, with special
10001 focus on event-based network programming and multiprotocol integration.")
10002 (license license:expat)))
10003
10004 (define-public python2-twisted
10005 (package-with-python2 python-twisted))
10006
10007 (define-public python-pika
10008 (package
10009 (name "python-pika")
10010 (version "0.12.0")
10011 (source
10012 (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "pika" version))
10015 (sha256
10016 (base32
10017 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10018 (build-system python-build-system)
10019 (native-inputs
10020 `(("python-pyev" ,python-pyev)
10021 ("python-tornado" ,python-tornado)
10022 ("python-twisted" ,python-twisted)))
10023 (home-page "https://pika.readthedocs.org")
10024 (synopsis "Pure Python AMQP Client Library")
10025 (description
10026 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10027 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10028 network support library.")
10029 (license license:bsd-3)))
10030
10031 (define-public python2-pika
10032 (package-with-python2 python-pika))
10033
10034 (define-public python-ply
10035 (package
10036 (name "python-ply")
10037 (version "3.10")
10038 (source
10039 (origin
10040 (method url-fetch)
10041 (uri (pypi-uri "ply" version))
10042 (sha256
10043 (base32
10044 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10045 (build-system python-build-system)
10046 (home-page "http://www.dabeaz.com/ply/")
10047 (synopsis "Python Lex & Yacc")
10048 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10049 It uses LR parsing and does extensive error checking.")
10050 (license license:bsd-3)))
10051
10052 (define-public python2-ply
10053 (package-with-python2 python-ply))
10054
10055 (define-public python-tabulate
10056 (package
10057 (name "python-tabulate")
10058 (version "0.7.7")
10059 (source (origin
10060 (method url-fetch)
10061 (uri (pypi-uri "tabulate" version))
10062 (sha256
10063 (base32
10064 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10065 (build-system python-build-system)
10066 (arguments
10067 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10068 ;; and the latest release is not tagged in the upstream repository.
10069 '(#:tests? #f))
10070 (home-page "https://bitbucket.org/astanin/python-tabulate")
10071 (synopsis "Pretty-print tabular data")
10072 (description
10073 "Tabulate is a library and command-line utility to pretty-print tabular
10074 data in Python.")
10075 (license license:expat)))
10076
10077 (define-public python2-tabulate
10078 (package-with-python2 python-tabulate))
10079
10080 (define-public python-kazoo
10081 (package
10082 (name "python-kazoo")
10083 (version "2.4.0")
10084 (source
10085 (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "kazoo" version))
10088 (sha256
10089 (base32
10090 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10091 (build-system python-build-system)
10092 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10093 (propagated-inputs
10094 `(("python-six" ,python-six)))
10095 (home-page "https://kazoo.readthedocs.org")
10096 (synopsis "High-level Zookeeper client library")
10097 (description
10098 "Kazoo is a Python client library for the Apache Zookeeper distributed
10099 application service. It is designed to be easy to use and to avoid common
10100 programming errors.")
10101 (license license:asl2.0)))
10102
10103 (define-public python2-kazoo
10104 (package-with-python2 python-kazoo))
10105
10106 (define-public python-pykafka
10107 (package
10108 (name "python-pykafka")
10109 (version "2.4.0")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "pykafka" version))
10113 (sha256
10114 (base32
10115 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10116 (build-system python-build-system)
10117 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10118 (propagated-inputs
10119 `(("python-gevent" ,python-gevent)
10120 ("python-kazoo" ,python-kazoo)
10121 ("python-tabulate" ,python-tabulate)))
10122 (inputs
10123 `(("librdkafka" ,librdkafka)))
10124 (home-page "https://pykafka.readthedocs.io/")
10125 (synopsis "Apache Kafka client for Python")
10126 (description
10127 "PyKafka is a client for the Apache Kafka distributed messaging system.
10128 It includes Python implementations of Kafka producers and consumers, which
10129 are optionally backed by a C extension built on librdkafka.")
10130 (license license:asl2.0)))
10131
10132 (define-public python2-pykafka
10133 (package-with-python2 python-pykafka))
10134
10135 (define-public python-wcwidth
10136 (package
10137 (name "python-wcwidth")
10138 (version "0.1.7")
10139 (source
10140 (origin
10141 (method url-fetch)
10142 (uri (pypi-uri "wcwidth" version))
10143 (sha256
10144 (base32
10145 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10146 (build-system python-build-system)
10147 (home-page "https://github.com/jquast/wcwidth")
10148 (synopsis "Measure number of terminal column cells of wide-character codes")
10149 (description "Wcwidth measures the number of terminal column cells of
10150 wide-character codes. It is useful for those implementing a terminal emulator,
10151 or programs that carefully produce output to be interpreted by one. It is a
10152 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10153 specified in POSIX.1-2001 and POSIX.1-2008.")
10154 (license license:expat)))
10155
10156 (define-public python2-wcwidth
10157 (package-with-python2 python-wcwidth))
10158
10159 (define-public python2-jsonrpclib
10160 (package
10161 (name "python2-jsonrpclib")
10162 (version "0.1.7")
10163 (source (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "jsonrpclib" version))
10166 (sha256
10167 (base32
10168 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10169 (build-system python-build-system)
10170 (arguments
10171 `(#:tests? #f
10172 #:python ,python-2))
10173 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10174 (synopsis "Implementation of JSON-RPC specification for Python")
10175 (description
10176 "This library is an implementation of the JSON-RPC specification.
10177 It supports both the original 1.0 specification, as well as the
10178 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10179 etc.")
10180 (license license:asl2.0)))
10181
10182 (define-public python-chai
10183 (package
10184 (name "python-chai")
10185 (version "1.1.2")
10186 (source (origin
10187 (method url-fetch)
10188 (uri (pypi-uri "chai" version))
10189 (sha256
10190 (base32
10191 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10192 (build-system python-build-system)
10193 (home-page "https://github.com/agoragames/chai")
10194 (synopsis "Mocking framework for Python")
10195 (description
10196 "Chai provides an api for mocking, stubbing and spying your python
10197 objects, patterned after the Mocha library for Ruby.")
10198 (license license:bsd-3)))
10199
10200 (define-public python2-chai
10201 (package-with-python2 python-chai))
10202
10203 (define-public python-inflection
10204 (package
10205 (name "python-inflection")
10206 (version "0.3.1")
10207 (source
10208 (origin (method url-fetch)
10209 (uri (pypi-uri "inflection" version))
10210 (sha256
10211 (base32
10212 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10213 (build-system python-build-system)
10214 (native-inputs
10215 `(("python-pytest" ,python-pytest)))
10216 (home-page "https://github.com/jpvanhal/inflection")
10217 (synopsis "Python string transformation library")
10218 (description
10219 "Inflection is a string transformation library. It singularizes
10220 and pluralizes English words, and transforms strings from CamelCase to
10221 underscored string.")
10222 (license license:expat)))
10223
10224 (define-public python2-inflection
10225 (package-with-python2 python-inflection))
10226
10227 (define-public python-pylev
10228 (package
10229 (name "python-pylev")
10230 (version "1.3.0")
10231 (source (origin
10232 (method url-fetch)
10233 (uri (pypi-uri "pylev" version))
10234 (sha256
10235 (base32
10236 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10237 (build-system python-build-system)
10238 (home-page "https://github.com/toastdriven/pylev")
10239 (synopsis "Levenshtein distance implementation in Python")
10240 (description "Pure Python Levenshtein implementation, based off the
10241 Wikipedia code samples at
10242 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10243 (license license:bsd-3)))
10244
10245 (define-public python2-pylev
10246 (package-with-python2 python-pylev))
10247
10248 (define-public python-cleo
10249 (package
10250 (name "python-cleo")
10251 (version "0.6.1")
10252 (source (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "cleo" version))
10255 (sha256
10256 (base32
10257 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10258 (build-system python-build-system)
10259 (native-inputs
10260 `(;; For testing
10261 ("python-mock" ,python-mock)
10262 ("python-pytest-mock" ,python-pytest-mock)
10263 ("python-pytest" ,python-pytest)))
10264 (propagated-inputs
10265 `(("python-backpack" ,python-backpack)
10266 ("python-pastel" ,python-pastel)
10267 ("python-pylev" ,python-pylev)))
10268 (home-page "https://github.com/sdispater/cleo")
10269 (synopsis "Command-line arguments library for Python")
10270 (description
10271 "Cleo allows you to create command-line commands with signature in
10272 docstring and colored output.")
10273 (license license:expat)))
10274
10275 (define-public python2-cleo
10276 (package-with-python2 python-cleo))
10277
10278 (define-public python-lazy-object-proxy
10279 (package
10280 (name "python-lazy-object-proxy")
10281 (version "1.3.1")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "lazy-object-proxy" version))
10285 (sha256
10286 (base32
10287 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10288 (build-system python-build-system)
10289 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10290 (synopsis "Lazy object proxy for python")
10291 (description
10292 "Lazy object proxy is an object that wraps a callable but defers the call
10293 until the object is actually required, and caches the result of said call.")
10294 (license license:bsd-2)))
10295
10296 (define-public python2-lazy-object-proxy
10297 (package-with-python2 python-lazy-object-proxy))
10298
10299 (define-public python-dnspython
10300 (package
10301 (name "python-dnspython")
10302 (version "1.15.0")
10303 (source (origin
10304 (method url-fetch)
10305 (uri (string-append "http://www.dnspython.org/kits/"
10306 version "/dnspython-" version ".tar.gz"))
10307 (sha256
10308 (base32
10309 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10310 (build-system python-build-system)
10311 (arguments '(#:tests? #f)) ; XXX: requires internet access
10312 (home-page "http://www.dnspython.org")
10313 (synopsis "DNS toolkit for Python")
10314 (description
10315 "dnspython is a DNS toolkit for Python. It supports almost all record
10316 types. It can be used for queries, zone transfers, and dynamic updates.
10317 It supports TSIG authenticated messages and EDNS0.")
10318 (license license:expat)))
10319
10320 (define-public python2-dnspython
10321 (package-with-python2 python-dnspython))
10322
10323 (define-public python-email-validator
10324 (package
10325 (name "python-email-validator")
10326 (version "1.0.2")
10327 (source
10328 (origin (method url-fetch)
10329 (uri (pypi-uri "email_validator" version))
10330 (sha256
10331 (base32
10332 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10333 (build-system python-build-system)
10334 (arguments
10335 '(#:phases
10336 (modify-phases %standard-phases
10337 (add-before 'build 'use-dnspython
10338 (lambda _
10339 (substitute* "setup.py"
10340 (("dnspython3") "dnspython"))
10341 #t)))))
10342 (propagated-inputs
10343 `(("python-dnspython" ,python-dnspython)
10344 ("python-idna" ,python-idna)))
10345 (home-page "https://github.com/JoshData/python-email-validator")
10346 (synopsis "Email address validation library for Python")
10347 (description
10348 "This library validates email address syntax and deliverability.")
10349 (license license:cc0)))
10350
10351 (define-public python2-email-validator
10352 (package-with-python2 python-email-validator))
10353
10354 (define-public python-ukpostcodeparser
10355 (package
10356 (name "python-ukpostcodeparser")
10357 (version "1.0.3")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (pypi-uri "UkPostcodeParser" version))
10361 (sha256
10362 (base32
10363 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10364 (build-system python-build-system)
10365 (home-page "https://github.com/hamstah/ukpostcodeparser")
10366 (synopsis "UK Postcode parser for Python")
10367 (description
10368 "This library provides the @code{parse_uk_postcode} function for
10369 parsing UK postcodes.")
10370 (license license:expat)))
10371
10372 (define-public python2-ukpostcodeparser
10373 (package-with-python2 python-ukpostcodeparser))
10374
10375 (define-public python-faker
10376 (package
10377 (name "python-faker")
10378 (version "0.7.9")
10379 (source (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "Faker" version))
10382 (sha256
10383 (base32
10384 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10385 (patches
10386 (search-patches "python-faker-fix-build-32bit.patch"))
10387 (modules '((guix build utils)))
10388 (snippet
10389 '(begin
10390 (for-each delete-file (find-files "." "\\.pyc$"))
10391 #t))))
10392 (build-system python-build-system)
10393 (arguments
10394 '(#:phases
10395 (modify-phases %standard-phases
10396 (replace 'check
10397 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10398 (native-inputs
10399 `(;; For testing
10400 ("python-email-validator" ,python-email-validator)
10401 ("python-mock" ,python-mock)
10402 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10403 (propagated-inputs
10404 `(("python-dateutil" ,python-dateutil)
10405 ("python-six" ,python-six)))
10406 (home-page "https://github.com/joke2k/faker")
10407 (synopsis "Python package that generates fake data")
10408 (description
10409 "Faker is a Python package that generates fake data such as names,
10410 addresses, and phone numbers.")
10411 (license license:expat)
10412 (properties `((python2-variant . ,(delay python2-faker))))))
10413
10414 (define-public python2-faker
10415 (let ((base (package-with-python2 (strip-python2-variant
10416 python-faker))))
10417 (package
10418 (inherit base)
10419 (propagated-inputs
10420 `(("python2-ipaddress" ,python2-ipaddress)
10421 ,@(package-propagated-inputs base))))))
10422
10423 (define-public python-pyaml
10424 (package
10425 (name "python-pyaml")
10426 (version "18.11.0")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "pyaml" version))
10430 (sha256
10431 (base32
10432 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10433 (build-system python-build-system)
10434 (native-inputs
10435 `(("python-unidecode" ,python-unidecode)))
10436 (propagated-inputs
10437 `(("python-pyyaml" ,python-pyyaml)))
10438 (home-page "https://github.com/mk-fg/pretty-yaml")
10439 (synopsis "YAML pretty-print library for Python")
10440 (description
10441 "pyaml is a PyYAML based python module to produce pretty and readable
10442 YAML-serialized data.")
10443 (license license:wtfpl2)))
10444
10445 (define-public python2-pyaml
10446 (package-with-python2 python-pyaml))
10447
10448 (define-public python-backpack
10449 (package
10450 (name "python-backpack")
10451 (version "0.1")
10452 (source
10453 (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "backpack" version))
10456 (sha256
10457 (base32
10458 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10459 (build-system python-build-system)
10460 (native-inputs
10461 `(("python-pytest" ,python-pytest)
10462 ("python-nose" ,python-nose)))
10463 (propagated-inputs
10464 `(("python-simplejson" ,python-simplejson)))
10465 (home-page "https://github.com/sdispater/backpack")
10466 (synopsis "Utilities for working with Python collections")
10467 (description "Backpack provides some useful utilities for working with
10468 collections of data.")
10469 (license license:expat)))
10470
10471 (define-public python2-backpack
10472 (package-with-python2 python-backpack))
10473
10474 (define-public python-prompt-toolkit
10475 (package
10476 (name "python-prompt-toolkit")
10477 (version "2.0.7")
10478 (source
10479 (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10482 (sha256
10483 (base32
10484 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10485 (build-system python-build-system)
10486 (arguments
10487 `(#:phases
10488 (modify-phases %standard-phases
10489 (delete 'check)
10490 (add-after 'install 'post-install-check
10491 (lambda* (#:key inputs outputs #:allow-other-keys)
10492 ;; HOME is needed for the test
10493 ;; "test_pathcompleter_can_expanduser".
10494 (setenv "HOME" "/tmp")
10495 (add-installed-pythonpath inputs outputs)
10496 (invoke "py.test"))))))
10497 (propagated-inputs
10498 `(("python-wcwidth" ,python-wcwidth)
10499 ("python-six" ,python-six)
10500 ("python-pygments" ,python-pygments)))
10501 (native-inputs
10502 `(("python-pytest" ,python-pytest)))
10503 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10504 (synopsis "Library for building command line interfaces in Python")
10505 (description
10506 "Prompt-Toolkit is a library for building interactive command line
10507 interfaces in Python. It's like GNU Readline but it also features syntax
10508 highlighting while typing, out-of-the-box multi-line input editing, advanced
10509 code completion, incremental search, support for Chinese double-width
10510 characters, mouse support, and auto suggestions.")
10511 (license license:bsd-3)))
10512
10513 (define-public python2-prompt-toolkit
10514 (package-with-python2 python-prompt-toolkit))
10515
10516 (define-public python-prompt-toolkit-1
10517 (package (inherit python-prompt-toolkit)
10518 (version "1.0.15")
10519 (source
10520 (origin
10521 (method url-fetch)
10522 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10523 (sha256
10524 (base32
10525 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10526
10527 (define-public python2-prompt-toolkit-1
10528 (package-with-python2 python-prompt-toolkit-1))
10529
10530 (define-public python-jedi
10531 (package
10532 (name "python-jedi")
10533 (version "0.13.3")
10534 (source
10535 (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "jedi" version))
10538 (sha256
10539 (base32
10540 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10541 (build-system python-build-system)
10542 (arguments
10543 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10544 ;; https://github.com/davidhalter/jedi/issues/1263)
10545 #:tests? #f
10546 #:phases
10547 (modify-phases %standard-phases
10548 (replace 'check
10549 (lambda* (#:key tests? #:allow-other-keys)
10550 (when tests?
10551 (invoke "py.test" "-vv")))))))
10552 (native-inputs
10553 `(("python-pytest" ,python-pytest)
10554 ("python-docopt" ,python-docopt)))
10555 (propagated-inputs
10556 `(("python-parso" ,python-parso)))
10557 (home-page "https://github.com/davidhalter/jedi")
10558 (synopsis "Autocompletion and static analysis library for Python")
10559 (description
10560 "Jedi is a static analysis tool for Python that can be used in Integrated
10561 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10562 on a deeper level than many other static analysis frameworks for Python.
10563
10564 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10565 well.")
10566 (license license:expat)))
10567
10568 (define-public python2-jedi
10569 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10570 (package
10571 (inherit base)
10572 (arguments (substitute-keyword-arguments (package-arguments base)
10573 ((#:tests? _) #t))))))
10574
10575 (define-public ptpython
10576 (package
10577 (name "ptpython")
10578 (version "0.34")
10579 (source (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "ptpython" version))
10582 (sha256
10583 (base32
10584 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10585 (build-system python-build-system)
10586 (arguments
10587 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10588 (propagated-inputs
10589 `(("python-docopt" ,python-docopt)
10590 ("python-jedi" ,python-jedi)
10591 ("python-prompt-toolkit" ,python-prompt-toolkit)
10592 ("python-pygments" ,python-pygments)))
10593 (home-page "https://github.com/jonathanslenders/ptpython")
10594 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10595 (description
10596 "ptpython is a Python read-eval-print loop with IDE-like features.
10597 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10598 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10599 etc.")
10600 (license license:bsd-3)
10601 (properties `((python2-variant . ,(delay ptpython-2))))))
10602
10603 (define-public ptpython-2
10604 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10605 (package
10606 (inherit base)
10607 (name "ptpython2"))))
10608
10609 (define-public python-stem
10610 (package
10611 (name "python-stem")
10612 (version "1.7.1")
10613 (source
10614 (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "stem" version))
10617 (sha256
10618 (base32
10619 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10620 (build-system python-build-system)
10621 (arguments
10622 `(#:phases
10623 (modify-phases %standard-phases
10624 (replace 'check
10625 (lambda _
10626 (invoke "./run_tests.py" "--unit")
10627 #t)))))
10628 (native-inputs
10629 `(("python-mock" ,python-mock)
10630 ("python-pycodestyle" ,python-pycodestyle)
10631 ("python-pyflakes" ,python-pyflakes)))
10632 (home-page "https://stem.torproject.org/")
10633 (synopsis
10634 "Python controller library that allows applications to interact with Tor")
10635 (description
10636 "Stem is a Python controller library for Tor. With it you can use Tor's
10637 control protocol to script against the Tor process and read descriptor data
10638 relays publish about themselves.")
10639 (license license:lgpl3)))
10640
10641 (define-public python2-stem
10642 (package-with-python2 python-stem))
10643
10644 (define-public python-pyserial
10645 (package
10646 (name "python-pyserial")
10647 (version "3.1.1")
10648 (source
10649 (origin
10650 (method url-fetch)
10651 (uri (pypi-uri "pyserial" version))
10652 (sha256
10653 (base32
10654 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10655 (build-system python-build-system)
10656 (arguments
10657 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10658 ;; #:phases
10659 ;; (modify-phases %standard-phases
10660 ;; (replace 'check
10661 ;; (lambda _
10662 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10663 (home-page
10664 "https://github.com/pyserial/pyserial")
10665 (synopsis "Python Serial Port Bindings")
10666 (description "@code{pyserial} provide serial port bindings for Python. It
10667 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10668 and/or Xon/Xoff. The port is accessed in RAW mode.")
10669 (license license:bsd-3)))
10670
10671 (define-public python2-pyserial
10672 (package-with-python2 python-pyserial))
10673
10674 (define-public python-kivy
10675 (package
10676 (name "python-kivy")
10677 (version "1.10.1")
10678 (source
10679 (origin
10680 (method url-fetch)
10681 (uri (pypi-uri "Kivy" version))
10682 (file-name (string-append name "-" version ".tar.gz"))
10683 (sha256
10684 (base32
10685 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10686 (build-system python-build-system)
10687 (arguments
10688 `(#:tests? #f ; Tests require many optional packages
10689 #:phases
10690 (modify-phases %standard-phases
10691 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10692 (lambda* (#:key inputs #:allow-other-keys)
10693 (setenv "KIVY_SDL2_PATH"
10694 (string-append (assoc-ref inputs "sdl-union")
10695 "/include/SDL2"))
10696 #t)))))
10697 (native-inputs
10698 `(("git" ,git)
10699 ("pkg-config" ,pkg-config)
10700 ("python-cython" ,python-cython)))
10701 (inputs
10702 `(("gstreamer" ,gstreamer)
10703 ("mesa" ,mesa)
10704 ("sdl-union"
10705 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10706 (home-page "http://kivy.org")
10707 (synopsis
10708 "Multitouch application framework")
10709 (description
10710 "A software library for rapid development of
10711 hardware-accelerated multitouch applications.")
10712 (license license:expat)))
10713
10714 (define-public python2-kivy
10715 (package-with-python2 python-kivy))
10716
10717 (define-public python-kivy-next
10718 (deprecated-package "python-kivy-next" python-kivy))
10719
10720 (define-public python2-kivy-next
10721 (deprecated-package "python2-kivy-next" python2-kivy))
10722
10723 (define-public python-binaryornot
10724 (package
10725 (name "python-binaryornot")
10726 (version "0.4.4")
10727 (source (origin
10728 (method url-fetch)
10729 (uri (pypi-uri "binaryornot" version))
10730 (sha256
10731 (base32
10732 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10733 (build-system python-build-system)
10734 (propagated-inputs
10735 `(("python-chardet" ,python-chardet)
10736 ("python-hypothesis" ,python-hypothesis)))
10737 (home-page "https://github.com/audreyr/binaryornot")
10738 (synopsis "Package to check if a file is binary or text")
10739 (description "Ultra-lightweight pure Python package to check if a file is
10740 binary or text.")
10741 (license license:bsd-3)
10742 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10743
10744 (define-public python2-binaryornot
10745 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10746 (package (inherit base)
10747 (propagated-inputs
10748 `(("python2-enum34" ,python2-enum34)
10749 ,@(package-propagated-inputs base))))))
10750
10751 (define-public python-nltk
10752 (package
10753 (name "python-nltk")
10754 (version "3.2.1")
10755 (source (origin
10756 (method url-fetch)
10757 (uri (pypi-uri "nltk" version))
10758 (sha256
10759 (base32
10760 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10761 (build-system python-build-system)
10762 (arguments
10763 '(;; The tests require some extra resources to be downloaded.
10764 ;; TODO Try packaging these resources.
10765 #:tests? #f))
10766 (home-page "http://nltk.org/")
10767 (synopsis "Natural Language Toolkit")
10768 (description "It provides interfaces to over 50 corpora and lexical
10769 resources such as WordNet, along with a suite of text processing libraries
10770 for classification, tokenization, stemming, tagging, parsing, and semantic
10771 reasoning, wrappers for natural language processing libraries.")
10772 (license license:asl2.0)))
10773
10774 (define-public python2-nltk
10775 (package-with-python2 python-nltk))
10776
10777 (define-public python-pymongo
10778 (package
10779 (name "python-pymongo")
10780 (version "3.7.2")
10781 (source (origin
10782 (method url-fetch)
10783 (uri (pypi-uri "pymongo" version))
10784 (sha256
10785 (base32
10786 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10787 (build-system python-build-system)
10788 (propagated-inputs
10789 `(("python-certifi" ,python-certifi)))
10790 (home-page "https://github.com/mongodb/mongo-python-driver")
10791 (synopsis "Python driver for MongoDB")
10792 (description "Python driver for MongoDB.")
10793 (license license:asl2.0)))
10794
10795 (define-public python2-pymongo
10796 (package-with-python2 python-pymongo))
10797
10798 (define-public python-consul
10799 (package
10800 (name "python-consul")
10801 (version "0.6.1")
10802 (source
10803 (origin
10804 (method url-fetch)
10805 (uri (pypi-uri "python-consul" version))
10806 (sha256
10807 (base32
10808 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10809 (build-system python-build-system)
10810 (arguments
10811 '(#:tests? #f)) ; The tests are not distributed
10812 (propagated-inputs
10813 `(("python-requests" ,python-requests)
10814 ("python-six" ,python-six)))
10815 (home-page "https://github.com/cablehead/python-consul")
10816 (synopsis "Python client for Consul")
10817 (description
10818 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10819 discovery, monitoring and configuration.")
10820 (license license:expat)))
10821
10822 (define-public python2-consul
10823 (package-with-python2 python-consul))
10824
10825 (define-public python-schematics
10826 (package
10827 (name "python-schematics")
10828 (version "1.1.1")
10829 (source
10830 (origin
10831 (method git-fetch)
10832 (uri (git-reference
10833 (url "https://github.com/schematics/schematics.git")
10834 (commit (string-append "v" version))))
10835 (file-name (git-file-name name version))
10836 (sha256
10837 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10838 (build-system python-build-system)
10839 (propagated-inputs
10840 `(("python-six" ,python-six)))
10841 (arguments
10842 ;; The tests require a bunch of not very nice packages with fixed
10843 ;; version requirements (e.g. python-coveralls).
10844 `(#:tests? #f))
10845 (home-page "https://github.com/schematics/schematics")
10846 (synopsis "Python Data Structures for Humans")
10847 (description "Python Data Structures for Humans.")
10848 (license license:bsd-3)))
10849
10850 (define-public python2-schematics
10851 (package-with-python2 python-schematics))
10852
10853 (define-public python-odfpy
10854 (package
10855 (name "python-odfpy")
10856 (version "1.3.3")
10857 (source (origin
10858 (method url-fetch)
10859 (uri (pypi-uri "odfpy" version))
10860 (sha256
10861 (base32
10862 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10863 (arguments
10864 `(#:modules ((srfi srfi-1)
10865 (guix build python-build-system)
10866 (guix build utils))
10867 #:phases
10868 (modify-phases %standard-phases
10869 (replace 'check
10870 ;; The test runner invokes python2 and python3 for test*.py.
10871 ;; To avoid having both in inputs, we replicate it here.
10872 (lambda _
10873 (for-each (lambda (test-file) (invoke "python" test-file))
10874 (find-files "tests" "^test.*\\.py$"))
10875 #t)))))
10876 (build-system python-build-system)
10877 (home-page "https://github.com/eea/odfpy")
10878 (synopsis "Python API and tools to manipulate OpenDocument files")
10879 (description "Collection of libraries and utility programs written in
10880 Python to manipulate OpenDocument 1.2 files.")
10881 (license
10882 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10883 ;; number of files with other licenses.
10884 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10885
10886 (define-public python2-odfpy
10887 (package-with-python2 python-odfpy))
10888
10889 (define-public python-natsort
10890 (package
10891 (name "python-natsort")
10892 (version "5.4.1")
10893 (source (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "natsort" version))
10896 (sha256
10897 (base32
10898 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10899 (build-system python-build-system)
10900 (arguments
10901 `(#:modules ((guix build utils)
10902 (guix build python-build-system)
10903 (srfi srfi-1)
10904 (srfi srfi-26)
10905 (ice-9 ftw))
10906 #:phases
10907 (modify-phases %standard-phases
10908 (add-before 'check 'set-cachedir
10909 ;; Tests require write access to $HOME by default
10910 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10911 (replace 'check
10912 (lambda _
10913 (let ((cwd (getcwd)))
10914 (setenv "PYTHONPATH"
10915 (string-append
10916 cwd "/build/"
10917 (find (cut string-prefix? "lib" <>)
10918 (scandir (string-append cwd "/build")))
10919 ":"
10920 (getenv "PYTHONPATH")))
10921 (invoke "pytest" "-v")))))))
10922 (native-inputs
10923 `(("python-hypothesis" ,python-hypothesis)
10924 ("python-pytest-cov" ,python-pytest-cov)
10925 ("python-pytest-mock" ,python-pytest-mock)
10926 ("python-pytest" ,python-pytest)))
10927 (propagated-inputs ; TODO: Add python-fastnumbers.
10928 `(("python-pyicu" ,python-pyicu)))
10929 (home-page "https://github.com/SethMMorton/natsort")
10930 (synopsis "Natural sorting for python and shell")
10931 (description
10932 "Natsort lets you apply natural sorting on lists instead of
10933 lexicographical. If you use the built-in @code{sorted} method in python
10934 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10935 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10936 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10937 identifies numbers and sorts them separately from strings. It can also sort
10938 version numbers, real numbers, mixed types and more, and comes with a shell
10939 command @command{natsort} that exposes this functionality in the command line.")
10940 (license license:expat)
10941 (properties `((python2-variant . ,(delay python2-natsort))))))
10942
10943 (define-public python2-natsort
10944 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10945 (package (inherit base)
10946 (native-inputs
10947 `(("python2-pathlib" ,python2-pathlib)
10948 ,@(package-native-inputs base))))))
10949
10950 (define-public python-glances
10951 (package
10952 (name "python-glances")
10953 (version "3.1.1")
10954 (source
10955 (origin
10956 (method url-fetch)
10957 (uri (pypi-uri "Glances" version))
10958 (sha256
10959 (base32
10960 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
10961 (modules '((guix build utils)))
10962 (snippet
10963 '(begin
10964 ;; Glances phones PyPI for weekly update checks by default.
10965 ;; Disable these. The user can re-enable them if desired.
10966 (substitute* "glances/outdated.py"
10967 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
10968 (string-append indentation
10969 "self.args.disable_check_update = True\n"
10970 line)))
10971 #t))))
10972 (build-system python-build-system)
10973 (propagated-inputs
10974 `(("python-future" ,python-future)
10975 ("python-psutil" ,python-psutil)))
10976 (home-page
10977 "https://github.com/nicolargo/glances")
10978 (synopsis "Cross-platform curses-based monitoring tool")
10979 (description
10980 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10981 Glances uses the PsUtil library to get information from your system. It
10982 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10983 (license license:lgpl3+)))
10984
10985 (define-public python2-glances
10986 (package-with-python2 python-glances))
10987
10988 (define-public python-graphql-core
10989 (package
10990 (name "python-graphql-core")
10991 (version "0.5.3")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "graphql-core" version))
10996 (sha256
10997 (base32
10998 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10999 (build-system python-build-system)
11000 (arguments
11001 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11002 #:phases
11003 (modify-phases %standard-phases
11004 (add-after 'unpack 'patch-hardcoded-version
11005 (lambda _ (substitute*
11006 "setup.py"
11007 (("'gevent==1.1rc1'") "'gevent'"))
11008 #t)))))
11009 (native-inputs
11010 `(("python-gevent" ,python-gevent)
11011 ("python-mock" ,python-mock)
11012 ("python-pytest-mock" ,python-pytest-mock)))
11013 (propagated-inputs
11014 `(("python-promise" ,python-promise)
11015 ("python-six" ,python-six)))
11016 (home-page "https://github.com/graphql-python/graphql-core")
11017 (synopsis "GraphQL implementation for Python")
11018 (description
11019 "GraphQL implementation for Python. GraphQL is a data query language and
11020 runtime designed and used to request and deliver data to mobile and web apps.
11021 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11022 to Python.")
11023 (license license:expat)))
11024
11025 (define-public python2-graphql-core
11026 (package-with-python2 python-graphql-core))
11027
11028 (define-public python-graphql-relay
11029 (package
11030 (name "python-graphql-relay")
11031 (version "0.4.5")
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "graphql-relay" version))
11036 (sha256
11037 (base32
11038 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11039 (build-system python-build-system)
11040 (arguments
11041 '(#:tests? #f)) ; The tests are not distributed
11042 (propagated-inputs
11043 `(("python-graphql-core" ,python-graphql-core)
11044 ("python-promise" ,python-promise)
11045 ("python-six" ,python-six)))
11046 (home-page "https://github.com/graphql-python/graphql-relay-py")
11047 (synopsis "Relay implementation for Python")
11048 (description
11049 "This is a library to allow the easy creation of Relay-compliant servers
11050 using the GraphQL Python reference implementation of a GraphQL server. It
11051 should be noted that the code is a exact port of the original
11052 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11053 from Facebook.")
11054 (license license:expat)))
11055
11056 (define-public python2-graphql-relay
11057 (package-with-python2 python-graphql-relay))
11058
11059 (define-public python-graphene
11060 (package
11061 (name "python-graphene")
11062 (version "0.10.2")
11063 (source
11064 (origin
11065 (method url-fetch)
11066 (uri (pypi-uri "graphene" version))
11067 (sha256
11068 (base32
11069 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11070 (build-system python-build-system)
11071 (propagated-inputs
11072 `(("python-graphql-core" ,python-graphql-core)
11073 ("python-graphql-relay" ,python-graphql-relay)
11074 ("python-iso8601" ,python-iso8601)
11075 ("python-promise" ,python-promise)
11076 ("python-six" ,python-six)))
11077 (arguments
11078 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11079 (home-page "http://graphene-python.org/")
11080 (synopsis "GraphQL Framework for Python")
11081 (description
11082 "Graphene is a Python library for building GraphQL schemas/types.
11083 A GraphQL schema describes your data model, and provides a GraphQL server
11084 with an associated set of resolve methods that know how to fetch data.")
11085 (properties `((python2-variant . ,(delay python2-graphene))))
11086 (license license:expat)))
11087
11088 (define-public python2-graphene
11089 (let ((base (package-with-python2
11090 (strip-python2-variant python-graphene))))
11091 (package (inherit base)
11092 (native-inputs
11093 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11094 ,@(package-native-inputs base))))))
11095
11096 (define-public python-nautilus
11097 (package
11098 (name "python-nautilus")
11099 (version "0.4.9")
11100 (source
11101 (origin
11102 (method url-fetch)
11103 (uri (pypi-uri "nautilus" version))
11104 (sha256
11105 (base32
11106 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11107 (build-system python-build-system)
11108 (arguments `(#:tests? #f)) ; fails to import test modules
11109 (propagated-inputs
11110 `(("python-bcrypt" ,python-bcrypt)
11111 ("python-click" ,python-click)
11112 ("python-consul" ,python-consul)
11113 ("python-graphene" ,python-graphene)
11114 ("python-jinja2" ,python-jinja2)
11115 ("python-peewee" ,python-peewee)
11116 ("python-pika" ,python-pika)
11117 ("python-tornado" ,python-tornado)
11118 ("python-wtforms" ,python-wtforms)))
11119 (native-inputs
11120 `(("python-nose2" ,python-nose2)))
11121 (home-page "https://github.com/AlecAivazis/nautilus")
11122 (synopsis "Library for creating microservice applications")
11123 (description
11124 "Nautilus is a framework for flux based microservices that looks to
11125 provide extendible implementations of common aspects of a cloud so that you can
11126 focus on building massively scalable web applications.")
11127 (license license:expat)))
11128
11129 (define-public python-snowballstemmer
11130 (package
11131 (name "python-snowballstemmer")
11132 (version "1.2.1")
11133 (source (origin
11134 (method url-fetch)
11135 (uri (pypi-uri "snowballstemmer" version))
11136 (sha256
11137 (base32
11138 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11139 (build-system python-build-system)
11140 (arguments
11141 `(;; No tests exist
11142 #:tests? #f))
11143 (home-page "https://github.com/shibukawa/snowball_py")
11144 (synopsis "Snowball stemming library collection for Python")
11145 (description "This package provides 16 word stemmer algorithms generated
11146 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11147 English stemmer.")
11148 (license license:bsd-3)))
11149
11150 (define-public python2-snowballstemmer
11151 (package-with-python2 python-snowballstemmer))
11152
11153 (define-public python-setproctitle
11154 (package
11155 (name "python-setproctitle")
11156 (version "1.1.10")
11157 (source
11158 (origin
11159 (method url-fetch)
11160 (uri (pypi-uri "setproctitle" version))
11161 (sha256
11162 (base32
11163 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11164 (build-system python-build-system)
11165 (arguments
11166 '(#:phases
11167 (modify-phases %standard-phases
11168 (add-before 'check 'patch-Makefile
11169 ;; Stricly this is only required for the python2 variant.
11170 ;; But adding a phase in an inherited package seems to be
11171 ;; cumbersum. So we patch even for python3.
11172 (lambda _
11173 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11174 (when nose
11175 (substitute* "Makefile"
11176 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11177 (string-append nose "/bin/nosetests "))))
11178 #t)))
11179 (replace 'check
11180 (lambda _
11181 (setenv "PYTHON" (or (which "python3") (which "python")))
11182 (setenv "PYCONFIG" (or (which "python3-config")
11183 (which "python-config")))
11184 (setenv "CC" "gcc")
11185 ;; No need to extend PYTHONPATH to find the built package, since
11186 ;; the Makefile will build anyway
11187 (invoke "make" "check"))))))
11188 (native-inputs
11189 `(("procps" ,procps))) ; required for tests
11190 (home-page
11191 "https://github.com/dvarrazzo/py-setproctitle")
11192 (synopsis
11193 "Setproctitle implementation for Python to customize the process title")
11194 (description "The library allows a process to change its title (as displayed
11195 by system tools such as ps and top).
11196
11197 Changing the title is mostly useful in multi-process systems, for
11198 example when a master process is forked: changing the children's title
11199 allows to identify the task each process is busy with. The technique
11200 is used by PostgreSQL and the OpenSSH Server for example.")
11201 (license license:bsd-3)
11202 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11203
11204 (define-public python2-setproctitle
11205 (let ((base (package-with-python2
11206 (strip-python2-variant python-setproctitle))))
11207 (package
11208 (inherit base)
11209 (native-inputs `(("python2-nose" ,python2-nose)
11210 ,@(package-native-inputs base))))))
11211
11212 (define-public python-validictory
11213 (package
11214 (name "python-validictory")
11215 (version "1.0.1")
11216 (source
11217 (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "validictory" version))
11220 (sha256
11221 (base32
11222 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11223 (build-system python-build-system)
11224 (arguments
11225 '(#:phases
11226 (modify-phases %standard-phases
11227 (add-after 'unpack 'bootstrap
11228 ;; Move the tests out of the package directory to avoid
11229 ;; packaging them.
11230 (lambda* _
11231 (rename-file "validictory/tests" "tests")
11232 (delete-file "tests/__init__.py")))
11233 (replace 'check
11234 (lambda _
11235 ;; Extend PYTHONPATH so the built package will be found.
11236 (setenv "PYTHONPATH"
11237 (string-append (getcwd) "/build/lib:"
11238 (getenv "PYTHONPATH")))
11239 (invoke "py.test" "-vv" ))))))
11240 (native-inputs
11241 `(("python-pytest" ,python-pytest)))
11242 (home-page
11243 "https://github.com/jamesturk/validictory")
11244 (synopsis "General purpose Python data validator")
11245 (description "It allows validation of arbitrary Python data structures.
11246
11247 The schema format is based on the JSON Schema
11248 proposal (http://json-schema.org), so combined with json the library is also
11249 useful as a validator for JSON data.")
11250 (license license:expat)))
11251
11252 (define-public python2-validictory
11253 (package-with-python2 python-validictory))
11254
11255 (define-public python-pyelftools
11256 (package
11257 (name "python-pyelftools")
11258 (version "0.25")
11259 (source
11260 (origin
11261 (method url-fetch)
11262 (uri (pypi-uri "pyelftools" version))
11263 (sha256
11264 (base32
11265 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11266 (build-system python-build-system)
11267 (arguments
11268 `(#:phases
11269 (modify-phases %standard-phases
11270 (add-before 'check 'set-pythonpath
11271 (lambda _
11272 (setenv "PYTHONPATH"
11273 (string-append
11274 (getcwd) "/test/"
11275 ":" (getenv "PYTHONPATH")))
11276 #t)))))
11277 (home-page
11278 "https://github.com/eliben/pyelftools")
11279 (synopsis
11280 "Analyze binary and library file information")
11281 (description "This Python library provides interfaces for parsing and
11282 analyzing two binary and library file formats; the Executable and Linking
11283 Format (ELF), and debugging information in the Debugging With Attributed
11284 Record Format (DWARF).")
11285 (license license:public-domain)))
11286
11287 (define-public python-pyev
11288 (package
11289 (name "python-pyev")
11290 (version "0.9.0")
11291 (source
11292 (origin
11293 (method url-fetch)
11294 (uri (pypi-uri "pyev" version))
11295 (sha256
11296 (base32
11297 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11298 (build-system python-build-system)
11299 (arguments
11300 `(#:tests? #f ; no test suite
11301 #:phases
11302 (modify-phases %standard-phases
11303 (add-after 'unpack 'patch
11304 (lambda* (#:key inputs #:allow-other-keys)
11305 (let ((libev (string-append (assoc-ref inputs "libev")
11306 "/lib/libev.so.4")))
11307 (substitute* "setup.py"
11308 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11309 (string-append "libev_dll_name = \"" libev "\"")))))))))
11310 (inputs
11311 `(("libev" ,libev)))
11312 (home-page "http://pythonhosted.org/pyev/")
11313 (synopsis "Python libev interface")
11314 (description "Pyev provides a Python interface to libev.")
11315 (license license:gpl3)))
11316
11317 (define-public python2-pyev
11318 (package-with-python2 python-pyev))
11319
11320 (define-public python-imagesize
11321 (package
11322 (name "python-imagesize")
11323 (version "1.1.0")
11324 (source
11325 (origin
11326 (method url-fetch)
11327 (uri (pypi-uri "imagesize" version))
11328 (sha256
11329 (base32
11330 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11331 (build-system python-build-system)
11332 (home-page "https://github.com/shibukawa/imagesize_py")
11333 (synopsis "Gets image size of files in various formats in Python")
11334 (description
11335 "This package allows determination of image size from
11336 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11337 (license license:expat)))
11338
11339 (define-public python2-imagesize
11340 (package-with-python2 python-imagesize))
11341
11342 (define-public python-termstyle
11343 (package
11344 (name "python-termstyle")
11345 (version "0.1.11")
11346 (source
11347 (origin
11348 (method url-fetch)
11349 (uri (pypi-uri "termstyle" version))
11350 (sha256
11351 (base32
11352 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11353 (build-system python-build-system)
11354 (arguments
11355 '(#:phases
11356 (modify-phases %standard-phases
11357 (replace 'check
11358 (lambda _
11359 (invoke "python" "test3.py"))))))
11360 (home-page "https://github.com/gfxmonk/termstyle")
11361 (synopsis "Console text coloring for Python")
11362 (description "This package provides console text coloring for Python.")
11363 (license license:bsd-3)))
11364
11365 (define-public python-argcomplete
11366 (package
11367 (name "python-argcomplete")
11368 (version "1.7.0")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "argcomplete" version))
11373 (sha256
11374 (base32
11375 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11376 (build-system python-build-system)
11377 (native-inputs
11378 `(("python-pexpect" ,python-pexpect)
11379 ("tcsh" ,tcsh)
11380 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11381 (home-page "https://github.com/kislyuk/argcomplete")
11382 (synopsis "Shell tab completion for Python argparse")
11383 (description "argcomplete provides extensible command line tab completion
11384 of arguments and options for Python scripts using @code{argparse}. It's
11385 particularly useful for programs with many options or sub-parsers that can
11386 dynamically suggest completions; for example, when browsing resources over the
11387 network.")
11388 (license license:asl2.0)))
11389
11390 (define-public python2-argcomplete
11391 (package-with-python2 python-argcomplete))
11392
11393 (define-public python-xopen
11394 (package
11395 (name "python-xopen")
11396 (version "0.5.0")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "xopen" version))
11401 (sha256
11402 (base32
11403 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11404 (build-system python-build-system)
11405 (propagated-inputs
11406 `(("python-setuptools-scm" ,python-setuptools-scm)))
11407 (home-page "https://github.com/marcelm/xopen/")
11408 (synopsis "Open compressed files transparently")
11409 (description "This module provides an @code{xopen} function that works like
11410 Python's built-in @code{open} function, but can also deal with compressed files.
11411 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11412 recognized by their file extensions. The focus is on being as efficient as
11413 possible on all supported Python versions.")
11414 (license license:expat)))
11415
11416 (define-public python2-xopen
11417 (let ((base (package-with-python2
11418 (strip-python2-variant python-xopen))))
11419 (package
11420 (inherit base)
11421 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11422 ,@(package-propagated-inputs base))))))
11423
11424 (define-public python-cheetah
11425 (package
11426 (name "python-cheetah")
11427 (version "3.1.0")
11428 (source
11429 (origin
11430 (method url-fetch)
11431 (uri (pypi-uri "Cheetah3" version))
11432 (sha256
11433 (base32
11434 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11435 (build-system python-build-system)
11436 (arguments
11437 `(#:modules ((guix build utils)
11438 (guix build python-build-system)
11439 (ice-9 ftw)
11440 (srfi srfi-1)
11441 (srfi srfi-26))
11442 #:phases (modify-phases %standard-phases
11443 (add-after 'unpack 'use-absolute-python
11444 (lambda _
11445 (substitute* "Cheetah/CheetahWrapper.py"
11446 (("#!/usr/bin/env python")
11447 (string-append "#!" (which "python"))))
11448 #t))
11449 (replace 'check
11450 (lambda _
11451 (let ((cwd (getcwd)))
11452 (setenv "PYTHONPATH"
11453 (string-append
11454 cwd "/build/"
11455 (find (cut string-prefix? "lib" <>)
11456 (scandir (string-append cwd "/build")))
11457 ":" (getenv "PYTHONPATH")))
11458 (setenv "PATH"
11459 (string-append (getenv "PATH")
11460 ":" cwd "/bin"))
11461 (setenv "TMPDIR" "/tmp")
11462
11463 (substitute* "Cheetah/Tests/Test.py"
11464 (("unittest.TextTestRunner\\(\\)")
11465 "unittest.TextTestRunner(verbosity=2)"))
11466
11467 (invoke "python" "Cheetah/Tests/Test.py")))))))
11468 (propagated-inputs
11469 `(("python-markdown" ,python-markdown))) ;optional
11470 (home-page "http://cheetahtemplate.org/")
11471 (synopsis "Template engine")
11472 (description "Cheetah is a text-based template engine and Python code
11473 generator.
11474
11475 Cheetah can be used as a standalone templating utility or referenced as
11476 a library from other Python applications. It has many potential uses,
11477 but web developers looking for a viable alternative to ASP, JSP, PHP and
11478 PSP are expected to be its principle user group.
11479
11480 Features:
11481 @enumerate
11482 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11483 text-based format.
11484 @item Cleanly separates content, graphic design, and program code.
11485 @item Blends the power and flexibility of Python with a simple template language
11486 that non-programmers can understand.
11487 @item Gives template writers full access to any Python data structure, module,
11488 function, object, or method in their templates.
11489 @item Makes code reuse easy by providing an object-orientated interface to
11490 templates that is accessible from Python code or other Cheetah templates.
11491 One template can subclass another and selectively reimplement sections of it.
11492 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11493 improve the performance of a dynamic website.
11494 @item Compiles templates into optimized, yet readable, Python code.
11495 @end enumerate")
11496 (license (license:x11-style "file://LICENSE"))))
11497
11498 (define-public python2-cheetah
11499 (package-with-python2 python-cheetah))
11500
11501 (define-public python-dulwich
11502 (package
11503 (name "python-dulwich")
11504 (version "0.18.6")
11505 (source
11506 (origin
11507 (method url-fetch)
11508 (uri (list (string-append "https://www.dulwich.io/releases/"
11509 "dulwich-" version ".tar.gz")
11510 (pypi-uri "dulwich" version)))
11511 (sha256
11512 (base32
11513 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11514 (build-system python-build-system)
11515 (arguments
11516 `(#:phases
11517 (modify-phases %standard-phases
11518 (add-before 'check 'fix-tests
11519 (lambda* (#:key inputs #:allow-other-keys)
11520 ;; The tests use Popen with a custom environment which doesn't
11521 ;; include PATH.
11522 (substitute* "dulwich/tests/compat/utils.py"
11523 (("'git'") (string-append "'"
11524 (which "git")
11525 "'")))
11526 (substitute* '("dulwich/tests/test_repository.py"
11527 "dulwich/tests/test_hooks.py")
11528 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11529 (setenv "TEST_RUNNER" "unittest")
11530 (setenv "PYTHONHASHSEED" "random")
11531 #t)))))
11532 (propagated-inputs
11533 `(("python-fastimport" ,python-fastimport)))
11534 (native-inputs
11535 `(("python-mock" ,python-mock)
11536 ("python-geventhttpclient" ,python-geventhttpclient)
11537 ("git" ,git)))
11538 (home-page "https://www.dulwich.io/")
11539 (synopsis "Git implementation in Python")
11540 (description "Dulwich is an implementation of the Git file formats and
11541 protocols written in pure Python.")
11542 ;; Can be used with either license.
11543 (license (list license:asl2.0 license:gpl2+))))
11544
11545 (define-public python2-dulwich
11546 (package-with-python2 python-dulwich))
11547
11548 (define-public python-pbkdf2
11549 (package
11550 (name "python-pbkdf2")
11551 (version "1.3")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "pbkdf2" version))
11556 (sha256
11557 (base32
11558 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11559 (build-system python-build-system)
11560 (arguments
11561 '(#:phases
11562 (modify-phases %standard-phases
11563 (replace 'check
11564 (lambda _
11565 (setenv "PYTHONPATH"
11566 (string-append (getcwd) "/build/lib:"
11567 (getenv "PYTHONPATH")))
11568 (invoke "python" "test/test_pbkdf2.py"))))))
11569 (propagated-inputs
11570 `(("python-pycrypto" ,python-pycrypto))) ; optional
11571 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11572 (synopsis "Password-based key derivation")
11573 (description "This module implements the password-based key derivation
11574 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11575
11576 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11577 is part of the RSA Public Key Cryptography Standards series. The provided
11578 implementation takes a password or a passphrase and a salt value (and
11579 optionally a iteration count, a digest module, and a MAC module) and provides
11580 a file-like object from which an arbitrarly-sized key can be read.")
11581 (license license:expat)))
11582
11583 (define-public python2-pbkdf2
11584 (package-with-python2 python-pbkdf2))
11585
11586 (define-public python-qrcode
11587 (package
11588 (name "python-qrcode")
11589 (version "6.1")
11590 (source
11591 (origin
11592 (method url-fetch)
11593 (uri (pypi-uri "qrcode" version))
11594 (sha256
11595 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11596 (build-system python-build-system)
11597 (arguments
11598 ;; FIXME: Tests require packaging 'pymaging'.
11599 '(#:tests? #f))
11600 (propagated-inputs
11601 `(("python-lxml" ,python-lxml) ; for SVG output
11602 ("python-pillow" ,python-pillow) ; for PNG output
11603 ("python-six" ,python-six)))
11604 (home-page "https://github.com/lincolnloop/python-qrcode")
11605 (synopsis "QR Code image generator")
11606 (description "This package provides a pure Python QR Code generator
11607 module. It uses the Python Imaging Library (PIL) to allow for the generation
11608 of QR Codes.
11609
11610 In addition this package provides a command line tool to generate QR codes and
11611 either write these QR codes to a file or do the output as ascii art at the
11612 console.")
11613 (license license:bsd-3)))
11614
11615 (define-public python2-qrcode
11616 (package-with-python2 python-qrcode))
11617
11618 (define-public python-rst2ansi
11619 (package
11620 (name "python-rst2ansi")
11621 (version "0.1.5")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 (uri (pypi-uri "rst2ansi" version))
11626 (sha256
11627 (base32
11628 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11629 (build-system python-build-system)
11630 (propagated-inputs
11631 `(("python-docutils" ,python-docutils)))
11632 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11633 (synopsis "Convert RST to ANSI-decorated console output")
11634 (description
11635 "Python module dedicated to rendering RST (reStructuredText) documents
11636 to ansi-escaped strings suitable for display in a terminal.")
11637 (license license:expat)))
11638
11639 (define-public python-ansi2html
11640 (package
11641 (name "python-ansi2html")
11642 (version "1.2.0")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "ansi2html" version))
11647 (sha256
11648 (base32
11649 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11650 (build-system python-build-system)
11651 (native-inputs
11652 `(("python-mock" ,python-mock)
11653 ("python-nose" ,python-nose)))
11654 (propagated-inputs
11655 `(("python-six" ,python-six)))
11656 (home-page "https://github.com/ralphbean/ansi2html")
11657 (synopsis "Convert ANSI-decorated console output to HTML")
11658 (description
11659 "@command{ansi2html} is a Python library and command line utility for
11660 convering text with ANSI color codes to HTML or LaTeX.")
11661 (license license:gpl3+)))
11662
11663 (define-public python2-ansi2html
11664 (package-with-python2 python-ansi2html))
11665
11666 (define-public python-ddt
11667 (package
11668 (name "python-ddt")
11669 (version "1.1.3")
11670 (source
11671 (origin
11672 (method url-fetch)
11673 (uri (pypi-uri "ddt" version))
11674 (sha256
11675 (base32
11676 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11677 (build-system python-build-system)
11678 (native-inputs
11679 `(("python-mock" ,python-mock)
11680 ("python-nose" ,python-nose)))
11681 (propagated-inputs
11682 `(("python-six" ,python-six)
11683 ("python-pyyaml" ,python-pyyaml)))
11684 (home-page "https://github.com/txels/ddt")
11685 (synopsis "Data-Driven Tests")
11686 (description
11687 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11688 running it with different test data, and make it appear as multiple test
11689 cases.")
11690 (license license:expat)))
11691
11692 (define-public python2-ddt
11693 (package-with-python2 python-ddt))
11694
11695 (define-public python-pycountry
11696 (package
11697 (name "python-pycountry")
11698 (version "18.5.26")
11699 (source
11700 (origin
11701 (method url-fetch)
11702 (uri (pypi-uri "pycountry" version))
11703 (sha256
11704 (base32
11705 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11706 (build-system python-build-system)
11707 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11708 (synopsis "ISO databases for languages, countries, currencies, etc.")
11709 (description
11710 "@code{pycountry} provides the ISO databases for the standards:
11711 @enumerate
11712 @item 639-3 (Languages)
11713 @item 3166 (Countries)
11714 @item 3166-3 (Deleted Countries)
11715 @item 3166-2 (Subdivisions of countries)
11716 @item 4217 (Currencies)
11717 @item 15924 (Scripts)
11718 @end enumerate
11719 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11720 through a Python API.")
11721 (license license:lgpl2.1+)))
11722
11723 (define-public python2-pycountry
11724 (package-with-python2 python-pycountry))
11725
11726 (define-public python-pycosat
11727 (package
11728 (name "python-pycosat")
11729 (version "0.6.1")
11730 (source
11731 (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "pycosat" version))
11734 (sha256
11735 (base32
11736 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11737 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11738 (build-system python-build-system)
11739 (home-page "https://github.com/ContinuumIO/pycosat")
11740 (synopsis "Bindings to picosat (a SAT solver)")
11741 (description
11742 "This package provides efficient Python bindings to @code{picosat} on
11743 the C level. When importing pycosat, the @code{picosat} solver becomes part
11744 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11745 Problem} (SAT) solver.")
11746 (license license:expat)))
11747
11748 (define-public python2-pycosat
11749 (package-with-python2 python-pycosat))
11750
11751 (define-public python2-ruamel.ordereddict
11752 (package
11753 (name "python2-ruamel.ordereddict")
11754 (version "0.4.9")
11755 (source
11756 (origin
11757 (method url-fetch)
11758 (uri (pypi-uri "ruamel.ordereddict" version))
11759 (sha256
11760 (base32
11761 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11762 (build-system python-build-system)
11763 (arguments
11764 `(#:python ,python-2
11765 #:phases
11766 (modify-phases %standard-phases
11767 (delete 'check)
11768 (add-after 'install 'check
11769 (lambda* (#:key inputs outputs #:allow-other-keys)
11770 (add-installed-pythonpath inputs outputs)
11771 (invoke "python" "test/testordereddict.py"))))))
11772 (home-page "https://bitbucket.org/ruamel/ordereddict")
11773 (synopsis "Version of dict that keeps keys in insertion order")
11774 (description
11775 "This is an implementation of an ordered dictionary with @dfn{Key
11776 Insertion Order} (KIO: updates of values do not affect the position of the
11777 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11778 removed and put at the back). The standard library module @code{OrderedDict},
11779 implemented later, implements a subset of @code{ordereddict} functionality.
11780 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11781 Order} (KSO, no sorting function can be specified, but a transform can be
11782 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11783 (license license:expat)))
11784
11785 (define-public python-pypeg2
11786 (package
11787 (name "python-pypeg2")
11788 (version "2.15.2")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "pyPEG2" version))
11793 (sha256
11794 (base32
11795 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11796 (build-system python-build-system)
11797 (propagated-inputs `(("python-lxml" ,python-lxml)))
11798 (arguments
11799 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11800 '(#:tests? #f))
11801 (home-page "https://fdik.org/pyPEG/")
11802 (synopsis "Parsering Expression Grammars in Python")
11803 (description "PyPEG is an intrinsic parser interpreter framework for
11804 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11805 parse many formal languages.")
11806 (license license:gpl2)))
11807
11808 (define-public python-incremental
11809 (package
11810 (name "python-incremental")
11811 (version "17.5.0")
11812 (source
11813 (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "incremental" version))
11816 (sha256
11817 (base32
11818 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11819 (build-system python-build-system)
11820 (home-page "https://github.com/hawkowl/incremental")
11821 (synopsis "Library for versioning Python projects")
11822 (description "Incremental is a small library that versions your Python
11823 projects.")
11824 (license license:expat)))
11825
11826 (define-public python2-incremental
11827 (package-with-python2 python-incremental))
11828
11829 (define-public python-invoke
11830 (package
11831 (name "python-invoke")
11832 (home-page "http://www.pyinvoke.org/")
11833 (version "1.1.0")
11834 (source (origin
11835 (method url-fetch)
11836 (uri (pypi-uri "invoke" version))
11837 (sha256
11838 (base32
11839 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11840 (build-system python-build-system)
11841 (arguments
11842 ;; XXX: Requires many dependencies that are not yet in Guix.
11843 `(#:tests? #f))
11844 (synopsis "Pythonic task execution")
11845 (description
11846 "Invoke is a Python task execution tool and library, drawing inspiration
11847 from various sources to arrive at a powerful and clean feature set. It is
11848 evolved from the Fabric project, but focuses on local and abstract concerns
11849 instead of servers and network commands.")
11850 (license license:bsd-3)))
11851
11852 (define-public python2-invoke
11853 (package-with-python2 python-invoke))
11854
11855 (define-public python-automat
11856 (package
11857 (name "python-automat")
11858 (version "0.7.0")
11859 (source (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "Automat" version))
11862 (sha256
11863 (base32
11864 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11865 (build-system python-build-system)
11866 ;; We disable the tests because they require python-twisted, while
11867 ;; python-twisted depends on python-automat. Twisted is optional, but the
11868 ;; tests fail if it is not available. Also see
11869 ;; <https://github.com/glyph/automat/issues/71>.
11870 (arguments '(#:tests? #f))
11871 (native-inputs
11872 `(("python-m2r" ,python-m2r)
11873 ("python-setuptools-scm" ,python-setuptools-scm)
11874 ("python-graphviz" ,python-graphviz)))
11875 (propagated-inputs
11876 `(("python-six" ,python-six)
11877 ("python-attrs" ,python-attrs)))
11878 (home-page "https://github.com/glyph/Automat")
11879 (synopsis "Self-service finite-state machines")
11880 (description "Automat is a library for concise, idiomatic Python
11881 expression of finite-state automata (particularly deterministic finite-state
11882 transducers).")
11883 (license license:expat)))
11884
11885 (define-public python2-automat
11886 (package-with-python2 python-automat))
11887
11888 (define-public python-m2r
11889 (package
11890 (name "python-m2r")
11891 (version "0.2.1")
11892 (source (origin
11893 (method url-fetch)
11894 (uri (pypi-uri "m2r" version))
11895 (sha256
11896 (base32
11897 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11898 (build-system python-build-system)
11899 (propagated-inputs
11900 `(("python-docutils" ,python-docutils)
11901 ("python-mistune" ,python-mistune)))
11902 (native-inputs
11903 `(("python-pygments" ,python-pygments)
11904 ("python-mock" ,python-mock)))
11905 (home-page "https://github.com/miyakogi/m2r")
11906 (synopsis "Markdown to reStructuredText converter")
11907 (description "M2R converts a markdown file including reST markups to valid
11908 reST format.")
11909 (license license:expat)))
11910
11911 (define-public python2-m2r
11912 (package-with-python2 python-m2r))
11913
11914 (define-public python-constantly
11915 (package
11916 (name "python-constantly")
11917 (version "15.1.0")
11918 (source (origin
11919 (method url-fetch)
11920 (uri (pypi-uri "constantly" version))
11921 (sha256
11922 (base32
11923 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11924 (build-system python-build-system)
11925 (home-page "https://github.com/twisted/constantly")
11926 (synopsis "Symbolic constants in Python")
11927 (description "Constantly is a Python library that provides symbolic
11928 constant support. It includes collections and constants with text, numeric,
11929 and bit flag values.")
11930 (license license:expat)))
11931
11932 (define-public python2-constantly
11933 (package-with-python2 python-constantly))
11934
11935 (define-public python-attrs
11936 (package
11937 (name "python-attrs")
11938 (version "19.1.0")
11939 (source (origin
11940 (method url-fetch)
11941 (uri (pypi-uri "attrs" version))
11942 (sha256
11943 (base32
11944 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11945 (build-system python-build-system)
11946 (arguments
11947 `(#:modules ((guix build utils)
11948 (guix build python-build-system)
11949 (ice-9 ftw)
11950 (srfi srfi-1)
11951 (srfi srfi-26))
11952 #:phases (modify-phases %standard-phases
11953 (replace 'check
11954 (lambda _
11955 (let ((cwd (getcwd)))
11956 (setenv "PYTHONPATH"
11957 (string-append
11958 cwd "/build/"
11959 (find (cut string-prefix? "lib" <>)
11960 (scandir (string-append cwd "/build")))
11961 ":"
11962 (getenv "PYTHONPATH")))
11963 (invoke "python" "-m" "pytest")))))))
11964 (native-inputs
11965 `(("python-coverage" ,python-coverage)
11966 ("python-hypothesis" ,python-hypothesis)
11967 ("python-pympler" ,python-pympler)
11968 ("python-pytest" ,python-pytest)
11969 ("python-six" ,python-six)
11970 ("python-sphinx" ,python-sphinx)
11971 ("python-zope-interface" ,python-zope-interface)))
11972 (home-page "https://github.com/python-attrs/attrs/")
11973 (synopsis "Attributes without boilerplate")
11974 (description "@code{attrs} is a Python package with class decorators that
11975 ease the chores of implementing the most common attribute-related object
11976 protocols.")
11977 (license license:expat)))
11978
11979 (define-public python2-attrs
11980 (package-with-python2 python-attrs))
11981
11982 (define-public python-attrs-bootstrap
11983 (package
11984 (inherit python-attrs)
11985 (name "python-attrs-bootstrap")
11986 ;; Keep this on a fixed version so python-attrs can be updated without
11987 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11988 (version "17.4.0")
11989 (source (origin
11990 (method url-fetch)
11991 (uri (pypi-uri "attrs" version))
11992 (sha256
11993 (base32
11994 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11995 (native-inputs `())
11996 (arguments `(#:tests? #f))))
11997
11998 (define-public python2-attrs-bootstrap
11999 (package-with-python2 python-attrs-bootstrap))
12000
12001 (define-public python2-cliapp
12002 (package
12003 (name "python2-cliapp")
12004 (version "1.20180812.1")
12005 (source
12006 (origin
12007 (method url-fetch)
12008 (uri (string-append
12009 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12010 version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12014 (build-system python-build-system)
12015 (arguments
12016 `(#:python ,python-2
12017 #:phases
12018 (modify-phases %standard-phases
12019 ;; check phase needs to be run before the build phase. If not,
12020 ;; coverage-test-runner looks for tests for the built source files,
12021 ;; and fails.
12022 (delete 'check)
12023 (add-before 'build 'check
12024 (lambda _
12025 ;; Disable python3 tests
12026 (substitute* "check"
12027 (("python3") "# python3"))
12028 (invoke "./check"))))))
12029 (native-inputs
12030 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12031 ("python2-pep8" ,python2-pep8)))
12032 (propagated-inputs
12033 `(("python2-pyaml" ,python2-pyaml)))
12034 (home-page "https://liw.fi/cliapp/")
12035 (synopsis "Python framework for command line programs")
12036 (description "@code{python2-cliapp} is a python framework for
12037 command line programs. It contains the typical stuff such programs
12038 need to do, such as parsing the command line for options, and
12039 iterating over input files.")
12040 (license license:gpl2+)))
12041
12042 (define-public python2-ttystatus
12043 (package
12044 (name "python2-ttystatus")
12045 (version "0.36")
12046 (source
12047 (origin
12048 (method url-fetch)
12049 (uri (string-append
12050 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12051 version ".tar.gz"))
12052 (sha256
12053 (base32
12054 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12055 (build-system python-build-system)
12056 (native-inputs
12057 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12058 ("python2-pep8" ,python2-pep8)))
12059 (arguments
12060 `(#:python ,python-2
12061 #:phases
12062 (modify-phases %standard-phases
12063 ;; check phase needs to be run before the build phase. If not,
12064 ;; coverage-test-runner looks for tests for the built source files,
12065 ;; and fails.
12066 (delete 'check)
12067 (add-before 'build 'check
12068 (lambda _ (invoke "make" "check"))))))
12069 (home-page "https://liw.fi/ttystatus/")
12070 (synopsis "Python library for showing progress reporting and
12071 status updates on terminals")
12072 (description "@code{python2-ttystatus} is a python library for
12073 showing progress reporting and status updates on terminals, for
12074 command line programs. Output is automatically adapted to the width
12075 of the terminal: truncated if it does not fit, and resized if the
12076 terminal size changes.")
12077 (license license:gpl3+)))
12078
12079 (define-public python2-tracing
12080 (package
12081 (name "python2-tracing")
12082 (version "0.10")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (string-append
12087 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12088 version ".tar.gz"))
12089 (sha256
12090 (base32
12091 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12092 (build-system python-build-system)
12093 (arguments
12094 `(#:python ,python-2))
12095 (home-page "https://liw.fi/tracing/")
12096 (synopsis "Python debug logging helper")
12097 (description "@code{python2-tracing} is a python library for
12098 logging debug messages. It provides a way to turn debugging messages
12099 on and off, based on the filename they occur in. It is much faster
12100 than using @code{logging.Filter} to accomplish the same thing, which
12101 matters when code is run in production mode. The actual logging still
12102 happens using the @code{logging} library.")
12103 (license license:gpl3+)))
12104
12105 (define-public python2-larch
12106 (package
12107 (name "python2-larch")
12108 (version "1.20151025")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (string-append
12113 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12114 version ".tar.gz"))
12115 (patches (search-patches
12116 "python2-larch-coverage-4.0a6-compatibility.patch"))
12117 (sha256
12118 (base32
12119 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12120 (build-system python-build-system)
12121 (arguments
12122 `(#:python ,python-2
12123 #:phases
12124 (modify-phases %standard-phases
12125 ;; check phase needs to be run before the build phase. If not,
12126 ;; coverage-test-runner looks for tests for the built source files,
12127 ;; and fails.
12128 (delete 'check)
12129 (add-before 'build 'check
12130 (lambda _ (invoke "make" "check"))))))
12131 (native-inputs
12132 `(("cmdtest" ,cmdtest)
12133 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12134 (propagated-inputs
12135 `(("python2-tracing" ,python2-tracing)))
12136 (home-page "https://liw.fi/larch/")
12137 (synopsis "Python copy-on-write B-tree library")
12138 (description "@code{python2-larch} is an implementation of
12139 particular kind of B-tree, based on research by Ohad Rodeh. See
12140 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12141 on the data structure.
12142
12143 The distinctive feature of this B-tree is that a node is never
12144 (conceptually) modified. Instead, all updates are done by
12145 copy-on-write. This makes it easy to clone a tree, and modify only the
12146 clone, while other processes access the original tree.")
12147 (license license:gpl3+)))
12148
12149 (define-public python-astroid
12150 (package
12151 (name "python-astroid")
12152 (version "2.1.0")
12153 (source
12154 (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "astroid" version))
12157 (sha256
12158 (base32
12159 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12160 (build-system python-build-system)
12161 (propagated-inputs
12162 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12163 ("python-six" ,python-six)
12164 ("python-wrapt" ,python-wrapt)))
12165 (native-inputs
12166 `(("python-dateutil" ,python-dateutil)
12167 ("python-nose" ,python-nose)
12168 ("python-pytest" ,python-pytest)
12169 ("python-pytest-runner" ,python-pytest-runner)))
12170 (arguments
12171 `(#:phases
12172 (modify-phases %standard-phases
12173 (add-after 'unpack 'remove-spurious-test
12174 (lambda _
12175 ;; This can be removed after upgrading from python-3.7
12176 ;; https://github.com/PyCQA/astroid/issues/593
12177 ;; https://bugs.python.org/issue34056
12178 (delete-file "astroid/tests/unittest_modutils.py")
12179 #t))
12180 (replace 'check
12181 (lambda _
12182 (invoke "pytest" "astroid"))))))
12183 (home-page "https://github.com/PyCQA/astroid")
12184 (synopsis "Common base representation of python source code for pylint and
12185 other projects")
12186 (description "@code{python-astroid} provides a common base representation
12187 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12188
12189 It provides a compatible representation which comes from the _ast module. It
12190 rebuilds the tree generated by the builtin _ast module by recursively walking
12191 down the AST and building an extended ast. The new node classes have
12192 additional methods and attributes for different usages. They include some
12193 support for static inference and local name scopes. Furthermore, astroid
12194 builds partial trees by inspecting living objects.")
12195 (license license:lgpl2.1+)
12196 (properties `((python2-variant . ,(delay python2-astroid))))))
12197
12198 (define-public python2-astroid
12199 (let ((base (package-with-python2
12200 (strip-python2-variant python-astroid))))
12201 (package (inherit base)
12202 ;; Version 2.x removes python2 support.
12203 (version "1.6.5")
12204 (source
12205 (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "astroid" version))
12208 (sha256
12209 (base32
12210 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12211 (arguments
12212 (substitute-keyword-arguments (package-arguments base)
12213 ((#:phases phases)
12214 `(modify-phases ,phases
12215 (add-after 'unpack 'remove-spurious-test
12216 (lambda _
12217 ;; https://github.com/PyCQA/astroid/issues/276
12218 (delete-file "astroid/tests/unittest_brain.py")
12219 #t))
12220 (replace 'check
12221 (lambda _
12222 (invoke"python" "-m" "unittest" "discover"
12223 "-p" "unittest*.py")))))))
12224 (native-inputs `())
12225 (propagated-inputs
12226 `(("python2-backports-functools-lru-cache"
12227 ,python2-backports-functools-lru-cache)
12228 ("python2-enum34" ,python2-enum34)
12229 ("python2-singledispatch" ,python2-singledispatch)
12230 ,@(package-propagated-inputs base))))))
12231
12232 (define-public python-isort
12233 (package
12234 (name "python-isort")
12235 (version "4.3.4")
12236 (source
12237 (origin
12238 (method git-fetch)
12239 (uri (git-reference
12240 ;; Tests pass only from the Github sources
12241 (url "https://github.com/timothycrosley/isort")
12242 (commit version)))
12243 (file-name (git-file-name name version))
12244 (sha256
12245 (base32
12246 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12247 (build-system python-build-system)
12248 (native-inputs
12249 `(("python-mock" ,python-mock)
12250 ("python-pytest" ,python-pytest)))
12251 (home-page "https://github.com/timothycrosley/isort")
12252 (synopsis "Python utility/library to sort python imports")
12253 (description "@code{python-isort} is a python utility/library to sort
12254 imports alphabetically, and automatically separated into sections. It
12255 provides a command line utility, a python library and plugins for various
12256 editors.")
12257 (license license:expat)
12258 (properties `((python2-variant . ,(delay python2-isort))))))
12259
12260 (define-public python2-isort
12261 (let ((base (package-with-python2
12262 (strip-python2-variant python-isort))))
12263 (package (inherit base)
12264 (native-inputs
12265 `(("python2-futures" ,python2-futures)
12266 ,@(package-native-inputs base))))))
12267
12268 (define-public python2-backports-functools-lru-cache
12269 (package
12270 (name "python2-backports-functools-lru-cache")
12271 (version "1.5")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 ;; only the pypi tarballs contain the necessary metadata
12276 (uri (pypi-uri "backports.functools_lru_cache" version))
12277 (sha256
12278 (base32
12279 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12280 (build-system python-build-system)
12281 (native-inputs
12282 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12283 (arguments
12284 `(#:python ,python-2))
12285 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12286 (synopsis "Backport of functools.lru_cache from Python 3.3")
12287 (description "@code{python2-backports-functools-lru-cache} is a backport
12288 of @code{functools.lru_cache} from python 3.3.")
12289 (license license:expat)))
12290
12291 (define-public python-configparser
12292 (package
12293 (name "python-configparser")
12294 (version "3.5.0")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (string-append
12299 "https://bitbucket.org/ambv/configparser/get/"
12300 version ".tar.bz2"))
12301 (file-name (string-append name "-" version ".tar.gz"))
12302 (sha256
12303 (base32
12304 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12305 (build-system python-build-system)
12306 (home-page "https://github.com/jaraco/configparser/")
12307 (synopsis "Backport of configparser from python 3.5")
12308 (description "@code{python-configparser} is a backport of
12309 @code{configparser} from Python 3.5 so that it can be used directly
12310 in other versions.")
12311 (license license:expat)))
12312
12313 (define-public python2-configparser
12314 (package-with-python2 python-configparser))
12315
12316 (define-public python-mando
12317 (package
12318 (name "python-mando")
12319 (version "0.6.4")
12320 (source (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "mando" version))
12323 (sha256
12324 (base32
12325 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12326 (build-system python-build-system)
12327 (propagated-inputs
12328 `(("python-rst2ansi" ,python-rst2ansi)
12329 ("python-six" ,python-six)))
12330 (native-inputs
12331 `(("python-pytest" ,python-pytest)))
12332 (home-page "https://mando.readthedocs.org/")
12333 (synopsis
12334 "Wrapper around argparse, allowing creation of complete CLI applications")
12335 (description
12336 "This package is a wrapper around argparse, allowing you to write complete CLI
12337 applications in seconds while maintaining all the flexibility.")
12338 (license license:expat)))
12339
12340 (define-public python2-mando
12341 (package-with-python2 python-mando))
12342
12343 (define-public python2-argparse
12344 (package
12345 (name "python2-argparse")
12346 (version "1.4.0")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "argparse" version))
12351 (sha256
12352 (base32
12353 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12354 (build-system python-build-system)
12355 (arguments
12356 `(#:python ,python-2))
12357 (home-page "https://github.com/ThomasWaldmann/argparse/")
12358 (synopsis "Python command-line parsing library")
12359 (description
12360 "This package is mostly for people who want to have @code{argparse} on
12361 older Pythons because it was not part of the standard library back then.")
12362 (license license:psfl)))
12363
12364 (define-public python-fudge
12365 (package
12366 (name "python-fudge")
12367 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12368 ;; package, which is currently the only use of this package.
12369 (version "0.9.6")
12370 (source
12371 (origin
12372 (method url-fetch)
12373 (uri (pypi-uri "fudge" version))
12374 (sha256
12375 (base32
12376 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12377 (build-system python-build-system)
12378 (arguments
12379 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12380 (home-page "https://github.com/fudge-py/fudge")
12381 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12382 (description
12383 "Fudge is a Python module for using fake objects (mocks and stubs) to
12384 test real ones.
12385
12386 In readable Python code, you declare the methods available on your fake object
12387 and how they should be called. Then you inject that into your application and
12388 start testing. This declarative approach means you don’t have to record and
12389 playback actions and you don’t have to inspect your fakes after running code.
12390 If the fake object was used incorrectly then you’ll see an informative
12391 exception message with a traceback that points to the culprit.")
12392 (license license:expat)))
12393
12394 (define-public python2-fudge
12395 (package-with-python2 python-fudge))
12396
12397 (define-public python-mwclient
12398 (package
12399 (name "python-mwclient")
12400 (version "0.8.4")
12401 (source
12402 (origin
12403 (method url-fetch)
12404 ;; The PyPI version wouldn't contain tests.
12405 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12406 "v" version ".tar.gz"))
12407 (file-name (string-append name "-" version ".tar.gz"))
12408 (sha256
12409 (base32
12410 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12411 (build-system python-build-system)
12412 (propagated-inputs
12413 `(("python-requests" ,python-requests)
12414 ("python-requests-oauthlib"
12415 ,python-requests-oauthlib)
12416 ("python-six" ,python-six)))
12417 (native-inputs
12418 `(("python-mock" ,python-mock)
12419 ("python-pytest" ,python-pytest)
12420 ("python-pytest-pep8" ,python-pytest-pep8)
12421 ("python-pytest-cache" ,python-pytest-cache)
12422 ("python-pytest-cov" ,python-pytest-cov)
12423 ("python-responses" ,python-responses)))
12424 (home-page "https://github.com/btongminh/mwclient")
12425 (synopsis "MediaWiki API client")
12426 (description "This package provides a MediaWiki API client.")
12427 (license license:expat)))
12428
12429 (define-public python2-mwclient
12430 (package-with-python2 python-mwclient))
12431
12432 (define-public python-utils
12433 (package
12434 (name "python-utils")
12435 (version "2.1.0")
12436 (source (origin
12437 (method url-fetch)
12438 (uri (pypi-uri "python-utils" version))
12439 (sha256
12440 (base32
12441 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12442 (build-system python-build-system)
12443 (native-inputs
12444 `(("pytest-runner" ,python-pytest-runner)
12445 ("pytest" ,python-pytest)
12446 ("six" ,python-six)))
12447 (home-page "https://github.com/WoLpH/python-utils")
12448 (synopsis "Convenient utilities not included with the standard Python install")
12449 (description
12450 "Python Utils is a collection of small Python functions and classes which
12451 make common patterns shorter and easier.")
12452 (license license:bsd-2)))
12453
12454 (define-public python2-utils
12455 (package-with-python2 python-utils))
12456
12457 (define-public python-diff-match-patch
12458 (package
12459 (name "python-diff-match-patch")
12460 (version "20121119")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "diff-match-patch" version))
12465 (sha256
12466 (base32
12467 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12468 (build-system python-build-system)
12469 (home-page "https://code.google.com/p/google-diff-match-patch")
12470 (synopsis "Synchronize plain text")
12471 (description "Diff Match and Patch libraries offer robust algorithms to
12472 perform the operations required for synchronizing plain text.")
12473 (license license:asl2.0)))
12474
12475 (define-public python2-diff-match-patch
12476 (package-with-python2 python-diff-match-patch))
12477
12478 (define-public python-dirsync
12479 (package
12480 (name "python-dirsync")
12481 (version "2.2.3")
12482 (source
12483 (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "dirsync" version))
12486 (sha256
12487 (base32
12488 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12489 (build-system python-build-system)
12490 (propagated-inputs
12491 `(("six" ,python-six)))
12492 (home-page "https://bitbucket.org/tkhyn/dirsync")
12493 (synopsis "Advanced directory tree synchronisation tool")
12494 (description "Advanced directory tree synchronisation tool.")
12495 (license license:expat)))
12496
12497 (define-public python2-dirsync
12498 (package-with-python2 python-dirsync))
12499
12500 (define-public python-levenshtein
12501 (package
12502 (name "python-levenshtein")
12503 (version "0.12.0")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "python-Levenshtein" version))
12508 (sha256
12509 (base32
12510 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12511 (build-system python-build-system)
12512 (home-page "https://github.com/ztane/python-Levenshtein")
12513 (synopsis "Fast computation of Levenshtein distance and string similarity")
12514 (description
12515 "The Levenshtein Python C extension module contains functions for fast computation of
12516 @enumerate
12517 @item Levenshtein (edit) distance, and edit operations
12518 @item string similarity
12519 @item approximate median strings, and generally string averaging
12520 @item string sequence and set similarity
12521 @end enumerate
12522 It supports both normal and Unicode strings.")
12523 (license license:gpl2+)))
12524
12525 (define-public python2-levenshtein
12526 (package-with-python2 python-levenshtein))
12527
12528 (define-public python-scandir
12529 (package
12530 (name "python-scandir")
12531 (version "1.9.0")
12532 (source
12533 (origin
12534 (method url-fetch)
12535 (uri (pypi-uri "scandir" version))
12536 (sha256
12537 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12538 (build-system python-build-system)
12539 (arguments
12540 `(#:phases (modify-phases %standard-phases
12541 (replace 'check
12542 (lambda _
12543 (invoke "python" "test/run_tests.py"))))))
12544 (home-page "https://github.com/benhoyt/scandir")
12545 (synopsis "Directory iteration function")
12546 (description
12547 "Directory iteration function like os.listdir(), except that instead of
12548 returning a list of bare filenames, it yields DirEntry objects that include
12549 file type and stat information along with the name. Using scandir() increases
12550 the speed of os.walk() by 2-20 times (depending on the platform and file
12551 system) by avoiding unnecessary calls to os.stat() in most cases.
12552
12553 This package is part of the Python standard library since version 3.5.")
12554 (license license:bsd-3)))
12555
12556 (define-public python2-scandir
12557 (package-with-python2 python-scandir))
12558
12559 (define-public python2-stemming
12560 (package
12561 (name "python2-stemming")
12562 (version "1.0.1")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "stemming" version))
12567 (sha256
12568 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12569 (build-system python-build-system)
12570 (arguments
12571 `(#:python ,python-2))
12572 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12573 (synopsis "Python implementations of various stemming algorithms")
12574 (description
12575 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12576 stemming algorithms for English. These implementations are straightforward and
12577 efficient, unlike some Python versions of the same algorithms available on the
12578 Web. This package is an extraction of the stemming code included in the Whoosh
12579 search engine.")
12580 (license license:public-domain)))
12581
12582 (define-public python-factory-boy
12583 (package
12584 (name "python-factory-boy")
12585 (version "2.8.1")
12586 (source
12587 (origin
12588 (method url-fetch)
12589 (uri (pypi-uri "factory_boy" version))
12590 (sha256
12591 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12592 (build-system python-build-system)
12593 (arguments
12594 ;; Tests are not included in the tarball.
12595 `(#:tests? #f))
12596 (propagated-inputs
12597 `(("faker" ,python-faker)))
12598 (home-page "https://github.com/benhoyt/scandir")
12599 (synopsis "Versatile test fixtures replacement")
12600 (description
12601 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12602
12603 As a fixtures replacement tool, it aims to replace static, hard to maintain
12604 fixtures with easy-to-use factories for complex object.
12605
12606 Instead of building an exhaustive test setup with every possible combination
12607 of corner cases, factory_boy allows you to use objects customized for the
12608 current test, while only declaring the test-specific fields")
12609 (license license:expat)))
12610
12611 (define-public python2-factory-boy
12612 (package-with-python2 python-factory-boy))
12613
12614 (define-public python-translate-toolkit
12615 (package
12616 (name "python-translate-toolkit")
12617 (version "2.1.0")
12618 (source
12619 (origin
12620 (method url-fetch)
12621 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12622 (sha256
12623 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12624 (build-system python-build-system)
12625 (native-inputs
12626 `(("python-pytest" ,python-pytest)
12627 ("python-sphinx" ,python-sphinx)))
12628 (propagated-inputs
12629 `(("python-babel" ,python-babel)
12630 ("python-beautifulsoup4" ,python-beautifulsoup4)
12631 ("python-chardet" ,python-chardet)
12632 ("python-diff-match-patch" ,python-diff-match-patch)
12633 ("python-levenshtein" ,python-levenshtein)
12634 ("python-lxml" ,python-lxml)
12635 ("python-six" ,python-six)
12636 ("python-vobject" ,python-vobject)
12637 ("python-pyyaml" ,python-pyyaml)))
12638 (arguments
12639 ;; TODO: tests are not run, because they end with
12640 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12641 ;; 'parse_funcs'
12642 ;; during test setup.
12643 `(#:tests? #f))
12644 (home-page "https://toolkit.translatehouse.org")
12645 (synopsis "Tools and API for translation and localization engineering")
12646 (description
12647 "Tools and API for translation and localization engineering. It contains
12648 several utilities, as well as an API for building localization tools.")
12649 (license license:gpl2+)))
12650
12651 (define-public python2-translate-toolkit
12652 (package-with-python2 python-translate-toolkit))
12653
12654 (define-public python-packaging
12655 (package
12656 (name "python-packaging")
12657 (version "19.1")
12658 (source
12659 (origin
12660 (method url-fetch)
12661 (uri (pypi-uri "packaging" version))
12662 (sha256
12663 (base32
12664 "1zpaz9xrs6xawjs8l4xmfa0w5i66bc5f7nrfj00wr9sd563wm4f4"))))
12665 (build-system python-build-system)
12666 (arguments
12667 `(#:phases (modify-phases %standard-phases
12668 (replace 'check
12669 (lambda _ (invoke "py.test" "-vv"))))))
12670 (native-inputs
12671 `(("python-pretend" ,python-pretend)
12672 ("python-pytest" ,python-pytest)))
12673 (propagated-inputs
12674 `(("python-pyparsing" ,python-pyparsing)
12675 ("python-six" ,python-six)))
12676 (home-page "https://github.com/pypa/packaging")
12677 (synopsis "Core utilities for Python packages")
12678 (description "Packaging is a Python module for dealing with Python packages.
12679 It offers an interface for working with package versions, names, and dependency
12680 information.")
12681 ;; From 'LICENSE': This software is made available under the terms of
12682 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12683 ;; Contributions to this software is made under the terms of *both* these
12684 ;; licenses.
12685 (license (list license:asl2.0 license:bsd-2))))
12686
12687 (define-public python2-packaging
12688 (package-with-python2 python-packaging))
12689
12690 (define-public python-relatorio
12691 (package
12692 (name "python-relatorio")
12693 (version "0.8.0")
12694 (source
12695 (origin
12696 (method url-fetch)
12697 (uri (pypi-uri "relatorio" version))
12698 (sha256
12699 (base32
12700 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12701 (build-system python-build-system)
12702 (propagated-inputs
12703 `(("python-lxml" ,python-lxml)
12704 ("python-genshi" ,python-genshi)))
12705 (native-inputs
12706 `(("python-magic" ,python-magic)))
12707 (home-page "https://relatorio.tryton.org/")
12708 (synopsis "Templating library able to output ODT and PDF files")
12709 (description "Relatorio is a templating library which provides a way to
12710 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12711 for more filetypes can be easily added by creating plugins for them.")
12712 (license license:gpl3+)))
12713
12714 (define-public python2-relatorio
12715 (package-with-python2 python-relatorio))
12716
12717 (define-public python-radon
12718 (package
12719 (name "python-radon")
12720 (version "2.2.0")
12721 (source
12722 (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "radon" version))
12725 (sha256
12726 (base32
12727 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12728 (build-system python-build-system)
12729 (arguments
12730 `(#:phases (modify-phases %standard-phases
12731 (replace 'check
12732 (lambda _
12733 (invoke "python" "radon/tests/run.py"))))))
12734 (propagated-inputs
12735 `(("python-colorama" ,python-colorama)
12736 ("python-flake8-polyfill" ,python-flake8-polyfill)
12737 ("python-mando" ,python-mando)))
12738 (native-inputs
12739 `(("python-pytest" ,python-pytest)
12740 ("python-pytest-mock" ,python-pytest-mock)))
12741 (home-page "https://radon.readthedocs.org/")
12742 (synopsis "Code Metrics in Python")
12743 (description "Radon is a Python tool which computes various code metrics.
12744 Supported metrics are:
12745 @itemize @bullet
12746 @item raw metrics: SLOC, comment lines, blank lines, &c.
12747 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12748 @item Halstead metrics (all of them)
12749 @item the Maintainability Index (a Visual Studio metric)
12750 @end itemize")
12751 (license license:expat)))
12752
12753 (define-public python2-radon
12754 (package-with-python2 python-radon))
12755
12756 (define-public python-sure
12757 (package
12758 (name "python-sure")
12759 (version "1.4.11")
12760 (source
12761 (origin
12762 (method url-fetch)
12763 (uri (pypi-uri "sure" version))
12764 (sha256
12765 (base32
12766 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12767 (build-system python-build-system)
12768 (propagated-inputs
12769 `(("python-mock" ,python-mock)
12770 ("python-six" ,python-six)))
12771 (native-inputs
12772 `(("python-nose" ,python-nose)))
12773 (home-page "https://github.com/gabrielfalcao/sure")
12774 (synopsis "Automated testing library in python for python")
12775 (description
12776 "Sure is a python library that leverages a DSL for writing assertions.
12777 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12778 (license license:gpl3+)))
12779
12780 (define-public python2-sure
12781 (package-with-python2 python-sure))
12782
12783 (define-public python2-couleur
12784 ;; This package does not seem to support python3 at all, hence,
12785 ;; only the python2 variant definition is provided.
12786 (package
12787 (name "python2-couleur")
12788 (version "0.6.2")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "couleur" version))
12793 (sha256
12794 (base32
12795 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12796 (build-system python-build-system)
12797 (arguments
12798 `(#:python ,python-2))
12799 (home-page "https://github.com/gabrielfalcao/couleur")
12800 (synopsis
12801 "ANSI terminal tool for python, colored shell and other handy fancy features")
12802 (description
12803 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12804 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12805 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12806 ;; https://github.com/gabrielfalcao/couleur/issues/11
12807 (license license:lgpl3+)))
12808
12809 (define-public python-misaka
12810 (package
12811 (name "python-misaka")
12812 (version "2.1.1")
12813 (source
12814 (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "misaka" version))
12817 (sha256
12818 (base32
12819 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12820 (build-system python-build-system)
12821 (arguments
12822 `(;; Line 37 of setup.py calls self.run_command('develop')
12823 ;; in the 'check' phase. This command seems to be trying
12824 ;; to write to
12825 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12826 ;; for which it does not have the permission to write.
12827 #:tests? #f))
12828 (propagated-inputs
12829 `(("python-cffi" ,python-cffi)))
12830 (home-page "https://github.com/FSX/misaka")
12831 (synopsis "Python binding for Hoedown")
12832 (description
12833 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12834 library written in C. It features a fast HTML renderer and functionality to make custom
12835 renderers (e.g. man pages or LaTeX).")
12836 (license license:expat)))
12837
12838 (define-public python2-misaka
12839 (package-with-python2 python-misaka))
12840
12841 (define-public python2-steadymark
12842 ;; This is forced into being a python2 only variant
12843 ;; due to its dependence on couleur that has no support
12844 ;; for python3
12845 (package
12846 (name "python2-steadymark")
12847 (version "0.7.3")
12848 (source
12849 (origin
12850 (method url-fetch)
12851 (uri (pypi-uri "steadymark" version))
12852 (sha256
12853 (base32
12854 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12855 (build-system python-build-system)
12856 (native-inputs
12857 `(("python-couleur" ,python2-couleur)
12858 ("python-sure" ,python2-sure)
12859 ("python-misaka" ,python2-misaka)))
12860 (arguments
12861 `(#:python ,python-2
12862 #:phases
12863 (modify-phases %standard-phases
12864 (add-before 'build 'patch-setup-py
12865 (lambda _
12866 ;; Update requirements from dependency==version
12867 ;; to dependency>=version
12868 (substitute* "setup.py"
12869 (("==") ">="))
12870 #t)))))
12871 (home-page "https://github.com/gabrielfalcao/steadymark")
12872 (synopsis "Markdown-based test runner for python")
12873 (description
12874 "@code{Steadymark} allows documentation to be written in github-flavoured
12875 markdown. The documentation may contain snippets of code surrounded by python
12876 code blocks and @code{Steadymark} will find these snippets and run them, making
12877 sure that there are no old malfunctional examples in the documentation examples.")
12878 (license license:expat)))
12879
12880 (define-public python-jsonpointer
12881 (package
12882 (name "python-jsonpointer")
12883 (version "1.10")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "jsonpointer" version))
12888 (sha256
12889 (base32
12890 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12891 (build-system python-build-system)
12892 (home-page "https://github.com/stefankoegl/python-json-pointer")
12893 (synopsis "Identify specific nodes in a JSON document")
12894 (description "@code{jsonpointer} allows you to access specific nodes
12895 by path in a JSON document (see RFC 6901).")
12896 (license license:bsd-3)))
12897
12898 (define-public python2-jsonpointer
12899 (package-with-python2 python-jsonpointer))
12900
12901 (define-public python-jsonpatch
12902 (package
12903 (name "python-jsonpatch")
12904 (version "1.16")
12905 (source
12906 (origin
12907 (method url-fetch)
12908 ;; pypi version lacks tests.js
12909 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12910 "archive/v" version ".tar.gz"))
12911 (file-name (string-append name "-" version ".tar.gz"))
12912 (sha256
12913 (base32
12914 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12915 (build-system python-build-system)
12916 (native-inputs
12917 `(("python-jsonpointer" ,python-jsonpointer)))
12918 (home-page "https://github.com/stefankoegl/python-json-patch")
12919 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12920 (description "@code{jsonpatch} is a library and program that allows
12921 applying JSON Patches according to RFC 6902.")
12922 (license license:bsd-3)))
12923
12924 (define-public python2-jsonpatch
12925 (package-with-python2 python-jsonpatch))
12926
12927 (define-public python-jsonpatch-0.4
12928 (package (inherit python-jsonpatch)
12929 (name "python-jsonpatch")
12930 (version "0.4")
12931 (source
12932 (origin
12933 (method url-fetch)
12934 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12935 "archive/v" version ".tar.gz"))
12936 (file-name (string-append name "-" version ".tar.gz"))
12937 (sha256
12938 (base32
12939 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12940
12941 (define-public python2-jsonpatch-0.4
12942 (package-with-python2 python-jsonpatch-0.4))
12943
12944 (define-public python-rfc3986
12945 (package
12946 (name "python-rfc3986")
12947 (version "1.1.0")
12948 (source (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "rfc3986" version))
12951 (sha256
12952 (base32
12953 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12954 (build-system python-build-system)
12955 (arguments
12956 `(#:modules ((guix build utils)
12957 (guix build python-build-system)
12958 (ice-9 ftw)
12959 (srfi srfi-1)
12960 (srfi srfi-26))
12961 #:phases
12962 (modify-phases %standard-phases
12963 (replace 'check
12964 (lambda _
12965 (let ((cwd (getcwd)))
12966 (setenv "PYTHONPATH"
12967 (string-append cwd "/build/"
12968 (find (cut string-prefix? "lib" <>)
12969 (scandir (string-append cwd "/build")))
12970 ":"
12971 (getenv "PYTHONPATH")))
12972 (invoke "pytest" "-v")))))))
12973 (native-inputs
12974 `(("python-pytest" ,python-pytest)))
12975 (home-page "https://rfc3986.readthedocs.io/")
12976 (synopsis "Parse and validate URI references")
12977 (description
12978 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12979 validation and authority parsing. This module also supports RFC@tie{}6874
12980 which adds support for zone identifiers to IPv6 addresses.")
12981 (license license:asl2.0)))
12982
12983 (define-public python2-rfc3986
12984 (package-with-python2 python-rfc3986))
12985
12986 (define-public python-rfc3987
12987 (package
12988 (name "python-rfc3987")
12989 (version "1.3.7")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "rfc3987" version))
12994 (sha256
12995 (base32
12996 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12997 (build-system python-build-system)
12998 (home-page "https://pypi.python.org/pypi/rfc3987")
12999 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13000 (description "@code{rfc3987} provides routines for parsing and
13001 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13002 (license license:gpl3+)))
13003
13004 (define-public python2-rfc3987
13005 (package-with-python2 python-rfc3987))
13006
13007 (define-public python-validate-email
13008 (package
13009 (name "python-validate-email")
13010 (version "1.3")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "validate_email" version))
13015 (sha256
13016 (base32
13017 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13018 (build-system python-build-system)
13019 (home-page "https://github.com/syrusakbary/validate_email")
13020 (synopsis "Verifies if an email address is valid and really exists")
13021 (description "@code{validate_email} can be used to verify if an email
13022 address is valid and really exists.")
13023 (license license:lgpl3+)))
13024
13025 (define-public python2-validate-email
13026 (package-with-python2 python-validate-email))
13027
13028 (define-public python-flex
13029 (package
13030 (name "python-flex")
13031 (version "6.10.0")
13032 (source
13033 (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "flex" version))
13036 (sha256
13037 (base32
13038 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13039 (build-system python-build-system)
13040 (propagated-inputs
13041 `(("python-click" ,python-click)
13042 ("python-iso8601" ,python-iso8601)
13043 ("python-jsonpointer" ,python-jsonpointer)
13044 ("python-pyyaml" ,python-pyyaml)
13045 ("python-requests" ,python-requests)
13046 ("python-rfc3987" ,python-rfc3987)
13047 ("python-six" ,python-six)
13048 ("python-validate-email" ,python-validate-email)))
13049 (home-page "https://github.com/pipermerriam/flex")
13050 (synopsis "Validates Swagger schemata")
13051 (description "@code{flex} can be used to validate Swagger schemata.")
13052 (license license:bsd-3)))
13053
13054 (define-public python2-flex
13055 (package-with-python2 python-flex))
13056
13057 (define-public python-marshmallow
13058 (package
13059 (name "python-marshmallow")
13060 (version "3.0.0b14")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "marshmallow" version))
13065 (sha256
13066 (base32
13067 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13068 (build-system python-build-system)
13069 (propagated-inputs
13070 `(("python-dateutil" ,python-dateutil)
13071 ("python-simplejson" ,python-simplejson)))
13072 (native-inputs
13073 `(("python-pytest" ,python-pytest)
13074 ("python-pytz" ,python-pytz)))
13075 (home-page "https://github.com/marshmallow-code/marshmallow")
13076 (synopsis "Convert complex datatypes to and from native
13077 Python datatypes.")
13078 (description "@code{marshmallow} provides a library for converting
13079 complex datatypes to and from native Python datatypes.")
13080 (license license:expat)))
13081
13082 (define-public python2-marshmallow
13083 (package-with-python2 python-marshmallow))
13084
13085 (define-public python-apispec
13086 (package
13087 (name "python-apispec")
13088 (version "0.25.3")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "apispec" version))
13093 (sha256
13094 (base32
13095 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13096 (build-system python-build-system)
13097 (propagated-inputs
13098 `(("python-pyyaml" ,python-pyyaml)))
13099 (native-inputs
13100 `(("python-pytest" ,python-pytest)
13101 ("python-flask" ,python-flask)
13102 ("python-marshmallow" ,python-marshmallow)
13103 ("python-tornado" ,python-tornado)
13104 ("python-bottle" ,python-bottle)
13105 ("python-mock" ,python-mock)))
13106 (home-page "https://github.com/marshmallow-code/apispec")
13107 (synopsis "Swagger 2.0 API specification generator")
13108 (description "@code{python-apispec} is a pluggable API specification
13109 generator. Currently supports the OpenAPI specification (f.k.a.
13110 Swagger 2.0).")
13111 (license license:expat)))
13112
13113 (define-public python2-apispec
13114 (package-with-python2 python-apispec))
13115
13116 (define-public python-flasgger
13117 (package
13118 (name "python-flasgger")
13119 (version "0.6.3")
13120 (source
13121 (origin
13122 (method git-fetch)
13123 (uri (git-reference
13124 (url "https://github.com/rochacbruno/flasgger.git")
13125 (commit version)))
13126 (file-name (git-file-name name version))
13127 (sha256
13128 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13129 (build-system python-build-system)
13130 (arguments
13131 `(#:phases
13132 (modify-phases %standard-phases
13133 (replace 'check
13134 (lambda* (#:key inputs outputs #:allow-other-keys)
13135 (substitute* "Makefile"
13136 (("flake8 flasgger --ignore=F403")
13137 "flake8 flasgger --ignore=E731,F403"))
13138 (setenv "PYTHONPATH" (string-append (getcwd)
13139 ":"
13140 (getenv "PYTHONPATH")))
13141 (invoke "py.test"))))))
13142 (propagated-inputs
13143 `(("python-flask" ,python-flask)
13144 ("python-pyyaml" ,python-pyyaml)
13145 ("python-jsonschema" ,python-jsonschema)
13146 ("python-mistune" ,python-mistune)
13147 ("python-six" ,python-six)))
13148 (native-inputs
13149 `(("python-decorator" ,python-decorator)
13150 ("python-flake8" ,python-flake8)
13151 ("python-flask-restful" ,python-flask-restful)
13152 ("python-flex" ,python-flex)
13153 ("python-pytest" ,python-pytest)
13154 ("python-pytest-cov" ,python-pytest-cov)
13155 ("python-marshmallow" ,python-marshmallow)
13156 ("python-apispec" ,python-apispec)))
13157 (home-page "https://github.com/rochacbruno/flasgger/")
13158 (synopsis "Extract Swagger specs from your Flask project")
13159 (description "@code{python-flasgger} allows extracting Swagger specs
13160 from your Flask project. It is a fork of Flask-Swagger.")
13161 (license license:expat)))
13162
13163 (define-public python2-flasgger
13164 (package-with-python2 python-flasgger))
13165
13166 (define-public python-swagger-spec-validator
13167 (package
13168 (name "python-swagger-spec-validator")
13169 (version "2.4.3")
13170 (source
13171 (origin
13172 (method url-fetch)
13173 (uri (pypi-uri "swagger-spec-validator" version))
13174 (sha256
13175 (base32
13176 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13177 (build-system python-build-system)
13178 (propagated-inputs
13179 `(("python-jsonschema" ,python-jsonschema)
13180 ("python-pyyaml" ,python-pyyaml)
13181 ("python-six" ,python-six)))
13182 (home-page
13183 "https://github.com/Yelp/swagger_spec_validator")
13184 (synopsis "Validation of Swagger specifications")
13185 (description "@code{swagger_spec_validator} provides a library for
13186 validating Swagger API specifications.")
13187 (license license:asl2.0)))
13188
13189 (define-public python2-swagger-spec-validator
13190 (package-with-python2 python-swagger-spec-validator))
13191
13192 (define-public python-apache-libcloud
13193 (package
13194 (name "python-apache-libcloud")
13195 (version "2.4.0")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "apache-libcloud" version))
13200 (sha256
13201 (base32
13202 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13203 (build-system python-build-system)
13204 (arguments
13205 `(#:phases
13206 (modify-phases %standard-phases
13207 (add-after 'unpack 'patch-ssh
13208 (lambda* (#:key inputs #:allow-other-keys)
13209 (substitute* "libcloud/compute/ssh.py"
13210 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13211 "/bin/ssh" "'")))
13212 #t))
13213 (add-after 'unpack 'patch-tests
13214 (lambda _
13215 (substitute* "./libcloud/test/test_file_fixtures.py"
13216 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13217 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13218 return (httplib.OK,
13219 \"1234abcd\",
13220 {\"test\": \"value\"},
13221 httplib.responses[httplib.OK])
13222 def _ascii"))
13223 (substitute* "libcloud/test/compute/test_ssh_client.py"
13224 (("class ShellOutSSHClientTests")
13225 "@unittest.skip(\"Guix container doesn't have ssh service\")
13226 class ShellOutSSHClientTests")
13227 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13228 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13229 (("'.xF0', '.x90', '.x8D', '.x88'")
13230 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13231 #t))
13232 (add-before 'check 'copy-secret
13233 (lambda _
13234 (copy-file "libcloud/test/secrets.py-dist"
13235 "libcloud/test/secrets.py")
13236 #t)))))
13237 (inputs
13238 `(("openssh" ,openssh)))
13239 (propagated-inputs
13240 `(("python-paramiko" ,python-paramiko)
13241 ("python-requests" ,python-requests)))
13242 (native-inputs
13243 `(("python-lockfile" ,python-lockfile)
13244 ("python-mock" ,python-mock)
13245 ("python-pytest" ,python-pytest)
13246 ("python-pytest-runner" ,python-pytest-runner)
13247 ("python-requests-mock" ,python-requests-mock)))
13248 (home-page "https://libcloud.apache.org/")
13249 (synopsis "Unified Cloud API")
13250 (description "@code{libcloud} is a Python library for interacting with
13251 many of the popular cloud service providers using a unified API.")
13252 (license license:asl2.0)))
13253
13254 (define-public python2-apache-libcloud
13255 (package-with-python2 python-apache-libcloud))
13256
13257 (define-public python-smmap2
13258 (package
13259 (name "python-smmap2")
13260 (version "2.0.3")
13261 (source
13262 (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "smmap2" version))
13265 (sha256
13266 (base32
13267 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13268 (build-system python-build-system)
13269 (native-inputs
13270 `(("python-nosexcover" ,python-nosexcover)))
13271 (home-page "https://github.com/Byron/smmap")
13272 (synopsis "Python sliding window memory map manager")
13273 (description "@code{smmap2} is a pure Python implementation of a sliding
13274 window memory map manager.")
13275 (license license:bsd-3)))
13276
13277 (define-public python2-smmap2
13278 (package-with-python2 python-smmap2))
13279
13280 (define-public python-regex
13281 (package
13282 (name "python-regex")
13283 (version "2019.04.14")
13284 (source (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "regex" version))
13287 (sha256
13288 (base32
13289 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13290 ;; TODO: Fix and enable regex_test.py tests that complain about the
13291 ;; test.support module not existing.
13292 (build-system python-build-system)
13293 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13294 (synopsis "Alternative regular expression module")
13295 (description "This regular expression implementation is backwards-
13296 compatible with the standard @code{re} module, but offers additional
13297 functionality like full case-folding for case-insensitive matches in Unicode.")
13298 (license license:psfl)))
13299
13300 (define-public python2-regex
13301 (package-with-python2 python-regex))
13302
13303 (define-public python2-pyopengl
13304 (package
13305 (name "python2-pyopengl")
13306 (version "3.1.0")
13307 (source
13308 (origin
13309 (method url-fetch)
13310 (uri (pypi-uri "PyOpenGL" version))
13311 (sha256
13312 (base32
13313 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13314 (arguments
13315 `(#:python ,python-2))
13316 (build-system python-build-system)
13317 (home-page "http://pyopengl.sourceforge.net")
13318 (synopsis "Standard OpenGL bindings for Python")
13319 (description
13320 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13321 related APIs. The binding is created using the standard @code{ctypes}
13322 library.")
13323 (license license:bsd-3)))
13324
13325 (define-public python2-pyopengl-accelerate
13326 (package
13327 (inherit python2-pyopengl)
13328 (name "python2-pyopengl-accelerate")
13329 (version "3.1.0")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (pypi-uri "PyOpenGL-accelerate" version))
13334 (sha256
13335 (base32
13336 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13337 (synopsis "Acceleration code for PyOpenGL")
13338 (description
13339 "This is the Cython-coded accelerator module for PyOpenGL.")))
13340
13341 (define-public python-rencode
13342 (package
13343 (name "python-rencode")
13344 (version "1.0.5")
13345 (source
13346 (origin
13347 (method url-fetch)
13348 (uri (pypi-uri "rencode" version))
13349 (sha256
13350 (base32
13351 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13352 (build-system python-build-system)
13353 (arguments
13354 `(#:phases
13355 (modify-phases %standard-phases
13356 (add-before 'check 'delete-bogus-test
13357 ;; This test requires /home/aresch/Downloads, which is not provided by
13358 ;; the build environment.
13359 (lambda _
13360 (delete-file "rencode/t.py")
13361 #t)))))
13362 (native-inputs `(("pkg-config" ,pkg-config)
13363 ("python-cython" ,python-cython)))
13364 (home-page "https://github.com/aresch/rencode")
13365 (synopsis "Serialization of heterogeneous data structures")
13366 (description
13367 "The @code{rencode} module is a data structure serialization library,
13368 similar to @code{bencode} from the BitTorrent project. For complex,
13369 heterogeneous data structures with many small elements, r-encoding stake up
13370 significantly less space than b-encodings. This version of rencode is a
13371 complete rewrite in Cython to attempt to increase the performance over the
13372 pure Python module.")
13373 (license license:bsd-3)))
13374
13375 (define-public python2-rencode
13376 (package-with-python2 python-rencode))
13377
13378 (define-public python-xenon
13379 (package
13380 (name "python-xenon")
13381 (version "0.5.4")
13382 (source
13383 (origin
13384 (method url-fetch)
13385 (uri (pypi-uri "xenon" version))
13386 (sha256
13387 (base32
13388 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13389 (build-system python-build-system)
13390 (native-inputs
13391 `(("python-pyyaml" ,python-pyyaml)
13392 ("python-radon" ,python-radon)
13393 ("python-requests" ,python-requests)
13394 ("python-flake8" ,python-flake8)
13395 ("python-tox" ,python-tox)))
13396 (arguments
13397 `(#:phases
13398 (modify-phases %standard-phases
13399 (add-before 'build 'patch-test-requirements
13400 (lambda _
13401 ;; Remove httpretty dependency for tests.
13402 (substitute* "setup.py"
13403 (("httpretty") ""))
13404 #t)))))
13405 (home-page "https://xenon.readthedocs.org/")
13406 (synopsis "Monitor code metrics for Python on your CI server")
13407 (description
13408 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13409 Ideally, @code{xenon} is run every time code is committed. Through command
13410 line options, various thresholds can be set for the complexity of code. It
13411 will fail (i.e. it will exit with a non-zero exit code) when any of these
13412 requirements is not met.")
13413 (license license:expat)))
13414
13415 (define-public python2-xenon
13416 (package-with-python2 python-xenon))
13417
13418 (define-public python-pysocks
13419 (package
13420 (name "python-pysocks")
13421 (version "1.7.0")
13422 (source
13423 (origin
13424 (method url-fetch)
13425 (uri (pypi-uri "PySocks" version))
13426 (sha256
13427 (base32
13428 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13429 (build-system python-build-system)
13430 (arguments `(#:tests? #f))
13431 (home-page "https://github.com/Anorov/PySocks")
13432 (synopsis "SOCKS client module")
13433 (description "@code{pysocks} is an updated and semi-actively maintained
13434 version of @code{SocksiPy} with bug fixes and extra features.")
13435 (license license:bsd-3)))
13436
13437 (define-public python2-pysocks
13438 (package-with-python2 python-pysocks))
13439
13440 (define-public python-pydiff
13441 (package
13442 (name "python-pydiff")
13443 (version "0.2")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "pydiff" version))
13448 (sha256
13449 (base32
13450 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13451 (build-system python-build-system)
13452 (home-page "https://github.com/myint/pydiff")
13453 (synopsis "Library to diff two Python files at the bytecode level")
13454 (description
13455 "@code{pydiff} makes it easy to look for actual code changes while
13456 ignoring formatting changes.")
13457 (license license:expat)))
13458
13459 (define-public python2-pydiff
13460 (package-with-python2 python-pydiff))
13461
13462 (define-public python-tqdm
13463 (package
13464 (name "python-tqdm")
13465 (version "4.19.6")
13466 (source
13467 (origin
13468 (method url-fetch)
13469 (uri (pypi-uri "tqdm" version))
13470 (sha256
13471 (base32
13472 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13473 (build-system python-build-system)
13474 (native-inputs
13475 `(("python-flake8" ,python-flake8)
13476 ("python-nose" ,python-nose)
13477 ("python-coverage" ,python-coverage)))
13478 (home-page "https://github.com/tqdm/tqdm")
13479 (synopsis "Fast, extensible progress meter")
13480 (description
13481 "Make loops show a progress bar on the console by just wrapping any
13482 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13483 design and layout.")
13484 (license (list license:mpl2.0 license:expat))))
13485
13486 (define-public python2-tqdm
13487 (package-with-python2 python-tqdm))
13488
13489 (define-public python-pkginfo
13490 (package
13491 (name "python-pkginfo")
13492 (version "1.4.2")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "pkginfo" version))
13497 (sha256
13498 (base32
13499 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13500 (build-system python-build-system)
13501 (arguments
13502 ;; The tests are broken upstream.
13503 '(#:tests? #f))
13504 (home-page
13505 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13506 (synopsis
13507 "Query metadatdata from sdists, bdists, and installed packages")
13508 (description
13509 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13510 source distriubtion (an sdist) or a binary distribution (e.g., created by
13511 running bdist_egg). It can also query the EGG-INFO directory of an installed
13512 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13513 created by running @code{python setup.py develop}).")
13514 (license license:expat)))
13515
13516 (define-public python2-pkginfo
13517 (package-with-python2 python-pkginfo))
13518
13519 (define-public python-twine
13520 (package
13521 (name "python-twine")
13522 (version "1.9.1")
13523 (source
13524 (origin
13525 (method url-fetch)
13526 (uri (pypi-uri "twine" version))
13527 (sha256
13528 (base32
13529 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13530 (build-system python-build-system)
13531 (propagated-inputs
13532 `(("python-tqdm" ,python-tqdm)
13533 ("python-pkginfo" ,python-pkginfo)
13534 ("python-requests" ,python-requests)
13535 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13536 (home-page "https://github.com/pypa/twine")
13537 (synopsis "Collection of utilities for interacting with PyPI")
13538 (description
13539 "@code{twine} currently supports registering projects and uploading
13540 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13541 their files and supports any packaging format (including wheels).")
13542 (license license:asl2.0)))
13543
13544 (define-public python2-twine
13545 (package-with-python2 python-twine))
13546
13547 (define-public python-linecache2
13548 (package
13549 (name "python-linecache2")
13550 (version "1.0.0")
13551 (source
13552 (origin
13553 (method url-fetch)
13554 (uri (pypi-uri "linecache2" version))
13555 (sha256
13556 (base32
13557 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13558 (build-system python-build-system)
13559 (arguments
13560 `(;; The tests depend on unittest2, and our version is a bit too old.
13561 #:tests? #f))
13562 (native-inputs
13563 `(("python-pbr" ,python-pbr-minimal)))
13564 (home-page
13565 "https://github.com/testing-cabal/linecache2")
13566 (synopsis "Backports of the linecache module")
13567 (description
13568 "The linecache module allows one to get any line from any file, while
13569 attempting to optimize internally, using a cache, the common case where many
13570 lines are read from a single file.")
13571 (license license:psfl)))
13572
13573 (define-public python2-linecache2
13574 (package-with-python2 python-linecache2))
13575
13576 (define-public python-traceback2
13577 (package
13578 (name "python-traceback2")
13579 (version "1.4.0")
13580 (source
13581 (origin
13582 (method url-fetch)
13583 (uri (pypi-uri "traceback2" version))
13584 (sha256
13585 (base32
13586 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13587 (build-system python-build-system)
13588 (arguments
13589 `(;; python-traceback2 and python-unittest2 depend on one another.
13590 #:tests? #f))
13591 (native-inputs
13592 `(("python-pbr" ,python-pbr-minimal)))
13593 (propagated-inputs
13594 `(("python-linecache2" ,python-linecache2)))
13595 (home-page
13596 "https://github.com/testing-cabal/traceback2")
13597 (synopsis "Backports of the traceback module")
13598 (description
13599 "This module provides a standard interface to extract, format and print
13600 stack traces of Python programs. It exactly mimics the behavior of the Python
13601 interpreter when it prints a stack trace.")
13602 (license license:psfl)))
13603
13604 (define-public python2-traceback2
13605 (package-with-python2 python-traceback2))
13606
13607 (define-public python-ratelimiter
13608 (package
13609 (name "python-ratelimiter")
13610 (version "1.2.0")
13611 (source
13612 (origin
13613 (method url-fetch)
13614 (uri (pypi-uri "ratelimiter" version))
13615 (sha256
13616 (base32
13617 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13618 (build-system python-build-system)
13619 (arguments
13620 '(#:tests? #f)) ; There are no tests in the pypi archive.
13621 (home-page "https://github.com/RazerM/ratelimiter")
13622 (synopsis "Simple rate limiting object")
13623 (description
13624 "The @code{ratelimiter} module ensures that an operation will not be
13625 executed more than a given number of times during a given period.")
13626 (license license:asl2.0)))
13627
13628 (define-public python2-ratelimiter
13629 (package-with-python2 python-ratelimiter))
13630
13631 (define-public python-dukpy
13632 (package
13633 (name "python-dukpy")
13634 (version "0.3")
13635 (source
13636 (origin
13637 (method git-fetch)
13638 (uri (git-reference
13639 (url "https://github.com/kovidgoyal/dukpy.git")
13640 (commit (string-append "v" version))))
13641 (file-name (git-file-name name version))
13642 (sha256
13643 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13644 (build-system python-build-system)
13645 (home-page "https://github.com/kovidgoyal/dukpy")
13646 (synopsis "Run JavaScript in python")
13647 (description
13648 "dukpy is a JavaScript runtime environment for Python using the duktape
13649 embeddable JavaScript engine.")
13650 ;; Dukpy is licensed under MIT like the embedded duktape library,
13651 ;; with 'errors.c' as GPL3.
13652 (license (list license:expat license:gpl3))))
13653
13654 (define-public python2-dukpy
13655 (package-with-python2 python-dukpy))
13656
13657 (define-public python-jsonrpclib-pelix
13658 (package
13659 (name "python-jsonrpclib-pelix")
13660 (version "0.3.2")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "jsonrpclib-pelix" version))
13665 (sha256
13666 (base32
13667 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(#:tests? #f)) ; no tests in PyPI tarball
13671 (home-page "https://github.com/tcalmant/jsonrpclib/")
13672 (synopsis "JSON-RPC 2.0 client library for Python")
13673 (description
13674 "This library implements the JSON-RPC v2.0
13675 specification (backwards-compatible) as a client library for Python. This
13676 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13677 services.")
13678 (license license:asl2.0)))
13679
13680 (define-public python2-jsonrpclib-pelix
13681 (package-with-python2 python-jsonrpclib-pelix))
13682
13683 (define-public python-setuptools-scm-git-archive
13684 (package
13685 (name "python-setuptools-scm-git-archive")
13686 (version "1.0")
13687 (source
13688 (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "setuptools_scm_git_archive" version))
13691 (sha256
13692 (base32
13693 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13694 (build-system python-build-system)
13695 (native-inputs
13696 `(("python-pytest" ,python-pytest)))
13697 (propagated-inputs
13698 `(("python-setuptools-scm" ,python-setuptools-scm)))
13699 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13700 (synopsis "Setuptools_scm plugin for git archives")
13701 (description
13702 "The setuptools_scm_git_archive package is a plugin to
13703 setuptools_scm, which supports obtaining versions from git archives that
13704 belong to tagged versions.")
13705 (license license:expat)))
13706
13707 (define-public python2-setuptools-scm-git-archive
13708 (package-with-python2 python-setuptools-scm-git-archive))
13709
13710 (define-public python-setuptools-git
13711 (package
13712 (name "python-setuptools-git")
13713 (version "1.2")
13714 (source
13715 (origin
13716 (method url-fetch)
13717 (uri (pypi-uri "setuptools-git" version))
13718 (sha256
13719 (base32
13720 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13721 (build-system python-build-system)
13722 (arguments
13723 `(#:phases
13724 (modify-phases %standard-phases
13725 ;; This is needed for tests.
13726 (add-after 'unpack 'configure-git
13727 (lambda _
13728 (setenv "HOME" "/tmp")
13729 (invoke "git" "config" "--global" "user.email" "guix")
13730 (invoke "git" "config" "--global" "user.name" "guix")
13731 #t)))))
13732 (native-inputs
13733 `(("git" ,git-minimal)))
13734 (home-page "https://github.com/msabramo/setuptools-git")
13735 (synopsis "Setuptools revision control system plugin for Git")
13736 (description
13737 "This package provides a plugin for Setuptools for revision control with
13738 Git.")
13739 (license license:bsd-3)))
13740
13741 (define-public python-pyclipper
13742 (package
13743 (name "python-pyclipper")
13744 (version "1.1.0.post1")
13745 (source
13746 (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "pyclipper" version ".zip"))
13749 (sha256
13750 (base32
13751 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13752 (modules '((guix build utils)))
13753 (snippet
13754 '(begin
13755 ;; This file is generated by Cython.
13756 (delete-file "pyclipper/pyclipper.cpp") #t))))
13757 (build-system python-build-system)
13758 (arguments
13759 `(#:phases
13760 (modify-phases %standard-phases
13761 (add-before 'build 'cythonize-sources
13762 (lambda _
13763 (with-directory-excursion "pyclipper"
13764 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13765 (propagated-inputs
13766 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13767 (native-inputs
13768 `(("python-cython" ,python-cython)
13769 ("python-pytest" ,python-pytest)
13770 ("python-pytest-runner" ,python-pytest-runner)
13771 ("python-unittest2" ,python-unittest2)
13772 ("unzip" ,unzip)))
13773 (home-page "https://github.com/greginvm/pyclipper")
13774 (synopsis "Wrapper for Angus Johnson's Clipper library")
13775 (description
13776 "Pyclipper is a Cython wrapper for the C++ translation of the
13777 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13778 (license license:expat)))
13779
13780 (define-public python2-pyclipper
13781 (package-with-python2 python-pyclipper))
13782
13783 (define-public python2-booleanoperations
13784 (package
13785 (name "python2-booleanoperations")
13786 (version "0.7.1")
13787 (source
13788 (origin
13789 (method url-fetch)
13790 (uri (pypi-uri "booleanOperations" version ".zip"))
13791 (sha256
13792 (base32
13793 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13794 (build-system python-build-system)
13795 (arguments
13796 `(#:python ,python-2))
13797 (native-inputs
13798 `(("unzip" ,unzip)
13799 ("python2-pytest" ,python2-pytest)
13800 ("python2-pytest-runner" ,python2-pytest-runner)))
13801 (propagated-inputs
13802 `(("python-fonttools" ,python2-fonttools)
13803 ("python-pyclipper" ,python2-pyclipper)
13804 ("python-ufolib" ,python2-ufolib)))
13805 (home-page "https://github.com/typemytype/booleanOperations")
13806 (synopsis "Boolean operations on paths")
13807 (description
13808 "BooleanOperations provides a Python library that enables
13809 boolean operations on paths.")
13810 (license license:expat)))
13811
13812 (define-public python-tempdir
13813 (package
13814 (name "python-tempdir")
13815 (version "0.7.1")
13816 (source
13817 (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "tempdir" version))
13820 (sha256
13821 (base32
13822 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13823 (build-system python-build-system)
13824 (home-page "https://pypi.org/project/tempdir/")
13825 (arguments
13826 ;; the package has no tests
13827 '(#:tests? #f))
13828 (synopsis "Python library for managing temporary directories")
13829 (description
13830 "This library manages temporary directories that are automatically
13831 deleted with all their contents when they are no longer needed. It is
13832 particularly convenient for use in tests.")
13833 (license license:expat)))
13834
13835 (define-public python2-tempdir
13836 (package-with-python2 python-tempdir))
13837
13838 (define-public python-activepapers
13839 (package
13840 (name "python-activepapers")
13841 (version "0.2.2")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "ActivePapers.Py" version))
13846 (sha256
13847 (base32
13848 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13849 (build-system python-build-system)
13850 (arguments
13851 `(#:modules ((ice-9 ftw)
13852 (srfi srfi-1)
13853 (guix build utils)
13854 (guix build python-build-system))
13855
13856 #:phases
13857 (modify-phases %standard-phases
13858 (add-after 'unpack 'delete-python2-code
13859 (lambda _
13860 (for-each delete-file
13861 '("lib/activepapers/builtins2.py"
13862 "lib/activepapers/standardlib2.py"
13863 "lib/activepapers/utility2.py"))))
13864 (replace 'check
13865 (lambda _
13866 ;; Deactivate the test cases that download files
13867 (setenv "NO_NETWORK_ACCESS" "1")
13868 ;; For some strange reason, some tests fail if nosetests runs all
13869 ;; test modules in a single execution. They pass if each test
13870 ;; module is run individually.
13871 (for-each (lambda (filename)
13872 (invoke "nosetests"
13873 (string-append "tests/" filename)))
13874 (scandir "tests"
13875 (lambda (filename)
13876 (string-suffix? ".py" filename)))))))))
13877 (native-inputs
13878 `(("python-tempdir" ,python-tempdir)
13879 ("python-nose" ,python-nose)))
13880 (propagated-inputs
13881 `(("python-h5py" ,python-h5py)))
13882 (home-page "http://www.activepapers.org/")
13883 (synopsis "Executable papers for scientific computing")
13884 (description
13885 "ActivePapers is a tool for working with executable papers, which
13886 combine data, code, and documentation in single-file packages,
13887 suitable for publication as supplementary material or on repositories
13888 such as figshare or Zenodo.")
13889 (properties `((python2-variant . ,(delay python2-activepapers))))
13890 (license license:bsd-3)))
13891
13892 (define-public python2-activepapers
13893 (let ((base (package-with-python2
13894 (strip-python2-variant python-activepapers))))
13895 (package
13896 (inherit base)
13897 (arguments
13898 (substitute-keyword-arguments (package-arguments base)
13899 ((#:phases phases)
13900 `(modify-phases ,phases
13901 (delete 'delete-python2-code)
13902 (add-after 'unpack 'delete-python3-code
13903 (lambda _
13904 (for-each delete-file
13905 '("lib/activepapers/builtins3.py"
13906 "lib/activepapers/standardlib3.py"
13907 "lib/activepapers/utility3.py")))))))))))
13908
13909 (define-public python-semver
13910 (package
13911 (name "python-semver")
13912 (version "2.7.9")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (pypi-uri "semver" version))
13917 (sha256
13918 (base32
13919 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13920 (build-system python-build-system)
13921 (arguments
13922 `(#:phases
13923 (modify-phases %standard-phases
13924 (add-after 'unpack 'patch-test-requirements
13925 (lambda _
13926 (substitute* "setup.py"
13927 ;; Our Python is new enough.
13928 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13929 #t)))))
13930 (native-inputs
13931 `(("python-tox" ,python-tox)
13932 ("python-virtualenv" ,python-virtualenv)))
13933 (home-page "https://github.com/k-bx/python-semver")
13934 (synopsis "Python helper for Semantic Versioning")
13935 (description "This package provides a Python library for
13936 @url{Semantic Versioning, http://semver.org/}.")
13937 (license license:bsd-3)))
13938
13939 (define-public python2-semver
13940 (package-with-python2 python-semver))
13941
13942 (define-public python-pyro4
13943 (package
13944 (name "python-pyro4")
13945 (version "4.75")
13946 (source
13947 (origin
13948 (method url-fetch)
13949 (uri (pypi-uri "Pyro4" version))
13950 (sha256
13951 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13952 (build-system python-build-system)
13953 (propagated-inputs
13954 `(("python-serpent" ,python-serpent)))
13955 (home-page "https://pyro4.readthedocs.io")
13956 (synopsis "Distributed object middleware for Python")
13957 (description
13958 "Pyro enables you to build applications in which objects can talk to each
13959 other over the network. You can just use normal Python method calls to call
13960 objects on other machines, also known as remote procedure calls (RPC).")
13961 (license license:expat)))
13962
13963 (define-public python2-pyro
13964 (package
13965 (name "python2-pyro")
13966 (version "3.16")
13967 (source
13968 (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "Pyro" version))
13971 (file-name (string-append "Pyro-" version ".tar.gz"))
13972 (sha256
13973 (base32
13974 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13975 (build-system python-build-system)
13976 (arguments
13977 ;; Pyro is not compatible with Python 3
13978 `(#:python ,python-2
13979 ;; Pyro has no test cases for automatic execution
13980 #:tests? #f))
13981 (home-page "http://pythonhosted.org/Pyro/")
13982 (synopsis "Distributed object manager for Python")
13983 (description "Pyro is a Distributed Object Technology system
13984 written in Python that is designed to be easy to use. It resembles
13985 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13986 which is a system and language independent Distributed Object Technology
13987 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13988 longer maintained. New projects should use Pyro4 instead, which
13989 is the new Pyro version that is actively developed.")
13990 (license license:expat)))
13991
13992 (define-public python2-scientific
13993 (package
13994 (name "python2-scientific")
13995 (version "2.9.4")
13996 (source
13997 (origin
13998 (method url-fetch)
13999 (uri (string-append "https://bitbucket.org/khinsen/"
14000 "scientificpython/downloads/ScientificPython-"
14001 version ".tar.gz"))
14002 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14003 (sha256
14004 (base32
14005 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14006 (build-system python-build-system)
14007 (inputs
14008 `(("netcdf" ,netcdf)))
14009 (propagated-inputs
14010 `(("python-numpy" ,python2-numpy-1.8)
14011 ("python-pyro" ,python2-pyro)))
14012 (arguments
14013 ;; ScientificPython is not compatible with Python 3
14014 `(#:python ,python-2
14015 #:tests? #f ; No test suite
14016 #:phases
14017 (modify-phases %standard-phases
14018 (replace 'build
14019 (lambda* (#:key inputs #:allow-other-keys)
14020 (invoke "python" "setup.py" "build"
14021 (string-append "--netcdf_prefix="
14022 (assoc-ref inputs "netcdf"))))))))
14023 (home-page "https://bitbucket.org/khinsen/scientificpython")
14024 (synopsis "Python modules for scientific computing")
14025 (description "ScientificPython is a collection of Python modules that are
14026 useful for scientific computing. Most modules are rather general (Geometry,
14027 physical units, automatic derivatives, ...) whereas others are more
14028 domain-specific (e.g. netCDF and PDB support). The library is currently
14029 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14030 (license license:cecill-c)))
14031
14032 (define-public python2-mmtk
14033 (package
14034 (name "python2-mmtk")
14035 (version "2.7.11")
14036 (source
14037 (origin
14038 (method url-fetch)
14039 (uri (string-append "https://bitbucket.org/khinsen/"
14040 "mmtk/downloads/MMTK-" version ".tar.gz"))
14041 (file-name (string-append "MMTK-" version ".tar.gz"))
14042 (sha256
14043 (base32
14044 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14045 (build-system python-build-system)
14046 (native-inputs
14047 `(("netcdf" ,netcdf)))
14048 (propagated-inputs
14049 `(("python-scientific" ,python2-scientific)
14050 ("python-tkinter" ,python-2 "tk")))
14051 (arguments
14052 `(#:python ,python-2
14053 #:tests? #f
14054 #:phases
14055 (modify-phases %standard-phases
14056 (add-before 'build 'includes-from-scientific
14057 (lambda* (#:key inputs #:allow-other-keys)
14058 (mkdir-p "Include/Scientific")
14059 (copy-recursively
14060 (string-append
14061 (assoc-ref inputs "python-scientific")
14062 "/include/python2.7/Scientific")
14063 "Include/Scientific"))))))
14064 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14065 (synopsis "Python library for molecular simulation")
14066 (description "MMTK is a library for molecular simulations with an emphasis
14067 on biomolecules. It provides widely used methods such as Molecular Dynamics
14068 and normal mode analysis, but also basic routines for implementing new methods
14069 for simulation and analysis. The library is currently not actively maintained
14070 and works only with Python 2 and NumPy < 1.9.")
14071 (license license:cecill-c)))
14072
14073 (define-public python-phonenumbers
14074 (package
14075 (name "python-phonenumbers")
14076 (version "8.9.1")
14077 (source
14078 (origin
14079 (method url-fetch)
14080 (uri (pypi-uri "phonenumbers" version))
14081 (sha256
14082 (base32
14083 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14084 (build-system python-build-system)
14085 (home-page
14086 "https://github.com/daviddrysdale/python-phonenumbers")
14087 (synopsis
14088 "Python library for dealing with international phone numbers")
14089 (description
14090 "This package provides a Python port of Google's libphonenumber library.")
14091 (license license:asl2.0)))
14092
14093 (define-public python2-phonenumbers
14094 (package-with-python2 python-phonenumbers))
14095
14096 (define-public python-send2trash
14097 (package
14098 (name "python-send2trash")
14099 (version "1.5.0")
14100 (source
14101 (origin (method git-fetch)
14102 ;; Source tarball on PyPI doesn't include tests.
14103 (uri (git-reference
14104 (url "https://github.com/hsoft/send2trash.git")
14105 (commit version)))
14106 (file-name (git-file-name name version))
14107 (sha256
14108 (base32
14109 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14110 (build-system python-build-system)
14111 (arguments
14112 '(#:phases
14113 (modify-phases %standard-phases
14114 (add-before 'check 'pre-check
14115 (lambda _
14116 (mkdir-p "/tmp/foo")
14117 (setenv "HOME" "/tmp/foo")
14118 #t)))))
14119 (home-page "https://github.com/hsoft/send2trash")
14120 (synopsis "Send files to the user's @file{~/Trash} directory")
14121 (description "This package provides a Python library to send files to the
14122 user's @file{~/Trash} directory.")
14123 (properties `((python2-variant . ,(delay python2-send2trash))))
14124 (license license:bsd-3)))
14125
14126 (define-public python2-send2trash
14127 (package
14128 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14129 (arguments
14130 (substitute-keyword-arguments (package-arguments python-send2trash)
14131 ((#:phases phases)
14132 `(modify-phases ,phases
14133 (add-before 'check 'setenv
14134 (lambda _
14135 (setenv "PYTHONPATH"
14136 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14137 #t))))))))
14138
14139 (define-public python-yapf
14140 (package
14141 (name "python-yapf")
14142 (version "0.24.0")
14143 (source
14144 (origin
14145 (method url-fetch)
14146 (uri (pypi-uri "yapf" version))
14147 (sha256
14148 (base32
14149 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14150 (build-system python-build-system)
14151 (home-page "https://github.com/google/yapf")
14152 (synopsis "Formatter for Python code")
14153 (description "YAPF is a formatter for Python code. It's based off of
14154 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14155 takes the code and reformats it to the best formatting that conforms to the
14156 style guide, even if the original code didn't violate the style guide.")
14157 (license license:asl2.0)))
14158
14159 (define-public python2-yapf
14160 (package-with-python2 python-yapf))
14161
14162 (define-public python-gyp
14163 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14164 (revision "0"))
14165 (package
14166 (name "python-gyp")
14167 ;; Google does not release versions,
14168 ;; based on second most recent commit date.
14169 (version (git-version "0.0.0" revision commit))
14170 (source
14171 (origin
14172 ;; Google does not release tarballs,
14173 ;; git checkout is needed.
14174 (method git-fetch)
14175 (uri (git-reference
14176 (url "https://chromium.googlesource.com/external/gyp")
14177 (commit commit)))
14178 (file-name (git-file-name name version))
14179 (sha256
14180 (base32
14181 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14182 (build-system python-build-system)
14183 (home-page "https://gyp.gsrc.io/")
14184 (synopsis "GYP is a Meta-Build system")
14185 (description
14186 "GYP builds build systems for large, cross platform applications.
14187 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14188 files, and Makefiles.")
14189 (license license:bsd-3))))
14190
14191 (define-public python2-gyp
14192 (package-with-python2 python-gyp))
14193
14194 (define-public python-whatever
14195 (package
14196 (name "python-whatever")
14197 (version "0.5")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14202 ".tar.gz"))
14203 (sha256
14204 (base32
14205 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14206 (file-name (string-append name "-" version ".tar.gz"))))
14207 (build-system python-build-system)
14208 (arguments
14209 `(#:phases
14210 (modify-phases %standard-phases
14211 (replace 'check
14212 (lambda _
14213 (invoke "py.test"))))))
14214 (native-inputs
14215 `(("python-pytest" ,python-pytest)))
14216 (home-page "http://github.com/Suor/whatever")
14217 (synopsis "Make anonymous functions by partial application of operators")
14218 (description "@code{whatever} provides an easy way to make anonymous
14219 functions by partial application of operators.")
14220 (license license:bsd-3)))
14221
14222 (define-public python2-whatever
14223 (package-with-python2 python-whatever))
14224
14225 (define-public python-funcy
14226 (package
14227 (name "python-funcy")
14228 (version "1.11")
14229 (source
14230 (origin
14231 (method git-fetch)
14232 (uri (git-reference
14233 (url "https://github.com/Suor/funcy.git")
14234 (commit version)))
14235 (sha256
14236 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14237 (file-name (git-file-name name version))))
14238 (build-system python-build-system)
14239 (arguments
14240 `(#:phases
14241 (modify-phases %standard-phases
14242 (replace 'check
14243 (lambda _
14244 (invoke "py.test"))))))
14245 (native-inputs
14246 `(("python-pytest" ,python-pytest)
14247 ("python-whatever" ,python-whatever)))
14248 (home-page "http://github.com/Suor/funcy")
14249 (synopsis "Functional tools")
14250 (description "@code{funcy} is a library that provides functional tools.
14251 Examples are:
14252 @enumerate
14253 @item merge - Merges collections of the same type
14254 @item walk - Type-preserving map
14255 @item select - Selects a part of a collection
14256 @item take - Takes the first n items of a collection
14257 @item first - Takes the first item of a collection
14258 @item remove - Predicated-removes items of a collection
14259 @item concat - Concatenates two collections
14260 @item flatten - Flattens a collection with subcollections
14261 @item distinct - Returns only distinct items
14262 @item split - Predicated-splits a collection
14263 @item split_at - Splits a collection at a given item
14264 @item group_by - Groups items by group
14265 @item pairwise - Pairs off adjacent items
14266 @item partial - Partially-applies a function
14267 @item curry - Curries a function
14268 @item compose - Composes functions
14269 @item complement - Complements a predicate
14270 @item all_fn - \"all\" with predicate
14271 @end enumerate")
14272 (license license:bsd-3)))
14273
14274 (define-public python2-funcy
14275 (package-with-python2 python-funcy))
14276
14277 (define-public python-isoweek
14278 (package
14279 (name "python-isoweek")
14280 (version "1.3.3")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "isoweek" version))
14285 (sha256
14286 (base32
14287 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14288 (build-system python-build-system)
14289 (home-page "https://github.com/gisle/isoweek")
14290 (synopsis "Objects representing a week")
14291 (description "The @code{isoweek} module provide the class Week that
14292 implements the week definition of ISO 8601. This standard also defines
14293 a notation for identifying weeks; yyyyWww (where the W is a literal).
14294 Week instances stringify to this form.")
14295 (license license:bsd-3)))
14296
14297 (define-public python2-isoweek
14298 (package-with-python2 python-isoweek))
14299
14300 (define-public python-tokenize-rt
14301 (package
14302 (name "python-tokenize-rt")
14303 (version "2.0.1")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "tokenize-rt" version))
14308 (sha256
14309 (base32
14310 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14311 (build-system python-build-system)
14312 (home-page "https://github.com/asottile/tokenize-rt")
14313 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14314 (description
14315 "This Python library is a wrapper around @code{tokenize} from the Python
14316 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14317 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14318 and @code{tokens_to_src} to roundtrip.")
14319 (license license:expat)))
14320
14321 (define-public python-future-fstrings
14322 (package
14323 (name "python-future-fstrings")
14324 (version "0.4.1")
14325 (source
14326 (origin
14327 (method url-fetch)
14328 (uri (pypi-uri "future_fstrings" version))
14329 (sha256
14330 (base32
14331 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14332 (build-system python-build-system)
14333 (propagated-inputs
14334 `(("python-tokenize-rt" ,python-tokenize-rt)))
14335 (home-page "https://github.com/asottile/future-fstrings")
14336 (synopsis "Backport of fstrings to Python < 3.6")
14337 (description
14338 "This package provides a UTF-8 compatible encoding
14339 @code{future_fstrings}, which performs source manipulation. It decodes the
14340 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14341 @code{f} strings.")
14342 (license license:expat)))
14343
14344 (define-public python-typed-ast
14345 (package
14346 (name "python-typed-ast")
14347 (version "1.3.5")
14348 (source
14349 (origin
14350 (method url-fetch)
14351 (uri (pypi-uri "typed-ast" version))
14352 (sha256
14353 (base32
14354 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14355 (build-system python-build-system)
14356 (arguments
14357 `(#:modules ((guix build utils)
14358 (guix build python-build-system)
14359 (ice-9 ftw)
14360 (srfi srfi-1)
14361 (srfi srfi-26))
14362 #:phases
14363 (modify-phases %standard-phases
14364 (replace 'check
14365 (lambda _
14366 (let ((cwd (getcwd)))
14367 (setenv "PYTHONPATH"
14368 (string-append cwd "/build/"
14369 (find (cut string-prefix? "lib" <>)
14370 (scandir (string-append cwd "/build")))
14371 ":"
14372 (getenv "PYTHONPATH"))))
14373 (invoke "pytest")
14374 #t)))))
14375 (native-inputs `(("python-pytest" ,python-pytest)))
14376 (home-page "https://github.com/python/typed_ast")
14377 (synopsis "Fork of Python @code{ast} modules with type comment support")
14378 (description "This package provides a parser similar to the standard
14379 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14380 include PEP 484 type comments and are independent of the version of Python
14381 under which they are run. The @code{typed_ast} parsers produce the standard
14382 Python AST (plus type comments), and are both fast and correct, as they are
14383 based on the CPython 2.7 and 3.7 parsers.")
14384 ;; See the file "LICENSE" for the details.
14385 (license (list license:psfl
14386 license:asl2.0
14387 license:expat)))) ;ast27/Parser/spark.py
14388
14389 (define-public python-typing
14390 (package
14391 (name "python-typing")
14392 (version "3.6.6")
14393 (source
14394 (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "typing" version))
14397 (sha256
14398 (base32
14399 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14400 (build-system python-build-system)
14401 (home-page "https://docs.python.org/3/library/typing.html")
14402 (synopsis "Type hints for Python")
14403 (description "This is a backport of the standard library @code{typing}
14404 module to Python versions older than 3.5. Typing defines a standard notation
14405 for Python function and variable type annotations. The notation can be used
14406 for documenting code in a concise, standard format, and it has been designed
14407 to also be used by static and runtime type checkers, static analyzers, IDEs
14408 and other tools.")
14409 (license license:psfl)))
14410
14411 (define-public python2-typing
14412 (package-with-python2 python-typing))
14413
14414 (define-public python-typing-extensions
14415 (package
14416 (name "python-typing-extensions")
14417 (version "3.7.2")
14418 (source
14419 (origin
14420 (method url-fetch)
14421 (uri (pypi-uri "typing_extensions" version))
14422 (sha256
14423 (base32
14424 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14425 (build-system python-build-system)
14426 (home-page
14427 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14428 (synopsis "Experimental type hints for Python")
14429 (description
14430 "The typing_extensions module contains additional @code{typing} hints not
14431 yet present in the of the @code{typing} standard library.
14432 Included are implementations of:
14433 @enumerate
14434 @item ClassVar
14435 @item ContextManager
14436 @item Counter
14437 @item DefaultDict
14438 @item Deque
14439 @item NewType
14440 @item NoReturn
14441 @item overload
14442 @item Protocol
14443 @item runtime
14444 @item Text
14445 @item Type
14446 @item TYPE_CHECKING
14447 @item AsyncGenerator
14448 @end enumerate\n")
14449 (license license:psfl)))
14450
14451 (define-public bpython
14452 (package
14453 (name "bpython")
14454 (version "0.17.1")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "bpython" version))
14459 (sha256
14460 (base32
14461 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14462 (build-system python-build-system)
14463 (arguments
14464 `(#:phases
14465 (modify-phases %standard-phases
14466 (add-after 'unpack 'remove-failing-test
14467 (lambda _
14468 ;; Remove failing test. FIXME: make it pass
14469 (delete-file "bpython/test/test_args.py")
14470 #t))
14471 (add-after 'wrap 'add-aliases
14472 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14473 (lambda* (#:key outputs #:allow-other-keys)
14474 (let ((out (assoc-ref outputs "out")))
14475 (for-each
14476 (lambda (old new)
14477 (symlink old (string-append out "/bin/" new)))
14478 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14479 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14480 #t)))))
14481 (propagated-inputs
14482 `(("python-pygments" ,python-pygments)
14483 ("python-requests" ,python-requests)
14484 ("python-babel" ,python-babel) ; optional, for internationalization
14485 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14486 ("python-greenlet" ,python-greenlet)
14487 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14488 ("python-six" ,python-six)))
14489 (native-inputs
14490 `(("python-sphinx" ,python-sphinx)
14491 ("python-mock" ,python-mock)))
14492 (home-page "https://bpython-interpreter.org/")
14493 (synopsis "Fancy interface to the Python interpreter")
14494 (description "Bpython is a fancy interface to the Python
14495 interpreter. bpython's main features are
14496
14497 @enumerate
14498 @item in-line syntax highlighting,
14499 @item readline-like autocomplete with suggestions displayed as you type,
14500 @item expected parameter list for any Python function,
14501 @item \"rewind\" function to pop the last line of code from memory and
14502 re-evaluate,
14503 @item send the code you've entered off to a pastebin,
14504 @item save the code you've entered to a file, and
14505 @item auto-indentation.
14506 @end enumerate")
14507 (license license:expat)))
14508
14509 (define-public bpython2
14510 (let ((base (package-with-python2
14511 (strip-python2-variant bpython))))
14512 (package (inherit base)
14513 (name "bpython2")
14514 (arguments
14515 `(#:python ,python-2
14516 #:phases
14517 (modify-phases %standard-phases
14518 (add-after 'unpack 'remove-failing-test
14519 (lambda _
14520 ;; Remove failing test. FIXME: make it pass
14521 (delete-file "bpython/test/test_args.py")
14522 ;; Disable failing test-cases (renaming inhibits they are
14523 ;; discovered)
14524 (substitute* "bpython/test/test_curtsies_repl.py"
14525 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14526 (string-append a "xxx_off_" b))
14527 (("^(\\s*def )(test_complex\\W)" _ a b)
14528 (string-append a "xxx_off_" b)))
14529 #t))
14530 (add-before 'build 'rename-scripts
14531 ;; rename the scripts to bypthon2, bpdb2, etc.
14532 (lambda _
14533 (substitute* "setup.py"
14534 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14535 (string-append name "2" rest "\n"))
14536 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14537 (string-append name "2" (or sub "") rest "\n")))
14538 #t))))))))
14539
14540 (define-public python-pyinotify
14541 (package
14542 (name "python-pyinotify")
14543 (version "0.9.6")
14544 (source (origin
14545 (method url-fetch)
14546 (uri (pypi-uri "pyinotify" version))
14547 (sha256
14548 (base32
14549 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14550 (build-system python-build-system)
14551 (arguments `(#:tests? #f)) ;no tests
14552 (home-page "https://github.com/seb-m/pyinotify")
14553 (synopsis "Python library for monitoring inotify events")
14554 (description
14555 "@code{pyinotify} provides a Python interface for monitoring
14556 file system events on Linux.")
14557 (license license:expat)))
14558
14559 (define-public python2-pyinotify
14560 (package-with-python2 python-pyinotify))
14561
14562 ;; Ada parser uses this version.
14563 (define-public python2-quex-0.67.3
14564 (package
14565 (name "python2-quex")
14566 (version "0.67.3")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14571 (version-major+minor version)
14572 "/quex-" version ".zip"))
14573 (sha256
14574 (base32
14575 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14576 (build-system python-build-system)
14577 (native-inputs
14578 `(("unzip" ,unzip)))
14579 (arguments
14580 `(#:python ,python-2
14581 #:tests? #f
14582 #:phases
14583 (modify-phases %standard-phases
14584 (delete 'configure)
14585 (delete 'build)
14586 (replace 'install
14587 (lambda* (#:key outputs #:allow-other-keys)
14588 (let* ((out (assoc-ref outputs "out"))
14589 (share/quex (string-append out "/share/quex"))
14590 (bin (string-append out "/bin")))
14591 (copy-recursively "." share/quex)
14592 (mkdir-p bin)
14593 (symlink (string-append share/quex "/quex-exe.py")
14594 (string-append bin "/quex"))
14595 #t))))))
14596 (native-search-paths
14597 (list (search-path-specification
14598 (variable "QUEX_PATH")
14599 (files '("share/quex")))))
14600 (home-page "http://quex.sourceforge.net/")
14601 (synopsis "Lexical analyzer generator in Python")
14602 (description "@code{quex} is a lexical analyzer generator in Python.")
14603 (license license:lgpl2.1+))) ; Non-military
14604
14605 (define-public python2-quex
14606 (package (inherit python2-quex-0.67.3)
14607 (name "python2-quex")
14608 (version "0.68.1")
14609 (source
14610 (origin
14611 (method url-fetch)
14612 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14613 (sha256
14614 (base32
14615 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14616 (file-name (string-append name "-" version ".tar.gz"))))))
14617
14618 (define-public python-more-itertools
14619 (package
14620 (name "python-more-itertools")
14621 (version "4.3.0")
14622 (source
14623 (origin
14624 (method url-fetch)
14625 (uri (pypi-uri "more-itertools" version))
14626 (sha256
14627 (base32
14628 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14629 (build-system python-build-system)
14630 (arguments
14631 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14632 (%current-target-system)))
14633 '("armhf" "i686"))
14634 '(#:phases
14635 (modify-phases %standard-phases
14636 ;; This is required for 32-bit hardware.
14637 ;; TODO: Try to remove this when upgrading.
14638 (add-after 'unpack 'patch-test
14639 (lambda _
14640 (substitute* "more_itertools/tests/test_more.py"
14641 (("10 \\*\\* 10") "9 ** 9"))
14642 #t))))
14643 '())))
14644 (propagated-inputs
14645 `(("python-six" ,python-six-bootstrap)))
14646 (home-page "https://github.com/erikrose/more-itertools")
14647 (synopsis "More routines for operating on iterables, beyond itertools")
14648 (description "Python's built-in @code{itertools} module implements a
14649 number of iterator building blocks inspired by constructs from APL, Haskell,
14650 and SML. @code{more-itertools} includes additional building blocks for
14651 working with iterables.")
14652 (license license:expat)))
14653
14654 (define-public python2-more-itertools
14655 (package-with-python2 python-more-itertools))
14656
14657 (define-public python-latexcodec
14658 (package
14659 (name "python-latexcodec")
14660 (version "1.0.6")
14661 (source
14662 (origin
14663 (method url-fetch)
14664 (uri (pypi-uri "latexcodec" version))
14665 (sha256
14666 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14667 (build-system python-build-system)
14668 (inputs
14669 `(("python-six" ,python-six)))
14670 (home-page "https://readthedocs.org/projects/latexcodec/")
14671 (synopsis "Work with LaTeX code in Python")
14672 (description "Lexer and codec to work with LaTeX code in Python.")
14673 (license license:expat)))
14674
14675 (define-public python-pybtex
14676 (package
14677 (name "python-pybtex")
14678 (version "0.21")
14679 (source
14680 (origin
14681 (method url-fetch)
14682 (uri (pypi-uri "pybtex" version))
14683 (sha256
14684 (base32
14685 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14686 (build-system python-build-system)
14687 (native-inputs
14688 `(("python-nose" ,python-nose)))
14689 (inputs
14690 `(("python-latexcodec" ,python-latexcodec)
14691 ("python-pyyaml" ,python-pyyaml)
14692 ("python-six" ,python-six)))
14693 (arguments
14694 `(#:test-target "nosetests"))
14695 (home-page "https://pybtex.org/")
14696 (synopsis "BibTeX-compatible bibliography processor")
14697 (description "Pybtex is a BibTeX-compatible bibliography processor written
14698 in Python. You can simply type pybtex instead of bibtex.")
14699 (license license:expat)))
14700
14701 (define-public python-onetimepass
14702 (package
14703 (name "python-onetimepass")
14704 (version "1.0.1")
14705 (source
14706 (origin
14707 (method url-fetch)
14708 (uri (pypi-uri "onetimepass" version))
14709 (sha256
14710 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14711 (build-system python-build-system)
14712 (propagated-inputs `(("python-six" ,python-six)))
14713 (home-page "https://github.com/tadeck/onetimepass/")
14714 (synopsis "One-time password library")
14715 (description "Python one-time password library for HMAC-based (HOTP) and
14716 time-based (TOTP) passwords.")
14717 (license license:expat)))
14718
14719 (define-public python-parso
14720 (package
14721 (name "python-parso")
14722 (version "0.3.1")
14723 (source
14724 (origin
14725 (method url-fetch)
14726 (uri (pypi-uri "parso" version))
14727 (sha256
14728 (base32
14729 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14730 (native-inputs
14731 `(("python-pytest" ,python-pytest)))
14732 (build-system python-build-system)
14733 (home-page "https://github.com/davidhalter/parso")
14734 (synopsis "Python Parser")
14735 (description "Parso is a Python parser that supports error recovery and
14736 round-trip parsing for different Python versions (in multiple Python versions).
14737 Parso is also able to list multiple syntax errors in your Python file.")
14738 (license license:expat)))
14739
14740 (define-public python2-parso
14741 (package-with-python2 python-parso))
14742
14743 (define-public python-async-generator
14744 (package
14745 (name "python-async-generator")
14746 (version "1.10")
14747 (source
14748 (origin
14749 (method url-fetch)
14750 (uri (pypi-uri "async_generator" version))
14751 (sha256
14752 (base32
14753 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14754 (build-system python-build-system)
14755 (native-inputs
14756 `(("python-pytest" ,python-pytest)))
14757 (home-page "https://github.com/python-trio/async_generator")
14758 (synopsis "Async generators and context managers for Python 3.5+")
14759 (description "@code{async_generator} back-ports Python 3.6's native async
14760 generators and Python 3.7's context managers into Python 3.5.")
14761 ;; Dual licensed.
14762 (license (list license:expat license:asl2.0))))
14763
14764 (define-public python-async-timeout
14765 (package
14766 (name "python-async-timeout")
14767 (version "3.0.1")
14768 (source
14769 (origin
14770 (method url-fetch)
14771 (uri (pypi-uri "async-timeout" version))
14772 (sha256
14773 (base32
14774 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14775 (build-system python-build-system)
14776 (home-page "https://github.com/aio-libs/async_timeout/")
14777 (synopsis "Timeout context manager for asyncio programs")
14778 (description "@code{async-timeout} provides a timeout timeout context
14779 manager compatible with @code{asyncio}.")
14780 (license license:asl2.0)))
14781
14782 (define-public python-glob2
14783 (package
14784 (name "python-glob2")
14785 (version "0.6")
14786 (source
14787 (origin
14788 (method git-fetch)
14789 (uri (git-reference
14790 (url "https://github.com/miracle2k/python-glob2.git")
14791 (commit version)))
14792 (file-name (git-file-name name version))
14793 (sha256
14794 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14795 (build-system python-build-system)
14796 (home-page "https://github.com/miracle2k/python-glob2/")
14797 (synopsis "Extended Version of the python buildin glob module")
14798 (description "This is an extended version of the Python
14799 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14800 adds:
14801
14802 @itemize
14803 @item The ability to capture the text matched by glob patterns, and return
14804 those matches alongside the file names.
14805 @item A recursive @code{**} globbing syntax, akin for example to the
14806 @code{globstar} option of Bash.
14807 @item The ability to replace the file system functions used, in order to glob
14808 on virtual file systems.
14809 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14810 @end itemize
14811
14812 Glob2 currently based on the glob code from Python 3.3.1.")
14813 (license license:bsd-2)))
14814
14815 (define-public python2-glob2
14816 (package-with-python2 python-glob2))
14817
14818 (define-public python-gipc
14819 (package
14820 (name "python-gipc")
14821 (version "0.6.0")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "gipc" version ".zip"))
14826 (sha256
14827 (base32
14828 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14829 (build-system python-build-system)
14830 (native-inputs
14831 `(("unzip" ,unzip)))
14832 (propagated-inputs
14833 `(("python-gevent" ,python-gevent)))
14834 (home-page "http://gehrcke.de/gipc")
14835 (synopsis "Child process management in the context of gevent")
14836 (description "Usage of Python's multiprocessing package in a
14837 gevent-powered application may raise problems. With @code{gipc},
14838 process-based child processes can safely be created anywhere within a
14839 gevent-powered application.")
14840 (license license:expat)))
14841
14842 (define-public python2-gipc
14843 (package-with-python2 python-gipc))
14844
14845 (define-public python-fusepy
14846 (package
14847 (name "python-fusepy")
14848 (version "2.0.4")
14849 (source
14850 (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "fusepy" version))
14853 (sha256
14854 (base32
14855 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14856 (build-system python-build-system)
14857 (arguments
14858 `(#:phases
14859 (modify-phases %standard-phases
14860 (add-before 'build 'set-library-file-name
14861 (lambda* (#:key inputs #:allow-other-keys)
14862 (let ((fuse (assoc-ref inputs "fuse")))
14863 (substitute* "fuse.py"
14864 (("find_library\\('fuse'\\)")
14865 (string-append "'" fuse "/lib/libfuse.so'")))
14866 #t))))))
14867 (propagated-inputs
14868 `(("fuse" ,fuse)))
14869 (home-page "https://github.com/fusepy/fusepy")
14870 (synopsis "Simple ctypes bindings for FUSE")
14871 (description "Python module that provides a simple interface to FUSE and
14872 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14873 (license license:isc)))
14874
14875 (define-public python2-fusepy
14876 (package-with-python2 python-fusepy))
14877
14878 (define-public python2-gdrivefs
14879 (package
14880 (name "python2-gdrivefs")
14881 (version "0.14.9")
14882 (source
14883 (origin
14884 (method url-fetch)
14885 (uri (pypi-uri "gdrivefs" version))
14886 (sha256
14887 (base32
14888 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14889 (build-system python-build-system)
14890 (arguments
14891 `(#:python ,python-2
14892 #:phases
14893 (modify-phases %standard-phases
14894 (add-before 'build 'patch-setup-py
14895 (lambda _
14896 ;; Update requirements from dependency==version
14897 ;; to dependency>=version
14898 (substitute* "gdrivefs/resources/requirements.txt"
14899 (("==") ">="))
14900 #t)))))
14901 (native-inputs
14902 `(("python2-gipc" ,python2-gipc)
14903 ("python2-gevent" ,python2-gevent)
14904 ("python2-greenlet" ,python2-greenlet)
14905 ("python2-httplib2" ,python2-httplib2)
14906 ("python2-uritemplate" ,python2-uritemplate)
14907 ("python2-oauth2client" ,python2-oauth2client)
14908 ("python2-six" ,python2-six)))
14909 (propagated-inputs
14910 `(("python2-dateutil" ,python2-dateutil)
14911 ("python2-fusepy" ,python2-fusepy)
14912 ("python2-google-api-client" ,python2-google-api-client)))
14913 (home-page "https://github.com/dsoprea/GDriveFS")
14914 (synopsis "Mount Google Drive as a local file system")
14915 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14916 under Python 2.7.")
14917 (license license:gpl2)))
14918
14919 (define-public pybind11
14920 (package
14921 (name "pybind11")
14922 (version "2.2.4")
14923 (source (origin
14924 (method git-fetch)
14925 (uri (git-reference
14926 (url "https://github.com/pybind/pybind11.git")
14927 (commit (string-append "v" version))))
14928 (sha256
14929 (base32
14930 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14931 (file-name (git-file-name name version))))
14932 (build-system cmake-build-system)
14933 (native-inputs
14934 `(("python" ,python)
14935 ("python-pytest" ,python-pytest)))
14936 (arguments
14937 `(#:test-target "check"))
14938 (home-page "https://github.com/pybind/pybind11/")
14939 (synopsis "Seamless operability between C++11 and Python")
14940 (description "pybind11 is a lightweight header-only library that exposes
14941 C++ types in Python and vice versa, mainly to create Python bindings of
14942 existing C++ code. Its goals and syntax are similar to the excellent
14943 Boost.Python library by David Abrahams: to minimize boilerplate code in
14944 traditional extension modules by inferring type information using compile-time
14945 introspection.")
14946 (license license:expat)))
14947
14948 (define-public python-fasteners
14949 (package
14950 (name "python-fasteners")
14951 (version "0.14.1")
14952 (source
14953 (origin
14954 (method url-fetch)
14955 (uri (pypi-uri "fasteners" version))
14956 (sha256
14957 (base32
14958 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14959 (build-system python-build-system)
14960 (propagated-inputs
14961 `(("python-monotonic" ,python-monotonic)
14962 ("python-six" ,python-six)
14963 ("python-testtools" ,python-testtools)))
14964 (home-page "https://github.com/harlowja/fasteners")
14965 (synopsis "Python package that provides useful locks")
14966 (description
14967 "This package provides a Python program that provides following locks:
14968
14969 @itemize
14970 @item Locking decorator
14971 @item Reader-writer locks
14972 @item Inter-process locks
14973 @item Generic helpers
14974 @end itemize\n")
14975 (properties `((python2-variant . ,(delay python2-fasteners))))
14976 (license license:asl2.0)))
14977
14978 (define-public python2-fasteners
14979 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14980 (package
14981 (inherit base)
14982 (propagated-inputs
14983 `(("python2-futures" ,python2-futures)
14984 ,@(package-propagated-inputs base))))))
14985
14986 (define-public python-requests-file
14987 (package
14988 (name "python-requests-file")
14989 (version "1.4.3")
14990 (source
14991 (origin
14992 (method url-fetch)
14993 (uri (pypi-uri "requests-file" version))
14994 (sha256
14995 (base32
14996 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14997 (build-system python-build-system)
14998 (propagated-inputs
14999 `(("python-requests" ,python-requests)
15000 ("python-six" ,python-six)))
15001 (home-page
15002 "https://github.com/dashea/requests-file")
15003 (synopsis "File transport adapter for Requests")
15004 (description
15005 "Requests-File is a transport adapter for use with the Requests Python
15006 library to allow local file system access via @code{file://} URLs.")
15007 (license license:asl2.0)))
15008
15009 (define-public python2-requests-file
15010 (package-with-python2 python-requests-file))
15011
15012 (define-public python-tldextract
15013 (package
15014 (name "python-tldextract")
15015 (version "2.2.0")
15016 (source
15017 (origin
15018 (method url-fetch)
15019 (uri (pypi-uri "tldextract" version))
15020 (sha256
15021 (base32
15022 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15023 (build-system python-build-system)
15024 (native-inputs
15025 `(("python-pytest" ,python-pytest)
15026 ("python-responses" ,python-responses)))
15027 (propagated-inputs
15028 `(("python-idna" ,python-idna)
15029 ("python-requests" ,python-requests)
15030 ("python-requests-file" ,python-requests-file)))
15031 (home-page
15032 "https://github.com/john-kurkowski/tldextract")
15033 (synopsis
15034 "Separate the TLD from the registered domain and subdomains of a URL")
15035 (description
15036 "TLDExtract accurately separates the TLD from the registered domain and
15037 subdomains of a URL, using the Public Suffix List. By default, this includes
15038 the public ICANN TLDs and their exceptions. It can optionally support the
15039 Public Suffix List's private domains as well.")
15040 (license license:bsd-3)))
15041
15042 (define-public python2-tldextract
15043 (package-with-python2 python-tldextract))
15044
15045 (define-public python-pynamecheap
15046 (package
15047 (name "python-pynamecheap")
15048 (version "0.0.3")
15049 (source
15050 (origin
15051 (method url-fetch)
15052 (uri (pypi-uri "PyNamecheap" version))
15053 (sha256
15054 (base32
15055 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15056 (build-system python-build-system)
15057 (propagated-inputs
15058 `(("python-requests" ,python-requests)))
15059 (home-page
15060 "https://github.com/Bemmu/PyNamecheap")
15061 (synopsis
15062 "Namecheap API client in Python")
15063 (description
15064 "PyNamecheap is a Namecheap API client in Python.")
15065 (license license:expat)))
15066
15067 (define-public python2-pynamecheap
15068 (package-with-python2 python-pynamecheap))
15069
15070 (define-public python-dns-lexicon
15071 (package
15072 (name "python-dns-lexicon")
15073 (version "2.4.0")
15074 (source
15075 (origin
15076 (method url-fetch)
15077 (uri (pypi-uri "dns-lexicon" version))
15078 (sha256
15079 (base32
15080 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15081 (build-system python-build-system)
15082 (arguments
15083 `(#:tests? #f)) ;requires internet access
15084 (propagated-inputs
15085 `(("python-future" ,python-future)
15086 ("python-pynamecheap" ,python-pynamecheap)
15087 ("python-requests" ,python-requests)
15088 ("python-tldextract" ,python-tldextract)
15089 ("python-urllib3" ,python-urllib3)))
15090 (home-page "https://github.com/AnalogJ/lexicon")
15091 (synopsis
15092 "Manipulate DNS records on various DNS providers")
15093 (description
15094 "Lexicon provides a way to manipulate DNS records on multiple DNS
15095 providers in a standardized way. It has a CLI but it can also be used as a
15096 Python library. It was designed to be used in automation, specifically with
15097 Let's Encrypt.")
15098 (license license:expat)))
15099
15100 (define-public python2-dns-lexicon
15101 (package-with-python2 python-dns-lexicon))
15102
15103 (define-public python-commandlines
15104 (package
15105 (name "python-commandlines")
15106 (version "0.4.1")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "commandlines" version))
15111 (sha256
15112 (base32
15113 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15114 (build-system python-build-system)
15115 (home-page "https://github.com/chrissimpkins/commandlines")
15116 (synopsis "Command line argument to object parsing library")
15117 (description
15118 "@code{Commandlines} is a Python library for command line application
15119 development that supports command line argument parsing, command string
15120 validation testing and application logic.")
15121 (license license:expat)))
15122
15123 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15124 ;; python-numba. They have a very unflexible relationship.
15125 (define-public python-numba
15126 (package
15127 (name "python-numba")
15128 (version "0.42.0")
15129 (source
15130 (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "numba" version))
15133 (sha256
15134 (base32
15135 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15136 (build-system python-build-system)
15137 (arguments
15138 `(#:modules ((guix build utils)
15139 (guix build python-build-system)
15140 (ice-9 ftw)
15141 (srfi srfi-1)
15142 (srfi srfi-26))
15143 #:phases
15144 (modify-phases %standard-phases
15145 (add-after 'unpack 'disable-proprietary-features
15146 (lambda _
15147 (setenv "NUMBA_DISABLE_HSA" "1")
15148 (setenv "NUMBA_DISABLE_CUDA" "1")
15149 #t))
15150 (add-after 'unpack 'remove-failing-tests
15151 (lambda _
15152 ;; FIXME: these tests fail for unknown reasons:
15153 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15154 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15155 (substitute* "numba/tests/test_dispatcher.py"
15156 (("def test(_non_writable_pycache)" _ m)
15157 (string-append "def guix_skip" m))
15158 (("def test(_non_creatable_pycache)" _ m)
15159 (string-append "def guix_skip" m))
15160 (("def test(_frozen)" _ m)
15161 (string-append "def guix_skip" m)))
15162
15163 ;; These tests fail because we don't run the tests from the build
15164 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15165 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15166 (substitute* "numba/tests/test_pycc.py"
15167 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15168 (string-append "def guix_skip" m)))
15169 #t))
15170 (replace 'check
15171 (lambda _
15172 (let ((cwd (getcwd)))
15173 (setenv "PYTHONPATH"
15174 (string-append cwd "/build/"
15175 (find (cut string-prefix? "lib" <>)
15176 (scandir (string-append cwd "/build")))
15177 ":"
15178 (getenv "PYTHONPATH")))
15179 ;; Something is wrong with the PYTHONPATH when running the
15180 ;; tests from the build directory, as it complains about not being
15181 ;; able to import certain modules.
15182 (with-directory-excursion "/tmp"
15183 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15184 #t)))))
15185 (propagated-inputs
15186 `(("python-llvmlite" ,python-llvmlite)
15187 ("python-numpy" ,python-numpy)
15188 ("python-singledispatch" ,python-singledispatch)))
15189 ;; Needed for tests.
15190 (inputs
15191 `(("python-jinja2" ,python-jinja2)
15192 ("python-pygments" ,python-pygments)))
15193 (home-page "https://numba.pydata.org")
15194 (synopsis "Compile Python code using LLVM")
15195 (description "Numba gives you the power to speed up your applications with
15196 high performance functions written directly in Python. With a few
15197 annotations, array-oriented and math-heavy Python code can be just-in-time
15198 compiled to native machine instructions, similar in performance to C, C++ and
15199 Fortran, without having to switch languages or Python interpreters.
15200
15201 Numba works by generating optimized machine code using the LLVM compiler
15202 infrastructure at import time, runtime, or statically (using the included pycc
15203 tool).")
15204 (license license:bsd-3)))
15205
15206 (define-public python-anndata
15207 (package
15208 (name "python-anndata")
15209 (version "0.6.18")
15210 (source
15211 (origin
15212 (method url-fetch)
15213 (uri (pypi-uri "anndata" version))
15214 (sha256
15215 (base32
15216 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15217 (build-system python-build-system)
15218 (propagated-inputs
15219 `(("python-h5py" ,python-h5py)
15220 ("python-natsort" ,python-natsort)
15221 ("python-pandas" ,python-pandas)
15222 ("python-scipy" ,python-scipy)))
15223 (home-page "https://github.com/theislab/anndata")
15224 (synopsis "Annotated data for data analysis pipelines")
15225 (description "Anndata is a package for simple (functional) high-level APIs
15226 for data analysis pipelines. In this context, it provides an efficient,
15227 scalable way of keeping track of data together with learned annotations and
15228 reduces the code overhead typically encountered when using a mostly
15229 object-oriented library such as @code{scikit-learn}.")
15230 (license license:bsd-3)))
15231
15232 (define-public python-dill
15233 (package
15234 (name "python-dill")
15235 (version "0.2.9")
15236 (source
15237 (origin
15238 (method url-fetch)
15239 (uri (pypi-uri "dill" version))
15240 (sha256
15241 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15242 (build-system python-build-system)
15243 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15244 (arguments '(#:tests? #f))
15245 (home-page "https://pypi.org/project/dill")
15246 (synopsis "Serialize all of Python")
15247 (description "Dill extends Python's @code{pickle} module for serializing
15248 and de-serializing Python objects to the majority of the built-in Python
15249 types. Dill provides the user the same interface as the @code{pickle} module,
15250 and also includes some additional features. In addition to pickling Python
15251 objects, @code{dill} provides the ability to save the state of an interpreter
15252 session in a single command. Hence, it would be feasible to save a
15253 interpreter session, close the interpreter, ship the pickled file to another
15254 computer, open a new interpreter, unpickle the session and thus continue from
15255 the saved state of the original interpreter session.")
15256 (license license:bsd-3)))
15257
15258 (define-public python-multiprocess
15259 (package
15260 (name "python-multiprocess")
15261 (version "0.70.6.1")
15262 (source
15263 (origin
15264 (method url-fetch)
15265 (uri (pypi-uri "multiprocess" version))
15266 (sha256
15267 (base32
15268 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15269 (build-system python-build-system)
15270 (propagated-inputs
15271 `(("python-dill" ,python-dill)))
15272 (home-page "https://pypi.org/project/multiprocess")
15273 (synopsis "Multiprocessing and multithreading in Python")
15274 (description
15275 "This package is a fork of the multiprocessing Python package, a package
15276 which supports the spawning of processes using the API of the standard
15277 library's @code{threading} module.")
15278 (license license:bsd-3)))
15279
15280 (define-public python-toolz
15281 (package
15282 (name "python-toolz")
15283 (version "0.9.0")
15284 (source
15285 (origin
15286 (method url-fetch)
15287 (uri (pypi-uri "toolz" version))
15288 (sha256
15289 (base32
15290 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15291 (build-system python-build-system)
15292 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15293 ;; unregistered loader type"
15294 (arguments '(#:tests? #f))
15295 (home-page "https://github.com/pytoolz/toolz/")
15296 (synopsis "List processing tools and functional utilities")
15297 (description
15298 "This package provides a set of utility functions for iterators,
15299 functions, and dictionaries.")
15300 (license license:bsd-3)))
15301
15302 (define-public python2-toolz
15303 (package-with-python2 python-toolz))
15304
15305 (define-public python-cytoolz
15306 (package
15307 (name "python-cytoolz")
15308 (version "0.9.0.1")
15309 (source
15310 (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "cytoolz" version))
15313 (sha256
15314 (base32
15315 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15316 (build-system python-build-system)
15317 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15318 ;; 'exceptions'"
15319 (arguments '(#:tests? #f))
15320 (propagated-inputs
15321 `(("python-toolz" ,python-toolz)))
15322 (native-inputs
15323 `(("python-cython" ,python-cython)))
15324 (home-page "https://github.com/pytoolz/cytoolz")
15325 (synopsis "High performance functional utilities")
15326 (description
15327 "The cytoolz package implements the same API as provided by toolz. The
15328 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15329 that is accessible to other projects developed in Cython.")
15330 (license license:bsd-3)))
15331
15332 (define-public python-sortedcontainers
15333 (package
15334 (name "python-sortedcontainers")
15335 (version "2.0.4")
15336 (source
15337 (origin
15338 (method url-fetch)
15339 (uri (pypi-uri "sortedcontainers" version))
15340 (sha256
15341 (base32
15342 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15343 (build-system python-build-system)
15344 (native-inputs
15345 `(("python-tox" ,python-tox)))
15346 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15347 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15348 (description
15349 "This package provides a sorted collections library, written in
15350 pure-Python.")
15351 (license license:asl2.0)))
15352
15353 (define-public python-cloudpickle
15354 (package
15355 (name "python-cloudpickle")
15356 (version "0.6.1")
15357 (source
15358 (origin
15359 (method url-fetch)
15360 (uri (pypi-uri "cloudpickle" version))
15361 (sha256
15362 (base32
15363 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15364 (build-system python-build-system)
15365 ;; FIXME: there are 5 errors in 122 tests:
15366 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15367 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15368 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15369 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15370 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15371 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15372 (arguments '(#:tests? #f))
15373 (native-inputs
15374 `(("python-pytest" ,python-pytest)
15375 ("python-mock" ,python-mock)
15376 ("python-tornado" ,python-tornado)))
15377 (home-page "https://github.com/cloudpipe/cloudpickle")
15378 (synopsis "Extended pickling support for Python objects")
15379 (description
15380 "Cloudpickle makes it possible to serialize Python constructs not
15381 supported by the default pickle module from the Python standard library. It
15382 is especially useful for cluster computing where Python expressions are
15383 shipped over the network to execute on remote hosts, possibly close to the
15384 data.")
15385 (license license:bsd-3)))
15386
15387 (define-public python2-cloudpickle
15388 (package-with-python2 python-cloudpickle))
15389
15390 (define-public python-locket
15391 (package
15392 (name "python-locket")
15393 (version "0.2.0")
15394 (source
15395 (origin
15396 (method url-fetch)
15397 (uri (pypi-uri "locket" version))
15398 (sha256
15399 (base32
15400 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15401 (build-system python-build-system)
15402 (home-page "https://github.com/mwilliamson/locket.py")
15403 (synopsis "File-based locks for Python")
15404 (description
15405 "Locket implements a lock that can be used by multiple processes provided
15406 they use the same path.")
15407 (license license:bsd-2)))
15408
15409 (define-public python2-locket
15410 (package-with-python2 python-locket))
15411
15412 (define-public python-blosc
15413 (package
15414 (name "python-blosc")
15415 (version "1.5.1")
15416 (source
15417 (origin
15418 (method url-fetch)
15419 (uri (pypi-uri "blosc" version))
15420 (sha256
15421 (base32
15422 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15423 (build-system python-build-system)
15424 ;; FIXME: all tests pass, but then this error is printed:
15425 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15426 (arguments '(#:tests? #f))
15427 (propagated-inputs
15428 `(("python-numpy" ,python-numpy)))
15429 (home-page "https://github.com/blosc/python-blosc")
15430 (synopsis "Python wrapper for the Blosc data compressor library")
15431 (description "Blosc is a high performance compressor optimized for binary
15432 data. It has been designed to transmit data to the processor cache faster
15433 than the traditional, non-compressed, direct memory fetch approach via a
15434 @code{memcpy()} system call.
15435
15436 Blosc works well for compressing numerical arrays that contains data with
15437 relatively low entropy, like sparse data, time series, grids with
15438 regular-spaced values, etc.
15439
15440 This Python package wraps the Blosc library.")
15441 (license license:bsd-3)))
15442
15443 (define-public python2-blosc
15444 (package-with-python2 python-blosc))
15445
15446 (define-public python-partd
15447 (package
15448 (name "python-partd")
15449 (version "0.3.9")
15450 (source
15451 (origin
15452 (method url-fetch)
15453 (uri (pypi-uri "partd" version))
15454 (sha256
15455 (base32
15456 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15457 (build-system python-build-system)
15458 (propagated-inputs
15459 `(("python-blosc" ,python-blosc)
15460 ("python-locket" ,python-locket)
15461 ("python-numpy" ,python-numpy)
15462 ("python-pandas" ,python-pandas)
15463 ("python-pyzmq" ,python-pyzmq)
15464 ("python-toolz" ,python-toolz)))
15465 (home-page "https://github.com/dask/partd/")
15466 (synopsis "Appendable key-value storage")
15467 (description "Partd stores key-value pairs. Values are raw bytes. We
15468 append on old values. Partd excels at shuffling operations.")
15469 (license license:bsd-3)))
15470
15471 (define-public python2-partd
15472 (package-with-python2 python-partd))
15473
15474 (define-public python-dask
15475 (package
15476 (name "python-dask")
15477 (version "1.2.2")
15478 (source
15479 (origin
15480 (method url-fetch)
15481 (uri (pypi-uri "dask" version))
15482 (sha256
15483 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15484 (build-system python-build-system)
15485 ;; A single test out of 5000+ fails. This test is marked as xfail when
15486 ;; pytest-xdist is used.
15487 (arguments
15488 `(#:phases
15489 (modify-phases %standard-phases
15490 (add-after 'unpack 'disable-broken-test
15491 (lambda _
15492 (substitute* "dask/tests/test_threaded.py"
15493 (("def test_interrupt\\(\\)" m)
15494 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15495 m)))
15496 (when (which "python2")
15497 ;; This test fails with recent Pandas:
15498 ;; <https://github.com/dask/dask/issues/3794>.
15499 (substitute* "dask/dataframe/tests/test_dataframe.py"
15500 (("def test_info\\(\\)" m)
15501 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15502 m))))
15503 #t))
15504 (replace 'check
15505 (lambda _ (invoke "pytest" "-vv"))))))
15506 (propagated-inputs
15507 `(("python-cloudpickle" ,python-cloudpickle)
15508 ("python-numpy" ,python-numpy)
15509 ("python-pandas" ,python-pandas)
15510 ("python-partd" ,python-partd)
15511 ("python-toolz" ,python-toolz)
15512 ("python-pyyaml" ,python-pyyaml)))
15513 (native-inputs
15514 `(("python-pytest" ,python-pytest)
15515 ("python-pytest-runner" ,python-pytest-runner)))
15516 (home-page "https://github.com/dask/dask/")
15517 (synopsis "Parallel computing with task scheduling")
15518 (description
15519 "Dask is a flexible parallel computing library for analytics. It
15520 consists of two components: dynamic task scheduling optimized for computation,
15521 and large data collections like parallel arrays, dataframes, and lists that
15522 extend common interfaces like NumPy, Pandas, or Python iterators to
15523 larger-than-memory or distributed environments. These parallel collections
15524 run on top of the dynamic task schedulers. ")
15525 (license license:bsd-3)))
15526
15527 (define-public python2-dask
15528 (package-with-python2 python-dask))
15529
15530 (define-public python-ilinkedlist
15531 (package
15532 (name "python-ilinkedlist")
15533 (version "0.4.0")
15534 (source
15535 (origin
15536 (method url-fetch)
15537 (uri (pypi-uri "ilinkedlist" version))
15538 (sha256
15539 (base32
15540 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15541 (build-system python-build-system)
15542 (native-inputs `(("python-pytest" ,python-pytest)))
15543 (inputs `(("python" ,python)))
15544 (home-page "https://github.com/luther9/ilinkedlist-py")
15545 (synopsis "Immutable linked list library")
15546 (description
15547 "This is a implementation of immutable linked lists for Python. It
15548 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15549 Since a linked list is treated as immutable, it is hashable, and its length
15550 can be retrieved in constant time. Some of the terminology is inspired by
15551 LISP. It is possible to create an improper list by creating a @code{Pair}
15552 with a non-list @code{cdr}.")
15553 (license license:gpl3+)))
15554
15555 (define-public python-readlike
15556 (package
15557 (name "python-readlike")
15558 (version "0.1.3")
15559 (source
15560 (origin
15561 (method url-fetch)
15562 (uri (pypi-uri "readlike" version))
15563 (sha256
15564 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15565 (build-system python-build-system)
15566 (home-page "https://github.com/jangler/readlike")
15567 (synopsis "GNU Readline-like line editing module")
15568 (description
15569 "This Python module provides line editing functions similar to the default
15570 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15571 @code{readline} package, this one allows access to those capabilties in settings
15572 outside of a standard command-line interface. It is especially well-suited to
15573 interfacing with Urwid, due to a shared syntax for describing key inputs.
15574
15575 Currently, all stateless Readline commands are implemented. Yanking and history
15576 are not supported.")
15577 (license license:expat)))
15578
15579 (define-public python2-readlike
15580 (package-with-python2 python-readlike))
15581
15582 (define-public python-reparser
15583 (package
15584 (name "python-reparser")
15585 (version "1.4.3")
15586 (source
15587 (origin
15588 (method url-fetch)
15589 (uri (pypi-uri "ReParser" version))
15590 (sha256
15591 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15592 (build-system python-build-system)
15593 (home-page "https://github.com/xmikos/reparser")
15594 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15595 (description
15596 "This Python library provides a simple lexer/parser for inline markup based
15597 on regular expressions.")
15598 (license license:expat)))
15599
15600 (define-public python2-reparser
15601 (let ((reparser (package-with-python2
15602 (strip-python2-variant python-reparser))))
15603 (package (inherit reparser)
15604 (propagated-inputs
15605 `(("python2-enum34" ,python2-enum34)
15606 ,@(package-propagated-inputs reparser))))))
15607
15608 (define-public python-precis-i18n
15609 (package
15610 (name "python-precis-i18n")
15611 (version "1.0.0")
15612 (source
15613 (origin
15614 (method url-fetch)
15615 (uri (pypi-uri "precis_i18n" version))
15616 (sha256
15617 (base32
15618 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15619 (build-system python-build-system)
15620 (home-page "https://github.com/byllyfish/precis_i18n")
15621 (synopsis "Implementation of the PRECIS framework")
15622 (description
15623 "This module implements the PRECIS Framework as described in RFC 8264,
15624 RFC 8265 and RFC 8266.")
15625 (license license:expat)))
15626
15627 (define-public python-absl-py
15628 (package
15629 (name "python-absl-py")
15630 (version "0.6.1")
15631 (source
15632 (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "absl-py" version))
15635 (sha256
15636 (base32
15637 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15638 (build-system python-build-system)
15639 (propagated-inputs
15640 `(("python-six" ,python-six)))
15641 (home-page "https://github.com/abseil/abseil-py")
15642 (synopsis "Abseil Python common libraries")
15643 (description
15644 "This package provides the Abseil Python Common Libraries, a collection
15645 of Python libraries for building Python applications.")
15646 (license license:asl2.0)))
15647
15648 (define-public python-astor
15649 (package
15650 (name "python-astor")
15651 (version "0.7.1")
15652 (source
15653 (origin
15654 (method url-fetch)
15655 (uri (pypi-uri "astor" version))
15656 (sha256
15657 (base32
15658 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15659 (build-system python-build-system)
15660 ;; FIXME: There are two errors and two test failures.
15661 (arguments `(#:tests? #f))
15662 (home-page "https://github.com/berkerpeksag/astor")
15663 (synopsis "Read and write Python ASTs")
15664 (description "Astor is designed to allow easy manipulation of Python
15665 source via the Abstract Syntax Tree.")
15666 (license license:bsd-3)))
15667
15668 (define-public python2-astor
15669 (package-with-python2 python-astor))
15670
15671 (define-public python-grpcio
15672 (package
15673 (name "python-grpcio")
15674 (version "1.17.1")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "grpcio" version))
15679 (sha256
15680 (base32
15681 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15682 (build-system python-build-system)
15683 (propagated-inputs
15684 `(("python-six" ,python-six)))
15685 (home-page "https://grpc.io")
15686 (synopsis "HTTP/2-based RPC framework")
15687 (description "This package provides a Python library for communicating
15688 with the HTTP/2-based RPC framework gRPC.")
15689 (license license:asl2.0)))
15690
15691 (define-public python-astunparse
15692 (package
15693 (name "python-astunparse")
15694 (version "1.6.2")
15695 (source
15696 (origin
15697 (method url-fetch)
15698 (uri (pypi-uri "astunparse" version))
15699 (sha256
15700 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15701 (build-system python-build-system)
15702 (arguments '(#:tests? #f)) ; there are none
15703 (propagated-inputs
15704 `(("python-six" ,python-six)
15705 ("python-wheel" ,python-wheel)))
15706 (home-page "https://github.com/simonpercivall/astunparse")
15707 (synopsis "AST unparser for Python")
15708 (description "This package provides an AST unparser for Python. It is a
15709 factored out version of @code{unparse} found in the Python source
15710 distribution.")
15711 (license license:bsd-3)))
15712
15713 (define-public python-gast
15714 (package
15715 (name "python-gast")
15716 (version "0.2.2")
15717 (source
15718 (origin
15719 (method url-fetch)
15720 (uri (pypi-uri "gast" version))
15721 (sha256
15722 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15723 (build-system python-build-system)
15724 (propagated-inputs
15725 `(("python-astunparse" ,python-astunparse)))
15726 (home-page "https://pypi.org/project/gast/")
15727 (synopsis "Generic Python AST that abstracts the underlying Python version")
15728 (description
15729 "GAST provides a compatibility layer between the AST of various Python
15730 versions, as produced by @code{ast.parse} from the standard @code{ast}
15731 module.")
15732 (license license:bsd-3)))
15733
15734 (define-public python-wikidata
15735 (package
15736 (name "python-wikidata")
15737 (version "0.6.1")
15738 (source
15739 (origin
15740 (method url-fetch)
15741 (uri (pypi-uri "Wikidata" version))
15742 (sha256
15743 (base32
15744 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15745 (build-system python-build-system)
15746 (propagated-inputs
15747 `(("python-babel" ,python-babel)))
15748 (home-page "https://github.com/dahlia/wikidata")
15749 (synopsis "Wikidata client library")
15750 (description
15751 "This package provides a Python interface to
15752 @url{https://www.wikidata.org/, Wikidata}.")
15753 (properties '((upstream-name . "Wikidata")))
15754 (license license:gpl3+)))
15755
15756 (define-public python-doctest-ignore-unicode
15757 (package
15758 (name "python-doctest-ignore-unicode")
15759 (version "0.1.2")
15760 (source
15761 (origin
15762 (method url-fetch)
15763 (uri (pypi-uri "doctest-ignore-unicode" version))
15764 (sha256
15765 (base32
15766 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15767 (build-system python-build-system)
15768 (native-inputs
15769 `(("python-nose" ,python-nose)))
15770 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15771 (synopsis "Ignore Unicode literal prefixes in doctests")
15772 (description
15773 "This package adds support for a flag to ignore Unicode literal prefixes
15774 in doctests.")
15775 (license license:asl2.0)))
15776
15777 (define-public python-attr
15778 (package
15779 (name "python-attr")
15780 (version "0.3.1")
15781 (source
15782 (origin
15783 (method url-fetch)
15784 (uri (pypi-uri "attr" version))
15785 (sha256
15786 (base32
15787 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15788 (build-system python-build-system)
15789 (home-page "https://github.com/denis-ryzhkov/attr")
15790 (synopsis "Decorator for attributes of target function or class")
15791 (description "Simple decorator to set attributes of target function or
15792 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15793 (license license:expat)))
15794
15795 (define-public python-construct
15796 (package
15797 (name "python-construct")
15798 (version "2.9.45")
15799 (source
15800 (origin
15801 (method url-fetch)
15802 (uri (pypi-uri "construct" version))
15803 (sha256
15804 (base32
15805 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15806 (build-system python-build-system)
15807 (arguments
15808 `(#:tests? #f)) ; No tests exist.
15809 (propagated-inputs
15810 `(("python-extras" ,python-extras)
15811 ("python-arrow" ,python-arrow)
15812 ("python-numpy" ,python-numpy)
15813 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15814 (home-page "http://construct.readthedocs.io")
15815 (synopsis "Declarative and symmetrical parser and builder for binary data")
15816 (description
15817 "This package provides both simple, atomic constructs (such as
15818 integers of various sizes), as well as composite ones which allow you
15819 form hierarchical and sequential structures of increasing complexity.
15820 It features bit and byte granularity, easy debugging and testing, an
15821 easy-to-extend subclass system, and lots of primitive constructs to
15822 make your work easier.")
15823 (license license:expat)))
15824
15825 (define-public python-humanize
15826 (package
15827 (name "python-humanize")
15828 (version "0.5.1")
15829 (source
15830 (origin
15831 (method url-fetch)
15832 (uri (pypi-uri "humanize" version))
15833 (sha256
15834 (base32
15835 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15836 (arguments
15837 '(#:tests? #f)) ; tests not in pypi archive
15838 (build-system python-build-system)
15839 (home-page "https://github.com/jmoiron/humanize")
15840 (synopsis "Print numerical information in a human-readable form")
15841 (description "This package provides a Python module that displays numbers
15842 and dates in \"human readable\" forms. For example, it would display
15843 \"12345591313\" as \"12.3 billion\".")
15844 (license license:expat)))
15845
15846 (define-public python-txaio
15847 (package
15848 (name "python-txaio")
15849 (version "18.8.1")
15850 (source
15851 (origin
15852 (method url-fetch)
15853 (uri (pypi-uri "txaio" version))
15854 (sha256
15855 (base32
15856 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15857 (build-system python-build-system)
15858 (propagated-inputs
15859 `(("python-twisted" ,python-twisted)
15860 ("python-six" ,python-six)))
15861 (home-page "https://github.com/crossbario/txaio")
15862 (synopsis "Compatibility layer between Python asyncio and Twisted")
15863 (description "Txaio provides a compatibility layer between the Python
15864 @code{asyncio} module and @code{Twisted}.")
15865 (license license:expat)))
15866
15867 (define-public python-toolshed
15868 (package
15869 (name "python-toolshed")
15870 (version "0.4.6")
15871 (source
15872 (origin
15873 (method url-fetch)
15874 (uri (pypi-uri "toolshed" version))
15875 (sha256
15876 (base32
15877 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15878 (build-system python-build-system)
15879 (native-inputs
15880 `(("python-nose" ,python-nose)))
15881 (home-page "https://github.com/brentp/toolshed/")
15882 (synopsis "Collection of modules and functions for working with data")
15883 (description "This is a collection of well-tested, simple modules and
15884 functions that aim to reduce boilerplate when working with data.")
15885 (license license:bsd-2)))
15886
15887 (define-public python-annoy
15888 (package
15889 (name "python-annoy")
15890 (version "1.15.1")
15891 (source
15892 (origin
15893 (method url-fetch)
15894 (uri (pypi-uri "annoy" version))
15895 (sha256
15896 (base32
15897 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15898 (build-system python-build-system)
15899 (native-inputs
15900 `(("python-nose" ,python-nose)))
15901 (home-page "https://github.com/spotify/annoy/")
15902 (synopsis "Approximate nearest neighbors library")
15903 (description
15904 "Annoy is a C++ library with Python bindings to search for points in
15905 space that are close to a given query point. It also creates large read-only
15906 file-based data structures that are @code{mmap}ped into memory so that many
15907 processes may share the same data.")
15908 (license license:asl2.0)))
15909
15910 (define-public python-pylzma
15911 (package
15912 (name "python-pylzma")
15913 (version "0.5.0")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "pylzma" version))
15918 (sha256
15919 (base32
15920 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15921 (build-system python-build-system)
15922 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15923 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15924 (description "This package provides Python bindings for the LZMA library
15925 by Igor Pavlov.")
15926 (license license:lgpl2.1+)))
15927
15928 (define-public python2-pylzma
15929 (package-with-python2 python-pylzma))
15930
15931 (define-public python2-zeroconf
15932 (package
15933 (name "python2-zeroconf")
15934
15935 ;; This is the last version that supports Python 2.x.
15936 (version "0.19.1")
15937 (source
15938 (origin
15939 (method url-fetch)
15940 (uri (pypi-uri "zeroconf" version))
15941 (sha256
15942 (base32
15943 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15944 (build-system python-build-system)
15945 (arguments
15946 `(#:python ,python-2
15947 #:phases
15948 (modify-phases %standard-phases
15949 (add-after 'unpack 'patch-requires
15950 (lambda* (#:key inputs #:allow-other-keys)
15951 (substitute* "setup.py"
15952 (("enum-compat")
15953 "enum34"))
15954 #t)))))
15955 (native-inputs
15956 `(("python2-six" ,python2-six)
15957 ("python2-enum32" ,python2-enum34)
15958 ("python2-netifaces" ,python2-netifaces)
15959 ("python2-typing" ,python2-typing)))
15960 (home-page "https://github.com/jstasiak/python-zeroconf")
15961 (synopsis "Pure Python mDNS service discovery")
15962 (description
15963 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15964 compatible).")
15965 (license license:lgpl2.1+)))
15966
15967 (define-public python-bsddb3
15968 (package
15969 (name "python-bsddb3")
15970 (version "6.2.6")
15971 (source
15972 (origin
15973 (method url-fetch)
15974 (uri (pypi-uri "bsddb3" version))
15975 (sha256
15976 (base32
15977 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15978 (build-system python-build-system)
15979 (inputs
15980 `(("bdb" ,bdb)))
15981 (arguments
15982 '(#:phases
15983 (modify-phases %standard-phases
15984 (add-after 'unpack 'configure-locations
15985 (lambda* (#:key inputs #:allow-other-keys)
15986 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15987 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15988 #t))
15989 (replace 'check
15990 (lambda _
15991 (invoke "python3" "test3.py" "-v"))))))
15992 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15993 (synopsis "Python bindings for Oracle Berkeley DB")
15994 (description
15995 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15996 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15997 Transaction objects, and each of these is exposed as a Python type in the
15998 bsddb3.db module. The database objects can use various access methods: btree,
15999 hash, recno, and queue. Complete support of Berkeley DB distributed
16000 transactions. Complete support for Berkeley DB Replication Manager.
16001 Complete support for Berkeley DB Base Replication. Support for RPC.")
16002 (license license:bsd-3)))
16003
16004 (define-public python-dbfread
16005 (package
16006 (name "python-dbfread")
16007 (version "2.0.7")
16008 (source (origin
16009 (method url-fetch)
16010 (uri (pypi-uri "dbfread" version))
16011 (sha256
16012 (base32
16013 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16014 (build-system python-build-system)
16015 (native-inputs
16016 `(("python-pytest" ,python-pytest)))
16017 (home-page "https://dbfread.readthedocs.io")
16018 (synopsis "Read DBF Files with Python")
16019 (description
16020 "This library reads DBF files and returns the data as native Python data
16021 types for further processing. It is primarily intended for batch jobs and
16022 one-off scripts.")
16023 (license license:expat)))
16024
16025 (define-public python-cached-property
16026 (package
16027 (name "python-cached-property")
16028 (version "1.5.1")
16029 (source
16030 (origin
16031 (method url-fetch)
16032 (uri (pypi-uri "cached-property" version))
16033 (sha256
16034 (base32
16035 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16036 (build-system python-build-system)
16037 (arguments
16038 `(#:phases
16039 (modify-phases %standard-phases
16040 ;; https://github.com/pydanny/cached-property/issues/131
16041 ;; recent versions of freezegun break one test
16042 (add-after 'unpack 'disable-broken-test
16043 (lambda _
16044 (substitute* "tests/test_cached_property.py"
16045 (("def test_threads_ttl_expiry\\(self\\)" m)
16046 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16047 " " m)))
16048 #t)))))
16049 (native-inputs
16050 `(("python-freezegun" ,python-freezegun)))
16051 (home-page
16052 "https://github.com/pydanny/cached-property")
16053 (synopsis
16054 "Decorator for caching properties in classes")
16055 (description
16056 "This package provides a decorator which makes caching
16057 time-or-computationally-expensive properties quick and easy and works in Python
16058 2 or 3.")
16059 (license license:bsd-3)))