Merge branch 'master' into core-updates
[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 _
339 (invoke "pytest" "-vv" "-k"
340 (string-append
341 ;; XXX: These tests fail when using Pytest 4.x and
342 ;; Babel 2.6.0. Try removing this for later versions.
343 "not test_no_inherit_metazone_marker_never_in_output"
344 " and not test_smoke_dates"
345 " and not test_smoke_numbers")))))))
346 (home-page "http://babel.pocoo.org/")
347 (synopsis
348 "Tools for internationalizing Python applications")
349 (description
350 "Babel is composed of two major parts:
351 - tools to build and work with gettext message catalogs
352 - a Python interface to the CLDR (Common Locale Data Repository), providing
353 access to various locale display names, localized number and date formatting,
354 etc. ")
355 (license license:bsd-3)))
356
357 (define-public python2-babel
358 (package-with-python2 python-babel))
359
360 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
361 (define-public python2-babel-2.6
362 (package
363 (inherit python2-babel)
364 (version "2.6.0")
365 (source (origin
366 (method url-fetch)
367 (uri (pypi-uri "Babel" version))
368 (sha256
369 (base32
370 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
371
372 (define-public python2-backport-ssl-match-hostname
373 (package
374 (name "python2-backport-ssl-match-hostname")
375 (version "3.5.0.1")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (pypi-uri "backports.ssl_match_hostname" version))
380 (sha256
381 (base32
382 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
383 (build-system python-build-system)
384 (arguments
385 `(#:python ,python-2
386 #:tests? #f)) ; no test target
387 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
388 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
389 (description
390 "This backport brings the ssl.match_hostname() function to users of
391 earlier versions of Python. The function checks the hostname in the
392 certificate returned by the server to which a connection has been established,
393 and verifies that it matches the intended target hostname.")
394 (license license:psfl)))
395
396 (define-public python-hdf4
397 (package
398 (name "python-hdf4")
399 (version "0.9")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (pypi-uri name version))
404 (sha256
405 (base32
406 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
407 (build-system python-build-system)
408 (native-inputs `(("nose" ,python-nose)))
409 (propagated-inputs `(("numpy" ,python-numpy)))
410 (inputs
411 `(("hdf4" ,hdf4)
412 ("libjpeg" ,libjpeg)
413 ("zlib" ,zlib)))
414 (arguments
415 `(#:phases
416 (modify-phases %standard-phases
417 (replace 'check
418 (lambda _
419 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
420 ;; on to import numpy. Somehow this works on their CI system.
421 ;; Let's just manage PYTHONPATH here instead.
422 (substitute* "runexamples.sh"
423 (("export PYTHONPATH=.*") ""))
424 (setenv "PYTHONPATH"
425 (string-append (getcwd) ":"
426 (getenv "PYTHONPATH")))
427 (invoke "./runexamples.sh")
428 (invoke "nosetests" "-v"))))))
429 (home-page "https://github.com/fhs/python-hdf4")
430 (synopsis "Python interface to the NCSA HDF4 library")
431 (description
432 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
433 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
434 NetCDF files can also be read and modified. Python-HDF4 is a fork of
435 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
436 (license license:expat)))
437
438 (define-public python2-hdf4
439 (package-with-python2 python-hdf4))
440
441 (define-public python-h5py
442 (package
443 (name "python-h5py")
444 (version "2.8.0")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (pypi-uri "h5py" version))
449 (sha256
450 (base32
451 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
452 (build-system python-build-system)
453 (arguments
454 `(#:tests? #f ; no test target
455 #:phases
456 (modify-phases %standard-phases
457 (add-after 'unpack 'fix-hdf5-paths
458 (lambda* (#:key inputs #:allow-other-keys)
459 (let ((prefix (assoc-ref inputs "hdf5")))
460 (substitute* "setup_build.py"
461 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
462 (string-append "['" prefix "/lib" "']"))
463 (("'/opt/local/include', '/usr/local/include'")
464 (string-append "'" prefix "/include" "'")))
465 (substitute* "setup_configure.py"
466 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
467 (string-append "['" prefix "/lib" "']")))
468 #t))))))
469 (propagated-inputs
470 `(("python-six" ,python-six)
471 ("python-numpy" ,python-numpy)))
472 (inputs
473 `(("hdf5" ,hdf5)))
474 (native-inputs
475 `(("python-cython" ,python-cython)
476 ("python-pkgconfig" ,python-pkgconfig)))
477 (home-page "http://www.h5py.org/")
478 (synopsis "Read and write HDF5 files from Python")
479 (description
480 "The h5py package provides both a high- and low-level interface to the
481 HDF5 library from Python. The low-level interface is intended to be a
482 complete wrapping of the HDF5 API, while the high-level component supports
483 access to HDF5 files, datasets and groups using established Python and NumPy
484 concepts.")
485 (license license:bsd-3)))
486
487 (define-public python2-h5py
488 (package-with-python2 python-h5py))
489
490 (define-public python-sh
491 (package
492 (name "python-sh")
493 (version "1.12.14")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (pypi-uri "sh" version))
498 (sha256
499 (base32
500 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
501 (build-system python-build-system)
502 (arguments
503 '(#:phases
504 (modify-phases %standard-phases
505 (replace 'check
506 (lambda _
507 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
508 (setenv "HOME" "/tmp")
509 (invoke "python" "sh.py" "test"))))))
510 (native-inputs
511 `(("python-coverage" ,python-coverage)))
512 (home-page "https://github.com/amoffat/sh")
513 (synopsis "Python subprocess replacement")
514 (description "This package provides a replacement for Python's
515 @code{subprocess} feature.")
516 (license license:expat)))
517
518 (define-public python2-sh
519 (package-with-python2 python-sh))
520
521 (define-public python-cftime
522 (package
523 (name "python-cftime")
524 (version "1.0.3.4")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "cftime" version))
529 (sha256
530 (base32
531 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
532 (build-system python-build-system)
533 (propagated-inputs
534 `(("python-numpy" ,python-numpy)))
535 (native-inputs
536 `(("python-coveralls" ,python-coveralls)
537 ("python-cython" ,python-cython)
538 ("python-pytest-cov" ,python-pytest-cov)))
539 (home-page "https://github.com/Unidata/cftime")
540 (synopsis "Library for time handling")
541 (description
542 "This package provides time-handling functionality that used to be part
543 of the netcdf4 package before.")
544 ;; This package claims to include code under the GPLv3 but is released
545 ;; under ISC.
546 (license (list license:isc license:gpl3+))))
547
548 (define-public python-netcdf4
549 (package
550 (name "python-netcdf4")
551 (version "1.4.2")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "netCDF4" version))
556 (sha256
557 (base32
558 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
559 (build-system python-build-system)
560 (arguments
561 '(#:phases
562 (modify-phases %standard-phases
563 (add-after 'unpack 'configure-locations
564 (lambda* (#:key inputs #:allow-other-keys)
565 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
566 #t)))))
567 (native-inputs
568 `(("python-cython" ,python-cython)))
569 (propagated-inputs
570 `(("python-numpy" ,python-numpy)
571 ("python-cftime" ,python-cftime)))
572 (inputs
573 `(("netcdf" ,netcdf)
574 ("hdf4" ,hdf4)
575 ("hdf5" ,hdf5)))
576 (home-page "https://github.com/Unidata/netcdf4-python")
577 (synopsis "Python/numpy interface to the netCDF library")
578 (description "Netcdf4-python is a Python interface to the netCDF C
579 library. netCDF version 4 has many features not found in earlier
580 versions of the library and is implemented on top of HDF5. This module
581 can read and write files in both the new netCDF 4 and the old netCDF 3
582 format, and can create files that are readable by HDF5 clients. The
583 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
584 to users of that module.")
585 ;; The software is mainly ISC, but includes some files covered
586 ;; by the Expat license.
587 (license (list license:isc license:expat))))
588
589 (define-public python2-netcdf4
590 (package-with-python2 python-netcdf4))
591
592 (define-public python-lockfile
593 (package
594 (name "python-lockfile")
595 (version "0.12.2")
596 (source
597 (origin
598 (method url-fetch)
599 (uri (pypi-uri "lockfile" version))
600 (sha256
601 (base32
602 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
603 (build-system python-build-system)
604 (arguments '(#:test-target "check"))
605 (native-inputs
606 `(("python-pbr" ,python-pbr)))
607 (home-page "https://launchpad.net/pylockfile")
608 (synopsis "Platform-independent file locking module")
609 (description
610 "The lockfile package exports a LockFile class which provides a simple
611 API for locking files.")
612 (license license:expat)))
613
614 (define-public python2-lockfile
615 (package-with-python2 python-lockfile))
616
617 (define-public python-semantic-version
618 (package
619 (name "python-semantic-version")
620 (version "2.6.0")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "semantic_version" version))
625 (sha256
626 (base32
627 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
628 (build-system python-build-system)
629 (arguments
630 `(#:tests? #f)) ; PyPI tarball lacks tests
631 (home-page "https://github.com/rbarrois/python-semanticversion")
632 (synopsis "Semantic versioning module for Python")
633 (description
634 "The @code{semantic_version} class is a small library for handling
635 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
636
637 It can compare versions, generate a new version that represents a bump in one of
638 the version levels, and check whether any given string is a proper semantic
639 version identifier.")
640 (license license:bsd-3)))
641
642 (define-public python2-semantic-version
643 (package-with-python2 python-semantic-version))
644
645 (define-public python-serpent
646 (package
647 (name "python-serpent")
648 (version "1.28")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "serpent" version))
653 (sha256
654 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
655 (build-system python-build-system)
656 (native-inputs
657 `(("python-attrs" ,python-attrs)
658 ("python-pytz" ,python-pytz)))
659 (home-page "https://github.com/irmen/Serpent")
660 (synopsis "Serializer for literal Python expressions")
661 (description
662 "Serpent provides @code{ast.literal_eval()}-compatible object tree
663 serialization. It serializes an object tree into bytes (an utf-8 encoded
664 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
665 to rebuild the original object tree.
666
667 Because only safe literals are encoded, it is safe to send serpent data to
668 other machines, such as over the network.")
669 (license license:expat)))
670
671 (define-public python-setuptools
672 (package
673 (name "python-setuptools")
674 (version "41.0.1")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (pypi-uri "setuptools" version ".zip"))
679 (sha256
680 (base32
681 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
682 (modules '((guix build utils)))
683 (snippet
684 '(begin
685 ;; Remove included binaries which are used to build self-extracting
686 ;; installers for Windows.
687 ;; TODO: Find some way to build them ourself so we can include them.
688 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
689 #t))))
690 (build-system python-build-system)
691 ;; FIXME: Tests require pytest, which itself relies on setuptools.
692 ;; One could bootstrap with an internal untested setuptools.
693 (arguments
694 `(#:tests? #f))
695 (home-page "https://pypi.python.org/pypi/setuptools")
696 (synopsis
697 "Library designed to facilitate packaging Python projects")
698 (description
699 "Setuptools is a fully-featured, stable library designed to facilitate
700 packaging Python projects, where packaging includes:
701 Python package and module definitions,
702 distribution package metadata,
703 test hooks,
704 project installation,
705 platform-specific details,
706 Python 3 support.")
707 ;; TODO: setuptools now bundles the following libraries:
708 ;; packaging, pyparsing, six and appdirs. How to unbundle?
709 (license (list license:psfl ; setuptools itself
710 license:expat ; six, appdirs, pyparsing
711 license:asl2.0 ; packaging is dual ASL2/BSD-2
712 license:bsd-2))))
713
714 (define-public python2-setuptools
715 (package-with-python2 python-setuptools))
716
717 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
718 (define-public python-setuptools-for-tensorflow
719 (hidden-package
720 (package
721 (inherit python-setuptools)
722 (version "39.1.0")
723 (source (origin
724 (inherit (package-source python-setuptools))
725 (uri (pypi-uri "setuptools" version ".zip"))
726 (sha256
727 (base32
728 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
729
730 (define-public python-uniseg
731 (package
732 (name "python-uniseg")
733 (version "0.7.1")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (pypi-uri "uniseg" version ".zip"))
738 (sha256
739 (base32
740 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
741 (build-system python-build-system)
742 (arguments
743 '(#:tests? #f)) ; The test suite requires network access.
744 (native-inputs
745 `(("unzip" ,unzip)))
746 (home-page
747 "https://bitbucket.org/emptypage/uniseg-python")
748 (synopsis
749 "Python library to determine Unicode text segmentations")
750 (description
751 "Uniseg is a Python package used to determine Unicode text segmentations.
752 Supported segmentations include:
753 @enumerate
754 @item @dfn{Code point} (any value in the Unicode codespace)
755 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
756 multiple Unicode code points, e.g. \"G\" + acute-accent)
757 @item Word break
758 @item Sentence break
759 @item Line break
760 @end enumerate")
761 (license license:expat)))
762
763 (define-public python2-uniseg
764 (package-with-python2 python-uniseg))
765
766 (define-public python-humanfriendly
767 (package
768 (name "python-humanfriendly")
769 (version "4.4.1")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (pypi-uri "humanfriendly" version))
774 (sha256
775 (base32
776 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
777 (build-system python-build-system)
778 (arguments
779 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
780 #:tests? #f))
781 (propagated-inputs
782 `(("python-monotonic" ,python-monotonic)))
783 (home-page "https://humanfriendly.readthedocs.io")
784 (synopsis "Human-friendly input and output in Python")
785 (description
786 "The functions and classes in @code{humanfriendly} can be used to make
787 text interfaces more user-friendly. It includes tools to parse and format
788 numbers, file sizes, and timespans, timers for long-running operations, menus
789 to allow the user to choose from a list of options, and terminal interaction
790 helpers.")
791 (license license:expat)))
792
793 (define-public python2-humanfriendly
794 (package-with-python2 python-humanfriendly))
795
796 (define-public python-capturer
797 (package
798 (name "python-capturer")
799 (version "2.4")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "capturer" version))
804 (sha256
805 (base32
806 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
807 (build-system python-build-system)
808 (arguments
809 `(#:tests? #f))
810 (propagated-inputs
811 `(("python-humanfriendly" ,python-humanfriendly)))
812 (home-page "https://capturer.readthedocs.io")
813 (synopsis "Capture stdout and stderr streams of the current process")
814 (description
815 "The capturer package makes it easy to capture the stdout and stderr
816 streams of the current process and subprocesses. Output can be relayed
817 to the terminal in real time but is also available to the Python program
818 for additional processing.")
819 (license license:expat)))
820
821 (define-public python2-capturer
822 (package-with-python2 python-capturer))
823
824 (define-public python-case
825 (package
826 (name "python-case")
827 (version "1.5.3")
828 (source
829 (origin
830 (method url-fetch)
831 (uri (pypi-uri "case" version))
832 (sha256
833 (base32
834 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
835 (build-system python-build-system)
836 (propagated-inputs
837 `(("python-mock" ,python-mock)
838 ("python-nose" ,python-nose)
839 ("python-six" ,python-six)
840 ("python-unittest2" ,python-unittest2)))
841 (native-inputs
842 `(("python-coverage" ,python-coverage)))
843 (home-page "https://github.com/celery/case")
844 (synopsis "Unittest utilities and convenience methods")
845 (description
846 "The @code{case} package provides utilities on top of unittest, including
847 some helpful Python 2 compatibility convenience methods.")
848 (license license:bsd-3)))
849
850 (define-public python-verboselogs
851 (package
852 (name "python-verboselogs")
853 (version "1.7")
854 (source
855 (origin
856 (method url-fetch)
857 (uri (pypi-uri "verboselogs" version))
858 (sha256
859 (base32
860 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
861 (build-system python-build-system)
862 (native-inputs
863 `(("python-mock" ,python-mock)
864 ("python-astroid" ,python-astroid)
865 ("python-pylint" ,python-pylint)))
866 (home-page "https://verboselogs.readthedocs.io")
867 (synopsis "Verbose logging level for Python's logging module")
868 (description
869 "The @code{verboselogs} package extends Python's @code{logging} module to
870 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
871 (license license:expat)))
872
873 (define-public python2-verboselogs
874 (package-with-python2 python-verboselogs))
875
876 (define-public python-coloredlogs
877 (package
878 (name "python-coloredlogs")
879 (version "7.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "coloredlogs" version))
884 (sha256
885 (base32
886 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
887 (build-system python-build-system)
888 (arguments
889 `(;Tests require some updated modules
890 #:tests? #f))
891 (propagated-inputs
892 `(("python-capturer" ,python-capturer)))
893 (home-page "https://coloredlogs.readthedocs.io")
894 (synopsis "Colored stream handler for Python's logging module")
895 (description
896 "The @code{coloredlogs} package enables colored terminal output for
897 Python's logging module. The @code{ColoredFormatter} class inherits from
898 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
899 messages in color.")
900 (license license:expat)))
901
902 (define-public python2-coloredlogs
903 (package-with-python2 python-coloredlogs))
904
905 (define-public python-et-xmlfile
906 (package
907 (name "python-et-xmlfile")
908 (version "1.0.1")
909 (source
910 (origin
911 (method url-fetch)
912 (uri (pypi-uri "et_xmlfile" version))
913 (sha256
914 (base32
915 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
916 (build-system python-build-system)
917 (arguments
918 `(#:phases (modify-phases %standard-phases
919 (replace 'check
920 (lambda _
921 (invoke "pytest"))))))
922 (native-inputs
923 `(("python-pytest" ,python-pytest)
924 ("python-lxml" ,python-lxml))) ;used for the tests
925 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
926 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
927 (description "This Python library is based upon the @code{xmlfile} module
928 from @code{lxml}. It aims to provide a low memory, compatible implementation
929 of @code{xmlfile}.")
930 (license license:expat)))
931
932 (define-public python2-et-xmlfile
933 (package-with-python2 python-et-xmlfile))
934
935 (define-public python-openpyxl
936 (package
937 (name "python-openpyxl")
938 (version "2.6.2")
939 (source
940 (origin
941 ;; We use the upstream repository, as the tests are not included in the
942 ;; PyPI releases.
943 (method hg-fetch)
944 (uri (hg-reference
945 (url "https://bitbucket.org/openpyxl/openpyxl")
946 (changeset version)))
947 (file-name (string-append name "-" version "-checkout"))
948 (sha256
949 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
950 (build-system python-build-system)
951 (arguments
952 `(#:phases (modify-phases %standard-phases
953 (replace 'check
954 (lambda _
955 (invoke "pytest"))))))
956 (native-inputs
957 ;; For the test suite.
958 `(("python-lxml" ,python-lxml)
959 ("python-pillow" ,python-pillow)
960 ("python-pytest" ,python-pytest)))
961 (propagated-inputs
962 `(("python-et-xmlfile" ,python-et-xmlfile)
963 ("python-jdcal" ,python-jdcal)))
964 (home-page "https://openpyxl.readthedocs.io")
965 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
966 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
967 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
968 standard.")
969 (license license:expat)))
970
971 (define-public python-eventlet
972 (package
973 (name "python-eventlet")
974 (version "0.20.1")
975 (source
976 (origin
977 (method url-fetch)
978 (uri (pypi-uri "eventlet" version))
979 (sha256
980 (base32
981 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
982 (build-system python-build-system)
983 (propagated-inputs
984 `(("python-greenlet" ,python-greenlet)))
985 (arguments
986 ;; TODO: Requires unpackaged 'enum-compat'.
987 '(#:tests? #f))
988 (home-page "http://eventlet.net")
989 (synopsis "Concurrent networking library for Python")
990 (description
991 "Eventlet is a concurrent networking library for Python that
992 allows you to change how you run your code, not how you write it.
993 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
994 Coroutines ensure that the developer uses a blocking style of programming
995 that is similar to threading, but provide the benefits of non-blocking I/O.
996 The event dispatch is implicit, which means you can easily use @code{Eventlet}
997 from the Python interpreter, or as a small part of a larger application.")
998 (license license:expat)))
999
1000 (define-public python2-eventlet
1001 (let ((base (package-with-python2
1002 (strip-python2-variant python-eventlet))))
1003 (package (inherit base)
1004 (propagated-inputs
1005 `(("python2-enum34" ,python2-enum34)
1006 ,@(package-propagated-inputs base))))))
1007
1008 (define-public python-six
1009 (package
1010 (name "python-six")
1011 (version "1.12.0")
1012 (source
1013 (origin
1014 (method url-fetch)
1015 (uri (pypi-uri "six" version))
1016 (sha256
1017 (base32
1018 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1019 (build-system python-build-system)
1020 (arguments
1021 `(#:phases
1022 (modify-phases %standard-phases
1023 (replace 'check
1024 (lambda _
1025 (invoke "py.test" "-v"))))))
1026 (native-inputs
1027 `(("python-py" ,python-py)
1028 ("python-pytest" ,python-pytest-bootstrap)))
1029 (home-page "https://pypi.python.org/pypi/six/")
1030 (synopsis "Python 2 and 3 compatibility utilities")
1031 (description
1032 "Six is a Python 2 and 3 compatibility library. It provides utility
1033 functions for smoothing over the differences between the Python versions with
1034 the goal of writing Python code that is compatible on both Python versions.
1035 Six supports every Python version since 2.5. It is contained in only one
1036 Python file, so it can be easily copied into your project.")
1037 (license license:x11)))
1038
1039 (define-public python2-six
1040 (package-with-python2 python-six))
1041
1042 (define-public python-six-bootstrap
1043 (package
1044 (inherit python-six)
1045 (name "python-six-bootstrap")
1046 (native-inputs `())
1047 (arguments `(#:tests? #f))))
1048
1049 (define-public python2-six-bootstrap
1050 (package-with-python2 python-six-bootstrap))
1051
1052 (define-public python-schedule
1053 (package
1054 (name "python-schedule")
1055 (version "0.4.3")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "schedule" version))
1060 (sha256
1061 (base32
1062 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1063 (build-system python-build-system)
1064 (native-inputs
1065 `(("python-pytest" ,python-pytest)
1066 ("python-mock" ,python-mock)))
1067 (home-page "https://github.com/dbader/schedule")
1068 (synopsis "Schedule periodic function calls in Python")
1069 (description
1070 "Schedule is an in-process scheduler for periodic jobs that uses the
1071 builder pattern for configuration. Schedule lets you run Python functions (or
1072 any other callable) periodically at pre-determined intervals using a simple,
1073 human-friendly syntax.")
1074 (license license:expat)))
1075
1076 (define-public python2-schedule
1077 (package-with-python2 python-schedule))
1078
1079 (define-public python-pandas
1080 (package
1081 (name "python-pandas")
1082 (version "0.24.2")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "pandas" version))
1087 (sha256
1088 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1089 (build-system python-build-system)
1090 (arguments
1091 `(#:modules ((guix build utils)
1092 (guix build python-build-system)
1093 (ice-9 ftw)
1094 (srfi srfi-26))
1095 #:phases (modify-phases %standard-phases
1096 (add-after 'unpack 'patch-which
1097 (lambda* (#:key inputs #:allow-other-keys)
1098 (let ((which (assoc-ref inputs "which")))
1099 (substitute* "pandas/io/clipboard/__init__.py"
1100 (("^CHECK_CMD = .*")
1101 (string-append "CHECK_CMD = \"" which "\"\n"))))
1102 #t))
1103 (replace 'check
1104 (lambda _
1105 (let ((build-directory
1106 (string-append
1107 (getcwd) "/build/"
1108 (car (scandir "build"
1109 (cut string-prefix? "lib." <>))))))
1110 ;; Disable the "strict data files" option which causes
1111 ;; the build to error out if required data files are
1112 ;; not available (as is the case with PyPI archives).
1113 (substitute* "setup.cfg"
1114 (("addopts = --strict-data-files") "addopts = "))
1115 (with-directory-excursion build-directory
1116 ;; Delete tests that require "moto" which is not yet
1117 ;; in Guix.
1118 (for-each delete-file
1119 '("pandas/tests/io/conftest.py"
1120 "pandas/tests/io/json/test_compression.py"
1121 "pandas/tests/io/parser/test_network.py"
1122 "pandas/tests/io/test_parquet.py"))
1123 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1124 "--skip-network" "-k"
1125 ;; XXX: Due to the deleted tests above.
1126 "not test_read_s3_jsonl"))))))))
1127 (propagated-inputs
1128 `(("python-numpy" ,python-numpy)
1129 ("python-openpyxl" ,python-openpyxl)
1130 ("python-pytz" ,python-pytz)
1131 ("python-dateutil" ,python-dateutil)
1132 ("python-xlrd" ,python-xlrd)))
1133 (inputs
1134 `(("which" ,which)))
1135 (native-inputs
1136 `(("python-cython" ,python-cython)
1137 ("python-beautifulsoup4" ,python-beautifulsoup4)
1138 ("python-lxml" ,python-lxml)
1139 ("python-html5lib" ,python-html5lib)
1140 ("python-nose" ,python-nose)
1141 ("python-pytest" ,python-pytest)
1142 ("python-pytest-mock" ,python-pytest-mock)))
1143 (home-page "https://pandas.pydata.org")
1144 (synopsis "Data structures for data analysis, time series, and statistics")
1145 (description
1146 "Pandas is a Python package providing fast, flexible, and expressive data
1147 structures designed to make working with structured (tabular,
1148 multidimensional, potentially heterogeneous) and time series data both easy
1149 and intuitive. It aims to be the fundamental high-level building block for
1150 doing practical, real world data analysis in Python.")
1151 (license license:bsd-3)))
1152
1153 (define-public python2-pandas
1154 (package-with-python2 python-pandas))
1155
1156 (define-public python2-mechanize
1157 (package
1158 (name "python2-mechanize")
1159 (version "0.2.5")
1160 (source
1161 (origin
1162 (method url-fetch)
1163 (uri (pypi-uri "mechanize" version))
1164 (sha256
1165 (base32
1166 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:python ,python-2 ; apparently incompatible with Python 3
1170 #:tests? #f))
1171 ;; test fails with message
1172 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1173 ;; (python-3.3.2) or
1174 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1175 ;; (python-2.7.5).
1176 ;; The source code is from March 2011 and probably not up-to-date
1177 ;; with respect to python unit tests.
1178 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1179 (synopsis
1180 "Stateful programmatic web browsing in Python")
1181 (description
1182 "Mechanize implements stateful programmatic web browsing in Python,
1183 after Andy Lester’s Perl module WWW::Mechanize.")
1184 (license (license:non-copyleft
1185 "file://COPYING"
1186 "See COPYING in the distribution."))))
1187
1188
1189 (define-public python-simplejson
1190 (package
1191 (name "python-simplejson")
1192 (version "3.14.0")
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri (pypi-uri "simplejson" version))
1197 (sha256
1198 (base32
1199 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1200 (build-system python-build-system)
1201 (home-page "http://simplejson.readthedocs.org/en/latest/")
1202 (synopsis
1203 "Json library for Python")
1204 (description
1205 "JSON (JavaScript Object Notation) is a subset of JavaScript
1206 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1207 format.
1208
1209 Simplejson exposes an API familiar to users of the standard library marshal
1210 and pickle modules. It is the externally maintained version of the json
1211 library contained in Python 2.6, but maintains compatibility with Python 2.5
1212 and (currently) has significant performance advantages, even without using
1213 the optional C extension for speedups. Simplejson is also supported on
1214 Python 3.3+.")
1215 (license license:x11)))
1216
1217 (define-public python2-simplejson
1218 (package-with-python2 python-simplejson))
1219
1220
1221 (define-public python-pyicu
1222 (package
1223 (name "python-pyicu")
1224 (version "2.3.1")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "PyICU" version))
1229 (sha256
1230 (base32
1231 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1232 (build-system python-build-system)
1233 (inputs
1234 `(("icu4c" ,icu4c)))
1235 (native-inputs
1236 `(("python-pytest" ,python-pytest)
1237 ("python-six" ,python-six)))
1238 (home-page "https://github.com/ovalhub/pyicu")
1239 (synopsis "Python extension wrapping the ICU C++ API")
1240 (description
1241 "PyICU is a python extension wrapping the ICU C++ API.")
1242 (properties `((python2-variant . ,(delay python2-pyicu))))
1243 (license license:x11)))
1244
1245 (define-public python2-pyicu
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-pyicu))))
1248 (package
1249 (inherit base)
1250 (arguments
1251 `(,@(package-arguments base)
1252 #:phases
1253 (modify-phases %standard-phases
1254 (add-before 'check 'delete-failing-test
1255 (λ _
1256 ;; XXX: This fails due to Unicode issues unique to Python 2,
1257 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1258 (delete-file "test/test_Script.py")
1259 #t))))))))
1260
1261 (define-public python2-dogtail
1262 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1263 ;; spaces in indentation" with Python 3.
1264 (package
1265 (name "python2-dogtail")
1266 (version "0.9.9")
1267 (source (origin
1268 (method url-fetch)
1269 (uri (pypi-uri "dogtail" version))
1270 (sha256
1271 (base32
1272 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1273 (build-system python-build-system)
1274 (arguments `(#:python ,python-2
1275 #:tests? #f)) ; invalid command "test"
1276 ;; Currently no offical homepage.
1277 (home-page "https://pypi.python.org/pypi/dogtail/")
1278 (synopsis "GUI test tool and automation framework written in Python")
1279 (description
1280 "Dogtail is a GUI test tool and automation framework written in Python.
1281 It uses Accessibility (a11y) technologies to communicate with desktop
1282 applications. dogtail scripts are written in Python and executed like any
1283 other Python program.")
1284 (license license:gpl2+)))
1285
1286 (define-public python-empy
1287 (package
1288 (name "python-empy")
1289 (version "3.3.3")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1293 version ".tar.gz"))
1294 (sha256
1295 (base32
1296 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1297 (build-system python-build-system)
1298 (arguments
1299 `(#:tests? #f)) ; python2 only
1300 (home-page "http://www.alcyone.com/software/empy/")
1301 (synopsis "Templating system for Python")
1302 (description
1303 "EmPy is a system for embedding Python expressions and statements in
1304 template text; it takes an EmPy source file, processes it, and produces
1305 output. This is accomplished via expansions, which are special signals to the
1306 EmPy system and are set off by a special prefix (by default the at sign, @@).
1307 EmPy can expand arbitrary Python expressions and statements in this way, as
1308 well as a variety of special forms. Textual data not explicitly delimited in
1309 this way is sent unaffected to the output, allowing Python to be used in
1310 effect as a markup language. Also supported are callbacks via hooks,
1311 recording and playback via diversions, and dynamic, chainable filters. The
1312 system is highly configurable via command line options and embedded
1313 commands.")
1314 (license license:lgpl2.1+)))
1315
1316 (define-public python2-empy
1317 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1318 (package
1319 (inherit base)
1320 (arguments `(,@(package-arguments base)
1321 #:tests? #t)))))
1322
1323 (define-public python2-element-tree
1324 (package
1325 (name "python2-element-tree")
1326 (version "1.2.6")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (string-append
1330 "http://effbot.org/media/downloads/elementtree-"
1331 version "-20050316.tar.gz"))
1332 (sha256
1333 (base32
1334 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1335 (build-system python-build-system)
1336 (arguments
1337 `(#:python ,python-2 ; seems to be part of Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (synopsis "Toolkit for XML processing in Python")
1340 (description
1341 "ElementTree is a Python library supporting lightweight XML processing.")
1342 (home-page "http://effbot.org/zone/element-index.htm")
1343 (license (license:x11-style
1344 "http://docs.python.org/2/license.html"
1345 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1346
1347 (define-public python2-pybugz
1348 (package
1349 (name "python2-pybugz")
1350 (version "0.6.11")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append
1354 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1355 version ".tar.gz"))
1356 (sha256
1357 (base32
1358 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1359 (patches (search-patches "pybugz-stty.patch"
1360 "pybugz-encode-error.patch"))))
1361 (build-system python-build-system)
1362 (arguments
1363 `(#:python ,python-2 ; SyntaxError with Python 3
1364 #:tests? #f)) ; no 'test' sub-command
1365 (propagated-inputs
1366 `(("element-tree" ,python2-element-tree)))
1367 (synopsis "Python and command-line interface to Bugzilla")
1368 (description
1369 "PyBugz is a Python library and command-line tool to query the Bugzilla
1370 bug tracking system. It is meant as an aid to speed up interaction with the
1371 bug tracker.")
1372 (home-page "http://www.liquidx.net/pybugz/")
1373 (license license:gpl2)))
1374
1375 (define-public python2-enum
1376 (package
1377 (name "python2-enum")
1378 (version "0.4.6")
1379 (source (origin
1380 (method url-fetch)
1381 (uri (pypi-uri "enum" version))
1382 (sha256
1383 (base32
1384 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1385 (build-system python-build-system)
1386 (arguments
1387 `(#:python ,python-2))
1388 (home-page "http://pypi.python.org/pypi/enum/")
1389 (synopsis "Robust enumerated type support in Python")
1390 (description
1391 "This provides a module for robust enumerations in Python. It has
1392 been superseded by the Python standard library and is provided only for
1393 compatibility.")
1394 ;; Choice of either license.
1395 (license (list license:gpl3+ license:psfl))))
1396
1397 (define-public python-enum34
1398 (package
1399 (name "python-enum34")
1400 (version "1.1.6")
1401 (source
1402 (origin
1403 (method url-fetch)
1404 (uri (pypi-uri "enum34" version))
1405 (sha256
1406 (base32
1407 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1408 (build-system python-build-system)
1409 (home-page "https://pypi.python.org/pypi/enum34")
1410 (synopsis "Backported Python 3.4 Enum")
1411 (description
1412 "Enum34 is the new Python stdlib enum module available in Python 3.4
1413 backported for previous versions of Python from 2.4 to 3.3.")
1414 (license license:bsd-3)))
1415
1416 (define-public python2-enum34
1417 (package-with-python2 python-enum34))
1418
1419 (define-public python-parse-type
1420 (package
1421 (name "python-parse-type")
1422 (version "0.4.2")
1423 (source
1424 (origin
1425 (method url-fetch)
1426 (uri (pypi-uri "parse_type" version))
1427 (sha256
1428 (base32
1429 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1430 (build-system python-build-system)
1431 (propagated-inputs
1432 `(("python-six" ,python-six)
1433 ("python-parse" ,python-parse)))
1434 (native-inputs
1435 `(("python-pytest" ,python-pytest)
1436 ("python-pytest-runner" ,python-pytest-runner)))
1437 (home-page "https://github.com/jenisys/parse_type")
1438 (synopsis "Extended parse module")
1439 (description
1440 "Parse_type extends the python parse module.")
1441 (properties
1442 `((python2-variant . ,(delay python2-parse-type))))
1443 (license license:bsd-3)))
1444
1445 (define-public python2-parse-type
1446 (let ((base (package-with-python2
1447 (strip-python2-variant python-parse-type))))
1448 (package (inherit base)
1449 (propagated-inputs
1450 `(("python2-enum34" ,python2-enum34)
1451 ,@(package-propagated-inputs base))))))
1452
1453 (define-public python-parse
1454 (package
1455 (name "python-parse")
1456 (version "1.8.4")
1457 (source
1458 (origin
1459 (method url-fetch)
1460 (uri (pypi-uri "parse" version))
1461 (sha256
1462 (base32
1463 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:phases
1467 (modify-phases %standard-phases
1468 (replace 'check
1469 (lambda _ (invoke "python" "test_parse.py"))))))
1470 (home-page "https://github.com/r1chardj0n3s/parse")
1471 (synopsis "Parse strings")
1472 (description
1473 "Parse strings using a specification based on the Python @code{format()}
1474 syntax.")
1475 (license license:x11)))
1476
1477 (define-public python-polib
1478 (package
1479 (name "python-polib")
1480 (version "1.0.8")
1481 (source (origin
1482 (method url-fetch)
1483 (uri (pypi-uri "polib" version))
1484 (sha256
1485 (base32
1486 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1487 (build-system python-build-system)
1488 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1489 (synopsis "Manipulate, create and modify gettext files")
1490 (description "Polib can manipulate any gettext format (po, pot and mo)
1491 files. It can be used to create po files from scratch or to modify
1492 existing ones.")
1493 (license license:expat)))
1494
1495 (define-public python2-polib
1496 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1497 (package
1498 (inherit base)
1499 (arguments `(,@(package-arguments base)
1500 ;; Tests don't work with python2.
1501 #:tests? #f)))))
1502
1503 (define-public scons
1504 (package
1505 (name "scons")
1506 (version "3.0.4")
1507 (source (origin
1508 (method git-fetch)
1509 (uri (git-reference
1510 (url "https://github.com/SCons/scons.git")
1511 (commit version)))
1512 (file-name (git-file-name name version))
1513 (sha256
1514 (base32
1515 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1516 (build-system python-build-system)
1517 (arguments
1518 `(#:use-setuptools? #f ; still relies on distutils
1519 #:tests? #f ; no 'python setup.py test' command
1520 #:phases
1521 (modify-phases %standard-phases
1522 (add-before 'build 'bootstrap
1523 (lambda _
1524 (substitute* "src/engine/SCons/compat/__init__.py"
1525 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1526 "sys.modules[new] = __import__(old)"))
1527 (substitute* "src/engine/SCons/Platform/__init__.py"
1528 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1529 "mod = __import__(full_name)"))
1530 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1531 (chdir "build/scons")
1532 #t)))))
1533 (home-page "http://scons.org/")
1534 (synopsis "Software construction tool written in Python")
1535 (description
1536 "SCons is a software construction tool. Think of SCons as an improved,
1537 cross-platform substitute for the classic Make utility with integrated
1538 functionality similar to autoconf/automake and compiler caches such as ccache.
1539 In short, SCons is an easier, more reliable and faster way to build
1540 software.")
1541 (license license:x11)))
1542
1543 (define-public scons-python2
1544 (package
1545 (inherit (package-with-python2 scons))
1546 (name "scons-python2")))
1547
1548 (define-public python-extras
1549 (package
1550 (name "python-extras")
1551 (version "1.0.0")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "extras" version))
1556 (sha256
1557 (base32
1558 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1559 (build-system python-build-system)
1560 (arguments
1561 ;; FIXME: Circular dependency on testtools.
1562 '(#:tests? #f))
1563 (home-page "https://github.com/testing-cabal/extras")
1564 (synopsis "Useful extensions to the Python standard library")
1565 (description
1566 "Extras is a set of extensions to the Python standard library.")
1567 (license license:expat)))
1568
1569 (define-public python2-extras
1570 (package-with-python2 python-extras))
1571
1572 (define-public python-mimeparse
1573 (package
1574 (name "python-mimeparse")
1575 (version "1.6.0")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "python-mimeparse" version))
1580 (sha256
1581 (base32
1582 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1583 (build-system python-build-system)
1584 (arguments
1585 '(#:phases
1586 (modify-phases %standard-phases
1587 (replace 'check
1588 (lambda _
1589 (invoke "./mimeparse_test.py"))))))
1590 (home-page
1591 "https://github.com/dbtsai/python-mimeparse")
1592 (synopsis "Python library for parsing MIME types")
1593 (description
1594 "Mimeparse provides basic functions for parsing MIME type names and
1595 matching them against a list of media-ranges.")
1596 (license license:expat)))
1597
1598 (define-public python2-mimeparse
1599 (package-with-python2 python-mimeparse))
1600
1601 (define-public python-miniboa
1602 (package
1603 (name "python-miniboa")
1604 (version "1.0.7")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "miniboa" version))
1609 (sha256
1610 (base32
1611 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1612 (build-system python-build-system)
1613 (home-page "https://github.com/shmup/miniboa")
1614 (synopsis "Simple, single-threaded Telnet server")
1615 (description
1616 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1617 server.")
1618 (license license:asl2.0)))
1619
1620 (define-public python2-miniboa
1621 (package-with-python2 python-miniboa))
1622
1623 (define-public python-pafy
1624 (package
1625 (name "python-pafy")
1626 (version "0.5.3.1")
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri (pypi-uri "pafy" version))
1631 (sha256
1632 (base32
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1635 (arguments
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1637 (propagated-inputs
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1643 (description
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1646
1647 (define-public python2-funcsigs
1648 (package
1649 (name "python2-funcsigs")
1650 (version "1.0.2")
1651 (source (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "funcsigs" version))
1654 (sha256
1655 (base32
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1658 (arguments
1659 `(#:python ,python-2))
1660 (native-inputs
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1664 (description
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1667
1668 (define-public python2-funcsigs-bootstrap
1669 (package
1670 (inherit python2-funcsigs)
1671 (name "python2-funcsigs-bootstrap")
1672 (native-inputs `())
1673 (arguments
1674 `(#:tests? #f
1675 ,@(package-arguments python2-funcsigs)))))
1676
1677 (define-public python-py
1678 (package
1679 (name "python-py")
1680 (version "1.8.0")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (pypi-uri "py" version))
1685 (sha256
1686 (base32
1687 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1688 (build-system python-build-system)
1689 (arguments
1690 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1691 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1692 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1693 ;; Is this module globally installed?"
1694 '(#:tests? #f))
1695 (native-inputs
1696 `(("python-setuptools-scm" ,python-setuptools-scm)))
1697 (home-page "https://github.com/pytest-dev/py")
1698 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1699 (description
1700 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1701 code introspection, and logging.")
1702 (license license:expat)))
1703
1704 (define-public python2-py
1705 (package-with-python2 python-py))
1706
1707 ;; Recent versions of python-fixtures and python-testrepository need
1708 ;; python-pbr for packaging, which itself needs these two packages for
1709 ;; testing.
1710 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1711 ;; same source, just without any test dependencies and with tests disabled.
1712 ;; python-pbr-minmal is then used to package python-fixtures and
1713 ;; python-testrepository.
1714 ;; Strictly speaking we currently could remove the test-requirements from the
1715 ;; normal python-pbr package (and save this package) since test are disabled
1716 ;; there anyway. But this may change in future.
1717 (define-public python-pbr-minimal
1718 (package
1719 (name "python-pbr-minimal")
1720 (version "3.0.1")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "pbr" version))
1725 (sha256
1726 (base32
1727 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1728 (build-system python-build-system)
1729 (arguments
1730 `(#:tests? #f))
1731 (home-page "http://docs.openstack.org/developer/pbr/")
1732 (synopsis "Minimal build of python-pbr used for bootstrapping")
1733 (description
1734 "Used only for bootstrapping python2-pbr, you should not need this.")
1735 (license license:asl2.0)))
1736
1737 (define-public python2-pbr-minimal
1738 (package-with-python2 python-pbr-minimal))
1739
1740 (define-public python-pbr
1741 (package
1742 (inherit python-pbr-minimal)
1743 (name "python-pbr")
1744 (arguments
1745 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1746 (propagated-inputs
1747 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1748 (native-inputs
1749 `(("python-fixtures" ,python-fixtures-bootstrap)
1750 ;; discover, coverage, hacking, subunit
1751 ("python-mock" ,python-mock)
1752 ("python-six" ,python-six)
1753 ("python-sphinx" ,python-sphinx)
1754 ("python-testrepository" ,python-testrepository-bootstrap)
1755 ("python-testresources" ,python-testresources-bootstrap)
1756 ("python-testscenarios" ,python-testscenarios-bootstrap)
1757 ("python-testtools" ,python-testtools-bootstrap)
1758 ("python-virtualenv" ,python-virtualenv)))
1759 (synopsis "Enhance the default behavior of Python’s setuptools")
1760 (description
1761 "Python Build Reasonableness (PBR) is a library that injects some useful
1762 and sensible default behaviors into your setuptools run. It will set
1763 versions, process requirements files and generate AUTHORS and ChangeLog file
1764 from git information.
1765 ")))
1766
1767 (define-public python2-pbr
1768 (package-with-python2 python-pbr))
1769
1770 (define-public python-pyrsistent
1771 (package
1772 (name "python-pyrsistent")
1773 (version "0.14.11")
1774 (home-page "https://github.com/tobgu/pyrsistent")
1775 (source (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "pyrsistent" version))
1778 (sha256
1779 (base32
1780 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1781 (build-system python-build-system)
1782 (native-inputs
1783 `(("python-hypothesis" ,python-hypothesis)
1784 ("python-pytest" ,python-pytest)
1785 ("python-pytest-runner" ,python-pytest-runner)))
1786 (propagated-inputs
1787 `(("python-six" ,python-six)))
1788 (synopsis "Persistent data structures for Python")
1789 (description
1790 "Pyrsistent is a number of persistent collections (by some referred to as
1791 functional data structures). Persistent in the sense that they are immutable.
1792
1793 All methods on a data structure that would normally mutate it instead return a
1794 new copy of the structure containing the requested updates. The original
1795 structure is left untouched.")
1796 (license license:expat)))
1797
1798 (define-public python2-pyrsistent
1799 (package-with-python2 python-pyrsistent))
1800
1801 (define-public python-exif-read
1802 (package
1803 (name "python-exif-read")
1804 (version "2.1.2")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "ExifRead" version))
1808 (sha256
1809 (base32
1810 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1811 (build-system python-build-system)
1812 (arguments `(#:tests? #f)) ; no tests
1813 (home-page "https://github.com/ianare/exif-py")
1814 (synopsis "Python library to extract EXIF data from image files")
1815 (description
1816 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1817 files.")
1818 (license license:bsd-3)))
1819
1820 (define-public python2-exif-read
1821 (package-with-python2 python-exif-read))
1822
1823 (define-public python-pyld
1824 (package
1825 (name "python-pyld")
1826 (version "1.0.3")
1827 (source (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "PyLD" version))
1830 (sha256
1831 (base32
1832 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1833 (build-system python-build-system)
1834 (home-page "https://github.com/digitalbazaar/pyld")
1835 (synopsis "Python implementation of the JSON-LD specification")
1836 (description
1837 "PyLD is an implementation of the JSON-LD specification.")
1838 (license license:bsd-3)))
1839
1840 (define-public python2-pyld
1841 (package-with-python2 python-pyld))
1842
1843 (define-public python-click
1844 (package
1845 (name "python-click")
1846 (version "7.0")
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (pypi-uri "click" version))
1851 (sha256
1852 (base32
1853 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1854 (build-system python-build-system)
1855 (arguments
1856 `(#:phases
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'fix-paths
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1861 "cross-libc" "libc"))))
1862 (substitute* "click/_unicodefun.py"
1863 (("'locale'")
1864 (string-append "'" glibc "/bin/locale'"))))
1865 #t))
1866 (replace 'check
1867 (lambda _
1868 (invoke "python" "-m" "pytest"))))))
1869 (native-inputs
1870 `(("python-pytest" ,python-pytest)))
1871 (home-page "https://palletsprojects.com/p/click/")
1872 (synopsis "Command line library for Python")
1873 (description
1874 "Click is a Python package for creating command line interfaces in a
1875 composable way with as little code as necessary. Its name stands for
1876 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1877 with sensible defaults out of the box.")
1878 (license license:bsd-3)))
1879
1880 (define-public python2-click
1881 (package-with-python2 python-click))
1882
1883 (define-public python-wheel
1884 (package
1885 (name "python-wheel")
1886 (version "0.32.3")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "wheel" version))
1891 (sha256
1892 (base32
1893 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1894 (build-system python-build-system)
1895 (native-inputs
1896 `(("python-jsonschema" ,python-jsonschema)
1897 ("python-pytest-cov" ,python-pytest-cov)))
1898 (home-page "https://bitbucket.org/pypa/wheel/")
1899 (synopsis "Format for built Python packages")
1900 (description
1901 "A wheel is a ZIP-format archive with a specially formatted filename and
1902 the @code{.whl} extension. It is designed to contain all the files for a PEP
1903 376 compatible install in a way that is very close to the on-disk format. Many
1904 packages will be properly installed with only the @code{Unpack} step and the
1905 unpacked archive preserves enough information to @code{Spread} (copy data and
1906 scripts to their final locations) at any later time. Wheel files can be
1907 installed with a newer @code{pip} or with wheel's own command line utility.")
1908 (license license:expat)
1909 (properties `((python2-variant . ,(delay python2-wheel))))))
1910
1911 (define-public python2-wheel
1912 (let ((wheel (package-with-python2
1913 (strip-python2-variant python-wheel))))
1914 (package (inherit wheel)
1915 (native-inputs `(("python2-functools32" ,python2-functools32)
1916 ,@(package-native-inputs wheel))))))
1917
1918 (define-public python-vcversioner
1919 (package
1920 (name "python-vcversioner")
1921 (version "2.16.0.0")
1922 (source
1923 (origin
1924 (method url-fetch)
1925 (uri (pypi-uri "vcversioner" version))
1926 (sha256
1927 (base32
1928 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1929 (build-system python-build-system)
1930 (synopsis "Python library for version number discovery")
1931 (description "Vcversioner is a Python library that inspects tagging
1932 information in a variety of version control systems in order to discover
1933 version numbers.")
1934 (home-page "https://github.com/habnabit/vcversioner")
1935 (license license:isc)))
1936
1937 (define-public python2-vcversioner
1938 (package-with-python2 python-vcversioner))
1939
1940 (define-public python-jdcal
1941 (package
1942 (name "python-jdcal")
1943 (version "1.4")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "jdcal" version))
1948 (sha256
1949 (base32
1950 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1951 (build-system python-build-system)
1952 (arguments
1953 `(#:phases (modify-phases %standard-phases
1954 (replace 'check
1955 (lambda _
1956 (invoke "pytest"))))))
1957 (native-inputs
1958 `(("python-pytest" ,python-pytest)))
1959 (home-page "https://github.com/phn/jdcal")
1960 (synopsis "Functions to convert between Julian dates Gregorian dates")
1961 (description "This Python library provides functions for converting
1962 between Julian dates and Gregorian dates.")
1963 (license license:bsd-2)))
1964
1965 (define-public python2-jdcal
1966 (package-with-python2 python-jdcal))
1967
1968 (define-public python-jsonschema
1969 (package
1970 (name "python-jsonschema")
1971 (version "3.0.1")
1972 (source (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "jsonschema" version))
1975 (sha256
1976 (base32
1977 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1978 (build-system python-build-system)
1979 (arguments
1980 '(#:phases
1981 (modify-phases %standard-phases
1982 (replace 'check
1983 (lambda _
1984 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1985 (invoke "trial" "jsonschema"))))))
1986 (native-inputs
1987 `(("python-setuptools_scm" ,python-setuptools-scm)
1988 ("python-twisted" ,python-twisted)))
1989 (propagated-inputs
1990 `(("python-attrs" ,python-attrs)
1991 ("python-pyrsistent" ,python-pyrsistent)
1992 ("python-six" ,python-six)))
1993 (home-page "https://github.com/Julian/jsonschema")
1994 (synopsis "Implementation of JSON Schema for Python")
1995 (description
1996 "Jsonschema is an implementation of JSON Schema for Python.")
1997 (license license:expat)
1998 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1999
2000 (define-public python2-jsonschema
2001 (let ((jsonschema (package-with-python2
2002 (strip-python2-variant python-jsonschema))))
2003 (package (inherit jsonschema)
2004 (propagated-inputs
2005 `(("python2-functools32" ,python2-functools32)
2006 ,@(package-propagated-inputs jsonschema))))))
2007
2008 ;; This old version is still required by docker-compose as of 1.24.0.
2009 (define-public python-jsonschema-2.6
2010 (package
2011 (name "python-jsonschema")
2012 (version "2.6.0")
2013 (source (origin
2014 (method url-fetch)
2015 (uri (pypi-uri "jsonschema" version))
2016 (sha256
2017 (base32
2018 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2019 (build-system python-build-system)
2020 (arguments
2021 '(#:phases
2022 (modify-phases %standard-phases
2023 (replace 'check (lambda _ (invoke "nosetests"))))))
2024 (native-inputs
2025 `(("python-nose" ,python-nose)
2026 ("python-vcversioner" ,python-vcversioner)))
2027 (home-page "https://github.com/Julian/jsonschema")
2028 (synopsis "Implementation of JSON Schema for Python")
2029 (description
2030 "Jsonschema is an implementation of JSON Schema for Python.")
2031 (license license:expat)
2032 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2033
2034 (define-public python-schema
2035 (package
2036 (name "python-schema")
2037 (version "0.6.6")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "schema" version))
2042 (sha256
2043 (base32
2044 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2045 (build-system python-build-system)
2046 (native-inputs
2047 `(("python-pytest" ,python-pytest)))
2048 (home-page "https://github.com/keleshev/schema")
2049 (synopsis "Simple data validation library")
2050 (description
2051 "@code{python-schema} is a library for validating Python data
2052 structures, such as those obtained from config-files, forms, external
2053 services or command-line parsing, converted from JSON/YAML (or
2054 something else) to Python data-types.")
2055 (license license:psfl)))
2056
2057 (define-public python2-schema
2058 (package-with-python2 python-schema))
2059
2060 (define-public python-schema-0.5
2061 (package (inherit python-schema)
2062 (version "0.5.0")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2070
2071 (define-public python2-schema-0.5
2072 (package-with-python2 python-schema-0.5))
2073
2074 (define-public python-kitchen
2075 (package
2076 (name "python-kitchen")
2077 (version "1.2.5")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "kitchen" version))
2082 (sha256
2083 (base32
2084 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2085 (build-system python-build-system)
2086 (propagated-inputs
2087 `(("python-chardet" ,python-chardet)))
2088 (home-page "https://github.com/fedora-infra/kitchen")
2089 (synopsis "Python API for snippets")
2090 (description "@code{kitchen} module provides a python API for all sorts of
2091 little useful snippets of code that everybody ends up writing for their projects
2092 but never seem big enough to build an independent release. Use kitchen and stop
2093 cutting and pasting that code over and over.")
2094 (license (list license:lgpl2.1+
2095 ;; subprocess.py, test_subprocess.py,
2096 ;; kitchen/pycompat25/defaultdict.py:
2097 license:psfl))))
2098
2099 (define-public python2-kitchen
2100 (package-with-python2 python-kitchen))
2101
2102 (define-public python-unidecode
2103 (package
2104 (name "python-unidecode")
2105 (version "1.1.0")
2106 (source (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "Unidecode" version))
2109 (sha256
2110 (base32
2111 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2112 (build-system python-build-system)
2113 (home-page "https://pypi.python.org/pypi/Unidecode")
2114 (synopsis "ASCII transliterations of Unicode text")
2115 (description
2116 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2117 useful when integrating with legacy code that doesn't support Unicode, or for
2118 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2119 machine identifiers from human-readable Unicode strings that should still be
2120 somewhat intelligible.")
2121 (license license:gpl2+)))
2122
2123 (define-public python2-unidecode
2124 (package-with-python2 python-unidecode))
2125
2126 (define-public python-pyjwt
2127 (package
2128 (name "python-pyjwt")
2129 (version "1.5.3")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "PyJWT" version))
2134 (sha256
2135 (base32
2136 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2137 (modules '((guix build utils)))
2138 (snippet
2139 '(begin
2140 (for-each delete-file-recursively
2141 (find-files "." "\\.pyc$"))
2142 #t))))
2143 (build-system python-build-system)
2144 (native-inputs
2145 `(("python-pytest" ,python-pytest)
2146 ("python-pytest-cov" ,python-pytest-cov)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/progrium/pyjwt")
2149 (synopsis "JSON Web Token implementation in Python")
2150 (description
2151 "PyJWT is a JSON Web Token implementation written in Python.")
2152 (license license:expat)))
2153
2154 (define-public python2-pyjwt
2155 (package-with-python2 python-pyjwt))
2156
2157 (define-public python-pykka
2158 (package
2159 (name "python-pykka")
2160 (version "1.2.1")
2161 (source
2162 (origin
2163 (method url-fetch)
2164 (uri (pypi-uri "Pykka" version))
2165 (sha256
2166 (base32
2167 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-mock" ,python-mock)
2171 ("python-nose" ,python-nose)
2172 ("python-gevent" ,python-gevent)
2173 ("python-eventlet" ,python-eventlet)))
2174 (home-page "https://www.pykka.org/")
2175 (synopsis "Pykka is a Python implementation of the actor model")
2176 (description
2177 "Pykka is a Python implementation of the actor model.
2178 The actor model introduces some simple rules to control the sharing
2179 of state and cooperation between execution units, which makes it
2180 easier to build concurrent applications.")
2181 (license license:asl2.0)))
2182
2183 (define-public python2-pykka
2184 (package-with-python2 python-pykka))
2185
2186 (define-public python-pymsgbox
2187 (package
2188 (name "python-pymsgbox")
2189 (version "1.0.6")
2190 (source
2191 (origin
2192 (method git-fetch)
2193 (uri (git-reference
2194 ;; LICENSE.txt is not present on pypi
2195 (url "https://github.com/asweigart/PyMsgBox")
2196 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2197 (file-name (git-file-name name version))
2198 (sha256
2199 (base32
2200 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2201 (arguments
2202 ;; Circular dependency to run tests:
2203 ;; Tests need pyautogui, which depends on pymsgbox.
2204 '(#:tests? #f))
2205 (build-system python-build-system)
2206 (home-page "https://github.com/asweigart/PyMsgBox")
2207 (synopsis "Python module for JavaScript-like message boxes")
2208 (description
2209 "PyMsgBox is a simple, cross-platform, pure Python module for
2210 JavaScript-like message boxes. Types of dialog boxes include:
2211 @enumerate
2212 @item alert
2213 @item confirm
2214 @item prompt
2215 @item password
2216 @end enumerate
2217 ")
2218 (license license:bsd-3)))
2219
2220 (define-public python-pympler
2221 (package
2222 (name "python-pympler")
2223 (home-page "https://pythonhosted.org/Pympler/")
2224 (version "0.7")
2225 (source (origin
2226 (method url-fetch)
2227 (uri (pypi-uri "Pympler" version))
2228 (sha256
2229 (base32
2230 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2231 (build-system python-build-system)
2232 (arguments
2233 `(#:phases (modify-phases %standard-phases
2234 (delete 'check)
2235 (add-after 'install 'check
2236 (lambda* (#:key inputs outputs #:allow-other-keys)
2237 (add-installed-pythonpath inputs outputs)
2238 (invoke "python" "setup.py" "test"))))))
2239 (synopsis "Measure, monitor and analyze memory behavior")
2240 (description
2241 "Pympler is a development tool to measure, monitor and analyze
2242 the memory behavior of Python objects in a running Python application.
2243
2244 By pympling a Python application, detailed insight in the size and the
2245 lifetime of Python objects can be obtained. Undesirable or unexpected
2246 runtime behavior like memory bloat and other @samp{pymples} can easily
2247 be identified.
2248
2249 A web profiling frontend exposes process statistics, garbage
2250 visualisation and class tracker statistics.")
2251 (license license:asl2.0)))
2252
2253 (define-public python2-pympler
2254 (package-with-python2 python-pympler))
2255
2256 (define-public python-itsdangerous
2257 (package
2258 (name "python-itsdangerous")
2259 (version "1.1.0")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (pypi-uri "itsdangerous" version))
2264 (sha256
2265 (base32
2266 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2267 (build-system python-build-system)
2268 (home-page "https://palletsprojects.com/p/itsdangerous/")
2269 (synopsis "Python library for passing data to/from untrusted environments")
2270 (description
2271 "Itsdangerous provides various helpers to pass trusted data to untrusted
2272 environments and back.")
2273 (license license:bsd-3)))
2274
2275 (define-public python2-itsdangerous
2276 (package-with-python2 python-itsdangerous))
2277
2278 (define-public python-pyyaml
2279 (package
2280 (name "python-pyyaml")
2281 (version "3.13")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "PyYAML" version))
2286 (sha256
2287 (base32
2288 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2289 (build-system python-build-system)
2290 (inputs
2291 `(("libyaml" ,libyaml)))
2292 (home-page "http://pyyaml.org/wiki/PyYAML")
2293 (synopsis "YAML parser and emitter for Python")
2294 (description
2295 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2296 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2297 API, and sensible error messages. PyYAML supports standard YAML tags and
2298 provides Python-specific tags that allow to represent an arbitrary Python
2299 object.")
2300 (license license:expat)))
2301
2302 (define-public python2-pyyaml
2303 (package-with-python2 python-pyyaml))
2304
2305 (define-public python-vine
2306 (package
2307 (name "python-vine")
2308 (version "1.1.4")
2309 (source
2310 (origin
2311 (method url-fetch)
2312 (uri (pypi-uri "vine" version))
2313 (sha256
2314 (base32
2315 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2316 (build-system python-build-system)
2317 (native-inputs
2318 `(("python-pytest" ,python-pytest)
2319 ("python-case" ,python-case)))
2320 (home-page "https://github.com/celery/vine")
2321 (synopsis "Promises for Python")
2322 (description
2323 "@code{vine} provides a special implementation of promises in that it can
2324 be used both for \"promise of a value\" and lazy evaluation. The biggest
2325 upside for this is that everything in a promise can also be a promise,
2326 e.g. filters, callbacks and errbacks can all be promises.")
2327 (license license:bsd-3)))
2328
2329 (define-public python-virtualenv
2330 (package
2331 (name "python-virtualenv")
2332 (version "16.1.0")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "virtualenv" version))
2337 (sha256
2338 (base32
2339 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2340 (build-system python-build-system)
2341 (arguments
2342 `(#:phases
2343 (modify-phases %standard-phases
2344 (add-before 'check 'disable-failing-test
2345 (lambda _
2346 ;; Disable failing test. See upstream bug report
2347 ;; https://github.com/pypa/virtualenv/issues/957
2348 (substitute* "tests/test_virtualenv.py"
2349 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2350 #t)))))
2351 (native-inputs
2352 `(("python-mock" ,python-mock)
2353 ("python-pytest" ,python-pytest)))
2354 (home-page "https://virtualenv.pypa.io/")
2355 (synopsis "Virtual Python environment builder")
2356 (description
2357 "Virtualenv is a tool to create isolated Python environments.")
2358 (license license:expat)))
2359
2360 (define-public python2-virtualenv
2361 (package-with-python2 python-virtualenv))
2362
2363 (define-public python-markupsafe
2364 (package
2365 (name "python-markupsafe")
2366 (version "1.1.1")
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "MarkupSafe" version))
2371 (sha256
2372 (base32
2373 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2374 (build-system python-build-system)
2375 (arguments
2376 `(#:modules ((ice-9 ftw)
2377 (srfi srfi-1)
2378 (srfi srfi-26)
2379 (guix build utils)
2380 (guix build python-build-system))
2381 #:phases (modify-phases %standard-phases
2382 (replace 'check
2383 (lambda _
2384 (let ((cwd (getcwd))
2385 (libdir (find (cut string-prefix? "lib." <>)
2386 (scandir "build"))))
2387 (setenv "PYTHONPATH"
2388 (string-append cwd "/build/" libdir ":"
2389 (getenv "PYTHONPATH")))
2390 (invoke "pytest" "-vv")))))))
2391 (native-inputs
2392 `(("python-pytest" ,python-pytest)))
2393 (home-page "https://github.com/mitsuhiko/markupsafe")
2394 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2395 (description
2396 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2397 for Python.")
2398 (license license:bsd-3)))
2399
2400 (define-public python2-markupsafe
2401 (package-with-python2 python-markupsafe))
2402
2403 (define-public python-jinja2
2404 (package
2405 (name "python-jinja2")
2406 (version "2.10.1")
2407 (source
2408 (origin
2409 (method url-fetch)
2410 (uri (pypi-uri "Jinja2" version))
2411 (sha256
2412 (base32
2413 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2414 (build-system python-build-system)
2415 (propagated-inputs
2416 `(("python-markupsafe" ,python-markupsafe)))
2417 (home-page "http://jinja.pocoo.org/")
2418 (synopsis "Python template engine")
2419 (description
2420 "Jinja2 is a small but fast and easy to use stand-alone template engine
2421 written in pure Python.")
2422 (license license:bsd-3)))
2423
2424 (define-public python2-jinja2
2425 (package-with-python2 python-jinja2))
2426
2427 (define-public python-pystache
2428 (package
2429 (name "python-pystache")
2430 (version "0.5.4")
2431 (source (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "pystache" version))
2434 (sha256
2435 (base32
2436 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2437 (build-system python-build-system)
2438 (arguments
2439 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2440 (home-page "http://defunkt.io/pystache/")
2441 (synopsis "Python logic-less template engine")
2442 (description
2443 "Pystache is a Python implementation of the framework agnostic,
2444 logic-free templating system Mustache.")
2445 (license license:expat)
2446 (properties `((python2-variant . ,(delay python2-pystache))))))
2447
2448 (define-public python2-pystache
2449 (package (inherit (package-with-python2
2450 (strip-python2-variant python-pystache)))
2451 (arguments
2452 `(#:python ,python-2
2453 #:phases
2454 (modify-phases %standard-phases
2455 (replace 'check
2456 (lambda _
2457 (invoke "python" "test_pystache.py"))))))))
2458
2459 (define-public python-joblib
2460 (package
2461 (name "python-joblib")
2462 (version "0.13.0")
2463 (source (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "joblib" version))
2466 (sha256
2467 (base32
2468 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2469 (build-system python-build-system)
2470 (arguments
2471 `(#:phases
2472 (modify-phases %standard-phases
2473 (replace 'check
2474 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2475 (native-inputs
2476 `(("python-pytest" ,python-pytest)))
2477 (home-page "https://joblib.readthedocs.io/")
2478 (synopsis "Using Python functions as pipeline jobs")
2479 (description
2480 "Joblib is a set of tools to provide lightweight pipelining in Python.
2481 In particular, joblib offers: transparent disk-caching of the output values
2482 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2483 logging and tracing of the execution.")
2484 (license license:bsd-3)))
2485
2486 (define-public python2-joblib
2487 (package-with-python2 python-joblib))
2488
2489 (define-public python-daemon
2490 (package
2491 (name "python-daemon")
2492 (version "2.2.3")
2493 (source
2494 (origin
2495 (method url-fetch)
2496 (uri (pypi-uri "python-daemon" version))
2497 (sha256
2498 (base32
2499 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2500 (build-system python-build-system)
2501 (arguments
2502 `(#:phases
2503 (modify-phases %standard-phases
2504 (add-before 'check 'disable-tests
2505 (lambda _
2506 ;; FIXME: Determine why test fails
2507 (substitute* "test/test_daemon.py"
2508 (("test_detaches_process_context")
2509 "skip_test_detaches_process_context"))
2510 #t)))))
2511 (propagated-inputs
2512 `(("python-lockfile" ,python-lockfile)))
2513 (native-inputs
2514 `(("python-unittest2" ,python-unittest2)
2515 ("python-testtools" ,python-testtools)
2516 ("python-testscenarios" ,python-testscenarios)
2517 ("python-mock" ,python-mock)
2518 ("python-docutils" ,python-docutils)))
2519 (home-page "https://pagure.io/python-daemon/")
2520 (synopsis "Python library for making a Unix daemon process")
2521 (description "Python-daemon is a library that assists a Python program to
2522 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2523
2524 This library provides a @code{DaemonContext} class that manages the following
2525 important tasks for becoming a daemon process:
2526 @enumerate
2527 @item Detach the process into its own process group.
2528 @item Set process environment appropriate for running inside a chroot.
2529 @item Renounce suid and sgid privileges.
2530 @item Close all open file descriptors.
2531 @item Change the working directory, uid, gid, and umask.
2532 @item Set appropriate signal handlers.
2533 @item Open new file descriptors for stdin, stdout, and stderr.
2534 @item Manage a specified PID lock file.
2535 @item Register cleanup functions for at-exit processing.
2536 @end enumerate")
2537 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2538 (license (list license:asl2.0 license:gpl3+))))
2539
2540 (define-public python-docutils
2541 (package
2542 (name "python-docutils")
2543 (version "0.14")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "docutils" version))
2548 (sha256
2549 (base32
2550 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2551 (build-system python-build-system)
2552 (arguments
2553 '(#:tests? #f)) ; no setup.py test command
2554 (home-page "http://docutils.sourceforge.net/")
2555 (synopsis "Python Documentation Utilities")
2556 (description
2557 "Docutils is a modular system for processing documentation into useful
2558 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2559 reStructuredText.")
2560 ;; Most of the source code is public domain, but some source files are
2561 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2562 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2563
2564 (define-public python2-docutils
2565 (package-with-python2 python-docutils))
2566
2567 (define-public python-pygments
2568 (package
2569 (name "python-pygments")
2570 (version "2.4.2")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Pygments" version))
2575 (sha256
2576 (base32
2577 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2578 (build-system python-build-system)
2579 (arguments
2580 ;; FIXME: Tests require sphinx, which depends on this.
2581 '(#:tests? #f))
2582 (home-page "http://pygments.org/")
2583 (synopsis "Syntax highlighting")
2584 (description
2585 "Pygments is a syntax highlighting package written in Python.")
2586 (license license:bsd-2)))
2587
2588 (define-public python2-pygments
2589 (package-with-python2 python-pygments))
2590
2591 (define-public python-bumpversion
2592 (package
2593 (name "python-bumpversion")
2594 (version "0.5.3")
2595 (source
2596 (origin
2597 (method url-fetch)
2598 (uri (pypi-uri "bumpversion" version))
2599 (sha256
2600 (base32
2601 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2602 (build-system python-build-system)
2603 (home-page "https://github.com/peritus/bumpversion")
2604 (synopsis "Tool to bump software version")
2605 (description "This tool provides a command-line interface (CLI) to bump a
2606 software version simply.")
2607 (license license:expat)))
2608
2609 (define-public python-deprecated
2610 (package
2611 (name "python-deprecated")
2612 (version "1.2.5")
2613 (source
2614 (origin
2615 (method git-fetch)
2616 (uri (git-reference
2617 (url "https://github.com/tantale/deprecated.git")
2618 (commit (string-append "v" version))))
2619 (file-name (git-file-name name version))
2620 (sha256
2621 (base32
2622 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(#:phases (modify-phases %standard-phases
2626 (replace 'check
2627 (lambda _
2628 (invoke "pytest"))))))
2629 (propagated-inputs
2630 `(("python-wrapt" ,python-wrapt)))
2631 (native-inputs
2632 `(("python-bumpversion" ,python-bumpversion)
2633 ("python-pytest" ,python-pytest)
2634 ("python-pytest-cov" ,python-pytest-cov)
2635 ("python-sphinx" ,python-sphinx)
2636 ("python-tox" ,python-tox)))
2637 (home-page "https://github.com/tantale/deprecated")
2638 (synopsis "Python decorator to deprecate classes, functions or methods")
2639 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2640 to deprecate classes, functions or methods.")
2641 (license license:expat)))
2642
2643 (define-public python-pygithub
2644 (package
2645 (name "python-pygithub")
2646 (version "1.43.7")
2647 (source
2648 ;; We fetch from the Git repo because there are no tests in the PyPI
2649 ;; archive.
2650 (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://github.com/PyGithub/PyGithub.git")
2654 (commit (string-append "v" version))))
2655 (file-name (git-file-name name version))
2656 (sha256
2657 (base32
2658 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2659 (build-system python-build-system)
2660 (arguments
2661 `(#:phases (modify-phases %standard-phases
2662 ;; Some tests rely on the network.
2663 (add-after 'unpack 'disable-failing-tests
2664 (lambda _
2665 (substitute* "tests/Issue142.py"
2666 (("testDecodeJson") "disabled_testDecodeJson"))
2667 #t))
2668 (add-before 'check 'prepare-for-tests
2669 (lambda _
2670 (for-each (lambda (f)
2671 (chmod f #o666))
2672 (find-files "./tests"))
2673 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2674 (setenv "PYTHONPATH"
2675 (string-append "./tests:" (getenv "PYTHONPATH")))
2676 #t)))))
2677 (propagated-inputs
2678 `(("python-deprecated" ,python-deprecated)
2679 ("python-pyjwt" ,python-pyjwt)
2680 ("python-requests" ,python-requests)))
2681 (native-inputs `(("python-httpretty" ,python-httpretty)))
2682 (home-page "https://pygithub.readthedocs.io/en/latest/")
2683 (synopsis "Python library for the GitHub API")
2684 (description "This library allows managing GitHub resources such as
2685 repositories, user profiles, and organizations in your Python applications,
2686 using version 3 of the GitHub application programming interface (API).")
2687 (license license:lgpl3+)))
2688
2689 (define-public python-rellu
2690 (package
2691 (name "python-rellu")
2692 (version "0.7")
2693 (source
2694 (origin
2695 (method url-fetch)
2696 (uri (pypi-uri "rellu" version))
2697 (sha256
2698 (base32
2699 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2700 (build-system python-build-system)
2701 (propagated-inputs
2702 `(("python-invoke" ,python-invoke)
2703 ("python-pygithub" ,python-pygithub)))
2704 (home-page "https://github.com/robotframework/rellu")
2705 (synopsis "Utilities to create PyPI releases")
2706 (description "This collection of utilities contains tooling and templates
2707 to assist in creating releases on GitHub and publishing them on PyPI. It is
2708 designed to be used by Robot Framework and tools and libraries in its
2709 ecosystem, but can naturally be used also by other projects.")
2710 (license license:asl2.0)))
2711
2712 (define-public python-robotframework
2713 (package
2714 (name "python-robotframework")
2715 (version "3.1.2")
2716 ;; There are no tests in the PyPI archive.
2717 (source
2718 (origin
2719 (method git-fetch)
2720 (uri (git-reference
2721 (url "https://github.com/robotframework/robotframework.git")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2724 (sha256
2725 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2726 (patches (search-patches
2727 "python-robotframework-honor-source-date-epoch.patch"))))
2728 (build-system python-build-system)
2729 (arguments
2730 `(#:phases (modify-phases %standard-phases
2731 (add-before 'build 'build-and-install-doc
2732 (lambda* (#:key outputs #:allow-other-keys)
2733 (let* ((doc-output (assoc-ref outputs "doc"))
2734 (doc (string-append doc-output "/share/"
2735 ,name "-" ,version "/")))
2736 (invoke "invoke" "library-docs" "all")
2737 (mkdir-p doc)
2738 (copy-recursively "doc/libraries"
2739 (string-append doc "/libraries"))
2740 #t)))
2741 (replace 'check
2742 (lambda _
2743 (invoke "python" "utest/run.py"))))))
2744 (native-inputs
2745 `(("python-invoke" ,python-invoke)
2746 ("python-rellu" ,python-rellu)
2747 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2748 (outputs '("out" "doc"))
2749 (home-page "https://robotframework.org")
2750 (synopsis "Generic automation framework")
2751 (description "Robot Framework is a generic automation framework for
2752 acceptance testing, acceptance test driven development (ATDD), and robotic
2753 process automation (RPA).")
2754 (license license:asl2.0)))
2755
2756 (define-public python-robotframework-lint
2757 ;; There is no properly tagged release; the commit below seems to correspond
2758 ;; to the 0.9 stable release available from PyPI. The tests are not
2759 ;; included in the PyPI archive, so we fetch the sources from the upstream
2760 ;; Git repo.
2761 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2762 (revision "1"))
2763 (package
2764 (name "python-robotframework-lint")
2765 (version (git-version "0.9.0" revision commit))
2766 (source
2767 (origin
2768 (method git-fetch)
2769 (uri (git-reference
2770 (url "https://github.com/boakley/robotframework-lint.git")
2771 (commit commit)))
2772 (file-name (git-file-name name version))
2773 (sha256
2774 (base32
2775 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2776 (build-system python-build-system)
2777 (arguments
2778 `(#:phases
2779 (modify-phases %standard-phases
2780 (replace 'check
2781 (lambda _
2782 (invoke "python" "-m" "robot" "-A"
2783 "tests/conf/default.args" "tests"))))))
2784 (propagated-inputs
2785 `(("python-robotframework" ,python-robotframework)))
2786 (home-page "https://github.com/boakley/robotframework-lint/")
2787 (synopsis "Static analysis tool (linter) for Robot Framework")
2788 (description "This package provides the @code{rflint} command-line
2789 utility, a static analysis tool (linter) for Robot Framework source files.")
2790 (license license:asl2.0))))
2791
2792 (define-public python-robotframework-sshlibrary
2793 (package
2794 (name "python-robotframework-sshlibrary")
2795 (version "3.3.0")
2796 ;; There are no tests in the PyPI archive.
2797 (source
2798 (origin
2799 (method git-fetch)
2800 (uri (git-reference
2801 (url "https://github.com/robotframework/SSHLibrary.git")
2802 (commit (string-append "v" version))))
2803 (file-name (git-file-name name version))
2804 (sha256
2805 (base32
2806 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2807 (build-system python-build-system)
2808 (arguments
2809 `(#:phases
2810 (modify-phases %standard-phases
2811 (add-before 'build 'build-and-install-doc
2812 (lambda* (#:key outputs #:allow-other-keys)
2813 (let* ((doc-output (assoc-ref outputs "doc"))
2814 (doc (string-append doc-output "/share/"
2815 ,name "-" ,version "/")))
2816 (invoke "chmod" "-R" "+w" "docs")
2817 (invoke "invoke" "kw-docs" "project-docs")
2818 (mkdir-p doc)
2819 (for-each delete-file (find-files "docs" "\\.rst"))
2820 (copy-recursively "docs" doc)
2821 #t)))
2822 (replace 'check
2823 (lambda _
2824 ;; Some tests require an SSH server; we remove them.
2825 (delete-file "utest/test_client_api.py")
2826 (delete-file "utest/test_scp.py")
2827 (invoke "python" "utest/run.py"))))))
2828 (propagated-inputs
2829 `(("python-robotframework" ,python-robotframework)
2830 ("python-paramiko" ,python-paramiko)
2831 ("python-scp" ,python-scp)))
2832 (native-inputs
2833 `(("openssh" ,openssh)
2834 ("which" ,which)
2835 ;; To generate the documentation
2836 ("python-docutils" ,python-docutils)
2837 ("python-invoke" ,python-invoke)
2838 ("python-pygments" ,python-pygments)
2839 ("python-rellu" ,python-rellu)))
2840 (outputs '("out" "doc"))
2841 (home-page "https://github.com/robotframework/SSHLibrary")
2842 (synopsis "Robot Framework library for SSH and SFTP")
2843 (description "SSHLibrary is a Robot Framework library providing support
2844 for SSH and SFTP. It has the following main usages:
2845 @itemize @bullet
2846 @item Executing commands on the remote machine, either blocking or non-blocking.
2847 @item Writing and reading in an interactive shell.
2848 @item Transferring files and directories over SFTP.
2849 @item Ensuring that files and directories exist on the remote machine.
2850 @end itemize")
2851 (license license:asl2.0)))
2852
2853 (define-public python-scp
2854 (package
2855 (name "python-scp")
2856 (version "0.13.2")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (pypi-uri "scp" version))
2861 (sha256
2862 (base32
2863 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2864 (build-system python-build-system)
2865 (arguments
2866 '(#:tests? #f)) ;tests require an SSH server
2867 (propagated-inputs
2868 `(("python-paramiko" ,python-paramiko)))
2869 (home-page "https://github.com/jbardin/scp.py")
2870 (synopsis "SCP protocol module for Python and Paramiko")
2871 (description "The scp module extends the Paramiko library to send and
2872 receive files via the SCP1 protocol, as implemented by the OpenSSH
2873 @command{scp} program.")
2874 (license license:gpl2+)))
2875
2876 (define-public python-rst.linker
2877 (package
2878 (name "python-rst.linker")
2879 (version "1.10")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "rst.linker" version))
2884 (sha256
2885 (base32
2886 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2887 (build-system python-build-system)
2888 (propagated-inputs
2889 `(("python-dateutil" ,python-dateutil)
2890 ("python-six" ,python-six)))
2891 (native-inputs
2892 `(("python-setuptools-scm" ,python-setuptools-scm)))
2893 ;; Test would require path.py, which would introduce a cyclic dependence.
2894 (arguments `(#:tests? #f))
2895 ;; Note: As of version 1.7 the documentation is not worth building.
2896 (home-page "https://github.com/jaraco/rst.linker")
2897 (synopsis "Sphinx plugin to add links and timestamps")
2898 (description "rst.linker allows to automatically replace text by a
2899 reStructuredText external reference or timestamps. It's primary purpose is to
2900 augment the changelog, but it can be used for other documents, too.")
2901 (license license:expat)))
2902
2903 (define-public python2-rst.linker
2904 (package-with-python2 python-rst.linker))
2905
2906 (define-public python-feedgenerator
2907 (package
2908 (name "python-feedgenerator")
2909 (version "1.9")
2910 (source
2911 (origin
2912 (method url-fetch)
2913 (uri (pypi-uri "feedgenerator" version))
2914 (sha256
2915 (base32
2916 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2917 (modules '((guix build utils)))
2918 (snippet
2919 '(begin
2920 ;; Remove pre-compiled .pyc files from source.
2921 (for-each delete-file-recursively
2922 (find-files "." "__pycache__" #:directories? #t))
2923 (for-each delete-file (find-files "." "\\.pyc$"))
2924 #t))))
2925 (build-system python-build-system)
2926 (propagated-inputs
2927 `(("python-pytz" ,python-pytz)
2928 ("python-six" ,python-six)))
2929 (home-page "https://github.com/getpelican/feedgenerator")
2930 (synopsis
2931 "Standalone version of Django's Atom/RSS feed generator")
2932 (description
2933 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2934 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2935 (license license:bsd-3)))
2936
2937 (define-public python2-feedgenerator
2938 (package-with-python2 python-feedgenerator))
2939
2940 (define-public python-toml
2941 (package
2942 (name "python-toml")
2943 (version "0.9.4")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "toml" version))
2948 (sha256
2949 (base32
2950 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2951 (build-system python-build-system)
2952 (arguments
2953 `(#:tests? #f)) ;no tests suite in release
2954 (home-page "https://github.com/uiri/toml")
2955 (synopsis "Library for TOML")
2956 (description
2957 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2958 Language (TOML) configuration files.")
2959 (license license:expat)))
2960
2961 (define-public python-jsonrpc-server
2962 (package
2963 (name "python-jsonrpc-server")
2964 (version "0.1.2")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "python-jsonrpc-server" version))
2969 (sha256
2970 (base32
2971 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-future" ,python-future)
2975 ("python-mock" ,python-mock)
2976 ("python-pytest" ,python-pytest)))
2977 (home-page
2978 "https://github.com/palantir/python-jsonrpc-server")
2979 (synopsis "JSON RPC 2.0 server library")
2980 (description
2981 "This package provides a JSON RPC 2.0 server library for Python.")
2982 (license license:expat)))
2983
2984 (define-public python-pydocstyle
2985 (package
2986 (name "python-pydocstyle")
2987 (version "3.0.0")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "pydocstyle" version))
2992 (sha256
2993 (base32
2994 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2995 (build-system python-build-system)
2996 (propagated-inputs
2997 `(("python-six" ,python-six)
2998 ("python-snowballstemmer" ,python-snowballstemmer)))
2999 (home-page
3000 "https://github.com/PyCQA/pydocstyle/")
3001 (synopsis "Python docstring style checker")
3002 (description
3003 "This package provides a style checker for the Python Language
3004 Server (PLS).")
3005 (license license:expat)))
3006
3007 ;; XXX: We must use a non-release version since the latest release version
3008 ;; requires python-jedi version < 0.15.
3009 (define-public python-language-server
3010 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3011 (revision "1"))
3012 (package
3013 (name "python-language-server")
3014 (version (git-version "0.28.3" revision commit))
3015 (source
3016 (origin
3017 (method git-fetch)
3018 (uri (git-reference
3019 (url "https://github.com/palantir/python-language-server.git")
3020 (commit commit)))
3021 (sha256
3022 (base32
3023 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3024 (build-system python-build-system)
3025 (propagated-inputs
3026 `(("python-pluggy" ,python-pluggy)
3027 ("python-jsonrpc-server" ,python-jsonrpc-server)
3028 ("python-jedi" ,python-jedi)
3029 ("python-yapf" ,python-yapf)
3030 ("python-pyflakes" ,python-pyflakes)
3031 ("python-pydocstyle" ,python-pydocstyle)
3032 ("python-pycodestyle" ,python-pycodestyle)
3033 ("python-mccabe" ,python-mccabe)
3034 ("python-rope" ,python-rope)
3035 ("python-autopep8" ,python-autopep8)
3036 ("python-pylint" ,python-pylint)))
3037 (home-page "https://github.com/palantir/python-language-server")
3038 (synopsis "Python implementation of the Language Server Protocol")
3039 (description
3040 "The Python Language Server (pyls) is an implementation of the Python 3
3041 language specification for the Language Server Protocol (LSP). This tool is
3042 used in text editing environments to provide a complete and integrated
3043 feature-set for programming Python effectively.")
3044 (license license:expat))))
3045
3046 (define-public python-black
3047 (package
3048 (name "python-black")
3049 (version "18.6b4")
3050 (source
3051 (origin
3052 (method url-fetch)
3053 (uri (pypi-uri "black" version))
3054 (sha256
3055 (base32
3056 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3057 (build-system python-build-system)
3058 (arguments
3059 `(#:phases
3060 (modify-phases %standard-phases
3061 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3062 (lambda _
3063 (let ((python3 (which "python3")))
3064 (substitute* '("tests/data/fmtonoff.py"
3065 "tests/data/string_prefixes.py"
3066 "tests/data/function.py")
3067 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3068 (string-append "#!" python3 (if (string? minor-version)
3069 minor-version
3070 ""))))))))))
3071 (propagated-inputs
3072 `(("python-click" ,python-click)
3073 ("python-attrs" ,python-attrs)
3074 ("python-appdirs" ,python-appdirs)
3075 ("python-toml" ,python-toml)))
3076 (home-page "https://github.com/ambv/black")
3077 (synopsis "The uncompromising code formatter")
3078 (description "Black is the uncompromising Python code formatter.")
3079 (license license:expat)))
3080
3081 (define-public python-blinker
3082 (package
3083 (name "python-blinker")
3084 (version "1.4")
3085 (source
3086 (origin
3087 (method url-fetch)
3088 (uri (pypi-uri "blinker" version))
3089 (sha256
3090 (base32
3091 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3092 (build-system python-build-system)
3093 (home-page "http://pythonhosted.org/blinker/")
3094 (synopsis "Fast, simple object-to-object and broadcast signaling")
3095 (description
3096 "Blinker provides a fast dispatching system that allows any number of
3097 interested parties to subscribe to events, or \"signals\".")
3098 (license license:expat)))
3099
3100 (define-public python2-blinker
3101 (package-with-python2 python-blinker))
3102
3103 (define-public pelican
3104 (package
3105 (name "pelican")
3106 (version "4.0.1")
3107 (source
3108 (origin
3109 (method url-fetch)
3110 (uri (pypi-uri "pelican" version))
3111 (sha256
3112 (base32
3113 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3114 (build-system python-build-system)
3115 (propagated-inputs
3116 `(("python-feedgenerator" ,python-feedgenerator)
3117 ("python-jinja2" ,python-jinja2)
3118 ("python-pygments" ,python-pygments)
3119 ("python-docutils" ,python-docutils)
3120 ("python-pytz" ,python-pytz)
3121 ("python-blinker" ,python-blinker)
3122 ("python-unidecode" ,python-unidecode)
3123 ("python-six" ,python-six)
3124 ("python-dateutil" ,python-dateutil)
3125 ("python-markdown" ,python-markdown)))
3126 (home-page "https://getpelican.com/")
3127 (arguments
3128 `(;; XXX Requires a lot more packages to do unit tests :P
3129 #:tests? #f
3130 #:phases (modify-phases %standard-phases
3131 (add-before
3132 'install 'adjust-requires
3133 ;; Since feedgenerator is installed from git, it doesn't
3134 ;; conform to the version requirements.
3135 ;;
3136 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3137 ;; version requirement so setuptools doesn't get confused.
3138 (lambda _
3139 (substitute* "setup.py"
3140 (("['\"]feedgenerator.*?['\"]")
3141 "'feedgenerator'")))))))
3142 (synopsis "Python-based static site publishing system")
3143 (description
3144 "Pelican is a tool to generate a static blog from reStructuredText,
3145 Markdown input files, and more. Pelican uses Jinja2 for templating
3146 and is very extensible.")
3147 (license license:agpl3+)))
3148
3149 (define-public mallard-ducktype
3150 (package
3151 (name "mallard-ducktype")
3152 (version "1.0.2")
3153 (source
3154 (origin
3155 (method git-fetch)
3156 ;; git-reference because tests are not included in pypi source tarball
3157 ;; https://issues.guix.gnu.org/issue/36755#2
3158 (uri (git-reference
3159 (url "https://github.com/projectmallard/mallard-ducktype.git")
3160 (commit version)))
3161 (file-name (git-file-name name version))
3162 (sha256
3163 (base32
3164 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3165 (build-system python-build-system)
3166 (arguments
3167 '(#:phases
3168 (modify-phases %standard-phases
3169 (replace 'check
3170 (lambda _
3171 (with-directory-excursion "tests"
3172 (invoke "sh" "runtests")))))))
3173 (home-page "http://projectmallard.org")
3174 (synopsis "Convert Ducktype to Mallard documentation markup")
3175 (description
3176 "Ducktype is a lightweight syntax that can represent all the semantics
3177 of the Mallard XML documentation system. Ducktype files can be converted to
3178 Mallard using the @command{ducktype} tool. The yelp-tools package
3179 provides additional functionality on the produced Mallard documents.")
3180 (license license:expat)))
3181
3182 (define-public python-scikit-image
3183 (package
3184 (name "python-scikit-image")
3185 (version "0.14.2")
3186 (source
3187 (origin
3188 (method url-fetch)
3189 (uri (pypi-uri "scikit-image" version))
3190 (sha256
3191 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3192 (build-system python-build-system)
3193 (arguments
3194 ;; TODO: Some tests require running X11 server. Disable them?
3195 '(#:tests? #f))
3196 ;; See DEPENDS.txt for the list of build and run time requiremnts
3197 (propagated-inputs
3198 `(("python-cloudpickle" ,python-cloudpickle)
3199 ("python-dask" ,python-dask)
3200 ("python-matplotlib" ,python-matplotlib)
3201 ("python-networkx" ,python-networkx)
3202 ("python-numpy" ,python-numpy)
3203 ("python-pillow" ,python-pillow)
3204 ("python-pywavelets" ,python-pywavelets)
3205 ("python-scipy" ,python-scipy)
3206 ("python-six" ,python-six)))
3207 (native-inputs
3208 `(("python-cython" ,python-cython)))
3209 (home-page "http://scikit-image.org/")
3210 (synopsis "Image processing in Python")
3211 (description
3212 "Scikit-image is a collection of algorithms for image processing.")
3213 (license license:bsd-3)))
3214
3215 (define-public python2-scikit-image
3216 (package-with-python2 python-scikit-image))
3217
3218 (define-public python-cython
3219 (package
3220 (name "python-cython")
3221 (version "0.29.13")
3222 (source
3223 (origin
3224 (method url-fetch)
3225 (uri (pypi-uri "Cython" version))
3226 (sha256
3227 (base32
3228 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3229 (build-system python-build-system)
3230 ;; we need the full python package and not just the python-wrapper
3231 ;; because we need libpython3.3m.so
3232 (inputs
3233 `(("python" ,python)))
3234 (arguments
3235 `(#:phases
3236 (modify-phases %standard-phases
3237 (add-before 'check 'set-HOME
3238 ;; some tests require access to "$HOME/.cython"
3239 (lambda _ (setenv "HOME" "/tmp") #t))
3240
3241 ;; FIXME: These tests started failing on armhf after the 0.28 update
3242 ;; (commit c69d11c5930), both with an error such as this:
3243 ;; compiling (cpp) and running dictcomp ...
3244 ;; === C/C++ compiler error output: ===
3245 ;; ‘
3246 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3247 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3248 ,@(if (target-arm32?)
3249 `((add-before 'check 'disable-failing-tests
3250 (lambda _
3251 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3252 (for-each (lambda (test)
3253 (format disabled-tests "~a\n" test))
3254 '("memslice" "dictcomp"))
3255 (close-port disabled-tests)))))
3256 '())
3257
3258 (replace 'check
3259 (lambda _
3260 ;; Disable compiler optimizations to greatly reduce the running
3261 ;; time of the test suite.
3262 (setenv "CFLAGS" "-O0")
3263
3264 (invoke "python" "runtests.py" "-vv"
3265 "-j" (number->string (parallel-job-count))))))))
3266 (home-page "https://cython.org/")
3267 (synopsis "C extensions for Python")
3268 (description "Cython is an optimising static compiler for both the Python
3269 programming language and the extended Cython programming language. It makes
3270 writing C extensions for Python as easy as Python itself.")
3271 (license license:asl2.0)
3272 (properties `((python2-variant . ,(delay python2-cython))))))
3273
3274 (define-public python2-cython
3275 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3276 (package
3277 (inherit base)
3278 (name "python2-cython")
3279 (inputs
3280 `(("python-2" ,python-2))) ;this is not automatically changed
3281 (arguments
3282 (substitute-keyword-arguments (package-arguments base)
3283 ((#:phases phases)
3284 `(modify-phases ,phases
3285 (add-before 'check 'adjust-test_embed
3286 (lambda _
3287 (substitute* "runtests.py"
3288 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3289 ;; so it can give the right -L flag to GCC when embedding static
3290 ;; builds of Python. It is unaware that the Python "config"
3291 ;; directory (where the static library lives) was renamed in
3292 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3293 ;; which works fine, because that is where the shared library is.
3294 ;;
3295 ;; It also appears to be unaware that the Makefile in Demos/embed
3296 ;; already unconditionally pass the static library location to GCC,
3297 ;; after checking sysconfig.get_config_var('LIBPL).
3298 ;;
3299 ;; The effect is that the linker is unable to resolve libexpat
3300 ;; symbols when building for Python 2, because neither the Python 2
3301 ;; shared library nor Expat is available. To fix it, we can either
3302 ;; add Expat as an input and make it visible to the linker, or just
3303 ;; prevent it from overriding the Python shared library location.
3304 ;; The end result is identical, so we take the easy route.
3305 ((" or libname not in os\\.listdir\\(libdir\\)")
3306 ""))
3307 #t)))))))))
3308
3309 ;; The RPython toolchain currently does not support Python 3.
3310 (define-public python2-rpython
3311 (package
3312 (name "python2-rpython")
3313 (version "0.2.1")
3314 (source
3315 (origin
3316 (method url-fetch)
3317 (uri (pypi-uri "rpython" version))
3318 (sha256
3319 (base32
3320 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3321 (build-system python-build-system)
3322 (arguments `(#:python ,python-2))
3323 (native-inputs
3324 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3325 (home-page "https://rpython.readthedocs.org")
3326 (synopsis "Framework for implementing interpreters and virtual machines")
3327 (description "RPython is a translation and support framework for
3328 producing implementations of dynamic languages, emphasizing a clean separation
3329 between language specification and implementation aspects.")
3330 (license license:expat)))
3331
3332 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3333 ;; python-scipy still build, as these three packages are often used together.
3334 (define-public python-numpy
3335 (package
3336 (name "python-numpy")
3337 (version "1.15.4")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (string-append
3342 "https://github.com/numpy/numpy/releases/download/v"
3343 version "/numpy-" version ".tar.gz"))
3344 (sha256
3345 (base32
3346 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3347 (build-system python-build-system)
3348 (inputs
3349 `(("openblas" ,openblas)
3350 ("lapack" ,lapack)))
3351 (native-inputs
3352 `(("python-cython" ,python-cython)
3353 ("python-pytest" ,python-pytest)
3354 ("gfortran" ,gfortran)))
3355 (arguments
3356 `(#:phases
3357 (modify-phases %standard-phases
3358 (add-before 'build 'configure-blas-lapack
3359 (lambda* (#:key inputs #:allow-other-keys)
3360 (call-with-output-file "site.cfg"
3361 (lambda (port)
3362 (format port
3363 "[openblas]
3364 libraries = openblas
3365 library_dirs = ~a/lib
3366 include_dirs = ~a/include
3367
3368 # backslash-n to make emacs happy
3369 \n[lapack]
3370 lapack_libs = lapack
3371 library_dirs = ~a/lib
3372 include_dirs = ~a/include
3373 "
3374 (assoc-ref inputs "openblas")
3375 (assoc-ref inputs "openblas")
3376 (assoc-ref inputs "lapack")
3377 (assoc-ref inputs "lapack"))))
3378 #t))
3379 (add-before 'build 'fix-executable-paths
3380 (lambda* (#:key inputs #:allow-other-keys)
3381 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3382 ;; instead of /bin/sh.
3383 (substitute* "numpy/distutils/exec_command.py"
3384 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3385 (string-append match-start (assoc-ref inputs "bash") match-end)))
3386 ;; Use "gcc" executable, not "cc".
3387 (substitute* "numpy/distutils/system_info.py"
3388 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3389 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3390 #t))
3391 ;; Tests can only be run after the library has been installed and not
3392 ;; within the source directory.
3393 (delete 'check)
3394 (add-after 'install 'check
3395 (lambda* (#:key outputs inputs #:allow-other-keys)
3396 ;; Make installed package available for running the tests
3397 (add-installed-pythonpath inputs outputs)
3398 ;; Make sure "f2py" etc is found.
3399 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3400 ":" (getenv "PATH")))
3401 (with-directory-excursion "/tmp"
3402 (invoke "python" "-c"
3403 "import numpy; numpy.test(verbose=2)")))))))
3404 (home-page "http://www.numpy.org/")
3405 (synopsis "Fundamental package for scientific computing with Python")
3406 (description "NumPy is the fundamental package for scientific computing
3407 with Python. It contains among other things: a powerful N-dimensional array
3408 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3409 and Fortran code, useful linear algebra, Fourier transform, and random number
3410 capabilities.")
3411 (license license:bsd-3)))
3412
3413 (define-public python2-numpy
3414 (package-with-python2 python-numpy))
3415
3416 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3417 ;; interest only for legacy code going back to NumPy's predecessor
3418 ;; Numeric.
3419 (define-public python2-numpy-1.8
3420 (package (inherit python2-numpy)
3421 (version "1.8.2")
3422 (source
3423 (origin
3424 (method url-fetch)
3425 (uri (string-append
3426 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3427 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3428 (sha256
3429 (base32
3430 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3431 (arguments
3432 (substitute-keyword-arguments (package-arguments python2-numpy)
3433 ((#:phases phases)
3434 `(modify-phases ,phases
3435 (replace 'configure-blas-lapack
3436 (lambda* (#:key inputs #:allow-other-keys)
3437 (call-with-output-file "site.cfg"
3438 (lambda (port)
3439 (format port
3440 "[openblas]
3441 libraries = openblas,lapack
3442 library_dirs = ~a/lib:~a/lib
3443 include_dirs = ~a/include:~a/include
3444 "
3445 (assoc-ref inputs "openblas")
3446 (assoc-ref inputs "lapack")
3447 (assoc-ref inputs "openblas")
3448 (assoc-ref inputs "lapack"))))
3449 #t))))))
3450 (native-inputs
3451 `(("python2-nose" ,python2-nose)))
3452 (description "NumPy is the fundamental package for scientific computing
3453 with Python. It contains among other things: a powerful N-dimensional array
3454 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3455 and Fortran code, useful linear algebra, Fourier transform, and random number
3456 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3457 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3458 Numeric.")
3459 (license license:bsd-3)))
3460
3461 (define-public python-munch
3462 (package
3463 (name "python-munch")
3464 (version "2.0.4")
3465 (source
3466 (origin
3467 (method url-fetch)
3468 (uri (pypi-uri "munch" version))
3469 (sha256
3470 (base32
3471 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3472 (build-system python-build-system)
3473 (home-page "https://github.com/Infinidat/munch")
3474 (synopsis "Dot-accessible dictionary")
3475 (description "Munch is a dot-accessible dictionary similar to JavaScript
3476 objects.")
3477 (license license:expat)))
3478
3479 (define-public python2-munch
3480 (package-with-python2 python-munch))
3481
3482 (define-public python-colormath
3483 (package
3484 (name "python-colormath")
3485 (version "3.0.0")
3486 (source
3487 (origin
3488 (method url-fetch)
3489 (uri (pypi-uri "colormath" version))
3490 (sha256
3491 (base32
3492 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3493 (build-system python-build-system)
3494 (propagated-inputs
3495 `(("python-networkx" ,python-networkx)
3496 ("python-numpy" ,python-numpy)))
3497 (home-page "https://github.com/gtaylor/python-colormath")
3498 (synopsis "Color math and conversion library")
3499 (description
3500 "This is a Python library for color math and conversions.")
3501 (license license:bsd-3)))
3502
3503 (define-public python2-colormath
3504 (package-with-python2 python-colormath))
3505
3506 (define-public python-spectra
3507 (package
3508 (name "python-spectra")
3509 (version "0.0.11")
3510 (source
3511 (origin
3512 (method url-fetch)
3513 (uri (pypi-uri "spectra" version))
3514 (sha256
3515 (base32
3516 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3517 (build-system python-build-system)
3518 (arguments
3519 `(#:phases
3520 (modify-phases %standard-phases
3521 (replace 'check
3522 (lambda _ (invoke "nosetests" "-v"))))))
3523 (propagated-inputs
3524 `(("python-colormath" ,python-colormath)))
3525 (native-inputs
3526 `(("python-nose" ,python-nose)))
3527 (home-page "https://github.com/jsvine/spectra")
3528 (synopsis "Color scales and color conversion")
3529 (description
3530 "This package provides a Python library intended to make color math,
3531 color scales, and color space conversion easy. It has support for:
3532
3533 @enumerate
3534 @item Color scales
3535 @item Color ranges
3536 @item Color blending
3537 @item Brightening/darkening colors
3538 @item Saturating/desaturating colors
3539 @item Conversion to/from multiple color spaces.
3540 @end enumerate\n")
3541 (license license:expat)))
3542
3543 (define-public python2-spectra
3544 (package-with-python2 python-spectra))
3545
3546 (define-public python-numpy-documentation
3547 (package
3548 (name "python-numpy-documentation")
3549 (version (package-version python-numpy))
3550 (source (package-source python-numpy))
3551 (build-system python-build-system)
3552 (native-inputs
3553 `(("python-matplotlib" ,python-matplotlib)
3554 ("python-numpy" ,python-numpy)
3555 ("pkg-config" ,pkg-config)
3556 ("python-sphinx" ,python-sphinx)
3557 ("python-numpydoc" ,python-numpydoc)
3558 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3559 texlive-fonts-ec
3560 texlive-generic-ifxetex
3561 texlive-generic-pdftex
3562 texlive-amsfonts
3563 texlive-latex-capt-of
3564 texlive-latex-cmap
3565 texlive-latex-environ
3566 texlive-latex-eqparbox
3567 texlive-latex-etoolbox
3568 texlive-latex-expdlist
3569 texlive-latex-fancyhdr
3570 texlive-latex-fancyvrb
3571 texlive-latex-fncychap
3572 texlive-latex-float
3573 texlive-latex-framed
3574 texlive-latex-geometry
3575 texlive-latex-graphics
3576 texlive-latex-hyperref
3577 texlive-latex-mdwtools
3578 texlive-latex-multirow
3579 texlive-latex-needspace
3580 texlive-latex-oberdiek
3581 texlive-latex-parskip
3582 texlive-latex-preview
3583 texlive-latex-tabulary
3584 texlive-latex-threeparttable
3585 texlive-latex-titlesec
3586 texlive-latex-trimspaces
3587 texlive-latex-ucs
3588 texlive-latex-upquote
3589 texlive-latex-url
3590 texlive-latex-varwidth
3591 texlive-latex-wrapfig)))
3592 ("texinfo" ,texinfo)
3593 ("perl" ,perl)
3594 ("scipy-sphinx-theme"
3595 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3596 (method git-fetch)
3597 (uri (git-reference
3598 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3599 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3600 (sha256
3601 (base32
3602 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3603 ,@(package-native-inputs python-numpy)))
3604 (arguments
3605 `(#:tests? #f ; we're only generating the documentation
3606 #:phases
3607 (modify-phases %standard-phases
3608 (delete 'build)
3609 (replace 'install
3610 (lambda* (#:key inputs outputs #:allow-other-keys)
3611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3612 (doc (string-append
3613 data "/doc/" ,name "-"
3614 ,(package-version python-numpy)))
3615 (info-reader (string-append data "/info"))
3616 (html (string-append doc "/html"))
3617 (scipy-sphinx-theme "scipy-sphinx-theme")
3618 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3619 (pyver ,(string-append "PYVER=")))
3620
3621 ;; FIXME: this is needed to for texlive-union to generate
3622 ;; fonts, which are not found.
3623 (setenv "HOME" "/tmp")
3624
3625 (with-directory-excursion "doc"
3626 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3627 (mkdir-p html)
3628 (invoke "make" "html" pyver)
3629 (invoke "make" "latex" "PAPER=a4" pyver)
3630 (invoke "make" "-C" "build/latex"
3631 "all-pdf" "PAPER=a4" pyver)
3632 ;; FIXME: Generation of the info file fails.
3633 ;; (invoke "make" "info" pyver)
3634 ;; (mkdir-p info)
3635 ;; (copy-file "build/texinfo/numpy.info"
3636 ;; (string-append info "/numpy.info"))
3637 (for-each (lambda (file)
3638 (copy-file (string-append "build/latex" file)
3639 (string-append doc file)))
3640 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3641 (with-directory-excursion "build/html"
3642 (for-each (lambda (file)
3643 (let* ((dir (dirname file))
3644 (tgt-dir (string-append html "/" dir)))
3645 (unless (equal? "." dir)
3646 (mkdir-p tgt-dir))
3647 (install-file file html)))
3648 (find-files "." ".*")))))
3649 #t)))))
3650 (home-page (package-home-page python-numpy))
3651 (synopsis "Documentation for the python-numpy package")
3652 (description (package-description python-numpy))
3653 (license (package-license python-numpy))))
3654
3655 (define-public python2-numpy-documentation
3656 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3657 (package
3658 (inherit numpy-documentation)
3659 (native-inputs `(("python2-functools32" ,python2-functools32)
3660 ,@(package-native-inputs numpy-documentation))))))
3661
3662 (define-public python-pygit2
3663 (package
3664 (name "python-pygit2")
3665 (version "0.28.2")
3666 (source
3667 (origin
3668 (method url-fetch)
3669 (uri (pypi-uri "pygit2" version))
3670 (sha256
3671 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3672 (build-system python-build-system)
3673 (arguments
3674 '(#:tests? #f)) ; tests don't run correctly in our environment
3675 (propagated-inputs
3676 `(("python-six" ,python-six)
3677 ("python-cffi" ,python-cffi)
3678 ("libgit2" ,libgit2)
3679 ("python-tox" ,python-tox)))
3680 (native-inputs
3681 `(("python-pytest" ,python-pytest)))
3682 (home-page "https://github.com/libgit2/pygit2")
3683 (synopsis "Python bindings for libgit2")
3684 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3685 library, libgit2 implements Git plumbing.")
3686 ;; GPL2.0 only, with linking exception.
3687 (license license:gpl2)))
3688
3689 (define-public python2-pygit2
3690 (package-with-python2 python-pygit2))
3691
3692 (define-public python-pyparsing
3693 (package
3694 (name "python-pyparsing")
3695 (version "2.3.1")
3696 (source
3697 (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "pyparsing" version))
3700 (sha256
3701 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3702 (build-system python-build-system)
3703 (outputs '("out" "doc"))
3704 (arguments
3705 `(#:tests? #f ; no test target
3706 #:phases
3707 (modify-phases %standard-phases
3708 (add-after 'install 'install-doc
3709 (lambda* (#:key outputs #:allow-other-keys)
3710 (let* ((doc (string-append (assoc-ref outputs "doc")
3711 "/share/doc/" ,name "-" ,version))
3712 (html-doc (string-append doc "/html"))
3713 (examples (string-append doc "/examples")))
3714 (mkdir-p html-doc)
3715 (mkdir-p examples)
3716 (for-each
3717 (lambda (dir tgt)
3718 (map (lambda (file)
3719 (install-file file tgt))
3720 (find-files dir ".*")))
3721 (list "docs" "htmldoc" "examples")
3722 (list doc html-doc examples))
3723 #t))))))
3724 (home-page "https://github.com/pyparsing/pyparsing")
3725 (synopsis "Python parsing class library")
3726 (description
3727 "The pyparsing module is an alternative approach to creating and
3728 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3729 of regular expressions. The pyparsing module provides a library of classes
3730 that client code uses to construct the grammar directly in Python code.")
3731 (license license:expat)))
3732
3733 (define-public python2-pyparsing
3734 (package-with-python2 python-pyparsing))
3735
3736 (define-public python-numpydoc
3737 (package
3738 (name "python-numpydoc")
3739 (version "0.8.0")
3740 (source
3741 (origin
3742 (method url-fetch)
3743 (uri (pypi-uri "numpydoc" version))
3744 (sha256
3745 (base32
3746 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3747 (build-system python-build-system)
3748 (propagated-inputs
3749 `(("python-sphinx" ,python-sphinx)))
3750 (native-inputs
3751 `(("python-nose" ,python-nose)))
3752 (home-page "https://pypi.python.org/pypi/numpydoc")
3753 (synopsis
3754 "Numpy's Sphinx extensions")
3755 (description
3756 "Sphinx extension to support docstrings in Numpy format.")
3757 (license license:bsd-2)))
3758
3759 (define-public python2-numpydoc
3760 (package-with-python2 python-numpydoc))
3761
3762 (define-public python-numexpr
3763 (package
3764 (name "python-numexpr")
3765 (version "2.6.5")
3766 (source
3767 (origin
3768 (method url-fetch)
3769 (uri (pypi-uri "numexpr" version))
3770 (sha256
3771 (base32
3772 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3773 (build-system python-build-system)
3774 (arguments `(#:tests? #f)) ; no tests included
3775 (propagated-inputs
3776 `(("python-numpy" ,python-numpy)))
3777 (home-page "https://github.com/pydata/numexpr")
3778 (synopsis "Fast numerical expression evaluator for NumPy")
3779 (description
3780 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3781 expressions that operate on arrays are accelerated and use less memory than
3782 doing the same calculation in Python. In addition, its multi-threaded
3783 capabilities can make use of all your cores, which may accelerate
3784 computations, most specially if they are not memory-bounded (e.g. those using
3785 transcendental functions).")
3786 (license license:expat)))
3787
3788 (define-public python2-numexpr
3789 (package-with-python2 python-numexpr))
3790
3791 (define-public python-cycler
3792 (package
3793 (name "python-cycler")
3794 (version "0.10.0")
3795 (source (origin
3796 (method url-fetch)
3797 (uri (pypi-uri "cycler" version))
3798 (sha256
3799 (base32
3800 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3801 (build-system python-build-system)
3802 (arguments
3803 ;; XXX: The current version requires 'coveralls' which we don't have.
3804 ;; Enable this for the next release which uses 'python-pytest'.
3805 '(#:tests? #f))
3806 (propagated-inputs
3807 `(("python-six" ,python-six)))
3808 (home-page "http://matplotlib.org/cycler/")
3809 (synopsis "Composable keyword argument iterator")
3810 (description
3811 "When using @code{matplotlib} and plotting more than one line, it is
3812 common to want to be able to want to be able to cycle over one or more artist
3813 styles; but the plotting logic can quickly become involved.
3814 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3815 @code{Cycler} class was developed.")
3816 (license license:bsd-3)))
3817
3818 (define-public python2-cycler
3819 (package-with-python2 python-cycler))
3820
3821 (define-public python-colorspacious
3822 (package
3823 (name "python-colorspacious")
3824 (version "1.1.0")
3825 (source
3826 (origin
3827 (method git-fetch)
3828 (uri (git-reference
3829 (url "https://github.com/njsmith/colorspacious.git")
3830 (commit (string-append "v" version))))
3831 (file-name (git-file-name name version))
3832 (sha256
3833 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3834 (build-system python-build-system)
3835 (propagated-inputs
3836 `(("python-numpy" ,python-numpy)))
3837 (native-inputs
3838 `(("python-nose" ,python-nose)))
3839 (arguments
3840 `(#:phases
3841 (modify-phases %standard-phases
3842 (replace 'check
3843 (lambda _
3844 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3845 (home-page "https://github.com/njsmith/colorspacious")
3846 (synopsis "Python library for colorspace conversions")
3847 (description "@code{colorspacious} is a Python library that lets you
3848 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3849 (license license:expat)))
3850
3851 (define-public python2-colorspacious
3852 (package-with-python2 python-colorspacious))
3853
3854 (define-public python-matplotlib
3855 (package
3856 (name "python-matplotlib")
3857 (version "3.1.1")
3858 (source
3859 (origin
3860 (method url-fetch)
3861 (uri (pypi-uri "matplotlib" version))
3862 (sha256
3863 (base32
3864 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3865 (build-system python-build-system)
3866 (propagated-inputs ; the following packages are all needed at run time
3867 `(("python-cycler" ,python-cycler)
3868 ("python-kiwisolver" ,python-kiwisolver)
3869 ("python-pyparsing" ,python-pyparsing)
3870 ("python-pygobject" ,python-pygobject)
3871 ("gobject-introspection" ,gobject-introspection)
3872 ("python-tkinter" ,python "tk")
3873 ("python-dateutil" ,python-dateutil)
3874 ("python-numpy" ,python-numpy)
3875 ("python-pillow" ,python-pillow)
3876 ("python-pytz" ,python-pytz)
3877 ("python-six" ,python-six)
3878 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3879 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3880 ;; object. For this reason we need to import both libraries.
3881 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3882 ("python-pycairo" ,python-pycairo)
3883 ("python-cairocffi" ,python-cairocffi)))
3884 (inputs
3885 `(("libpng" ,libpng)
3886 ("imagemagick" ,imagemagick)
3887 ("freetype" ,freetype)
3888 ("cairo" ,cairo)
3889 ("glib" ,glib)
3890 ;; FIXME: Add backends when available.
3891 ;("python-wxpython" ,python-wxpython)
3892 ("tcl" ,tcl)
3893 ("tk" ,tk)))
3894 (native-inputs
3895 `(("pkg-config" ,pkg-config)
3896 ("python-pytest" ,python-pytest)
3897 ("python-mock" ,python-mock)
3898 ("unzip" ,unzip)
3899 ("jquery-ui"
3900 ,(origin
3901 (method url-fetch)
3902 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3903 (sha256
3904 (base32
3905 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3906 (arguments
3907 `(#:phases
3908 (modify-phases %standard-phases
3909 ;; XXX We disable all image comparison tests because we're using a
3910 ;; newer version of FreeType than matplotlib expects. This leads to
3911 ;; minor differences throughout the tests.
3912 (add-after 'unpack 'fix-and-disable-failing-tests
3913 (lambda _
3914 (substitute* (append (find-files "lib/matplotlib/tests/"
3915 "test_.*\\.py$")
3916 (find-files "lib/mpl_toolkits/tests"
3917 "test_.*\\.py$"))
3918 (("^from matplotlib" match)
3919 (string-append "import pytest\n" match))
3920 (("( *)@image_comparison" match indent)
3921 (string-append indent
3922 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3923 match)))
3924 (substitute* "lib/matplotlib/tests/test_animation.py"
3925 (("/bin/sh") (which "sh")))
3926 (for-each delete-file
3927 ;; test_normal_axes, test_get_tightbbox_polar
3928 '("lib/matplotlib/tests/test_axes.py"
3929 ;; test_outward_ticks
3930 "lib/matplotlib/tests/test_tightlayout.py"
3931 ;; Fontconfig returns no fonts.
3932 "lib/matplotlib/tests/test_font_manager.py"))
3933 #t))
3934 (add-before 'install 'install-jquery-ui
3935 (lambda* (#:key outputs inputs #:allow-other-keys)
3936 (let ((dir (string-append (assoc-ref outputs "out")
3937 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3938 (mkdir-p dir)
3939 (invoke "unzip"
3940 (assoc-ref inputs "jquery-ui")
3941 "-d" dir))
3942 #t))
3943 (delete 'check)
3944 (add-after 'install 'check
3945 (lambda* (#:key outputs inputs #:allow-other-keys)
3946 (add-installed-pythonpath inputs outputs)
3947 (invoke "python" "tests.py" "-v"
3948 "-m" "not network")))
3949 (add-before 'build 'configure-environment
3950 (lambda* (#:key outputs inputs #:allow-other-keys)
3951 (let ((cairo (assoc-ref inputs "cairo")))
3952 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3953 ;; has not effect.
3954 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3955 (setenv "HOME" (getcwd))
3956 (call-with-output-file "setup.cfg"
3957 (lambda (port)
3958 (format port "[directories]~%
3959 basedirlist = ~a,~a~%
3960 [packages]~%
3961 tests = True~%"
3962 (assoc-ref inputs "tcl")
3963 (assoc-ref inputs "tk")))))
3964 #t)))))
3965 (home-page "http://matplotlib.org")
3966 (synopsis "2D plotting library for Python")
3967 (description
3968 "Matplotlib is a Python 2D plotting library which produces publication
3969 quality figures in a variety of hardcopy formats and interactive environments
3970 across platforms. Matplotlib can be used in Python scripts, the python and
3971 ipython shell, web application servers, and six graphical user interface
3972 toolkits.")
3973 (license license:psfl)
3974 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3975
3976 (define-public python2-matplotlib
3977 (let ((matplotlib (package-with-python2
3978 (strip-python2-variant python-matplotlib))))
3979 (package (inherit matplotlib)
3980 (version "2.2.3")
3981 (source
3982 (origin
3983 (method url-fetch)
3984 (uri (pypi-uri "matplotlib" version))
3985 (sha256
3986 (base32
3987 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3988 ;; Make sure to use special packages for Python 2 instead
3989 ;; of those automatically rewritten by package-with-python2.
3990 (propagated-inputs
3991 `(("python2-pycairo" ,python2-pycairo)
3992 ("python2-backports-functools-lru-cache"
3993 ,python2-backports-functools-lru-cache)
3994 ("python2-functools32" ,python2-functools32)
3995 ("python2-pygobject-2" ,python2-pygobject-2)
3996 ("python2-subprocess32" ,python2-subprocess32)
3997 ("python2-tkinter" ,python-2 "tk")
3998 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3999 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4000
4001 (define-public python-matplotlib-documentation
4002 (package
4003 (name "python-matplotlib-documentation")
4004 (version (package-version python-matplotlib))
4005 (source (package-source python-matplotlib))
4006 (build-system python-build-system)
4007 (native-inputs
4008 `(("python-matplotlib" ,python-matplotlib)
4009 ("python-colorspacious" ,python-colorspacious)
4010 ("python-sphinx" ,python-sphinx)
4011 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4012 ("python-sphinx-gallery" ,python-sphinx-gallery)
4013 ("python-numpydoc" ,python-numpydoc)
4014 ("python-ipython" ,python-ipython)
4015 ("python-ipykernel" ,python-ipykernel)
4016 ("python-mock" ,python-mock)
4017 ("graphviz" ,graphviz)
4018 ("texlive" ,(texlive-union (list texlive-amsfonts
4019 texlive-latex-amsmath
4020 texlive-latex-enumitem
4021 texlive-latex-expdlist
4022 texlive-latex-geometry
4023 texlive-latex-preview
4024 texlive-latex-type1cm
4025 texlive-latex-ucs
4026
4027 texlive-generic-pdftex
4028
4029 texlive-fonts-ec
4030 texlive-fonts-adobe-times
4031 texlive-fonts-txfonts)))
4032 ("texinfo" ,texinfo)
4033 ,@(package-native-inputs python-matplotlib)))
4034 (arguments
4035 `(#:tests? #f ; we're only generating documentation
4036 #:phases
4037 (modify-phases %standard-phases
4038 ;; The tests in python-matplotlib are run after the install phase, so
4039 ;; we need to delete the extra phase here.
4040 (delete 'check)
4041 (replace 'build
4042 (lambda _
4043 (chdir "doc")
4044 (setenv "PYTHONPATH"
4045 (string-append (getenv "PYTHONPATH")
4046 ":" (getcwd) "/../examples/units"))
4047 (substitute* "conf.py"
4048 ;; Don't use git.
4049 (("^SHA = check_output.*")
4050 (string-append "SHA = \"" ,version "\"\n"))
4051 ;; Don't fetch intersphinx files from the Internet
4052 (("^explicit_order_folders" m)
4053 (string-append "intersphinx_mapping = {}\n" m))
4054 (("'sphinx.ext.intersphinx',") "")
4055 ;; Disable URL embedding which requires internet access.
4056 (("'https://docs.scipy.org/doc/numpy'") "None")
4057 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4058 (invoke "make"
4059 "SPHINXBUILD=sphinx-build"
4060 "SPHINXOPTS=" ; don't abort on warnings
4061 "html" "texinfo")))
4062 (replace 'install
4063 (lambda* (#:key inputs outputs #:allow-other-keys)
4064 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4065 (doc (string-append data "/doc/python-matplotlib-" ,version))
4066 (info (string-append data "/info"))
4067 (html (string-append doc "/html")))
4068 (mkdir-p html)
4069 (mkdir-p info)
4070 (copy-recursively "build/html" html)
4071 (symlink (string-append html "/_images")
4072 (string-append info "/matplotlib-figures"))
4073 (with-directory-excursion "build/texinfo"
4074 (substitute* "matplotlib.texi"
4075 (("@image\\{([^,]*)" all file)
4076 (string-append "@image{matplotlib-figures/" file)))
4077 (symlink (string-append html "/_images")
4078 "./matplotlib-figures")
4079 (invoke "makeinfo" "--no-split"
4080 "-o" "matplotlib.info" "matplotlib.texi"))
4081 (install-file "build/texinfo/matplotlib.info" info))
4082 #t)))))
4083 (home-page (package-home-page python-matplotlib))
4084 (synopsis "Documentation for the python-matplotlib package")
4085 (description (package-description python-matplotlib))
4086 (license (package-license python-matplotlib))))
4087
4088 (define-public python2-matplotlib-documentation
4089 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4090 (package
4091 (inherit parent)
4092 (native-inputs
4093 (alist-delete "python-sphinx-copybutton"
4094 (package-native-inputs parent))))))
4095
4096 (define-public python-matplotlib-venn
4097 (package
4098 (name "python-matplotlib-venn")
4099 (version "0.11.5")
4100 (source
4101 (origin
4102 (method url-fetch)
4103 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4104 (sha256
4105 (base32
4106 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4107 (build-system python-build-system)
4108 (arguments '(#:tests? #f)) ; tests are not included
4109 (propagated-inputs
4110 `(("python-matplotlib" ,python-matplotlib)
4111 ("python-numpy" ,python-numpy)
4112 ("python-scipy" ,python-scipy)))
4113 (native-inputs
4114 `(("unzip" ,unzip)))
4115 (home-page "https://github.com/konstantint/matplotlib-venn")
4116 (synopsis "Plot area-proportional Venn diagrams")
4117 (description
4118 "This package provides tools for plotting area-proportional two- and
4119 three-way Venn diagrams in @code{matplotlib}.")
4120 (license license:expat)))
4121
4122 (define-public python2-pysnptools
4123 (package
4124 (name "python2-pysnptools")
4125 (version "0.3.13")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (pypi-uri "pysnptools" version))
4130 (sha256
4131 (base32
4132 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4133 (build-system python-build-system)
4134 (arguments
4135 `(#:python ,python-2 ; only Python 2.7 is supported
4136 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4137 (propagated-inputs
4138 `(("python2-numpy" ,python2-numpy)
4139 ("python2-scipy" ,python2-scipy)
4140 ("python2-pandas" ,python2-pandas)))
4141 (native-inputs
4142 `(("python2-cython" ,python2-cython)))
4143 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4144 (synopsis "Library for reading and manipulating genetic data")
4145 (description
4146 "PySnpTools is a library for reading and manipulating genetic data. It
4147 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4148 those files. It can also efficiently manipulate ranges of integers using set
4149 operators such as union, intersection, and difference.")
4150 (license license:asl2.0)))
4151
4152 (define-public python-scipy
4153 (package
4154 (name "python-scipy")
4155 (version "1.3.1")
4156 (source
4157 (origin
4158 (method url-fetch)
4159 (uri (pypi-uri "scipy" version))
4160 (sha256
4161 (base32
4162 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4163 (build-system python-build-system)
4164 (propagated-inputs
4165 `(("python-numpy" ,python-numpy)
4166 ("python-matplotlib" ,python-matplotlib)
4167 ("python-pyparsing" ,python-pyparsing)))
4168 (inputs
4169 `(("lapack" ,lapack)
4170 ("openblas" ,openblas)))
4171 (native-inputs
4172 `(("python-cython" ,python-cython)
4173 ("python-pytest" ,python-pytest)
4174 ("python-sphinx" ,python-sphinx)
4175 ("python-numpydoc" ,python-numpydoc)
4176 ("gfortran" ,gfortran)
4177 ("perl" ,perl)
4178 ("which" ,which)))
4179 (outputs '("out" "doc"))
4180 (arguments
4181 `(#:phases
4182 (modify-phases %standard-phases
4183 (add-after 'unpack 'disable-broken-tests
4184 (lambda _
4185 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4186 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4187 (string-append indent
4188 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4189 m)))
4190 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4191 (("^def test_parallel_threads\\(\\):" m)
4192 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4193 m)))
4194 #t))
4195 (add-before 'build 'configure-openblas
4196 (lambda* (#:key inputs #:allow-other-keys)
4197 (call-with-output-file "site.cfg"
4198 (lambda (port)
4199 (format port
4200 "[blas]
4201 libraries = openblas
4202 library_dirs = ~a/lib
4203 include_dirs = ~a/include
4204
4205 # backslash-n to make emacs happy
4206 \n[atlas]
4207 library_dirs = ~a/lib
4208 atlas_libs = openblas
4209 "
4210 (assoc-ref inputs "openblas")
4211 (assoc-ref inputs "openblas")
4212 (assoc-ref inputs "openblas"))))
4213 #t))
4214 (add-after 'install 'install-doc
4215 (lambda* (#:key inputs outputs #:allow-other-keys)
4216 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4217 (doc (string-append data "/doc/" ,name "-" ,version))
4218 (html (string-append doc "/html"))
4219 (pyver ,(string-append "PYVER=" (version-major+minor
4220 (package-version python))))
4221 ;; By default it tries to run sphinx-build through the Python
4222 ;; interpreter which won't work with our shell wrapper.
4223 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4224 ;; Make installed package available for building the
4225 ;; documentation
4226 (add-installed-pythonpath inputs outputs)
4227 (with-directory-excursion "doc"
4228 ;; Fix generation of images for mathematical expressions.
4229 (substitute* (find-files "source" "conf\\.py")
4230 (("pngmath_use_preview = True")
4231 "pngmath_use_preview = False"))
4232 (mkdir-p html)
4233 (invoke "make" "html" pyver sphinxbuild)
4234 (with-directory-excursion "build/html"
4235 (for-each (lambda (file)
4236 (let* ((dir (dirname file))
4237 (tgt-dir (string-append html "/" dir)))
4238 (install-file file html)))
4239 (find-files "." ".*")))))
4240 #t))
4241 ;; Tests can only be run after the library has been installed and not
4242 ;; within the source directory.
4243 (delete 'check)
4244 (add-after 'install 'check
4245 (lambda* (#:key inputs outputs #:allow-other-keys)
4246 (add-installed-pythonpath inputs outputs)
4247 (with-directory-excursion "/tmp"
4248 (invoke "python" "-c"
4249 "import scipy; scipy.test(verbose=2)")))))))
4250 (home-page "https://www.scipy.org/")
4251 (synopsis "The Scipy library provides efficient numerical routines")
4252 (description "The SciPy library is one of the core packages that make up
4253 the SciPy stack. It provides many user-friendly and efficient numerical
4254 routines such as routines for numerical integration and optimization.")
4255 (properties `((python2-variant . ,(delay python2-scipy))))
4256 (license license:bsd-3)))
4257
4258 ;; Version 1.2.2 is the last version to support Python 2
4259 (define-public python2-scipy
4260 (package
4261 (inherit (package-with-python2
4262 (strip-python2-variant python-scipy)))
4263 (version "1.2.2")
4264 (source
4265 (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "scipy" version))
4268 (sha256
4269 (base32
4270 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4271
4272 (define-public python-socksipy-branch
4273 (package
4274 (name "python-socksipy-branch")
4275 (version "1.01")
4276 (source
4277 (origin
4278 (method url-fetch)
4279 (uri (pypi-uri "SocksiPy-branch" version))
4280 (sha256
4281 (base32
4282 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4283 (build-system python-build-system)
4284 (arguments
4285 `(#:tests? #f)) ; There are no tests
4286 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4287 (synopsis "Python SOCKS module")
4288 (description
4289 "SocksiPy - A Python SOCKS client module. It provides a
4290 socket-like interface that supports connections to any TCP
4291 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4292 The original version was developed by Dan Haim, this is a
4293 branch created by Mario Vilas to address some open issues,
4294 as the original project seems to have been abandoned circa 2007.")
4295 (license license:bsd-3)))
4296
4297 (define-public python2-socksipy-branch
4298 (package-with-python2 python-socksipy-branch))
4299
4300 (define-public python-pycodestyle
4301 (package
4302 (name "python-pycodestyle")
4303 (version "2.5.0")
4304 (source
4305 (origin
4306 (method url-fetch)
4307 (uri (pypi-uri "pycodestyle" version))
4308 (sha256
4309 (base32
4310 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4311 (build-system python-build-system)
4312 (home-page "https://pycodestyle.readthedocs.io/")
4313 (synopsis "Python style guide checker")
4314 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4315 Python code against some of the style conventions in
4316 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4317 (license license:expat)))
4318
4319 (define-public python2-pycodestyle
4320 (package-with-python2 python-pycodestyle))
4321
4322 (define-public python-multidict
4323 (package
4324 (name "python-multidict")
4325 (version "4.2.0")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (pypi-uri "multidict" version))
4330 (sha256
4331 (base32
4332 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4333 (build-system python-build-system)
4334 (native-inputs
4335 `(("python-pytest" ,python-pytest)
4336 ("python-pytest-runner" ,python-pytest-runner)))
4337 (home-page "https://github.com/aio-libs/multidict/")
4338 (synopsis "Multidict implementation")
4339 (description "Multidict is dict-like collection of key-value pairs
4340 where key might be occurred more than once in the container.")
4341 (license license:asl2.0)))
4342
4343 (define-public python-orderedmultidict
4344 (package
4345 (name "python-orderedmultidict")
4346 (version "0.7.11")
4347 (source
4348 (origin
4349 (method url-fetch)
4350 (uri (pypi-uri "orderedmultidict" version))
4351 (sha256
4352 (base32
4353 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4354 (build-system python-build-system)
4355 (arguments
4356 `(#:phases
4357 (modify-phases %standard-phases
4358 (add-after 'unpack 'fix-tests
4359 (lambda _
4360 ;; The package uses nosetest for running the tests.
4361 ;; Adding this initfile allows to run the test suite
4362 ;; without requiring nosetest.
4363 (with-output-to-file "tests/__init__.py" newline)
4364 #t)))))
4365 (propagated-inputs
4366 `(("python-six" ,python-six)))
4367 (native-inputs
4368 `(("python-pycodestyle" ,python-pycodestyle)))
4369 (home-page "https://github.com/gruns/orderedmultidict")
4370 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4371 (description "This package contains a library for ordered multivalue
4372 dictionaries. A multivalue dictionary is a dictionary that can store
4373 multiple values for the same key. An ordered multivalue dictionary is a
4374 multivalue dictionary that retains the order of insertions and deletions.")
4375 (license license:unlicense)))
4376
4377 (define-public python2-orderedmultidict
4378 (package-with-python2 python-orderedmultidict))
4379
4380 (define-public python-autopep8
4381 (package
4382 (name "python-autopep8")
4383 (version "1.3.5")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (pypi-uri "autopep8" version))
4388 (sha256
4389 (base32
4390 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4391 (build-system python-build-system)
4392 (propagated-inputs
4393 `(("python-pycodestyle" ,python-pycodestyle)))
4394 (home-page "https://github.com/hhatto/autopep8")
4395 (synopsis "Format Python code according to the PEP 8 style guide")
4396 (description
4397 "@code{autopep8} automatically formats Python code to conform to
4398 the PEP 8 style guide. It uses the pycodestyle utility to determine
4399 what parts of the code needs to be formatted. @code{autopep8} is
4400 capable of fixing most of the formatting issues that can be reported
4401 by pycodestyle.")
4402 (license (license:non-copyleft
4403 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4404
4405 (define-public python2-autopep8
4406 (package-with-python2 python-autopep8))
4407
4408 (define-public python-distutils-extra
4409 (package
4410 (name "python-distutils-extra")
4411 (version "2.38")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4416 version "/+download/python-distutils-extra-"
4417 version ".tar.gz"))
4418 (sha256
4419 (base32
4420 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4421 (build-system python-build-system)
4422 (home-page "https://launchpad.net/python-distutils-extra/")
4423 (synopsis "Enhancements to Python's distutils")
4424 (description
4425 "The python-distutils-extra module enables you to easily integrate
4426 gettext support, themed icons, and scrollkeeper-based documentation into
4427 Python's distutils.")
4428 (license license:gpl2)))
4429
4430 (define-public python2-distutils-extra
4431 (package-with-python2 python-distutils-extra))
4432
4433 (define-public python2-elib.intl
4434 (package
4435 (name "python2-elib.intl")
4436 (version "0.0.3")
4437 (source
4438 (origin
4439 ;; This project doesn't tag releases or publish tarballs, so we take
4440 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4441 (method git-fetch)
4442 (uri (git-reference
4443 (url "https://github.com/dieterv/elib.intl.git")
4444 (commit "d09997cfef")))
4445 (file-name (string-append name "-" version "-checkout"))
4446 (sha256
4447 (base32
4448 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4449 (build-system python-build-system)
4450 (arguments
4451 ;; incompatible with Python 3 (exception syntax)
4452 `(#:python ,python-2
4453 #:tests? #f))
4454 (home-page "https://github.com/dieterv/elib.intl")
4455 (synopsis "Enhanced internationalization for Python")
4456 (description
4457 "The elib.intl module provides enhanced internationalization (I18N)
4458 services for your Python modules and applications.")
4459 (license license:lgpl3+)))
4460
4461 (define-public python-olefile
4462 (package
4463 (name "python-olefile")
4464 (version "0.46")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4469 "download/v" version "/olefile-" version ".tar.gz"))
4470 (file-name (string-append name "-" version ".tar.gz"))
4471 (sha256
4472 (base32
4473 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4474 (build-system python-build-system)
4475 (home-page "https://www.decalage.info/python/olefileio")
4476 (synopsis "Read and write Microsoft OLE2 files.")
4477 (description
4478 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4479 Storage or Compound Document, Microsoft Office). It is an improved version of
4480 the OleFileIO module from PIL, the Python Image Library.")
4481 (license license:bsd-3)))
4482
4483 (define-public python2-olefile
4484 (package-with-python2 python-olefile))
4485
4486 (define-public python-pillow
4487 (package
4488 (name "python-pillow")
4489 (version "6.1.0")
4490 (source
4491 (origin
4492 (method url-fetch)
4493 (uri (pypi-uri "Pillow" version))
4494 (sha256
4495 (base32
4496 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4497 (build-system python-build-system)
4498 (native-inputs
4499 `(("python-pytest" ,python-pytest)))
4500 (inputs
4501 `(("freetype" ,freetype)
4502 ("lcms" ,lcms)
4503 ("zlib" ,zlib)
4504 ("libjpeg" ,libjpeg)
4505 ("openjpeg" ,openjpeg)
4506 ("libtiff" ,libtiff)
4507 ("libwebp" ,libwebp)))
4508 (propagated-inputs
4509 `(("python-olefile" ,python-olefile)))
4510 (arguments
4511 `(#:phases
4512 (modify-phases %standard-phases
4513 (add-after 'unpack 'patch-ldconfig
4514 (lambda _
4515 (substitute* "setup.py"
4516 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4517 (delete 'check) ; We must run checks after python-pillow is installed.
4518 (add-after 'install 'check-installed
4519 (lambda* (#:key outputs inputs #:allow-other-keys)
4520 (begin
4521 (setenv "HOME" (getcwd))
4522 ;; Make installed package available for running the tests.
4523 (add-installed-pythonpath inputs outputs)
4524 (invoke "python" "selftest.py" "--installed")
4525 (invoke "python" "-m" "pytest" "-vv")))))))
4526 (home-page "https://python-pillow.org")
4527 (synopsis "Fork of the Python Imaging Library")
4528 (description
4529 "The Python Imaging Library adds image processing capabilities to your
4530 Python interpreter. This library provides extensive file format support, an
4531 efficient internal representation, and fairly powerful image processing
4532 capabilities. The core image library is designed for fast access to data
4533 stored in a few basic pixel formats. It should provide a solid foundation for
4534 a general image processing tool.")
4535 (license (license:x11-style
4536 "http://www.pythonware.com/products/pil/license.htm"
4537 "The PIL Software License"))))
4538
4539 (define-public python2-pillow
4540 (package-with-python2 python-pillow))
4541
4542 (define-public python-pycparser
4543 (package
4544 (name "python-pycparser")
4545 (version "2.19")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (pypi-uri "pycparser" version))
4550 (sha256
4551 (base32
4552 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4553 (outputs '("out" "doc"))
4554 (build-system python-build-system)
4555 (native-inputs
4556 `(("pkg-config" ,pkg-config)))
4557 (arguments
4558 `(#:phases
4559 (modify-phases %standard-phases
4560 (replace 'check
4561 (lambda _
4562 (with-directory-excursion "tests"
4563 (invoke "python" "all_tests.py"))
4564 #t))
4565 (add-after 'install 'install-doc
4566 (lambda* (#:key outputs #:allow-other-keys)
4567 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4568 (doc (string-append data "/doc/" ,name "-" ,version))
4569 (examples (string-append doc "/examples")))
4570 (mkdir-p examples)
4571 (for-each (lambda (file)
4572 (copy-file (string-append "." file)
4573 (string-append doc file)))
4574 '("/README.rst" "/CHANGES" "/LICENSE"))
4575 (copy-recursively "examples" examples)
4576 #t))))))
4577 (home-page "https://github.com/eliben/pycparser")
4578 (synopsis "C parser in Python")
4579 (description
4580 "Pycparser is a complete parser of the C language, written in pure Python
4581 using the PLY parsing library. It parses C code into an AST and can serve as
4582 a front-end for C compilers or analysis tools.")
4583 (license license:bsd-3)))
4584
4585 (define-public python2-pycparser
4586 (package-with-python2 python-pycparser))
4587
4588 (define-public python-pywavelets
4589 (package
4590 (name "python-pywavelets")
4591 (version "1.0.1")
4592 (home-page "https://github.com/PyWavelets/pywt")
4593 (source (origin
4594 (method url-fetch)
4595 (uri (pypi-uri "PyWavelets" version))
4596 (sha256
4597 (base32
4598 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4599 (build-system python-build-system)
4600 (arguments
4601 '(#:modules ((ice-9 ftw)
4602 (srfi srfi-1)
4603 (srfi srfi-26)
4604 (guix build utils)
4605 (guix build python-build-system))
4606 #:phases (modify-phases %standard-phases
4607 (replace 'check
4608 (lambda _
4609 (let ((cwd (getcwd))
4610 (libdir (find (cut string-prefix? "lib." <>)
4611 (scandir "build"))))
4612 (with-directory-excursion (string-append cwd "/build/" libdir)
4613 (invoke "nosetests" "-v" "."))))))))
4614 (native-inputs
4615 `(("python-matplotlib" ,python-matplotlib) ;for tests
4616 ("python-nose" ,python-nose)))
4617 (propagated-inputs
4618 `(("python-numpy" ,python-numpy)))
4619 (synopsis "Wavelet transforms in Python")
4620 (description
4621 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4622 mathematical basis functions that are localized in both time and frequency.
4623 Wavelet transforms are time-frequency transforms employing wavelets. They are
4624 similar to Fourier transforms, the difference being that Fourier transforms are
4625 localized only in frequency instead of in time and frequency.")
4626 (license license:expat)))
4627
4628 (define-public python2-pywavelets
4629 (package-with-python2 python-pywavelets))
4630
4631 (define-public python-xcffib
4632 (package
4633 (name "python-xcffib")
4634 (version "0.6.0")
4635 (source
4636 (origin
4637 (method url-fetch)
4638 (uri (pypi-uri "xcffib" version))
4639 (sha256
4640 (base32
4641 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4642 (build-system python-build-system)
4643 (inputs
4644 `(("libxcb" ,libxcb)))
4645 (propagated-inputs
4646 `(("python-cffi" ,python-cffi) ; used at run time
4647 ("python-six" ,python-six)))
4648 (arguments
4649 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4650 #:tests? #f
4651 #:phases
4652 (modify-phases %standard-phases
4653 (add-after 'unpack 'fix-libxcb-path
4654 (lambda* (#:key inputs #:allow-other-keys)
4655 (let ((libxcb (assoc-ref inputs "libxcb")))
4656 (substitute* '("xcffib/__init__.py")
4657 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4658 #t)))
4659 (add-after 'install 'install-doc
4660 (lambda* (#:key outputs #:allow-other-keys)
4661 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4662 "/doc/" ,name "-" ,version)))
4663 (mkdir-p doc)
4664 (copy-file "README.md"
4665 (string-append doc "/README.md"))
4666 #t))))))
4667 (home-page "https://github.com/tych0/xcffib")
4668 (synopsis "XCB Python bindings")
4669 (description
4670 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4671 support for Python 3 and PyPy. It is based on cffi.")
4672 (license license:expat)))
4673
4674 (define-public python2-xcffib
4675 (package-with-python2 python-xcffib))
4676
4677 (define-public python-cairocffi
4678 (package
4679 (name "python-cairocffi")
4680 (version "0.9.0")
4681 (source
4682 (origin
4683 (method url-fetch)
4684 (uri (pypi-uri "cairocffi" version))
4685 (sha256
4686 (base32
4687 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4688 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4689 (build-system python-build-system)
4690 (outputs '("out" "doc"))
4691 (inputs
4692 `(("glib" ,glib)
4693 ("gtk+" ,gtk+)
4694 ("gdk-pixbuf" ,gdk-pixbuf)
4695 ("cairo" ,cairo)
4696 ("pango" ,pango)))
4697 (native-inputs
4698 `(("pkg-config" ,pkg-config)
4699 ("python-pytest" ,python-pytest)
4700 ("python-pytest-cov" ,python-pytest-cov)
4701 ("python-pytest-runner" ,python-pytest-runner)
4702 ("python-sphinx" ,python-sphinx)
4703 ("python-docutils" ,python-docutils)))
4704 (propagated-inputs
4705 `(("python-xcffib" ,python-xcffib))) ; used at run time
4706 (arguments
4707 `(#:phases
4708 (modify-phases %standard-phases
4709 (add-after 'unpack 'patch-paths
4710 (lambda* (#:key inputs outputs #:allow-other-keys)
4711 (substitute* (find-files "." "\\.py$")
4712 (("dlopen\\(ffi, 'cairo'")
4713 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4714 "/lib/libcairo.so.2'"))
4715 (("dlopen\\(ffi, 'gdk-3'")
4716 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4717 "/lib/libgtk-3.so.0'"))
4718 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4719 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4720 "/lib/libgdk_pixbuf-2.0.so.0'"))
4721 (("dlopen\\(ffi, 'glib-2.0'")
4722 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4723 "/lib/libglib-2.0.so.0'"))
4724 (("dlopen\\(ffi, 'gobject-2.0'")
4725 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4726 "/lib/libgobject-2.0.so.0'"))
4727 (("dlopen\\(ffi, 'pangocairo-1.0'")
4728 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4729 "/lib/libpangocairo-1.0.so.0'"))
4730 (("dlopen\\(ffi, 'pango-1.0'")
4731 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4732 "/lib/libpango-1.0.so.0'")))
4733 #t))
4734 (add-after 'install 'install-doc
4735 (lambda* (#:key inputs outputs #:allow-other-keys)
4736 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4737 (doc (string-append data "/doc/" ,name "-" ,version))
4738 (html (string-append doc "/html")))
4739 (setenv "LD_LIBRARY_PATH"
4740 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4741 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4742 (setenv "LANG" "en_US.UTF-8")
4743 (mkdir-p html)
4744 (for-each (lambda (file)
4745 (copy-file (string-append "." file)
4746 (string-append doc file)))
4747 '("/README.rst" "/CHANGES" "/LICENSE"))
4748 (system* "python" "setup.py" "build_sphinx")
4749 (copy-recursively "docs/_build/html" html)
4750 #t))))))
4751 (home-page "https://github.com/Kozea/cairocffi")
4752 (synopsis "Python bindings and object-oriented API for Cairo")
4753 (description
4754 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4755 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4756 graphics library with support for multiple backends including image buffers,
4757 PNG, PostScript, PDF, and SVG file output.")
4758 (license license:bsd-3)))
4759
4760 (define-public python2-cairocffi
4761 (package-with-python2 python-cairocffi))
4762
4763 (define-public python-decorator
4764 (package
4765 (name "python-decorator")
4766 (version "4.3.0")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri (pypi-uri "decorator" version))
4771 (sha256
4772 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4773 (build-system python-build-system)
4774 (home-page "https://pypi.python.org/pypi/decorator/")
4775 (synopsis "Python module to simplify usage of decorators")
4776 (description
4777 "The aim of the decorator module is to simplify the usage of decorators
4778 for the average programmer, and to popularize decorators usage giving examples
4779 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4780 etc. The core of this module is a decorator factory.")
4781 (license license:expat)))
4782
4783 (define-public python2-decorator
4784 (package-with-python2 python-decorator))
4785
4786 (define-public python-drmaa
4787 (package
4788 (name "python-drmaa")
4789 (version "0.7.7")
4790 (source
4791 (origin
4792 (method url-fetch)
4793 (uri (pypi-uri "drmaa" version))
4794 (sha256
4795 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4796 (build-system python-build-system)
4797 ;; The test suite requires libdrmaa which is provided by the cluster
4798 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4799 ;; should be set to the path of the libdrmaa library.
4800 (arguments '(#:tests? #f))
4801 (native-inputs
4802 `(("python-nose" ,python-nose)))
4803 (home-page "https://pypi.python.org/pypi/drmaa")
4804 (synopsis "Python bindings for the DRMAA library")
4805 (description
4806 "A Python package for Distributed Resource Management (DRM) job
4807 submission and control. This package is an implementation of the DRMAA 1.0
4808 Python language binding specification.")
4809 (license license:bsd-3)))
4810
4811 (define-public python2-drmaa
4812 (package-with-python2 python-drmaa))
4813
4814 (define-public python-grako
4815 (package
4816 (name "python-grako")
4817 (version "3.99.9")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri
4822 (pypi-uri "grako" version ".zip"))
4823 (sha256
4824 (base32
4825 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4826 (build-system python-build-system)
4827 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4828 (native-inputs
4829 `(("unzip" ,unzip)
4830 ("python-pytest" ,python-pytest)
4831 ("python-pytest-runner" ,python-pytest-runner)))
4832 (home-page "https://bitbucket.org/neogeny/grako")
4833 (synopsis "EBNF parser generator")
4834 (description
4835 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4836 memoizing PEG/Packrat parser in Python.")
4837 (license license:bsd-3)))
4838
4839 (define-public python2-grako
4840 (package-with-python2 python-grako))
4841
4842 (define-public python-gridmap
4843 (package
4844 (name "python-gridmap")
4845 (version "0.13.0")
4846 (source
4847 (origin
4848 (method git-fetch)
4849 (uri (git-reference
4850 (url "https://github.com/pygridtools/gridmap.git")
4851 (commit (string-append "v" version))))
4852 (file-name (git-file-name name version))
4853 (sha256
4854 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4855 (build-system python-build-system)
4856 (arguments
4857 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4858 (propagated-inputs
4859 `(("python-psutil" ,python-psutil)
4860 ("python-drmaa" ,python-drmaa)
4861 ("python-pyzmq" ,python-pyzmq)))
4862 (home-page "https://github.com/pygridtools/gridmap")
4863 (synopsis "Create jobs on a cluster directly from Python")
4864 (description
4865 "Gridmap is a Python package to allow you to easily create jobs on the
4866 cluster directly from Python. You can directly map Python functions onto the
4867 cluster without needing to write any wrapper code yourself.")
4868 (license license:gpl3+)))
4869
4870 (define-public python2-gridmap
4871 (package-with-python2 python-gridmap))
4872
4873 (define-public python-honcho
4874 (package
4875 (name "python-honcho")
4876 (version "1.0.1")
4877 (source
4878 (origin
4879 (method git-fetch)
4880 (uri (git-reference
4881 (url "https://github.com/nickstenning/honcho.git")
4882 (commit (string-append "v" version))))
4883 (file-name (git-file-name name version))
4884 (sha256
4885 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4886 (build-system python-build-system)
4887 (native-inputs
4888 `(("python-pytest" ,python-pytest)
4889 ("python-mock" ,python-mock)
4890 ("python-tox" ,python-tox)
4891 ("which" ,which))) ;for tests
4892 (propagated-inputs
4893 `(("python-jinja2" ,python-jinja2)))
4894 (arguments
4895 `(#:phases
4896 (modify-phases %standard-phases
4897 (delete 'check)
4898 (add-after 'install 'check
4899 (lambda* (#:key outputs inputs #:allow-other-keys)
4900 ;; fix honcho path in testsuite
4901 (substitute* "tests/conftest.py"
4902 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4903 "/bin/honcho" "'")))
4904 ;; It's easier to run tests after install.
4905 ;; Make installed package available for running the tests
4906 (add-installed-pythonpath inputs outputs)
4907 (invoke "py.test" "-v"))))))
4908 (home-page "https://github.com/nickstenning/honcho")
4909 (synopsis "Manage Procfile-based applications")
4910 (description
4911 "A Procfile is a file which describes how to run an application
4912 consisting of several processes. honcho starts all listed processes.
4913 The output of all running processes is collected by honcho and
4914 displayed.")
4915 (license license:expat)))
4916
4917 (define-public python2-honcho
4918 (package-with-python2 python-honcho))
4919
4920 (define-public python-pexpect
4921 (package
4922 (name "python-pexpect")
4923 (version "4.6.0")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 (uri (pypi-uri "pexpect" version))
4928 (sha256
4929 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4930 (build-system python-build-system)
4931 (arguments
4932 `(#:phases
4933 (modify-phases %standard-phases
4934 (add-before 'check 'prepare-tests
4935 (lambda _
4936 (substitute* (find-files "tests")
4937 (("/bin/ls") (which "ls"))
4938 (("/bin/echo") (which "echo"))
4939 (("/bin/which") (which "which"))
4940 ;; Many tests try to use the /bin directory which
4941 ;; is not present in the build environment.
4942 ;; Use one that's non-empty and unlikely to change.
4943 (("/bin'") "/dev'"))
4944 ;; XXX: Socket connection test gets "Connection reset by peer".
4945 ;; Why does it not work? Delete for now.
4946 (delete-file "tests/test_socket.py")
4947 #t))
4948 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4949 (native-inputs
4950 `(("python-nose" ,python-nose)
4951 ("python-pytest" ,python-pytest)
4952 ("man-db" ,man-db)
4953 ("which" ,which)
4954 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4955 (propagated-inputs
4956 `(("python-ptyprocess" ,python-ptyprocess)))
4957 (home-page "http://pexpect.readthedocs.org/")
4958 (synopsis "Controlling interactive console applications")
4959 (description
4960 "Pexpect is a pure Python module for spawning child applications;
4961 controlling them; and responding to expected patterns in their output.
4962 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4963 child application and control it as if a human were typing commands.")
4964 (license license:isc)))
4965
4966 (define-public python2-pexpect
4967 (package-with-python2 python-pexpect))
4968
4969 (define-public python-setuptools-scm
4970 (package
4971 (name "python-setuptools-scm")
4972 (version "3.2.0")
4973 (source (origin
4974 (method url-fetch)
4975 (uri (pypi-uri "setuptools_scm" version))
4976 (sha256
4977 (base32
4978 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4979 (build-system python-build-system)
4980 (home-page "https://github.com/pypa/setuptools_scm/")
4981 (synopsis "Manage Python package versions in SCM metadata")
4982 (description
4983 "Setuptools_scm handles managing your Python package versions in
4984 @dfn{software configuration management} (SCM) metadata instead of declaring
4985 them as the version argument or in a SCM managed file.")
4986 (license license:expat)))
4987
4988 (define-public python2-setuptools-scm
4989 (package-with-python2 python-setuptools-scm))
4990
4991 (define-public python-pathlib2
4992 (package
4993 (name "python-pathlib2")
4994 (version "2.3.3")
4995 (source
4996 (origin
4997 (method url-fetch)
4998 (uri (pypi-uri "pathlib2" version))
4999 (sha256
5000 (base32
5001 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5002 (build-system python-build-system)
5003 (propagated-inputs
5004 `(("python-scandir" ,python-scandir)
5005 ("python-six" ,python-six)))
5006 (home-page "https://pypi.python.org/pypi/pathlib2/")
5007 (synopsis "Object-oriented file system paths")
5008 (description "The goal of pathlib2 is to provide a backport of the
5009 standard @code{pathlib} module which tracks the standard library module, so
5010 all the newest features of the standard @code{pathlib} can be used also on
5011 older Python versions.")
5012 (license license:expat)))
5013
5014 (define-public python-importlib-metadata
5015 (package
5016 (name "python-importlib-metadata")
5017 (version "0.18")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (pypi-uri "importlib_metadata" version))
5022 (sha256
5023 (base32
5024 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
5025 (build-system python-build-system)
5026 (propagated-inputs
5027 `(("python-configparser" ,python-configparser)
5028 ("python-contextlib2" ,python-contextlib2)
5029 ("python-docutils" ,python-docutils)
5030 ("python-pathlib2" ,python-pathlib2)
5031 ("python-rst.linker" ,python-rst.linker)
5032 ("python-zipp" ,python-zipp)))
5033 (native-inputs
5034 `(("python-setuptools-scm" ,python-setuptools-scm)
5035 ("python-sphinx" ,python-sphinx)))
5036 (home-page "https://importlib-metadata.readthedocs.io/")
5037 (synopsis "Read metadata from Python packages")
5038 (description
5039 "@code{importlib_metadata} is a library which provides an API for
5040 accessing an installed Python package's metadata, such as its entry points or
5041 its top-level name. This functionality intends to replace most uses of
5042 @code{pkg_resources} entry point API and metadata API. Along with
5043 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5044 need to use the older and less efficient @code{pkg_resources} package.")
5045 (license license:asl2.0)))
5046
5047 (define-public python-jaraco-packaging
5048 (package
5049 (name "python-jaraco-packaging")
5050 (version "6.1")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "jaraco.packaging" version))
5055 (sha256
5056 (base32
5057 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5058 (build-system python-build-system)
5059 (propagated-inputs
5060 `(("python-pytest" ,python-pytest)
5061 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5062 ("python-pytest-flake8" ,python-pytest-flake8)
5063 ("python-rst.linker" ,python-rst.linker)
5064 ("python-setuptools" ,python-setuptools)
5065 ("python-setuptools-scm" ,python-setuptools-scm)
5066 ("python-six" ,python-six)
5067 ("python-sphinx" ,python-sphinx)))
5068 (home-page "https://github.com/jaraco/jaraco.packaging")
5069 (synopsis "Tools to supplement packaging Python releases")
5070 (description
5071 "This package provides various tools to supplement packaging Python
5072 releases.")
5073 (license license:expat)))
5074
5075 (define-public python-pathpy
5076 (package
5077 (name "python-pathpy")
5078 (version "11.5.0")
5079 (source
5080 (origin
5081 (method url-fetch)
5082 (uri (pypi-uri "path.py" version))
5083 (sha256
5084 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5085 (outputs '("out" "doc"))
5086 (build-system python-build-system)
5087 (propagated-inputs
5088 `(("python-appdirs" ,python-appdirs)
5089 ("python-importlib-metadata" ,python-importlib-metadata)))
5090 (native-inputs
5091 `(("python-setuptools-scm" ,python-setuptools-scm)
5092 ("python-sphinx" ,python-sphinx)
5093 ("python-rst.linker" ,python-rst.linker)
5094 ("python-pytest" ,python-pytest)
5095 ("python-pytest-runner" ,python-pytest-runner)
5096 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5097 (arguments
5098 `(#:phases
5099 (modify-phases %standard-phases
5100 (add-after 'build 'build-doc
5101 (lambda _
5102 (setenv "LANG" "en_US.UTF-8")
5103 (invoke "python" "setup.py" "build_sphinx")))
5104 (add-after 'install 'install-doc
5105 (lambda* (#:key outputs #:allow-other-keys)
5106 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5107 (doc (string-append data "/doc/" ,name "-" ,version))
5108 (html (string-append doc "/html")))
5109 (mkdir-p html)
5110 (for-each (lambda (file)
5111 (copy-file file (string-append doc "/" file)))
5112 '("README.rst" "CHANGES.rst"))
5113 (copy-recursively "build/sphinx/html" html)
5114 #t)))
5115 (replace 'check
5116 (lambda _
5117 ;; The import time test aborts if an import takes longer than
5118 ;; 100ms. It may very well take a little longer than that.
5119 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5120 (home-page "https://github.com/jaraco/path.py")
5121 (synopsis "Python module wrapper for built-in os.path")
5122 (description
5123 "@code{path.py} implements path objects as first-class entities, allowing
5124 common operations on files to be invoked on those path objects directly.")
5125 (license license:expat)))
5126
5127 (define-public python2-pathpy
5128 (package-with-python2 python-pathpy))
5129
5130 (define-public python-simplegeneric
5131 (package
5132 (name "python-simplegeneric")
5133 (version "0.8.1")
5134 (source
5135 (origin
5136 (method url-fetch)
5137 (uri (pypi-uri "simplegeneric" version ".zip"))
5138 (sha256
5139 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5140 (build-system python-build-system)
5141 (native-inputs
5142 `(("unzip" ,unzip)))
5143 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5144 (synopsis "Python module for simple generic functions")
5145 (description
5146 "The simplegeneric module lets you define simple single-dispatch generic
5147 functions, akin to Python’s built-in generic functions like @code{len()},
5148 @code{iter()} and so on. However, instead of using specially-named methods,
5149 these generic functions use simple lookup tables, akin to those used by
5150 e.g. @code{pickle.dump()} and other generic functions found in the Python
5151 standard library.")
5152 (license license:zpl2.1)))
5153
5154 (define-public python2-simplegeneric
5155 (package-with-python2 python-simplegeneric))
5156
5157 (define-public python-ipython-genutils
5158 ;; TODO: This package is retired, check if can be removed, see description.
5159 (package
5160 (name "python-ipython-genutils")
5161 (version "0.1.0")
5162 (source
5163 (origin
5164 (method url-fetch)
5165 (uri (pypi-uri "ipython_genutils" version))
5166 (sha256
5167 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5168 (build-system python-build-system)
5169 (arguments `(#:tests? #f)) ; no tests
5170 (home-page "https://ipython.org")
5171 (synopsis "Vestigial utilities from IPython")
5172 (description
5173 "This package provides retired utilities from IPython. No packages
5174 outside IPython/Jupyter should depend on it.
5175
5176 This package shouldn't exist. It contains some common utilities shared by
5177 Jupyter and IPython projects during The Big Split. As soon as possible, those
5178 packages will remove their dependency on this, and this package will go
5179 away.")
5180 (license license:bsd-3)))
5181
5182 (define-public python2-ipython-genutils
5183 (package-with-python2 python-ipython-genutils))
5184
5185 (define-public python-traitlets
5186 (package
5187 (name "python-traitlets")
5188 (version "4.3.2")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (pypi-uri "traitlets" version))
5193 (sha256
5194 (base32
5195 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5196 (build-system python-build-system)
5197 (arguments
5198 `(#:phases
5199 (modify-phases %standard-phases
5200 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5201 (propagated-inputs
5202 `(("python-ipython-genutils" ,python-ipython-genutils)
5203 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5204 (native-inputs
5205 `(("python-pytest" ,python-pytest)))
5206 (properties `((python2-variant . ,(delay python2-traitlets))))
5207 (home-page "https://ipython.org")
5208 (synopsis "Configuration system for Python applications")
5209 (description
5210 "Traitlets is a framework that lets Python classes have attributes with
5211 type checking, dynamically calculated default values, and ‘on change’
5212 callbacks. The package also includes a mechanism to use traitlets for
5213 configuration, loading values from files or from command line arguments. This
5214 is a distinct layer on top of traitlets, so you can use traitlets in your code
5215 without using the configuration machinery.")
5216 (license license:bsd-3)))
5217
5218 (define-public python2-traitlets
5219 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5220 (package
5221 (inherit traitlets)
5222 (propagated-inputs
5223 `(("python2-enum34" ,python2-enum34)
5224 ,@(package-propagated-inputs traitlets))))))
5225
5226 (define-public python-jupyter-core
5227 (package
5228 (name "python-jupyter-core")
5229 (version "4.4.0")
5230 (source
5231 (origin
5232 (method url-fetch)
5233 (uri (string-append (pypi-uri "jupyter_core" version)))
5234 (sha256
5235 (base32
5236 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5237 (build-system python-build-system)
5238 ;; FIXME: not sure how to run the tests
5239 (arguments `(#:tests? #f))
5240 (propagated-inputs
5241 `(("python-traitlets" ,python-traitlets)))
5242 (home-page "http://jupyter.org/")
5243 (synopsis "Jupyter base package")
5244 (description
5245 "Jupyter core is the base package on which Jupyter projects rely.")
5246 (license license:bsd-3)))
5247
5248 (define-public python2-jupyter-core
5249 (package-with-python2 python-jupyter-core))
5250
5251 (define-public python-jupyter-client
5252 (package
5253 (name "python-jupyter-client")
5254 (version "5.2.4")
5255 (source
5256 (origin
5257 (method url-fetch)
5258 (uri (pypi-uri "jupyter_client" version))
5259 (sha256
5260 (base32
5261 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5262 (build-system python-build-system)
5263 ;; Tests fail because of missing native python kernel which I assume is
5264 ;; provided by the ipython package, which we cannot use because it would
5265 ;; cause a dependency cycle.
5266 (arguments
5267 `(#:tests? #f
5268
5269 #:phases (modify-phases %standard-phases
5270 (add-after 'unpack 'set-tool-file-names
5271 (lambda* (#:key inputs #:allow-other-keys)
5272 (let ((iproute (assoc-ref inputs "iproute")))
5273 (substitute* "jupyter_client/localinterfaces.py"
5274 (("'ip'")
5275 (string-append "'" iproute "/sbin/ip'")))
5276 #t))))))
5277 (inputs
5278 `(("iproute" ,iproute)))
5279 (propagated-inputs
5280 `(("python-pyzmq" ,python-pyzmq)
5281 ("python-traitlets" ,python-traitlets)
5282 ("python-jupyter-core" ,python-jupyter-core)))
5283 (home-page "http://jupyter.org/")
5284 (synopsis "Jupyter protocol implementation and client libraries")
5285 (description
5286 "The @code{jupyter_client} package contains the reference implementation
5287 of the Jupyter protocol. It also provides client and kernel management APIs
5288 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5289 installing @code{kernelspec}s for use with Jupyter frontends.")
5290 (license license:bsd-3)))
5291
5292 (define-public python2-jupyter-client
5293 (package-with-python2 python-jupyter-client))
5294
5295 (define-public python-ipykernel
5296 (package
5297 (name "python-ipykernel")
5298 (version "5.1.1")
5299 (source
5300 (origin
5301 (method url-fetch)
5302 (uri (pypi-uri "ipykernel" version))
5303 (sha256
5304 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5305 (build-system python-build-system)
5306 (arguments
5307 `(#:phases
5308 (modify-phases %standard-phases
5309 (replace 'check
5310 (lambda _
5311 (setenv "HOME" "/tmp")
5312 (invoke "pytest" "-v")
5313 #t))
5314 (add-after 'install 'set-python-file-name
5315 (lambda* (#:key outputs #:allow-other-keys)
5316 ;; Record the absolute file name of the 'python' executable in
5317 ;; 'kernel.json'.
5318 (let ((out (assoc-ref outputs "out")))
5319 (substitute* (string-append out "/share/jupyter"
5320 "/kernels/python3/kernel.json")
5321 (("\"python\"")
5322 (string-append "\"" (which "python") "\"")))
5323 #t))))))
5324 (propagated-inputs
5325 `(("python-ipython" ,python-ipython)
5326 ;; imported at runtime during connect
5327 ("python-jupyter-client" ,python-jupyter-client)))
5328 (native-inputs
5329 `(("python-pytest" ,python-pytest)
5330 ("python-nose" ,python-nose)))
5331 (home-page "https://ipython.org")
5332 (synopsis "IPython Kernel for Jupyter")
5333 (description
5334 "This package provides the IPython kernel for Jupyter.")
5335 (license license:bsd-3)))
5336
5337 ;; Version 5.1.1 and above no longer support Python 2.
5338 (define-public python2-ipykernel
5339 (package
5340 (name "python2-ipykernel")
5341 (version "5.1.0")
5342 (source
5343 (origin
5344 (method url-fetch)
5345 (uri (pypi-uri "ipykernel" version))
5346 (sha256
5347 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5348 (build-system python-build-system)
5349 (arguments
5350 `(#:python ,python-2
5351 #:phases
5352 (modify-phases %standard-phases
5353 (replace 'check
5354 (lambda _
5355 (setenv "HOME" "/tmp")
5356 (invoke "pytest" "-v")
5357 #t)))))
5358 (propagated-inputs
5359 `(("python2-ipython" ,python2-ipython)
5360 ;; imported at runtime during connect
5361 ("python2-jupyter-client" ,python2-jupyter-client)))
5362 (native-inputs
5363 `(("python2-pytest" ,python2-pytest)
5364 ("python2-nose" ,python2-nose)))
5365 (home-page "https://ipython.org")
5366 (synopsis "IPython Kernel for Jupyter")
5367 (description
5368 "This package provides the IPython kernel for Jupyter.")
5369 (license license:bsd-3)))
5370
5371 (define-public python-pari-jupyter
5372 (package
5373 (name "python-pari-jupyter")
5374 (version "1.3.2")
5375 (source
5376 (origin
5377 (method url-fetch)
5378 (uri (pypi-uri "pari_jupyter" version))
5379 (sha256
5380 (base32
5381 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5382 (build-system python-build-system)
5383 (propagated-inputs
5384 `(("python-ipykernel" ,python-ipykernel)))
5385 (inputs
5386 `(("pari-gp" ,pari-gp)
5387 ("readline" ,readline)))
5388 (arguments
5389 `(#:tests? #f)) ; no test suite
5390 (home-page
5391 "https://github.com/jdemeyer/pari_jupyter")
5392 (synopsis "A Jupyter kernel for PARI/GP")
5393 (description "The package provides a PARI/GP kernel for Jupyter.")
5394 (license license:gpl3+)))
5395
5396 (define-public python-backcall
5397 (package
5398 (name "python-backcall")
5399 (version "0.1.0")
5400 (source
5401 (origin
5402 (method url-fetch)
5403 (uri (pypi-uri "backcall" version))
5404 (sha256
5405 (base32
5406 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5407 (build-system python-build-system)
5408 (home-page "https://github.com/takluyver/backcall/")
5409 (synopsis "Specifications for callback functions passed in to an API")
5410 (description
5411 "If your code lets other people supply callback functions, it's important
5412 to specify the function signature you expect, and check that functions support
5413 that. Adding extra parameters later would break other peoples code unless
5414 you're careful. The @code{backcall} package provides a way of specifying the
5415 callback signature using a prototype function.")
5416 (license license:bsd-3)))
5417
5418 ;; This is the latest release of the LTS version of ipython with support for
5419 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5420 ;; dropped support for Python 2.7.
5421 (define-public python2-ipython
5422 (package
5423 (name "python2-ipython")
5424 (version "5.8.0")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "ipython" version ".tar.gz"))
5429 (sha256
5430 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5431 (build-system python-build-system)
5432 (propagated-inputs
5433 `(("python2-backports-shutil-get-terminal-size"
5434 ,python2-backports-shutil-get-terminal-size)
5435 ("python2-pathlib2" ,python2-pathlib2)
5436 ("python2-pyzmq" ,python2-pyzmq)
5437 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5438 ("python2-terminado" ,python2-terminado)
5439 ("python2-matplotlib" ,python2-matplotlib)
5440 ("python2-numpy" ,python2-numpy)
5441 ("python2-numpydoc" ,python2-numpydoc)
5442 ("python2-jinja2" ,python2-jinja2)
5443 ("python2-mistune" ,python2-mistune)
5444 ("python2-pexpect" ,python2-pexpect)
5445 ("python2-pickleshare" ,python2-pickleshare)
5446 ("python2-simplegeneric" ,python2-simplegeneric)
5447 ("python2-jsonschema" ,python2-jsonschema)
5448 ("python2-traitlets" ,python2-traitlets)
5449 ("python2-nbformat" ,python2-nbformat)
5450 ("python2-pygments" ,python2-pygments)))
5451 (inputs
5452 `(("readline" ,readline)
5453 ("which" ,which)))
5454 (native-inputs
5455 `(("graphviz" ,graphviz)
5456 ("pkg-config" ,pkg-config)
5457 ("python2-requests" ,python2-requests) ;; for tests
5458 ("python2-testpath" ,python2-testpath)
5459 ("python2-mock" ,python2-mock)
5460 ("python2-nose" ,python2-nose)))
5461 (arguments
5462 `(#:python ,python-2
5463 #:phases
5464 (modify-phases %standard-phases
5465 (add-before 'check 'delete-broken-tests
5466 (lambda* (#:key inputs #:allow-other-keys)
5467 ;; These tests throw errors for unknown reasons.
5468 (delete-file "IPython/core/tests/test_profile.py")
5469 (delete-file "IPython/core/tests/test_interactiveshell.py")
5470 (delete-file "IPython/core/tests/test_magic.py")
5471 #t)))))
5472 (home-page "https://ipython.org")
5473 (synopsis "IPython is a tool for interactive computing in Python")
5474 (description
5475 "IPython provides a rich architecture for interactive computing with:
5476 Powerful interactive shells, a browser-based notebook, support for interactive
5477 data visualization, embeddable interpreters and tools for parallel
5478 computing.")
5479 (license license:bsd-3)))
5480
5481 (define-public python-ipython
5482 (package
5483 (name "python-ipython")
5484 (version "7.5.0")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "ipython" version ".tar.gz"))
5489 (sha256
5490 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5491 (build-system python-build-system)
5492 (propagated-inputs
5493 `(("python-backcall" ,python-backcall)
5494 ("python-pyzmq" ,python-pyzmq)
5495 ("python-prompt-toolkit" ,python-prompt-toolkit)
5496 ("python-terminado" ,python-terminado)
5497 ("python-matplotlib" ,python-matplotlib)
5498 ("python-numpy" ,python-numpy)
5499 ("python-numpydoc" ,python-numpydoc)
5500 ("python-jedi" ,python-jedi)
5501 ("python-jinja2" ,python-jinja2)
5502 ("python-mistune" ,python-mistune)
5503 ("python-pexpect" ,python-pexpect)
5504 ("python-pickleshare" ,python-pickleshare)
5505 ("python-simplegeneric" ,python-simplegeneric)
5506 ("python-jsonschema" ,python-jsonschema)
5507 ("python-traitlets" ,python-traitlets)
5508 ("python-nbformat" ,python-nbformat)
5509 ("python-pygments" ,python-pygments)))
5510 (inputs
5511 `(("readline" ,readline)
5512 ("which" ,which)))
5513 (native-inputs
5514 `(("graphviz" ,graphviz)
5515 ("pkg-config" ,pkg-config)
5516 ("python-requests" ,python-requests) ;; for tests
5517 ("python-testpath" ,python-testpath)
5518 ("python-nose" ,python-nose)))
5519 (arguments
5520 `(#:phases
5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'make-docs-reproducible
5523 (lambda _
5524 (substitute* "IPython/sphinxext/ipython_directive.py"
5525 ((".*import datetime") "")
5526 ((".*datetime.datetime.now\\(\\)") "")
5527 (("%timeit") "# %timeit"))
5528 #t))
5529 ;; Tests can only be run after the library has been installed and not
5530 ;; within the source directory.
5531 (delete 'check)
5532 (add-after 'install 'check
5533 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5534 (if tests?
5535 (begin
5536 ;; Make installed package available for running the tests
5537 (add-installed-pythonpath inputs outputs)
5538 (setenv "HOME" "/tmp/") ;; required by a test
5539 ;; We only test the core because one of the other tests
5540 ;; tries to import ipykernel.
5541 (invoke "python" "IPython/testing/iptest.py"
5542 "-v" "IPython/core/tests"))
5543 #t)))
5544 (add-before 'check 'fix-tests
5545 (lambda* (#:key inputs #:allow-other-keys)
5546 (substitute* "./IPython/utils/_process_posix.py"
5547 (("/usr/bin/env', 'which") (which "which")))
5548 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5549 (("#!/usr/bin/env python")
5550 (string-append "#!" (which "python"))))
5551 ;; This test introduces a circular dependency on ipykernel
5552 ;; (which depends on ipython).
5553 (delete-file "IPython/core/tests/test_display.py")
5554 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5555 (delete-file "IPython/core/tests/test_interactiveshell.py")
5556 #t)))))
5557 (home-page "https://ipython.org")
5558 (synopsis "IPython is a tool for interactive computing in Python")
5559 (description
5560 "IPython provides a rich architecture for interactive computing with:
5561 Powerful interactive shells, a browser-based notebook, support for interactive
5562 data visualization, embeddable interpreters and tools for parallel
5563 computing.")
5564 (license license:bsd-3)))
5565
5566 (define-public python-ipython-documentation
5567 (package
5568 (inherit python-ipython)
5569 (name "python-ipython-documentation")
5570 (version (package-version python-ipython))
5571 (arguments
5572 `(#:phases
5573 (modify-phases %standard-phases
5574 (delete 'build)
5575 (delete 'check)
5576 (replace 'install
5577 (lambda* (#:key outputs #:allow-other-keys)
5578 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5579 (doc (string-append data "/doc/" ,name "-" ,version))
5580 (html (string-append doc "/html"))
5581 (man1 (string-append data "/man/man1"))
5582 (info (string-append data "/info"))
5583 (examples (string-append doc "/examples"))
5584 (python-arg (string-append "PYTHON=" (which "python"))))
5585 (setenv "LANG" "en_US.utf8")
5586 (with-directory-excursion "docs"
5587 ;; FIXME: pdf fails to build
5588 ;;(system* "make" "pdf" "PAPER=a4")
5589 (system* "make" python-arg "html")
5590 ;; FIXME: the generated texi file contains ^@^@, which trips
5591 ;; up the parser.
5592 ;; (system* "make" python-arg "info")
5593 )
5594 (copy-recursively "docs/man" man1)
5595 (copy-recursively "examples" examples)
5596 (copy-recursively "docs/build/html" html)
5597 ;; (copy-file "docs/build/latex/ipython.pdf"
5598 ;; (string-append doc "/ipython.pdf"))
5599 (mkdir-p info)
5600 ;; (copy-file "docs/build/texinfo/ipython.info"
5601 ;; (string-append info "/ipython.info"))
5602 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5603 #t)))))
5604 (inputs
5605 `(("python-ipython" ,python-ipython)
5606 ("python-ipykernel" ,python-ipykernel)))
5607 (native-inputs
5608 `(("python-sphinx" ,python-sphinx)
5609 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5610 ;; FIXME: It's possible that a smaller union would work just as well.
5611 ("texlive" ,(texlive-union (list texlive-amsfonts
5612 texlive-fonts-ec
5613 texlive-generic-ifxetex
5614 texlive-generic-pdftex
5615 texlive-latex-capt-of
5616 texlive-latex-cmap
5617 texlive-latex-environ
5618 texlive-latex-eqparbox
5619 texlive-latex-etoolbox
5620 texlive-latex-expdlist
5621 texlive-latex-fancyhdr
5622 texlive-latex-fancyvrb
5623 texlive-latex-fncychap
5624 texlive-latex-float
5625 texlive-latex-framed
5626 texlive-latex-geometry
5627 texlive-latex-graphics
5628 texlive-latex-hyperref
5629 texlive-latex-mdwtools
5630 texlive-latex-multirow
5631 texlive-latex-needspace
5632 texlive-latex-oberdiek
5633 texlive-latex-parskip
5634 texlive-latex-preview
5635 texlive-latex-tabulary
5636 texlive-latex-threeparttable
5637 texlive-latex-titlesec
5638 texlive-latex-trimspaces
5639 texlive-latex-ucs
5640 texlive-latex-upquote
5641 texlive-latex-url
5642 texlive-latex-varwidth
5643 texlive-latex-wrapfig)))
5644 ("texinfo" ,texinfo)))))
5645
5646 (define-public python-urwid
5647 (package
5648 (name "python-urwid")
5649 (version "2.0.1")
5650 (source
5651 (origin
5652 (method url-fetch)
5653 (uri (pypi-uri "urwid" version))
5654 (sha256
5655 (base32
5656 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5657 (build-system python-build-system)
5658 (home-page "http://urwid.org")
5659 (synopsis "Console user interface library for Python")
5660 (description
5661 "Urwid is a curses-based UI/widget library for Python. It includes many
5662 features useful for text console applications.")
5663 (license license:lgpl2.1+)))
5664
5665 (define-public python2-urwid
5666 (package-with-python2 python-urwid))
5667
5668 (define-public python-urwidtrees
5669 (package
5670 (name "python-urwidtrees")
5671 (version "1.0.2")
5672 (source
5673 (origin
5674 (method url-fetch)
5675 ;; package author intends on distributing via github rather than pypi:
5676 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5677 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5678 version ".tar.gz"))
5679 (file-name (string-append name "-" version ".tar.gz"))
5680 (sha256
5681 (base32
5682 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5683 (build-system python-build-system)
5684 (arguments
5685 '(#:tests? #f)) ; no tests
5686 (propagated-inputs `(("python-urwid" ,python-urwid)))
5687 (home-page "https://github.com/pazz/urwidtrees")
5688 (synopsis "Tree widgets for urwid")
5689 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5690 toolkit. Use it to build trees of widgets.")
5691 (license license:gpl3+)))
5692
5693 (define-public python2-urwidtrees
5694 (package-with-python2 python-urwidtrees))
5695
5696 (define-public python-ua-parser
5697 (package
5698 (name "python-ua-parser")
5699 (version "0.8.0")
5700 (source
5701 (origin
5702 (method url-fetch)
5703 (uri (pypi-uri "ua-parser" version))
5704 (sha256
5705 (base32
5706 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5707 (build-system python-build-system)
5708 (arguments
5709 `(#:tests? #f)) ;no test suite in release
5710 (native-inputs
5711 `(("python-pyyaml" ,python-pyyaml)))
5712 (home-page "https://github.com/ua-parser/uap-python")
5713 (synopsis "User agent parser")
5714 (description
5715 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5716 (license license:asl2.0)))
5717
5718 (define-public python2-ua-parser
5719 (package-with-python2 python-ua-parser))
5720
5721 (define-public python-user-agents
5722 (package
5723 (name "python-user-agents")
5724 (version "1.1.0")
5725 (source
5726 (origin
5727 (method url-fetch)
5728 (uri (pypi-uri "user-agents" version))
5729 (sha256
5730 (base32
5731 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5732 (build-system python-build-system)
5733 (arguments
5734 `(#:tests? #f)) ;missing devices.json test file in release
5735 (propagated-inputs
5736 `(("python-ua-parser" ,python-ua-parser)))
5737 (home-page "https://github.com/selwin/python-user-agents")
5738 (synopsis "User Agent strings parsing library")
5739 (description
5740 "A library to identify devices (phones, tablets) and their capabilities by
5741 parsing (browser/HTTP) user agent strings.")
5742 (license license:expat)))
5743
5744 (define-public python2-user-agents
5745 (package-with-python2 python-user-agents))
5746
5747 (define-public python-dbus
5748 (package
5749 (name "python-dbus")
5750 (version "1.2.8")
5751 (source
5752 (origin
5753 (method url-fetch)
5754 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5755 "dbus-python-" version ".tar.gz"))
5756 (sha256
5757 (base32
5758 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5759 (build-system gnu-build-system)
5760 (arguments
5761 '(#:phases
5762 (modify-phases %standard-phases
5763 (add-before
5764 'check 'pre-check
5765 (lambda _
5766 ;; XXX: For the missing '/etc/machine-id'.
5767 (substitute* "test/run-test.sh"
5768 (("DBUS_FATAL_WARNINGS=1")
5769 "DBUS_FATAL_WARNINGS=0"))
5770 #t)))))
5771 (native-inputs
5772 `(("pkg-config" ,pkg-config)))
5773 (inputs
5774 `(("python" ,python-wrapper)
5775 ("dbus-glib" ,dbus-glib)))
5776 (synopsis "Python bindings for D-bus")
5777 (description "python-dbus provides bindings for libdbus, the reference
5778 implementation of D-Bus.")
5779 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5780 (license license:expat)))
5781
5782 (define-public python2-dbus
5783 (package (inherit python-dbus)
5784 (name "python2-dbus")
5785 (inputs `(("python" ,python-2)
5786 ,@(alist-delete "python"
5787 (package-inputs python-dbus)
5788 equal?)))
5789 ;; FIXME: on Python 2, the test_utf8 fails with:
5790 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5791 (arguments `(#:tests? #f))))
5792
5793 (define-public python-notify2
5794 (package
5795 (name "python-notify2")
5796 (version "0.3.1")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "notify2" version))
5801 (sha256
5802 (base32
5803 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5804 (build-system python-build-system)
5805 (arguments `(#:tests? #f)) ; tests depend on system state
5806 (native-inputs
5807 `(("python-dbus" ,python-dbus)))
5808 (home-page "https://bitbucket.org/takluyver/pynotify2")
5809 (synopsis "Python interface to D-Bus notifications")
5810 (description
5811 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5812 It is a reimplementation of pynotify in pure Python, and an alternative to
5813 the GObject Introspection bindings to libnotify for non-GTK applications.")
5814 (license (list license:bsd-2
5815 license:lgpl2.1+))))
5816
5817 (define-public python2-notify2
5818 (package-with-python2 python-notify2))
5819
5820 (define-public python-lxml
5821 (package
5822 (name "python-lxml")
5823 (version "4.2.5")
5824 (source
5825 (origin
5826 (method url-fetch)
5827 (uri (pypi-uri "lxml" version))
5828 (sha256
5829 (base32
5830 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5831 (build-system python-build-system)
5832 (inputs
5833 `(("libxml2" ,libxml2)
5834 ("libxslt" ,libxslt)))
5835 (home-page "http://lxml.de/")
5836 (synopsis
5837 "Python XML processing library")
5838 (description
5839 "The lxml XML toolkit is a Pythonic binding for the C libraries
5840 libxml2 and libxslt.")
5841 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5842
5843 (define-public python2-lxml
5844 (package-with-python2 python-lxml))
5845
5846 ;; beautifulsoup4 has a totally different namespace than 3.x,
5847 ;; and pypi seems to put it under its own name, so I guess we should too
5848 (define-public python-beautifulsoup4
5849 (package
5850 (name "python-beautifulsoup4")
5851 (version "4.7.1")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "beautifulsoup4" version))
5856 (sha256
5857 (base32
5858 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5859 (build-system python-build-system)
5860 (arguments
5861 `(#:phases
5862 (modify-phases %standard-phases
5863 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5864 ;; must use this conversion script when building with Python 3. The
5865 ;; conversion script also runs the tests.
5866 ;; For more information, see the file 'convert-py3k' in the source
5867 ;; distribution.
5868 (replace 'check
5869 (lambda _ (invoke "./convert-py3k"))))))
5870 (propagated-inputs
5871 `(("python-soupsieve" ,python-soupsieve)))
5872 (home-page
5873 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5874 (synopsis
5875 "Python screen-scraping library")
5876 (description
5877 "Beautiful Soup is a Python library designed for rapidly setting up
5878 screen-scraping projects. It offers Pythonic idioms for navigating,
5879 searching, and modifying a parse tree, providing a toolkit for
5880 dissecting a document and extracting what you need. It automatically
5881 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5882 (license license:expat)
5883 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5884
5885 (define-public python2-beautifulsoup4
5886 (package
5887 (inherit (package-with-python2
5888 (strip-python2-variant python-beautifulsoup4)))
5889 (arguments `(#:python ,python-2))))
5890
5891 (define-public python-soupsieve
5892 (package
5893 (name "python-soupsieve")
5894 (version "1.9.2")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "soupsieve" version))
5899 (sha256
5900 (base32
5901 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5902 (build-system python-build-system)
5903 (arguments `(#:tests? #f))
5904 ;;XXX: 2 tests fail currently despite claming they were to be
5905 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5906 ;;don't want to create a circular dependency.
5907 (home-page "https://github.com/facelessuser/soupsieve")
5908 (synopsis "CSS selector library")
5909 (description
5910 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5911 Soup 4. It aims to provide selecting, matching, and filtering using modern
5912 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5913 specifications up through the latest CSS level 4 drafts and beyond (though
5914 some are not yet implemented).")
5915 (properties `((python2-variant . ,(delay python2-soupsieve))))
5916 (license license:expat)))
5917
5918 (define-public python2-soupsieve
5919 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5920 (package
5921 (inherit base)
5922 (propagated-inputs
5923 `(("python2-backports-functools-lru-cache"
5924 ,python2-backports-functools-lru-cache)
5925 ,@(package-propagated-inputs base))))))
5926
5927 (define-public python-netifaces
5928 (package
5929 (name "python-netifaces")
5930 (version "0.10.7")
5931 (source
5932 (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "netifaces" version))
5935 (sha256
5936 (base32
5937 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5938 (build-system python-build-system)
5939 (home-page "https://github.com/al45tair/netifaces")
5940 (synopsis
5941 "Python module for portable network interface information")
5942 (description
5943 "Netifaces is a Python module providing information on network
5944 interfaces in an easy and portable manner.")
5945 (license license:expat)))
5946
5947 (define-public python2-netifaces
5948 (package-with-python2 python-netifaces))
5949
5950 (define-public python-networkx
5951 (package
5952 (name "python-networkx")
5953 (version "2.2")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (pypi-uri "networkx" version ".zip"))
5958 (sha256
5959 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5960 (build-system python-build-system)
5961 ;; python-decorator is needed at runtime.
5962 (propagated-inputs
5963 `(("python-decorator" ,python-decorator)))
5964 (native-inputs
5965 `(("python-nose" ,python-nose)
5966 ("unzip" ,unzip)))
5967 (home-page "https://networkx.github.io/")
5968 (synopsis "Python module for creating and manipulating graphs and networks")
5969 (description
5970 "NetworkX is a Python package for the creation, manipulation, and study
5971 of the structure, dynamics, and functions of complex networks.")
5972 (license license:bsd-3)))
5973
5974 (define-public python2-networkx
5975 (package-with-python2 python-networkx))
5976
5977 (define-public python-datrie
5978 (package
5979 (name "python-datrie")
5980 (version "0.8")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "datrie" version))
5985 (sha256
5986 (base32
5987 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5988 (build-system python-build-system)
5989 (native-inputs
5990 `(("python-cython" ,python-cython)
5991 ("python-hypothesis" ,python-hypothesis)
5992 ("python-pytest" ,python-pytest)
5993 ("python-pytest-runner" ,python-pytest-runner)))
5994 (home-page "https://github.com/kmike/datrie")
5995 (synopsis "Fast, efficiently stored trie for Python")
5996 (description
5997 "This package provides a fast, efficiently stored trie implementation for
5998 Python.")
5999 (license license:lgpl2.1+)))
6000
6001 (define-public snakemake
6002 (package
6003 (name "snakemake")
6004 (version "5.2.4")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (pypi-uri "snakemake" version))
6009 (sha256
6010 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6011 (build-system python-build-system)
6012 (arguments
6013 ;; TODO: Package missing test dependencies.
6014 '(#:tests? #f
6015 #:phases
6016 (modify-phases %standard-phases
6017 ;; For cluster execution Snakemake will call Python. Since there is
6018 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6019 ;; this by calling the snakemake wrapper instead.
6020 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6021 (lambda* (#:key outputs #:allow-other-keys)
6022 (substitute* "snakemake/executors.py"
6023 (("\\{sys.executable\\} -m snakemake")
6024 (string-append (assoc-ref outputs "out")
6025 "/bin/snakemake")))
6026 #t)))))
6027 (propagated-inputs
6028 `(("python-gitpython" ,python-gitpython)
6029 ("python-wrapt" ,python-wrapt)
6030 ("python-requests" ,python-requests)
6031 ("python-appdirs" ,python-appdirs)
6032 ("python-configargparse" ,python-configargparse)
6033 ("python-datrie" ,python-datrie)
6034 ("python-docutils" ,python-docutils)
6035 ("python-jinja2" ,python-jinja2)
6036 ("python-jsonschema" ,python-jsonschema)
6037 ("python-networkx" ,python-networkx)
6038 ("python-pyyaml" ,python-pyyaml)
6039 ("python-ratelimiter" ,python-ratelimiter)))
6040 (home-page "https://snakemake.readthedocs.io")
6041 (synopsis "Python-based execution environment for make-like workflows")
6042 (description
6043 "Snakemake aims to reduce the complexity of creating workflows by
6044 providing a clean and modern domain specific specification language (DSL) in
6045 Python style, together with a fast and comfortable execution environment.")
6046 (license license:expat)))
6047
6048 ;; This is currently needed for the pigx-* packages.
6049 (define-public snakemake-4
6050 (package (inherit snakemake)
6051 (version "4.4.0")
6052 (source
6053 (origin
6054 (method url-fetch)
6055 (uri (pypi-uri "snakemake" version))
6056 (sha256
6057 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6058 (propagated-inputs
6059 `(("python-wrapt" ,python-wrapt)
6060 ("python-requests" ,python-requests)
6061 ("python-appdirs" ,python-appdirs)
6062 ("python-configargparse" ,python-configargparse)
6063 ("python-pyyaml" ,python-pyyaml)
6064 ("python-ratelimiter" ,python-ratelimiter)))))
6065
6066 (define-public python-pyqrcode
6067 (package
6068 (name "python-pyqrcode")
6069 (version "1.2.1")
6070 (source
6071 (origin
6072 (method url-fetch)
6073 (uri (pypi-uri "PyQRCode" version))
6074 (sha256
6075 (base32
6076 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6077 (build-system python-build-system)
6078 (home-page
6079 "https://github.com/mnooner256/pyqrcode")
6080 (synopsis "QR code generator")
6081 (description
6082 "Pyqrcode is a QR code generator written purely in Python with
6083 SVG, EPS, PNG and terminal output.")
6084 (license license:bsd-3)))
6085
6086 (define-public python-seaborn
6087 (package
6088 (name "python-seaborn")
6089 (version "0.9.0")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "seaborn" version))
6094 (sha256
6095 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6096 (build-system python-build-system)
6097 (arguments
6098 `(#:phases
6099 (modify-phases %standard-phases
6100 (add-before 'check 'start-xserver
6101 (lambda* (#:key inputs #:allow-other-keys)
6102 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6103 ;; There must be a running X server and make check doesn't
6104 ;; start one. Therefore we must do it.
6105 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6106 (setenv "DISPLAY" ":1")
6107 #t)))
6108 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6109 (propagated-inputs
6110 `(("python-pandas" ,python-pandas)
6111 ("python-matplotlib" ,python-matplotlib)
6112 ("python-numpy" ,python-numpy)
6113 ("python-scipy" ,python-scipy)))
6114 (native-inputs
6115 `(("python-pytest" ,python-pytest)
6116 ("xorg-server" ,xorg-server)))
6117 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6118 (synopsis "Statistical data visualization")
6119 (description
6120 "Seaborn is a library for making attractive and informative statistical
6121 graphics in Python. It is built on top of matplotlib and tightly integrated
6122 with the PyData stack, including support for numpy and pandas data structures
6123 and statistical routines from scipy and statsmodels.")
6124 (license license:bsd-3)))
6125
6126 (define-public python2-seaborn
6127 (package-with-python2 python-seaborn))
6128
6129 (define-public python-mpmath
6130 (package
6131 (name "python-mpmath")
6132 (version "0.19")
6133 (source (origin
6134 (method url-fetch)
6135 (uri (string-append "http://mpmath.org/files/mpmath-"
6136 version ".tar.gz"))
6137 (sha256
6138 (base32
6139 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6140 (build-system python-build-system)
6141 (arguments
6142 '(#:phases
6143 (modify-phases %standard-phases
6144 (replace 'check
6145 (lambda _
6146 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6147 (home-page "http://mpmath.org")
6148 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6149 (description
6150 "@code{mpmath} can be used as an arbitrary-precision substitute for
6151 Python's float/complex types and math/cmath modules, but also does much
6152 more advanced mathematics.")
6153 (license license:bsd-3)))
6154
6155 (define-public python2-mpmath
6156 (package-with-python2 python-mpmath))
6157
6158 (define-public python-bigfloat
6159 (package
6160 (name "python-bigfloat")
6161 (version "0.3.0")
6162 (source
6163 (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "bigfloat" version))
6166 (sha256
6167 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6168 (build-system python-build-system)
6169 (inputs
6170 `(("mpfr" ,mpfr)))
6171 (home-page "https://github.com/mdickinson/bigfloat")
6172 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6173 (description
6174 "This package provides a Python interface to the MPFR library for
6175 multiprecision arithmetic.")
6176 (license license:lgpl3+)))
6177
6178 (define-public python2-bigfloat
6179 (package-with-python2 python-bigfloat))
6180
6181 (define-public python-sympy
6182 (package
6183 (name "python-sympy")
6184 (version "1.1.1")
6185 (source
6186 (origin
6187 (method url-fetch)
6188 (uri (string-append
6189 "https://github.com/sympy/sympy/releases/download/sympy-"
6190 version "/sympy-" version ".tar.gz"))
6191 (sha256
6192 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6193 (build-system python-build-system)
6194 (arguments
6195 `(#:phases
6196 (modify-phases %standard-phases
6197 ;; Run the core tests after installation. By default it would run
6198 ;; *all* tests, which take a very long time to complete and are known
6199 ;; to be flaky.
6200 (delete 'check)
6201 (add-after 'install 'check
6202 (lambda* (#:key outputs #:allow-other-keys)
6203 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6204 #t)))))
6205 (propagated-inputs
6206 `(("python-mpmath" ,python-mpmath)))
6207 (home-page "http://www.sympy.org/")
6208 (synopsis "Python library for symbolic mathematics")
6209 (description
6210 "SymPy is a Python library for symbolic mathematics. It aims to become a
6211 full-featured computer algebra system (CAS) while keeping the code as simple
6212 as possible in order to be comprehensible and easily extensible.")
6213 (license license:bsd-3)))
6214
6215 (define-public python2-sympy
6216 (package
6217 (inherit (package-with-python2 python-sympy))
6218 (arguments
6219 `(#:phases
6220 (modify-phases %standard-phases
6221 ;; Run the core tests after installation. By default it would run
6222 ;; *all* tests, which take a very long time to complete and are known
6223 ;; to be flaky.
6224 (delete 'check)
6225 (add-after 'install 'check
6226 (lambda* (#:key outputs #:allow-other-keys)
6227 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6228 #t)))))))
6229
6230 (define-public python-q
6231 (package
6232 (name "python-q")
6233 (version "2.6")
6234 (source
6235 (origin
6236 (method url-fetch)
6237 (uri (pypi-uri "q" version))
6238 (sha256
6239 (base32
6240 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6241 (build-system python-build-system)
6242 (home-page "https://github.com/zestyping/q")
6243 (synopsis "Quick-and-dirty debugging output for tired programmers")
6244 (description
6245 "q is a Python module for \"print\" style of debugging Python code. It
6246 provides convenient short API for print out of values, tracebacks, and
6247 falling into the Python interpreter.")
6248 (license license:asl2.0)))
6249
6250 (define-public python2-q
6251 (package-with-python2 python-q))
6252
6253 (define-public python2-xlib
6254 (package
6255 (name "python2-xlib")
6256 (version "0.14")
6257 (source (origin
6258 (method url-fetch)
6259 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6260 "/" version "/"
6261 "python-xlib-" version ".tar.gz"))
6262 (sha256
6263 (base32
6264 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6265 (build-system python-build-system)
6266 (arguments
6267 `(#:python ,python-2 ;Python 2 only
6268 #:tests? #f)) ;no tests
6269 (home-page "http://python-xlib.sourceforge.net/")
6270 (synopsis "Python X11 client library")
6271 (description
6272 "The Python X Library is intended to be a fully functional X client
6273 library for Python programs. It is useful to implement low-level X clients.
6274 It is written entirely in Python.")
6275 (license license:gpl2+)))
6276
6277 (define-public python-singledispatch
6278 (package
6279 (name "python-singledispatch")
6280 (version "3.4.0.3")
6281 (source
6282 (origin
6283 (method url-fetch)
6284 (uri (pypi-uri "singledispatch" version))
6285 (sha256
6286 (base32
6287 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6288 (build-system python-build-system)
6289 (native-inputs
6290 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6291 (home-page
6292 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6293 (synopsis "Backport of singledispatch feature from Python 3.4")
6294 (description
6295 "This library brings functools.singledispatch from Python 3.4 to Python
6296 2.6-3.3.")
6297 (license license:expat)))
6298
6299 (define-public python2-singledispatch
6300 (package-with-python2 python-singledispatch))
6301
6302 ;; the python- version can be removed with python-3.5
6303 (define-public python-backports-abc
6304 (package
6305 (name "python-backports-abc")
6306 (version "0.5")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "backports_abc" version))
6311 (sha256
6312 (base32
6313 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6314 (build-system python-build-system)
6315 (home-page "https://github.com/cython/backports_abc")
6316 (synopsis "Backport of additions to the 'collections.abc' module")
6317 (description
6318 "Python-backports-abc provides a backport of additions to the
6319 @code{collections.abc} module in Python-3.5.")
6320 (license license:psfl)))
6321
6322 (define-public python2-backports-abc
6323 (package-with-python2 python-backports-abc))
6324
6325 (define-public python-backports-csv
6326 (package
6327 (name "python-backports-csv")
6328 (version "1.0.5")
6329 (source
6330 (origin
6331 (method url-fetch)
6332 (uri (pypi-uri "backports.csv" version))
6333 (sha256
6334 (base32
6335 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6336 (build-system python-build-system)
6337 (home-page "https://github.com/ryanhiebert/backports.csv")
6338 (synopsis "Backport of Python 3's csv module for Python 2")
6339 (description
6340 "Provides a backport of Python 3's @code{csv} module for parsing
6341 comma separated values. The API of the @code{csv} module in Python 2
6342 is drastically different from the @code{csv} module in Python 3.
6343 This is due, for the most part, to the difference between str in
6344 Python 2 and Python 3.")
6345 (license license:psfl)))
6346
6347 (define-public python2-backports-csv
6348 (package-with-python2 python-backports-csv))
6349
6350 (define-public python2-backports-shutil-get-terminal-size
6351 (package
6352 (name "python2-backports-shutil-get-terminal-size")
6353 (version "1.0.0")
6354 (source
6355 (origin
6356 (method url-fetch)
6357 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6358 (sha256
6359 (base32
6360 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6361 (build-system python-build-system)
6362 (arguments
6363 `(#:python ,python-2
6364 #:phases
6365 (modify-phases %standard-phases
6366 (replace 'check
6367 (lambda _
6368 (invoke "py.test" "-v"))))))
6369 (native-inputs
6370 `(("python2-pytest" ,python2-pytest)))
6371 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6372 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6373 (description
6374 "This package provides a backport of the @code{get_terminal_size
6375 function} from Python 3.3's @code{shutil}.
6376 Unlike the original version it is written in pure Python rather than C,
6377 so it might be a tiny bit slower.")
6378 (license license:expat)))
6379
6380 (define-public python-waf
6381 (package
6382 (name "python-waf")
6383 (version "2.0.11")
6384 (source (origin
6385 (method url-fetch)
6386 (uri (string-append "https://waf.io/"
6387 "waf-" version ".tar.bz2"))
6388 (sha256
6389 (base32
6390 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6391 (build-system python-build-system)
6392 (arguments
6393 '(#:phases
6394 (modify-phases %standard-phases
6395 (replace 'build
6396 (lambda _
6397 (invoke "python" "waf-light" "configure" "build")))
6398 (replace 'check
6399 (lambda _
6400 (invoke "python" "waf" "--version")))
6401 (replace 'install
6402 (lambda* (#:key outputs #:allow-other-keys)
6403 (let ((out (assoc-ref outputs "out")))
6404 (install-file "waf" (string-append out "/bin")))
6405 #t))
6406 ;; waf breaks when it is wrapped.
6407 (delete 'wrap))))
6408 (home-page "https://waf.io/")
6409 (synopsis "Python-based build system")
6410 (description
6411 "Waf is a Python-based framework for configuring, compiling and installing
6412 applications.")
6413 (license license:bsd-3)))
6414
6415 (define-public python2-waf
6416 (package-with-python2 python-waf))
6417
6418 (define-public python-pyzmq
6419 (package
6420 (name "python-pyzmq")
6421 (version "17.1.2")
6422 (source
6423 (origin
6424 (method url-fetch)
6425 (uri (pypi-uri "pyzmq" version))
6426 (sha256
6427 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6428 (build-system python-build-system)
6429 (arguments
6430 `(#:configure-flags
6431 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6432 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6433 ;; --inplace' for 'python setup.py test' to work.
6434 #:tests? #f))
6435 (inputs
6436 `(("zeromq" ,zeromq)))
6437 (native-inputs
6438 `(("pkg-config" ,pkg-config)
6439 ("python-nose" ,python-nose)))
6440 (home-page "https://github.com/zeromq/pyzmq")
6441 (synopsis "Python bindings for 0MQ")
6442 (description
6443 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6444 (license license:bsd-4)))
6445
6446 (define-public python2-pyzmq
6447 (package-with-python2 python-pyzmq))
6448
6449 (define-public python-pep8
6450 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6451 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6452 ;; some dependents' test suites, and nothing more.
6453 (package
6454 (name "python-pep8")
6455 (version "1.7.0")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "pep8" version))
6460 (sha256
6461 (base32
6462 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6463 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6464 (build-system python-build-system)
6465 (home-page "https://pep8.readthedocs.org/")
6466 (synopsis "Python style guide checker")
6467 (description
6468 "This tools checks Python code against some of the style conventions in
6469 PEP 8.")
6470 (license license:expat)))
6471
6472 (define-public python2-pep8
6473 (package-with-python2 python-pep8))
6474
6475 (define-public python-pyflakes
6476 (package
6477 (name "python-pyflakes")
6478 (version "2.1.1")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "pyflakes" version))
6483 (sha256
6484 (base32
6485 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6486 (build-system python-build-system)
6487 (home-page
6488 "https://github.com/pyflakes/pyflakes")
6489 (synopsis "Passive checker of Python programs")
6490 (description
6491 "Pyflakes statically checks Python source code for common errors.")
6492 (license license:expat)))
6493
6494 (define-public python2-pyflakes
6495 (package-with-python2 python-pyflakes))
6496
6497 (define-public python-mccabe
6498 (package
6499 (name "python-mccabe")
6500 (version "0.6.1")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "mccabe" version))
6505 (sha256
6506 (base32
6507 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6508 (build-system python-build-system)
6509 (native-inputs
6510 `(("python-pytest" ,python-pytest-bootstrap)
6511 ("python-pytest-runner" ,python-pytest-runner)))
6512 (home-page "https://github.com/flintwork/mccabe")
6513 (synopsis "McCabe checker, plugin for flake8")
6514 (description
6515 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6516 complexity of Python source code.")
6517 (license license:expat)))
6518
6519 (define-public python2-mccabe
6520 (package-with-python2 python-mccabe))
6521
6522 (define-public python-mccabe-0.2.1
6523 (package (inherit python-mccabe)
6524 (version "0.2.1")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "mccabe" version))
6529 (sha256
6530 (base32
6531 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6532
6533 (define-public python2-mccabe-0.2.1
6534 (package-with-python2 python-mccabe-0.2.1))
6535
6536 ;; Flake8 2.4.1 requires an older version of pep8.
6537 ;; This should be removed ASAP.
6538 (define-public python-pep8-1.5.7
6539 (package (inherit python-pep8)
6540 (version "1.5.7")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pep8" version))
6545 (sha256
6546 (base32
6547 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6548 (arguments
6549 ;; XXX Tests not compatible with Python 3.5.
6550 '(#:tests? #f))))
6551
6552 (define-public python2-pep8-1.5.7
6553 (package-with-python2 python-pep8-1.5.7))
6554
6555 ;; Flake8 2.4.1 requires an older version of pyflakes.
6556 ;; This should be removed ASAP.
6557 (define-public python-pyflakes-0.8.1
6558 (package (inherit python-pyflakes)
6559 (version "0.8.1")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pyflakes" version))
6564 (sha256
6565 (base32
6566 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6567 (arguments
6568 ;; XXX Tests not compatible with Python 3.5.
6569 '(#:tests? #f))))
6570
6571 (define-public python2-pyflakes-0.8.1
6572 (package-with-python2 python-pyflakes-0.8.1))
6573
6574 (define-public python-flake8
6575 (package
6576 (name "python-flake8")
6577 (version "3.7.7")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "flake8" version))
6581 (sha256
6582 (base32
6583 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6584 (build-system python-build-system)
6585 (arguments
6586 `(#:phases
6587 (modify-phases %standard-phases
6588 (delete 'check)
6589 (add-after 'install 'check
6590 (lambda* (#:key inputs outputs #:allow-other-keys)
6591 (add-installed-pythonpath inputs outputs)
6592 (invoke "pytest" "-v")
6593 #t)))))
6594 (propagated-inputs
6595 `(("python-pycodestyle" ,python-pycodestyle)
6596 ("python-entrypoints" ,python-entrypoints)
6597 ("python-pyflakes" ,python-pyflakes)
6598 ("python-mccabe" ,python-mccabe)))
6599 (native-inputs
6600 `(("python-mock" ,python-mock)
6601 ("python-pytest" ,python-pytest-bootstrap)
6602 ("python-pytest-runner" ,python-pytest-runner)))
6603 (home-page "https://gitlab.com/pycqa/flake8")
6604 (synopsis
6605 "The modular source code checker: pep8, pyflakes and co")
6606 (description
6607 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6608 (properties `((python2-variant . ,(delay python2-flake8))))
6609 (license license:expat)))
6610
6611 (define-public python2-flake8
6612 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6613 (package (inherit base)
6614 (propagated-inputs
6615 `(("python2-configparser" ,python2-configparser)
6616 ("python2-enum34" ,python2-enum34)
6617 ("python2-typing" ,python2-typing)
6618 ,@(package-propagated-inputs base))))))
6619
6620 ;; python-hacking requires flake8 <2.6.0.
6621 (define-public python-flake8-2.5
6622 (package
6623 (inherit python-flake8)
6624 (version "2.5.5")
6625 (source (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "flake8" version))
6628 (sha256
6629 (base32
6630 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6631 (propagated-inputs
6632 `(("python-pep8" ,python-pep8)
6633 ,@(package-propagated-inputs python-flake8)))
6634 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6635
6636 (define-public python2-flake8-2.5
6637 (package
6638 (inherit python2-flake8)
6639 (version (package-version python-flake8-2.5))
6640 (source (origin
6641 (inherit (package-source python-flake8-2.5))))
6642 (propagated-inputs
6643 `(("python2-pep8" ,python2-pep8)
6644 ,@(package-propagated-inputs python2-flake8)))))
6645
6646 (define-public python-flake8-polyfill
6647 (package
6648 (name "python-flake8-polyfill")
6649 (version "1.0.2")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "flake8-polyfill" version))
6654 (sha256
6655 (base32
6656 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6657 (build-system python-build-system)
6658 (arguments
6659 '(#:phases
6660 (modify-phases %standard-phases
6661 (replace 'check
6662 (lambda _
6663 ;; Be compatible with Pytest 4:
6664 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6665 (substitute* "setup.cfg"
6666 (("\\[pytest\\]")
6667 "[tool:pytest]"))
6668
6669 (setenv "PYTHONPATH"
6670 (string-append (getcwd) "/build/lib:"
6671 (getenv "PYTHONPATH")))
6672 (invoke "py.test" "-v"))))))
6673 (native-inputs
6674 `(("python-flake8" ,python-flake8)
6675 ("python-mock" ,python-mock)
6676 ("python-pep8" ,python-pep8)
6677 ("python-pycodestyle" ,python-pycodestyle)
6678 ("python-pytest" ,python-pytest)))
6679 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6680 (synopsis "Polyfill package for Flake8 plugins")
6681 (description
6682 "This package that provides some compatibility helpers for Flake8
6683 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6684 (license license:expat)))
6685
6686 (define-public python2-flake8-polyfill
6687 (package-with-python2 python-flake8-polyfill))
6688
6689 (define-public python-mistune
6690 (package
6691 (name "python-mistune")
6692 (version "0.8.4")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "mistune" version))
6697 (sha256
6698 (base32
6699 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-nose" ,python-nose)
6703 ("python-cython" ,python-cython)))
6704 (home-page "https://github.com/lepture/mistune")
6705 (synopsis "Markdown parser in pure Python")
6706 (description "This package provides a fast markdown parser in pure
6707 Python.")
6708 (license license:bsd-3)))
6709
6710 (define-public python2-mistune
6711 (package-with-python2 python-mistune))
6712
6713 (define-public python-markdown
6714 (package
6715 (name "python-markdown")
6716 (version "3.1.1")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "Markdown" version))
6721 (sha256
6722 (base32
6723 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6724 (build-system python-build-system)
6725 (native-inputs
6726 `(("python-nose" ,python-nose)
6727 ("python-pyyaml" ,python-pyyaml)))
6728 (home-page "https://python-markdown.github.io/")
6729 (synopsis "Python implementation of Markdown")
6730 (description
6731 "This package provides a Python implementation of John Gruber's
6732 Markdown. The library features international input, various Markdown
6733 extensions, and several HTML output formats. A command line wrapper
6734 markdown_py is also provided to convert Markdown files to HTML.")
6735 (license license:bsd-3)))
6736
6737 (define-public python2-markdown
6738 (package-with-python2 python-markdown))
6739
6740 (define-public python-ptyprocess
6741 (package
6742 (name "python-ptyprocess")
6743 (version "0.5.2")
6744 (source
6745 (origin
6746 (method url-fetch)
6747 (uri (pypi-uri "ptyprocess" version))
6748 (sha256
6749 (base32
6750 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6751 (build-system python-build-system)
6752 (native-inputs
6753 `(("python-nose" ,python-nose)))
6754 (arguments
6755 `(#:phases
6756 (modify-phases %standard-phases
6757 (replace 'check
6758 (lambda _ (invoke "nosetests"))))))
6759 (home-page "https://github.com/pexpect/ptyprocess")
6760 (synopsis "Run a subprocess in a pseudo terminal")
6761 (description
6762 "This package provides a Python library used to launch a subprocess in a
6763 pseudo terminal (pty), and interact with both the process and its pty.")
6764 (license license:isc)))
6765
6766 (define-public python2-ptyprocess
6767 (package-with-python2 python-ptyprocess))
6768
6769 (define-public python-cram
6770 (package
6771 (name "python-cram")
6772 (version "0.7")
6773 (home-page "https://bitheap.org/cram/")
6774 (source (origin
6775 (method url-fetch)
6776 (uri (list (string-append home-page "cram-"
6777 version ".tar.gz")
6778 (pypi-uri "cram" version)))
6779 (sha256
6780 (base32
6781 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6782 (arguments
6783 '(#:phases
6784 (modify-phases %standard-phases
6785 (add-after 'unpack 'patch-source
6786 (lambda _
6787 (substitute* (find-files "cram" ".*\\.py$")
6788 ;; Replace default shell path.
6789 (("/bin/sh") (which "sh")))
6790 (substitute* (find-files "tests" ".*\\.t$")
6791 (("md5") "md5sum")
6792 (("/bin/bash") (which "bash"))
6793 (("/bin/sh") (which "sh")))
6794 (substitute* "cram/_test.py"
6795 ;; This hack works around a bug triggered by substituting
6796 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6797 ;; "cram -h", which breaks the output at 80 characters. This
6798 ;; causes the line showing the default shell to break into two
6799 ;; lines, but the test expects a single line...
6800 (("env\\['COLUMNS'\\] = '80'")
6801 "env['COLUMNS'] = '160'"))
6802
6803 (substitute* "Makefile"
6804 ;; Recent versions of python-coverage have caused the test
6805 ;; coverage to decrease (as of version 0.7). Allow that.
6806 (("--fail-under=100")
6807 "--fail-under=90"))
6808
6809 #t))
6810 (replace 'check
6811 ;; The test phase uses the built library and executable.
6812 (lambda* (#:key inputs outputs #:allow-other-keys)
6813 (add-installed-pythonpath inputs outputs)
6814 (setenv "PATH" (string-append (getenv "PATH") ":"
6815 (assoc-ref outputs "out") "/bin"))
6816 (invoke "make" "test"))))))
6817 (build-system python-build-system)
6818 (native-inputs
6819 `(("python-coverage" ,python-coverage)
6820 ("which" ,which)))
6821 (synopsis "Simple testing framework for command line applications")
6822 (description
6823 "Cram is a functional testing framework for command line applications.
6824 Cram tests look like snippets of interactive shell sessions. Cram runs each
6825 command and compares the command output in the test with the command’s actual
6826 output.")
6827 (license license:gpl2+)))
6828
6829 (define-public python2-cram
6830 (package-with-python2 python-cram))
6831
6832 (define-public python-straight-plugin
6833 (package
6834 (name "python-straight-plugin")
6835 (version "1.4.1")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (pypi-uri "straight.plugin" version))
6840 (sha256
6841 (base32
6842 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6843 (build-system python-build-system)
6844 (home-page "https://github.com/ironfroggy/straight.plugin")
6845 (synopsis "Simple namespaced plugin facility")
6846 (description "Straight Plugin provides a type of plugin you can create from
6847 almost any existing Python modules, and an easy way for outside developers to
6848 add functionality and customization to your projects with their own plugins.")
6849 (license license:expat)))
6850
6851 (define-public python2-straight-plugin
6852 (package-with-python2 python-straight-plugin))
6853
6854 (define-public python-fonttools
6855 (package
6856 (name "python-fonttools")
6857 (version "3.38.0")
6858 (source (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "fonttools" version ".zip"))
6861 (sha256
6862 (base32
6863 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6864 (build-system python-build-system)
6865 (native-inputs
6866 `(("unzip" ,unzip)
6867 ("python-pytest" ,python-pytest)
6868 ("python-pytest-runner" ,python-pytest-runner)))
6869 (home-page "https://github.com/behdad/fonttools")
6870 (synopsis "Tools to manipulate font files")
6871 (description
6872 "FontTools/TTX is a library to manipulate font files from Python. It
6873 supports reading and writing of TrueType/OpenType fonts, reading and writing
6874 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6875 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6876 from an XML-based format.")
6877 (license license:expat)))
6878
6879 (define-public python2-fonttools
6880 (package-with-python2 python-fonttools))
6881
6882 (define-public python-ly
6883 (package
6884 (name "python-ly")
6885 (version "0.9.5")
6886 (source
6887 (origin
6888 (method url-fetch)
6889 (uri (pypi-uri name version))
6890 (sha256
6891 (base32
6892 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6893 (build-system python-build-system)
6894 (arguments
6895 ;; FIXME: Some tests need network access.
6896 '(#:tests? #f))
6897 (synopsis "Tool and library for manipulating LilyPond files")
6898 (description "This package provides a Python library to parse, manipulate
6899 or create documents in LilyPond format. A command line program ly is also
6900 provided that can be used to do various manipulations with LilyPond files.")
6901 (home-page "https://pypi.python.org/pypi/python-ly")
6902 (license license:gpl2+)))
6903
6904 (define-public python-appdirs
6905 (package
6906 (name "python-appdirs")
6907 (version "1.4.3")
6908 (source
6909 (origin
6910 (method url-fetch)
6911 (uri (pypi-uri "appdirs" version))
6912 (sha256
6913 (base32
6914 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6915 (build-system python-build-system)
6916 (home-page "https://github.com/ActiveState/appdirs")
6917 (synopsis
6918 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6919 (description
6920 "This module provides a portable way of finding out where user data
6921 should be stored on various operating systems.")
6922 (license license:expat)))
6923
6924 (define-public python2-appdirs
6925 (package-with-python2 python-appdirs))
6926
6927 (define-public python-llfuse
6928 (package
6929 (name "python-llfuse")
6930 (version "1.3.5")
6931 (source (origin
6932 (method url-fetch)
6933 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6934 (sha256
6935 (base32
6936 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6937 (build-system python-build-system)
6938 (inputs
6939 `(("fuse" ,fuse)
6940 ("attr" ,attr)))
6941 (native-inputs
6942 `(("pkg-config" ,pkg-config)))
6943 (synopsis "Python bindings for FUSE")
6944 (description
6945 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6946 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6947 (license license:lgpl2.0+)
6948 (properties `((python2-variant . ,(delay python2-llfuse))))))
6949
6950 (define-public python2-llfuse
6951 (package (inherit (package-with-python2
6952 (strip-python2-variant python-llfuse)))
6953 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6954
6955 ;; For attic-0.16
6956 (define-public python-llfuse-0.41
6957 (package (inherit python-llfuse)
6958 (version "0.41.1")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (string-append
6962 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6963 "llfuse-" version ".tar.bz2"))
6964 (sha256
6965 (base32
6966 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6967 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6968 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6969 (license (list license:expat license:lgpl2.0+))))
6970
6971 (define-public python-msgpack
6972 (package
6973 (name "python-msgpack")
6974 (version "0.5.6")
6975 (source (origin
6976 (method url-fetch)
6977 (uri (pypi-uri "msgpack" version))
6978 (sha256
6979 (base32
6980 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6981 (build-system python-build-system)
6982 (arguments
6983 `(#:modules ((guix build utils)
6984 (guix build python-build-system)
6985 (ice-9 ftw)
6986 (srfi srfi-1)
6987 (srfi srfi-26))
6988 #:phases
6989 (modify-phases %standard-phases
6990 (replace 'check
6991 (lambda _
6992 (let ((cwd (getcwd)))
6993 (setenv "PYTHONPATH"
6994 (string-append cwd "/build/"
6995 (find (cut string-prefix? "lib" <>)
6996 (scandir (string-append cwd "/build")))
6997 ":"
6998 (getenv "PYTHONPATH")))
6999 (invoke "pytest" "-v" "test")))))))
7000 (native-inputs
7001 `(("python-pytest" ,python-pytest)))
7002 (synopsis "MessagePack (de)serializer")
7003 (description "MessagePack is a fast, compact binary serialization format,
7004 suitable for similar data to JSON. This package provides CPython bindings for
7005 reading and writing MessagePack data.")
7006 (home-page "https://pypi.python.org/pypi/msgpack/")
7007 (license license:asl2.0)))
7008
7009 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7010 ;; release 0.5. Some packages like borg still call it by the old name for now.
7011 ;; <https://bugs.gnu.org/30662>
7012 (define-public python-msgpack-transitional
7013 (package
7014 (inherit python-msgpack)
7015 (name "python-msgpack-transitional")
7016 (arguments
7017 (substitute-keyword-arguments (package-arguments python-msgpack)
7018 ((#:phases phases)
7019 `(modify-phases ,phases
7020 (add-after 'unpack 'configure-transitional
7021 (lambda _
7022 ;; Keep using the old name.
7023 (substitute* "setup.py"
7024 (("TRANSITIONAL = False")
7025 "TRANSITIONAL = 1"))
7026 #t))))))))
7027
7028 (define-public python2-msgpack
7029 (package-with-python2 python-msgpack))
7030
7031 (define-public python-netaddr
7032 (package
7033 (name "python-netaddr")
7034 (version "0.7.19")
7035 (source
7036 (origin
7037 (method url-fetch)
7038 (uri (pypi-uri "netaddr" version))
7039 (sha256
7040 (base32
7041 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7042 (build-system python-build-system)
7043 (arguments `(#:tests? #f)) ;; No tests.
7044 (home-page "https://github.com/drkjam/netaddr/")
7045 (synopsis "Pythonic manipulation of network addresses")
7046 (description
7047 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7048 and MAC network addresses.")
7049 (license license:bsd-3)))
7050
7051 (define-public python2-netaddr
7052 (package-with-python2 python-netaddr))
7053
7054 (define-public python2-pyroute2
7055 (package
7056 (name "python2-pyroute2")
7057 (version "0.5.6")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (pypi-uri "pyroute2" version))
7062 (sha256
7063 (base32
7064 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7065 (build-system python-build-system)
7066 (arguments
7067 `(#:python ,python-2)) ;Python 3.x is not supported
7068 (home-page "https://github.com/svinota/pyroute2")
7069 (synopsis "Python netlink library")
7070 (description
7071 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7072 Supported netlink families and protocols include:
7073 @itemize
7074 @item rtnl, network settings - addresses, routes, traffic controls
7075 @item nfnetlink - netfilter API: ipset, nftables, ...
7076 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7077 @item devlink - manage and monitor devlink-enabled hardware
7078 @item generic - generic netlink families
7079 @itemize
7080 @item nl80211 - wireless functions API (basic support)
7081 @item taskstats - extended process statistics
7082 @item acpi_events - ACPI events monitoring
7083 @item thermal_events - thermal events monitoring
7084 @item VFS_DQUOT - disk quota events monitoring
7085 @end itemize
7086 @end itemize")
7087 (license license:gpl2+)))
7088
7089 (define-public python-wrapt
7090 (package
7091 (name "python-wrapt")
7092 (version "1.11.2")
7093 (source
7094 (origin
7095 (method url-fetch)
7096 (uri (pypi-uri "wrapt" version))
7097 (sha256
7098 (base32
7099 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7100 (build-system python-build-system)
7101 (arguments
7102 ;; Tests are not included in the tarball, they are only available in the
7103 ;; git repository.
7104 `(#:tests? #f))
7105 (home-page "https://github.com/GrahamDumpleton/wrapt")
7106 (synopsis "Module for decorators, wrappers and monkey patching")
7107 (description
7108 "The aim of the wrapt module is to provide a transparent object proxy for
7109 Python, which can be used as the basis for the construction of function
7110 wrappers and decorator functions.")
7111 (license license:bsd-2)))
7112
7113 (define-public python2-wrapt
7114 (package-with-python2 python-wrapt))
7115
7116 (define-public python-xlrd
7117 (package
7118 (name "python-xlrd")
7119 (version "1.0.0")
7120 (source (origin
7121 (method url-fetch)
7122 (uri (pypi-uri "xlrd" version))
7123 (sha256
7124 (base32
7125 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7126 (build-system python-build-system)
7127 (arguments
7128 `(#:phases
7129 (modify-phases %standard-phases
7130 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7131 ;; run tests instead for now.
7132 (replace 'check (lambda _ (invoke "nosetests"))))))
7133 (native-inputs `(("python-nose" ,python-nose)))
7134 (home-page "http://www.python-excel.org/")
7135 (synopsis "Library for extracting data from Excel files")
7136 (description "This package provides a library to extract data from
7137 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7138 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7139 Unicode-aware. It is not intended as an end-user tool.")
7140 (license license:bsd-3)))
7141
7142 (define-public python2-xlrd
7143 (package-with-python2 python-xlrd))
7144
7145 (define-public python-prettytable
7146 (package
7147 (name "python-prettytable")
7148 (version "0.7.2")
7149 (source
7150 (origin
7151 (method url-fetch)
7152 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7153 (sha256
7154 (base32
7155 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7156 (build-system python-build-system)
7157 (home-page "http://code.google.com/p/prettytable/")
7158 (synopsis "Display tabular data in an ASCII table format")
7159 (description
7160 "A library designed to represent tabular data in visually appealing ASCII
7161 tables. PrettyTable allows for selection of which columns are to be printed,
7162 independent alignment of columns (left or right justified or centred) and
7163 printing of sub-tables by specifying a row range.")
7164 (license license:bsd-3)))
7165
7166 (define-public python2-prettytable
7167 (package-with-python2 python-prettytable))
7168
7169 (define-public python-tables
7170 (package
7171 (name "python-tables")
7172 (version "3.4.4")
7173 (source
7174 (origin
7175 (method url-fetch)
7176 (uri (pypi-uri "tables" version))
7177 (sha256
7178 (base32
7179 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7180 (modules '((guix build utils)))
7181 (snippet
7182 '(begin
7183 ;; Remove pre-compiled .pyc files from source.
7184 (for-each delete-file-recursively
7185 (find-files "." "__pycache__" #:directories? #t))
7186 (for-each delete-file (find-files "." "\\.pyc$"))
7187 #t))))
7188 (build-system python-build-system)
7189 (arguments
7190 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7191 ;; or "check", so we must override the build and check phases.
7192 #:phases
7193 (modify-phases %standard-phases
7194 (add-after 'unpack 'use-gcc
7195 (lambda _
7196 (substitute* "setup.py"
7197 (("compiler = new_compiler\\(\\)" line)
7198 (string-append line
7199 "\ncompiler.set_executables(compiler='gcc',"
7200 "compiler_so='gcc',"
7201 "linker_exe='gcc',"
7202 "linker_so='gcc -shared')")))
7203 #t))
7204 (replace 'build
7205 (lambda* (#:key inputs #:allow-other-keys)
7206 (invoke "python" "setup.py" "build"
7207 (string-append "--hdf5="
7208 (assoc-ref inputs "hdf5")))))
7209 (replace 'check
7210 (lambda* (#:key inputs #:allow-other-keys)
7211 (invoke "python" "setup.py" "check"
7212 (string-append "--hdf5="
7213 (assoc-ref inputs "hdf5"))))))))
7214 (propagated-inputs
7215 `(("python-numexpr" ,python-numexpr)
7216 ("python-numpy" ,python-numpy)))
7217 (native-inputs
7218 `(("python-cython" ,python-cython)
7219 ("pkg-config" ,pkg-config)))
7220 (inputs
7221 `(("hdf5" ,hdf5)
7222 ("bzip2" ,bzip2)
7223 ("zlib" ,zlib)))
7224 (home-page "http://www.pytables.org/")
7225 (synopsis "Hierarchical datasets for Python")
7226 (description "PyTables is a package for managing hierarchical datasets and
7227 designed to efficiently cope with extremely large amounts of data.")
7228 (license license:bsd-3)))
7229
7230 (define-public python2-tables
7231 (package-with-python2 python-tables))
7232
7233 (define-public python-pyasn1
7234 (package
7235 (name "python-pyasn1")
7236 (version "0.4.3")
7237 (source
7238 (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "pyasn1" version))
7241 (sha256
7242 (base32
7243 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7244 (build-system python-build-system)
7245 (home-page "http://pyasn1.sourceforge.net/")
7246 (synopsis "ASN.1 types and codecs")
7247 (description
7248 "This is an implementation of ASN.1 types and codecs in Python. It is
7249 suitable for a wide range of protocols based on the ASN.1 specification.")
7250 (license license:bsd-2)))
7251
7252 (define-public python2-pyasn1
7253 (package-with-python2 python-pyasn1))
7254
7255 (define-public python-pyasn1-modules
7256 (package
7257 (name "python-pyasn1-modules")
7258 (version "0.2.2")
7259 (source
7260 (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "pyasn1-modules" version))
7263 (sha256
7264 (base32
7265 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7266 (build-system python-build-system)
7267 (propagated-inputs
7268 `(("python-pyasn1" ,python-pyasn1)))
7269 (home-page "https://sourceforge.net/projects/pyasn1/")
7270 (synopsis "ASN.1 codec implementations")
7271 (description
7272 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7273 implementations of ASN.1-based codecs and protocols.")
7274 (license license:bsd-3)))
7275
7276 (define-public python2-pyasn1-modules
7277 (package-with-python2 python-pyasn1-modules))
7278
7279 (define-public python-ipaddress
7280 (package
7281 (name "python-ipaddress")
7282 (version "1.0.22")
7283 (source (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "ipaddress" version))
7286 (sha256
7287 (base32
7288 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7289 (build-system python-build-system)
7290 (home-page "https://github.com/phihag/ipaddress")
7291 (synopsis "IP address manipulation library")
7292 (description
7293 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7294 in Python. This library is used to create, poke at, and manipulate IPv4 and
7295 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7296 module to older versions of Python.")
7297 (license license:psfl)))
7298
7299 (define-public python2-ipaddress
7300 (package-with-python2 python-ipaddress))
7301
7302 (define-public python2-ipaddr
7303 (package
7304 (name "python2-ipaddr")
7305 (version "2.1.11")
7306 (source
7307 (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "ipaddr" version))
7310 (sha256
7311 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7312 (build-system python-build-system)
7313 (arguments
7314 `(#:python ,python-2 ;version 2 only
7315 #:phases
7316 (modify-phases %standard-phases
7317 (replace 'check
7318 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7319 (home-page "https://github.com/google/ipaddr-py")
7320 (synopsis "IP address manipulation library")
7321 (description
7322 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7323 IPv6 addresses and networks.
7324
7325 For new implementations you may prefer to use the standard module
7326 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7327 versions of Python.")
7328 (license license:asl2.0)))
7329
7330 (define-public python-idna
7331 (package
7332 (name "python-idna")
7333 (version "2.8")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "idna" version))
7338 (sha256
7339 (base32
7340 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7341 (build-system python-build-system)
7342 (home-page "https://github.com/kjd/idna")
7343 (synopsis "Internationalized domain names in applications")
7344 (description
7345 "This is a library to support the Internationalised Domain Names in
7346 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7347 protocol is often referred to as “IDNA2008” and can produce different results
7348 from the earlier standard from 2003. The library is also intended to act as a
7349 suitable drop-in replacement for the “encodings.idna” module that comes with
7350 the Python standard library but currently only supports the older 2003
7351 specification.")
7352 (license license:bsd-4)))
7353
7354 (define-public python-idna-2.7
7355 (package (inherit python-idna)
7356 (version "2.7")
7357 (source (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "idna" version))
7360 (sha256
7361 (base32
7362 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7363
7364
7365 (define-public python2-idna
7366 (package-with-python2 python-idna))
7367
7368 (define-public python-idna-ssl
7369 (package
7370 (name "python-idna-ssl")
7371 (version "1.0.1")
7372 (source
7373 (origin
7374 (method url-fetch)
7375 (uri (pypi-uri "idna-ssl" version))
7376 (sha256
7377 (base32
7378 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7379 (build-system python-build-system)
7380 (arguments
7381 `(#:tests? #f)) ;circular dependency with python-aiohttp
7382 (home-page "https://github.com/aio-libs/idna-ssl")
7383 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7384 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7385 domains support.")
7386 (license license:expat)))
7387
7388 (define-public python-pretend
7389 (package
7390 (name "python-pretend")
7391 (version "1.0.9")
7392 (source
7393 (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "pretend" version))
7396 (sha256
7397 (base32
7398 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7399 (build-system python-build-system)
7400 (home-page "https://github.com/alex/pretend")
7401 (synopsis "Library for stubbing in Python")
7402 (description
7403 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7404 technique for writing tests. You may hear the term mixed up with mocks,
7405 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7406 responses, rather than doing any computation.")
7407 (license license:bsd-3)))
7408
7409 (define-public python2-pretend
7410 (package-with-python2 python-pretend))
7411
7412 (define-public python-pip
7413 (package
7414 (name "python-pip")
7415 (version "19.2.1")
7416 (source
7417 (origin
7418 (method url-fetch)
7419 (uri (pypi-uri "pip" version))
7420 (sha256
7421 (base32
7422 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7423 (build-system python-build-system)
7424 (arguments
7425 '(#:tests? #f)) ; there are no tests in the pypi archive.
7426 (home-page "https://pip.pypa.io/")
7427 (synopsis "Package manager for Python software")
7428 (description
7429 "Pip is a package manager for Python software, that finds packages on the
7430 Python Package Index (PyPI).")
7431 (license license:expat)))
7432
7433 (define-public python2-pip
7434 (package-with-python2 python-pip))
7435
7436 (define-public python-tlsh
7437 (package
7438 (name "python-tlsh")
7439 (version "3.4.5")
7440 (home-page "https://github.com/trendmicro/tlsh")
7441 (source
7442 (origin
7443 (method git-fetch)
7444 (uri (git-reference
7445 (url "https://github.com/trendmicro/tlsh.git")
7446 (commit (string-append "v" version))))
7447 (file-name (git-file-name name version))
7448 (sha256
7449 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7450 (build-system cmake-build-system)
7451 (arguments
7452 '(#:out-of-source? #f
7453 #:phases (modify-phases %standard-phases
7454 (replace
7455 'install
7456 (lambda* (#:key outputs #:allow-other-keys)
7457 ;; Build and install the Python bindings. The underlying
7458 ;; C++ library is apparently not meant to be installed.
7459 (let ((out (assoc-ref outputs "out")))
7460 (with-directory-excursion "py_ext"
7461 (and (system* "python" "setup.py" "build")
7462 (system* "python" "setup.py" "install"
7463 (string-append "--prefix=" out))))))))))
7464 (inputs `(("python" ,python-wrapper))) ;for the bindings
7465 (synopsis "Fuzzy matching library for Python")
7466 (description
7467 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7468 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7469 value which can be used for similarity comparisons. Similar objects have
7470 similar hash values, which allows for the detection of similar objects by
7471 comparing their hash values. The byte stream should have a sufficient amount
7472 of complexity; for example, a byte stream of identical bytes will not generate
7473 a hash value.")
7474 (license license:asl2.0)))
7475
7476 (define-public python2-tlsh
7477 (package
7478 (inherit python-tlsh)
7479 (name "python2-tlsh")
7480 (inputs `(("python" ,python-2)))))
7481
7482 (define-public python-termcolor
7483 (package
7484 (name "python-termcolor")
7485 (version "1.1.0")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "termcolor" version))
7490 (sha256
7491 (base32
7492 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7493 (build-system python-build-system)
7494 (arguments
7495 ;; There are no tests.
7496 `(#:tests? #f))
7497 (home-page "https://pypi.python.org/pypi/termcolor")
7498 (synopsis "ANSII Color formatting for terminal output")
7499 (description
7500 "This package provides ANSII Color formatting for output in terminals.")
7501 (license license:expat)))
7502
7503 (define-public python2-termcolor
7504 (package-with-python2 python-termcolor))
7505
7506 (define-public python-libarchive-c
7507 (package
7508 (name "python-libarchive-c")
7509 (version "2.8")
7510 (source (origin
7511 (method url-fetch)
7512 (uri (pypi-uri "libarchive-c" version))
7513 (sha256
7514 (base32
7515 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7516 (build-system python-build-system)
7517 (arguments
7518 '(#:phases (modify-phases %standard-phases
7519 (add-before
7520 'build 'reference-libarchive
7521 (lambda* (#:key inputs #:allow-other-keys)
7522 ;; Retain the absolute file name of libarchive.so.
7523 (let ((libarchive (assoc-ref inputs "libarchive")))
7524 (substitute* "libarchive/ffi.py"
7525 (("find_library\\('archive'\\)")
7526 (string-append "'" libarchive
7527 "/lib/libarchive.so'"))))))
7528 (replace 'check
7529 (lambda _ (invoke "pytest" "-vv"))))))
7530 (native-inputs
7531 `(("python-mock" ,python-mock)
7532 ("python-pytest" ,python-pytest)))
7533 (inputs
7534 `(("libarchive" ,libarchive)))
7535 (home-page "https://github.com/Changaco/python-libarchive-c")
7536 (synopsis "Python interface to libarchive")
7537 (description
7538 "This package provides Python bindings to libarchive, a C library to
7539 access possibly compressed archives in many different formats. It uses
7540 Python's @code{ctypes} foreign function interface (FFI).")
7541 (license license:lgpl2.0+)))
7542
7543 (define-public python2-libarchive-c
7544 (package-with-python2 python-libarchive-c))
7545
7546 (define-public python-file
7547 (package
7548 (inherit file)
7549 (name "python-file")
7550 (build-system python-build-system)
7551 (arguments
7552 '(#:tests? #f ;no tests
7553 #:configure-flags '("--single-version-externally-managed" "--root=/")
7554 #:phases (modify-phases %standard-phases
7555 (add-before 'build 'change-directory
7556 (lambda _
7557 (chdir "python")
7558 #t))
7559 (add-before 'build 'set-library-file-name
7560 (lambda* (#:key inputs #:allow-other-keys)
7561 (let ((file (assoc-ref inputs "file")))
7562 (substitute* "magic.py"
7563 (("find_library\\('magic'\\)")
7564 (string-append "'" file "/lib/libmagic.so'")))
7565 #t))))))
7566 (inputs `(("file" ,file)))
7567 (native-inputs (if (%current-target-system)
7568 `(("self" ,this-package))
7569 '()))
7570 (synopsis "Python bindings to the libmagic file type guesser. Note that
7571 this module and the python-magic module both provide a \"magic.py\" file;
7572 these two modules, which are different and were developed separately, both
7573 serve the same purpose: provide Python bindings for libmagic.")))
7574
7575 (define-public python2-file
7576 (package-with-python2 python-file))
7577
7578 (define-public python-debian
7579 (package
7580 (name "python-debian")
7581 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7582 (version "0.1.36")
7583 (source
7584 (origin
7585 ;; Use git-fetch, as pypi doesn't include test suite.
7586 (method git-fetch)
7587 (uri (git-reference
7588 (url home-page)
7589 (commit version)))
7590 (file-name (git-file-name name version))
7591 (sha256
7592 (base32
7593 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7594 (build-system python-build-system)
7595 (arguments
7596 `(#:phases (modify-phases %standard-phases
7597 (add-after 'unpack 'remove-debian-specific-tests
7598 ;; python-apt, apt and dpkg are not yet available in guix,
7599 ;; and these tests heavily depend on them.
7600 (lambda _
7601 (delete-file "lib/debian/tests/test_deb822.py")
7602 (delete-file "lib/debian/tests/test_debfile.py")
7603 #t)))))
7604 (propagated-inputs
7605 `(("python-six" ,python-six)
7606 ("python-chardet" ,python-chardet)))
7607 (synopsis "Debian package related modules")
7608 (description
7609 ;; XXX: Use @enumerate instead of @itemize to work around
7610 ;; <http://bugs.gnu.org/21772>.
7611 "This package provides Python modules that abstract many formats of
7612 Debian-related files, such as:
7613
7614 @enumerate
7615 @item Debtags information;
7616 @item @file{debian/changelog} files;
7617 @item packages files, pdiffs;
7618 @item control files of single or multiple RFC822-style paragraphs---e.g.
7619 @file{debian/control}, @file{.changes}, @file{.dsc};
7620 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7621 contained files and meta-information.
7622 @end enumerate\n")
7623
7624 ;; Modules are either GPLv2+ or GPLv3+.
7625 (license license:gpl3+)))
7626
7627 (define-public python2-debian
7628 (package-with-python2 python-debian))
7629
7630 (define-public python-nbformat
7631 (package
7632 (name "python-nbformat")
7633 (version "4.4.0")
7634 (source
7635 (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "nbformat" version))
7638 (sha256
7639 (base32
7640 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7641 (build-system python-build-system)
7642 (arguments `(#:tests? #f)) ; no test target
7643 (propagated-inputs
7644 `(("python-ipython-genutils" ,python-ipython-genutils)
7645 ("python-jsonschema" ,python-jsonschema)
7646 ("python-jupyter-core" ,python-jupyter-core)
7647 ("python-traitlets" ,python-traitlets)))
7648 (home-page "http://jupyter.org")
7649 (synopsis "Jupyter Notebook format")
7650 (description "This package provides the reference implementation of the
7651 Jupyter Notebook format and Python APIs for working with notebooks.")
7652 (license license:bsd-3)))
7653
7654 (define-public python2-nbformat
7655 (package-with-python2 python-nbformat))
7656
7657 (define-public python-bleach
7658 (package
7659 (name "python-bleach")
7660 (version "1.4.3")
7661 (source
7662 (origin
7663 (method url-fetch)
7664 (uri (pypi-uri "bleach" version))
7665 (sha256
7666 (base32
7667 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7668 (build-system python-build-system)
7669 (propagated-inputs
7670 `(("python-html5lib" ,python-html5lib-0.9)
7671 ("python-six" ,python-six)))
7672 (native-inputs
7673 `(("python-nose" ,python-nose)))
7674 (home-page "https://github.com/jsocol/bleach")
7675 (synopsis "Whitelist-based HTML-sanitizing tool")
7676 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7677 (license license:asl2.0)))
7678
7679 (define-public python2-bleach
7680 (package-with-python2 python-bleach))
7681
7682 (define-public python-entrypoints
7683 (package
7684 (name "python-entrypoints")
7685 (version "0.3")
7686 (source
7687 (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "entrypoints" version))
7690 (sha256
7691 (base32
7692 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7693 (build-system python-build-system)
7694 ;; The package does not come with a setup.py file, so we have to generate
7695 ;; one ourselves.
7696 (arguments
7697 `(#:tests? #f
7698 #:phases
7699 (modify-phases %standard-phases
7700 (add-after 'unpack 'create-setup.py
7701 (lambda _
7702 (call-with-output-file "setup.py"
7703 (lambda (port)
7704 (format port "\
7705 from setuptools import setup
7706 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7707 " ,version))))))))
7708 (home-page "https://github.com/takluyver/entrypoints")
7709 (synopsis "Discover and load entry points from installed Python packages")
7710 (description "Entry points are a way for Python packages to advertise
7711 objects with some common interface. The most common examples are
7712 @code{console_scripts} entry points, which define shell commands by
7713 identifying a Python function to run. The @code{entrypoints} module contains
7714 functions to find and load entry points.")
7715 (license license:expat)))
7716
7717 (define-public python2-entrypoints
7718 (package-with-python2 python-entrypoints))
7719
7720 (define-public python-nbconvert
7721 (package
7722 (name "python-nbconvert")
7723 (version "5.0.0b1")
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "nbconvert" version))
7728 (sha256
7729 (base32
7730 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7731 (build-system python-build-system)
7732 (arguments
7733 `(;; The "bdist_egg" target is disabled by default, causing the installation
7734 ;; to fail.
7735 #:configure-flags (list "bdist_egg")
7736 ;; FIXME: 5 failures, 40 errors.
7737 #:tests? #f))
7738 ;; #:phases
7739 ;; (modify-phases %standard-phases
7740 ;; (replace 'check
7741 ;; (lambda _
7742 ;; (zero? (system* "py.test" "-v")))))
7743 (native-inputs
7744 `(("python-pytest" ,python-pytest)))
7745 (propagated-inputs
7746 `(("python-bleach" ,python-bleach)
7747 ("python-entrypoints" ,python-entrypoints)
7748 ("python-jinja2" ,python-jinja2)
7749 ("python-jupyter-core" ,python-jupyter-core)
7750 ("python-mistune" ,python-mistune)
7751 ("python-nbformat" ,python-nbformat)
7752 ("python-pygments" ,python-pygments)
7753 ("python-traitlets" ,python-traitlets)))
7754 (home-page "http://jupyter.org")
7755 (synopsis "Converting Jupyter Notebooks")
7756 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7757 notebooks to various other formats via Jinja templates. It allows you to
7758 convert an @code{.ipynb} notebook file into various static formats including:
7759
7760 @enumerate
7761 @item HTML
7762 @item LaTeX
7763 @item PDF
7764 @item Reveal JS
7765 @item Markdown (md)
7766 @item ReStructured Text (rst)
7767 @item executable script
7768 @end enumerate\n")
7769 (license license:bsd-3)))
7770
7771 (define-public python2-nbconvert
7772 (package-with-python2 python-nbconvert))
7773
7774 (define-public python-notebook
7775 (package
7776 (name "python-notebook")
7777 (version "5.7.4")
7778 (source (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "notebook" version))
7781 (sha256
7782 (base32
7783 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7784 (build-system python-build-system)
7785 (arguments
7786 `(#:phases
7787 (modify-phases %standard-phases
7788 (replace 'check
7789 (lambda _
7790 ;; These tests require a browser
7791 (delete-file-recursively "notebook/tests/selenium")
7792 ;; Some tests need HOME
7793 (setenv "HOME" "/tmp")
7794 ;; This file contains "warningfilters", which are not supported
7795 ;; by this version of nose.
7796 (delete-file "setup.cfg")
7797 (with-directory-excursion "/tmp"
7798 (invoke "nosetests" "-v"))
7799 #t)))))
7800 (propagated-inputs
7801 `(("python-jupyter-core" ,python-jupyter-core)
7802 ("python-nbformat" ,python-nbformat)
7803 ("python-nbconvert" ,python-nbconvert)
7804 ("python-prometheus-client" ,python-prometheus-client)
7805 ("python-send2trash" ,python-send2trash)
7806 ("python-terminado" ,python-terminado)))
7807 (native-inputs
7808 `(("python-nose" ,python-nose)
7809 ("python-sphinx" ,python-sphinx)
7810 ("python-requests" ,python-requests)))
7811 (home-page "http://jupyter.org/")
7812 (synopsis "Web-based notebook environment for interactive computing")
7813 (description
7814 "The Jupyter HTML notebook is a web-based notebook environment for
7815 interactive computing.")
7816 (properties `((python2-variant . ,(delay python2-notebook))))
7817 (license license:bsd-3)))
7818
7819 (define-public python2-notebook
7820 (let ((base (package-with-python2
7821 (strip-python2-variant python-notebook))))
7822 (package (inherit base)
7823 (native-inputs
7824 `(("python2-mock" ,python2-mock)
7825 ,@(package-native-inputs base)))
7826 (arguments
7827 (substitute-keyword-arguments (package-arguments base)
7828 ((#:phases phases)
7829 `(modify-phases ,phases
7830 (add-before 'check 'disable-test-case
7831 ;; The test requires network access to localhost. Curiously it
7832 ;; fails with Python 2 only. Simply make the test-case return
7833 ;; immediately.
7834 (lambda _
7835 (substitute*
7836 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7837 (("formats = self.nbconvert_api") "return #")))))))))))
7838
7839 (define-public python-widgetsnbextension
7840 (package
7841 (name "python-widgetsnbextension")
7842 (version "3.4.2")
7843 (source
7844 (origin
7845 (method url-fetch)
7846 (uri (pypi-uri "widgetsnbextension" version))
7847 (sha256
7848 (base32
7849 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7850 (build-system python-build-system)
7851 (propagated-inputs
7852 `(("python-ipykernel" ,python-ipykernel)
7853 ("python-notebook" ,python-notebook)))
7854 (native-inputs
7855 `(("python-certifi" ,python-certifi)
7856 ("python-nose" ,python-nose)))
7857 (home-page "https://ipython.org")
7858 (synopsis "IPython HTML widgets for Jupyter")
7859 (description "This package provides interactive HTML widgets for Jupyter
7860 notebooks.")
7861 (license license:bsd-3)))
7862
7863 (define-public python2-widgetsnbextension
7864 (package-with-python2 python-widgetsnbextension))
7865
7866 (define-public python-ipywidgets
7867 (package
7868 (name "python-ipywidgets")
7869 (version "5.2.2")
7870 (source
7871 (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "ipywidgets" version))
7874 (sha256
7875 (base32
7876 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7877 (build-system python-build-system)
7878 (propagated-inputs
7879 `(("python-ipython" ,python-ipython)
7880 ("python-traitlets" ,python-traitlets)
7881 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7882 (native-inputs
7883 `(("python-nose" ,python-nose)
7884 ("python-pytest" ,python-pytest)))
7885 (home-page "https://ipython.org")
7886 (synopsis "IPython HTML widgets for Jupyter")
7887 (description "Ipywidgets are interactive HTML widgets for Jupyter
7888 notebooks and the IPython kernel. Notebooks come alive when interactive
7889 widgets are used. Users gain control of their data and can visualize changes
7890 in the data.")
7891 (license license:bsd-3)))
7892
7893 (define-public python2-ipywidgets
7894 (package-with-python2 python-ipywidgets))
7895
7896 (define-public python-jupyter-console
7897 (package
7898 (name "python-jupyter-console")
7899 (version "6.0.0")
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "jupyter_console" version))
7904 (sha256
7905 (base32
7906 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7907 (build-system python-build-system)
7908 (propagated-inputs
7909 `(("python-ipykernel" ,python-ipykernel)
7910 ("python-jupyter-client" ,python-jupyter-client)
7911 ("python-prompt-toolkit" ,python-prompt-toolkit)
7912 ("python-pygments" ,python-pygments)))
7913 (native-inputs
7914 `(("python-nose" ,python-nose)))
7915 (home-page "https://jupyter.org")
7916 (synopsis "Jupyter terminal console")
7917 (description "This package provides a terminal-based console frontend for
7918 Jupyter kernels. It also allows for console-based interaction with non-Python
7919 Jupyter kernels such as IJulia and IRKernel.")
7920 (license license:bsd-3)))
7921
7922 (define-public python2-jupyter-console
7923 (package
7924 (name "python2-jupyter-console")
7925 (version "5.2.0")
7926 (source
7927 (origin
7928 (method url-fetch)
7929 (uri (pypi-uri "jupyter_console" version))
7930 (sha256
7931 (base32
7932 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7933 (build-system python-build-system)
7934 ;; Tests only run in an TTY.
7935 (arguments `(#:tests? #f))
7936 (propagated-inputs
7937 `(("python2-ipykernel" ,python2-ipykernel)
7938 ("python2-jupyter-client" ,python2-jupyter-client)
7939 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7940 ("python2-pygments" ,python2-pygments)))
7941 (native-inputs
7942 `(("python2-nose" ,python2-nose)))
7943 (home-page "https://jupyter.org")
7944 (synopsis "Jupyter terminal console")
7945 (description "This package provides a terminal-based console frontend for
7946 Jupyter kernels. It also allows for console-based interaction with non-Python
7947 Jupyter kernels such as IJulia and IRKernel.")
7948 (license license:bsd-3)))
7949
7950 ;; The python-ipython and python-jupyter-console require each other. To get
7951 ;; the functionality in both packages working, strip down the
7952 ;; python-jupyter-console package when using it as an input to python-ipython.
7953 (define python-jupyter-console-minimal
7954 (package
7955 (inherit python-jupyter-console)
7956 (name "python-jupyter-console-minimal")
7957 (arguments
7958 (substitute-keyword-arguments
7959 (package-arguments python-jupyter-console)
7960 ((#:phases phases)
7961 `(modify-phases ,phases
7962 (add-after 'install 'delete-bin
7963 (lambda* (#:key outputs #:allow-other-keys)
7964 ;; Delete the bin files, to avoid conflicts in profiles
7965 ;; where python-ipython and python-jupyter-console are
7966 ;; both present.
7967 (delete-file-recursively
7968 (string-append
7969 (assoc-ref outputs "out") "/bin"))))))))
7970 ;; Remove the python-ipython propagated input, to avoid the cycle
7971 (propagated-inputs
7972 (alist-delete
7973 "python-ipython"
7974 (package-propagated-inputs python-jupyter-console)))))
7975
7976 (define-public python-qtconsole
7977 (package
7978 (name "python-qtconsole")
7979 (version "4.4.3")
7980 (source
7981 (origin
7982 (method url-fetch)
7983 (uri (pypi-uri "qtconsole" version))
7984 (sha256
7985 (base32
7986 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7987 (build-system python-build-system)
7988 (arguments
7989 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7990 ;; but we only have the LTS version 5.x. This means that there might be
7991 ;; runtime errors, but since this is a dependency of the Jupyter package,
7992 ;; and Jupyter can be used without the qtconsole we can overlook this for
7993 ;; now.
7994 `(#:tests? #f
7995 #:phases
7996 (modify-phases %standard-phases
7997 (add-before 'check 'pre-check
7998 (lambda _
7999 (setenv "QT_QPA_PLATFORM" "offscreen")
8000 #t)))))
8001 (propagated-inputs
8002 `(("python-ipykernel" ,python-ipykernel)
8003 ("python-ipython" ,python-ipython)))
8004 (native-inputs
8005 `(("python-pytest" ,python-pytest)))
8006 (home-page "http://jupyter.org")
8007 (synopsis "Jupyter Qt console")
8008 (description "This package provides a Qt-based console for Jupyter with
8009 support for rich media output.")
8010 (license license:bsd-3)))
8011
8012 (define-public jupyter
8013 (package
8014 (name "jupyter")
8015 (version "1.0.0")
8016 (source
8017 (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "jupyter" version))
8020 (sha256
8021 (base32
8022 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8023 (build-system python-build-system)
8024 (arguments '(#:tests? #f)) ; there are none.
8025 (propagated-inputs
8026 `(("python-ipykernel" ,python-ipykernel)
8027 ("python-ipywidgets" ,python-ipywidgets)
8028 ("python-jupyter-console" ,python-jupyter-console)
8029 ("python-nbconvert" ,python-nbconvert)
8030 ("python-notebook" ,python-notebook)
8031 ("python-qtconsole" ,python-qtconsole)))
8032 (native-search-paths
8033 (list (search-path-specification
8034 (variable "JUPYTER_PATH")
8035 (files '("share/jupyter")))))
8036 (home-page "https://jupyter.org")
8037 (synopsis "Web application for interactive documents")
8038 (description
8039 "The Jupyter Notebook is a web application that allows you to create and
8040 share documents that contain live code, equations, visualizations and
8041 explanatory text. Uses include: data cleaning and transformation, numerical
8042 simulation, statistical modeling, machine learning and much more.")
8043 (license license:bsd-3)))
8044
8045 (define-public python-chardet
8046 (package
8047 (name "python-chardet")
8048 (version "3.0.4")
8049 (source
8050 (origin
8051 (method url-fetch)
8052 (uri (pypi-uri "chardet" version))
8053 (sha256
8054 (base32
8055 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8056 (native-inputs
8057 `(("python-hypothesis" ,python-hypothesis)
8058 ("python-pytest" ,python-pytest)
8059 ("python-pytest-runner" ,python-pytest-runner)))
8060 (build-system python-build-system)
8061 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8062 (arguments `(#:tests? #f))
8063 (home-page "https://github.com/chardet/chardet")
8064 (synopsis "Universal encoding detector for Python 2 and 3")
8065 (description
8066 "This package provides @code{chardet}, a Python module that can
8067 automatically detect a wide range of file encodings.")
8068 (license license:lgpl2.1+)))
8069
8070 (define-public python2-chardet
8071 (package-with-python2 python-chardet))
8072
8073 (define-public python-docopt
8074 (package
8075 (name "python-docopt")
8076 (version "0.6.2")
8077 (source
8078 (origin
8079 (method url-fetch)
8080 ;; The release on PyPI does not include tests.
8081 (uri (string-append
8082 "https://github.com/docopt/docopt/archive/"
8083 version ".tar.gz"))
8084 (file-name (string-append name "-" version ".tar.gz"))
8085 (sha256
8086 (base32
8087 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8088 (build-system python-build-system)
8089 (native-inputs
8090 `(("python-pytest" ,python-pytest)))
8091 (arguments
8092 `(#:phases
8093 (modify-phases %standard-phases
8094 (replace 'check
8095 (lambda _ (invoke "py.test"))))))
8096 (home-page "http://docopt.org")
8097 (synopsis "Command-line interface description language for Python")
8098 (description "This library allows the user to define a command-line
8099 interface from a program's help message rather than specifying it
8100 programmatically with command-line parsers like @code{getopt} and
8101 @code{argparse}.")
8102 (license license:expat)))
8103
8104 (define-public python2-docopt
8105 (package-with-python2 python-docopt))
8106
8107 (define-public python-pythondialog
8108 (package
8109 (name "python-pythondialog")
8110 (version "3.4.0")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "pythondialog" version))
8115 (sha256
8116 (base32
8117 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8118 (build-system python-build-system)
8119 (arguments
8120 `(#:phases
8121 (modify-phases %standard-phases
8122 (add-after 'unpack 'patch-path
8123 (lambda* (#:key inputs #:allow-other-keys)
8124 (let* ((dialog (assoc-ref inputs "dialog")))
8125 ;; Since this library really wants to grovel the search path, we
8126 ;; must hardcode dialog's store path into it.
8127 (substitute* "dialog.py"
8128 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8129 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8130 #t))))
8131 #:tests? #f)) ; no test suite
8132 (propagated-inputs
8133 `(("dialog" ,dialog)))
8134 (home-page "http://pythondialog.sourceforge.net/")
8135 (synopsis "Python interface to the UNIX dialog utility")
8136 (description "A Python wrapper for the dialog utility. Its purpose is to
8137 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8138 This allows one to make simple text-mode user interfaces on Unix-like systems")
8139 (license license:lgpl2.1)
8140 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8141
8142 (define-public python2-pythondialog
8143 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8144 (package
8145 (inherit base)
8146 (version (package-version python-pythondialog))
8147 (source (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "python2-pythondialog" version))
8150 (sha256
8151 (base32
8152 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8153
8154 (define-public python-configobj
8155 (package
8156 (name "python-configobj")
8157 (version "5.0.6")
8158 (source (origin
8159 (method url-fetch)
8160 (uri (pypi-uri "configobj" version))
8161 (sha256
8162 (base32
8163 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8164 ;; Patch setup.py so it looks for python-setuptools, which is
8165 ;; required to parse the keyword 'install_requires' in setup.py.
8166 (patches (search-patches "python-configobj-setuptools.patch"))))
8167 (build-system python-build-system)
8168 (propagated-inputs
8169 `(("python-six" ,python-six)))
8170 (synopsis "Config file reading, writing and validation")
8171 (description "ConfigObj is a simple but powerful config file reader and
8172 writer: an ini file round tripper. Its main feature is that it is very easy to
8173 use, with a straightforward programmer’s interface and a simple syntax for
8174 config files.")
8175 (home-page "https://github.com/DiffSK/configobj")
8176 (license license:bsd-3)))
8177
8178 (define-public python2-configobj
8179 (package-with-python2 python-configobj))
8180
8181 (define-public python-configargparse
8182 (package
8183 (name "python-configargparse")
8184 (version "0.14.0")
8185 (source (origin
8186 (method url-fetch)
8187 (uri (pypi-uri "ConfigArgParse" version))
8188 (sha256
8189 (base32
8190 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8191 (build-system python-build-system)
8192 (native-inputs
8193 `(("python-pyyaml" ,python-pyyaml)))
8194 (arguments
8195 `(#:phases
8196 (modify-phases %standard-phases
8197 (replace 'check
8198 (lambda _
8199 ;; Bypass setuptools-shim because one test relies on "setup.py"
8200 ;; being the first argument passed to the python call.
8201 ;;
8202 ;; NOTE: Many tests do not run because they rely on Python's
8203 ;; built-in test.test_argparse, but we remove the unit tests from
8204 ;; our Python installation.
8205 (invoke "python" "setup.py" "test"))))))
8206 (synopsis "Replacement for argparse")
8207 (description "A drop-in replacement for argparse that allows options to also
8208 be set via config files and/or environment variables.")
8209 (home-page "https://github.com/bw2/ConfigArgParse")
8210 (license license:expat)))
8211
8212 (define-public python2-configargparse
8213 (package-with-python2 python-configargparse))
8214
8215 (define-public python-argparse-manpage
8216 (package
8217 (name "python-argparse-manpage")
8218 (version "1.1")
8219 (source
8220 (origin
8221 (method url-fetch)
8222 (uri (pypi-uri "argparse-manpage" version))
8223 (sha256
8224 (base32
8225 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8226 (build-system python-build-system)
8227 (home-page "https://github.com/praiskup/argparse-manpage")
8228 (synopsis "Build manual page from Python's ArgumentParser object")
8229 (description
8230 "This package provides tools to build manual pages from Python's
8231 @code{ArgumentParser} object.")
8232 (license license:asl2.0)))
8233
8234 (define-public python-contextlib2
8235 (package
8236 (name "python-contextlib2")
8237 (version "0.5.5")
8238 (source
8239 (origin
8240 (method url-fetch)
8241 (uri (pypi-uri "contextlib2" version))
8242 (sha256
8243 (base32
8244 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8245 (build-system python-build-system)
8246 (home-page "http://contextlib2.readthedocs.org/")
8247 (synopsis "Tools for decorators and context managers")
8248 (description "This module is primarily a backport of the Python
8249 3.2 contextlib to earlier Python versions. Like contextlib, it
8250 provides utilities for common tasks involving decorators and context
8251 managers. It also contains additional features that are not part of
8252 the standard library.")
8253 (license license:psfl)))
8254
8255 (define-public python2-contextlib2
8256 (package
8257 (name "python2-contextlib2")
8258 (version "0.5.5")
8259 (source
8260 (origin
8261 (method url-fetch)
8262 (uri (pypi-uri "contextlib2" version))
8263 (sha256
8264 (base32
8265 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8266 (build-system python-build-system)
8267 (arguments
8268 `(#:python ,python-2
8269 #:phases
8270 (modify-phases %standard-phases
8271 (replace 'check
8272 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8273 (native-inputs
8274 `(("python2-unittest2" ,python2-unittest2)))
8275 (home-page "http://contextlib2.readthedocs.org/")
8276 (synopsis "Tools for decorators and context managers")
8277 (description "This module is primarily a backport of the Python
8278 3.2 contextlib to earlier Python versions. Like contextlib, it
8279 provides utilities for common tasks involving decorators and context
8280 managers. It also contains additional features that are not part of
8281 the standard library.")
8282 (license license:psfl)))
8283
8284 (define-public python-texttable
8285 (package
8286 (name "python-texttable")
8287 (version "0.9.1")
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "texttable" version))
8292 (sha256
8293 (base32
8294 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8295 (build-system python-build-system)
8296 (arguments '(#:tests? #f)) ; no tests
8297 (home-page "https://github.com/foutaise/texttable/")
8298 (synopsis "Python module for creating simple ASCII tables")
8299 (description "Texttable is a Python module for creating simple ASCII
8300 tables.")
8301 (license license:lgpl2.1+)))
8302
8303 (define-public python2-texttable
8304 (package-with-python2 python-texttable))
8305
8306 (define-public python-atomicwrites
8307 (package
8308 (name "python-atomicwrites")
8309 (version "1.3.0")
8310 (source (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "atomicwrites" version))
8313 (sha256
8314 (base32
8315 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8316 (build-system python-build-system)
8317 (synopsis "Atomic file writes in Python")
8318 (description "Library for atomic file writes using platform dependent tools
8319 for atomic file system operations.")
8320 (home-page "https://github.com/untitaker/python-atomicwrites")
8321 (license license:expat)))
8322
8323 (define-public python2-atomicwrites
8324 (package-with-python2 python-atomicwrites))
8325
8326 (define-public python-click-threading
8327 (package
8328 (name "python-click-threading")
8329 (version "0.4.4")
8330 (source (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "click-threading" version))
8333 (sha256
8334 (base32
8335 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8336 (build-system python-build-system)
8337 (propagated-inputs
8338 `(("python-click" ,python-click)))
8339 (synopsis "Utilities for multithreading in Click")
8340 (description "This package provides utilities for multithreading in Click
8341 applications.")
8342 (home-page "https://github.com/click-contrib/click-threading")
8343 (license license:expat)))
8344
8345 (define-public python-click-log
8346 (package
8347 (name "python-click-log")
8348 (version "0.3.2")
8349 (source (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "click-log" version))
8352 (sha256
8353 (base32
8354 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8355 (build-system python-build-system)
8356 (propagated-inputs
8357 `(("python-click" ,python-click)))
8358 (synopsis "Logging for click applications")
8359 (description "This package provides a Python library for logging Click
8360 applications.")
8361 (home-page "https://github.com/click-contrib/click-log")
8362 (license license:expat)))
8363
8364 (define-public python-apipkg
8365 (package
8366 (name "python-apipkg")
8367 (version "1.4")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (pypi-uri "apipkg" version))
8371 (sha256
8372 (base32
8373 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8374 (build-system python-build-system)
8375 (native-inputs
8376 `(("python-pytest" ,python-pytest)))
8377 (synopsis "Namespace control and lazy-import mechanism")
8378 (description "With apipkg you can control the exported namespace of a Python
8379 package and greatly reduce the number of imports for your users. It is a small
8380 pure Python module that works on virtually all Python versions.")
8381 (home-page "https://github.com/pytest-dev/apipkg")
8382 (license license:expat)))
8383
8384 (define-public python2-apipkg
8385 (package-with-python2 python-apipkg))
8386
8387 (define-public python-execnet
8388 (package
8389 (name "python-execnet")
8390 (version "1.4.1")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "execnet" version))
8394 (sha256
8395 (base32
8396 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8397 (build-system python-build-system)
8398 (arguments
8399 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8400 ;; The two test failures are caused by the lack of an `ssh` executable.
8401 ;; The test suite can be run with pytest after the 'install' phase.
8402 #:tests? #f))
8403 (native-inputs
8404 `(("python-pytest" ,python-pytest)
8405 ("python-setuptools-scm" ,python-setuptools-scm)))
8406 (propagated-inputs
8407 `(("python-apipkg" ,python-apipkg)))
8408 (synopsis "Rapid multi-Python deployment")
8409 (description "Execnet provides a share-nothing model with
8410 channel-send/receive communication for distributing execution across many
8411 Python interpreters across version, platform and network barriers. It has a
8412 minimal and fast API targeting the following uses:
8413 @enumerate
8414 @item distribute tasks to (many) local or remote CPUs
8415 @item write and deploy hybrid multi-process applications
8416 @item write scripts to administer multiple environments
8417 @end enumerate")
8418 (home-page "http://codespeak.net/execnet/")
8419 (license license:expat)))
8420
8421 (define-public python2-execnet
8422 (package-with-python2 python-execnet))
8423
8424 (define-public python-icalendar
8425 (package
8426 (name "python-icalendar")
8427 (version "4.0.3")
8428 (source (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "icalendar" version))
8431 (sha256
8432 (base32
8433 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8434 (build-system python-build-system)
8435 (propagated-inputs
8436 `(("python-dateutil" ,python-dateutil)
8437 ("python-pytz" ,python-pytz)))
8438 (synopsis "Python library for parsing iCalendar files")
8439 (description "The icalendar package is a parser/generator of iCalendar
8440 files for use with Python.")
8441 (home-page "https://github.com/collective/icalendar")
8442 (license license:bsd-2)))
8443
8444 (define-public python-args
8445 (package
8446 (name "python-args")
8447 (version "0.1.0")
8448 (source (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "args" version))
8451 (sha256
8452 (base32
8453 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8454 (build-system python-build-system)
8455 (home-page "https://github.com/kennethreitz/args")
8456 (synopsis "Command-line argument parser")
8457 (description
8458 "This library provides a Python module to parse command-line arguments.")
8459 (license license:bsd-3)))
8460
8461 (define-public python2-args
8462 (package-with-python2 python-args))
8463
8464 (define-public python-clint
8465 (package
8466 (name "python-clint")
8467 (version "0.5.1")
8468 (source (origin
8469 (method url-fetch)
8470 (uri (pypi-uri "clint" version))
8471 (sha256
8472 (base32
8473 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8474 (build-system python-build-system)
8475 (arguments
8476 '(#:phases
8477 (modify-phases %standard-phases
8478 (replace 'check
8479 (lambda _ (invoke "py.test" "-v"))))))
8480 (native-inputs
8481 `(("python-pytest" ,python-pytest)))
8482 (propagated-inputs
8483 `(("python-args" ,python-args)))
8484 (home-page "https://github.com/kennethreitz/clint")
8485 (synopsis "Command-line interface tools")
8486 (description
8487 "Clint is a Python module filled with a set of tools for developing
8488 command-line applications, including tools for colored and indented
8489 output, progress bar display, and pipes.")
8490 (license license:isc)))
8491
8492 (define-public python2-clint
8493 (package-with-python2 python-clint))
8494
8495 (define-public python-rply
8496 (package
8497 (name "python-rply")
8498 (version "0.7.5")
8499 (source (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "rply" version))
8502 (sha256
8503 (base32
8504 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8505 (build-system python-build-system)
8506 (propagated-inputs
8507 `(("python-appdirs" ,python-appdirs)))
8508 (home-page "https://github.com/alex/rply")
8509 (synopsis "Parser generator for Python")
8510 (description
8511 "This package provides a pure Python based parser generator, that also
8512 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8513 with a new public API, and RPython support.")
8514 (license license:bsd-3)))
8515
8516 (define-public python2-rply
8517 (package-with-python2 python-rply))
8518
8519 (define-public python-hy
8520 (package
8521 (name "python-hy")
8522 (version "0.13.0")
8523 (source (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "hy" version))
8526 (sha256
8527 (base32
8528 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8529 (build-system python-build-system)
8530 (arguments
8531 '(#:phases
8532 (modify-phases %standard-phases
8533 (replace 'check
8534 (lambda _
8535 ;; Tests require write access to HOME.
8536 (setenv "HOME" "/tmp")
8537 (invoke "nosetests"))))))
8538 (native-inputs
8539 `(("python-coverage" ,python-coverage)
8540 ("python-nose" ,python-nose)))
8541 (propagated-inputs
8542 `(("python-astor" ,python-astor)
8543 ("python-clint" ,python-clint)
8544 ("python-rply" ,python-rply)))
8545 (home-page "http://hylang.org/")
8546 (synopsis "Lisp frontend to Python")
8547 (description
8548 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8549 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8550 Python at your fingertips, in Lisp form.")
8551 (license license:expat)))
8552
8553 (define-public python2-hy
8554 (package-with-python2 python-hy))
8555
8556 (define-public python2-functools32
8557 (package
8558 (name "python2-functools32")
8559 (version "3.2.3-2")
8560 (source
8561 (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "functools32" version))
8564 (sha256
8565 (base32
8566 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8567 (build-system python-build-system)
8568 (arguments
8569 `(#:python ,python-2
8570 #:tests? #f)) ; no test target
8571 (home-page "https://github.com/MiCHiLU/python-functools32")
8572 (synopsis
8573 "Backport of the functools module from Python 3.2.3")
8574 (description
8575 "This package is a backport of the @code{functools} module from Python
8576 3.2.3 for use with older versions of Python and PyPy.")
8577 (license license:expat)))
8578
8579 (define-public python2-subprocess32
8580 (package
8581 (name "python2-subprocess32")
8582 (version "3.2.7")
8583 (source (origin
8584 (method url-fetch)
8585 (uri (pypi-uri "subprocess32" version))
8586 (sha256
8587 (base32
8588 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8589 (patches
8590 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8591 (build-system python-build-system)
8592 (arguments
8593 `(#:python ,python-2
8594 ;; The test suite fails with Python > 2.7.13:
8595 ;; import test.support
8596 ;; ImportError: No module named support
8597 #:tests? #f
8598 #:phases
8599 (modify-phases %standard-phases
8600 (add-after 'unpack 'patch-/bin/sh
8601 (lambda _
8602 (substitute* '("subprocess32.py"
8603 "test_subprocess32.py")
8604 (("/bin/sh") (which "sh")))
8605 #t)))))
8606 (home-page "https://github.com/google/python-subprocess32")
8607 (synopsis "Backport of the subprocess module from Python 3.2")
8608 (description
8609 "This is a backport of the @code{subprocess} standard library module
8610 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8611 new features. On POSIX systems it is guaranteed to be reliable when used
8612 in threaded applications. It includes timeout support from Python 3.3 but
8613 otherwise matches 3.2’s API.")
8614 (license license:psfl)))
8615
8616 (define-public python2-futures
8617 (package
8618 (name "python2-futures")
8619 (version "3.2.0")
8620 (source
8621 (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "futures" version))
8624 (sha256
8625 (base32
8626 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8627 (build-system python-build-system)
8628 (arguments
8629 `(#:python ,python-2
8630 #:phases
8631 (modify-phases %standard-phases
8632 (replace 'check
8633 (lambda _
8634 (invoke "python" "test_futures.py")
8635 #t)))))
8636 (home-page "https://github.com/agronholm/pythonfutures")
8637 (synopsis
8638 "Backport of the concurrent.futures package from Python 3.2")
8639 (description
8640 "The concurrent.futures module provides a high-level interface for
8641 asynchronously executing callables. This package backports the
8642 concurrent.futures package from Python 3.2")
8643 (license license:bsd-3)))
8644
8645 (define-public python-promise
8646 (package
8647 (name "python-promise")
8648 (version "0.4.2")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "promise" version))
8653 (sha256
8654 (base32
8655 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8656 (build-system python-build-system)
8657 ;; Tests wants python-futures, which is a python2 only program, and
8658 ;; can't be found by python-promise at test time.
8659 (arguments `(#:tests? #f))
8660 (home-page "https://github.com/syrusakbary/promise")
8661 (synopsis "Promises/A+ implementation for Python")
8662 (description
8663 "Promises/A+ implementation for Python")
8664 (properties `((python2-variant . ,(delay python2-promise))))
8665 (license license:expat)))
8666
8667 (define-public python2-promise
8668 (let ((promise (package-with-python2
8669 (strip-python2-variant python-promise))))
8670 (package (inherit promise)
8671 (arguments (substitute-keyword-arguments (package-arguments promise)
8672 ((#:tests? _) #t)))
8673 (native-inputs
8674 `(("python2-futures" ,python2-futures)
8675 ("python2-pytest" ,python2-pytest)
8676 ,@(package-native-inputs promise))))))
8677
8678 (define-public python-progressbar33
8679 (package
8680 (name "python-progressbar33")
8681 (version "2.4")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "progressbar33" version))
8686 (sha256
8687 (base32
8688 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8689 (build-system python-build-system)
8690 (home-page "http://github.com/germangh/python-progressbar")
8691 (synopsis "Text progress bar library for Python")
8692 (description
8693 "This package provides a text progress bar library for Python. This
8694 version only differs from the original @code{progressbar} package in that it
8695 uses relative package imports instead of absolute imports, which is necessary
8696 for the module to work under Python 3.3.")
8697 ;; Either or both of these licenses may be selected.
8698 (license (list license:lgpl2.1+ license:bsd-3))))
8699
8700 (define-public python-colorama
8701 (package
8702 (name "python-colorama")
8703 (version "0.3.9")
8704 (source
8705 (origin
8706 (method url-fetch)
8707 (uri (pypi-uri "colorama" version))
8708 (sha256
8709 (base32
8710 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8711 (build-system python-build-system)
8712 (synopsis "Colored terminal text rendering for Python")
8713 (description "Colorama is a Python library for rendering colored terminal
8714 text.")
8715 (home-page "https://pypi.python.org/pypi/colorama")
8716 (license license:bsd-3)))
8717
8718 (define-public python2-colorama
8719 (package-with-python2 python-colorama))
8720
8721 (define-public python-rsa
8722 (package
8723 (name "python-rsa")
8724 (version "3.4.2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "rsa" version))
8729 (sha256
8730 (base32
8731 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8732 (build-system python-build-system)
8733 (propagated-inputs
8734 `(("python-pyasn1" ,python-pyasn1)))
8735 (synopsis "Pure-Python RSA implementation")
8736 (description "Python-RSA is a pure-Python RSA implementation. It supports
8737 encryption and decryption, signing and verifying signatures, and key
8738 generation according to PKCS#1 version 1.5. It can be used as a Python
8739 library as well as on the command line.")
8740 (home-page "https://stuvel.eu/rsa")
8741 (license license:asl2.0)))
8742
8743 (define-public python2-rsa
8744 (package-with-python2 python-rsa))
8745
8746 (define-public python-pluggy
8747 (package
8748 (name "python-pluggy")
8749 (version "0.11.0")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "pluggy" version))
8754 (sha256
8755 (base32
8756 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8757 (build-system python-build-system)
8758 (native-inputs
8759 `(("python-setuptools-scm" ,python-setuptools-scm)))
8760 (synopsis "Plugin and hook calling mechanism for Python")
8761 (description "Pluggy is an extraction of the plugin manager as used by
8762 Pytest but stripped of Pytest specific details.")
8763 (home-page "https://pypi.python.org/pypi/pluggy")
8764 (license license:expat)))
8765
8766 (define-public python2-pluggy
8767 (package-with-python2 python-pluggy))
8768
8769 (define-public python-tox
8770 (package
8771 (name "python-tox")
8772 (version "2.8.1")
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "tox" version))
8777 (sha256
8778 (base32
8779 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8780 (build-system python-build-system)
8781 (arguments
8782 ;; FIXME: Tests require pytest-timeout, which itself requires
8783 ;; pytest>=2.8.0 for installation.
8784 '(#:tests? #f))
8785 (propagated-inputs
8786 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8787 ("python-py" ,python-py)
8788 ("python-virtualenv" ,python-virtualenv)))
8789 (native-inputs
8790 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8791 ("python-pytest" ,python-pytest) ; >= 2.3.5
8792 ("python-setuptools-scm" ,python-setuptools-scm)))
8793 (home-page "http://tox.testrun.org/")
8794 (synopsis "Virtualenv-based automation of test activities")
8795 (description "Tox is a generic virtualenv management and test command line
8796 tool. It can be used to check that a package installs correctly with
8797 different Python versions and interpreters, or run tests in each type of
8798 supported environment, or act as a frontend to continuous integration
8799 servers.")
8800 (license license:expat)))
8801
8802 (define-public python2-tox
8803 (package-with-python2 python-tox))
8804
8805 (define-public python-jmespath
8806 (package
8807 (name "python-jmespath")
8808 (version "0.9.3")
8809 (source
8810 (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "jmespath" version))
8813 (sha256
8814 (base32
8815 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8816 (build-system python-build-system)
8817 (native-inputs
8818 `(("python-nose" ,python-nose)))
8819 (synopsis "JSON Matching Expressions")
8820 (description "JMESPath (pronounced “james path”) is a Python library that
8821 allows one to declaratively specify how to extract elements from a JSON
8822 document.")
8823 (home-page "https://github.com/jmespath/jmespath.py")
8824 (license license:expat)))
8825
8826 (define-public python2-jmespath
8827 (package-with-python2 python-jmespath))
8828
8829 (define-public python-botocore
8830 (package
8831 (name "python-botocore")
8832 (version "1.12.149")
8833 (source
8834 (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "botocore" version))
8837 (sha256
8838 (base32
8839 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8840 (build-system python-build-system)
8841 (arguments
8842 ;; FIXME: Many tests are failing.
8843 '(#:tests? #f))
8844 (propagated-inputs
8845 `(("python-dateutil" ,python-dateutil)
8846 ("python-docutils" ,python-docutils)
8847 ("python-jmespath" ,python-jmespath)))
8848 (native-inputs
8849 `(("python-mock" ,python-mock)
8850 ("python-nose" ,python-nose)
8851 ("behave" ,behave)
8852 ("python-tox" ,python-tox)
8853 ("python-urllib3" ,python-urllib3)
8854 ("python-wheel" ,python-wheel)))
8855 (home-page "https://github.com/boto/botocore")
8856 (synopsis "Low-level interface to AWS")
8857 (description "Botocore is a Python library that provides a low-level
8858 interface to the Amazon Web Services (AWS) API.")
8859 (license license:asl2.0)))
8860
8861 (define-public python2-botocore
8862 (package-with-python2 python-botocore))
8863
8864 (define-public python-xdo
8865 (package
8866 (name "python-xdo")
8867 (version "0.3")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (string-append
8871 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8872 "python-xdo_" version ".orig.tar.gz"))
8873 (sha256
8874 (base32
8875 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8876 (build-system python-build-system)
8877 (arguments
8878 '(#:phases
8879 (modify-phases %standard-phases
8880 (add-before 'install 'patch-libxdo-path
8881 ;; Hardcode the path of dynamically loaded libxdo library.
8882 (lambda* (#:key inputs #:allow-other-keys)
8883 (let ((libxdo (string-append
8884 (assoc-ref inputs "xdotool")
8885 "/lib/libxdo.so")))
8886 (substitute* "xdo/_xdo.py"
8887 (("find_library\\(\"xdo\"\\)")
8888 (simple-format #f "\"~a\"" libxdo)))
8889 #t))))
8890 #:tests? #f)) ; no tests provided
8891 (propagated-inputs
8892 `(("python-six" ,python-six)))
8893 (inputs
8894 `(("xdotool" ,xdotool)
8895 ("libX11" ,libx11)))
8896 (home-page "https://tracker.debian.org/pkg/python-xdo")
8897 (synopsis "Python library for simulating X11 keyboard/mouse input")
8898 (description "Provides bindings to libxdo for manipulating X11 via simulated
8899 input. (Note that this is mostly a legacy library; you may wish to look at
8900 python-xdo for newer bindings.)")
8901 (license license:bsd-3)))
8902
8903 (define-public python2-xdo
8904 (package-with-python2 python-xdo))
8905
8906 (define-public python-mako
8907 (package
8908 (name "python-mako")
8909 (version "1.1.0")
8910 (source
8911 (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "Mako" version))
8914 (sha256
8915 (base32
8916 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8917 (build-system python-build-system)
8918 (arguments
8919 `(#:phases (modify-phases %standard-phases
8920 (replace 'check
8921 (lambda _
8922 (invoke "pytest" "-vv"))))))
8923 (propagated-inputs
8924 `(("python-markupsafe" ,python-markupsafe)))
8925 (native-inputs
8926 `(("python-mock" ,python-mock)
8927 ("python-pytest" ,python-pytest)))
8928 (home-page "https://www.makotemplates.org/")
8929 (synopsis "Templating language for Python")
8930 (description "Mako is a templating language for Python that compiles
8931 templates into Python modules.")
8932 (license license:expat)))
8933
8934 (define-public python2-mako
8935 (package-with-python2 python-mako))
8936
8937 (define-public python-waitress
8938 (package
8939 (name "python-waitress")
8940 (version "1.1.0")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "waitress" version))
8945 (patches (search-patches "python-waitress-fix-tests.patch"))
8946 (sha256
8947 (base32
8948 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8949 (build-system python-build-system)
8950 (home-page "https://github.com/Pylons/waitress")
8951 (synopsis "Waitress WSGI server")
8952 (description "Waitress is meant to be a production-quality pure-Python WSGI
8953 server with very acceptable performance.")
8954 (license license:zpl2.1)))
8955
8956 (define-public python2-waitress
8957 (package-with-python2 python-waitress))
8958
8959 (define-public python-pyquery
8960 (package
8961 (name "python-pyquery")
8962 (version "1.2.17")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "pyquery" version))
8967 (sha256
8968 (base32
8969 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8970 (build-system python-build-system)
8971 (native-inputs
8972 `(("python-webob" ,python-webob)
8973 ("python-webtest" ,python-webtest)))
8974 (propagated-inputs
8975 `(("python-lxml" ,python-lxml)
8976 ("python-cssselect" ,python-cssselect)))
8977 (home-page "https://github.com/gawel/pyquery")
8978 (synopsis "Make jQuery-like queries on xml documents")
8979 (description "pyquery allows you to make jQuery queries on xml documents.
8980 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8981 fast xml and html manipulation.")
8982 (license license:bsd-3)))
8983
8984 (define-public python-anyjson
8985 (package
8986 (name "python-anyjson")
8987 (version "0.3.3")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "anyjson" version))
8992 (sha256
8993 (base32
8994 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8995 (build-system python-build-system)
8996 (arguments
8997 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8998 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8999 ;; whatever) so this transformation needs to be done before the tests
9000 ;; can be run. Maybe we could add a build step to transform beforehand
9001 ;; but it could be annoying/difficult.
9002 ;; We can enable tests for the Python 2 version, though, and do below.
9003 #:tests? #f))
9004 (home-page "https://bitbucket.org/runeh/anyjson/")
9005 (synopsis
9006 "Wraps best available JSON implementation in a common interface")
9007 (description
9008 "Anyjson loads whichever is the fastest JSON module installed
9009 and provides a uniform API regardless of which JSON implementation is used.")
9010 (license license:bsd-3)
9011 (properties `((python2-variant . ,(delay python2-anyjson))))))
9012
9013 (define-public python2-anyjson
9014 (let ((anyjson (package-with-python2
9015 (strip-python2-variant python-anyjson))))
9016 (package
9017 (inherit anyjson)
9018 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9019 #:tests? #t
9020 ,@(package-arguments anyjson)))
9021 (native-inputs `(("python2-nose" ,python2-nose))))))
9022
9023 (define-public python-amqp
9024 (package
9025 (name "python-amqp")
9026 (version "2.3.2")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "amqp" version))
9031 (sha256
9032 (base32
9033 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9034 (build-system python-build-system)
9035 (native-inputs
9036 `(("python-case" ,python-case)
9037 ("python-pytest-sugar" ,python-pytest-sugar)
9038 ("python-mock" ,python-mock)))
9039 (propagated-inputs
9040 `(("python-vine" ,python-vine)))
9041 (home-page "https://github.com/celery/py-amqp")
9042 (synopsis
9043 "Low-level AMQP client for Python (fork of amqplib)")
9044 (description
9045 "This is a fork of amqplib which was originally written by Barry Pederson.
9046 It is maintained by the Celery project, and used by kombu as a pure python
9047 alternative when librabbitmq is not available.")
9048 (license license:lgpl2.1+)
9049 (properties `((python2-variant . ,(delay python2-amqp))))))
9050
9051 (define-public python2-amqp
9052 (let ((amqp (package-with-python2
9053 (strip-python2-variant python-amqp))))
9054 (package
9055 (inherit amqp)
9056 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9057 ;; unmaintained. Weirdly, does not do this on the python 3
9058 ;; version?
9059 #:tests? #f
9060 ,@(package-arguments amqp))))))
9061
9062 (define-public python-txamqp
9063 (package
9064 (name "python-txamqp")
9065 (version "0.8.2")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (pypi-uri "txAMQP" version))
9070 (sha256
9071 (base32
9072 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9073 (build-system python-build-system)
9074 (propagated-inputs
9075 `(("python-six" ,python-six)
9076 ("python-twisted" ,python-twisted)))
9077 (home-page "https://github.com/txamqp/txamqp")
9078 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9079 (description
9080 "This package provides a Python library for communicating with AMQP peers
9081 and brokers using the asynchronous networking framework Twisted. It contains
9082 all the necessary code to connect, send and receive messages to/from an
9083 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9084 also includes support for using Thrift RPC over AMQP in Twisted
9085 applications.")
9086 (license license:asl2.0)))
9087
9088 (define-public python2-txamqp
9089 (package-with-python2 python-txamqp))
9090
9091 (define-public python-kombu
9092 (package
9093 (name "python-kombu")
9094 (version "4.2.2")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "kombu" version))
9099 (sha256
9100 (base32
9101 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9102 (build-system python-build-system)
9103 (native-inputs
9104 `(("python-mock" ,python-mock)
9105 ("python-case" ,python-case)
9106 ("python-pyro4" ,python-pyro4)
9107 ("python-pytest-sugar" ,python-pytest-sugar)
9108 ("python-pytz" ,python-pytz)))
9109 (propagated-inputs
9110 `(("python-anyjson" ,python-anyjson)
9111 ("python-amqp" ,python-amqp)
9112 ("python-redis" ,python-redis)))
9113 (home-page "https://kombu.readthedocs.io")
9114 (synopsis "Message passing library for Python")
9115 (description "The aim of Kombu is to make messaging in Python as easy as
9116 possible by providing an idiomatic high-level interface for the AMQ protocol,
9117 and also provide proven and tested solutions to common messaging problems.
9118 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9119 message orientation, queuing, routing, reliability and security, for which the
9120 RabbitMQ messaging server is the most popular implementation.")
9121 (license license:bsd-3)
9122 (properties `((python2-variant . ,(delay python2-kombu))))))
9123
9124 (define-public python2-kombu
9125 (let ((kombu (package-with-python2
9126 (strip-python2-variant python-kombu))))
9127 (package
9128 (inherit kombu)
9129 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9130 ;; It works fine on the python3 variant.
9131 #:tests? #f
9132 ,@(package-arguments kombu)))
9133 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9134 ,@(package-native-inputs kombu))))))
9135
9136 (define-public python-billiard
9137 (package
9138 (name "python-billiard")
9139 (version "3.5.0.5")
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "billiard" version))
9144 (sha256
9145 (base32
9146 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9147 (build-system python-build-system)
9148 (native-inputs
9149 `(("python-case" ,python-case)
9150 ("python-pytest" ,python-pytest)))
9151 (home-page "https://github.com/celery/billiard")
9152 (synopsis
9153 "Python multiprocessing fork with improvements and bugfixes")
9154 (description
9155 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9156 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9157 pyprocessing package. This standalone variant is intended to be compatible with
9158 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9159 (license license:bsd-3)
9160 (properties `((python2-variant . ,(delay python2-billiard))))))
9161
9162 (define-public python2-billiard
9163 (let ((billiard (package-with-python2
9164 (strip-python2-variant python-billiard))))
9165 (package
9166 (inherit billiard)
9167 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9168 ("python2-mock" ,python2-mock)
9169 ,@(package-native-inputs billiard))))))
9170
9171 (define-public python-celery
9172 (package
9173 (name "python-celery")
9174 (version "4.2.1")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "celery" version))
9179 (sha256
9180 (base32
9181 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9182 (build-system python-build-system)
9183 (arguments
9184 '(;; TODO The tests fail with Python 3.7
9185 ;; https://github.com/celery/celery/issues/4849
9186 #:tests? #f
9187 #:phases
9188 (modify-phases %standard-phases
9189 (add-after 'unpack 'patch-requirements
9190 (lambda _
9191 (substitute* "requirements/test.txt"
9192 (("pytest>=3\\.0,<3\\.3")
9193 "pytest>=3.0"))
9194 #t)))))
9195 (native-inputs
9196 `(("python-case" ,python-case)
9197 ("python-pytest" ,python-pytest)))
9198 (propagated-inputs
9199 `(("python-pytz" ,python-pytz)
9200 ("python-billiard" ,python-billiard)
9201 ("python-kombu" ,python-kombu)))
9202 (home-page "https://celeryproject.org")
9203 (synopsis "Distributed Task Queue")
9204 (description "Celery is an asynchronous task queue/job queue based on
9205 distributed message passing. It is focused on real-time operation, but
9206 supports scheduling as well. The execution units, called tasks, are executed
9207 concurrently on a single or more worker servers using multiprocessing,
9208 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9209 synchronously (wait until ready).")
9210 (license license:bsd-3)
9211 (properties `((python2-variant . ,(delay python2-celery))))))
9212
9213 (define-public python2-celery
9214 (let ((celery (package-with-python2
9215 (strip-python2-variant python-celery))))
9216 (package
9217 (inherit celery)
9218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9219 ("python2-mock" ,python2-mock)
9220 ,@(package-native-inputs celery))))))
9221
9222 (define-public python-translitcodec
9223 (package
9224 (name "python-translitcodec")
9225 (version "0.4.0")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "translitcodec" version))
9230 (sha256
9231 (base32
9232 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9233 (build-system python-build-system)
9234 (arguments
9235 `(#:tests? #f)) ; no tests provided
9236 (home-page
9237 "https://github.com/claudep/translitcodec")
9238 (synopsis
9239 "Unicode to 8-bit charset transliteration codec")
9240 (description
9241 "This package contains codecs for transliterating ISO 10646 texts into
9242 best-effort representations using smaller coded character sets (ASCII,
9243 ISO 8859, etc.).")
9244 (license license:expat)))
9245
9246 (define-public python2-translitcodec
9247 (package-with-python2 python-translitcodec))
9248
9249 (define-public python-editor
9250 (package
9251 (name "python-editor")
9252 (version "0.5")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "python-editor" version))
9257 (sha256
9258 (base32
9259 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9260 (build-system python-build-system)
9261 (home-page
9262 "https://github.com/fmoo/python-editor")
9263 (synopsis
9264 "Programmatically open an editor, capture the result")
9265 (description
9266 "python-editor is a library that provides the editor module for
9267 programmatically interfacing with your system's $EDITOR.")
9268 (license license:asl2.0)))
9269
9270 (define-public python2-editor
9271 (package-with-python2 python-editor))
9272
9273 (define-public python-vobject
9274 (package
9275 (name "python-vobject")
9276 (version "0.9.5")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "vobject" version))
9280 (sha256
9281 (base32
9282 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9283 (build-system python-build-system)
9284 (arguments
9285 '(;; The test suite relies on some non-portable Windows interfaces.
9286 #:tests? #f))
9287 (propagated-inputs
9288 `(("python-dateutil" ,python-dateutil)
9289 ("python-pyicu" ,python-pyicu)))
9290 (synopsis "Parse and generate vCard and vCalendar files")
9291 (description "Vobject is intended to be a full featured Python package for
9292 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9293 are supported and well tested. vCard 3.0 files are supported, and all data
9294 should be imported, but only a few components are understood in a sophisticated
9295 way.")
9296 (home-page "http://eventable.github.io/vobject/")
9297 (license license:asl2.0)))
9298
9299 (define-public python2-vobject
9300 (package-with-python2 python-vobject))
9301
9302 (define-public python-munkres
9303 (package
9304 (name "python-munkres")
9305 (version "1.0.8")
9306 (source (origin
9307 (method url-fetch)
9308 (uri (pypi-uri "munkres" version))
9309 (sha256
9310 (base32
9311 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9312 (build-system python-build-system)
9313 (arguments
9314 '(#:tests? #f)) ; no test suite
9315 (home-page "http://software.clapper.org/munkres/")
9316 (synopsis "Implementation of the Munkres algorithm")
9317 (description "The Munkres module provides an implementation of the Munkres
9318 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9319 useful for solving the Assignment Problem.")
9320 (license license:bsd-3)))
9321
9322 (define-public python2-munkres
9323 (package-with-python2 python-munkres))
9324
9325 (define-public python-whoosh
9326 (package
9327 (name "python-whoosh")
9328 (version "2.7.4")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "Whoosh" version))
9333 (sha256
9334 (base32
9335 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9336 (build-system python-build-system)
9337 (native-inputs
9338 `(("python-pytest" ,python-pytest)))
9339 (home-page "https://bitbucket.org/mchaput/whoosh")
9340 (synopsis "Full text indexing, search, and spell checking library")
9341 (description
9342 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9343 checking library.")
9344 (license license:bsd-2)))
9345
9346 (define-public python2-whoosh
9347 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9348 (package (inherit whoosh)
9349 (propagated-inputs
9350 `(("python2-backport-ssl-match-hostname"
9351 ,python2-backport-ssl-match-hostname)
9352 ,@(package-propagated-inputs whoosh))))))
9353
9354 (define-public python-pathlib
9355 (package
9356 (name "python-pathlib")
9357 (version "1.0.1")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "pathlib" version))
9361 (sha256
9362 (base32
9363 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9364 (build-system python-build-system)
9365 ;; The tests depend on the internal "test" module, which does not provide
9366 ;; a stable interface.
9367 (arguments `(#:tests? #f))
9368 (home-page "https://pathlib.readthedocs.org/")
9369 (synopsis "Object-oriented file system paths")
9370 (description "Pathlib offers a set of classes to handle file system paths.
9371 It offers the following advantages over using string objects:
9372
9373 @enumerate
9374 @item No more cumbersome use of os and os.path functions. Everything can
9375 be done easily through operators, attribute accesses, and method calls.
9376 @item Embodies the semantics of different path types. For example,
9377 comparing Windows paths ignores casing.
9378 @item Well-defined semantics, eliminating any inconsistencies or
9379 ambiguities (forward vs. backward slashes, etc.).
9380 @end enumerate
9381
9382 Note: In Python 3.4, pathlib is now part of the standard library. For other
9383 Python versions please consider python-pathlib2 instead, which tracks the
9384 standard library module. This module (python-pathlib) isn't maintained
9385 anymore.")
9386 (license license:expat)))
9387
9388 (define-public python2-pathlib
9389 (package-with-python2 python-pathlib))
9390
9391 (define-public python2-pathlib2
9392 (package
9393 (name "python2-pathlib2")
9394 (version "2.3.3")
9395 (source (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "pathlib2" version))
9398 (sha256
9399 (base32
9400 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9401 (build-system python-build-system)
9402 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9403 ;; version is 3.4 which already includes this package as part of the
9404 ;; standard library.
9405 (arguments
9406 `(#:python ,python-2))
9407 (propagated-inputs
9408 `(("python2-scandir" ,python2-scandir)
9409 ("python2-six" ,python2-six)))
9410 (home-page "https://pypi.python.org/pypi/pathlib2/")
9411 (synopsis "Object-oriented file system paths - backport of standard
9412 pathlib module")
9413 (description "The goal of pathlib2 is to provide a backport of standard
9414 pathlib module which tracks the standard library module, so all the newest
9415 features of the standard pathlib can be used also on older Python versions.
9416
9417 Pathlib offers a set of classes to handle file system paths. It offers the
9418 following advantages over using string objects:
9419
9420 @enumerate
9421 @item No more cumbersome use of os and os.path functions. Everything can
9422 be done easily through operators, attribute accesses, and method calls.
9423 @item Embodies the semantics of different path types. For example,
9424 comparing Windows paths ignores casing.
9425 @item Well-defined semantics, eliminating any inconsistencies or
9426 ambiguities (forward vs. backward slashes, etc.).
9427 @end enumerate")
9428 (license license:expat)))
9429
9430 (define-public python2-pathlib2-bootstrap
9431 (hidden-package
9432 (package
9433 (inherit python2-pathlib2)
9434 (name "python2-pathlib2-bootstrap")
9435 (propagated-inputs
9436 `(("python2-scandir" ,python2-scandir)
9437 ("python2-six" ,python2-six-bootstrap))))))
9438
9439 (define-public python-jellyfish
9440 (package
9441 (name "python-jellyfish")
9442 (version "0.5.6")
9443 (source (origin
9444 (method url-fetch)
9445 (uri (pypi-uri "jellyfish" version))
9446 (sha256
9447 (base32
9448 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9449 (build-system python-build-system)
9450 (native-inputs
9451 `(("python-pytest" ,python-pytest)))
9452 (home-page "https://github.com/jamesturk/jellyfish")
9453 (synopsis "Approximate and phonetic matching of strings")
9454 (description "Jellyfish uses a variety of string comparison and phonetic
9455 encoding algorithms to do fuzzy string matching.")
9456 (license license:bsd-2)
9457 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9458
9459 (define-public python2-jellyfish
9460 (let ((jellyfish (package-with-python2
9461 (strip-python2-variant python-jellyfish))))
9462 (package (inherit jellyfish)
9463 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9464 ,@(package-native-inputs jellyfish))))))
9465
9466 (define-public python2-unicodecsv
9467 (package
9468 (name "python2-unicodecsv")
9469 (version "0.14.1")
9470 (source (origin
9471 (method url-fetch)
9472 ;; The test suite is not included in the PyPi release.
9473 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9474 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9475 "archive/" version ".tar.gz"))
9476 (file-name (string-append name "-" version ".tar.gz"))
9477 (sha256
9478 (base32
9479 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9480 (build-system python-build-system)
9481 (arguments
9482 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9483 #:python ,python-2))
9484 (native-inputs
9485 `(("python2-unittest2" ,python2-unittest2)))
9486 (home-page "https://github.com/jdunck/python-unicodecsv")
9487 (synopsis "Unicode CSV module for Python 2")
9488 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9489 module, adding support for Unicode strings.")
9490 (license license:bsd-2)))
9491
9492 (define-public python-rarfile
9493 (package
9494 (name "python-rarfile")
9495 (version "2.8")
9496 (source (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "rarfile" version))
9499 (sha256
9500 (base32
9501 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9502 (build-system python-build-system)
9503 (arguments
9504 '(#:phases
9505 (modify-phases %standard-phases
9506 (replace 'check
9507 ;; Many tests fail, but the installation proceeds.
9508 (lambda _ (invoke "make" "-C" "test" "test"))))))
9509 (native-inputs
9510 `(("which" ,which))) ; required for tests
9511 (propagated-inputs
9512 `(("libarchive" ,libarchive)))
9513 (home-page "https://github.com/markokr/rarfile")
9514 (synopsis "RAR archive reader for Python")
9515 (description "This is Python module for RAR archive reading. The interface
9516 is made as zipfile like as possible.")
9517 (license license:isc)))
9518
9519 (define-public python2-rarfile
9520 (package-with-python2 python-rarfile))
9521
9522 (define-public python-magic
9523 (package
9524 (name "python-magic")
9525 (version "0.4.15")
9526 (source
9527 (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "python-magic" version))
9530 (sha256
9531 (base32
9532 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9533 (file-name (string-append name "-" version "-checkout"))))
9534 (build-system python-build-system)
9535 (arguments
9536 ;; The tests are unreliable, so don't run them. The tests fail
9537 ;; under Python3 because they were written for Python2 and
9538 ;; contain import statements that do not work in Python3. One of
9539 ;; the tests fails under Python2 because its assertions are
9540 ;; overly stringent; it relies on comparing output strings which
9541 ;; are brittle and can change depending on the version of
9542 ;; libmagic being used and the system on which the test is
9543 ;; running. In my case, under GuixSD 0.10.0, only one test
9544 ;; failed, and it seems to have failed only because the version
9545 ;; of libmagic that is packaged in Guix outputs a slightly
9546 ;; different (but not wrong) string than the one that the test
9547 ;; expected.
9548 '(#:tests? #f
9549 #:phases (modify-phases %standard-phases
9550 ;; Replace a specific method call with a hard-coded
9551 ;; path to the necessary libmagic.so file in the
9552 ;; store. If we don't do this, then the method call
9553 ;; will fail to find the libmagic.so file, which in
9554 ;; turn will cause any application using
9555 ;; python-magic to fail.
9556 (add-before 'build 'hard-code-path-to-libmagic
9557 (lambda* (#:key inputs #:allow-other-keys)
9558 (let ((file (assoc-ref inputs "file")))
9559 (substitute* "magic.py"
9560 (("ctypes.util.find_library\\('magic'\\)")
9561 (string-append "'" file "/lib/libmagic.so'")))
9562 #t)))
9563 (add-before 'install 'disable-egg-compression
9564 (lambda _
9565 (let ((port (open-file "setup.cfg" "a")))
9566 (display "\n[easy_install]\nzip_ok = 0\n"
9567 port)
9568 (close-port port)
9569 #t))))))
9570 (inputs
9571 ;; python-magic needs to be able to find libmagic.so.
9572 `(("file" ,file)))
9573 (home-page
9574 "https://github.com/ahupp/python-magic")
9575 (synopsis
9576 "File type identification using libmagic")
9577 (description
9578 "This module uses ctypes to access the libmagic file type
9579 identification library. It makes use of the local magic database and
9580 supports both textual and MIME-type output. Note that this module and
9581 the python-file module both provide a \"magic.py\" file; these two
9582 modules, which are different and were developed separately, both serve
9583 the same purpose: to provide Python bindings for libmagic.")
9584 (license license:expat)))
9585
9586 (define-public python2-magic
9587 (package-with-python2 python-magic))
9588
9589 (define-public python2-s3cmd
9590 (package
9591 (name "python2-s3cmd")
9592 (version "1.6.1")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9597 "s3cmd-" version ".tar.gz"))
9598 (sha256
9599 (base32
9600 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9601 (build-system python-build-system)
9602 (arguments
9603 ;; s3cmd is written for python2 only and contains no tests.
9604 `(#:python ,python-2
9605 #:tests? #f))
9606 (propagated-inputs
9607 `(("python2-dateutil" ,python2-dateutil)
9608 ;; The python-file package also provides a magic.py module.
9609 ;; This is an unfortunate state of affairs; however, s3cmd
9610 ;; fails to install if it cannot find specifically the
9611 ;; python-magic package. Thus we include it, instead of using
9612 ;; python-file. Ironically, s3cmd sometimes works better
9613 ;; without libmagic bindings at all:
9614 ;; https://github.com/s3tools/s3cmd/issues/198
9615 ("python2-magic" ,python2-magic)))
9616 (home-page "http://s3tools.org/s3cmd")
9617 (synopsis "Command line tool for S3-compatible storage services")
9618 (description
9619 "S3cmd is a command line tool for uploading, retrieving and managing data
9620 in storage services that are compatible with the Amazon Simple Storage
9621 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9622 GnuPG encryption, and more. It also supports management of Amazon's
9623 CloudFront content delivery network.")
9624 (license license:gpl2+)))
9625
9626 (define-public python-pkgconfig
9627 (package
9628 (name "python-pkgconfig")
9629 (version "1.3.1")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "pkgconfig" version))
9634 (sha256
9635 (base32
9636 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9637 (build-system python-build-system)
9638 (native-inputs
9639 `(("python-nose" ,python-nose)))
9640 (inputs
9641 `(("pkg-config" ,pkg-config)))
9642 (arguments
9643 `(#:phases
9644 (modify-phases %standard-phases
9645 (add-before 'build 'patch
9646 ;; Hard-code the path to pkg-config.
9647 (lambda _
9648 (substitute* "pkgconfig/pkgconfig.py"
9649 (("cmd = 'pkg-config")
9650 (string-append "cmd = '" (which "pkg-config"))))
9651 #t))
9652 (replace 'check
9653 (lambda _
9654 (invoke "nosetests" "test.py"))))))
9655 (home-page "https://github.com/matze/pkgconfig")
9656 (synopsis "Python interface for pkg-config")
9657 (description "This module provides a Python interface to pkg-config. It
9658 can be used to find all pkg-config packages, check if a package exists,
9659 check if a package meets certain version requirements, query CFLAGS and
9660 LDFLAGS and parse the output to build extensions with setup.py.")
9661 (license license:expat)))
9662
9663 (define-public python2-pkgconfig
9664 (package-with-python2 python-pkgconfig))
9665
9666 (define-public python-bz2file
9667 (package
9668 (name "python-bz2file")
9669 (version "0.98")
9670 (source
9671 (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "bz2file" version))
9674 (sha256
9675 (base32
9676 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9677 (build-system python-build-system)
9678 (arguments
9679 `(#:tests? #f)) ; Tests use deprecated python modules.
9680 (home-page "https://github.com/nvawda/bz2file")
9681 (synopsis "Read and write bzip2-compressed files")
9682 (description
9683 "Bz2file is a Python library for reading and writing bzip2-compressed
9684 files. It contains a drop-in replacement for the I/O interface in the
9685 standard library's @code{bz2} module, including features from the latest
9686 development version of CPython that are not available in older releases.")
9687 (license license:asl2.0)))
9688
9689 (define-public python2-bz2file
9690 (package-with-python2 python-bz2file))
9691
9692 (define-public python-future
9693 (package
9694 (name "python-future")
9695 (version "0.17.1")
9696 (source
9697 (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "future" version))
9700 (sha256
9701 (base32
9702 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9703 (build-system python-build-system)
9704 ;; Many tests connect to the network or are otherwise flawed.
9705 ;; https://github.com/PythonCharmers/python-future/issues/210
9706 (arguments
9707 `(#:tests? #f))
9708 (home-page "http://python-future.org")
9709 (synopsis "Single-source support for Python 3 and 2")
9710 (description
9711 "@code{python-future} is the missing compatibility layer between Python 2 and
9712 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9713 to support both Python 2 and Python 3 with minimal overhead.")
9714 (license license:expat)))
9715
9716 (define-public python2-future
9717 (package-with-python2 python-future))
9718
9719 (define-public python-cysignals
9720 (package
9721 (name "python-cysignals")
9722 (version "1.9.0")
9723 (source
9724 (origin
9725 (method url-fetch)
9726 (uri (pypi-uri "cysignals" version))
9727 (sha256
9728 (base32
9729 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9730 (build-system python-build-system)
9731 (native-inputs
9732 `(("python-cython" ,python-cython)
9733 ("python-sphinx" ,python-sphinx)))
9734 (inputs
9735 `(("pari-gp" ,pari-gp)))
9736 (arguments
9737 `(#:modules ((guix build python-build-system)
9738 ((guix build gnu-build-system) #:prefix gnu:)
9739 (guix build utils))
9740 ;; FIXME: Tests are executed after installation and currently fail
9741 ;; when not installing into standard locations; the author is working
9742 ;; on a fix.
9743 #:tests? #f
9744 #:phases
9745 (modify-phases %standard-phases
9746 (add-before
9747 'build 'configure
9748 (assoc-ref gnu:%standard-phases 'configure)))))
9749 (home-page
9750 "https://github.com/sagemath/cysignals")
9751 (synopsis
9752 "Handling of interrupts and signals for Cython")
9753 (description
9754 "The cysignals package provides mechanisms to handle interrupts (and
9755 other signals and errors) in Cython code, using two related approaches,
9756 for mixed Cython/Python code or external C libraries and pure Cython code,
9757 respectively.")
9758 (license license:lgpl3+)))
9759
9760 (define-public python2-cysignals
9761 (package-with-python2 python-cysignals))
9762
9763 (define-public python2-shedskin
9764 (package
9765 (name "python2-shedskin")
9766 (version "0.9.4")
9767 (source
9768 (origin
9769 (method url-fetch)
9770 (uri (string-append "https://github.com/shedskin/shedskin/"
9771 "releases/download/v" version
9772 "/shedskin-" version ".tgz"))
9773 (sha256
9774 (base32
9775 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9776 (build-system python-build-system)
9777 (arguments
9778 `(#:python ,python-2
9779 #:phases (modify-phases %standard-phases
9780 (add-after 'unpack 'fix-resulting-include-libs
9781 (lambda* (#:key inputs #:allow-other-keys)
9782 (let ((libgc (assoc-ref inputs "libgc"))
9783 (pcre (assoc-ref inputs "pcre")))
9784 (substitute* "shedskin/makefile.py"
9785 (("variable == 'CCFLAGS':[ ]*")
9786 (string-append "variable == 'CCFLAGS':\n"
9787 " line += ' -I " pcre "/include"
9788 " -I " libgc "/include'"))
9789 (("variable == 'LFLAGS':[ ]*")
9790 (string-append "variable == 'LFLAGS':\n"
9791 " line += ' -L" pcre "/lib"
9792 " -L " libgc "/lib'")))
9793 #t))))))
9794 (inputs `(("pcre" ,pcre)
9795 ("libgc" ,libgc)))
9796 (home-page "https://shedskin.github.io/")
9797 (synopsis "Experimental Python-2 to C++ Compiler")
9798 (description (string-append "This is an experimental compiler for a subset of
9799 Python. It generates C++ code and a Makefile."))
9800 (license (list license:gpl3 license:bsd-3 license:expat))))
9801
9802 (define-public python2-rope
9803 (package
9804 (name "python2-rope")
9805 (version "0.11.0")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "rope" version))
9810 (sha256
9811 (base32
9812 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9813 (arguments
9814 ;; Rope has only partial python3 support, see `python-rope'
9815 `(#:python ,python-2))
9816 (build-system python-build-system)
9817 (native-inputs
9818 `(("python2-unittest2" ,python2-unittest2)))
9819 (home-page "https://github.com/python-rope/rope")
9820 (synopsis "Refactoring library for Python")
9821 (description "Rope is a refactoring library for Python. It facilitates
9822 the renaming, moving and extracting of attributes, functions, modules, fields
9823 and parameters in Python 2 source code. These refactorings can also be applied
9824 to occurrences in strings and comments.")
9825 (license license:gpl2)))
9826
9827 (define-public python-rope
9828 (package
9829 (inherit python2-rope)
9830 (name "python-rope")
9831 (arguments `(#:python ,python-wrapper
9832 ;; XXX: Only partial python3 support, results in some failing
9833 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9834 #:tests? #f))
9835 (properties `((python2-variant . ,(delay python2-rope))))))
9836
9837 (define-public python-py3status
9838 (package
9839 (name "python-py3status")
9840 (version "3.16")
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "py3status" version))
9845 (sha256
9846 (base32
9847 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9848 (build-system python-build-system)
9849 (inputs
9850 `(("file" ,file)))
9851 (arguments
9852 '(#:phases
9853 (modify-phases %standard-phases
9854 ;; 'file' is used for detection of configuration file encoding
9855 ;; let's make link the dependency to particular input
9856 (add-before 'build 'patch-file-path
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((file-path (assoc-ref inputs "file")))
9859 (substitute* "py3status/parse_config.py"
9860 (("\\['file', '-b'")
9861 (string-append "['" file-path "/bin/file', '-b'")))
9862 #t))))
9863 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9864 (home-page "https://github.com/ultrabug/py3status")
9865 (synopsis "Extensible i3status wrapper written in Python")
9866 (description "py3status is an i3status wrapper which extends i3status
9867 functionality in a modular way, allowing you to extend your panel with your
9868 own code, responding to click events and updating clock every second.")
9869 (license license:bsd-3)))
9870
9871 (define-public python-tblib
9872 (package
9873 (name "python-tblib")
9874 (version "1.3.2")
9875 (source (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "tblib" version))
9878 (sha256 (base32
9879 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9880 (build-system python-build-system)
9881 (arguments
9882 `(#:phases
9883 (modify-phases %standard-phases
9884 (add-before 'check 'adjust-tests
9885 (lambda _
9886 (when (which "python3")
9887 ;; Adjust the example output to match that of Python 3.7:
9888 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9889 (substitute* "README.rst"
9890 (("Exception\\('fail',") "Exception('fail'"))
9891 #t)))
9892 (replace 'check
9893 (lambda _
9894 ;; Upstream runs tests after installation and the package itself
9895 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9896 ;; found.
9897 (setenv "PYTHONPATH"
9898 (string-append (getcwd) "/build/lib:"
9899 (getenv "PYTHONPATH")))
9900 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9901 (native-inputs
9902 `(("python-pytest" ,python-pytest)
9903 ("python-six" ,python-six)))
9904 (home-page "https://github.com/ionelmc/python-tblib")
9905 (synopsis "Traceback serialization library")
9906 (description
9907 "Traceback serialization allows you to:
9908
9909 @enumerate
9910 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9911 different processes. This allows better error handling when running code over
9912 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9913
9914 @item Parse traceback strings and raise with the parsed tracebacks.
9915 @end enumerate\n")
9916 (license license:bsd-3)))
9917
9918 (define-public python2-tblib
9919 (package-with-python2 python-tblib))
9920
9921 (define-public python-greenlet
9922 (package
9923 (name "python-greenlet")
9924 (version "0.4.15")
9925 (source (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "greenlet" version))
9928 (sha256
9929 (base32
9930 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9931 (build-system python-build-system)
9932 (home-page "https://greenlet.readthedocs.io/")
9933 (synopsis "Lightweight in-process concurrent programming")
9934 (description
9935 "Greenlet package is a spin-off of Stackless, a version of CPython
9936 that supports micro-threads called \"tasklets\". Tasklets run
9937 pseudo-concurrently (typically in a single or a few OS-level threads) and
9938 are synchronized with data exchanges on \"channels\".")
9939 (license (list license:psfl license:expat))))
9940
9941 (define-public python2-greenlet
9942 (package-with-python2 python-greenlet))
9943
9944 (define-public python-objgraph
9945 (package
9946 (name "python-objgraph")
9947 (version "3.4.0")
9948 (source
9949 (origin
9950 (method url-fetch)
9951 (uri (pypi-uri "objgraph" version))
9952 (sha256
9953 (base32
9954 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9955 (build-system python-build-system)
9956 (propagated-inputs
9957 `(("python-graphviz" ,python-graphviz)))
9958 (native-inputs
9959 `(("python-mock" ,python-mock)
9960 ("graphviz" ,graphviz)))
9961 (home-page "https://mg.pov.lt/objgraph/")
9962 (synopsis "Draw Python object reference graphs with graphviz")
9963 (description
9964 "This package provides tools to draw Python object reference graphs with
9965 graphviz.")
9966 (license license:expat)))
9967
9968 (define-public python-gevent
9969 (package
9970 (name "python-gevent")
9971 (version "1.3.7")
9972 (source (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "gevent" version))
9975 (sha256
9976 (base32
9977 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9978 (modules '((guix build utils)))
9979 (snippet
9980 '(begin
9981 ;; unbunding libev and c-ares
9982 (delete-file-recursively "deps")
9983 #t))))
9984 (build-system python-build-system)
9985 (arguments
9986 `(#:modules ((ice-9 ftw)
9987 (ice-9 match)
9988 (srfi srfi-26)
9989 (guix build utils)
9990 (guix build python-build-system))
9991 #:phases (modify-phases %standard-phases
9992 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9993 (lambda _
9994 (substitute* "src/gevent/subprocess.py"
9995 (("/bin/sh") (which "sh")))
9996 (for-each (lambda (file)
9997 (substitute* file
9998 (("/bin/sh") (which "sh"))
9999 (("/bin/true") (which "true"))))
10000 (find-files "src/greentest" "\\.py$"))
10001 #t))
10002 (add-before 'build 'do-not-use-bundled-sources
10003 (lambda* (#:key inputs #:allow-other-keys)
10004 (setenv "CONFIG_SHELL" (which "bash"))
10005 (setenv "LIBEV_EMBED" "false")
10006 (setenv "CARES_EMBED" "false")
10007 (setenv "EMBED" "false")
10008
10009 ;; Prevent building bundled libev.
10010 (substitute* "setup.py"
10011 (("run_make=_BUILDING")
10012 "run_make=False"))
10013
10014 (let ((greenlet (string-append
10015 (assoc-ref inputs "python-greenlet")
10016 "/include")))
10017 (match (scandir greenlet
10018 (lambda (item)
10019 (string-prefix? "python" item)))
10020 ((python)
10021 (setenv "C_INCLUDE_PATH"
10022 (string-append greenlet "/" python)))))
10023 #t))
10024 (add-before 'check 'skip-timer-test
10025 (lambda _
10026 ;; XXX: Skip 'TestTimerResolution', which appears to be
10027 ;; unreliable.
10028 (substitute* "src/greentest/test__core_timer.py"
10029 (("not greentest.RUNNING_ON_CI") "False"))
10030 #t))
10031 (replace 'check
10032 (lambda _
10033 ;; Make sure the build directory is on PYTHONPATH.
10034 (setenv "PYTHONPATH"
10035 (string-append
10036 (getenv "PYTHONPATH") ":"
10037 (getcwd) "/build/"
10038 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10039 (with-directory-excursion "src/greentest"
10040 ;; XXX: Many tests require network access. Instead we only
10041 ;; run known-good tests. Unfortunately we cannot use
10042 ;; recursion here since this directory also contains
10043 ;; Python-version-specific subfolders.
10044 (apply invoke "python" "testrunner.py" "--config"
10045 "known_failures.py"
10046 (scandir "." (cut regexp-exec
10047 (make-regexp "test_+(subprocess|core)")
10048 <>)))))))))
10049 (propagated-inputs
10050 `(("python-greenlet" ,python-greenlet)
10051 ("python-objgraph" ,python-objgraph)))
10052 (native-inputs
10053 `(("python-six" ,python-six)))
10054 (inputs
10055 `(("c-ares" ,c-ares)
10056 ("libev" ,libev)))
10057 (home-page "http://www.gevent.org/")
10058 (synopsis "Coroutine-based network library")
10059 (description
10060 "gevent is a coroutine-based Python networking library that uses greenlet
10061 to provide a high-level synchronous API on top of the libev event loop.")
10062 (license license:expat)
10063 (properties `((python2-variant . ,(delay python2-gevent))))))
10064
10065 (define-public python2-gevent
10066 (let ((base (package-with-python2
10067 (strip-python2-variant python-gevent))))
10068 (package
10069 (inherit base)
10070 (native-inputs `(,@(package-native-inputs python-gevent)
10071 ("python-mock" ,python2-mock))))))
10072
10073 (define-public python-fastimport
10074 (package
10075 (name "python-fastimport")
10076 (version "0.9.6")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "fastimport" version))
10081 (sha256
10082 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10083 (build-system python-build-system)
10084 (home-page "https://github.com/jelmer/python-fastimport")
10085 (synopsis "VCS fastimport parser and generator in Python")
10086 (description "This package provides a parser for and generator of the Git
10087 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10088 format.")
10089 (license license:gpl2+)))
10090
10091 (define-public python2-fastimport
10092 (package-with-python2 python-fastimport))
10093
10094 (define-public python-twisted
10095 (package
10096 (name "python-twisted")
10097 (version "19.7.0")
10098 (source (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10101 (sha256
10102 (base32
10103 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10104 (build-system python-build-system)
10105 (arguments
10106 '(#:tests? #f)) ; FIXME: some tests fail
10107 (propagated-inputs
10108 `(("python-zope-interface" ,python-zope-interface)
10109 ("python-pyhamcrest" ,python-pyhamcrest)
10110 ("python-incremental" ,python-incremental)
10111 ("python-hyperlink" ,python-hyperlink)
10112 ("python-constantly" ,python-constantly)
10113 ("python-automat" ,python-automat)))
10114 (home-page "https://twistedmatrix.com/")
10115 (synopsis "Asynchronous networking framework written in Python")
10116 (description
10117 "Twisted is an extensible framework for Python programming, with special
10118 focus on event-based network programming and multiprotocol integration.")
10119 (license license:expat)))
10120
10121 (define-public python2-twisted
10122 (package-with-python2 python-twisted))
10123
10124 (define-public python-pika
10125 (package
10126 (name "python-pika")
10127 (version "0.12.0")
10128 (source
10129 (origin
10130 (method url-fetch)
10131 (uri (pypi-uri "pika" version))
10132 (sha256
10133 (base32
10134 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10135 (build-system python-build-system)
10136 (native-inputs
10137 `(("python-pyev" ,python-pyev)
10138 ("python-tornado" ,python-tornado)
10139 ("python-twisted" ,python-twisted)))
10140 (home-page "https://pika.readthedocs.org")
10141 (synopsis "Pure Python AMQP Client Library")
10142 (description
10143 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10144 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10145 network support library.")
10146 (license license:bsd-3)))
10147
10148 (define-public python2-pika
10149 (package-with-python2 python-pika))
10150
10151 (define-public python-ply
10152 (package
10153 (name "python-ply")
10154 (version "3.10")
10155 (source
10156 (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "ply" version))
10159 (sha256
10160 (base32
10161 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10162 (build-system python-build-system)
10163 (home-page "http://www.dabeaz.com/ply/")
10164 (synopsis "Python Lex & Yacc")
10165 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10166 It uses LR parsing and does extensive error checking.")
10167 (license license:bsd-3)))
10168
10169 (define-public python2-ply
10170 (package-with-python2 python-ply))
10171
10172 (define-public python-tabulate
10173 (package
10174 (name "python-tabulate")
10175 (version "0.7.7")
10176 (source (origin
10177 (method url-fetch)
10178 (uri (pypi-uri "tabulate" version))
10179 (sha256
10180 (base32
10181 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10182 (build-system python-build-system)
10183 (arguments
10184 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10185 ;; and the latest release is not tagged in the upstream repository.
10186 '(#:tests? #f))
10187 (home-page "https://bitbucket.org/astanin/python-tabulate")
10188 (synopsis "Pretty-print tabular data")
10189 (description
10190 "Tabulate is a library and command-line utility to pretty-print tabular
10191 data in Python.")
10192 (license license:expat)))
10193
10194 (define-public python2-tabulate
10195 (package-with-python2 python-tabulate))
10196
10197 (define-public python-kazoo
10198 (package
10199 (name "python-kazoo")
10200 (version "2.4.0")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "kazoo" version))
10205 (sha256
10206 (base32
10207 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10208 (build-system python-build-system)
10209 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10210 (propagated-inputs
10211 `(("python-six" ,python-six)))
10212 (home-page "https://kazoo.readthedocs.org")
10213 (synopsis "High-level Zookeeper client library")
10214 (description
10215 "Kazoo is a Python client library for the Apache Zookeeper distributed
10216 application service. It is designed to be easy to use and to avoid common
10217 programming errors.")
10218 (license license:asl2.0)))
10219
10220 (define-public python2-kazoo
10221 (package-with-python2 python-kazoo))
10222
10223 (define-public python-pykafka
10224 (package
10225 (name "python-pykafka")
10226 (version "2.4.0")
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "pykafka" version))
10230 (sha256
10231 (base32
10232 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10233 (build-system python-build-system)
10234 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10235 (propagated-inputs
10236 `(("python-gevent" ,python-gevent)
10237 ("python-kazoo" ,python-kazoo)
10238 ("python-tabulate" ,python-tabulate)))
10239 (inputs
10240 `(("librdkafka" ,librdkafka)))
10241 (home-page "https://pykafka.readthedocs.io/")
10242 (synopsis "Apache Kafka client for Python")
10243 (description
10244 "PyKafka is a client for the Apache Kafka distributed messaging system.
10245 It includes Python implementations of Kafka producers and consumers, which
10246 are optionally backed by a C extension built on librdkafka.")
10247 (license license:asl2.0)))
10248
10249 (define-public python2-pykafka
10250 (package-with-python2 python-pykafka))
10251
10252 (define-public python-wcwidth
10253 (package
10254 (name "python-wcwidth")
10255 (version "0.1.7")
10256 (source
10257 (origin
10258 (method url-fetch)
10259 (uri (pypi-uri "wcwidth" version))
10260 (sha256
10261 (base32
10262 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10263 (build-system python-build-system)
10264 (home-page "https://github.com/jquast/wcwidth")
10265 (synopsis "Measure number of terminal column cells of wide-character codes")
10266 (description "Wcwidth measures the number of terminal column cells of
10267 wide-character codes. It is useful for those implementing a terminal emulator,
10268 or programs that carefully produce output to be interpreted by one. It is a
10269 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10270 specified in POSIX.1-2001 and POSIX.1-2008.")
10271 (license license:expat)))
10272
10273 (define-public python2-wcwidth
10274 (package-with-python2 python-wcwidth))
10275
10276 (define-public python2-jsonrpclib
10277 (package
10278 (name "python2-jsonrpclib")
10279 (version "0.1.7")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "jsonrpclib" version))
10283 (sha256
10284 (base32
10285 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10286 (build-system python-build-system)
10287 (arguments
10288 `(#:tests? #f
10289 #:python ,python-2))
10290 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10291 (synopsis "Implementation of JSON-RPC specification for Python")
10292 (description
10293 "This library is an implementation of the JSON-RPC specification.
10294 It supports both the original 1.0 specification, as well as the
10295 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10296 etc.")
10297 (license license:asl2.0)))
10298
10299 (define-public python-chai
10300 (package
10301 (name "python-chai")
10302 (version "1.1.2")
10303 (source (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "chai" version))
10306 (sha256
10307 (base32
10308 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10309 (build-system python-build-system)
10310 (home-page "https://github.com/agoragames/chai")
10311 (synopsis "Mocking framework for Python")
10312 (description
10313 "Chai provides an api for mocking, stubbing and spying your python
10314 objects, patterned after the Mocha library for Ruby.")
10315 (license license:bsd-3)))
10316
10317 (define-public python2-chai
10318 (package-with-python2 python-chai))
10319
10320 (define-public python-inflection
10321 (package
10322 (name "python-inflection")
10323 (version "0.3.1")
10324 (source
10325 (origin (method url-fetch)
10326 (uri (pypi-uri "inflection" version))
10327 (sha256
10328 (base32
10329 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10330 (build-system python-build-system)
10331 (native-inputs
10332 `(("python-pytest" ,python-pytest)))
10333 (home-page "https://github.com/jpvanhal/inflection")
10334 (synopsis "Python string transformation library")
10335 (description
10336 "Inflection is a string transformation library. It singularizes
10337 and pluralizes English words, and transforms strings from CamelCase to
10338 underscored string.")
10339 (license license:expat)))
10340
10341 (define-public python2-inflection
10342 (package-with-python2 python-inflection))
10343
10344 (define-public python-pylev
10345 (package
10346 (name "python-pylev")
10347 (version "1.3.0")
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "pylev" version))
10351 (sha256
10352 (base32
10353 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10354 (build-system python-build-system)
10355 (home-page "https://github.com/toastdriven/pylev")
10356 (synopsis "Levenshtein distance implementation in Python")
10357 (description "Pure Python Levenshtein implementation, based off the
10358 Wikipedia code samples at
10359 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10360 (license license:bsd-3)))
10361
10362 (define-public python2-pylev
10363 (package-with-python2 python-pylev))
10364
10365 (define-public python-cleo
10366 (package
10367 (name "python-cleo")
10368 (version "0.6.1")
10369 (source (origin
10370 (method url-fetch)
10371 (uri (pypi-uri "cleo" version))
10372 (sha256
10373 (base32
10374 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10375 (build-system python-build-system)
10376 (native-inputs
10377 `(;; For testing
10378 ("python-mock" ,python-mock)
10379 ("python-pytest-mock" ,python-pytest-mock)
10380 ("python-pytest" ,python-pytest)))
10381 (propagated-inputs
10382 `(("python-backpack" ,python-backpack)
10383 ("python-pastel" ,python-pastel)
10384 ("python-pylev" ,python-pylev)))
10385 (home-page "https://github.com/sdispater/cleo")
10386 (synopsis "Command-line arguments library for Python")
10387 (description
10388 "Cleo allows you to create command-line commands with signature in
10389 docstring and colored output.")
10390 (license license:expat)))
10391
10392 (define-public python2-cleo
10393 (package-with-python2 python-cleo))
10394
10395 (define-public python-lazy-object-proxy
10396 (package
10397 (name "python-lazy-object-proxy")
10398 (version "1.3.1")
10399 (source (origin
10400 (method url-fetch)
10401 (uri (pypi-uri "lazy-object-proxy" version))
10402 (sha256
10403 (base32
10404 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10405 (build-system python-build-system)
10406 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10407 (synopsis "Lazy object proxy for python")
10408 (description
10409 "Lazy object proxy is an object that wraps a callable but defers the call
10410 until the object is actually required, and caches the result of said call.")
10411 (license license:bsd-2)))
10412
10413 (define-public python2-lazy-object-proxy
10414 (package-with-python2 python-lazy-object-proxy))
10415
10416 (define-public python-dnspython
10417 (package
10418 (name "python-dnspython")
10419 (version "1.15.0")
10420 (source (origin
10421 (method url-fetch)
10422 (uri (string-append "http://www.dnspython.org/kits/"
10423 version "/dnspython-" version ".tar.gz"))
10424 (sha256
10425 (base32
10426 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10427 (build-system python-build-system)
10428 (arguments '(#:tests? #f)) ; XXX: requires internet access
10429 (home-page "http://www.dnspython.org")
10430 (synopsis "DNS toolkit for Python")
10431 (description
10432 "dnspython is a DNS toolkit for Python. It supports almost all record
10433 types. It can be used for queries, zone transfers, and dynamic updates.
10434 It supports TSIG authenticated messages and EDNS0.")
10435 (license license:expat)))
10436
10437 (define-public python2-dnspython
10438 (package-with-python2 python-dnspython))
10439
10440 (define-public python-email-validator
10441 (package
10442 (name "python-email-validator")
10443 (version "1.0.2")
10444 (source
10445 (origin (method url-fetch)
10446 (uri (pypi-uri "email_validator" version))
10447 (sha256
10448 (base32
10449 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10450 (build-system python-build-system)
10451 (arguments
10452 '(#:phases
10453 (modify-phases %standard-phases
10454 (add-before 'build 'use-dnspython
10455 (lambda _
10456 (substitute* "setup.py"
10457 (("dnspython3") "dnspython"))
10458 #t)))))
10459 (propagated-inputs
10460 `(("python-dnspython" ,python-dnspython)
10461 ("python-idna" ,python-idna)))
10462 (home-page "https://github.com/JoshData/python-email-validator")
10463 (synopsis "Email address validation library for Python")
10464 (description
10465 "This library validates email address syntax and deliverability.")
10466 (license license:cc0)))
10467
10468 (define-public python2-email-validator
10469 (package-with-python2 python-email-validator))
10470
10471 (define-public python-ukpostcodeparser
10472 (package
10473 (name "python-ukpostcodeparser")
10474 (version "1.0.3")
10475 (source (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "UkPostcodeParser" version))
10478 (sha256
10479 (base32
10480 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10481 (build-system python-build-system)
10482 (home-page "https://github.com/hamstah/ukpostcodeparser")
10483 (synopsis "UK Postcode parser for Python")
10484 (description
10485 "This library provides the @code{parse_uk_postcode} function for
10486 parsing UK postcodes.")
10487 (license license:expat)))
10488
10489 (define-public python2-ukpostcodeparser
10490 (package-with-python2 python-ukpostcodeparser))
10491
10492 (define-public python-faker
10493 (package
10494 (name "python-faker")
10495 (version "0.7.9")
10496 (source (origin
10497 (method url-fetch)
10498 (uri (pypi-uri "Faker" version))
10499 (sha256
10500 (base32
10501 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10502 (patches
10503 (search-patches "python-faker-fix-build-32bit.patch"))
10504 (modules '((guix build utils)))
10505 (snippet
10506 '(begin
10507 (for-each delete-file (find-files "." "\\.pyc$"))
10508 #t))))
10509 (build-system python-build-system)
10510 (arguments
10511 '(#:phases
10512 (modify-phases %standard-phases
10513 (replace 'check
10514 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10515 (native-inputs
10516 `(;; For testing
10517 ("python-email-validator" ,python-email-validator)
10518 ("python-mock" ,python-mock)
10519 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10520 (propagated-inputs
10521 `(("python-dateutil" ,python-dateutil)
10522 ("python-six" ,python-six)))
10523 (home-page "https://github.com/joke2k/faker")
10524 (synopsis "Python package that generates fake data")
10525 (description
10526 "Faker is a Python package that generates fake data such as names,
10527 addresses, and phone numbers.")
10528 (license license:expat)
10529 (properties `((python2-variant . ,(delay python2-faker))))))
10530
10531 (define-public python2-faker
10532 (let ((base (package-with-python2 (strip-python2-variant
10533 python-faker))))
10534 (package
10535 (inherit base)
10536 (propagated-inputs
10537 `(("python2-ipaddress" ,python2-ipaddress)
10538 ,@(package-propagated-inputs base))))))
10539
10540 (define-public python-pyaml
10541 (package
10542 (name "python-pyaml")
10543 (version "18.11.0")
10544 (source (origin
10545 (method url-fetch)
10546 (uri (pypi-uri "pyaml" version))
10547 (sha256
10548 (base32
10549 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10550 (build-system python-build-system)
10551 (native-inputs
10552 `(("python-unidecode" ,python-unidecode)))
10553 (propagated-inputs
10554 `(("python-pyyaml" ,python-pyyaml)))
10555 (home-page "https://github.com/mk-fg/pretty-yaml")
10556 (synopsis "YAML pretty-print library for Python")
10557 (description
10558 "pyaml is a PyYAML based python module to produce pretty and readable
10559 YAML-serialized data.")
10560 (license license:wtfpl2)))
10561
10562 (define-public python2-pyaml
10563 (package-with-python2 python-pyaml))
10564
10565 (define-public python-backpack
10566 (package
10567 (name "python-backpack")
10568 (version "0.1")
10569 (source
10570 (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "backpack" version))
10573 (sha256
10574 (base32
10575 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10576 (build-system python-build-system)
10577 (native-inputs
10578 `(("python-pytest" ,python-pytest)
10579 ("python-nose" ,python-nose)))
10580 (propagated-inputs
10581 `(("python-simplejson" ,python-simplejson)))
10582 (home-page "https://github.com/sdispater/backpack")
10583 (synopsis "Utilities for working with Python collections")
10584 (description "Backpack provides some useful utilities for working with
10585 collections of data.")
10586 (license license:expat)))
10587
10588 (define-public python2-backpack
10589 (package-with-python2 python-backpack))
10590
10591 (define-public python-prompt-toolkit
10592 (package
10593 (name "python-prompt-toolkit")
10594 (version "2.0.7")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10599 (sha256
10600 (base32
10601 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10602 (build-system python-build-system)
10603 (arguments
10604 `(#:phases
10605 (modify-phases %standard-phases
10606 (delete 'check)
10607 (add-after 'install 'post-install-check
10608 (lambda* (#:key inputs outputs #:allow-other-keys)
10609 ;; HOME is needed for the test
10610 ;; "test_pathcompleter_can_expanduser".
10611 (setenv "HOME" "/tmp")
10612 (add-installed-pythonpath inputs outputs)
10613 (invoke "py.test"))))))
10614 (propagated-inputs
10615 `(("python-wcwidth" ,python-wcwidth)
10616 ("python-six" ,python-six)
10617 ("python-pygments" ,python-pygments)))
10618 (native-inputs
10619 `(("python-pytest" ,python-pytest)))
10620 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10621 (synopsis "Library for building command line interfaces in Python")
10622 (description
10623 "Prompt-Toolkit is a library for building interactive command line
10624 interfaces in Python. It's like GNU Readline but it also features syntax
10625 highlighting while typing, out-of-the-box multi-line input editing, advanced
10626 code completion, incremental search, support for Chinese double-width
10627 characters, mouse support, and auto suggestions.")
10628 (license license:bsd-3)))
10629
10630 (define-public python2-prompt-toolkit
10631 (package-with-python2 python-prompt-toolkit))
10632
10633 (define-public python-prompt-toolkit-1
10634 (package (inherit python-prompt-toolkit)
10635 (version "1.0.15")
10636 (source
10637 (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10640 (sha256
10641 (base32
10642 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10643
10644 (define-public python2-prompt-toolkit-1
10645 (package-with-python2 python-prompt-toolkit-1))
10646
10647 (define-public python-jedi
10648 (package
10649 (name "python-jedi")
10650 (version "0.15.1")
10651 (source
10652 (origin
10653 (method url-fetch)
10654 (uri (pypi-uri "jedi" version))
10655 (sha256
10656 (base32
10657 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10658 (build-system python-build-system)
10659 (arguments
10660 `(#:phases
10661 (modify-phases %standard-phases
10662 (add-after 'unpack 'disable-file-completion-test
10663 ;; A single parameterized test currently fail (see:
10664 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10665 (lambda _
10666 (substitute* "test/test_api/test_completion.py"
10667 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10668 #t))
10669 (replace 'check
10670 (lambda _
10671 (setenv "HOME" "/tmp")
10672 (invoke "python" "-m" "pytest"))))))
10673 (native-inputs
10674 `(("python-pytest" ,python-pytest)
10675 ("python-docopt" ,python-docopt)))
10676 (propagated-inputs
10677 `(("python-parso" ,python-parso)))
10678 (home-page "https://github.com/davidhalter/jedi")
10679 (synopsis "Autocompletion and static analysis library for Python")
10680 (description
10681 "Jedi is a static analysis tool for Python that can be used in Integrated
10682 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10683 on a deeper level than many other static analysis frameworks for Python.
10684
10685 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10686 well.")
10687 (license license:expat)))
10688
10689 (define-public python2-jedi
10690 (package-with-python2 python-jedi))
10691
10692 (define-public ptpython
10693 (package
10694 (name "ptpython")
10695 (version "0.34")
10696 (source (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "ptpython" version))
10699 (sha256
10700 (base32
10701 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10702 (build-system python-build-system)
10703 (arguments
10704 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10705 (propagated-inputs
10706 `(("python-docopt" ,python-docopt)
10707 ("python-jedi" ,python-jedi)
10708 ("python-prompt-toolkit" ,python-prompt-toolkit)
10709 ("python-pygments" ,python-pygments)))
10710 (home-page "https://github.com/jonathanslenders/ptpython")
10711 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10712 (description
10713 "ptpython is a Python read-eval-print loop with IDE-like features.
10714 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10715 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10716 etc.")
10717 (license license:bsd-3)
10718 (properties `((python2-variant . ,(delay ptpython-2))))))
10719
10720 (define-public ptpython-2
10721 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10722 (package
10723 (inherit base)
10724 (name "ptpython2"))))
10725
10726 (define-public python-stem
10727 (package
10728 (name "python-stem")
10729 (version "1.7.1")
10730 (source
10731 (origin
10732 (method url-fetch)
10733 (uri (pypi-uri "stem" version))
10734 (sha256
10735 (base32
10736 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10737 (build-system python-build-system)
10738 (arguments
10739 `(#:phases
10740 (modify-phases %standard-phases
10741 (replace 'check
10742 (lambda _
10743 (invoke "./run_tests.py" "--unit")
10744 #t)))))
10745 (native-inputs
10746 `(("python-mock" ,python-mock)
10747 ("python-pycodestyle" ,python-pycodestyle)
10748 ("python-pyflakes" ,python-pyflakes)))
10749 (home-page "https://stem.torproject.org/")
10750 (synopsis
10751 "Python controller library that allows applications to interact with Tor")
10752 (description
10753 "Stem is a Python controller library for Tor. With it you can use Tor's
10754 control protocol to script against the Tor process and read descriptor data
10755 relays publish about themselves.")
10756 (license license:lgpl3)))
10757
10758 (define-public python2-stem
10759 (package-with-python2 python-stem))
10760
10761 (define-public python-pyserial
10762 (package
10763 (name "python-pyserial")
10764 (version "3.1.1")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "pyserial" version))
10769 (sha256
10770 (base32
10771 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10772 (build-system python-build-system)
10773 (arguments
10774 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10775 ;; #:phases
10776 ;; (modify-phases %standard-phases
10777 ;; (replace 'check
10778 ;; (lambda _
10779 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10780 (home-page
10781 "https://github.com/pyserial/pyserial")
10782 (synopsis "Python Serial Port Bindings")
10783 (description "@code{pyserial} provide serial port bindings for Python. It
10784 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10785 and/or Xon/Xoff. The port is accessed in RAW mode.")
10786 (license license:bsd-3)))
10787
10788 (define-public python2-pyserial
10789 (package-with-python2 python-pyserial))
10790
10791 (define-public python-kivy
10792 (package
10793 (name "python-kivy")
10794 (version "1.10.1")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "Kivy" version))
10799 (file-name (string-append name "-" version ".tar.gz"))
10800 (sha256
10801 (base32
10802 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10803 (build-system python-build-system)
10804 (arguments
10805 `(#:tests? #f ; Tests require many optional packages
10806 #:phases
10807 (modify-phases %standard-phases
10808 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10809 (lambda* (#:key inputs #:allow-other-keys)
10810 (setenv "KIVY_SDL2_PATH"
10811 (string-append (assoc-ref inputs "sdl-union")
10812 "/include/SDL2"))
10813 #t)))))
10814 (native-inputs
10815 `(("git" ,git)
10816 ("pkg-config" ,pkg-config)
10817 ("python-cython" ,python-cython)))
10818 (inputs
10819 `(("gstreamer" ,gstreamer)
10820 ("mesa" ,mesa)
10821 ("sdl-union"
10822 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10823 (home-page "http://kivy.org")
10824 (synopsis
10825 "Multitouch application framework")
10826 (description
10827 "A software library for rapid development of
10828 hardware-accelerated multitouch applications.")
10829 (license license:expat)))
10830
10831 (define-public python2-kivy
10832 (package-with-python2 python-kivy))
10833
10834 (define-public python-kivy-next
10835 (deprecated-package "python-kivy-next" python-kivy))
10836
10837 (define-public python2-kivy-next
10838 (deprecated-package "python2-kivy-next" python2-kivy))
10839
10840 (define-public python-binaryornot
10841 (package
10842 (name "python-binaryornot")
10843 (version "0.4.4")
10844 (source (origin
10845 (method url-fetch)
10846 (uri (pypi-uri "binaryornot" version))
10847 (sha256
10848 (base32
10849 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10850 (build-system python-build-system)
10851 (propagated-inputs
10852 `(("python-chardet" ,python-chardet)
10853 ("python-hypothesis" ,python-hypothesis)))
10854 (home-page "https://github.com/audreyr/binaryornot")
10855 (synopsis "Package to check if a file is binary or text")
10856 (description "Ultra-lightweight pure Python package to check if a file is
10857 binary or text.")
10858 (license license:bsd-3)
10859 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10860
10861 (define-public python2-binaryornot
10862 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10863 (package (inherit base)
10864 (propagated-inputs
10865 `(("python2-enum34" ,python2-enum34)
10866 ,@(package-propagated-inputs base))))))
10867
10868 (define-public python-nltk
10869 (package
10870 (name "python-nltk")
10871 (version "3.2.1")
10872 (source (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "nltk" version))
10875 (sha256
10876 (base32
10877 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10878 (build-system python-build-system)
10879 (arguments
10880 '(;; The tests require some extra resources to be downloaded.
10881 ;; TODO Try packaging these resources.
10882 #:tests? #f))
10883 (home-page "http://nltk.org/")
10884 (synopsis "Natural Language Toolkit")
10885 (description "It provides interfaces to over 50 corpora and lexical
10886 resources such as WordNet, along with a suite of text processing libraries
10887 for classification, tokenization, stemming, tagging, parsing, and semantic
10888 reasoning, wrappers for natural language processing libraries.")
10889 (license license:asl2.0)))
10890
10891 (define-public python2-nltk
10892 (package-with-python2 python-nltk))
10893
10894 (define-public python-pymongo
10895 (package
10896 (name "python-pymongo")
10897 (version "3.7.2")
10898 (source (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "pymongo" version))
10901 (sha256
10902 (base32
10903 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10904 (build-system python-build-system)
10905 (propagated-inputs
10906 `(("python-certifi" ,python-certifi)))
10907 (home-page "https://github.com/mongodb/mongo-python-driver")
10908 (synopsis "Python driver for MongoDB")
10909 (description "Python driver for MongoDB.")
10910 (license license:asl2.0)))
10911
10912 (define-public python2-pymongo
10913 (package-with-python2 python-pymongo))
10914
10915 (define-public python-consul
10916 (package
10917 (name "python-consul")
10918 (version "0.6.1")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "python-consul" version))
10923 (sha256
10924 (base32
10925 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10926 (build-system python-build-system)
10927 (arguments
10928 '(#:tests? #f)) ; The tests are not distributed
10929 (propagated-inputs
10930 `(("python-requests" ,python-requests)
10931 ("python-six" ,python-six)))
10932 (home-page "https://github.com/cablehead/python-consul")
10933 (synopsis "Python client for Consul")
10934 (description
10935 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10936 discovery, monitoring and configuration.")
10937 (license license:expat)))
10938
10939 (define-public python2-consul
10940 (package-with-python2 python-consul))
10941
10942 (define-public python-schematics
10943 (package
10944 (name "python-schematics")
10945 (version "1.1.1")
10946 (source
10947 (origin
10948 (method git-fetch)
10949 (uri (git-reference
10950 (url "https://github.com/schematics/schematics.git")
10951 (commit (string-append "v" version))))
10952 (file-name (git-file-name name version))
10953 (sha256
10954 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10955 (build-system python-build-system)
10956 (propagated-inputs
10957 `(("python-six" ,python-six)))
10958 (arguments
10959 ;; The tests require a bunch of not very nice packages with fixed
10960 ;; version requirements (e.g. python-coveralls).
10961 `(#:tests? #f))
10962 (home-page "https://github.com/schematics/schematics")
10963 (synopsis "Python Data Structures for Humans")
10964 (description "Python Data Structures for Humans.")
10965 (license license:bsd-3)))
10966
10967 (define-public python2-schematics
10968 (package-with-python2 python-schematics))
10969
10970 (define-public python-odfpy
10971 (package
10972 (name "python-odfpy")
10973 (version "1.3.3")
10974 (source (origin
10975 (method url-fetch)
10976 (uri (pypi-uri "odfpy" version))
10977 (sha256
10978 (base32
10979 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10980 (arguments
10981 `(#:modules ((srfi srfi-1)
10982 (guix build python-build-system)
10983 (guix build utils))
10984 #:phases
10985 (modify-phases %standard-phases
10986 (replace 'check
10987 ;; The test runner invokes python2 and python3 for test*.py.
10988 ;; To avoid having both in inputs, we replicate it here.
10989 (lambda _
10990 (for-each (lambda (test-file) (invoke "python" test-file))
10991 (find-files "tests" "^test.*\\.py$"))
10992 #t)))))
10993 (build-system python-build-system)
10994 (home-page "https://github.com/eea/odfpy")
10995 (synopsis "Python API and tools to manipulate OpenDocument files")
10996 (description "Collection of libraries and utility programs written in
10997 Python to manipulate OpenDocument 1.2 files.")
10998 (license
10999 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11000 ;; number of files with other licenses.
11001 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11002
11003 (define-public python2-odfpy
11004 (package-with-python2 python-odfpy))
11005
11006 (define-public python-natsort
11007 (package
11008 (name "python-natsort")
11009 (version "5.4.1")
11010 (source (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "natsort" version))
11013 (sha256
11014 (base32
11015 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11016 (build-system python-build-system)
11017 (arguments
11018 `(#:modules ((guix build utils)
11019 (guix build python-build-system)
11020 (srfi srfi-1)
11021 (srfi srfi-26)
11022 (ice-9 ftw))
11023 #:phases
11024 (modify-phases %standard-phases
11025 (add-before 'check 'set-cachedir
11026 ;; Tests require write access to $HOME by default
11027 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11028 (replace 'check
11029 (lambda _
11030 (let ((cwd (getcwd)))
11031 (setenv "PYTHONPATH"
11032 (string-append
11033 cwd "/build/"
11034 (find (cut string-prefix? "lib" <>)
11035 (scandir (string-append cwd "/build")))
11036 ":"
11037 (getenv "PYTHONPATH")))
11038 (invoke "pytest" "-v")))))))
11039 (native-inputs
11040 `(("python-hypothesis" ,python-hypothesis)
11041 ("python-pytest-cov" ,python-pytest-cov)
11042 ("python-pytest-mock" ,python-pytest-mock)
11043 ("python-pytest" ,python-pytest)))
11044 (propagated-inputs ; TODO: Add python-fastnumbers.
11045 `(("python-pyicu" ,python-pyicu)))
11046 (home-page "https://github.com/SethMMorton/natsort")
11047 (synopsis "Natural sorting for python and shell")
11048 (description
11049 "Natsort lets you apply natural sorting on lists instead of
11050 lexicographical. If you use the built-in @code{sorted} method in python
11051 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11052 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11053 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11054 identifies numbers and sorts them separately from strings. It can also sort
11055 version numbers, real numbers, mixed types and more, and comes with a shell
11056 command @command{natsort} that exposes this functionality in the command line.")
11057 (license license:expat)
11058 (properties `((python2-variant . ,(delay python2-natsort))))))
11059
11060 (define-public python2-natsort
11061 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11062 (package (inherit base)
11063 (native-inputs
11064 `(("python2-pathlib" ,python2-pathlib)
11065 ,@(package-native-inputs base))))))
11066
11067 (define-public python-glances
11068 (package
11069 (name "python-glances")
11070 (version "3.1.1")
11071 (source
11072 (origin
11073 (method url-fetch)
11074 (uri (pypi-uri "Glances" version))
11075 (sha256
11076 (base32
11077 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11078 (modules '((guix build utils)))
11079 (snippet
11080 '(begin
11081 ;; Glances phones PyPI for weekly update checks by default.
11082 ;; Disable these. The user can re-enable them if desired.
11083 (substitute* "glances/outdated.py"
11084 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11085 (string-append indentation
11086 "self.args.disable_check_update = True\n"
11087 line)))
11088 #t))))
11089 (build-system python-build-system)
11090 (propagated-inputs
11091 `(("python-future" ,python-future)
11092 ("python-psutil" ,python-psutil)))
11093 (home-page
11094 "https://github.com/nicolargo/glances")
11095 (synopsis "Cross-platform curses-based monitoring tool")
11096 (description
11097 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11098 Glances uses the PsUtil library to get information from your system. It
11099 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11100 (license license:lgpl3+)))
11101
11102 (define-public python2-glances
11103 (package-with-python2 python-glances))
11104
11105 (define-public python-graphql-core
11106 (package
11107 (name "python-graphql-core")
11108 (version "0.5.3")
11109 (source
11110 (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "graphql-core" version))
11113 (sha256
11114 (base32
11115 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11116 (build-system python-build-system)
11117 (arguments
11118 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11119 #:phases
11120 (modify-phases %standard-phases
11121 (add-after 'unpack 'patch-hardcoded-version
11122 (lambda _ (substitute*
11123 "setup.py"
11124 (("'gevent==1.1rc1'") "'gevent'"))
11125 #t)))))
11126 (native-inputs
11127 `(("python-gevent" ,python-gevent)
11128 ("python-mock" ,python-mock)
11129 ("python-pytest-mock" ,python-pytest-mock)))
11130 (propagated-inputs
11131 `(("python-promise" ,python-promise)
11132 ("python-six" ,python-six)))
11133 (home-page "https://github.com/graphql-python/graphql-core")
11134 (synopsis "GraphQL implementation for Python")
11135 (description
11136 "GraphQL implementation for Python. GraphQL is a data query language and
11137 runtime designed and used to request and deliver data to mobile and web apps.
11138 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11139 to Python.")
11140 (license license:expat)))
11141
11142 (define-public python2-graphql-core
11143 (package-with-python2 python-graphql-core))
11144
11145 (define-public python-graphql-relay
11146 (package
11147 (name "python-graphql-relay")
11148 (version "0.4.5")
11149 (source
11150 (origin
11151 (method url-fetch)
11152 (uri (pypi-uri "graphql-relay" version))
11153 (sha256
11154 (base32
11155 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11156 (build-system python-build-system)
11157 (arguments
11158 '(#:tests? #f)) ; The tests are not distributed
11159 (propagated-inputs
11160 `(("python-graphql-core" ,python-graphql-core)
11161 ("python-promise" ,python-promise)
11162 ("python-six" ,python-six)))
11163 (home-page "https://github.com/graphql-python/graphql-relay-py")
11164 (synopsis "Relay implementation for Python")
11165 (description
11166 "This is a library to allow the easy creation of Relay-compliant servers
11167 using the GraphQL Python reference implementation of a GraphQL server. It
11168 should be noted that the code is a exact port of the original
11169 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11170 from Facebook.")
11171 (license license:expat)))
11172
11173 (define-public python2-graphql-relay
11174 (package-with-python2 python-graphql-relay))
11175
11176 (define-public python-graphene
11177 (package
11178 (name "python-graphene")
11179 (version "0.10.2")
11180 (source
11181 (origin
11182 (method url-fetch)
11183 (uri (pypi-uri "graphene" version))
11184 (sha256
11185 (base32
11186 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11187 (build-system python-build-system)
11188 (propagated-inputs
11189 `(("python-graphql-core" ,python-graphql-core)
11190 ("python-graphql-relay" ,python-graphql-relay)
11191 ("python-iso8601" ,python-iso8601)
11192 ("python-promise" ,python-promise)
11193 ("python-six" ,python-six)))
11194 (arguments
11195 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11196 (home-page "http://graphene-python.org/")
11197 (synopsis "GraphQL Framework for Python")
11198 (description
11199 "Graphene is a Python library for building GraphQL schemas/types.
11200 A GraphQL schema describes your data model, and provides a GraphQL server
11201 with an associated set of resolve methods that know how to fetch data.")
11202 (properties `((python2-variant . ,(delay python2-graphene))))
11203 (license license:expat)))
11204
11205 (define-public python2-graphene
11206 (let ((base (package-with-python2
11207 (strip-python2-variant python-graphene))))
11208 (package (inherit base)
11209 (native-inputs
11210 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11211 ,@(package-native-inputs base))))))
11212
11213 (define-public python-nautilus
11214 (package
11215 (name "python-nautilus")
11216 (version "0.4.9")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (pypi-uri "nautilus" version))
11221 (sha256
11222 (base32
11223 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11224 (build-system python-build-system)
11225 (arguments `(#:tests? #f)) ; fails to import test modules
11226 (propagated-inputs
11227 `(("python-bcrypt" ,python-bcrypt)
11228 ("python-click" ,python-click)
11229 ("python-consul" ,python-consul)
11230 ("python-graphene" ,python-graphene)
11231 ("python-jinja2" ,python-jinja2)
11232 ("python-peewee" ,python-peewee)
11233 ("python-pika" ,python-pika)
11234 ("python-tornado" ,python-tornado)
11235 ("python-wtforms" ,python-wtforms)))
11236 (native-inputs
11237 `(("python-nose2" ,python-nose2)))
11238 (home-page "https://github.com/AlecAivazis/nautilus")
11239 (synopsis "Library for creating microservice applications")
11240 (description
11241 "Nautilus is a framework for flux based microservices that looks to
11242 provide extendible implementations of common aspects of a cloud so that you can
11243 focus on building massively scalable web applications.")
11244 (license license:expat)))
11245
11246 (define-public python-snowballstemmer
11247 (package
11248 (name "python-snowballstemmer")
11249 (version "1.2.1")
11250 (source (origin
11251 (method url-fetch)
11252 (uri (pypi-uri "snowballstemmer" version))
11253 (sha256
11254 (base32
11255 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11256 (build-system python-build-system)
11257 (arguments
11258 `(;; No tests exist
11259 #:tests? #f))
11260 (home-page "https://github.com/shibukawa/snowball_py")
11261 (synopsis "Snowball stemming library collection for Python")
11262 (description "This package provides 16 word stemmer algorithms generated
11263 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11264 English stemmer.")
11265 (license license:bsd-3)))
11266
11267 (define-public python2-snowballstemmer
11268 (package-with-python2 python-snowballstemmer))
11269
11270 (define-public python-setproctitle
11271 (package
11272 (name "python-setproctitle")
11273 (version "1.1.10")
11274 (source
11275 (origin
11276 (method url-fetch)
11277 (uri (pypi-uri "setproctitle" version))
11278 (sha256
11279 (base32
11280 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11281 (build-system python-build-system)
11282 (arguments
11283 '(#:phases
11284 (modify-phases %standard-phases
11285 (add-before 'check 'patch-Makefile
11286 ;; Stricly this is only required for the python2 variant.
11287 ;; But adding a phase in an inherited package seems to be
11288 ;; cumbersum. So we patch even for python3.
11289 (lambda _
11290 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11291 (when nose
11292 (substitute* "Makefile"
11293 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11294 (string-append nose "/bin/nosetests "))))
11295 #t)))
11296 (replace 'check
11297 (lambda _
11298 (setenv "PYTHON" (or (which "python3") (which "python")))
11299 (setenv "PYCONFIG" (or (which "python3-config")
11300 (which "python-config")))
11301 (setenv "CC" "gcc")
11302 ;; No need to extend PYTHONPATH to find the built package, since
11303 ;; the Makefile will build anyway
11304 (invoke "make" "check"))))))
11305 (native-inputs
11306 `(("procps" ,procps))) ; required for tests
11307 (home-page
11308 "https://github.com/dvarrazzo/py-setproctitle")
11309 (synopsis
11310 "Setproctitle implementation for Python to customize the process title")
11311 (description "The library allows a process to change its title (as displayed
11312 by system tools such as ps and top).
11313
11314 Changing the title is mostly useful in multi-process systems, for
11315 example when a master process is forked: changing the children's title
11316 allows to identify the task each process is busy with. The technique
11317 is used by PostgreSQL and the OpenSSH Server for example.")
11318 (license license:bsd-3)
11319 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11320
11321 (define-public python2-setproctitle
11322 (let ((base (package-with-python2
11323 (strip-python2-variant python-setproctitle))))
11324 (package
11325 (inherit base)
11326 (native-inputs `(("python2-nose" ,python2-nose)
11327 ,@(package-native-inputs base))))))
11328
11329 (define-public python-validictory
11330 (package
11331 (name "python-validictory")
11332 (version "1.0.1")
11333 (source
11334 (origin
11335 (method url-fetch)
11336 (uri (pypi-uri "validictory" version))
11337 (sha256
11338 (base32
11339 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11340 (build-system python-build-system)
11341 (arguments
11342 '(#:phases
11343 (modify-phases %standard-phases
11344 (add-after 'unpack 'bootstrap
11345 ;; Move the tests out of the package directory to avoid
11346 ;; packaging them.
11347 (lambda* _
11348 (rename-file "validictory/tests" "tests")
11349 (delete-file "tests/__init__.py")))
11350 (replace 'check
11351 (lambda _
11352 ;; Extend PYTHONPATH so the built package will be found.
11353 (setenv "PYTHONPATH"
11354 (string-append (getcwd) "/build/lib:"
11355 (getenv "PYTHONPATH")))
11356 (invoke "py.test" "-vv" ))))))
11357 (native-inputs
11358 `(("python-pytest" ,python-pytest)))
11359 (home-page
11360 "https://github.com/jamesturk/validictory")
11361 (synopsis "General purpose Python data validator")
11362 (description "It allows validation of arbitrary Python data structures.
11363
11364 The schema format is based on the JSON Schema
11365 proposal (http://json-schema.org), so combined with json the library is also
11366 useful as a validator for JSON data.")
11367 (license license:expat)))
11368
11369 (define-public python2-validictory
11370 (package-with-python2 python-validictory))
11371
11372 (define-public python-pyelftools
11373 (package
11374 (name "python-pyelftools")
11375 (version "0.25")
11376 (source
11377 (origin
11378 (method url-fetch)
11379 (uri (pypi-uri "pyelftools" version))
11380 (sha256
11381 (base32
11382 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11383 (build-system python-build-system)
11384 (arguments
11385 `(#:phases
11386 (modify-phases %standard-phases
11387 (add-before 'check 'set-pythonpath
11388 (lambda _
11389 (setenv "PYTHONPATH"
11390 (string-append
11391 (getcwd) "/test/"
11392 ":" (getenv "PYTHONPATH")))
11393 #t)))))
11394 (home-page
11395 "https://github.com/eliben/pyelftools")
11396 (synopsis
11397 "Analyze binary and library file information")
11398 (description "This Python library provides interfaces for parsing and
11399 analyzing two binary and library file formats; the Executable and Linking
11400 Format (ELF), and debugging information in the Debugging With Attributed
11401 Record Format (DWARF).")
11402 (license license:public-domain)))
11403
11404 (define-public python-pyev
11405 (package
11406 (name "python-pyev")
11407 (version "0.9.0")
11408 (source
11409 (origin
11410 (method url-fetch)
11411 (uri (pypi-uri "pyev" version))
11412 (sha256
11413 (base32
11414 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11415 (build-system python-build-system)
11416 (arguments
11417 `(#:tests? #f ; no test suite
11418 #:phases
11419 (modify-phases %standard-phases
11420 (add-after 'unpack 'patch
11421 (lambda* (#:key inputs #:allow-other-keys)
11422 (let ((libev (string-append (assoc-ref inputs "libev")
11423 "/lib/libev.so.4")))
11424 (substitute* "setup.py"
11425 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11426 (string-append "libev_dll_name = \"" libev "\"")))))))))
11427 (inputs
11428 `(("libev" ,libev)))
11429 (home-page "http://pythonhosted.org/pyev/")
11430 (synopsis "Python libev interface")
11431 (description "Pyev provides a Python interface to libev.")
11432 (license license:gpl3)))
11433
11434 (define-public python2-pyev
11435 (package-with-python2 python-pyev))
11436
11437 (define-public python-imagesize
11438 (package
11439 (name "python-imagesize")
11440 (version "1.1.0")
11441 (source
11442 (origin
11443 (method url-fetch)
11444 (uri (pypi-uri "imagesize" version))
11445 (sha256
11446 (base32
11447 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11448 (build-system python-build-system)
11449 (home-page "https://github.com/shibukawa/imagesize_py")
11450 (synopsis "Gets image size of files in various formats in Python")
11451 (description
11452 "This package allows determination of image size from
11453 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11454 (license license:expat)))
11455
11456 (define-public python2-imagesize
11457 (package-with-python2 python-imagesize))
11458
11459 (define-public python-termstyle
11460 (package
11461 (name "python-termstyle")
11462 (version "0.1.11")
11463 (source
11464 (origin
11465 (method url-fetch)
11466 (uri (pypi-uri "termstyle" version))
11467 (sha256
11468 (base32
11469 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11470 (build-system python-build-system)
11471 (arguments
11472 '(#:phases
11473 (modify-phases %standard-phases
11474 (replace 'check
11475 (lambda _
11476 (invoke "python" "test3.py"))))))
11477 (home-page "https://github.com/gfxmonk/termstyle")
11478 (synopsis "Console text coloring for Python")
11479 (description "This package provides console text coloring for Python.")
11480 (license license:bsd-3)))
11481
11482 (define-public python-argcomplete
11483 (package
11484 (name "python-argcomplete")
11485 (version "1.7.0")
11486 (source
11487 (origin
11488 (method url-fetch)
11489 (uri (pypi-uri "argcomplete" version))
11490 (sha256
11491 (base32
11492 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11493 (build-system python-build-system)
11494 (native-inputs
11495 `(("python-pexpect" ,python-pexpect)
11496 ("tcsh" ,tcsh)
11497 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11498 (home-page "https://github.com/kislyuk/argcomplete")
11499 (synopsis "Shell tab completion for Python argparse")
11500 (description "argcomplete provides extensible command line tab completion
11501 of arguments and options for Python scripts using @code{argparse}. It's
11502 particularly useful for programs with many options or sub-parsers that can
11503 dynamically suggest completions; for example, when browsing resources over the
11504 network.")
11505 (license license:asl2.0)))
11506
11507 (define-public python2-argcomplete
11508 (package-with-python2 python-argcomplete))
11509
11510 (define-public python-xopen
11511 (package
11512 (name "python-xopen")
11513 (version "0.5.0")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "xopen" version))
11518 (sha256
11519 (base32
11520 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11521 (build-system python-build-system)
11522 (propagated-inputs
11523 `(("python-setuptools-scm" ,python-setuptools-scm)))
11524 (home-page "https://github.com/marcelm/xopen/")
11525 (synopsis "Open compressed files transparently")
11526 (description "This module provides an @code{xopen} function that works like
11527 Python's built-in @code{open} function, but can also deal with compressed files.
11528 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11529 recognized by their file extensions. The focus is on being as efficient as
11530 possible on all supported Python versions.")
11531 (license license:expat)))
11532
11533 (define-public python2-xopen
11534 (let ((base (package-with-python2
11535 (strip-python2-variant python-xopen))))
11536 (package
11537 (inherit base)
11538 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11539 ,@(package-propagated-inputs base))))))
11540
11541 (define-public python-cheetah
11542 (package
11543 (name "python-cheetah")
11544 (version "3.1.0")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "Cheetah3" version))
11549 (sha256
11550 (base32
11551 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11552 (build-system python-build-system)
11553 (arguments
11554 `(#:modules ((guix build utils)
11555 (guix build python-build-system)
11556 (ice-9 ftw)
11557 (srfi srfi-1)
11558 (srfi srfi-26))
11559 #:phases (modify-phases %standard-phases
11560 (add-after 'unpack 'use-absolute-python
11561 (lambda _
11562 (substitute* "Cheetah/CheetahWrapper.py"
11563 (("#!/usr/bin/env python")
11564 (string-append "#!" (which "python"))))
11565 #t))
11566 (replace 'check
11567 (lambda _
11568 (let ((cwd (getcwd)))
11569 (setenv "PYTHONPATH"
11570 (string-append
11571 cwd "/build/"
11572 (find (cut string-prefix? "lib" <>)
11573 (scandir (string-append cwd "/build")))
11574 ":" (getenv "PYTHONPATH")))
11575 (setenv "PATH"
11576 (string-append (getenv "PATH")
11577 ":" cwd "/bin"))
11578 (setenv "TMPDIR" "/tmp")
11579
11580 (substitute* "Cheetah/Tests/Test.py"
11581 (("unittest.TextTestRunner\\(\\)")
11582 "unittest.TextTestRunner(verbosity=2)"))
11583
11584 (invoke "python" "Cheetah/Tests/Test.py")))))))
11585 (propagated-inputs
11586 `(("python-markdown" ,python-markdown))) ;optional
11587 (home-page "http://cheetahtemplate.org/")
11588 (synopsis "Template engine")
11589 (description "Cheetah is a text-based template engine and Python code
11590 generator.
11591
11592 Cheetah can be used as a standalone templating utility or referenced as
11593 a library from other Python applications. It has many potential uses,
11594 but web developers looking for a viable alternative to ASP, JSP, PHP and
11595 PSP are expected to be its principle user group.
11596
11597 Features:
11598 @enumerate
11599 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11600 text-based format.
11601 @item Cleanly separates content, graphic design, and program code.
11602 @item Blends the power and flexibility of Python with a simple template language
11603 that non-programmers can understand.
11604 @item Gives template writers full access to any Python data structure, module,
11605 function, object, or method in their templates.
11606 @item Makes code reuse easy by providing an object-orientated interface to
11607 templates that is accessible from Python code or other Cheetah templates.
11608 One template can subclass another and selectively reimplement sections of it.
11609 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11610 improve the performance of a dynamic website.
11611 @item Compiles templates into optimized, yet readable, Python code.
11612 @end enumerate")
11613 (license (license:x11-style "file://LICENSE"))))
11614
11615 (define-public python2-cheetah
11616 (package-with-python2 python-cheetah))
11617
11618 (define-public python-dulwich
11619 (package
11620 (name "python-dulwich")
11621 (version "0.18.6")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 (uri (list (string-append "https://www.dulwich.io/releases/"
11626 "dulwich-" version ".tar.gz")
11627 (pypi-uri "dulwich" version)))
11628 (sha256
11629 (base32
11630 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11631 (build-system python-build-system)
11632 (arguments
11633 `(#:phases
11634 (modify-phases %standard-phases
11635 (add-before 'check 'fix-tests
11636 (lambda* (#:key inputs #:allow-other-keys)
11637 ;; The tests use Popen with a custom environment which doesn't
11638 ;; include PATH.
11639 (substitute* "dulwich/tests/compat/utils.py"
11640 (("'git'") (string-append "'"
11641 (which "git")
11642 "'")))
11643 (substitute* '("dulwich/tests/test_repository.py"
11644 "dulwich/tests/test_hooks.py")
11645 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11646 (setenv "TEST_RUNNER" "unittest")
11647 (setenv "PYTHONHASHSEED" "random")
11648 #t)))))
11649 (propagated-inputs
11650 `(("python-fastimport" ,python-fastimport)))
11651 (native-inputs
11652 `(("python-mock" ,python-mock)
11653 ("python-geventhttpclient" ,python-geventhttpclient)
11654 ("git" ,git)))
11655 (home-page "https://www.dulwich.io/")
11656 (synopsis "Git implementation in Python")
11657 (description "Dulwich is an implementation of the Git file formats and
11658 protocols written in pure Python.")
11659 ;; Can be used with either license.
11660 (license (list license:asl2.0 license:gpl2+))))
11661
11662 (define-public python2-dulwich
11663 (package-with-python2 python-dulwich))
11664
11665 (define-public python-pbkdf2
11666 (package
11667 (name "python-pbkdf2")
11668 (version "1.3")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "pbkdf2" version))
11673 (sha256
11674 (base32
11675 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11676 (build-system python-build-system)
11677 (arguments
11678 '(#:phases
11679 (modify-phases %standard-phases
11680 (replace 'check
11681 (lambda _
11682 (setenv "PYTHONPATH"
11683 (string-append (getcwd) "/build/lib:"
11684 (getenv "PYTHONPATH")))
11685 (invoke "python" "test/test_pbkdf2.py"))))))
11686 (propagated-inputs
11687 `(("python-pycrypto" ,python-pycrypto))) ; optional
11688 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11689 (synopsis "Password-based key derivation")
11690 (description "This module implements the password-based key derivation
11691 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11692
11693 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11694 is part of the RSA Public Key Cryptography Standards series. The provided
11695 implementation takes a password or a passphrase and a salt value (and
11696 optionally a iteration count, a digest module, and a MAC module) and provides
11697 a file-like object from which an arbitrarly-sized key can be read.")
11698 (license license:expat)))
11699
11700 (define-public python2-pbkdf2
11701 (package-with-python2 python-pbkdf2))
11702
11703 (define-public python-qrcode
11704 (package
11705 (name "python-qrcode")
11706 (version "6.1")
11707 (source
11708 (origin
11709 (method url-fetch)
11710 (uri (pypi-uri "qrcode" version))
11711 (sha256
11712 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11713 (build-system python-build-system)
11714 (arguments
11715 ;; FIXME: Tests require packaging 'pymaging'.
11716 '(#:tests? #f))
11717 (propagated-inputs
11718 `(("python-lxml" ,python-lxml) ; for SVG output
11719 ("python-pillow" ,python-pillow) ; for PNG output
11720 ("python-six" ,python-six)))
11721 (home-page "https://github.com/lincolnloop/python-qrcode")
11722 (synopsis "QR Code image generator")
11723 (description "This package provides a pure Python QR Code generator
11724 module. It uses the Python Imaging Library (PIL) to allow for the generation
11725 of QR Codes.
11726
11727 In addition this package provides a command line tool to generate QR codes and
11728 either write these QR codes to a file or do the output as ascii art at the
11729 console.")
11730 (license license:bsd-3)))
11731
11732 (define-public python2-qrcode
11733 (package-with-python2 python-qrcode))
11734
11735 (define-public python-rst2ansi
11736 (package
11737 (name "python-rst2ansi")
11738 (version "0.1.5")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "rst2ansi" version))
11743 (sha256
11744 (base32
11745 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11746 (build-system python-build-system)
11747 (propagated-inputs
11748 `(("python-docutils" ,python-docutils)))
11749 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11750 (synopsis "Convert RST to ANSI-decorated console output")
11751 (description
11752 "Python module dedicated to rendering RST (reStructuredText) documents
11753 to ansi-escaped strings suitable for display in a terminal.")
11754 (license license:expat)))
11755
11756 (define-public python-ansi2html
11757 (package
11758 (name "python-ansi2html")
11759 (version "1.2.0")
11760 (source
11761 (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "ansi2html" version))
11764 (sha256
11765 (base32
11766 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11767 (build-system python-build-system)
11768 (native-inputs
11769 `(("python-mock" ,python-mock)
11770 ("python-nose" ,python-nose)))
11771 (propagated-inputs
11772 `(("python-six" ,python-six)))
11773 (home-page "https://github.com/ralphbean/ansi2html")
11774 (synopsis "Convert ANSI-decorated console output to HTML")
11775 (description
11776 "@command{ansi2html} is a Python library and command line utility for
11777 convering text with ANSI color codes to HTML or LaTeX.")
11778 (license license:gpl3+)))
11779
11780 (define-public python2-ansi2html
11781 (package-with-python2 python-ansi2html))
11782
11783 (define-public python-ddt
11784 (package
11785 (name "python-ddt")
11786 (version "1.1.3")
11787 (source
11788 (origin
11789 (method url-fetch)
11790 (uri (pypi-uri "ddt" version))
11791 (sha256
11792 (base32
11793 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11794 (build-system python-build-system)
11795 (native-inputs
11796 `(("python-mock" ,python-mock)
11797 ("python-nose" ,python-nose)))
11798 (propagated-inputs
11799 `(("python-six" ,python-six)
11800 ("python-pyyaml" ,python-pyyaml)))
11801 (home-page "https://github.com/txels/ddt")
11802 (synopsis "Data-Driven Tests")
11803 (description
11804 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11805 running it with different test data, and make it appear as multiple test
11806 cases.")
11807 (license license:expat)))
11808
11809 (define-public python2-ddt
11810 (package-with-python2 python-ddt))
11811
11812 (define-public python-pycountry
11813 (package
11814 (name "python-pycountry")
11815 (version "18.5.26")
11816 (source
11817 (origin
11818 (method url-fetch)
11819 (uri (pypi-uri "pycountry" version))
11820 (sha256
11821 (base32
11822 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11823 (build-system python-build-system)
11824 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11825 (synopsis "ISO databases for languages, countries, currencies, etc.")
11826 (description
11827 "@code{pycountry} provides the ISO databases for the standards:
11828 @enumerate
11829 @item 639-3 (Languages)
11830 @item 3166 (Countries)
11831 @item 3166-3 (Deleted Countries)
11832 @item 3166-2 (Subdivisions of countries)
11833 @item 4217 (Currencies)
11834 @item 15924 (Scripts)
11835 @end enumerate
11836 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11837 through a Python API.")
11838 (license license:lgpl2.1+)))
11839
11840 (define-public python2-pycountry
11841 (package-with-python2 python-pycountry))
11842
11843 (define-public python-pycosat
11844 (package
11845 (name "python-pycosat")
11846 (version "0.6.1")
11847 (source
11848 (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "pycosat" version))
11851 (sha256
11852 (base32
11853 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11854 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11855 (build-system python-build-system)
11856 (home-page "https://github.com/ContinuumIO/pycosat")
11857 (synopsis "Bindings to picosat (a SAT solver)")
11858 (description
11859 "This package provides efficient Python bindings to @code{picosat} on
11860 the C level. When importing pycosat, the @code{picosat} solver becomes part
11861 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11862 Problem} (SAT) solver.")
11863 (license license:expat)))
11864
11865 (define-public python2-pycosat
11866 (package-with-python2 python-pycosat))
11867
11868 (define-public python2-ruamel.ordereddict
11869 (package
11870 (name "python2-ruamel.ordereddict")
11871 (version "0.4.9")
11872 (source
11873 (origin
11874 (method url-fetch)
11875 (uri (pypi-uri "ruamel.ordereddict" version))
11876 (sha256
11877 (base32
11878 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11879 (build-system python-build-system)
11880 (arguments
11881 `(#:python ,python-2
11882 #:phases
11883 (modify-phases %standard-phases
11884 (delete 'check)
11885 (add-after 'install 'check
11886 (lambda* (#:key inputs outputs #:allow-other-keys)
11887 (add-installed-pythonpath inputs outputs)
11888 (invoke "python" "test/testordereddict.py"))))))
11889 (home-page "https://bitbucket.org/ruamel/ordereddict")
11890 (synopsis "Version of dict that keeps keys in insertion order")
11891 (description
11892 "This is an implementation of an ordered dictionary with @dfn{Key
11893 Insertion Order} (KIO: updates of values do not affect the position of the
11894 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11895 removed and put at the back). The standard library module @code{OrderedDict},
11896 implemented later, implements a subset of @code{ordereddict} functionality.
11897 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11898 Order} (KSO, no sorting function can be specified, but a transform can be
11899 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11900 (license license:expat)))
11901
11902 (define-public python-pypeg2
11903 (package
11904 (name "python-pypeg2")
11905 (version "2.15.2")
11906 (source
11907 (origin
11908 (method url-fetch)
11909 (uri (pypi-uri "pyPEG2" version))
11910 (sha256
11911 (base32
11912 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11913 (build-system python-build-system)
11914 (propagated-inputs `(("python-lxml" ,python-lxml)))
11915 (arguments
11916 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11917 '(#:tests? #f))
11918 (home-page "https://fdik.org/pyPEG/")
11919 (synopsis "Parsering Expression Grammars in Python")
11920 (description "PyPEG is an intrinsic parser interpreter framework for
11921 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11922 parse many formal languages.")
11923 (license license:gpl2)))
11924
11925 (define-public python-incremental
11926 (package
11927 (name "python-incremental")
11928 (version "17.5.0")
11929 (source
11930 (origin
11931 (method url-fetch)
11932 (uri (pypi-uri "incremental" version))
11933 (sha256
11934 (base32
11935 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11936 (build-system python-build-system)
11937 (home-page "https://github.com/hawkowl/incremental")
11938 (synopsis "Library for versioning Python projects")
11939 (description "Incremental is a small library that versions your Python
11940 projects.")
11941 (license license:expat)))
11942
11943 (define-public python2-incremental
11944 (package-with-python2 python-incremental))
11945
11946 (define-public python-invoke
11947 (package
11948 (name "python-invoke")
11949 (home-page "http://www.pyinvoke.org/")
11950 (version "1.1.0")
11951 (source (origin
11952 (method url-fetch)
11953 (uri (pypi-uri "invoke" version))
11954 (sha256
11955 (base32
11956 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11957 (build-system python-build-system)
11958 (arguments
11959 ;; XXX: Requires many dependencies that are not yet in Guix.
11960 `(#:tests? #f))
11961 (synopsis "Pythonic task execution")
11962 (description
11963 "Invoke is a Python task execution tool and library, drawing inspiration
11964 from various sources to arrive at a powerful and clean feature set. It is
11965 evolved from the Fabric project, but focuses on local and abstract concerns
11966 instead of servers and network commands.")
11967 (license license:bsd-3)))
11968
11969 (define-public python2-invoke
11970 (package-with-python2 python-invoke))
11971
11972 (define-public python-automat
11973 (package
11974 (name "python-automat")
11975 (version "0.7.0")
11976 (source (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "Automat" version))
11979 (sha256
11980 (base32
11981 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11982 (build-system python-build-system)
11983 ;; We disable the tests because they require python-twisted, while
11984 ;; python-twisted depends on python-automat. Twisted is optional, but the
11985 ;; tests fail if it is not available. Also see
11986 ;; <https://github.com/glyph/automat/issues/71>.
11987 (arguments '(#:tests? #f))
11988 (native-inputs
11989 `(("python-m2r" ,python-m2r)
11990 ("python-setuptools-scm" ,python-setuptools-scm)
11991 ("python-graphviz" ,python-graphviz)))
11992 (propagated-inputs
11993 `(("python-six" ,python-six)
11994 ("python-attrs" ,python-attrs)))
11995 (home-page "https://github.com/glyph/Automat")
11996 (synopsis "Self-service finite-state machines")
11997 (description "Automat is a library for concise, idiomatic Python
11998 expression of finite-state automata (particularly deterministic finite-state
11999 transducers).")
12000 (license license:expat)))
12001
12002 (define-public python2-automat
12003 (package-with-python2 python-automat))
12004
12005 (define-public python-m2r
12006 (package
12007 (name "python-m2r")
12008 (version "0.2.1")
12009 (source (origin
12010 (method url-fetch)
12011 (uri (pypi-uri "m2r" version))
12012 (sha256
12013 (base32
12014 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12015 (build-system python-build-system)
12016 (propagated-inputs
12017 `(("python-docutils" ,python-docutils)
12018 ("python-mistune" ,python-mistune)))
12019 (native-inputs
12020 `(("python-pygments" ,python-pygments)
12021 ("python-mock" ,python-mock)))
12022 (home-page "https://github.com/miyakogi/m2r")
12023 (synopsis "Markdown to reStructuredText converter")
12024 (description "M2R converts a markdown file including reST markups to valid
12025 reST format.")
12026 (license license:expat)))
12027
12028 (define-public python2-m2r
12029 (package-with-python2 python-m2r))
12030
12031 (define-public python-constantly
12032 (package
12033 (name "python-constantly")
12034 (version "15.1.0")
12035 (source (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "constantly" version))
12038 (sha256
12039 (base32
12040 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12041 (build-system python-build-system)
12042 (home-page "https://github.com/twisted/constantly")
12043 (synopsis "Symbolic constants in Python")
12044 (description "Constantly is a Python library that provides symbolic
12045 constant support. It includes collections and constants with text, numeric,
12046 and bit flag values.")
12047 (license license:expat)))
12048
12049 (define-public python2-constantly
12050 (package-with-python2 python-constantly))
12051
12052 (define-public python-attrs
12053 (package
12054 (name "python-attrs")
12055 (version "19.1.0")
12056 (source (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "attrs" version))
12059 (sha256
12060 (base32
12061 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12062 (build-system python-build-system)
12063 (arguments
12064 `(#:modules ((guix build utils)
12065 (guix build python-build-system)
12066 (ice-9 ftw)
12067 (srfi srfi-1)
12068 (srfi srfi-26))
12069 #:phases (modify-phases %standard-phases
12070 (replace 'check
12071 (lambda _
12072 (let ((cwd (getcwd)))
12073 (setenv "PYTHONPATH"
12074 (string-append
12075 cwd "/build/"
12076 (find (cut string-prefix? "lib" <>)
12077 (scandir (string-append cwd "/build")))
12078 ":"
12079 (getenv "PYTHONPATH")))
12080 (invoke "python" "-m" "pytest")))))))
12081 (native-inputs
12082 `(("python-coverage" ,python-coverage)
12083 ("python-hypothesis" ,python-hypothesis)
12084 ("python-pympler" ,python-pympler)
12085 ("python-pytest" ,python-pytest)
12086 ("python-six" ,python-six)
12087 ("python-sphinx" ,python-sphinx)
12088 ("python-zope-interface" ,python-zope-interface)))
12089 (home-page "https://github.com/python-attrs/attrs/")
12090 (synopsis "Attributes without boilerplate")
12091 (description "@code{attrs} is a Python package with class decorators that
12092 ease the chores of implementing the most common attribute-related object
12093 protocols.")
12094 (license license:expat)))
12095
12096 (define-public python2-attrs
12097 (package-with-python2 python-attrs))
12098
12099 (define-public python-attrs-bootstrap
12100 (package
12101 (inherit python-attrs)
12102 (name "python-attrs-bootstrap")
12103 (native-inputs `())
12104 (arguments `(#:tests? #f))))
12105
12106 (define-public python2-attrs-bootstrap
12107 (package-with-python2 python-attrs-bootstrap))
12108
12109 (define-public python2-cliapp
12110 (package
12111 (name "python2-cliapp")
12112 (version "1.20180812.1")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (string-append
12117 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12118 version ".tar.gz"))
12119 (sha256
12120 (base32
12121 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12122 (build-system python-build-system)
12123 (arguments
12124 `(#:python ,python-2
12125 #:phases
12126 (modify-phases %standard-phases
12127 ;; check phase needs to be run before the build phase. If not,
12128 ;; coverage-test-runner looks for tests for the built source files,
12129 ;; and fails.
12130 (delete 'check)
12131 (add-before 'build 'check
12132 (lambda _
12133 ;; Disable python3 tests
12134 (substitute* "check"
12135 (("python3") "# python3"))
12136 (invoke "./check"))))))
12137 (native-inputs
12138 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12139 ("python2-pep8" ,python2-pep8)))
12140 (propagated-inputs
12141 `(("python2-pyaml" ,python2-pyaml)))
12142 (home-page "https://liw.fi/cliapp/")
12143 (synopsis "Python framework for command line programs")
12144 (description "@code{python2-cliapp} is a python framework for
12145 command line programs. It contains the typical stuff such programs
12146 need to do, such as parsing the command line for options, and
12147 iterating over input files.")
12148 (license license:gpl2+)))
12149
12150 (define-public python2-ttystatus
12151 (package
12152 (name "python2-ttystatus")
12153 (version "0.36")
12154 (source
12155 (origin
12156 (method url-fetch)
12157 (uri (string-append
12158 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12159 version ".tar.gz"))
12160 (sha256
12161 (base32
12162 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12163 (build-system python-build-system)
12164 (native-inputs
12165 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12166 ("python2-pep8" ,python2-pep8)))
12167 (arguments
12168 `(#:python ,python-2
12169 #:phases
12170 (modify-phases %standard-phases
12171 ;; check phase needs to be run before the build phase. If not,
12172 ;; coverage-test-runner looks for tests for the built source files,
12173 ;; and fails.
12174 (delete 'check)
12175 (add-before 'build 'check
12176 (lambda _ (invoke "make" "check"))))))
12177 (home-page "https://liw.fi/ttystatus/")
12178 (synopsis "Python library for showing progress reporting and
12179 status updates on terminals")
12180 (description "@code{python2-ttystatus} is a python library for
12181 showing progress reporting and status updates on terminals, for
12182 command line programs. Output is automatically adapted to the width
12183 of the terminal: truncated if it does not fit, and resized if the
12184 terminal size changes.")
12185 (license license:gpl3+)))
12186
12187 (define-public python2-tracing
12188 (package
12189 (name "python2-tracing")
12190 (version "0.10")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (string-append
12195 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12196 version ".tar.gz"))
12197 (sha256
12198 (base32
12199 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12200 (build-system python-build-system)
12201 (arguments
12202 `(#:python ,python-2))
12203 (home-page "https://liw.fi/tracing/")
12204 (synopsis "Python debug logging helper")
12205 (description "@code{python2-tracing} is a python library for
12206 logging debug messages. It provides a way to turn debugging messages
12207 on and off, based on the filename they occur in. It is much faster
12208 than using @code{logging.Filter} to accomplish the same thing, which
12209 matters when code is run in production mode. The actual logging still
12210 happens using the @code{logging} library.")
12211 (license license:gpl3+)))
12212
12213 (define-public python2-larch
12214 (package
12215 (name "python2-larch")
12216 (version "1.20151025")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (string-append
12221 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12222 version ".tar.gz"))
12223 (patches (search-patches
12224 "python2-larch-coverage-4.0a6-compatibility.patch"))
12225 (sha256
12226 (base32
12227 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12228 (build-system python-build-system)
12229 (arguments
12230 `(#:python ,python-2
12231 #:phases
12232 (modify-phases %standard-phases
12233 ;; check phase needs to be run before the build phase. If not,
12234 ;; coverage-test-runner looks for tests for the built source files,
12235 ;; and fails.
12236 (delete 'check)
12237 (add-before 'build 'check
12238 (lambda _ (invoke "make" "check"))))))
12239 (native-inputs
12240 `(("cmdtest" ,cmdtest)
12241 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12242 (propagated-inputs
12243 `(("python2-tracing" ,python2-tracing)))
12244 (home-page "https://liw.fi/larch/")
12245 (synopsis "Python copy-on-write B-tree library")
12246 (description "@code{python2-larch} is an implementation of
12247 particular kind of B-tree, based on research by Ohad Rodeh. See
12248 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12249 on the data structure.
12250
12251 The distinctive feature of this B-tree is that a node is never
12252 (conceptually) modified. Instead, all updates are done by
12253 copy-on-write. This makes it easy to clone a tree, and modify only the
12254 clone, while other processes access the original tree.")
12255 (license license:gpl3+)))
12256
12257 (define-public python-astroid
12258 (package
12259 (name "python-astroid")
12260 (version "2.1.0")
12261 (source
12262 (origin
12263 (method url-fetch)
12264 (uri (pypi-uri "astroid" version))
12265 (sha256
12266 (base32
12267 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12268 (build-system python-build-system)
12269 (propagated-inputs
12270 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12271 ("python-six" ,python-six)
12272 ("python-wrapt" ,python-wrapt)))
12273 (native-inputs
12274 `(("python-dateutil" ,python-dateutil)
12275 ("python-nose" ,python-nose)
12276 ("python-pytest" ,python-pytest)
12277 ("python-pytest-runner" ,python-pytest-runner)))
12278 (arguments
12279 `(#:phases
12280 (modify-phases %standard-phases
12281 (add-after 'unpack 'remove-spurious-test
12282 (lambda _
12283 ;; This can be removed after upgrading from python-3.7
12284 ;; https://github.com/PyCQA/astroid/issues/593
12285 ;; https://bugs.python.org/issue34056
12286 (delete-file "astroid/tests/unittest_modutils.py")
12287 #t))
12288 (replace 'check
12289 (lambda _
12290 (invoke "pytest" "astroid"))))))
12291 (home-page "https://github.com/PyCQA/astroid")
12292 (synopsis "Common base representation of python source code for pylint and
12293 other projects")
12294 (description "@code{python-astroid} provides a common base representation
12295 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12296
12297 It provides a compatible representation which comes from the _ast module. It
12298 rebuilds the tree generated by the builtin _ast module by recursively walking
12299 down the AST and building an extended ast. The new node classes have
12300 additional methods and attributes for different usages. They include some
12301 support for static inference and local name scopes. Furthermore, astroid
12302 builds partial trees by inspecting living objects.")
12303 (license license:lgpl2.1+)
12304 (properties `((python2-variant . ,(delay python2-astroid))))))
12305
12306 (define-public python2-astroid
12307 (let ((base (package-with-python2
12308 (strip-python2-variant python-astroid))))
12309 (package (inherit base)
12310 ;; Version 2.x removes python2 support.
12311 (version "1.6.5")
12312 (source
12313 (origin
12314 (method url-fetch)
12315 (uri (pypi-uri "astroid" version))
12316 (sha256
12317 (base32
12318 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12319 (arguments
12320 (substitute-keyword-arguments (package-arguments base)
12321 ((#:phases phases)
12322 `(modify-phases ,phases
12323 (add-after 'unpack 'remove-spurious-test
12324 (lambda _
12325 ;; https://github.com/PyCQA/astroid/issues/276
12326 (delete-file "astroid/tests/unittest_brain.py")
12327 #t))
12328 (replace 'check
12329 (lambda _
12330 (invoke"python" "-m" "unittest" "discover"
12331 "-p" "unittest*.py")))))))
12332 (native-inputs `())
12333 (propagated-inputs
12334 `(("python2-backports-functools-lru-cache"
12335 ,python2-backports-functools-lru-cache)
12336 ("python2-enum34" ,python2-enum34)
12337 ("python2-singledispatch" ,python2-singledispatch)
12338 ,@(package-propagated-inputs base))))))
12339
12340 (define-public python-isort
12341 (package
12342 (name "python-isort")
12343 (version "4.3.4")
12344 (source
12345 (origin
12346 (method git-fetch)
12347 (uri (git-reference
12348 ;; Tests pass only from the Github sources
12349 (url "https://github.com/timothycrosley/isort")
12350 (commit version)))
12351 (file-name (git-file-name name version))
12352 (sha256
12353 (base32
12354 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12355 (build-system python-build-system)
12356 (native-inputs
12357 `(("python-mock" ,python-mock)
12358 ("python-pytest" ,python-pytest)))
12359 (home-page "https://github.com/timothycrosley/isort")
12360 (synopsis "Python utility/library to sort python imports")
12361 (description "@code{python-isort} is a python utility/library to sort
12362 imports alphabetically, and automatically separated into sections. It
12363 provides a command line utility, a python library and plugins for various
12364 editors.")
12365 (license license:expat)
12366 (properties `((python2-variant . ,(delay python2-isort))))))
12367
12368 (define-public python2-isort
12369 (let ((base (package-with-python2
12370 (strip-python2-variant python-isort))))
12371 (package (inherit base)
12372 (native-inputs
12373 `(("python2-futures" ,python2-futures)
12374 ,@(package-native-inputs base))))))
12375
12376 (define-public python2-backports-functools-lru-cache
12377 (package
12378 (name "python2-backports-functools-lru-cache")
12379 (version "1.5")
12380 (source
12381 (origin
12382 (method url-fetch)
12383 ;; only the pypi tarballs contain the necessary metadata
12384 (uri (pypi-uri "backports.functools_lru_cache" version))
12385 (sha256
12386 (base32
12387 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12388 (build-system python-build-system)
12389 (native-inputs
12390 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12391 (arguments
12392 `(#:python ,python-2))
12393 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12394 (synopsis "Backport of functools.lru_cache from Python 3.3")
12395 (description "@code{python2-backports-functools-lru-cache} is a backport
12396 of @code{functools.lru_cache} from python 3.3.")
12397 (license license:expat)))
12398
12399 (define-public python-configparser
12400 (package
12401 (name "python-configparser")
12402 (version "3.7.1")
12403 (source
12404 (origin
12405 (method url-fetch)
12406 (uri (pypi-uri "configparser" version))
12407 (sha256
12408 (base32
12409 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12410 (build-system python-build-system)
12411 (home-page "https://github.com/jaraco/configparser/")
12412 (synopsis "Backport of configparser from python 3.5")
12413 (description "@code{python-configparser} is a backport of
12414 @code{configparser} from Python 3.5 so that it can be used directly
12415 in other versions.")
12416 (license license:expat)))
12417
12418 (define-public python2-configparser
12419 (package-with-python2 python-configparser))
12420
12421 (define-public python-mando
12422 (package
12423 (name "python-mando")
12424 (version "0.6.4")
12425 (source (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "mando" version))
12428 (sha256
12429 (base32
12430 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12431 (build-system python-build-system)
12432 (propagated-inputs
12433 `(("python-rst2ansi" ,python-rst2ansi)
12434 ("python-six" ,python-six)))
12435 (native-inputs
12436 `(("python-pytest" ,python-pytest)))
12437 (home-page "https://mando.readthedocs.org/")
12438 (synopsis
12439 "Wrapper around argparse, allowing creation of complete CLI applications")
12440 (description
12441 "This package is a wrapper around argparse, allowing you to write complete CLI
12442 applications in seconds while maintaining all the flexibility.")
12443 (license license:expat)))
12444
12445 (define-public python2-mando
12446 (package-with-python2 python-mando))
12447
12448 (define-public python2-argparse
12449 (package
12450 (name "python2-argparse")
12451 (version "1.4.0")
12452 (source
12453 (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "argparse" version))
12456 (sha256
12457 (base32
12458 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12459 (build-system python-build-system)
12460 (arguments
12461 `(#:python ,python-2))
12462 (home-page "https://github.com/ThomasWaldmann/argparse/")
12463 (synopsis "Python command-line parsing library")
12464 (description
12465 "This package is mostly for people who want to have @code{argparse} on
12466 older Pythons because it was not part of the standard library back then.")
12467 (license license:psfl)))
12468
12469 (define-public python-fudge
12470 (package
12471 (name "python-fudge")
12472 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12473 ;; package, which is currently the only use of this package.
12474 (version "0.9.6")
12475 (source
12476 (origin
12477 (method url-fetch)
12478 (uri (pypi-uri "fudge" version))
12479 (sha256
12480 (base32
12481 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12482 (build-system python-build-system)
12483 (arguments
12484 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12485 (home-page "https://github.com/fudge-py/fudge")
12486 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12487 (description
12488 "Fudge is a Python module for using fake objects (mocks and stubs) to
12489 test real ones.
12490
12491 In readable Python code, you declare the methods available on your fake object
12492 and how they should be called. Then you inject that into your application and
12493 start testing. This declarative approach means you don’t have to record and
12494 playback actions and you don’t have to inspect your fakes after running code.
12495 If the fake object was used incorrectly then you’ll see an informative
12496 exception message with a traceback that points to the culprit.")
12497 (license license:expat)))
12498
12499 (define-public python2-fudge
12500 (package-with-python2 python-fudge))
12501
12502 (define-public python-mwclient
12503 (package
12504 (name "python-mwclient")
12505 (version "0.8.4")
12506 (source
12507 (origin
12508 (method url-fetch)
12509 ;; The PyPI version wouldn't contain tests.
12510 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12511 "v" version ".tar.gz"))
12512 (file-name (string-append name "-" version ".tar.gz"))
12513 (sha256
12514 (base32
12515 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12516 (build-system python-build-system)
12517 (propagated-inputs
12518 `(("python-requests" ,python-requests)
12519 ("python-requests-oauthlib"
12520 ,python-requests-oauthlib)
12521 ("python-six" ,python-six)))
12522 (native-inputs
12523 `(("python-mock" ,python-mock)
12524 ("python-pytest" ,python-pytest)
12525 ("python-pytest-pep8" ,python-pytest-pep8)
12526 ("python-pytest-cache" ,python-pytest-cache)
12527 ("python-pytest-cov" ,python-pytest-cov)
12528 ("python-responses" ,python-responses)))
12529 (home-page "https://github.com/btongminh/mwclient")
12530 (synopsis "MediaWiki API client")
12531 (description "This package provides a MediaWiki API client.")
12532 (license license:expat)))
12533
12534 (define-public python2-mwclient
12535 (package-with-python2 python-mwclient))
12536
12537 (define-public python-utils
12538 (package
12539 (name "python-utils")
12540 (version "2.1.0")
12541 (source (origin
12542 (method url-fetch)
12543 (uri (pypi-uri "python-utils" version))
12544 (sha256
12545 (base32
12546 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12547 (build-system python-build-system)
12548 (native-inputs
12549 `(("pytest-runner" ,python-pytest-runner)
12550 ("pytest" ,python-pytest)
12551 ("six" ,python-six)))
12552 (home-page "https://github.com/WoLpH/python-utils")
12553 (synopsis "Convenient utilities not included with the standard Python install")
12554 (description
12555 "Python Utils is a collection of small Python functions and classes which
12556 make common patterns shorter and easier.")
12557 (license license:bsd-2)))
12558
12559 (define-public python2-utils
12560 (package-with-python2 python-utils))
12561
12562 (define-public python-diff-match-patch
12563 (package
12564 (name "python-diff-match-patch")
12565 (version "20121119")
12566 (source
12567 (origin
12568 (method url-fetch)
12569 (uri (pypi-uri "diff-match-patch" version))
12570 (sha256
12571 (base32
12572 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12573 (build-system python-build-system)
12574 (home-page "https://code.google.com/p/google-diff-match-patch")
12575 (synopsis "Synchronize plain text")
12576 (description "Diff Match and Patch libraries offer robust algorithms to
12577 perform the operations required for synchronizing plain text.")
12578 (license license:asl2.0)))
12579
12580 (define-public python2-diff-match-patch
12581 (package-with-python2 python-diff-match-patch))
12582
12583 (define-public python-dirsync
12584 (package
12585 (name "python-dirsync")
12586 (version "2.2.3")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "dirsync" version))
12591 (sha256
12592 (base32
12593 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12594 (build-system python-build-system)
12595 (propagated-inputs
12596 `(("six" ,python-six)))
12597 (home-page "https://bitbucket.org/tkhyn/dirsync")
12598 (synopsis "Advanced directory tree synchronisation tool")
12599 (description "Advanced directory tree synchronisation tool.")
12600 (license license:expat)))
12601
12602 (define-public python2-dirsync
12603 (package-with-python2 python-dirsync))
12604
12605 (define-public python-levenshtein
12606 (package
12607 (name "python-levenshtein")
12608 (version "0.12.0")
12609 (source
12610 (origin
12611 (method url-fetch)
12612 (uri (pypi-uri "python-Levenshtein" version))
12613 (sha256
12614 (base32
12615 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12616 (build-system python-build-system)
12617 (home-page "https://github.com/ztane/python-Levenshtein")
12618 (synopsis "Fast computation of Levenshtein distance and string similarity")
12619 (description
12620 "The Levenshtein Python C extension module contains functions for fast computation of
12621 @enumerate
12622 @item Levenshtein (edit) distance, and edit operations
12623 @item string similarity
12624 @item approximate median strings, and generally string averaging
12625 @item string sequence and set similarity
12626 @end enumerate
12627 It supports both normal and Unicode strings.")
12628 (license license:gpl2+)))
12629
12630 (define-public python2-levenshtein
12631 (package-with-python2 python-levenshtein))
12632
12633 (define-public python-scandir
12634 (package
12635 (name "python-scandir")
12636 (version "1.9.0")
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (pypi-uri "scandir" version))
12641 (sha256
12642 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12643 (build-system python-build-system)
12644 (arguments
12645 `(#:phases (modify-phases %standard-phases
12646 (replace 'check
12647 (lambda _
12648 (invoke "python" "test/run_tests.py"))))))
12649 (home-page "https://github.com/benhoyt/scandir")
12650 (synopsis "Directory iteration function")
12651 (description
12652 "Directory iteration function like os.listdir(), except that instead of
12653 returning a list of bare filenames, it yields DirEntry objects that include
12654 file type and stat information along with the name. Using scandir() increases
12655 the speed of os.walk() by 2-20 times (depending on the platform and file
12656 system) by avoiding unnecessary calls to os.stat() in most cases.
12657
12658 This package is part of the Python standard library since version 3.5.")
12659 (license license:bsd-3)))
12660
12661 (define-public python2-scandir
12662 (package-with-python2 python-scandir))
12663
12664 (define-public python2-stemming
12665 (package
12666 (name "python2-stemming")
12667 (version "1.0.1")
12668 (source
12669 (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "stemming" version))
12672 (sha256
12673 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12674 (build-system python-build-system)
12675 (arguments
12676 `(#:python ,python-2))
12677 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12678 (synopsis "Python implementations of various stemming algorithms")
12679 (description
12680 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12681 stemming algorithms for English. These implementations are straightforward and
12682 efficient, unlike some Python versions of the same algorithms available on the
12683 Web. This package is an extraction of the stemming code included in the Whoosh
12684 search engine.")
12685 (license license:public-domain)))
12686
12687 (define-public python-factory-boy
12688 (package
12689 (name "python-factory-boy")
12690 (version "2.8.1")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "factory_boy" version))
12695 (sha256
12696 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12697 (build-system python-build-system)
12698 (arguments
12699 ;; Tests are not included in the tarball.
12700 `(#:tests? #f))
12701 (propagated-inputs
12702 `(("faker" ,python-faker)))
12703 (home-page "https://github.com/benhoyt/scandir")
12704 (synopsis "Versatile test fixtures replacement")
12705 (description
12706 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12707
12708 As a fixtures replacement tool, it aims to replace static, hard to maintain
12709 fixtures with easy-to-use factories for complex object.
12710
12711 Instead of building an exhaustive test setup with every possible combination
12712 of corner cases, factory_boy allows you to use objects customized for the
12713 current test, while only declaring the test-specific fields")
12714 (license license:expat)))
12715
12716 (define-public python2-factory-boy
12717 (package-with-python2 python-factory-boy))
12718
12719 (define-public python-translate-toolkit
12720 (package
12721 (name "python-translate-toolkit")
12722 (version "2.1.0")
12723 (source
12724 (origin
12725 (method url-fetch)
12726 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12727 (sha256
12728 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12729 (build-system python-build-system)
12730 (native-inputs
12731 `(("python-pytest" ,python-pytest)
12732 ("python-sphinx" ,python-sphinx)))
12733 (propagated-inputs
12734 `(("python-babel" ,python-babel)
12735 ("python-beautifulsoup4" ,python-beautifulsoup4)
12736 ("python-chardet" ,python-chardet)
12737 ("python-diff-match-patch" ,python-diff-match-patch)
12738 ("python-levenshtein" ,python-levenshtein)
12739 ("python-lxml" ,python-lxml)
12740 ("python-six" ,python-six)
12741 ("python-vobject" ,python-vobject)
12742 ("python-pyyaml" ,python-pyyaml)))
12743 (arguments
12744 ;; TODO: tests are not run, because they end with
12745 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12746 ;; 'parse_funcs'
12747 ;; during test setup.
12748 `(#:tests? #f))
12749 (home-page "https://toolkit.translatehouse.org")
12750 (synopsis "Tools and API for translation and localization engineering")
12751 (description
12752 "Tools and API for translation and localization engineering. It contains
12753 several utilities, as well as an API for building localization tools.")
12754 (license license:gpl2+)))
12755
12756 (define-public python2-translate-toolkit
12757 (package-with-python2 python-translate-toolkit))
12758
12759 (define-public python-packaging
12760 (package
12761 (name "python-packaging")
12762 (version "19.0")
12763 (source
12764 (origin
12765 (method url-fetch)
12766 (uri (pypi-uri "packaging" version))
12767 (sha256
12768 (base32
12769 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12770 (build-system python-build-system)
12771 (arguments
12772 `(#:phases (modify-phases %standard-phases
12773 (replace 'check
12774 (lambda _ (invoke "py.test" "-vv"))))))
12775 (native-inputs
12776 `(("python-pretend" ,python-pretend)
12777 ("python-pytest" ,python-pytest)))
12778 (propagated-inputs
12779 `(("python-pyparsing" ,python-pyparsing)
12780 ("python-six" ,python-six)))
12781 (home-page "https://github.com/pypa/packaging")
12782 (synopsis "Core utilities for Python packages")
12783 (description "Packaging is a Python module for dealing with Python packages.
12784 It offers an interface for working with package versions, names, and dependency
12785 information.")
12786 ;; From 'LICENSE': This software is made available under the terms of
12787 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12788 ;; Contributions to this software is made under the terms of *both* these
12789 ;; licenses.
12790 (license (list license:asl2.0 license:bsd-2))))
12791
12792 (define-public python2-packaging
12793 (package-with-python2 python-packaging))
12794
12795 (define-public python-relatorio
12796 (package
12797 (name "python-relatorio")
12798 (version "0.8.0")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "relatorio" version))
12803 (sha256
12804 (base32
12805 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12806 (build-system python-build-system)
12807 (propagated-inputs
12808 `(("python-lxml" ,python-lxml)
12809 ("python-genshi" ,python-genshi)))
12810 (native-inputs
12811 `(("python-magic" ,python-magic)))
12812 (home-page "https://relatorio.tryton.org/")
12813 (synopsis "Templating library able to output ODT and PDF files")
12814 (description "Relatorio is a templating library which provides a way to
12815 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12816 for more filetypes can be easily added by creating plugins for them.")
12817 (license license:gpl3+)))
12818
12819 (define-public python2-relatorio
12820 (package-with-python2 python-relatorio))
12821
12822 (define-public python-radon
12823 (package
12824 (name "python-radon")
12825 (version "2.2.0")
12826 (source
12827 (origin
12828 (method url-fetch)
12829 (uri (pypi-uri "radon" version))
12830 (sha256
12831 (base32
12832 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12833 (build-system python-build-system)
12834 (arguments
12835 `(#:phases (modify-phases %standard-phases
12836 (replace 'check
12837 (lambda _
12838 (invoke "python" "radon/tests/run.py"))))))
12839 (propagated-inputs
12840 `(("python-colorama" ,python-colorama)
12841 ("python-flake8-polyfill" ,python-flake8-polyfill)
12842 ("python-mando" ,python-mando)))
12843 (native-inputs
12844 `(("python-pytest" ,python-pytest)
12845 ("python-pytest-mock" ,python-pytest-mock)))
12846 (home-page "https://radon.readthedocs.org/")
12847 (synopsis "Code Metrics in Python")
12848 (description "Radon is a Python tool which computes various code metrics.
12849 Supported metrics are:
12850 @itemize @bullet
12851 @item raw metrics: SLOC, comment lines, blank lines, &c.
12852 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12853 @item Halstead metrics (all of them)
12854 @item the Maintainability Index (a Visual Studio metric)
12855 @end itemize")
12856 (license license:expat)))
12857
12858 (define-public python2-radon
12859 (package-with-python2 python-radon))
12860
12861 (define-public python-sure
12862 (package
12863 (name "python-sure")
12864 (version "1.4.11")
12865 (source
12866 (origin
12867 (method url-fetch)
12868 (uri (pypi-uri "sure" version))
12869 (sha256
12870 (base32
12871 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12872 (build-system python-build-system)
12873 (propagated-inputs
12874 `(("python-mock" ,python-mock)
12875 ("python-six" ,python-six)))
12876 (native-inputs
12877 `(("python-nose" ,python-nose)))
12878 (home-page "https://github.com/gabrielfalcao/sure")
12879 (synopsis "Automated testing library in python for python")
12880 (description
12881 "Sure is a python library that leverages a DSL for writing assertions.
12882 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12883 (license license:gpl3+)))
12884
12885 (define-public python2-sure
12886 (package-with-python2 python-sure))
12887
12888 (define-public python2-couleur
12889 ;; This package does not seem to support python3 at all, hence,
12890 ;; only the python2 variant definition is provided.
12891 (package
12892 (name "python2-couleur")
12893 (version "0.6.2")
12894 (source
12895 (origin
12896 (method url-fetch)
12897 (uri (pypi-uri "couleur" version))
12898 (sha256
12899 (base32
12900 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12901 (build-system python-build-system)
12902 (arguments
12903 `(#:python ,python-2))
12904 (home-page "https://github.com/gabrielfalcao/couleur")
12905 (synopsis
12906 "ANSI terminal tool for python, colored shell and other handy fancy features")
12907 (description
12908 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12909 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12910 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12911 ;; https://github.com/gabrielfalcao/couleur/issues/11
12912 (license license:lgpl3+)))
12913
12914 (define-public python-misaka
12915 (package
12916 (name "python-misaka")
12917 (version "2.1.1")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "misaka" version))
12922 (sha256
12923 (base32
12924 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12925 (build-system python-build-system)
12926 (arguments
12927 `(;; Line 37 of setup.py calls self.run_command('develop')
12928 ;; in the 'check' phase. This command seems to be trying
12929 ;; to write to
12930 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12931 ;; for which it does not have the permission to write.
12932 #:tests? #f))
12933 (propagated-inputs
12934 `(("python-cffi" ,python-cffi)))
12935 (home-page "https://github.com/FSX/misaka")
12936 (synopsis "Python binding for Hoedown")
12937 (description
12938 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12939 library written in C. It features a fast HTML renderer and functionality to make custom
12940 renderers (e.g. man pages or LaTeX).")
12941 (license license:expat)))
12942
12943 (define-public python2-misaka
12944 (package-with-python2 python-misaka))
12945
12946 (define-public python2-steadymark
12947 ;; This is forced into being a python2 only variant
12948 ;; due to its dependence on couleur that has no support
12949 ;; for python3
12950 (package
12951 (name "python2-steadymark")
12952 (version "0.7.3")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "steadymark" version))
12957 (sha256
12958 (base32
12959 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12960 (build-system python-build-system)
12961 (native-inputs
12962 `(("python-couleur" ,python2-couleur)
12963 ("python-sure" ,python2-sure)
12964 ("python-misaka" ,python2-misaka)))
12965 (arguments
12966 `(#:python ,python-2
12967 #:phases
12968 (modify-phases %standard-phases
12969 (add-before 'build 'patch-setup-py
12970 (lambda _
12971 ;; Update requirements from dependency==version
12972 ;; to dependency>=version
12973 (substitute* "setup.py"
12974 (("==") ">="))
12975 #t)))))
12976 (home-page "https://github.com/gabrielfalcao/steadymark")
12977 (synopsis "Markdown-based test runner for python")
12978 (description
12979 "@code{Steadymark} allows documentation to be written in github-flavoured
12980 markdown. The documentation may contain snippets of code surrounded by python
12981 code blocks and @code{Steadymark} will find these snippets and run them, making
12982 sure that there are no old malfunctional examples in the documentation examples.")
12983 (license license:expat)))
12984
12985 (define-public python-jsonpointer
12986 (package
12987 (name "python-jsonpointer")
12988 (version "1.10")
12989 (source
12990 (origin
12991 (method url-fetch)
12992 (uri (pypi-uri "jsonpointer" version))
12993 (sha256
12994 (base32
12995 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12996 (build-system python-build-system)
12997 (home-page "https://github.com/stefankoegl/python-json-pointer")
12998 (synopsis "Identify specific nodes in a JSON document")
12999 (description "@code{jsonpointer} allows you to access specific nodes
13000 by path in a JSON document (see RFC 6901).")
13001 (license license:bsd-3)))
13002
13003 (define-public python2-jsonpointer
13004 (package-with-python2 python-jsonpointer))
13005
13006 (define-public python-jsonpatch
13007 (package
13008 (name "python-jsonpatch")
13009 (version "1.16")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 ;; pypi version lacks tests.js
13014 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13015 "archive/v" version ".tar.gz"))
13016 (file-name (string-append name "-" version ".tar.gz"))
13017 (sha256
13018 (base32
13019 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13020 (build-system python-build-system)
13021 (native-inputs
13022 `(("python-jsonpointer" ,python-jsonpointer)))
13023 (home-page "https://github.com/stefankoegl/python-json-patch")
13024 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13025 (description "@code{jsonpatch} is a library and program that allows
13026 applying JSON Patches according to RFC 6902.")
13027 (license license:bsd-3)))
13028
13029 (define-public python2-jsonpatch
13030 (package-with-python2 python-jsonpatch))
13031
13032 (define-public python-jsonpatch-0.4
13033 (package (inherit python-jsonpatch)
13034 (name "python-jsonpatch")
13035 (version "0.4")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13040 "archive/v" version ".tar.gz"))
13041 (file-name (string-append name "-" version ".tar.gz"))
13042 (sha256
13043 (base32
13044 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13045
13046 (define-public python2-jsonpatch-0.4
13047 (package-with-python2 python-jsonpatch-0.4))
13048
13049 (define-public python-rfc3986
13050 (package
13051 (name "python-rfc3986")
13052 (version "1.1.0")
13053 (source (origin
13054 (method url-fetch)
13055 (uri (pypi-uri "rfc3986" version))
13056 (sha256
13057 (base32
13058 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13059 (build-system python-build-system)
13060 (arguments
13061 `(#:modules ((guix build utils)
13062 (guix build python-build-system)
13063 (ice-9 ftw)
13064 (srfi srfi-1)
13065 (srfi srfi-26))
13066 #:phases
13067 (modify-phases %standard-phases
13068 (replace 'check
13069 (lambda _
13070 (let ((cwd (getcwd)))
13071 (setenv "PYTHONPATH"
13072 (string-append cwd "/build/"
13073 (find (cut string-prefix? "lib" <>)
13074 (scandir (string-append cwd "/build")))
13075 ":"
13076 (getenv "PYTHONPATH")))
13077 (invoke "pytest" "-v")))))))
13078 (native-inputs
13079 `(("python-pytest" ,python-pytest)))
13080 (home-page "https://rfc3986.readthedocs.io/")
13081 (synopsis "Parse and validate URI references")
13082 (description
13083 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13084 validation and authority parsing. This module also supports RFC@tie{}6874
13085 which adds support for zone identifiers to IPv6 addresses.")
13086 (license license:asl2.0)))
13087
13088 (define-public python2-rfc3986
13089 (package-with-python2 python-rfc3986))
13090
13091 (define-public python-rfc3987
13092 (package
13093 (name "python-rfc3987")
13094 (version "1.3.7")
13095 (source
13096 (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "rfc3987" version))
13099 (sha256
13100 (base32
13101 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13102 (build-system python-build-system)
13103 (home-page "https://pypi.python.org/pypi/rfc3987")
13104 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13105 (description "@code{rfc3987} provides routines for parsing and
13106 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13107 (license license:gpl3+)))
13108
13109 (define-public python2-rfc3987
13110 (package-with-python2 python-rfc3987))
13111
13112 (define-public python-validate-email
13113 (package
13114 (name "python-validate-email")
13115 (version "1.3")
13116 (source
13117 (origin
13118 (method url-fetch)
13119 (uri (pypi-uri "validate_email" version))
13120 (sha256
13121 (base32
13122 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13123 (build-system python-build-system)
13124 (home-page "https://github.com/syrusakbary/validate_email")
13125 (synopsis "Verifies if an email address is valid and really exists")
13126 (description "@code{validate_email} can be used to verify if an email
13127 address is valid and really exists.")
13128 (license license:lgpl3+)))
13129
13130 (define-public python2-validate-email
13131 (package-with-python2 python-validate-email))
13132
13133 (define-public python-flex
13134 (package
13135 (name "python-flex")
13136 (version "6.10.0")
13137 (source
13138 (origin
13139 (method url-fetch)
13140 (uri (pypi-uri "flex" version))
13141 (sha256
13142 (base32
13143 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13144 (build-system python-build-system)
13145 (propagated-inputs
13146 `(("python-click" ,python-click)
13147 ("python-iso8601" ,python-iso8601)
13148 ("python-jsonpointer" ,python-jsonpointer)
13149 ("python-pyyaml" ,python-pyyaml)
13150 ("python-requests" ,python-requests)
13151 ("python-rfc3987" ,python-rfc3987)
13152 ("python-six" ,python-six)
13153 ("python-validate-email" ,python-validate-email)))
13154 (home-page "https://github.com/pipermerriam/flex")
13155 (synopsis "Validates Swagger schemata")
13156 (description "@code{flex} can be used to validate Swagger schemata.")
13157 (license license:bsd-3)))
13158
13159 (define-public python2-flex
13160 (package-with-python2 python-flex))
13161
13162 (define-public python-marshmallow
13163 (package
13164 (name "python-marshmallow")
13165 (version "3.0.0b14")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (pypi-uri "marshmallow" version))
13170 (sha256
13171 (base32
13172 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13173 (build-system python-build-system)
13174 (propagated-inputs
13175 `(("python-dateutil" ,python-dateutil)
13176 ("python-simplejson" ,python-simplejson)))
13177 (native-inputs
13178 `(("python-pytest" ,python-pytest)
13179 ("python-pytz" ,python-pytz)))
13180 (home-page "https://github.com/marshmallow-code/marshmallow")
13181 (synopsis "Convert complex datatypes to and from native
13182 Python datatypes.")
13183 (description "@code{marshmallow} provides a library for converting
13184 complex datatypes to and from native Python datatypes.")
13185 (license license:expat)))
13186
13187 (define-public python2-marshmallow
13188 (package-with-python2 python-marshmallow))
13189
13190 (define-public python-apispec
13191 (package
13192 (name "python-apispec")
13193 (version "0.25.3")
13194 (source
13195 (origin
13196 (method url-fetch)
13197 (uri (pypi-uri "apispec" version))
13198 (sha256
13199 (base32
13200 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13201 (build-system python-build-system)
13202 (propagated-inputs
13203 `(("python-pyyaml" ,python-pyyaml)))
13204 (native-inputs
13205 `(("python-pytest" ,python-pytest)
13206 ("python-flask" ,python-flask)
13207 ("python-marshmallow" ,python-marshmallow)
13208 ("python-tornado" ,python-tornado)
13209 ("python-bottle" ,python-bottle)
13210 ("python-mock" ,python-mock)))
13211 (home-page "https://github.com/marshmallow-code/apispec")
13212 (synopsis "Swagger 2.0 API specification generator")
13213 (description "@code{python-apispec} is a pluggable API specification
13214 generator. Currently supports the OpenAPI specification (f.k.a.
13215 Swagger 2.0).")
13216 (license license:expat)))
13217
13218 (define-public python2-apispec
13219 (package-with-python2 python-apispec))
13220
13221 (define-public python-flasgger
13222 (package
13223 (name "python-flasgger")
13224 (version "0.6.3")
13225 (source
13226 (origin
13227 (method git-fetch)
13228 (uri (git-reference
13229 (url "https://github.com/rochacbruno/flasgger.git")
13230 (commit version)))
13231 (file-name (git-file-name name version))
13232 (sha256
13233 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13234 (build-system python-build-system)
13235 (arguments
13236 `(#:phases
13237 (modify-phases %standard-phases
13238 (replace 'check
13239 (lambda* (#:key inputs outputs #:allow-other-keys)
13240 (substitute* "Makefile"
13241 (("flake8 flasgger --ignore=F403")
13242 "flake8 flasgger --ignore=E731,F403"))
13243 (setenv "PYTHONPATH" (string-append (getcwd)
13244 ":"
13245 (getenv "PYTHONPATH")))
13246 (invoke "py.test"))))))
13247 (propagated-inputs
13248 `(("python-flask" ,python-flask)
13249 ("python-pyyaml" ,python-pyyaml)
13250 ("python-jsonschema" ,python-jsonschema)
13251 ("python-mistune" ,python-mistune)
13252 ("python-six" ,python-six)))
13253 (native-inputs
13254 `(("python-decorator" ,python-decorator)
13255 ("python-flake8" ,python-flake8)
13256 ("python-flask-restful" ,python-flask-restful)
13257 ("python-flex" ,python-flex)
13258 ("python-pytest" ,python-pytest)
13259 ("python-pytest-cov" ,python-pytest-cov)
13260 ("python-marshmallow" ,python-marshmallow)
13261 ("python-apispec" ,python-apispec)))
13262 (home-page "https://github.com/rochacbruno/flasgger/")
13263 (synopsis "Extract Swagger specs from your Flask project")
13264 (description "@code{python-flasgger} allows extracting Swagger specs
13265 from your Flask project. It is a fork of Flask-Swagger.")
13266 (license license:expat)))
13267
13268 (define-public python2-flasgger
13269 (package-with-python2 python-flasgger))
13270
13271 (define-public python-swagger-spec-validator
13272 (package
13273 (name "python-swagger-spec-validator")
13274 (version "2.4.3")
13275 (source
13276 (origin
13277 (method url-fetch)
13278 (uri (pypi-uri "swagger-spec-validator" version))
13279 (sha256
13280 (base32
13281 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13282 (build-system python-build-system)
13283 (propagated-inputs
13284 `(("python-jsonschema" ,python-jsonschema)
13285 ("python-pyyaml" ,python-pyyaml)
13286 ("python-six" ,python-six)))
13287 (home-page
13288 "https://github.com/Yelp/swagger_spec_validator")
13289 (synopsis "Validation of Swagger specifications")
13290 (description "@code{swagger_spec_validator} provides a library for
13291 validating Swagger API specifications.")
13292 (license license:asl2.0)))
13293
13294 (define-public python2-swagger-spec-validator
13295 (package-with-python2 python-swagger-spec-validator))
13296
13297 (define-public python-apache-libcloud
13298 (package
13299 (name "python-apache-libcloud")
13300 (version "2.4.0")
13301 (source
13302 (origin
13303 (method url-fetch)
13304 (uri (pypi-uri "apache-libcloud" version))
13305 (sha256
13306 (base32
13307 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13308 (build-system python-build-system)
13309 (arguments
13310 `(#:phases
13311 (modify-phases %standard-phases
13312 (add-after 'unpack 'patch-ssh
13313 (lambda* (#:key inputs #:allow-other-keys)
13314 (substitute* "libcloud/compute/ssh.py"
13315 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13316 "/bin/ssh" "'")))
13317 #t))
13318 (add-after 'unpack 'patch-tests
13319 (lambda _
13320 (substitute* "./libcloud/test/test_file_fixtures.py"
13321 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13322 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13323 return (httplib.OK,
13324 \"1234abcd\",
13325 {\"test\": \"value\"},
13326 httplib.responses[httplib.OK])
13327 def _ascii"))
13328 (substitute* "libcloud/test/compute/test_ssh_client.py"
13329 (("class ShellOutSSHClientTests")
13330 "@unittest.skip(\"Guix container doesn't have ssh service\")
13331 class ShellOutSSHClientTests")
13332 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13333 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13334 (("'.xF0', '.x90', '.x8D', '.x88'")
13335 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13336 #t))
13337 (add-before 'check 'copy-secret
13338 (lambda _
13339 (copy-file "libcloud/test/secrets.py-dist"
13340 "libcloud/test/secrets.py")
13341 #t)))))
13342 (inputs
13343 `(("openssh" ,openssh)))
13344 (propagated-inputs
13345 `(("python-paramiko" ,python-paramiko)
13346 ("python-requests" ,python-requests)))
13347 (native-inputs
13348 `(("python-lockfile" ,python-lockfile)
13349 ("python-mock" ,python-mock)
13350 ("python-pytest" ,python-pytest)
13351 ("python-pytest-runner" ,python-pytest-runner)
13352 ("python-requests-mock" ,python-requests-mock)))
13353 (home-page "https://libcloud.apache.org/")
13354 (synopsis "Unified Cloud API")
13355 (description "@code{libcloud} is a Python library for interacting with
13356 many of the popular cloud service providers using a unified API.")
13357 (license license:asl2.0)))
13358
13359 (define-public python2-apache-libcloud
13360 (package-with-python2 python-apache-libcloud))
13361
13362 (define-public python-smmap2
13363 (package
13364 (name "python-smmap2")
13365 (version "2.0.3")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "smmap2" version))
13370 (sha256
13371 (base32
13372 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13373 (build-system python-build-system)
13374 (native-inputs
13375 `(("python-nosexcover" ,python-nosexcover)))
13376 (home-page "https://github.com/Byron/smmap")
13377 (synopsis "Python sliding window memory map manager")
13378 (description "@code{smmap2} is a pure Python implementation of a sliding
13379 window memory map manager.")
13380 (license license:bsd-3)))
13381
13382 (define-public python2-smmap2
13383 (package-with-python2 python-smmap2))
13384
13385 (define-public python-regex
13386 (package
13387 (name "python-regex")
13388 (version "2019.04.14")
13389 (source (origin
13390 (method url-fetch)
13391 (uri (pypi-uri "regex" version))
13392 (sha256
13393 (base32
13394 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13395 ;; TODO: Fix and enable regex_test.py tests that complain about the
13396 ;; test.support module not existing.
13397 (build-system python-build-system)
13398 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13399 (synopsis "Alternative regular expression module")
13400 (description "This regular expression implementation is backwards-
13401 compatible with the standard @code{re} module, but offers additional
13402 functionality like full case-folding for case-insensitive matches in Unicode.")
13403 (license license:psfl)))
13404
13405 (define-public python2-regex
13406 (package-with-python2 python-regex))
13407
13408 (define-public python2-pyopengl
13409 (package
13410 (name "python2-pyopengl")
13411 (version "3.1.0")
13412 (source
13413 (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "PyOpenGL" version))
13416 (sha256
13417 (base32
13418 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13419 (arguments
13420 `(#:python ,python-2))
13421 (build-system python-build-system)
13422 (home-page "http://pyopengl.sourceforge.net")
13423 (synopsis "Standard OpenGL bindings for Python")
13424 (description
13425 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13426 related APIs. The binding is created using the standard @code{ctypes}
13427 library.")
13428 (license license:bsd-3)))
13429
13430 (define-public python2-pyopengl-accelerate
13431 (package
13432 (inherit python2-pyopengl)
13433 (name "python2-pyopengl-accelerate")
13434 (version "3.1.0")
13435 (source
13436 (origin
13437 (method url-fetch)
13438 (uri (pypi-uri "PyOpenGL-accelerate" version))
13439 (sha256
13440 (base32
13441 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13442 (synopsis "Acceleration code for PyOpenGL")
13443 (description
13444 "This is the Cython-coded accelerator module for PyOpenGL.")))
13445
13446 (define-public python-rencode
13447 (package
13448 (name "python-rencode")
13449 (version "1.0.5")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "rencode" version))
13454 (sha256
13455 (base32
13456 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13457 (build-system python-build-system)
13458 (arguments
13459 `(#:phases
13460 (modify-phases %standard-phases
13461 (add-before 'check 'delete-bogus-test
13462 ;; This test requires /home/aresch/Downloads, which is not provided by
13463 ;; the build environment.
13464 (lambda _
13465 (delete-file "rencode/t.py")
13466 #t)))))
13467 (native-inputs `(("pkg-config" ,pkg-config)
13468 ("python-cython" ,python-cython)))
13469 (home-page "https://github.com/aresch/rencode")
13470 (synopsis "Serialization of heterogeneous data structures")
13471 (description
13472 "The @code{rencode} module is a data structure serialization library,
13473 similar to @code{bencode} from the BitTorrent project. For complex,
13474 heterogeneous data structures with many small elements, r-encoding stake up
13475 significantly less space than b-encodings. This version of rencode is a
13476 complete rewrite in Cython to attempt to increase the performance over the
13477 pure Python module.")
13478 (license license:bsd-3)))
13479
13480 (define-public python2-rencode
13481 (package-with-python2 python-rencode))
13482
13483 (define-public python-xenon
13484 (package
13485 (name "python-xenon")
13486 (version "0.5.4")
13487 (source
13488 (origin
13489 (method url-fetch)
13490 (uri (pypi-uri "xenon" version))
13491 (sha256
13492 (base32
13493 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13494 (build-system python-build-system)
13495 (native-inputs
13496 `(("python-pyyaml" ,python-pyyaml)
13497 ("python-radon" ,python-radon)
13498 ("python-requests" ,python-requests)
13499 ("python-flake8" ,python-flake8)
13500 ("python-tox" ,python-tox)))
13501 (arguments
13502 `(#:phases
13503 (modify-phases %standard-phases
13504 (add-before 'build 'patch-test-requirements
13505 (lambda _
13506 ;; Remove httpretty dependency for tests.
13507 (substitute* "setup.py"
13508 (("httpretty") ""))
13509 #t)))))
13510 (home-page "https://xenon.readthedocs.org/")
13511 (synopsis "Monitor code metrics for Python on your CI server")
13512 (description
13513 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13514 Ideally, @code{xenon} is run every time code is committed. Through command
13515 line options, various thresholds can be set for the complexity of code. It
13516 will fail (i.e. it will exit with a non-zero exit code) when any of these
13517 requirements is not met.")
13518 (license license:expat)))
13519
13520 (define-public python2-xenon
13521 (package-with-python2 python-xenon))
13522
13523 (define-public python-pysocks
13524 (package
13525 (name "python-pysocks")
13526 (version "1.7.0")
13527 (source
13528 (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "PySocks" version))
13531 (sha256
13532 (base32
13533 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13534 (build-system python-build-system)
13535 (arguments `(#:tests? #f))
13536 (home-page "https://github.com/Anorov/PySocks")
13537 (synopsis "SOCKS client module")
13538 (description "@code{pysocks} is an updated and semi-actively maintained
13539 version of @code{SocksiPy} with bug fixes and extra features.")
13540 (license license:bsd-3)))
13541
13542 (define-public python2-pysocks
13543 (package-with-python2 python-pysocks))
13544
13545 (define-public python-pydiff
13546 (package
13547 (name "python-pydiff")
13548 (version "0.2")
13549 (source
13550 (origin
13551 (method url-fetch)
13552 (uri (pypi-uri "pydiff" version))
13553 (sha256
13554 (base32
13555 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13556 (build-system python-build-system)
13557 (home-page "https://github.com/myint/pydiff")
13558 (synopsis "Library to diff two Python files at the bytecode level")
13559 (description
13560 "@code{pydiff} makes it easy to look for actual code changes while
13561 ignoring formatting changes.")
13562 (license license:expat)))
13563
13564 (define-public python2-pydiff
13565 (package-with-python2 python-pydiff))
13566
13567 (define-public python-tqdm
13568 (package
13569 (name "python-tqdm")
13570 (version "4.19.6")
13571 (source
13572 (origin
13573 (method url-fetch)
13574 (uri (pypi-uri "tqdm" version))
13575 (sha256
13576 (base32
13577 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13578 (build-system python-build-system)
13579 (native-inputs
13580 `(("python-flake8" ,python-flake8)
13581 ("python-nose" ,python-nose)
13582 ("python-coverage" ,python-coverage)))
13583 (home-page "https://github.com/tqdm/tqdm")
13584 (synopsis "Fast, extensible progress meter")
13585 (description
13586 "Make loops show a progress bar on the console by just wrapping any
13587 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13588 design and layout.")
13589 (license (list license:mpl2.0 license:expat))))
13590
13591 (define-public python2-tqdm
13592 (package-with-python2 python-tqdm))
13593
13594 (define-public python-pkginfo
13595 (package
13596 (name "python-pkginfo")
13597 (version "1.4.2")
13598 (source
13599 (origin
13600 (method url-fetch)
13601 (uri (pypi-uri "pkginfo" version))
13602 (sha256
13603 (base32
13604 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13605 (build-system python-build-system)
13606 (arguments
13607 ;; The tests are broken upstream.
13608 '(#:tests? #f))
13609 (home-page
13610 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13611 (synopsis
13612 "Query metadatdata from sdists, bdists, and installed packages")
13613 (description
13614 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13615 source distriubtion (an sdist) or a binary distribution (e.g., created by
13616 running bdist_egg). It can also query the EGG-INFO directory of an installed
13617 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13618 created by running @code{python setup.py develop}).")
13619 (license license:expat)))
13620
13621 (define-public python2-pkginfo
13622 (package-with-python2 python-pkginfo))
13623
13624 (define-public python-twine
13625 (package
13626 (name "python-twine")
13627 (version "1.9.1")
13628 (source
13629 (origin
13630 (method url-fetch)
13631 (uri (pypi-uri "twine" version))
13632 (sha256
13633 (base32
13634 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13635 (build-system python-build-system)
13636 (propagated-inputs
13637 `(("python-tqdm" ,python-tqdm)
13638 ("python-pkginfo" ,python-pkginfo)
13639 ("python-requests" ,python-requests)
13640 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13641 (home-page "https://github.com/pypa/twine")
13642 (synopsis "Collection of utilities for interacting with PyPI")
13643 (description
13644 "@code{twine} currently supports registering projects and uploading
13645 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13646 their files and supports any packaging format (including wheels).")
13647 (license license:asl2.0)))
13648
13649 (define-public python2-twine
13650 (package-with-python2 python-twine))
13651
13652 (define-public python-linecache2
13653 (package
13654 (name "python-linecache2")
13655 (version "1.0.0")
13656 (source
13657 (origin
13658 (method url-fetch)
13659 (uri (pypi-uri "linecache2" version))
13660 (sha256
13661 (base32
13662 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13663 (build-system python-build-system)
13664 (arguments
13665 `(;; The tests depend on unittest2, and our version is a bit too old.
13666 #:tests? #f))
13667 (native-inputs
13668 `(("python-pbr" ,python-pbr-minimal)))
13669 (home-page
13670 "https://github.com/testing-cabal/linecache2")
13671 (synopsis "Backports of the linecache module")
13672 (description
13673 "The linecache module allows one to get any line from any file, while
13674 attempting to optimize internally, using a cache, the common case where many
13675 lines are read from a single file.")
13676 (license license:psfl)))
13677
13678 (define-public python2-linecache2
13679 (package-with-python2 python-linecache2))
13680
13681 (define-public python-traceback2
13682 (package
13683 (name "python-traceback2")
13684 (version "1.4.0")
13685 (source
13686 (origin
13687 (method url-fetch)
13688 (uri (pypi-uri "traceback2" version))
13689 (sha256
13690 (base32
13691 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13692 (build-system python-build-system)
13693 (arguments
13694 `(;; python-traceback2 and python-unittest2 depend on one another.
13695 #:tests? #f))
13696 (native-inputs
13697 `(("python-pbr" ,python-pbr-minimal)))
13698 (propagated-inputs
13699 `(("python-linecache2" ,python-linecache2)))
13700 (home-page
13701 "https://github.com/testing-cabal/traceback2")
13702 (synopsis "Backports of the traceback module")
13703 (description
13704 "This module provides a standard interface to extract, format and print
13705 stack traces of Python programs. It exactly mimics the behavior of the Python
13706 interpreter when it prints a stack trace.")
13707 (license license:psfl)))
13708
13709 (define-public python2-traceback2
13710 (package-with-python2 python-traceback2))
13711
13712 (define-public python-ratelimiter
13713 (package
13714 (name "python-ratelimiter")
13715 (version "1.2.0")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "ratelimiter" version))
13720 (sha256
13721 (base32
13722 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13723 (build-system python-build-system)
13724 (arguments
13725 '(#:tests? #f)) ; There are no tests in the pypi archive.
13726 (home-page "https://github.com/RazerM/ratelimiter")
13727 (synopsis "Simple rate limiting object")
13728 (description
13729 "The @code{ratelimiter} module ensures that an operation will not be
13730 executed more than a given number of times during a given period.")
13731 (license license:asl2.0)))
13732
13733 (define-public python2-ratelimiter
13734 (package-with-python2 python-ratelimiter))
13735
13736 (define-public python-dukpy
13737 (package
13738 (name "python-dukpy")
13739 (version "0.3")
13740 (source
13741 (origin
13742 (method git-fetch)
13743 (uri (git-reference
13744 (url "https://github.com/kovidgoyal/dukpy.git")
13745 (commit (string-append "v" version))))
13746 (file-name (git-file-name name version))
13747 (sha256
13748 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13749 (build-system python-build-system)
13750 (home-page "https://github.com/kovidgoyal/dukpy")
13751 (synopsis "Run JavaScript in python")
13752 (description
13753 "dukpy is a JavaScript runtime environment for Python using the duktape
13754 embeddable JavaScript engine.")
13755 ;; Dukpy is licensed under MIT like the embedded duktape library,
13756 ;; with 'errors.c' as GPL3.
13757 (license (list license:expat license:gpl3))))
13758
13759 (define-public python2-dukpy
13760 (package-with-python2 python-dukpy))
13761
13762 (define-public python-jsonrpclib-pelix
13763 (package
13764 (name "python-jsonrpclib-pelix")
13765 (version "0.3.2")
13766 (source
13767 (origin
13768 (method url-fetch)
13769 (uri (pypi-uri "jsonrpclib-pelix" version))
13770 (sha256
13771 (base32
13772 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13773 (build-system python-build-system)
13774 (arguments
13775 `(#:tests? #f)) ; no tests in PyPI tarball
13776 (home-page "https://github.com/tcalmant/jsonrpclib/")
13777 (synopsis "JSON-RPC 2.0 client library for Python")
13778 (description
13779 "This library implements the JSON-RPC v2.0
13780 specification (backwards-compatible) as a client library for Python. This
13781 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13782 services.")
13783 (license license:asl2.0)))
13784
13785 (define-public python2-jsonrpclib-pelix
13786 (package-with-python2 python-jsonrpclib-pelix))
13787
13788 (define-public python-setuptools-scm-git-archive
13789 (package
13790 (name "python-setuptools-scm-git-archive")
13791 (version "1.0")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "setuptools_scm_git_archive" version))
13796 (sha256
13797 (base32
13798 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13799 (build-system python-build-system)
13800 (native-inputs
13801 `(("python-pytest" ,python-pytest)))
13802 (propagated-inputs
13803 `(("python-setuptools-scm" ,python-setuptools-scm)))
13804 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13805 (synopsis "Setuptools_scm plugin for git archives")
13806 (description
13807 "The setuptools_scm_git_archive package is a plugin to
13808 setuptools_scm, which supports obtaining versions from git archives that
13809 belong to tagged versions.")
13810 (license license:expat)))
13811
13812 (define-public python2-setuptools-scm-git-archive
13813 (package-with-python2 python-setuptools-scm-git-archive))
13814
13815 (define-public python-setuptools-git
13816 (package
13817 (name "python-setuptools-git")
13818 (version "1.2")
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "setuptools-git" version))
13823 (sha256
13824 (base32
13825 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13826 (build-system python-build-system)
13827 (arguments
13828 `(#:phases
13829 (modify-phases %standard-phases
13830 ;; This is needed for tests.
13831 (add-after 'unpack 'configure-git
13832 (lambda _
13833 (setenv "HOME" "/tmp")
13834 (invoke "git" "config" "--global" "user.email" "guix")
13835 (invoke "git" "config" "--global" "user.name" "guix")
13836 #t)))))
13837 (native-inputs
13838 `(("git" ,git-minimal)))
13839 (home-page "https://github.com/msabramo/setuptools-git")
13840 (synopsis "Setuptools revision control system plugin for Git")
13841 (description
13842 "This package provides a plugin for Setuptools for revision control with
13843 Git.")
13844 (license license:bsd-3)))
13845
13846 (define-public python-pyclipper
13847 (package
13848 (name "python-pyclipper")
13849 (version "1.1.0.post1")
13850 (source
13851 (origin
13852 (method url-fetch)
13853 (uri (pypi-uri "pyclipper" version ".zip"))
13854 (sha256
13855 (base32
13856 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13857 (modules '((guix build utils)))
13858 (snippet
13859 '(begin
13860 ;; This file is generated by Cython.
13861 (delete-file "pyclipper/pyclipper.cpp") #t))))
13862 (build-system python-build-system)
13863 (arguments
13864 `(#:phases
13865 (modify-phases %standard-phases
13866 (add-before 'build 'cythonize-sources
13867 (lambda _
13868 (with-directory-excursion "pyclipper"
13869 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13870 (propagated-inputs
13871 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13872 (native-inputs
13873 `(("python-cython" ,python-cython)
13874 ("python-pytest" ,python-pytest)
13875 ("python-pytest-runner" ,python-pytest-runner)
13876 ("python-unittest2" ,python-unittest2)
13877 ("unzip" ,unzip)))
13878 (home-page "https://github.com/greginvm/pyclipper")
13879 (synopsis "Wrapper for Angus Johnson's Clipper library")
13880 (description
13881 "Pyclipper is a Cython wrapper for the C++ translation of the
13882 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13883 (license license:expat)))
13884
13885 (define-public python2-pyclipper
13886 (package-with-python2 python-pyclipper))
13887
13888 (define-public python2-booleanoperations
13889 (package
13890 (name "python2-booleanoperations")
13891 (version "0.7.1")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "booleanOperations" version ".zip"))
13896 (sha256
13897 (base32
13898 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13899 (build-system python-build-system)
13900 (arguments
13901 `(#:python ,python-2))
13902 (native-inputs
13903 `(("unzip" ,unzip)
13904 ("python2-pytest" ,python2-pytest)
13905 ("python2-pytest-runner" ,python2-pytest-runner)))
13906 (propagated-inputs
13907 `(("python-fonttools" ,python2-fonttools)
13908 ("python-pyclipper" ,python2-pyclipper)
13909 ("python-ufolib" ,python2-ufolib)))
13910 (home-page "https://github.com/typemytype/booleanOperations")
13911 (synopsis "Boolean operations on paths")
13912 (description
13913 "BooleanOperations provides a Python library that enables
13914 boolean operations on paths.")
13915 (license license:expat)))
13916
13917 (define-public python-tempdir
13918 (package
13919 (name "python-tempdir")
13920 (version "0.7.1")
13921 (source
13922 (origin
13923 (method url-fetch)
13924 (uri (pypi-uri "tempdir" version))
13925 (sha256
13926 (base32
13927 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13928 (build-system python-build-system)
13929 (home-page "https://pypi.org/project/tempdir/")
13930 (arguments
13931 ;; the package has no tests
13932 '(#:tests? #f))
13933 (synopsis "Python library for managing temporary directories")
13934 (description
13935 "This library manages temporary directories that are automatically
13936 deleted with all their contents when they are no longer needed. It is
13937 particularly convenient for use in tests.")
13938 (license license:expat)))
13939
13940 (define-public python2-tempdir
13941 (package-with-python2 python-tempdir))
13942
13943 (define-public python-activepapers
13944 (package
13945 (name "python-activepapers")
13946 (version "0.2.2")
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "ActivePapers.Py" version))
13951 (sha256
13952 (base32
13953 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13954 (build-system python-build-system)
13955 (arguments
13956 `(#:modules ((ice-9 ftw)
13957 (srfi srfi-1)
13958 (guix build utils)
13959 (guix build python-build-system))
13960
13961 #:phases
13962 (modify-phases %standard-phases
13963 (add-after 'unpack 'delete-python2-code
13964 (lambda _
13965 (for-each delete-file
13966 '("lib/activepapers/builtins2.py"
13967 "lib/activepapers/standardlib2.py"
13968 "lib/activepapers/utility2.py"))))
13969 (replace 'check
13970 (lambda _
13971 ;; Deactivate the test cases that download files
13972 (setenv "NO_NETWORK_ACCESS" "1")
13973 ;; For some strange reason, some tests fail if nosetests runs all
13974 ;; test modules in a single execution. They pass if each test
13975 ;; module is run individually.
13976 (for-each (lambda (filename)
13977 (invoke "nosetests"
13978 (string-append "tests/" filename)))
13979 (scandir "tests"
13980 (lambda (filename)
13981 (string-suffix? ".py" filename)))))))))
13982 (native-inputs
13983 `(("python-tempdir" ,python-tempdir)
13984 ("python-nose" ,python-nose)))
13985 (propagated-inputs
13986 `(("python-h5py" ,python-h5py)))
13987 (home-page "http://www.activepapers.org/")
13988 (synopsis "Executable papers for scientific computing")
13989 (description
13990 "ActivePapers is a tool for working with executable papers, which
13991 combine data, code, and documentation in single-file packages,
13992 suitable for publication as supplementary material or on repositories
13993 such as figshare or Zenodo.")
13994 (properties `((python2-variant . ,(delay python2-activepapers))))
13995 (license license:bsd-3)))
13996
13997 (define-public python2-activepapers
13998 (let ((base (package-with-python2
13999 (strip-python2-variant python-activepapers))))
14000 (package
14001 (inherit base)
14002 (arguments
14003 (substitute-keyword-arguments (package-arguments base)
14004 ((#:phases phases)
14005 `(modify-phases ,phases
14006 (delete 'delete-python2-code)
14007 (add-after 'unpack 'delete-python3-code
14008 (lambda _
14009 (for-each delete-file
14010 '("lib/activepapers/builtins3.py"
14011 "lib/activepapers/standardlib3.py"
14012 "lib/activepapers/utility3.py")))))))))))
14013
14014 (define-public python-semver
14015 (package
14016 (name "python-semver")
14017 (version "2.7.9")
14018 (source
14019 (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "semver" version))
14022 (sha256
14023 (base32
14024 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14025 (build-system python-build-system)
14026 (arguments
14027 `(#:phases
14028 (modify-phases %standard-phases
14029 (add-after 'unpack 'patch-test-requirements
14030 (lambda _
14031 (substitute* "setup.py"
14032 ;; Our Python is new enough.
14033 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14034 #t)))))
14035 (native-inputs
14036 `(("python-tox" ,python-tox)
14037 ("python-virtualenv" ,python-virtualenv)))
14038 (home-page "https://github.com/k-bx/python-semver")
14039 (synopsis "Python helper for Semantic Versioning")
14040 (description "This package provides a Python library for
14041 @url{Semantic Versioning, http://semver.org/}.")
14042 (license license:bsd-3)))
14043
14044 (define-public python2-semver
14045 (package-with-python2 python-semver))
14046
14047 (define-public python-pyro4
14048 (package
14049 (name "python-pyro4")
14050 (version "4.75")
14051 (source
14052 (origin
14053 (method url-fetch)
14054 (uri (pypi-uri "Pyro4" version))
14055 (sha256
14056 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14057 (build-system python-build-system)
14058 (propagated-inputs
14059 `(("python-serpent" ,python-serpent)))
14060 (home-page "https://pyro4.readthedocs.io")
14061 (synopsis "Distributed object middleware for Python")
14062 (description
14063 "Pyro enables you to build applications in which objects can talk to each
14064 other over the network. You can just use normal Python method calls to call
14065 objects on other machines, also known as remote procedure calls (RPC).")
14066 (license license:expat)))
14067
14068 (define-public python2-pyro
14069 (package
14070 (name "python2-pyro")
14071 (version "3.16")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "Pyro" version))
14076 (file-name (string-append "Pyro-" version ".tar.gz"))
14077 (sha256
14078 (base32
14079 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14080 (build-system python-build-system)
14081 (arguments
14082 ;; Pyro is not compatible with Python 3
14083 `(#:python ,python-2
14084 ;; Pyro has no test cases for automatic execution
14085 #:tests? #f))
14086 (home-page "http://pythonhosted.org/Pyro/")
14087 (synopsis "Distributed object manager for Python")
14088 (description "Pyro is a Distributed Object Technology system
14089 written in Python that is designed to be easy to use. It resembles
14090 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14091 which is a system and language independent Distributed Object Technology
14092 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14093 longer maintained. New projects should use Pyro4 instead, which
14094 is the new Pyro version that is actively developed.")
14095 (license license:expat)))
14096
14097 (define-public python2-scientific
14098 (package
14099 (name "python2-scientific")
14100 (version "2.9.4")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (string-append "https://bitbucket.org/khinsen/"
14105 "scientificpython/downloads/ScientificPython-"
14106 version ".tar.gz"))
14107 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14108 (sha256
14109 (base32
14110 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14111 (build-system python-build-system)
14112 (inputs
14113 `(("netcdf" ,netcdf)))
14114 (propagated-inputs
14115 `(("python-numpy" ,python2-numpy-1.8)
14116 ("python-pyro" ,python2-pyro)))
14117 (arguments
14118 ;; ScientificPython is not compatible with Python 3
14119 `(#:python ,python-2
14120 #:tests? #f ; No test suite
14121 #:phases
14122 (modify-phases %standard-phases
14123 (replace 'build
14124 (lambda* (#:key inputs #:allow-other-keys)
14125 (invoke "python" "setup.py" "build"
14126 (string-append "--netcdf_prefix="
14127 (assoc-ref inputs "netcdf"))))))))
14128 (home-page "https://bitbucket.org/khinsen/scientificpython")
14129 (synopsis "Python modules for scientific computing")
14130 (description "ScientificPython is a collection of Python modules that are
14131 useful for scientific computing. Most modules are rather general (Geometry,
14132 physical units, automatic derivatives, ...) whereas others are more
14133 domain-specific (e.g. netCDF and PDB support). The library is currently
14134 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14135 (license license:cecill-c)))
14136
14137 (define-public python2-mmtk
14138 (package
14139 (name "python2-mmtk")
14140 (version "2.7.11")
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (string-append "https://bitbucket.org/khinsen/"
14145 "mmtk/downloads/MMTK-" version ".tar.gz"))
14146 (file-name (string-append "MMTK-" version ".tar.gz"))
14147 (sha256
14148 (base32
14149 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14150 (build-system python-build-system)
14151 (native-inputs
14152 `(("netcdf" ,netcdf)))
14153 (propagated-inputs
14154 `(("python-scientific" ,python2-scientific)
14155 ("python-tkinter" ,python-2 "tk")))
14156 (arguments
14157 `(#:python ,python-2
14158 #:tests? #f
14159 #:phases
14160 (modify-phases %standard-phases
14161 (add-before 'build 'includes-from-scientific
14162 (lambda* (#:key inputs #:allow-other-keys)
14163 (mkdir-p "Include/Scientific")
14164 (copy-recursively
14165 (string-append
14166 (assoc-ref inputs "python-scientific")
14167 "/include/python2.7/Scientific")
14168 "Include/Scientific"))))))
14169 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14170 (synopsis "Python library for molecular simulation")
14171 (description "MMTK is a library for molecular simulations with an emphasis
14172 on biomolecules. It provides widely used methods such as Molecular Dynamics
14173 and normal mode analysis, but also basic routines for implementing new methods
14174 for simulation and analysis. The library is currently not actively maintained
14175 and works only with Python 2 and NumPy < 1.9.")
14176 (license license:cecill-c)))
14177
14178 (define-public python-phonenumbers
14179 (package
14180 (name "python-phonenumbers")
14181 (version "8.9.1")
14182 (source
14183 (origin
14184 (method url-fetch)
14185 (uri (pypi-uri "phonenumbers" version))
14186 (sha256
14187 (base32
14188 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14189 (build-system python-build-system)
14190 (home-page
14191 "https://github.com/daviddrysdale/python-phonenumbers")
14192 (synopsis
14193 "Python library for dealing with international phone numbers")
14194 (description
14195 "This package provides a Python port of Google's libphonenumber library.")
14196 (license license:asl2.0)))
14197
14198 (define-public python2-phonenumbers
14199 (package-with-python2 python-phonenumbers))
14200
14201 (define-public python-send2trash
14202 (package
14203 (name "python-send2trash")
14204 (version "1.5.0")
14205 (source
14206 (origin (method git-fetch)
14207 ;; Source tarball on PyPI doesn't include tests.
14208 (uri (git-reference
14209 (url "https://github.com/hsoft/send2trash.git")
14210 (commit version)))
14211 (file-name (git-file-name name version))
14212 (sha256
14213 (base32
14214 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14215 (build-system python-build-system)
14216 (arguments
14217 '(#:phases
14218 (modify-phases %standard-phases
14219 (add-before 'check 'pre-check
14220 (lambda _
14221 (mkdir-p "/tmp/foo")
14222 (setenv "HOME" "/tmp/foo")
14223 #t)))))
14224 (home-page "https://github.com/hsoft/send2trash")
14225 (synopsis "Send files to the user's @file{~/Trash} directory")
14226 (description "This package provides a Python library to send files to the
14227 user's @file{~/Trash} directory.")
14228 (properties `((python2-variant . ,(delay python2-send2trash))))
14229 (license license:bsd-3)))
14230
14231 (define-public python2-send2trash
14232 (package
14233 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14234 (arguments
14235 (substitute-keyword-arguments (package-arguments python-send2trash)
14236 ((#:phases phases)
14237 `(modify-phases ,phases
14238 (add-before 'check 'setenv
14239 (lambda _
14240 (setenv "PYTHONPATH"
14241 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14242 #t))))))))
14243
14244 (define-public python-yapf
14245 (package
14246 (name "python-yapf")
14247 (version "0.24.0")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "yapf" version))
14252 (sha256
14253 (base32
14254 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14255 (build-system python-build-system)
14256 (home-page "https://github.com/google/yapf")
14257 (synopsis "Formatter for Python code")
14258 (description "YAPF is a formatter for Python code. It's based off of
14259 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14260 takes the code and reformats it to the best formatting that conforms to the
14261 style guide, even if the original code didn't violate the style guide.")
14262 (license license:asl2.0)))
14263
14264 (define-public python2-yapf
14265 (package-with-python2 python-yapf))
14266
14267 (define-public python-gyp
14268 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14269 (revision "0"))
14270 (package
14271 (name "python-gyp")
14272 ;; Google does not release versions,
14273 ;; based on second most recent commit date.
14274 (version (git-version "0.0.0" revision commit))
14275 (source
14276 (origin
14277 ;; Google does not release tarballs,
14278 ;; git checkout is needed.
14279 (method git-fetch)
14280 (uri (git-reference
14281 (url "https://chromium.googlesource.com/external/gyp")
14282 (commit commit)))
14283 (file-name (git-file-name name version))
14284 (sha256
14285 (base32
14286 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14287 (build-system python-build-system)
14288 (home-page "https://gyp.gsrc.io/")
14289 (synopsis "GYP is a Meta-Build system")
14290 (description
14291 "GYP builds build systems for large, cross platform applications.
14292 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14293 files, and Makefiles.")
14294 (license license:bsd-3))))
14295
14296 (define-public python2-gyp
14297 (package-with-python2 python-gyp))
14298
14299 (define-public python-whatever
14300 (package
14301 (name "python-whatever")
14302 (version "0.5")
14303 (source
14304 (origin
14305 (method url-fetch)
14306 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14307 ".tar.gz"))
14308 (sha256
14309 (base32
14310 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14311 (file-name (string-append name "-" version ".tar.gz"))))
14312 (build-system python-build-system)
14313 (arguments
14314 `(#:phases
14315 (modify-phases %standard-phases
14316 (replace 'check
14317 (lambda _
14318 (invoke "py.test"))))))
14319 (native-inputs
14320 `(("python-pytest" ,python-pytest)))
14321 (home-page "http://github.com/Suor/whatever")
14322 (synopsis "Make anonymous functions by partial application of operators")
14323 (description "@code{whatever} provides an easy way to make anonymous
14324 functions by partial application of operators.")
14325 (license license:bsd-3)))
14326
14327 (define-public python2-whatever
14328 (package-with-python2 python-whatever))
14329
14330 (define-public python-funcy
14331 (package
14332 (name "python-funcy")
14333 (version "1.11")
14334 (source
14335 (origin
14336 (method git-fetch)
14337 (uri (git-reference
14338 (url "https://github.com/Suor/funcy.git")
14339 (commit version)))
14340 (sha256
14341 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14342 (file-name (git-file-name name version))))
14343 (build-system python-build-system)
14344 (arguments
14345 `(#:phases
14346 (modify-phases %standard-phases
14347 (replace 'check
14348 (lambda _
14349 (invoke "py.test"))))))
14350 (native-inputs
14351 `(("python-pytest" ,python-pytest)
14352 ("python-whatever" ,python-whatever)))
14353 (home-page "http://github.com/Suor/funcy")
14354 (synopsis "Functional tools")
14355 (description "@code{funcy} is a library that provides functional tools.
14356 Examples are:
14357 @enumerate
14358 @item merge - Merges collections of the same type
14359 @item walk - Type-preserving map
14360 @item select - Selects a part of a collection
14361 @item take - Takes the first n items of a collection
14362 @item first - Takes the first item of a collection
14363 @item remove - Predicated-removes items of a collection
14364 @item concat - Concatenates two collections
14365 @item flatten - Flattens a collection with subcollections
14366 @item distinct - Returns only distinct items
14367 @item split - Predicated-splits a collection
14368 @item split_at - Splits a collection at a given item
14369 @item group_by - Groups items by group
14370 @item pairwise - Pairs off adjacent items
14371 @item partial - Partially-applies a function
14372 @item curry - Curries a function
14373 @item compose - Composes functions
14374 @item complement - Complements a predicate
14375 @item all_fn - \"all\" with predicate
14376 @end enumerate")
14377 (license license:bsd-3)))
14378
14379 (define-public python2-funcy
14380 (package-with-python2 python-funcy))
14381
14382 (define-public python-isoweek
14383 (package
14384 (name "python-isoweek")
14385 (version "1.3.3")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "isoweek" version))
14390 (sha256
14391 (base32
14392 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14393 (build-system python-build-system)
14394 (home-page "https://github.com/gisle/isoweek")
14395 (synopsis "Objects representing a week")
14396 (description "The @code{isoweek} module provide the class Week that
14397 implements the week definition of ISO 8601. This standard also defines
14398 a notation for identifying weeks; yyyyWww (where the W is a literal).
14399 Week instances stringify to this form.")
14400 (license license:bsd-3)))
14401
14402 (define-public python2-isoweek
14403 (package-with-python2 python-isoweek))
14404
14405 (define-public python-tokenize-rt
14406 (package
14407 (name "python-tokenize-rt")
14408 (version "2.0.1")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "tokenize-rt" version))
14413 (sha256
14414 (base32
14415 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14416 (build-system python-build-system)
14417 (home-page "https://github.com/asottile/tokenize-rt")
14418 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14419 (description
14420 "This Python library is a wrapper around @code{tokenize} from the Python
14421 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14422 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14423 and @code{tokens_to_src} to roundtrip.")
14424 (license license:expat)))
14425
14426 (define-public python-future-fstrings
14427 (package
14428 (name "python-future-fstrings")
14429 (version "0.4.1")
14430 (source
14431 (origin
14432 (method url-fetch)
14433 (uri (pypi-uri "future_fstrings" version))
14434 (sha256
14435 (base32
14436 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14437 (build-system python-build-system)
14438 (propagated-inputs
14439 `(("python-tokenize-rt" ,python-tokenize-rt)))
14440 (home-page "https://github.com/asottile/future-fstrings")
14441 (synopsis "Backport of fstrings to Python < 3.6")
14442 (description
14443 "This package provides a UTF-8 compatible encoding
14444 @code{future_fstrings}, which performs source manipulation. It decodes the
14445 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14446 @code{f} strings.")
14447 (license license:expat)))
14448
14449 (define-public python-typed-ast
14450 (package
14451 (name "python-typed-ast")
14452 (version "1.3.5")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "typed-ast" version))
14457 (sha256
14458 (base32
14459 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14460 (build-system python-build-system)
14461 (arguments
14462 `(#:modules ((guix build utils)
14463 (guix build python-build-system)
14464 (ice-9 ftw)
14465 (srfi srfi-1)
14466 (srfi srfi-26))
14467 #:phases
14468 (modify-phases %standard-phases
14469 (replace 'check
14470 (lambda _
14471 (let ((cwd (getcwd)))
14472 (setenv "PYTHONPATH"
14473 (string-append cwd "/build/"
14474 (find (cut string-prefix? "lib" <>)
14475 (scandir (string-append cwd "/build")))
14476 ":"
14477 (getenv "PYTHONPATH"))))
14478 (invoke "pytest")
14479 #t)))))
14480 (native-inputs `(("python-pytest" ,python-pytest)))
14481 (home-page "https://github.com/python/typed_ast")
14482 (synopsis "Fork of Python @code{ast} modules with type comment support")
14483 (description "This package provides a parser similar to the standard
14484 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14485 include PEP 484 type comments and are independent of the version of Python
14486 under which they are run. The @code{typed_ast} parsers produce the standard
14487 Python AST (plus type comments), and are both fast and correct, as they are
14488 based on the CPython 2.7 and 3.7 parsers.")
14489 ;; See the file "LICENSE" for the details.
14490 (license (list license:psfl
14491 license:asl2.0
14492 license:expat)))) ;ast27/Parser/spark.py
14493
14494 (define-public python-typing
14495 (package
14496 (name "python-typing")
14497 (version "3.6.6")
14498 (source
14499 (origin
14500 (method url-fetch)
14501 (uri (pypi-uri "typing" version))
14502 (sha256
14503 (base32
14504 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14505 (build-system python-build-system)
14506 (home-page "https://docs.python.org/3/library/typing.html")
14507 (synopsis "Type hints for Python")
14508 (description "This is a backport of the standard library @code{typing}
14509 module to Python versions older than 3.5. Typing defines a standard notation
14510 for Python function and variable type annotations. The notation can be used
14511 for documenting code in a concise, standard format, and it has been designed
14512 to also be used by static and runtime type checkers, static analyzers, IDEs
14513 and other tools.")
14514 (license license:psfl)))
14515
14516 (define-public python2-typing
14517 (package-with-python2 python-typing))
14518
14519 (define-public python-typing-extensions
14520 (package
14521 (name "python-typing-extensions")
14522 (version "3.7.2")
14523 (source
14524 (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "typing_extensions" version))
14527 (sha256
14528 (base32
14529 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14530 (build-system python-build-system)
14531 (home-page
14532 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14533 (synopsis "Experimental type hints for Python")
14534 (description
14535 "The typing_extensions module contains additional @code{typing} hints not
14536 yet present in the of the @code{typing} standard library.
14537 Included are implementations of:
14538 @enumerate
14539 @item ClassVar
14540 @item ContextManager
14541 @item Counter
14542 @item DefaultDict
14543 @item Deque
14544 @item NewType
14545 @item NoReturn
14546 @item overload
14547 @item Protocol
14548 @item runtime
14549 @item Text
14550 @item Type
14551 @item TYPE_CHECKING
14552 @item AsyncGenerator
14553 @end enumerate\n")
14554 (license license:psfl)))
14555
14556 (define-public bpython
14557 (package
14558 (name "bpython")
14559 (version "0.17.1")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "bpython" version))
14564 (sha256
14565 (base32
14566 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14567 (build-system python-build-system)
14568 (arguments
14569 `(#:phases
14570 (modify-phases %standard-phases
14571 (add-after 'unpack 'remove-failing-test
14572 (lambda _
14573 ;; Remove failing test. FIXME: make it pass
14574 (delete-file "bpython/test/test_args.py")
14575 #t))
14576 (add-after 'wrap 'add-aliases
14577 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14578 (lambda* (#:key outputs #:allow-other-keys)
14579 (let ((out (assoc-ref outputs "out")))
14580 (for-each
14581 (lambda (old new)
14582 (symlink old (string-append out "/bin/" new)))
14583 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14584 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14585 #t)))))
14586 (propagated-inputs
14587 `(("python-pygments" ,python-pygments)
14588 ("python-requests" ,python-requests)
14589 ("python-babel" ,python-babel) ; optional, for internationalization
14590 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14591 ("python-greenlet" ,python-greenlet)
14592 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14593 ("python-six" ,python-six)))
14594 (native-inputs
14595 `(("python-sphinx" ,python-sphinx)
14596 ("python-mock" ,python-mock)))
14597 (home-page "https://bpython-interpreter.org/")
14598 (synopsis "Fancy interface to the Python interpreter")
14599 (description "Bpython is a fancy interface to the Python
14600 interpreter. bpython's main features are
14601
14602 @enumerate
14603 @item in-line syntax highlighting,
14604 @item readline-like autocomplete with suggestions displayed as you type,
14605 @item expected parameter list for any Python function,
14606 @item \"rewind\" function to pop the last line of code from memory and
14607 re-evaluate,
14608 @item send the code you've entered off to a pastebin,
14609 @item save the code you've entered to a file, and
14610 @item auto-indentation.
14611 @end enumerate")
14612 (license license:expat)))
14613
14614 (define-public bpython2
14615 (let ((base (package-with-python2
14616 (strip-python2-variant bpython))))
14617 (package (inherit base)
14618 (name "bpython2")
14619 (arguments
14620 `(#:python ,python-2
14621 #:phases
14622 (modify-phases %standard-phases
14623 (add-after 'unpack 'remove-failing-test
14624 (lambda _
14625 ;; Remove failing test. FIXME: make it pass
14626 (delete-file "bpython/test/test_args.py")
14627 ;; Disable failing test-cases (renaming inhibits they are
14628 ;; discovered)
14629 (substitute* "bpython/test/test_curtsies_repl.py"
14630 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14631 (string-append a "xxx_off_" b))
14632 (("^(\\s*def )(test_complex\\W)" _ a b)
14633 (string-append a "xxx_off_" b)))
14634 #t))
14635 (add-before 'build 'rename-scripts
14636 ;; rename the scripts to bypthon2, bpdb2, etc.
14637 (lambda _
14638 (substitute* "setup.py"
14639 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14640 (string-append name "2" rest "\n"))
14641 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14642 (string-append name "2" (or sub "") rest "\n")))
14643 #t))))))))
14644
14645 (define-public python-pyinotify
14646 (package
14647 (name "python-pyinotify")
14648 (version "0.9.6")
14649 (source (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "pyinotify" version))
14652 (sha256
14653 (base32
14654 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14655 (build-system python-build-system)
14656 (arguments `(#:tests? #f)) ;no tests
14657 (home-page "https://github.com/seb-m/pyinotify")
14658 (synopsis "Python library for monitoring inotify events")
14659 (description
14660 "@code{pyinotify} provides a Python interface for monitoring
14661 file system events on Linux.")
14662 (license license:expat)))
14663
14664 (define-public python2-pyinotify
14665 (package-with-python2 python-pyinotify))
14666
14667 ;; Ada parser uses this version.
14668 (define-public python2-quex-0.67.3
14669 (package
14670 (name "python2-quex")
14671 (version "0.67.3")
14672 (source
14673 (origin
14674 (method url-fetch)
14675 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14676 (version-major+minor version)
14677 "/quex-" version ".zip"))
14678 (sha256
14679 (base32
14680 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14681 (build-system python-build-system)
14682 (native-inputs
14683 `(("unzip" ,unzip)))
14684 (arguments
14685 `(#:python ,python-2
14686 #:tests? #f
14687 #:phases
14688 (modify-phases %standard-phases
14689 (delete 'configure)
14690 (delete 'build)
14691 (replace 'install
14692 (lambda* (#:key outputs #:allow-other-keys)
14693 (let* ((out (assoc-ref outputs "out"))
14694 (share/quex (string-append out "/share/quex"))
14695 (bin (string-append out "/bin")))
14696 (copy-recursively "." share/quex)
14697 (mkdir-p bin)
14698 (symlink (string-append share/quex "/quex-exe.py")
14699 (string-append bin "/quex"))
14700 #t))))))
14701 (native-search-paths
14702 (list (search-path-specification
14703 (variable "QUEX_PATH")
14704 (files '("share/quex")))))
14705 (home-page "http://quex.sourceforge.net/")
14706 (synopsis "Lexical analyzer generator in Python")
14707 (description "@code{quex} is a lexical analyzer generator in Python.")
14708 (license license:lgpl2.1+))) ; Non-military
14709
14710 (define-public python2-quex
14711 (package (inherit python2-quex-0.67.3)
14712 (name "python2-quex")
14713 (version "0.68.1")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14718 (sha256
14719 (base32
14720 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14721 (file-name (string-append name "-" version ".tar.gz"))))))
14722
14723 (define-public python-more-itertools
14724 (package
14725 (name "python-more-itertools")
14726 (version "7.1.0")
14727 (source
14728 (origin
14729 (method url-fetch)
14730 (uri (pypi-uri "more-itertools" version))
14731 (sha256
14732 (base32
14733 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14734 (build-system python-build-system)
14735 (home-page "https://github.com/erikrose/more-itertools")
14736 (synopsis "More routines for operating on iterables, beyond itertools")
14737 (description "Python's built-in @code{itertools} module implements a
14738 number of iterator building blocks inspired by constructs from APL, Haskell,
14739 and SML. @code{more-itertools} includes additional building blocks for
14740 working with iterables.")
14741 (properties `((python2-variant . ,(delay python2-more-itertools))))
14742 (license license:expat)))
14743
14744 ;; The 5.x series are the last versions supporting Python 2.7.
14745 (define-public python2-more-itertools
14746 (package
14747 (inherit python-more-itertools)
14748 (name "python2-more-itertools")
14749 (version "5.0.0")
14750 (source (origin
14751 (method url-fetch)
14752 (uri (pypi-uri "more-itertools" version))
14753 (sha256
14754 (base32
14755 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14756 (arguments
14757 `(#:python ,python2-minimal))
14758 (propagated-inputs
14759 `(("python2-six" ,python2-six-bootstrap)))))
14760
14761 (define-public python-latexcodec
14762 (package
14763 (name "python-latexcodec")
14764 (version "1.0.6")
14765 (source
14766 (origin
14767 (method url-fetch)
14768 (uri (pypi-uri "latexcodec" version))
14769 (sha256
14770 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14771 (build-system python-build-system)
14772 (inputs
14773 `(("python-six" ,python-six)))
14774 (home-page "https://readthedocs.org/projects/latexcodec/")
14775 (synopsis "Work with LaTeX code in Python")
14776 (description "Lexer and codec to work with LaTeX code in Python.")
14777 (license license:expat)))
14778
14779 (define-public python-pybtex
14780 (package
14781 (name "python-pybtex")
14782 (version "0.22.2")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "pybtex" version))
14787 (sha256
14788 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14789 (build-system python-build-system)
14790 (native-inputs
14791 `(("python-nose" ,python-nose)))
14792 (inputs
14793 `(("python-latexcodec" ,python-latexcodec)
14794 ("python-pyyaml" ,python-pyyaml)
14795 ("python-six" ,python-six)))
14796 (arguments
14797 `(#:test-target "nosetests"))
14798 (home-page "https://pybtex.org/")
14799 (synopsis "BibTeX-compatible bibliography processor")
14800 (description "Pybtex is a BibTeX-compatible bibliography processor written
14801 in Python. You can simply type pybtex instead of bibtex.")
14802 (license license:expat)))
14803
14804 (define-public python-onetimepass
14805 (package
14806 (name "python-onetimepass")
14807 (version "1.0.1")
14808 (source
14809 (origin
14810 (method url-fetch)
14811 (uri (pypi-uri "onetimepass" version))
14812 (sha256
14813 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14814 (build-system python-build-system)
14815 (propagated-inputs `(("python-six" ,python-six)))
14816 (home-page "https://github.com/tadeck/onetimepass/")
14817 (synopsis "One-time password library")
14818 (description "Python one-time password library for HMAC-based (HOTP) and
14819 time-based (TOTP) passwords.")
14820 (license license:expat)))
14821
14822 (define-public python-parso
14823 (package
14824 (name "python-parso")
14825 (version "0.5.1")
14826 (source
14827 (origin
14828 (method url-fetch)
14829 (uri (pypi-uri "parso" version))
14830 (sha256
14831 (base32
14832 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14833 (native-inputs
14834 `(("python-pytest" ,python-pytest)))
14835 (build-system python-build-system)
14836 (arguments
14837 `(#:phases (modify-phases %standard-phases
14838 (replace 'check
14839 (lambda _ (invoke "pytest" "-vv"))))))
14840 (home-page "https://github.com/davidhalter/parso")
14841 (synopsis "Python Parser")
14842 (description "Parso is a Python parser that supports error recovery and
14843 round-trip parsing for different Python versions (in multiple Python versions).
14844 Parso is also able to list multiple syntax errors in your Python file.")
14845 (license license:expat)))
14846
14847 (define-public python2-parso
14848 (package-with-python2 python-parso))
14849
14850 (define-public python-async-generator
14851 (package
14852 (name "python-async-generator")
14853 (version "1.10")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "async_generator" version))
14858 (sha256
14859 (base32
14860 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14861 (build-system python-build-system)
14862 (native-inputs
14863 `(("python-pytest" ,python-pytest)))
14864 (home-page "https://github.com/python-trio/async_generator")
14865 (synopsis "Async generators and context managers for Python 3.5+")
14866 (description "@code{async_generator} back-ports Python 3.6's native async
14867 generators and Python 3.7's context managers into Python 3.5.")
14868 ;; Dual licensed.
14869 (license (list license:expat license:asl2.0))))
14870
14871 (define-public python-async-timeout
14872 (package
14873 (name "python-async-timeout")
14874 (version "3.0.1")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "async-timeout" version))
14879 (sha256
14880 (base32
14881 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14882 (build-system python-build-system)
14883 (home-page "https://github.com/aio-libs/async_timeout/")
14884 (synopsis "Timeout context manager for asyncio programs")
14885 (description "@code{async-timeout} provides a timeout timeout context
14886 manager compatible with @code{asyncio}.")
14887 (license license:asl2.0)))
14888
14889 (define-public python-glob2
14890 (package
14891 (name "python-glob2")
14892 (version "0.6")
14893 (source
14894 (origin
14895 (method git-fetch)
14896 (uri (git-reference
14897 (url "https://github.com/miracle2k/python-glob2.git")
14898 (commit version)))
14899 (file-name (git-file-name name version))
14900 (sha256
14901 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14902 (build-system python-build-system)
14903 (home-page "https://github.com/miracle2k/python-glob2/")
14904 (synopsis "Extended Version of the python buildin glob module")
14905 (description "This is an extended version of the Python
14906 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14907 adds:
14908
14909 @itemize
14910 @item The ability to capture the text matched by glob patterns, and return
14911 those matches alongside the file names.
14912 @item A recursive @code{**} globbing syntax, akin for example to the
14913 @code{globstar} option of Bash.
14914 @item The ability to replace the file system functions used, in order to glob
14915 on virtual file systems.
14916 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14917 @end itemize
14918
14919 Glob2 currently based on the glob code from Python 3.3.1.")
14920 (license license:bsd-2)))
14921
14922 (define-public python2-glob2
14923 (package-with-python2 python-glob2))
14924
14925 (define-public python-gipc
14926 (package
14927 (name "python-gipc")
14928 (version "0.6.0")
14929 (source
14930 (origin
14931 (method url-fetch)
14932 (uri (pypi-uri "gipc" version ".zip"))
14933 (sha256
14934 (base32
14935 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14936 (build-system python-build-system)
14937 (native-inputs
14938 `(("unzip" ,unzip)))
14939 (propagated-inputs
14940 `(("python-gevent" ,python-gevent)))
14941 (home-page "http://gehrcke.de/gipc")
14942 (synopsis "Child process management in the context of gevent")
14943 (description "Usage of Python's multiprocessing package in a
14944 gevent-powered application may raise problems. With @code{gipc},
14945 process-based child processes can safely be created anywhere within a
14946 gevent-powered application.")
14947 (license license:expat)))
14948
14949 (define-public python2-gipc
14950 (package-with-python2 python-gipc))
14951
14952 (define-public python-fusepy
14953 (package
14954 (name "python-fusepy")
14955 (version "2.0.4")
14956 (source
14957 (origin
14958 (method url-fetch)
14959 (uri (pypi-uri "fusepy" version))
14960 (sha256
14961 (base32
14962 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14963 (build-system python-build-system)
14964 (arguments
14965 `(#:phases
14966 (modify-phases %standard-phases
14967 (add-before 'build 'set-library-file-name
14968 (lambda* (#:key inputs #:allow-other-keys)
14969 (let ((fuse (assoc-ref inputs "fuse")))
14970 (substitute* "fuse.py"
14971 (("find_library\\('fuse'\\)")
14972 (string-append "'" fuse "/lib/libfuse.so'")))
14973 #t))))))
14974 (propagated-inputs
14975 `(("fuse" ,fuse)))
14976 (home-page "https://github.com/fusepy/fusepy")
14977 (synopsis "Simple ctypes bindings for FUSE")
14978 (description "Python module that provides a simple interface to FUSE and
14979 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14980 (license license:isc)))
14981
14982 (define-public python2-fusepy
14983 (package-with-python2 python-fusepy))
14984
14985 (define-public python2-gdrivefs
14986 (package
14987 (name "python2-gdrivefs")
14988 (version "0.14.9")
14989 (source
14990 (origin
14991 (method url-fetch)
14992 (uri (pypi-uri "gdrivefs" version))
14993 (sha256
14994 (base32
14995 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14996 (build-system python-build-system)
14997 (arguments
14998 `(#:python ,python-2
14999 #:phases
15000 (modify-phases %standard-phases
15001 (add-before 'build 'patch-setup-py
15002 (lambda _
15003 ;; Update requirements from dependency==version
15004 ;; to dependency>=version
15005 (substitute* "gdrivefs/resources/requirements.txt"
15006 (("==") ">="))
15007 #t)))))
15008 (native-inputs
15009 `(("python2-gipc" ,python2-gipc)
15010 ("python2-gevent" ,python2-gevent)
15011 ("python2-greenlet" ,python2-greenlet)
15012 ("python2-httplib2" ,python2-httplib2)
15013 ("python2-uritemplate" ,python2-uritemplate)
15014 ("python2-oauth2client" ,python2-oauth2client)
15015 ("python2-six" ,python2-six)))
15016 (propagated-inputs
15017 `(("python2-dateutil" ,python2-dateutil)
15018 ("python2-fusepy" ,python2-fusepy)
15019 ("python2-google-api-client" ,python2-google-api-client)))
15020 (home-page "https://github.com/dsoprea/GDriveFS")
15021 (synopsis "Mount Google Drive as a local file system")
15022 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15023 under Python 2.7.")
15024 (license license:gpl2)))
15025
15026 (define-public pybind11
15027 (package
15028 (name "pybind11")
15029 (version "2.3.0")
15030 (source (origin
15031 (method git-fetch)
15032 (uri (git-reference
15033 (url "https://github.com/pybind/pybind11.git")
15034 (commit (string-append "v" version))))
15035 (sha256
15036 (base32
15037 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15038 (file-name (git-file-name name version))))
15039 (build-system cmake-build-system)
15040 (native-inputs
15041 `(("python" ,python)
15042 ("python-pytest" ,python-pytest)))
15043 (arguments
15044 `(#:test-target "check"))
15045 (home-page "https://github.com/pybind/pybind11/")
15046 (synopsis "Seamless operability between C++11 and Python")
15047 (description "pybind11 is a lightweight header-only library that exposes
15048 C++ types in Python and vice versa, mainly to create Python bindings of
15049 existing C++ code. Its goals and syntax are similar to the excellent
15050 Boost.Python library by David Abrahams: to minimize boilerplate code in
15051 traditional extension modules by inferring type information using compile-time
15052 introspection.")
15053 (license license:expat)))
15054
15055 (define-public python-fasteners
15056 (package
15057 (name "python-fasteners")
15058 (version "0.14.1")
15059 (source
15060 (origin
15061 (method url-fetch)
15062 (uri (pypi-uri "fasteners" version))
15063 (sha256
15064 (base32
15065 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15066 (build-system python-build-system)
15067 (propagated-inputs
15068 `(("python-monotonic" ,python-monotonic)
15069 ("python-six" ,python-six)
15070 ("python-testtools" ,python-testtools)))
15071 (home-page "https://github.com/harlowja/fasteners")
15072 (synopsis "Python package that provides useful locks")
15073 (description
15074 "This package provides a Python program that provides following locks:
15075
15076 @itemize
15077 @item Locking decorator
15078 @item Reader-writer locks
15079 @item Inter-process locks
15080 @item Generic helpers
15081 @end itemize\n")
15082 (properties `((python2-variant . ,(delay python2-fasteners))))
15083 (license license:asl2.0)))
15084
15085 (define-public python2-fasteners
15086 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15087 (package
15088 (inherit base)
15089 (propagated-inputs
15090 `(("python2-futures" ,python2-futures)
15091 ,@(package-propagated-inputs base))))))
15092
15093 (define-public python-requests-file
15094 (package
15095 (name "python-requests-file")
15096 (version "1.4.3")
15097 (source
15098 (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "requests-file" version))
15101 (sha256
15102 (base32
15103 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15104 (build-system python-build-system)
15105 (propagated-inputs
15106 `(("python-requests" ,python-requests)
15107 ("python-six" ,python-six)))
15108 (home-page
15109 "https://github.com/dashea/requests-file")
15110 (synopsis "File transport adapter for Requests")
15111 (description
15112 "Requests-File is a transport adapter for use with the Requests Python
15113 library to allow local file system access via @code{file://} URLs.")
15114 (license license:asl2.0)))
15115
15116 (define-public python2-requests-file
15117 (package-with-python2 python-requests-file))
15118
15119 (define-public python-tldextract
15120 (package
15121 (name "python-tldextract")
15122 (version "2.2.0")
15123 (source
15124 (origin
15125 (method url-fetch)
15126 (uri (pypi-uri "tldextract" version))
15127 (sha256
15128 (base32
15129 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15130 (build-system python-build-system)
15131 (native-inputs
15132 `(("python-pytest" ,python-pytest)
15133 ("python-responses" ,python-responses)))
15134 (propagated-inputs
15135 `(("python-idna" ,python-idna)
15136 ("python-requests" ,python-requests)
15137 ("python-requests-file" ,python-requests-file)))
15138 (home-page
15139 "https://github.com/john-kurkowski/tldextract")
15140 (synopsis
15141 "Separate the TLD from the registered domain and subdomains of a URL")
15142 (description
15143 "TLDExtract accurately separates the TLD from the registered domain and
15144 subdomains of a URL, using the Public Suffix List. By default, this includes
15145 the public ICANN TLDs and their exceptions. It can optionally support the
15146 Public Suffix List's private domains as well.")
15147 (license license:bsd-3)))
15148
15149 (define-public python2-tldextract
15150 (package-with-python2 python-tldextract))
15151
15152 (define-public python-pynamecheap
15153 (package
15154 (name "python-pynamecheap")
15155 (version "0.0.3")
15156 (source
15157 (origin
15158 (method url-fetch)
15159 (uri (pypi-uri "PyNamecheap" version))
15160 (sha256
15161 (base32
15162 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15163 (build-system python-build-system)
15164 (propagated-inputs
15165 `(("python-requests" ,python-requests)))
15166 (home-page
15167 "https://github.com/Bemmu/PyNamecheap")
15168 (synopsis
15169 "Namecheap API client in Python")
15170 (description
15171 "PyNamecheap is a Namecheap API client in Python.")
15172 (license license:expat)))
15173
15174 (define-public python2-pynamecheap
15175 (package-with-python2 python-pynamecheap))
15176
15177 (define-public python-dns-lexicon
15178 (package
15179 (name "python-dns-lexicon")
15180 (version "2.4.0")
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "dns-lexicon" version))
15185 (sha256
15186 (base32
15187 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15188 (build-system python-build-system)
15189 (arguments
15190 `(#:tests? #f)) ;requires internet access
15191 (propagated-inputs
15192 `(("python-future" ,python-future)
15193 ("python-pynamecheap" ,python-pynamecheap)
15194 ("python-requests" ,python-requests)
15195 ("python-tldextract" ,python-tldextract)
15196 ("python-urllib3" ,python-urllib3)))
15197 (home-page "https://github.com/AnalogJ/lexicon")
15198 (synopsis
15199 "Manipulate DNS records on various DNS providers")
15200 (description
15201 "Lexicon provides a way to manipulate DNS records on multiple DNS
15202 providers in a standardized way. It has a CLI but it can also be used as a
15203 Python library. It was designed to be used in automation, specifically with
15204 Let's Encrypt.")
15205 (license license:expat)))
15206
15207 (define-public python2-dns-lexicon
15208 (package-with-python2 python-dns-lexicon))
15209
15210 (define-public python-commandlines
15211 (package
15212 (name "python-commandlines")
15213 (version "0.4.1")
15214 (source
15215 (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "commandlines" version))
15218 (sha256
15219 (base32
15220 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15221 (build-system python-build-system)
15222 (home-page "https://github.com/chrissimpkins/commandlines")
15223 (synopsis "Command line argument to object parsing library")
15224 (description
15225 "@code{Commandlines} is a Python library for command line application
15226 development that supports command line argument parsing, command string
15227 validation testing and application logic.")
15228 (license license:expat)))
15229
15230 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15231 ;; python-numba. They have a very unflexible relationship.
15232 (define-public python-numba
15233 (package
15234 (name "python-numba")
15235 (version "0.42.0")
15236 (source
15237 (origin
15238 (method url-fetch)
15239 (uri (pypi-uri "numba" version))
15240 (sha256
15241 (base32
15242 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15243 (build-system python-build-system)
15244 (arguments
15245 `(#:modules ((guix build utils)
15246 (guix build python-build-system)
15247 (ice-9 ftw)
15248 (srfi srfi-1)
15249 (srfi srfi-26))
15250 #:phases
15251 (modify-phases %standard-phases
15252 (add-after 'unpack 'disable-proprietary-features
15253 (lambda _
15254 (setenv "NUMBA_DISABLE_HSA" "1")
15255 (setenv "NUMBA_DISABLE_CUDA" "1")
15256 #t))
15257 (add-after 'unpack 'remove-failing-tests
15258 (lambda _
15259 ;; FIXME: these tests fail for unknown reasons:
15260 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15261 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15262 (substitute* "numba/tests/test_dispatcher.py"
15263 (("def test(_non_writable_pycache)" _ m)
15264 (string-append "def guix_skip" m))
15265 (("def test(_non_creatable_pycache)" _ m)
15266 (string-append "def guix_skip" m))
15267 (("def test(_frozen)" _ m)
15268 (string-append "def guix_skip" m)))
15269
15270 ;; These tests fail because we don't run the tests from the build
15271 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15272 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15273 (substitute* "numba/tests/test_pycc.py"
15274 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15275 (string-append "def guix_skip" m)))
15276 #t))
15277 (replace 'check
15278 (lambda _
15279 (let ((cwd (getcwd)))
15280 (setenv "PYTHONPATH"
15281 (string-append cwd "/build/"
15282 (find (cut string-prefix? "lib" <>)
15283 (scandir (string-append cwd "/build")))
15284 ":"
15285 (getenv "PYTHONPATH")))
15286 ;; Something is wrong with the PYTHONPATH when running the
15287 ;; tests from the build directory, as it complains about not being
15288 ;; able to import certain modules.
15289 (with-directory-excursion "/tmp"
15290 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15291 #t)))))
15292 (propagated-inputs
15293 `(("python-llvmlite" ,python-llvmlite)
15294 ("python-numpy" ,python-numpy)
15295 ("python-singledispatch" ,python-singledispatch)))
15296 ;; Needed for tests.
15297 (inputs
15298 `(("python-jinja2" ,python-jinja2)
15299 ("python-pygments" ,python-pygments)))
15300 (home-page "https://numba.pydata.org")
15301 (synopsis "Compile Python code using LLVM")
15302 (description "Numba gives you the power to speed up your applications with
15303 high performance functions written directly in Python. With a few
15304 annotations, array-oriented and math-heavy Python code can be just-in-time
15305 compiled to native machine instructions, similar in performance to C, C++ and
15306 Fortran, without having to switch languages or Python interpreters.
15307
15308 Numba works by generating optimized machine code using the LLVM compiler
15309 infrastructure at import time, runtime, or statically (using the included pycc
15310 tool).")
15311 (license license:bsd-3)))
15312
15313 (define-public python-anndata
15314 (package
15315 (name "python-anndata")
15316 (version "0.6.18")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "anndata" version))
15321 (sha256
15322 (base32
15323 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15324 (build-system python-build-system)
15325 (propagated-inputs
15326 `(("python-h5py" ,python-h5py)
15327 ("python-natsort" ,python-natsort)
15328 ("python-pandas" ,python-pandas)
15329 ("python-scipy" ,python-scipy)))
15330 (home-page "https://github.com/theislab/anndata")
15331 (synopsis "Annotated data for data analysis pipelines")
15332 (description "Anndata is a package for simple (functional) high-level APIs
15333 for data analysis pipelines. In this context, it provides an efficient,
15334 scalable way of keeping track of data together with learned annotations and
15335 reduces the code overhead typically encountered when using a mostly
15336 object-oriented library such as @code{scikit-learn}.")
15337 (license license:bsd-3)))
15338
15339 (define-public python-dill
15340 (package
15341 (name "python-dill")
15342 (version "0.2.9")
15343 (source
15344 (origin
15345 (method url-fetch)
15346 (uri (pypi-uri "dill" version))
15347 (sha256
15348 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15349 (build-system python-build-system)
15350 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15351 (arguments '(#:tests? #f))
15352 (home-page "https://pypi.org/project/dill")
15353 (synopsis "Serialize all of Python")
15354 (description "Dill extends Python's @code{pickle} module for serializing
15355 and de-serializing Python objects to the majority of the built-in Python
15356 types. Dill provides the user the same interface as the @code{pickle} module,
15357 and also includes some additional features. In addition to pickling Python
15358 objects, @code{dill} provides the ability to save the state of an interpreter
15359 session in a single command. Hence, it would be feasible to save a
15360 interpreter session, close the interpreter, ship the pickled file to another
15361 computer, open a new interpreter, unpickle the session and thus continue from
15362 the saved state of the original interpreter session.")
15363 (license license:bsd-3)))
15364
15365 (define-public python-multiprocess
15366 (package
15367 (name "python-multiprocess")
15368 (version "0.70.6.1")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "multiprocess" version))
15373 (sha256
15374 (base32
15375 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15376 (build-system python-build-system)
15377 (propagated-inputs
15378 `(("python-dill" ,python-dill)))
15379 (home-page "https://pypi.org/project/multiprocess")
15380 (synopsis "Multiprocessing and multithreading in Python")
15381 (description
15382 "This package is a fork of the multiprocessing Python package, a package
15383 which supports the spawning of processes using the API of the standard
15384 library's @code{threading} module.")
15385 (license license:bsd-3)))
15386
15387 (define-public python-toolz
15388 (package
15389 (name "python-toolz")
15390 (version "0.9.0")
15391 (source
15392 (origin
15393 (method url-fetch)
15394 (uri (pypi-uri "toolz" version))
15395 (sha256
15396 (base32
15397 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15398 (build-system python-build-system)
15399 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15400 ;; unregistered loader type"
15401 (arguments '(#:tests? #f))
15402 (home-page "https://github.com/pytoolz/toolz/")
15403 (synopsis "List processing tools and functional utilities")
15404 (description
15405 "This package provides a set of utility functions for iterators,
15406 functions, and dictionaries.")
15407 (license license:bsd-3)))
15408
15409 (define-public python2-toolz
15410 (package-with-python2 python-toolz))
15411
15412 (define-public python-cytoolz
15413 (package
15414 (name "python-cytoolz")
15415 (version "0.9.0.1")
15416 (source
15417 (origin
15418 (method url-fetch)
15419 (uri (pypi-uri "cytoolz" version))
15420 (sha256
15421 (base32
15422 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15423 (build-system python-build-system)
15424 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15425 ;; 'exceptions'"
15426 (arguments '(#:tests? #f))
15427 (propagated-inputs
15428 `(("python-toolz" ,python-toolz)))
15429 (native-inputs
15430 `(("python-cython" ,python-cython)))
15431 (home-page "https://github.com/pytoolz/cytoolz")
15432 (synopsis "High performance functional utilities")
15433 (description
15434 "The cytoolz package implements the same API as provided by toolz. The
15435 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15436 that is accessible to other projects developed in Cython.")
15437 (license license:bsd-3)))
15438
15439 (define-public python-sortedcontainers
15440 (package
15441 (name "python-sortedcontainers")
15442 (version "2.0.4")
15443 (source
15444 (origin
15445 (method url-fetch)
15446 (uri (pypi-uri "sortedcontainers" version))
15447 (sha256
15448 (base32
15449 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15450 (build-system python-build-system)
15451 (native-inputs
15452 `(("python-tox" ,python-tox)))
15453 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15454 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15455 (description
15456 "This package provides a sorted collections library, written in
15457 pure-Python.")
15458 (license license:asl2.0)))
15459
15460 (define-public python-cloudpickle
15461 (package
15462 (name "python-cloudpickle")
15463 (version "0.6.1")
15464 (source
15465 (origin
15466 (method url-fetch)
15467 (uri (pypi-uri "cloudpickle" version))
15468 (sha256
15469 (base32
15470 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15471 (build-system python-build-system)
15472 ;; FIXME: there are 5 errors in 122 tests:
15473 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15474 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15475 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15476 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15477 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15478 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15479 (arguments '(#:tests? #f))
15480 (native-inputs
15481 `(("python-pytest" ,python-pytest)
15482 ("python-mock" ,python-mock)
15483 ("python-tornado" ,python-tornado)))
15484 (home-page "https://github.com/cloudpipe/cloudpickle")
15485 (synopsis "Extended pickling support for Python objects")
15486 (description
15487 "Cloudpickle makes it possible to serialize Python constructs not
15488 supported by the default pickle module from the Python standard library. It
15489 is especially useful for cluster computing where Python expressions are
15490 shipped over the network to execute on remote hosts, possibly close to the
15491 data.")
15492 (license license:bsd-3)))
15493
15494 (define-public python2-cloudpickle
15495 (package-with-python2 python-cloudpickle))
15496
15497 (define-public python-locket
15498 (package
15499 (name "python-locket")
15500 (version "0.2.0")
15501 (source
15502 (origin
15503 (method url-fetch)
15504 (uri (pypi-uri "locket" version))
15505 (sha256
15506 (base32
15507 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15508 (build-system python-build-system)
15509 (home-page "https://github.com/mwilliamson/locket.py")
15510 (synopsis "File-based locks for Python")
15511 (description
15512 "Locket implements a lock that can be used by multiple processes provided
15513 they use the same path.")
15514 (license license:bsd-2)))
15515
15516 (define-public python2-locket
15517 (package-with-python2 python-locket))
15518
15519 (define-public python-blosc
15520 (package
15521 (name "python-blosc")
15522 (version "1.5.1")
15523 (source
15524 (origin
15525 (method url-fetch)
15526 (uri (pypi-uri "blosc" version))
15527 (sha256
15528 (base32
15529 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15530 (build-system python-build-system)
15531 ;; FIXME: all tests pass, but then this error is printed:
15532 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15533 (arguments '(#:tests? #f))
15534 (propagated-inputs
15535 `(("python-numpy" ,python-numpy)))
15536 (home-page "https://github.com/blosc/python-blosc")
15537 (synopsis "Python wrapper for the Blosc data compressor library")
15538 (description "Blosc is a high performance compressor optimized for binary
15539 data. It has been designed to transmit data to the processor cache faster
15540 than the traditional, non-compressed, direct memory fetch approach via a
15541 @code{memcpy()} system call.
15542
15543 Blosc works well for compressing numerical arrays that contains data with
15544 relatively low entropy, like sparse data, time series, grids with
15545 regular-spaced values, etc.
15546
15547 This Python package wraps the Blosc library.")
15548 (license license:bsd-3)))
15549
15550 (define-public python2-blosc
15551 (package-with-python2 python-blosc))
15552
15553 (define-public python-partd
15554 (package
15555 (name "python-partd")
15556 (version "0.3.9")
15557 (source
15558 (origin
15559 (method url-fetch)
15560 (uri (pypi-uri "partd" version))
15561 (sha256
15562 (base32
15563 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15564 (build-system python-build-system)
15565 (propagated-inputs
15566 `(("python-blosc" ,python-blosc)
15567 ("python-locket" ,python-locket)
15568 ("python-numpy" ,python-numpy)
15569 ("python-pandas" ,python-pandas)
15570 ("python-pyzmq" ,python-pyzmq)
15571 ("python-toolz" ,python-toolz)))
15572 (home-page "https://github.com/dask/partd/")
15573 (synopsis "Appendable key-value storage")
15574 (description "Partd stores key-value pairs. Values are raw bytes. We
15575 append on old values. Partd excels at shuffling operations.")
15576 (license license:bsd-3)))
15577
15578 (define-public python2-partd
15579 (package-with-python2 python-partd))
15580
15581 (define-public python-dask
15582 (package
15583 (name "python-dask")
15584 (version "1.2.2")
15585 (source
15586 (origin
15587 (method url-fetch)
15588 (uri (pypi-uri "dask" version))
15589 (sha256
15590 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15591 (build-system python-build-system)
15592 ;; A single test out of 5000+ fails. This test is marked as xfail when
15593 ;; pytest-xdist is used.
15594 (arguments
15595 `(#:phases
15596 (modify-phases %standard-phases
15597 (add-after 'unpack 'disable-broken-test
15598 (lambda _
15599 (substitute* "dask/tests/test_threaded.py"
15600 (("def test_interrupt\\(\\)" m)
15601 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15602 m)))
15603 (when (which "python2")
15604 ;; This test fails with recent Pandas:
15605 ;; <https://github.com/dask/dask/issues/3794>.
15606 (substitute* "dask/dataframe/tests/test_dataframe.py"
15607 (("def test_info\\(\\)" m)
15608 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15609 m))))
15610 #t))
15611 (replace 'check
15612 (lambda _ (invoke "pytest" "-vv"))))))
15613 (propagated-inputs
15614 `(("python-cloudpickle" ,python-cloudpickle)
15615 ("python-numpy" ,python-numpy)
15616 ("python-pandas" ,python-pandas)
15617 ("python-partd" ,python-partd)
15618 ("python-toolz" ,python-toolz)
15619 ("python-pyyaml" ,python-pyyaml)))
15620 (native-inputs
15621 `(("python-pytest" ,python-pytest)
15622 ("python-pytest-runner" ,python-pytest-runner)))
15623 (home-page "https://github.com/dask/dask/")
15624 (synopsis "Parallel computing with task scheduling")
15625 (description
15626 "Dask is a flexible parallel computing library for analytics. It
15627 consists of two components: dynamic task scheduling optimized for computation,
15628 and large data collections like parallel arrays, dataframes, and lists that
15629 extend common interfaces like NumPy, Pandas, or Python iterators to
15630 larger-than-memory or distributed environments. These parallel collections
15631 run on top of the dynamic task schedulers. ")
15632 (license license:bsd-3)))
15633
15634 (define-public python2-dask
15635 (package-with-python2 python-dask))
15636
15637 (define-public python-ilinkedlist
15638 (package
15639 (name "python-ilinkedlist")
15640 (version "0.4.0")
15641 (source
15642 (origin
15643 (method url-fetch)
15644 (uri (pypi-uri "ilinkedlist" version))
15645 (sha256
15646 (base32
15647 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15648 (build-system python-build-system)
15649 (native-inputs `(("python-pytest" ,python-pytest)))
15650 (inputs `(("python" ,python)))
15651 (home-page "https://github.com/luther9/ilinkedlist-py")
15652 (synopsis "Immutable linked list library")
15653 (description
15654 "This is a implementation of immutable linked lists for Python. It
15655 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15656 Since a linked list is treated as immutable, it is hashable, and its length
15657 can be retrieved in constant time. Some of the terminology is inspired by
15658 LISP. It is possible to create an improper list by creating a @code{Pair}
15659 with a non-list @code{cdr}.")
15660 (license license:gpl3+)))
15661
15662 (define-public python-readlike
15663 (package
15664 (name "python-readlike")
15665 (version "0.1.3")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "readlike" version))
15670 (sha256
15671 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15672 (build-system python-build-system)
15673 (home-page "https://github.com/jangler/readlike")
15674 (synopsis "GNU Readline-like line editing module")
15675 (description
15676 "This Python module provides line editing functions similar to the default
15677 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15678 @code{readline} package, this one allows access to those capabilties in settings
15679 outside of a standard command-line interface. It is especially well-suited to
15680 interfacing with Urwid, due to a shared syntax for describing key inputs.
15681
15682 Currently, all stateless Readline commands are implemented. Yanking and history
15683 are not supported.")
15684 (license license:expat)))
15685
15686 (define-public python2-readlike
15687 (package-with-python2 python-readlike))
15688
15689 (define-public python-reparser
15690 (package
15691 (name "python-reparser")
15692 (version "1.4.3")
15693 (source
15694 (origin
15695 (method url-fetch)
15696 (uri (pypi-uri "ReParser" version))
15697 (sha256
15698 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15699 (build-system python-build-system)
15700 (home-page "https://github.com/xmikos/reparser")
15701 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15702 (description
15703 "This Python library provides a simple lexer/parser for inline markup based
15704 on regular expressions.")
15705 (license license:expat)))
15706
15707 (define-public python2-reparser
15708 (let ((reparser (package-with-python2
15709 (strip-python2-variant python-reparser))))
15710 (package (inherit reparser)
15711 (propagated-inputs
15712 `(("python2-enum34" ,python2-enum34)
15713 ,@(package-propagated-inputs reparser))))))
15714
15715 (define-public python-precis-i18n
15716 (package
15717 (name "python-precis-i18n")
15718 (version "1.0.0")
15719 (source
15720 (origin
15721 (method url-fetch)
15722 (uri (pypi-uri "precis_i18n" version))
15723 (sha256
15724 (base32
15725 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15726 (build-system python-build-system)
15727 (home-page "https://github.com/byllyfish/precis_i18n")
15728 (synopsis "Implementation of the PRECIS framework")
15729 (description
15730 "This module implements the PRECIS Framework as described in RFC 8264,
15731 RFC 8265 and RFC 8266.")
15732 (license license:expat)))
15733
15734 (define-public python-absl-py
15735 (package
15736 (name "python-absl-py")
15737 (version "0.6.1")
15738 (source
15739 (origin
15740 (method url-fetch)
15741 (uri (pypi-uri "absl-py" version))
15742 (sha256
15743 (base32
15744 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15745 (build-system python-build-system)
15746 (propagated-inputs
15747 `(("python-six" ,python-six)))
15748 (home-page "https://github.com/abseil/abseil-py")
15749 (synopsis "Abseil Python common libraries")
15750 (description
15751 "This package provides the Abseil Python Common Libraries, a collection
15752 of Python libraries for building Python applications.")
15753 (license license:asl2.0)))
15754
15755 (define-public python-astor
15756 (package
15757 (name "python-astor")
15758 (version "0.7.1")
15759 (source
15760 (origin
15761 (method url-fetch)
15762 (uri (pypi-uri "astor" version))
15763 (sha256
15764 (base32
15765 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15766 (build-system python-build-system)
15767 ;; FIXME: There are two errors and two test failures.
15768 (arguments `(#:tests? #f))
15769 (home-page "https://github.com/berkerpeksag/astor")
15770 (synopsis "Read and write Python ASTs")
15771 (description "Astor is designed to allow easy manipulation of Python
15772 source via the Abstract Syntax Tree.")
15773 (license license:bsd-3)))
15774
15775 (define-public python2-astor
15776 (package-with-python2 python-astor))
15777
15778 (define-public python-grpcio
15779 (package
15780 (name "python-grpcio")
15781 (version "1.17.1")
15782 (source
15783 (origin
15784 (method url-fetch)
15785 (uri (pypi-uri "grpcio" version))
15786 (sha256
15787 (base32
15788 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15789 (build-system python-build-system)
15790 (propagated-inputs
15791 `(("python-six" ,python-six)))
15792 (home-page "https://grpc.io")
15793 (synopsis "HTTP/2-based RPC framework")
15794 (description "This package provides a Python library for communicating
15795 with the HTTP/2-based RPC framework gRPC.")
15796 (license license:asl2.0)))
15797
15798 (define-public python-astunparse
15799 (package
15800 (name "python-astunparse")
15801 (version "1.6.2")
15802 (source
15803 (origin
15804 (method url-fetch)
15805 (uri (pypi-uri "astunparse" version))
15806 (sha256
15807 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15808 (build-system python-build-system)
15809 (arguments '(#:tests? #f)) ; there are none
15810 (propagated-inputs
15811 `(("python-six" ,python-six)
15812 ("python-wheel" ,python-wheel)))
15813 (home-page "https://github.com/simonpercivall/astunparse")
15814 (synopsis "AST unparser for Python")
15815 (description "This package provides an AST unparser for Python. It is a
15816 factored out version of @code{unparse} found in the Python source
15817 distribution.")
15818 (license license:bsd-3)))
15819
15820 (define-public python-gast
15821 (package
15822 (name "python-gast")
15823 (version "0.2.2")
15824 (source
15825 (origin
15826 (method url-fetch)
15827 (uri (pypi-uri "gast" version))
15828 (sha256
15829 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15830 (build-system python-build-system)
15831 (propagated-inputs
15832 `(("python-astunparse" ,python-astunparse)))
15833 (home-page "https://pypi.org/project/gast/")
15834 (synopsis "Generic Python AST that abstracts the underlying Python version")
15835 (description
15836 "GAST provides a compatibility layer between the AST of various Python
15837 versions, as produced by @code{ast.parse} from the standard @code{ast}
15838 module.")
15839 (license license:bsd-3)))
15840
15841 (define-public python-wikidata
15842 (package
15843 (name "python-wikidata")
15844 (version "0.6.1")
15845 (source
15846 (origin
15847 (method url-fetch)
15848 (uri (pypi-uri "Wikidata" version))
15849 (sha256
15850 (base32
15851 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15852 (build-system python-build-system)
15853 (propagated-inputs
15854 `(("python-babel" ,python-babel)))
15855 (home-page "https://github.com/dahlia/wikidata")
15856 (synopsis "Wikidata client library")
15857 (description
15858 "This package provides a Python interface to
15859 @url{https://www.wikidata.org/, Wikidata}.")
15860 (properties '((upstream-name . "Wikidata")))
15861 (license license:gpl3+)))
15862
15863 (define-public python-doctest-ignore-unicode
15864 (package
15865 (name "python-doctest-ignore-unicode")
15866 (version "0.1.2")
15867 (source
15868 (origin
15869 (method url-fetch)
15870 (uri (pypi-uri "doctest-ignore-unicode" version))
15871 (sha256
15872 (base32
15873 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15874 (build-system python-build-system)
15875 (native-inputs
15876 `(("python-nose" ,python-nose)))
15877 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15878 (synopsis "Ignore Unicode literal prefixes in doctests")
15879 (description
15880 "This package adds support for a flag to ignore Unicode literal prefixes
15881 in doctests.")
15882 (license license:asl2.0)))
15883
15884 (define-public python-attr
15885 (package
15886 (name "python-attr")
15887 (version "0.3.1")
15888 (source
15889 (origin
15890 (method url-fetch)
15891 (uri (pypi-uri "attr" version))
15892 (sha256
15893 (base32
15894 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15895 (build-system python-build-system)
15896 (home-page "https://github.com/denis-ryzhkov/attr")
15897 (synopsis "Decorator for attributes of target function or class")
15898 (description "Simple decorator to set attributes of target function or
15899 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15900 (license license:expat)))
15901
15902 (define-public python-construct
15903 (package
15904 (name "python-construct")
15905 (version "2.9.45")
15906 (source
15907 (origin
15908 (method url-fetch)
15909 (uri (pypi-uri "construct" version))
15910 (sha256
15911 (base32
15912 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15913 (build-system python-build-system)
15914 (arguments
15915 `(#:tests? #f)) ; No tests exist.
15916 (propagated-inputs
15917 `(("python-extras" ,python-extras)
15918 ("python-arrow" ,python-arrow)
15919 ("python-numpy" ,python-numpy)
15920 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15921 (home-page "http://construct.readthedocs.io")
15922 (synopsis "Declarative and symmetrical parser and builder for binary data")
15923 (description
15924 "This package provides both simple, atomic constructs (such as
15925 integers of various sizes), as well as composite ones which allow you
15926 form hierarchical and sequential structures of increasing complexity.
15927 It features bit and byte granularity, easy debugging and testing, an
15928 easy-to-extend subclass system, and lots of primitive constructs to
15929 make your work easier.")
15930 (license license:expat)))
15931
15932 (define-public python-humanize
15933 (package
15934 (name "python-humanize")
15935 (version "0.5.1")
15936 (source
15937 (origin
15938 (method url-fetch)
15939 (uri (pypi-uri "humanize" version))
15940 (sha256
15941 (base32
15942 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15943 (arguments
15944 '(#:tests? #f)) ; tests not in pypi archive
15945 (build-system python-build-system)
15946 (home-page "https://github.com/jmoiron/humanize")
15947 (synopsis "Print numerical information in a human-readable form")
15948 (description "This package provides a Python module that displays numbers
15949 and dates in \"human readable\" forms. For example, it would display
15950 \"12345591313\" as \"12.3 billion\".")
15951 (license license:expat)))
15952
15953 (define-public python-txaio
15954 (package
15955 (name "python-txaio")
15956 (version "18.8.1")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "txaio" version))
15961 (sha256
15962 (base32
15963 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15964 (build-system python-build-system)
15965 (propagated-inputs
15966 `(("python-twisted" ,python-twisted)
15967 ("python-six" ,python-six)))
15968 (home-page "https://github.com/crossbario/txaio")
15969 (synopsis "Compatibility layer between Python asyncio and Twisted")
15970 (description "Txaio provides a compatibility layer between the Python
15971 @code{asyncio} module and @code{Twisted}.")
15972 (license license:expat)))
15973
15974 (define-public python-toolshed
15975 (package
15976 (name "python-toolshed")
15977 (version "0.4.6")
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "toolshed" version))
15982 (sha256
15983 (base32
15984 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15985 (build-system python-build-system)
15986 (native-inputs
15987 `(("python-nose" ,python-nose)))
15988 (home-page "https://github.com/brentp/toolshed/")
15989 (synopsis "Collection of modules and functions for working with data")
15990 (description "This is a collection of well-tested, simple modules and
15991 functions that aim to reduce boilerplate when working with data.")
15992 (license license:bsd-2)))
15993
15994 (define-public python-annoy
15995 (package
15996 (name "python-annoy")
15997 (version "1.15.1")
15998 (source
15999 (origin
16000 (method url-fetch)
16001 (uri (pypi-uri "annoy" version))
16002 (sha256
16003 (base32
16004 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16005 (build-system python-build-system)
16006 (native-inputs
16007 `(("python-nose" ,python-nose)))
16008 (home-page "https://github.com/spotify/annoy/")
16009 (synopsis "Approximate nearest neighbors library")
16010 (description
16011 "Annoy is a C++ library with Python bindings to search for points in
16012 space that are close to a given query point. It also creates large read-only
16013 file-based data structures that are @code{mmap}ped into memory so that many
16014 processes may share the same data.")
16015 (license license:asl2.0)))
16016
16017 (define-public python-pylzma
16018 (package
16019 (name "python-pylzma")
16020 (version "0.5.0")
16021 (source
16022 (origin
16023 (method url-fetch)
16024 (uri (pypi-uri "pylzma" version))
16025 (sha256
16026 (base32
16027 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16028 (build-system python-build-system)
16029 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16030 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16031 (description "This package provides Python bindings for the LZMA library
16032 by Igor Pavlov.")
16033 (license license:lgpl2.1+)))
16034
16035 (define-public python2-pylzma
16036 (package-with-python2 python-pylzma))
16037
16038 (define-public python2-zeroconf
16039 (package
16040 (name "python2-zeroconf")
16041
16042 ;; This is the last version that supports Python 2.x.
16043 (version "0.19.1")
16044 (source
16045 (origin
16046 (method url-fetch)
16047 (uri (pypi-uri "zeroconf" version))
16048 (sha256
16049 (base32
16050 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16051 (build-system python-build-system)
16052 (arguments
16053 `(#:python ,python-2
16054 #:phases
16055 (modify-phases %standard-phases
16056 (add-after 'unpack 'patch-requires
16057 (lambda* (#:key inputs #:allow-other-keys)
16058 (substitute* "setup.py"
16059 (("enum-compat")
16060 "enum34"))
16061 #t)))))
16062 (native-inputs
16063 `(("python2-six" ,python2-six)
16064 ("python2-enum32" ,python2-enum34)
16065 ("python2-netifaces" ,python2-netifaces)
16066 ("python2-typing" ,python2-typing)))
16067 (home-page "https://github.com/jstasiak/python-zeroconf")
16068 (synopsis "Pure Python mDNS service discovery")
16069 (description
16070 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16071 compatible).")
16072 (license license:lgpl2.1+)))
16073
16074 (define-public python-bsddb3
16075 (package
16076 (name "python-bsddb3")
16077 (version "6.2.6")
16078 (source
16079 (origin
16080 (method url-fetch)
16081 (uri (pypi-uri "bsddb3" version))
16082 (sha256
16083 (base32
16084 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16085 (build-system python-build-system)
16086 (inputs
16087 `(("bdb" ,bdb)))
16088 (arguments
16089 '(#:phases
16090 (modify-phases %standard-phases
16091 (add-after 'unpack 'configure-locations
16092 (lambda* (#:key inputs #:allow-other-keys)
16093 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16094 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16095 #t))
16096 (replace 'check
16097 (lambda _
16098 (invoke "python3" "test3.py" "-v"))))))
16099 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16100 (synopsis "Python bindings for Oracle Berkeley DB")
16101 (description
16102 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16103 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16104 Transaction objects, and each of these is exposed as a Python type in the
16105 bsddb3.db module. The database objects can use various access methods: btree,
16106 hash, recno, and queue. Complete support of Berkeley DB distributed
16107 transactions. Complete support for Berkeley DB Replication Manager.
16108 Complete support for Berkeley DB Base Replication. Support for RPC.")
16109 (license license:bsd-3)))
16110
16111 (define-public python-dbfread
16112 (package
16113 (name "python-dbfread")
16114 (version "2.0.7")
16115 (source (origin
16116 (method url-fetch)
16117 (uri (pypi-uri "dbfread" version))
16118 (sha256
16119 (base32
16120 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16121 (build-system python-build-system)
16122 (native-inputs
16123 `(("python-pytest" ,python-pytest)))
16124 (home-page "https://dbfread.readthedocs.io")
16125 (synopsis "Read DBF Files with Python")
16126 (description
16127 "This library reads DBF files and returns the data as native Python data
16128 types for further processing. It is primarily intended for batch jobs and
16129 one-off scripts.")
16130 (license license:expat)))
16131
16132 (define-public python-cached-property
16133 (package
16134 (name "python-cached-property")
16135 (version "1.5.1")
16136 (source
16137 (origin
16138 (method url-fetch)
16139 (uri (pypi-uri "cached-property" version))
16140 (sha256
16141 (base32
16142 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16143 (build-system python-build-system)
16144 (arguments
16145 `(#:phases
16146 (modify-phases %standard-phases
16147 ;; https://github.com/pydanny/cached-property/issues/131
16148 ;; recent versions of freezegun break one test
16149 (add-after 'unpack 'disable-broken-test
16150 (lambda _
16151 (substitute* "tests/test_cached_property.py"
16152 (("def test_threads_ttl_expiry\\(self\\)" m)
16153 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16154 " " m)))
16155 #t)))))
16156 (native-inputs
16157 `(("python-freezegun" ,python-freezegun)))
16158 (home-page
16159 "https://github.com/pydanny/cached-property")
16160 (synopsis
16161 "Decorator for caching properties in classes")
16162 (description
16163 "This package provides a decorator which makes caching
16164 time-or-computationally-expensive properties quick and easy and works in Python
16165 2 or 3.")
16166 (license license:bsd-3)))
16167
16168 (define-public python-folium
16169 (package
16170 (name "python-folium")
16171 (version "0.10.0")
16172 (source
16173 (origin
16174 (method url-fetch)
16175 (uri (pypi-uri "folium" version))
16176 (sha256
16177 (base32
16178 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16179 (build-system python-build-system)
16180 (propagated-inputs
16181 `(("python-branca" ,python-branca)
16182 ("python-jinja2" ,python-jinja2)
16183 ("python-numpy" ,python-numpy)
16184 ("python-requests" ,python-requests)))
16185 (native-inputs
16186 `(("python-pytest" ,python-pytest)))
16187 (home-page "https://github.com/python-visualization/folium")
16188 (synopsis "Make beautiful maps with Leaflet.js & Python")
16189 (description "@code{folium} makes it easy to visualize data that’s been
16190 manipulated in Python on an interactive leaflet map. It enables both the
16191 binding of data to a map for @code{choropleth} visualizations as well as
16192 passing rich vector/raster/HTML visualizations as markers on the map.
16193
16194 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16195 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16196 supports Image, Video, GeoJSON and TopoJSON overlays.")
16197 (license license:expat)))
16198
16199 (define-public jube
16200 (package
16201 ;; This is a command-line tool, so no "python-" prefix.
16202 (name "jube")
16203 (version "2.2.2")
16204 (source (origin
16205 (method url-fetch)
16206 (uri (string-append
16207 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16208 version))
16209 (sha256
16210 (base32
16211 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16212 (file-name (string-append "jube-" version ".tar.gz"))))
16213 (build-system python-build-system)
16214 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16215 (synopsis "Benchmarking environment")
16216 (description
16217 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16218 benchmarked application, benchmark data is stored in a format that allows JUBE
16219 to deduct the desired information. This data can be parsed by automatic pre-
16220 and post-processing scripts that draw information and store it more densely
16221 for manual interpretation.")
16222 (license license:gpl3+)))
16223
16224 (define-public python-pyroutelib3
16225 (package
16226 (name "python-pyroutelib3")
16227 (version "1.3.post1")
16228 (source
16229 (origin
16230 (method url-fetch)
16231 (uri (pypi-uri "pyroutelib3" version))
16232 (sha256
16233 (base32
16234 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16235 (build-system python-build-system)
16236 (propagated-inputs
16237 `(("python-dateutil" ,python-dateutil)))
16238 (home-page "https://github.com/MKuranowski/pyroutelib3")
16239 (synopsis "Library for simple routing on OSM data")
16240 (description "Library for simple routing on OSM data")
16241 (license license:gpl3+)))
16242
16243 (define-public python-elementpath
16244 (package
16245 (name "python-elementpath")
16246 (version "1.2.0")
16247 (source
16248 (origin
16249 (method url-fetch)
16250 (uri (pypi-uri "elementpath" version))
16251 (sha256
16252 (base32
16253 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16254 (build-system python-build-system)
16255 (home-page
16256 "https://github.com/sissaschool/elementpath")
16257 (synopsis
16258 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16259 (description
16260 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16261 for Python's ElementTree XML data structures, both for the standard
16262 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16263
16264 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16265 because lxml.etree already has it's own implementation of XPath 1.0.")
16266 (license license:expat)))