gnu: recode: Don't use NAME in source URI.
[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 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;;
69 ;;; This file is part of GNU Guix.
70 ;;;
71 ;;; GNU Guix is free software; you can redistribute it and/or modify it
72 ;;; under the terms of the GNU General Public License as published by
73 ;;; the Free Software Foundation; either version 3 of the License, or (at
74 ;;; your option) any later version.
75 ;;;
76 ;;; GNU Guix is distributed in the hope that it will be useful, but
77 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 ;;; GNU General Public License for more details.
80 ;;;
81 ;;; You should have received a copy of the GNU General Public License
82 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
83
84 (define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages dbm)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
117 #:use-module (gnu packages monitoring)
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-check)
127 #:use-module (gnu packages python-compression)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sphinx)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
151 #:use-module (gnu packages serialization)
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
155 #:use-module (guix hg-download)
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
163
164 (define-public python-psutil
165 (package
166 (name "python-psutil")
167 (version "5.6.2")
168 (source
169 (origin
170 (method url-fetch)
171 (uri (pypi-uri "psutil" version))
172 (sha256
173 (base32
174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
175 (build-system python-build-system)
176 (arguments
177 ;; FIXME: some tests does not return and times out.
178 '(#:tests? #f))
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
181 (description
182 "psutil (Python system and process utilities) is a library for retrieving
183 information on running processes and system utilization (CPU, memory, disks,
184 network) in Python. It is useful mainly for system monitoring, profiling and
185 limiting process resources and management of running processes. It implements
186 many functionalities offered by command line tools such as: ps, top, lsof,
187 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188 pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
191
192 (define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
194 (package
195 (inherit base)
196 (propagated-inputs
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
199
200 (define-public python-shapely
201 (package
202 (name "python-shapely")
203 (version "1.6.4.post2")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (pypi-uri "Shapely" version))
208 (sha256
209 (base32
210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
211 (build-system python-build-system)
212 (native-inputs
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
217 (inputs
218 `(("geos" ,geos)))
219 (propagated-inputs
220 `(("python-numpy" ,python-numpy)))
221 (arguments
222 `(#:phases
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
236 #t)))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240 planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
242
243 (define-public python-shortuuid
244 (package
245 (name "python-shortuuid")
246 (version "0.5.0")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (pypi-uri "shortuuid" version))
251 (sha256
252 (base32
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
255 (native-inputs
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
259 (description
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262 module and then similar looking characters are removed.")
263 (license license:bsd-3)))
264
265 (define-public python-logwrap
266 (package
267 (name "python-logwrap")
268 (version "3.2.1")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (pypi-uri "logwrap" version ".zip"))
273 (sha256
274 (base32
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
277 (propagated-inputs
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
280 (native-inputs
281 `(("unzip" ,unzip)
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289 and function call return values in a human-readable way.")
290 (license license:asl2.0)))
291
292 (define-public python2-shapely
293 (package-with-python2 python-shapely))
294
295 (define-public python-clyent
296 (package
297 (name "python-clyent")
298 (version "1.2.1")
299 (source
300 (origin
301 (method url-fetch)
302 (uri (pypi-uri "clyent" version))
303 (sha256
304 (base32
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
307 (native-inputs
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
314
315 (define-public python2-clyent
316 (package-with-python2 python-clyent))
317
318 (define-public python-babel
319 (package
320 (name "python-babel")
321 (version "2.7.0")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "Babel" version))
326 (sha256
327 (base32
328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
329 (build-system python-build-system)
330 (native-inputs
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
333 (propagated-inputs
334 `(("python-pytz" ,python-pytz)))
335 (arguments
336 `(#:phases (modify-phases %standard-phases
337 (replace 'check
338 (lambda _ (invoke "pytest" "-vv"))))))
339 (home-page "http://babel.pocoo.org/")
340 (synopsis
341 "Tools for internationalizing Python applications")
342 (description
343 "Babel is composed of two major parts:
344 - tools to build and work with gettext message catalogs
345 - a Python interface to the CLDR (Common Locale Data Repository), providing
346 access to various locale display names, localized number and date formatting,
347 etc. ")
348 (license license:bsd-3)))
349
350 (define-public python2-babel
351 (package-with-python2 python-babel))
352
353 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
354 (define-public python2-babel-2.6
355 (package
356 (inherit python2-babel)
357 (version "2.6.0")
358 (source (origin
359 (method url-fetch)
360 (uri (pypi-uri "Babel" version))
361 (sha256
362 (base32
363 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
364
365 (define-public python2-backport-ssl-match-hostname
366 (package
367 (name "python2-backport-ssl-match-hostname")
368 (version "3.5.0.1")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (pypi-uri "backports.ssl_match_hostname" version))
373 (sha256
374 (base32
375 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
376 (build-system python-build-system)
377 (arguments
378 `(#:python ,python-2
379 #:tests? #f)) ; no test target
380 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
381 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
382 (description
383 "This backport brings the ssl.match_hostname() function to users of
384 earlier versions of Python. The function checks the hostname in the
385 certificate returned by the server to which a connection has been established,
386 and verifies that it matches the intended target hostname.")
387 (license license:psfl)))
388
389 (define-public python-hdf4
390 (package
391 (name "python-hdf4")
392 (version "0.9")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri name version))
397 (sha256
398 (base32
399 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
400 (build-system python-build-system)
401 (native-inputs `(("nose" ,python-nose)))
402 (propagated-inputs `(("numpy" ,python-numpy)))
403 (inputs
404 `(("hdf4" ,hdf4)
405 ("libjpeg" ,libjpeg)
406 ("zlib" ,zlib)))
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (replace 'check
411 (lambda _
412 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
413 ;; on to import numpy. Somehow this works on their CI system.
414 ;; Let's just manage PYTHONPATH here instead.
415 (substitute* "runexamples.sh"
416 (("export PYTHONPATH=.*") ""))
417 (setenv "PYTHONPATH"
418 (string-append (getcwd) ":"
419 (getenv "PYTHONPATH")))
420 (invoke "./runexamples.sh")
421 (invoke "nosetests" "-v"))))))
422 (home-page "https://github.com/fhs/python-hdf4")
423 (synopsis "Python interface to the NCSA HDF4 library")
424 (description
425 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
426 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
427 NetCDF files can also be read and modified. Python-HDF4 is a fork of
428 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
429 (license license:expat)))
430
431 (define-public python2-hdf4
432 (package-with-python2 python-hdf4))
433
434 (define-public python-h5py
435 (package
436 (name "python-h5py")
437 (version "2.8.0")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (pypi-uri "h5py" version))
442 (sha256
443 (base32
444 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
445 (build-system python-build-system)
446 (arguments
447 `(#:tests? #f ; no test target
448 #:phases
449 (modify-phases %standard-phases
450 (add-after 'unpack 'fix-hdf5-paths
451 (lambda* (#:key inputs #:allow-other-keys)
452 (let ((prefix (assoc-ref inputs "hdf5")))
453 (substitute* "setup_build.py"
454 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
455 (string-append "['" prefix "/lib" "']"))
456 (("'/opt/local/include', '/usr/local/include'")
457 (string-append "'" prefix "/include" "'")))
458 (substitute* "setup_configure.py"
459 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']")))
461 #t))))))
462 (propagated-inputs
463 `(("python-six" ,python-six)
464 ("python-numpy" ,python-numpy)))
465 (inputs
466 `(("hdf5" ,hdf5)))
467 (native-inputs
468 `(("python-cython" ,python-cython)
469 ("python-pkgconfig" ,python-pkgconfig)))
470 (home-page "http://www.h5py.org/")
471 (synopsis "Read and write HDF5 files from Python")
472 (description
473 "The h5py package provides both a high- and low-level interface to the
474 HDF5 library from Python. The low-level interface is intended to be a
475 complete wrapping of the HDF5 API, while the high-level component supports
476 access to HDF5 files, datasets and groups using established Python and NumPy
477 concepts.")
478 (license license:bsd-3)))
479
480 (define-public python2-h5py
481 (package-with-python2 python-h5py))
482
483 (define-public python-sh
484 (package
485 (name "python-sh")
486 (version "1.12.14")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "sh" version))
491 (sha256
492 (base32
493 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
494 (build-system python-build-system)
495 (arguments
496 '(#:phases
497 (modify-phases %standard-phases
498 (replace 'check
499 (lambda _
500 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
501 (setenv "HOME" "/tmp")
502 (invoke "python" "sh.py" "test"))))))
503 (native-inputs
504 `(("python-coverage" ,python-coverage)))
505 (home-page "https://github.com/amoffat/sh")
506 (synopsis "Python subprocess replacement")
507 (description "This package provides a replacement for Python's
508 @code{subprocess} feature.")
509 (license license:expat)))
510
511 (define-public python2-sh
512 (package-with-python2 python-sh))
513
514 (define-public python-cftime
515 (package
516 (name "python-cftime")
517 (version "1.0.3.4")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "cftime" version))
522 (sha256
523 (base32
524 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
525 (build-system python-build-system)
526 (propagated-inputs
527 `(("python-numpy" ,python-numpy)))
528 (native-inputs
529 `(("python-coveralls" ,python-coveralls)
530 ("python-cython" ,python-cython)
531 ("python-pytest-cov" ,python-pytest-cov)))
532 (home-page "https://github.com/Unidata/cftime")
533 (synopsis "Library for time handling")
534 (description
535 "This package provides time-handling functionality that used to be part
536 of the netcdf4 package before.")
537 ;; This package claims to include code under the GPLv3 but is released
538 ;; under ISC.
539 (license (list license:isc license:gpl3+))))
540
541 (define-public python-netcdf4
542 (package
543 (name "python-netcdf4")
544 (version "1.4.2")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "netCDF4" version))
549 (sha256
550 (base32
551 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
552 (build-system python-build-system)
553 (arguments
554 '(#:phases
555 (modify-phases %standard-phases
556 (add-after 'unpack 'configure-locations
557 (lambda* (#:key inputs #:allow-other-keys)
558 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
559 #t)))))
560 (native-inputs
561 `(("python-cython" ,python-cython)))
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)
564 ("python-cftime" ,python-cftime)))
565 (inputs
566 `(("netcdf" ,netcdf)
567 ("hdf4" ,hdf4)
568 ("hdf5" ,hdf5)))
569 (home-page "https://github.com/Unidata/netcdf4-python")
570 (synopsis "Python/numpy interface to the netCDF library")
571 (description "Netcdf4-python is a Python interface to the netCDF C
572 library. netCDF version 4 has many features not found in earlier
573 versions of the library and is implemented on top of HDF5. This module
574 can read and write files in both the new netCDF 4 and the old netCDF 3
575 format, and can create files that are readable by HDF5 clients. The
576 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
577 to users of that module.")
578 ;; The software is mainly ISC, but includes some files covered
579 ;; by the Expat license.
580 (license (list license:isc license:expat))))
581
582 (define-public python2-netcdf4
583 (package-with-python2 python-netcdf4))
584
585 (define-public python-lockfile
586 (package
587 (name "python-lockfile")
588 (version "0.12.2")
589 (source
590 (origin
591 (method url-fetch)
592 (uri (pypi-uri "lockfile" version))
593 (sha256
594 (base32
595 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
596 (build-system python-build-system)
597 (arguments '(#:test-target "check"))
598 (native-inputs
599 `(("python-pbr" ,python-pbr)))
600 (home-page "https://launchpad.net/pylockfile")
601 (synopsis "Platform-independent file locking module")
602 (description
603 "The lockfile package exports a LockFile class which provides a simple
604 API for locking files.")
605 (license license:expat)))
606
607 (define-public python2-lockfile
608 (package-with-python2 python-lockfile))
609
610 (define-public python-semantic-version
611 (package
612 (name "python-semantic-version")
613 (version "2.6.0")
614 (source
615 (origin
616 (method url-fetch)
617 (uri (pypi-uri "semantic_version" version))
618 (sha256
619 (base32
620 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
621 (build-system python-build-system)
622 (arguments
623 `(#:tests? #f)) ; PyPI tarball lacks tests
624 (home-page "https://github.com/rbarrois/python-semanticversion")
625 (synopsis "Semantic versioning module for Python")
626 (description
627 "The @code{semantic_version} class is a small library for handling
628 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
629
630 It can compare versions, generate a new version that represents a bump in one of
631 the version levels, and check whether any given string is a proper semantic
632 version identifier.")
633 (license license:bsd-3)))
634
635 (define-public python2-semantic-version
636 (package-with-python2 python-semantic-version))
637
638 (define-public python-serpent
639 (package
640 (name "python-serpent")
641 (version "1.28")
642 (source
643 (origin
644 (method url-fetch)
645 (uri (pypi-uri "serpent" version))
646 (sha256
647 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
648 (build-system python-build-system)
649 (native-inputs
650 `(("python-attrs" ,python-attrs)
651 ("python-pytz" ,python-pytz)))
652 (home-page "https://github.com/irmen/Serpent")
653 (synopsis "Serializer for literal Python expressions")
654 (description
655 "Serpent provides @code{ast.literal_eval()}-compatible object tree
656 serialization. It serializes an object tree into bytes (an utf-8 encoded
657 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
658 to rebuild the original object tree.
659
660 Because only safe literals are encoded, it is safe to send serpent data to
661 other machines, such as over the network.")
662 (license license:expat)))
663
664 (define-public python-setuptools
665 (package
666 (name "python-setuptools")
667 (version "41.0.1")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (pypi-uri "setuptools" version ".zip"))
672 (sha256
673 (base32
674 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
675 (modules '((guix build utils)))
676 (snippet
677 '(begin
678 ;; Remove included binaries which are used to build self-extracting
679 ;; installers for Windows.
680 ;; TODO: Find some way to build them ourself so we can include them.
681 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
682 #t))))
683 (build-system python-build-system)
684 ;; FIXME: Tests require pytest, which itself relies on setuptools.
685 ;; One could bootstrap with an internal untested setuptools.
686 (arguments
687 `(#:tests? #f))
688 (home-page "https://pypi.python.org/pypi/setuptools")
689 (synopsis
690 "Library designed to facilitate packaging Python projects")
691 (description
692 "Setuptools is a fully-featured, stable library designed to facilitate
693 packaging Python projects, where packaging includes:
694 Python package and module definitions,
695 distribution package metadata,
696 test hooks,
697 project installation,
698 platform-specific details,
699 Python 3 support.")
700 ;; TODO: setuptools now bundles the following libraries:
701 ;; packaging, pyparsing, six and appdirs. How to unbundle?
702 (license (list license:psfl ; setuptools itself
703 license:expat ; six, appdirs, pyparsing
704 license:asl2.0 ; packaging is dual ASL2/BSD-2
705 license:bsd-2))))
706
707 (define-public python2-setuptools
708 (package-with-python2 python-setuptools))
709
710 (define-public python-uniseg
711 (package
712 (name "python-uniseg")
713 (version "0.7.1")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (pypi-uri "uniseg" version ".zip"))
718 (sha256
719 (base32
720 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
721 (build-system python-build-system)
722 (arguments
723 '(#:tests? #f)) ; The test suite requires network access.
724 (native-inputs
725 `(("unzip" ,unzip)))
726 (home-page
727 "https://bitbucket.org/emptypage/uniseg-python")
728 (synopsis
729 "Python library to determine Unicode text segmentations")
730 (description
731 "Uniseg is a Python package used to determine Unicode text segmentations.
732 Supported segmentations include:
733 @enumerate
734 @item @dfn{Code point} (any value in the Unicode codespace)
735 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
736 multiple Unicode code points, e.g. \"G\" + acute-accent)
737 @item Word break
738 @item Sentence break
739 @item Line break
740 @end enumerate")
741 (license license:expat)))
742
743 (define-public python2-uniseg
744 (package-with-python2 python-uniseg))
745
746 (define-public python-humanfriendly
747 (package
748 (name "python-humanfriendly")
749 (version "4.4.1")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (pypi-uri "humanfriendly" version))
754 (sha256
755 (base32
756 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
757 (build-system python-build-system)
758 (arguments
759 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
760 #:tests? #f))
761 (propagated-inputs
762 `(("python-monotonic" ,python-monotonic)))
763 (home-page "https://humanfriendly.readthedocs.io")
764 (synopsis "Human-friendly input and output in Python")
765 (description
766 "The functions and classes in @code{humanfriendly} can be used to make
767 text interfaces more user-friendly. It includes tools to parse and format
768 numbers, file sizes, and timespans, timers for long-running operations, menus
769 to allow the user to choose from a list of options, and terminal interaction
770 helpers.")
771 (license license:expat)))
772
773 (define-public python2-humanfriendly
774 (package-with-python2 python-humanfriendly))
775
776 (define-public python-capturer
777 (package
778 (name "python-capturer")
779 (version "2.4")
780 (source
781 (origin
782 (method url-fetch)
783 (uri (pypi-uri "capturer" version))
784 (sha256
785 (base32
786 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
787 (build-system python-build-system)
788 (arguments
789 `(#:tests? #f))
790 (propagated-inputs
791 `(("python-humanfriendly" ,python-humanfriendly)))
792 (home-page "https://capturer.readthedocs.io")
793 (synopsis "Capture stdout and stderr streams of the current process")
794 (description
795 "The capturer package makes it easy to capture the stdout and stderr
796 streams of the current process and subprocesses. Output can be relayed
797 to the terminal in real time but is also available to the Python program
798 for additional processing.")
799 (license license:expat)))
800
801 (define-public python2-capturer
802 (package-with-python2 python-capturer))
803
804 (define-public python-case
805 (package
806 (name "python-case")
807 (version "1.5.3")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "case" version))
812 (sha256
813 (base32
814 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
815 (build-system python-build-system)
816 (propagated-inputs
817 `(("python-mock" ,python-mock)
818 ("python-nose" ,python-nose)
819 ("python-six" ,python-six)
820 ("python-unittest2" ,python-unittest2)))
821 (native-inputs
822 `(("python-coverage" ,python-coverage)))
823 (home-page "https://github.com/celery/case")
824 (synopsis "Unittest utilities and convenience methods")
825 (description
826 "The @code{case} package provides utilities on top of unittest, including
827 some helpful Python 2 compatibility convenience methods.")
828 (license license:bsd-3)))
829
830 (define-public python-verboselogs
831 (package
832 (name "python-verboselogs")
833 (version "1.7")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "verboselogs" version))
838 (sha256
839 (base32
840 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
841 (build-system python-build-system)
842 (native-inputs
843 `(("python-mock" ,python-mock)
844 ("python-astroid" ,python-astroid)
845 ("python-pylint" ,python-pylint)))
846 (home-page "https://verboselogs.readthedocs.io")
847 (synopsis "Verbose logging level for Python's logging module")
848 (description
849 "The @code{verboselogs} package extends Python's @code{logging} module to
850 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
851 (license license:expat)))
852
853 (define-public python2-verboselogs
854 (package-with-python2 python-verboselogs))
855
856 (define-public python-coloredlogs
857 (package
858 (name "python-coloredlogs")
859 (version "7.3")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "coloredlogs" version))
864 (sha256
865 (base32
866 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
867 (build-system python-build-system)
868 (arguments
869 `(;Tests require some updated modules
870 #:tests? #f))
871 (propagated-inputs
872 `(("python-capturer" ,python-capturer)))
873 (home-page "https://coloredlogs.readthedocs.io")
874 (synopsis "Colored stream handler for Python's logging module")
875 (description
876 "The @code{coloredlogs} package enables colored terminal output for
877 Python's logging module. The @code{ColoredFormatter} class inherits from
878 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
879 messages in color.")
880 (license license:expat)))
881
882 (define-public python2-coloredlogs
883 (package-with-python2 python-coloredlogs))
884
885 (define-public python-et-xmlfile
886 (package
887 (name "python-et-xmlfile")
888 (version "1.0.1")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (pypi-uri "et_xmlfile" version))
893 (sha256
894 (base32
895 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
896 (build-system python-build-system)
897 (arguments
898 `(#:phases (modify-phases %standard-phases
899 (replace 'check
900 (lambda _
901 (invoke "pytest"))))))
902 (native-inputs
903 `(("python-pytest" ,python-pytest)
904 ("python-lxml" ,python-lxml))) ;used for the tests
905 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
906 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
907 (description "This Python library is based upon the @code{xmlfile} module
908 from @code{lxml}. It aims to provide a low memory, compatible implementation
909 of @code{xmlfile}.")
910 (license license:expat)))
911
912 (define-public python2-et-xmlfile
913 (package-with-python2 python-et-xmlfile))
914
915 (define-public python-openpyxl
916 (package
917 (name "python-openpyxl")
918 (version "2.6.2")
919 (source
920 (origin
921 ;; We use the upstream repository, as the tests are not included in the
922 ;; PyPI releases.
923 (method hg-fetch)
924 (uri (hg-reference
925 (url "https://bitbucket.org/openpyxl/openpyxl")
926 (changeset version)))
927 (file-name (string-append name "-" version "-checkout"))
928 (sha256
929 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
930 (build-system python-build-system)
931 (arguments
932 `(#:phases (modify-phases %standard-phases
933 (replace 'check
934 (lambda _
935 (invoke "pytest"))))))
936 (native-inputs
937 ;; For the test suite.
938 `(("python-lxml" ,python-lxml)
939 ("python-pillow" ,python-pillow)
940 ("python-pytest" ,python-pytest)))
941 (propagated-inputs
942 `(("python-et-xmlfile" ,python-et-xmlfile)
943 ("python-jdcal" ,python-jdcal)))
944 (home-page "https://openpyxl.readthedocs.io")
945 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
946 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
947 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
948 standard.")
949 (license license:expat)))
950
951 (define-public python-eventlet
952 (package
953 (name "python-eventlet")
954 (version "0.20.1")
955 (source
956 (origin
957 (method url-fetch)
958 (uri (pypi-uri "eventlet" version))
959 (sha256
960 (base32
961 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
962 (build-system python-build-system)
963 (propagated-inputs
964 `(("python-greenlet" ,python-greenlet)))
965 (arguments
966 ;; TODO: Requires unpackaged 'enum-compat'.
967 '(#:tests? #f))
968 (home-page "http://eventlet.net")
969 (synopsis "Concurrent networking library for Python")
970 (description
971 "Eventlet is a concurrent networking library for Python that
972 allows you to change how you run your code, not how you write it.
973 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
974 Coroutines ensure that the developer uses a blocking style of programming
975 that is similar to threading, but provide the benefits of non-blocking I/O.
976 The event dispatch is implicit, which means you can easily use @code{Eventlet}
977 from the Python interpreter, or as a small part of a larger application.")
978 (license license:expat)))
979
980 (define-public python2-eventlet
981 (let ((base (package-with-python2
982 (strip-python2-variant python-eventlet))))
983 (package (inherit base)
984 (propagated-inputs
985 `(("python2-enum34" ,python2-enum34)
986 ,@(package-propagated-inputs base))))))
987
988 (define-public python-six
989 (package
990 (name "python-six")
991 (version "1.11.0")
992 (source
993 (origin
994 (method url-fetch)
995 (uri (pypi-uri "six" version))
996 (sha256
997 (base32
998 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
999 (build-system python-build-system)
1000 (arguments
1001 `(#:phases
1002 (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "py.test" "-v"))))))
1006 (native-inputs
1007 `(("python-py" ,python-py)
1008 ("python-pytest" ,python-pytest-bootstrap)))
1009 (home-page "https://pypi.python.org/pypi/six/")
1010 (synopsis "Python 2 and 3 compatibility utilities")
1011 (description
1012 "Six is a Python 2 and 3 compatibility library. It provides utility
1013 functions for smoothing over the differences between the Python versions with
1014 the goal of writing Python code that is compatible on both Python versions.
1015 Six supports every Python version since 2.5. It is contained in only one
1016 Python file, so it can be easily copied into your project.")
1017 (license license:x11)))
1018
1019 (define-public python2-six
1020 (package-with-python2 python-six))
1021
1022 (define-public python-six-bootstrap
1023 (package
1024 (inherit python-six)
1025 (name "python-six-bootstrap")
1026 (native-inputs `())
1027 (arguments `(#:tests? #f))))
1028
1029 (define-public python2-six-bootstrap
1030 (package-with-python2 python-six-bootstrap))
1031
1032 (define-public python-schedule
1033 (package
1034 (name "python-schedule")
1035 (version "0.4.3")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (pypi-uri "schedule" version))
1040 (sha256
1041 (base32
1042 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1043 (build-system python-build-system)
1044 (native-inputs
1045 `(("python-pytest" ,python-pytest)
1046 ("python-mock" ,python-mock)))
1047 (home-page "https://github.com/dbader/schedule")
1048 (synopsis "Schedule periodic function calls in Python")
1049 (description
1050 "Schedule is an in-process scheduler for periodic jobs that uses the
1051 builder pattern for configuration. Schedule lets you run Python functions (or
1052 any other callable) periodically at pre-determined intervals using a simple,
1053 human-friendly syntax.")
1054 (license license:expat)))
1055
1056 (define-public python2-schedule
1057 (package-with-python2 python-schedule))
1058
1059 (define-public python-pandas
1060 (package
1061 (name "python-pandas")
1062 (version "0.24.2")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pandas" version))
1067 (sha256
1068 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1069 (build-system python-build-system)
1070 (arguments
1071 `(#:modules ((guix build utils)
1072 (guix build python-build-system)
1073 (ice-9 ftw)
1074 (srfi srfi-26))
1075 #:phases (modify-phases %standard-phases
1076 (add-after 'unpack 'patch-which
1077 (lambda* (#:key inputs #:allow-other-keys)
1078 (let ((which (assoc-ref inputs "which")))
1079 (substitute* "pandas/io/clipboard/__init__.py"
1080 (("^CHECK_CMD = .*")
1081 (string-append "CHECK_CMD = \"" which "\"\n"))))
1082 #t))
1083 (replace 'check
1084 (lambda _
1085 (let ((build-directory
1086 (string-append
1087 (getcwd) "/build/"
1088 (car (scandir "build"
1089 (cut string-prefix? "lib." <>))))))
1090 ;; Disable the "strict data files" option which causes
1091 ;; the build to error out if required data files are
1092 ;; not available (as is the case with PyPI archives).
1093 (substitute* "setup.cfg"
1094 (("addopts = --strict-data-files") "addopts = "))
1095 (with-directory-excursion build-directory
1096 ;; Delete tests that require "moto" which is not yet
1097 ;; in Guix.
1098 (for-each delete-file
1099 '("pandas/tests/io/conftest.py"
1100 "pandas/tests/io/json/test_compression.py"
1101 "pandas/tests/io/parser/test_network.py"
1102 "pandas/tests/io/test_parquet.py"))
1103 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1104 "--skip-network" "-k"
1105 ;; XXX: Due to the deleted tests above.
1106 "not test_read_s3_jsonl"))))))))
1107 (propagated-inputs
1108 `(("python-numpy" ,python-numpy)
1109 ("python-openpyxl" ,python-openpyxl)
1110 ("python-pytz" ,python-pytz)
1111 ("python-dateutil" ,python-dateutil)
1112 ("python-xlrd" ,python-xlrd)))
1113 (inputs
1114 `(("which" ,which)))
1115 (native-inputs
1116 `(("python-cython" ,python-cython)
1117 ("python-beautifulsoup4" ,python-beautifulsoup4)
1118 ("python-lxml" ,python-lxml)
1119 ("python-html5lib" ,python-html5lib)
1120 ("python-nose" ,python-nose)
1121 ("python-pytest" ,python-pytest)
1122 ("python-pytest-mock" ,python-pytest-mock)))
1123 (home-page "https://pandas.pydata.org")
1124 (synopsis "Data structures for data analysis, time series, and statistics")
1125 (description
1126 "Pandas is a Python package providing fast, flexible, and expressive data
1127 structures designed to make working with structured (tabular,
1128 multidimensional, potentially heterogeneous) and time series data both easy
1129 and intuitive. It aims to be the fundamental high-level building block for
1130 doing practical, real world data analysis in Python.")
1131 (license license:bsd-3)))
1132
1133 (define-public python2-pandas
1134 (package-with-python2 python-pandas))
1135
1136 (define-public python2-mechanize
1137 (package
1138 (name "python2-mechanize")
1139 (version "0.2.5")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "mechanize" version))
1144 (sha256
1145 (base32
1146 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(#:python ,python-2 ; apparently incompatible with Python 3
1150 #:tests? #f))
1151 ;; test fails with message
1152 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1153 ;; (python-3.3.2) or
1154 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1155 ;; (python-2.7.5).
1156 ;; The source code is from March 2011 and probably not up-to-date
1157 ;; with respect to python unit tests.
1158 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1159 (synopsis
1160 "Stateful programmatic web browsing in Python")
1161 (description
1162 "Mechanize implements stateful programmatic web browsing in Python,
1163 after Andy Lester’s Perl module WWW::Mechanize.")
1164 (license (license:non-copyleft
1165 "file://COPYING"
1166 "See COPYING in the distribution."))))
1167
1168
1169 (define-public python-simplejson
1170 (package
1171 (name "python-simplejson")
1172 (version "3.14.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "simplejson" version))
1177 (sha256
1178 (base32
1179 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1180 (build-system python-build-system)
1181 (home-page "http://simplejson.readthedocs.org/en/latest/")
1182 (synopsis
1183 "Json library for Python")
1184 (description
1185 "JSON (JavaScript Object Notation) is a subset of JavaScript
1186 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1187 format.
1188
1189 Simplejson exposes an API familiar to users of the standard library marshal
1190 and pickle modules. It is the externally maintained version of the json
1191 library contained in Python 2.6, but maintains compatibility with Python 2.5
1192 and (currently) has significant performance advantages, even without using
1193 the optional C extension for speedups. Simplejson is also supported on
1194 Python 3.3+.")
1195 (license license:x11)))
1196
1197 (define-public python2-simplejson
1198 (package-with-python2 python-simplejson))
1199
1200
1201 (define-public python-pyicu
1202 (package
1203 (name "python-pyicu")
1204 (version "2.2")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (pypi-uri "PyICU" version))
1209 (sha256
1210 (base32
1211 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1212 (build-system python-build-system)
1213 (inputs
1214 `(("icu4c" ,icu4c)))
1215 (native-inputs
1216 `(("python-pytest" ,python-pytest)
1217 ("python-six" ,python-six)))
1218 (home-page "https://github.com/ovalhub/pyicu")
1219 (synopsis "Python extension wrapping the ICU C++ API")
1220 (description
1221 "PyICU is a python extension wrapping the ICU C++ API.")
1222 (properties `((python2-variant . ,(delay python2-pyicu))))
1223 (license license:x11)))
1224
1225 (define-public python2-pyicu
1226 (let ((base (package-with-python2
1227 (strip-python2-variant python-pyicu))))
1228 (package
1229 (inherit base)
1230 (arguments
1231 `(,@(package-arguments base)
1232 #:phases
1233 (modify-phases %standard-phases
1234 (add-before 'check 'delete-failing-test
1235 (λ _
1236 ;; XXX: This fails due to Unicode issues unique to Python 2,
1237 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1238 (delete-file "test/test_Script.py")
1239 #t))))))))
1240
1241 (define-public python2-dogtail
1242 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1243 ;; spaces in indentation" with Python 3.
1244 (package
1245 (name "python2-dogtail")
1246 (version "0.9.9")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (pypi-uri "dogtail" version))
1250 (sha256
1251 (base32
1252 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1253 (build-system python-build-system)
1254 (arguments `(#:python ,python-2
1255 #:tests? #f)) ; invalid command "test"
1256 ;; Currently no offical homepage.
1257 (home-page "https://pypi.python.org/pypi/dogtail/")
1258 (synopsis "GUI test tool and automation framework written in Python")
1259 (description
1260 "Dogtail is a GUI test tool and automation framework written in Python.
1261 It uses Accessibility (a11y) technologies to communicate with desktop
1262 applications. dogtail scripts are written in Python and executed like any
1263 other Python program.")
1264 (license license:gpl2+)))
1265
1266 (define-public python-empy
1267 (package
1268 (name "python-empy")
1269 (version "3.3.3")
1270 (source (origin
1271 (method url-fetch)
1272 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1273 version ".tar.gz"))
1274 (sha256
1275 (base32
1276 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1277 (build-system python-build-system)
1278 (arguments
1279 `(#:tests? #f)) ; python2 only
1280 (home-page "http://www.alcyone.com/software/empy/")
1281 (synopsis "Templating system for Python")
1282 (description
1283 "EmPy is a system for embedding Python expressions and statements in
1284 template text; it takes an EmPy source file, processes it, and produces
1285 output. This is accomplished via expansions, which are special signals to the
1286 EmPy system and are set off by a special prefix (by default the at sign, @@).
1287 EmPy can expand arbitrary Python expressions and statements in this way, as
1288 well as a variety of special forms. Textual data not explicitly delimited in
1289 this way is sent unaffected to the output, allowing Python to be used in
1290 effect as a markup language. Also supported are callbacks via hooks,
1291 recording and playback via diversions, and dynamic, chainable filters. The
1292 system is highly configurable via command line options and embedded
1293 commands.")
1294 (license license:lgpl2.1+)))
1295
1296 (define-public python2-empy
1297 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1298 (package
1299 (inherit base)
1300 (arguments `(,@(package-arguments base)
1301 #:tests? #t)))))
1302
1303 (define-public python2-element-tree
1304 (package
1305 (name "python2-element-tree")
1306 (version "1.2.6")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "http://effbot.org/media/downloads/elementtree-"
1311 version "-20050316.tar.gz"))
1312 (sha256
1313 (base32
1314 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:python ,python-2 ; seems to be part of Python 3
1318 #:tests? #f)) ; no 'test' sub-command
1319 (synopsis "Toolkit for XML processing in Python")
1320 (description
1321 "ElementTree is a Python library supporting lightweight XML processing.")
1322 (home-page "http://effbot.org/zone/element-index.htm")
1323 (license (license:x11-style
1324 "http://docs.python.org/2/license.html"
1325 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1326
1327 (define-public python2-pybugz
1328 (package
1329 (name "python2-pybugz")
1330 (version "0.6.11")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1335 version ".tar.gz"))
1336 (sha256
1337 (base32
1338 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1339 (patches (search-patches "pybugz-stty.patch"
1340 "pybugz-encode-error.patch"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:python ,python-2 ; SyntaxError with Python 3
1344 #:tests? #f)) ; no 'test' sub-command
1345 (propagated-inputs
1346 `(("element-tree" ,python2-element-tree)))
1347 (synopsis "Python and command-line interface to Bugzilla")
1348 (description
1349 "PyBugz is a Python library and command-line tool to query the Bugzilla
1350 bug tracking system. It is meant as an aid to speed up interaction with the
1351 bug tracker.")
1352 (home-page "http://www.liquidx.net/pybugz/")
1353 (license license:gpl2)))
1354
1355 (define-public python2-enum
1356 (package
1357 (name "python2-enum")
1358 (version "0.4.6")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "enum" version))
1362 (sha256
1363 (base32
1364 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2))
1368 (home-page "http://pypi.python.org/pypi/enum/")
1369 (synopsis "Robust enumerated type support in Python")
1370 (description
1371 "This provides a module for robust enumerations in Python. It has
1372 been superseded by the Python standard library and is provided only for
1373 compatibility.")
1374 ;; Choice of either license.
1375 (license (list license:gpl3+ license:psfl))))
1376
1377 (define-public python-enum34
1378 (package
1379 (name "python-enum34")
1380 (version "1.1.6")
1381 (source
1382 (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "enum34" version))
1385 (sha256
1386 (base32
1387 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1388 (build-system python-build-system)
1389 (home-page "https://pypi.python.org/pypi/enum34")
1390 (synopsis "Backported Python 3.4 Enum")
1391 (description
1392 "Enum34 is the new Python stdlib enum module available in Python 3.4
1393 backported for previous versions of Python from 2.4 to 3.3.")
1394 (license license:bsd-3)))
1395
1396 (define-public python2-enum34
1397 (package-with-python2 python-enum34))
1398
1399 (define-public python-parse-type
1400 (package
1401 (name "python-parse-type")
1402 (version "0.4.2")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "parse_type" version))
1407 (sha256
1408 (base32
1409 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1410 (build-system python-build-system)
1411 (propagated-inputs
1412 `(("python-six" ,python-six)
1413 ("python-parse" ,python-parse)))
1414 (native-inputs
1415 `(("python-pytest" ,python-pytest)
1416 ("python-pytest-runner" ,python-pytest-runner)))
1417 (home-page "https://github.com/jenisys/parse_type")
1418 (synopsis "Extended parse module")
1419 (description
1420 "Parse_type extends the python parse module.")
1421 (properties
1422 `((python2-variant . ,(delay python2-parse-type))))
1423 (license license:bsd-3)))
1424
1425 (define-public python2-parse-type
1426 (let ((base (package-with-python2
1427 (strip-python2-variant python-parse-type))))
1428 (package (inherit base)
1429 (propagated-inputs
1430 `(("python2-enum34" ,python2-enum34)
1431 ,@(package-propagated-inputs base))))))
1432
1433 (define-public python-parse
1434 (package
1435 (name "python-parse")
1436 (version "1.8.4")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (pypi-uri "parse" version))
1441 (sha256
1442 (base32
1443 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:phases
1447 (modify-phases %standard-phases
1448 (replace 'check
1449 (lambda _ (invoke "python" "test_parse.py"))))))
1450 (home-page "https://github.com/r1chardj0n3s/parse")
1451 (synopsis "Parse strings")
1452 (description
1453 "Parse strings using a specification based on the Python @code{format()}
1454 syntax.")
1455 (license license:x11)))
1456
1457 (define-public python-polib
1458 (package
1459 (name "python-polib")
1460 (version "1.0.8")
1461 (source (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "polib" version))
1464 (sha256
1465 (base32
1466 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1467 (build-system python-build-system)
1468 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1469 (synopsis "Manipulate, create and modify gettext files")
1470 (description "Polib can manipulate any gettext format (po, pot and mo)
1471 files. It can be used to create po files from scratch or to modify
1472 existing ones.")
1473 (license license:expat)))
1474
1475 (define-public python2-polib
1476 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1477 (package
1478 (inherit base)
1479 (arguments `(,@(package-arguments base)
1480 ;; Tests don't work with python2.
1481 #:tests? #f)))))
1482
1483 (define-public scons
1484 (package
1485 (name "scons")
1486 (version "3.0.4")
1487 (source (origin
1488 (method git-fetch)
1489 (uri (git-reference
1490 (url "https://github.com/SCons/scons.git")
1491 (commit version)))
1492 (file-name (git-file-name name version))
1493 (sha256
1494 (base32
1495 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1496 (build-system python-build-system)
1497 (arguments
1498 `(#:use-setuptools? #f ; still relies on distutils
1499 #:tests? #f ; no 'python setup.py test' command
1500 #:phases
1501 (modify-phases %standard-phases
1502 (add-before 'build 'bootstrap
1503 (lambda _
1504 (substitute* "src/engine/SCons/compat/__init__.py"
1505 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1506 "sys.modules[new] = __import__(old)"))
1507 (substitute* "src/engine/SCons/Platform/__init__.py"
1508 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1509 "mod = __import__(full_name)"))
1510 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1511 (chdir "build/scons")
1512 #t)))))
1513 (home-page "http://scons.org/")
1514 (synopsis "Software construction tool written in Python")
1515 (description
1516 "SCons is a software construction tool. Think of SCons as an improved,
1517 cross-platform substitute for the classic Make utility with integrated
1518 functionality similar to autoconf/automake and compiler caches such as ccache.
1519 In short, SCons is an easier, more reliable and faster way to build
1520 software.")
1521 (license license:x11)))
1522
1523 (define-public scons-python2
1524 (package
1525 (inherit (package-with-python2 scons))
1526 (name "scons-python2")))
1527
1528 (define-public python-extras
1529 (package
1530 (name "python-extras")
1531 (version "1.0.0")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "extras" version))
1536 (sha256
1537 (base32
1538 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1539 (build-system python-build-system)
1540 (arguments
1541 ;; FIXME: Circular dependency on testtools.
1542 '(#:tests? #f))
1543 (home-page "https://github.com/testing-cabal/extras")
1544 (synopsis "Useful extensions to the Python standard library")
1545 (description
1546 "Extras is a set of extensions to the Python standard library.")
1547 (license license:expat)))
1548
1549 (define-public python2-extras
1550 (package-with-python2 python-extras))
1551
1552 (define-public python-mimeparse
1553 (package
1554 (name "python-mimeparse")
1555 (version "1.6.0")
1556 (source
1557 (origin
1558 (method url-fetch)
1559 (uri (pypi-uri "python-mimeparse" version))
1560 (sha256
1561 (base32
1562 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1563 (build-system python-build-system)
1564 (arguments
1565 '(#:phases
1566 (modify-phases %standard-phases
1567 (replace 'check
1568 (lambda _
1569 (invoke "./mimeparse_test.py"))))))
1570 (home-page
1571 "https://github.com/dbtsai/python-mimeparse")
1572 (synopsis "Python library for parsing MIME types")
1573 (description
1574 "Mimeparse provides basic functions for parsing MIME type names and
1575 matching them against a list of media-ranges.")
1576 (license license:expat)))
1577
1578 (define-public python2-mimeparse
1579 (package-with-python2 python-mimeparse))
1580
1581 (define-public python-miniboa
1582 (package
1583 (name "python-miniboa")
1584 (version "1.0.7")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "miniboa" version))
1589 (sha256
1590 (base32
1591 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1592 (build-system python-build-system)
1593 (home-page "https://github.com/shmup/miniboa")
1594 (synopsis "Simple, single-threaded Telnet server")
1595 (description
1596 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1597 server.")
1598 (license license:asl2.0)))
1599
1600 (define-public python2-miniboa
1601 (package-with-python2 python-miniboa))
1602
1603 (define-public python-pafy
1604 (package
1605 (name "python-pafy")
1606 (version "0.5.3.1")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "pafy" version))
1611 (sha256
1612 (base32
1613 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1614 (build-system python-build-system)
1615 (arguments
1616 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1617 (propagated-inputs
1618 ;; Youtube-dl is a python package which is imported in the file
1619 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1620 `(("youtube-dl" ,youtube-dl)))
1621 (home-page "https://np1.github.io/pafy/")
1622 (synopsis "Retrieve YouTube content and metadata")
1623 (description
1624 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1625 (license license:lgpl3+)))
1626
1627 (define-public python2-funcsigs
1628 (package
1629 (name "python2-funcsigs")
1630 (version "1.0.2")
1631 (source (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "funcsigs" version))
1634 (sha256
1635 (base32
1636 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1637 (build-system python-build-system)
1638 (arguments
1639 `(#:python ,python-2))
1640 (native-inputs
1641 `(("python2-unittest2" ,python2-unittest2)))
1642 (home-page "http://funcsigs.readthedocs.org")
1643 (synopsis "Python function signatures from PEP362")
1644 (description
1645 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1646 (license license:asl2.0)))
1647
1648 (define-public python2-funcsigs-bootstrap
1649 (package
1650 (inherit python2-funcsigs)
1651 (name "python2-funcsigs-bootstrap")
1652 (native-inputs `())
1653 (arguments
1654 `(#:tests? #f
1655 ,@(package-arguments python2-funcsigs)))))
1656
1657 (define-public python-py
1658 (package
1659 (name "python-py")
1660 (version "1.5.4")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "py" version))
1665 (sha256
1666 (base32
1667 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1668 (build-system python-build-system)
1669 (arguments
1670 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1671 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1672 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1673 ;; Is this module globally installed?"
1674 '(#:tests? #f))
1675 (native-inputs
1676 `(("python-setuptools-scm" ,python-setuptools-scm)))
1677 (home-page "https://github.com/pytest-dev/py")
1678 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1679 (description
1680 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1681 code introspection, and logging.")
1682 (license license:expat)))
1683
1684 (define-public python2-py
1685 (package-with-python2 python-py))
1686
1687 ;; Recent versions of python-fixtures and python-testrepository need
1688 ;; python-pbr for packaging, which itself needs these two packages for
1689 ;; testing.
1690 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1691 ;; same source, just without any test dependencies and with tests disabled.
1692 ;; python-pbr-minmal is then used to package python-fixtures and
1693 ;; python-testrepository.
1694 ;; Strictly speaking we currently could remove the test-requirements from the
1695 ;; normal python-pbr package (and save this package) since test are disabled
1696 ;; there anyway. But this may change in future.
1697 (define-public python-pbr-minimal
1698 (package
1699 (name "python-pbr-minimal")
1700 (version "3.0.1")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "pbr" version))
1705 (sha256
1706 (base32
1707 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1708 (build-system python-build-system)
1709 (arguments
1710 `(#:tests? #f))
1711 (home-page "http://docs.openstack.org/developer/pbr/")
1712 (synopsis "Minimal build of python-pbr used for bootstrapping")
1713 (description
1714 "Used only for bootstrapping python2-pbr, you should not need this.")
1715 (license license:asl2.0)))
1716
1717 (define-public python2-pbr-minimal
1718 (package-with-python2 python-pbr-minimal))
1719
1720 (define-public python-pbr
1721 (package
1722 (inherit python-pbr-minimal)
1723 (name "python-pbr")
1724 (arguments
1725 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1726 (propagated-inputs
1727 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1728 (native-inputs
1729 `(("python-fixtures" ,python-fixtures-bootstrap)
1730 ;; discover, coverage, hacking, subunit
1731 ("python-mock" ,python-mock)
1732 ("python-six" ,python-six)
1733 ("python-sphinx" ,python-sphinx)
1734 ("python-testrepository" ,python-testrepository-bootstrap)
1735 ("python-testresources" ,python-testresources-bootstrap)
1736 ("python-testscenarios" ,python-testscenarios-bootstrap)
1737 ("python-testtools" ,python-testtools-bootstrap)
1738 ("python-virtualenv" ,python-virtualenv)))
1739 (synopsis "Enhance the default behavior of Python’s setuptools")
1740 (description
1741 "Python Build Reasonableness (PBR) is a library that injects some useful
1742 and sensible default behaviors into your setuptools run. It will set
1743 versions, process requirements files and generate AUTHORS and ChangeLog file
1744 from git information.
1745 ")))
1746
1747 (define-public python2-pbr
1748 (package-with-python2 python-pbr))
1749
1750 (define-public python-pyrsistent
1751 (package
1752 (name "python-pyrsistent")
1753 (version "0.14.11")
1754 (home-page "https://github.com/tobgu/pyrsistent")
1755 (source (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pyrsistent" version))
1758 (sha256
1759 (base32
1760 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1761 (build-system python-build-system)
1762 (native-inputs
1763 `(("python-hypothesis" ,python-hypothesis)
1764 ("python-pytest" ,python-pytest)
1765 ("python-pytest-runner" ,python-pytest-runner)))
1766 (propagated-inputs
1767 `(("python-six" ,python-six)))
1768 (synopsis "Persistent data structures for Python")
1769 (description
1770 "Pyrsistent is a number of persistent collections (by some referred to as
1771 functional data structures). Persistent in the sense that they are immutable.
1772
1773 All methods on a data structure that would normally mutate it instead return a
1774 new copy of the structure containing the requested updates. The original
1775 structure is left untouched.")
1776 (license license:expat)))
1777
1778 (define-public python2-pyrsistent
1779 (package-with-python2 python-pyrsistent))
1780
1781 (define-public python-exif-read
1782 (package
1783 (name "python-exif-read")
1784 (version "2.1.2")
1785 (source (origin
1786 (method url-fetch)
1787 (uri (pypi-uri "ExifRead" version))
1788 (sha256
1789 (base32
1790 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1791 (build-system python-build-system)
1792 (arguments `(#:tests? #f)) ; no tests
1793 (home-page "https://github.com/ianare/exif-py")
1794 (synopsis "Python library to extract EXIF data from image files")
1795 (description
1796 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1797 files.")
1798 (license license:bsd-3)))
1799
1800 (define-public python2-exif-read
1801 (package-with-python2 python-exif-read))
1802
1803 (define-public python-pyld
1804 (package
1805 (name "python-pyld")
1806 (version "1.0.3")
1807 (source (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "PyLD" version))
1810 (sha256
1811 (base32
1812 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1813 (build-system python-build-system)
1814 (home-page "https://github.com/digitalbazaar/pyld")
1815 (synopsis "Python implementation of the JSON-LD specification")
1816 (description
1817 "PyLD is an implementation of the JSON-LD specification.")
1818 (license license:bsd-3)))
1819
1820 (define-public python2-pyld
1821 (package-with-python2 python-pyld))
1822
1823 (define-public python-click
1824 (package
1825 (name "python-click")
1826 (version "7.0")
1827 (source
1828 (origin
1829 (method url-fetch)
1830 (uri (pypi-uri "click" version))
1831 (sha256
1832 (base32
1833 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1834 (build-system python-build-system)
1835 (arguments
1836 `(#:phases
1837 (modify-phases %standard-phases
1838 (add-after 'unpack 'fix-paths
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1841 "cross-libc" "libc"))))
1842 (substitute* "click/_unicodefun.py"
1843 (("'locale'")
1844 (string-append "'" glibc "/bin/locale'"))))
1845 #t))
1846 (replace 'check
1847 (lambda _
1848 (invoke "python" "-m" "pytest"))))))
1849 (native-inputs
1850 `(("python-pytest" ,python-pytest)))
1851 (home-page "https://palletsprojects.com/p/click/")
1852 (synopsis "Command line library for Python")
1853 (description
1854 "Click is a Python package for creating command line interfaces in a
1855 composable way with as little code as necessary. Its name stands for
1856 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1857 with sensible defaults out of the box.")
1858 (license license:bsd-3)))
1859
1860 (define-public python2-click
1861 (package-with-python2 python-click))
1862
1863 (define-public python-wheel
1864 (package
1865 (name "python-wheel")
1866 (version "0.32.3")
1867 (source
1868 (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "wheel" version))
1871 (sha256
1872 (base32
1873 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1874 (build-system python-build-system)
1875 (native-inputs
1876 `(("python-jsonschema" ,python-jsonschema)
1877 ("python-pytest-cov" ,python-pytest-cov)))
1878 (home-page "https://bitbucket.org/pypa/wheel/")
1879 (synopsis "Format for built Python packages")
1880 (description
1881 "A wheel is a ZIP-format archive with a specially formatted filename and
1882 the @code{.whl} extension. It is designed to contain all the files for a PEP
1883 376 compatible install in a way that is very close to the on-disk format. Many
1884 packages will be properly installed with only the @code{Unpack} step and the
1885 unpacked archive preserves enough information to @code{Spread} (copy data and
1886 scripts to their final locations) at any later time. Wheel files can be
1887 installed with a newer @code{pip} or with wheel's own command line utility.")
1888 (license license:expat)
1889 (properties `((python2-variant . ,(delay python2-wheel))))))
1890
1891 (define-public python2-wheel
1892 (let ((wheel (package-with-python2
1893 (strip-python2-variant python-wheel))))
1894 (package (inherit wheel)
1895 (native-inputs `(("python2-functools32" ,python2-functools32)
1896 ,@(package-native-inputs wheel))))))
1897
1898 (define-public python-vcversioner
1899 (package
1900 (name "python-vcversioner")
1901 (version "2.16.0.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "vcversioner" version))
1906 (sha256
1907 (base32
1908 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1909 (build-system python-build-system)
1910 (synopsis "Python library for version number discovery")
1911 (description "Vcversioner is a Python library that inspects tagging
1912 information in a variety of version control systems in order to discover
1913 version numbers.")
1914 (home-page "https://github.com/habnabit/vcversioner")
1915 (license license:isc)))
1916
1917 (define-public python2-vcversioner
1918 (package-with-python2 python-vcversioner))
1919
1920 (define-public python-jdcal
1921 (package
1922 (name "python-jdcal")
1923 (version "1.4")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (pypi-uri "jdcal" version))
1928 (sha256
1929 (base32
1930 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1931 (build-system python-build-system)
1932 (arguments
1933 `(#:phases (modify-phases %standard-phases
1934 (replace 'check
1935 (lambda _
1936 (invoke "pytest"))))))
1937 (native-inputs
1938 `(("python-pytest" ,python-pytest)))
1939 (home-page "https://github.com/phn/jdcal")
1940 (synopsis "Functions to convert between Julian dates Gregorian dates")
1941 (description "This Python library provides functions for converting
1942 between Julian dates and Gregorian dates.")
1943 (license license:bsd-2)))
1944
1945 (define-public python2-jdcal
1946 (package-with-python2 python-jdcal))
1947
1948 (define-public python-jsonschema
1949 (package
1950 (name "python-jsonschema")
1951 (version "3.0.1")
1952 (source (origin
1953 (method url-fetch)
1954 (uri (pypi-uri "jsonschema" version))
1955 (sha256
1956 (base32
1957 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1958 (build-system python-build-system)
1959 (arguments
1960 '(#:phases
1961 (modify-phases %standard-phases
1962 (replace 'check
1963 (lambda _
1964 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1965 (invoke "trial" "jsonschema"))))))
1966 (native-inputs
1967 `(("python-setuptools_scm" ,python-setuptools-scm)
1968 ("python-twisted" ,python-twisted)))
1969 (propagated-inputs
1970 `(("python-attrs" ,python-attrs)
1971 ("python-pyrsistent" ,python-pyrsistent)
1972 ("python-six" ,python-six)))
1973 (home-page "https://github.com/Julian/jsonschema")
1974 (synopsis "Implementation of JSON Schema for Python")
1975 (description
1976 "Jsonschema is an implementation of JSON Schema for Python.")
1977 (license license:expat)
1978 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1979
1980 (define-public python2-jsonschema
1981 (let ((jsonschema (package-with-python2
1982 (strip-python2-variant python-jsonschema))))
1983 (package (inherit jsonschema)
1984 (propagated-inputs
1985 `(("python2-functools32" ,python2-functools32)
1986 ,@(package-propagated-inputs jsonschema))))))
1987
1988 ;; This old version is still required by docker-compose as of 1.24.0.
1989 (define-public python-jsonschema-2.6
1990 (package
1991 (name "python-jsonschema")
1992 (version "2.6.0")
1993 (source (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "jsonschema" version))
1996 (sha256
1997 (base32
1998 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1999 (build-system python-build-system)
2000 (arguments
2001 '(#:phases
2002 (modify-phases %standard-phases
2003 (replace 'check (lambda _ (invoke "nosetests"))))))
2004 (native-inputs
2005 `(("python-nose" ,python-nose)
2006 ("python-vcversioner" ,python-vcversioner)))
2007 (home-page "https://github.com/Julian/jsonschema")
2008 (synopsis "Implementation of JSON Schema for Python")
2009 (description
2010 "Jsonschema is an implementation of JSON Schema for Python.")
2011 (license license:expat)
2012 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2013
2014 (define-public python-schema
2015 (package
2016 (name "python-schema")
2017 (version "0.6.6")
2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "schema" version))
2022 (sha256
2023 (base32
2024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2025 (build-system python-build-system)
2026 (native-inputs
2027 `(("python-pytest" ,python-pytest)))
2028 (home-page "https://github.com/keleshev/schema")
2029 (synopsis "Simple data validation library")
2030 (description
2031 "@code{python-schema} is a library for validating Python data
2032 structures, such as those obtained from config-files, forms, external
2033 services or command-line parsing, converted from JSON/YAML (or
2034 something else) to Python data-types.")
2035 (license license:psfl)))
2036
2037 (define-public python2-schema
2038 (package-with-python2 python-schema))
2039
2040 (define-public python-schema-0.5
2041 (package (inherit python-schema)
2042 (version "0.5.0")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "schema" version))
2047 (sha256
2048 (base32
2049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2050
2051 (define-public python2-schema-0.5
2052 (package-with-python2 python-schema-0.5))
2053
2054 (define-public python-kitchen
2055 (package
2056 (name "python-kitchen")
2057 (version "1.2.5")
2058 (source
2059 (origin
2060 (method url-fetch)
2061 (uri (pypi-uri "kitchen" version))
2062 (sha256
2063 (base32
2064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2065 (build-system python-build-system)
2066 (propagated-inputs
2067 `(("python-chardet" ,python-chardet)))
2068 (home-page "https://github.com/fedora-infra/kitchen")
2069 (synopsis "Python API for snippets")
2070 (description "@code{kitchen} module provides a python API for all sorts of
2071 little useful snippets of code that everybody ends up writing for their projects
2072 but never seem big enough to build an independent release. Use kitchen and stop
2073 cutting and pasting that code over and over.")
2074 (license (list license:lgpl2.1+
2075 ;; subprocess.py, test_subprocess.py,
2076 ;; kitchen/pycompat25/defaultdict.py:
2077 license:psfl))))
2078
2079 (define-public python2-kitchen
2080 (package-with-python2 python-kitchen))
2081
2082 (define-public python-unidecode
2083 (package
2084 (name "python-unidecode")
2085 (version "1.1.0")
2086 (source (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "Unidecode" version))
2089 (sha256
2090 (base32
2091 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2092 (build-system python-build-system)
2093 (home-page "https://pypi.python.org/pypi/Unidecode")
2094 (synopsis "ASCII transliterations of Unicode text")
2095 (description
2096 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2097 useful when integrating with legacy code that doesn't support Unicode, or for
2098 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2099 machine identifiers from human-readable Unicode strings that should still be
2100 somewhat intelligible.")
2101 (license license:gpl2+)))
2102
2103 (define-public python2-unidecode
2104 (package-with-python2 python-unidecode))
2105
2106 (define-public python-pyjwt
2107 (package
2108 (name "python-pyjwt")
2109 (version "1.5.3")
2110 (source
2111 (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "PyJWT" version))
2114 (sha256
2115 (base32
2116 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2117 (modules '((guix build utils)))
2118 (snippet
2119 '(begin
2120 (for-each delete-file-recursively
2121 (find-files "." "\\.pyc$"))
2122 #t))))
2123 (build-system python-build-system)
2124 (native-inputs
2125 `(("python-pytest" ,python-pytest)
2126 ("python-pytest-cov" ,python-pytest-cov)
2127 ("python-pytest-runner" ,python-pytest-runner)))
2128 (home-page "https://github.com/progrium/pyjwt")
2129 (synopsis "JSON Web Token implementation in Python")
2130 (description
2131 "PyJWT is a JSON Web Token implementation written in Python.")
2132 (license license:expat)))
2133
2134 (define-public python2-pyjwt
2135 (package-with-python2 python-pyjwt))
2136
2137 (define-public python-pykka
2138 (package
2139 (name "python-pykka")
2140 (version "1.2.1")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (pypi-uri "Pykka" version))
2145 (sha256
2146 (base32
2147 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2148 (build-system python-build-system)
2149 (native-inputs
2150 `(("python-mock" ,python-mock)
2151 ("python-nose" ,python-nose)
2152 ("python-gevent" ,python-gevent)
2153 ("python-eventlet" ,python-eventlet)))
2154 (home-page "https://www.pykka.org/")
2155 (synopsis "Pykka is a Python implementation of the actor model")
2156 (description
2157 "Pykka is a Python implementation of the actor model.
2158 The actor model introduces some simple rules to control the sharing
2159 of state and cooperation between execution units, which makes it
2160 easier to build concurrent applications.")
2161 (license license:asl2.0)))
2162
2163 (define-public python2-pykka
2164 (package-with-python2 python-pykka))
2165
2166 (define-public python-pymsgbox
2167 (package
2168 (name "python-pymsgbox")
2169 (version "1.0.6")
2170 (source
2171 (origin
2172 (method git-fetch)
2173 (uri (git-reference
2174 ;; LICENSE.txt is not present on pypi
2175 (url "https://github.com/asweigart/PyMsgBox")
2176 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2177 (file-name (git-file-name name version))
2178 (sha256
2179 (base32
2180 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2181 (arguments
2182 ;; Circular dependency to run tests:
2183 ;; Tests need pyautogui, which depends on pymsgbox.
2184 '(#:tests? #f))
2185 (build-system python-build-system)
2186 (home-page "https://github.com/asweigart/PyMsgBox")
2187 (synopsis "Python module for JavaScript-like message boxes")
2188 (description
2189 "PyMsgBox is a simple, cross-platform, pure Python module for
2190 JavaScript-like message boxes. Types of dialog boxes include:
2191 @enumerate
2192 @item alert
2193 @item confirm
2194 @item prompt
2195 @item password
2196 @end enumerate
2197 ")
2198 (license license:bsd-3)))
2199
2200 (define-public python-pympler
2201 (package
2202 (name "python-pympler")
2203 (home-page "https://pythonhosted.org/Pympler/")
2204 (version "0.5")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "Pympler" version))
2208 (sha256
2209 (base32
2210 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2211 (build-system python-build-system)
2212 (arguments
2213 `(#:phases (modify-phases %standard-phases
2214 (delete 'check)
2215 (add-after 'install 'check
2216 (lambda* (#:key inputs outputs #:allow-other-keys)
2217 (add-installed-pythonpath inputs outputs)
2218 (invoke "python" "setup.py" "test"))))))
2219 (synopsis "Measure, monitor and analyze memory behavior")
2220 (description
2221 "Pympler is a development tool to measure, monitor and analyze
2222 the memory behavior of Python objects in a running Python application.
2223
2224 By pympling a Python application, detailed insight in the size and the
2225 lifetime of Python objects can be obtained. Undesirable or unexpected
2226 runtime behavior like memory bloat and other @samp{pymples} can easily
2227 be identified.
2228
2229 A web profiling frontend exposes process statistics, garbage
2230 visualisation and class tracker statistics.")
2231 (license license:asl2.0)))
2232
2233 (define-public python2-pympler
2234 (package-with-python2 python-pympler))
2235
2236 (define-public python-itsdangerous
2237 (package
2238 (name "python-itsdangerous")
2239 (version "1.1.0")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (pypi-uri "itsdangerous" version))
2244 (sha256
2245 (base32
2246 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2247 (build-system python-build-system)
2248 (home-page "https://palletsprojects.com/p/itsdangerous/")
2249 (synopsis "Python library for passing data to/from untrusted environments")
2250 (description
2251 "Itsdangerous provides various helpers to pass trusted data to untrusted
2252 environments and back.")
2253 (license license:bsd-3)))
2254
2255 (define-public python2-itsdangerous
2256 (package-with-python2 python-itsdangerous))
2257
2258 (define-public python-pyyaml
2259 (package
2260 (name "python-pyyaml")
2261 (version "3.13")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "PyYAML" version))
2266 (sha256
2267 (base32
2268 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2269 (build-system python-build-system)
2270 (inputs
2271 `(("libyaml" ,libyaml)))
2272 (home-page "http://pyyaml.org/wiki/PyYAML")
2273 (synopsis "YAML parser and emitter for Python")
2274 (description
2275 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2276 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2277 API, and sensible error messages. PyYAML supports standard YAML tags and
2278 provides Python-specific tags that allow to represent an arbitrary Python
2279 object.")
2280 (license license:expat)))
2281
2282 (define-public python2-pyyaml
2283 (package-with-python2 python-pyyaml))
2284
2285 (define-public python-vine
2286 (package
2287 (name "python-vine")
2288 (version "1.1.4")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "vine" version))
2293 (sha256
2294 (base32
2295 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2296 (build-system python-build-system)
2297 (native-inputs
2298 `(("python-pytest" ,python-pytest)
2299 ("python-case" ,python-case)))
2300 (home-page "https://github.com/celery/vine")
2301 (synopsis "Promises for Python")
2302 (description
2303 "@code{vine} provides a special implementation of promises in that it can
2304 be used both for \"promise of a value\" and lazy evaluation. The biggest
2305 upside for this is that everything in a promise can also be a promise,
2306 e.g. filters, callbacks and errbacks can all be promises.")
2307 (license license:bsd-3)))
2308
2309 (define-public python-virtualenv
2310 (package
2311 (name "python-virtualenv")
2312 (version "16.1.0")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "virtualenv" version))
2317 (sha256
2318 (base32
2319 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2320 (build-system python-build-system)
2321 (arguments
2322 `(#:phases
2323 (modify-phases %standard-phases
2324 (add-before 'check 'disable-failing-test
2325 (lambda _
2326 ;; Disable failing test. See upstream bug report
2327 ;; https://github.com/pypa/virtualenv/issues/957
2328 (substitute* "tests/test_virtualenv.py"
2329 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2330 #t)))))
2331 (native-inputs
2332 `(("python-mock" ,python-mock)
2333 ("python-pytest" ,python-pytest)))
2334 (home-page "https://virtualenv.pypa.io/")
2335 (synopsis "Virtual Python environment builder")
2336 (description
2337 "Virtualenv is a tool to create isolated Python environments.")
2338 (license license:expat)))
2339
2340 (define-public python2-virtualenv
2341 (package-with-python2 python-virtualenv))
2342
2343 (define-public python-markupsafe
2344 (package
2345 (name "python-markupsafe")
2346 (version "1.1.1")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (pypi-uri "MarkupSafe" version))
2351 (sha256
2352 (base32
2353 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2354 (build-system python-build-system)
2355 (arguments
2356 `(#:modules ((ice-9 ftw)
2357 (srfi srfi-1)
2358 (srfi srfi-26)
2359 (guix build utils)
2360 (guix build python-build-system))
2361 #:phases (modify-phases %standard-phases
2362 (replace 'check
2363 (lambda _
2364 (let ((cwd (getcwd))
2365 (libdir (find (cut string-prefix? "lib." <>)
2366 (scandir "build"))))
2367 (setenv "PYTHONPATH"
2368 (string-append cwd "/build/" libdir ":"
2369 (getenv "PYTHONPATH")))
2370 (invoke "pytest" "-vv")))))))
2371 (native-inputs
2372 `(("python-pytest" ,python-pytest)))
2373 (home-page "https://github.com/mitsuhiko/markupsafe")
2374 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2375 (description
2376 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2377 for Python.")
2378 (license license:bsd-3)))
2379
2380 (define-public python2-markupsafe
2381 (package-with-python2 python-markupsafe))
2382
2383 (define-public python-jinja2
2384 (package
2385 (name "python-jinja2")
2386 (version "2.10.1")
2387 (source
2388 (origin
2389 (method url-fetch)
2390 (uri (pypi-uri "Jinja2" version))
2391 (sha256
2392 (base32
2393 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2394 (build-system python-build-system)
2395 (propagated-inputs
2396 `(("python-markupsafe" ,python-markupsafe)))
2397 (home-page "http://jinja.pocoo.org/")
2398 (synopsis "Python template engine")
2399 (description
2400 "Jinja2 is a small but fast and easy to use stand-alone template engine
2401 written in pure Python.")
2402 (license license:bsd-3)))
2403
2404 (define-public python2-jinja2
2405 (package-with-python2 python-jinja2))
2406
2407 (define-public python-pystache
2408 (package
2409 (name "python-pystache")
2410 (version "0.5.4")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "pystache" version))
2414 (sha256
2415 (base32
2416 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2417 (build-system python-build-system)
2418 (arguments
2419 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2420 (home-page "http://defunkt.io/pystache/")
2421 (synopsis "Python logic-less template engine")
2422 (description
2423 "Pystache is a Python implementation of the framework agnostic,
2424 logic-free templating system Mustache.")
2425 (license license:expat)
2426 (properties `((python2-variant . ,(delay python2-pystache))))))
2427
2428 (define-public python2-pystache
2429 (package (inherit (package-with-python2
2430 (strip-python2-variant python-pystache)))
2431 (arguments
2432 `(#:python ,python-2
2433 #:phases
2434 (modify-phases %standard-phases
2435 (replace 'check
2436 (lambda _
2437 (invoke "python" "test_pystache.py"))))))))
2438
2439 (define-public python-joblib
2440 (package
2441 (name "python-joblib")
2442 (version "0.13.0")
2443 (source (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "joblib" version))
2446 (sha256
2447 (base32
2448 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2449 (build-system python-build-system)
2450 (arguments
2451 `(#:phases
2452 (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2455 (native-inputs
2456 `(("python-pytest" ,python-pytest)))
2457 (home-page "https://joblib.readthedocs.io/")
2458 (synopsis "Using Python functions as pipeline jobs")
2459 (description
2460 "Joblib is a set of tools to provide lightweight pipelining in Python.
2461 In particular, joblib offers: transparent disk-caching of the output values
2462 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2463 logging and tracing of the execution.")
2464 (license license:bsd-3)))
2465
2466 (define-public python2-joblib
2467 (package-with-python2 python-joblib))
2468
2469 (define-public python-daemon
2470 (package
2471 (name "python-daemon")
2472 (version "2.2.3")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "python-daemon" version))
2477 (sha256
2478 (base32
2479 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2480 (build-system python-build-system)
2481 (arguments
2482 `(#:phases
2483 (modify-phases %standard-phases
2484 (add-before 'check 'disable-tests
2485 (lambda _
2486 ;; FIXME: Determine why test fails
2487 (substitute* "test/test_daemon.py"
2488 (("test_detaches_process_context")
2489 "skip_test_detaches_process_context"))
2490 #t)))))
2491 (propagated-inputs
2492 `(("python-lockfile" ,python-lockfile)))
2493 (native-inputs
2494 `(("python-unittest2" ,python-unittest2)
2495 ("python-testtools" ,python-testtools)
2496 ("python-testscenarios" ,python-testscenarios)
2497 ("python-mock" ,python-mock)
2498 ("python-docutils" ,python-docutils)))
2499 (home-page "https://pagure.io/python-daemon/")
2500 (synopsis "Python library for making a Unix daemon process")
2501 (description "Python-daemon is a library that assists a Python program to
2502 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2503
2504 This library provides a @code{DaemonContext} class that manages the following
2505 important tasks for becoming a daemon process:
2506 @enumerate
2507 @item Detach the process into its own process group.
2508 @item Set process environment appropriate for running inside a chroot.
2509 @item Renounce suid and sgid privileges.
2510 @item Close all open file descriptors.
2511 @item Change the working directory, uid, gid, and umask.
2512 @item Set appropriate signal handlers.
2513 @item Open new file descriptors for stdin, stdout, and stderr.
2514 @item Manage a specified PID lock file.
2515 @item Register cleanup functions for at-exit processing.
2516 @end enumerate")
2517 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2518 (license (list license:asl2.0 license:gpl3+))))
2519
2520 (define-public python-docutils
2521 (package
2522 (name "python-docutils")
2523 (version "0.14")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "docutils" version))
2528 (sha256
2529 (base32
2530 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2531 (build-system python-build-system)
2532 (arguments
2533 '(#:tests? #f)) ; no setup.py test command
2534 (home-page "http://docutils.sourceforge.net/")
2535 (synopsis "Python Documentation Utilities")
2536 (description
2537 "Docutils is a modular system for processing documentation into useful
2538 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2539 reStructuredText.")
2540 ;; Most of the source code is public domain, but some source files are
2541 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2542 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2543
2544 (define-public python2-docutils
2545 (package-with-python2 python-docutils))
2546
2547 (define-public python-pygments
2548 (package
2549 (name "python-pygments")
2550 (version "2.4.2")
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "Pygments" version))
2555 (sha256
2556 (base32
2557 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2558 (build-system python-build-system)
2559 (arguments
2560 ;; FIXME: Tests require sphinx, which depends on this.
2561 '(#:tests? #f))
2562 (home-page "http://pygments.org/")
2563 (synopsis "Syntax highlighting")
2564 (description
2565 "Pygments is a syntax highlighting package written in Python.")
2566 (license license:bsd-2)))
2567
2568 (define-public python2-pygments
2569 (package-with-python2 python-pygments))
2570
2571 (define-public python-bumpversion
2572 (package
2573 (name "python-bumpversion")
2574 (version "0.5.3")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "bumpversion" version))
2579 (sha256
2580 (base32
2581 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2582 (build-system python-build-system)
2583 (home-page "https://github.com/peritus/bumpversion")
2584 (synopsis "Tool to bump software version")
2585 (description "This tool provides a command-line interface (CLI) to bump a
2586 software version simply.")
2587 (license license:expat)))
2588
2589 (define-public python-deprecated
2590 (package
2591 (name "python-deprecated")
2592 (version "1.2.5")
2593 (source
2594 (origin
2595 (method git-fetch)
2596 (uri (git-reference
2597 (url "https://github.com/tantale/deprecated.git")
2598 (commit (string-append "v" version))))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2603 (build-system python-build-system)
2604 (arguments
2605 `(#:phases (modify-phases %standard-phases
2606 (replace 'check
2607 (lambda _
2608 (invoke "pytest"))))))
2609 (propagated-inputs
2610 `(("python-wrapt" ,python-wrapt)))
2611 (native-inputs
2612 `(("python-bumpversion" ,python-bumpversion)
2613 ("python-pytest" ,python-pytest)
2614 ("python-pytest-cov" ,python-pytest-cov)
2615 ("python-sphinx" ,python-sphinx)
2616 ("python-tox" ,python-tox)))
2617 (home-page "https://github.com/tantale/deprecated")
2618 (synopsis "Python decorator to deprecate classes, functions or methods")
2619 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2620 to deprecate classes, functions or methods.")
2621 (license license:expat)))
2622
2623 (define-public python-pygithub
2624 (package
2625 (name "python-pygithub")
2626 (version "1.43.7")
2627 (source
2628 ;; We fetch from the Git repo because there are no tests in the PyPI
2629 ;; archive.
2630 (origin
2631 (method git-fetch)
2632 (uri (git-reference
2633 (url "https://github.com/PyGithub/PyGithub.git")
2634 (commit (string-append "v" version))))
2635 (file-name (git-file-name name version))
2636 (sha256
2637 (base32
2638 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2639 (build-system python-build-system)
2640 (arguments
2641 `(#:phases (modify-phases %standard-phases
2642 ;; Some tests rely on the network.
2643 (add-after 'unpack 'disable-failing-tests
2644 (lambda _
2645 (substitute* "tests/Issue142.py"
2646 (("testDecodeJson") "disabled_testDecodeJson"))
2647 #t))
2648 (add-before 'check 'prepare-for-tests
2649 (lambda _
2650 (for-each (lambda (f)
2651 (chmod f #o666))
2652 (find-files "./tests"))
2653 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2654 (setenv "PYTHONPATH"
2655 (string-append "./tests:" (getenv "PYTHONPATH")))
2656 #t)))))
2657 (propagated-inputs
2658 `(("python-deprecated" ,python-deprecated)
2659 ("python-pyjwt" ,python-pyjwt)
2660 ("python-requests" ,python-requests)))
2661 (native-inputs `(("python-httpretty" ,python-httpretty)))
2662 (home-page "https://pygithub.readthedocs.io/en/latest/")
2663 (synopsis "Python library for the GitHub API")
2664 (description "This library allows managing GitHub resources such as
2665 repositories, user profiles, and organizations in your Python applications,
2666 using version 3 of the GitHub application programming interface (API).")
2667 (license license:lgpl3+)))
2668
2669 (define-public python-rellu
2670 (package
2671 (name "python-rellu")
2672 (version "0.7")
2673 (source
2674 (origin
2675 (method url-fetch)
2676 (uri (pypi-uri "rellu" version))
2677 (sha256
2678 (base32
2679 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2680 (build-system python-build-system)
2681 (propagated-inputs
2682 `(("python-invoke" ,python-invoke)
2683 ("python-pygithub" ,python-pygithub)))
2684 (home-page "https://github.com/robotframework/rellu")
2685 (synopsis "Utilities to create PyPI releases")
2686 (description "This collection of utilities contains tooling and templates
2687 to assist in creating releases on GitHub and publishing them on PyPI. It is
2688 designed to be used by Robot Framework and tools and libraries in its
2689 ecosystem, but can naturally be used also by other projects.")
2690 (license license:asl2.0)))
2691
2692 (define-public python-robotframework
2693 (package
2694 (name "python-robotframework")
2695 (version "3.1.2")
2696 ;; There are no tests in the PyPI archive.
2697 (source
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/robotframework/robotframework.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2704 (sha256
2705 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2706 (patches (search-patches
2707 "python-robotframework-honor-source-date-epoch.patch"))))
2708 (build-system python-build-system)
2709 (arguments
2710 `(#:phases (modify-phases %standard-phases
2711 (add-before 'build 'build-and-install-doc
2712 (lambda* (#:key outputs #:allow-other-keys)
2713 (let* ((doc-output (assoc-ref outputs "doc"))
2714 (doc (string-append doc-output "/share/"
2715 ,name "-" ,version "/")))
2716 (invoke "invoke" "library-docs" "all")
2717 (mkdir-p doc)
2718 (copy-recursively "doc/libraries"
2719 (string-append doc "/libraries"))
2720 #t)))
2721 (replace 'check
2722 (lambda _
2723 (invoke "python" "utest/run.py"))))))
2724 (native-inputs
2725 `(("python-invoke" ,python-invoke)
2726 ("python-rellu" ,python-rellu)
2727 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2728 (outputs '("out" "doc"))
2729 (home-page "https://robotframework.org")
2730 (synopsis "Generic automation framework")
2731 (description "Robot Framework is a generic automation framework for
2732 acceptance testing, acceptance test driven development (ATDD), and robotic
2733 process automation (RPA).")
2734 (license license:asl2.0)))
2735
2736 (define-public python-robotframework-lint
2737 ;; There is no properly tagged release; the commit below seems to correspond
2738 ;; to the 0.9 stable release available from PyPI. The tests are not
2739 ;; included in the PyPI archive, so we fetch the sources from the upstream
2740 ;; Git repo.
2741 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2742 (revision "1"))
2743 (package
2744 (name "python-robotframework-lint")
2745 (version (git-version "0.9.0" revision commit))
2746 (source
2747 (origin
2748 (method git-fetch)
2749 (uri (git-reference
2750 (url "https://github.com/boakley/robotframework-lint.git")
2751 (commit commit)))
2752 (file-name (git-file-name name version))
2753 (sha256
2754 (base32
2755 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2756 (build-system python-build-system)
2757 (arguments
2758 `(#:phases
2759 (modify-phases %standard-phases
2760 (replace 'check
2761 (lambda _
2762 (invoke "python" "-m" "robot" "-A"
2763 "tests/conf/default.args" "tests"))))))
2764 (propagated-inputs
2765 `(("python-robotframework" ,python-robotframework)))
2766 (home-page "https://github.com/boakley/robotframework-lint/")
2767 (synopsis "Static analysis tool (linter) for Robot Framework")
2768 (description "This package provides the @code{rflint} command-line
2769 utility, a static analysis tool (linter) for Robot Framework source files.")
2770 (license license:asl2.0))))
2771
2772 (define-public python-robotframework-sshlibrary
2773 (package
2774 (name "python-robotframework-sshlibrary")
2775 (version "3.3.0")
2776 ;; There are no tests in the PyPI archive.
2777 (source
2778 (origin
2779 (method git-fetch)
2780 (uri (git-reference
2781 (url "https://github.com/robotframework/SSHLibrary.git")
2782 (commit (string-append "v" version))))
2783 (file-name (git-file-name name version))
2784 (sha256
2785 (base32
2786 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2787 (build-system python-build-system)
2788 (arguments
2789 `(#:phases
2790 (modify-phases %standard-phases
2791 (add-before 'build 'build-and-install-doc
2792 (lambda* (#:key outputs #:allow-other-keys)
2793 (let* ((doc-output (assoc-ref outputs "doc"))
2794 (doc (string-append doc-output "/share/"
2795 ,name "-" ,version "/")))
2796 (invoke "chmod" "-R" "+w" "docs")
2797 (invoke "invoke" "kw-docs" "project-docs")
2798 (mkdir-p doc)
2799 (for-each delete-file (find-files "docs" "\\.rst"))
2800 (copy-recursively "docs" doc)
2801 #t)))
2802 (replace 'check
2803 (lambda _
2804 ;; Some tests require an SSH server; we remove them.
2805 (delete-file "utest/test_client_api.py")
2806 (delete-file "utest/test_scp.py")
2807 (invoke "python" "utest/run.py"))))))
2808 (propagated-inputs
2809 `(("python-robotframework" ,python-robotframework)
2810 ("python-paramiko" ,python-paramiko)
2811 ("python-scp" ,python-scp)))
2812 (native-inputs
2813 `(("openssh" ,openssh)
2814 ("which" ,which)
2815 ;; To generate the documentation
2816 ("python-docutils" ,python-docutils)
2817 ("python-invoke" ,python-invoke)
2818 ("python-pygments" ,python-pygments)
2819 ("python-rellu" ,python-rellu)))
2820 (outputs '("out" "doc"))
2821 (home-page "https://github.com/robotframework/SSHLibrary")
2822 (synopsis "Robot Framework library for SSH and SFTP")
2823 (description "SSHLibrary is a Robot Framework library providing support
2824 for SSH and SFTP. It has the following main usages:
2825 @itemize @bullet
2826 @item Executing commands on the remote machine, either blocking or non-blocking.
2827 @item Writing and reading in an interactive shell.
2828 @item Transferring files and directories over SFTP.
2829 @item Ensuring that files and directories exist on the remote machine.
2830 @end itemize")
2831 (license license:asl2.0)))
2832
2833 (define-public python-scp
2834 (package
2835 (name "python-scp")
2836 (version "0.13.2")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "scp" version))
2841 (sha256
2842 (base32
2843 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2844 (build-system python-build-system)
2845 (arguments
2846 '(#:tests? #f)) ;tests require an SSH server
2847 (propagated-inputs
2848 `(("python-paramiko" ,python-paramiko)))
2849 (home-page "https://github.com/jbardin/scp.py")
2850 (synopsis "SCP protocol module for Python and Paramiko")
2851 (description "The scp module extends the Paramiko library to send and
2852 receive files via the SCP1 protocol, as implemented by the OpenSSH
2853 @command{scp} program.")
2854 (license license:gpl2+)))
2855
2856 (define-public python-rst.linker
2857 (package
2858 (name "python-rst.linker")
2859 (version "1.10")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "rst.linker" version))
2864 (sha256
2865 (base32
2866 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2867 (build-system python-build-system)
2868 (propagated-inputs
2869 `(("python-dateutil" ,python-dateutil)
2870 ("python-six" ,python-six)))
2871 (native-inputs
2872 `(("python-setuptools-scm" ,python-setuptools-scm)))
2873 ;; Test would require path.py, which would introduce a cyclic dependence.
2874 (arguments `(#:tests? #f))
2875 ;; Note: As of version 1.7 the documentation is not worth building.
2876 (home-page "https://github.com/jaraco/rst.linker")
2877 (synopsis "Sphinx plugin to add links and timestamps")
2878 (description "rst.linker allows to automatically replace text by a
2879 reStructuredText external reference or timestamps. It's primary purpose is to
2880 augment the changelog, but it can be used for other documents, too.")
2881 (license license:expat)))
2882
2883 (define-public python2-rst.linker
2884 (package-with-python2 python-rst.linker))
2885
2886 (define-public python-feedgenerator
2887 (package
2888 (name "python-feedgenerator")
2889 (version "1.9")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "feedgenerator" version))
2894 (sha256
2895 (base32
2896 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2897 (modules '((guix build utils)))
2898 (snippet
2899 '(begin
2900 ;; Remove pre-compiled .pyc files from source.
2901 (for-each delete-file-recursively
2902 (find-files "." "__pycache__" #:directories? #t))
2903 (for-each delete-file (find-files "." "\\.pyc$"))
2904 #t))))
2905 (build-system python-build-system)
2906 (propagated-inputs
2907 `(("python-pytz" ,python-pytz)
2908 ("python-six" ,python-six)))
2909 (home-page "https://github.com/getpelican/feedgenerator")
2910 (synopsis
2911 "Standalone version of Django's Atom/RSS feed generator")
2912 (description
2913 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2914 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2915 (license license:bsd-3)))
2916
2917 (define-public python2-feedgenerator
2918 (package-with-python2 python-feedgenerator))
2919
2920 (define-public python-toml
2921 (package
2922 (name "python-toml")
2923 (version "0.9.4")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "toml" version))
2928 (sha256
2929 (base32
2930 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2931 (build-system python-build-system)
2932 (arguments
2933 `(#:tests? #f)) ;no tests suite in release
2934 (home-page "https://github.com/uiri/toml")
2935 (synopsis "Library for TOML")
2936 (description
2937 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2938 Language (TOML) configuration files.")
2939 (license license:expat)))
2940
2941 (define-public python-jsonrpc-server
2942 (package
2943 (name "python-jsonrpc-server")
2944 (version "0.1.2")
2945 (source
2946 (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "python-jsonrpc-server" version))
2949 (sha256
2950 (base32
2951 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2952 (build-system python-build-system)
2953 (propagated-inputs
2954 `(("python-future" ,python-future)
2955 ("python-mock" ,python-mock)
2956 ("python-pytest" ,python-pytest)))
2957 (home-page
2958 "https://github.com/palantir/python-jsonrpc-server")
2959 (synopsis "JSON RPC 2.0 server library")
2960 (description
2961 "This package provides a JSON RPC 2.0 server library for Python.")
2962 (license license:expat)))
2963
2964 (define-public python-pydocstyle
2965 (package
2966 (name "python-pydocstyle")
2967 (version "3.0.0")
2968 (source
2969 (origin
2970 (method url-fetch)
2971 (uri (pypi-uri "pydocstyle" version))
2972 (sha256
2973 (base32
2974 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2975 (build-system python-build-system)
2976 (propagated-inputs
2977 `(("python-six" ,python-six)
2978 ("python-snowballstemmer" ,python-snowballstemmer)))
2979 (home-page
2980 "https://github.com/PyCQA/pydocstyle/")
2981 (synopsis "Python docstring style checker")
2982 (description
2983 "This package provides a style checker for the Python Language
2984 Server (PLS).")
2985 (license license:expat)))
2986
2987 (define-public python-language-server
2988 (package
2989 (name "python-language-server")
2990 (version "0.28.1")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "python-language-server" version))
2995 (sha256
2996 (base32
2997 "1qbiij208l6g1l5hzihx8badhmqkxdk0spn7gm7564yg54zdp2g2"))))
2998 (build-system python-build-system)
2999 (propagated-inputs
3000 `(("python-pluggy" ,python-pluggy)
3001 ("python-jsonrpc-server" ,python-jsonrpc-server)
3002 ("python-jedi" ,python-jedi)
3003 ("python-yapf" ,python-yapf)
3004 ("python-pyflakes" ,python-pyflakes)
3005 ("python-pydocstyle" ,python-pydocstyle)
3006 ("python-pycodestyle" ,python-pycodestyle)
3007 ("python-mccabe" ,python-mccabe)
3008 ("python-rope" ,python-rope)
3009 ("python-autopep8" ,python-autopep8)
3010 ("python-pylint" ,python-pylint)))
3011 (home-page "https://github.com/palantir/python-language-server")
3012 (synopsis "Python implementation of the Language Server Protocol")
3013 (description
3014 "The Python Language Server (pyls) is an implementation of the Python 3
3015 language specification for the Language Server Protocol (LSP). This tool is
3016 used in text editing environments to provide a complete and integrated
3017 feature-set for programming Python effectively.")
3018 (license license:expat)))
3019
3020 (define-public python-black
3021 (package
3022 (name "python-black")
3023 (version "18.6b4")
3024 (source
3025 (origin
3026 (method url-fetch)
3027 (uri (pypi-uri "black" version))
3028 (sha256
3029 (base32
3030 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3031 (build-system python-build-system)
3032 (arguments
3033 `(#:phases
3034 (modify-phases %standard-phases
3035 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3036 (lambda _
3037 (let ((python3 (which "python3")))
3038 (substitute* '("tests/data/fmtonoff.py"
3039 "tests/data/string_prefixes.py"
3040 "tests/data/function.py")
3041 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3042 (string-append "#!" python3 (if (string? minor-version)
3043 minor-version
3044 ""))))))))))
3045 (propagated-inputs
3046 `(("python-click" ,python-click)
3047 ("python-attrs" ,python-attrs)
3048 ("python-appdirs" ,python-appdirs)
3049 ("python-toml" ,python-toml)))
3050 (home-page "https://github.com/ambv/black")
3051 (synopsis "The uncompromising code formatter")
3052 (description "Black is the uncompromising Python code formatter.")
3053 (license license:expat)))
3054
3055 (define-public python-blinker
3056 (package
3057 (name "python-blinker")
3058 (version "1.4")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "blinker" version))
3063 (sha256
3064 (base32
3065 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3066 (build-system python-build-system)
3067 (home-page "http://pythonhosted.org/blinker/")
3068 (synopsis "Fast, simple object-to-object and broadcast signaling")
3069 (description
3070 "Blinker provides a fast dispatching system that allows any number of
3071 interested parties to subscribe to events, or \"signals\".")
3072 (license license:expat)))
3073
3074 (define-public python2-blinker
3075 (package-with-python2 python-blinker))
3076
3077 (define-public pelican
3078 (package
3079 (name "pelican")
3080 (version "4.0.1")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "pelican" version))
3085 (sha256
3086 (base32
3087 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-feedgenerator" ,python-feedgenerator)
3091 ("python-jinja2" ,python-jinja2)
3092 ("python-pygments" ,python-pygments)
3093 ("python-docutils" ,python-docutils)
3094 ("python-pytz" ,python-pytz)
3095 ("python-blinker" ,python-blinker)
3096 ("python-unidecode" ,python-unidecode)
3097 ("python-six" ,python-six)
3098 ("python-dateutil" ,python-dateutil)
3099 ("python-markdown" ,python-markdown)))
3100 (home-page "https://getpelican.com/")
3101 (arguments
3102 `(;; XXX Requires a lot more packages to do unit tests :P
3103 #:tests? #f
3104 #:phases (modify-phases %standard-phases
3105 (add-before
3106 'install 'adjust-requires
3107 ;; Since feedgenerator is installed from git, it doesn't
3108 ;; conform to the version requirements.
3109 ;;
3110 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3111 ;; version requirement so setuptools doesn't get confused.
3112 (lambda _
3113 (substitute* "setup.py"
3114 (("['\"]feedgenerator.*?['\"]")
3115 "'feedgenerator'")))))))
3116 (synopsis "Python-based static site publishing system")
3117 (description
3118 "Pelican is a tool to generate a static blog from reStructuredText,
3119 Markdown input files, and more. Pelican uses Jinja2 for templating
3120 and is very extensible.")
3121 (license license:agpl3+)))
3122
3123 (define-public mallard-ducktype
3124 (package
3125 (name "mallard-ducktype")
3126 (version "1.0.2")
3127 (source
3128 (origin
3129 (method git-fetch)
3130 ;; git-reference because tests are not included in pypi source tarball
3131 ;; https://issues.guix.gnu.org/issue/36755#2
3132 (uri (git-reference
3133 (url "https://github.com/projectmallard/mallard-ducktype.git")
3134 (commit version)))
3135 (file-name (git-file-name name version))
3136 (sha256
3137 (base32
3138 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3139 (build-system python-build-system)
3140 (arguments
3141 '(#:phases
3142 (modify-phases %standard-phases
3143 (replace 'check
3144 (lambda _
3145 (with-directory-excursion "tests"
3146 (invoke "sh" "runtests")))))))
3147 (home-page "http://projectmallard.org")
3148 (synopsis "Convert Ducktype to Mallard documentation markup")
3149 (description
3150 "Ducktype is a lightweight syntax that can represent all the semantics
3151 of the Mallard XML documentation system. Ducktype files can be converted to
3152 Mallard using the @command{ducktype} tool. The yelp-tools package
3153 provides additional functionality on the produced Mallard documents.")
3154 (license license:expat)))
3155
3156 (define-public python-scikit-image
3157 (package
3158 (name "python-scikit-image")
3159 (version "0.14.2")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (pypi-uri "scikit-image" version))
3164 (sha256
3165 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3166 (build-system python-build-system)
3167 (arguments
3168 ;; TODO: Some tests require running X11 server. Disable them?
3169 '(#:tests? #f))
3170 ;; See DEPENDS.txt for the list of build and run time requiremnts
3171 (propagated-inputs
3172 `(("python-cloudpickle" ,python-cloudpickle)
3173 ("python-dask" ,python-dask)
3174 ("python-matplotlib" ,python-matplotlib)
3175 ("python-networkx" ,python-networkx)
3176 ("python-numpy" ,python-numpy)
3177 ("python-pillow" ,python-pillow)
3178 ("python-pywavelets" ,python-pywavelets)
3179 ("python-scipy" ,python-scipy)
3180 ("python-six" ,python-six)))
3181 (native-inputs
3182 `(("python-cython" ,python-cython)))
3183 (home-page "http://scikit-image.org/")
3184 (synopsis "Image processing in Python")
3185 (description
3186 "Scikit-image is a collection of algorithms for image processing.")
3187 (license license:bsd-3)))
3188
3189 (define-public python2-scikit-image
3190 (package-with-python2 python-scikit-image))
3191
3192 (define-public python-cython
3193 (package
3194 (name "python-cython")
3195 (version "0.29.13")
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "Cython" version))
3200 (sha256
3201 (base32
3202 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3203 (build-system python-build-system)
3204 ;; we need the full python package and not just the python-wrapper
3205 ;; because we need libpython3.3m.so
3206 (inputs
3207 `(("python" ,python)))
3208 (arguments
3209 `(#:phases
3210 (modify-phases %standard-phases
3211 (add-before 'check 'set-HOME
3212 ;; some tests require access to "$HOME/.cython"
3213 (lambda _ (setenv "HOME" "/tmp") #t))
3214
3215 ;; FIXME: These tests started failing on armhf after the 0.28 update
3216 ;; (commit c69d11c5930), both with an error such as this:
3217 ;; compiling (cpp) and running dictcomp ...
3218 ;; === C/C++ compiler error output: ===
3219 ;; ‘
3220 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3221 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3222 ,@(if (target-arm32?)
3223 `((add-before 'check 'disable-failing-tests
3224 (lambda _
3225 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3226 (for-each (lambda (test)
3227 (format disabled-tests "~a\n" test))
3228 '("memslice" "dictcomp"))
3229 (close-port disabled-tests)))))
3230 '())
3231
3232 (replace 'check
3233 (lambda _
3234 ;; Disable compiler optimizations to greatly reduce the running
3235 ;; time of the test suite.
3236 (setenv "CFLAGS" "-O0")
3237
3238 (invoke "python" "runtests.py" "-vv"
3239 "-j" (number->string (parallel-job-count))))))))
3240 (home-page "https://cython.org/")
3241 (synopsis "C extensions for Python")
3242 (description "Cython is an optimising static compiler for both the Python
3243 programming language and the extended Cython programming language. It makes
3244 writing C extensions for Python as easy as Python itself.")
3245 (license license:asl2.0)
3246 (properties `((python2-variant . ,(delay python2-cython))))))
3247
3248 (define-public python2-cython
3249 (package (inherit (package-with-python2
3250 (strip-python2-variant python-cython)))
3251 (name "python2-cython")
3252 (inputs
3253 `(("python-2" ,python-2))))) ; this is not automatically changed
3254
3255 ;; The RPython toolchain currently does not support Python 3.
3256 (define-public python2-rpython
3257 (package
3258 (name "python2-rpython")
3259 (version "0.2.1")
3260 (source
3261 (origin
3262 (method url-fetch)
3263 (uri (pypi-uri "rpython" version))
3264 (sha256
3265 (base32
3266 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3267 (build-system python-build-system)
3268 (arguments `(#:python ,python-2))
3269 (native-inputs
3270 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3271 (home-page "https://rpython.readthedocs.org")
3272 (synopsis "Framework for implementing interpreters and virtual machines")
3273 (description "RPython is a translation and support framework for
3274 producing implementations of dynamic languages, emphasizing a clean separation
3275 between language specification and implementation aspects.")
3276 (license license:expat)))
3277
3278 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3279 ;; python-scipy still build, as these three packages are often used together.
3280 (define-public python-numpy
3281 (package
3282 (name "python-numpy")
3283 (version "1.15.4")
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (string-append
3288 "https://github.com/numpy/numpy/releases/download/v"
3289 version "/numpy-" version ".tar.gz"))
3290 (sha256
3291 (base32
3292 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3293 (build-system python-build-system)
3294 (inputs
3295 `(("openblas" ,openblas)
3296 ("lapack" ,lapack)))
3297 (native-inputs
3298 `(("python-cython" ,python-cython)
3299 ("python-pytest" ,python-pytest)
3300 ("gfortran" ,gfortran)))
3301 (arguments
3302 `(#:phases
3303 (modify-phases %standard-phases
3304 (add-before 'build 'configure-blas-lapack
3305 (lambda* (#:key inputs #:allow-other-keys)
3306 (call-with-output-file "site.cfg"
3307 (lambda (port)
3308 (format port
3309 "[openblas]
3310 libraries = openblas
3311 library_dirs = ~a/lib
3312 include_dirs = ~a/include
3313
3314 # backslash-n to make emacs happy
3315 \n[lapack]
3316 lapack_libs = lapack
3317 library_dirs = ~a/lib
3318 include_dirs = ~a/include
3319 "
3320 (assoc-ref inputs "openblas")
3321 (assoc-ref inputs "openblas")
3322 (assoc-ref inputs "lapack")
3323 (assoc-ref inputs "lapack"))))
3324 #t))
3325 (add-before 'build 'fix-executable-paths
3326 (lambda* (#:key inputs #:allow-other-keys)
3327 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3328 ;; instead of /bin/sh.
3329 (substitute* "numpy/distutils/exec_command.py"
3330 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3331 (string-append match-start (assoc-ref inputs "bash") match-end)))
3332 ;; Use "gcc" executable, not "cc".
3333 (substitute* "numpy/distutils/system_info.py"
3334 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3335 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3336 #t))
3337 ;; Tests can only be run after the library has been installed and not
3338 ;; within the source directory.
3339 (delete 'check)
3340 (add-after 'install 'check
3341 (lambda* (#:key outputs inputs #:allow-other-keys)
3342 ;; Make installed package available for running the tests
3343 (add-installed-pythonpath inputs outputs)
3344 ;; Make sure "f2py" etc is found.
3345 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3346 ":" (getenv "PATH")))
3347 (with-directory-excursion "/tmp"
3348 (invoke "python" "-c"
3349 "import numpy; numpy.test(verbose=2)")))))))
3350 (home-page "http://www.numpy.org/")
3351 (synopsis "Fundamental package for scientific computing with Python")
3352 (description "NumPy is the fundamental package for scientific computing
3353 with Python. It contains among other things: a powerful N-dimensional array
3354 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3355 and Fortran code, useful linear algebra, Fourier transform, and random number
3356 capabilities.")
3357 (license license:bsd-3)))
3358
3359 (define-public python2-numpy
3360 (package-with-python2 python-numpy))
3361
3362 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3363 ;; interest only for legacy code going back to NumPy's predecessor
3364 ;; Numeric.
3365 (define-public python2-numpy-1.8
3366 (package (inherit python2-numpy)
3367 (version "1.8.2")
3368 (source
3369 (origin
3370 (method url-fetch)
3371 (uri (string-append
3372 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3373 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3374 (sha256
3375 (base32
3376 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3377 (arguments
3378 (substitute-keyword-arguments (package-arguments python2-numpy)
3379 ((#:phases phases)
3380 `(modify-phases ,phases
3381 (replace 'configure-blas-lapack
3382 (lambda* (#:key inputs #:allow-other-keys)
3383 (call-with-output-file "site.cfg"
3384 (lambda (port)
3385 (format port
3386 "[openblas]
3387 libraries = openblas,lapack
3388 library_dirs = ~a/lib:~a/lib
3389 include_dirs = ~a/include:~a/include
3390 "
3391 (assoc-ref inputs "openblas")
3392 (assoc-ref inputs "lapack")
3393 (assoc-ref inputs "openblas")
3394 (assoc-ref inputs "lapack"))))
3395 #t))))))
3396 (native-inputs
3397 `(("python2-nose" ,python2-nose)))
3398 (description "NumPy is the fundamental package for scientific computing
3399 with Python. It contains among other things: a powerful N-dimensional array
3400 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3401 and Fortran code, useful linear algebra, Fourier transform, and random number
3402 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3403 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3404 Numeric.")
3405 (license license:bsd-3)))
3406
3407 (define-public python-munch
3408 (package
3409 (name "python-munch")
3410 (version "2.0.4")
3411 (source
3412 (origin
3413 (method url-fetch)
3414 (uri (pypi-uri "munch" version))
3415 (sha256
3416 (base32
3417 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3418 (build-system python-build-system)
3419 (home-page "https://github.com/Infinidat/munch")
3420 (synopsis "Dot-accessible dictionary")
3421 (description "Munch is a dot-accessible dictionary similar to JavaScript
3422 objects.")
3423 (license license:expat)))
3424
3425 (define-public python2-munch
3426 (package-with-python2 python-munch))
3427
3428 (define-public python-colormath
3429 (package
3430 (name "python-colormath")
3431 (version "3.0.0")
3432 (source
3433 (origin
3434 (method url-fetch)
3435 (uri (pypi-uri "colormath" version))
3436 (sha256
3437 (base32
3438 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3439 (build-system python-build-system)
3440 (propagated-inputs
3441 `(("python-networkx" ,python-networkx)
3442 ("python-numpy" ,python-numpy)))
3443 (home-page "https://github.com/gtaylor/python-colormath")
3444 (synopsis "Color math and conversion library")
3445 (description
3446 "This is a Python library for color math and conversions.")
3447 (license license:bsd-3)))
3448
3449 (define-public python2-colormath
3450 (package-with-python2 python-colormath))
3451
3452 (define-public python-spectra
3453 (package
3454 (name "python-spectra")
3455 (version "0.0.11")
3456 (source
3457 (origin
3458 (method url-fetch)
3459 (uri (pypi-uri "spectra" version))
3460 (sha256
3461 (base32
3462 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3463 (build-system python-build-system)
3464 (arguments
3465 `(#:phases
3466 (modify-phases %standard-phases
3467 (replace 'check
3468 (lambda _ (invoke "nosetests" "-v"))))))
3469 (propagated-inputs
3470 `(("python-colormath" ,python-colormath)))
3471 (native-inputs
3472 `(("python-nose" ,python-nose)))
3473 (home-page "https://github.com/jsvine/spectra")
3474 (synopsis "Color scales and color conversion")
3475 (description
3476 "This package provides a Python library intended to make color math,
3477 color scales, and color space conversion easy. It has support for:
3478
3479 @enumerate
3480 @item Color scales
3481 @item Color ranges
3482 @item Color blending
3483 @item Brightening/darkening colors
3484 @item Saturating/desaturating colors
3485 @item Conversion to/from multiple color spaces.
3486 @end enumerate\n")
3487 (license license:expat)))
3488
3489 (define-public python2-spectra
3490 (package-with-python2 python-spectra))
3491
3492 (define-public python-numpy-documentation
3493 (package
3494 (name "python-numpy-documentation")
3495 (version (package-version python-numpy))
3496 (source (package-source python-numpy))
3497 (build-system python-build-system)
3498 (native-inputs
3499 `(("python-matplotlib" ,python-matplotlib)
3500 ("python-numpy" ,python-numpy)
3501 ("pkg-config" ,pkg-config)
3502 ("python-sphinx" ,python-sphinx)
3503 ("python-numpydoc" ,python-numpydoc)
3504 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3505 texlive-fonts-ec
3506 texlive-generic-ifxetex
3507 texlive-generic-pdftex
3508 texlive-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-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-ec
3919 texlive-fonts-adobe-times
3920 texlive-fonts-txfonts)))
3921 ("texinfo" ,texinfo)
3922 ,@(package-native-inputs python-matplotlib)))
3923 (arguments
3924 `(#:tests? #f ; we're only generating documentation
3925 #:phases
3926 (modify-phases %standard-phases
3927 (replace 'build
3928 (lambda _
3929 (chdir "doc")
3930 (setenv "PYTHONPATH"
3931 (string-append (getenv "PYTHONPATH")
3932 ":" (getcwd) "/../examples/units"))
3933 (substitute* "conf.py"
3934 ;; Don't use git.
3935 (("^SHA = check_output.*")
3936 (string-append "SHA = \"" ,version "\"\n"))
3937 ;; Don't fetch intersphinx files from the Internet
3938 (("^explicit_order_folders" m)
3939 (string-append "intersphinx_mapping = {}\n" m))
3940 (("'sphinx.ext.intersphinx',") "")
3941 ;; Disable URL embedding which requires internet access.
3942 (("'https://docs.scipy.org/doc/numpy'") "None")
3943 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3944 (invoke "make"
3945 "SPHINXBUILD=sphinx-build"
3946 "SPHINXOPTS=" ; don't abort on warnings
3947 "html" "texinfo")))
3948 (replace 'install
3949 (lambda* (#:key inputs outputs #:allow-other-keys)
3950 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3951 (doc (string-append data "/doc/python-matplotlib-" ,version))
3952 (info (string-append data "/info"))
3953 (html (string-append doc "/html")))
3954 (mkdir-p html)
3955 (mkdir-p info)
3956 (copy-recursively "build/html" html)
3957 (symlink (string-append html "/_images")
3958 (string-append info "/matplotlib-figures"))
3959 (with-directory-excursion "build/texinfo"
3960 (substitute* "matplotlib.texi"
3961 (("@image\\{([^,]*)" all file)
3962 (string-append "@image{matplotlib-figures/" file)))
3963 (symlink (string-append html "/_images")
3964 "./matplotlib-figures")
3965 (invoke "makeinfo" "--no-split"
3966 "-o" "matplotlib.info" "matplotlib.texi"))
3967 (install-file "build/texinfo/matplotlib.info" info))
3968 #t)))))
3969 (home-page (package-home-page python-matplotlib))
3970 (synopsis "Documentation for the python-matplotlib package")
3971 (description (package-description python-matplotlib))
3972 (license (package-license python-matplotlib))))
3973
3974 (define-public python2-matplotlib-documentation
3975 (package-with-python2 python-matplotlib-documentation))
3976
3977 (define-public python-matplotlib-venn
3978 (package
3979 (name "python-matplotlib-venn")
3980 (version "0.11.5")
3981 (source
3982 (origin
3983 (method url-fetch)
3984 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3985 (sha256
3986 (base32
3987 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3988 (build-system python-build-system)
3989 (arguments '(#:tests? #f)) ; tests are not included
3990 (propagated-inputs
3991 `(("python-matplotlib" ,python-matplotlib)
3992 ("python-numpy" ,python-numpy)
3993 ("python-scipy" ,python-scipy)))
3994 (native-inputs
3995 `(("unzip" ,unzip)))
3996 (home-page "https://github.com/konstantint/matplotlib-venn")
3997 (synopsis "Plot area-proportional Venn diagrams")
3998 (description
3999 "This package provides tools for plotting area-proportional two- and
4000 three-way Venn diagrams in @code{matplotlib}.")
4001 (license license:expat)))
4002
4003 (define-public python2-pysnptools
4004 (package
4005 (name "python2-pysnptools")
4006 (version "0.3.13")
4007 (source
4008 (origin
4009 (method url-fetch)
4010 (uri (pypi-uri "pysnptools" version))
4011 (sha256
4012 (base32
4013 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4014 (build-system python-build-system)
4015 (arguments
4016 `(#:python ,python-2 ; only Python 2.7 is supported
4017 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4018 (propagated-inputs
4019 `(("python2-numpy" ,python2-numpy)
4020 ("python2-scipy" ,python2-scipy)
4021 ("python2-pandas" ,python2-pandas)))
4022 (native-inputs
4023 `(("python2-cython" ,python2-cython)))
4024 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4025 (synopsis "Library for reading and manipulating genetic data")
4026 (description
4027 "PySnpTools is a library for reading and manipulating genetic data. It
4028 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4029 those files. It can also efficiently manipulate ranges of integers using set
4030 operators such as union, intersection, and difference.")
4031 (license license:asl2.0)))
4032
4033 (define-public python-scipy
4034 (package
4035 (name "python-scipy")
4036 (version "1.3.1")
4037 (source
4038 (origin
4039 (method url-fetch)
4040 (uri (pypi-uri "scipy" version))
4041 (sha256
4042 (base32
4043 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4044 (build-system python-build-system)
4045 (propagated-inputs
4046 `(("python-numpy" ,python-numpy)
4047 ("python-matplotlib" ,python-matplotlib)
4048 ("python-pyparsing" ,python-pyparsing)))
4049 (inputs
4050 `(("lapack" ,lapack)
4051 ("openblas" ,openblas)))
4052 (native-inputs
4053 `(("python-cython" ,python-cython)
4054 ("python-pytest" ,python-pytest)
4055 ("python-sphinx" ,python-sphinx)
4056 ("python-numpydoc" ,python-numpydoc)
4057 ("gfortran" ,gfortran)
4058 ("perl" ,perl)
4059 ("which" ,which)))
4060 (outputs '("out" "doc"))
4061 (arguments
4062 `(#:phases
4063 (modify-phases %standard-phases
4064 (add-after 'unpack 'disable-broken-tests
4065 (lambda _
4066 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4067 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4068 (string-append indent
4069 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4070 m)))
4071 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4072 (("^def test_parallel_threads\\(\\):" m)
4073 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4074 m)))
4075 #t))
4076 (add-before 'build 'configure-openblas
4077 (lambda* (#:key inputs #:allow-other-keys)
4078 (call-with-output-file "site.cfg"
4079 (lambda (port)
4080 (format port
4081 "[blas]
4082 libraries = openblas
4083 library_dirs = ~a/lib
4084 include_dirs = ~a/include
4085
4086 # backslash-n to make emacs happy
4087 \n[atlas]
4088 library_dirs = ~a/lib
4089 atlas_libs = openblas
4090 "
4091 (assoc-ref inputs "openblas")
4092 (assoc-ref inputs "openblas")
4093 (assoc-ref inputs "openblas"))))
4094 #t))
4095 (add-after 'install 'install-doc
4096 (lambda* (#:key inputs outputs #:allow-other-keys)
4097 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4098 (doc (string-append data "/doc/" ,name "-" ,version))
4099 (html (string-append doc "/html"))
4100 (pyver ,(string-append "PYVER=" (version-major+minor
4101 (package-version python))))
4102 ;; By default it tries to run sphinx-build through the Python
4103 ;; interpreter which won't work with our shell wrapper.
4104 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4105 ;; Make installed package available for building the
4106 ;; documentation
4107 (add-installed-pythonpath inputs outputs)
4108 (with-directory-excursion "doc"
4109 ;; Fix generation of images for mathematical expressions.
4110 (substitute* (find-files "source" "conf\\.py")
4111 (("pngmath_use_preview = True")
4112 "pngmath_use_preview = False"))
4113 (mkdir-p html)
4114 (invoke "make" "html" pyver sphinxbuild)
4115 (with-directory-excursion "build/html"
4116 (for-each (lambda (file)
4117 (let* ((dir (dirname file))
4118 (tgt-dir (string-append html "/" dir)))
4119 (install-file file html)))
4120 (find-files "." ".*")))))
4121 #t))
4122 ;; Tests can only be run after the library has been installed and not
4123 ;; within the source directory.
4124 (delete 'check)
4125 (add-after 'install 'check
4126 (lambda* (#:key inputs outputs #:allow-other-keys)
4127 (add-installed-pythonpath inputs outputs)
4128 (with-directory-excursion "/tmp"
4129 (invoke "python" "-c"
4130 "import scipy; scipy.test(verbose=2)")))))))
4131 (home-page "https://www.scipy.org/")
4132 (synopsis "The Scipy library provides efficient numerical routines")
4133 (description "The SciPy library is one of the core packages that make up
4134 the SciPy stack. It provides many user-friendly and efficient numerical
4135 routines such as routines for numerical integration and optimization.")
4136 (properties `((python2-variant . ,(delay python2-scipy))))
4137 (license license:bsd-3)))
4138
4139 ;; Version 1.2.2 is the last version to support Python 2
4140 (define-public python2-scipy
4141 (package
4142 (inherit (package-with-python2
4143 (strip-python2-variant python-scipy)))
4144 (version "1.2.2")
4145 (source
4146 (origin
4147 (method url-fetch)
4148 (uri (pypi-uri "scipy" version))
4149 (sha256
4150 (base32
4151 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4152
4153 (define-public python-socksipy-branch
4154 (package
4155 (name "python-socksipy-branch")
4156 (version "1.01")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 (uri (pypi-uri "SocksiPy-branch" version))
4161 (sha256
4162 (base32
4163 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4164 (build-system python-build-system)
4165 (arguments
4166 `(#:tests? #f)) ; There are no tests
4167 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4168 (synopsis "Python SOCKS module")
4169 (description
4170 "SocksiPy - A Python SOCKS client module. It provides a
4171 socket-like interface that supports connections to any TCP
4172 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4173 The original version was developed by Dan Haim, this is a
4174 branch created by Mario Vilas to address some open issues,
4175 as the original project seems to have been abandoned circa 2007.")
4176 (license license:bsd-3)))
4177
4178 (define-public python2-socksipy-branch
4179 (package-with-python2 python-socksipy-branch))
4180
4181 (define-public python-pycodestyle
4182 (package
4183 (name "python-pycodestyle")
4184 (version "2.4.0")
4185 (source
4186 (origin
4187 (method url-fetch)
4188 (uri (pypi-uri "pycodestyle" version))
4189 (sha256
4190 (base32
4191 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4192 (build-system python-build-system)
4193 (home-page "https://pycodestyle.readthedocs.io/")
4194 (synopsis "Python style guide checker")
4195 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4196 Python code against some of the style conventions in
4197 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4198 (license license:expat)))
4199
4200 (define-public python2-pycodestyle
4201 (package-with-python2 python-pycodestyle))
4202
4203 (define-public python-multidict
4204 (package
4205 (name "python-multidict")
4206 (version "4.2.0")
4207 (source
4208 (origin
4209 (method url-fetch)
4210 (uri (pypi-uri "multidict" version))
4211 (sha256
4212 (base32
4213 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4214 (build-system python-build-system)
4215 (native-inputs
4216 `(("python-pytest" ,python-pytest)
4217 ("python-pytest-runner" ,python-pytest-runner)))
4218 (home-page "https://github.com/aio-libs/multidict/")
4219 (synopsis "Multidict implementation")
4220 (description "Multidict is dict-like collection of key-value pairs
4221 where key might be occurred more than once in the container.")
4222 (license license:asl2.0)))
4223
4224 (define-public python-orderedmultidict
4225 (package
4226 (name "python-orderedmultidict")
4227 (version "0.7.11")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "orderedmultidict" version))
4232 (sha256
4233 (base32
4234 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4235 (build-system python-build-system)
4236 (arguments
4237 `(#:phases
4238 (modify-phases %standard-phases
4239 (add-after 'unpack 'fix-tests
4240 (lambda _
4241 ;; The package uses nosetest for running the tests.
4242 ;; Adding this initfile allows to run the test suite
4243 ;; without requiring nosetest.
4244 (with-output-to-file "tests/__init__.py" newline)
4245 #t)))))
4246 (propagated-inputs
4247 `(("python-six" ,python-six)))
4248 (native-inputs
4249 `(("python-pycodestyle" ,python-pycodestyle)))
4250 (home-page "https://github.com/gruns/orderedmultidict")
4251 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4252 (description "This package contains a library for ordered multivalue
4253 dictionaries. A multivalue dictionary is a dictionary that can store
4254 multiple values for the same key. An ordered multivalue dictionary is a
4255 multivalue dictionary that retains the order of insertions and deletions.")
4256 (license license:unlicense)))
4257
4258 (define-public python2-orderedmultidict
4259 (package-with-python2 python-orderedmultidict))
4260
4261 (define-public python-autopep8
4262 (package
4263 (name "python-autopep8")
4264 (version "1.3.5")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "autopep8" version))
4269 (sha256
4270 (base32
4271 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4272 (build-system python-build-system)
4273 (propagated-inputs
4274 `(("python-pycodestyle" ,python-pycodestyle)))
4275 (home-page "https://github.com/hhatto/autopep8")
4276 (synopsis "Format Python code according to the PEP 8 style guide")
4277 (description
4278 "@code{autopep8} automatically formats Python code to conform to
4279 the PEP 8 style guide. It uses the pycodestyle utility to determine
4280 what parts of the code needs to be formatted. @code{autopep8} is
4281 capable of fixing most of the formatting issues that can be reported
4282 by pycodestyle.")
4283 (license (license:non-copyleft
4284 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4285
4286 (define-public python2-autopep8
4287 (package-with-python2 python-autopep8))
4288
4289 (define-public python-distutils-extra
4290 (package
4291 (name "python-distutils-extra")
4292 (version "2.38")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4297 version "/+download/python-distutils-extra-"
4298 version ".tar.gz"))
4299 (sha256
4300 (base32
4301 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4302 (build-system python-build-system)
4303 (home-page "https://launchpad.net/python-distutils-extra/")
4304 (synopsis "Enhancements to Python's distutils")
4305 (description
4306 "The python-distutils-extra module enables you to easily integrate
4307 gettext support, themed icons, and scrollkeeper-based documentation into
4308 Python's distutils.")
4309 (license license:gpl2)))
4310
4311 (define-public python2-distutils-extra
4312 (package-with-python2 python-distutils-extra))
4313
4314 (define-public python2-elib.intl
4315 (package
4316 (name "python2-elib.intl")
4317 (version "0.0.3")
4318 (source
4319 (origin
4320 ;; This project doesn't tag releases or publish tarballs, so we take
4321 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4322 (method git-fetch)
4323 (uri (git-reference
4324 (url "https://github.com/dieterv/elib.intl.git")
4325 (commit "d09997cfef")))
4326 (file-name (string-append name "-" version "-checkout"))
4327 (sha256
4328 (base32
4329 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4330 (build-system python-build-system)
4331 (arguments
4332 ;; incompatible with Python 3 (exception syntax)
4333 `(#:python ,python-2
4334 #:tests? #f))
4335 (home-page "https://github.com/dieterv/elib.intl")
4336 (synopsis "Enhanced internationalization for Python")
4337 (description
4338 "The elib.intl module provides enhanced internationalization (I18N)
4339 services for your Python modules and applications.")
4340 (license license:lgpl3+)))
4341
4342 (define-public python-olefile
4343 (package
4344 (name "python-olefile")
4345 (version "0.46")
4346 (source
4347 (origin
4348 (method url-fetch)
4349 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4350 "download/v" version "/olefile-" version ".tar.gz"))
4351 (file-name (string-append name "-" version ".tar.gz"))
4352 (sha256
4353 (base32
4354 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4355 (build-system python-build-system)
4356 (home-page "https://www.decalage.info/python/olefileio")
4357 (synopsis "Read and write Microsoft OLE2 files.")
4358 (description
4359 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4360 Storage or Compound Document, Microsoft Office). It is an improved version of
4361 the OleFileIO module from PIL, the Python Image Library.")
4362 (license license:bsd-3)))
4363
4364 (define-public python2-olefile
4365 (package-with-python2 python-olefile))
4366
4367 (define-public python-pillow
4368 (package
4369 (name "python-pillow")
4370 (version "6.1.0")
4371 (source
4372 (origin
4373 (method url-fetch)
4374 (uri (pypi-uri "Pillow" version))
4375 (sha256
4376 (base32
4377 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4378 (build-system python-build-system)
4379 (native-inputs
4380 `(("python-pytest" ,python-pytest)))
4381 (inputs
4382 `(("freetype" ,freetype)
4383 ("lcms" ,lcms)
4384 ("zlib" ,zlib)
4385 ("libjpeg" ,libjpeg)
4386 ("openjpeg" ,openjpeg)
4387 ("libtiff" ,libtiff)
4388 ("libwebp" ,libwebp)))
4389 (propagated-inputs
4390 `(("python-olefile" ,python-olefile)))
4391 (arguments
4392 `(#:phases
4393 (modify-phases %standard-phases
4394 (add-after 'unpack 'patch-ldconfig
4395 (lambda _
4396 (substitute* "setup.py"
4397 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4398 (delete 'check) ; We must run checks after python-pillow is installed.
4399 (add-after 'install 'check-installed
4400 (lambda* (#:key outputs inputs #:allow-other-keys)
4401 (begin
4402 (setenv "HOME" (getcwd))
4403 ;; Make installed package available for running the tests.
4404 (add-installed-pythonpath inputs outputs)
4405 (invoke "python" "selftest.py" "--installed")
4406 (invoke "python" "-m" "pytest" "-vv")))))))
4407 (home-page "https://python-pillow.org")
4408 (synopsis "Fork of the Python Imaging Library")
4409 (description
4410 "The Python Imaging Library adds image processing capabilities to your
4411 Python interpreter. This library provides extensive file format support, an
4412 efficient internal representation, and fairly powerful image processing
4413 capabilities. The core image library is designed for fast access to data
4414 stored in a few basic pixel formats. It should provide a solid foundation for
4415 a general image processing tool.")
4416 (license (license:x11-style
4417 "http://www.pythonware.com/products/pil/license.htm"
4418 "The PIL Software License"))))
4419
4420 (define-public python2-pillow
4421 (package-with-python2 python-pillow))
4422
4423 (define-public python-pycparser
4424 (package
4425 (name "python-pycparser")
4426 (version "2.19")
4427 (source
4428 (origin
4429 (method url-fetch)
4430 (uri (pypi-uri "pycparser" version))
4431 (sha256
4432 (base32
4433 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4434 (outputs '("out" "doc"))
4435 (build-system python-build-system)
4436 (native-inputs
4437 `(("pkg-config" ,pkg-config)))
4438 (arguments
4439 `(#:phases
4440 (modify-phases %standard-phases
4441 (replace 'check
4442 (lambda _
4443 (with-directory-excursion "tests"
4444 (invoke "python" "all_tests.py"))
4445 #t))
4446 (add-after 'install 'install-doc
4447 (lambda* (#:key outputs #:allow-other-keys)
4448 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4449 (doc (string-append data "/doc/" ,name "-" ,version))
4450 (examples (string-append doc "/examples")))
4451 (mkdir-p examples)
4452 (for-each (lambda (file)
4453 (copy-file (string-append "." file)
4454 (string-append doc file)))
4455 '("/README.rst" "/CHANGES" "/LICENSE"))
4456 (copy-recursively "examples" examples)
4457 #t))))))
4458 (home-page "https://github.com/eliben/pycparser")
4459 (synopsis "C parser in Python")
4460 (description
4461 "Pycparser is a complete parser of the C language, written in pure Python
4462 using the PLY parsing library. It parses C code into an AST and can serve as
4463 a front-end for C compilers or analysis tools.")
4464 (license license:bsd-3)))
4465
4466 (define-public python2-pycparser
4467 (package-with-python2 python-pycparser))
4468
4469 (define-public python-pywavelets
4470 (package
4471 (name "python-pywavelets")
4472 (version "1.0.1")
4473 (home-page "https://github.com/PyWavelets/pywt")
4474 (source (origin
4475 (method url-fetch)
4476 (uri (pypi-uri "PyWavelets" version))
4477 (sha256
4478 (base32
4479 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4480 (build-system python-build-system)
4481 (arguments
4482 '(#:modules ((ice-9 ftw)
4483 (srfi srfi-1)
4484 (srfi srfi-26)
4485 (guix build utils)
4486 (guix build python-build-system))
4487 #:phases (modify-phases %standard-phases
4488 (replace 'check
4489 (lambda _
4490 (let ((cwd (getcwd))
4491 (libdir (find (cut string-prefix? "lib." <>)
4492 (scandir "build"))))
4493 (with-directory-excursion (string-append cwd "/build/" libdir)
4494 (invoke "nosetests" "-v" "."))))))))
4495 (native-inputs
4496 `(("python-matplotlib" ,python-matplotlib) ;for tests
4497 ("python-nose" ,python-nose)))
4498 (propagated-inputs
4499 `(("python-numpy" ,python-numpy)))
4500 (synopsis "Wavelet transforms in Python")
4501 (description
4502 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4503 mathematical basis functions that are localized in both time and frequency.
4504 Wavelet transforms are time-frequency transforms employing wavelets. They are
4505 similar to Fourier transforms, the difference being that Fourier transforms are
4506 localized only in frequency instead of in time and frequency.")
4507 (license license:expat)))
4508
4509 (define-public python2-pywavelets
4510 (package-with-python2 python-pywavelets))
4511
4512 (define-public python-xcffib
4513 (package
4514 (name "python-xcffib")
4515 (version "0.6.0")
4516 (source
4517 (origin
4518 (method url-fetch)
4519 (uri (pypi-uri "xcffib" version))
4520 (sha256
4521 (base32
4522 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4523 (build-system python-build-system)
4524 (inputs
4525 `(("libxcb" ,libxcb)))
4526 (propagated-inputs
4527 `(("python-cffi" ,python-cffi) ; used at run time
4528 ("python-six" ,python-six)))
4529 (arguments
4530 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4531 #:tests? #f
4532 #:phases
4533 (modify-phases %standard-phases
4534 (add-after 'unpack 'fix-libxcb-path
4535 (lambda* (#:key inputs #:allow-other-keys)
4536 (let ((libxcb (assoc-ref inputs "libxcb")))
4537 (substitute* '("xcffib/__init__.py")
4538 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4539 #t)))
4540 (add-after 'install 'install-doc
4541 (lambda* (#:key outputs #:allow-other-keys)
4542 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4543 "/doc/" ,name "-" ,version)))
4544 (mkdir-p doc)
4545 (copy-file "README.md"
4546 (string-append doc "/README.md"))
4547 #t))))))
4548 (home-page "https://github.com/tych0/xcffib")
4549 (synopsis "XCB Python bindings")
4550 (description
4551 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4552 support for Python 3 and PyPy. It is based on cffi.")
4553 (license license:expat)))
4554
4555 (define-public python2-xcffib
4556 (package-with-python2 python-xcffib))
4557
4558 (define-public python-cairocffi
4559 (package
4560 (name "python-cairocffi")
4561 (version "0.9.0")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (pypi-uri "cairocffi" version))
4566 (sha256
4567 (base32
4568 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4569 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4570 (build-system python-build-system)
4571 (outputs '("out" "doc"))
4572 (inputs
4573 `(("glib" ,glib)
4574 ("gtk+" ,gtk+)
4575 ("gdk-pixbuf" ,gdk-pixbuf)
4576 ("cairo" ,cairo)
4577 ("pango" ,pango)))
4578 (native-inputs
4579 `(("pkg-config" ,pkg-config)
4580 ("python-pytest" ,python-pytest)
4581 ("python-pytest-cov" ,python-pytest-cov)
4582 ("python-pytest-runner" ,python-pytest-runner)
4583 ("python-sphinx" ,python-sphinx)
4584 ("python-docutils" ,python-docutils)))
4585 (propagated-inputs
4586 `(("python-xcffib" ,python-xcffib))) ; used at run time
4587 (arguments
4588 `(#:phases
4589 (modify-phases %standard-phases
4590 (add-after 'unpack 'patch-paths
4591 (lambda* (#:key inputs outputs #:allow-other-keys)
4592 (substitute* (find-files "." "\\.py$")
4593 (("dlopen\\(ffi, 'cairo'")
4594 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4595 "/lib/libcairo.so.2'"))
4596 (("dlopen\\(ffi, 'gdk-3'")
4597 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4598 "/lib/libgtk-3.so.0'"))
4599 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4600 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4601 "/lib/libgdk_pixbuf-2.0.so.0'"))
4602 (("dlopen\\(ffi, 'glib-2.0'")
4603 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4604 "/lib/libglib-2.0.so.0'"))
4605 (("dlopen\\(ffi, 'gobject-2.0'")
4606 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4607 "/lib/libgobject-2.0.so.0'"))
4608 (("dlopen\\(ffi, 'pangocairo-1.0'")
4609 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4610 "/lib/libpangocairo-1.0.so.0'"))
4611 (("dlopen\\(ffi, 'pango-1.0'")
4612 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4613 "/lib/libpango-1.0.so.0'")))
4614 #t))
4615 (add-after 'install 'install-doc
4616 (lambda* (#:key inputs outputs #:allow-other-keys)
4617 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4618 (doc (string-append data "/doc/" ,name "-" ,version))
4619 (html (string-append doc "/html")))
4620 (setenv "LD_LIBRARY_PATH"
4621 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4622 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4623 (setenv "LANG" "en_US.UTF-8")
4624 (mkdir-p html)
4625 (for-each (lambda (file)
4626 (copy-file (string-append "." file)
4627 (string-append doc file)))
4628 '("/README.rst" "/CHANGES" "/LICENSE"))
4629 (system* "python" "setup.py" "build_sphinx")
4630 (copy-recursively "docs/_build/html" html)
4631 #t))))))
4632 (home-page "https://github.com/Kozea/cairocffi")
4633 (synopsis "Python bindings and object-oriented API for Cairo")
4634 (description
4635 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4636 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4637 graphics library with support for multiple backends including image buffers,
4638 PNG, PostScript, PDF, and SVG file output.")
4639 (license license:bsd-3)))
4640
4641 (define-public python2-cairocffi
4642 (package-with-python2 python-cairocffi))
4643
4644 (define-public python-decorator
4645 (package
4646 (name "python-decorator")
4647 (version "4.3.0")
4648 (source
4649 (origin
4650 (method url-fetch)
4651 (uri (pypi-uri "decorator" version))
4652 (sha256
4653 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4654 (build-system python-build-system)
4655 (home-page "https://pypi.python.org/pypi/decorator/")
4656 (synopsis "Python module to simplify usage of decorators")
4657 (description
4658 "The aim of the decorator module is to simplify the usage of decorators
4659 for the average programmer, and to popularize decorators usage giving examples
4660 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4661 etc. The core of this module is a decorator factory.")
4662 (license license:expat)))
4663
4664 (define-public python2-decorator
4665 (package-with-python2 python-decorator))
4666
4667 (define-public python-drmaa
4668 (package
4669 (name "python-drmaa")
4670 (version "0.7.7")
4671 (source
4672 (origin
4673 (method url-fetch)
4674 (uri (pypi-uri "drmaa" version))
4675 (sha256
4676 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4677 (build-system python-build-system)
4678 ;; The test suite requires libdrmaa which is provided by the cluster
4679 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4680 ;; should be set to the path of the libdrmaa library.
4681 (arguments '(#:tests? #f))
4682 (native-inputs
4683 `(("python-nose" ,python-nose)))
4684 (home-page "https://pypi.python.org/pypi/drmaa")
4685 (synopsis "Python bindings for the DRMAA library")
4686 (description
4687 "A Python package for Distributed Resource Management (DRM) job
4688 submission and control. This package is an implementation of the DRMAA 1.0
4689 Python language binding specification.")
4690 (license license:bsd-3)))
4691
4692 (define-public python2-drmaa
4693 (package-with-python2 python-drmaa))
4694
4695 (define-public python-grako
4696 (package
4697 (name "python-grako")
4698 (version "3.99.9")
4699 (source
4700 (origin
4701 (method url-fetch)
4702 (uri
4703 (pypi-uri "grako" version ".zip"))
4704 (sha256
4705 (base32
4706 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4707 (build-system python-build-system)
4708 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4709 (native-inputs
4710 `(("unzip" ,unzip)
4711 ("python-pytest" ,python-pytest)
4712 ("python-pytest-runner" ,python-pytest-runner)))
4713 (home-page "https://bitbucket.org/neogeny/grako")
4714 (synopsis "EBNF parser generator")
4715 (description
4716 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4717 memoizing PEG/Packrat parser in Python.")
4718 (license license:bsd-3)))
4719
4720 (define-public python2-grako
4721 (package-with-python2 python-grako))
4722
4723 (define-public python-gridmap
4724 (package
4725 (name "python-gridmap")
4726 (version "0.13.0")
4727 (source
4728 (origin
4729 (method git-fetch)
4730 (uri (git-reference
4731 (url "https://github.com/pygridtools/gridmap.git")
4732 (commit (string-append "v" version))))
4733 (file-name (git-file-name name version))
4734 (sha256
4735 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4736 (build-system python-build-system)
4737 (arguments
4738 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4739 (propagated-inputs
4740 `(("python-psutil" ,python-psutil)
4741 ("python-drmaa" ,python-drmaa)
4742 ("python-pyzmq" ,python-pyzmq)))
4743 (home-page "https://github.com/pygridtools/gridmap")
4744 (synopsis "Create jobs on a cluster directly from Python")
4745 (description
4746 "Gridmap is a Python package to allow you to easily create jobs on the
4747 cluster directly from Python. You can directly map Python functions onto the
4748 cluster without needing to write any wrapper code yourself.")
4749 (license license:gpl3+)))
4750
4751 (define-public python2-gridmap
4752 (package-with-python2 python-gridmap))
4753
4754 (define-public python-honcho
4755 (package
4756 (name "python-honcho")
4757 (version "1.0.1")
4758 (source
4759 (origin
4760 (method git-fetch)
4761 (uri (git-reference
4762 (url "https://github.com/nickstenning/honcho.git")
4763 (commit (string-append "v" version))))
4764 (file-name (git-file-name name version))
4765 (sha256
4766 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4767 (build-system python-build-system)
4768 (native-inputs
4769 `(("python-pytest" ,python-pytest)
4770 ("python-mock" ,python-mock)
4771 ("python-tox" ,python-tox)
4772 ("which" ,which))) ;for tests
4773 (propagated-inputs
4774 `(("python-jinja2" ,python-jinja2)))
4775 (arguments
4776 `(#:phases
4777 (modify-phases %standard-phases
4778 (delete 'check)
4779 (add-after 'install 'check
4780 (lambda* (#:key outputs inputs #:allow-other-keys)
4781 ;; fix honcho path in testsuite
4782 (substitute* "tests/conftest.py"
4783 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4784 "/bin/honcho" "'")))
4785 ;; It's easier to run tests after install.
4786 ;; Make installed package available for running the tests
4787 (add-installed-pythonpath inputs outputs)
4788 (invoke "py.test" "-v"))))))
4789 (home-page "https://github.com/nickstenning/honcho")
4790 (synopsis "Manage Procfile-based applications")
4791 (description
4792 "A Procfile is a file which describes how to run an application
4793 consisting of several processes. honcho starts all listed processes.
4794 The output of all running processes is collected by honcho and
4795 displayed.")
4796 (license license:expat)))
4797
4798 (define-public python2-honcho
4799 (package-with-python2 python-honcho))
4800
4801 (define-public python-pexpect
4802 (package
4803 (name "python-pexpect")
4804 (version "4.6.0")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri (pypi-uri "pexpect" version))
4809 (sha256
4810 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4811 (build-system python-build-system)
4812 (arguments
4813 `(#:phases
4814 (modify-phases %standard-phases
4815 (add-before 'check 'prepare-tests
4816 (lambda _
4817 (substitute* (find-files "tests")
4818 (("/bin/ls") (which "ls"))
4819 (("/bin/echo") (which "echo"))
4820 (("/bin/which") (which "which"))
4821 ;; Many tests try to use the /bin directory which
4822 ;; is not present in the build environment.
4823 ;; Use one that's non-empty and unlikely to change.
4824 (("/bin'") "/dev'"))
4825 ;; XXX: Socket connection test gets "Connection reset by peer".
4826 ;; Why does it not work? Delete for now.
4827 (delete-file "tests/test_socket.py")
4828 #t))
4829 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4830 (native-inputs
4831 `(("python-nose" ,python-nose)
4832 ("python-pytest" ,python-pytest)
4833 ("man-db" ,man-db)
4834 ("which" ,which)
4835 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4836 (propagated-inputs
4837 `(("python-ptyprocess" ,python-ptyprocess)))
4838 (home-page "http://pexpect.readthedocs.org/")
4839 (synopsis "Controlling interactive console applications")
4840 (description
4841 "Pexpect is a pure Python module for spawning child applications;
4842 controlling them; and responding to expected patterns in their output.
4843 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4844 child application and control it as if a human were typing commands.")
4845 (license license:isc)))
4846
4847 (define-public python2-pexpect
4848 (package-with-python2 python-pexpect))
4849
4850 (define-public python-setuptools-scm
4851 (package
4852 (name "python-setuptools-scm")
4853 (version "3.1.0")
4854 (source (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "setuptools_scm" version))
4857 (sha256
4858 (base32
4859 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4860 (build-system python-build-system)
4861 (home-page "https://github.com/pypa/setuptools_scm/")
4862 (synopsis "Manage Python package versions in SCM metadata")
4863 (description
4864 "Setuptools_scm handles managing your Python package versions in
4865 @dfn{software configuration management} (SCM) metadata instead of declaring
4866 them as the version argument or in a SCM managed file.")
4867 (license license:expat)))
4868
4869 (define-public python2-setuptools-scm
4870 (package-with-python2 python-setuptools-scm))
4871
4872 (define-public python-pathlib2
4873 (package
4874 (name "python-pathlib2")
4875 (version "2.3.3")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "pathlib2" version))
4880 (sha256
4881 (base32
4882 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4883 (build-system python-build-system)
4884 (propagated-inputs
4885 `(("python-scandir" ,python-scandir)
4886 ("python-six" ,python-six)))
4887 (home-page "https://pypi.python.org/pypi/pathlib2/")
4888 (synopsis "Object-oriented file system paths")
4889 (description "The goal of pathlib2 is to provide a backport of the
4890 standard @code{pathlib} module which tracks the standard library module, so
4891 all the newest features of the standard @code{pathlib} can be used also on
4892 older Python versions.")
4893 (license license:expat)))
4894
4895 (define-public python-importlib-metadata
4896 (package
4897 (name "python-importlib-metadata")
4898 (version "0.18")
4899 (source
4900 (origin
4901 (method url-fetch)
4902 (uri (pypi-uri "importlib_metadata" version))
4903 (sha256
4904 (base32
4905 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4906 (build-system python-build-system)
4907 (propagated-inputs
4908 `(("python-configparser" ,python-configparser)
4909 ("python-contextlib2" ,python-contextlib2)
4910 ("python-docutils" ,python-docutils)
4911 ("python-pathlib2" ,python-pathlib2)
4912 ("python-rst.linker" ,python-rst.linker)
4913 ("python-zipp" ,python-zipp)))
4914 (native-inputs
4915 `(("python-setuptools-scm" ,python-setuptools-scm)
4916 ("python-sphinx" ,python-sphinx)))
4917 (home-page "https://importlib-metadata.readthedocs.io/")
4918 (synopsis "Read metadata from Python packages")
4919 (description
4920 "@code{importlib_metadata} is a library which provides an API for
4921 accessing an installed Python package's metadata, such as its entry points or
4922 its top-level name. This functionality intends to replace most uses of
4923 @code{pkg_resources} entry point API and metadata API. Along with
4924 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4925 need to use the older and less efficient @code{pkg_resources} package.")
4926 (license license:asl2.0)))
4927
4928 (define-public python-jaraco-packaging
4929 (package
4930 (name "python-jaraco-packaging")
4931 (version "6.1")
4932 (source
4933 (origin
4934 (method url-fetch)
4935 (uri (pypi-uri "jaraco.packaging" version))
4936 (sha256
4937 (base32
4938 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4939 (build-system python-build-system)
4940 (propagated-inputs
4941 `(("python-pytest" ,python-pytest)
4942 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4943 ("python-pytest-flake8" ,python-pytest-flake8)
4944 ("python-rst.linker" ,python-rst.linker)
4945 ("python-setuptools" ,python-setuptools)
4946 ("python-setuptools-scm" ,python-setuptools-scm)
4947 ("python-six" ,python-six)
4948 ("python-sphinx" ,python-sphinx)))
4949 (home-page "https://github.com/jaraco/jaraco.packaging")
4950 (synopsis "Tools to supplement packaging Python releases")
4951 (description
4952 "This package provides various tools to supplement packaging Python
4953 releases.")
4954 (license license:expat)))
4955
4956 (define-public python-pathpy
4957 (package
4958 (name "python-pathpy")
4959 (version "11.5.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "path.py" version))
4964 (sha256
4965 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4966 (outputs '("out" "doc"))
4967 (build-system python-build-system)
4968 (propagated-inputs
4969 `(("python-appdirs" ,python-appdirs)))
4970 (native-inputs
4971 `(("python-setuptools-scm" ,python-setuptools-scm)
4972 ("python-sphinx" ,python-sphinx)
4973 ("python-rst.linker" ,python-rst.linker)
4974 ("python-pytest" ,python-pytest)
4975 ("python-pytest-runner" ,python-pytest-runner)
4976 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4977 (arguments
4978 `(#:phases
4979 (modify-phases %standard-phases
4980 (add-after 'build 'build-doc
4981 (lambda _
4982 (setenv "LANG" "en_US.UTF-8")
4983 (invoke "python" "setup.py" "build_sphinx")))
4984 (add-after 'install 'install-doc
4985 (lambda* (#:key outputs #:allow-other-keys)
4986 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4987 (doc (string-append data "/doc/" ,name "-" ,version))
4988 (html (string-append doc "/html")))
4989 (mkdir-p html)
4990 (for-each (lambda (file)
4991 (copy-file file (string-append doc "/" file)))
4992 '("README.rst" "CHANGES.rst"))
4993 (copy-recursively "build/sphinx/html" html)
4994 #t)))
4995 (replace 'check
4996 (lambda _
4997 ;; The import time test aborts if an import takes longer than
4998 ;; 100ms. It may very well take a little longer than that.
4999 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5000 (home-page "https://github.com/jaraco/path.py")
5001 (synopsis "Python module wrapper for built-in os.path")
5002 (description
5003 "@code{path.py} implements path objects as first-class entities, allowing
5004 common operations on files to be invoked on those path objects directly.")
5005 (license license:expat)))
5006
5007 (define-public python2-pathpy
5008 (package-with-python2 python-pathpy))
5009
5010 (define-public python-simplegeneric
5011 (package
5012 (name "python-simplegeneric")
5013 (version "0.8.1")
5014 (source
5015 (origin
5016 (method url-fetch)
5017 (uri (pypi-uri "simplegeneric" version ".zip"))
5018 (sha256
5019 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5020 (build-system python-build-system)
5021 (native-inputs
5022 `(("unzip" ,unzip)))
5023 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5024 (synopsis "Python module for simple generic functions")
5025 (description
5026 "The simplegeneric module lets you define simple single-dispatch generic
5027 functions, akin to Python’s built-in generic functions like @code{len()},
5028 @code{iter()} and so on. However, instead of using specially-named methods,
5029 these generic functions use simple lookup tables, akin to those used by
5030 e.g. @code{pickle.dump()} and other generic functions found in the Python
5031 standard library.")
5032 (license license:zpl2.1)))
5033
5034 (define-public python2-simplegeneric
5035 (package-with-python2 python-simplegeneric))
5036
5037 (define-public python-ipython-genutils
5038 ;; TODO: This package is retired, check if can be removed, see description.
5039 (package
5040 (name "python-ipython-genutils")
5041 (version "0.1.0")
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (pypi-uri "ipython_genutils" version))
5046 (sha256
5047 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5048 (build-system python-build-system)
5049 (arguments `(#:tests? #f)) ; no tests
5050 (home-page "https://ipython.org")
5051 (synopsis "Vestigial utilities from IPython")
5052 (description
5053 "This package provides retired utilities from IPython. No packages
5054 outside IPython/Jupyter should depend on it.
5055
5056 This package shouldn't exist. It contains some common utilities shared by
5057 Jupyter and IPython projects during The Big Split. As soon as possible, those
5058 packages will remove their dependency on this, and this package will go
5059 away.")
5060 (license license:bsd-3)))
5061
5062 (define-public python2-ipython-genutils
5063 (package-with-python2 python-ipython-genutils))
5064
5065 (define-public python-traitlets
5066 (package
5067 (name "python-traitlets")
5068 (version "4.3.2")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (pypi-uri "traitlets" version))
5073 (sha256
5074 (base32
5075 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5076 (build-system python-build-system)
5077 (arguments
5078 `(#:phases
5079 (modify-phases %standard-phases
5080 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5081 (propagated-inputs
5082 `(("python-ipython-genutils" ,python-ipython-genutils)
5083 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5084 (native-inputs
5085 `(("python-pytest" ,python-pytest)))
5086 (properties `((python2-variant . ,(delay python2-traitlets))))
5087 (home-page "https://ipython.org")
5088 (synopsis "Configuration system for Python applications")
5089 (description
5090 "Traitlets is a framework that lets Python classes have attributes with
5091 type checking, dynamically calculated default values, and ‘on change’
5092 callbacks. The package also includes a mechanism to use traitlets for
5093 configuration, loading values from files or from command line arguments. This
5094 is a distinct layer on top of traitlets, so you can use traitlets in your code
5095 without using the configuration machinery.")
5096 (license license:bsd-3)))
5097
5098 (define-public python2-traitlets
5099 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5100 (package
5101 (inherit traitlets)
5102 (propagated-inputs
5103 `(("python2-enum34" ,python2-enum34)
5104 ,@(package-propagated-inputs traitlets))))))
5105
5106 (define-public python-jupyter-core
5107 (package
5108 (name "python-jupyter-core")
5109 (version "4.4.0")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (string-append (pypi-uri "jupyter_core" version)))
5114 (sha256
5115 (base32
5116 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5117 (build-system python-build-system)
5118 ;; FIXME: not sure how to run the tests
5119 (arguments `(#:tests? #f))
5120 (propagated-inputs
5121 `(("python-traitlets" ,python-traitlets)))
5122 (home-page "http://jupyter.org/")
5123 (synopsis "Jupyter base package")
5124 (description
5125 "Jupyter core is the base package on which Jupyter projects rely.")
5126 (license license:bsd-3)))
5127
5128 (define-public python2-jupyter-core
5129 (package-with-python2 python-jupyter-core))
5130
5131 (define-public python-jupyter-client
5132 (package
5133 (name "python-jupyter-client")
5134 (version "5.2.4")
5135 (source
5136 (origin
5137 (method url-fetch)
5138 (uri (pypi-uri "jupyter_client" version))
5139 (sha256
5140 (base32
5141 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5142 (build-system python-build-system)
5143 ;; Tests fail because of missing native python kernel which I assume is
5144 ;; provided by the ipython package, which we cannot use because it would
5145 ;; cause a dependency cycle.
5146 (arguments
5147 `(#:tests? #f
5148
5149 #:phases (modify-phases %standard-phases
5150 (add-after 'unpack 'set-tool-file-names
5151 (lambda* (#:key inputs #:allow-other-keys)
5152 (let ((iproute (assoc-ref inputs "iproute")))
5153 (substitute* "jupyter_client/localinterfaces.py"
5154 (("'ip'")
5155 (string-append "'" iproute "/sbin/ip'")))
5156 #t))))))
5157 (inputs
5158 `(("iproute" ,iproute)))
5159 (propagated-inputs
5160 `(("python-pyzmq" ,python-pyzmq)
5161 ("python-traitlets" ,python-traitlets)
5162 ("python-jupyter-core" ,python-jupyter-core)))
5163 (home-page "http://jupyter.org/")
5164 (synopsis "Jupyter protocol implementation and client libraries")
5165 (description
5166 "The @code{jupyter_client} package contains the reference implementation
5167 of the Jupyter protocol. It also provides client and kernel management APIs
5168 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5169 installing @code{kernelspec}s for use with Jupyter frontends.")
5170 (license license:bsd-3)))
5171
5172 (define-public python2-jupyter-client
5173 (package-with-python2 python-jupyter-client))
5174
5175 (define-public python-ipykernel
5176 (package
5177 (name "python-ipykernel")
5178 (version "5.1.1")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "ipykernel" version))
5183 (sha256
5184 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5185 (build-system python-build-system)
5186 (arguments
5187 `(#:phases
5188 (modify-phases %standard-phases
5189 (replace 'check
5190 (lambda _
5191 (setenv "HOME" "/tmp")
5192 (invoke "pytest" "-v")
5193 #t))
5194 (add-after 'install 'set-python-file-name
5195 (lambda* (#:key outputs #:allow-other-keys)
5196 ;; Record the absolute file name of the 'python' executable in
5197 ;; 'kernel.json'.
5198 (let ((out (assoc-ref outputs "out")))
5199 (substitute* (string-append out "/share/jupyter"
5200 "/kernels/python3/kernel.json")
5201 (("\"python\"")
5202 (string-append "\"" (which "python") "\"")))
5203 #t))))))
5204 (propagated-inputs
5205 `(("python-ipython" ,python-ipython)
5206 ;; imported at runtime during connect
5207 ("python-jupyter-client" ,python-jupyter-client)))
5208 (native-inputs
5209 `(("python-pytest" ,python-pytest)
5210 ("python-nose" ,python-nose)))
5211 (home-page "https://ipython.org")
5212 (synopsis "IPython Kernel for Jupyter")
5213 (description
5214 "This package provides the IPython kernel for Jupyter.")
5215 (license license:bsd-3)))
5216
5217 ;; Version 5.1.1 and above no longer support Python 2.
5218 (define-public python2-ipykernel
5219 (package
5220 (name "python2-ipykernel")
5221 (version "5.1.0")
5222 (source
5223 (origin
5224 (method url-fetch)
5225 (uri (pypi-uri "ipykernel" version))
5226 (sha256
5227 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5228 (build-system python-build-system)
5229 (arguments
5230 `(#:python ,python-2
5231 #:phases
5232 (modify-phases %standard-phases
5233 (replace 'check
5234 (lambda _
5235 (setenv "HOME" "/tmp")
5236 (invoke "pytest" "-v")
5237 #t)))))
5238 (propagated-inputs
5239 `(("python2-ipython" ,python2-ipython)
5240 ;; imported at runtime during connect
5241 ("python2-jupyter-client" ,python2-jupyter-client)))
5242 (native-inputs
5243 `(("python2-pytest" ,python2-pytest)
5244 ("python2-nose" ,python2-nose)))
5245 (home-page "https://ipython.org")
5246 (synopsis "IPython Kernel for Jupyter")
5247 (description
5248 "This package provides the IPython kernel for Jupyter.")
5249 (license license:bsd-3)))
5250
5251 (define-public python-pari-jupyter
5252 (package
5253 (name "python-pari-jupyter")
5254 (version "1.3.2")
5255 (source
5256 (origin
5257 (method url-fetch)
5258 (uri (pypi-uri "pari_jupyter" version))
5259 (sha256
5260 (base32
5261 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5262 (build-system python-build-system)
5263 (propagated-inputs
5264 `(("python-ipykernel" ,python-ipykernel)))
5265 (inputs
5266 `(("pari-gp" ,pari-gp)
5267 ("readline" ,readline)))
5268 (arguments
5269 `(#:tests? #f)) ; no test suite
5270 (home-page
5271 "https://github.com/jdemeyer/pari_jupyter")
5272 (synopsis "A Jupyter kernel for PARI/GP")
5273 (description "The package provides a PARI/GP kernel for Jupyter.")
5274 (license license:gpl3+)))
5275
5276 (define-public python-backcall
5277 (package
5278 (name "python-backcall")
5279 (version "0.1.0")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (pypi-uri "backcall" version))
5284 (sha256
5285 (base32
5286 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5287 (build-system python-build-system)
5288 (home-page "https://github.com/takluyver/backcall/")
5289 (synopsis "Specifications for callback functions passed in to an API")
5290 (description
5291 "If your code lets other people supply callback functions, it's important
5292 to specify the function signature you expect, and check that functions support
5293 that. Adding extra parameters later would break other peoples code unless
5294 you're careful. The @code{backcall} package provides a way of specifying the
5295 callback signature using a prototype function.")
5296 (license license:bsd-3)))
5297
5298 ;; This is the latest release of the LTS version of ipython with support for
5299 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5300 ;; dropped support for Python 2.7.
5301 (define-public python2-ipython
5302 (package
5303 (name "python2-ipython")
5304 (version "5.8.0")
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "ipython" version ".tar.gz"))
5309 (sha256
5310 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5311 (build-system python-build-system)
5312 (propagated-inputs
5313 `(("python2-backports-shutil-get-terminal-size"
5314 ,python2-backports-shutil-get-terminal-size)
5315 ("python2-pathlib2" ,python2-pathlib2)
5316 ("python2-pyzmq" ,python2-pyzmq)
5317 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5318 ("python2-terminado" ,python2-terminado)
5319 ("python2-matplotlib" ,python2-matplotlib)
5320 ("python2-numpy" ,python2-numpy)
5321 ("python2-numpydoc" ,python2-numpydoc)
5322 ("python2-jinja2" ,python2-jinja2)
5323 ("python2-mistune" ,python2-mistune)
5324 ("python2-pexpect" ,python2-pexpect)
5325 ("python2-pickleshare" ,python2-pickleshare)
5326 ("python2-simplegeneric" ,python2-simplegeneric)
5327 ("python2-jsonschema" ,python2-jsonschema)
5328 ("python2-traitlets" ,python2-traitlets)
5329 ("python2-nbformat" ,python2-nbformat)
5330 ("python2-pygments" ,python2-pygments)))
5331 (inputs
5332 `(("readline" ,readline)
5333 ("which" ,which)))
5334 (native-inputs
5335 `(("graphviz" ,graphviz)
5336 ("pkg-config" ,pkg-config)
5337 ("python2-requests" ,python2-requests) ;; for tests
5338 ("python2-testpath" ,python2-testpath)
5339 ("python2-mock" ,python2-mock)
5340 ("python2-nose" ,python2-nose)))
5341 (arguments
5342 `(#:python ,python-2
5343 #:phases
5344 (modify-phases %standard-phases
5345 (add-before 'check 'delete-broken-tests
5346 (lambda* (#:key inputs #:allow-other-keys)
5347 ;; These tests throw errors for unknown reasons.
5348 (delete-file "IPython/core/tests/test_profile.py")
5349 (delete-file "IPython/core/tests/test_interactiveshell.py")
5350 (delete-file "IPython/core/tests/test_magic.py")
5351 #t)))))
5352 (home-page "https://ipython.org")
5353 (synopsis "IPython is a tool for interactive computing in Python")
5354 (description
5355 "IPython provides a rich architecture for interactive computing with:
5356 Powerful interactive shells, a browser-based notebook, support for interactive
5357 data visualization, embeddable interpreters and tools for parallel
5358 computing.")
5359 (license license:bsd-3)))
5360
5361 (define-public python-ipython
5362 (package
5363 (name "python-ipython")
5364 (version "7.5.0")
5365 (source
5366 (origin
5367 (method url-fetch)
5368 (uri (pypi-uri "ipython" version ".tar.gz"))
5369 (sha256
5370 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5371 (build-system python-build-system)
5372 (propagated-inputs
5373 `(("python-backcall" ,python-backcall)
5374 ("python-pyzmq" ,python-pyzmq)
5375 ("python-prompt-toolkit" ,python-prompt-toolkit)
5376 ("python-terminado" ,python-terminado)
5377 ("python-matplotlib" ,python-matplotlib)
5378 ("python-numpy" ,python-numpy)
5379 ("python-numpydoc" ,python-numpydoc)
5380 ("python-jedi" ,python-jedi)
5381 ("python-jinja2" ,python-jinja2)
5382 ("python-mistune" ,python-mistune)
5383 ("python-pexpect" ,python-pexpect)
5384 ("python-pickleshare" ,python-pickleshare)
5385 ("python-simplegeneric" ,python-simplegeneric)
5386 ("python-jsonschema" ,python-jsonschema)
5387 ("python-traitlets" ,python-traitlets)
5388 ("python-nbformat" ,python-nbformat)
5389 ("python-pygments" ,python-pygments)))
5390 (inputs
5391 `(("readline" ,readline)
5392 ("which" ,which)))
5393 (native-inputs
5394 `(("graphviz" ,graphviz)
5395 ("pkg-config" ,pkg-config)
5396 ("python-requests" ,python-requests) ;; for tests
5397 ("python-testpath" ,python-testpath)
5398 ("python-nose" ,python-nose)))
5399 (arguments
5400 `(#:phases
5401 (modify-phases %standard-phases
5402 ;; Tests can only be run after the library has been installed and not
5403 ;; within the source directory.
5404 (delete 'check)
5405 (add-after 'install 'check
5406 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5407 (if tests?
5408 (begin
5409 ;; Make installed package available for running the tests
5410 (add-installed-pythonpath inputs outputs)
5411 (setenv "HOME" "/tmp/") ;; required by a test
5412 ;; We only test the core because one of the other tests
5413 ;; tries to import ipykernel.
5414 (invoke "python" "IPython/testing/iptest.py"
5415 "-v" "IPython/core/tests"))
5416 #t)))
5417 (add-before 'check 'fix-tests
5418 (lambda* (#:key inputs #:allow-other-keys)
5419 (substitute* "./IPython/utils/_process_posix.py"
5420 (("/usr/bin/env', 'which") (which "which")))
5421 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5422 (("#!/usr/bin/env python")
5423 (string-append "#!" (which "python"))))
5424 ;; This test introduces a circular dependency on ipykernel
5425 ;; (which depends on ipython).
5426 (delete-file "IPython/core/tests/test_display.py")
5427 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5428 (delete-file "IPython/core/tests/test_interactiveshell.py")
5429 #t)))))
5430 (home-page "https://ipython.org")
5431 (synopsis "IPython is a tool for interactive computing in Python")
5432 (description
5433 "IPython provides a rich architecture for interactive computing with:
5434 Powerful interactive shells, a browser-based notebook, support for interactive
5435 data visualization, embeddable interpreters and tools for parallel
5436 computing.")
5437 (license license:bsd-3)))
5438
5439 (define-public python-ipython-documentation
5440 (package
5441 (inherit python-ipython)
5442 (name "python-ipython-documentation")
5443 (version (package-version python-ipython))
5444 (arguments
5445 `(#:phases
5446 (modify-phases %standard-phases
5447 (delete 'build)
5448 (delete 'check)
5449 (replace 'install
5450 (lambda* (#:key outputs #:allow-other-keys)
5451 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5452 (doc (string-append data "/doc/" ,name "-" ,version))
5453 (html (string-append doc "/html"))
5454 (man1 (string-append data "/man/man1"))
5455 (info (string-append data "/info"))
5456 (examples (string-append doc "/examples"))
5457 (python-arg (string-append "PYTHON=" (which "python"))))
5458 (setenv "LANG" "en_US.utf8")
5459 (with-directory-excursion "docs"
5460 ;; FIXME: pdf fails to build
5461 ;;(system* "make" "pdf" "PAPER=a4")
5462 (system* "make" python-arg "html")
5463 ;; FIXME: the generated texi file contains ^@^@, which trips
5464 ;; up the parser.
5465 ;; (system* "make" python-arg "info")
5466 )
5467 (copy-recursively "docs/man" man1)
5468 (copy-recursively "examples" examples)
5469 (copy-recursively "docs/build/html" html)
5470 ;; (copy-file "docs/build/latex/ipython.pdf"
5471 ;; (string-append doc "/ipython.pdf"))
5472 (mkdir-p info)
5473 ;; (copy-file "docs/build/texinfo/ipython.info"
5474 ;; (string-append info "/ipython.info"))
5475 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5476 #t)))))
5477 (inputs
5478 `(("python-ipython" ,python-ipython)
5479 ("python-ipykernel" ,python-ipykernel)))
5480 (native-inputs
5481 `(("python-sphinx" ,python-sphinx)
5482 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5483 ;; FIXME: It's possible that a smaller union would work just as well.
5484 ("texlive" ,(texlive-union (list texlive-amsfonts
5485 texlive-fonts-ec
5486 texlive-generic-ifxetex
5487 texlive-generic-pdftex
5488 texlive-latex-capt-of
5489 texlive-latex-cmap
5490 texlive-latex-environ
5491 texlive-latex-eqparbox
5492 texlive-latex-etoolbox
5493 texlive-latex-expdlist
5494 texlive-latex-fancyhdr
5495 texlive-latex-fancyvrb
5496 texlive-latex-fncychap
5497 texlive-latex-float
5498 texlive-latex-framed
5499 texlive-latex-geometry
5500 texlive-latex-graphics
5501 texlive-latex-hyperref
5502 texlive-latex-mdwtools
5503 texlive-latex-multirow
5504 texlive-latex-needspace
5505 texlive-latex-oberdiek
5506 texlive-latex-parskip
5507 texlive-latex-preview
5508 texlive-latex-tabulary
5509 texlive-latex-threeparttable
5510 texlive-latex-titlesec
5511 texlive-latex-trimspaces
5512 texlive-latex-ucs
5513 texlive-latex-upquote
5514 texlive-latex-url
5515 texlive-latex-varwidth
5516 texlive-latex-wrapfig)))
5517 ("texinfo" ,texinfo)))))
5518
5519 (define-public python-urwid
5520 (package
5521 (name "python-urwid")
5522 (version "2.0.1")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "urwid" version))
5527 (sha256
5528 (base32
5529 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5530 (build-system python-build-system)
5531 (home-page "http://urwid.org")
5532 (synopsis "Console user interface library for Python")
5533 (description
5534 "Urwid is a curses-based UI/widget library for Python. It includes many
5535 features useful for text console applications.")
5536 (license license:lgpl2.1+)))
5537
5538 (define-public python2-urwid
5539 (package-with-python2 python-urwid))
5540
5541 (define-public python-urwidtrees
5542 (package
5543 (name "python-urwidtrees")
5544 (version "1.0.2")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 ;; package author intends on distributing via github rather than pypi:
5549 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5550 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5551 version ".tar.gz"))
5552 (file-name (string-append name "-" version ".tar.gz"))
5553 (sha256
5554 (base32
5555 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5556 (build-system python-build-system)
5557 (arguments
5558 '(#:tests? #f)) ; no tests
5559 (propagated-inputs `(("python-urwid" ,python-urwid)))
5560 (home-page "https://github.com/pazz/urwidtrees")
5561 (synopsis "Tree widgets for urwid")
5562 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5563 toolkit. Use it to build trees of widgets.")
5564 (license license:gpl3+)))
5565
5566 (define-public python2-urwidtrees
5567 (package-with-python2 python-urwidtrees))
5568
5569 (define-public python-ua-parser
5570 (package
5571 (name "python-ua-parser")
5572 (version "0.8.0")
5573 (source
5574 (origin
5575 (method url-fetch)
5576 (uri (pypi-uri "ua-parser" version))
5577 (sha256
5578 (base32
5579 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5580 (build-system python-build-system)
5581 (arguments
5582 `(#:tests? #f)) ;no test suite in release
5583 (native-inputs
5584 `(("python-pyyaml" ,python-pyyaml)))
5585 (home-page "https://github.com/ua-parser/uap-python")
5586 (synopsis "User agent parser")
5587 (description
5588 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5589 (license license:asl2.0)))
5590
5591 (define-public python2-ua-parser
5592 (package-with-python2 python-ua-parser))
5593
5594 (define-public python-user-agents
5595 (package
5596 (name "python-user-agents")
5597 (version "1.1.0")
5598 (source
5599 (origin
5600 (method url-fetch)
5601 (uri (pypi-uri "user-agents" version))
5602 (sha256
5603 (base32
5604 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5605 (build-system python-build-system)
5606 (arguments
5607 `(#:tests? #f)) ;missing devices.json test file in release
5608 (propagated-inputs
5609 `(("python-ua-parser" ,python-ua-parser)))
5610 (home-page "https://github.com/selwin/python-user-agents")
5611 (synopsis "User Agent strings parsing library")
5612 (description
5613 "A library to identify devices (phones, tablets) and their capabilities by
5614 parsing (browser/HTTP) user agent strings.")
5615 (license license:expat)))
5616
5617 (define-public python2-user-agents
5618 (package-with-python2 python-user-agents))
5619
5620 (define-public python-dbus
5621 (package
5622 (name "python-dbus")
5623 (version "1.2.8")
5624 (source
5625 (origin
5626 (method url-fetch)
5627 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5628 "dbus-python-" version ".tar.gz"))
5629 (sha256
5630 (base32
5631 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5632 (build-system gnu-build-system)
5633 (arguments
5634 '(#:phases
5635 (modify-phases %standard-phases
5636 (add-before
5637 'check 'pre-check
5638 (lambda _
5639 ;; XXX: For the missing '/etc/machine-id'.
5640 (substitute* "test/run-test.sh"
5641 (("DBUS_FATAL_WARNINGS=1")
5642 "DBUS_FATAL_WARNINGS=0"))
5643 #t)))))
5644 (native-inputs
5645 `(("pkg-config" ,pkg-config)))
5646 (inputs
5647 `(("python" ,python-wrapper)
5648 ("dbus-glib" ,dbus-glib)))
5649 (synopsis "Python bindings for D-bus")
5650 (description "python-dbus provides bindings for libdbus, the reference
5651 implementation of D-Bus.")
5652 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5653 (license license:expat)))
5654
5655 (define-public python2-dbus
5656 (package (inherit python-dbus)
5657 (name "python2-dbus")
5658 (inputs `(("python" ,python-2)
5659 ,@(alist-delete "python"
5660 (package-inputs python-dbus)
5661 equal?)))
5662 ;; FIXME: on Python 2, the test_utf8 fails with:
5663 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5664 (arguments `(#:tests? #f))))
5665
5666 (define-public python-notify2
5667 (package
5668 (name "python-notify2")
5669 (version "0.3.1")
5670 (source
5671 (origin
5672 (method url-fetch)
5673 (uri (pypi-uri "notify2" version))
5674 (sha256
5675 (base32
5676 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5677 (build-system python-build-system)
5678 (arguments `(#:tests? #f)) ; tests depend on system state
5679 (native-inputs
5680 `(("python-dbus" ,python-dbus)))
5681 (home-page "https://bitbucket.org/takluyver/pynotify2")
5682 (synopsis "Python interface to D-Bus notifications")
5683 (description
5684 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5685 It is a reimplementation of pynotify in pure Python, and an alternative to
5686 the GObject Introspection bindings to libnotify for non-GTK applications.")
5687 (license (list license:bsd-2
5688 license:lgpl2.1+))))
5689
5690 (define-public python2-notify2
5691 (package-with-python2 python-notify2))
5692
5693 (define-public python-lxml
5694 (package
5695 (name "python-lxml")
5696 (version "4.2.5")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (pypi-uri "lxml" version))
5701 (sha256
5702 (base32
5703 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5704 (build-system python-build-system)
5705 (inputs
5706 `(("libxml2" ,libxml2)
5707 ("libxslt" ,libxslt)))
5708 (home-page "http://lxml.de/")
5709 (synopsis
5710 "Python XML processing library")
5711 (description
5712 "The lxml XML toolkit is a Pythonic binding for the C libraries
5713 libxml2 and libxslt.")
5714 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5715
5716 (define-public python2-lxml
5717 (package-with-python2 python-lxml))
5718
5719 ;; beautifulsoup4 has a totally different namespace than 3.x,
5720 ;; and pypi seems to put it under its own name, so I guess we should too
5721 (define-public python-beautifulsoup4
5722 (package
5723 (name "python-beautifulsoup4")
5724 (version "4.7.1")
5725 (source
5726 (origin
5727 (method url-fetch)
5728 (uri (pypi-uri "beautifulsoup4" version))
5729 (sha256
5730 (base32
5731 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5732 (build-system python-build-system)
5733 (arguments
5734 `(#:phases
5735 (modify-phases %standard-phases
5736 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5737 ;; must use this conversion script when building with Python 3. The
5738 ;; conversion script also runs the tests.
5739 ;; For more information, see the file 'convert-py3k' in the source
5740 ;; distribution.
5741 (replace 'check
5742 (lambda _ (invoke "./convert-py3k"))))))
5743 (propagated-inputs
5744 `(("python-soupsieve" ,python-soupsieve)))
5745 (home-page
5746 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5747 (synopsis
5748 "Python screen-scraping library")
5749 (description
5750 "Beautiful Soup is a Python library designed for rapidly setting up
5751 screen-scraping projects. It offers Pythonic idioms for navigating,
5752 searching, and modifying a parse tree, providing a toolkit for
5753 dissecting a document and extracting what you need. It automatically
5754 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5755 (license license:expat)
5756 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5757
5758 (define-public python2-beautifulsoup4
5759 (package
5760 (inherit (package-with-python2
5761 (strip-python2-variant python-beautifulsoup4)))
5762 (arguments `(#:python ,python-2))))
5763
5764 (define-public python-soupsieve
5765 (package
5766 (name "python-soupsieve")
5767 (version "1.9.2")
5768 (source
5769 (origin
5770 (method url-fetch)
5771 (uri (pypi-uri "soupsieve" version))
5772 (sha256
5773 (base32
5774 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5775 (build-system python-build-system)
5776 (arguments `(#:tests? #f))
5777 ;;XXX: 2 tests fail currently despite claming they were to be
5778 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5779 ;;don't want to create a circular dependency.
5780 (home-page "https://github.com/facelessuser/soupsieve")
5781 (synopsis "CSS selector library")
5782 (description
5783 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5784 Soup 4. It aims to provide selecting, matching, and filtering using modern
5785 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5786 specifications up through the latest CSS level 4 drafts and beyond (though
5787 some are not yet implemented).")
5788 (properties `((python2-variant . ,(delay python2-soupsieve))))
5789 (license license:expat)))
5790
5791 (define-public python2-soupsieve
5792 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5793 (package
5794 (inherit base)
5795 (propagated-inputs
5796 `(("python2-backports-functools-lru-cache"
5797 ,python2-backports-functools-lru-cache)
5798 ,@(package-propagated-inputs base))))))
5799
5800 (define-public python-netifaces
5801 (package
5802 (name "python-netifaces")
5803 (version "0.10.7")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "netifaces" version))
5808 (sha256
5809 (base32
5810 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5811 (build-system python-build-system)
5812 (home-page "https://github.com/al45tair/netifaces")
5813 (synopsis
5814 "Python module for portable network interface information")
5815 (description
5816 "Netifaces is a Python module providing information on network
5817 interfaces in an easy and portable manner.")
5818 (license license:expat)))
5819
5820 (define-public python2-netifaces
5821 (package-with-python2 python-netifaces))
5822
5823 (define-public python-networkx
5824 (package
5825 (name "python-networkx")
5826 (version "2.2")
5827 (source
5828 (origin
5829 (method url-fetch)
5830 (uri (pypi-uri "networkx" version ".zip"))
5831 (sha256
5832 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5833 (build-system python-build-system)
5834 ;; python-decorator is needed at runtime.
5835 (propagated-inputs
5836 `(("python-decorator" ,python-decorator)))
5837 (native-inputs
5838 `(("python-nose" ,python-nose)
5839 ("unzip" ,unzip)))
5840 (home-page "https://networkx.github.io/")
5841 (synopsis "Python module for creating and manipulating graphs and networks")
5842 (description
5843 "NetworkX is a Python package for the creation, manipulation, and study
5844 of the structure, dynamics, and functions of complex networks.")
5845 (license license:bsd-3)))
5846
5847 (define-public python2-networkx
5848 (package-with-python2 python-networkx))
5849
5850 (define-public python-datrie
5851 (package
5852 (name "python-datrie")
5853 (version "0.7.1")
5854 (source
5855 (origin
5856 (method url-fetch)
5857 (uri (pypi-uri "datrie" version))
5858 (sha256
5859 (base32
5860 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5861 (build-system python-build-system)
5862 (arguments
5863 `(#:phases (modify-phases %standard-phases
5864 (add-before 'build 'cythonize
5865 (lambda _
5866 ;; Regenerate Cython classes to solve ABI issues with Python
5867 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5868 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5869 "src/stdio_ext.pxd" "-a"))))))
5870 (native-inputs
5871 `(("python-cython" ,python-cython)
5872 ("python-hypothesis" ,python-hypothesis)
5873 ("python-pytest" ,python-pytest)
5874 ("python-pytest-runner" ,python-pytest-runner)))
5875 (home-page "https://github.com/kmike/datrie")
5876 (synopsis "Fast, efficiently stored trie for Python")
5877 (description
5878 "This package provides a fast, efficiently stored trie implementation for
5879 Python.")
5880 (license license:lgpl2.1+)))
5881
5882 (define-public snakemake
5883 (package
5884 (name "snakemake")
5885 (version "5.2.4")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (pypi-uri "snakemake" version))
5890 (sha256
5891 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5892 (build-system python-build-system)
5893 (arguments
5894 ;; TODO: Package missing test dependencies.
5895 '(#:tests? #f
5896 #:phases
5897 (modify-phases %standard-phases
5898 ;; For cluster execution Snakemake will call Python. Since there is
5899 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5900 ;; this by calling the snakemake wrapper instead.
5901 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5902 (lambda* (#:key outputs #:allow-other-keys)
5903 (substitute* "snakemake/executors.py"
5904 (("\\{sys.executable\\} -m snakemake")
5905 (string-append (assoc-ref outputs "out")
5906 "/bin/snakemake")))
5907 #t)))))
5908 (propagated-inputs
5909 `(("python-gitpython" ,python-gitpython)
5910 ("python-wrapt" ,python-wrapt)
5911 ("python-requests" ,python-requests)
5912 ("python-appdirs" ,python-appdirs)
5913 ("python-configargparse" ,python-configargparse)
5914 ("python-datrie" ,python-datrie)
5915 ("python-docutils" ,python-docutils)
5916 ("python-jinja2" ,python-jinja2)
5917 ("python-jsonschema" ,python-jsonschema)
5918 ("python-networkx" ,python-networkx)
5919 ("python-pyyaml" ,python-pyyaml)
5920 ("python-ratelimiter" ,python-ratelimiter)))
5921 (home-page "https://snakemake.readthedocs.io")
5922 (synopsis "Python-based execution environment for make-like workflows")
5923 (description
5924 "Snakemake aims to reduce the complexity of creating workflows by
5925 providing a clean and modern domain specific specification language (DSL) in
5926 Python style, together with a fast and comfortable execution environment.")
5927 (license license:expat)))
5928
5929 ;; This is currently needed for the pigx-* packages.
5930 (define-public snakemake-4
5931 (package (inherit snakemake)
5932 (version "4.4.0")
5933 (source
5934 (origin
5935 (method url-fetch)
5936 (uri (pypi-uri "snakemake" version))
5937 (sha256
5938 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5939 (propagated-inputs
5940 `(("python-wrapt" ,python-wrapt)
5941 ("python-requests" ,python-requests)
5942 ("python-appdirs" ,python-appdirs)
5943 ("python-configargparse" ,python-configargparse)
5944 ("python-pyyaml" ,python-pyyaml)
5945 ("python-ratelimiter" ,python-ratelimiter)))))
5946
5947 (define-public python-pyqrcode
5948 (package
5949 (name "python-pyqrcode")
5950 (version "1.2.1")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "PyQRCode" version))
5955 (sha256
5956 (base32
5957 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5958 (build-system python-build-system)
5959 (home-page
5960 "https://github.com/mnooner256/pyqrcode")
5961 (synopsis "QR code generator")
5962 (description
5963 "Pyqrcode is a QR code generator written purely in Python with
5964 SVG, EPS, PNG and terminal output.")
5965 (license license:bsd-3)))
5966
5967 (define-public python-seaborn
5968 (package
5969 (name "python-seaborn")
5970 (version "0.9.0")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "seaborn" version))
5975 (sha256
5976 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5977 (build-system python-build-system)
5978 (arguments
5979 `(#:phases
5980 (modify-phases %standard-phases
5981 (add-before 'check 'start-xserver
5982 (lambda* (#:key inputs #:allow-other-keys)
5983 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5984 ;; There must be a running X server and make check doesn't
5985 ;; start one. Therefore we must do it.
5986 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5987 (setenv "DISPLAY" ":1")
5988 #t)))
5989 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5990 (propagated-inputs
5991 `(("python-pandas" ,python-pandas)
5992 ("python-matplotlib" ,python-matplotlib)
5993 ("python-numpy" ,python-numpy)
5994 ("python-scipy" ,python-scipy)))
5995 (native-inputs
5996 `(("python-pytest" ,python-pytest)
5997 ("xorg-server" ,xorg-server)))
5998 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5999 (synopsis "Statistical data visualization")
6000 (description
6001 "Seaborn is a library for making attractive and informative statistical
6002 graphics in Python. It is built on top of matplotlib and tightly integrated
6003 with the PyData stack, including support for numpy and pandas data structures
6004 and statistical routines from scipy and statsmodels.")
6005 (license license:bsd-3)))
6006
6007 (define-public python2-seaborn
6008 (package-with-python2 python-seaborn))
6009
6010 (define-public python-mpmath
6011 (package
6012 (name "python-mpmath")
6013 (version "0.19")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (string-append "http://mpmath.org/files/mpmath-"
6017 version ".tar.gz"))
6018 (sha256
6019 (base32
6020 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6021 (build-system python-build-system)
6022 (arguments
6023 '(#:phases
6024 (modify-phases %standard-phases
6025 (replace 'check
6026 (lambda _
6027 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6028 (home-page "http://mpmath.org")
6029 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6030 (description
6031 "@code{mpmath} can be used as an arbitrary-precision substitute for
6032 Python's float/complex types and math/cmath modules, but also does much
6033 more advanced mathematics.")
6034 (license license:bsd-3)))
6035
6036 (define-public python2-mpmath
6037 (package-with-python2 python-mpmath))
6038
6039 (define-public python-bigfloat
6040 (package
6041 (name "python-bigfloat")
6042 (version "0.3.0")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (pypi-uri "bigfloat" version))
6047 (sha256
6048 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6049 (build-system python-build-system)
6050 (inputs
6051 `(("mpfr" ,mpfr)))
6052 (home-page "https://github.com/mdickinson/bigfloat")
6053 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6054 (description
6055 "This package provides a Python interface to the MPFR library for
6056 multiprecision arithmetic.")
6057 (license license:lgpl3+)))
6058
6059 (define-public python2-bigfloat
6060 (package-with-python2 python-bigfloat))
6061
6062 (define-public python-sympy
6063 (package
6064 (name "python-sympy")
6065 (version "1.1.1")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (string-append
6070 "https://github.com/sympy/sympy/releases/download/sympy-"
6071 version "/sympy-" version ".tar.gz"))
6072 (sha256
6073 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6074 (build-system python-build-system)
6075 (arguments
6076 `(#:phases
6077 (modify-phases %standard-phases
6078 ;; Run the core tests after installation. By default it would run
6079 ;; *all* tests, which take a very long time to complete and are known
6080 ;; to be flaky.
6081 (delete 'check)
6082 (add-after 'install 'check
6083 (lambda* (#:key outputs #:allow-other-keys)
6084 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6085 #t)))))
6086 (propagated-inputs
6087 `(("python-mpmath" ,python-mpmath)))
6088 (home-page "http://www.sympy.org/")
6089 (synopsis "Python library for symbolic mathematics")
6090 (description
6091 "SymPy is a Python library for symbolic mathematics. It aims to become a
6092 full-featured computer algebra system (CAS) while keeping the code as simple
6093 as possible in order to be comprehensible and easily extensible.")
6094 (license license:bsd-3)))
6095
6096 (define-public python2-sympy
6097 (package
6098 (inherit (package-with-python2 python-sympy))
6099 (arguments
6100 `(#:phases
6101 (modify-phases %standard-phases
6102 ;; Run the core tests after installation. By default it would run
6103 ;; *all* tests, which take a very long time to complete and are known
6104 ;; to be flaky.
6105 (delete 'check)
6106 (add-after 'install 'check
6107 (lambda* (#:key outputs #:allow-other-keys)
6108 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6109 #t)))))))
6110
6111 (define-public python-q
6112 (package
6113 (name "python-q")
6114 (version "2.6")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri "q" version))
6119 (sha256
6120 (base32
6121 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6122 (build-system python-build-system)
6123 (home-page "https://github.com/zestyping/q")
6124 (synopsis "Quick-and-dirty debugging output for tired programmers")
6125 (description
6126 "q is a Python module for \"print\" style of debugging Python code. It
6127 provides convenient short API for print out of values, tracebacks, and
6128 falling into the Python interpreter.")
6129 (license license:asl2.0)))
6130
6131 (define-public python2-q
6132 (package-with-python2 python-q))
6133
6134 (define-public python2-xlib
6135 (package
6136 (name "python2-xlib")
6137 (version "0.14")
6138 (source (origin
6139 (method url-fetch)
6140 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6141 "/" version "/"
6142 "python-xlib-" version ".tar.gz"))
6143 (sha256
6144 (base32
6145 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6146 (build-system python-build-system)
6147 (arguments
6148 `(#:python ,python-2 ;Python 2 only
6149 #:tests? #f)) ;no tests
6150 (home-page "http://python-xlib.sourceforge.net/")
6151 (synopsis "Python X11 client library")
6152 (description
6153 "The Python X Library is intended to be a fully functional X client
6154 library for Python programs. It is useful to implement low-level X clients.
6155 It is written entirely in Python.")
6156 (license license:gpl2+)))
6157
6158 (define-public python-singledispatch
6159 (package
6160 (name "python-singledispatch")
6161 (version "3.4.0.3")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "singledispatch" version))
6166 (sha256
6167 (base32
6168 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6169 (build-system python-build-system)
6170 (native-inputs
6171 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6172 (home-page
6173 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6174 (synopsis "Backport of singledispatch feature from Python 3.4")
6175 (description
6176 "This library brings functools.singledispatch from Python 3.4 to Python
6177 2.6-3.3.")
6178 (license license:expat)))
6179
6180 (define-public python2-singledispatch
6181 (package-with-python2 python-singledispatch))
6182
6183 ;; the python- version can be removed with python-3.5
6184 (define-public python-backports-abc
6185 (package
6186 (name "python-backports-abc")
6187 (version "0.5")
6188 (source
6189 (origin
6190 (method url-fetch)
6191 (uri (pypi-uri "backports_abc" version))
6192 (sha256
6193 (base32
6194 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6195 (build-system python-build-system)
6196 (home-page "https://github.com/cython/backports_abc")
6197 (synopsis "Backport of additions to the 'collections.abc' module")
6198 (description
6199 "Python-backports-abc provides a backport of additions to the
6200 @code{collections.abc} module in Python-3.5.")
6201 (license license:psfl)))
6202
6203 (define-public python2-backports-abc
6204 (package-with-python2 python-backports-abc))
6205
6206 (define-public python-backports-csv
6207 (package
6208 (name "python-backports-csv")
6209 (version "1.0.5")
6210 (source
6211 (origin
6212 (method url-fetch)
6213 (uri (pypi-uri "backports.csv" version))
6214 (sha256
6215 (base32
6216 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6217 (build-system python-build-system)
6218 (home-page "https://github.com/ryanhiebert/backports.csv")
6219 (synopsis "Backport of Python 3's csv module for Python 2")
6220 (description
6221 "Provides a backport of Python 3's @code{csv} module for parsing
6222 comma separated values. The API of the @code{csv} module in Python 2
6223 is drastically different from the @code{csv} module in Python 3.
6224 This is due, for the most part, to the difference between str in
6225 Python 2 and Python 3.")
6226 (license license:psfl)))
6227
6228 (define-public python2-backports-csv
6229 (package-with-python2 python-backports-csv))
6230
6231 (define-public python2-backports-shutil-get-terminal-size
6232 (package
6233 (name "python2-backports-shutil-get-terminal-size")
6234 (version "1.0.0")
6235 (source
6236 (origin
6237 (method url-fetch)
6238 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6239 (sha256
6240 (base32
6241 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6242 (build-system python-build-system)
6243 (arguments
6244 `(#:python ,python-2
6245 #:phases
6246 (modify-phases %standard-phases
6247 (replace 'check
6248 (lambda _
6249 (invoke "py.test" "-v"))))))
6250 (native-inputs
6251 `(("python2-pytest" ,python2-pytest)))
6252 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6253 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6254 (description
6255 "This package provides a backport of the @code{get_terminal_size
6256 function} from Python 3.3's @code{shutil}.
6257 Unlike the original version it is written in pure Python rather than C,
6258 so it might be a tiny bit slower.")
6259 (license license:expat)))
6260
6261 (define-public python-waf
6262 (package
6263 (name "python-waf")
6264 (version "2.0.11")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (string-append "https://waf.io/"
6268 "waf-" version ".tar.bz2"))
6269 (sha256
6270 (base32
6271 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6272 (build-system python-build-system)
6273 (arguments
6274 '(#:phases
6275 (modify-phases %standard-phases
6276 (replace 'build
6277 (lambda _
6278 (invoke "python" "waf-light" "configure" "build")))
6279 (replace 'check
6280 (lambda _
6281 (invoke "python" "waf" "--version")))
6282 (replace 'install
6283 (lambda* (#:key outputs #:allow-other-keys)
6284 (let ((out (assoc-ref outputs "out")))
6285 (install-file "waf" (string-append out "/bin")))
6286 #t))
6287 ;; waf breaks when it is wrapped.
6288 (delete 'wrap))))
6289 (home-page "https://waf.io/")
6290 (synopsis "Python-based build system")
6291 (description
6292 "Waf is a Python-based framework for configuring, compiling and installing
6293 applications.")
6294 (license license:bsd-3)))
6295
6296 (define-public python2-waf
6297 (package-with-python2 python-waf))
6298
6299 (define-public python-pyzmq
6300 (package
6301 (name "python-pyzmq")
6302 (version "17.1.2")
6303 (source
6304 (origin
6305 (method url-fetch)
6306 (uri (pypi-uri "pyzmq" version))
6307 (sha256
6308 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6309 (build-system python-build-system)
6310 (arguments
6311 `(#:configure-flags
6312 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6313 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6314 ;; --inplace' for 'python setup.py test' to work.
6315 #:tests? #f))
6316 (inputs
6317 `(("zeromq" ,zeromq)))
6318 (native-inputs
6319 `(("pkg-config" ,pkg-config)
6320 ("python-nose" ,python-nose)))
6321 (home-page "https://github.com/zeromq/pyzmq")
6322 (synopsis "Python bindings for 0MQ")
6323 (description
6324 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6325 (license license:bsd-4)))
6326
6327 (define-public python2-pyzmq
6328 (package-with-python2 python-pyzmq))
6329
6330 (define-public python-pep8
6331 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6332 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6333 ;; some dependents' test suites, and nothing more.
6334 (package
6335 (name "python-pep8")
6336 (version "1.7.0")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (pypi-uri "pep8" version))
6341 (sha256
6342 (base32
6343 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6344 (build-system python-build-system)
6345 (home-page "https://pep8.readthedocs.org/")
6346 (synopsis "Python style guide checker")
6347 (description
6348 "This tools checks Python code against some of the style conventions in
6349 PEP 8.")
6350 (license license:expat)))
6351
6352 (define-public python2-pep8
6353 (package-with-python2 python-pep8))
6354
6355 (define-public python-pyflakes
6356 (package
6357 (name "python-pyflakes")
6358 (version "2.0.0")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "pyflakes" version))
6363 (sha256
6364 (base32
6365 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6366 (build-system python-build-system)
6367 (home-page
6368 "https://github.com/pyflakes/pyflakes")
6369 (synopsis "Passive checker of Python programs")
6370 (description
6371 "Pyflakes statically checks Python source code for common errors.")
6372 (license license:expat)))
6373
6374 (define-public python2-pyflakes
6375 (package-with-python2 python-pyflakes))
6376
6377 (define-public python-mccabe
6378 (package
6379 (name "python-mccabe")
6380 (version "0.6.1")
6381 (source
6382 (origin
6383 (method url-fetch)
6384 (uri (pypi-uri "mccabe" version))
6385 (sha256
6386 (base32
6387 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6388 (build-system python-build-system)
6389 (native-inputs
6390 `(("python-pytest" ,python-pytest-bootstrap)
6391 ("python-pytest-runner" ,python-pytest-runner)))
6392 (home-page "https://github.com/flintwork/mccabe")
6393 (synopsis "McCabe checker, plugin for flake8")
6394 (description
6395 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6396 complexity of Python source code.")
6397 (license license:expat)))
6398
6399 (define-public python2-mccabe
6400 (package-with-python2 python-mccabe))
6401
6402 (define-public python-mccabe-0.2.1
6403 (package (inherit python-mccabe)
6404 (version "0.2.1")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "mccabe" version))
6409 (sha256
6410 (base32
6411 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6412
6413 (define-public python2-mccabe-0.2.1
6414 (package-with-python2 python-mccabe-0.2.1))
6415
6416 ;; Flake8 2.4.1 requires an older version of pep8.
6417 ;; This should be removed ASAP.
6418 (define-public python-pep8-1.5.7
6419 (package (inherit python-pep8)
6420 (version "1.5.7")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "pep8" version))
6425 (sha256
6426 (base32
6427 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6428 (arguments
6429 ;; XXX Tests not compatible with Python 3.5.
6430 '(#:tests? #f))))
6431
6432 (define-public python2-pep8-1.5.7
6433 (package-with-python2 python-pep8-1.5.7))
6434
6435 ;; Flake8 2.4.1 requires an older version of pyflakes.
6436 ;; This should be removed ASAP.
6437 (define-public python-pyflakes-0.8.1
6438 (package (inherit python-pyflakes)
6439 (version "0.8.1")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "pyflakes" version))
6444 (sha256
6445 (base32
6446 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6447 (arguments
6448 ;; XXX Tests not compatible with Python 3.5.
6449 '(#:tests? #f))))
6450
6451 (define-public python2-pyflakes-0.8.1
6452 (package-with-python2 python-pyflakes-0.8.1))
6453
6454 ;; This package is used by hypothesis which has thousands of dependent packages.
6455 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6456 (define-public python-flake8-3.5
6457 (package
6458 (name "python-flake8")
6459 (version "3.5.0")
6460 (source
6461 (origin
6462 (method url-fetch)
6463 (uri (pypi-uri "flake8" version))
6464 (sha256
6465 (base32
6466 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6467 (build-system python-build-system)
6468 (arguments
6469 `(#:phases
6470 (modify-phases %standard-phases
6471 ;; Two errors don't seem to have assigned codes.
6472 (add-after 'unpack 'delete-broken-test
6473 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6474 (add-after 'unpack 'fix-problem-with-pycodestyle
6475 (lambda _
6476 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6477 ;; This should no longer be needed with the next release.
6478 (substitute* "setup.py"
6479 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6480 "PEP8_PLUGIN('break_after_binary_operator'),\
6481 PEP8_PLUGIN('break_before_binary_operator'),"))
6482 #t))
6483 (delete 'check)
6484 (add-after 'install 'check
6485 (lambda* (#:key inputs outputs #:allow-other-keys)
6486 (add-installed-pythonpath inputs outputs)
6487 (invoke "pytest" "-v")
6488 #t)))))
6489 (propagated-inputs
6490 `(("python-pycodestyle" ,python-pycodestyle)
6491 ("python-pyflakes" ,python-pyflakes)
6492 ("python-mccabe" ,python-mccabe)))
6493 (native-inputs
6494 `(("python-mock" ,python-mock)
6495 ("python-pytest" ,python-pytest-bootstrap)
6496 ("python-pytest-runner" ,python-pytest-runner)))
6497 (home-page "https://gitlab.com/pycqa/flake8")
6498 (synopsis
6499 "The modular source code checker: pep8, pyflakes and co")
6500 (description
6501 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6502 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6503 (license license:expat)))
6504
6505 (define-public python2-flake8-3.5
6506 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6507 (package (inherit base)
6508 (propagated-inputs
6509 `(("python2-configparser" ,python2-configparser)
6510 ("python2-enum34" ,python2-enum34)
6511 ,@(package-propagated-inputs base))))))
6512
6513 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6514 ;; this newer version. Keep it as a separate variable for now to avoid
6515 ;; rebuilding "python-hypothesis"; this should be removed in the next
6516 ;; rebuild cycle.
6517 (define-public python-flake8
6518 (package
6519 (inherit python-flake8-3.5)
6520 (version "3.6.0")
6521 (source (origin
6522 (method url-fetch)
6523 (uri (pypi-uri "flake8" version))
6524 (sha256
6525 (base32
6526 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6527 (arguments
6528 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6529 ((#:phases phases)
6530 `(modify-phases ,phases
6531 (delete 'delete-broken-test)
6532 (delete 'fix-problem-with-pycodestyle)))))
6533 (properties `((python2-variant . ,(delay python2-flake8))))))
6534
6535 (define-public python2-flake8
6536 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6537 (package (inherit base)
6538 (propagated-inputs
6539 (package-propagated-inputs python2-flake8-3.5)))))
6540
6541 ;; python-hacking requires flake8 <2.6.0.
6542 (define-public python-flake8-2.5
6543 (package
6544 (inherit python-flake8)
6545 (version "2.5.5")
6546 (source (origin
6547 (method url-fetch)
6548 (uri (pypi-uri "flake8" version))
6549 (sha256
6550 (base32
6551 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6552 (propagated-inputs
6553 `(("python-pep8" ,python-pep8)
6554 ,@(package-propagated-inputs python-flake8)))
6555 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6556
6557 (define-public python2-flake8-2.5
6558 (package
6559 (inherit python2-flake8)
6560 (version (package-version python-flake8-2.5))
6561 (source (origin
6562 (inherit (package-source python-flake8-2.5))))
6563 (propagated-inputs
6564 `(("python2-pep8" ,python2-pep8)
6565 ,@(package-propagated-inputs python2-flake8)))))
6566
6567 (define-public python-flake8-polyfill
6568 (package
6569 (name "python-flake8-polyfill")
6570 (version "1.0.2")
6571 (source
6572 (origin
6573 (method url-fetch)
6574 (uri (pypi-uri "flake8-polyfill" version))
6575 (sha256
6576 (base32
6577 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6578 (build-system python-build-system)
6579 (arguments
6580 '(#:phases
6581 (modify-phases %standard-phases
6582 (replace 'check
6583 (lambda _
6584 (setenv "PYTHONPATH"
6585 (string-append (getcwd) "/build/lib:"
6586 (getenv "PYTHONPATH")))
6587 (invoke "py.test" "-v"))))))
6588 (native-inputs
6589 `(("python-flake8" ,python-flake8)
6590 ("python-mock" ,python-mock)
6591 ("python-pep8" ,python-pep8)
6592 ("python-pycodestyle" ,python-pycodestyle)
6593 ("python-pytest" ,python-pytest)))
6594 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6595 (synopsis "Polyfill package for Flake8 plugins")
6596 (description
6597 "This package that provides some compatibility helpers for Flake8
6598 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6599 (license license:expat)))
6600
6601 (define-public python2-flake8-polyfill
6602 (package-with-python2 python-flake8-polyfill))
6603
6604 (define-public python-mistune
6605 (package
6606 (name "python-mistune")
6607 (version "0.8.4")
6608 (source
6609 (origin
6610 (method url-fetch)
6611 (uri (pypi-uri "mistune" version))
6612 (sha256
6613 (base32
6614 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6615 (build-system python-build-system)
6616 (native-inputs
6617 `(("python-nose" ,python-nose)
6618 ("python-cython" ,python-cython)))
6619 (home-page "https://github.com/lepture/mistune")
6620 (synopsis "Markdown parser in pure Python")
6621 (description "This package provides a fast markdown parser in pure
6622 Python.")
6623 (license license:bsd-3)))
6624
6625 (define-public python2-mistune
6626 (package-with-python2 python-mistune))
6627
6628 (define-public python-markdown
6629 (package
6630 (name "python-markdown")
6631 (version "3.1.1")
6632 (source
6633 (origin
6634 (method url-fetch)
6635 (uri (pypi-uri "Markdown" version))
6636 (sha256
6637 (base32
6638 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6639 (build-system python-build-system)
6640 (native-inputs
6641 `(("python-nose" ,python-nose)
6642 ("python-pyyaml" ,python-pyyaml)))
6643 (home-page "https://python-markdown.github.io/")
6644 (synopsis "Python implementation of Markdown")
6645 (description
6646 "This package provides a Python implementation of John Gruber's
6647 Markdown. The library features international input, various Markdown
6648 extensions, and several HTML output formats. A command line wrapper
6649 markdown_py is also provided to convert Markdown files to HTML.")
6650 (license license:bsd-3)))
6651
6652 (define-public python2-markdown
6653 (package-with-python2 python-markdown))
6654
6655 (define-public python-ptyprocess
6656 (package
6657 (name "python-ptyprocess")
6658 (version "0.5.2")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (pypi-uri "ptyprocess" version))
6663 (sha256
6664 (base32
6665 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6666 (build-system python-build-system)
6667 (native-inputs
6668 `(("python-nose" ,python-nose)))
6669 (arguments
6670 `(#:phases
6671 (modify-phases %standard-phases
6672 (replace 'check
6673 (lambda _ (invoke "nosetests"))))))
6674 (home-page "https://github.com/pexpect/ptyprocess")
6675 (synopsis "Run a subprocess in a pseudo terminal")
6676 (description
6677 "This package provides a Python library used to launch a subprocess in a
6678 pseudo terminal (pty), and interact with both the process and its pty.")
6679 (license license:isc)))
6680
6681 (define-public python2-ptyprocess
6682 (package-with-python2 python-ptyprocess))
6683
6684 (define-public python-cram
6685 (package
6686 (name "python-cram")
6687 (version "0.7")
6688 (home-page "https://bitheap.org/cram/")
6689 (source (origin
6690 (method url-fetch)
6691 (uri (list (string-append home-page "cram-"
6692 version ".tar.gz")
6693 (pypi-uri "cram" version)))
6694 (sha256
6695 (base32
6696 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6697 (arguments
6698 '(#:phases
6699 (modify-phases %standard-phases
6700 (add-after 'unpack 'patch-source
6701 (lambda _
6702 (substitute* (find-files "cram" ".*\\.py$")
6703 ;; Replace default shell path.
6704 (("/bin/sh") (which "sh")))
6705 (substitute* (find-files "tests" ".*\\.t$")
6706 (("md5") "md5sum")
6707 (("/bin/bash") (which "bash"))
6708 (("/bin/sh") (which "sh")))
6709 (substitute* "cram/_test.py"
6710 ;; This hack works around a bug triggered by substituting
6711 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6712 ;; "cram -h", which breaks the output at 80 characters. This
6713 ;; causes the line showing the default shell to break into two
6714 ;; lines, but the test expects a single line...
6715 (("env\\['COLUMNS'\\] = '80'")
6716 "env['COLUMNS'] = '160'"))
6717 #t))
6718 (delete 'check)
6719 (add-after 'install 'check
6720 ;; The test phase uses the built library and executable.
6721 ;; It's easier to run it after install since the build
6722 ;; directory contains version-specific PATH.
6723 (lambda* (#:key inputs outputs #:allow-other-keys)
6724 (add-installed-pythonpath inputs outputs)
6725 (setenv "PATH" (string-append (getenv "PATH") ":"
6726 (assoc-ref outputs "out") "/bin"))
6727 (invoke "make" "test"))))))
6728 (build-system python-build-system)
6729 (native-inputs
6730 `(("python-coverage" ,python-coverage)
6731 ("which" ,which)))
6732 (synopsis "Simple testing framework for command line applications")
6733 (description
6734 "Cram is a functional testing framework for command line applications.
6735 Cram tests look like snippets of interactive shell sessions. Cram runs each
6736 command and compares the command output in the test with the command’s actual
6737 output.")
6738 (license license:gpl2+)))
6739
6740 (define-public python2-cram
6741 (package-with-python2 python-cram))
6742
6743 (define-public python-straight-plugin
6744 (package
6745 (name "python-straight-plugin")
6746 (version "1.4.1")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (pypi-uri "straight.plugin" version))
6751 (sha256
6752 (base32
6753 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6754 (build-system python-build-system)
6755 (home-page "https://github.com/ironfroggy/straight.plugin")
6756 (synopsis "Simple namespaced plugin facility")
6757 (description "Straight Plugin provides a type of plugin you can create from
6758 almost any existing Python modules, and an easy way for outside developers to
6759 add functionality and customization to your projects with their own plugins.")
6760 (license license:expat)))
6761
6762 (define-public python2-straight-plugin
6763 (package-with-python2 python-straight-plugin))
6764
6765 (define-public python-fonttools
6766 (package
6767 (name "python-fonttools")
6768 (version "3.28.0")
6769 (source (origin
6770 (method url-fetch)
6771 (uri (pypi-uri "fonttools" version ".zip"))
6772 (sha256
6773 (base32
6774 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6775 (build-system python-build-system)
6776 (native-inputs
6777 `(("unzip" ,unzip)
6778 ("python-pytest" ,python-pytest)
6779 ("python-pytest-runner" ,python-pytest-runner)))
6780 (home-page "https://github.com/behdad/fonttools")
6781 (synopsis "Tools to manipulate font files")
6782 (description
6783 "FontTools/TTX is a library to manipulate font files from Python. It
6784 supports reading and writing of TrueType/OpenType fonts, reading and writing
6785 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6786 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6787 from an XML-based format.")
6788 (license license:expat)))
6789
6790 (define-public python2-fonttools
6791 (package-with-python2 python-fonttools))
6792
6793 (define-public python-ly
6794 (package
6795 (name "python-ly")
6796 (version "0.9.5")
6797 (source
6798 (origin
6799 (method url-fetch)
6800 (uri (pypi-uri name version))
6801 (sha256
6802 (base32
6803 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6804 (build-system python-build-system)
6805 (arguments
6806 ;; FIXME: Some tests need network access.
6807 '(#:tests? #f))
6808 (synopsis "Tool and library for manipulating LilyPond files")
6809 (description "This package provides a Python library to parse, manipulate
6810 or create documents in LilyPond format. A command line program ly is also
6811 provided that can be used to do various manipulations with LilyPond files.")
6812 (home-page "https://pypi.python.org/pypi/python-ly")
6813 (license license:gpl2+)))
6814
6815 (define-public python-appdirs
6816 (package
6817 (name "python-appdirs")
6818 (version "1.4.3")
6819 (source
6820 (origin
6821 (method url-fetch)
6822 (uri (pypi-uri "appdirs" version))
6823 (sha256
6824 (base32
6825 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6826 (build-system python-build-system)
6827 (home-page "https://github.com/ActiveState/appdirs")
6828 (synopsis
6829 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6830 (description
6831 "This module provides a portable way of finding out where user data
6832 should be stored on various operating systems.")
6833 (license license:expat)))
6834
6835 (define-public python2-appdirs
6836 (package-with-python2 python-appdirs))
6837
6838 (define-public python-llfuse
6839 (package
6840 (name "python-llfuse")
6841 (version "1.3.5")
6842 (source (origin
6843 (method url-fetch)
6844 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6845 (sha256
6846 (base32
6847 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6848 (build-system python-build-system)
6849 (inputs
6850 `(("fuse" ,fuse)
6851 ("attr" ,attr)))
6852 (native-inputs
6853 `(("pkg-config" ,pkg-config)))
6854 (synopsis "Python bindings for FUSE")
6855 (description
6856 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6857 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6858 (license license:lgpl2.0+)
6859 (properties `((python2-variant . ,(delay python2-llfuse))))))
6860
6861 (define-public python2-llfuse
6862 (package (inherit (package-with-python2
6863 (strip-python2-variant python-llfuse)))
6864 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6865
6866 ;; For attic-0.16
6867 (define-public python-llfuse-0.41
6868 (package (inherit python-llfuse)
6869 (version "0.41.1")
6870 (source (origin
6871 (method url-fetch)
6872 (uri (string-append
6873 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6874 "llfuse-" version ".tar.bz2"))
6875 (sha256
6876 (base32
6877 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6878 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6879 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6880 (license (list license:expat license:lgpl2.0+))))
6881
6882 (define-public python-msgpack
6883 (package
6884 (name "python-msgpack")
6885 (version "0.5.6")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "msgpack" version))
6889 (sha256
6890 (base32
6891 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6892 (build-system python-build-system)
6893 (arguments
6894 `(#:modules ((guix build utils)
6895 (guix build python-build-system)
6896 (ice-9 ftw)
6897 (srfi srfi-1)
6898 (srfi srfi-26))
6899 #:phases
6900 (modify-phases %standard-phases
6901 (replace 'check
6902 (lambda _
6903 (let ((cwd (getcwd)))
6904 (setenv "PYTHONPATH"
6905 (string-append cwd "/build/"
6906 (find (cut string-prefix? "lib" <>)
6907 (scandir (string-append cwd "/build")))
6908 ":"
6909 (getenv "PYTHONPATH")))
6910 (invoke "pytest" "-v" "test")))))))
6911 (native-inputs
6912 `(("python-pytest" ,python-pytest)))
6913 (synopsis "MessagePack (de)serializer")
6914 (description "MessagePack is a fast, compact binary serialization format,
6915 suitable for similar data to JSON. This package provides CPython bindings for
6916 reading and writing MessagePack data.")
6917 (home-page "https://pypi.python.org/pypi/msgpack/")
6918 (license license:asl2.0)))
6919
6920 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6921 ;; release 0.5. Some packages like borg still call it by the old name for now.
6922 ;; <https://bugs.gnu.org/30662>
6923 (define-public python-msgpack-transitional
6924 (package
6925 (inherit python-msgpack)
6926 (name "python-msgpack-transitional")
6927 (arguments
6928 (substitute-keyword-arguments (package-arguments python-msgpack)
6929 ((#:phases phases)
6930 `(modify-phases ,phases
6931 (add-after 'unpack 'configure-transitional
6932 (lambda _
6933 ;; Keep using the old name.
6934 (substitute* "setup.py"
6935 (("TRANSITIONAL = False")
6936 "TRANSITIONAL = 1"))
6937 #t))))))))
6938
6939 (define-public python2-msgpack
6940 (package-with-python2 python-msgpack))
6941
6942 (define-public python-netaddr
6943 (package
6944 (name "python-netaddr")
6945 (version "0.7.19")
6946 (source
6947 (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "netaddr" version))
6950 (sha256
6951 (base32
6952 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6953 (build-system python-build-system)
6954 (arguments `(#:tests? #f)) ;; No tests.
6955 (home-page "https://github.com/drkjam/netaddr/")
6956 (synopsis "Pythonic manipulation of network addresses")
6957 (description
6958 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6959 and MAC network addresses.")
6960 (license license:bsd-3)))
6961
6962 (define-public python2-netaddr
6963 (package-with-python2 python-netaddr))
6964
6965 (define-public python2-pyroute2
6966 (package
6967 (name "python2-pyroute2")
6968 (version "0.5.6")
6969 (source
6970 (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "pyroute2" version))
6973 (sha256
6974 (base32
6975 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6976 (build-system python-build-system)
6977 (arguments
6978 `(#:python ,python-2)) ;Python 3.x is not supported
6979 (home-page "https://github.com/svinota/pyroute2")
6980 (synopsis "Python netlink library")
6981 (description
6982 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6983 Supported netlink families and protocols include:
6984 @itemize
6985 @item rtnl, network settings - addresses, routes, traffic controls
6986 @item nfnetlink - netfilter API: ipset, nftables, ...
6987 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6988 @item devlink - manage and monitor devlink-enabled hardware
6989 @item generic - generic netlink families
6990 @itemize
6991 @item nl80211 - wireless functions API (basic support)
6992 @item taskstats - extended process statistics
6993 @item acpi_events - ACPI events monitoring
6994 @item thermal_events - thermal events monitoring
6995 @item VFS_DQUOT - disk quota events monitoring
6996 @end itemize
6997 @end itemize")
6998 (license license:gpl2+)))
6999
7000 (define-public python-wrapt
7001 (package
7002 (name "python-wrapt")
7003 (version "1.11.2")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "wrapt" version))
7008 (sha256
7009 (base32
7010 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7011 (build-system python-build-system)
7012 (arguments
7013 ;; Tests are not included in the tarball, they are only available in the
7014 ;; git repository.
7015 `(#:tests? #f))
7016 (home-page "https://github.com/GrahamDumpleton/wrapt")
7017 (synopsis "Module for decorators, wrappers and monkey patching")
7018 (description
7019 "The aim of the wrapt module is to provide a transparent object proxy for
7020 Python, which can be used as the basis for the construction of function
7021 wrappers and decorator functions.")
7022 (license license:bsd-2)))
7023
7024 (define-public python2-wrapt
7025 (package-with-python2 python-wrapt))
7026
7027 (define-public python-xlrd
7028 (package
7029 (name "python-xlrd")
7030 (version "1.0.0")
7031 (source (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "xlrd" version))
7034 (sha256
7035 (base32
7036 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7037 (build-system python-build-system)
7038 (arguments
7039 `(#:phases
7040 (modify-phases %standard-phases
7041 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7042 ;; run tests instead for now.
7043 (replace 'check (lambda _ (invoke "nosetests"))))))
7044 (native-inputs `(("python-nose" ,python-nose)))
7045 (home-page "http://www.python-excel.org/")
7046 (synopsis "Library for extracting data from Excel files")
7047 (description "This package provides a library to extract data from
7048 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7049 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7050 Unicode-aware. It is not intended as an end-user tool.")
7051 (license license:bsd-3)))
7052
7053 (define-public python2-xlrd
7054 (package-with-python2 python-xlrd))
7055
7056 (define-public python-prettytable
7057 (package
7058 (name "python-prettytable")
7059 (version "0.7.2")
7060 (source
7061 (origin
7062 (method url-fetch)
7063 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7064 (sha256
7065 (base32
7066 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7067 (build-system python-build-system)
7068 (home-page "http://code.google.com/p/prettytable/")
7069 (synopsis "Display tabular data in an ASCII table format")
7070 (description
7071 "A library designed to represent tabular data in visually appealing ASCII
7072 tables. PrettyTable allows for selection of which columns are to be printed,
7073 independent alignment of columns (left or right justified or centred) and
7074 printing of sub-tables by specifying a row range.")
7075 (license license:bsd-3)))
7076
7077 (define-public python2-prettytable
7078 (package-with-python2 python-prettytable))
7079
7080 (define-public python-tables
7081 (package
7082 (name "python-tables")
7083 (version "3.4.4")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (pypi-uri "tables" version))
7088 (sha256
7089 (base32
7090 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7091 (modules '((guix build utils)))
7092 (snippet
7093 '(begin
7094 ;; Remove pre-compiled .pyc files from source.
7095 (for-each delete-file-recursively
7096 (find-files "." "__pycache__" #:directories? #t))
7097 (for-each delete-file (find-files "." "\\.pyc$"))
7098 #t))))
7099 (build-system python-build-system)
7100 (arguments
7101 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7102 ;; or "check", so we must override the build and check phases.
7103 #:phases
7104 (modify-phases %standard-phases
7105 (add-after 'unpack 'use-gcc
7106 (lambda _
7107 (substitute* "setup.py"
7108 (("compiler = new_compiler\\(\\)" line)
7109 (string-append line
7110 "\ncompiler.set_executables(compiler='gcc',"
7111 "compiler_so='gcc',"
7112 "linker_exe='gcc',"
7113 "linker_so='gcc -shared')")))
7114 #t))
7115 (replace 'build
7116 (lambda* (#:key inputs #:allow-other-keys)
7117 (invoke "python" "setup.py" "build"
7118 (string-append "--hdf5="
7119 (assoc-ref inputs "hdf5")))))
7120 (replace 'check
7121 (lambda* (#:key inputs #:allow-other-keys)
7122 (invoke "python" "setup.py" "check"
7123 (string-append "--hdf5="
7124 (assoc-ref inputs "hdf5"))))))))
7125 (propagated-inputs
7126 `(("python-numexpr" ,python-numexpr)
7127 ("python-numpy" ,python-numpy)))
7128 (native-inputs
7129 `(("python-cython" ,python-cython)
7130 ("pkg-config" ,pkg-config)))
7131 (inputs
7132 `(("hdf5" ,hdf5)
7133 ("bzip2" ,bzip2)
7134 ("zlib" ,zlib)))
7135 (home-page "http://www.pytables.org/")
7136 (synopsis "Hierarchical datasets for Python")
7137 (description "PyTables is a package for managing hierarchical datasets and
7138 designed to efficiently cope with extremely large amounts of data.")
7139 (license license:bsd-3)))
7140
7141 (define-public python2-tables
7142 (package-with-python2 python-tables))
7143
7144 (define-public python-pyasn1
7145 (package
7146 (name "python-pyasn1")
7147 (version "0.4.3")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "pyasn1" version))
7152 (sha256
7153 (base32
7154 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7155 (build-system python-build-system)
7156 (home-page "http://pyasn1.sourceforge.net/")
7157 (synopsis "ASN.1 types and codecs")
7158 (description
7159 "This is an implementation of ASN.1 types and codecs in Python. It is
7160 suitable for a wide range of protocols based on the ASN.1 specification.")
7161 (license license:bsd-2)))
7162
7163 (define-public python2-pyasn1
7164 (package-with-python2 python-pyasn1))
7165
7166 (define-public python-pyasn1-modules
7167 (package
7168 (name "python-pyasn1-modules")
7169 (version "0.2.2")
7170 (source
7171 (origin
7172 (method url-fetch)
7173 (uri (pypi-uri "pyasn1-modules" version))
7174 (sha256
7175 (base32
7176 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7177 (build-system python-build-system)
7178 (propagated-inputs
7179 `(("python-pyasn1" ,python-pyasn1)))
7180 (home-page "https://sourceforge.net/projects/pyasn1/")
7181 (synopsis "ASN.1 codec implementations")
7182 (description
7183 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7184 implementations of ASN.1-based codecs and protocols.")
7185 (license license:bsd-3)))
7186
7187 (define-public python2-pyasn1-modules
7188 (package-with-python2 python-pyasn1-modules))
7189
7190 (define-public python-ipaddress
7191 (package
7192 (name "python-ipaddress")
7193 (version "1.0.22")
7194 (source (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "ipaddress" version))
7197 (sha256
7198 (base32
7199 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7200 (build-system python-build-system)
7201 (home-page "https://github.com/phihag/ipaddress")
7202 (synopsis "IP address manipulation library")
7203 (description
7204 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7205 in Python. This library is used to create, poke at, and manipulate IPv4 and
7206 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7207 module to older versions of Python.")
7208 (license license:psfl)))
7209
7210 (define-public python2-ipaddress
7211 (package-with-python2 python-ipaddress))
7212
7213 (define-public python2-ipaddr
7214 (package
7215 (name "python2-ipaddr")
7216 (version "2.1.11")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "ipaddr" version))
7221 (sha256
7222 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7223 (build-system python-build-system)
7224 (arguments
7225 `(#:python ,python-2 ;version 2 only
7226 #:phases
7227 (modify-phases %standard-phases
7228 (replace 'check
7229 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7230 (home-page "https://github.com/google/ipaddr-py")
7231 (synopsis "IP address manipulation library")
7232 (description
7233 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7234 IPv6 addresses and networks.
7235
7236 For new implementations you may prefer to use the standard module
7237 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7238 versions of Python.")
7239 (license license:asl2.0)))
7240
7241 (define-public python-idna
7242 (package
7243 (name "python-idna")
7244 (version "2.8")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "idna" version))
7249 (sha256
7250 (base32
7251 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7252 (build-system python-build-system)
7253 (home-page "https://github.com/kjd/idna")
7254 (synopsis "Internationalized domain names in applications")
7255 (description
7256 "This is a library to support the Internationalised Domain Names in
7257 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7258 protocol is often referred to as “IDNA2008” and can produce different results
7259 from the earlier standard from 2003. The library is also intended to act as a
7260 suitable drop-in replacement for the “encodings.idna” module that comes with
7261 the Python standard library but currently only supports the older 2003
7262 specification.")
7263 (license license:bsd-4)))
7264
7265 (define-public python-idna-2.7
7266 (package (inherit python-idna)
7267 (version "2.7")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (pypi-uri "idna" version))
7271 (sha256
7272 (base32
7273 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7274
7275
7276 (define-public python2-idna
7277 (package-with-python2 python-idna))
7278
7279 (define-public python-idna-ssl
7280 (package
7281 (name "python-idna-ssl")
7282 (version "1.0.1")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "idna-ssl" version))
7287 (sha256
7288 (base32
7289 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:tests? #f)) ;circular dependency with python-aiohttp
7293 (home-page "https://github.com/aio-libs/idna-ssl")
7294 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7295 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7296 domains support.")
7297 (license license:expat)))
7298
7299 (define-public python-pretend
7300 (package
7301 (name "python-pretend")
7302 (version "1.0.9")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "pretend" version))
7307 (sha256
7308 (base32
7309 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7310 (build-system python-build-system)
7311 (home-page "https://github.com/alex/pretend")
7312 (synopsis "Library for stubbing in Python")
7313 (description
7314 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7315 technique for writing tests. You may hear the term mixed up with mocks,
7316 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7317 responses, rather than doing any computation.")
7318 (license license:bsd-3)))
7319
7320 (define-public python2-pretend
7321 (package-with-python2 python-pretend))
7322
7323 (define-public python-pip
7324 (package
7325 (name "python-pip")
7326 (version "19.2.1")
7327 (source
7328 (origin
7329 (method url-fetch)
7330 (uri (pypi-uri "pip" version))
7331 (sha256
7332 (base32
7333 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7334 (build-system python-build-system)
7335 (arguments
7336 '(#:tests? #f)) ; there are no tests in the pypi archive.
7337 (home-page "https://pip.pypa.io/")
7338 (synopsis "Package manager for Python software")
7339 (description
7340 "Pip is a package manager for Python software, that finds packages on the
7341 Python Package Index (PyPI).")
7342 (license license:expat)))
7343
7344 (define-public python2-pip
7345 (package-with-python2 python-pip))
7346
7347 (define-public python-tlsh
7348 (package
7349 (name "python-tlsh")
7350 (version "3.4.5")
7351 (home-page "https://github.com/trendmicro/tlsh")
7352 (source
7353 (origin
7354 (method git-fetch)
7355 (uri (git-reference
7356 (url "https://github.com/trendmicro/tlsh.git")
7357 (commit (string-append "v" version))))
7358 (file-name (git-file-name name version))
7359 (sha256
7360 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7361 (build-system cmake-build-system)
7362 (arguments
7363 '(#:out-of-source? #f
7364 #:phases (modify-phases %standard-phases
7365 (replace
7366 'install
7367 (lambda* (#:key outputs #:allow-other-keys)
7368 ;; Build and install the Python bindings. The underlying
7369 ;; C++ library is apparently not meant to be installed.
7370 (let ((out (assoc-ref outputs "out")))
7371 (with-directory-excursion "py_ext"
7372 (and (system* "python" "setup.py" "build")
7373 (system* "python" "setup.py" "install"
7374 (string-append "--prefix=" out))))))))))
7375 (inputs `(("python" ,python-wrapper))) ;for the bindings
7376 (synopsis "Fuzzy matching library for Python")
7377 (description
7378 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7379 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7380 value which can be used for similarity comparisons. Similar objects have
7381 similar hash values, which allows for the detection of similar objects by
7382 comparing their hash values. The byte stream should have a sufficient amount
7383 of complexity; for example, a byte stream of identical bytes will not generate
7384 a hash value.")
7385 (license license:asl2.0)))
7386
7387 (define-public python2-tlsh
7388 (package
7389 (inherit python-tlsh)
7390 (name "python2-tlsh")
7391 (inputs `(("python" ,python-2)))))
7392
7393 (define-public python-termcolor
7394 (package
7395 (name "python-termcolor")
7396 (version "1.1.0")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "termcolor" version))
7401 (sha256
7402 (base32
7403 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7404 (build-system python-build-system)
7405 (arguments
7406 ;; There are no tests.
7407 `(#:tests? #f))
7408 (home-page "https://pypi.python.org/pypi/termcolor")
7409 (synopsis "ANSII Color formatting for terminal output")
7410 (description
7411 "This package provides ANSII Color formatting for output in terminals.")
7412 (license license:expat)))
7413
7414 (define-public python2-termcolor
7415 (package-with-python2 python-termcolor))
7416
7417 (define-public python-libarchive-c
7418 (package
7419 (name "python-libarchive-c")
7420 (version "2.8")
7421 (source (origin
7422 (method url-fetch)
7423 (uri (pypi-uri "libarchive-c" version))
7424 (sha256
7425 (base32
7426 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7427 (build-system python-build-system)
7428 (arguments
7429 '(#:phases (modify-phases %standard-phases
7430 (add-before
7431 'build 'reference-libarchive
7432 (lambda* (#:key inputs #:allow-other-keys)
7433 ;; Retain the absolute file name of libarchive.so.
7434 (let ((libarchive (assoc-ref inputs "libarchive")))
7435 (substitute* "libarchive/ffi.py"
7436 (("find_library\\('archive'\\)")
7437 (string-append "'" libarchive
7438 "/lib/libarchive.so'"))))))
7439 (replace 'check
7440 (lambda _ (invoke "pytest" "-vv"))))))
7441 (native-inputs
7442 `(("python-mock" ,python-mock)
7443 ("python-pytest" ,python-pytest)))
7444 (inputs
7445 `(("libarchive" ,libarchive)))
7446 (home-page "https://github.com/Changaco/python-libarchive-c")
7447 (synopsis "Python interface to libarchive")
7448 (description
7449 "This package provides Python bindings to libarchive, a C library to
7450 access possibly compressed archives in many different formats. It uses
7451 Python's @code{ctypes} foreign function interface (FFI).")
7452 (license license:lgpl2.0+)))
7453
7454 (define-public python2-libarchive-c
7455 (package-with-python2 python-libarchive-c))
7456
7457 (define-public python-file
7458 (package
7459 (inherit file)
7460 (name "python-file")
7461 (build-system python-build-system)
7462 (arguments
7463 '(#:tests? #f ;no tests
7464 #:configure-flags '("--single-version-externally-managed" "--root=/")
7465 #:phases (modify-phases %standard-phases
7466 (add-before 'build 'change-directory
7467 (lambda _
7468 (chdir "python")
7469 #t))
7470 (add-before 'build 'set-library-file-name
7471 (lambda* (#:key inputs #:allow-other-keys)
7472 (let ((file (assoc-ref inputs "file")))
7473 (substitute* "magic.py"
7474 (("find_library\\('magic'\\)")
7475 (string-append "'" file "/lib/libmagic.so'")))
7476 #t))))))
7477 (inputs `(("file" ,file)))
7478 (native-inputs (if (%current-target-system)
7479 `(("self" ,this-package))
7480 '()))
7481 (synopsis "Python bindings to the libmagic file type guesser. Note that
7482 this module and the python-magic module both provide a \"magic.py\" file;
7483 these two modules, which are different and were developed separately, both
7484 serve the same purpose: provide Python bindings for libmagic.")))
7485
7486 (define-public python2-file
7487 (package-with-python2 python-file))
7488
7489 (define-public python-debian
7490 (package
7491 (name "python-debian")
7492 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7493 (version "0.1.36")
7494 (source
7495 (origin
7496 ;; Use git-fetch, as pypi doesn't include test suite.
7497 (method git-fetch)
7498 (uri (git-reference
7499 (url home-page)
7500 (commit version)))
7501 (file-name (git-file-name name version))
7502 (sha256
7503 (base32
7504 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7505 (build-system python-build-system)
7506 (arguments
7507 `(#:phases (modify-phases %standard-phases
7508 (add-after 'unpack 'remove-debian-specific-tests
7509 ;; python-apt, apt and dpkg are not yet available in guix,
7510 ;; and these tests heavily depend on them.
7511 (lambda _
7512 (delete-file "lib/debian/tests/test_deb822.py")
7513 (delete-file "lib/debian/tests/test_debfile.py")
7514 #t)))))
7515 (propagated-inputs
7516 `(("python-six" ,python-six)
7517 ("python-chardet" ,python-chardet)))
7518 (synopsis "Debian package related modules")
7519 (description
7520 ;; XXX: Use @enumerate instead of @itemize to work around
7521 ;; <http://bugs.gnu.org/21772>.
7522 "This package provides Python modules that abstract many formats of
7523 Debian-related files, such as:
7524
7525 @enumerate
7526 @item Debtags information;
7527 @item @file{debian/changelog} files;
7528 @item packages files, pdiffs;
7529 @item control files of single or multiple RFC822-style paragraphs---e.g.
7530 @file{debian/control}, @file{.changes}, @file{.dsc};
7531 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7532 contained files and meta-information.
7533 @end enumerate\n")
7534
7535 ;; Modules are either GPLv2+ or GPLv3+.
7536 (license license:gpl3+)))
7537
7538 (define-public python2-debian
7539 (package-with-python2 python-debian))
7540
7541 (define-public python-nbformat
7542 (package
7543 (name "python-nbformat")
7544 (version "4.4.0")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "nbformat" version))
7549 (sha256
7550 (base32
7551 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7552 (build-system python-build-system)
7553 (arguments `(#:tests? #f)) ; no test target
7554 (propagated-inputs
7555 `(("python-ipython-genutils" ,python-ipython-genutils)
7556 ("python-jsonschema" ,python-jsonschema)
7557 ("python-jupyter-core" ,python-jupyter-core)
7558 ("python-traitlets" ,python-traitlets)))
7559 (home-page "http://jupyter.org")
7560 (synopsis "Jupyter Notebook format")
7561 (description "This package provides the reference implementation of the
7562 Jupyter Notebook format and Python APIs for working with notebooks.")
7563 (license license:bsd-3)))
7564
7565 (define-public python2-nbformat
7566 (package-with-python2 python-nbformat))
7567
7568 (define-public python-bleach
7569 (package
7570 (name "python-bleach")
7571 (version "1.4.3")
7572 (source
7573 (origin
7574 (method url-fetch)
7575 (uri (pypi-uri "bleach" version))
7576 (sha256
7577 (base32
7578 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7579 (build-system python-build-system)
7580 (propagated-inputs
7581 `(("python-html5lib" ,python-html5lib-0.9)
7582 ("python-six" ,python-six)))
7583 (native-inputs
7584 `(("python-nose" ,python-nose)))
7585 (home-page "https://github.com/jsocol/bleach")
7586 (synopsis "Whitelist-based HTML-sanitizing tool")
7587 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7588 (license license:asl2.0)))
7589
7590 (define-public python2-bleach
7591 (package-with-python2 python-bleach))
7592
7593 (define-public python-entrypoints
7594 (package
7595 (name "python-entrypoints")
7596 (version "0.3")
7597 (source
7598 (origin
7599 (method url-fetch)
7600 (uri (pypi-uri "entrypoints" version))
7601 (sha256
7602 (base32
7603 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7604 (build-system python-build-system)
7605 ;; The package does not come with a setup.py file, so we have to generate
7606 ;; one ourselves.
7607 (arguments
7608 `(#:tests? #f
7609 #:phases
7610 (modify-phases %standard-phases
7611 (add-after 'unpack 'create-setup.py
7612 (lambda _
7613 (call-with-output-file "setup.py"
7614 (lambda (port)
7615 (format port "\
7616 from setuptools import setup
7617 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7618 " ,version))))))))
7619 (home-page "https://github.com/takluyver/entrypoints")
7620 (synopsis "Discover and load entry points from installed Python packages")
7621 (description "Entry points are a way for Python packages to advertise
7622 objects with some common interface. The most common examples are
7623 @code{console_scripts} entry points, which define shell commands by
7624 identifying a Python function to run. The @code{entrypoints} module contains
7625 functions to find and load entry points.")
7626 (license license:expat)))
7627
7628 (define-public python2-entrypoints
7629 (package-with-python2 python-entrypoints))
7630
7631 (define-public python-nbconvert
7632 (package
7633 (name "python-nbconvert")
7634 (version "5.0.0b1")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "nbconvert" version))
7639 (sha256
7640 (base32
7641 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7642 (build-system python-build-system)
7643 (arguments
7644 `(;; The "bdist_egg" target is disabled by default, causing the installation
7645 ;; to fail.
7646 #:configure-flags (list "bdist_egg")
7647 ;; FIXME: 5 failures, 40 errors.
7648 #:tests? #f))
7649 ;; #:phases
7650 ;; (modify-phases %standard-phases
7651 ;; (replace 'check
7652 ;; (lambda _
7653 ;; (zero? (system* "py.test" "-v")))))
7654 (native-inputs
7655 `(("python-pytest" ,python-pytest)))
7656 (propagated-inputs
7657 `(("python-bleach" ,python-bleach)
7658 ("python-entrypoints" ,python-entrypoints)
7659 ("python-jinja2" ,python-jinja2)
7660 ("python-jupyter-core" ,python-jupyter-core)
7661 ("python-mistune" ,python-mistune)
7662 ("python-nbformat" ,python-nbformat)
7663 ("python-pygments" ,python-pygments)
7664 ("python-traitlets" ,python-traitlets)))
7665 (home-page "http://jupyter.org")
7666 (synopsis "Converting Jupyter Notebooks")
7667 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7668 notebooks to various other formats via Jinja templates. It allows you to
7669 convert an @code{.ipynb} notebook file into various static formats including:
7670
7671 @enumerate
7672 @item HTML
7673 @item LaTeX
7674 @item PDF
7675 @item Reveal JS
7676 @item Markdown (md)
7677 @item ReStructured Text (rst)
7678 @item executable script
7679 @end enumerate\n")
7680 (license license:bsd-3)))
7681
7682 (define-public python2-nbconvert
7683 (package-with-python2 python-nbconvert))
7684
7685 (define-public python-notebook
7686 (package
7687 (name "python-notebook")
7688 (version "5.7.4")
7689 (source (origin
7690 (method url-fetch)
7691 (uri (pypi-uri "notebook" version))
7692 (sha256
7693 (base32
7694 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7695 (build-system python-build-system)
7696 (arguments
7697 `(#:phases
7698 (modify-phases %standard-phases
7699 (replace 'check
7700 (lambda _
7701 ;; These tests require a browser
7702 (delete-file-recursively "notebook/tests/selenium")
7703 ;; Some tests need HOME
7704 (setenv "HOME" "/tmp")
7705 ;; This file contains "warningfilters", which are not supported
7706 ;; by this version of nose.
7707 (delete-file "setup.cfg")
7708 (with-directory-excursion "/tmp"
7709 (invoke "nosetests" "-v"))
7710 #t)))))
7711 (propagated-inputs
7712 `(("python-jupyter-core" ,python-jupyter-core)
7713 ("python-nbformat" ,python-nbformat)
7714 ("python-nbconvert" ,python-nbconvert)
7715 ("python-prometheus-client" ,python-prometheus-client)
7716 ("python-send2trash" ,python-send2trash)
7717 ("python-terminado" ,python-terminado)))
7718 (native-inputs
7719 `(("python-nose" ,python-nose)
7720 ("python-sphinx" ,python-sphinx)
7721 ("python-requests" ,python-requests)))
7722 (home-page "http://jupyter.org/")
7723 (synopsis "Web-based notebook environment for interactive computing")
7724 (description
7725 "The Jupyter HTML notebook is a web-based notebook environment for
7726 interactive computing.")
7727 (properties `((python2-variant . ,(delay python2-notebook))))
7728 (license license:bsd-3)))
7729
7730 (define-public python2-notebook
7731 (let ((base (package-with-python2
7732 (strip-python2-variant python-notebook))))
7733 (package (inherit base)
7734 (native-inputs
7735 `(("python2-mock" ,python2-mock)
7736 ,@(package-native-inputs base)))
7737 (arguments
7738 (substitute-keyword-arguments (package-arguments base)
7739 ((#:phases phases)
7740 `(modify-phases ,phases
7741 (add-before 'check 'disable-test-case
7742 ;; The test requires network access to localhost. Curiously it
7743 ;; fails with Python 2 only. Simply make the test-case return
7744 ;; immediately.
7745 (lambda _
7746 (substitute*
7747 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7748 (("formats = self.nbconvert_api") "return #")))))))))))
7749
7750 (define-public python-widgetsnbextension
7751 (package
7752 (name "python-widgetsnbextension")
7753 (version "3.4.2")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "widgetsnbextension" version))
7758 (sha256
7759 (base32
7760 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7761 (build-system python-build-system)
7762 (propagated-inputs
7763 `(("python-ipykernel" ,python-ipykernel)
7764 ("python-notebook" ,python-notebook)))
7765 (native-inputs
7766 `(("python-certifi" ,python-certifi)
7767 ("python-nose" ,python-nose)))
7768 (home-page "https://ipython.org")
7769 (synopsis "IPython HTML widgets for Jupyter")
7770 (description "This package provides interactive HTML widgets for Jupyter
7771 notebooks.")
7772 (license license:bsd-3)))
7773
7774 (define-public python2-widgetsnbextension
7775 (package-with-python2 python-widgetsnbextension))
7776
7777 (define-public python-ipywidgets
7778 (package
7779 (name "python-ipywidgets")
7780 (version "5.2.2")
7781 (source
7782 (origin
7783 (method url-fetch)
7784 (uri (pypi-uri "ipywidgets" version))
7785 (sha256
7786 (base32
7787 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7788 (build-system python-build-system)
7789 (propagated-inputs
7790 `(("python-ipython" ,python-ipython)
7791 ("python-traitlets" ,python-traitlets)
7792 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7793 (native-inputs
7794 `(("python-nose" ,python-nose)
7795 ("python-pytest" ,python-pytest)))
7796 (home-page "https://ipython.org")
7797 (synopsis "IPython HTML widgets for Jupyter")
7798 (description "Ipywidgets are interactive HTML widgets for Jupyter
7799 notebooks and the IPython kernel. Notebooks come alive when interactive
7800 widgets are used. Users gain control of their data and can visualize changes
7801 in the data.")
7802 (license license:bsd-3)))
7803
7804 (define-public python2-ipywidgets
7805 (package-with-python2 python-ipywidgets))
7806
7807 (define-public python-jupyter-console
7808 (package
7809 (name "python-jupyter-console")
7810 (version "6.0.0")
7811 (source
7812 (origin
7813 (method url-fetch)
7814 (uri (pypi-uri "jupyter_console" version))
7815 (sha256
7816 (base32
7817 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7818 (build-system python-build-system)
7819 (propagated-inputs
7820 `(("python-ipykernel" ,python-ipykernel)
7821 ("python-jupyter-client" ,python-jupyter-client)
7822 ("python-prompt-toolkit" ,python-prompt-toolkit)
7823 ("python-pygments" ,python-pygments)))
7824 (native-inputs
7825 `(("python-nose" ,python-nose)))
7826 (home-page "https://jupyter.org")
7827 (synopsis "Jupyter terminal console")
7828 (description "This package provides a terminal-based console frontend for
7829 Jupyter kernels. It also allows for console-based interaction with non-Python
7830 Jupyter kernels such as IJulia and IRKernel.")
7831 (license license:bsd-3)))
7832
7833 (define-public python2-jupyter-console
7834 (package
7835 (name "python2-jupyter-console")
7836 (version "5.2.0")
7837 (source
7838 (origin
7839 (method url-fetch)
7840 (uri (pypi-uri "jupyter_console" version))
7841 (sha256
7842 (base32
7843 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7844 (build-system python-build-system)
7845 ;; Tests only run in an TTY.
7846 (arguments `(#:tests? #f))
7847 (propagated-inputs
7848 `(("python2-ipykernel" ,python2-ipykernel)
7849 ("python2-jupyter-client" ,python2-jupyter-client)
7850 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7851 ("python2-pygments" ,python2-pygments)))
7852 (native-inputs
7853 `(("python2-nose" ,python2-nose)))
7854 (home-page "https://jupyter.org")
7855 (synopsis "Jupyter terminal console")
7856 (description "This package provides a terminal-based console frontend for
7857 Jupyter kernels. It also allows for console-based interaction with non-Python
7858 Jupyter kernels such as IJulia and IRKernel.")
7859 (license license:bsd-3)))
7860
7861 ;; The python-ipython and python-jupyter-console require each other. To get
7862 ;; the functionality in both packages working, strip down the
7863 ;; python-jupyter-console package when using it as an input to python-ipython.
7864 (define python-jupyter-console-minimal
7865 (package
7866 (inherit python-jupyter-console)
7867 (name "python-jupyter-console-minimal")
7868 (arguments
7869 (substitute-keyword-arguments
7870 (package-arguments python-jupyter-console)
7871 ((#:phases phases)
7872 `(modify-phases ,phases
7873 (add-after 'install 'delete-bin
7874 (lambda* (#:key outputs #:allow-other-keys)
7875 ;; Delete the bin files, to avoid conflicts in profiles
7876 ;; where python-ipython and python-jupyter-console are
7877 ;; both present.
7878 (delete-file-recursively
7879 (string-append
7880 (assoc-ref outputs "out") "/bin"))))))))
7881 ;; Remove the python-ipython propagated input, to avoid the cycle
7882 (propagated-inputs
7883 (alist-delete
7884 "python-ipython"
7885 (package-propagated-inputs python-jupyter-console)))))
7886
7887 (define-public python-qtconsole
7888 (package
7889 (name "python-qtconsole")
7890 (version "4.4.3")
7891 (source
7892 (origin
7893 (method url-fetch)
7894 (uri (pypi-uri "qtconsole" version))
7895 (sha256
7896 (base32
7897 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7898 (build-system python-build-system)
7899 (arguments
7900 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7901 ;; but we only have the LTS version 5.x. This means that there might be
7902 ;; runtime errors, but since this is a dependency of the Jupyter package,
7903 ;; and Jupyter can be used without the qtconsole we can overlook this for
7904 ;; now.
7905 `(#:tests? #f
7906 #:phases
7907 (modify-phases %standard-phases
7908 (add-before 'check 'pre-check
7909 (lambda _
7910 (setenv "QT_QPA_PLATFORM" "offscreen")
7911 #t)))))
7912 (propagated-inputs
7913 `(("python-ipykernel" ,python-ipykernel)
7914 ("python-ipython" ,python-ipython)))
7915 (native-inputs
7916 `(("python-pytest" ,python-pytest)))
7917 (home-page "http://jupyter.org")
7918 (synopsis "Jupyter Qt console")
7919 (description "This package provides a Qt-based console for Jupyter with
7920 support for rich media output.")
7921 (license license:bsd-3)))
7922
7923 (define-public jupyter
7924 (package
7925 (name "jupyter")
7926 (version "1.0.0")
7927 (source
7928 (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "jupyter" version))
7931 (sha256
7932 (base32
7933 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7934 (build-system python-build-system)
7935 (arguments '(#:tests? #f)) ; there are none.
7936 (propagated-inputs
7937 `(("python-ipykernel" ,python-ipykernel)
7938 ("python-ipywidgets" ,python-ipywidgets)
7939 ("python-jupyter-console" ,python-jupyter-console)
7940 ("python-nbconvert" ,python-nbconvert)
7941 ("python-notebook" ,python-notebook)
7942 ("python-qtconsole" ,python-qtconsole)))
7943 (native-search-paths
7944 (list (search-path-specification
7945 (variable "JUPYTER_PATH")
7946 (files '("share/jupyter")))))
7947 (home-page "https://jupyter.org")
7948 (synopsis "Web application for interactive documents")
7949 (description
7950 "The Jupyter Notebook is a web application that allows you to create and
7951 share documents that contain live code, equations, visualizations and
7952 explanatory text. Uses include: data cleaning and transformation, numerical
7953 simulation, statistical modeling, machine learning and much more.")
7954 (license license:bsd-3)))
7955
7956 (define-public python-chardet
7957 (package
7958 (name "python-chardet")
7959 (version "3.0.4")
7960 (source
7961 (origin
7962 (method url-fetch)
7963 (uri (pypi-uri "chardet" version))
7964 (sha256
7965 (base32
7966 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7967 (native-inputs
7968 `(("python-hypothesis" ,python-hypothesis)
7969 ("python-pytest" ,python-pytest)
7970 ("python-pytest-runner" ,python-pytest-runner)))
7971 (build-system python-build-system)
7972 (home-page "https://github.com/chardet/chardet")
7973 (synopsis "Universal encoding detector for Python 2 and 3")
7974 (description
7975 "This package provides @code{chardet}, a Python module that can
7976 automatically detect a wide range of file encodings.")
7977 (license license:lgpl2.1+)))
7978
7979 (define-public python2-chardet
7980 (package-with-python2 python-chardet))
7981
7982 (define-public python-docopt
7983 (package
7984 (name "python-docopt")
7985 (version "0.6.2")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 ;; The release on PyPI does not include tests.
7990 (uri (string-append
7991 "https://github.com/docopt/docopt/archive/"
7992 version ".tar.gz"))
7993 (file-name (string-append name "-" version ".tar.gz"))
7994 (sha256
7995 (base32
7996 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7997 (build-system python-build-system)
7998 (native-inputs
7999 `(("python-pytest" ,python-pytest)))
8000 (arguments
8001 `(#:phases
8002 (modify-phases %standard-phases
8003 (replace 'check
8004 (lambda _ (invoke "py.test"))))))
8005 (home-page "http://docopt.org")
8006 (synopsis "Command-line interface description language for Python")
8007 (description "This library allows the user to define a command-line
8008 interface from a program's help message rather than specifying it
8009 programmatically with command-line parsers like @code{getopt} and
8010 @code{argparse}.")
8011 (license license:expat)))
8012
8013 (define-public python2-docopt
8014 (package-with-python2 python-docopt))
8015
8016 (define-public python-pythondialog
8017 (package
8018 (name "python-pythondialog")
8019 (version "3.4.0")
8020 (source
8021 (origin
8022 (method url-fetch)
8023 (uri (pypi-uri "pythondialog" version))
8024 (sha256
8025 (base32
8026 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8027 (build-system python-build-system)
8028 (arguments
8029 `(#:phases
8030 (modify-phases %standard-phases
8031 (add-after 'unpack 'patch-path
8032 (lambda* (#:key inputs #:allow-other-keys)
8033 (let* ((dialog (assoc-ref inputs "dialog")))
8034 ;; Since this library really wants to grovel the search path, we
8035 ;; must hardcode dialog's store path into it.
8036 (substitute* "dialog.py"
8037 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8038 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8039 #t))))
8040 #:tests? #f)) ; no test suite
8041 (propagated-inputs
8042 `(("dialog" ,dialog)))
8043 (home-page "http://pythondialog.sourceforge.net/")
8044 (synopsis "Python interface to the UNIX dialog utility")
8045 (description "A Python wrapper for the dialog utility. Its purpose is to
8046 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8047 This allows one to make simple text-mode user interfaces on Unix-like systems")
8048 (license license:lgpl2.1)
8049 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8050
8051 (define-public python2-pythondialog
8052 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8053 (package
8054 (inherit base)
8055 (version (package-version python-pythondialog))
8056 (source (origin
8057 (method url-fetch)
8058 (uri (pypi-uri "python2-pythondialog" version))
8059 (sha256
8060 (base32
8061 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8062
8063 (define-public python-configobj
8064 (package
8065 (name "python-configobj")
8066 (version "5.0.6")
8067 (source (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "configobj" version))
8070 (sha256
8071 (base32
8072 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8073 ;; Patch setup.py so it looks for python-setuptools, which is
8074 ;; required to parse the keyword 'install_requires' in setup.py.
8075 (patches (search-patches "python-configobj-setuptools.patch"))))
8076 (build-system python-build-system)
8077 (propagated-inputs
8078 `(("python-six" ,python-six)))
8079 (synopsis "Config file reading, writing and validation")
8080 (description "ConfigObj is a simple but powerful config file reader and
8081 writer: an ini file round tripper. Its main feature is that it is very easy to
8082 use, with a straightforward programmer’s interface and a simple syntax for
8083 config files.")
8084 (home-page "https://github.com/DiffSK/configobj")
8085 (license license:bsd-3)))
8086
8087 (define-public python2-configobj
8088 (package-with-python2 python-configobj))
8089
8090 (define-public python-configargparse
8091 (package
8092 (name "python-configargparse")
8093 (version "0.14.0")
8094 (source (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "ConfigArgParse" version))
8097 (sha256
8098 (base32
8099 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8100 (build-system python-build-system)
8101 (native-inputs
8102 `(("python-pyyaml" ,python-pyyaml)))
8103 (arguments
8104 `(#:phases
8105 (modify-phases %standard-phases
8106 (replace 'check
8107 (lambda _
8108 ;; Bypass setuptools-shim because one test relies on "setup.py"
8109 ;; being the first argument passed to the python call.
8110 ;;
8111 ;; NOTE: Many tests do not run because they rely on Python's
8112 ;; built-in test.test_argparse, but we remove the unit tests from
8113 ;; our Python installation.
8114 (invoke "python" "setup.py" "test"))))))
8115 (synopsis "Replacement for argparse")
8116 (description "A drop-in replacement for argparse that allows options to also
8117 be set via config files and/or environment variables.")
8118 (home-page "https://github.com/bw2/ConfigArgParse")
8119 (license license:expat)))
8120
8121 (define-public python2-configargparse
8122 (package-with-python2 python-configargparse))
8123
8124 (define-public python-argparse-manpage
8125 (package
8126 (name "python-argparse-manpage")
8127 (version "1.1")
8128 (source
8129 (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "argparse-manpage" version))
8132 (sha256
8133 (base32
8134 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8135 (build-system python-build-system)
8136 (home-page "https://github.com/praiskup/argparse-manpage")
8137 (synopsis "Build manual page from Python's ArgumentParser object")
8138 (description
8139 "This package provides tools to build manual pages from Python's
8140 @code{ArgumentParser} object.")
8141 (license license:asl2.0)))
8142
8143 (define-public python-contextlib2
8144 (package
8145 (name "python-contextlib2")
8146 (version "0.5.5")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "contextlib2" version))
8151 (sha256
8152 (base32
8153 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8154 (build-system python-build-system)
8155 (home-page "http://contextlib2.readthedocs.org/")
8156 (synopsis "Tools for decorators and context managers")
8157 (description "This module is primarily a backport of the Python
8158 3.2 contextlib to earlier Python versions. Like contextlib, it
8159 provides utilities for common tasks involving decorators and context
8160 managers. It also contains additional features that are not part of
8161 the standard library.")
8162 (license license:psfl)))
8163
8164 (define-public python2-contextlib2
8165 (package
8166 (name "python2-contextlib2")
8167 (version "0.5.5")
8168 (source
8169 (origin
8170 (method url-fetch)
8171 (uri (pypi-uri "contextlib2" version))
8172 (sha256
8173 (base32
8174 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8175 (build-system python-build-system)
8176 (arguments
8177 `(#:python ,python-2
8178 #:phases
8179 (modify-phases %standard-phases
8180 (replace 'check
8181 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8182 (native-inputs
8183 `(("python2-unittest2" ,python2-unittest2)))
8184 (home-page "http://contextlib2.readthedocs.org/")
8185 (synopsis "Tools for decorators and context managers")
8186 (description "This module is primarily a backport of the Python
8187 3.2 contextlib to earlier Python versions. Like contextlib, it
8188 provides utilities for common tasks involving decorators and context
8189 managers. It also contains additional features that are not part of
8190 the standard library.")
8191 (license license:psfl)))
8192
8193 (define-public python-texttable
8194 (package
8195 (name "python-texttable")
8196 (version "0.9.1")
8197 (source
8198 (origin
8199 (method url-fetch)
8200 (uri (pypi-uri "texttable" version))
8201 (sha256
8202 (base32
8203 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8204 (build-system python-build-system)
8205 (arguments '(#:tests? #f)) ; no tests
8206 (home-page "https://github.com/foutaise/texttable/")
8207 (synopsis "Python module for creating simple ASCII tables")
8208 (description "Texttable is a Python module for creating simple ASCII
8209 tables.")
8210 (license license:lgpl2.1+)))
8211
8212 (define-public python2-texttable
8213 (package-with-python2 python-texttable))
8214
8215 (define-public python-atomicwrites
8216 (package
8217 (name "python-atomicwrites")
8218 (version "1.1.5")
8219 (source (origin
8220 (method url-fetch)
8221 (uri (pypi-uri "atomicwrites" version))
8222 (sha256
8223 (base32
8224 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8225 (build-system python-build-system)
8226 (synopsis "Atomic file writes in Python")
8227 (description "Library for atomic file writes using platform dependent tools
8228 for atomic file system operations.")
8229 (home-page "https://github.com/untitaker/python-atomicwrites")
8230 (license license:expat)))
8231
8232 (define-public python2-atomicwrites
8233 (package-with-python2 python-atomicwrites))
8234
8235 (define-public python-click-threading
8236 (package
8237 (name "python-click-threading")
8238 (version "0.4.4")
8239 (source (origin
8240 (method url-fetch)
8241 (uri (pypi-uri "click-threading" version))
8242 (sha256
8243 (base32
8244 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8245 (build-system python-build-system)
8246 (propagated-inputs
8247 `(("python-click" ,python-click)))
8248 (synopsis "Utilities for multithreading in Click")
8249 (description "This package provides utilities for multithreading in Click
8250 applications.")
8251 (home-page "https://github.com/click-contrib/click-threading")
8252 (license license:expat)))
8253
8254 (define-public python-click-log
8255 (package
8256 (name "python-click-log")
8257 (version "0.3.2")
8258 (source (origin
8259 (method url-fetch)
8260 (uri (pypi-uri "click-log" version))
8261 (sha256
8262 (base32
8263 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8264 (build-system python-build-system)
8265 (propagated-inputs
8266 `(("python-click" ,python-click)))
8267 (synopsis "Logging for click applications")
8268 (description "This package provides a Python library for logging Click
8269 applications.")
8270 (home-page "https://github.com/click-contrib/click-log")
8271 (license license:expat)))
8272
8273 (define-public python-apipkg
8274 (package
8275 (name "python-apipkg")
8276 (version "1.4")
8277 (source (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "apipkg" version))
8280 (sha256
8281 (base32
8282 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8283 (build-system python-build-system)
8284 (native-inputs
8285 `(("python-pytest" ,python-pytest)))
8286 (synopsis "Namespace control and lazy-import mechanism")
8287 (description "With apipkg you can control the exported namespace of a Python
8288 package and greatly reduce the number of imports for your users. It is a small
8289 pure Python module that works on virtually all Python versions.")
8290 (home-page "https://github.com/pytest-dev/apipkg")
8291 (license license:expat)))
8292
8293 (define-public python2-apipkg
8294 (package-with-python2 python-apipkg))
8295
8296 (define-public python-execnet
8297 (package
8298 (name "python-execnet")
8299 (version "1.4.1")
8300 (source (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "execnet" version))
8303 (sha256
8304 (base32
8305 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8306 (build-system python-build-system)
8307 (arguments
8308 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8309 ;; The two test failures are caused by the lack of an `ssh` executable.
8310 ;; The test suite can be run with pytest after the 'install' phase.
8311 #:tests? #f))
8312 (native-inputs
8313 `(("python-pytest" ,python-pytest)
8314 ("python-setuptools-scm" ,python-setuptools-scm)))
8315 (propagated-inputs
8316 `(("python-apipkg" ,python-apipkg)))
8317 (synopsis "Rapid multi-Python deployment")
8318 (description "Execnet provides a share-nothing model with
8319 channel-send/receive communication for distributing execution across many
8320 Python interpreters across version, platform and network barriers. It has a
8321 minimal and fast API targeting the following uses:
8322 @enumerate
8323 @item distribute tasks to (many) local or remote CPUs
8324 @item write and deploy hybrid multi-process applications
8325 @item write scripts to administer multiple environments
8326 @end enumerate")
8327 (home-page "http://codespeak.net/execnet/")
8328 (license license:expat)))
8329
8330 (define-public python2-execnet
8331 (package-with-python2 python-execnet))
8332
8333 (define-public python-icalendar
8334 (package
8335 (name "python-icalendar")
8336 (version "4.0.3")
8337 (source (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "icalendar" version))
8340 (sha256
8341 (base32
8342 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8343 (build-system python-build-system)
8344 (propagated-inputs
8345 `(("python-dateutil" ,python-dateutil)
8346 ("python-pytz" ,python-pytz)))
8347 (synopsis "Python library for parsing iCalendar files")
8348 (description "The icalendar package is a parser/generator of iCalendar
8349 files for use with Python.")
8350 (home-page "https://github.com/collective/icalendar")
8351 (license license:bsd-2)))
8352
8353 (define-public python-args
8354 (package
8355 (name "python-args")
8356 (version "0.1.0")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (pypi-uri "args" version))
8360 (sha256
8361 (base32
8362 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8363 (build-system python-build-system)
8364 (home-page "https://github.com/kennethreitz/args")
8365 (synopsis "Command-line argument parser")
8366 (description
8367 "This library provides a Python module to parse command-line arguments.")
8368 (license license:bsd-3)))
8369
8370 (define-public python2-args
8371 (package-with-python2 python-args))
8372
8373 (define-public python-clint
8374 (package
8375 (name "python-clint")
8376 (version "0.5.1")
8377 (source (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "clint" version))
8380 (sha256
8381 (base32
8382 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8383 (build-system python-build-system)
8384 (arguments
8385 '(#:phases
8386 (modify-phases %standard-phases
8387 (replace 'check
8388 (lambda _ (invoke "py.test" "-v"))))))
8389 (native-inputs
8390 `(("python-pytest" ,python-pytest)))
8391 (propagated-inputs
8392 `(("python-args" ,python-args)))
8393 (home-page "https://github.com/kennethreitz/clint")
8394 (synopsis "Command-line interface tools")
8395 (description
8396 "Clint is a Python module filled with a set of tools for developing
8397 command-line applications, including tools for colored and indented
8398 output, progress bar display, and pipes.")
8399 (license license:isc)))
8400
8401 (define-public python2-clint
8402 (package-with-python2 python-clint))
8403
8404 (define-public python-rply
8405 (package
8406 (name "python-rply")
8407 (version "0.7.5")
8408 (source (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "rply" version))
8411 (sha256
8412 (base32
8413 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8414 (build-system python-build-system)
8415 (propagated-inputs
8416 `(("python-appdirs" ,python-appdirs)))
8417 (home-page "https://github.com/alex/rply")
8418 (synopsis "Parser generator for Python")
8419 (description
8420 "This package provides a pure Python based parser generator, that also
8421 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8422 with a new public API, and RPython support.")
8423 (license license:bsd-3)))
8424
8425 (define-public python2-rply
8426 (package-with-python2 python-rply))
8427
8428 (define-public python-hy
8429 (package
8430 (name "python-hy")
8431 (version "0.13.0")
8432 (source (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "hy" version))
8435 (sha256
8436 (base32
8437 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8438 (build-system python-build-system)
8439 (arguments
8440 '(#:phases
8441 (modify-phases %standard-phases
8442 (replace 'check
8443 (lambda _
8444 ;; Tests require write access to HOME.
8445 (setenv "HOME" "/tmp")
8446 (invoke "nosetests"))))))
8447 (native-inputs
8448 `(("python-coverage" ,python-coverage)
8449 ("python-nose" ,python-nose)))
8450 (propagated-inputs
8451 `(("python-astor" ,python-astor)
8452 ("python-clint" ,python-clint)
8453 ("python-rply" ,python-rply)))
8454 (home-page "http://hylang.org/")
8455 (synopsis "Lisp frontend to Python")
8456 (description
8457 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8458 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8459 Python at your fingertips, in Lisp form.")
8460 (license license:expat)))
8461
8462 (define-public python2-hy
8463 (package-with-python2 python-hy))
8464
8465 (define-public python2-functools32
8466 (package
8467 (name "python2-functools32")
8468 (version "3.2.3-2")
8469 (source
8470 (origin
8471 (method url-fetch)
8472 (uri (pypi-uri "functools32" version))
8473 (sha256
8474 (base32
8475 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8476 (build-system python-build-system)
8477 (arguments
8478 `(#:python ,python-2
8479 #:tests? #f)) ; no test target
8480 (home-page "https://github.com/MiCHiLU/python-functools32")
8481 (synopsis
8482 "Backport of the functools module from Python 3.2.3")
8483 (description
8484 "This package is a backport of the @code{functools} module from Python
8485 3.2.3 for use with older versions of Python and PyPy.")
8486 (license license:expat)))
8487
8488 (define-public python2-subprocess32
8489 (package
8490 (name "python2-subprocess32")
8491 (version "3.2.7")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "subprocess32" version))
8495 (sha256
8496 (base32
8497 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8498 (patches
8499 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8500 (build-system python-build-system)
8501 (arguments
8502 `(#:python ,python-2
8503 ;; The test suite fails with Python > 2.7.13:
8504 ;; import test.support
8505 ;; ImportError: No module named support
8506 #:tests? #f
8507 #:phases
8508 (modify-phases %standard-phases
8509 (add-after 'unpack 'patch-/bin/sh
8510 (lambda _
8511 (substitute* '("subprocess32.py"
8512 "test_subprocess32.py")
8513 (("/bin/sh") (which "sh")))
8514 #t)))))
8515 (home-page "https://github.com/google/python-subprocess32")
8516 (synopsis "Backport of the subprocess module from Python 3.2")
8517 (description
8518 "This is a backport of the @code{subprocess} standard library module
8519 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8520 new features. On POSIX systems it is guaranteed to be reliable when used
8521 in threaded applications. It includes timeout support from Python 3.3 but
8522 otherwise matches 3.2’s API.")
8523 (license license:psfl)))
8524
8525 (define-public python2-futures
8526 (package
8527 (name "python2-futures")
8528 (version "3.2.0")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "futures" version))
8533 (sha256
8534 (base32
8535 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8536 (build-system python-build-system)
8537 (arguments `(#:python ,python-2
8538 ;; FIXME: Python 2.7.14 moved the test.support library,
8539 ;; but our package has not yet been adjusted. Enable
8540 ;; tests when the python2 package has been fixed.
8541 #:tests? #f))
8542 (home-page "https://github.com/agronholm/pythonfutures")
8543 (synopsis
8544 "Backport of the concurrent.futures package from Python 3.2")
8545 (description
8546 "The concurrent.futures module provides a high-level interface for
8547 asynchronously executing callables. This package backports the
8548 concurrent.futures package from Python 3.2")
8549 (license license:bsd-3)))
8550
8551 (define-public python-promise
8552 (package
8553 (name "python-promise")
8554 (version "0.4.2")
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "promise" version))
8559 (sha256
8560 (base32
8561 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8562 (build-system python-build-system)
8563 ;; Tests wants python-futures, which is a python2 only program, and
8564 ;; can't be found by python-promise at test time.
8565 (arguments `(#:tests? #f))
8566 (home-page "https://github.com/syrusakbary/promise")
8567 (synopsis "Promises/A+ implementation for Python")
8568 (description
8569 "Promises/A+ implementation for Python")
8570 (properties `((python2-variant . ,(delay python2-promise))))
8571 (license license:expat)))
8572
8573 (define-public python2-promise
8574 (let ((promise (package-with-python2
8575 (strip-python2-variant python-promise))))
8576 (package (inherit promise)
8577 (arguments (substitute-keyword-arguments (package-arguments promise)
8578 ((#:tests? _) #t)))
8579 (native-inputs
8580 `(("python2-futures" ,python2-futures)
8581 ("python2-pytest" ,python2-pytest)
8582 ,@(package-native-inputs promise))))))
8583
8584 (define-public python-progressbar33
8585 (package
8586 (name "python-progressbar33")
8587 (version "2.4")
8588 (source
8589 (origin
8590 (method url-fetch)
8591 (uri (pypi-uri "progressbar33" version))
8592 (sha256
8593 (base32
8594 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8595 (build-system python-build-system)
8596 (home-page "http://github.com/germangh/python-progressbar")
8597 (synopsis "Text progress bar library for Python")
8598 (description
8599 "This package provides a text progress bar library for Python. This
8600 version only differs from the original @code{progressbar} package in that it
8601 uses relative package imports instead of absolute imports, which is necessary
8602 for the module to work under Python 3.3.")
8603 ;; Either or both of these licenses may be selected.
8604 (license (list license:lgpl2.1+ license:bsd-3))))
8605
8606 (define-public python-colorama
8607 (package
8608 (name "python-colorama")
8609 (version "0.3.9")
8610 (source
8611 (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "colorama" version))
8614 (sha256
8615 (base32
8616 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8617 (build-system python-build-system)
8618 (synopsis "Colored terminal text rendering for Python")
8619 (description "Colorama is a Python library for rendering colored terminal
8620 text.")
8621 (home-page "https://pypi.python.org/pypi/colorama")
8622 (license license:bsd-3)))
8623
8624 (define-public python2-colorama
8625 (package-with-python2 python-colorama))
8626
8627 (define-public python-rsa
8628 (package
8629 (name "python-rsa")
8630 (version "3.4.2")
8631 (source
8632 (origin
8633 (method url-fetch)
8634 (uri (pypi-uri "rsa" version))
8635 (sha256
8636 (base32
8637 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8638 (build-system python-build-system)
8639 (propagated-inputs
8640 `(("python-pyasn1" ,python-pyasn1)))
8641 (synopsis "Pure-Python RSA implementation")
8642 (description "Python-RSA is a pure-Python RSA implementation. It supports
8643 encryption and decryption, signing and verifying signatures, and key
8644 generation according to PKCS#1 version 1.5. It can be used as a Python
8645 library as well as on the command line.")
8646 (home-page "https://stuvel.eu/rsa")
8647 (license license:asl2.0)))
8648
8649 (define-public python2-rsa
8650 (package-with-python2 python-rsa))
8651
8652 (define-public python-pluggy
8653 (package
8654 (name "python-pluggy")
8655 (version "0.7.1")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "pluggy" version))
8660 (sha256
8661 (base32
8662 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8663 (build-system python-build-system)
8664 (native-inputs
8665 `(("python-setuptools-scm" ,python-setuptools-scm)))
8666 (synopsis "Plugin and hook calling mechanism for Python")
8667 (description "Pluggy is an extraction of the plugin manager as used by
8668 Pytest but stripped of Pytest specific details.")
8669 (home-page "https://pypi.python.org/pypi/pluggy")
8670 (license license:expat)))
8671
8672 (define-public python2-pluggy
8673 (package-with-python2 python-pluggy))
8674
8675 (define-public python-tox
8676 (package
8677 (name "python-tox")
8678 (version "2.8.1")
8679 (source
8680 (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "tox" version))
8683 (sha256
8684 (base32
8685 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8686 (build-system python-build-system)
8687 (arguments
8688 ;; FIXME: Tests require pytest-timeout, which itself requires
8689 ;; pytest>=2.8.0 for installation.
8690 '(#:tests? #f))
8691 (propagated-inputs
8692 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8693 ("python-py" ,python-py)
8694 ("python-virtualenv" ,python-virtualenv)))
8695 (native-inputs
8696 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8697 ("python-pytest" ,python-pytest) ; >= 2.3.5
8698 ("python-setuptools-scm" ,python-setuptools-scm)))
8699 (home-page "http://tox.testrun.org/")
8700 (synopsis "Virtualenv-based automation of test activities")
8701 (description "Tox is a generic virtualenv management and test command line
8702 tool. It can be used to check that a package installs correctly with
8703 different Python versions and interpreters, or run tests in each type of
8704 supported environment, or act as a frontend to continuous integration
8705 servers.")
8706 (license license:expat)))
8707
8708 (define-public python2-tox
8709 (package-with-python2 python-tox))
8710
8711 (define-public python-jmespath
8712 (package
8713 (name "python-jmespath")
8714 (version "0.9.3")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "jmespath" version))
8719 (sha256
8720 (base32
8721 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8722 (build-system python-build-system)
8723 (native-inputs
8724 `(("python-nose" ,python-nose)))
8725 (synopsis "JSON Matching Expressions")
8726 (description "JMESPath (pronounced “james path”) is a Python library that
8727 allows one to declaratively specify how to extract elements from a JSON
8728 document.")
8729 (home-page "https://github.com/jmespath/jmespath.py")
8730 (license license:expat)))
8731
8732 (define-public python2-jmespath
8733 (package-with-python2 python-jmespath))
8734
8735 (define-public python-botocore
8736 (package
8737 (name "python-botocore")
8738 (version "1.12.149")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (pypi-uri "botocore" version))
8743 (sha256
8744 (base32
8745 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8746 (build-system python-build-system)
8747 (arguments
8748 ;; FIXME: Many tests are failing.
8749 '(#:tests? #f))
8750 (propagated-inputs
8751 `(("python-dateutil" ,python-dateutil)
8752 ("python-docutils" ,python-docutils)
8753 ("python-jmespath" ,python-jmespath)))
8754 (native-inputs
8755 `(("python-mock" ,python-mock)
8756 ("python-nose" ,python-nose)
8757 ("behave" ,behave)
8758 ("python-tox" ,python-tox)
8759 ("python-urllib3" ,python-urllib3)
8760 ("python-wheel" ,python-wheel)))
8761 (home-page "https://github.com/boto/botocore")
8762 (synopsis "Low-level interface to AWS")
8763 (description "Botocore is a Python library that provides a low-level
8764 interface to the Amazon Web Services (AWS) API.")
8765 (license license:asl2.0)))
8766
8767 (define-public python2-botocore
8768 (package-with-python2 python-botocore))
8769
8770 (define-public python-xdo
8771 (package
8772 (name "python-xdo")
8773 (version "0.3")
8774 (source (origin
8775 (method url-fetch)
8776 (uri (string-append
8777 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8778 "python-xdo_" version ".orig.tar.gz"))
8779 (sha256
8780 (base32
8781 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8782 (build-system python-build-system)
8783 (arguments
8784 '(#:phases
8785 (modify-phases %standard-phases
8786 (add-before 'install 'patch-libxdo-path
8787 ;; Hardcode the path of dynamically loaded libxdo library.
8788 (lambda* (#:key inputs #:allow-other-keys)
8789 (let ((libxdo (string-append
8790 (assoc-ref inputs "xdotool")
8791 "/lib/libxdo.so")))
8792 (substitute* "xdo/_xdo.py"
8793 (("find_library\\(\"xdo\"\\)")
8794 (simple-format #f "\"~a\"" libxdo)))
8795 #t))))
8796 #:tests? #f)) ; no tests provided
8797 (propagated-inputs
8798 `(("python-six" ,python-six)))
8799 (inputs
8800 `(("xdotool" ,xdotool)
8801 ("libX11" ,libx11)))
8802 (home-page "https://tracker.debian.org/pkg/python-xdo")
8803 (synopsis "Python library for simulating X11 keyboard/mouse input")
8804 (description "Provides bindings to libxdo for manipulating X11 via simulated
8805 input. (Note that this is mostly a legacy library; you may wish to look at
8806 python-xdo for newer bindings.)")
8807 (license license:bsd-3)))
8808
8809 (define-public python2-xdo
8810 (package-with-python2 python-xdo))
8811
8812 (define-public python-mako
8813 (package
8814 (name "python-mako")
8815 (version "1.1.0")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "Mako" version))
8820 (sha256
8821 (base32
8822 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8823 (build-system python-build-system)
8824 (arguments
8825 `(#:phases (modify-phases %standard-phases
8826 (replace 'check
8827 (lambda _
8828 (invoke "pytest" "-vv"))))))
8829 (propagated-inputs
8830 `(("python-markupsafe" ,python-markupsafe)))
8831 (native-inputs
8832 `(("python-mock" ,python-mock)
8833 ("python-pytest" ,python-pytest)))
8834 (home-page "https://www.makotemplates.org/")
8835 (synopsis "Templating language for Python")
8836 (description "Mako is a templating language for Python that compiles
8837 templates into Python modules.")
8838 (license license:expat)))
8839
8840 (define-public python2-mako
8841 (package-with-python2 python-mako))
8842
8843 (define-public python-waitress
8844 (package
8845 (name "python-waitress")
8846 (version "1.1.0")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "waitress" version))
8851 (patches (search-patches "python-waitress-fix-tests.patch"))
8852 (sha256
8853 (base32
8854 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8855 (build-system python-build-system)
8856 (home-page "https://github.com/Pylons/waitress")
8857 (synopsis "Waitress WSGI server")
8858 (description "Waitress is meant to be a production-quality pure-Python WSGI
8859 server with very acceptable performance.")
8860 (license license:zpl2.1)))
8861
8862 (define-public python2-waitress
8863 (package-with-python2 python-waitress))
8864
8865 (define-public python-pyquery
8866 (package
8867 (name "python-pyquery")
8868 (version "1.2.17")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "pyquery" version))
8873 (sha256
8874 (base32
8875 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8876 (build-system python-build-system)
8877 (native-inputs
8878 `(("python-webob" ,python-webob)
8879 ("python-webtest" ,python-webtest)))
8880 (propagated-inputs
8881 `(("python-lxml" ,python-lxml)
8882 ("python-cssselect" ,python-cssselect)))
8883 (home-page "https://github.com/gawel/pyquery")
8884 (synopsis "Make jQuery-like queries on xml documents")
8885 (description "pyquery allows you to make jQuery queries on xml documents.
8886 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8887 fast xml and html manipulation.")
8888 (license license:bsd-3)))
8889
8890 (define-public python-anyjson
8891 (package
8892 (name "python-anyjson")
8893 (version "0.3.3")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "anyjson" version))
8898 (sha256
8899 (base32
8900 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8901 (build-system python-build-system)
8902 (arguments
8903 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8904 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8905 ;; whatever) so this transformation needs to be done before the tests
8906 ;; can be run. Maybe we could add a build step to transform beforehand
8907 ;; but it could be annoying/difficult.
8908 ;; We can enable tests for the Python 2 version, though, and do below.
8909 #:tests? #f))
8910 (home-page "https://bitbucket.org/runeh/anyjson/")
8911 (synopsis
8912 "Wraps best available JSON implementation in a common interface")
8913 (description
8914 "Anyjson loads whichever is the fastest JSON module installed
8915 and provides a uniform API regardless of which JSON implementation is used.")
8916 (license license:bsd-3)
8917 (properties `((python2-variant . ,(delay python2-anyjson))))))
8918
8919 (define-public python2-anyjson
8920 (let ((anyjson (package-with-python2
8921 (strip-python2-variant python-anyjson))))
8922 (package
8923 (inherit anyjson)
8924 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8925 #:tests? #t
8926 ,@(package-arguments anyjson)))
8927 (native-inputs `(("python2-nose" ,python2-nose))))))
8928
8929 (define-public python-amqp
8930 (package
8931 (name "python-amqp")
8932 (version "2.3.2")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "amqp" version))
8937 (sha256
8938 (base32
8939 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8940 (build-system python-build-system)
8941 (native-inputs
8942 `(("python-case" ,python-case)
8943 ("python-pytest-sugar" ,python-pytest-sugar)
8944 ("python-mock" ,python-mock)))
8945 (propagated-inputs
8946 `(("python-vine" ,python-vine)))
8947 (home-page "https://github.com/celery/py-amqp")
8948 (synopsis
8949 "Low-level AMQP client for Python (fork of amqplib)")
8950 (description
8951 "This is a fork of amqplib which was originally written by Barry Pederson.
8952 It is maintained by the Celery project, and used by kombu as a pure python
8953 alternative when librabbitmq is not available.")
8954 (license license:lgpl2.1+)
8955 (properties `((python2-variant . ,(delay python2-amqp))))))
8956
8957 (define-public python2-amqp
8958 (let ((amqp (package-with-python2
8959 (strip-python2-variant python-amqp))))
8960 (package
8961 (inherit amqp)
8962 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8963 ;; unmaintained. Weirdly, does not do this on the python 3
8964 ;; version?
8965 #:tests? #f
8966 ,@(package-arguments amqp))))))
8967
8968 (define-public python-txamqp
8969 (package
8970 (name "python-txamqp")
8971 (version "0.8.2")
8972 (source
8973 (origin
8974 (method url-fetch)
8975 (uri (pypi-uri "txAMQP" version))
8976 (sha256
8977 (base32
8978 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8979 (build-system python-build-system)
8980 (propagated-inputs
8981 `(("python-six" ,python-six)
8982 ("python-twisted" ,python-twisted)))
8983 (home-page "https://github.com/txamqp/txamqp")
8984 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8985 (description
8986 "This package provides a Python library for communicating with AMQP peers
8987 and brokers using the asynchronous networking framework Twisted. It contains
8988 all the necessary code to connect, send and receive messages to/from an
8989 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8990 also includes support for using Thrift RPC over AMQP in Twisted
8991 applications.")
8992 (license license:asl2.0)))
8993
8994 (define-public python2-txamqp
8995 (package-with-python2 python-txamqp))
8996
8997 (define-public python-kombu
8998 (package
8999 (name "python-kombu")
9000 (version "4.2.2")
9001 (source
9002 (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "kombu" version))
9005 (sha256
9006 (base32
9007 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9008 (build-system python-build-system)
9009 (native-inputs
9010 `(("python-mock" ,python-mock)
9011 ("python-case" ,python-case)
9012 ("python-pyro4" ,python-pyro4)
9013 ("python-pytest-sugar" ,python-pytest-sugar)
9014 ("python-pytz" ,python-pytz)))
9015 (propagated-inputs
9016 `(("python-anyjson" ,python-anyjson)
9017 ("python-amqp" ,python-amqp)
9018 ("python-redis" ,python-redis)))
9019 (home-page "https://kombu.readthedocs.io")
9020 (synopsis "Message passing library for Python")
9021 (description "The aim of Kombu is to make messaging in Python as easy as
9022 possible by providing an idiomatic high-level interface for the AMQ protocol,
9023 and also provide proven and tested solutions to common messaging problems.
9024 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9025 message orientation, queuing, routing, reliability and security, for which the
9026 RabbitMQ messaging server is the most popular implementation.")
9027 (license license:bsd-3)
9028 (properties `((python2-variant . ,(delay python2-kombu))))))
9029
9030 (define-public python2-kombu
9031 (let ((kombu (package-with-python2
9032 (strip-python2-variant python-kombu))))
9033 (package
9034 (inherit kombu)
9035 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9036 ;; It works fine on the python3 variant.
9037 #:tests? #f
9038 ,@(package-arguments kombu)))
9039 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9040 ,@(package-native-inputs kombu))))))
9041
9042 (define-public python-billiard
9043 (package
9044 (name "python-billiard")
9045 (version "3.5.0.5")
9046 (source
9047 (origin
9048 (method url-fetch)
9049 (uri (pypi-uri "billiard" version))
9050 (sha256
9051 (base32
9052 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9053 (build-system python-build-system)
9054 (native-inputs
9055 `(("python-case" ,python-case)
9056 ("python-pytest" ,python-pytest)))
9057 (home-page "https://github.com/celery/billiard")
9058 (synopsis
9059 "Python multiprocessing fork with improvements and bugfixes")
9060 (description
9061 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9062 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9063 pyprocessing package. This standalone variant is intended to be compatible with
9064 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9065 (license license:bsd-3)
9066 (properties `((python2-variant . ,(delay python2-billiard))))))
9067
9068 (define-public python2-billiard
9069 (let ((billiard (package-with-python2
9070 (strip-python2-variant python-billiard))))
9071 (package
9072 (inherit billiard)
9073 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9074 ("python2-mock" ,python2-mock)
9075 ,@(package-native-inputs billiard))))))
9076
9077 (define-public python-celery
9078 (package
9079 (name "python-celery")
9080 (version "4.2.1")
9081 (source
9082 (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "celery" version))
9085 (sha256
9086 (base32
9087 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9088 (build-system python-build-system)
9089 (arguments
9090 '(;; TODO The tests fail with Python 3.7
9091 ;; https://github.com/celery/celery/issues/4849
9092 #:tests? #f
9093 #:phases
9094 (modify-phases %standard-phases
9095 (add-after 'unpack 'patch-requirements
9096 (lambda _
9097 (substitute* "requirements/test.txt"
9098 (("pytest>=3\\.0,<3\\.3")
9099 "pytest>=3.0"))
9100 #t)))))
9101 (native-inputs
9102 `(("python-case" ,python-case)
9103 ("python-pytest" ,python-pytest)))
9104 (propagated-inputs
9105 `(("python-pytz" ,python-pytz)
9106 ("python-billiard" ,python-billiard)
9107 ("python-kombu" ,python-kombu)))
9108 (home-page "https://celeryproject.org")
9109 (synopsis "Distributed Task Queue")
9110 (description "Celery is an asynchronous task queue/job queue based on
9111 distributed message passing. It is focused on real-time operation, but
9112 supports scheduling as well. The execution units, called tasks, are executed
9113 concurrently on a single or more worker servers using multiprocessing,
9114 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9115 synchronously (wait until ready).")
9116 (license license:bsd-3)
9117 (properties `((python2-variant . ,(delay python2-celery))))))
9118
9119 (define-public python2-celery
9120 (let ((celery (package-with-python2
9121 (strip-python2-variant python-celery))))
9122 (package
9123 (inherit celery)
9124 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9125 ("python2-mock" ,python2-mock)
9126 ,@(package-native-inputs celery))))))
9127
9128 (define-public python-translitcodec
9129 (package
9130 (name "python-translitcodec")
9131 (version "0.4.0")
9132 (source
9133 (origin
9134 (method url-fetch)
9135 (uri (pypi-uri "translitcodec" version))
9136 (sha256
9137 (base32
9138 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9139 (build-system python-build-system)
9140 (arguments
9141 `(#:tests? #f)) ; no tests provided
9142 (home-page
9143 "https://github.com/claudep/translitcodec")
9144 (synopsis
9145 "Unicode to 8-bit charset transliteration codec")
9146 (description
9147 "This package contains codecs for transliterating ISO 10646 texts into
9148 best-effort representations using smaller coded character sets (ASCII,
9149 ISO 8859, etc.).")
9150 (license license:expat)))
9151
9152 (define-public python2-translitcodec
9153 (package-with-python2 python-translitcodec))
9154
9155 (define-public python-editor
9156 (package
9157 (name "python-editor")
9158 (version "0.5")
9159 (source
9160 (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "python-editor" version))
9163 (sha256
9164 (base32
9165 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9166 (build-system python-build-system)
9167 (home-page
9168 "https://github.com/fmoo/python-editor")
9169 (synopsis
9170 "Programmatically open an editor, capture the result")
9171 (description
9172 "python-editor is a library that provides the editor module for
9173 programmatically interfacing with your system's $EDITOR.")
9174 (license license:asl2.0)))
9175
9176 (define-public python2-editor
9177 (package-with-python2 python-editor))
9178
9179 (define-public python-vobject
9180 (package
9181 (name "python-vobject")
9182 (version "0.9.5")
9183 (source (origin
9184 (method url-fetch)
9185 (uri (pypi-uri "vobject" version))
9186 (sha256
9187 (base32
9188 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9189 (build-system python-build-system)
9190 (arguments
9191 '(;; The test suite relies on some non-portable Windows interfaces.
9192 #:tests? #f))
9193 (propagated-inputs
9194 `(("python-dateutil" ,python-dateutil)
9195 ("python-pyicu" ,python-pyicu)))
9196 (synopsis "Parse and generate vCard and vCalendar files")
9197 (description "Vobject is intended to be a full featured Python package for
9198 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9199 are supported and well tested. vCard 3.0 files are supported, and all data
9200 should be imported, but only a few components are understood in a sophisticated
9201 way.")
9202 (home-page "http://eventable.github.io/vobject/")
9203 (license license:asl2.0)))
9204
9205 (define-public python2-vobject
9206 (package-with-python2 python-vobject))
9207
9208 (define-public python-munkres
9209 (package
9210 (name "python-munkres")
9211 (version "1.0.8")
9212 (source (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "munkres" version))
9215 (sha256
9216 (base32
9217 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9218 (build-system python-build-system)
9219 (arguments
9220 '(#:tests? #f)) ; no test suite
9221 (home-page "http://software.clapper.org/munkres/")
9222 (synopsis "Implementation of the Munkres algorithm")
9223 (description "The Munkres module provides an implementation of the Munkres
9224 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9225 useful for solving the Assignment Problem.")
9226 (license license:bsd-3)))
9227
9228 (define-public python2-munkres
9229 (package-with-python2 python-munkres))
9230
9231 (define-public python-whoosh
9232 (package
9233 (name "python-whoosh")
9234 (version "2.7.4")
9235 (source
9236 (origin
9237 (method url-fetch)
9238 (uri (pypi-uri "Whoosh" version))
9239 (sha256
9240 (base32
9241 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9242 (build-system python-build-system)
9243 (native-inputs
9244 `(("python-pytest" ,python-pytest)))
9245 (home-page "https://bitbucket.org/mchaput/whoosh")
9246 (synopsis "Full text indexing, search, and spell checking library")
9247 (description
9248 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9249 checking library.")
9250 (license license:bsd-2)))
9251
9252 (define-public python2-whoosh
9253 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9254 (package (inherit whoosh)
9255 (propagated-inputs
9256 `(("python2-backport-ssl-match-hostname"
9257 ,python2-backport-ssl-match-hostname)
9258 ,@(package-propagated-inputs whoosh))))))
9259
9260 (define-public python-pathlib
9261 (package
9262 (name "python-pathlib")
9263 (version "1.0.1")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "pathlib" version))
9267 (sha256
9268 (base32
9269 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9270 (build-system python-build-system)
9271 ;; The tests depend on the internal "test" module, which does not provide
9272 ;; a stable interface.
9273 (arguments `(#:tests? #f))
9274 (home-page "https://pathlib.readthedocs.org/")
9275 (synopsis "Object-oriented file system paths")
9276 (description "Pathlib offers a set of classes to handle file system paths.
9277 It offers the following advantages over using string objects:
9278
9279 @enumerate
9280 @item No more cumbersome use of os and os.path functions. Everything can
9281 be done easily through operators, attribute accesses, and method calls.
9282 @item Embodies the semantics of different path types. For example,
9283 comparing Windows paths ignores casing.
9284 @item Well-defined semantics, eliminating any inconsistencies or
9285 ambiguities (forward vs. backward slashes, etc.).
9286 @end enumerate
9287
9288 Note: In Python 3.4, pathlib is now part of the standard library. For other
9289 Python versions please consider python-pathlib2 instead, which tracks the
9290 standard library module. This module (python-pathlib) isn't maintained
9291 anymore.")
9292 (license license:expat)))
9293
9294 (define-public python2-pathlib
9295 (package-with-python2 python-pathlib))
9296
9297 (define-public python2-pathlib2
9298 (package
9299 (name "python2-pathlib2")
9300 (version "2.3.2")
9301 (source (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "pathlib2" version))
9304 (sha256
9305 (base32
9306 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9307 (build-system python-build-system)
9308 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9309 ;; version is 3.4 which already includes this package as part of the
9310 ;; standard library.
9311 (arguments
9312 `(#:python ,python-2))
9313 (propagated-inputs
9314 `(("python2-scandir" ,python2-scandir)
9315 ("python2-six" ,python2-six)))
9316 (home-page "https://pypi.python.org/pypi/pathlib2/")
9317 (synopsis "Object-oriented file system paths - backport of standard
9318 pathlib module")
9319 (description "The goal of pathlib2 is to provide a backport of standard
9320 pathlib module which tracks the standard library module, so all the newest
9321 features of the standard pathlib can be used also on older Python versions.
9322
9323 Pathlib offers a set of classes to handle file system paths. It offers the
9324 following advantages over using string objects:
9325
9326 @enumerate
9327 @item No more cumbersome use of os and os.path functions. Everything can
9328 be done easily through operators, attribute accesses, and method calls.
9329 @item Embodies the semantics of different path types. For example,
9330 comparing Windows paths ignores casing.
9331 @item Well-defined semantics, eliminating any inconsistencies or
9332 ambiguities (forward vs. backward slashes, etc.).
9333 @end enumerate")
9334 (license license:expat)))
9335
9336 (define-public python2-pathlib2-bootstrap
9337 (hidden-package
9338 (package
9339 (inherit python2-pathlib2)
9340 (name "python2-pathlib2-bootstrap")
9341 (propagated-inputs
9342 `(("python2-scandir" ,python2-scandir)
9343 ("python2-six" ,python2-six-bootstrap))))))
9344
9345 (define-public python-jellyfish
9346 (package
9347 (name "python-jellyfish")
9348 (version "0.5.6")
9349 (source (origin
9350 (method url-fetch)
9351 (uri (pypi-uri "jellyfish" version))
9352 (sha256
9353 (base32
9354 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9355 (build-system python-build-system)
9356 (native-inputs
9357 `(("python-pytest" ,python-pytest)))
9358 (home-page "https://github.com/jamesturk/jellyfish")
9359 (synopsis "Approximate and phonetic matching of strings")
9360 (description "Jellyfish uses a variety of string comparison and phonetic
9361 encoding algorithms to do fuzzy string matching.")
9362 (license license:bsd-2)
9363 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9364
9365 (define-public python2-jellyfish
9366 (let ((jellyfish (package-with-python2
9367 (strip-python2-variant python-jellyfish))))
9368 (package (inherit jellyfish)
9369 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9370 ,@(package-native-inputs jellyfish))))))
9371
9372 (define-public python2-unicodecsv
9373 (package
9374 (name "python2-unicodecsv")
9375 (version "0.14.1")
9376 (source (origin
9377 (method url-fetch)
9378 ;; The test suite is not included in the PyPi release.
9379 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9380 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9381 "archive/" version ".tar.gz"))
9382 (file-name (string-append name "-" version ".tar.gz"))
9383 (sha256
9384 (base32
9385 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9386 (build-system python-build-system)
9387 (arguments
9388 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9389 #:python ,python-2))
9390 (native-inputs
9391 `(("python2-unittest2" ,python2-unittest2)))
9392 (home-page "https://github.com/jdunck/python-unicodecsv")
9393 (synopsis "Unicode CSV module for Python 2")
9394 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9395 module, adding support for Unicode strings.")
9396 (license license:bsd-2)))
9397
9398 (define-public python-rarfile
9399 (package
9400 (name "python-rarfile")
9401 (version "2.8")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "rarfile" version))
9405 (sha256
9406 (base32
9407 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9408 (build-system python-build-system)
9409 (arguments
9410 '(#:phases
9411 (modify-phases %standard-phases
9412 (replace 'check
9413 ;; Many tests fail, but the installation proceeds.
9414 (lambda _ (invoke "make" "-C" "test" "test"))))))
9415 (native-inputs
9416 `(("which" ,which))) ; required for tests
9417 (propagated-inputs
9418 `(("libarchive" ,libarchive)))
9419 (home-page "https://github.com/markokr/rarfile")
9420 (synopsis "RAR archive reader for Python")
9421 (description "This is Python module for RAR archive reading. The interface
9422 is made as zipfile like as possible.")
9423 (license license:isc)))
9424
9425 (define-public python2-rarfile
9426 (package-with-python2 python-rarfile))
9427
9428 (define-public python-magic
9429 (package
9430 (name "python-magic")
9431 (version "0.4.15")
9432 (source
9433 (origin
9434 (method url-fetch)
9435 (uri (pypi-uri "python-magic" version))
9436 (sha256
9437 (base32
9438 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9439 (file-name (string-append name "-" version "-checkout"))))
9440 (build-system python-build-system)
9441 (arguments
9442 ;; The tests are unreliable, so don't run them. The tests fail
9443 ;; under Python3 because they were written for Python2 and
9444 ;; contain import statements that do not work in Python3. One of
9445 ;; the tests fails under Python2 because its assertions are
9446 ;; overly stringent; it relies on comparing output strings which
9447 ;; are brittle and can change depending on the version of
9448 ;; libmagic being used and the system on which the test is
9449 ;; running. In my case, under GuixSD 0.10.0, only one test
9450 ;; failed, and it seems to have failed only because the version
9451 ;; of libmagic that is packaged in Guix outputs a slightly
9452 ;; different (but not wrong) string than the one that the test
9453 ;; expected.
9454 '(#:tests? #f
9455 #:phases (modify-phases %standard-phases
9456 ;; Replace a specific method call with a hard-coded
9457 ;; path to the necessary libmagic.so file in the
9458 ;; store. If we don't do this, then the method call
9459 ;; will fail to find the libmagic.so file, which in
9460 ;; turn will cause any application using
9461 ;; python-magic to fail.
9462 (add-before 'build 'hard-code-path-to-libmagic
9463 (lambda* (#:key inputs #:allow-other-keys)
9464 (let ((file (assoc-ref inputs "file")))
9465 (substitute* "magic.py"
9466 (("ctypes.util.find_library\\('magic'\\)")
9467 (string-append "'" file "/lib/libmagic.so'")))
9468 #t)))
9469 (add-before 'install 'disable-egg-compression
9470 (lambda _
9471 (let ((port (open-file "setup.cfg" "a")))
9472 (display "\n[easy_install]\nzip_ok = 0\n"
9473 port)
9474 (close-port port)
9475 #t))))))
9476 (inputs
9477 ;; python-magic needs to be able to find libmagic.so.
9478 `(("file" ,file)))
9479 (home-page
9480 "https://github.com/ahupp/python-magic")
9481 (synopsis
9482 "File type identification using libmagic")
9483 (description
9484 "This module uses ctypes to access the libmagic file type
9485 identification library. It makes use of the local magic database and
9486 supports both textual and MIME-type output. Note that this module and
9487 the python-file module both provide a \"magic.py\" file; these two
9488 modules, which are different and were developed separately, both serve
9489 the same purpose: to provide Python bindings for libmagic.")
9490 (license license:expat)))
9491
9492 (define-public python2-magic
9493 (package-with-python2 python-magic))
9494
9495 (define-public python2-s3cmd
9496 (package
9497 (name "python2-s3cmd")
9498 (version "1.6.1")
9499 (source
9500 (origin
9501 (method url-fetch)
9502 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9503 "s3cmd-" version ".tar.gz"))
9504 (sha256
9505 (base32
9506 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9507 (build-system python-build-system)
9508 (arguments
9509 ;; s3cmd is written for python2 only and contains no tests.
9510 `(#:python ,python-2
9511 #:tests? #f))
9512 (propagated-inputs
9513 `(("python2-dateutil" ,python2-dateutil)
9514 ;; The python-file package also provides a magic.py module.
9515 ;; This is an unfortunate state of affairs; however, s3cmd
9516 ;; fails to install if it cannot find specifically the
9517 ;; python-magic package. Thus we include it, instead of using
9518 ;; python-file. Ironically, s3cmd sometimes works better
9519 ;; without libmagic bindings at all:
9520 ;; https://github.com/s3tools/s3cmd/issues/198
9521 ("python2-magic" ,python2-magic)))
9522 (home-page "http://s3tools.org/s3cmd")
9523 (synopsis "Command line tool for S3-compatible storage services")
9524 (description
9525 "S3cmd is a command line tool for uploading, retrieving and managing data
9526 in storage services that are compatible with the Amazon Simple Storage
9527 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9528 GnuPG encryption, and more. It also supports management of Amazon's
9529 CloudFront content delivery network.")
9530 (license license:gpl2+)))
9531
9532 (define-public python-pkgconfig
9533 (package
9534 (name "python-pkgconfig")
9535 (version "1.3.1")
9536 (source
9537 (origin
9538 (method url-fetch)
9539 (uri (pypi-uri "pkgconfig" version))
9540 (sha256
9541 (base32
9542 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9543 (build-system python-build-system)
9544 (native-inputs
9545 `(("python-nose" ,python-nose)))
9546 (inputs
9547 `(("pkg-config" ,pkg-config)))
9548 (arguments
9549 `(#:phases
9550 (modify-phases %standard-phases
9551 (add-before 'build 'patch
9552 ;; Hard-code the path to pkg-config.
9553 (lambda _
9554 (substitute* "pkgconfig/pkgconfig.py"
9555 (("cmd = 'pkg-config")
9556 (string-append "cmd = '" (which "pkg-config"))))
9557 #t))
9558 (replace 'check
9559 (lambda _
9560 (invoke "nosetests" "test.py"))))))
9561 (home-page "https://github.com/matze/pkgconfig")
9562 (synopsis "Python interface for pkg-config")
9563 (description "This module provides a Python interface to pkg-config. It
9564 can be used to find all pkg-config packages, check if a package exists,
9565 check if a package meets certain version requirements, query CFLAGS and
9566 LDFLAGS and parse the output to build extensions with setup.py.")
9567 (license license:expat)))
9568
9569 (define-public python2-pkgconfig
9570 (package-with-python2 python-pkgconfig))
9571
9572 (define-public python-bz2file
9573 (package
9574 (name "python-bz2file")
9575 (version "0.98")
9576 (source
9577 (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "bz2file" version))
9580 (sha256
9581 (base32
9582 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9583 (build-system python-build-system)
9584 (arguments
9585 `(#:tests? #f)) ; Tests use deprecated python modules.
9586 (home-page "https://github.com/nvawda/bz2file")
9587 (synopsis "Read and write bzip2-compressed files")
9588 (description
9589 "Bz2file is a Python library for reading and writing bzip2-compressed
9590 files. It contains a drop-in replacement for the I/O interface in the
9591 standard library's @code{bz2} module, including features from the latest
9592 development version of CPython that are not available in older releases.")
9593 (license license:asl2.0)))
9594
9595 (define-public python2-bz2file
9596 (package-with-python2 python-bz2file))
9597
9598 (define-public python-future
9599 (package
9600 (name "python-future")
9601 (version "0.17.1")
9602 (source
9603 (origin
9604 (method url-fetch)
9605 (uri (pypi-uri "future" version))
9606 (sha256
9607 (base32
9608 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9609 (build-system python-build-system)
9610 ;; Many tests connect to the network or are otherwise flawed.
9611 ;; https://github.com/PythonCharmers/python-future/issues/210
9612 (arguments
9613 `(#:tests? #f))
9614 (home-page "http://python-future.org")
9615 (synopsis "Single-source support for Python 3 and 2")
9616 (description
9617 "@code{python-future} is the missing compatibility layer between Python 2 and
9618 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9619 to support both Python 2 and Python 3 with minimal overhead.")
9620 (license license:expat)))
9621
9622 (define-public python2-future
9623 (package-with-python2 python-future))
9624
9625 (define-public python-cysignals
9626 (package
9627 (name "python-cysignals")
9628 (version "1.9.0")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "cysignals" version))
9633 (sha256
9634 (base32
9635 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9636 (build-system python-build-system)
9637 (native-inputs
9638 `(("python-cython" ,python-cython)
9639 ("python-sphinx" ,python-sphinx)))
9640 (inputs
9641 `(("pari-gp" ,pari-gp)))
9642 (arguments
9643 `(#:modules ((guix build python-build-system)
9644 ((guix build gnu-build-system) #:prefix gnu:)
9645 (guix build utils))
9646 ;; FIXME: Tests are executed after installation and currently fail
9647 ;; when not installing into standard locations; the author is working
9648 ;; on a fix.
9649 #:tests? #f
9650 #:phases
9651 (modify-phases %standard-phases
9652 (add-before
9653 'build 'configure
9654 (assoc-ref gnu:%standard-phases 'configure)))))
9655 (home-page
9656 "https://github.com/sagemath/cysignals")
9657 (synopsis
9658 "Handling of interrupts and signals for Cython")
9659 (description
9660 "The cysignals package provides mechanisms to handle interrupts (and
9661 other signals and errors) in Cython code, using two related approaches,
9662 for mixed Cython/Python code or external C libraries and pure Cython code,
9663 respectively.")
9664 (license license:lgpl3+)))
9665
9666 (define-public python2-cysignals
9667 (package-with-python2 python-cysignals))
9668
9669 (define-public python2-shedskin
9670 (package
9671 (name "python2-shedskin")
9672 (version "0.9.4")
9673 (source
9674 (origin
9675 (method url-fetch)
9676 (uri (string-append "https://github.com/shedskin/shedskin/"
9677 "releases/download/v" version
9678 "/shedskin-" version ".tgz"))
9679 (sha256
9680 (base32
9681 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9682 (build-system python-build-system)
9683 (arguments
9684 `(#:python ,python-2
9685 #:phases (modify-phases %standard-phases
9686 (add-after 'unpack 'fix-resulting-include-libs
9687 (lambda* (#:key inputs #:allow-other-keys)
9688 (let ((libgc (assoc-ref inputs "libgc"))
9689 (pcre (assoc-ref inputs "pcre")))
9690 (substitute* "shedskin/makefile.py"
9691 (("variable == 'CCFLAGS':[ ]*")
9692 (string-append "variable == 'CCFLAGS':\n"
9693 " line += ' -I " pcre "/include"
9694 " -I " libgc "/include'"))
9695 (("variable == 'LFLAGS':[ ]*")
9696 (string-append "variable == 'LFLAGS':\n"
9697 " line += ' -L" pcre "/lib"
9698 " -L " libgc "/lib'")))
9699 #t))))))
9700 (inputs `(("pcre" ,pcre)
9701 ("libgc" ,libgc)))
9702 (home-page "https://shedskin.github.io/")
9703 (synopsis "Experimental Python-2 to C++ Compiler")
9704 (description (string-append "This is an experimental compiler for a subset of
9705 Python. It generates C++ code and a Makefile."))
9706 (license (list license:gpl3 license:bsd-3 license:expat))))
9707
9708 (define-public python2-rope
9709 (package
9710 (name "python2-rope")
9711 (version "0.11.0")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (pypi-uri "rope" version))
9716 (sha256
9717 (base32
9718 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9719 (arguments
9720 ;; Rope has only partial python3 support, see `python-rope'
9721 `(#:python ,python-2))
9722 (build-system python-build-system)
9723 (native-inputs
9724 `(("python2-unittest2" ,python2-unittest2)))
9725 (home-page "https://github.com/python-rope/rope")
9726 (synopsis "Refactoring library for Python")
9727 (description "Rope is a refactoring library for Python. It facilitates
9728 the renaming, moving and extracting of attributes, functions, modules, fields
9729 and parameters in Python 2 source code. These refactorings can also be applied
9730 to occurrences in strings and comments.")
9731 (license license:gpl2)))
9732
9733 (define-public python-rope
9734 (package
9735 (inherit python2-rope)
9736 (name "python-rope")
9737 (arguments `(#:python ,python-wrapper
9738 ;; XXX: Only partial python3 support, results in some failing
9739 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9740 #:tests? #f))
9741 (properties `((python2-variant . ,(delay python2-rope))))))
9742
9743 (define-public python-py3status
9744 (package
9745 (name "python-py3status")
9746 (version "3.16")
9747 (source
9748 (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "py3status" version))
9751 (sha256
9752 (base32
9753 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9754 (build-system python-build-system)
9755 (inputs
9756 `(("file" ,file)))
9757 (arguments
9758 '(#:phases
9759 (modify-phases %standard-phases
9760 ;; 'file' is used for detection of configuration file encoding
9761 ;; let's make link the dependency to particular input
9762 (add-before 'build 'patch-file-path
9763 (lambda* (#:key inputs #:allow-other-keys)
9764 (let ((file-path (assoc-ref inputs "file")))
9765 (substitute* "py3status/parse_config.py"
9766 (("\\['file', '-b'")
9767 (string-append "['" file-path "/bin/file', '-b'")))
9768 #t))))
9769 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9770 (home-page "https://github.com/ultrabug/py3status")
9771 (synopsis "Extensible i3status wrapper written in Python")
9772 (description "py3status is an i3status wrapper which extends i3status
9773 functionality in a modular way, allowing you to extend your panel with your
9774 own code, responding to click events and updating clock every second.")
9775 (license license:bsd-3)))
9776
9777 (define-public python-tblib
9778 (package
9779 (name "python-tblib")
9780 (version "1.3.2")
9781 (source (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "tblib" version))
9784 (sha256 (base32
9785 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9786 (build-system python-build-system)
9787 (arguments
9788 `(#:phases
9789 (modify-phases %standard-phases
9790 (add-before 'check 'adjust-tests
9791 (lambda _
9792 (when (which "python3")
9793 ;; Adjust the example output to match that of Python 3.7:
9794 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9795 (substitute* "README.rst"
9796 (("Exception\\('fail',") "Exception('fail'"))
9797 #t)))
9798 (replace 'check
9799 (lambda _
9800 ;; Upstream runs tests after installation and the package itself
9801 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9802 ;; found.
9803 (setenv "PYTHONPATH"
9804 (string-append (getcwd) "/build/lib:"
9805 (getenv "PYTHONPATH")))
9806 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9807 (native-inputs
9808 `(("python-pytest" ,python-pytest)
9809 ("python-six" ,python-six)))
9810 (home-page "https://github.com/ionelmc/python-tblib")
9811 (synopsis "Traceback serialization library")
9812 (description
9813 "Traceback serialization allows you to:
9814
9815 @enumerate
9816 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9817 different processes. This allows better error handling when running code over
9818 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9819
9820 @item Parse traceback strings and raise with the parsed tracebacks.
9821 @end enumerate\n")
9822 (license license:bsd-3)))
9823
9824 (define-public python2-tblib
9825 (package-with-python2 python-tblib))
9826
9827 (define-public python-greenlet
9828 (package
9829 (name "python-greenlet")
9830 (version "0.4.15")
9831 (source (origin
9832 (method url-fetch)
9833 (uri (pypi-uri "greenlet" version))
9834 (sha256
9835 (base32
9836 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9837 (build-system python-build-system)
9838 (home-page "https://greenlet.readthedocs.io/")
9839 (synopsis "Lightweight in-process concurrent programming")
9840 (description
9841 "Greenlet package is a spin-off of Stackless, a version of CPython
9842 that supports micro-threads called \"tasklets\". Tasklets run
9843 pseudo-concurrently (typically in a single or a few OS-level threads) and
9844 are synchronized with data exchanges on \"channels\".")
9845 (license (list license:psfl license:expat))))
9846
9847 (define-public python2-greenlet
9848 (package-with-python2 python-greenlet))
9849
9850 (define-public python-objgraph
9851 (package
9852 (name "python-objgraph")
9853 (version "3.4.0")
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "objgraph" version))
9858 (sha256
9859 (base32
9860 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9861 (build-system python-build-system)
9862 (propagated-inputs
9863 `(("python-graphviz" ,python-graphviz)))
9864 (native-inputs
9865 `(("python-mock" ,python-mock)
9866 ("graphviz" ,graphviz)))
9867 (home-page "https://mg.pov.lt/objgraph/")
9868 (synopsis "Draw Python object reference graphs with graphviz")
9869 (description
9870 "This package provides tools to draw Python object reference graphs with
9871 graphviz.")
9872 (license license:expat)))
9873
9874 (define-public python-gevent
9875 (package
9876 (name "python-gevent")
9877 (version "1.3.7")
9878 (source (origin
9879 (method url-fetch)
9880 (uri (pypi-uri "gevent" version))
9881 (sha256
9882 (base32
9883 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9884 (modules '((guix build utils)))
9885 (snippet
9886 '(begin
9887 ;; unbunding libev and c-ares
9888 (delete-file-recursively "deps")
9889 #t))))
9890 (build-system python-build-system)
9891 (arguments
9892 `(#:modules ((ice-9 ftw)
9893 (ice-9 match)
9894 (srfi srfi-26)
9895 (guix build utils)
9896 (guix build python-build-system))
9897 #:phases (modify-phases %standard-phases
9898 (add-after 'unpack 'unpack-libev
9899 (lambda* (#:key inputs #:allow-other-keys)
9900 (mkdir-p "deps/libev")
9901 ;; FIXME: gevent requires building libev, even though
9902 ;; it only links against the proper one.
9903 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9904 "--strip-components=1" "-C" "deps/libev")))
9905 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9906 (lambda _
9907 (substitute* "src/gevent/subprocess.py"
9908 (("/bin/sh") (which "sh")))
9909 (for-each (lambda (file)
9910 (substitute* file
9911 (("/bin/sh") (which "sh"))
9912 (("/bin/true") (which "true"))))
9913 (find-files "src/greentest" "\\.py$"))
9914 #t))
9915 (add-before 'build 'do-not-use-bundled-sources
9916 (lambda* (#:key inputs #:allow-other-keys)
9917 (setenv "CONFIG_SHELL" (which "bash"))
9918 (setenv "LIBEV_EMBED" "false")
9919 (setenv "CARES_EMBED" "false")
9920 (setenv "EMBED" "false")
9921
9922 (let ((greenlet (string-append
9923 (assoc-ref inputs "python-greenlet")
9924 "/include")))
9925 (match (scandir greenlet
9926 (lambda (item)
9927 (string-prefix? "python" item)))
9928 ((python)
9929 (setenv "CPATH"
9930 (string-append greenlet "/" python)))))
9931 #t))
9932 (add-before 'check 'skip-timer-test
9933 (lambda _
9934 ;; XXX: Skip 'TestTimerResolution', which appears to be
9935 ;; unreliable.
9936 (substitute* "src/greentest/test__core_timer.py"
9937 (("not greentest.RUNNING_ON_CI") "False"))
9938 #t))
9939 (replace 'check
9940 (lambda _
9941 ;; Make sure the build directory is on PYTHONPATH.
9942 (setenv "PYTHONPATH"
9943 (string-append
9944 (getenv "PYTHONPATH") ":"
9945 (getcwd) "/build/"
9946 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9947 (with-directory-excursion "src/greentest"
9948 ;; XXX: Many tests require network access. Instead we only
9949 ;; run known-good tests. Unfortunately we cannot use
9950 ;; recursion here since this directory also contains
9951 ;; Python-version-specific subfolders.
9952 (apply invoke "python" "testrunner.py" "--config"
9953 "known_failures.py"
9954 (scandir "." (cut regexp-exec
9955 (make-regexp "test_+(subprocess|core)")
9956 <>)))))))))
9957 (propagated-inputs
9958 `(("python-greenlet" ,python-greenlet)
9959 ("python-objgraph" ,python-objgraph)))
9960 (native-inputs
9961 `(("libev-source" ,(package-source libev))
9962 ("python-six" ,python-six)))
9963 (inputs
9964 `(("c-ares" ,c-ares)
9965 ("libev" ,libev)))
9966 (home-page "http://www.gevent.org/")
9967 (synopsis "Coroutine-based network library")
9968 (description
9969 "gevent is a coroutine-based Python networking library that uses greenlet
9970 to provide a high-level synchronous API on top of the libev event loop.")
9971 (license license:expat)
9972 (properties `((python2-variant . ,(delay python2-gevent))))))
9973
9974 (define-public python2-gevent
9975 (let ((base (package-with-python2
9976 (strip-python2-variant python-gevent))))
9977 (package
9978 (inherit base)
9979 (native-inputs `(,@(package-native-inputs python-gevent)
9980 ("python-mock" ,python2-mock))))))
9981
9982 (define-public python-fastimport
9983 (package
9984 (name "python-fastimport")
9985 (version "0.9.6")
9986 (source
9987 (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "fastimport" version))
9990 (sha256
9991 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9992 (build-system python-build-system)
9993 (home-page "https://github.com/jelmer/python-fastimport")
9994 (synopsis "VCS fastimport parser and generator in Python")
9995 (description "This package provides a parser for and generator of the Git
9996 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9997 format.")
9998 (license license:gpl2+)))
9999
10000 (define-public python2-fastimport
10001 (package-with-python2 python-fastimport))
10002
10003 (define-public python-twisted
10004 (package
10005 (name "python-twisted")
10006 (version "19.7.0")
10007 (source (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10010 (sha256
10011 (base32
10012 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10013 (build-system python-build-system)
10014 (arguments
10015 '(#:tests? #f)) ; FIXME: some tests fail
10016 (propagated-inputs
10017 `(("python-zope-interface" ,python-zope-interface)
10018 ("python-pyhamcrest" ,python-pyhamcrest)
10019 ("python-incremental" ,python-incremental)
10020 ("python-hyperlink" ,python-hyperlink)
10021 ("python-constantly" ,python-constantly)
10022 ("python-automat" ,python-automat)))
10023 (home-page "https://twistedmatrix.com/")
10024 (synopsis "Asynchronous networking framework written in Python")
10025 (description
10026 "Twisted is an extensible framework for Python programming, with special
10027 focus on event-based network programming and multiprotocol integration.")
10028 (license license:expat)))
10029
10030 (define-public python2-twisted
10031 (package-with-python2 python-twisted))
10032
10033 (define-public python-pika
10034 (package
10035 (name "python-pika")
10036 (version "0.12.0")
10037 (source
10038 (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "pika" version))
10041 (sha256
10042 (base32
10043 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10044 (build-system python-build-system)
10045 (native-inputs
10046 `(("python-pyev" ,python-pyev)
10047 ("python-tornado" ,python-tornado)
10048 ("python-twisted" ,python-twisted)))
10049 (home-page "https://pika.readthedocs.org")
10050 (synopsis "Pure Python AMQP Client Library")
10051 (description
10052 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10053 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10054 network support library.")
10055 (license license:bsd-3)))
10056
10057 (define-public python2-pika
10058 (package-with-python2 python-pika))
10059
10060 (define-public python-ply
10061 (package
10062 (name "python-ply")
10063 (version "3.10")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "ply" version))
10068 (sha256
10069 (base32
10070 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10071 (build-system python-build-system)
10072 (home-page "http://www.dabeaz.com/ply/")
10073 (synopsis "Python Lex & Yacc")
10074 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10075 It uses LR parsing and does extensive error checking.")
10076 (license license:bsd-3)))
10077
10078 (define-public python2-ply
10079 (package-with-python2 python-ply))
10080
10081 (define-public python-tabulate
10082 (package
10083 (name "python-tabulate")
10084 (version "0.7.7")
10085 (source (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "tabulate" version))
10088 (sha256
10089 (base32
10090 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10091 (build-system python-build-system)
10092 (arguments
10093 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10094 ;; and the latest release is not tagged in the upstream repository.
10095 '(#:tests? #f))
10096 (home-page "https://bitbucket.org/astanin/python-tabulate")
10097 (synopsis "Pretty-print tabular data")
10098 (description
10099 "Tabulate is a library and command-line utility to pretty-print tabular
10100 data in Python.")
10101 (license license:expat)))
10102
10103 (define-public python2-tabulate
10104 (package-with-python2 python-tabulate))
10105
10106 (define-public python-kazoo
10107 (package
10108 (name "python-kazoo")
10109 (version "2.4.0")
10110 (source
10111 (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "kazoo" version))
10114 (sha256
10115 (base32
10116 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10117 (build-system python-build-system)
10118 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10119 (propagated-inputs
10120 `(("python-six" ,python-six)))
10121 (home-page "https://kazoo.readthedocs.org")
10122 (synopsis "High-level Zookeeper client library")
10123 (description
10124 "Kazoo is a Python client library for the Apache Zookeeper distributed
10125 application service. It is designed to be easy to use and to avoid common
10126 programming errors.")
10127 (license license:asl2.0)))
10128
10129 (define-public python2-kazoo
10130 (package-with-python2 python-kazoo))
10131
10132 (define-public python-pykafka
10133 (package
10134 (name "python-pykafka")
10135 (version "2.4.0")
10136 (source (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "pykafka" version))
10139 (sha256
10140 (base32
10141 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10142 (build-system python-build-system)
10143 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10144 (propagated-inputs
10145 `(("python-gevent" ,python-gevent)
10146 ("python-kazoo" ,python-kazoo)
10147 ("python-tabulate" ,python-tabulate)))
10148 (inputs
10149 `(("librdkafka" ,librdkafka)))
10150 (home-page "https://pykafka.readthedocs.io/")
10151 (synopsis "Apache Kafka client for Python")
10152 (description
10153 "PyKafka is a client for the Apache Kafka distributed messaging system.
10154 It includes Python implementations of Kafka producers and consumers, which
10155 are optionally backed by a C extension built on librdkafka.")
10156 (license license:asl2.0)))
10157
10158 (define-public python2-pykafka
10159 (package-with-python2 python-pykafka))
10160
10161 (define-public python-wcwidth
10162 (package
10163 (name "python-wcwidth")
10164 (version "0.1.7")
10165 (source
10166 (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "wcwidth" version))
10169 (sha256
10170 (base32
10171 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10172 (build-system python-build-system)
10173 (home-page "https://github.com/jquast/wcwidth")
10174 (synopsis "Measure number of terminal column cells of wide-character codes")
10175 (description "Wcwidth measures the number of terminal column cells of
10176 wide-character codes. It is useful for those implementing a terminal emulator,
10177 or programs that carefully produce output to be interpreted by one. It is a
10178 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10179 specified in POSIX.1-2001 and POSIX.1-2008.")
10180 (license license:expat)))
10181
10182 (define-public python2-wcwidth
10183 (package-with-python2 python-wcwidth))
10184
10185 (define-public python2-jsonrpclib
10186 (package
10187 (name "python2-jsonrpclib")
10188 (version "0.1.7")
10189 (source (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "jsonrpclib" version))
10192 (sha256
10193 (base32
10194 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10195 (build-system python-build-system)
10196 (arguments
10197 `(#:tests? #f
10198 #:python ,python-2))
10199 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10200 (synopsis "Implementation of JSON-RPC specification for Python")
10201 (description
10202 "This library is an implementation of the JSON-RPC specification.
10203 It supports both the original 1.0 specification, as well as the
10204 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10205 etc.")
10206 (license license:asl2.0)))
10207
10208 (define-public python-chai
10209 (package
10210 (name "python-chai")
10211 (version "1.1.2")
10212 (source (origin
10213 (method url-fetch)
10214 (uri (pypi-uri "chai" version))
10215 (sha256
10216 (base32
10217 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10218 (build-system python-build-system)
10219 (home-page "https://github.com/agoragames/chai")
10220 (synopsis "Mocking framework for Python")
10221 (description
10222 "Chai provides an api for mocking, stubbing and spying your python
10223 objects, patterned after the Mocha library for Ruby.")
10224 (license license:bsd-3)))
10225
10226 (define-public python2-chai
10227 (package-with-python2 python-chai))
10228
10229 (define-public python-inflection
10230 (package
10231 (name "python-inflection")
10232 (version "0.3.1")
10233 (source
10234 (origin (method url-fetch)
10235 (uri (pypi-uri "inflection" version))
10236 (sha256
10237 (base32
10238 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10239 (build-system python-build-system)
10240 (native-inputs
10241 `(("python-pytest" ,python-pytest)))
10242 (home-page "https://github.com/jpvanhal/inflection")
10243 (synopsis "Python string transformation library")
10244 (description
10245 "Inflection is a string transformation library. It singularizes
10246 and pluralizes English words, and transforms strings from CamelCase to
10247 underscored string.")
10248 (license license:expat)))
10249
10250 (define-public python2-inflection
10251 (package-with-python2 python-inflection))
10252
10253 (define-public python-pylev
10254 (package
10255 (name "python-pylev")
10256 (version "1.3.0")
10257 (source (origin
10258 (method url-fetch)
10259 (uri (pypi-uri "pylev" version))
10260 (sha256
10261 (base32
10262 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10263 (build-system python-build-system)
10264 (home-page "https://github.com/toastdriven/pylev")
10265 (synopsis "Levenshtein distance implementation in Python")
10266 (description "Pure Python Levenshtein implementation, based off the
10267 Wikipedia code samples at
10268 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10269 (license license:bsd-3)))
10270
10271 (define-public python2-pylev
10272 (package-with-python2 python-pylev))
10273
10274 (define-public python-cleo
10275 (package
10276 (name "python-cleo")
10277 (version "0.6.1")
10278 (source (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "cleo" version))
10281 (sha256
10282 (base32
10283 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10284 (build-system python-build-system)
10285 (native-inputs
10286 `(;; For testing
10287 ("python-mock" ,python-mock)
10288 ("python-pytest-mock" ,python-pytest-mock)
10289 ("python-pytest" ,python-pytest)))
10290 (propagated-inputs
10291 `(("python-backpack" ,python-backpack)
10292 ("python-pastel" ,python-pastel)
10293 ("python-pylev" ,python-pylev)))
10294 (home-page "https://github.com/sdispater/cleo")
10295 (synopsis "Command-line arguments library for Python")
10296 (description
10297 "Cleo allows you to create command-line commands with signature in
10298 docstring and colored output.")
10299 (license license:expat)))
10300
10301 (define-public python2-cleo
10302 (package-with-python2 python-cleo))
10303
10304 (define-public python-lazy-object-proxy
10305 (package
10306 (name "python-lazy-object-proxy")
10307 (version "1.3.1")
10308 (source (origin
10309 (method url-fetch)
10310 (uri (pypi-uri "lazy-object-proxy" version))
10311 (sha256
10312 (base32
10313 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10314 (build-system python-build-system)
10315 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10316 (synopsis "Lazy object proxy for python")
10317 (description
10318 "Lazy object proxy is an object that wraps a callable but defers the call
10319 until the object is actually required, and caches the result of said call.")
10320 (license license:bsd-2)))
10321
10322 (define-public python2-lazy-object-proxy
10323 (package-with-python2 python-lazy-object-proxy))
10324
10325 (define-public python-dnspython
10326 (package
10327 (name "python-dnspython")
10328 (version "1.15.0")
10329 (source (origin
10330 (method url-fetch)
10331 (uri (string-append "http://www.dnspython.org/kits/"
10332 version "/dnspython-" version ".tar.gz"))
10333 (sha256
10334 (base32
10335 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10336 (build-system python-build-system)
10337 (arguments '(#:tests? #f)) ; XXX: requires internet access
10338 (home-page "http://www.dnspython.org")
10339 (synopsis "DNS toolkit for Python")
10340 (description
10341 "dnspython is a DNS toolkit for Python. It supports almost all record
10342 types. It can be used for queries, zone transfers, and dynamic updates.
10343 It supports TSIG authenticated messages and EDNS0.")
10344 (license license:expat)))
10345
10346 (define-public python2-dnspython
10347 (package-with-python2 python-dnspython))
10348
10349 (define-public python-email-validator
10350 (package
10351 (name "python-email-validator")
10352 (version "1.0.2")
10353 (source
10354 (origin (method url-fetch)
10355 (uri (pypi-uri "email_validator" version))
10356 (sha256
10357 (base32
10358 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10359 (build-system python-build-system)
10360 (arguments
10361 '(#:phases
10362 (modify-phases %standard-phases
10363 (add-before 'build 'use-dnspython
10364 (lambda _
10365 (substitute* "setup.py"
10366 (("dnspython3") "dnspython"))
10367 #t)))))
10368 (propagated-inputs
10369 `(("python-dnspython" ,python-dnspython)
10370 ("python-idna" ,python-idna)))
10371 (home-page "https://github.com/JoshData/python-email-validator")
10372 (synopsis "Email address validation library for Python")
10373 (description
10374 "This library validates email address syntax and deliverability.")
10375 (license license:cc0)))
10376
10377 (define-public python2-email-validator
10378 (package-with-python2 python-email-validator))
10379
10380 (define-public python-ukpostcodeparser
10381 (package
10382 (name "python-ukpostcodeparser")
10383 (version "1.0.3")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "UkPostcodeParser" version))
10387 (sha256
10388 (base32
10389 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10390 (build-system python-build-system)
10391 (home-page "https://github.com/hamstah/ukpostcodeparser")
10392 (synopsis "UK Postcode parser for Python")
10393 (description
10394 "This library provides the @code{parse_uk_postcode} function for
10395 parsing UK postcodes.")
10396 (license license:expat)))
10397
10398 (define-public python2-ukpostcodeparser
10399 (package-with-python2 python-ukpostcodeparser))
10400
10401 (define-public python-faker
10402 (package
10403 (name "python-faker")
10404 (version "0.7.9")
10405 (source (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "Faker" version))
10408 (sha256
10409 (base32
10410 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10411 (patches
10412 (search-patches "python-faker-fix-build-32bit.patch"))
10413 (modules '((guix build utils)))
10414 (snippet
10415 '(begin
10416 (for-each delete-file (find-files "." "\\.pyc$"))
10417 #t))))
10418 (build-system python-build-system)
10419 (arguments
10420 '(#:phases
10421 (modify-phases %standard-phases
10422 (replace 'check
10423 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10424 (native-inputs
10425 `(;; For testing
10426 ("python-email-validator" ,python-email-validator)
10427 ("python-mock" ,python-mock)
10428 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10429 (propagated-inputs
10430 `(("python-dateutil" ,python-dateutil)
10431 ("python-six" ,python-six)))
10432 (home-page "https://github.com/joke2k/faker")
10433 (synopsis "Python package that generates fake data")
10434 (description
10435 "Faker is a Python package that generates fake data such as names,
10436 addresses, and phone numbers.")
10437 (license license:expat)
10438 (properties `((python2-variant . ,(delay python2-faker))))))
10439
10440 (define-public python2-faker
10441 (let ((base (package-with-python2 (strip-python2-variant
10442 python-faker))))
10443 (package
10444 (inherit base)
10445 (propagated-inputs
10446 `(("python2-ipaddress" ,python2-ipaddress)
10447 ,@(package-propagated-inputs base))))))
10448
10449 (define-public python-pyaml
10450 (package
10451 (name "python-pyaml")
10452 (version "18.11.0")
10453 (source (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "pyaml" version))
10456 (sha256
10457 (base32
10458 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10459 (build-system python-build-system)
10460 (native-inputs
10461 `(("python-unidecode" ,python-unidecode)))
10462 (propagated-inputs
10463 `(("python-pyyaml" ,python-pyyaml)))
10464 (home-page "https://github.com/mk-fg/pretty-yaml")
10465 (synopsis "YAML pretty-print library for Python")
10466 (description
10467 "pyaml is a PyYAML based python module to produce pretty and readable
10468 YAML-serialized data.")
10469 (license license:wtfpl2)))
10470
10471 (define-public python2-pyaml
10472 (package-with-python2 python-pyaml))
10473
10474 (define-public python-backpack
10475 (package
10476 (name "python-backpack")
10477 (version "0.1")
10478 (source
10479 (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "backpack" version))
10482 (sha256
10483 (base32
10484 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10485 (build-system python-build-system)
10486 (native-inputs
10487 `(("python-pytest" ,python-pytest)
10488 ("python-nose" ,python-nose)))
10489 (propagated-inputs
10490 `(("python-simplejson" ,python-simplejson)))
10491 (home-page "https://github.com/sdispater/backpack")
10492 (synopsis "Utilities for working with Python collections")
10493 (description "Backpack provides some useful utilities for working with
10494 collections of data.")
10495 (license license:expat)))
10496
10497 (define-public python2-backpack
10498 (package-with-python2 python-backpack))
10499
10500 (define-public python-prompt-toolkit
10501 (package
10502 (name "python-prompt-toolkit")
10503 (version "2.0.7")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10508 (sha256
10509 (base32
10510 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10511 (build-system python-build-system)
10512 (arguments
10513 `(#:phases
10514 (modify-phases %standard-phases
10515 (delete 'check)
10516 (add-after 'install 'post-install-check
10517 (lambda* (#:key inputs outputs #:allow-other-keys)
10518 ;; HOME is needed for the test
10519 ;; "test_pathcompleter_can_expanduser".
10520 (setenv "HOME" "/tmp")
10521 (add-installed-pythonpath inputs outputs)
10522 (invoke "py.test"))))))
10523 (propagated-inputs
10524 `(("python-wcwidth" ,python-wcwidth)
10525 ("python-six" ,python-six)
10526 ("python-pygments" ,python-pygments)))
10527 (native-inputs
10528 `(("python-pytest" ,python-pytest)))
10529 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10530 (synopsis "Library for building command line interfaces in Python")
10531 (description
10532 "Prompt-Toolkit is a library for building interactive command line
10533 interfaces in Python. It's like GNU Readline but it also features syntax
10534 highlighting while typing, out-of-the-box multi-line input editing, advanced
10535 code completion, incremental search, support for Chinese double-width
10536 characters, mouse support, and auto suggestions.")
10537 (license license:bsd-3)))
10538
10539 (define-public python2-prompt-toolkit
10540 (package-with-python2 python-prompt-toolkit))
10541
10542 (define-public python-prompt-toolkit-1
10543 (package (inherit python-prompt-toolkit)
10544 (version "1.0.15")
10545 (source
10546 (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10549 (sha256
10550 (base32
10551 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10552
10553 (define-public python2-prompt-toolkit-1
10554 (package-with-python2 python-prompt-toolkit-1))
10555
10556 (define-public python-jedi
10557 (package
10558 (name "python-jedi")
10559 (version "0.15.1")
10560 (source
10561 (origin
10562 (method url-fetch)
10563 (uri (pypi-uri "jedi" version))
10564 (sha256
10565 (base32
10566 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10567 (build-system python-build-system)
10568 (arguments
10569 `(#:phases
10570 (modify-phases %standard-phases
10571 (add-after 'unpack 'disable-file-completion-test
10572 ;; A single parameterized test currently fail (see:
10573 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10574 (lambda _
10575 (substitute* "test/test_api/test_completion.py"
10576 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10577 #t))
10578 (replace 'check
10579 (lambda _
10580 (setenv "HOME" "/tmp")
10581 (invoke "python" "-m" "pytest"))))))
10582 (native-inputs
10583 `(("python-pytest" ,python-pytest)
10584 ("python-docopt" ,python-docopt)))
10585 (propagated-inputs
10586 `(("python-parso" ,python-parso)))
10587 (home-page "https://github.com/davidhalter/jedi")
10588 (synopsis "Autocompletion and static analysis library for Python")
10589 (description
10590 "Jedi is a static analysis tool for Python that can be used in Integrated
10591 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10592 on a deeper level than many other static analysis frameworks for Python.
10593
10594 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10595 well.")
10596 (license license:expat)))
10597
10598 (define-public python2-jedi
10599 (package-with-python2 python-jedi))
10600
10601 (define-public ptpython
10602 (package
10603 (name "ptpython")
10604 (version "0.34")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "ptpython" version))
10608 (sha256
10609 (base32
10610 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10611 (build-system python-build-system)
10612 (arguments
10613 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10614 (propagated-inputs
10615 `(("python-docopt" ,python-docopt)
10616 ("python-jedi" ,python-jedi)
10617 ("python-prompt-toolkit" ,python-prompt-toolkit)
10618 ("python-pygments" ,python-pygments)))
10619 (home-page "https://github.com/jonathanslenders/ptpython")
10620 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10621 (description
10622 "ptpython is a Python read-eval-print loop with IDE-like features.
10623 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10624 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10625 etc.")
10626 (license license:bsd-3)
10627 (properties `((python2-variant . ,(delay ptpython-2))))))
10628
10629 (define-public ptpython-2
10630 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10631 (package
10632 (inherit base)
10633 (name "ptpython2"))))
10634
10635 (define-public python-stem
10636 (package
10637 (name "python-stem")
10638 (version "1.7.1")
10639 (source
10640 (origin
10641 (method url-fetch)
10642 (uri (pypi-uri "stem" version))
10643 (sha256
10644 (base32
10645 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10646 (build-system python-build-system)
10647 (arguments
10648 `(#:phases
10649 (modify-phases %standard-phases
10650 (replace 'check
10651 (lambda _
10652 (invoke "./run_tests.py" "--unit")
10653 #t)))))
10654 (native-inputs
10655 `(("python-mock" ,python-mock)
10656 ("python-pycodestyle" ,python-pycodestyle)
10657 ("python-pyflakes" ,python-pyflakes)))
10658 (home-page "https://stem.torproject.org/")
10659 (synopsis
10660 "Python controller library that allows applications to interact with Tor")
10661 (description
10662 "Stem is a Python controller library for Tor. With it you can use Tor's
10663 control protocol to script against the Tor process and read descriptor data
10664 relays publish about themselves.")
10665 (license license:lgpl3)))
10666
10667 (define-public python2-stem
10668 (package-with-python2 python-stem))
10669
10670 (define-public python-pyserial
10671 (package
10672 (name "python-pyserial")
10673 (version "3.1.1")
10674 (source
10675 (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "pyserial" version))
10678 (sha256
10679 (base32
10680 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10681 (build-system python-build-system)
10682 (arguments
10683 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10684 ;; #:phases
10685 ;; (modify-phases %standard-phases
10686 ;; (replace 'check
10687 ;; (lambda _
10688 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10689 (home-page
10690 "https://github.com/pyserial/pyserial")
10691 (synopsis "Python Serial Port Bindings")
10692 (description "@code{pyserial} provide serial port bindings for Python. It
10693 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10694 and/or Xon/Xoff. The port is accessed in RAW mode.")
10695 (license license:bsd-3)))
10696
10697 (define-public python2-pyserial
10698 (package-with-python2 python-pyserial))
10699
10700 (define-public python-kivy
10701 (package
10702 (name "python-kivy")
10703 (version "1.10.1")
10704 (source
10705 (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "Kivy" version))
10708 (file-name (string-append name "-" version ".tar.gz"))
10709 (sha256
10710 (base32
10711 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10712 (build-system python-build-system)
10713 (arguments
10714 `(#:tests? #f ; Tests require many optional packages
10715 #:phases
10716 (modify-phases %standard-phases
10717 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10718 (lambda* (#:key inputs #:allow-other-keys)
10719 (setenv "KIVY_SDL2_PATH"
10720 (string-append (assoc-ref inputs "sdl-union")
10721 "/include/SDL2"))
10722 #t)))))
10723 (native-inputs
10724 `(("git" ,git)
10725 ("pkg-config" ,pkg-config)
10726 ("python-cython" ,python-cython)))
10727 (inputs
10728 `(("gstreamer" ,gstreamer)
10729 ("mesa" ,mesa)
10730 ("sdl-union"
10731 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10732 (home-page "http://kivy.org")
10733 (synopsis
10734 "Multitouch application framework")
10735 (description
10736 "A software library for rapid development of
10737 hardware-accelerated multitouch applications.")
10738 (license license:expat)))
10739
10740 (define-public python2-kivy
10741 (package-with-python2 python-kivy))
10742
10743 (define-public python-kivy-next
10744 (deprecated-package "python-kivy-next" python-kivy))
10745
10746 (define-public python2-kivy-next
10747 (deprecated-package "python2-kivy-next" python2-kivy))
10748
10749 (define-public python-binaryornot
10750 (package
10751 (name "python-binaryornot")
10752 (version "0.4.4")
10753 (source (origin
10754 (method url-fetch)
10755 (uri (pypi-uri "binaryornot" version))
10756 (sha256
10757 (base32
10758 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10759 (build-system python-build-system)
10760 (propagated-inputs
10761 `(("python-chardet" ,python-chardet)
10762 ("python-hypothesis" ,python-hypothesis)))
10763 (home-page "https://github.com/audreyr/binaryornot")
10764 (synopsis "Package to check if a file is binary or text")
10765 (description "Ultra-lightweight pure Python package to check if a file is
10766 binary or text.")
10767 (license license:bsd-3)
10768 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10769
10770 (define-public python2-binaryornot
10771 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10772 (package (inherit base)
10773 (propagated-inputs
10774 `(("python2-enum34" ,python2-enum34)
10775 ,@(package-propagated-inputs base))))))
10776
10777 (define-public python-nltk
10778 (package
10779 (name "python-nltk")
10780 (version "3.2.1")
10781 (source (origin
10782 (method url-fetch)
10783 (uri (pypi-uri "nltk" version))
10784 (sha256
10785 (base32
10786 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10787 (build-system python-build-system)
10788 (arguments
10789 '(;; The tests require some extra resources to be downloaded.
10790 ;; TODO Try packaging these resources.
10791 #:tests? #f))
10792 (home-page "http://nltk.org/")
10793 (synopsis "Natural Language Toolkit")
10794 (description "It provides interfaces to over 50 corpora and lexical
10795 resources such as WordNet, along with a suite of text processing libraries
10796 for classification, tokenization, stemming, tagging, parsing, and semantic
10797 reasoning, wrappers for natural language processing libraries.")
10798 (license license:asl2.0)))
10799
10800 (define-public python2-nltk
10801 (package-with-python2 python-nltk))
10802
10803 (define-public python-pymongo
10804 (package
10805 (name "python-pymongo")
10806 (version "3.7.2")
10807 (source (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "pymongo" version))
10810 (sha256
10811 (base32
10812 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10813 (build-system python-build-system)
10814 (propagated-inputs
10815 `(("python-certifi" ,python-certifi)))
10816 (home-page "https://github.com/mongodb/mongo-python-driver")
10817 (synopsis "Python driver for MongoDB")
10818 (description "Python driver for MongoDB.")
10819 (license license:asl2.0)))
10820
10821 (define-public python2-pymongo
10822 (package-with-python2 python-pymongo))
10823
10824 (define-public python-consul
10825 (package
10826 (name "python-consul")
10827 (version "0.6.1")
10828 (source
10829 (origin
10830 (method url-fetch)
10831 (uri (pypi-uri "python-consul" version))
10832 (sha256
10833 (base32
10834 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10835 (build-system python-build-system)
10836 (arguments
10837 '(#:tests? #f)) ; The tests are not distributed
10838 (propagated-inputs
10839 `(("python-requests" ,python-requests)
10840 ("python-six" ,python-six)))
10841 (home-page "https://github.com/cablehead/python-consul")
10842 (synopsis "Python client for Consul")
10843 (description
10844 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10845 discovery, monitoring and configuration.")
10846 (license license:expat)))
10847
10848 (define-public python2-consul
10849 (package-with-python2 python-consul))
10850
10851 (define-public python-schematics
10852 (package
10853 (name "python-schematics")
10854 (version "1.1.1")
10855 (source
10856 (origin
10857 (method git-fetch)
10858 (uri (git-reference
10859 (url "https://github.com/schematics/schematics.git")
10860 (commit (string-append "v" version))))
10861 (file-name (git-file-name name version))
10862 (sha256
10863 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10864 (build-system python-build-system)
10865 (propagated-inputs
10866 `(("python-six" ,python-six)))
10867 (arguments
10868 ;; The tests require a bunch of not very nice packages with fixed
10869 ;; version requirements (e.g. python-coveralls).
10870 `(#:tests? #f))
10871 (home-page "https://github.com/schematics/schematics")
10872 (synopsis "Python Data Structures for Humans")
10873 (description "Python Data Structures for Humans.")
10874 (license license:bsd-3)))
10875
10876 (define-public python2-schematics
10877 (package-with-python2 python-schematics))
10878
10879 (define-public python-odfpy
10880 (package
10881 (name "python-odfpy")
10882 (version "1.3.3")
10883 (source (origin
10884 (method url-fetch)
10885 (uri (pypi-uri "odfpy" version))
10886 (sha256
10887 (base32
10888 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10889 (arguments
10890 `(#:modules ((srfi srfi-1)
10891 (guix build python-build-system)
10892 (guix build utils))
10893 #:phases
10894 (modify-phases %standard-phases
10895 (replace 'check
10896 ;; The test runner invokes python2 and python3 for test*.py.
10897 ;; To avoid having both in inputs, we replicate it here.
10898 (lambda _
10899 (for-each (lambda (test-file) (invoke "python" test-file))
10900 (find-files "tests" "^test.*\\.py$"))
10901 #t)))))
10902 (build-system python-build-system)
10903 (home-page "https://github.com/eea/odfpy")
10904 (synopsis "Python API and tools to manipulate OpenDocument files")
10905 (description "Collection of libraries and utility programs written in
10906 Python to manipulate OpenDocument 1.2 files.")
10907 (license
10908 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10909 ;; number of files with other licenses.
10910 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10911
10912 (define-public python2-odfpy
10913 (package-with-python2 python-odfpy))
10914
10915 (define-public python-natsort
10916 (package
10917 (name "python-natsort")
10918 (version "5.4.1")
10919 (source (origin
10920 (method url-fetch)
10921 (uri (pypi-uri "natsort" version))
10922 (sha256
10923 (base32
10924 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10925 (build-system python-build-system)
10926 (arguments
10927 `(#:modules ((guix build utils)
10928 (guix build python-build-system)
10929 (srfi srfi-1)
10930 (srfi srfi-26)
10931 (ice-9 ftw))
10932 #:phases
10933 (modify-phases %standard-phases
10934 (add-before 'check 'set-cachedir
10935 ;; Tests require write access to $HOME by default
10936 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10937 (replace 'check
10938 (lambda _
10939 (let ((cwd (getcwd)))
10940 (setenv "PYTHONPATH"
10941 (string-append
10942 cwd "/build/"
10943 (find (cut string-prefix? "lib" <>)
10944 (scandir (string-append cwd "/build")))
10945 ":"
10946 (getenv "PYTHONPATH")))
10947 (invoke "pytest" "-v")))))))
10948 (native-inputs
10949 `(("python-hypothesis" ,python-hypothesis)
10950 ("python-pytest-cov" ,python-pytest-cov)
10951 ("python-pytest-mock" ,python-pytest-mock)
10952 ("python-pytest" ,python-pytest)))
10953 (propagated-inputs ; TODO: Add python-fastnumbers.
10954 `(("python-pyicu" ,python-pyicu)))
10955 (home-page "https://github.com/SethMMorton/natsort")
10956 (synopsis "Natural sorting for python and shell")
10957 (description
10958 "Natsort lets you apply natural sorting on lists instead of
10959 lexicographical. If you use the built-in @code{sorted} method in python
10960 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10961 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10962 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10963 identifies numbers and sorts them separately from strings. It can also sort
10964 version numbers, real numbers, mixed types and more, and comes with a shell
10965 command @command{natsort} that exposes this functionality in the command line.")
10966 (license license:expat)
10967 (properties `((python2-variant . ,(delay python2-natsort))))))
10968
10969 (define-public python2-natsort
10970 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10971 (package (inherit base)
10972 (native-inputs
10973 `(("python2-pathlib" ,python2-pathlib)
10974 ,@(package-native-inputs base))))))
10975
10976 (define-public python-glances
10977 (package
10978 (name "python-glances")
10979 (version "3.1.1")
10980 (source
10981 (origin
10982 (method url-fetch)
10983 (uri (pypi-uri "Glances" version))
10984 (sha256
10985 (base32
10986 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
10987 (modules '((guix build utils)))
10988 (snippet
10989 '(begin
10990 ;; Glances phones PyPI for weekly update checks by default.
10991 ;; Disable these. The user can re-enable them if desired.
10992 (substitute* "glances/outdated.py"
10993 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
10994 (string-append indentation
10995 "self.args.disable_check_update = True\n"
10996 line)))
10997 #t))))
10998 (build-system python-build-system)
10999 (propagated-inputs
11000 `(("python-future" ,python-future)
11001 ("python-psutil" ,python-psutil)))
11002 (home-page
11003 "https://github.com/nicolargo/glances")
11004 (synopsis "Cross-platform curses-based monitoring tool")
11005 (description
11006 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11007 Glances uses the PsUtil library to get information from your system. It
11008 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11009 (license license:lgpl3+)))
11010
11011 (define-public python2-glances
11012 (package-with-python2 python-glances))
11013
11014 (define-public python-graphql-core
11015 (package
11016 (name "python-graphql-core")
11017 (version "0.5.3")
11018 (source
11019 (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "graphql-core" version))
11022 (sha256
11023 (base32
11024 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11025 (build-system python-build-system)
11026 (arguments
11027 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11028 #:phases
11029 (modify-phases %standard-phases
11030 (add-after 'unpack 'patch-hardcoded-version
11031 (lambda _ (substitute*
11032 "setup.py"
11033 (("'gevent==1.1rc1'") "'gevent'"))
11034 #t)))))
11035 (native-inputs
11036 `(("python-gevent" ,python-gevent)
11037 ("python-mock" ,python-mock)
11038 ("python-pytest-mock" ,python-pytest-mock)))
11039 (propagated-inputs
11040 `(("python-promise" ,python-promise)
11041 ("python-six" ,python-six)))
11042 (home-page "https://github.com/graphql-python/graphql-core")
11043 (synopsis "GraphQL implementation for Python")
11044 (description
11045 "GraphQL implementation for Python. GraphQL is a data query language and
11046 runtime designed and used to request and deliver data to mobile and web apps.
11047 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11048 to Python.")
11049 (license license:expat)))
11050
11051 (define-public python2-graphql-core
11052 (package-with-python2 python-graphql-core))
11053
11054 (define-public python-graphql-relay
11055 (package
11056 (name "python-graphql-relay")
11057 (version "0.4.5")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "graphql-relay" version))
11062 (sha256
11063 (base32
11064 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11065 (build-system python-build-system)
11066 (arguments
11067 '(#:tests? #f)) ; The tests are not distributed
11068 (propagated-inputs
11069 `(("python-graphql-core" ,python-graphql-core)
11070 ("python-promise" ,python-promise)
11071 ("python-six" ,python-six)))
11072 (home-page "https://github.com/graphql-python/graphql-relay-py")
11073 (synopsis "Relay implementation for Python")
11074 (description
11075 "This is a library to allow the easy creation of Relay-compliant servers
11076 using the GraphQL Python reference implementation of a GraphQL server. It
11077 should be noted that the code is a exact port of the original
11078 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11079 from Facebook.")
11080 (license license:expat)))
11081
11082 (define-public python2-graphql-relay
11083 (package-with-python2 python-graphql-relay))
11084
11085 (define-public python-graphene
11086 (package
11087 (name "python-graphene")
11088 (version "0.10.2")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "graphene" version))
11093 (sha256
11094 (base32
11095 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11096 (build-system python-build-system)
11097 (propagated-inputs
11098 `(("python-graphql-core" ,python-graphql-core)
11099 ("python-graphql-relay" ,python-graphql-relay)
11100 ("python-iso8601" ,python-iso8601)
11101 ("python-promise" ,python-promise)
11102 ("python-six" ,python-six)))
11103 (arguments
11104 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11105 (home-page "http://graphene-python.org/")
11106 (synopsis "GraphQL Framework for Python")
11107 (description
11108 "Graphene is a Python library for building GraphQL schemas/types.
11109 A GraphQL schema describes your data model, and provides a GraphQL server
11110 with an associated set of resolve methods that know how to fetch data.")
11111 (properties `((python2-variant . ,(delay python2-graphene))))
11112 (license license:expat)))
11113
11114 (define-public python2-graphene
11115 (let ((base (package-with-python2
11116 (strip-python2-variant python-graphene))))
11117 (package (inherit base)
11118 (native-inputs
11119 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11120 ,@(package-native-inputs base))))))
11121
11122 (define-public python-nautilus
11123 (package
11124 (name "python-nautilus")
11125 (version "0.4.9")
11126 (source
11127 (origin
11128 (method url-fetch)
11129 (uri (pypi-uri "nautilus" version))
11130 (sha256
11131 (base32
11132 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11133 (build-system python-build-system)
11134 (arguments `(#:tests? #f)) ; fails to import test modules
11135 (propagated-inputs
11136 `(("python-bcrypt" ,python-bcrypt)
11137 ("python-click" ,python-click)
11138 ("python-consul" ,python-consul)
11139 ("python-graphene" ,python-graphene)
11140 ("python-jinja2" ,python-jinja2)
11141 ("python-peewee" ,python-peewee)
11142 ("python-pika" ,python-pika)
11143 ("python-tornado" ,python-tornado)
11144 ("python-wtforms" ,python-wtforms)))
11145 (native-inputs
11146 `(("python-nose2" ,python-nose2)))
11147 (home-page "https://github.com/AlecAivazis/nautilus")
11148 (synopsis "Library for creating microservice applications")
11149 (description
11150 "Nautilus is a framework for flux based microservices that looks to
11151 provide extendible implementations of common aspects of a cloud so that you can
11152 focus on building massively scalable web applications.")
11153 (license license:expat)))
11154
11155 (define-public python-snowballstemmer
11156 (package
11157 (name "python-snowballstemmer")
11158 (version "1.2.1")
11159 (source (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "snowballstemmer" version))
11162 (sha256
11163 (base32
11164 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11165 (build-system python-build-system)
11166 (arguments
11167 `(;; No tests exist
11168 #:tests? #f))
11169 (home-page "https://github.com/shibukawa/snowball_py")
11170 (synopsis "Snowball stemming library collection for Python")
11171 (description "This package provides 16 word stemmer algorithms generated
11172 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11173 English stemmer.")
11174 (license license:bsd-3)))
11175
11176 (define-public python2-snowballstemmer
11177 (package-with-python2 python-snowballstemmer))
11178
11179 (define-public python-setproctitle
11180 (package
11181 (name "python-setproctitle")
11182 (version "1.1.10")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "setproctitle" version))
11187 (sha256
11188 (base32
11189 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11190 (build-system python-build-system)
11191 (arguments
11192 '(#:phases
11193 (modify-phases %standard-phases
11194 (add-before 'check 'patch-Makefile
11195 ;; Stricly this is only required for the python2 variant.
11196 ;; But adding a phase in an inherited package seems to be
11197 ;; cumbersum. So we patch even for python3.
11198 (lambda _
11199 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11200 (when nose
11201 (substitute* "Makefile"
11202 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11203 (string-append nose "/bin/nosetests "))))
11204 #t)))
11205 (replace 'check
11206 (lambda _
11207 (setenv "PYTHON" (or (which "python3") (which "python")))
11208 (setenv "PYCONFIG" (or (which "python3-config")
11209 (which "python-config")))
11210 (setenv "CC" "gcc")
11211 ;; No need to extend PYTHONPATH to find the built package, since
11212 ;; the Makefile will build anyway
11213 (invoke "make" "check"))))))
11214 (native-inputs
11215 `(("procps" ,procps))) ; required for tests
11216 (home-page
11217 "https://github.com/dvarrazzo/py-setproctitle")
11218 (synopsis
11219 "Setproctitle implementation for Python to customize the process title")
11220 (description "The library allows a process to change its title (as displayed
11221 by system tools such as ps and top).
11222
11223 Changing the title is mostly useful in multi-process systems, for
11224 example when a master process is forked: changing the children's title
11225 allows to identify the task each process is busy with. The technique
11226 is used by PostgreSQL and the OpenSSH Server for example.")
11227 (license license:bsd-3)
11228 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11229
11230 (define-public python2-setproctitle
11231 (let ((base (package-with-python2
11232 (strip-python2-variant python-setproctitle))))
11233 (package
11234 (inherit base)
11235 (native-inputs `(("python2-nose" ,python2-nose)
11236 ,@(package-native-inputs base))))))
11237
11238 (define-public python-validictory
11239 (package
11240 (name "python-validictory")
11241 (version "1.0.1")
11242 (source
11243 (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "validictory" version))
11246 (sha256
11247 (base32
11248 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11249 (build-system python-build-system)
11250 (arguments
11251 '(#:phases
11252 (modify-phases %standard-phases
11253 (add-after 'unpack 'bootstrap
11254 ;; Move the tests out of the package directory to avoid
11255 ;; packaging them.
11256 (lambda* _
11257 (rename-file "validictory/tests" "tests")
11258 (delete-file "tests/__init__.py")))
11259 (replace 'check
11260 (lambda _
11261 ;; Extend PYTHONPATH so the built package will be found.
11262 (setenv "PYTHONPATH"
11263 (string-append (getcwd) "/build/lib:"
11264 (getenv "PYTHONPATH")))
11265 (invoke "py.test" "-vv" ))))))
11266 (native-inputs
11267 `(("python-pytest" ,python-pytest)))
11268 (home-page
11269 "https://github.com/jamesturk/validictory")
11270 (synopsis "General purpose Python data validator")
11271 (description "It allows validation of arbitrary Python data structures.
11272
11273 The schema format is based on the JSON Schema
11274 proposal (http://json-schema.org), so combined with json the library is also
11275 useful as a validator for JSON data.")
11276 (license license:expat)))
11277
11278 (define-public python2-validictory
11279 (package-with-python2 python-validictory))
11280
11281 (define-public python-pyelftools
11282 (package
11283 (name "python-pyelftools")
11284 (version "0.25")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "pyelftools" version))
11289 (sha256
11290 (base32
11291 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11292 (build-system python-build-system)
11293 (arguments
11294 `(#:phases
11295 (modify-phases %standard-phases
11296 (add-before 'check 'set-pythonpath
11297 (lambda _
11298 (setenv "PYTHONPATH"
11299 (string-append
11300 (getcwd) "/test/"
11301 ":" (getenv "PYTHONPATH")))
11302 #t)))))
11303 (home-page
11304 "https://github.com/eliben/pyelftools")
11305 (synopsis
11306 "Analyze binary and library file information")
11307 (description "This Python library provides interfaces for parsing and
11308 analyzing two binary and library file formats; the Executable and Linking
11309 Format (ELF), and debugging information in the Debugging With Attributed
11310 Record Format (DWARF).")
11311 (license license:public-domain)))
11312
11313 (define-public python-pyev
11314 (package
11315 (name "python-pyev")
11316 (version "0.9.0")
11317 (source
11318 (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "pyev" version))
11321 (sha256
11322 (base32
11323 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11324 (build-system python-build-system)
11325 (arguments
11326 `(#:tests? #f ; no test suite
11327 #:phases
11328 (modify-phases %standard-phases
11329 (add-after 'unpack 'patch
11330 (lambda* (#:key inputs #:allow-other-keys)
11331 (let ((libev (string-append (assoc-ref inputs "libev")
11332 "/lib/libev.so.4")))
11333 (substitute* "setup.py"
11334 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11335 (string-append "libev_dll_name = \"" libev "\"")))))))))
11336 (inputs
11337 `(("libev" ,libev)))
11338 (home-page "http://pythonhosted.org/pyev/")
11339 (synopsis "Python libev interface")
11340 (description "Pyev provides a Python interface to libev.")
11341 (license license:gpl3)))
11342
11343 (define-public python2-pyev
11344 (package-with-python2 python-pyev))
11345
11346 (define-public python-imagesize
11347 (package
11348 (name "python-imagesize")
11349 (version "1.1.0")
11350 (source
11351 (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "imagesize" version))
11354 (sha256
11355 (base32
11356 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11357 (build-system python-build-system)
11358 (home-page "https://github.com/shibukawa/imagesize_py")
11359 (synopsis "Gets image size of files in various formats in Python")
11360 (description
11361 "This package allows determination of image size from
11362 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11363 (license license:expat)))
11364
11365 (define-public python2-imagesize
11366 (package-with-python2 python-imagesize))
11367
11368 (define-public python-termstyle
11369 (package
11370 (name "python-termstyle")
11371 (version "0.1.11")
11372 (source
11373 (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "termstyle" version))
11376 (sha256
11377 (base32
11378 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11379 (build-system python-build-system)
11380 (arguments
11381 '(#:phases
11382 (modify-phases %standard-phases
11383 (replace 'check
11384 (lambda _
11385 (invoke "python" "test3.py"))))))
11386 (home-page "https://github.com/gfxmonk/termstyle")
11387 (synopsis "Console text coloring for Python")
11388 (description "This package provides console text coloring for Python.")
11389 (license license:bsd-3)))
11390
11391 (define-public python-argcomplete
11392 (package
11393 (name "python-argcomplete")
11394 (version "1.7.0")
11395 (source
11396 (origin
11397 (method url-fetch)
11398 (uri (pypi-uri "argcomplete" version))
11399 (sha256
11400 (base32
11401 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11402 (build-system python-build-system)
11403 (native-inputs
11404 `(("python-pexpect" ,python-pexpect)
11405 ("tcsh" ,tcsh)
11406 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11407 (home-page "https://github.com/kislyuk/argcomplete")
11408 (synopsis "Shell tab completion for Python argparse")
11409 (description "argcomplete provides extensible command line tab completion
11410 of arguments and options for Python scripts using @code{argparse}. It's
11411 particularly useful for programs with many options or sub-parsers that can
11412 dynamically suggest completions; for example, when browsing resources over the
11413 network.")
11414 (license license:asl2.0)))
11415
11416 (define-public python2-argcomplete
11417 (package-with-python2 python-argcomplete))
11418
11419 (define-public python-xopen
11420 (package
11421 (name "python-xopen")
11422 (version "0.5.0")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "xopen" version))
11427 (sha256
11428 (base32
11429 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11430 (build-system python-build-system)
11431 (propagated-inputs
11432 `(("python-setuptools-scm" ,python-setuptools-scm)))
11433 (home-page "https://github.com/marcelm/xopen/")
11434 (synopsis "Open compressed files transparently")
11435 (description "This module provides an @code{xopen} function that works like
11436 Python's built-in @code{open} function, but can also deal with compressed files.
11437 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11438 recognized by their file extensions. The focus is on being as efficient as
11439 possible on all supported Python versions.")
11440 (license license:expat)))
11441
11442 (define-public python2-xopen
11443 (let ((base (package-with-python2
11444 (strip-python2-variant python-xopen))))
11445 (package
11446 (inherit base)
11447 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11448 ,@(package-propagated-inputs base))))))
11449
11450 (define-public python-cheetah
11451 (package
11452 (name "python-cheetah")
11453 (version "3.1.0")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (pypi-uri "Cheetah3" version))
11458 (sha256
11459 (base32
11460 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11461 (build-system python-build-system)
11462 (arguments
11463 `(#:modules ((guix build utils)
11464 (guix build python-build-system)
11465 (ice-9 ftw)
11466 (srfi srfi-1)
11467 (srfi srfi-26))
11468 #:phases (modify-phases %standard-phases
11469 (add-after 'unpack 'use-absolute-python
11470 (lambda _
11471 (substitute* "Cheetah/CheetahWrapper.py"
11472 (("#!/usr/bin/env python")
11473 (string-append "#!" (which "python"))))
11474 #t))
11475 (replace 'check
11476 (lambda _
11477 (let ((cwd (getcwd)))
11478 (setenv "PYTHONPATH"
11479 (string-append
11480 cwd "/build/"
11481 (find (cut string-prefix? "lib" <>)
11482 (scandir (string-append cwd "/build")))
11483 ":" (getenv "PYTHONPATH")))
11484 (setenv "PATH"
11485 (string-append (getenv "PATH")
11486 ":" cwd "/bin"))
11487 (setenv "TMPDIR" "/tmp")
11488
11489 (substitute* "Cheetah/Tests/Test.py"
11490 (("unittest.TextTestRunner\\(\\)")
11491 "unittest.TextTestRunner(verbosity=2)"))
11492
11493 (invoke "python" "Cheetah/Tests/Test.py")))))))
11494 (propagated-inputs
11495 `(("python-markdown" ,python-markdown))) ;optional
11496 (home-page "http://cheetahtemplate.org/")
11497 (synopsis "Template engine")
11498 (description "Cheetah is a text-based template engine and Python code
11499 generator.
11500
11501 Cheetah can be used as a standalone templating utility or referenced as
11502 a library from other Python applications. It has many potential uses,
11503 but web developers looking for a viable alternative to ASP, JSP, PHP and
11504 PSP are expected to be its principle user group.
11505
11506 Features:
11507 @enumerate
11508 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11509 text-based format.
11510 @item Cleanly separates content, graphic design, and program code.
11511 @item Blends the power and flexibility of Python with a simple template language
11512 that non-programmers can understand.
11513 @item Gives template writers full access to any Python data structure, module,
11514 function, object, or method in their templates.
11515 @item Makes code reuse easy by providing an object-orientated interface to
11516 templates that is accessible from Python code or other Cheetah templates.
11517 One template can subclass another and selectively reimplement sections of it.
11518 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11519 improve the performance of a dynamic website.
11520 @item Compiles templates into optimized, yet readable, Python code.
11521 @end enumerate")
11522 (license (license:x11-style "file://LICENSE"))))
11523
11524 (define-public python2-cheetah
11525 (package-with-python2 python-cheetah))
11526
11527 (define-public python-dulwich
11528 (package
11529 (name "python-dulwich")
11530 (version "0.18.6")
11531 (source
11532 (origin
11533 (method url-fetch)
11534 (uri (list (string-append "https://www.dulwich.io/releases/"
11535 "dulwich-" version ".tar.gz")
11536 (pypi-uri "dulwich" version)))
11537 (sha256
11538 (base32
11539 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11540 (build-system python-build-system)
11541 (arguments
11542 `(#:phases
11543 (modify-phases %standard-phases
11544 (add-before 'check 'fix-tests
11545 (lambda* (#:key inputs #:allow-other-keys)
11546 ;; The tests use Popen with a custom environment which doesn't
11547 ;; include PATH.
11548 (substitute* "dulwich/tests/compat/utils.py"
11549 (("'git'") (string-append "'"
11550 (which "git")
11551 "'")))
11552 (substitute* '("dulwich/tests/test_repository.py"
11553 "dulwich/tests/test_hooks.py")
11554 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11555 (setenv "TEST_RUNNER" "unittest")
11556 (setenv "PYTHONHASHSEED" "random")
11557 #t)))))
11558 (propagated-inputs
11559 `(("python-fastimport" ,python-fastimport)))
11560 (native-inputs
11561 `(("python-mock" ,python-mock)
11562 ("python-geventhttpclient" ,python-geventhttpclient)
11563 ("git" ,git)))
11564 (home-page "https://www.dulwich.io/")
11565 (synopsis "Git implementation in Python")
11566 (description "Dulwich is an implementation of the Git file formats and
11567 protocols written in pure Python.")
11568 ;; Can be used with either license.
11569 (license (list license:asl2.0 license:gpl2+))))
11570
11571 (define-public python2-dulwich
11572 (package-with-python2 python-dulwich))
11573
11574 (define-public python-pbkdf2
11575 (package
11576 (name "python-pbkdf2")
11577 (version "1.3")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "pbkdf2" version))
11582 (sha256
11583 (base32
11584 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11585 (build-system python-build-system)
11586 (arguments
11587 '(#:phases
11588 (modify-phases %standard-phases
11589 (replace 'check
11590 (lambda _
11591 (setenv "PYTHONPATH"
11592 (string-append (getcwd) "/build/lib:"
11593 (getenv "PYTHONPATH")))
11594 (invoke "python" "test/test_pbkdf2.py"))))))
11595 (propagated-inputs
11596 `(("python-pycrypto" ,python-pycrypto))) ; optional
11597 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11598 (synopsis "Password-based key derivation")
11599 (description "This module implements the password-based key derivation
11600 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11601
11602 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11603 is part of the RSA Public Key Cryptography Standards series. The provided
11604 implementation takes a password or a passphrase and a salt value (and
11605 optionally a iteration count, a digest module, and a MAC module) and provides
11606 a file-like object from which an arbitrarly-sized key can be read.")
11607 (license license:expat)))
11608
11609 (define-public python2-pbkdf2
11610 (package-with-python2 python-pbkdf2))
11611
11612 (define-public python-qrcode
11613 (package
11614 (name "python-qrcode")
11615 (version "6.1")
11616 (source
11617 (origin
11618 (method url-fetch)
11619 (uri (pypi-uri "qrcode" version))
11620 (sha256
11621 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11622 (build-system python-build-system)
11623 (arguments
11624 ;; FIXME: Tests require packaging 'pymaging'.
11625 '(#:tests? #f))
11626 (propagated-inputs
11627 `(("python-lxml" ,python-lxml) ; for SVG output
11628 ("python-pillow" ,python-pillow) ; for PNG output
11629 ("python-six" ,python-six)))
11630 (home-page "https://github.com/lincolnloop/python-qrcode")
11631 (synopsis "QR Code image generator")
11632 (description "This package provides a pure Python QR Code generator
11633 module. It uses the Python Imaging Library (PIL) to allow for the generation
11634 of QR Codes.
11635
11636 In addition this package provides a command line tool to generate QR codes and
11637 either write these QR codes to a file or do the output as ascii art at the
11638 console.")
11639 (license license:bsd-3)))
11640
11641 (define-public python2-qrcode
11642 (package-with-python2 python-qrcode))
11643
11644 (define-public python-rst2ansi
11645 (package
11646 (name "python-rst2ansi")
11647 (version "0.1.5")
11648 (source
11649 (origin
11650 (method url-fetch)
11651 (uri (pypi-uri "rst2ansi" version))
11652 (sha256
11653 (base32
11654 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11655 (build-system python-build-system)
11656 (propagated-inputs
11657 `(("python-docutils" ,python-docutils)))
11658 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11659 (synopsis "Convert RST to ANSI-decorated console output")
11660 (description
11661 "Python module dedicated to rendering RST (reStructuredText) documents
11662 to ansi-escaped strings suitable for display in a terminal.")
11663 (license license:expat)))
11664
11665 (define-public python-ansi2html
11666 (package
11667 (name "python-ansi2html")
11668 (version "1.2.0")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "ansi2html" version))
11673 (sha256
11674 (base32
11675 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11676 (build-system python-build-system)
11677 (native-inputs
11678 `(("python-mock" ,python-mock)
11679 ("python-nose" ,python-nose)))
11680 (propagated-inputs
11681 `(("python-six" ,python-six)))
11682 (home-page "https://github.com/ralphbean/ansi2html")
11683 (synopsis "Convert ANSI-decorated console output to HTML")
11684 (description
11685 "@command{ansi2html} is a Python library and command line utility for
11686 convering text with ANSI color codes to HTML or LaTeX.")
11687 (license license:gpl3+)))
11688
11689 (define-public python2-ansi2html
11690 (package-with-python2 python-ansi2html))
11691
11692 (define-public python-ddt
11693 (package
11694 (name "python-ddt")
11695 (version "1.1.3")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "ddt" version))
11700 (sha256
11701 (base32
11702 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11703 (build-system python-build-system)
11704 (native-inputs
11705 `(("python-mock" ,python-mock)
11706 ("python-nose" ,python-nose)))
11707 (propagated-inputs
11708 `(("python-six" ,python-six)
11709 ("python-pyyaml" ,python-pyyaml)))
11710 (home-page "https://github.com/txels/ddt")
11711 (synopsis "Data-Driven Tests")
11712 (description
11713 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11714 running it with different test data, and make it appear as multiple test
11715 cases.")
11716 (license license:expat)))
11717
11718 (define-public python2-ddt
11719 (package-with-python2 python-ddt))
11720
11721 (define-public python-pycountry
11722 (package
11723 (name "python-pycountry")
11724 (version "18.5.26")
11725 (source
11726 (origin
11727 (method url-fetch)
11728 (uri (pypi-uri "pycountry" version))
11729 (sha256
11730 (base32
11731 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11732 (build-system python-build-system)
11733 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11734 (synopsis "ISO databases for languages, countries, currencies, etc.")
11735 (description
11736 "@code{pycountry} provides the ISO databases for the standards:
11737 @enumerate
11738 @item 639-3 (Languages)
11739 @item 3166 (Countries)
11740 @item 3166-3 (Deleted Countries)
11741 @item 3166-2 (Subdivisions of countries)
11742 @item 4217 (Currencies)
11743 @item 15924 (Scripts)
11744 @end enumerate
11745 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11746 through a Python API.")
11747 (license license:lgpl2.1+)))
11748
11749 (define-public python2-pycountry
11750 (package-with-python2 python-pycountry))
11751
11752 (define-public python-pycosat
11753 (package
11754 (name "python-pycosat")
11755 (version "0.6.1")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "pycosat" version))
11760 (sha256
11761 (base32
11762 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11763 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11764 (build-system python-build-system)
11765 (home-page "https://github.com/ContinuumIO/pycosat")
11766 (synopsis "Bindings to picosat (a SAT solver)")
11767 (description
11768 "This package provides efficient Python bindings to @code{picosat} on
11769 the C level. When importing pycosat, the @code{picosat} solver becomes part
11770 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11771 Problem} (SAT) solver.")
11772 (license license:expat)))
11773
11774 (define-public python2-pycosat
11775 (package-with-python2 python-pycosat))
11776
11777 (define-public python2-ruamel.ordereddict
11778 (package
11779 (name "python2-ruamel.ordereddict")
11780 (version "0.4.9")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "ruamel.ordereddict" version))
11785 (sha256
11786 (base32
11787 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11788 (build-system python-build-system)
11789 (arguments
11790 `(#:python ,python-2
11791 #:phases
11792 (modify-phases %standard-phases
11793 (delete 'check)
11794 (add-after 'install 'check
11795 (lambda* (#:key inputs outputs #:allow-other-keys)
11796 (add-installed-pythonpath inputs outputs)
11797 (invoke "python" "test/testordereddict.py"))))))
11798 (home-page "https://bitbucket.org/ruamel/ordereddict")
11799 (synopsis "Version of dict that keeps keys in insertion order")
11800 (description
11801 "This is an implementation of an ordered dictionary with @dfn{Key
11802 Insertion Order} (KIO: updates of values do not affect the position of the
11803 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11804 removed and put at the back). The standard library module @code{OrderedDict},
11805 implemented later, implements a subset of @code{ordereddict} functionality.
11806 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11807 Order} (KSO, no sorting function can be specified, but a transform can be
11808 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11809 (license license:expat)))
11810
11811 (define-public python-pypeg2
11812 (package
11813 (name "python-pypeg2")
11814 (version "2.15.2")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "pyPEG2" version))
11819 (sha256
11820 (base32
11821 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11822 (build-system python-build-system)
11823 (propagated-inputs `(("python-lxml" ,python-lxml)))
11824 (arguments
11825 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11826 '(#:tests? #f))
11827 (home-page "https://fdik.org/pyPEG/")
11828 (synopsis "Parsering Expression Grammars in Python")
11829 (description "PyPEG is an intrinsic parser interpreter framework for
11830 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11831 parse many formal languages.")
11832 (license license:gpl2)))
11833
11834 (define-public python-incremental
11835 (package
11836 (name "python-incremental")
11837 (version "17.5.0")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "incremental" version))
11842 (sha256
11843 (base32
11844 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11845 (build-system python-build-system)
11846 (home-page "https://github.com/hawkowl/incremental")
11847 (synopsis "Library for versioning Python projects")
11848 (description "Incremental is a small library that versions your Python
11849 projects.")
11850 (license license:expat)))
11851
11852 (define-public python2-incremental
11853 (package-with-python2 python-incremental))
11854
11855 (define-public python-invoke
11856 (package
11857 (name "python-invoke")
11858 (home-page "http://www.pyinvoke.org/")
11859 (version "1.1.0")
11860 (source (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "invoke" version))
11863 (sha256
11864 (base32
11865 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11866 (build-system python-build-system)
11867 (arguments
11868 ;; XXX: Requires many dependencies that are not yet in Guix.
11869 `(#:tests? #f))
11870 (synopsis "Pythonic task execution")
11871 (description
11872 "Invoke is a Python task execution tool and library, drawing inspiration
11873 from various sources to arrive at a powerful and clean feature set. It is
11874 evolved from the Fabric project, but focuses on local and abstract concerns
11875 instead of servers and network commands.")
11876 (license license:bsd-3)))
11877
11878 (define-public python2-invoke
11879 (package-with-python2 python-invoke))
11880
11881 (define-public python-automat
11882 (package
11883 (name "python-automat")
11884 (version "0.7.0")
11885 (source (origin
11886 (method url-fetch)
11887 (uri (pypi-uri "Automat" version))
11888 (sha256
11889 (base32
11890 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11891 (build-system python-build-system)
11892 ;; We disable the tests because they require python-twisted, while
11893 ;; python-twisted depends on python-automat. Twisted is optional, but the
11894 ;; tests fail if it is not available. Also see
11895 ;; <https://github.com/glyph/automat/issues/71>.
11896 (arguments '(#:tests? #f))
11897 (native-inputs
11898 `(("python-m2r" ,python-m2r)
11899 ("python-setuptools-scm" ,python-setuptools-scm)
11900 ("python-graphviz" ,python-graphviz)))
11901 (propagated-inputs
11902 `(("python-six" ,python-six)
11903 ("python-attrs" ,python-attrs)))
11904 (home-page "https://github.com/glyph/Automat")
11905 (synopsis "Self-service finite-state machines")
11906 (description "Automat is a library for concise, idiomatic Python
11907 expression of finite-state automata (particularly deterministic finite-state
11908 transducers).")
11909 (license license:expat)))
11910
11911 (define-public python2-automat
11912 (package-with-python2 python-automat))
11913
11914 (define-public python-m2r
11915 (package
11916 (name "python-m2r")
11917 (version "0.2.1")
11918 (source (origin
11919 (method url-fetch)
11920 (uri (pypi-uri "m2r" version))
11921 (sha256
11922 (base32
11923 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11924 (build-system python-build-system)
11925 (propagated-inputs
11926 `(("python-docutils" ,python-docutils)
11927 ("python-mistune" ,python-mistune)))
11928 (native-inputs
11929 `(("python-pygments" ,python-pygments)
11930 ("python-mock" ,python-mock)))
11931 (home-page "https://github.com/miyakogi/m2r")
11932 (synopsis "Markdown to reStructuredText converter")
11933 (description "M2R converts a markdown file including reST markups to valid
11934 reST format.")
11935 (license license:expat)))
11936
11937 (define-public python2-m2r
11938 (package-with-python2 python-m2r))
11939
11940 (define-public python-constantly
11941 (package
11942 (name "python-constantly")
11943 (version "15.1.0")
11944 (source (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "constantly" version))
11947 (sha256
11948 (base32
11949 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11950 (build-system python-build-system)
11951 (home-page "https://github.com/twisted/constantly")
11952 (synopsis "Symbolic constants in Python")
11953 (description "Constantly is a Python library that provides symbolic
11954 constant support. It includes collections and constants with text, numeric,
11955 and bit flag values.")
11956 (license license:expat)))
11957
11958 (define-public python2-constantly
11959 (package-with-python2 python-constantly))
11960
11961 (define-public python-attrs
11962 (package
11963 (name "python-attrs")
11964 (version "19.1.0")
11965 (source (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "attrs" version))
11968 (sha256
11969 (base32
11970 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11971 (build-system python-build-system)
11972 (arguments
11973 `(#:modules ((guix build utils)
11974 (guix build python-build-system)
11975 (ice-9 ftw)
11976 (srfi srfi-1)
11977 (srfi srfi-26))
11978 #:phases (modify-phases %standard-phases
11979 (replace 'check
11980 (lambda _
11981 (let ((cwd (getcwd)))
11982 (setenv "PYTHONPATH"
11983 (string-append
11984 cwd "/build/"
11985 (find (cut string-prefix? "lib" <>)
11986 (scandir (string-append cwd "/build")))
11987 ":"
11988 (getenv "PYTHONPATH")))
11989 (invoke "python" "-m" "pytest")))))))
11990 (native-inputs
11991 `(("python-coverage" ,python-coverage)
11992 ("python-hypothesis" ,python-hypothesis)
11993 ("python-pympler" ,python-pympler)
11994 ("python-pytest" ,python-pytest)
11995 ("python-six" ,python-six)
11996 ("python-sphinx" ,python-sphinx)
11997 ("python-zope-interface" ,python-zope-interface)))
11998 (home-page "https://github.com/python-attrs/attrs/")
11999 (synopsis "Attributes without boilerplate")
12000 (description "@code{attrs} is a Python package with class decorators that
12001 ease the chores of implementing the most common attribute-related object
12002 protocols.")
12003 (license license:expat)))
12004
12005 (define-public python2-attrs
12006 (package-with-python2 python-attrs))
12007
12008 (define-public python-attrs-bootstrap
12009 (package
12010 (inherit python-attrs)
12011 (name "python-attrs-bootstrap")
12012 ;; Keep this on a fixed version so python-attrs can be updated without
12013 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
12014 (version "17.4.0")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "attrs" version))
12018 (sha256
12019 (base32
12020 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
12021 (native-inputs `())
12022 (arguments `(#:tests? #f))))
12023
12024 (define-public python2-attrs-bootstrap
12025 (package-with-python2 python-attrs-bootstrap))
12026
12027 (define-public python2-cliapp
12028 (package
12029 (name "python2-cliapp")
12030 (version "1.20180812.1")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (string-append
12035 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12036 version ".tar.gz"))
12037 (sha256
12038 (base32
12039 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12040 (build-system python-build-system)
12041 (arguments
12042 `(#:python ,python-2
12043 #:phases
12044 (modify-phases %standard-phases
12045 ;; check phase needs to be run before the build phase. If not,
12046 ;; coverage-test-runner looks for tests for the built source files,
12047 ;; and fails.
12048 (delete 'check)
12049 (add-before 'build 'check
12050 (lambda _
12051 ;; Disable python3 tests
12052 (substitute* "check"
12053 (("python3") "# python3"))
12054 (invoke "./check"))))))
12055 (native-inputs
12056 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12057 ("python2-pep8" ,python2-pep8)))
12058 (propagated-inputs
12059 `(("python2-pyaml" ,python2-pyaml)))
12060 (home-page "https://liw.fi/cliapp/")
12061 (synopsis "Python framework for command line programs")
12062 (description "@code{python2-cliapp} is a python framework for
12063 command line programs. It contains the typical stuff such programs
12064 need to do, such as parsing the command line for options, and
12065 iterating over input files.")
12066 (license license:gpl2+)))
12067
12068 (define-public python2-ttystatus
12069 (package
12070 (name "python2-ttystatus")
12071 (version "0.36")
12072 (source
12073 (origin
12074 (method url-fetch)
12075 (uri (string-append
12076 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12077 version ".tar.gz"))
12078 (sha256
12079 (base32
12080 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12081 (build-system python-build-system)
12082 (native-inputs
12083 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12084 ("python2-pep8" ,python2-pep8)))
12085 (arguments
12086 `(#:python ,python-2
12087 #:phases
12088 (modify-phases %standard-phases
12089 ;; check phase needs to be run before the build phase. If not,
12090 ;; coverage-test-runner looks for tests for the built source files,
12091 ;; and fails.
12092 (delete 'check)
12093 (add-before 'build 'check
12094 (lambda _ (invoke "make" "check"))))))
12095 (home-page "https://liw.fi/ttystatus/")
12096 (synopsis "Python library for showing progress reporting and
12097 status updates on terminals")
12098 (description "@code{python2-ttystatus} is a python library for
12099 showing progress reporting and status updates on terminals, for
12100 command line programs. Output is automatically adapted to the width
12101 of the terminal: truncated if it does not fit, and resized if the
12102 terminal size changes.")
12103 (license license:gpl3+)))
12104
12105 (define-public python2-tracing
12106 (package
12107 (name "python2-tracing")
12108 (version "0.10")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (string-append
12113 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12114 version ".tar.gz"))
12115 (sha256
12116 (base32
12117 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12118 (build-system python-build-system)
12119 (arguments
12120 `(#:python ,python-2))
12121 (home-page "https://liw.fi/tracing/")
12122 (synopsis "Python debug logging helper")
12123 (description "@code{python2-tracing} is a python library for
12124 logging debug messages. It provides a way to turn debugging messages
12125 on and off, based on the filename they occur in. It is much faster
12126 than using @code{logging.Filter} to accomplish the same thing, which
12127 matters when code is run in production mode. The actual logging still
12128 happens using the @code{logging} library.")
12129 (license license:gpl3+)))
12130
12131 (define-public python2-larch
12132 (package
12133 (name "python2-larch")
12134 (version "1.20151025")
12135 (source
12136 (origin
12137 (method url-fetch)
12138 (uri (string-append
12139 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12140 version ".tar.gz"))
12141 (patches (search-patches
12142 "python2-larch-coverage-4.0a6-compatibility.patch"))
12143 (sha256
12144 (base32
12145 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12146 (build-system python-build-system)
12147 (arguments
12148 `(#:python ,python-2
12149 #:phases
12150 (modify-phases %standard-phases
12151 ;; check phase needs to be run before the build phase. If not,
12152 ;; coverage-test-runner looks for tests for the built source files,
12153 ;; and fails.
12154 (delete 'check)
12155 (add-before 'build 'check
12156 (lambda _ (invoke "make" "check"))))))
12157 (native-inputs
12158 `(("cmdtest" ,cmdtest)
12159 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12160 (propagated-inputs
12161 `(("python2-tracing" ,python2-tracing)))
12162 (home-page "https://liw.fi/larch/")
12163 (synopsis "Python copy-on-write B-tree library")
12164 (description "@code{python2-larch} is an implementation of
12165 particular kind of B-tree, based on research by Ohad Rodeh. See
12166 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12167 on the data structure.
12168
12169 The distinctive feature of this B-tree is that a node is never
12170 (conceptually) modified. Instead, all updates are done by
12171 copy-on-write. This makes it easy to clone a tree, and modify only the
12172 clone, while other processes access the original tree.")
12173 (license license:gpl3+)))
12174
12175 (define-public python-astroid
12176 (package
12177 (name "python-astroid")
12178 (version "2.1.0")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "astroid" version))
12183 (sha256
12184 (base32
12185 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12186 (build-system python-build-system)
12187 (propagated-inputs
12188 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12189 ("python-six" ,python-six)
12190 ("python-wrapt" ,python-wrapt)))
12191 (native-inputs
12192 `(("python-dateutil" ,python-dateutil)
12193 ("python-nose" ,python-nose)
12194 ("python-pytest" ,python-pytest)
12195 ("python-pytest-runner" ,python-pytest-runner)))
12196 (arguments
12197 `(#:phases
12198 (modify-phases %standard-phases
12199 (add-after 'unpack 'remove-spurious-test
12200 (lambda _
12201 ;; This can be removed after upgrading from python-3.7
12202 ;; https://github.com/PyCQA/astroid/issues/593
12203 ;; https://bugs.python.org/issue34056
12204 (delete-file "astroid/tests/unittest_modutils.py")
12205 #t))
12206 (replace 'check
12207 (lambda _
12208 (invoke "pytest" "astroid"))))))
12209 (home-page "https://github.com/PyCQA/astroid")
12210 (synopsis "Common base representation of python source code for pylint and
12211 other projects")
12212 (description "@code{python-astroid} provides a common base representation
12213 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12214
12215 It provides a compatible representation which comes from the _ast module. It
12216 rebuilds the tree generated by the builtin _ast module by recursively walking
12217 down the AST and building an extended ast. The new node classes have
12218 additional methods and attributes for different usages. They include some
12219 support for static inference and local name scopes. Furthermore, astroid
12220 builds partial trees by inspecting living objects.")
12221 (license license:lgpl2.1+)
12222 (properties `((python2-variant . ,(delay python2-astroid))))))
12223
12224 (define-public python2-astroid
12225 (let ((base (package-with-python2
12226 (strip-python2-variant python-astroid))))
12227 (package (inherit base)
12228 ;; Version 2.x removes python2 support.
12229 (version "1.6.5")
12230 (source
12231 (origin
12232 (method url-fetch)
12233 (uri (pypi-uri "astroid" version))
12234 (sha256
12235 (base32
12236 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12237 (arguments
12238 (substitute-keyword-arguments (package-arguments base)
12239 ((#:phases phases)
12240 `(modify-phases ,phases
12241 (add-after 'unpack 'remove-spurious-test
12242 (lambda _
12243 ;; https://github.com/PyCQA/astroid/issues/276
12244 (delete-file "astroid/tests/unittest_brain.py")
12245 #t))
12246 (replace 'check
12247 (lambda _
12248 (invoke"python" "-m" "unittest" "discover"
12249 "-p" "unittest*.py")))))))
12250 (native-inputs `())
12251 (propagated-inputs
12252 `(("python2-backports-functools-lru-cache"
12253 ,python2-backports-functools-lru-cache)
12254 ("python2-enum34" ,python2-enum34)
12255 ("python2-singledispatch" ,python2-singledispatch)
12256 ,@(package-propagated-inputs base))))))
12257
12258 (define-public python-isort
12259 (package
12260 (name "python-isort")
12261 (version "4.3.4")
12262 (source
12263 (origin
12264 (method git-fetch)
12265 (uri (git-reference
12266 ;; Tests pass only from the Github sources
12267 (url "https://github.com/timothycrosley/isort")
12268 (commit version)))
12269 (file-name (git-file-name name version))
12270 (sha256
12271 (base32
12272 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12273 (build-system python-build-system)
12274 (native-inputs
12275 `(("python-mock" ,python-mock)
12276 ("python-pytest" ,python-pytest)))
12277 (home-page "https://github.com/timothycrosley/isort")
12278 (synopsis "Python utility/library to sort python imports")
12279 (description "@code{python-isort} is a python utility/library to sort
12280 imports alphabetically, and automatically separated into sections. It
12281 provides a command line utility, a python library and plugins for various
12282 editors.")
12283 (license license:expat)
12284 (properties `((python2-variant . ,(delay python2-isort))))))
12285
12286 (define-public python2-isort
12287 (let ((base (package-with-python2
12288 (strip-python2-variant python-isort))))
12289 (package (inherit base)
12290 (native-inputs
12291 `(("python2-futures" ,python2-futures)
12292 ,@(package-native-inputs base))))))
12293
12294 (define-public python2-backports-functools-lru-cache
12295 (package
12296 (name "python2-backports-functools-lru-cache")
12297 (version "1.5")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 ;; only the pypi tarballs contain the necessary metadata
12302 (uri (pypi-uri "backports.functools_lru_cache" version))
12303 (sha256
12304 (base32
12305 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12306 (build-system python-build-system)
12307 (native-inputs
12308 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12309 (arguments
12310 `(#:python ,python-2))
12311 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12312 (synopsis "Backport of functools.lru_cache from Python 3.3")
12313 (description "@code{python2-backports-functools-lru-cache} is a backport
12314 of @code{functools.lru_cache} from python 3.3.")
12315 (license license:expat)))
12316
12317 (define-public python-configparser
12318 (package
12319 (name "python-configparser")
12320 (version "3.5.0")
12321 (source
12322 (origin
12323 (method url-fetch)
12324 (uri (string-append
12325 "https://bitbucket.org/ambv/configparser/get/"
12326 version ".tar.bz2"))
12327 (file-name (string-append name "-" version ".tar.gz"))
12328 (sha256
12329 (base32
12330 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12331 (build-system python-build-system)
12332 (home-page "https://github.com/jaraco/configparser/")
12333 (synopsis "Backport of configparser from python 3.5")
12334 (description "@code{python-configparser} is a backport of
12335 @code{configparser} from Python 3.5 so that it can be used directly
12336 in other versions.")
12337 (license license:expat)))
12338
12339 (define-public python2-configparser
12340 (package-with-python2 python-configparser))
12341
12342 (define-public python-mando
12343 (package
12344 (name "python-mando")
12345 (version "0.6.4")
12346 (source (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "mando" version))
12349 (sha256
12350 (base32
12351 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12352 (build-system python-build-system)
12353 (propagated-inputs
12354 `(("python-rst2ansi" ,python-rst2ansi)
12355 ("python-six" ,python-six)))
12356 (native-inputs
12357 `(("python-pytest" ,python-pytest)))
12358 (home-page "https://mando.readthedocs.org/")
12359 (synopsis
12360 "Wrapper around argparse, allowing creation of complete CLI applications")
12361 (description
12362 "This package is a wrapper around argparse, allowing you to write complete CLI
12363 applications in seconds while maintaining all the flexibility.")
12364 (license license:expat)))
12365
12366 (define-public python2-mando
12367 (package-with-python2 python-mando))
12368
12369 (define-public python2-argparse
12370 (package
12371 (name "python2-argparse")
12372 (version "1.4.0")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (pypi-uri "argparse" version))
12377 (sha256
12378 (base32
12379 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12380 (build-system python-build-system)
12381 (arguments
12382 `(#:python ,python-2))
12383 (home-page "https://github.com/ThomasWaldmann/argparse/")
12384 (synopsis "Python command-line parsing library")
12385 (description
12386 "This package is mostly for people who want to have @code{argparse} on
12387 older Pythons because it was not part of the standard library back then.")
12388 (license license:psfl)))
12389
12390 (define-public python-fudge
12391 (package
12392 (name "python-fudge")
12393 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12394 ;; package, which is currently the only use of this package.
12395 (version "0.9.6")
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (pypi-uri "fudge" version))
12400 (sha256
12401 (base32
12402 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12406 (home-page "https://github.com/fudge-py/fudge")
12407 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12408 (description
12409 "Fudge is a Python module for using fake objects (mocks and stubs) to
12410 test real ones.
12411
12412 In readable Python code, you declare the methods available on your fake object
12413 and how they should be called. Then you inject that into your application and
12414 start testing. This declarative approach means you don’t have to record and
12415 playback actions and you don’t have to inspect your fakes after running code.
12416 If the fake object was used incorrectly then you’ll see an informative
12417 exception message with a traceback that points to the culprit.")
12418 (license license:expat)))
12419
12420 (define-public python2-fudge
12421 (package-with-python2 python-fudge))
12422
12423 (define-public python-mwclient
12424 (package
12425 (name "python-mwclient")
12426 (version "0.8.4")
12427 (source
12428 (origin
12429 (method url-fetch)
12430 ;; The PyPI version wouldn't contain tests.
12431 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12432 "v" version ".tar.gz"))
12433 (file-name (string-append name "-" version ".tar.gz"))
12434 (sha256
12435 (base32
12436 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12437 (build-system python-build-system)
12438 (propagated-inputs
12439 `(("python-requests" ,python-requests)
12440 ("python-requests-oauthlib"
12441 ,python-requests-oauthlib)
12442 ("python-six" ,python-six)))
12443 (native-inputs
12444 `(("python-mock" ,python-mock)
12445 ("python-pytest" ,python-pytest)
12446 ("python-pytest-pep8" ,python-pytest-pep8)
12447 ("python-pytest-cache" ,python-pytest-cache)
12448 ("python-pytest-cov" ,python-pytest-cov)
12449 ("python-responses" ,python-responses)))
12450 (home-page "https://github.com/btongminh/mwclient")
12451 (synopsis "MediaWiki API client")
12452 (description "This package provides a MediaWiki API client.")
12453 (license license:expat)))
12454
12455 (define-public python2-mwclient
12456 (package-with-python2 python-mwclient))
12457
12458 (define-public python-utils
12459 (package
12460 (name "python-utils")
12461 (version "2.1.0")
12462 (source (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "python-utils" version))
12465 (sha256
12466 (base32
12467 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12468 (build-system python-build-system)
12469 (native-inputs
12470 `(("pytest-runner" ,python-pytest-runner)
12471 ("pytest" ,python-pytest)
12472 ("six" ,python-six)))
12473 (home-page "https://github.com/WoLpH/python-utils")
12474 (synopsis "Convenient utilities not included with the standard Python install")
12475 (description
12476 "Python Utils is a collection of small Python functions and classes which
12477 make common patterns shorter and easier.")
12478 (license license:bsd-2)))
12479
12480 (define-public python2-utils
12481 (package-with-python2 python-utils))
12482
12483 (define-public python-diff-match-patch
12484 (package
12485 (name "python-diff-match-patch")
12486 (version "20121119")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "diff-match-patch" version))
12491 (sha256
12492 (base32
12493 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12494 (build-system python-build-system)
12495 (home-page "https://code.google.com/p/google-diff-match-patch")
12496 (synopsis "Synchronize plain text")
12497 (description "Diff Match and Patch libraries offer robust algorithms to
12498 perform the operations required for synchronizing plain text.")
12499 (license license:asl2.0)))
12500
12501 (define-public python2-diff-match-patch
12502 (package-with-python2 python-diff-match-patch))
12503
12504 (define-public python-dirsync
12505 (package
12506 (name "python-dirsync")
12507 (version "2.2.3")
12508 (source
12509 (origin
12510 (method url-fetch)
12511 (uri (pypi-uri "dirsync" version))
12512 (sha256
12513 (base32
12514 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12515 (build-system python-build-system)
12516 (propagated-inputs
12517 `(("six" ,python-six)))
12518 (home-page "https://bitbucket.org/tkhyn/dirsync")
12519 (synopsis "Advanced directory tree synchronisation tool")
12520 (description "Advanced directory tree synchronisation tool.")
12521 (license license:expat)))
12522
12523 (define-public python2-dirsync
12524 (package-with-python2 python-dirsync))
12525
12526 (define-public python-levenshtein
12527 (package
12528 (name "python-levenshtein")
12529 (version "0.12.0")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "python-Levenshtein" version))
12534 (sha256
12535 (base32
12536 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12537 (build-system python-build-system)
12538 (home-page "https://github.com/ztane/python-Levenshtein")
12539 (synopsis "Fast computation of Levenshtein distance and string similarity")
12540 (description
12541 "The Levenshtein Python C extension module contains functions for fast computation of
12542 @enumerate
12543 @item Levenshtein (edit) distance, and edit operations
12544 @item string similarity
12545 @item approximate median strings, and generally string averaging
12546 @item string sequence and set similarity
12547 @end enumerate
12548 It supports both normal and Unicode strings.")
12549 (license license:gpl2+)))
12550
12551 (define-public python2-levenshtein
12552 (package-with-python2 python-levenshtein))
12553
12554 (define-public python-scandir
12555 (package
12556 (name "python-scandir")
12557 (version "1.9.0")
12558 (source
12559 (origin
12560 (method url-fetch)
12561 (uri (pypi-uri "scandir" version))
12562 (sha256
12563 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12564 (build-system python-build-system)
12565 (arguments
12566 `(#:phases (modify-phases %standard-phases
12567 (replace 'check
12568 (lambda _
12569 (invoke "python" "test/run_tests.py"))))))
12570 (home-page "https://github.com/benhoyt/scandir")
12571 (synopsis "Directory iteration function")
12572 (description
12573 "Directory iteration function like os.listdir(), except that instead of
12574 returning a list of bare filenames, it yields DirEntry objects that include
12575 file type and stat information along with the name. Using scandir() increases
12576 the speed of os.walk() by 2-20 times (depending on the platform and file
12577 system) by avoiding unnecessary calls to os.stat() in most cases.
12578
12579 This package is part of the Python standard library since version 3.5.")
12580 (license license:bsd-3)))
12581
12582 (define-public python2-scandir
12583 (package-with-python2 python-scandir))
12584
12585 (define-public python2-stemming
12586 (package
12587 (name "python2-stemming")
12588 (version "1.0.1")
12589 (source
12590 (origin
12591 (method url-fetch)
12592 (uri (pypi-uri "stemming" version))
12593 (sha256
12594 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12595 (build-system python-build-system)
12596 (arguments
12597 `(#:python ,python-2))
12598 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12599 (synopsis "Python implementations of various stemming algorithms")
12600 (description
12601 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12602 stemming algorithms for English. These implementations are straightforward and
12603 efficient, unlike some Python versions of the same algorithms available on the
12604 Web. This package is an extraction of the stemming code included in the Whoosh
12605 search engine.")
12606 (license license:public-domain)))
12607
12608 (define-public python-factory-boy
12609 (package
12610 (name "python-factory-boy")
12611 (version "2.8.1")
12612 (source
12613 (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "factory_boy" version))
12616 (sha256
12617 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12618 (build-system python-build-system)
12619 (arguments
12620 ;; Tests are not included in the tarball.
12621 `(#:tests? #f))
12622 (propagated-inputs
12623 `(("faker" ,python-faker)))
12624 (home-page "https://github.com/benhoyt/scandir")
12625 (synopsis "Versatile test fixtures replacement")
12626 (description
12627 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12628
12629 As a fixtures replacement tool, it aims to replace static, hard to maintain
12630 fixtures with easy-to-use factories for complex object.
12631
12632 Instead of building an exhaustive test setup with every possible combination
12633 of corner cases, factory_boy allows you to use objects customized for the
12634 current test, while only declaring the test-specific fields")
12635 (license license:expat)))
12636
12637 (define-public python2-factory-boy
12638 (package-with-python2 python-factory-boy))
12639
12640 (define-public python-translate-toolkit
12641 (package
12642 (name "python-translate-toolkit")
12643 (version "2.1.0")
12644 (source
12645 (origin
12646 (method url-fetch)
12647 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12648 (sha256
12649 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12650 (build-system python-build-system)
12651 (native-inputs
12652 `(("python-pytest" ,python-pytest)
12653 ("python-sphinx" ,python-sphinx)))
12654 (propagated-inputs
12655 `(("python-babel" ,python-babel)
12656 ("python-beautifulsoup4" ,python-beautifulsoup4)
12657 ("python-chardet" ,python-chardet)
12658 ("python-diff-match-patch" ,python-diff-match-patch)
12659 ("python-levenshtein" ,python-levenshtein)
12660 ("python-lxml" ,python-lxml)
12661 ("python-six" ,python-six)
12662 ("python-vobject" ,python-vobject)
12663 ("python-pyyaml" ,python-pyyaml)))
12664 (arguments
12665 ;; TODO: tests are not run, because they end with
12666 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12667 ;; 'parse_funcs'
12668 ;; during test setup.
12669 `(#:tests? #f))
12670 (home-page "https://toolkit.translatehouse.org")
12671 (synopsis "Tools and API for translation and localization engineering")
12672 (description
12673 "Tools and API for translation and localization engineering. It contains
12674 several utilities, as well as an API for building localization tools.")
12675 (license license:gpl2+)))
12676
12677 (define-public python2-translate-toolkit
12678 (package-with-python2 python-translate-toolkit))
12679
12680 (define-public python-packaging
12681 (package
12682 (name "python-packaging")
12683 (version "19.0")
12684 (source
12685 (origin
12686 (method url-fetch)
12687 (uri (pypi-uri "packaging" version))
12688 (sha256
12689 (base32
12690 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12691 (build-system python-build-system)
12692 (arguments
12693 `(#:phases (modify-phases %standard-phases
12694 (replace 'check
12695 (lambda _ (invoke "py.test" "-vv"))))))
12696 (native-inputs
12697 `(("python-pretend" ,python-pretend)
12698 ("python-pytest" ,python-pytest)))
12699 (propagated-inputs
12700 `(("python-pyparsing" ,python-pyparsing)
12701 ("python-six" ,python-six)))
12702 (home-page "https://github.com/pypa/packaging")
12703 (synopsis "Core utilities for Python packages")
12704 (description "Packaging is a Python module for dealing with Python packages.
12705 It offers an interface for working with package versions, names, and dependency
12706 information.")
12707 ;; From 'LICENSE': This software is made available under the terms of
12708 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12709 ;; Contributions to this software is made under the terms of *both* these
12710 ;; licenses.
12711 (license (list license:asl2.0 license:bsd-2))))
12712
12713 (define-public python2-packaging
12714 (package-with-python2 python-packaging))
12715
12716 (define-public python-relatorio
12717 (package
12718 (name "python-relatorio")
12719 (version "0.8.0")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "relatorio" version))
12724 (sha256
12725 (base32
12726 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12727 (build-system python-build-system)
12728 (propagated-inputs
12729 `(("python-lxml" ,python-lxml)
12730 ("python-genshi" ,python-genshi)))
12731 (native-inputs
12732 `(("python-magic" ,python-magic)))
12733 (home-page "https://relatorio.tryton.org/")
12734 (synopsis "Templating library able to output ODT and PDF files")
12735 (description "Relatorio is a templating library which provides a way to
12736 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12737 for more filetypes can be easily added by creating plugins for them.")
12738 (license license:gpl3+)))
12739
12740 (define-public python2-relatorio
12741 (package-with-python2 python-relatorio))
12742
12743 (define-public python-radon
12744 (package
12745 (name "python-radon")
12746 (version "2.2.0")
12747 (source
12748 (origin
12749 (method url-fetch)
12750 (uri (pypi-uri "radon" version))
12751 (sha256
12752 (base32
12753 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12754 (build-system python-build-system)
12755 (arguments
12756 `(#:phases (modify-phases %standard-phases
12757 (replace 'check
12758 (lambda _
12759 (invoke "python" "radon/tests/run.py"))))))
12760 (propagated-inputs
12761 `(("python-colorama" ,python-colorama)
12762 ("python-flake8-polyfill" ,python-flake8-polyfill)
12763 ("python-mando" ,python-mando)))
12764 (native-inputs
12765 `(("python-pytest" ,python-pytest)
12766 ("python-pytest-mock" ,python-pytest-mock)))
12767 (home-page "https://radon.readthedocs.org/")
12768 (synopsis "Code Metrics in Python")
12769 (description "Radon is a Python tool which computes various code metrics.
12770 Supported metrics are:
12771 @itemize @bullet
12772 @item raw metrics: SLOC, comment lines, blank lines, &c.
12773 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12774 @item Halstead metrics (all of them)
12775 @item the Maintainability Index (a Visual Studio metric)
12776 @end itemize")
12777 (license license:expat)))
12778
12779 (define-public python2-radon
12780 (package-with-python2 python-radon))
12781
12782 (define-public python-sure
12783 (package
12784 (name "python-sure")
12785 (version "1.4.11")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "sure" version))
12790 (sha256
12791 (base32
12792 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12793 (build-system python-build-system)
12794 (propagated-inputs
12795 `(("python-mock" ,python-mock)
12796 ("python-six" ,python-six)))
12797 (native-inputs
12798 `(("python-nose" ,python-nose)))
12799 (home-page "https://github.com/gabrielfalcao/sure")
12800 (synopsis "Automated testing library in python for python")
12801 (description
12802 "Sure is a python library that leverages a DSL for writing assertions.
12803 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12804 (license license:gpl3+)))
12805
12806 (define-public python2-sure
12807 (package-with-python2 python-sure))
12808
12809 (define-public python2-couleur
12810 ;; This package does not seem to support python3 at all, hence,
12811 ;; only the python2 variant definition is provided.
12812 (package
12813 (name "python2-couleur")
12814 (version "0.6.2")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "couleur" version))
12819 (sha256
12820 (base32
12821 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12822 (build-system python-build-system)
12823 (arguments
12824 `(#:python ,python-2))
12825 (home-page "https://github.com/gabrielfalcao/couleur")
12826 (synopsis
12827 "ANSI terminal tool for python, colored shell and other handy fancy features")
12828 (description
12829 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12830 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12831 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12832 ;; https://github.com/gabrielfalcao/couleur/issues/11
12833 (license license:lgpl3+)))
12834
12835 (define-public python-misaka
12836 (package
12837 (name "python-misaka")
12838 (version "2.1.1")
12839 (source
12840 (origin
12841 (method url-fetch)
12842 (uri (pypi-uri "misaka" version))
12843 (sha256
12844 (base32
12845 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12846 (build-system python-build-system)
12847 (arguments
12848 `(;; Line 37 of setup.py calls self.run_command('develop')
12849 ;; in the 'check' phase. This command seems to be trying
12850 ;; to write to
12851 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12852 ;; for which it does not have the permission to write.
12853 #:tests? #f))
12854 (propagated-inputs
12855 `(("python-cffi" ,python-cffi)))
12856 (home-page "https://github.com/FSX/misaka")
12857 (synopsis "Python binding for Hoedown")
12858 (description
12859 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12860 library written in C. It features a fast HTML renderer and functionality to make custom
12861 renderers (e.g. man pages or LaTeX).")
12862 (license license:expat)))
12863
12864 (define-public python2-misaka
12865 (package-with-python2 python-misaka))
12866
12867 (define-public python2-steadymark
12868 ;; This is forced into being a python2 only variant
12869 ;; due to its dependence on couleur that has no support
12870 ;; for python3
12871 (package
12872 (name "python2-steadymark")
12873 (version "0.7.3")
12874 (source
12875 (origin
12876 (method url-fetch)
12877 (uri (pypi-uri "steadymark" version))
12878 (sha256
12879 (base32
12880 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12881 (build-system python-build-system)
12882 (native-inputs
12883 `(("python-couleur" ,python2-couleur)
12884 ("python-sure" ,python2-sure)
12885 ("python-misaka" ,python2-misaka)))
12886 (arguments
12887 `(#:python ,python-2
12888 #:phases
12889 (modify-phases %standard-phases
12890 (add-before 'build 'patch-setup-py
12891 (lambda _
12892 ;; Update requirements from dependency==version
12893 ;; to dependency>=version
12894 (substitute* "setup.py"
12895 (("==") ">="))
12896 #t)))))
12897 (home-page "https://github.com/gabrielfalcao/steadymark")
12898 (synopsis "Markdown-based test runner for python")
12899 (description
12900 "@code{Steadymark} allows documentation to be written in github-flavoured
12901 markdown. The documentation may contain snippets of code surrounded by python
12902 code blocks and @code{Steadymark} will find these snippets and run them, making
12903 sure that there are no old malfunctional examples in the documentation examples.")
12904 (license license:expat)))
12905
12906 (define-public python-jsonpointer
12907 (package
12908 (name "python-jsonpointer")
12909 (version "1.10")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "jsonpointer" version))
12914 (sha256
12915 (base32
12916 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12917 (build-system python-build-system)
12918 (home-page "https://github.com/stefankoegl/python-json-pointer")
12919 (synopsis "Identify specific nodes in a JSON document")
12920 (description "@code{jsonpointer} allows you to access specific nodes
12921 by path in a JSON document (see RFC 6901).")
12922 (license license:bsd-3)))
12923
12924 (define-public python2-jsonpointer
12925 (package-with-python2 python-jsonpointer))
12926
12927 (define-public python-jsonpatch
12928 (package
12929 (name "python-jsonpatch")
12930 (version "1.16")
12931 (source
12932 (origin
12933 (method url-fetch)
12934 ;; pypi version lacks tests.js
12935 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12936 "archive/v" version ".tar.gz"))
12937 (file-name (string-append name "-" version ".tar.gz"))
12938 (sha256
12939 (base32
12940 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12941 (build-system python-build-system)
12942 (native-inputs
12943 `(("python-jsonpointer" ,python-jsonpointer)))
12944 (home-page "https://github.com/stefankoegl/python-json-patch")
12945 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12946 (description "@code{jsonpatch} is a library and program that allows
12947 applying JSON Patches according to RFC 6902.")
12948 (license license:bsd-3)))
12949
12950 (define-public python2-jsonpatch
12951 (package-with-python2 python-jsonpatch))
12952
12953 (define-public python-jsonpatch-0.4
12954 (package (inherit python-jsonpatch)
12955 (name "python-jsonpatch")
12956 (version "0.4")
12957 (source
12958 (origin
12959 (method url-fetch)
12960 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12961 "archive/v" version ".tar.gz"))
12962 (file-name (string-append name "-" version ".tar.gz"))
12963 (sha256
12964 (base32
12965 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12966
12967 (define-public python2-jsonpatch-0.4
12968 (package-with-python2 python-jsonpatch-0.4))
12969
12970 (define-public python-rfc3986
12971 (package
12972 (name "python-rfc3986")
12973 (version "1.1.0")
12974 (source (origin
12975 (method url-fetch)
12976 (uri (pypi-uri "rfc3986" version))
12977 (sha256
12978 (base32
12979 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12980 (build-system python-build-system)
12981 (arguments
12982 `(#:modules ((guix build utils)
12983 (guix build python-build-system)
12984 (ice-9 ftw)
12985 (srfi srfi-1)
12986 (srfi srfi-26))
12987 #:phases
12988 (modify-phases %standard-phases
12989 (replace 'check
12990 (lambda _
12991 (let ((cwd (getcwd)))
12992 (setenv "PYTHONPATH"
12993 (string-append cwd "/build/"
12994 (find (cut string-prefix? "lib" <>)
12995 (scandir (string-append cwd "/build")))
12996 ":"
12997 (getenv "PYTHONPATH")))
12998 (invoke "pytest" "-v")))))))
12999 (native-inputs
13000 `(("python-pytest" ,python-pytest)))
13001 (home-page "https://rfc3986.readthedocs.io/")
13002 (synopsis "Parse and validate URI references")
13003 (description
13004 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13005 validation and authority parsing. This module also supports RFC@tie{}6874
13006 which adds support for zone identifiers to IPv6 addresses.")
13007 (license license:asl2.0)))
13008
13009 (define-public python2-rfc3986
13010 (package-with-python2 python-rfc3986))
13011
13012 (define-public python-rfc3987
13013 (package
13014 (name "python-rfc3987")
13015 (version "1.3.7")
13016 (source
13017 (origin
13018 (method url-fetch)
13019 (uri (pypi-uri "rfc3987" version))
13020 (sha256
13021 (base32
13022 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13023 (build-system python-build-system)
13024 (home-page "https://pypi.python.org/pypi/rfc3987")
13025 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13026 (description "@code{rfc3987} provides routines for parsing and
13027 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13028 (license license:gpl3+)))
13029
13030 (define-public python2-rfc3987
13031 (package-with-python2 python-rfc3987))
13032
13033 (define-public python-validate-email
13034 (package
13035 (name "python-validate-email")
13036 (version "1.3")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 (uri (pypi-uri "validate_email" version))
13041 (sha256
13042 (base32
13043 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13044 (build-system python-build-system)
13045 (home-page "https://github.com/syrusakbary/validate_email")
13046 (synopsis "Verifies if an email address is valid and really exists")
13047 (description "@code{validate_email} can be used to verify if an email
13048 address is valid and really exists.")
13049 (license license:lgpl3+)))
13050
13051 (define-public python2-validate-email
13052 (package-with-python2 python-validate-email))
13053
13054 (define-public python-flex
13055 (package
13056 (name "python-flex")
13057 (version "6.10.0")
13058 (source
13059 (origin
13060 (method url-fetch)
13061 (uri (pypi-uri "flex" version))
13062 (sha256
13063 (base32
13064 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13065 (build-system python-build-system)
13066 (propagated-inputs
13067 `(("python-click" ,python-click)
13068 ("python-iso8601" ,python-iso8601)
13069 ("python-jsonpointer" ,python-jsonpointer)
13070 ("python-pyyaml" ,python-pyyaml)
13071 ("python-requests" ,python-requests)
13072 ("python-rfc3987" ,python-rfc3987)
13073 ("python-six" ,python-six)
13074 ("python-validate-email" ,python-validate-email)))
13075 (home-page "https://github.com/pipermerriam/flex")
13076 (synopsis "Validates Swagger schemata")
13077 (description "@code{flex} can be used to validate Swagger schemata.")
13078 (license license:bsd-3)))
13079
13080 (define-public python2-flex
13081 (package-with-python2 python-flex))
13082
13083 (define-public python-marshmallow
13084 (package
13085 (name "python-marshmallow")
13086 (version "3.0.0b14")
13087 (source
13088 (origin
13089 (method url-fetch)
13090 (uri (pypi-uri "marshmallow" version))
13091 (sha256
13092 (base32
13093 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13094 (build-system python-build-system)
13095 (propagated-inputs
13096 `(("python-dateutil" ,python-dateutil)
13097 ("python-simplejson" ,python-simplejson)))
13098 (native-inputs
13099 `(("python-pytest" ,python-pytest)
13100 ("python-pytz" ,python-pytz)))
13101 (home-page "https://github.com/marshmallow-code/marshmallow")
13102 (synopsis "Convert complex datatypes to and from native
13103 Python datatypes.")
13104 (description "@code{marshmallow} provides a library for converting
13105 complex datatypes to and from native Python datatypes.")
13106 (license license:expat)))
13107
13108 (define-public python2-marshmallow
13109 (package-with-python2 python-marshmallow))
13110
13111 (define-public python-apispec
13112 (package
13113 (name "python-apispec")
13114 (version "0.25.3")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "apispec" version))
13119 (sha256
13120 (base32
13121 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13122 (build-system python-build-system)
13123 (propagated-inputs
13124 `(("python-pyyaml" ,python-pyyaml)))
13125 (native-inputs
13126 `(("python-pytest" ,python-pytest)
13127 ("python-flask" ,python-flask)
13128 ("python-marshmallow" ,python-marshmallow)
13129 ("python-tornado" ,python-tornado)
13130 ("python-bottle" ,python-bottle)
13131 ("python-mock" ,python-mock)))
13132 (home-page "https://github.com/marshmallow-code/apispec")
13133 (synopsis "Swagger 2.0 API specification generator")
13134 (description "@code{python-apispec} is a pluggable API specification
13135 generator. Currently supports the OpenAPI specification (f.k.a.
13136 Swagger 2.0).")
13137 (license license:expat)))
13138
13139 (define-public python2-apispec
13140 (package-with-python2 python-apispec))
13141
13142 (define-public python-flasgger
13143 (package
13144 (name "python-flasgger")
13145 (version "0.6.3")
13146 (source
13147 (origin
13148 (method git-fetch)
13149 (uri (git-reference
13150 (url "https://github.com/rochacbruno/flasgger.git")
13151 (commit version)))
13152 (file-name (git-file-name name version))
13153 (sha256
13154 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13155 (build-system python-build-system)
13156 (arguments
13157 `(#:phases
13158 (modify-phases %standard-phases
13159 (replace 'check
13160 (lambda* (#:key inputs outputs #:allow-other-keys)
13161 (substitute* "Makefile"
13162 (("flake8 flasgger --ignore=F403")
13163 "flake8 flasgger --ignore=E731,F403"))
13164 (setenv "PYTHONPATH" (string-append (getcwd)
13165 ":"
13166 (getenv "PYTHONPATH")))
13167 (invoke "py.test"))))))
13168 (propagated-inputs
13169 `(("python-flask" ,python-flask)
13170 ("python-pyyaml" ,python-pyyaml)
13171 ("python-jsonschema" ,python-jsonschema)
13172 ("python-mistune" ,python-mistune)
13173 ("python-six" ,python-six)))
13174 (native-inputs
13175 `(("python-decorator" ,python-decorator)
13176 ("python-flake8" ,python-flake8)
13177 ("python-flask-restful" ,python-flask-restful)
13178 ("python-flex" ,python-flex)
13179 ("python-pytest" ,python-pytest)
13180 ("python-pytest-cov" ,python-pytest-cov)
13181 ("python-marshmallow" ,python-marshmallow)
13182 ("python-apispec" ,python-apispec)))
13183 (home-page "https://github.com/rochacbruno/flasgger/")
13184 (synopsis "Extract Swagger specs from your Flask project")
13185 (description "@code{python-flasgger} allows extracting Swagger specs
13186 from your Flask project. It is a fork of Flask-Swagger.")
13187 (license license:expat)))
13188
13189 (define-public python2-flasgger
13190 (package-with-python2 python-flasgger))
13191
13192 (define-public python-swagger-spec-validator
13193 (package
13194 (name "python-swagger-spec-validator")
13195 (version "2.4.3")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "swagger-spec-validator" version))
13200 (sha256
13201 (base32
13202 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13203 (build-system python-build-system)
13204 (propagated-inputs
13205 `(("python-jsonschema" ,python-jsonschema)
13206 ("python-pyyaml" ,python-pyyaml)
13207 ("python-six" ,python-six)))
13208 (home-page
13209 "https://github.com/Yelp/swagger_spec_validator")
13210 (synopsis "Validation of Swagger specifications")
13211 (description "@code{swagger_spec_validator} provides a library for
13212 validating Swagger API specifications.")
13213 (license license:asl2.0)))
13214
13215 (define-public python2-swagger-spec-validator
13216 (package-with-python2 python-swagger-spec-validator))
13217
13218 (define-public python-apache-libcloud
13219 (package
13220 (name "python-apache-libcloud")
13221 (version "2.4.0")
13222 (source
13223 (origin
13224 (method url-fetch)
13225 (uri (pypi-uri "apache-libcloud" version))
13226 (sha256
13227 (base32
13228 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13229 (build-system python-build-system)
13230 (arguments
13231 `(#:phases
13232 (modify-phases %standard-phases
13233 (add-after 'unpack 'patch-ssh
13234 (lambda* (#:key inputs #:allow-other-keys)
13235 (substitute* "libcloud/compute/ssh.py"
13236 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13237 "/bin/ssh" "'")))
13238 #t))
13239 (add-after 'unpack 'patch-tests
13240 (lambda _
13241 (substitute* "./libcloud/test/test_file_fixtures.py"
13242 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13243 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13244 return (httplib.OK,
13245 \"1234abcd\",
13246 {\"test\": \"value\"},
13247 httplib.responses[httplib.OK])
13248 def _ascii"))
13249 (substitute* "libcloud/test/compute/test_ssh_client.py"
13250 (("class ShellOutSSHClientTests")
13251 "@unittest.skip(\"Guix container doesn't have ssh service\")
13252 class ShellOutSSHClientTests")
13253 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13254 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13255 (("'.xF0', '.x90', '.x8D', '.x88'")
13256 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13257 #t))
13258 (add-before 'check 'copy-secret
13259 (lambda _
13260 (copy-file "libcloud/test/secrets.py-dist"
13261 "libcloud/test/secrets.py")
13262 #t)))))
13263 (inputs
13264 `(("openssh" ,openssh)))
13265 (propagated-inputs
13266 `(("python-paramiko" ,python-paramiko)
13267 ("python-requests" ,python-requests)))
13268 (native-inputs
13269 `(("python-lockfile" ,python-lockfile)
13270 ("python-mock" ,python-mock)
13271 ("python-pytest" ,python-pytest)
13272 ("python-pytest-runner" ,python-pytest-runner)
13273 ("python-requests-mock" ,python-requests-mock)))
13274 (home-page "https://libcloud.apache.org/")
13275 (synopsis "Unified Cloud API")
13276 (description "@code{libcloud} is a Python library for interacting with
13277 many of the popular cloud service providers using a unified API.")
13278 (license license:asl2.0)))
13279
13280 (define-public python2-apache-libcloud
13281 (package-with-python2 python-apache-libcloud))
13282
13283 (define-public python-smmap2
13284 (package
13285 (name "python-smmap2")
13286 (version "2.0.3")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "smmap2" version))
13291 (sha256
13292 (base32
13293 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13294 (build-system python-build-system)
13295 (native-inputs
13296 `(("python-nosexcover" ,python-nosexcover)))
13297 (home-page "https://github.com/Byron/smmap")
13298 (synopsis "Python sliding window memory map manager")
13299 (description "@code{smmap2} is a pure Python implementation of a sliding
13300 window memory map manager.")
13301 (license license:bsd-3)))
13302
13303 (define-public python2-smmap2
13304 (package-with-python2 python-smmap2))
13305
13306 (define-public python-regex
13307 (package
13308 (name "python-regex")
13309 (version "2019.04.14")
13310 (source (origin
13311 (method url-fetch)
13312 (uri (pypi-uri "regex" version))
13313 (sha256
13314 (base32
13315 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13316 ;; TODO: Fix and enable regex_test.py tests that complain about the
13317 ;; test.support module not existing.
13318 (build-system python-build-system)
13319 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13320 (synopsis "Alternative regular expression module")
13321 (description "This regular expression implementation is backwards-
13322 compatible with the standard @code{re} module, but offers additional
13323 functionality like full case-folding for case-insensitive matches in Unicode.")
13324 (license license:psfl)))
13325
13326 (define-public python2-regex
13327 (package-with-python2 python-regex))
13328
13329 (define-public python2-pyopengl
13330 (package
13331 (name "python2-pyopengl")
13332 (version "3.1.0")
13333 (source
13334 (origin
13335 (method url-fetch)
13336 (uri (pypi-uri "PyOpenGL" version))
13337 (sha256
13338 (base32
13339 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13340 (arguments
13341 `(#:python ,python-2))
13342 (build-system python-build-system)
13343 (home-page "http://pyopengl.sourceforge.net")
13344 (synopsis "Standard OpenGL bindings for Python")
13345 (description
13346 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13347 related APIs. The binding is created using the standard @code{ctypes}
13348 library.")
13349 (license license:bsd-3)))
13350
13351 (define-public python2-pyopengl-accelerate
13352 (package
13353 (inherit python2-pyopengl)
13354 (name "python2-pyopengl-accelerate")
13355 (version "3.1.0")
13356 (source
13357 (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "PyOpenGL-accelerate" version))
13360 (sha256
13361 (base32
13362 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13363 (synopsis "Acceleration code for PyOpenGL")
13364 (description
13365 "This is the Cython-coded accelerator module for PyOpenGL.")))
13366
13367 (define-public python-rencode
13368 (package
13369 (name "python-rencode")
13370 (version "1.0.5")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "rencode" version))
13375 (sha256
13376 (base32
13377 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13378 (build-system python-build-system)
13379 (arguments
13380 `(#:phases
13381 (modify-phases %standard-phases
13382 (add-before 'check 'delete-bogus-test
13383 ;; This test requires /home/aresch/Downloads, which is not provided by
13384 ;; the build environment.
13385 (lambda _
13386 (delete-file "rencode/t.py")
13387 #t)))))
13388 (native-inputs `(("pkg-config" ,pkg-config)
13389 ("python-cython" ,python-cython)))
13390 (home-page "https://github.com/aresch/rencode")
13391 (synopsis "Serialization of heterogeneous data structures")
13392 (description
13393 "The @code{rencode} module is a data structure serialization library,
13394 similar to @code{bencode} from the BitTorrent project. For complex,
13395 heterogeneous data structures with many small elements, r-encoding stake up
13396 significantly less space than b-encodings. This version of rencode is a
13397 complete rewrite in Cython to attempt to increase the performance over the
13398 pure Python module.")
13399 (license license:bsd-3)))
13400
13401 (define-public python2-rencode
13402 (package-with-python2 python-rencode))
13403
13404 (define-public python-xenon
13405 (package
13406 (name "python-xenon")
13407 (version "0.5.4")
13408 (source
13409 (origin
13410 (method url-fetch)
13411 (uri (pypi-uri "xenon" version))
13412 (sha256
13413 (base32
13414 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13415 (build-system python-build-system)
13416 (native-inputs
13417 `(("python-pyyaml" ,python-pyyaml)
13418 ("python-radon" ,python-radon)
13419 ("python-requests" ,python-requests)
13420 ("python-flake8" ,python-flake8)
13421 ("python-tox" ,python-tox)))
13422 (arguments
13423 `(#:phases
13424 (modify-phases %standard-phases
13425 (add-before 'build 'patch-test-requirements
13426 (lambda _
13427 ;; Remove httpretty dependency for tests.
13428 (substitute* "setup.py"
13429 (("httpretty") ""))
13430 #t)))))
13431 (home-page "https://xenon.readthedocs.org/")
13432 (synopsis "Monitor code metrics for Python on your CI server")
13433 (description
13434 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13435 Ideally, @code{xenon} is run every time code is committed. Through command
13436 line options, various thresholds can be set for the complexity of code. It
13437 will fail (i.e. it will exit with a non-zero exit code) when any of these
13438 requirements is not met.")
13439 (license license:expat)))
13440
13441 (define-public python2-xenon
13442 (package-with-python2 python-xenon))
13443
13444 (define-public python-pysocks
13445 (package
13446 (name "python-pysocks")
13447 (version "1.7.0")
13448 (source
13449 (origin
13450 (method url-fetch)
13451 (uri (pypi-uri "PySocks" version))
13452 (sha256
13453 (base32
13454 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13455 (build-system python-build-system)
13456 (arguments `(#:tests? #f))
13457 (home-page "https://github.com/Anorov/PySocks")
13458 (synopsis "SOCKS client module")
13459 (description "@code{pysocks} is an updated and semi-actively maintained
13460 version of @code{SocksiPy} with bug fixes and extra features.")
13461 (license license:bsd-3)))
13462
13463 (define-public python2-pysocks
13464 (package-with-python2 python-pysocks))
13465
13466 (define-public python-pydiff
13467 (package
13468 (name "python-pydiff")
13469 (version "0.2")
13470 (source
13471 (origin
13472 (method url-fetch)
13473 (uri (pypi-uri "pydiff" version))
13474 (sha256
13475 (base32
13476 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13477 (build-system python-build-system)
13478 (home-page "https://github.com/myint/pydiff")
13479 (synopsis "Library to diff two Python files at the bytecode level")
13480 (description
13481 "@code{pydiff} makes it easy to look for actual code changes while
13482 ignoring formatting changes.")
13483 (license license:expat)))
13484
13485 (define-public python2-pydiff
13486 (package-with-python2 python-pydiff))
13487
13488 (define-public python-tqdm
13489 (package
13490 (name "python-tqdm")
13491 (version "4.19.6")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "tqdm" version))
13496 (sha256
13497 (base32
13498 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13499 (build-system python-build-system)
13500 (native-inputs
13501 `(("python-flake8" ,python-flake8)
13502 ("python-nose" ,python-nose)
13503 ("python-coverage" ,python-coverage)))
13504 (home-page "https://github.com/tqdm/tqdm")
13505 (synopsis "Fast, extensible progress meter")
13506 (description
13507 "Make loops show a progress bar on the console by just wrapping any
13508 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13509 design and layout.")
13510 (license (list license:mpl2.0 license:expat))))
13511
13512 (define-public python2-tqdm
13513 (package-with-python2 python-tqdm))
13514
13515 (define-public python-pkginfo
13516 (package
13517 (name "python-pkginfo")
13518 (version "1.4.2")
13519 (source
13520 (origin
13521 (method url-fetch)
13522 (uri (pypi-uri "pkginfo" version))
13523 (sha256
13524 (base32
13525 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13526 (build-system python-build-system)
13527 (arguments
13528 ;; The tests are broken upstream.
13529 '(#:tests? #f))
13530 (home-page
13531 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13532 (synopsis
13533 "Query metadatdata from sdists, bdists, and installed packages")
13534 (description
13535 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13536 source distriubtion (an sdist) or a binary distribution (e.g., created by
13537 running bdist_egg). It can also query the EGG-INFO directory of an installed
13538 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13539 created by running @code{python setup.py develop}).")
13540 (license license:expat)))
13541
13542 (define-public python2-pkginfo
13543 (package-with-python2 python-pkginfo))
13544
13545 (define-public python-twine
13546 (package
13547 (name "python-twine")
13548 (version "1.9.1")
13549 (source
13550 (origin
13551 (method url-fetch)
13552 (uri (pypi-uri "twine" version))
13553 (sha256
13554 (base32
13555 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13556 (build-system python-build-system)
13557 (propagated-inputs
13558 `(("python-tqdm" ,python-tqdm)
13559 ("python-pkginfo" ,python-pkginfo)
13560 ("python-requests" ,python-requests)
13561 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13562 (home-page "https://github.com/pypa/twine")
13563 (synopsis "Collection of utilities for interacting with PyPI")
13564 (description
13565 "@code{twine} currently supports registering projects and uploading
13566 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13567 their files and supports any packaging format (including wheels).")
13568 (license license:asl2.0)))
13569
13570 (define-public python2-twine
13571 (package-with-python2 python-twine))
13572
13573 (define-public python-linecache2
13574 (package
13575 (name "python-linecache2")
13576 (version "1.0.0")
13577 (source
13578 (origin
13579 (method url-fetch)
13580 (uri (pypi-uri "linecache2" version))
13581 (sha256
13582 (base32
13583 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13584 (build-system python-build-system)
13585 (arguments
13586 `(;; The tests depend on unittest2, and our version is a bit too old.
13587 #:tests? #f))
13588 (native-inputs
13589 `(("python-pbr" ,python-pbr-minimal)))
13590 (home-page
13591 "https://github.com/testing-cabal/linecache2")
13592 (synopsis "Backports of the linecache module")
13593 (description
13594 "The linecache module allows one to get any line from any file, while
13595 attempting to optimize internally, using a cache, the common case where many
13596 lines are read from a single file.")
13597 (license license:psfl)))
13598
13599 (define-public python2-linecache2
13600 (package-with-python2 python-linecache2))
13601
13602 (define-public python-traceback2
13603 (package
13604 (name "python-traceback2")
13605 (version "1.4.0")
13606 (source
13607 (origin
13608 (method url-fetch)
13609 (uri (pypi-uri "traceback2" version))
13610 (sha256
13611 (base32
13612 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13613 (build-system python-build-system)
13614 (arguments
13615 `(;; python-traceback2 and python-unittest2 depend on one another.
13616 #:tests? #f))
13617 (native-inputs
13618 `(("python-pbr" ,python-pbr-minimal)))
13619 (propagated-inputs
13620 `(("python-linecache2" ,python-linecache2)))
13621 (home-page
13622 "https://github.com/testing-cabal/traceback2")
13623 (synopsis "Backports of the traceback module")
13624 (description
13625 "This module provides a standard interface to extract, format and print
13626 stack traces of Python programs. It exactly mimics the behavior of the Python
13627 interpreter when it prints a stack trace.")
13628 (license license:psfl)))
13629
13630 (define-public python2-traceback2
13631 (package-with-python2 python-traceback2))
13632
13633 (define-public python-ratelimiter
13634 (package
13635 (name "python-ratelimiter")
13636 (version "1.2.0")
13637 (source
13638 (origin
13639 (method url-fetch)
13640 (uri (pypi-uri "ratelimiter" version))
13641 (sha256
13642 (base32
13643 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13644 (build-system python-build-system)
13645 (arguments
13646 '(#:tests? #f)) ; There are no tests in the pypi archive.
13647 (home-page "https://github.com/RazerM/ratelimiter")
13648 (synopsis "Simple rate limiting object")
13649 (description
13650 "The @code{ratelimiter} module ensures that an operation will not be
13651 executed more than a given number of times during a given period.")
13652 (license license:asl2.0)))
13653
13654 (define-public python2-ratelimiter
13655 (package-with-python2 python-ratelimiter))
13656
13657 (define-public python-dukpy
13658 (package
13659 (name "python-dukpy")
13660 (version "0.3")
13661 (source
13662 (origin
13663 (method git-fetch)
13664 (uri (git-reference
13665 (url "https://github.com/kovidgoyal/dukpy.git")
13666 (commit (string-append "v" version))))
13667 (file-name (git-file-name name version))
13668 (sha256
13669 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13670 (build-system python-build-system)
13671 (home-page "https://github.com/kovidgoyal/dukpy")
13672 (synopsis "Run JavaScript in python")
13673 (description
13674 "dukpy is a JavaScript runtime environment for Python using the duktape
13675 embeddable JavaScript engine.")
13676 ;; Dukpy is licensed under MIT like the embedded duktape library,
13677 ;; with 'errors.c' as GPL3.
13678 (license (list license:expat license:gpl3))))
13679
13680 (define-public python2-dukpy
13681 (package-with-python2 python-dukpy))
13682
13683 (define-public python-jsonrpclib-pelix
13684 (package
13685 (name "python-jsonrpclib-pelix")
13686 (version "0.3.2")
13687 (source
13688 (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "jsonrpclib-pelix" version))
13691 (sha256
13692 (base32
13693 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13694 (build-system python-build-system)
13695 (arguments
13696 `(#:tests? #f)) ; no tests in PyPI tarball
13697 (home-page "https://github.com/tcalmant/jsonrpclib/")
13698 (synopsis "JSON-RPC 2.0 client library for Python")
13699 (description
13700 "This library implements the JSON-RPC v2.0
13701 specification (backwards-compatible) as a client library for Python. This
13702 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13703 services.")
13704 (license license:asl2.0)))
13705
13706 (define-public python2-jsonrpclib-pelix
13707 (package-with-python2 python-jsonrpclib-pelix))
13708
13709 (define-public python-setuptools-scm-git-archive
13710 (package
13711 (name "python-setuptools-scm-git-archive")
13712 (version "1.0")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "setuptools_scm_git_archive" version))
13717 (sha256
13718 (base32
13719 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13720 (build-system python-build-system)
13721 (native-inputs
13722 `(("python-pytest" ,python-pytest)))
13723 (propagated-inputs
13724 `(("python-setuptools-scm" ,python-setuptools-scm)))
13725 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13726 (synopsis "Setuptools_scm plugin for git archives")
13727 (description
13728 "The setuptools_scm_git_archive package is a plugin to
13729 setuptools_scm, which supports obtaining versions from git archives that
13730 belong to tagged versions.")
13731 (license license:expat)))
13732
13733 (define-public python2-setuptools-scm-git-archive
13734 (package-with-python2 python-setuptools-scm-git-archive))
13735
13736 (define-public python-setuptools-git
13737 (package
13738 (name "python-setuptools-git")
13739 (version "1.2")
13740 (source
13741 (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "setuptools-git" version))
13744 (sha256
13745 (base32
13746 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13747 (build-system python-build-system)
13748 (arguments
13749 `(#:phases
13750 (modify-phases %standard-phases
13751 ;; This is needed for tests.
13752 (add-after 'unpack 'configure-git
13753 (lambda _
13754 (setenv "HOME" "/tmp")
13755 (invoke "git" "config" "--global" "user.email" "guix")
13756 (invoke "git" "config" "--global" "user.name" "guix")
13757 #t)))))
13758 (native-inputs
13759 `(("git" ,git-minimal)))
13760 (home-page "https://github.com/msabramo/setuptools-git")
13761 (synopsis "Setuptools revision control system plugin for Git")
13762 (description
13763 "This package provides a plugin for Setuptools for revision control with
13764 Git.")
13765 (license license:bsd-3)))
13766
13767 (define-public python-pyclipper
13768 (package
13769 (name "python-pyclipper")
13770 (version "1.1.0.post1")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "pyclipper" version ".zip"))
13775 (sha256
13776 (base32
13777 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13778 (modules '((guix build utils)))
13779 (snippet
13780 '(begin
13781 ;; This file is generated by Cython.
13782 (delete-file "pyclipper/pyclipper.cpp") #t))))
13783 (build-system python-build-system)
13784 (arguments
13785 `(#:phases
13786 (modify-phases %standard-phases
13787 (add-before 'build 'cythonize-sources
13788 (lambda _
13789 (with-directory-excursion "pyclipper"
13790 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13791 (propagated-inputs
13792 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13793 (native-inputs
13794 `(("python-cython" ,python-cython)
13795 ("python-pytest" ,python-pytest)
13796 ("python-pytest-runner" ,python-pytest-runner)
13797 ("python-unittest2" ,python-unittest2)
13798 ("unzip" ,unzip)))
13799 (home-page "https://github.com/greginvm/pyclipper")
13800 (synopsis "Wrapper for Angus Johnson's Clipper library")
13801 (description
13802 "Pyclipper is a Cython wrapper for the C++ translation of the
13803 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13804 (license license:expat)))
13805
13806 (define-public python2-pyclipper
13807 (package-with-python2 python-pyclipper))
13808
13809 (define-public python2-booleanoperations
13810 (package
13811 (name "python2-booleanoperations")
13812 (version "0.7.1")
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (pypi-uri "booleanOperations" version ".zip"))
13817 (sha256
13818 (base32
13819 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13820 (build-system python-build-system)
13821 (arguments
13822 `(#:python ,python-2))
13823 (native-inputs
13824 `(("unzip" ,unzip)
13825 ("python2-pytest" ,python2-pytest)
13826 ("python2-pytest-runner" ,python2-pytest-runner)))
13827 (propagated-inputs
13828 `(("python-fonttools" ,python2-fonttools)
13829 ("python-pyclipper" ,python2-pyclipper)
13830 ("python-ufolib" ,python2-ufolib)))
13831 (home-page "https://github.com/typemytype/booleanOperations")
13832 (synopsis "Boolean operations on paths")
13833 (description
13834 "BooleanOperations provides a Python library that enables
13835 boolean operations on paths.")
13836 (license license:expat)))
13837
13838 (define-public python-tempdir
13839 (package
13840 (name "python-tempdir")
13841 (version "0.7.1")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "tempdir" version))
13846 (sha256
13847 (base32
13848 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13849 (build-system python-build-system)
13850 (home-page "https://pypi.org/project/tempdir/")
13851 (arguments
13852 ;; the package has no tests
13853 '(#:tests? #f))
13854 (synopsis "Python library for managing temporary directories")
13855 (description
13856 "This library manages temporary directories that are automatically
13857 deleted with all their contents when they are no longer needed. It is
13858 particularly convenient for use in tests.")
13859 (license license:expat)))
13860
13861 (define-public python2-tempdir
13862 (package-with-python2 python-tempdir))
13863
13864 (define-public python-activepapers
13865 (package
13866 (name "python-activepapers")
13867 (version "0.2.2")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "ActivePapers.Py" version))
13872 (sha256
13873 (base32
13874 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13875 (build-system python-build-system)
13876 (arguments
13877 `(#:modules ((ice-9 ftw)
13878 (srfi srfi-1)
13879 (guix build utils)
13880 (guix build python-build-system))
13881
13882 #:phases
13883 (modify-phases %standard-phases
13884 (add-after 'unpack 'delete-python2-code
13885 (lambda _
13886 (for-each delete-file
13887 '("lib/activepapers/builtins2.py"
13888 "lib/activepapers/standardlib2.py"
13889 "lib/activepapers/utility2.py"))))
13890 (replace 'check
13891 (lambda _
13892 ;; Deactivate the test cases that download files
13893 (setenv "NO_NETWORK_ACCESS" "1")
13894 ;; For some strange reason, some tests fail if nosetests runs all
13895 ;; test modules in a single execution. They pass if each test
13896 ;; module is run individually.
13897 (for-each (lambda (filename)
13898 (invoke "nosetests"
13899 (string-append "tests/" filename)))
13900 (scandir "tests"
13901 (lambda (filename)
13902 (string-suffix? ".py" filename)))))))))
13903 (native-inputs
13904 `(("python-tempdir" ,python-tempdir)
13905 ("python-nose" ,python-nose)))
13906 (propagated-inputs
13907 `(("python-h5py" ,python-h5py)))
13908 (home-page "http://www.activepapers.org/")
13909 (synopsis "Executable papers for scientific computing")
13910 (description
13911 "ActivePapers is a tool for working with executable papers, which
13912 combine data, code, and documentation in single-file packages,
13913 suitable for publication as supplementary material or on repositories
13914 such as figshare or Zenodo.")
13915 (properties `((python2-variant . ,(delay python2-activepapers))))
13916 (license license:bsd-3)))
13917
13918 (define-public python2-activepapers
13919 (let ((base (package-with-python2
13920 (strip-python2-variant python-activepapers))))
13921 (package
13922 (inherit base)
13923 (arguments
13924 (substitute-keyword-arguments (package-arguments base)
13925 ((#:phases phases)
13926 `(modify-phases ,phases
13927 (delete 'delete-python2-code)
13928 (add-after 'unpack 'delete-python3-code
13929 (lambda _
13930 (for-each delete-file
13931 '("lib/activepapers/builtins3.py"
13932 "lib/activepapers/standardlib3.py"
13933 "lib/activepapers/utility3.py")))))))))))
13934
13935 (define-public python-semver
13936 (package
13937 (name "python-semver")
13938 (version "2.7.9")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "semver" version))
13943 (sha256
13944 (base32
13945 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13946 (build-system python-build-system)
13947 (arguments
13948 `(#:phases
13949 (modify-phases %standard-phases
13950 (add-after 'unpack 'patch-test-requirements
13951 (lambda _
13952 (substitute* "setup.py"
13953 ;; Our Python is new enough.
13954 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13955 #t)))))
13956 (native-inputs
13957 `(("python-tox" ,python-tox)
13958 ("python-virtualenv" ,python-virtualenv)))
13959 (home-page "https://github.com/k-bx/python-semver")
13960 (synopsis "Python helper for Semantic Versioning")
13961 (description "This package provides a Python library for
13962 @url{Semantic Versioning, http://semver.org/}.")
13963 (license license:bsd-3)))
13964
13965 (define-public python2-semver
13966 (package-with-python2 python-semver))
13967
13968 (define-public python-pyro4
13969 (package
13970 (name "python-pyro4")
13971 (version "4.75")
13972 (source
13973 (origin
13974 (method url-fetch)
13975 (uri (pypi-uri "Pyro4" version))
13976 (sha256
13977 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13978 (build-system python-build-system)
13979 (propagated-inputs
13980 `(("python-serpent" ,python-serpent)))
13981 (home-page "https://pyro4.readthedocs.io")
13982 (synopsis "Distributed object middleware for Python")
13983 (description
13984 "Pyro enables you to build applications in which objects can talk to each
13985 other over the network. You can just use normal Python method calls to call
13986 objects on other machines, also known as remote procedure calls (RPC).")
13987 (license license:expat)))
13988
13989 (define-public python2-pyro
13990 (package
13991 (name "python2-pyro")
13992 (version "3.16")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (pypi-uri "Pyro" version))
13997 (file-name (string-append "Pyro-" version ".tar.gz"))
13998 (sha256
13999 (base32
14000 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14001 (build-system python-build-system)
14002 (arguments
14003 ;; Pyro is not compatible with Python 3
14004 `(#:python ,python-2
14005 ;; Pyro has no test cases for automatic execution
14006 #:tests? #f))
14007 (home-page "http://pythonhosted.org/Pyro/")
14008 (synopsis "Distributed object manager for Python")
14009 (description "Pyro is a Distributed Object Technology system
14010 written in Python that is designed to be easy to use. It resembles
14011 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14012 which is a system and language independent Distributed Object Technology
14013 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14014 longer maintained. New projects should use Pyro4 instead, which
14015 is the new Pyro version that is actively developed.")
14016 (license license:expat)))
14017
14018 (define-public python2-scientific
14019 (package
14020 (name "python2-scientific")
14021 (version "2.9.4")
14022 (source
14023 (origin
14024 (method url-fetch)
14025 (uri (string-append "https://bitbucket.org/khinsen/"
14026 "scientificpython/downloads/ScientificPython-"
14027 version ".tar.gz"))
14028 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14029 (sha256
14030 (base32
14031 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14032 (build-system python-build-system)
14033 (inputs
14034 `(("netcdf" ,netcdf)))
14035 (propagated-inputs
14036 `(("python-numpy" ,python2-numpy-1.8)
14037 ("python-pyro" ,python2-pyro)))
14038 (arguments
14039 ;; ScientificPython is not compatible with Python 3
14040 `(#:python ,python-2
14041 #:tests? #f ; No test suite
14042 #:phases
14043 (modify-phases %standard-phases
14044 (replace 'build
14045 (lambda* (#:key inputs #:allow-other-keys)
14046 (invoke "python" "setup.py" "build"
14047 (string-append "--netcdf_prefix="
14048 (assoc-ref inputs "netcdf"))))))))
14049 (home-page "https://bitbucket.org/khinsen/scientificpython")
14050 (synopsis "Python modules for scientific computing")
14051 (description "ScientificPython is a collection of Python modules that are
14052 useful for scientific computing. Most modules are rather general (Geometry,
14053 physical units, automatic derivatives, ...) whereas others are more
14054 domain-specific (e.g. netCDF and PDB support). The library is currently
14055 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14056 (license license:cecill-c)))
14057
14058 (define-public python2-mmtk
14059 (package
14060 (name "python2-mmtk")
14061 (version "2.7.11")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (string-append "https://bitbucket.org/khinsen/"
14066 "mmtk/downloads/MMTK-" version ".tar.gz"))
14067 (file-name (string-append "MMTK-" version ".tar.gz"))
14068 (sha256
14069 (base32
14070 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14071 (build-system python-build-system)
14072 (native-inputs
14073 `(("netcdf" ,netcdf)))
14074 (propagated-inputs
14075 `(("python-scientific" ,python2-scientific)
14076 ("python-tkinter" ,python-2 "tk")))
14077 (arguments
14078 `(#:python ,python-2
14079 #:tests? #f
14080 #:phases
14081 (modify-phases %standard-phases
14082 (add-before 'build 'includes-from-scientific
14083 (lambda* (#:key inputs #:allow-other-keys)
14084 (mkdir-p "Include/Scientific")
14085 (copy-recursively
14086 (string-append
14087 (assoc-ref inputs "python-scientific")
14088 "/include/python2.7/Scientific")
14089 "Include/Scientific"))))))
14090 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14091 (synopsis "Python library for molecular simulation")
14092 (description "MMTK is a library for molecular simulations with an emphasis
14093 on biomolecules. It provides widely used methods such as Molecular Dynamics
14094 and normal mode analysis, but also basic routines for implementing new methods
14095 for simulation and analysis. The library is currently not actively maintained
14096 and works only with Python 2 and NumPy < 1.9.")
14097 (license license:cecill-c)))
14098
14099 (define-public python-phonenumbers
14100 (package
14101 (name "python-phonenumbers")
14102 (version "8.9.1")
14103 (source
14104 (origin
14105 (method url-fetch)
14106 (uri (pypi-uri "phonenumbers" version))
14107 (sha256
14108 (base32
14109 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14110 (build-system python-build-system)
14111 (home-page
14112 "https://github.com/daviddrysdale/python-phonenumbers")
14113 (synopsis
14114 "Python library for dealing with international phone numbers")
14115 (description
14116 "This package provides a Python port of Google's libphonenumber library.")
14117 (license license:asl2.0)))
14118
14119 (define-public python2-phonenumbers
14120 (package-with-python2 python-phonenumbers))
14121
14122 (define-public python-send2trash
14123 (package
14124 (name "python-send2trash")
14125 (version "1.5.0")
14126 (source
14127 (origin (method git-fetch)
14128 ;; Source tarball on PyPI doesn't include tests.
14129 (uri (git-reference
14130 (url "https://github.com/hsoft/send2trash.git")
14131 (commit version)))
14132 (file-name (git-file-name name version))
14133 (sha256
14134 (base32
14135 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14136 (build-system python-build-system)
14137 (arguments
14138 '(#:phases
14139 (modify-phases %standard-phases
14140 (add-before 'check 'pre-check
14141 (lambda _
14142 (mkdir-p "/tmp/foo")
14143 (setenv "HOME" "/tmp/foo")
14144 #t)))))
14145 (home-page "https://github.com/hsoft/send2trash")
14146 (synopsis "Send files to the user's @file{~/Trash} directory")
14147 (description "This package provides a Python library to send files to the
14148 user's @file{~/Trash} directory.")
14149 (properties `((python2-variant . ,(delay python2-send2trash))))
14150 (license license:bsd-3)))
14151
14152 (define-public python2-send2trash
14153 (package
14154 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14155 (arguments
14156 (substitute-keyword-arguments (package-arguments python-send2trash)
14157 ((#:phases phases)
14158 `(modify-phases ,phases
14159 (add-before 'check 'setenv
14160 (lambda _
14161 (setenv "PYTHONPATH"
14162 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14163 #t))))))))
14164
14165 (define-public python-yapf
14166 (package
14167 (name "python-yapf")
14168 (version "0.24.0")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 (uri (pypi-uri "yapf" version))
14173 (sha256
14174 (base32
14175 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14176 (build-system python-build-system)
14177 (home-page "https://github.com/google/yapf")
14178 (synopsis "Formatter for Python code")
14179 (description "YAPF is a formatter for Python code. It's based off of
14180 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14181 takes the code and reformats it to the best formatting that conforms to the
14182 style guide, even if the original code didn't violate the style guide.")
14183 (license license:asl2.0)))
14184
14185 (define-public python2-yapf
14186 (package-with-python2 python-yapf))
14187
14188 (define-public python-gyp
14189 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14190 (revision "0"))
14191 (package
14192 (name "python-gyp")
14193 ;; Google does not release versions,
14194 ;; based on second most recent commit date.
14195 (version (git-version "0.0.0" revision commit))
14196 (source
14197 (origin
14198 ;; Google does not release tarballs,
14199 ;; git checkout is needed.
14200 (method git-fetch)
14201 (uri (git-reference
14202 (url "https://chromium.googlesource.com/external/gyp")
14203 (commit commit)))
14204 (file-name (git-file-name name version))
14205 (sha256
14206 (base32
14207 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14208 (build-system python-build-system)
14209 (home-page "https://gyp.gsrc.io/")
14210 (synopsis "GYP is a Meta-Build system")
14211 (description
14212 "GYP builds build systems for large, cross platform applications.
14213 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14214 files, and Makefiles.")
14215 (license license:bsd-3))))
14216
14217 (define-public python2-gyp
14218 (package-with-python2 python-gyp))
14219
14220 (define-public python-whatever
14221 (package
14222 (name "python-whatever")
14223 (version "0.5")
14224 (source
14225 (origin
14226 (method url-fetch)
14227 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14228 ".tar.gz"))
14229 (sha256
14230 (base32
14231 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14232 (file-name (string-append name "-" version ".tar.gz"))))
14233 (build-system python-build-system)
14234 (arguments
14235 `(#:phases
14236 (modify-phases %standard-phases
14237 (replace 'check
14238 (lambda _
14239 (invoke "py.test"))))))
14240 (native-inputs
14241 `(("python-pytest" ,python-pytest)))
14242 (home-page "http://github.com/Suor/whatever")
14243 (synopsis "Make anonymous functions by partial application of operators")
14244 (description "@code{whatever} provides an easy way to make anonymous
14245 functions by partial application of operators.")
14246 (license license:bsd-3)))
14247
14248 (define-public python2-whatever
14249 (package-with-python2 python-whatever))
14250
14251 (define-public python-funcy
14252 (package
14253 (name "python-funcy")
14254 (version "1.11")
14255 (source
14256 (origin
14257 (method git-fetch)
14258 (uri (git-reference
14259 (url "https://github.com/Suor/funcy.git")
14260 (commit version)))
14261 (sha256
14262 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14263 (file-name (git-file-name name version))))
14264 (build-system python-build-system)
14265 (arguments
14266 `(#:phases
14267 (modify-phases %standard-phases
14268 (replace 'check
14269 (lambda _
14270 (invoke "py.test"))))))
14271 (native-inputs
14272 `(("python-pytest" ,python-pytest)
14273 ("python-whatever" ,python-whatever)))
14274 (home-page "http://github.com/Suor/funcy")
14275 (synopsis "Functional tools")
14276 (description "@code{funcy} is a library that provides functional tools.
14277 Examples are:
14278 @enumerate
14279 @item merge - Merges collections of the same type
14280 @item walk - Type-preserving map
14281 @item select - Selects a part of a collection
14282 @item take - Takes the first n items of a collection
14283 @item first - Takes the first item of a collection
14284 @item remove - Predicated-removes items of a collection
14285 @item concat - Concatenates two collections
14286 @item flatten - Flattens a collection with subcollections
14287 @item distinct - Returns only distinct items
14288 @item split - Predicated-splits a collection
14289 @item split_at - Splits a collection at a given item
14290 @item group_by - Groups items by group
14291 @item pairwise - Pairs off adjacent items
14292 @item partial - Partially-applies a function
14293 @item curry - Curries a function
14294 @item compose - Composes functions
14295 @item complement - Complements a predicate
14296 @item all_fn - \"all\" with predicate
14297 @end enumerate")
14298 (license license:bsd-3)))
14299
14300 (define-public python2-funcy
14301 (package-with-python2 python-funcy))
14302
14303 (define-public python-isoweek
14304 (package
14305 (name "python-isoweek")
14306 (version "1.3.3")
14307 (source
14308 (origin
14309 (method url-fetch)
14310 (uri (pypi-uri "isoweek" version))
14311 (sha256
14312 (base32
14313 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14314 (build-system python-build-system)
14315 (home-page "https://github.com/gisle/isoweek")
14316 (synopsis "Objects representing a week")
14317 (description "The @code{isoweek} module provide the class Week that
14318 implements the week definition of ISO 8601. This standard also defines
14319 a notation for identifying weeks; yyyyWww (where the W is a literal).
14320 Week instances stringify to this form.")
14321 (license license:bsd-3)))
14322
14323 (define-public python2-isoweek
14324 (package-with-python2 python-isoweek))
14325
14326 (define-public python-tokenize-rt
14327 (package
14328 (name "python-tokenize-rt")
14329 (version "2.0.1")
14330 (source
14331 (origin
14332 (method url-fetch)
14333 (uri (pypi-uri "tokenize-rt" version))
14334 (sha256
14335 (base32
14336 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14337 (build-system python-build-system)
14338 (home-page "https://github.com/asottile/tokenize-rt")
14339 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14340 (description
14341 "This Python library is a wrapper around @code{tokenize} from the Python
14342 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14343 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14344 and @code{tokens_to_src} to roundtrip.")
14345 (license license:expat)))
14346
14347 (define-public python-future-fstrings
14348 (package
14349 (name "python-future-fstrings")
14350 (version "0.4.1")
14351 (source
14352 (origin
14353 (method url-fetch)
14354 (uri (pypi-uri "future_fstrings" version))
14355 (sha256
14356 (base32
14357 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14358 (build-system python-build-system)
14359 (propagated-inputs
14360 `(("python-tokenize-rt" ,python-tokenize-rt)))
14361 (home-page "https://github.com/asottile/future-fstrings")
14362 (synopsis "Backport of fstrings to Python < 3.6")
14363 (description
14364 "This package provides a UTF-8 compatible encoding
14365 @code{future_fstrings}, which performs source manipulation. It decodes the
14366 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14367 @code{f} strings.")
14368 (license license:expat)))
14369
14370 (define-public python-typed-ast
14371 (package
14372 (name "python-typed-ast")
14373 (version "1.3.5")
14374 (source
14375 (origin
14376 (method url-fetch)
14377 (uri (pypi-uri "typed-ast" version))
14378 (sha256
14379 (base32
14380 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14381 (build-system python-build-system)
14382 (arguments
14383 `(#:modules ((guix build utils)
14384 (guix build python-build-system)
14385 (ice-9 ftw)
14386 (srfi srfi-1)
14387 (srfi srfi-26))
14388 #:phases
14389 (modify-phases %standard-phases
14390 (replace 'check
14391 (lambda _
14392 (let ((cwd (getcwd)))
14393 (setenv "PYTHONPATH"
14394 (string-append cwd "/build/"
14395 (find (cut string-prefix? "lib" <>)
14396 (scandir (string-append cwd "/build")))
14397 ":"
14398 (getenv "PYTHONPATH"))))
14399 (invoke "pytest")
14400 #t)))))
14401 (native-inputs `(("python-pytest" ,python-pytest)))
14402 (home-page "https://github.com/python/typed_ast")
14403 (synopsis "Fork of Python @code{ast} modules with type comment support")
14404 (description "This package provides a parser similar to the standard
14405 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14406 include PEP 484 type comments and are independent of the version of Python
14407 under which they are run. The @code{typed_ast} parsers produce the standard
14408 Python AST (plus type comments), and are both fast and correct, as they are
14409 based on the CPython 2.7 and 3.7 parsers.")
14410 ;; See the file "LICENSE" for the details.
14411 (license (list license:psfl
14412 license:asl2.0
14413 license:expat)))) ;ast27/Parser/spark.py
14414
14415 (define-public python-typing
14416 (package
14417 (name "python-typing")
14418 (version "3.6.6")
14419 (source
14420 (origin
14421 (method url-fetch)
14422 (uri (pypi-uri "typing" version))
14423 (sha256
14424 (base32
14425 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14426 (build-system python-build-system)
14427 (home-page "https://docs.python.org/3/library/typing.html")
14428 (synopsis "Type hints for Python")
14429 (description "This is a backport of the standard library @code{typing}
14430 module to Python versions older than 3.5. Typing defines a standard notation
14431 for Python function and variable type annotations. The notation can be used
14432 for documenting code in a concise, standard format, and it has been designed
14433 to also be used by static and runtime type checkers, static analyzers, IDEs
14434 and other tools.")
14435 (license license:psfl)))
14436
14437 (define-public python2-typing
14438 (package-with-python2 python-typing))
14439
14440 (define-public python-typing-extensions
14441 (package
14442 (name "python-typing-extensions")
14443 (version "3.7.2")
14444 (source
14445 (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "typing_extensions" version))
14448 (sha256
14449 (base32
14450 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14451 (build-system python-build-system)
14452 (home-page
14453 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14454 (synopsis "Experimental type hints for Python")
14455 (description
14456 "The typing_extensions module contains additional @code{typing} hints not
14457 yet present in the of the @code{typing} standard library.
14458 Included are implementations of:
14459 @enumerate
14460 @item ClassVar
14461 @item ContextManager
14462 @item Counter
14463 @item DefaultDict
14464 @item Deque
14465 @item NewType
14466 @item NoReturn
14467 @item overload
14468 @item Protocol
14469 @item runtime
14470 @item Text
14471 @item Type
14472 @item TYPE_CHECKING
14473 @item AsyncGenerator
14474 @end enumerate\n")
14475 (license license:psfl)))
14476
14477 (define-public bpython
14478 (package
14479 (name "bpython")
14480 (version "0.17.1")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "bpython" version))
14485 (sha256
14486 (base32
14487 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14488 (build-system python-build-system)
14489 (arguments
14490 `(#:phases
14491 (modify-phases %standard-phases
14492 (add-after 'unpack 'remove-failing-test
14493 (lambda _
14494 ;; Remove failing test. FIXME: make it pass
14495 (delete-file "bpython/test/test_args.py")
14496 #t))
14497 (add-after 'wrap 'add-aliases
14498 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14499 (lambda* (#:key outputs #:allow-other-keys)
14500 (let ((out (assoc-ref outputs "out")))
14501 (for-each
14502 (lambda (old new)
14503 (symlink old (string-append out "/bin/" new)))
14504 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14505 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14506 #t)))))
14507 (propagated-inputs
14508 `(("python-pygments" ,python-pygments)
14509 ("python-requests" ,python-requests)
14510 ("python-babel" ,python-babel) ; optional, for internationalization
14511 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14512 ("python-greenlet" ,python-greenlet)
14513 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14514 ("python-six" ,python-six)))
14515 (native-inputs
14516 `(("python-sphinx" ,python-sphinx)
14517 ("python-mock" ,python-mock)))
14518 (home-page "https://bpython-interpreter.org/")
14519 (synopsis "Fancy interface to the Python interpreter")
14520 (description "Bpython is a fancy interface to the Python
14521 interpreter. bpython's main features are
14522
14523 @enumerate
14524 @item in-line syntax highlighting,
14525 @item readline-like autocomplete with suggestions displayed as you type,
14526 @item expected parameter list for any Python function,
14527 @item \"rewind\" function to pop the last line of code from memory and
14528 re-evaluate,
14529 @item send the code you've entered off to a pastebin,
14530 @item save the code you've entered to a file, and
14531 @item auto-indentation.
14532 @end enumerate")
14533 (license license:expat)))
14534
14535 (define-public bpython2
14536 (let ((base (package-with-python2
14537 (strip-python2-variant bpython))))
14538 (package (inherit base)
14539 (name "bpython2")
14540 (arguments
14541 `(#:python ,python-2
14542 #:phases
14543 (modify-phases %standard-phases
14544 (add-after 'unpack 'remove-failing-test
14545 (lambda _
14546 ;; Remove failing test. FIXME: make it pass
14547 (delete-file "bpython/test/test_args.py")
14548 ;; Disable failing test-cases (renaming inhibits they are
14549 ;; discovered)
14550 (substitute* "bpython/test/test_curtsies_repl.py"
14551 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14552 (string-append a "xxx_off_" b))
14553 (("^(\\s*def )(test_complex\\W)" _ a b)
14554 (string-append a "xxx_off_" b)))
14555 #t))
14556 (add-before 'build 'rename-scripts
14557 ;; rename the scripts to bypthon2, bpdb2, etc.
14558 (lambda _
14559 (substitute* "setup.py"
14560 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14561 (string-append name "2" rest "\n"))
14562 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14563 (string-append name "2" (or sub "") rest "\n")))
14564 #t))))))))
14565
14566 (define-public python-pyinotify
14567 (package
14568 (name "python-pyinotify")
14569 (version "0.9.6")
14570 (source (origin
14571 (method url-fetch)
14572 (uri (pypi-uri "pyinotify" version))
14573 (sha256
14574 (base32
14575 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14576 (build-system python-build-system)
14577 (arguments `(#:tests? #f)) ;no tests
14578 (home-page "https://github.com/seb-m/pyinotify")
14579 (synopsis "Python library for monitoring inotify events")
14580 (description
14581 "@code{pyinotify} provides a Python interface for monitoring
14582 file system events on Linux.")
14583 (license license:expat)))
14584
14585 (define-public python2-pyinotify
14586 (package-with-python2 python-pyinotify))
14587
14588 ;; Ada parser uses this version.
14589 (define-public python2-quex-0.67.3
14590 (package
14591 (name "python2-quex")
14592 (version "0.67.3")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14597 (version-major+minor version)
14598 "/quex-" version ".zip"))
14599 (sha256
14600 (base32
14601 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14602 (build-system python-build-system)
14603 (native-inputs
14604 `(("unzip" ,unzip)))
14605 (arguments
14606 `(#:python ,python-2
14607 #:tests? #f
14608 #:phases
14609 (modify-phases %standard-phases
14610 (delete 'configure)
14611 (delete 'build)
14612 (replace 'install
14613 (lambda* (#:key outputs #:allow-other-keys)
14614 (let* ((out (assoc-ref outputs "out"))
14615 (share/quex (string-append out "/share/quex"))
14616 (bin (string-append out "/bin")))
14617 (copy-recursively "." share/quex)
14618 (mkdir-p bin)
14619 (symlink (string-append share/quex "/quex-exe.py")
14620 (string-append bin "/quex"))
14621 #t))))))
14622 (native-search-paths
14623 (list (search-path-specification
14624 (variable "QUEX_PATH")
14625 (files '("share/quex")))))
14626 (home-page "http://quex.sourceforge.net/")
14627 (synopsis "Lexical analyzer generator in Python")
14628 (description "@code{quex} is a lexical analyzer generator in Python.")
14629 (license license:lgpl2.1+))) ; Non-military
14630
14631 (define-public python2-quex
14632 (package (inherit python2-quex-0.67.3)
14633 (name "python2-quex")
14634 (version "0.68.1")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14639 (sha256
14640 (base32
14641 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14642 (file-name (string-append name "-" version ".tar.gz"))))))
14643
14644 (define-public python-more-itertools
14645 (package
14646 (name "python-more-itertools")
14647 (version "4.3.0")
14648 (source
14649 (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "more-itertools" version))
14652 (sha256
14653 (base32
14654 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14655 (build-system python-build-system)
14656 (arguments
14657 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14658 (%current-target-system)))
14659 '("armhf" "i686"))
14660 '(#:phases
14661 (modify-phases %standard-phases
14662 ;; This is required for 32-bit hardware.
14663 ;; TODO: Try to remove this when upgrading.
14664 (add-after 'unpack 'patch-test
14665 (lambda _
14666 (substitute* "more_itertools/tests/test_more.py"
14667 (("10 \\*\\* 10") "9 ** 9"))
14668 #t))))
14669 '())))
14670 (propagated-inputs
14671 `(("python-six" ,python-six-bootstrap)))
14672 (home-page "https://github.com/erikrose/more-itertools")
14673 (synopsis "More routines for operating on iterables, beyond itertools")
14674 (description "Python's built-in @code{itertools} module implements a
14675 number of iterator building blocks inspired by constructs from APL, Haskell,
14676 and SML. @code{more-itertools} includes additional building blocks for
14677 working with iterables.")
14678 (license license:expat)))
14679
14680 (define-public python2-more-itertools
14681 (package-with-python2 python-more-itertools))
14682
14683 (define-public python-latexcodec
14684 (package
14685 (name "python-latexcodec")
14686 (version "1.0.6")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (pypi-uri "latexcodec" version))
14691 (sha256
14692 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14693 (build-system python-build-system)
14694 (inputs
14695 `(("python-six" ,python-six)))
14696 (home-page "https://readthedocs.org/projects/latexcodec/")
14697 (synopsis "Work with LaTeX code in Python")
14698 (description "Lexer and codec to work with LaTeX code in Python.")
14699 (license license:expat)))
14700
14701 (define-public python-pybtex
14702 (package
14703 (name "python-pybtex")
14704 (version "0.22.2")
14705 (source
14706 (origin
14707 (method url-fetch)
14708 (uri (pypi-uri "pybtex" version))
14709 (sha256
14710 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14711 (build-system python-build-system)
14712 (native-inputs
14713 `(("python-nose" ,python-nose)))
14714 (inputs
14715 `(("python-latexcodec" ,python-latexcodec)
14716 ("python-pyyaml" ,python-pyyaml)
14717 ("python-six" ,python-six)))
14718 (arguments
14719 `(#:test-target "nosetests"))
14720 (home-page "https://pybtex.org/")
14721 (synopsis "BibTeX-compatible bibliography processor")
14722 (description "Pybtex is a BibTeX-compatible bibliography processor written
14723 in Python. You can simply type pybtex instead of bibtex.")
14724 (license license:expat)))
14725
14726 (define-public python-onetimepass
14727 (package
14728 (name "python-onetimepass")
14729 (version "1.0.1")
14730 (source
14731 (origin
14732 (method url-fetch)
14733 (uri (pypi-uri "onetimepass" version))
14734 (sha256
14735 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14736 (build-system python-build-system)
14737 (propagated-inputs `(("python-six" ,python-six)))
14738 (home-page "https://github.com/tadeck/onetimepass/")
14739 (synopsis "One-time password library")
14740 (description "Python one-time password library for HMAC-based (HOTP) and
14741 time-based (TOTP) passwords.")
14742 (license license:expat)))
14743
14744 (define-public python-parso
14745 (package
14746 (name "python-parso")
14747 (version "0.5.1")
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "parso" version))
14752 (sha256
14753 (base32
14754 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14755 (native-inputs
14756 `(("python-pytest" ,python-pytest)))
14757 (build-system python-build-system)
14758 (arguments
14759 `(#:phases (modify-phases %standard-phases
14760 (replace 'check
14761 (lambda _ (invoke "pytest" "-vv"))))))
14762 (home-page "https://github.com/davidhalter/parso")
14763 (synopsis "Python Parser")
14764 (description "Parso is a Python parser that supports error recovery and
14765 round-trip parsing for different Python versions (in multiple Python versions).
14766 Parso is also able to list multiple syntax errors in your Python file.")
14767 (license license:expat)))
14768
14769 (define-public python2-parso
14770 (package-with-python2 python-parso))
14771
14772 (define-public python-async-generator
14773 (package
14774 (name "python-async-generator")
14775 (version "1.10")
14776 (source
14777 (origin
14778 (method url-fetch)
14779 (uri (pypi-uri "async_generator" version))
14780 (sha256
14781 (base32
14782 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14783 (build-system python-build-system)
14784 (native-inputs
14785 `(("python-pytest" ,python-pytest)))
14786 (home-page "https://github.com/python-trio/async_generator")
14787 (synopsis "Async generators and context managers for Python 3.5+")
14788 (description "@code{async_generator} back-ports Python 3.6's native async
14789 generators and Python 3.7's context managers into Python 3.5.")
14790 ;; Dual licensed.
14791 (license (list license:expat license:asl2.0))))
14792
14793 (define-public python-async-timeout
14794 (package
14795 (name "python-async-timeout")
14796 (version "3.0.1")
14797 (source
14798 (origin
14799 (method url-fetch)
14800 (uri (pypi-uri "async-timeout" version))
14801 (sha256
14802 (base32
14803 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14804 (build-system python-build-system)
14805 (home-page "https://github.com/aio-libs/async_timeout/")
14806 (synopsis "Timeout context manager for asyncio programs")
14807 (description "@code{async-timeout} provides a timeout timeout context
14808 manager compatible with @code{asyncio}.")
14809 (license license:asl2.0)))
14810
14811 (define-public python-glob2
14812 (package
14813 (name "python-glob2")
14814 (version "0.6")
14815 (source
14816 (origin
14817 (method git-fetch)
14818 (uri (git-reference
14819 (url "https://github.com/miracle2k/python-glob2.git")
14820 (commit version)))
14821 (file-name (git-file-name name version))
14822 (sha256
14823 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14824 (build-system python-build-system)
14825 (home-page "https://github.com/miracle2k/python-glob2/")
14826 (synopsis "Extended Version of the python buildin glob module")
14827 (description "This is an extended version of the Python
14828 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14829 adds:
14830
14831 @itemize
14832 @item The ability to capture the text matched by glob patterns, and return
14833 those matches alongside the file names.
14834 @item A recursive @code{**} globbing syntax, akin for example to the
14835 @code{globstar} option of Bash.
14836 @item The ability to replace the file system functions used, in order to glob
14837 on virtual file systems.
14838 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14839 @end itemize
14840
14841 Glob2 currently based on the glob code from Python 3.3.1.")
14842 (license license:bsd-2)))
14843
14844 (define-public python2-glob2
14845 (package-with-python2 python-glob2))
14846
14847 (define-public python-gipc
14848 (package
14849 (name "python-gipc")
14850 (version "0.6.0")
14851 (source
14852 (origin
14853 (method url-fetch)
14854 (uri (pypi-uri "gipc" version ".zip"))
14855 (sha256
14856 (base32
14857 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14858 (build-system python-build-system)
14859 (native-inputs
14860 `(("unzip" ,unzip)))
14861 (propagated-inputs
14862 `(("python-gevent" ,python-gevent)))
14863 (home-page "http://gehrcke.de/gipc")
14864 (synopsis "Child process management in the context of gevent")
14865 (description "Usage of Python's multiprocessing package in a
14866 gevent-powered application may raise problems. With @code{gipc},
14867 process-based child processes can safely be created anywhere within a
14868 gevent-powered application.")
14869 (license license:expat)))
14870
14871 (define-public python2-gipc
14872 (package-with-python2 python-gipc))
14873
14874 (define-public python-fusepy
14875 (package
14876 (name "python-fusepy")
14877 (version "2.0.4")
14878 (source
14879 (origin
14880 (method url-fetch)
14881 (uri (pypi-uri "fusepy" version))
14882 (sha256
14883 (base32
14884 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14885 (build-system python-build-system)
14886 (arguments
14887 `(#:phases
14888 (modify-phases %standard-phases
14889 (add-before 'build 'set-library-file-name
14890 (lambda* (#:key inputs #:allow-other-keys)
14891 (let ((fuse (assoc-ref inputs "fuse")))
14892 (substitute* "fuse.py"
14893 (("find_library\\('fuse'\\)")
14894 (string-append "'" fuse "/lib/libfuse.so'")))
14895 #t))))))
14896 (propagated-inputs
14897 `(("fuse" ,fuse)))
14898 (home-page "https://github.com/fusepy/fusepy")
14899 (synopsis "Simple ctypes bindings for FUSE")
14900 (description "Python module that provides a simple interface to FUSE and
14901 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14902 (license license:isc)))
14903
14904 (define-public python2-fusepy
14905 (package-with-python2 python-fusepy))
14906
14907 (define-public python2-gdrivefs
14908 (package
14909 (name "python2-gdrivefs")
14910 (version "0.14.9")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "gdrivefs" version))
14915 (sha256
14916 (base32
14917 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14918 (build-system python-build-system)
14919 (arguments
14920 `(#:python ,python-2
14921 #:phases
14922 (modify-phases %standard-phases
14923 (add-before 'build 'patch-setup-py
14924 (lambda _
14925 ;; Update requirements from dependency==version
14926 ;; to dependency>=version
14927 (substitute* "gdrivefs/resources/requirements.txt"
14928 (("==") ">="))
14929 #t)))))
14930 (native-inputs
14931 `(("python2-gipc" ,python2-gipc)
14932 ("python2-gevent" ,python2-gevent)
14933 ("python2-greenlet" ,python2-greenlet)
14934 ("python2-httplib2" ,python2-httplib2)
14935 ("python2-uritemplate" ,python2-uritemplate)
14936 ("python2-oauth2client" ,python2-oauth2client)
14937 ("python2-six" ,python2-six)))
14938 (propagated-inputs
14939 `(("python2-dateutil" ,python2-dateutil)
14940 ("python2-fusepy" ,python2-fusepy)
14941 ("python2-google-api-client" ,python2-google-api-client)))
14942 (home-page "https://github.com/dsoprea/GDriveFS")
14943 (synopsis "Mount Google Drive as a local file system")
14944 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14945 under Python 2.7.")
14946 (license license:gpl2)))
14947
14948 (define-public pybind11
14949 (package
14950 (name "pybind11")
14951 (version "2.2.4")
14952 (source (origin
14953 (method git-fetch)
14954 (uri (git-reference
14955 (url "https://github.com/pybind/pybind11.git")
14956 (commit (string-append "v" version))))
14957 (sha256
14958 (base32
14959 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14960 (file-name (git-file-name name version))))
14961 (build-system cmake-build-system)
14962 (native-inputs
14963 `(("python" ,python)
14964 ("python-pytest" ,python-pytest)))
14965 (arguments
14966 `(#:test-target "check"))
14967 (home-page "https://github.com/pybind/pybind11/")
14968 (synopsis "Seamless operability between C++11 and Python")
14969 (description "pybind11 is a lightweight header-only library that exposes
14970 C++ types in Python and vice versa, mainly to create Python bindings of
14971 existing C++ code. Its goals and syntax are similar to the excellent
14972 Boost.Python library by David Abrahams: to minimize boilerplate code in
14973 traditional extension modules by inferring type information using compile-time
14974 introspection.")
14975 (license license:expat)))
14976
14977 (define-public python-fasteners
14978 (package
14979 (name "python-fasteners")
14980 (version "0.14.1")
14981 (source
14982 (origin
14983 (method url-fetch)
14984 (uri (pypi-uri "fasteners" version))
14985 (sha256
14986 (base32
14987 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14988 (build-system python-build-system)
14989 (propagated-inputs
14990 `(("python-monotonic" ,python-monotonic)
14991 ("python-six" ,python-six)
14992 ("python-testtools" ,python-testtools)))
14993 (home-page "https://github.com/harlowja/fasteners")
14994 (synopsis "Python package that provides useful locks")
14995 (description
14996 "This package provides a Python program that provides following locks:
14997
14998 @itemize
14999 @item Locking decorator
15000 @item Reader-writer locks
15001 @item Inter-process locks
15002 @item Generic helpers
15003 @end itemize\n")
15004 (properties `((python2-variant . ,(delay python2-fasteners))))
15005 (license license:asl2.0)))
15006
15007 (define-public python2-fasteners
15008 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15009 (package
15010 (inherit base)
15011 (propagated-inputs
15012 `(("python2-futures" ,python2-futures)
15013 ,@(package-propagated-inputs base))))))
15014
15015 (define-public python-requests-file
15016 (package
15017 (name "python-requests-file")
15018 (version "1.4.3")
15019 (source
15020 (origin
15021 (method url-fetch)
15022 (uri (pypi-uri "requests-file" version))
15023 (sha256
15024 (base32
15025 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15026 (build-system python-build-system)
15027 (propagated-inputs
15028 `(("python-requests" ,python-requests)
15029 ("python-six" ,python-six)))
15030 (home-page
15031 "https://github.com/dashea/requests-file")
15032 (synopsis "File transport adapter for Requests")
15033 (description
15034 "Requests-File is a transport adapter for use with the Requests Python
15035 library to allow local file system access via @code{file://} URLs.")
15036 (license license:asl2.0)))
15037
15038 (define-public python2-requests-file
15039 (package-with-python2 python-requests-file))
15040
15041 (define-public python-tldextract
15042 (package
15043 (name "python-tldextract")
15044 (version "2.2.0")
15045 (source
15046 (origin
15047 (method url-fetch)
15048 (uri (pypi-uri "tldextract" version))
15049 (sha256
15050 (base32
15051 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15052 (build-system python-build-system)
15053 (native-inputs
15054 `(("python-pytest" ,python-pytest)
15055 ("python-responses" ,python-responses)))
15056 (propagated-inputs
15057 `(("python-idna" ,python-idna)
15058 ("python-requests" ,python-requests)
15059 ("python-requests-file" ,python-requests-file)))
15060 (home-page
15061 "https://github.com/john-kurkowski/tldextract")
15062 (synopsis
15063 "Separate the TLD from the registered domain and subdomains of a URL")
15064 (description
15065 "TLDExtract accurately separates the TLD from the registered domain and
15066 subdomains of a URL, using the Public Suffix List. By default, this includes
15067 the public ICANN TLDs and their exceptions. It can optionally support the
15068 Public Suffix List's private domains as well.")
15069 (license license:bsd-3)))
15070
15071 (define-public python2-tldextract
15072 (package-with-python2 python-tldextract))
15073
15074 (define-public python-pynamecheap
15075 (package
15076 (name "python-pynamecheap")
15077 (version "0.0.3")
15078 (source
15079 (origin
15080 (method url-fetch)
15081 (uri (pypi-uri "PyNamecheap" version))
15082 (sha256
15083 (base32
15084 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15085 (build-system python-build-system)
15086 (propagated-inputs
15087 `(("python-requests" ,python-requests)))
15088 (home-page
15089 "https://github.com/Bemmu/PyNamecheap")
15090 (synopsis
15091 "Namecheap API client in Python")
15092 (description
15093 "PyNamecheap is a Namecheap API client in Python.")
15094 (license license:expat)))
15095
15096 (define-public python2-pynamecheap
15097 (package-with-python2 python-pynamecheap))
15098
15099 (define-public python-dns-lexicon
15100 (package
15101 (name "python-dns-lexicon")
15102 (version "2.4.0")
15103 (source
15104 (origin
15105 (method url-fetch)
15106 (uri (pypi-uri "dns-lexicon" version))
15107 (sha256
15108 (base32
15109 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15110 (build-system python-build-system)
15111 (arguments
15112 `(#:tests? #f)) ;requires internet access
15113 (propagated-inputs
15114 `(("python-future" ,python-future)
15115 ("python-pynamecheap" ,python-pynamecheap)
15116 ("python-requests" ,python-requests)
15117 ("python-tldextract" ,python-tldextract)
15118 ("python-urllib3" ,python-urllib3)))
15119 (home-page "https://github.com/AnalogJ/lexicon")
15120 (synopsis
15121 "Manipulate DNS records on various DNS providers")
15122 (description
15123 "Lexicon provides a way to manipulate DNS records on multiple DNS
15124 providers in a standardized way. It has a CLI but it can also be used as a
15125 Python library. It was designed to be used in automation, specifically with
15126 Let's Encrypt.")
15127 (license license:expat)))
15128
15129 (define-public python2-dns-lexicon
15130 (package-with-python2 python-dns-lexicon))
15131
15132 (define-public python-commandlines
15133 (package
15134 (name "python-commandlines")
15135 (version "0.4.1")
15136 (source
15137 (origin
15138 (method url-fetch)
15139 (uri (pypi-uri "commandlines" version))
15140 (sha256
15141 (base32
15142 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15143 (build-system python-build-system)
15144 (home-page "https://github.com/chrissimpkins/commandlines")
15145 (synopsis "Command line argument to object parsing library")
15146 (description
15147 "@code{Commandlines} is a Python library for command line application
15148 development that supports command line argument parsing, command string
15149 validation testing and application logic.")
15150 (license license:expat)))
15151
15152 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15153 ;; python-numba. They have a very unflexible relationship.
15154 (define-public python-numba
15155 (package
15156 (name "python-numba")
15157 (version "0.42.0")
15158 (source
15159 (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "numba" version))
15162 (sha256
15163 (base32
15164 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15165 (build-system python-build-system)
15166 (arguments
15167 `(#:modules ((guix build utils)
15168 (guix build python-build-system)
15169 (ice-9 ftw)
15170 (srfi srfi-1)
15171 (srfi srfi-26))
15172 #:phases
15173 (modify-phases %standard-phases
15174 (add-after 'unpack 'disable-proprietary-features
15175 (lambda _
15176 (setenv "NUMBA_DISABLE_HSA" "1")
15177 (setenv "NUMBA_DISABLE_CUDA" "1")
15178 #t))
15179 (add-after 'unpack 'remove-failing-tests
15180 (lambda _
15181 ;; FIXME: these tests fail for unknown reasons:
15182 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15183 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15184 (substitute* "numba/tests/test_dispatcher.py"
15185 (("def test(_non_writable_pycache)" _ m)
15186 (string-append "def guix_skip" m))
15187 (("def test(_non_creatable_pycache)" _ m)
15188 (string-append "def guix_skip" m))
15189 (("def test(_frozen)" _ m)
15190 (string-append "def guix_skip" m)))
15191
15192 ;; These tests fail because we don't run the tests from the build
15193 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15194 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15195 (substitute* "numba/tests/test_pycc.py"
15196 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15197 (string-append "def guix_skip" m)))
15198 #t))
15199 (replace 'check
15200 (lambda _
15201 (let ((cwd (getcwd)))
15202 (setenv "PYTHONPATH"
15203 (string-append cwd "/build/"
15204 (find (cut string-prefix? "lib" <>)
15205 (scandir (string-append cwd "/build")))
15206 ":"
15207 (getenv "PYTHONPATH")))
15208 ;; Something is wrong with the PYTHONPATH when running the
15209 ;; tests from the build directory, as it complains about not being
15210 ;; able to import certain modules.
15211 (with-directory-excursion "/tmp"
15212 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15213 #t)))))
15214 (propagated-inputs
15215 `(("python-llvmlite" ,python-llvmlite)
15216 ("python-numpy" ,python-numpy)
15217 ("python-singledispatch" ,python-singledispatch)))
15218 ;; Needed for tests.
15219 (inputs
15220 `(("python-jinja2" ,python-jinja2)
15221 ("python-pygments" ,python-pygments)))
15222 (home-page "https://numba.pydata.org")
15223 (synopsis "Compile Python code using LLVM")
15224 (description "Numba gives you the power to speed up your applications with
15225 high performance functions written directly in Python. With a few
15226 annotations, array-oriented and math-heavy Python code can be just-in-time
15227 compiled to native machine instructions, similar in performance to C, C++ and
15228 Fortran, without having to switch languages or Python interpreters.
15229
15230 Numba works by generating optimized machine code using the LLVM compiler
15231 infrastructure at import time, runtime, or statically (using the included pycc
15232 tool).")
15233 (license license:bsd-3)))
15234
15235 (define-public python-anndata
15236 (package
15237 (name "python-anndata")
15238 (version "0.6.18")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "anndata" version))
15243 (sha256
15244 (base32
15245 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15246 (build-system python-build-system)
15247 (propagated-inputs
15248 `(("python-h5py" ,python-h5py)
15249 ("python-natsort" ,python-natsort)
15250 ("python-pandas" ,python-pandas)
15251 ("python-scipy" ,python-scipy)))
15252 (home-page "https://github.com/theislab/anndata")
15253 (synopsis "Annotated data for data analysis pipelines")
15254 (description "Anndata is a package for simple (functional) high-level APIs
15255 for data analysis pipelines. In this context, it provides an efficient,
15256 scalable way of keeping track of data together with learned annotations and
15257 reduces the code overhead typically encountered when using a mostly
15258 object-oriented library such as @code{scikit-learn}.")
15259 (license license:bsd-3)))
15260
15261 (define-public python-dill
15262 (package
15263 (name "python-dill")
15264 (version "0.2.9")
15265 (source
15266 (origin
15267 (method url-fetch)
15268 (uri (pypi-uri "dill" version))
15269 (sha256
15270 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15271 (build-system python-build-system)
15272 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15273 (arguments '(#:tests? #f))
15274 (home-page "https://pypi.org/project/dill")
15275 (synopsis "Serialize all of Python")
15276 (description "Dill extends Python's @code{pickle} module for serializing
15277 and de-serializing Python objects to the majority of the built-in Python
15278 types. Dill provides the user the same interface as the @code{pickle} module,
15279 and also includes some additional features. In addition to pickling Python
15280 objects, @code{dill} provides the ability to save the state of an interpreter
15281 session in a single command. Hence, it would be feasible to save a
15282 interpreter session, close the interpreter, ship the pickled file to another
15283 computer, open a new interpreter, unpickle the session and thus continue from
15284 the saved state of the original interpreter session.")
15285 (license license:bsd-3)))
15286
15287 (define-public python-multiprocess
15288 (package
15289 (name "python-multiprocess")
15290 (version "0.70.6.1")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (pypi-uri "multiprocess" version))
15295 (sha256
15296 (base32
15297 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15298 (build-system python-build-system)
15299 (propagated-inputs
15300 `(("python-dill" ,python-dill)))
15301 (home-page "https://pypi.org/project/multiprocess")
15302 (synopsis "Multiprocessing and multithreading in Python")
15303 (description
15304 "This package is a fork of the multiprocessing Python package, a package
15305 which supports the spawning of processes using the API of the standard
15306 library's @code{threading} module.")
15307 (license license:bsd-3)))
15308
15309 (define-public python-toolz
15310 (package
15311 (name "python-toolz")
15312 (version "0.9.0")
15313 (source
15314 (origin
15315 (method url-fetch)
15316 (uri (pypi-uri "toolz" version))
15317 (sha256
15318 (base32
15319 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15320 (build-system python-build-system)
15321 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15322 ;; unregistered loader type"
15323 (arguments '(#:tests? #f))
15324 (home-page "https://github.com/pytoolz/toolz/")
15325 (synopsis "List processing tools and functional utilities")
15326 (description
15327 "This package provides a set of utility functions for iterators,
15328 functions, and dictionaries.")
15329 (license license:bsd-3)))
15330
15331 (define-public python2-toolz
15332 (package-with-python2 python-toolz))
15333
15334 (define-public python-cytoolz
15335 (package
15336 (name "python-cytoolz")
15337 (version "0.9.0.1")
15338 (source
15339 (origin
15340 (method url-fetch)
15341 (uri (pypi-uri "cytoolz" version))
15342 (sha256
15343 (base32
15344 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15345 (build-system python-build-system)
15346 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15347 ;; 'exceptions'"
15348 (arguments '(#:tests? #f))
15349 (propagated-inputs
15350 `(("python-toolz" ,python-toolz)))
15351 (native-inputs
15352 `(("python-cython" ,python-cython)))
15353 (home-page "https://github.com/pytoolz/cytoolz")
15354 (synopsis "High performance functional utilities")
15355 (description
15356 "The cytoolz package implements the same API as provided by toolz. The
15357 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15358 that is accessible to other projects developed in Cython.")
15359 (license license:bsd-3)))
15360
15361 (define-public python-sortedcontainers
15362 (package
15363 (name "python-sortedcontainers")
15364 (version "2.0.4")
15365 (source
15366 (origin
15367 (method url-fetch)
15368 (uri (pypi-uri "sortedcontainers" version))
15369 (sha256
15370 (base32
15371 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15372 (build-system python-build-system)
15373 (native-inputs
15374 `(("python-tox" ,python-tox)))
15375 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15376 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15377 (description
15378 "This package provides a sorted collections library, written in
15379 pure-Python.")
15380 (license license:asl2.0)))
15381
15382 (define-public python-cloudpickle
15383 (package
15384 (name "python-cloudpickle")
15385 (version "0.6.1")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "cloudpickle" version))
15390 (sha256
15391 (base32
15392 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15393 (build-system python-build-system)
15394 ;; FIXME: there are 5 errors in 122 tests:
15395 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15396 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15397 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15398 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15399 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15400 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15401 (arguments '(#:tests? #f))
15402 (native-inputs
15403 `(("python-pytest" ,python-pytest)
15404 ("python-mock" ,python-mock)
15405 ("python-tornado" ,python-tornado)))
15406 (home-page "https://github.com/cloudpipe/cloudpickle")
15407 (synopsis "Extended pickling support for Python objects")
15408 (description
15409 "Cloudpickle makes it possible to serialize Python constructs not
15410 supported by the default pickle module from the Python standard library. It
15411 is especially useful for cluster computing where Python expressions are
15412 shipped over the network to execute on remote hosts, possibly close to the
15413 data.")
15414 (license license:bsd-3)))
15415
15416 (define-public python2-cloudpickle
15417 (package-with-python2 python-cloudpickle))
15418
15419 (define-public python-locket
15420 (package
15421 (name "python-locket")
15422 (version "0.2.0")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "locket" version))
15427 (sha256
15428 (base32
15429 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15430 (build-system python-build-system)
15431 (home-page "https://github.com/mwilliamson/locket.py")
15432 (synopsis "File-based locks for Python")
15433 (description
15434 "Locket implements a lock that can be used by multiple processes provided
15435 they use the same path.")
15436 (license license:bsd-2)))
15437
15438 (define-public python2-locket
15439 (package-with-python2 python-locket))
15440
15441 (define-public python-blosc
15442 (package
15443 (name "python-blosc")
15444 (version "1.5.1")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "blosc" version))
15449 (sha256
15450 (base32
15451 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15452 (build-system python-build-system)
15453 ;; FIXME: all tests pass, but then this error is printed:
15454 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15455 (arguments '(#:tests? #f))
15456 (propagated-inputs
15457 `(("python-numpy" ,python-numpy)))
15458 (home-page "https://github.com/blosc/python-blosc")
15459 (synopsis "Python wrapper for the Blosc data compressor library")
15460 (description "Blosc is a high performance compressor optimized for binary
15461 data. It has been designed to transmit data to the processor cache faster
15462 than the traditional, non-compressed, direct memory fetch approach via a
15463 @code{memcpy()} system call.
15464
15465 Blosc works well for compressing numerical arrays that contains data with
15466 relatively low entropy, like sparse data, time series, grids with
15467 regular-spaced values, etc.
15468
15469 This Python package wraps the Blosc library.")
15470 (license license:bsd-3)))
15471
15472 (define-public python2-blosc
15473 (package-with-python2 python-blosc))
15474
15475 (define-public python-partd
15476 (package
15477 (name "python-partd")
15478 (version "0.3.9")
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "partd" version))
15483 (sha256
15484 (base32
15485 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15486 (build-system python-build-system)
15487 (propagated-inputs
15488 `(("python-blosc" ,python-blosc)
15489 ("python-locket" ,python-locket)
15490 ("python-numpy" ,python-numpy)
15491 ("python-pandas" ,python-pandas)
15492 ("python-pyzmq" ,python-pyzmq)
15493 ("python-toolz" ,python-toolz)))
15494 (home-page "https://github.com/dask/partd/")
15495 (synopsis "Appendable key-value storage")
15496 (description "Partd stores key-value pairs. Values are raw bytes. We
15497 append on old values. Partd excels at shuffling operations.")
15498 (license license:bsd-3)))
15499
15500 (define-public python2-partd
15501 (package-with-python2 python-partd))
15502
15503 (define-public python-dask
15504 (package
15505 (name "python-dask")
15506 (version "1.2.2")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "dask" version))
15511 (sha256
15512 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15513 (build-system python-build-system)
15514 ;; A single test out of 5000+ fails. This test is marked as xfail when
15515 ;; pytest-xdist is used.
15516 (arguments
15517 `(#:phases
15518 (modify-phases %standard-phases
15519 (add-after 'unpack 'disable-broken-test
15520 (lambda _
15521 (substitute* "dask/tests/test_threaded.py"
15522 (("def test_interrupt\\(\\)" m)
15523 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15524 m)))
15525 (when (which "python2")
15526 ;; This test fails with recent Pandas:
15527 ;; <https://github.com/dask/dask/issues/3794>.
15528 (substitute* "dask/dataframe/tests/test_dataframe.py"
15529 (("def test_info\\(\\)" m)
15530 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15531 m))))
15532 #t))
15533 (replace 'check
15534 (lambda _ (invoke "pytest" "-vv"))))))
15535 (propagated-inputs
15536 `(("python-cloudpickle" ,python-cloudpickle)
15537 ("python-numpy" ,python-numpy)
15538 ("python-pandas" ,python-pandas)
15539 ("python-partd" ,python-partd)
15540 ("python-toolz" ,python-toolz)
15541 ("python-pyyaml" ,python-pyyaml)))
15542 (native-inputs
15543 `(("python-pytest" ,python-pytest)
15544 ("python-pytest-runner" ,python-pytest-runner)))
15545 (home-page "https://github.com/dask/dask/")
15546 (synopsis "Parallel computing with task scheduling")
15547 (description
15548 "Dask is a flexible parallel computing library for analytics. It
15549 consists of two components: dynamic task scheduling optimized for computation,
15550 and large data collections like parallel arrays, dataframes, and lists that
15551 extend common interfaces like NumPy, Pandas, or Python iterators to
15552 larger-than-memory or distributed environments. These parallel collections
15553 run on top of the dynamic task schedulers. ")
15554 (license license:bsd-3)))
15555
15556 (define-public python2-dask
15557 (package-with-python2 python-dask))
15558
15559 (define-public python-ilinkedlist
15560 (package
15561 (name "python-ilinkedlist")
15562 (version "0.4.0")
15563 (source
15564 (origin
15565 (method url-fetch)
15566 (uri (pypi-uri "ilinkedlist" version))
15567 (sha256
15568 (base32
15569 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15570 (build-system python-build-system)
15571 (native-inputs `(("python-pytest" ,python-pytest)))
15572 (inputs `(("python" ,python)))
15573 (home-page "https://github.com/luther9/ilinkedlist-py")
15574 (synopsis "Immutable linked list library")
15575 (description
15576 "This is a implementation of immutable linked lists for Python. It
15577 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15578 Since a linked list is treated as immutable, it is hashable, and its length
15579 can be retrieved in constant time. Some of the terminology is inspired by
15580 LISP. It is possible to create an improper list by creating a @code{Pair}
15581 with a non-list @code{cdr}.")
15582 (license license:gpl3+)))
15583
15584 (define-public python-readlike
15585 (package
15586 (name "python-readlike")
15587 (version "0.1.3")
15588 (source
15589 (origin
15590 (method url-fetch)
15591 (uri (pypi-uri "readlike" version))
15592 (sha256
15593 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15594 (build-system python-build-system)
15595 (home-page "https://github.com/jangler/readlike")
15596 (synopsis "GNU Readline-like line editing module")
15597 (description
15598 "This Python module provides line editing functions similar to the default
15599 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15600 @code{readline} package, this one allows access to those capabilties in settings
15601 outside of a standard command-line interface. It is especially well-suited to
15602 interfacing with Urwid, due to a shared syntax for describing key inputs.
15603
15604 Currently, all stateless Readline commands are implemented. Yanking and history
15605 are not supported.")
15606 (license license:expat)))
15607
15608 (define-public python2-readlike
15609 (package-with-python2 python-readlike))
15610
15611 (define-public python-reparser
15612 (package
15613 (name "python-reparser")
15614 (version "1.4.3")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "ReParser" version))
15619 (sha256
15620 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15621 (build-system python-build-system)
15622 (home-page "https://github.com/xmikos/reparser")
15623 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15624 (description
15625 "This Python library provides a simple lexer/parser for inline markup based
15626 on regular expressions.")
15627 (license license:expat)))
15628
15629 (define-public python2-reparser
15630 (let ((reparser (package-with-python2
15631 (strip-python2-variant python-reparser))))
15632 (package (inherit reparser)
15633 (propagated-inputs
15634 `(("python2-enum34" ,python2-enum34)
15635 ,@(package-propagated-inputs reparser))))))
15636
15637 (define-public python-precis-i18n
15638 (package
15639 (name "python-precis-i18n")
15640 (version "1.0.0")
15641 (source
15642 (origin
15643 (method url-fetch)
15644 (uri (pypi-uri "precis_i18n" version))
15645 (sha256
15646 (base32
15647 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15648 (build-system python-build-system)
15649 (home-page "https://github.com/byllyfish/precis_i18n")
15650 (synopsis "Implementation of the PRECIS framework")
15651 (description
15652 "This module implements the PRECIS Framework as described in RFC 8264,
15653 RFC 8265 and RFC 8266.")
15654 (license license:expat)))
15655
15656 (define-public python-absl-py
15657 (package
15658 (name "python-absl-py")
15659 (version "0.6.1")
15660 (source
15661 (origin
15662 (method url-fetch)
15663 (uri (pypi-uri "absl-py" version))
15664 (sha256
15665 (base32
15666 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15667 (build-system python-build-system)
15668 (propagated-inputs
15669 `(("python-six" ,python-six)))
15670 (home-page "https://github.com/abseil/abseil-py")
15671 (synopsis "Abseil Python common libraries")
15672 (description
15673 "This package provides the Abseil Python Common Libraries, a collection
15674 of Python libraries for building Python applications.")
15675 (license license:asl2.0)))
15676
15677 (define-public python-astor
15678 (package
15679 (name "python-astor")
15680 (version "0.7.1")
15681 (source
15682 (origin
15683 (method url-fetch)
15684 (uri (pypi-uri "astor" version))
15685 (sha256
15686 (base32
15687 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15688 (build-system python-build-system)
15689 ;; FIXME: There are two errors and two test failures.
15690 (arguments `(#:tests? #f))
15691 (home-page "https://github.com/berkerpeksag/astor")
15692 (synopsis "Read and write Python ASTs")
15693 (description "Astor is designed to allow easy manipulation of Python
15694 source via the Abstract Syntax Tree.")
15695 (license license:bsd-3)))
15696
15697 (define-public python2-astor
15698 (package-with-python2 python-astor))
15699
15700 (define-public python-grpcio
15701 (package
15702 (name "python-grpcio")
15703 (version "1.17.1")
15704 (source
15705 (origin
15706 (method url-fetch)
15707 (uri (pypi-uri "grpcio" version))
15708 (sha256
15709 (base32
15710 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15711 (build-system python-build-system)
15712 (propagated-inputs
15713 `(("python-six" ,python-six)))
15714 (home-page "https://grpc.io")
15715 (synopsis "HTTP/2-based RPC framework")
15716 (description "This package provides a Python library for communicating
15717 with the HTTP/2-based RPC framework gRPC.")
15718 (license license:asl2.0)))
15719
15720 (define-public python-astunparse
15721 (package
15722 (name "python-astunparse")
15723 (version "1.6.2")
15724 (source
15725 (origin
15726 (method url-fetch)
15727 (uri (pypi-uri "astunparse" version))
15728 (sha256
15729 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15730 (build-system python-build-system)
15731 (arguments '(#:tests? #f)) ; there are none
15732 (propagated-inputs
15733 `(("python-six" ,python-six)
15734 ("python-wheel" ,python-wheel)))
15735 (home-page "https://github.com/simonpercivall/astunparse")
15736 (synopsis "AST unparser for Python")
15737 (description "This package provides an AST unparser for Python. It is a
15738 factored out version of @code{unparse} found in the Python source
15739 distribution.")
15740 (license license:bsd-3)))
15741
15742 (define-public python-gast
15743 (package
15744 (name "python-gast")
15745 (version "0.2.2")
15746 (source
15747 (origin
15748 (method url-fetch)
15749 (uri (pypi-uri "gast" version))
15750 (sha256
15751 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15752 (build-system python-build-system)
15753 (propagated-inputs
15754 `(("python-astunparse" ,python-astunparse)))
15755 (home-page "https://pypi.org/project/gast/")
15756 (synopsis "Generic Python AST that abstracts the underlying Python version")
15757 (description
15758 "GAST provides a compatibility layer between the AST of various Python
15759 versions, as produced by @code{ast.parse} from the standard @code{ast}
15760 module.")
15761 (license license:bsd-3)))
15762
15763 (define-public python-wikidata
15764 (package
15765 (name "python-wikidata")
15766 (version "0.6.1")
15767 (source
15768 (origin
15769 (method url-fetch)
15770 (uri (pypi-uri "Wikidata" version))
15771 (sha256
15772 (base32
15773 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15774 (build-system python-build-system)
15775 (propagated-inputs
15776 `(("python-babel" ,python-babel)))
15777 (home-page "https://github.com/dahlia/wikidata")
15778 (synopsis "Wikidata client library")
15779 (description
15780 "This package provides a Python interface to
15781 @url{https://www.wikidata.org/, Wikidata}.")
15782 (properties '((upstream-name . "Wikidata")))
15783 (license license:gpl3+)))
15784
15785 (define-public python-doctest-ignore-unicode
15786 (package
15787 (name "python-doctest-ignore-unicode")
15788 (version "0.1.2")
15789 (source
15790 (origin
15791 (method url-fetch)
15792 (uri (pypi-uri "doctest-ignore-unicode" version))
15793 (sha256
15794 (base32
15795 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15796 (build-system python-build-system)
15797 (native-inputs
15798 `(("python-nose" ,python-nose)))
15799 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15800 (synopsis "Ignore Unicode literal prefixes in doctests")
15801 (description
15802 "This package adds support for a flag to ignore Unicode literal prefixes
15803 in doctests.")
15804 (license license:asl2.0)))
15805
15806 (define-public python-attr
15807 (package
15808 (name "python-attr")
15809 (version "0.3.1")
15810 (source
15811 (origin
15812 (method url-fetch)
15813 (uri (pypi-uri "attr" version))
15814 (sha256
15815 (base32
15816 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15817 (build-system python-build-system)
15818 (home-page "https://github.com/denis-ryzhkov/attr")
15819 (synopsis "Decorator for attributes of target function or class")
15820 (description "Simple decorator to set attributes of target function or
15821 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15822 (license license:expat)))
15823
15824 (define-public python-construct
15825 (package
15826 (name "python-construct")
15827 (version "2.9.45")
15828 (source
15829 (origin
15830 (method url-fetch)
15831 (uri (pypi-uri "construct" version))
15832 (sha256
15833 (base32
15834 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15835 (build-system python-build-system)
15836 (arguments
15837 `(#:tests? #f)) ; No tests exist.
15838 (propagated-inputs
15839 `(("python-extras" ,python-extras)
15840 ("python-arrow" ,python-arrow)
15841 ("python-numpy" ,python-numpy)
15842 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15843 (home-page "http://construct.readthedocs.io")
15844 (synopsis "Declarative and symmetrical parser and builder for binary data")
15845 (description
15846 "This package provides both simple, atomic constructs (such as
15847 integers of various sizes), as well as composite ones which allow you
15848 form hierarchical and sequential structures of increasing complexity.
15849 It features bit and byte granularity, easy debugging and testing, an
15850 easy-to-extend subclass system, and lots of primitive constructs to
15851 make your work easier.")
15852 (license license:expat)))
15853
15854 (define-public python-humanize
15855 (package
15856 (name "python-humanize")
15857 (version "0.5.1")
15858 (source
15859 (origin
15860 (method url-fetch)
15861 (uri (pypi-uri "humanize" version))
15862 (sha256
15863 (base32
15864 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15865 (arguments
15866 '(#:tests? #f)) ; tests not in pypi archive
15867 (build-system python-build-system)
15868 (home-page "https://github.com/jmoiron/humanize")
15869 (synopsis "Print numerical information in a human-readable form")
15870 (description "This package provides a Python module that displays numbers
15871 and dates in \"human readable\" forms. For example, it would display
15872 \"12345591313\" as \"12.3 billion\".")
15873 (license license:expat)))
15874
15875 (define-public python-txaio
15876 (package
15877 (name "python-txaio")
15878 (version "18.8.1")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "txaio" version))
15883 (sha256
15884 (base32
15885 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15886 (build-system python-build-system)
15887 (propagated-inputs
15888 `(("python-twisted" ,python-twisted)
15889 ("python-six" ,python-six)))
15890 (home-page "https://github.com/crossbario/txaio")
15891 (synopsis "Compatibility layer between Python asyncio and Twisted")
15892 (description "Txaio provides a compatibility layer between the Python
15893 @code{asyncio} module and @code{Twisted}.")
15894 (license license:expat)))
15895
15896 (define-public python-toolshed
15897 (package
15898 (name "python-toolshed")
15899 (version "0.4.6")
15900 (source
15901 (origin
15902 (method url-fetch)
15903 (uri (pypi-uri "toolshed" version))
15904 (sha256
15905 (base32
15906 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15907 (build-system python-build-system)
15908 (native-inputs
15909 `(("python-nose" ,python-nose)))
15910 (home-page "https://github.com/brentp/toolshed/")
15911 (synopsis "Collection of modules and functions for working with data")
15912 (description "This is a collection of well-tested, simple modules and
15913 functions that aim to reduce boilerplate when working with data.")
15914 (license license:bsd-2)))
15915
15916 (define-public python-annoy
15917 (package
15918 (name "python-annoy")
15919 (version "1.15.1")
15920 (source
15921 (origin
15922 (method url-fetch)
15923 (uri (pypi-uri "annoy" version))
15924 (sha256
15925 (base32
15926 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15927 (build-system python-build-system)
15928 (native-inputs
15929 `(("python-nose" ,python-nose)))
15930 (home-page "https://github.com/spotify/annoy/")
15931 (synopsis "Approximate nearest neighbors library")
15932 (description
15933 "Annoy is a C++ library with Python bindings to search for points in
15934 space that are close to a given query point. It also creates large read-only
15935 file-based data structures that are @code{mmap}ped into memory so that many
15936 processes may share the same data.")
15937 (license license:asl2.0)))
15938
15939 (define-public python-pylzma
15940 (package
15941 (name "python-pylzma")
15942 (version "0.5.0")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "pylzma" version))
15947 (sha256
15948 (base32
15949 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15950 (build-system python-build-system)
15951 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15952 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15953 (description "This package provides Python bindings for the LZMA library
15954 by Igor Pavlov.")
15955 (license license:lgpl2.1+)))
15956
15957 (define-public python2-pylzma
15958 (package-with-python2 python-pylzma))
15959
15960 (define-public python2-zeroconf
15961 (package
15962 (name "python2-zeroconf")
15963
15964 ;; This is the last version that supports Python 2.x.
15965 (version "0.19.1")
15966 (source
15967 (origin
15968 (method url-fetch)
15969 (uri (pypi-uri "zeroconf" version))
15970 (sha256
15971 (base32
15972 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15973 (build-system python-build-system)
15974 (arguments
15975 `(#:python ,python-2
15976 #:phases
15977 (modify-phases %standard-phases
15978 (add-after 'unpack 'patch-requires
15979 (lambda* (#:key inputs #:allow-other-keys)
15980 (substitute* "setup.py"
15981 (("enum-compat")
15982 "enum34"))
15983 #t)))))
15984 (native-inputs
15985 `(("python2-six" ,python2-six)
15986 ("python2-enum32" ,python2-enum34)
15987 ("python2-netifaces" ,python2-netifaces)
15988 ("python2-typing" ,python2-typing)))
15989 (home-page "https://github.com/jstasiak/python-zeroconf")
15990 (synopsis "Pure Python mDNS service discovery")
15991 (description
15992 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15993 compatible).")
15994 (license license:lgpl2.1+)))
15995
15996 (define-public python-bsddb3
15997 (package
15998 (name "python-bsddb3")
15999 (version "6.2.6")
16000 (source
16001 (origin
16002 (method url-fetch)
16003 (uri (pypi-uri "bsddb3" version))
16004 (sha256
16005 (base32
16006 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16007 (build-system python-build-system)
16008 (inputs
16009 `(("bdb" ,bdb)))
16010 (arguments
16011 '(#:phases
16012 (modify-phases %standard-phases
16013 (add-after 'unpack 'configure-locations
16014 (lambda* (#:key inputs #:allow-other-keys)
16015 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16016 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16017 #t))
16018 (replace 'check
16019 (lambda _
16020 (invoke "python3" "test3.py" "-v"))))))
16021 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16022 (synopsis "Python bindings for Oracle Berkeley DB")
16023 (description
16024 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16025 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16026 Transaction objects, and each of these is exposed as a Python type in the
16027 bsddb3.db module. The database objects can use various access methods: btree,
16028 hash, recno, and queue. Complete support of Berkeley DB distributed
16029 transactions. Complete support for Berkeley DB Replication Manager.
16030 Complete support for Berkeley DB Base Replication. Support for RPC.")
16031 (license license:bsd-3)))
16032
16033 (define-public python-dbfread
16034 (package
16035 (name "python-dbfread")
16036 (version "2.0.7")
16037 (source (origin
16038 (method url-fetch)
16039 (uri (pypi-uri "dbfread" version))
16040 (sha256
16041 (base32
16042 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16043 (build-system python-build-system)
16044 (native-inputs
16045 `(("python-pytest" ,python-pytest)))
16046 (home-page "https://dbfread.readthedocs.io")
16047 (synopsis "Read DBF Files with Python")
16048 (description
16049 "This library reads DBF files and returns the data as native Python data
16050 types for further processing. It is primarily intended for batch jobs and
16051 one-off scripts.")
16052 (license license:expat)))
16053
16054 (define-public python-cached-property
16055 (package
16056 (name "python-cached-property")
16057 (version "1.5.1")
16058 (source
16059 (origin
16060 (method url-fetch)
16061 (uri (pypi-uri "cached-property" version))
16062 (sha256
16063 (base32
16064 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16065 (build-system python-build-system)
16066 (arguments
16067 `(#:phases
16068 (modify-phases %standard-phases
16069 ;; https://github.com/pydanny/cached-property/issues/131
16070 ;; recent versions of freezegun break one test
16071 (add-after 'unpack 'disable-broken-test
16072 (lambda _
16073 (substitute* "tests/test_cached_property.py"
16074 (("def test_threads_ttl_expiry\\(self\\)" m)
16075 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16076 " " m)))
16077 #t)))))
16078 (native-inputs
16079 `(("python-freezegun" ,python-freezegun)))
16080 (home-page
16081 "https://github.com/pydanny/cached-property")
16082 (synopsis
16083 "Decorator for caching properties in classes")
16084 (description
16085 "This package provides a decorator which makes caching
16086 time-or-computationally-expensive properties quick and easy and works in Python
16087 2 or 3.")
16088 (license license:bsd-3)))
16089
16090 (define-public python-folium
16091 (package
16092 (name "python-folium")
16093 (version "0.10.0")
16094 (source
16095 (origin
16096 (method url-fetch)
16097 (uri (pypi-uri "folium" version))
16098 (sha256
16099 (base32
16100 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16101 (build-system python-build-system)
16102 (propagated-inputs
16103 `(("python-branca" ,python-branca)
16104 ("python-jinja2" ,python-jinja2)
16105 ("python-numpy" ,python-numpy)
16106 ("python-requests" ,python-requests)))
16107 (native-inputs
16108 `(("python-pytest" ,python-pytest)))
16109 (home-page "https://github.com/python-visualization/folium")
16110 (synopsis "Make beautiful maps with Leaflet.js & Python")
16111 (description "@code{folium} makes it easy to visualize data that’s been
16112 manipulated in Python on an interactive leaflet map. It enables both the
16113 binding of data to a map for @code{choropleth} visualizations as well as
16114 passing rich vector/raster/HTML visualizations as markers on the map.
16115
16116 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16117 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16118 supports Image, Video, GeoJSON and TopoJSON overlays.")
16119 (license license:expat)))
16120
16121 (define-public jube
16122 (package
16123 ;; This is a command-line tool, so no "python-" prefix.
16124 (name "jube")
16125 (version "2.2.2")
16126 (source (origin
16127 (method url-fetch)
16128 (uri (string-append
16129 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16130 version))
16131 (sha256
16132 (base32
16133 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16134 (file-name (string-append "jube-" version ".tar.gz"))))
16135 (build-system python-build-system)
16136 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16137 (synopsis "Benchmarking environment")
16138 (description
16139 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16140 benchmarked application, benchmark data is stored in a format that allows JUBE
16141 to deduct the desired information. This data can be parsed by automatic pre-
16142 and post-processing scripts that draw information and store it more densely
16143 for manual interpretation.")
16144 (license license:gpl3+)))
16145
16146 (define-public python-pyroutelib3
16147 (package
16148 (name "python-pyroutelib3")
16149 (version "1.3.post1")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 (uri (pypi-uri "pyroutelib3" version))
16154 (sha256
16155 (base32
16156 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16157 (build-system python-build-system)
16158 (propagated-inputs
16159 `(("python-dateutil" ,python-dateutil)))
16160 (home-page "https://github.com/MKuranowski/pyroutelib3")
16161 (synopsis "Library for simple routing on OSM data")
16162 (description "Library for simple routing on OSM data")
16163 (license license:gpl3+)))
16164
16165 (define-public python-elementpath
16166 (package
16167 (name "python-elementpath")
16168 (version "1.2.0")
16169 (source
16170 (origin
16171 (method url-fetch)
16172 (uri (pypi-uri "elementpath" version))
16173 (sha256
16174 (base32
16175 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16176 (build-system python-build-system)
16177 (home-page
16178 "https://github.com/sissaschool/elementpath")
16179 (synopsis
16180 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16181 (description
16182 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16183 for Python's ElementTree XML data structures, both for the standard
16184 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16185
16186 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16187 because lxml.etree already has it's own implementation of XPath 1.0.")
16188 (license license:expat)))