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-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 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 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;;
70 ;;; This file is part of GNU Guix.
71 ;;;
72 ;;; GNU Guix is free software; you can redistribute it and/or modify it
73 ;;; under the terms of the GNU General Public License as published by
74 ;;; the Free Software Foundation; either version 3 of the License, or (at
75 ;;; your option) any later version.
76 ;;;
77 ;;; GNU Guix is distributed in the hope that it will be useful, but
78 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
79 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 ;;; GNU General Public License for more details.
81 ;;;
82 ;;; You should have received a copy of the GNU General Public License
83 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
84
85 (define-module (gnu packages python-xyz)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (gnu packages)
88 #:use-module (gnu packages algebra)
89 #:use-module (gnu packages adns)
90 #:use-module (gnu packages attr)
91 #:use-module (gnu packages backup)
92 #:use-module (gnu packages bash)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages databases)
97 #:use-module (gnu packages dbm)
98 #:use-module (gnu packages file)
99 #:use-module (gnu packages fontutils)
100 #:use-module (gnu packages gcc)
101 #:use-module (gnu packages geo)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages graphviz)
106 #:use-module (gnu packages graphics)
107 #:use-module (gnu packages gstreamer)
108 #:use-module (gnu packages gtk)
109 #:use-module (gnu packages icu4c)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages libevent)
113 #:use-module (gnu packages libffi)
114 #:use-module (gnu packages linux)
115 #:use-module (gnu packages llvm)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages maths)
118 #:use-module (gnu packages monitoring)
119 #:use-module (gnu packages multiprecision)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages openstack)
123 #:use-module (gnu packages pcre)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages readline)
133 #:use-module (gnu packages sdl)
134 #:use-module (gnu packages search)
135 #:use-module (gnu packages shells)
136 #:use-module (gnu packages sphinx)
137 #:use-module (gnu packages ssh)
138 #:use-module (gnu packages terminals)
139 #:use-module (gnu packages tex)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages video)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages base)
147 #:use-module (gnu packages xml)
148 #:use-module (gnu packages xorg)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages tcl)
151 #:use-module (gnu packages bdw-gc)
152 #:use-module (gnu packages serialization)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix hg-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system gnu)
159 #:use-module (guix build-system cmake)
160 #:use-module (guix build-system python)
161 #:use-module (guix build-system trivial)
162 #:use-module (srfi srfi-1)
163 #:use-module (srfi srfi-26))
164
165 (define-public python-psutil
166 (package
167 (name "python-psutil")
168 (version "5.6.2")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (pypi-uri "psutil" version))
173 (sha256
174 (base32
175 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201 (define-public python-shapely
202 (package
203 (name "python-shapely")
204 (version "1.6.4.post2")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
244 (define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
266 (define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296 (define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319 (define-public python-babel
320 (package
321 (name "python-babel")
322 (version "2.7.0")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
355 etc. ")
356 (license license:bsd-3)))
357
358 (define-public python2-babel
359 (package-with-python2 python-babel))
360
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
373 (define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
397 (define-public python-hdf4
398 (package
399 (name "python-hdf4")
400 (version "0.9")
401 (source
402 (origin
403 (method url-fetch)
404 (uri (pypi-uri name version))
405 (sha256
406 (base32
407 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
408 (build-system python-build-system)
409 (native-inputs `(("nose" ,python-nose)))
410 (propagated-inputs `(("numpy" ,python-numpy)))
411 (inputs
412 `(("hdf4" ,hdf4)
413 ("libjpeg" ,libjpeg)
414 ("zlib" ,zlib)))
415 (arguments
416 `(#:phases
417 (modify-phases %standard-phases
418 (replace 'check
419 (lambda _
420 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
421 ;; on to import numpy. Somehow this works on their CI system.
422 ;; Let's just manage PYTHONPATH here instead.
423 (substitute* "runexamples.sh"
424 (("export PYTHONPATH=.*") ""))
425 (setenv "PYTHONPATH"
426 (string-append (getcwd) ":"
427 (getenv "PYTHONPATH")))
428 (invoke "./runexamples.sh")
429 (invoke "nosetests" "-v"))))))
430 (home-page "https://github.com/fhs/python-hdf4")
431 (synopsis "Python interface to the NCSA HDF4 library")
432 (description
433 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
434 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
435 NetCDF files can also be read and modified. Python-HDF4 is a fork of
436 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
437 (license license:expat)))
438
439 (define-public python2-hdf4
440 (package-with-python2 python-hdf4))
441
442 (define-public python-h5py
443 (package
444 (name "python-h5py")
445 (version "2.8.0")
446 (source
447 (origin
448 (method url-fetch)
449 (uri (pypi-uri "h5py" version))
450 (sha256
451 (base32
452 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
453 (build-system python-build-system)
454 (arguments
455 `(#:tests? #f ; no test target
456 #:phases
457 (modify-phases %standard-phases
458 (add-after 'unpack 'fix-hdf5-paths
459 (lambda* (#:key inputs #:allow-other-keys)
460 (let ((prefix (assoc-ref inputs "hdf5")))
461 (substitute* "setup_build.py"
462 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
463 (string-append "['" prefix "/lib" "']"))
464 (("'/opt/local/include', '/usr/local/include'")
465 (string-append "'" prefix "/include" "'")))
466 (substitute* "setup_configure.py"
467 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
468 (string-append "['" prefix "/lib" "']")))
469 #t))))))
470 (propagated-inputs
471 `(("python-six" ,python-six)
472 ("python-numpy" ,python-numpy)))
473 (inputs
474 `(("hdf5" ,hdf5)))
475 (native-inputs
476 `(("python-cython" ,python-cython)
477 ("python-pkgconfig" ,python-pkgconfig)))
478 (home-page "http://www.h5py.org/")
479 (synopsis "Read and write HDF5 files from Python")
480 (description
481 "The h5py package provides both a high- and low-level interface to the
482 HDF5 library from Python. The low-level interface is intended to be a
483 complete wrapping of the HDF5 API, while the high-level component supports
484 access to HDF5 files, datasets and groups using established Python and NumPy
485 concepts.")
486 (license license:bsd-3)))
487
488 (define-public python2-h5py
489 (package-with-python2 python-h5py))
490
491 (define-public python-sh
492 (package
493 (name "python-sh")
494 (version "1.12.14")
495 (source
496 (origin
497 (method url-fetch)
498 (uri (pypi-uri "sh" version))
499 (sha256
500 (base32
501 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
502 (build-system python-build-system)
503 (arguments
504 '(#:phases
505 (modify-phases %standard-phases
506 (replace 'check
507 (lambda _
508 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
509 (setenv "HOME" "/tmp")
510 (invoke "python" "sh.py" "test"))))))
511 (native-inputs
512 `(("python-coverage" ,python-coverage)))
513 (home-page "https://github.com/amoffat/sh")
514 (synopsis "Python subprocess replacement")
515 (description "This package provides a replacement for Python's
516 @code{subprocess} feature.")
517 (license license:expat)))
518
519 (define-public python2-sh
520 (package-with-python2 python-sh))
521
522 (define-public python-cftime
523 (package
524 (name "python-cftime")
525 (version "1.0.3.4")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "cftime" version))
530 (sha256
531 (base32
532 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
533 (build-system python-build-system)
534 (propagated-inputs
535 `(("python-numpy" ,python-numpy)))
536 (native-inputs
537 `(("python-coveralls" ,python-coveralls)
538 ("python-cython" ,python-cython)
539 ("python-pytest-cov" ,python-pytest-cov)))
540 (home-page "https://github.com/Unidata/cftime")
541 (synopsis "Library for time handling")
542 (description
543 "This package provides time-handling functionality that used to be part
544 of the netcdf4 package before.")
545 ;; This package claims to include code under the GPLv3 but is released
546 ;; under ISC.
547 (license (list license:isc license:gpl3+))))
548
549 (define-public python-netcdf4
550 (package
551 (name "python-netcdf4")
552 (version "1.4.2")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "netCDF4" version))
557 (sha256
558 (base32
559 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
560 (build-system python-build-system)
561 (arguments
562 '(#:phases
563 (modify-phases %standard-phases
564 (add-after 'unpack 'configure-locations
565 (lambda* (#:key inputs #:allow-other-keys)
566 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
567 #t)))))
568 (native-inputs
569 `(("python-cython" ,python-cython)))
570 (propagated-inputs
571 `(("python-numpy" ,python-numpy)
572 ("python-cftime" ,python-cftime)))
573 (inputs
574 `(("netcdf" ,netcdf)
575 ("hdf4" ,hdf4)
576 ("hdf5" ,hdf5)))
577 (home-page "https://github.com/Unidata/netcdf4-python")
578 (synopsis "Python/numpy interface to the netCDF library")
579 (description "Netcdf4-python is a Python interface to the netCDF C
580 library. netCDF version 4 has many features not found in earlier
581 versions of the library and is implemented on top of HDF5. This module
582 can read and write files in both the new netCDF 4 and the old netCDF 3
583 format, and can create files that are readable by HDF5 clients. The
584 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
585 to users of that module.")
586 ;; The software is mainly ISC, but includes some files covered
587 ;; by the Expat license.
588 (license (list license:isc license:expat))))
589
590 (define-public python2-netcdf4
591 (package-with-python2 python-netcdf4))
592
593 (define-public python-lockfile
594 (package
595 (name "python-lockfile")
596 (version "0.12.2")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (pypi-uri "lockfile" version))
601 (sha256
602 (base32
603 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
604 (build-system python-build-system)
605 (arguments '(#:test-target "check"))
606 (native-inputs
607 `(("python-pbr" ,python-pbr)))
608 (home-page "https://launchpad.net/pylockfile")
609 (synopsis "Platform-independent file locking module")
610 (description
611 "The lockfile package exports a LockFile class which provides a simple
612 API for locking files.")
613 (license license:expat)))
614
615 (define-public python2-lockfile
616 (package-with-python2 python-lockfile))
617
618 (define-public python-semantic-version
619 (package
620 (name "python-semantic-version")
621 (version "2.6.0")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "semantic_version" version))
626 (sha256
627 (base32
628 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
629 (build-system python-build-system)
630 (arguments
631 `(#:tests? #f)) ; PyPI tarball lacks tests
632 (home-page "https://github.com/rbarrois/python-semanticversion")
633 (synopsis "Semantic versioning module for Python")
634 (description
635 "The @code{semantic_version} class is a small library for handling
636 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
637
638 It can compare versions, generate a new version that represents a bump in one of
639 the version levels, and check whether any given string is a proper semantic
640 version identifier.")
641 (license license:bsd-3)))
642
643 (define-public python2-semantic-version
644 (package-with-python2 python-semantic-version))
645
646 (define-public python-serpent
647 (package
648 (name "python-serpent")
649 (version "1.28")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (pypi-uri "serpent" version))
654 (sha256
655 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
656 (build-system python-build-system)
657 (native-inputs
658 `(("python-attrs" ,python-attrs)
659 ("python-pytz" ,python-pytz)))
660 (home-page "https://github.com/irmen/Serpent")
661 (synopsis "Serializer for literal Python expressions")
662 (description
663 "Serpent provides @code{ast.literal_eval()}-compatible object tree
664 serialization. It serializes an object tree into bytes (an utf-8 encoded
665 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
666 to rebuild the original object tree.
667
668 Because only safe literals are encoded, it is safe to send serpent data to
669 other machines, such as over the network.")
670 (license license:expat)))
671
672 (define-public python-setuptools
673 (package
674 (name "python-setuptools")
675 (version "41.0.1")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (pypi-uri "setuptools" version ".zip"))
680 (sha256
681 (base32
682 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
683 (modules '((guix build utils)))
684 (snippet
685 '(begin
686 ;; Remove included binaries which are used to build self-extracting
687 ;; installers for Windows.
688 ;; TODO: Find some way to build them ourself so we can include them.
689 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
690 #t))))
691 (build-system python-build-system)
692 ;; FIXME: Tests require pytest, which itself relies on setuptools.
693 ;; One could bootstrap with an internal untested setuptools.
694 (arguments
695 `(#:tests? #f))
696 (home-page "https://pypi.python.org/pypi/setuptools")
697 (synopsis
698 "Library designed to facilitate packaging Python projects")
699 (description
700 "Setuptools is a fully-featured, stable library designed to facilitate
701 packaging Python projects, where packaging includes:
702 Python package and module definitions,
703 distribution package metadata,
704 test hooks,
705 project installation,
706 platform-specific details,
707 Python 3 support.")
708 ;; TODO: setuptools now bundles the following libraries:
709 ;; packaging, pyparsing, six and appdirs. How to unbundle?
710 (license (list license:psfl ; setuptools itself
711 license:expat ; six, appdirs, pyparsing
712 license:asl2.0 ; packaging is dual ASL2/BSD-2
713 license:bsd-2))))
714
715 (define-public python2-setuptools
716 (package-with-python2 python-setuptools))
717
718 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
719 (define-public python-setuptools-for-tensorflow
720 (hidden-package
721 (package
722 (inherit python-setuptools)
723 (version "39.1.0")
724 (source (origin
725 (inherit (package-source python-setuptools))
726 (uri (pypi-uri "setuptools" version ".zip"))
727 (sha256
728 (base32
729 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
730
731 (define-public python-uniseg
732 (package
733 (name "python-uniseg")
734 (version "0.7.1")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (pypi-uri "uniseg" version ".zip"))
739 (sha256
740 (base32
741 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
742 (build-system python-build-system)
743 (arguments
744 '(#:tests? #f)) ; The test suite requires network access.
745 (native-inputs
746 `(("unzip" ,unzip)))
747 (home-page
748 "https://bitbucket.org/emptypage/uniseg-python")
749 (synopsis
750 "Python library to determine Unicode text segmentations")
751 (description
752 "Uniseg is a Python package used to determine Unicode text segmentations.
753 Supported segmentations include:
754 @enumerate
755 @item @dfn{Code point} (any value in the Unicode codespace)
756 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
757 multiple Unicode code points, e.g. \"G\" + acute-accent)
758 @item Word break
759 @item Sentence break
760 @item Line break
761 @end enumerate")
762 (license license:expat)))
763
764 (define-public python2-uniseg
765 (package-with-python2 python-uniseg))
766
767 (define-public python-humanfriendly
768 (package
769 (name "python-humanfriendly")
770 (version "4.4.1")
771 (source
772 (origin
773 (method url-fetch)
774 (uri (pypi-uri "humanfriendly" version))
775 (sha256
776 (base32
777 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
778 (build-system python-build-system)
779 (arguments
780 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
781 #:tests? #f))
782 (propagated-inputs
783 `(("python-monotonic" ,python-monotonic)))
784 (home-page "https://humanfriendly.readthedocs.io")
785 (synopsis "Human-friendly input and output in Python")
786 (description
787 "The functions and classes in @code{humanfriendly} can be used to make
788 text interfaces more user-friendly. It includes tools to parse and format
789 numbers, file sizes, and timespans, timers for long-running operations, menus
790 to allow the user to choose from a list of options, and terminal interaction
791 helpers.")
792 (license license:expat)))
793
794 (define-public python2-humanfriendly
795 (package-with-python2 python-humanfriendly))
796
797 (define-public python-capturer
798 (package
799 (name "python-capturer")
800 (version "2.4")
801 (source
802 (origin
803 (method url-fetch)
804 (uri (pypi-uri "capturer" version))
805 (sha256
806 (base32
807 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
808 (build-system python-build-system)
809 (arguments
810 `(#:tests? #f))
811 (propagated-inputs
812 `(("python-humanfriendly" ,python-humanfriendly)))
813 (home-page "https://capturer.readthedocs.io")
814 (synopsis "Capture stdout and stderr streams of the current process")
815 (description
816 "The capturer package makes it easy to capture the stdout and stderr
817 streams of the current process and subprocesses. Output can be relayed
818 to the terminal in real time but is also available to the Python program
819 for additional processing.")
820 (license license:expat)))
821
822 (define-public python2-capturer
823 (package-with-python2 python-capturer))
824
825 (define-public python-case
826 (package
827 (name "python-case")
828 (version "1.5.3")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (pypi-uri "case" version))
833 (sha256
834 (base32
835 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
836 (build-system python-build-system)
837 (propagated-inputs
838 `(("python-mock" ,python-mock)
839 ("python-nose" ,python-nose)
840 ("python-six" ,python-six)
841 ("python-unittest2" ,python-unittest2)))
842 (native-inputs
843 `(("python-coverage" ,python-coverage)))
844 (home-page "https://github.com/celery/case")
845 (synopsis "Unittest utilities and convenience methods")
846 (description
847 "The @code{case} package provides utilities on top of unittest, including
848 some helpful Python 2 compatibility convenience methods.")
849 (license license:bsd-3)))
850
851 (define-public python-verboselogs
852 (package
853 (name "python-verboselogs")
854 (version "1.7")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (pypi-uri "verboselogs" version))
859 (sha256
860 (base32
861 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
862 (build-system python-build-system)
863 (native-inputs
864 `(("python-mock" ,python-mock)
865 ("python-astroid" ,python-astroid)
866 ("python-pylint" ,python-pylint)))
867 (home-page "https://verboselogs.readthedocs.io")
868 (synopsis "Verbose logging level for Python's logging module")
869 (description
870 "The @code{verboselogs} package extends Python's @code{logging} module to
871 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
872 (license license:expat)))
873
874 (define-public python2-verboselogs
875 (package-with-python2 python-verboselogs))
876
877 (define-public python-coloredlogs
878 (package
879 (name "python-coloredlogs")
880 (version "7.3")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (pypi-uri "coloredlogs" version))
885 (sha256
886 (base32
887 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
888 (build-system python-build-system)
889 (arguments
890 `(;Tests require some updated modules
891 #:tests? #f))
892 (propagated-inputs
893 `(("python-capturer" ,python-capturer)))
894 (home-page "https://coloredlogs.readthedocs.io")
895 (synopsis "Colored stream handler for Python's logging module")
896 (description
897 "The @code{coloredlogs} package enables colored terminal output for
898 Python's logging module. The @code{ColoredFormatter} class inherits from
899 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
900 messages in color.")
901 (license license:expat)))
902
903 (define-public python2-coloredlogs
904 (package-with-python2 python-coloredlogs))
905
906 (define-public python-editorconfig
907 (package
908 (name "python-editorconfig")
909 (version "0.12.2")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "EditorConfig" version))
914 (sha256
915 (base32
916 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
917 (build-system python-build-system)
918 (home-page "https://editorconfig.org/")
919 (synopsis "EditorConfig bindings for python")
920 (description "The EditorConfig project consists of a file format for
921 defining coding styles and a collection of text editor plugins that enable
922 editors to read the file format and adhere to defined styles. EditorConfig
923 files are easily readable and they work nicely with version control systems.")
924 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
925 (license (list license:bsd-2 license:psfl))))
926
927 (define-public python-et-xmlfile
928 (package
929 (name "python-et-xmlfile")
930 (version "1.0.1")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "et_xmlfile" version))
935 (sha256
936 (base32
937 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
938 (build-system python-build-system)
939 (arguments
940 `(#:phases (modify-phases %standard-phases
941 (replace 'check
942 (lambda _
943 (invoke "pytest"))))))
944 (native-inputs
945 `(("python-pytest" ,python-pytest)
946 ("python-lxml" ,python-lxml))) ;used for the tests
947 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
948 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
949 (description "This Python library is based upon the @code{xmlfile} module
950 from @code{lxml}. It aims to provide a low memory, compatible implementation
951 of @code{xmlfile}.")
952 (license license:expat)))
953
954 (define-public python2-et-xmlfile
955 (package-with-python2 python-et-xmlfile))
956
957 (define-public python-openpyxl
958 (package
959 (name "python-openpyxl")
960 (version "2.6.2")
961 (source
962 (origin
963 ;; We use the upstream repository, as the tests are not included in the
964 ;; PyPI releases.
965 (method hg-fetch)
966 (uri (hg-reference
967 (url "https://bitbucket.org/openpyxl/openpyxl")
968 (changeset version)))
969 (file-name (string-append name "-" version "-checkout"))
970 (sha256
971 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
972 (build-system python-build-system)
973 (arguments
974 `(#:phases (modify-phases %standard-phases
975 (replace 'check
976 (lambda _
977 (invoke "pytest"))))))
978 (native-inputs
979 ;; For the test suite.
980 `(("python-lxml" ,python-lxml)
981 ("python-pillow" ,python-pillow)
982 ("python-pytest" ,python-pytest)))
983 (propagated-inputs
984 `(("python-et-xmlfile" ,python-et-xmlfile)
985 ("python-jdcal" ,python-jdcal)))
986 (home-page "https://openpyxl.readthedocs.io")
987 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
988 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
989 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
990 standard.")
991 (license license:expat)))
992
993 (define-public python-eventlet
994 (package
995 (name "python-eventlet")
996 (version "0.20.1")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "eventlet" version))
1001 (sha256
1002 (base32
1003 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1004 (build-system python-build-system)
1005 (propagated-inputs
1006 `(("python-greenlet" ,python-greenlet)))
1007 (arguments
1008 ;; TODO: Requires unpackaged 'enum-compat'.
1009 '(#:tests? #f))
1010 (home-page "http://eventlet.net")
1011 (synopsis "Concurrent networking library for Python")
1012 (description
1013 "Eventlet is a concurrent networking library for Python that
1014 allows you to change how you run your code, not how you write it.
1015 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1016 Coroutines ensure that the developer uses a blocking style of programming
1017 that is similar to threading, but provide the benefits of non-blocking I/O.
1018 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1019 from the Python interpreter, or as a small part of a larger application.")
1020 (license license:expat)))
1021
1022 (define-public python2-eventlet
1023 (let ((base (package-with-python2
1024 (strip-python2-variant python-eventlet))))
1025 (package (inherit base)
1026 (propagated-inputs
1027 `(("python2-enum34" ,python2-enum34)
1028 ,@(package-propagated-inputs base))))))
1029
1030 (define-public python-six
1031 (package
1032 (name "python-six")
1033 (version "1.12.0")
1034 (source
1035 (origin
1036 (method url-fetch)
1037 (uri (pypi-uri "six" version))
1038 (sha256
1039 (base32
1040 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1041 (build-system python-build-system)
1042 (arguments
1043 `(#:phases
1044 (modify-phases %standard-phases
1045 (replace 'check
1046 (lambda _
1047 (invoke "py.test" "-v"))))))
1048 (native-inputs
1049 `(("python-py" ,python-py)
1050 ("python-pytest" ,python-pytest-bootstrap)))
1051 (home-page "https://pypi.python.org/pypi/six/")
1052 (synopsis "Python 2 and 3 compatibility utilities")
1053 (description
1054 "Six is a Python 2 and 3 compatibility library. It provides utility
1055 functions for smoothing over the differences between the Python versions with
1056 the goal of writing Python code that is compatible on both Python versions.
1057 Six supports every Python version since 2.5. It is contained in only one
1058 Python file, so it can be easily copied into your project.")
1059 (license license:x11)))
1060
1061 (define-public python2-six
1062 (package-with-python2 python-six))
1063
1064 (define-public python-six-bootstrap
1065 (package
1066 (inherit python-six)
1067 (name "python-six-bootstrap")
1068 (native-inputs `())
1069 (arguments `(#:tests? #f))))
1070
1071 (define-public python2-six-bootstrap
1072 (package-with-python2 python-six-bootstrap))
1073
1074 (define-public python-schedule
1075 (package
1076 (name "python-schedule")
1077 (version "0.4.3")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "schedule" version))
1082 (sha256
1083 (base32
1084 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1085 (build-system python-build-system)
1086 (native-inputs
1087 `(("python-pytest" ,python-pytest)
1088 ("python-mock" ,python-mock)))
1089 (home-page "https://github.com/dbader/schedule")
1090 (synopsis "Schedule periodic function calls in Python")
1091 (description
1092 "Schedule is an in-process scheduler for periodic jobs that uses the
1093 builder pattern for configuration. Schedule lets you run Python functions (or
1094 any other callable) periodically at pre-determined intervals using a simple,
1095 human-friendly syntax.")
1096 (license license:expat)))
1097
1098 (define-public python2-schedule
1099 (package-with-python2 python-schedule))
1100
1101 (define-public python-pandas
1102 (package
1103 (name "python-pandas")
1104 (version "0.24.2")
1105 (source
1106 (origin
1107 (method url-fetch)
1108 (uri (pypi-uri "pandas" version))
1109 (sha256
1110 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1111 (build-system python-build-system)
1112 (arguments
1113 `(#:modules ((guix build utils)
1114 (guix build python-build-system)
1115 (ice-9 ftw)
1116 (srfi srfi-26))
1117 #:phases (modify-phases %standard-phases
1118 (add-after 'unpack 'patch-which
1119 (lambda* (#:key inputs #:allow-other-keys)
1120 (let ((which (assoc-ref inputs "which")))
1121 (substitute* "pandas/io/clipboard/__init__.py"
1122 (("^CHECK_CMD = .*")
1123 (string-append "CHECK_CMD = \"" which "\"\n"))))
1124 #t))
1125 (replace 'check
1126 (lambda _
1127 (let ((build-directory
1128 (string-append
1129 (getcwd) "/build/"
1130 (car (scandir "build"
1131 (cut string-prefix? "lib." <>))))))
1132 ;; Disable the "strict data files" option which causes
1133 ;; the build to error out if required data files are
1134 ;; not available (as is the case with PyPI archives).
1135 (substitute* "setup.cfg"
1136 (("addopts = --strict-data-files") "addopts = "))
1137 (with-directory-excursion build-directory
1138 ;; Delete tests that require "moto" which is not yet
1139 ;; in Guix.
1140 (for-each delete-file
1141 '("pandas/tests/io/conftest.py"
1142 "pandas/tests/io/json/test_compression.py"
1143 "pandas/tests/io/parser/test_network.py"
1144 "pandas/tests/io/test_parquet.py"))
1145 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1146 "--skip-network" "-k"
1147 ;; XXX: Due to the deleted tests above.
1148 "not test_read_s3_jsonl"))))))))
1149 (propagated-inputs
1150 `(("python-numpy" ,python-numpy)
1151 ("python-openpyxl" ,python-openpyxl)
1152 ("python-pytz" ,python-pytz)
1153 ("python-dateutil" ,python-dateutil)
1154 ("python-xlrd" ,python-xlrd)))
1155 (inputs
1156 `(("which" ,which)))
1157 (native-inputs
1158 `(("python-cython" ,python-cython)
1159 ("python-beautifulsoup4" ,python-beautifulsoup4)
1160 ("python-lxml" ,python-lxml)
1161 ("python-html5lib" ,python-html5lib)
1162 ("python-nose" ,python-nose)
1163 ("python-pytest" ,python-pytest)
1164 ("python-pytest-mock" ,python-pytest-mock)))
1165 (home-page "https://pandas.pydata.org")
1166 (synopsis "Data structures for data analysis, time series, and statistics")
1167 (description
1168 "Pandas is a Python package providing fast, flexible, and expressive data
1169 structures designed to make working with structured (tabular,
1170 multidimensional, potentially heterogeneous) and time series data both easy
1171 and intuitive. It aims to be the fundamental high-level building block for
1172 doing practical, real world data analysis in Python.")
1173 (license license:bsd-3)))
1174
1175 (define-public python2-pandas
1176 (package-with-python2 python-pandas))
1177
1178 (define-public python2-mechanize
1179 (package
1180 (name "python2-mechanize")
1181 (version "0.2.5")
1182 (source
1183 (origin
1184 (method url-fetch)
1185 (uri (pypi-uri "mechanize" version))
1186 (sha256
1187 (base32
1188 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1189 (build-system python-build-system)
1190 (arguments
1191 `(#:python ,python-2 ; apparently incompatible with Python 3
1192 #:tests? #f))
1193 ;; test fails with message
1194 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1195 ;; (python-3.3.2) or
1196 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1197 ;; (python-2.7.5).
1198 ;; The source code is from March 2011 and probably not up-to-date
1199 ;; with respect to python unit tests.
1200 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1201 (synopsis
1202 "Stateful programmatic web browsing in Python")
1203 (description
1204 "Mechanize implements stateful programmatic web browsing in Python,
1205 after Andy Lester’s Perl module WWW::Mechanize.")
1206 (license (license:non-copyleft
1207 "file://COPYING"
1208 "See COPYING in the distribution."))))
1209
1210
1211 (define-public python-simplejson
1212 (package
1213 (name "python-simplejson")
1214 (version "3.14.0")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (pypi-uri "simplejson" version))
1219 (sha256
1220 (base32
1221 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1222 (build-system python-build-system)
1223 (home-page "http://simplejson.readthedocs.org/en/latest/")
1224 (synopsis
1225 "Json library for Python")
1226 (description
1227 "JSON (JavaScript Object Notation) is a subset of JavaScript
1228 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1229 format.
1230
1231 Simplejson exposes an API familiar to users of the standard library marshal
1232 and pickle modules. It is the externally maintained version of the json
1233 library contained in Python 2.6, but maintains compatibility with Python 2.5
1234 and (currently) has significant performance advantages, even without using
1235 the optional C extension for speedups. Simplejson is also supported on
1236 Python 3.3+.")
1237 (license license:x11)))
1238
1239 (define-public python2-simplejson
1240 (package-with-python2 python-simplejson))
1241
1242
1243 (define-public python-pyicu
1244 (package
1245 (name "python-pyicu")
1246 (version "2.3.1")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "PyICU" version))
1251 (sha256
1252 (base32
1253 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1254 (build-system python-build-system)
1255 (inputs
1256 `(("icu4c" ,icu4c)))
1257 (native-inputs
1258 `(("python-pytest" ,python-pytest)
1259 ("python-six" ,python-six)))
1260 (home-page "https://github.com/ovalhub/pyicu")
1261 (synopsis "Python extension wrapping the ICU C++ API")
1262 (description
1263 "PyICU is a python extension wrapping the ICU C++ API.")
1264 (properties `((python2-variant . ,(delay python2-pyicu))))
1265 (license license:x11)))
1266
1267 (define-public python2-pyicu
1268 (let ((base (package-with-python2
1269 (strip-python2-variant python-pyicu))))
1270 (package
1271 (inherit base)
1272 (arguments
1273 `(,@(package-arguments base)
1274 #:phases
1275 (modify-phases %standard-phases
1276 (add-before 'check 'delete-failing-test
1277 (λ _
1278 ;; XXX: This fails due to Unicode issues unique to Python 2,
1279 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1280 (delete-file "test/test_Script.py")
1281 #t))))))))
1282
1283 (define-public python2-dogtail
1284 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1285 ;; spaces in indentation" with Python 3.
1286 (package
1287 (name "python2-dogtail")
1288 (version "0.9.9")
1289 (source (origin
1290 (method url-fetch)
1291 (uri (pypi-uri "dogtail" version))
1292 (sha256
1293 (base32
1294 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1295 (build-system python-build-system)
1296 (arguments `(#:python ,python-2
1297 #:tests? #f)) ; invalid command "test"
1298 ;; Currently no offical homepage.
1299 (home-page "https://pypi.python.org/pypi/dogtail/")
1300 (synopsis "GUI test tool and automation framework written in Python")
1301 (description
1302 "Dogtail is a GUI test tool and automation framework written in Python.
1303 It uses Accessibility (a11y) technologies to communicate with desktop
1304 applications. dogtail scripts are written in Python and executed like any
1305 other Python program.")
1306 (license license:gpl2+)))
1307
1308 (define-public python-empy
1309 (package
1310 (name "python-empy")
1311 (version "3.3.3")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1315 version ".tar.gz"))
1316 (sha256
1317 (base32
1318 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1319 (build-system python-build-system)
1320 (arguments
1321 `(#:tests? #f)) ; python2 only
1322 (home-page "http://www.alcyone.com/software/empy/")
1323 (synopsis "Templating system for Python")
1324 (description
1325 "EmPy is a system for embedding Python expressions and statements in
1326 template text; it takes an EmPy source file, processes it, and produces
1327 output. This is accomplished via expansions, which are special signals to the
1328 EmPy system and are set off by a special prefix (by default the at sign, @@).
1329 EmPy can expand arbitrary Python expressions and statements in this way, as
1330 well as a variety of special forms. Textual data not explicitly delimited in
1331 this way is sent unaffected to the output, allowing Python to be used in
1332 effect as a markup language. Also supported are callbacks via hooks,
1333 recording and playback via diversions, and dynamic, chainable filters. The
1334 system is highly configurable via command line options and embedded
1335 commands.")
1336 (license license:lgpl2.1+)))
1337
1338 (define-public python2-empy
1339 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1340 (package
1341 (inherit base)
1342 (arguments `(,@(package-arguments base)
1343 #:tests? #t)))))
1344
1345 (define-public python2-element-tree
1346 (package
1347 (name "python2-element-tree")
1348 (version "1.2.6")
1349 (source (origin
1350 (method url-fetch)
1351 (uri (string-append
1352 "http://effbot.org/media/downloads/elementtree-"
1353 version "-20050316.tar.gz"))
1354 (sha256
1355 (base32
1356 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1357 (build-system python-build-system)
1358 (arguments
1359 `(#:python ,python-2 ; seems to be part of Python 3
1360 #:tests? #f)) ; no 'test' sub-command
1361 (synopsis "Toolkit for XML processing in Python")
1362 (description
1363 "ElementTree is a Python library supporting lightweight XML processing.")
1364 (home-page "http://effbot.org/zone/element-index.htm")
1365 (license (license:x11-style
1366 "http://docs.python.org/2/license.html"
1367 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1368
1369 (define-public python2-pybugz
1370 (package
1371 (name "python2-pybugz")
1372 (version "0.6.11")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (string-append
1376 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1377 version ".tar.gz"))
1378 (sha256
1379 (base32
1380 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1381 (patches (search-patches "pybugz-stty.patch"
1382 "pybugz-encode-error.patch"))))
1383 (build-system python-build-system)
1384 (arguments
1385 `(#:python ,python-2 ; SyntaxError with Python 3
1386 #:tests? #f)) ; no 'test' sub-command
1387 (propagated-inputs
1388 `(("element-tree" ,python2-element-tree)))
1389 (synopsis "Python and command-line interface to Bugzilla")
1390 (description
1391 "PyBugz is a Python library and command-line tool to query the Bugzilla
1392 bug tracking system. It is meant as an aid to speed up interaction with the
1393 bug tracker.")
1394 (home-page "http://www.liquidx.net/pybugz/")
1395 (license license:gpl2)))
1396
1397 (define-public python2-enum
1398 (package
1399 (name "python2-enum")
1400 (version "0.4.6")
1401 (source (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "enum" version))
1404 (sha256
1405 (base32
1406 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1407 (build-system python-build-system)
1408 (arguments
1409 `(#:python ,python-2))
1410 (home-page "http://pypi.python.org/pypi/enum/")
1411 (synopsis "Robust enumerated type support in Python")
1412 (description
1413 "This provides a module for robust enumerations in Python. It has
1414 been superseded by the Python standard library and is provided only for
1415 compatibility.")
1416 ;; Choice of either license.
1417 (license (list license:gpl3+ license:psfl))))
1418
1419 (define-public python-enum34
1420 (package
1421 (name "python-enum34")
1422 (version "1.1.6")
1423 (source
1424 (origin
1425 (method url-fetch)
1426 (uri (pypi-uri "enum34" version))
1427 (sha256
1428 (base32
1429 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1430 (build-system python-build-system)
1431 (home-page "https://pypi.python.org/pypi/enum34")
1432 (synopsis "Backported Python 3.4 Enum")
1433 (description
1434 "Enum34 is the new Python stdlib enum module available in Python 3.4
1435 backported for previous versions of Python from 2.4 to 3.3.")
1436 (license license:bsd-3)))
1437
1438 (define-public python2-enum34
1439 (package-with-python2 python-enum34))
1440
1441 (define-public python-parse-type
1442 (package
1443 (name "python-parse-type")
1444 (version "0.4.2")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (pypi-uri "parse_type" version))
1449 (sha256
1450 (base32
1451 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1452 (build-system python-build-system)
1453 (propagated-inputs
1454 `(("python-six" ,python-six)
1455 ("python-parse" ,python-parse)))
1456 (native-inputs
1457 `(("python-pytest" ,python-pytest)
1458 ("python-pytest-runner" ,python-pytest-runner)))
1459 (home-page "https://github.com/jenisys/parse_type")
1460 (synopsis "Extended parse module")
1461 (description
1462 "Parse_type extends the python parse module.")
1463 (properties
1464 `((python2-variant . ,(delay python2-parse-type))))
1465 (license license:bsd-3)))
1466
1467 (define-public python2-parse-type
1468 (let ((base (package-with-python2
1469 (strip-python2-variant python-parse-type))))
1470 (package (inherit base)
1471 (propagated-inputs
1472 `(("python2-enum34" ,python2-enum34)
1473 ,@(package-propagated-inputs base))))))
1474
1475 (define-public python-parse
1476 (package
1477 (name "python-parse")
1478 (version "1.8.4")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "parse" version))
1483 (sha256
1484 (base32
1485 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1486 (build-system python-build-system)
1487 (arguments
1488 `(#:phases
1489 (modify-phases %standard-phases
1490 (replace 'check
1491 (lambda _ (invoke "python" "test_parse.py"))))))
1492 (home-page "https://github.com/r1chardj0n3s/parse")
1493 (synopsis "Parse strings")
1494 (description
1495 "Parse strings using a specification based on the Python @code{format()}
1496 syntax.")
1497 (license license:x11)))
1498
1499 (define-public python-polib
1500 (package
1501 (name "python-polib")
1502 (version "1.0.8")
1503 (source (origin
1504 (method url-fetch)
1505 (uri (pypi-uri "polib" version))
1506 (sha256
1507 (base32
1508 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1509 (build-system python-build-system)
1510 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1511 (synopsis "Manipulate, create and modify gettext files")
1512 (description "Polib can manipulate any gettext format (po, pot and mo)
1513 files. It can be used to create po files from scratch or to modify
1514 existing ones.")
1515 (license license:expat)))
1516
1517 (define-public python2-polib
1518 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1519 (package
1520 (inherit base)
1521 (arguments `(,@(package-arguments base)
1522 ;; Tests don't work with python2.
1523 #:tests? #f)))))
1524
1525 (define-public scons
1526 (package
1527 (name "scons")
1528 (version "3.0.4")
1529 (source (origin
1530 (method git-fetch)
1531 (uri (git-reference
1532 (url "https://github.com/SCons/scons.git")
1533 (commit version)))
1534 (file-name (git-file-name name version))
1535 (sha256
1536 (base32
1537 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1538 (build-system python-build-system)
1539 (arguments
1540 `(#:use-setuptools? #f ; still relies on distutils
1541 #:tests? #f ; no 'python setup.py test' command
1542 #:phases
1543 (modify-phases %standard-phases
1544 (add-before 'build 'bootstrap
1545 (lambda _
1546 (substitute* "src/engine/SCons/compat/__init__.py"
1547 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1548 "sys.modules[new] = __import__(old)"))
1549 (substitute* "src/engine/SCons/Platform/__init__.py"
1550 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1551 "mod = __import__(full_name)"))
1552 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1553 (chdir "build/scons")
1554 #t)))))
1555 (home-page "http://scons.org/")
1556 (synopsis "Software construction tool written in Python")
1557 (description
1558 "SCons is a software construction tool. Think of SCons as an improved,
1559 cross-platform substitute for the classic Make utility with integrated
1560 functionality similar to autoconf/automake and compiler caches such as ccache.
1561 In short, SCons is an easier, more reliable and faster way to build
1562 software.")
1563 (license license:x11)))
1564
1565 (define-public scons-python2
1566 (package
1567 (inherit (package-with-python2 scons))
1568 (name "scons-python2")))
1569
1570 (define-public python-extras
1571 (package
1572 (name "python-extras")
1573 (version "1.0.0")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (pypi-uri "extras" version))
1578 (sha256
1579 (base32
1580 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1581 (build-system python-build-system)
1582 (arguments
1583 ;; FIXME: Circular dependency on testtools.
1584 '(#:tests? #f))
1585 (home-page "https://github.com/testing-cabal/extras")
1586 (synopsis "Useful extensions to the Python standard library")
1587 (description
1588 "Extras is a set of extensions to the Python standard library.")
1589 (license license:expat)))
1590
1591 (define-public python2-extras
1592 (package-with-python2 python-extras))
1593
1594 (define-public python-mimeparse
1595 (package
1596 (name "python-mimeparse")
1597 (version "1.6.0")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (pypi-uri "python-mimeparse" version))
1602 (sha256
1603 (base32
1604 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1605 (build-system python-build-system)
1606 (arguments
1607 '(#:phases
1608 (modify-phases %standard-phases
1609 (replace 'check
1610 (lambda _
1611 (invoke "./mimeparse_test.py"))))))
1612 (home-page
1613 "https://github.com/dbtsai/python-mimeparse")
1614 (synopsis "Python library for parsing MIME types")
1615 (description
1616 "Mimeparse provides basic functions for parsing MIME type names and
1617 matching them against a list of media-ranges.")
1618 (license license:expat)))
1619
1620 (define-public python2-mimeparse
1621 (package-with-python2 python-mimeparse))
1622
1623 (define-public python-miniboa
1624 (package
1625 (name "python-miniboa")
1626 (version "1.0.7")
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri (pypi-uri "miniboa" version))
1631 (sha256
1632 (base32
1633 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1634 (build-system python-build-system)
1635 (home-page "https://github.com/shmup/miniboa")
1636 (synopsis "Simple, single-threaded Telnet server")
1637 (description
1638 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1639 server.")
1640 (license license:asl2.0)))
1641
1642 (define-public python2-miniboa
1643 (package-with-python2 python-miniboa))
1644
1645 (define-public python-pafy
1646 (package
1647 (name "python-pafy")
1648 (version "0.5.3.1")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "pafy" version))
1653 (sha256
1654 (base32
1655 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1656 (build-system python-build-system)
1657 (arguments
1658 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1659 (propagated-inputs
1660 ;; Youtube-dl is a python package which is imported in the file
1661 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1662 `(("youtube-dl" ,youtube-dl)))
1663 (home-page "https://np1.github.io/pafy/")
1664 (synopsis "Retrieve YouTube content and metadata")
1665 (description
1666 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1667 (license license:lgpl3+)))
1668
1669 (define-public python2-funcsigs
1670 (package
1671 (name "python2-funcsigs")
1672 (version "1.0.2")
1673 (source (origin
1674 (method url-fetch)
1675 (uri (pypi-uri "funcsigs" version))
1676 (sha256
1677 (base32
1678 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1679 (build-system python-build-system)
1680 (arguments
1681 `(#:python ,python-2))
1682 (native-inputs
1683 `(("python2-unittest2" ,python2-unittest2)))
1684 (home-page "http://funcsigs.readthedocs.org")
1685 (synopsis "Python function signatures from PEP362")
1686 (description
1687 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1688 (license license:asl2.0)))
1689
1690 (define-public python2-funcsigs-bootstrap
1691 (package
1692 (inherit python2-funcsigs)
1693 (name "python2-funcsigs-bootstrap")
1694 (native-inputs `())
1695 (arguments
1696 `(#:tests? #f
1697 ,@(package-arguments python2-funcsigs)))))
1698
1699 (define-public python-py
1700 (package
1701 (name "python-py")
1702 (version "1.8.0")
1703 (source
1704 (origin
1705 (method url-fetch)
1706 (uri (pypi-uri "py" version))
1707 (sha256
1708 (base32
1709 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1710 (build-system python-build-system)
1711 (arguments
1712 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1713 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1714 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1715 ;; Is this module globally installed?"
1716 '(#:tests? #f))
1717 (native-inputs
1718 `(("python-setuptools-scm" ,python-setuptools-scm)))
1719 (home-page "https://github.com/pytest-dev/py")
1720 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1721 (description
1722 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1723 code introspection, and logging.")
1724 (license license:expat)))
1725
1726 (define-public python2-py
1727 (package-with-python2 python-py))
1728
1729 ;; Recent versions of python-fixtures and python-testrepository need
1730 ;; python-pbr for packaging, which itself needs these two packages for
1731 ;; testing.
1732 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1733 ;; same source, just without any test dependencies and with tests disabled.
1734 ;; python-pbr-minmal is then used to package python-fixtures and
1735 ;; python-testrepository.
1736 ;; Strictly speaking we currently could remove the test-requirements from the
1737 ;; normal python-pbr package (and save this package) since test are disabled
1738 ;; there anyway. But this may change in future.
1739 (define-public python-pbr-minimal
1740 (package
1741 (name "python-pbr-minimal")
1742 (version "3.0.1")
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (pypi-uri "pbr" version))
1747 (sha256
1748 (base32
1749 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1750 (build-system python-build-system)
1751 (arguments
1752 `(#:tests? #f))
1753 (home-page "http://docs.openstack.org/developer/pbr/")
1754 (synopsis "Minimal build of python-pbr used for bootstrapping")
1755 (description
1756 "Used only for bootstrapping python2-pbr, you should not need this.")
1757 (license license:asl2.0)))
1758
1759 (define-public python2-pbr-minimal
1760 (package-with-python2 python-pbr-minimal))
1761
1762 (define-public python-pbr
1763 (package
1764 (inherit python-pbr-minimal)
1765 (name "python-pbr")
1766 (arguments
1767 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1768 (propagated-inputs
1769 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1770 (native-inputs
1771 `(("python-fixtures" ,python-fixtures-bootstrap)
1772 ;; discover, coverage, hacking, subunit
1773 ("python-mock" ,python-mock)
1774 ("python-six" ,python-six)
1775 ("python-sphinx" ,python-sphinx)
1776 ("python-testrepository" ,python-testrepository-bootstrap)
1777 ("python-testresources" ,python-testresources-bootstrap)
1778 ("python-testscenarios" ,python-testscenarios-bootstrap)
1779 ("python-testtools" ,python-testtools-bootstrap)
1780 ("python-virtualenv" ,python-virtualenv)))
1781 (synopsis "Enhance the default behavior of Python’s setuptools")
1782 (description
1783 "Python Build Reasonableness (PBR) is a library that injects some useful
1784 and sensible default behaviors into your setuptools run. It will set
1785 versions, process requirements files and generate AUTHORS and ChangeLog file
1786 from git information.
1787 ")))
1788
1789 (define-public python2-pbr
1790 (package-with-python2 python-pbr))
1791
1792 (define-public python-pyrsistent
1793 (package
1794 (name "python-pyrsistent")
1795 (version "0.14.11")
1796 (home-page "https://github.com/tobgu/pyrsistent")
1797 (source (origin
1798 (method url-fetch)
1799 (uri (pypi-uri "pyrsistent" version))
1800 (sha256
1801 (base32
1802 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1803 (build-system python-build-system)
1804 (native-inputs
1805 `(("python-hypothesis" ,python-hypothesis)
1806 ("python-pytest" ,python-pytest)
1807 ("python-pytest-runner" ,python-pytest-runner)))
1808 (propagated-inputs
1809 `(("python-six" ,python-six)))
1810 (synopsis "Persistent data structures for Python")
1811 (description
1812 "Pyrsistent is a number of persistent collections (by some referred to as
1813 functional data structures). Persistent in the sense that they are immutable.
1814
1815 All methods on a data structure that would normally mutate it instead return a
1816 new copy of the structure containing the requested updates. The original
1817 structure is left untouched.")
1818 (license license:expat)))
1819
1820 (define-public python2-pyrsistent
1821 (package-with-python2 python-pyrsistent))
1822
1823 (define-public python-exif-read
1824 (package
1825 (name "python-exif-read")
1826 (version "2.1.2")
1827 (source (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "ExifRead" version))
1830 (sha256
1831 (base32
1832 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1833 (build-system python-build-system)
1834 (arguments `(#:tests? #f)) ; no tests
1835 (home-page "https://github.com/ianare/exif-py")
1836 (synopsis "Python library to extract EXIF data from image files")
1837 (description
1838 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1839 files.")
1840 (license license:bsd-3)))
1841
1842 (define-public python2-exif-read
1843 (package-with-python2 python-exif-read))
1844
1845 (define-public python-pyld
1846 (package
1847 (name "python-pyld")
1848 (version "1.0.3")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "PyLD" version))
1852 (sha256
1853 (base32
1854 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1855 (build-system python-build-system)
1856 (home-page "https://github.com/digitalbazaar/pyld")
1857 (synopsis "Python implementation of the JSON-LD specification")
1858 (description
1859 "PyLD is an implementation of the JSON-LD specification.")
1860 (license license:bsd-3)))
1861
1862 (define-public python2-pyld
1863 (package-with-python2 python-pyld))
1864
1865 (define-public python-click
1866 (package
1867 (name "python-click")
1868 (version "7.0")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (pypi-uri "click" version))
1873 (sha256
1874 (base32
1875 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1876 (build-system python-build-system)
1877 (arguments
1878 `(#:phases
1879 (modify-phases %standard-phases
1880 (add-after 'unpack 'fix-paths
1881 (lambda* (#:key inputs #:allow-other-keys)
1882 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1883 "cross-libc" "libc"))))
1884 (substitute* "click/_unicodefun.py"
1885 (("'locale'")
1886 (string-append "'" glibc "/bin/locale'"))))
1887 #t))
1888 (replace 'check
1889 (lambda _
1890 (invoke "python" "-m" "pytest"))))))
1891 (native-inputs
1892 `(("python-pytest" ,python-pytest)))
1893 (home-page "https://palletsprojects.com/p/click/")
1894 (synopsis "Command line library for Python")
1895 (description
1896 "Click is a Python package for creating command line interfaces in a
1897 composable way with as little code as necessary. Its name stands for
1898 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1899 with sensible defaults out of the box.")
1900 (license license:bsd-3)))
1901
1902 (define-public python2-click
1903 (package-with-python2 python-click))
1904
1905 (define-public python-wheel
1906 (package
1907 (name "python-wheel")
1908 (version "0.32.3")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "wheel" version))
1913 (sha256
1914 (base32
1915 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1916 (build-system python-build-system)
1917 (native-inputs
1918 `(("python-jsonschema" ,python-jsonschema)
1919 ("python-pytest-cov" ,python-pytest-cov)))
1920 (home-page "https://bitbucket.org/pypa/wheel/")
1921 (synopsis "Format for built Python packages")
1922 (description
1923 "A wheel is a ZIP-format archive with a specially formatted filename and
1924 the @code{.whl} extension. It is designed to contain all the files for a PEP
1925 376 compatible install in a way that is very close to the on-disk format. Many
1926 packages will be properly installed with only the @code{Unpack} step and the
1927 unpacked archive preserves enough information to @code{Spread} (copy data and
1928 scripts to their final locations) at any later time. Wheel files can be
1929 installed with a newer @code{pip} or with wheel's own command line utility.")
1930 (license license:expat)
1931 (properties `((python2-variant . ,(delay python2-wheel))))))
1932
1933 (define-public python2-wheel
1934 (let ((wheel (package-with-python2
1935 (strip-python2-variant python-wheel))))
1936 (package (inherit wheel)
1937 (native-inputs `(("python2-functools32" ,python2-functools32)
1938 ,@(package-native-inputs wheel))))))
1939
1940 (define-public python-vcversioner
1941 (package
1942 (name "python-vcversioner")
1943 (version "2.16.0.0")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "vcversioner" version))
1948 (sha256
1949 (base32
1950 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1951 (build-system python-build-system)
1952 (synopsis "Python library for version number discovery")
1953 (description "Vcversioner is a Python library that inspects tagging
1954 information in a variety of version control systems in order to discover
1955 version numbers.")
1956 (home-page "https://github.com/habnabit/vcversioner")
1957 (license license:isc)))
1958
1959 (define-public python2-vcversioner
1960 (package-with-python2 python-vcversioner))
1961
1962 (define-public python-jdcal
1963 (package
1964 (name "python-jdcal")
1965 (version "1.4")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (pypi-uri "jdcal" version))
1970 (sha256
1971 (base32
1972 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1973 (build-system python-build-system)
1974 (arguments
1975 `(#:phases (modify-phases %standard-phases
1976 (replace 'check
1977 (lambda _
1978 (invoke "pytest"))))))
1979 (native-inputs
1980 `(("python-pytest" ,python-pytest)))
1981 (home-page "https://github.com/phn/jdcal")
1982 (synopsis "Functions to convert between Julian dates Gregorian dates")
1983 (description "This Python library provides functions for converting
1984 between Julian dates and Gregorian dates.")
1985 (license license:bsd-2)))
1986
1987 (define-public python2-jdcal
1988 (package-with-python2 python-jdcal))
1989
1990 (define-public python-jsonschema
1991 (package
1992 (name "python-jsonschema")
1993 (version "3.0.1")
1994 (source (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "jsonschema" version))
1997 (sha256
1998 (base32
1999 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2000 (build-system python-build-system)
2001 (arguments
2002 '(#:phases
2003 (modify-phases %standard-phases
2004 (replace 'check
2005 (lambda _
2006 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2007 (invoke "trial" "jsonschema"))))))
2008 (native-inputs
2009 `(("python-setuptools_scm" ,python-setuptools-scm)
2010 ("python-twisted" ,python-twisted)))
2011 (propagated-inputs
2012 `(("python-attrs" ,python-attrs)
2013 ("python-pyrsistent" ,python-pyrsistent)
2014 ("python-six" ,python-six)))
2015 (home-page "https://github.com/Julian/jsonschema")
2016 (synopsis "Implementation of JSON Schema for Python")
2017 (description
2018 "Jsonschema is an implementation of JSON Schema for Python.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2021
2022 (define-public python2-jsonschema
2023 (let ((jsonschema (package-with-python2
2024 (strip-python2-variant python-jsonschema))))
2025 (package (inherit jsonschema)
2026 (propagated-inputs
2027 `(("python2-functools32" ,python2-functools32)
2028 ,@(package-propagated-inputs jsonschema))))))
2029
2030 ;; This old version is still required by docker-compose as of 1.24.0.
2031 (define-public python-jsonschema-2.6
2032 (package
2033 (name "python-jsonschema")
2034 (version "2.6.0")
2035 (source (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "jsonschema" version))
2038 (sha256
2039 (base32
2040 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2041 (build-system python-build-system)
2042 (arguments
2043 '(#:phases
2044 (modify-phases %standard-phases
2045 (replace 'check (lambda _ (invoke "nosetests"))))))
2046 (native-inputs
2047 `(("python-nose" ,python-nose)
2048 ("python-vcversioner" ,python-vcversioner)))
2049 (home-page "https://github.com/Julian/jsonschema")
2050 (synopsis "Implementation of JSON Schema for Python")
2051 (description
2052 "Jsonschema is an implementation of JSON Schema for Python.")
2053 (license license:expat)
2054 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2055
2056 (define-public python-schema
2057 (package
2058 (name "python-schema")
2059 (version "0.6.6")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "schema" version))
2064 (sha256
2065 (base32
2066 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2067 (build-system python-build-system)
2068 (native-inputs
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/keleshev/schema")
2071 (synopsis "Simple data validation library")
2072 (description
2073 "@code{python-schema} is a library for validating Python data
2074 structures, such as those obtained from config-files, forms, external
2075 services or command-line parsing, converted from JSON/YAML (or
2076 something else) to Python data-types.")
2077 (license license:psfl)))
2078
2079 (define-public python2-schema
2080 (package-with-python2 python-schema))
2081
2082 (define-public python-schema-0.5
2083 (package (inherit python-schema)
2084 (version "0.5.0")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "schema" version))
2089 (sha256
2090 (base32
2091 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2092
2093 (define-public python2-schema-0.5
2094 (package-with-python2 python-schema-0.5))
2095
2096 (define-public python-kitchen
2097 (package
2098 (name "python-kitchen")
2099 (version "1.2.5")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "kitchen" version))
2104 (sha256
2105 (base32
2106 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2107 (build-system python-build-system)
2108 (propagated-inputs
2109 `(("python-chardet" ,python-chardet)))
2110 (home-page "https://github.com/fedora-infra/kitchen")
2111 (synopsis "Python API for snippets")
2112 (description "@code{kitchen} module provides a python API for all sorts of
2113 little useful snippets of code that everybody ends up writing for their projects
2114 but never seem big enough to build an independent release. Use kitchen and stop
2115 cutting and pasting that code over and over.")
2116 (license (list license:lgpl2.1+
2117 ;; subprocess.py, test_subprocess.py,
2118 ;; kitchen/pycompat25/defaultdict.py:
2119 license:psfl))))
2120
2121 (define-public python2-kitchen
2122 (package-with-python2 python-kitchen))
2123
2124 (define-public python-unidecode
2125 (package
2126 (name "python-unidecode")
2127 (version "1.1.0")
2128 (source (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "Unidecode" version))
2131 (sha256
2132 (base32
2133 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2134 (build-system python-build-system)
2135 (home-page "https://pypi.python.org/pypi/Unidecode")
2136 (synopsis "ASCII transliterations of Unicode text")
2137 (description
2138 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2139 useful when integrating with legacy code that doesn't support Unicode, or for
2140 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2141 machine identifiers from human-readable Unicode strings that should still be
2142 somewhat intelligible.")
2143 (license license:gpl2+)))
2144
2145 (define-public python2-unidecode
2146 (package-with-python2 python-unidecode))
2147
2148 (define-public python-pyjwt
2149 (package
2150 (name "python-pyjwt")
2151 (version "1.5.3")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "PyJWT" version))
2156 (sha256
2157 (base32
2158 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2159 (modules '((guix build utils)))
2160 (snippet
2161 '(begin
2162 (for-each delete-file-recursively
2163 (find-files "." "\\.pyc$"))
2164 #t))))
2165 (build-system python-build-system)
2166 (native-inputs
2167 `(("python-pytest" ,python-pytest)
2168 ("python-pytest-cov" ,python-pytest-cov)
2169 ("python-pytest-runner" ,python-pytest-runner)))
2170 (home-page "https://github.com/progrium/pyjwt")
2171 (synopsis "JSON Web Token implementation in Python")
2172 (description
2173 "PyJWT is a JSON Web Token implementation written in Python.")
2174 (license license:expat)))
2175
2176 (define-public python2-pyjwt
2177 (package-with-python2 python-pyjwt))
2178
2179 (define-public python-pykka
2180 (package
2181 (name "python-pykka")
2182 (version "1.2.1")
2183 (source
2184 (origin
2185 (method url-fetch)
2186 (uri (pypi-uri "Pykka" version))
2187 (sha256
2188 (base32
2189 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2190 (build-system python-build-system)
2191 (native-inputs
2192 `(("python-mock" ,python-mock)
2193 ("python-nose" ,python-nose)
2194 ("python-gevent" ,python-gevent)
2195 ("python-eventlet" ,python-eventlet)))
2196 (home-page "https://www.pykka.org/")
2197 (synopsis "Pykka is a Python implementation of the actor model")
2198 (description
2199 "Pykka is a Python implementation of the actor model.
2200 The actor model introduces some simple rules to control the sharing
2201 of state and cooperation between execution units, which makes it
2202 easier to build concurrent applications.")
2203 (license license:asl2.0)))
2204
2205 (define-public python2-pykka
2206 (package-with-python2 python-pykka))
2207
2208 (define-public python-pymsgbox
2209 (package
2210 (name "python-pymsgbox")
2211 (version "1.0.6")
2212 (source
2213 (origin
2214 (method git-fetch)
2215 (uri (git-reference
2216 ;; LICENSE.txt is not present on pypi
2217 (url "https://github.com/asweigart/PyMsgBox")
2218 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32
2222 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2223 (arguments
2224 ;; Circular dependency to run tests:
2225 ;; Tests need pyautogui, which depends on pymsgbox.
2226 '(#:tests? #f))
2227 (build-system python-build-system)
2228 (home-page "https://github.com/asweigart/PyMsgBox")
2229 (synopsis "Python module for JavaScript-like message boxes")
2230 (description
2231 "PyMsgBox is a simple, cross-platform, pure Python module for
2232 JavaScript-like message boxes. Types of dialog boxes include:
2233 @enumerate
2234 @item alert
2235 @item confirm
2236 @item prompt
2237 @item password
2238 @end enumerate
2239 ")
2240 (license license:bsd-3)))
2241
2242 (define-public python-pympler
2243 (package
2244 (name "python-pympler")
2245 (home-page "https://pythonhosted.org/Pympler/")
2246 (version "0.7")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (pypi-uri "Pympler" version))
2250 (sha256
2251 (base32
2252 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2253 (build-system python-build-system)
2254 (arguments
2255 `(#:phases (modify-phases %standard-phases
2256 (delete 'check)
2257 (add-after 'install 'check
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (add-installed-pythonpath inputs outputs)
2260 (invoke "python" "setup.py" "test"))))))
2261 (synopsis "Measure, monitor and analyze memory behavior")
2262 (description
2263 "Pympler is a development tool to measure, monitor and analyze
2264 the memory behavior of Python objects in a running Python application.
2265
2266 By pympling a Python application, detailed insight in the size and the
2267 lifetime of Python objects can be obtained. Undesirable or unexpected
2268 runtime behavior like memory bloat and other @samp{pymples} can easily
2269 be identified.
2270
2271 A web profiling frontend exposes process statistics, garbage
2272 visualisation and class tracker statistics.")
2273 (license license:asl2.0)))
2274
2275 (define-public python2-pympler
2276 (package-with-python2 python-pympler))
2277
2278 (define-public python-itsdangerous
2279 (package
2280 (name "python-itsdangerous")
2281 (version "1.1.0")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "itsdangerous" version))
2286 (sha256
2287 (base32
2288 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2289 (build-system python-build-system)
2290 (home-page "https://palletsprojects.com/p/itsdangerous/")
2291 (synopsis "Python library for passing data to/from untrusted environments")
2292 (description
2293 "Itsdangerous provides various helpers to pass trusted data to untrusted
2294 environments and back.")
2295 (license license:bsd-3)))
2296
2297 (define-public python2-itsdangerous
2298 (package-with-python2 python-itsdangerous))
2299
2300 (define-public python-pyyaml
2301 (package
2302 (name "python-pyyaml")
2303 (version "3.13")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (pypi-uri "PyYAML" version))
2308 (sha256
2309 (base32
2310 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2311 (build-system python-build-system)
2312 (inputs
2313 `(("libyaml" ,libyaml)))
2314 (home-page "http://pyyaml.org/wiki/PyYAML")
2315 (synopsis "YAML parser and emitter for Python")
2316 (description
2317 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2318 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2319 API, and sensible error messages. PyYAML supports standard YAML tags and
2320 provides Python-specific tags that allow to represent an arbitrary Python
2321 object.")
2322 (license license:expat)))
2323
2324 (define-public python2-pyyaml
2325 (package-with-python2 python-pyyaml))
2326
2327 (define-public python-vine
2328 (package
2329 (name "python-vine")
2330 (version "1.1.4")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "vine" version))
2335 (sha256
2336 (base32
2337 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2338 (build-system python-build-system)
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest)
2341 ("python-case" ,python-case)))
2342 (home-page "https://github.com/celery/vine")
2343 (synopsis "Promises for Python")
2344 (description
2345 "@code{vine} provides a special implementation of promises in that it can
2346 be used both for \"promise of a value\" and lazy evaluation. The biggest
2347 upside for this is that everything in a promise can also be a promise,
2348 e.g. filters, callbacks and errbacks can all be promises.")
2349 (license license:bsd-3)))
2350
2351 (define-public python-virtualenv
2352 (package
2353 (name "python-virtualenv")
2354 (version "16.1.0")
2355 (source
2356 (origin
2357 (method url-fetch)
2358 (uri (pypi-uri "virtualenv" version))
2359 (sha256
2360 (base32
2361 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2362 (build-system python-build-system)
2363 (arguments
2364 `(#:phases
2365 (modify-phases %standard-phases
2366 (add-before 'check 'disable-failing-test
2367 (lambda _
2368 ;; Disable failing test. See upstream bug report
2369 ;; https://github.com/pypa/virtualenv/issues/957
2370 (substitute* "tests/test_virtualenv.py"
2371 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2372 #t)))))
2373 (native-inputs
2374 `(("python-mock" ,python-mock)
2375 ("python-pytest" ,python-pytest)))
2376 (home-page "https://virtualenv.pypa.io/")
2377 (synopsis "Virtual Python environment builder")
2378 (description
2379 "Virtualenv is a tool to create isolated Python environments.")
2380 (license license:expat)))
2381
2382 (define-public python2-virtualenv
2383 (package-with-python2 python-virtualenv))
2384
2385 (define-public python-markupsafe
2386 (package
2387 (name "python-markupsafe")
2388 (version "1.1.1")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "MarkupSafe" version))
2393 (sha256
2394 (base32
2395 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2396 (build-system python-build-system)
2397 (arguments
2398 `(#:modules ((ice-9 ftw)
2399 (srfi srfi-1)
2400 (srfi srfi-26)
2401 (guix build utils)
2402 (guix build python-build-system))
2403 #:phases (modify-phases %standard-phases
2404 (replace 'check
2405 (lambda _
2406 (let ((cwd (getcwd))
2407 (libdir (find (cut string-prefix? "lib." <>)
2408 (scandir "build"))))
2409 (setenv "PYTHONPATH"
2410 (string-append cwd "/build/" libdir ":"
2411 (getenv "PYTHONPATH")))
2412 (invoke "pytest" "-vv")))))))
2413 (native-inputs
2414 `(("python-pytest" ,python-pytest)))
2415 (home-page "https://github.com/mitsuhiko/markupsafe")
2416 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2417 (description
2418 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2419 for Python.")
2420 (license license:bsd-3)))
2421
2422 (define-public python2-markupsafe
2423 (package-with-python2 python-markupsafe))
2424
2425 (define-public python-jinja2
2426 (package
2427 (name "python-jinja2")
2428 (version "2.10.1")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "Jinja2" version))
2433 (sha256
2434 (base32
2435 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2436 (build-system python-build-system)
2437 (propagated-inputs
2438 `(("python-markupsafe" ,python-markupsafe)))
2439 (home-page "http://jinja.pocoo.org/")
2440 (synopsis "Python template engine")
2441 (description
2442 "Jinja2 is a small but fast and easy to use stand-alone template engine
2443 written in pure Python.")
2444 (license license:bsd-3)))
2445
2446 (define-public python2-jinja2
2447 (package-with-python2 python-jinja2))
2448
2449 (define-public python-pystache
2450 (package
2451 (name "python-pystache")
2452 (version "0.5.4")
2453 (source (origin
2454 (method url-fetch)
2455 (uri (pypi-uri "pystache" version))
2456 (sha256
2457 (base32
2458 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2459 (build-system python-build-system)
2460 (arguments
2461 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2462 (home-page "http://defunkt.io/pystache/")
2463 (synopsis "Python logic-less template engine")
2464 (description
2465 "Pystache is a Python implementation of the framework agnostic,
2466 logic-free templating system Mustache.")
2467 (license license:expat)
2468 (properties `((python2-variant . ,(delay python2-pystache))))))
2469
2470 (define-public python2-pystache
2471 (package (inherit (package-with-python2
2472 (strip-python2-variant python-pystache)))
2473 (arguments
2474 `(#:python ,python-2
2475 #:phases
2476 (modify-phases %standard-phases
2477 (replace 'check
2478 (lambda _
2479 (invoke "python" "test_pystache.py"))))))))
2480
2481 (define-public python-joblib
2482 (package
2483 (name "python-joblib")
2484 (version "0.13.0")
2485 (source (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "joblib" version))
2488 (sha256
2489 (base32
2490 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2491 (build-system python-build-system)
2492 (arguments
2493 `(#:phases
2494 (modify-phases %standard-phases
2495 (replace 'check
2496 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2497 (native-inputs
2498 `(("python-pytest" ,python-pytest)))
2499 (home-page "https://joblib.readthedocs.io/")
2500 (synopsis "Using Python functions as pipeline jobs")
2501 (description
2502 "Joblib is a set of tools to provide lightweight pipelining in Python.
2503 In particular, joblib offers: transparent disk-caching of the output values
2504 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2505 logging and tracing of the execution.")
2506 (license license:bsd-3)))
2507
2508 (define-public python2-joblib
2509 (package-with-python2 python-joblib))
2510
2511 (define-public python-daemon
2512 (package
2513 (name "python-daemon")
2514 (version "2.2.3")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (pypi-uri "python-daemon" version))
2519 (sha256
2520 (base32
2521 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2522 (build-system python-build-system)
2523 (arguments
2524 `(#:phases
2525 (modify-phases %standard-phases
2526 (add-before 'check 'disable-tests
2527 (lambda _
2528 ;; FIXME: Determine why test fails
2529 (substitute* "test/test_daemon.py"
2530 (("test_detaches_process_context")
2531 "skip_test_detaches_process_context"))
2532 #t)))))
2533 (propagated-inputs
2534 `(("python-lockfile" ,python-lockfile)))
2535 (native-inputs
2536 `(("python-unittest2" ,python-unittest2)
2537 ("python-testtools" ,python-testtools)
2538 ("python-testscenarios" ,python-testscenarios)
2539 ("python-mock" ,python-mock)
2540 ("python-docutils" ,python-docutils)))
2541 (home-page "https://pagure.io/python-daemon/")
2542 (synopsis "Python library for making a Unix daemon process")
2543 (description "Python-daemon is a library that assists a Python program to
2544 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2545
2546 This library provides a @code{DaemonContext} class that manages the following
2547 important tasks for becoming a daemon process:
2548 @enumerate
2549 @item Detach the process into its own process group.
2550 @item Set process environment appropriate for running inside a chroot.
2551 @item Renounce suid and sgid privileges.
2552 @item Close all open file descriptors.
2553 @item Change the working directory, uid, gid, and umask.
2554 @item Set appropriate signal handlers.
2555 @item Open new file descriptors for stdin, stdout, and stderr.
2556 @item Manage a specified PID lock file.
2557 @item Register cleanup functions for at-exit processing.
2558 @end enumerate")
2559 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2560 (license (list license:asl2.0 license:gpl3+))))
2561
2562 (define-public python-docutils
2563 (package
2564 (name "python-docutils")
2565 (version "0.14")
2566 (source
2567 (origin
2568 (method url-fetch)
2569 (uri (pypi-uri "docutils" version))
2570 (sha256
2571 (base32
2572 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2573 (build-system python-build-system)
2574 (arguments
2575 '(#:tests? #f)) ; no setup.py test command
2576 (home-page "http://docutils.sourceforge.net/")
2577 (synopsis "Python Documentation Utilities")
2578 (description
2579 "Docutils is a modular system for processing documentation into useful
2580 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2581 reStructuredText.")
2582 ;; Most of the source code is public domain, but some source files are
2583 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2584 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2585
2586 (define-public python2-docutils
2587 (package-with-python2 python-docutils))
2588
2589 (define-public python-pygments
2590 (package
2591 (name "python-pygments")
2592 (version "2.4.2")
2593 (source
2594 (origin
2595 (method url-fetch)
2596 (uri (pypi-uri "Pygments" version))
2597 (sha256
2598 (base32
2599 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2600 (build-system python-build-system)
2601 (arguments
2602 ;; FIXME: Tests require sphinx, which depends on this.
2603 '(#:tests? #f))
2604 (home-page "http://pygments.org/")
2605 (synopsis "Syntax highlighting")
2606 (description
2607 "Pygments is a syntax highlighting package written in Python.")
2608 (license license:bsd-2)))
2609
2610 (define-public python2-pygments
2611 (package-with-python2 python-pygments))
2612
2613 (define-public python-bumpversion
2614 (package
2615 (name "python-bumpversion")
2616 (version "0.5.3")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "bumpversion" version))
2621 (sha256
2622 (base32
2623 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2624 (build-system python-build-system)
2625 (home-page "https://github.com/peritus/bumpversion")
2626 (synopsis "Tool to bump software version")
2627 (description "This tool provides a command-line interface (CLI) to bump a
2628 software version simply.")
2629 (license license:expat)))
2630
2631 (define-public python-deprecated
2632 (package
2633 (name "python-deprecated")
2634 (version "1.2.5")
2635 (source
2636 (origin
2637 (method git-fetch)
2638 (uri (git-reference
2639 (url "https://github.com/tantale/deprecated.git")
2640 (commit (string-append "v" version))))
2641 (file-name (git-file-name name version))
2642 (sha256
2643 (base32
2644 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2645 (build-system python-build-system)
2646 (arguments
2647 `(#:phases (modify-phases %standard-phases
2648 (replace 'check
2649 (lambda _
2650 (invoke "pytest"))))))
2651 (propagated-inputs
2652 `(("python-wrapt" ,python-wrapt)))
2653 (native-inputs
2654 `(("python-bumpversion" ,python-bumpversion)
2655 ("python-pytest" ,python-pytest)
2656 ("python-pytest-cov" ,python-pytest-cov)
2657 ("python-sphinx" ,python-sphinx)
2658 ("python-tox" ,python-tox)))
2659 (home-page "https://github.com/tantale/deprecated")
2660 (synopsis "Python decorator to deprecate classes, functions or methods")
2661 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2662 to deprecate classes, functions or methods.")
2663 (license license:expat)))
2664
2665 (define-public python-pygithub
2666 (package
2667 (name "python-pygithub")
2668 (version "1.43.7")
2669 (source
2670 ;; We fetch from the Git repo because there are no tests in the PyPI
2671 ;; archive.
2672 (origin
2673 (method git-fetch)
2674 (uri (git-reference
2675 (url "https://github.com/PyGithub/PyGithub.git")
2676 (commit (string-append "v" version))))
2677 (file-name (git-file-name name version))
2678 (sha256
2679 (base32
2680 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2681 (build-system python-build-system)
2682 (arguments
2683 `(#:phases (modify-phases %standard-phases
2684 ;; Some tests rely on the network.
2685 (add-after 'unpack 'disable-failing-tests
2686 (lambda _
2687 (substitute* "tests/Issue142.py"
2688 (("testDecodeJson") "disabled_testDecodeJson"))
2689 #t))
2690 (add-before 'check 'prepare-for-tests
2691 (lambda _
2692 (for-each (lambda (f)
2693 (chmod f #o666))
2694 (find-files "./tests"))
2695 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2696 (setenv "PYTHONPATH"
2697 (string-append "./tests:" (getenv "PYTHONPATH")))
2698 #t)))))
2699 (propagated-inputs
2700 `(("python-deprecated" ,python-deprecated)
2701 ("python-pyjwt" ,python-pyjwt)
2702 ("python-requests" ,python-requests)))
2703 (native-inputs `(("python-httpretty" ,python-httpretty)))
2704 (home-page "https://pygithub.readthedocs.io/en/latest/")
2705 (synopsis "Python library for the GitHub API")
2706 (description "This library allows managing GitHub resources such as
2707 repositories, user profiles, and organizations in your Python applications,
2708 using version 3 of the GitHub application programming interface (API).")
2709 (license license:lgpl3+)))
2710
2711 (define-public python-rellu
2712 (package
2713 (name "python-rellu")
2714 (version "0.7")
2715 (source
2716 (origin
2717 (method url-fetch)
2718 (uri (pypi-uri "rellu" version))
2719 (sha256
2720 (base32
2721 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2722 (build-system python-build-system)
2723 (propagated-inputs
2724 `(("python-invoke" ,python-invoke)
2725 ("python-pygithub" ,python-pygithub)))
2726 (home-page "https://github.com/robotframework/rellu")
2727 (synopsis "Utilities to create PyPI releases")
2728 (description "This collection of utilities contains tooling and templates
2729 to assist in creating releases on GitHub and publishing them on PyPI. It is
2730 designed to be used by Robot Framework and tools and libraries in its
2731 ecosystem, but can naturally be used also by other projects.")
2732 (license license:asl2.0)))
2733
2734 (define-public python-robotframework
2735 (package
2736 (name "python-robotframework")
2737 (version "3.1.2")
2738 ;; There are no tests in the PyPI archive.
2739 (source
2740 (origin
2741 (method git-fetch)
2742 (uri (git-reference
2743 (url "https://github.com/robotframework/robotframework.git")
2744 (commit (string-append "v" version))))
2745 (file-name (git-file-name name version))
2746 (sha256
2747 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2748 (patches (search-patches
2749 "python-robotframework-honor-source-date-epoch.patch"))))
2750 (build-system python-build-system)
2751 (arguments
2752 `(#:phases (modify-phases %standard-phases
2753 (add-before 'build 'build-and-install-doc
2754 (lambda* (#:key outputs #:allow-other-keys)
2755 (let* ((doc-output (assoc-ref outputs "doc"))
2756 (doc (string-append doc-output "/share/"
2757 ,name "-" ,version "/")))
2758 (invoke "invoke" "library-docs" "all")
2759 (mkdir-p doc)
2760 (copy-recursively "doc/libraries"
2761 (string-append doc "/libraries"))
2762 #t)))
2763 (replace 'check
2764 (lambda _
2765 (invoke "python" "utest/run.py"))))))
2766 (native-inputs
2767 `(("python-invoke" ,python-invoke)
2768 ("python-rellu" ,python-rellu)
2769 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2770 (outputs '("out" "doc"))
2771 (home-page "https://robotframework.org")
2772 (synopsis "Generic automation framework")
2773 (description "Robot Framework is a generic automation framework for
2774 acceptance testing, acceptance test driven development (ATDD), and robotic
2775 process automation (RPA).")
2776 (license license:asl2.0)))
2777
2778 (define-public python-robotframework-lint
2779 ;; There is no properly tagged release; the commit below seems to correspond
2780 ;; to the 0.9 stable release available from PyPI. The tests are not
2781 ;; included in the PyPI archive, so we fetch the sources from the upstream
2782 ;; Git repo.
2783 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2784 (revision "1"))
2785 (package
2786 (name "python-robotframework-lint")
2787 (version (git-version "0.9.0" revision commit))
2788 (source
2789 (origin
2790 (method git-fetch)
2791 (uri (git-reference
2792 (url "https://github.com/boakley/robotframework-lint.git")
2793 (commit commit)))
2794 (file-name (git-file-name name version))
2795 (sha256
2796 (base32
2797 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2798 (build-system python-build-system)
2799 (arguments
2800 `(#:phases
2801 (modify-phases %standard-phases
2802 (replace 'check
2803 (lambda _
2804 (invoke "python" "-m" "robot" "-A"
2805 "tests/conf/default.args" "tests"))))))
2806 (propagated-inputs
2807 `(("python-robotframework" ,python-robotframework)))
2808 (home-page "https://github.com/boakley/robotframework-lint/")
2809 (synopsis "Static analysis tool (linter) for Robot Framework")
2810 (description "This package provides the @code{rflint} command-line
2811 utility, a static analysis tool (linter) for Robot Framework source files.")
2812 (license license:asl2.0))))
2813
2814 (define-public python-robotframework-sshlibrary
2815 (package
2816 (name "python-robotframework-sshlibrary")
2817 (version "3.3.0")
2818 ;; There are no tests in the PyPI archive.
2819 (source
2820 (origin
2821 (method git-fetch)
2822 (uri (git-reference
2823 (url "https://github.com/robotframework/SSHLibrary.git")
2824 (commit (string-append "v" version))))
2825 (file-name (git-file-name name version))
2826 (sha256
2827 (base32
2828 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2829 (build-system python-build-system)
2830 (arguments
2831 `(#:phases
2832 (modify-phases %standard-phases
2833 (add-before 'build 'build-and-install-doc
2834 (lambda* (#:key outputs #:allow-other-keys)
2835 (let* ((doc-output (assoc-ref outputs "doc"))
2836 (doc (string-append doc-output "/share/"
2837 ,name "-" ,version "/")))
2838 (invoke "chmod" "-R" "+w" "docs")
2839 (invoke "invoke" "kw-docs" "project-docs")
2840 (mkdir-p doc)
2841 (for-each delete-file (find-files "docs" "\\.rst"))
2842 (copy-recursively "docs" doc)
2843 #t)))
2844 (replace 'check
2845 (lambda _
2846 ;; Some tests require an SSH server; we remove them.
2847 (delete-file "utest/test_client_api.py")
2848 (delete-file "utest/test_scp.py")
2849 (invoke "python" "utest/run.py"))))))
2850 (propagated-inputs
2851 `(("python-robotframework" ,python-robotframework)
2852 ("python-paramiko" ,python-paramiko)
2853 ("python-scp" ,python-scp)))
2854 (native-inputs
2855 `(("openssh" ,openssh)
2856 ("which" ,which)
2857 ;; To generate the documentation
2858 ("python-docutils" ,python-docutils)
2859 ("python-invoke" ,python-invoke)
2860 ("python-pygments" ,python-pygments)
2861 ("python-rellu" ,python-rellu)))
2862 (outputs '("out" "doc"))
2863 (home-page "https://github.com/robotframework/SSHLibrary")
2864 (synopsis "Robot Framework library for SSH and SFTP")
2865 (description "SSHLibrary is a Robot Framework library providing support
2866 for SSH and SFTP. It has the following main usages:
2867 @itemize @bullet
2868 @item Executing commands on the remote machine, either blocking or non-blocking.
2869 @item Writing and reading in an interactive shell.
2870 @item Transferring files and directories over SFTP.
2871 @item Ensuring that files and directories exist on the remote machine.
2872 @end itemize")
2873 (license license:asl2.0)))
2874
2875 (define-public python-scp
2876 (package
2877 (name "python-scp")
2878 (version "0.13.2")
2879 (source
2880 (origin
2881 (method url-fetch)
2882 (uri (pypi-uri "scp" version))
2883 (sha256
2884 (base32
2885 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2886 (build-system python-build-system)
2887 (arguments
2888 '(#:tests? #f)) ;tests require an SSH server
2889 (propagated-inputs
2890 `(("python-paramiko" ,python-paramiko)))
2891 (home-page "https://github.com/jbardin/scp.py")
2892 (synopsis "SCP protocol module for Python and Paramiko")
2893 (description "The scp module extends the Paramiko library to send and
2894 receive files via the SCP1 protocol, as implemented by the OpenSSH
2895 @command{scp} program.")
2896 (license license:gpl2+)))
2897
2898 (define-public python-rst.linker
2899 (package
2900 (name "python-rst.linker")
2901 (version "1.10")
2902 (source
2903 (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "rst.linker" version))
2906 (sha256
2907 (base32
2908 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2909 (build-system python-build-system)
2910 (propagated-inputs
2911 `(("python-dateutil" ,python-dateutil)
2912 ("python-six" ,python-six)))
2913 (native-inputs
2914 `(("python-setuptools-scm" ,python-setuptools-scm)))
2915 ;; Test would require path.py, which would introduce a cyclic dependence.
2916 (arguments `(#:tests? #f))
2917 ;; Note: As of version 1.7 the documentation is not worth building.
2918 (home-page "https://github.com/jaraco/rst.linker")
2919 (synopsis "Sphinx plugin to add links and timestamps")
2920 (description "rst.linker allows to automatically replace text by a
2921 reStructuredText external reference or timestamps. It's primary purpose is to
2922 augment the changelog, but it can be used for other documents, too.")
2923 (license license:expat)))
2924
2925 (define-public python2-rst.linker
2926 (package-with-python2 python-rst.linker))
2927
2928 (define-public python-feedgenerator
2929 (package
2930 (name "python-feedgenerator")
2931 (version "1.9")
2932 (source
2933 (origin
2934 (method url-fetch)
2935 (uri (pypi-uri "feedgenerator" version))
2936 (sha256
2937 (base32
2938 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2939 (modules '((guix build utils)))
2940 (snippet
2941 '(begin
2942 ;; Remove pre-compiled .pyc files from source.
2943 (for-each delete-file-recursively
2944 (find-files "." "__pycache__" #:directories? #t))
2945 (for-each delete-file (find-files "." "\\.pyc$"))
2946 #t))))
2947 (build-system python-build-system)
2948 (propagated-inputs
2949 `(("python-pytz" ,python-pytz)
2950 ("python-six" ,python-six)))
2951 (home-page "https://github.com/getpelican/feedgenerator")
2952 (synopsis
2953 "Standalone version of Django's Atom/RSS feed generator")
2954 (description
2955 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2956 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2957 (license license:bsd-3)))
2958
2959 (define-public python2-feedgenerator
2960 (package-with-python2 python-feedgenerator))
2961
2962 (define-public python-toml
2963 (package
2964 (name "python-toml")
2965 (version "0.9.4")
2966 (source
2967 (origin
2968 (method url-fetch)
2969 (uri (pypi-uri "toml" version))
2970 (sha256
2971 (base32
2972 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2973 (build-system python-build-system)
2974 (arguments
2975 `(#:tests? #f)) ;no tests suite in release
2976 (home-page "https://github.com/uiri/toml")
2977 (synopsis "Library for TOML")
2978 (description
2979 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2980 Language (TOML) configuration files.")
2981 (license license:expat)))
2982
2983 (define-public python-jsonrpc-server
2984 (package
2985 (name "python-jsonrpc-server")
2986 (version "0.1.2")
2987 (source
2988 (origin
2989 (method url-fetch)
2990 (uri (pypi-uri "python-jsonrpc-server" version))
2991 (sha256
2992 (base32
2993 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2994 (build-system python-build-system)
2995 (propagated-inputs
2996 `(("python-future" ,python-future)
2997 ("python-mock" ,python-mock)
2998 ("python-pytest" ,python-pytest)))
2999 (home-page
3000 "https://github.com/palantir/python-jsonrpc-server")
3001 (synopsis "JSON RPC 2.0 server library")
3002 (description
3003 "This package provides a JSON RPC 2.0 server library for Python.")
3004 (license license:expat)))
3005
3006 (define-public python-pydocstyle
3007 (package
3008 (name "python-pydocstyle")
3009 (version "3.0.0")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "pydocstyle" version))
3014 (sha256
3015 (base32
3016 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-six" ,python-six)
3020 ("python-snowballstemmer" ,python-snowballstemmer)))
3021 (home-page
3022 "https://github.com/PyCQA/pydocstyle/")
3023 (synopsis "Python docstring style checker")
3024 (description
3025 "This package provides a style checker for the Python Language
3026 Server (PLS).")
3027 (license license:expat)))
3028
3029 ;; XXX: We must use a non-release version since the latest release version
3030 ;; requires python-jedi version < 0.15.
3031 (define-public python-language-server
3032 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3033 (revision "1"))
3034 (package
3035 (name "python-language-server")
3036 (version (git-version "0.28.3" revision commit))
3037 (source
3038 (origin
3039 (method git-fetch)
3040 (uri (git-reference
3041 (url "https://github.com/palantir/python-language-server.git")
3042 (commit commit)))
3043 (sha256
3044 (base32
3045 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3046 (build-system python-build-system)
3047 (propagated-inputs
3048 `(("python-pluggy" ,python-pluggy)
3049 ("python-jsonrpc-server" ,python-jsonrpc-server)
3050 ("python-jedi" ,python-jedi)
3051 ("python-yapf" ,python-yapf)
3052 ("python-pyflakes" ,python-pyflakes)
3053 ("python-pydocstyle" ,python-pydocstyle)
3054 ("python-pycodestyle" ,python-pycodestyle)
3055 ("python-mccabe" ,python-mccabe)
3056 ("python-rope" ,python-rope)
3057 ("python-autopep8" ,python-autopep8)
3058 ("python-pylint" ,python-pylint)))
3059 (home-page "https://github.com/palantir/python-language-server")
3060 (synopsis "Python implementation of the Language Server Protocol")
3061 (description
3062 "The Python Language Server (pyls) is an implementation of the Python 3
3063 language specification for the Language Server Protocol (LSP). This tool is
3064 used in text editing environments to provide a complete and integrated
3065 feature-set for programming Python effectively.")
3066 (license license:expat))))
3067
3068 (define-public python-black
3069 (package
3070 (name "python-black")
3071 (version "18.6b4")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (pypi-uri "black" version))
3076 (sha256
3077 (base32
3078 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3079 (build-system python-build-system)
3080 (arguments
3081 `(#:phases
3082 (modify-phases %standard-phases
3083 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3084 (lambda _
3085 (let ((python3 (which "python3")))
3086 (substitute* '("tests/data/fmtonoff.py"
3087 "tests/data/string_prefixes.py"
3088 "tests/data/function.py")
3089 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3090 (string-append "#!" python3 (if (string? minor-version)
3091 minor-version
3092 ""))))))))))
3093 (propagated-inputs
3094 `(("python-click" ,python-click)
3095 ("python-attrs" ,python-attrs)
3096 ("python-appdirs" ,python-appdirs)
3097 ("python-toml" ,python-toml)))
3098 (home-page "https://github.com/ambv/black")
3099 (synopsis "The uncompromising code formatter")
3100 (description "Black is the uncompromising Python code formatter.")
3101 (license license:expat)))
3102
3103 (define-public python-blinker
3104 (package
3105 (name "python-blinker")
3106 (version "1.4")
3107 (source
3108 (origin
3109 (method url-fetch)
3110 (uri (pypi-uri "blinker" version))
3111 (sha256
3112 (base32
3113 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3114 (build-system python-build-system)
3115 (home-page "http://pythonhosted.org/blinker/")
3116 (synopsis "Fast, simple object-to-object and broadcast signaling")
3117 (description
3118 "Blinker provides a fast dispatching system that allows any number of
3119 interested parties to subscribe to events, or \"signals\".")
3120 (license license:expat)))
3121
3122 (define-public python2-blinker
3123 (package-with-python2 python-blinker))
3124
3125 (define-public pelican
3126 (package
3127 (name "pelican")
3128 (version "4.0.1")
3129 (source
3130 (origin
3131 (method url-fetch)
3132 (uri (pypi-uri "pelican" version))
3133 (sha256
3134 (base32
3135 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3136 (build-system python-build-system)
3137 (propagated-inputs
3138 `(("python-feedgenerator" ,python-feedgenerator)
3139 ("python-jinja2" ,python-jinja2)
3140 ("python-pygments" ,python-pygments)
3141 ("python-docutils" ,python-docutils)
3142 ("python-pytz" ,python-pytz)
3143 ("python-blinker" ,python-blinker)
3144 ("python-unidecode" ,python-unidecode)
3145 ("python-six" ,python-six)
3146 ("python-dateutil" ,python-dateutil)
3147 ("python-markdown" ,python-markdown)))
3148 (home-page "https://getpelican.com/")
3149 (arguments
3150 `(;; XXX Requires a lot more packages to do unit tests :P
3151 #:tests? #f
3152 #:phases (modify-phases %standard-phases
3153 (add-before
3154 'install 'adjust-requires
3155 ;; Since feedgenerator is installed from git, it doesn't
3156 ;; conform to the version requirements.
3157 ;;
3158 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3159 ;; version requirement so setuptools doesn't get confused.
3160 (lambda _
3161 (substitute* "setup.py"
3162 (("['\"]feedgenerator.*?['\"]")
3163 "'feedgenerator'")))))))
3164 (synopsis "Python-based static site publishing system")
3165 (description
3166 "Pelican is a tool to generate a static blog from reStructuredText,
3167 Markdown input files, and more. Pelican uses Jinja2 for templating
3168 and is very extensible.")
3169 (license license:agpl3+)))
3170
3171 (define-public mallard-ducktype
3172 (package
3173 (name "mallard-ducktype")
3174 (version "1.0.2")
3175 (source
3176 (origin
3177 (method git-fetch)
3178 ;; git-reference because tests are not included in pypi source tarball
3179 ;; https://issues.guix.gnu.org/issue/36755#2
3180 (uri (git-reference
3181 (url "https://github.com/projectmallard/mallard-ducktype.git")
3182 (commit version)))
3183 (file-name (git-file-name name version))
3184 (sha256
3185 (base32
3186 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3187 (build-system python-build-system)
3188 (arguments
3189 '(#:phases
3190 (modify-phases %standard-phases
3191 (replace 'check
3192 (lambda _
3193 (with-directory-excursion "tests"
3194 (invoke "sh" "runtests")))))))
3195 (home-page "http://projectmallard.org")
3196 (synopsis "Convert Ducktype to Mallard documentation markup")
3197 (description
3198 "Ducktype is a lightweight syntax that can represent all the semantics
3199 of the Mallard XML documentation system. Ducktype files can be converted to
3200 Mallard using the @command{ducktype} tool. The yelp-tools package
3201 provides additional functionality on the produced Mallard documents.")
3202 (license license:expat)))
3203
3204 (define-public python-scikit-image
3205 (package
3206 (name "python-scikit-image")
3207 (version "0.14.2")
3208 (source
3209 (origin
3210 (method url-fetch)
3211 (uri (pypi-uri "scikit-image" version))
3212 (sha256
3213 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3214 (build-system python-build-system)
3215 (arguments
3216 ;; TODO: Some tests require running X11 server. Disable them?
3217 '(#:tests? #f))
3218 ;; See DEPENDS.txt for the list of build and run time requiremnts
3219 (propagated-inputs
3220 `(("python-cloudpickle" ,python-cloudpickle)
3221 ("python-dask" ,python-dask)
3222 ("python-matplotlib" ,python-matplotlib)
3223 ("python-networkx" ,python-networkx)
3224 ("python-numpy" ,python-numpy)
3225 ("python-pillow" ,python-pillow)
3226 ("python-pywavelets" ,python-pywavelets)
3227 ("python-scipy" ,python-scipy)
3228 ("python-six" ,python-six)))
3229 (native-inputs
3230 `(("python-cython" ,python-cython)))
3231 (home-page "http://scikit-image.org/")
3232 (synopsis "Image processing in Python")
3233 (description
3234 "Scikit-image is a collection of algorithms for image processing.")
3235 (license license:bsd-3)))
3236
3237 (define-public python2-scikit-image
3238 (package-with-python2 python-scikit-image))
3239
3240 (define-public python-cython
3241 (package
3242 (name "python-cython")
3243 (version "0.29.13")
3244 (source
3245 (origin
3246 (method url-fetch)
3247 (uri (pypi-uri "Cython" version))
3248 (sha256
3249 (base32
3250 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3251 (build-system python-build-system)
3252 ;; we need the full python package and not just the python-wrapper
3253 ;; because we need libpython3.3m.so
3254 (inputs
3255 `(("python" ,python)))
3256 (arguments
3257 `(#:phases
3258 (modify-phases %standard-phases
3259 (add-before 'check 'set-HOME
3260 ;; some tests require access to "$HOME/.cython"
3261 (lambda _ (setenv "HOME" "/tmp") #t))
3262
3263 ;; FIXME: These tests started failing on armhf after the 0.28 update
3264 ;; (commit c69d11c5930), both with an error such as this:
3265 ;; compiling (cpp) and running dictcomp ...
3266 ;; === C/C++ compiler error output: ===
3267 ;; ‘
3268 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3269 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3270 ,@(if (target-arm32?)
3271 `((add-before 'check 'disable-failing-tests
3272 (lambda _
3273 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3274 (for-each (lambda (test)
3275 (format disabled-tests "~a\n" test))
3276 '("memslice" "dictcomp"))
3277 (close-port disabled-tests)))))
3278 '())
3279
3280 (replace 'check
3281 (lambda _
3282 ;; Disable compiler optimizations to greatly reduce the running
3283 ;; time of the test suite.
3284 (setenv "CFLAGS" "-O0")
3285
3286 (invoke "python" "runtests.py" "-vv"
3287 "-j" (number->string (parallel-job-count))))))))
3288 (home-page "https://cython.org/")
3289 (synopsis "C extensions for Python")
3290 (description "Cython is an optimising static compiler for both the Python
3291 programming language and the extended Cython programming language. It makes
3292 writing C extensions for Python as easy as Python itself.")
3293 (license license:asl2.0)
3294 (properties `((python2-variant . ,(delay python2-cython))))))
3295
3296 (define-public python2-cython
3297 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3298 (package
3299 (inherit base)
3300 (name "python2-cython")
3301 (inputs
3302 `(("python-2" ,python-2))) ;this is not automatically changed
3303 (arguments
3304 (substitute-keyword-arguments (package-arguments base)
3305 ((#:phases phases)
3306 `(modify-phases ,phases
3307 (add-before 'check 'adjust-test_embed
3308 (lambda _
3309 (substitute* "runtests.py"
3310 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3311 ;; so it can give the right -L flag to GCC when embedding static
3312 ;; builds of Python. It is unaware that the Python "config"
3313 ;; directory (where the static library lives) was renamed in
3314 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3315 ;; which works fine, because that is where the shared library is.
3316 ;;
3317 ;; It also appears to be unaware that the Makefile in Demos/embed
3318 ;; already unconditionally pass the static library location to GCC,
3319 ;; after checking sysconfig.get_config_var('LIBPL).
3320 ;;
3321 ;; The effect is that the linker is unable to resolve libexpat
3322 ;; symbols when building for Python 2, because neither the Python 2
3323 ;; shared library nor Expat is available. To fix it, we can either
3324 ;; add Expat as an input and make it visible to the linker, or just
3325 ;; prevent it from overriding the Python shared library location.
3326 ;; The end result is identical, so we take the easy route.
3327 ((" or libname not in os\\.listdir\\(libdir\\)")
3328 ""))
3329 #t)))))))))
3330
3331 ;; The RPython toolchain currently does not support Python 3.
3332 (define-public python2-rpython
3333 (package
3334 (name "python2-rpython")
3335 (version "0.2.1")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "rpython" version))
3340 (sha256
3341 (base32
3342 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3343 (build-system python-build-system)
3344 (arguments `(#:python ,python-2))
3345 (native-inputs
3346 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3347 (home-page "https://rpython.readthedocs.org")
3348 (synopsis "Framework for implementing interpreters and virtual machines")
3349 (description "RPython is a translation and support framework for
3350 producing implementations of dynamic languages, emphasizing a clean separation
3351 between language specification and implementation aspects.")
3352 (license license:expat)))
3353
3354 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3355 ;; python-scipy still build, as these three packages are often used together.
3356 (define-public python-numpy
3357 (package
3358 (name "python-numpy")
3359 (version "1.15.4")
3360 (source
3361 (origin
3362 (method url-fetch)
3363 (uri (string-append
3364 "https://github.com/numpy/numpy/releases/download/v"
3365 version "/numpy-" version ".tar.gz"))
3366 (sha256
3367 (base32
3368 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3369 (build-system python-build-system)
3370 (inputs
3371 `(("openblas" ,openblas)
3372 ("lapack" ,lapack)))
3373 (native-inputs
3374 `(("python-cython" ,python-cython)
3375 ("python-pytest" ,python-pytest)
3376 ("gfortran" ,gfortran)))
3377 (arguments
3378 `(#:phases
3379 (modify-phases %standard-phases
3380 (add-before 'build 'configure-blas-lapack
3381 (lambda* (#:key inputs #:allow-other-keys)
3382 (call-with-output-file "site.cfg"
3383 (lambda (port)
3384 (format port
3385 "[openblas]
3386 libraries = openblas
3387 library_dirs = ~a/lib
3388 include_dirs = ~a/include
3389
3390 # backslash-n to make emacs happy
3391 \n[lapack]
3392 lapack_libs = lapack
3393 library_dirs = ~a/lib
3394 include_dirs = ~a/include
3395 "
3396 (assoc-ref inputs "openblas")
3397 (assoc-ref inputs "openblas")
3398 (assoc-ref inputs "lapack")
3399 (assoc-ref inputs "lapack"))))
3400 #t))
3401 (add-before 'build 'fix-executable-paths
3402 (lambda* (#:key inputs #:allow-other-keys)
3403 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3404 ;; instead of /bin/sh.
3405 (substitute* "numpy/distutils/exec_command.py"
3406 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3407 (string-append match-start (assoc-ref inputs "bash") match-end)))
3408 ;; Use "gcc" executable, not "cc".
3409 (substitute* "numpy/distutils/system_info.py"
3410 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3411 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3412 #t))
3413 ;; Tests can only be run after the library has been installed and not
3414 ;; within the source directory.
3415 (delete 'check)
3416 (add-after 'install 'check
3417 (lambda* (#:key outputs inputs #:allow-other-keys)
3418 ;; Make installed package available for running the tests
3419 (add-installed-pythonpath inputs outputs)
3420 ;; Make sure "f2py" etc is found.
3421 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3422 ":" (getenv "PATH")))
3423 (with-directory-excursion "/tmp"
3424 (invoke "python" "-c"
3425 "import numpy; numpy.test(verbose=2)")))))))
3426 (home-page "http://www.numpy.org/")
3427 (synopsis "Fundamental package for scientific computing with Python")
3428 (description "NumPy is the fundamental package for scientific computing
3429 with Python. It contains among other things: a powerful N-dimensional array
3430 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3431 and Fortran code, useful linear algebra, Fourier transform, and random number
3432 capabilities.")
3433 (license license:bsd-3)))
3434
3435 (define-public python2-numpy
3436 (package-with-python2 python-numpy))
3437
3438 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3439 ;; interest only for legacy code going back to NumPy's predecessor
3440 ;; Numeric.
3441 (define-public python2-numpy-1.8
3442 (package (inherit python2-numpy)
3443 (version "1.8.2")
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (string-append
3448 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3449 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3450 (sha256
3451 (base32
3452 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3453 (arguments
3454 (substitute-keyword-arguments (package-arguments python2-numpy)
3455 ((#:phases phases)
3456 `(modify-phases ,phases
3457 (replace 'configure-blas-lapack
3458 (lambda* (#:key inputs #:allow-other-keys)
3459 (call-with-output-file "site.cfg"
3460 (lambda (port)
3461 (format port
3462 "[openblas]
3463 libraries = openblas,lapack
3464 library_dirs = ~a/lib:~a/lib
3465 include_dirs = ~a/include:~a/include
3466 "
3467 (assoc-ref inputs "openblas")
3468 (assoc-ref inputs "lapack")
3469 (assoc-ref inputs "openblas")
3470 (assoc-ref inputs "lapack"))))
3471 #t))))))
3472 (native-inputs
3473 `(("python2-nose" ,python2-nose)))
3474 (description "NumPy is the fundamental package for scientific computing
3475 with Python. It contains among other things: a powerful N-dimensional array
3476 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3477 and Fortran code, useful linear algebra, Fourier transform, and random number
3478 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3479 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3480 Numeric.")
3481 (license license:bsd-3)))
3482
3483 (define-public python-munch
3484 (package
3485 (name "python-munch")
3486 (version "2.0.4")
3487 (source
3488 (origin
3489 (method url-fetch)
3490 (uri (pypi-uri "munch" version))
3491 (sha256
3492 (base32
3493 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3494 (build-system python-build-system)
3495 (home-page "https://github.com/Infinidat/munch")
3496 (synopsis "Dot-accessible dictionary")
3497 (description "Munch is a dot-accessible dictionary similar to JavaScript
3498 objects.")
3499 (license license:expat)))
3500
3501 (define-public python2-munch
3502 (package-with-python2 python-munch))
3503
3504 (define-public python-colormath
3505 (package
3506 (name "python-colormath")
3507 (version "3.0.0")
3508 (source
3509 (origin
3510 (method url-fetch)
3511 (uri (pypi-uri "colormath" version))
3512 (sha256
3513 (base32
3514 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3515 (build-system python-build-system)
3516 (propagated-inputs
3517 `(("python-networkx" ,python-networkx)
3518 ("python-numpy" ,python-numpy)))
3519 (home-page "https://github.com/gtaylor/python-colormath")
3520 (synopsis "Color math and conversion library")
3521 (description
3522 "This is a Python library for color math and conversions.")
3523 (license license:bsd-3)))
3524
3525 (define-public python2-colormath
3526 (package-with-python2 python-colormath))
3527
3528 (define-public python-spectra
3529 (package
3530 (name "python-spectra")
3531 (version "0.0.11")
3532 (source
3533 (origin
3534 (method url-fetch)
3535 (uri (pypi-uri "spectra" version))
3536 (sha256
3537 (base32
3538 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3539 (build-system python-build-system)
3540 (arguments
3541 `(#:phases
3542 (modify-phases %standard-phases
3543 (replace 'check
3544 (lambda _ (invoke "nosetests" "-v"))))))
3545 (propagated-inputs
3546 `(("python-colormath" ,python-colormath)))
3547 (native-inputs
3548 `(("python-nose" ,python-nose)))
3549 (home-page "https://github.com/jsvine/spectra")
3550 (synopsis "Color scales and color conversion")
3551 (description
3552 "This package provides a Python library intended to make color math,
3553 color scales, and color space conversion easy. It has support for:
3554
3555 @enumerate
3556 @item Color scales
3557 @item Color ranges
3558 @item Color blending
3559 @item Brightening/darkening colors
3560 @item Saturating/desaturating colors
3561 @item Conversion to/from multiple color spaces.
3562 @end enumerate\n")
3563 (license license:expat)))
3564
3565 (define-public python2-spectra
3566 (package-with-python2 python-spectra))
3567
3568 (define-public python-numpy-documentation
3569 (package
3570 (name "python-numpy-documentation")
3571 (version (package-version python-numpy))
3572 (source (package-source python-numpy))
3573 (build-system python-build-system)
3574 (native-inputs
3575 `(("python-matplotlib" ,python-matplotlib)
3576 ("python-numpy" ,python-numpy)
3577 ("pkg-config" ,pkg-config)
3578 ("python-sphinx" ,python-sphinx)
3579 ("python-numpydoc" ,python-numpydoc)
3580 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3581 texlive-fonts-ec
3582 texlive-generic-ifxetex
3583 texlive-generic-pdftex
3584 texlive-amsfonts
3585 texlive-latex-capt-of
3586 texlive-latex-cmap
3587 texlive-latex-environ
3588 texlive-latex-eqparbox
3589 texlive-latex-etoolbox
3590 texlive-latex-expdlist
3591 texlive-latex-fancyhdr
3592 texlive-latex-fancyvrb
3593 texlive-latex-fncychap
3594 texlive-latex-float
3595 texlive-latex-framed
3596 texlive-latex-geometry
3597 texlive-latex-graphics
3598 texlive-latex-hyperref
3599 texlive-latex-mdwtools
3600 texlive-latex-multirow
3601 texlive-latex-needspace
3602 texlive-latex-oberdiek
3603 texlive-latex-parskip
3604 texlive-latex-preview
3605 texlive-latex-tabulary
3606 texlive-latex-threeparttable
3607 texlive-latex-titlesec
3608 texlive-latex-trimspaces
3609 texlive-latex-ucs
3610 texlive-latex-upquote
3611 texlive-latex-url
3612 texlive-latex-varwidth
3613 texlive-latex-wrapfig)))
3614 ("texinfo" ,texinfo)
3615 ("perl" ,perl)
3616 ("scipy-sphinx-theme"
3617 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3618 (method git-fetch)
3619 (uri (git-reference
3620 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3621 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3622 (sha256
3623 (base32
3624 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3625 ,@(package-native-inputs python-numpy)))
3626 (arguments
3627 `(#:tests? #f ; we're only generating the documentation
3628 #:phases
3629 (modify-phases %standard-phases
3630 (delete 'build)
3631 (replace 'install
3632 (lambda* (#:key inputs outputs #:allow-other-keys)
3633 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3634 (doc (string-append
3635 data "/doc/" ,name "-"
3636 ,(package-version python-numpy)))
3637 (info-reader (string-append data "/info"))
3638 (html (string-append doc "/html"))
3639 (scipy-sphinx-theme "scipy-sphinx-theme")
3640 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3641 (pyver ,(string-append "PYVER=")))
3642
3643 ;; FIXME: this is needed to for texlive-union to generate
3644 ;; fonts, which are not found.
3645 (setenv "HOME" "/tmp")
3646
3647 (with-directory-excursion "doc"
3648 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3649 (mkdir-p html)
3650 (invoke "make" "html" pyver)
3651 (invoke "make" "latex" "PAPER=a4" pyver)
3652 (invoke "make" "-C" "build/latex"
3653 "all-pdf" "PAPER=a4" pyver)
3654 ;; FIXME: Generation of the info file fails.
3655 ;; (invoke "make" "info" pyver)
3656 ;; (mkdir-p info)
3657 ;; (copy-file "build/texinfo/numpy.info"
3658 ;; (string-append info "/numpy.info"))
3659 (for-each (lambda (file)
3660 (copy-file (string-append "build/latex" file)
3661 (string-append doc file)))
3662 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3663 (with-directory-excursion "build/html"
3664 (for-each (lambda (file)
3665 (let* ((dir (dirname file))
3666 (tgt-dir (string-append html "/" dir)))
3667 (unless (equal? "." dir)
3668 (mkdir-p tgt-dir))
3669 (install-file file html)))
3670 (find-files "." ".*")))))
3671 #t)))))
3672 (home-page (package-home-page python-numpy))
3673 (synopsis "Documentation for the python-numpy package")
3674 (description (package-description python-numpy))
3675 (license (package-license python-numpy))))
3676
3677 (define-public python2-numpy-documentation
3678 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3679 (package
3680 (inherit numpy-documentation)
3681 (native-inputs `(("python2-functools32" ,python2-functools32)
3682 ,@(package-native-inputs numpy-documentation))))))
3683
3684 (define-public python-pygit2
3685 (package
3686 (name "python-pygit2")
3687 (version "0.28.2")
3688 (source
3689 (origin
3690 (method url-fetch)
3691 (uri (pypi-uri "pygit2" version))
3692 (sha256
3693 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3694 (build-system python-build-system)
3695 (arguments
3696 '(#:tests? #f)) ; tests don't run correctly in our environment
3697 (propagated-inputs
3698 `(("python-six" ,python-six)
3699 ("python-cffi" ,python-cffi)
3700 ("libgit2" ,libgit2)
3701 ("python-tox" ,python-tox)))
3702 (native-inputs
3703 `(("python-pytest" ,python-pytest)))
3704 (home-page "https://github.com/libgit2/pygit2")
3705 (synopsis "Python bindings for libgit2")
3706 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3707 library, libgit2 implements Git plumbing.")
3708 ;; GPL2.0 only, with linking exception.
3709 (license license:gpl2)))
3710
3711 (define-public python2-pygit2
3712 (package-with-python2 python-pygit2))
3713
3714 (define-public python-pyparsing
3715 (package
3716 (name "python-pyparsing")
3717 (version "2.3.1")
3718 (source
3719 (origin
3720 (method url-fetch)
3721 (uri (pypi-uri "pyparsing" version))
3722 (sha256
3723 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3724 (build-system python-build-system)
3725 (outputs '("out" "doc"))
3726 (arguments
3727 `(#:tests? #f ; no test target
3728 #:phases
3729 (modify-phases %standard-phases
3730 (add-after 'install 'install-doc
3731 (lambda* (#:key outputs #:allow-other-keys)
3732 (let* ((doc (string-append (assoc-ref outputs "doc")
3733 "/share/doc/" ,name "-" ,version))
3734 (html-doc (string-append doc "/html"))
3735 (examples (string-append doc "/examples")))
3736 (mkdir-p html-doc)
3737 (mkdir-p examples)
3738 (for-each
3739 (lambda (dir tgt)
3740 (map (lambda (file)
3741 (install-file file tgt))
3742 (find-files dir ".*")))
3743 (list "docs" "htmldoc" "examples")
3744 (list doc html-doc examples))
3745 #t))))))
3746 (home-page "https://github.com/pyparsing/pyparsing")
3747 (synopsis "Python parsing class library")
3748 (description
3749 "The pyparsing module is an alternative approach to creating and
3750 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3751 of regular expressions. The pyparsing module provides a library of classes
3752 that client code uses to construct the grammar directly in Python code.")
3753 (license license:expat)))
3754
3755 (define-public python2-pyparsing
3756 (package-with-python2 python-pyparsing))
3757
3758 (define-public python-numpydoc
3759 (package
3760 (name "python-numpydoc")
3761 (version "0.8.0")
3762 (source
3763 (origin
3764 (method url-fetch)
3765 (uri (pypi-uri "numpydoc" version))
3766 (sha256
3767 (base32
3768 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3769 (build-system python-build-system)
3770 (propagated-inputs
3771 `(("python-sphinx" ,python-sphinx)))
3772 (native-inputs
3773 `(("python-nose" ,python-nose)))
3774 (home-page "https://pypi.python.org/pypi/numpydoc")
3775 (synopsis
3776 "Numpy's Sphinx extensions")
3777 (description
3778 "Sphinx extension to support docstrings in Numpy format.")
3779 (license license:bsd-2)))
3780
3781 (define-public python2-numpydoc
3782 (package-with-python2 python-numpydoc))
3783
3784 (define-public python-numexpr
3785 (package
3786 (name "python-numexpr")
3787 (version "2.6.5")
3788 (source
3789 (origin
3790 (method url-fetch)
3791 (uri (pypi-uri "numexpr" version))
3792 (sha256
3793 (base32
3794 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3795 (build-system python-build-system)
3796 (arguments `(#:tests? #f)) ; no tests included
3797 (propagated-inputs
3798 `(("python-numpy" ,python-numpy)))
3799 (home-page "https://github.com/pydata/numexpr")
3800 (synopsis "Fast numerical expression evaluator for NumPy")
3801 (description
3802 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3803 expressions that operate on arrays are accelerated and use less memory than
3804 doing the same calculation in Python. In addition, its multi-threaded
3805 capabilities can make use of all your cores, which may accelerate
3806 computations, most specially if they are not memory-bounded (e.g. those using
3807 transcendental functions).")
3808 (license license:expat)))
3809
3810 (define-public python2-numexpr
3811 (package-with-python2 python-numexpr))
3812
3813 (define-public python-cycler
3814 (package
3815 (name "python-cycler")
3816 (version "0.10.0")
3817 (source (origin
3818 (method url-fetch)
3819 (uri (pypi-uri "cycler" version))
3820 (sha256
3821 (base32
3822 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3823 (build-system python-build-system)
3824 (arguments
3825 ;; XXX: The current version requires 'coveralls' which we don't have.
3826 ;; Enable this for the next release which uses 'python-pytest'.
3827 '(#:tests? #f))
3828 (propagated-inputs
3829 `(("python-six" ,python-six)))
3830 (home-page "http://matplotlib.org/cycler/")
3831 (synopsis "Composable keyword argument iterator")
3832 (description
3833 "When using @code{matplotlib} and plotting more than one line, it is
3834 common to want to be able to want to be able to cycle over one or more artist
3835 styles; but the plotting logic can quickly become involved.
3836 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3837 @code{Cycler} class was developed.")
3838 (license license:bsd-3)))
3839
3840 (define-public python2-cycler
3841 (package-with-python2 python-cycler))
3842
3843 (define-public python-colorspacious
3844 (package
3845 (name "python-colorspacious")
3846 (version "1.1.0")
3847 (source
3848 (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/njsmith/colorspacious.git")
3852 (commit (string-append "v" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3856 (build-system python-build-system)
3857 (propagated-inputs
3858 `(("python-numpy" ,python-numpy)))
3859 (native-inputs
3860 `(("python-nose" ,python-nose)))
3861 (arguments
3862 `(#:phases
3863 (modify-phases %standard-phases
3864 (replace 'check
3865 (lambda _
3866 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3867 (home-page "https://github.com/njsmith/colorspacious")
3868 (synopsis "Python library for colorspace conversions")
3869 (description "@code{colorspacious} is a Python library that lets you
3870 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3871 (license license:expat)))
3872
3873 (define-public python2-colorspacious
3874 (package-with-python2 python-colorspacious))
3875
3876 (define-public python-matplotlib
3877 (package
3878 (name "python-matplotlib")
3879 (version "3.1.1")
3880 (source
3881 (origin
3882 (method url-fetch)
3883 (uri (pypi-uri "matplotlib" version))
3884 (sha256
3885 (base32
3886 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3887 (build-system python-build-system)
3888 (propagated-inputs ; the following packages are all needed at run time
3889 `(("python-cycler" ,python-cycler)
3890 ("python-kiwisolver" ,python-kiwisolver)
3891 ("python-pyparsing" ,python-pyparsing)
3892 ("python-pygobject" ,python-pygobject)
3893 ("gobject-introspection" ,gobject-introspection)
3894 ("python-tkinter" ,python "tk")
3895 ("python-dateutil" ,python-dateutil)
3896 ("python-numpy" ,python-numpy)
3897 ("python-pillow" ,python-pillow)
3898 ("python-pytz" ,python-pytz)
3899 ("python-six" ,python-six)
3900 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3901 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3902 ;; object. For this reason we need to import both libraries.
3903 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3904 ("python-pycairo" ,python-pycairo)
3905 ("python-cairocffi" ,python-cairocffi)))
3906 (inputs
3907 `(("libpng" ,libpng)
3908 ("imagemagick" ,imagemagick)
3909 ("freetype" ,freetype)
3910 ("cairo" ,cairo)
3911 ("glib" ,glib)
3912 ;; FIXME: Add backends when available.
3913 ;("python-wxpython" ,python-wxpython)
3914 ("tcl" ,tcl)
3915 ("tk" ,tk)))
3916 (native-inputs
3917 `(("pkg-config" ,pkg-config)
3918 ("python-pytest" ,python-pytest)
3919 ("python-mock" ,python-mock)
3920 ("unzip" ,unzip)
3921 ("jquery-ui"
3922 ,(origin
3923 (method url-fetch)
3924 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3925 (sha256
3926 (base32
3927 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3928 (arguments
3929 `(#:phases
3930 (modify-phases %standard-phases
3931 ;; XXX We disable all image comparison tests because we're using a
3932 ;; newer version of FreeType than matplotlib expects. This leads to
3933 ;; minor differences throughout the tests.
3934 (add-after 'unpack 'fix-and-disable-failing-tests
3935 (lambda _
3936 (substitute* (append (find-files "lib/matplotlib/tests/"
3937 "test_.*\\.py$")
3938 (find-files "lib/mpl_toolkits/tests"
3939 "test_.*\\.py$"))
3940 (("^from matplotlib" match)
3941 (string-append "import pytest\n" match))
3942 (("( *)@image_comparison" match indent)
3943 (string-append indent
3944 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3945 match)))
3946 (substitute* "lib/matplotlib/tests/test_animation.py"
3947 (("/bin/sh") (which "sh")))
3948 (for-each delete-file
3949 ;; test_normal_axes, test_get_tightbbox_polar
3950 '("lib/matplotlib/tests/test_axes.py"
3951 ;; test_outward_ticks
3952 "lib/matplotlib/tests/test_tightlayout.py"
3953 ;; Fontconfig returns no fonts.
3954 "lib/matplotlib/tests/test_font_manager.py"))
3955 #t))
3956 (add-before 'install 'install-jquery-ui
3957 (lambda* (#:key outputs inputs #:allow-other-keys)
3958 (let ((dir (string-append (assoc-ref outputs "out")
3959 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3960 (mkdir-p dir)
3961 (invoke "unzip"
3962 (assoc-ref inputs "jquery-ui")
3963 "-d" dir))
3964 #t))
3965 (delete 'check)
3966 (add-after 'install 'check
3967 (lambda* (#:key outputs inputs #:allow-other-keys)
3968 (add-installed-pythonpath inputs outputs)
3969 (invoke "python" "tests.py" "-v"
3970 "-m" "not network")))
3971 (add-before 'build 'configure-environment
3972 (lambda* (#:key outputs inputs #:allow-other-keys)
3973 (let ((cairo (assoc-ref inputs "cairo")))
3974 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3975 ;; has not effect.
3976 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3977 (setenv "HOME" (getcwd))
3978 (call-with-output-file "setup.cfg"
3979 (lambda (port)
3980 (format port "[directories]~%
3981 basedirlist = ~a,~a~%
3982 [packages]~%
3983 tests = True~%"
3984 (assoc-ref inputs "tcl")
3985 (assoc-ref inputs "tk")))))
3986 #t)))))
3987 (home-page "https://matplotlib.org/")
3988 (synopsis "2D plotting library for Python")
3989 (description
3990 "Matplotlib is a Python 2D plotting library which produces publication
3991 quality figures in a variety of hardcopy formats and interactive environments
3992 across platforms. Matplotlib can be used in Python scripts, the python and
3993 ipython shell, web application servers, and six graphical user interface
3994 toolkits.")
3995 (license license:psfl)
3996 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3997
3998 (define-public python2-matplotlib
3999 (let ((matplotlib (package-with-python2
4000 (strip-python2-variant python-matplotlib))))
4001 (package (inherit matplotlib)
4002 (version "2.2.4")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "matplotlib" version))
4007 (sha256
4008 (base32
4009 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4010 (arguments
4011 (substitute-keyword-arguments (package-arguments matplotlib)
4012 ((#:phases phases)
4013 `(modify-phases ,phases
4014 (replace 'install-jquery-ui
4015 (lambda* (#:key outputs inputs #:allow-other-keys)
4016 (let ((dir (string-append (assoc-ref outputs "out")
4017 "/lib/python2.7/site-packages/"
4018 "matplotlib/backends/web_backend/")))
4019 (mkdir-p dir)
4020 (invoke "unzip"
4021 (assoc-ref inputs "jquery-ui")
4022 "-d" dir))
4023 #t))
4024 (delete 'check))))) ; These tests weren't run the the past.
4025 ;; Make sure to use special packages for Python 2 instead
4026 ;; of those automatically rewritten by package-with-python2.
4027 (propagated-inputs
4028 `(("python2-pycairo" ,python2-pycairo)
4029 ("python2-backports-functools-lru-cache"
4030 ,python2-backports-functools-lru-cache)
4031 ("python2-functools32" ,python2-functools32)
4032 ("python2-pygobject-2" ,python2-pygobject-2)
4033 ("python2-subprocess32" ,python2-subprocess32)
4034 ("python2-tkinter" ,python-2 "tk")
4035 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4036 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4037
4038 (define-public python-matplotlib-documentation
4039 (package
4040 (name "python-matplotlib-documentation")
4041 (version (package-version python-matplotlib))
4042 (source (package-source python-matplotlib))
4043 (build-system python-build-system)
4044 (native-inputs
4045 `(("python-matplotlib" ,python-matplotlib)
4046 ("python-colorspacious" ,python-colorspacious)
4047 ("python-sphinx" ,python-sphinx)
4048 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4049 ("python-sphinx-gallery" ,python-sphinx-gallery)
4050 ("python-numpydoc" ,python-numpydoc)
4051 ("python-ipython" ,python-ipython)
4052 ("python-ipykernel" ,python-ipykernel)
4053 ("python-mock" ,python-mock)
4054 ("graphviz" ,graphviz)
4055 ("texlive" ,(texlive-union (list texlive-amsfonts
4056 texlive-latex-amsmath
4057 texlive-latex-enumitem
4058 texlive-latex-expdlist
4059 texlive-latex-geometry
4060 texlive-latex-preview
4061 texlive-latex-type1cm
4062 texlive-latex-ucs
4063
4064 texlive-generic-pdftex
4065
4066 texlive-fonts-ec
4067 texlive-fonts-adobe-times
4068 texlive-fonts-txfonts)))
4069 ("texinfo" ,texinfo)
4070 ,@(package-native-inputs python-matplotlib)))
4071 (arguments
4072 `(#:tests? #f ; we're only generating documentation
4073 #:phases
4074 (modify-phases %standard-phases
4075 ;; The tests in python-matplotlib are run after the install phase, so
4076 ;; we need to delete the extra phase here.
4077 (delete 'check)
4078 (replace 'build
4079 (lambda _
4080 (chdir "doc")
4081 (setenv "PYTHONPATH"
4082 (string-append (getenv "PYTHONPATH")
4083 ":" (getcwd) "/../examples/units"))
4084 (substitute* "conf.py"
4085 ;; Don't use git.
4086 (("^SHA = check_output.*")
4087 (string-append "SHA = \"" ,version "\"\n"))
4088 ;; Don't fetch intersphinx files from the Internet
4089 (("^explicit_order_folders" m)
4090 (string-append "intersphinx_mapping = {}\n" m))
4091 (("'sphinx.ext.intersphinx',") "")
4092 ;; Disable URL embedding which requires internet access.
4093 (("'https://docs.scipy.org/doc/numpy'") "None")
4094 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4095 (invoke "make"
4096 "SPHINXBUILD=sphinx-build"
4097 "SPHINXOPTS=" ; don't abort on warnings
4098 "html" "texinfo")))
4099 (replace 'install
4100 (lambda* (#:key inputs outputs #:allow-other-keys)
4101 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4102 (doc (string-append data "/doc/python-matplotlib-" ,version))
4103 (info (string-append data "/info"))
4104 (html (string-append doc "/html")))
4105 (mkdir-p html)
4106 (mkdir-p info)
4107 (copy-recursively "build/html" html)
4108 (symlink (string-append html "/_images")
4109 (string-append info "/matplotlib-figures"))
4110 (with-directory-excursion "build/texinfo"
4111 (substitute* "matplotlib.texi"
4112 (("@image\\{([^,]*)" all file)
4113 (string-append "@image{matplotlib-figures/" file)))
4114 (symlink (string-append html "/_images")
4115 "./matplotlib-figures")
4116 (invoke "makeinfo" "--no-split"
4117 "-o" "matplotlib.info" "matplotlib.texi"))
4118 (install-file "build/texinfo/matplotlib.info" info))
4119 #t)))))
4120 (home-page (package-home-page python-matplotlib))
4121 (synopsis "Documentation for the python-matplotlib package")
4122 (description (package-description python-matplotlib))
4123 (license (package-license python-matplotlib))))
4124
4125 (define-public python2-matplotlib-documentation
4126 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4127 (package
4128 (inherit parent)
4129 (native-inputs
4130 (alist-delete "python-sphinx-copybutton"
4131 (package-native-inputs parent))))))
4132
4133 (define-public python-matplotlib-venn
4134 (package
4135 (name "python-matplotlib-venn")
4136 (version "0.11.5")
4137 (source
4138 (origin
4139 (method url-fetch)
4140 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4141 (sha256
4142 (base32
4143 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4144 (build-system python-build-system)
4145 (arguments '(#:tests? #f)) ; tests are not included
4146 (propagated-inputs
4147 `(("python-matplotlib" ,python-matplotlib)
4148 ("python-numpy" ,python-numpy)
4149 ("python-scipy" ,python-scipy)))
4150 (native-inputs
4151 `(("unzip" ,unzip)))
4152 (home-page "https://github.com/konstantint/matplotlib-venn")
4153 (synopsis "Plot area-proportional Venn diagrams")
4154 (description
4155 "This package provides tools for plotting area-proportional two- and
4156 three-way Venn diagrams in @code{matplotlib}.")
4157 (license license:expat)))
4158
4159 (define-public python2-pysnptools
4160 (package
4161 (name "python2-pysnptools")
4162 (version "0.3.13")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (pypi-uri "pysnptools" version))
4167 (sha256
4168 (base32
4169 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4170 (build-system python-build-system)
4171 (arguments
4172 `(#:python ,python-2 ; only Python 2.7 is supported
4173 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4174 (propagated-inputs
4175 `(("python2-numpy" ,python2-numpy)
4176 ("python2-scipy" ,python2-scipy)
4177 ("python2-pandas" ,python2-pandas)))
4178 (native-inputs
4179 `(("python2-cython" ,python2-cython)))
4180 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4181 (synopsis "Library for reading and manipulating genetic data")
4182 (description
4183 "PySnpTools is a library for reading and manipulating genetic data. It
4184 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4185 those files. It can also efficiently manipulate ranges of integers using set
4186 operators such as union, intersection, and difference.")
4187 (license license:asl2.0)))
4188
4189 (define-public python-scipy
4190 (package
4191 (name "python-scipy")
4192 (version "1.3.1")
4193 (source
4194 (origin
4195 (method url-fetch)
4196 (uri (pypi-uri "scipy" version))
4197 (sha256
4198 (base32
4199 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4200 (build-system python-build-system)
4201 (propagated-inputs
4202 `(("python-numpy" ,python-numpy)
4203 ("python-matplotlib" ,python-matplotlib)
4204 ("python-pyparsing" ,python-pyparsing)))
4205 (inputs
4206 `(("lapack" ,lapack)
4207 ("openblas" ,openblas)))
4208 (native-inputs
4209 `(("python-cython" ,python-cython)
4210 ("python-pytest" ,python-pytest)
4211 ("python-sphinx" ,python-sphinx)
4212 ("python-numpydoc" ,python-numpydoc)
4213 ("gfortran" ,gfortran)
4214 ("perl" ,perl)
4215 ("which" ,which)))
4216 (outputs '("out" "doc"))
4217 (arguments
4218 `(#:phases
4219 (modify-phases %standard-phases
4220 (add-after 'unpack 'disable-broken-tests
4221 (lambda _
4222 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4223 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4224 (string-append indent
4225 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4226 m)))
4227 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4228 (("^def test_parallel_threads\\(\\):" m)
4229 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4230 m)))
4231 #t))
4232 (add-before 'build 'configure-openblas
4233 (lambda* (#:key inputs #:allow-other-keys)
4234 (call-with-output-file "site.cfg"
4235 (lambda (port)
4236 (format port
4237 "[blas]
4238 libraries = openblas
4239 library_dirs = ~a/lib
4240 include_dirs = ~a/include
4241
4242 # backslash-n to make emacs happy
4243 \n[atlas]
4244 library_dirs = ~a/lib
4245 atlas_libs = openblas
4246 "
4247 (assoc-ref inputs "openblas")
4248 (assoc-ref inputs "openblas")
4249 (assoc-ref inputs "openblas"))))
4250 #t))
4251 (add-after 'install 'install-doc
4252 (lambda* (#:key inputs outputs #:allow-other-keys)
4253 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4254 (doc (string-append data "/doc/" ,name "-" ,version))
4255 (html (string-append doc "/html"))
4256 (pyver ,(string-append "PYVER=" (version-major+minor
4257 (package-version python))))
4258 ;; By default it tries to run sphinx-build through the Python
4259 ;; interpreter which won't work with our shell wrapper.
4260 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4261 ;; Make installed package available for building the
4262 ;; documentation
4263 (add-installed-pythonpath inputs outputs)
4264 (with-directory-excursion "doc"
4265 ;; Fix generation of images for mathematical expressions.
4266 (substitute* (find-files "source" "conf\\.py")
4267 (("pngmath_use_preview = True")
4268 "pngmath_use_preview = False"))
4269 (mkdir-p html)
4270 (invoke "make" "html" pyver sphinxbuild)
4271 (with-directory-excursion "build/html"
4272 (for-each (lambda (file)
4273 (let* ((dir (dirname file))
4274 (tgt-dir (string-append html "/" dir)))
4275 (install-file file html)))
4276 (find-files "." ".*")))))
4277 #t))
4278 ;; Tests can only be run after the library has been installed and not
4279 ;; within the source directory.
4280 (delete 'check)
4281 (add-after 'install 'check
4282 (lambda* (#:key inputs outputs #:allow-other-keys)
4283 (add-installed-pythonpath inputs outputs)
4284 (with-directory-excursion "/tmp"
4285 (invoke "python" "-c"
4286 "import scipy; scipy.test(verbose=2)")))))))
4287 (home-page "https://www.scipy.org/")
4288 (synopsis "The Scipy library provides efficient numerical routines")
4289 (description "The SciPy library is one of the core packages that make up
4290 the SciPy stack. It provides many user-friendly and efficient numerical
4291 routines such as routines for numerical integration and optimization.")
4292 (properties `((python2-variant . ,(delay python2-scipy))))
4293 (license license:bsd-3)))
4294
4295 ;; Version 1.2.2 is the last version to support Python 2
4296 (define-public python2-scipy
4297 (package
4298 (inherit (package-with-python2
4299 (strip-python2-variant python-scipy)))
4300 (version "1.2.2")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (pypi-uri "scipy" version))
4305 (sha256
4306 (base32
4307 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4308
4309 (define-public python-socksipy-branch
4310 (package
4311 (name "python-socksipy-branch")
4312 (version "1.01")
4313 (source
4314 (origin
4315 (method url-fetch)
4316 (uri (pypi-uri "SocksiPy-branch" version))
4317 (sha256
4318 (base32
4319 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4320 (build-system python-build-system)
4321 (arguments
4322 `(#:tests? #f)) ; There are no tests
4323 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4324 (synopsis "Python SOCKS module")
4325 (description
4326 "SocksiPy - A Python SOCKS client module. It provides a
4327 socket-like interface that supports connections to any TCP
4328 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4329 The original version was developed by Dan Haim, this is a
4330 branch created by Mario Vilas to address some open issues,
4331 as the original project seems to have been abandoned circa 2007.")
4332 (license license:bsd-3)))
4333
4334 (define-public python2-socksipy-branch
4335 (package-with-python2 python-socksipy-branch))
4336
4337 (define-public python-pycodestyle
4338 (package
4339 (name "python-pycodestyle")
4340 (version "2.5.0")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "pycodestyle" version))
4345 (sha256
4346 (base32
4347 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4348 (build-system python-build-system)
4349 (home-page "https://pycodestyle.readthedocs.io/")
4350 (synopsis "Python style guide checker")
4351 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4352 Python code against some of the style conventions in
4353 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4354 (license license:expat)))
4355
4356 (define-public python2-pycodestyle
4357 (package-with-python2 python-pycodestyle))
4358
4359 (define-public python-multidict
4360 (package
4361 (name "python-multidict")
4362 (version "4.2.0")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (pypi-uri "multidict" version))
4367 (sha256
4368 (base32
4369 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4370 (build-system python-build-system)
4371 (native-inputs
4372 `(("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "https://github.com/aio-libs/multidict/")
4375 (synopsis "Multidict implementation")
4376 (description "Multidict is dict-like collection of key-value pairs
4377 where key might be occurred more than once in the container.")
4378 (license license:asl2.0)))
4379
4380 (define-public python-orderedmultidict
4381 (package
4382 (name "python-orderedmultidict")
4383 (version "0.7.11")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (pypi-uri "orderedmultidict" version))
4388 (sha256
4389 (base32
4390 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4391 (build-system python-build-system)
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (add-after 'unpack 'fix-tests
4396 (lambda _
4397 ;; The package uses nosetest for running the tests.
4398 ;; Adding this initfile allows to run the test suite
4399 ;; without requiring nosetest.
4400 (with-output-to-file "tests/__init__.py" newline)
4401 #t)))))
4402 (propagated-inputs
4403 `(("python-six" ,python-six)))
4404 (native-inputs
4405 `(("python-pycodestyle" ,python-pycodestyle)))
4406 (home-page "https://github.com/gruns/orderedmultidict")
4407 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4408 (description "This package contains a library for ordered multivalue
4409 dictionaries. A multivalue dictionary is a dictionary that can store
4410 multiple values for the same key. An ordered multivalue dictionary is a
4411 multivalue dictionary that retains the order of insertions and deletions.")
4412 (license license:unlicense)))
4413
4414 (define-public python2-orderedmultidict
4415 (package-with-python2 python-orderedmultidict))
4416
4417 (define-public python-autopep8
4418 (package
4419 (name "python-autopep8")
4420 (version "1.3.5")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "autopep8" version))
4425 (sha256
4426 (base32
4427 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4428 (build-system python-build-system)
4429 (propagated-inputs
4430 `(("python-pycodestyle" ,python-pycodestyle)))
4431 (home-page "https://github.com/hhatto/autopep8")
4432 (synopsis "Format Python code according to the PEP 8 style guide")
4433 (description
4434 "@code{autopep8} automatically formats Python code to conform to
4435 the PEP 8 style guide. It uses the pycodestyle utility to determine
4436 what parts of the code needs to be formatted. @code{autopep8} is
4437 capable of fixing most of the formatting issues that can be reported
4438 by pycodestyle.")
4439 (license (license:non-copyleft
4440 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4441
4442 (define-public python2-autopep8
4443 (package-with-python2 python-autopep8))
4444
4445 (define-public python-distutils-extra
4446 (package
4447 (name "python-distutils-extra")
4448 (version "2.38")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4453 version "/+download/python-distutils-extra-"
4454 version ".tar.gz"))
4455 (sha256
4456 (base32
4457 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4458 (build-system python-build-system)
4459 (home-page "https://launchpad.net/python-distutils-extra/")
4460 (synopsis "Enhancements to Python's distutils")
4461 (description
4462 "The python-distutils-extra module enables you to easily integrate
4463 gettext support, themed icons, and scrollkeeper-based documentation into
4464 Python's distutils.")
4465 (license license:gpl2)))
4466
4467 (define-public python2-distutils-extra
4468 (package-with-python2 python-distutils-extra))
4469
4470 (define-public python2-elib.intl
4471 (package
4472 (name "python2-elib.intl")
4473 (version "0.0.3")
4474 (source
4475 (origin
4476 ;; This project doesn't tag releases or publish tarballs, so we take
4477 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4478 (method git-fetch)
4479 (uri (git-reference
4480 (url "https://github.com/dieterv/elib.intl.git")
4481 (commit "d09997cfef")))
4482 (file-name (string-append name "-" version "-checkout"))
4483 (sha256
4484 (base32
4485 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4486 (build-system python-build-system)
4487 (arguments
4488 ;; incompatible with Python 3 (exception syntax)
4489 `(#:python ,python-2
4490 #:tests? #f))
4491 (home-page "https://github.com/dieterv/elib.intl")
4492 (synopsis "Enhanced internationalization for Python")
4493 (description
4494 "The elib.intl module provides enhanced internationalization (I18N)
4495 services for your Python modules and applications.")
4496 (license license:lgpl3+)))
4497
4498 (define-public python-olefile
4499 (package
4500 (name "python-olefile")
4501 (version "0.46")
4502 (source
4503 (origin
4504 (method url-fetch)
4505 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4506 "download/v" version "/olefile-" version ".tar.gz"))
4507 (file-name (string-append name "-" version ".tar.gz"))
4508 (sha256
4509 (base32
4510 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4511 (build-system python-build-system)
4512 (home-page "https://www.decalage.info/python/olefileio")
4513 (synopsis "Read and write Microsoft OLE2 files.")
4514 (description
4515 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4516 Storage or Compound Document, Microsoft Office). It is an improved version of
4517 the OleFileIO module from PIL, the Python Image Library.")
4518 (license license:bsd-3)))
4519
4520 (define-public python2-olefile
4521 (package-with-python2 python-olefile))
4522
4523 (define-public python-pillow
4524 (package
4525 (name "python-pillow")
4526 (version "6.1.0")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "Pillow" version))
4531 (sha256
4532 (base32
4533 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4534 (build-system python-build-system)
4535 (native-inputs
4536 `(("python-pytest" ,python-pytest)))
4537 (inputs
4538 `(("freetype" ,freetype)
4539 ("lcms" ,lcms)
4540 ("zlib" ,zlib)
4541 ("libjpeg" ,libjpeg)
4542 ("openjpeg" ,openjpeg)
4543 ("libtiff" ,libtiff)
4544 ("libwebp" ,libwebp)))
4545 (propagated-inputs
4546 `(("python-olefile" ,python-olefile)))
4547 (arguments
4548 `(#:phases
4549 (modify-phases %standard-phases
4550 (add-after 'unpack 'patch-ldconfig
4551 (lambda _
4552 (substitute* "setup.py"
4553 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4554 (delete 'check) ; We must run checks after python-pillow is installed.
4555 (add-after 'install 'check-installed
4556 (lambda* (#:key outputs inputs #:allow-other-keys)
4557 (begin
4558 (setenv "HOME" (getcwd))
4559 ;; Make installed package available for running the tests.
4560 (add-installed-pythonpath inputs outputs)
4561 (invoke "python" "selftest.py" "--installed")
4562 (invoke "python" "-m" "pytest" "-vv")))))))
4563 (home-page "https://python-pillow.org")
4564 (synopsis "Fork of the Python Imaging Library")
4565 (description
4566 "The Python Imaging Library adds image processing capabilities to your
4567 Python interpreter. This library provides extensive file format support, an
4568 efficient internal representation, and fairly powerful image processing
4569 capabilities. The core image library is designed for fast access to data
4570 stored in a few basic pixel formats. It should provide a solid foundation for
4571 a general image processing tool.")
4572 (license (license:x11-style
4573 "http://www.pythonware.com/products/pil/license.htm"
4574 "The PIL Software License"))))
4575
4576 (define-public python2-pillow
4577 (package-with-python2 python-pillow))
4578
4579 (define-public python-pycparser
4580 (package
4581 (name "python-pycparser")
4582 (version "2.19")
4583 (source
4584 (origin
4585 (method url-fetch)
4586 (uri (pypi-uri "pycparser" version))
4587 (sha256
4588 (base32
4589 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4590 (outputs '("out" "doc"))
4591 (build-system python-build-system)
4592 (native-inputs
4593 `(("pkg-config" ,pkg-config)))
4594 (arguments
4595 `(#:phases
4596 (modify-phases %standard-phases
4597 (replace 'check
4598 (lambda _
4599 (with-directory-excursion "tests"
4600 (invoke "python" "all_tests.py"))
4601 #t))
4602 (add-after 'install 'install-doc
4603 (lambda* (#:key outputs #:allow-other-keys)
4604 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4605 (doc (string-append data "/doc/" ,name "-" ,version))
4606 (examples (string-append doc "/examples")))
4607 (mkdir-p examples)
4608 (for-each (lambda (file)
4609 (copy-file (string-append "." file)
4610 (string-append doc file)))
4611 '("/README.rst" "/CHANGES" "/LICENSE"))
4612 (copy-recursively "examples" examples)
4613 #t))))))
4614 (home-page "https://github.com/eliben/pycparser")
4615 (synopsis "C parser in Python")
4616 (description
4617 "Pycparser is a complete parser of the C language, written in pure Python
4618 using the PLY parsing library. It parses C code into an AST and can serve as
4619 a front-end for C compilers or analysis tools.")
4620 (license license:bsd-3)))
4621
4622 (define-public python2-pycparser
4623 (package-with-python2 python-pycparser))
4624
4625 (define-public python-pywavelets
4626 (package
4627 (name "python-pywavelets")
4628 (version "1.0.1")
4629 (home-page "https://github.com/PyWavelets/pywt")
4630 (source (origin
4631 (method url-fetch)
4632 (uri (pypi-uri "PyWavelets" version))
4633 (sha256
4634 (base32
4635 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4636 (build-system python-build-system)
4637 (arguments
4638 '(#:modules ((ice-9 ftw)
4639 (srfi srfi-1)
4640 (srfi srfi-26)
4641 (guix build utils)
4642 (guix build python-build-system))
4643 #:phases (modify-phases %standard-phases
4644 (replace 'check
4645 (lambda _
4646 (let ((cwd (getcwd))
4647 (libdir (find (cut string-prefix? "lib." <>)
4648 (scandir "build"))))
4649 (with-directory-excursion (string-append cwd "/build/" libdir)
4650 (invoke "nosetests" "-v" "."))))))))
4651 (native-inputs
4652 `(("python-matplotlib" ,python-matplotlib) ;for tests
4653 ("python-nose" ,python-nose)))
4654 (propagated-inputs
4655 `(("python-numpy" ,python-numpy)))
4656 (synopsis "Wavelet transforms in Python")
4657 (description
4658 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4659 mathematical basis functions that are localized in both time and frequency.
4660 Wavelet transforms are time-frequency transforms employing wavelets. They are
4661 similar to Fourier transforms, the difference being that Fourier transforms are
4662 localized only in frequency instead of in time and frequency.")
4663 (license license:expat)))
4664
4665 (define-public python2-pywavelets
4666 (package-with-python2 python-pywavelets))
4667
4668 (define-public python-xcffib
4669 (package
4670 (name "python-xcffib")
4671 (version "0.6.0")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "xcffib" version))
4676 (sha256
4677 (base32
4678 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4679 (build-system python-build-system)
4680 (inputs
4681 `(("libxcb" ,libxcb)))
4682 (propagated-inputs
4683 `(("python-cffi" ,python-cffi) ; used at run time
4684 ("python-six" ,python-six)))
4685 (arguments
4686 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4687 #:tests? #f
4688 #:phases
4689 (modify-phases %standard-phases
4690 (add-after 'unpack 'fix-libxcb-path
4691 (lambda* (#:key inputs #:allow-other-keys)
4692 (let ((libxcb (assoc-ref inputs "libxcb")))
4693 (substitute* '("xcffib/__init__.py")
4694 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4695 #t)))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key outputs #:allow-other-keys)
4698 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4699 "/doc/" ,name "-" ,version)))
4700 (mkdir-p doc)
4701 (copy-file "README.md"
4702 (string-append doc "/README.md"))
4703 #t))))))
4704 (home-page "https://github.com/tych0/xcffib")
4705 (synopsis "XCB Python bindings")
4706 (description
4707 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4708 support for Python 3 and PyPy. It is based on cffi.")
4709 (license license:expat)))
4710
4711 (define-public python2-xcffib
4712 (package-with-python2 python-xcffib))
4713
4714 (define-public python-cairocffi
4715 (package
4716 (name "python-cairocffi")
4717 (version "0.9.0")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "cairocffi" version))
4722 (sha256
4723 (base32
4724 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4725 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4726 (build-system python-build-system)
4727 (outputs '("out" "doc"))
4728 (inputs
4729 `(("glib" ,glib)
4730 ("gtk+" ,gtk+)
4731 ("gdk-pixbuf" ,gdk-pixbuf)
4732 ("cairo" ,cairo)
4733 ("pango" ,pango)))
4734 (native-inputs
4735 `(("pkg-config" ,pkg-config)
4736 ("python-pytest" ,python-pytest)
4737 ("python-pytest-cov" ,python-pytest-cov)
4738 ("python-pytest-runner" ,python-pytest-runner)
4739 ("python-sphinx" ,python-sphinx)
4740 ("python-docutils" ,python-docutils)))
4741 (propagated-inputs
4742 `(("python-xcffib" ,python-xcffib))) ; used at run time
4743 (arguments
4744 `(#:phases
4745 (modify-phases %standard-phases
4746 (add-after 'unpack 'patch-paths
4747 (lambda* (#:key inputs outputs #:allow-other-keys)
4748 (substitute* (find-files "." "\\.py$")
4749 (("dlopen\\(ffi, 'cairo'")
4750 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4751 "/lib/libcairo.so.2'"))
4752 (("dlopen\\(ffi, 'gdk-3'")
4753 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4754 "/lib/libgtk-3.so.0'"))
4755 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4756 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4757 "/lib/libgdk_pixbuf-2.0.so.0'"))
4758 (("dlopen\\(ffi, 'glib-2.0'")
4759 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4760 "/lib/libglib-2.0.so.0'"))
4761 (("dlopen\\(ffi, 'gobject-2.0'")
4762 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4763 "/lib/libgobject-2.0.so.0'"))
4764 (("dlopen\\(ffi, 'pangocairo-1.0'")
4765 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4766 "/lib/libpangocairo-1.0.so.0'"))
4767 (("dlopen\\(ffi, 'pango-1.0'")
4768 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4769 "/lib/libpango-1.0.so.0'")))
4770 #t))
4771 (add-after 'install 'install-doc
4772 (lambda* (#:key inputs outputs #:allow-other-keys)
4773 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4774 (doc (string-append data "/doc/" ,name "-" ,version))
4775 (html (string-append doc "/html")))
4776 (setenv "LD_LIBRARY_PATH"
4777 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4778 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4779 (setenv "LANG" "en_US.UTF-8")
4780 (mkdir-p html)
4781 (for-each (lambda (file)
4782 (copy-file (string-append "." file)
4783 (string-append doc file)))
4784 '("/README.rst" "/CHANGES" "/LICENSE"))
4785 (system* "python" "setup.py" "build_sphinx")
4786 (copy-recursively "docs/_build/html" html)
4787 #t))))))
4788 (home-page "https://github.com/Kozea/cairocffi")
4789 (synopsis "Python bindings and object-oriented API for Cairo")
4790 (description
4791 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4792 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4793 graphics library with support for multiple backends including image buffers,
4794 PNG, PostScript, PDF, and SVG file output.")
4795 (license license:bsd-3)))
4796
4797 (define-public python2-cairocffi
4798 (package-with-python2 python-cairocffi))
4799
4800 (define-public python-decorator
4801 (package
4802 (name "python-decorator")
4803 (version "4.3.0")
4804 (source
4805 (origin
4806 (method url-fetch)
4807 (uri (pypi-uri "decorator" version))
4808 (sha256
4809 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4810 (build-system python-build-system)
4811 (home-page "https://pypi.python.org/pypi/decorator/")
4812 (synopsis "Python module to simplify usage of decorators")
4813 (description
4814 "The aim of the decorator module is to simplify the usage of decorators
4815 for the average programmer, and to popularize decorators usage giving examples
4816 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4817 etc. The core of this module is a decorator factory.")
4818 (license license:expat)))
4819
4820 (define-public python2-decorator
4821 (package-with-python2 python-decorator))
4822
4823 (define-public python-drmaa
4824 (package
4825 (name "python-drmaa")
4826 (version "0.7.7")
4827 (source
4828 (origin
4829 (method url-fetch)
4830 (uri (pypi-uri "drmaa" version))
4831 (sha256
4832 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4833 (build-system python-build-system)
4834 ;; The test suite requires libdrmaa which is provided by the cluster
4835 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4836 ;; should be set to the path of the libdrmaa library.
4837 (arguments '(#:tests? #f))
4838 (native-inputs
4839 `(("python-nose" ,python-nose)))
4840 (home-page "https://pypi.python.org/pypi/drmaa")
4841 (synopsis "Python bindings for the DRMAA library")
4842 (description
4843 "A Python package for Distributed Resource Management (DRM) job
4844 submission and control. This package is an implementation of the DRMAA 1.0
4845 Python language binding specification.")
4846 (license license:bsd-3)))
4847
4848 (define-public python2-drmaa
4849 (package-with-python2 python-drmaa))
4850
4851 (define-public python-grako
4852 (package
4853 (name "python-grako")
4854 (version "3.99.9")
4855 (source
4856 (origin
4857 (method url-fetch)
4858 (uri
4859 (pypi-uri "grako" version ".zip"))
4860 (sha256
4861 (base32
4862 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4863 (build-system python-build-system)
4864 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4865 (native-inputs
4866 `(("unzip" ,unzip)
4867 ("python-pytest" ,python-pytest)
4868 ("python-pytest-runner" ,python-pytest-runner)))
4869 (home-page "https://bitbucket.org/neogeny/grako")
4870 (synopsis "EBNF parser generator")
4871 (description
4872 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4873 memoizing PEG/Packrat parser in Python.")
4874 (license license:bsd-3)))
4875
4876 (define-public python2-grako
4877 (package-with-python2 python-grako))
4878
4879 (define-public python-gridmap
4880 (package
4881 (name "python-gridmap")
4882 (version "0.13.0")
4883 (source
4884 (origin
4885 (method git-fetch)
4886 (uri (git-reference
4887 (url "https://github.com/pygridtools/gridmap.git")
4888 (commit (string-append "v" version))))
4889 (file-name (git-file-name name version))
4890 (sha256
4891 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4892 (build-system python-build-system)
4893 (arguments
4894 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4895 (propagated-inputs
4896 `(("python-psutil" ,python-psutil)
4897 ("python-drmaa" ,python-drmaa)
4898 ("python-pyzmq" ,python-pyzmq)))
4899 (home-page "https://github.com/pygridtools/gridmap")
4900 (synopsis "Create jobs on a cluster directly from Python")
4901 (description
4902 "Gridmap is a Python package to allow you to easily create jobs on the
4903 cluster directly from Python. You can directly map Python functions onto the
4904 cluster without needing to write any wrapper code yourself.")
4905 (license license:gpl3+)))
4906
4907 (define-public python2-gridmap
4908 (package-with-python2 python-gridmap))
4909
4910 (define-public python-honcho
4911 (package
4912 (name "python-honcho")
4913 (version "1.0.1")
4914 (source
4915 (origin
4916 (method git-fetch)
4917 (uri (git-reference
4918 (url "https://github.com/nickstenning/honcho.git")
4919 (commit (string-append "v" version))))
4920 (file-name (git-file-name name version))
4921 (sha256
4922 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4923 (build-system python-build-system)
4924 (native-inputs
4925 `(("python-pytest" ,python-pytest)
4926 ("python-mock" ,python-mock)
4927 ("python-tox" ,python-tox)
4928 ("which" ,which))) ;for tests
4929 (propagated-inputs
4930 `(("python-jinja2" ,python-jinja2)))
4931 (arguments
4932 `(#:phases
4933 (modify-phases %standard-phases
4934 (delete 'check)
4935 (add-after 'install 'check
4936 (lambda* (#:key outputs inputs #:allow-other-keys)
4937 ;; fix honcho path in testsuite
4938 (substitute* "tests/conftest.py"
4939 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4940 "/bin/honcho" "'")))
4941 ;; It's easier to run tests after install.
4942 ;; Make installed package available for running the tests
4943 (add-installed-pythonpath inputs outputs)
4944 (invoke "py.test" "-v"))))))
4945 (home-page "https://github.com/nickstenning/honcho")
4946 (synopsis "Manage Procfile-based applications")
4947 (description
4948 "A Procfile is a file which describes how to run an application
4949 consisting of several processes. honcho starts all listed processes.
4950 The output of all running processes is collected by honcho and
4951 displayed.")
4952 (license license:expat)))
4953
4954 (define-public python2-honcho
4955 (package-with-python2 python-honcho))
4956
4957 (define-public python-pexpect
4958 (package
4959 (name "python-pexpect")
4960 (version "4.6.0")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "pexpect" version))
4965 (sha256
4966 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4967 (build-system python-build-system)
4968 (arguments
4969 `(#:phases
4970 (modify-phases %standard-phases
4971 (add-before 'check 'prepare-tests
4972 (lambda _
4973 (substitute* (find-files "tests")
4974 (("/bin/ls") (which "ls"))
4975 (("/bin/echo") (which "echo"))
4976 (("/bin/which") (which "which"))
4977 ;; Many tests try to use the /bin directory which
4978 ;; is not present in the build environment.
4979 ;; Use one that's non-empty and unlikely to change.
4980 (("/bin'") "/dev'"))
4981 ;; XXX: Socket connection test gets "Connection reset by peer".
4982 ;; Why does it not work? Delete for now.
4983 (delete-file "tests/test_socket.py")
4984 #t))
4985 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4986 (native-inputs
4987 `(("python-nose" ,python-nose)
4988 ("python-pytest" ,python-pytest)
4989 ("man-db" ,man-db)
4990 ("which" ,which)
4991 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4992 (propagated-inputs
4993 `(("python-ptyprocess" ,python-ptyprocess)))
4994 (home-page "http://pexpect.readthedocs.org/")
4995 (synopsis "Controlling interactive console applications")
4996 (description
4997 "Pexpect is a pure Python module for spawning child applications;
4998 controlling them; and responding to expected patterns in their output.
4999 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5000 child application and control it as if a human were typing commands.")
5001 (license license:isc)))
5002
5003 (define-public python2-pexpect
5004 (package-with-python2 python-pexpect))
5005
5006 (define-public python-setuptools-scm
5007 (package
5008 (name "python-setuptools-scm")
5009 (version "3.2.0")
5010 (source (origin
5011 (method url-fetch)
5012 (uri (pypi-uri "setuptools_scm" version))
5013 (sha256
5014 (base32
5015 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5016 (build-system python-build-system)
5017 (home-page "https://github.com/pypa/setuptools_scm/")
5018 (synopsis "Manage Python package versions in SCM metadata")
5019 (description
5020 "Setuptools_scm handles managing your Python package versions in
5021 @dfn{software configuration management} (SCM) metadata instead of declaring
5022 them as the version argument or in a SCM managed file.")
5023 (license license:expat)))
5024
5025 (define-public python2-setuptools-scm
5026 (package-with-python2 python-setuptools-scm))
5027
5028 (define-public python-pathlib2
5029 (package
5030 (name "python-pathlib2")
5031 (version "2.3.3")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (pypi-uri "pathlib2" version))
5036 (sha256
5037 (base32
5038 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5039 (build-system python-build-system)
5040 (propagated-inputs
5041 `(("python-scandir" ,python-scandir)
5042 ("python-six" ,python-six)))
5043 (home-page "https://pypi.python.org/pypi/pathlib2/")
5044 (synopsis "Object-oriented file system paths")
5045 (description "The goal of pathlib2 is to provide a backport of the
5046 standard @code{pathlib} module which tracks the standard library module, so
5047 all the newest features of the standard @code{pathlib} can be used also on
5048 older Python versions.")
5049 (license license:expat)))
5050
5051 (define-public python-importlib-metadata
5052 (package
5053 (name "python-importlib-metadata")
5054 (version "0.18")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "importlib_metadata" version))
5059 (sha256
5060 (base32
5061 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
5062 (build-system python-build-system)
5063 (propagated-inputs
5064 `(("python-configparser" ,python-configparser)
5065 ("python-contextlib2" ,python-contextlib2)
5066 ("python-docutils" ,python-docutils)
5067 ("python-pathlib2" ,python-pathlib2)
5068 ("python-rst.linker" ,python-rst.linker)
5069 ("python-zipp" ,python-zipp)))
5070 (native-inputs
5071 `(("python-setuptools-scm" ,python-setuptools-scm)
5072 ("python-sphinx" ,python-sphinx)))
5073 (home-page "https://importlib-metadata.readthedocs.io/")
5074 (synopsis "Read metadata from Python packages")
5075 (description
5076 "@code{importlib_metadata} is a library which provides an API for
5077 accessing an installed Python package's metadata, such as its entry points or
5078 its top-level name. This functionality intends to replace most uses of
5079 @code{pkg_resources} entry point API and metadata API. Along with
5080 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5081 need to use the older and less efficient @code{pkg_resources} package.")
5082 (license license:asl2.0)))
5083
5084 (define-public python-jaraco-packaging
5085 (package
5086 (name "python-jaraco-packaging")
5087 (version "6.1")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (pypi-uri "jaraco.packaging" version))
5092 (sha256
5093 (base32
5094 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5095 (build-system python-build-system)
5096 (propagated-inputs
5097 `(("python-pytest" ,python-pytest)
5098 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5099 ("python-pytest-flake8" ,python-pytest-flake8)
5100 ("python-rst.linker" ,python-rst.linker)
5101 ("python-setuptools" ,python-setuptools)
5102 ("python-setuptools-scm" ,python-setuptools-scm)
5103 ("python-six" ,python-six)
5104 ("python-sphinx" ,python-sphinx)))
5105 (home-page "https://github.com/jaraco/jaraco.packaging")
5106 (synopsis "Tools to supplement packaging Python releases")
5107 (description
5108 "This package provides various tools to supplement packaging Python
5109 releases.")
5110 (license license:expat)))
5111
5112 (define-public python-pathpy
5113 (package
5114 (name "python-pathpy")
5115 (version "11.5.0")
5116 (source
5117 (origin
5118 (method url-fetch)
5119 (uri (pypi-uri "path.py" version))
5120 (sha256
5121 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5122 (outputs '("out" "doc"))
5123 (build-system python-build-system)
5124 (propagated-inputs
5125 `(("python-appdirs" ,python-appdirs)
5126 ("python-importlib-metadata" ,python-importlib-metadata)))
5127 (native-inputs
5128 `(("python-setuptools-scm" ,python-setuptools-scm)
5129 ("python-sphinx" ,python-sphinx)
5130 ("python-rst.linker" ,python-rst.linker)
5131 ("python-pytest" ,python-pytest)
5132 ("python-pytest-runner" ,python-pytest-runner)
5133 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5134 (arguments
5135 `(#:phases
5136 (modify-phases %standard-phases
5137 (add-after 'build 'build-doc
5138 (lambda _
5139 (setenv "LANG" "en_US.UTF-8")
5140 (invoke "python" "setup.py" "build_sphinx")))
5141 (add-after 'install 'install-doc
5142 (lambda* (#:key outputs #:allow-other-keys)
5143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5144 (doc (string-append data "/doc/" ,name "-" ,version))
5145 (html (string-append doc "/html")))
5146 (mkdir-p html)
5147 (for-each (lambda (file)
5148 (copy-file file (string-append doc "/" file)))
5149 '("README.rst" "CHANGES.rst"))
5150 (copy-recursively "build/sphinx/html" html)
5151 #t)))
5152 (replace 'check
5153 (lambda _
5154 ;; The import time test aborts if an import takes longer than
5155 ;; 100ms. It may very well take a little longer than that.
5156 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5157 (home-page "https://github.com/jaraco/path.py")
5158 (synopsis "Python module wrapper for built-in os.path")
5159 (description
5160 "@code{path.py} implements path objects as first-class entities, allowing
5161 common operations on files to be invoked on those path objects directly.")
5162 (license license:expat)))
5163
5164 (define-public python2-pathpy
5165 (package-with-python2 python-pathpy))
5166
5167 (define-public python-simplegeneric
5168 (package
5169 (name "python-simplegeneric")
5170 (version "0.8.1")
5171 (source
5172 (origin
5173 (method url-fetch)
5174 (uri (pypi-uri "simplegeneric" version ".zip"))
5175 (sha256
5176 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5177 (build-system python-build-system)
5178 (native-inputs
5179 `(("unzip" ,unzip)))
5180 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5181 (synopsis "Python module for simple generic functions")
5182 (description
5183 "The simplegeneric module lets you define simple single-dispatch generic
5184 functions, akin to Python’s built-in generic functions like @code{len()},
5185 @code{iter()} and so on. However, instead of using specially-named methods,
5186 these generic functions use simple lookup tables, akin to those used by
5187 e.g. @code{pickle.dump()} and other generic functions found in the Python
5188 standard library.")
5189 (license license:zpl2.1)))
5190
5191 (define-public python2-simplegeneric
5192 (package-with-python2 python-simplegeneric))
5193
5194 (define-public python-ipython-genutils
5195 ;; TODO: This package is retired, check if can be removed, see description.
5196 (package
5197 (name "python-ipython-genutils")
5198 (version "0.1.0")
5199 (source
5200 (origin
5201 (method url-fetch)
5202 (uri (pypi-uri "ipython_genutils" version))
5203 (sha256
5204 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5205 (build-system python-build-system)
5206 (arguments `(#:tests? #f)) ; no tests
5207 (home-page "https://ipython.org")
5208 (synopsis "Vestigial utilities from IPython")
5209 (description
5210 "This package provides retired utilities from IPython. No packages
5211 outside IPython/Jupyter should depend on it.
5212
5213 This package shouldn't exist. It contains some common utilities shared by
5214 Jupyter and IPython projects during The Big Split. As soon as possible, those
5215 packages will remove their dependency on this, and this package will go
5216 away.")
5217 (license license:bsd-3)))
5218
5219 (define-public python2-ipython-genutils
5220 (package-with-python2 python-ipython-genutils))
5221
5222 (define-public python-traitlets
5223 (package
5224 (name "python-traitlets")
5225 (version "4.3.2")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "traitlets" version))
5230 (sha256
5231 (base32
5232 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5233 (build-system python-build-system)
5234 (arguments
5235 `(#:phases
5236 (modify-phases %standard-phases
5237 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5238 (propagated-inputs
5239 `(("python-ipython-genutils" ,python-ipython-genutils)
5240 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5241 (native-inputs
5242 `(("python-pytest" ,python-pytest)))
5243 (properties `((python2-variant . ,(delay python2-traitlets))))
5244 (home-page "https://ipython.org")
5245 (synopsis "Configuration system for Python applications")
5246 (description
5247 "Traitlets is a framework that lets Python classes have attributes with
5248 type checking, dynamically calculated default values, and ‘on change’
5249 callbacks. The package also includes a mechanism to use traitlets for
5250 configuration, loading values from files or from command line arguments. This
5251 is a distinct layer on top of traitlets, so you can use traitlets in your code
5252 without using the configuration machinery.")
5253 (license license:bsd-3)))
5254
5255 (define-public python2-traitlets
5256 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5257 (package
5258 (inherit traitlets)
5259 (propagated-inputs
5260 `(("python2-enum34" ,python2-enum34)
5261 ,@(package-propagated-inputs traitlets))))))
5262
5263 (define-public python-jupyter-core
5264 (package
5265 (name "python-jupyter-core")
5266 (version "4.4.0")
5267 (source
5268 (origin
5269 (method url-fetch)
5270 (uri (string-append (pypi-uri "jupyter_core" version)))
5271 (sha256
5272 (base32
5273 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5274 (build-system python-build-system)
5275 ;; FIXME: not sure how to run the tests
5276 (arguments `(#:tests? #f))
5277 (propagated-inputs
5278 `(("python-traitlets" ,python-traitlets)))
5279 (home-page "http://jupyter.org/")
5280 (synopsis "Jupyter base package")
5281 (description
5282 "Jupyter core is the base package on which Jupyter projects rely.")
5283 (license license:bsd-3)))
5284
5285 (define-public python2-jupyter-core
5286 (package-with-python2 python-jupyter-core))
5287
5288 (define-public python-jupyter-client
5289 (package
5290 (name "python-jupyter-client")
5291 (version "5.2.4")
5292 (source
5293 (origin
5294 (method url-fetch)
5295 (uri (pypi-uri "jupyter_client" version))
5296 (sha256
5297 (base32
5298 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5299 (build-system python-build-system)
5300 ;; Tests fail because of missing native python kernel which I assume is
5301 ;; provided by the ipython package, which we cannot use because it would
5302 ;; cause a dependency cycle.
5303 (arguments
5304 `(#:tests? #f
5305
5306 #:phases (modify-phases %standard-phases
5307 (add-after 'unpack 'set-tool-file-names
5308 (lambda* (#:key inputs #:allow-other-keys)
5309 (let ((iproute (assoc-ref inputs "iproute")))
5310 (substitute* "jupyter_client/localinterfaces.py"
5311 (("'ip'")
5312 (string-append "'" iproute "/sbin/ip'")))
5313 #t))))))
5314 (inputs
5315 `(("iproute" ,iproute)))
5316 (propagated-inputs
5317 `(("python-pyzmq" ,python-pyzmq)
5318 ("python-traitlets" ,python-traitlets)
5319 ("python-jupyter-core" ,python-jupyter-core)))
5320 (home-page "http://jupyter.org/")
5321 (synopsis "Jupyter protocol implementation and client libraries")
5322 (description
5323 "The @code{jupyter_client} package contains the reference implementation
5324 of the Jupyter protocol. It also provides client and kernel management APIs
5325 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5326 installing @code{kernelspec}s for use with Jupyter frontends.")
5327 (license license:bsd-3)))
5328
5329 (define-public python2-jupyter-client
5330 (package-with-python2 python-jupyter-client))
5331
5332 (define-public python-ipykernel
5333 (package
5334 (name "python-ipykernel")
5335 (version "5.1.1")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "ipykernel" version))
5340 (sha256
5341 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5342 (build-system python-build-system)
5343 (arguments
5344 `(#:phases
5345 (modify-phases %standard-phases
5346 (replace 'check
5347 (lambda _
5348 (setenv "HOME" "/tmp")
5349 (invoke "pytest" "-v")
5350 #t))
5351 (add-after 'install 'set-python-file-name
5352 (lambda* (#:key outputs #:allow-other-keys)
5353 ;; Record the absolute file name of the 'python' executable in
5354 ;; 'kernel.json'.
5355 (let ((out (assoc-ref outputs "out")))
5356 (substitute* (string-append out "/share/jupyter"
5357 "/kernels/python3/kernel.json")
5358 (("\"python\"")
5359 (string-append "\"" (which "python") "\"")))
5360 #t))))))
5361 (propagated-inputs
5362 `(("python-ipython" ,python-ipython)
5363 ;; imported at runtime during connect
5364 ("python-jupyter-client" ,python-jupyter-client)))
5365 (native-inputs
5366 `(("python-pytest" ,python-pytest)
5367 ("python-nose" ,python-nose)))
5368 (home-page "https://ipython.org")
5369 (synopsis "IPython Kernel for Jupyter")
5370 (description
5371 "This package provides the IPython kernel for Jupyter.")
5372 (license license:bsd-3)))
5373
5374 ;; Version 5.1.1 and above no longer support Python 2.
5375 (define-public python2-ipykernel
5376 (package
5377 (name "python2-ipykernel")
5378 (version "5.1.0")
5379 (source
5380 (origin
5381 (method url-fetch)
5382 (uri (pypi-uri "ipykernel" version))
5383 (sha256
5384 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5385 (build-system python-build-system)
5386 (arguments
5387 `(#:python ,python-2
5388 #:phases
5389 (modify-phases %standard-phases
5390 (replace 'check
5391 (lambda _
5392 (setenv "HOME" "/tmp")
5393 (invoke "pytest" "-v")
5394 #t)))))
5395 (propagated-inputs
5396 `(("python2-ipython" ,python2-ipython)
5397 ;; imported at runtime during connect
5398 ("python2-jupyter-client" ,python2-jupyter-client)))
5399 (native-inputs
5400 `(("python2-pytest" ,python2-pytest)
5401 ("python2-nose" ,python2-nose)))
5402 (home-page "https://ipython.org")
5403 (synopsis "IPython Kernel for Jupyter")
5404 (description
5405 "This package provides the IPython kernel for Jupyter.")
5406 (license license:bsd-3)))
5407
5408 (define-public python-pari-jupyter
5409 (package
5410 (name "python-pari-jupyter")
5411 (version "1.3.2")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "pari_jupyter" version))
5416 (sha256
5417 (base32
5418 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5419 (build-system python-build-system)
5420 (propagated-inputs
5421 `(("python-ipykernel" ,python-ipykernel)))
5422 (inputs
5423 `(("pari-gp" ,pari-gp)
5424 ("readline" ,readline)))
5425 (arguments
5426 `(#:tests? #f)) ; no test suite
5427 (home-page
5428 "https://github.com/jdemeyer/pari_jupyter")
5429 (synopsis "A Jupyter kernel for PARI/GP")
5430 (description "The package provides a PARI/GP kernel for Jupyter.")
5431 (license license:gpl3+)))
5432
5433 (define-public python-backcall
5434 (package
5435 (name "python-backcall")
5436 (version "0.1.0")
5437 (source
5438 (origin
5439 (method url-fetch)
5440 (uri (pypi-uri "backcall" version))
5441 (sha256
5442 (base32
5443 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5444 (build-system python-build-system)
5445 (home-page "https://github.com/takluyver/backcall/")
5446 (synopsis "Specifications for callback functions passed in to an API")
5447 (description
5448 "If your code lets other people supply callback functions, it's important
5449 to specify the function signature you expect, and check that functions support
5450 that. Adding extra parameters later would break other peoples code unless
5451 you're careful. The @code{backcall} package provides a way of specifying the
5452 callback signature using a prototype function.")
5453 (license license:bsd-3)))
5454
5455 ;; This is the latest release of the LTS version of ipython with support for
5456 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5457 ;; dropped support for Python 2.7.
5458 (define-public python2-ipython
5459 (package
5460 (name "python2-ipython")
5461 (version "5.8.0")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "ipython" version ".tar.gz"))
5466 (sha256
5467 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5468 (build-system python-build-system)
5469 (propagated-inputs
5470 `(("python2-backports-shutil-get-terminal-size"
5471 ,python2-backports-shutil-get-terminal-size)
5472 ("python2-pathlib2" ,python2-pathlib2)
5473 ("python2-pyzmq" ,python2-pyzmq)
5474 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5475 ("python2-terminado" ,python2-terminado)
5476 ("python2-matplotlib" ,python2-matplotlib)
5477 ("python2-numpy" ,python2-numpy)
5478 ("python2-numpydoc" ,python2-numpydoc)
5479 ("python2-jinja2" ,python2-jinja2)
5480 ("python2-mistune" ,python2-mistune)
5481 ("python2-pexpect" ,python2-pexpect)
5482 ("python2-pickleshare" ,python2-pickleshare)
5483 ("python2-simplegeneric" ,python2-simplegeneric)
5484 ("python2-jsonschema" ,python2-jsonschema)
5485 ("python2-traitlets" ,python2-traitlets)
5486 ("python2-nbformat" ,python2-nbformat)
5487 ("python2-pygments" ,python2-pygments)))
5488 (inputs
5489 `(("readline" ,readline)
5490 ("which" ,which)))
5491 (native-inputs
5492 `(("graphviz" ,graphviz)
5493 ("pkg-config" ,pkg-config)
5494 ("python2-requests" ,python2-requests) ;; for tests
5495 ("python2-testpath" ,python2-testpath)
5496 ("python2-mock" ,python2-mock)
5497 ("python2-nose" ,python2-nose)))
5498 (arguments
5499 `(#:python ,python-2
5500 #:phases
5501 (modify-phases %standard-phases
5502 (add-before 'check 'delete-broken-tests
5503 (lambda* (#:key inputs #:allow-other-keys)
5504 ;; These tests throw errors for unknown reasons.
5505 (delete-file "IPython/core/tests/test_profile.py")
5506 (delete-file "IPython/core/tests/test_interactiveshell.py")
5507 (delete-file "IPython/core/tests/test_magic.py")
5508 #t)))))
5509 (home-page "https://ipython.org")
5510 (synopsis "IPython is a tool for interactive computing in Python")
5511 (description
5512 "IPython provides a rich architecture for interactive computing with:
5513 Powerful interactive shells, a browser-based notebook, support for interactive
5514 data visualization, embeddable interpreters and tools for parallel
5515 computing.")
5516 (license license:bsd-3)))
5517
5518 (define-public python-ipython
5519 (package
5520 (name "python-ipython")
5521 (version "7.5.0")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 (uri (pypi-uri "ipython" version ".tar.gz"))
5526 (sha256
5527 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5528 (build-system python-build-system)
5529 (propagated-inputs
5530 `(("python-backcall" ,python-backcall)
5531 ("python-pyzmq" ,python-pyzmq)
5532 ("python-prompt-toolkit" ,python-prompt-toolkit)
5533 ("python-terminado" ,python-terminado)
5534 ("python-matplotlib" ,python-matplotlib)
5535 ("python-numpy" ,python-numpy)
5536 ("python-numpydoc" ,python-numpydoc)
5537 ("python-jedi" ,python-jedi)
5538 ("python-jinja2" ,python-jinja2)
5539 ("python-mistune" ,python-mistune)
5540 ("python-pexpect" ,python-pexpect)
5541 ("python-pickleshare" ,python-pickleshare)
5542 ("python-simplegeneric" ,python-simplegeneric)
5543 ("python-jsonschema" ,python-jsonschema)
5544 ("python-traitlets" ,python-traitlets)
5545 ("python-nbformat" ,python-nbformat)
5546 ("python-pygments" ,python-pygments)))
5547 (inputs
5548 `(("readline" ,readline)
5549 ("which" ,which)))
5550 (native-inputs
5551 `(("graphviz" ,graphviz)
5552 ("pkg-config" ,pkg-config)
5553 ("python-requests" ,python-requests) ;; for tests
5554 ("python-testpath" ,python-testpath)
5555 ("python-nose" ,python-nose)))
5556 (arguments
5557 `(#:phases
5558 (modify-phases %standard-phases
5559 (add-after 'unpack 'make-docs-reproducible
5560 (lambda _
5561 (substitute* "IPython/sphinxext/ipython_directive.py"
5562 ((".*import datetime") "")
5563 ((".*datetime.datetime.now\\(\\)") "")
5564 (("%timeit") "# %timeit"))
5565 #t))
5566 ;; Tests can only be run after the library has been installed and not
5567 ;; within the source directory.
5568 (delete 'check)
5569 (add-after 'install 'check
5570 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5571 (if tests?
5572 (begin
5573 ;; Make installed package available for running the tests
5574 (add-installed-pythonpath inputs outputs)
5575 (setenv "HOME" "/tmp/") ;; required by a test
5576 ;; We only test the core because one of the other tests
5577 ;; tries to import ipykernel.
5578 (invoke "python" "IPython/testing/iptest.py"
5579 "-v" "IPython/core/tests"))
5580 #t)))
5581 (add-before 'check 'fix-tests
5582 (lambda* (#:key inputs #:allow-other-keys)
5583 (substitute* "./IPython/utils/_process_posix.py"
5584 (("/usr/bin/env', 'which") (which "which")))
5585 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5586 (("#!/usr/bin/env python")
5587 (string-append "#!" (which "python"))))
5588 ;; This test introduces a circular dependency on ipykernel
5589 ;; (which depends on ipython).
5590 (delete-file "IPython/core/tests/test_display.py")
5591 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5592 (delete-file "IPython/core/tests/test_interactiveshell.py")
5593 #t)))))
5594 (home-page "https://ipython.org")
5595 (synopsis "IPython is a tool for interactive computing in Python")
5596 (description
5597 "IPython provides a rich architecture for interactive computing with:
5598 Powerful interactive shells, a browser-based notebook, support for interactive
5599 data visualization, embeddable interpreters and tools for parallel
5600 computing.")
5601 (license license:bsd-3)))
5602
5603 (define-public python-ipython-documentation
5604 (package
5605 (inherit python-ipython)
5606 (name "python-ipython-documentation")
5607 (version (package-version python-ipython))
5608 (arguments
5609 `(#:phases
5610 (modify-phases %standard-phases
5611 (delete 'build)
5612 (delete 'check)
5613 (replace 'install
5614 (lambda* (#:key outputs #:allow-other-keys)
5615 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5616 (doc (string-append data "/doc/" ,name "-" ,version))
5617 (html (string-append doc "/html"))
5618 (man1 (string-append data "/man/man1"))
5619 (info (string-append data "/info"))
5620 (examples (string-append doc "/examples"))
5621 (python-arg (string-append "PYTHON=" (which "python"))))
5622 (setenv "LANG" "en_US.utf8")
5623 (with-directory-excursion "docs"
5624 ;; FIXME: pdf fails to build
5625 ;;(system* "make" "pdf" "PAPER=a4")
5626 (system* "make" python-arg "html")
5627 ;; FIXME: the generated texi file contains ^@^@, which trips
5628 ;; up the parser.
5629 ;; (system* "make" python-arg "info")
5630 )
5631 (copy-recursively "docs/man" man1)
5632 (copy-recursively "examples" examples)
5633 (copy-recursively "docs/build/html" html)
5634 ;; (copy-file "docs/build/latex/ipython.pdf"
5635 ;; (string-append doc "/ipython.pdf"))
5636 (mkdir-p info)
5637 ;; (copy-file "docs/build/texinfo/ipython.info"
5638 ;; (string-append info "/ipython.info"))
5639 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5640 #t)))))
5641 (inputs
5642 `(("python-ipython" ,python-ipython)
5643 ("python-ipykernel" ,python-ipykernel)))
5644 (native-inputs
5645 `(("python-sphinx" ,python-sphinx)
5646 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5647 ;; FIXME: It's possible that a smaller union would work just as well.
5648 ("texlive" ,(texlive-union (list texlive-amsfonts
5649 texlive-fonts-ec
5650 texlive-generic-ifxetex
5651 texlive-generic-pdftex
5652 texlive-latex-capt-of
5653 texlive-latex-cmap
5654 texlive-latex-environ
5655 texlive-latex-eqparbox
5656 texlive-latex-etoolbox
5657 texlive-latex-expdlist
5658 texlive-latex-fancyhdr
5659 texlive-latex-fancyvrb
5660 texlive-latex-fncychap
5661 texlive-latex-float
5662 texlive-latex-framed
5663 texlive-latex-geometry
5664 texlive-latex-graphics
5665 texlive-latex-hyperref
5666 texlive-latex-mdwtools
5667 texlive-latex-multirow
5668 texlive-latex-needspace
5669 texlive-latex-oberdiek
5670 texlive-latex-parskip
5671 texlive-latex-preview
5672 texlive-latex-tabulary
5673 texlive-latex-threeparttable
5674 texlive-latex-titlesec
5675 texlive-latex-trimspaces
5676 texlive-latex-ucs
5677 texlive-latex-upquote
5678 texlive-latex-url
5679 texlive-latex-varwidth
5680 texlive-latex-wrapfig)))
5681 ("texinfo" ,texinfo)))))
5682
5683 (define-public python-urwid
5684 (package
5685 (name "python-urwid")
5686 (version "2.0.1")
5687 (source
5688 (origin
5689 (method url-fetch)
5690 (uri (pypi-uri "urwid" version))
5691 (sha256
5692 (base32
5693 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5694 (build-system python-build-system)
5695 (home-page "http://urwid.org")
5696 (synopsis "Console user interface library for Python")
5697 (description
5698 "Urwid is a curses-based UI/widget library for Python. It includes many
5699 features useful for text console applications.")
5700 (license license:lgpl2.1+)))
5701
5702 (define-public python2-urwid
5703 (package-with-python2 python-urwid))
5704
5705 (define-public python-urwidtrees
5706 (package
5707 (name "python-urwidtrees")
5708 (version "1.0.2")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 ;; package author intends on distributing via github rather than pypi:
5713 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5714 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5715 version ".tar.gz"))
5716 (file-name (string-append name "-" version ".tar.gz"))
5717 (sha256
5718 (base32
5719 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5720 (build-system python-build-system)
5721 (arguments
5722 '(#:tests? #f)) ; no tests
5723 (propagated-inputs `(("python-urwid" ,python-urwid)))
5724 (home-page "https://github.com/pazz/urwidtrees")
5725 (synopsis "Tree widgets for urwid")
5726 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5727 toolkit. Use it to build trees of widgets.")
5728 (license license:gpl3+)))
5729
5730 (define-public python2-urwidtrees
5731 (package-with-python2 python-urwidtrees))
5732
5733 (define-public python-ua-parser
5734 (package
5735 (name "python-ua-parser")
5736 (version "0.8.0")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "ua-parser" version))
5741 (sha256
5742 (base32
5743 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5744 (build-system python-build-system)
5745 (arguments
5746 `(#:tests? #f)) ;no test suite in release
5747 (native-inputs
5748 `(("python-pyyaml" ,python-pyyaml)))
5749 (home-page "https://github.com/ua-parser/uap-python")
5750 (synopsis "User agent parser")
5751 (description
5752 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5753 (license license:asl2.0)))
5754
5755 (define-public python2-ua-parser
5756 (package-with-python2 python-ua-parser))
5757
5758 (define-public python-user-agents
5759 (package
5760 (name "python-user-agents")
5761 (version "1.1.0")
5762 (source
5763 (origin
5764 (method url-fetch)
5765 (uri (pypi-uri "user-agents" version))
5766 (sha256
5767 (base32
5768 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5769 (build-system python-build-system)
5770 (arguments
5771 `(#:tests? #f)) ;missing devices.json test file in release
5772 (propagated-inputs
5773 `(("python-ua-parser" ,python-ua-parser)))
5774 (home-page "https://github.com/selwin/python-user-agents")
5775 (synopsis "User Agent strings parsing library")
5776 (description
5777 "A library to identify devices (phones, tablets) and their capabilities by
5778 parsing (browser/HTTP) user agent strings.")
5779 (license license:expat)))
5780
5781 (define-public python2-user-agents
5782 (package-with-python2 python-user-agents))
5783
5784 (define-public python-dbus
5785 (package
5786 (name "python-dbus")
5787 (version "1.2.8")
5788 (source
5789 (origin
5790 (method url-fetch)
5791 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5792 "dbus-python-" version ".tar.gz"))
5793 (sha256
5794 (base32
5795 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5796 (build-system gnu-build-system)
5797 (arguments
5798 '(#:phases
5799 (modify-phases %standard-phases
5800 (add-before
5801 'check 'pre-check
5802 (lambda _
5803 ;; XXX: For the missing '/etc/machine-id'.
5804 (substitute* "test/run-test.sh"
5805 (("DBUS_FATAL_WARNINGS=1")
5806 "DBUS_FATAL_WARNINGS=0"))
5807 #t)))))
5808 (native-inputs
5809 `(("pkg-config" ,pkg-config)))
5810 (inputs
5811 `(("python" ,python-wrapper)
5812 ("dbus-glib" ,dbus-glib)))
5813 (synopsis "Python bindings for D-bus")
5814 (description "python-dbus provides bindings for libdbus, the reference
5815 implementation of D-Bus.")
5816 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5817 (license license:expat)))
5818
5819 (define-public python2-dbus
5820 (package (inherit python-dbus)
5821 (name "python2-dbus")
5822 (inputs `(("python" ,python-2)
5823 ,@(alist-delete "python"
5824 (package-inputs python-dbus)
5825 equal?)))
5826 ;; FIXME: on Python 2, the test_utf8 fails with:
5827 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5828 (arguments `(#:tests? #f))))
5829
5830 (define-public python-notify2
5831 (package
5832 (name "python-notify2")
5833 (version "0.3.1")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "notify2" version))
5838 (sha256
5839 (base32
5840 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5841 (build-system python-build-system)
5842 (arguments `(#:tests? #f)) ; tests depend on system state
5843 (native-inputs
5844 `(("python-dbus" ,python-dbus)))
5845 (home-page "https://bitbucket.org/takluyver/pynotify2")
5846 (synopsis "Python interface to D-Bus notifications")
5847 (description
5848 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5849 It is a reimplementation of pynotify in pure Python, and an alternative to
5850 the GObject Introspection bindings to libnotify for non-GTK applications.")
5851 (license (list license:bsd-2
5852 license:lgpl2.1+))))
5853
5854 (define-public python2-notify2
5855 (package-with-python2 python-notify2))
5856
5857 (define-public python-lxml
5858 (package
5859 (name "python-lxml")
5860 (version "4.2.5")
5861 (source
5862 (origin
5863 (method url-fetch)
5864 (uri (pypi-uri "lxml" version))
5865 (sha256
5866 (base32
5867 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5868 (build-system python-build-system)
5869 (inputs
5870 `(("libxml2" ,libxml2)
5871 ("libxslt" ,libxslt)))
5872 (home-page "http://lxml.de/")
5873 (synopsis
5874 "Python XML processing library")
5875 (description
5876 "The lxml XML toolkit is a Pythonic binding for the C libraries
5877 libxml2 and libxslt.")
5878 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5879
5880 (define-public python2-lxml
5881 (package-with-python2 python-lxml))
5882
5883 ;; beautifulsoup4 has a totally different namespace than 3.x,
5884 ;; and pypi seems to put it under its own name, so I guess we should too
5885 (define-public python-beautifulsoup4
5886 (package
5887 (name "python-beautifulsoup4")
5888 (version "4.7.1")
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "beautifulsoup4" version))
5893 (sha256
5894 (base32
5895 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5896 (build-system python-build-system)
5897 (arguments
5898 `(#:phases
5899 (modify-phases %standard-phases
5900 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5901 ;; must use this conversion script when building with Python 3. The
5902 ;; conversion script also runs the tests.
5903 ;; For more information, see the file 'convert-py3k' in the source
5904 ;; distribution.
5905 (replace 'check
5906 (lambda _ (invoke "./convert-py3k"))))))
5907 (propagated-inputs
5908 `(("python-soupsieve" ,python-soupsieve)))
5909 (home-page
5910 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5911 (synopsis
5912 "Python screen-scraping library")
5913 (description
5914 "Beautiful Soup is a Python library designed for rapidly setting up
5915 screen-scraping projects. It offers Pythonic idioms for navigating,
5916 searching, and modifying a parse tree, providing a toolkit for
5917 dissecting a document and extracting what you need. It automatically
5918 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5919 (license license:expat)
5920 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5921
5922 (define-public python2-beautifulsoup4
5923 (package
5924 (inherit (package-with-python2
5925 (strip-python2-variant python-beautifulsoup4)))
5926 (arguments `(#:python ,python-2))))
5927
5928 (define-public python-soupsieve
5929 (package
5930 (name "python-soupsieve")
5931 (version "1.9.2")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "soupsieve" version))
5936 (sha256
5937 (base32
5938 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5939 (build-system python-build-system)
5940 (arguments `(#:tests? #f))
5941 ;;XXX: 2 tests fail currently despite claming they were to be
5942 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5943 ;;don't want to create a circular dependency.
5944 (home-page "https://github.com/facelessuser/soupsieve")
5945 (synopsis "CSS selector library")
5946 (description
5947 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5948 Soup 4. It aims to provide selecting, matching, and filtering using modern
5949 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5950 specifications up through the latest CSS level 4 drafts and beyond (though
5951 some are not yet implemented).")
5952 (properties `((python2-variant . ,(delay python2-soupsieve))))
5953 (license license:expat)))
5954
5955 (define-public python2-soupsieve
5956 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5957 (package
5958 (inherit base)
5959 (propagated-inputs
5960 `(("python2-backports-functools-lru-cache"
5961 ,python2-backports-functools-lru-cache)
5962 ,@(package-propagated-inputs base))))))
5963
5964 (define-public python-netifaces
5965 (package
5966 (name "python-netifaces")
5967 (version "0.10.7")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "netifaces" version))
5972 (sha256
5973 (base32
5974 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5975 (build-system python-build-system)
5976 (home-page "https://github.com/al45tair/netifaces")
5977 (synopsis
5978 "Python module for portable network interface information")
5979 (description
5980 "Netifaces is a Python module providing information on network
5981 interfaces in an easy and portable manner.")
5982 (license license:expat)))
5983
5984 (define-public python2-netifaces
5985 (package-with-python2 python-netifaces))
5986
5987 (define-public python-networkx
5988 (package
5989 (name "python-networkx")
5990 (version "2.2")
5991 (source
5992 (origin
5993 (method url-fetch)
5994 (uri (pypi-uri "networkx" version ".zip"))
5995 (sha256
5996 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5997 (build-system python-build-system)
5998 ;; python-decorator is needed at runtime.
5999 (propagated-inputs
6000 `(("python-decorator" ,python-decorator)))
6001 (native-inputs
6002 `(("python-nose" ,python-nose)
6003 ("unzip" ,unzip)))
6004 (home-page "https://networkx.github.io/")
6005 (synopsis "Python module for creating and manipulating graphs and networks")
6006 (description
6007 "NetworkX is a Python package for the creation, manipulation, and study
6008 of the structure, dynamics, and functions of complex networks.")
6009 (license license:bsd-3)))
6010
6011 (define-public python2-networkx
6012 (package-with-python2 python-networkx))
6013
6014 (define-public python-datrie
6015 (package
6016 (name "python-datrie")
6017 (version "0.8")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "datrie" version))
6022 (sha256
6023 (base32
6024 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6025 (build-system python-build-system)
6026 (native-inputs
6027 `(("python-cython" ,python-cython)
6028 ("python-hypothesis" ,python-hypothesis)
6029 ("python-pytest" ,python-pytest)
6030 ("python-pytest-runner" ,python-pytest-runner)))
6031 (home-page "https://github.com/kmike/datrie")
6032 (synopsis "Fast, efficiently stored trie for Python")
6033 (description
6034 "This package provides a fast, efficiently stored trie implementation for
6035 Python.")
6036 (license license:lgpl2.1+)))
6037
6038 (define-public snakemake
6039 (package
6040 (name "snakemake")
6041 (version "5.2.4")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (pypi-uri "snakemake" version))
6046 (sha256
6047 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6048 (build-system python-build-system)
6049 (arguments
6050 ;; TODO: Package missing test dependencies.
6051 '(#:tests? #f
6052 #:phases
6053 (modify-phases %standard-phases
6054 ;; For cluster execution Snakemake will call Python. Since there is
6055 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6056 ;; this by calling the snakemake wrapper instead.
6057 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6058 (lambda* (#:key outputs #:allow-other-keys)
6059 (substitute* "snakemake/executors.py"
6060 (("\\{sys.executable\\} -m snakemake")
6061 (string-append (assoc-ref outputs "out")
6062 "/bin/snakemake")))
6063 #t)))))
6064 (propagated-inputs
6065 `(("python-gitpython" ,python-gitpython)
6066 ("python-wrapt" ,python-wrapt)
6067 ("python-requests" ,python-requests)
6068 ("python-appdirs" ,python-appdirs)
6069 ("python-configargparse" ,python-configargparse)
6070 ("python-datrie" ,python-datrie)
6071 ("python-docutils" ,python-docutils)
6072 ("python-jinja2" ,python-jinja2)
6073 ("python-jsonschema" ,python-jsonschema)
6074 ("python-networkx" ,python-networkx)
6075 ("python-pyyaml" ,python-pyyaml)
6076 ("python-ratelimiter" ,python-ratelimiter)))
6077 (home-page "https://snakemake.readthedocs.io")
6078 (synopsis "Python-based execution environment for make-like workflows")
6079 (description
6080 "Snakemake aims to reduce the complexity of creating workflows by
6081 providing a clean and modern domain specific specification language (DSL) in
6082 Python style, together with a fast and comfortable execution environment.")
6083 (license license:expat)))
6084
6085 ;; This is currently needed for the pigx-* packages.
6086 (define-public snakemake-4
6087 (package (inherit snakemake)
6088 (version "4.4.0")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "snakemake" version))
6093 (sha256
6094 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6095 (propagated-inputs
6096 `(("python-wrapt" ,python-wrapt)
6097 ("python-requests" ,python-requests)
6098 ("python-appdirs" ,python-appdirs)
6099 ("python-configargparse" ,python-configargparse)
6100 ("python-pyyaml" ,python-pyyaml)
6101 ("python-ratelimiter" ,python-ratelimiter)))))
6102
6103 (define-public python-pyqrcode
6104 (package
6105 (name "python-pyqrcode")
6106 (version "1.2.1")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "PyQRCode" version))
6111 (sha256
6112 (base32
6113 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6114 (build-system python-build-system)
6115 (home-page
6116 "https://github.com/mnooner256/pyqrcode")
6117 (synopsis "QR code generator")
6118 (description
6119 "Pyqrcode is a QR code generator written purely in Python with
6120 SVG, EPS, PNG and terminal output.")
6121 (license license:bsd-3)))
6122
6123 (define-public python-seaborn
6124 (package
6125 (name "python-seaborn")
6126 (version "0.9.0")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (pypi-uri "seaborn" version))
6131 (sha256
6132 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6133 (build-system python-build-system)
6134 (arguments
6135 `(#:phases
6136 (modify-phases %standard-phases
6137 (add-before 'check 'start-xserver
6138 (lambda* (#:key inputs #:allow-other-keys)
6139 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6140 ;; There must be a running X server and make check doesn't
6141 ;; start one. Therefore we must do it.
6142 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6143 (setenv "DISPLAY" ":1")
6144 #t)))
6145 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6146 (propagated-inputs
6147 `(("python-pandas" ,python-pandas)
6148 ("python-matplotlib" ,python-matplotlib)
6149 ("python-numpy" ,python-numpy)
6150 ("python-scipy" ,python-scipy)))
6151 (native-inputs
6152 `(("python-pytest" ,python-pytest)
6153 ("xorg-server" ,xorg-server)))
6154 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6155 (synopsis "Statistical data visualization")
6156 (description
6157 "Seaborn is a library for making attractive and informative statistical
6158 graphics in Python. It is built on top of matplotlib and tightly integrated
6159 with the PyData stack, including support for numpy and pandas data structures
6160 and statistical routines from scipy and statsmodels.")
6161 (license license:bsd-3)))
6162
6163 (define-public python2-seaborn
6164 (package-with-python2 python-seaborn))
6165
6166 (define-public python-mpmath
6167 (package
6168 (name "python-mpmath")
6169 (version "0.19")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (string-append "http://mpmath.org/files/mpmath-"
6173 version ".tar.gz"))
6174 (sha256
6175 (base32
6176 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6177 (build-system python-build-system)
6178 (arguments
6179 '(#:phases
6180 (modify-phases %standard-phases
6181 (replace 'check
6182 (lambda _
6183 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6184 (home-page "http://mpmath.org")
6185 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6186 (description
6187 "@code{mpmath} can be used as an arbitrary-precision substitute for
6188 Python's float/complex types and math/cmath modules, but also does much
6189 more advanced mathematics.")
6190 (license license:bsd-3)))
6191
6192 (define-public python2-mpmath
6193 (package-with-python2 python-mpmath))
6194
6195 (define-public python-bigfloat
6196 (package
6197 (name "python-bigfloat")
6198 (version "0.3.0")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "bigfloat" version))
6203 (sha256
6204 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6205 (build-system python-build-system)
6206 (inputs
6207 `(("mpfr" ,mpfr)))
6208 (home-page "https://github.com/mdickinson/bigfloat")
6209 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6210 (description
6211 "This package provides a Python interface to the MPFR library for
6212 multiprecision arithmetic.")
6213 (license license:lgpl3+)))
6214
6215 (define-public python2-bigfloat
6216 (package-with-python2 python-bigfloat))
6217
6218 (define-public python-sympy
6219 (package
6220 (name "python-sympy")
6221 (version "1.1.1")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (string-append
6226 "https://github.com/sympy/sympy/releases/download/sympy-"
6227 version "/sympy-" version ".tar.gz"))
6228 (sha256
6229 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6230 (build-system python-build-system)
6231 (arguments
6232 `(#:phases
6233 (modify-phases %standard-phases
6234 ;; Run the core tests after installation. By default it would run
6235 ;; *all* tests, which take a very long time to complete and are known
6236 ;; to be flaky.
6237 (delete 'check)
6238 (add-after 'install 'check
6239 (lambda* (#:key outputs #:allow-other-keys)
6240 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6241 #t)))))
6242 (propagated-inputs
6243 `(("python-mpmath" ,python-mpmath)))
6244 (home-page "http://www.sympy.org/")
6245 (synopsis "Python library for symbolic mathematics")
6246 (description
6247 "SymPy is a Python library for symbolic mathematics. It aims to become a
6248 full-featured computer algebra system (CAS) while keeping the code as simple
6249 as possible in order to be comprehensible and easily extensible.")
6250 (license license:bsd-3)))
6251
6252 (define-public python2-sympy
6253 (package
6254 (inherit (package-with-python2 python-sympy))
6255 (arguments
6256 `(#:phases
6257 (modify-phases %standard-phases
6258 ;; Run the core tests after installation. By default it would run
6259 ;; *all* tests, which take a very long time to complete and are known
6260 ;; to be flaky.
6261 (delete 'check)
6262 (add-after 'install 'check
6263 (lambda* (#:key outputs #:allow-other-keys)
6264 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6265 #t)))))))
6266
6267 (define-public python-q
6268 (package
6269 (name "python-q")
6270 (version "2.6")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "q" version))
6275 (sha256
6276 (base32
6277 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/zestyping/q")
6280 (synopsis "Quick-and-dirty debugging output for tired programmers")
6281 (description
6282 "q is a Python module for \"print\" style of debugging Python code. It
6283 provides convenient short API for print out of values, tracebacks, and
6284 falling into the Python interpreter.")
6285 (license license:asl2.0)))
6286
6287 (define-public python2-q
6288 (package-with-python2 python-q))
6289
6290 (define-public python2-xlib
6291 (package
6292 (name "python2-xlib")
6293 (version "0.14")
6294 (source (origin
6295 (method url-fetch)
6296 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6297 "/" version "/"
6298 "python-xlib-" version ".tar.gz"))
6299 (sha256
6300 (base32
6301 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6302 (build-system python-build-system)
6303 (arguments
6304 `(#:python ,python-2 ;Python 2 only
6305 #:tests? #f)) ;no tests
6306 (home-page "http://python-xlib.sourceforge.net/")
6307 (synopsis "Python X11 client library")
6308 (description
6309 "The Python X Library is intended to be a fully functional X client
6310 library for Python programs. It is useful to implement low-level X clients.
6311 It is written entirely in Python.")
6312 (license license:gpl2+)))
6313
6314 (define-public python-singledispatch
6315 (package
6316 (name "python-singledispatch")
6317 (version "3.4.0.3")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "singledispatch" version))
6322 (sha256
6323 (base32
6324 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6325 (build-system python-build-system)
6326 (native-inputs
6327 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6328 (home-page
6329 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6330 (synopsis "Backport of singledispatch feature from Python 3.4")
6331 (description
6332 "This library brings functools.singledispatch from Python 3.4 to Python
6333 2.6-3.3.")
6334 (license license:expat)))
6335
6336 (define-public python2-singledispatch
6337 (package-with-python2 python-singledispatch))
6338
6339 ;; the python- version can be removed with python-3.5
6340 (define-public python-backports-abc
6341 (package
6342 (name "python-backports-abc")
6343 (version "0.5")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "backports_abc" version))
6348 (sha256
6349 (base32
6350 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6351 (build-system python-build-system)
6352 (home-page "https://github.com/cython/backports_abc")
6353 (synopsis "Backport of additions to the 'collections.abc' module")
6354 (description
6355 "Python-backports-abc provides a backport of additions to the
6356 @code{collections.abc} module in Python-3.5.")
6357 (license license:psfl)))
6358
6359 (define-public python2-backports-abc
6360 (package-with-python2 python-backports-abc))
6361
6362 (define-public python-backports-csv
6363 (package
6364 (name "python-backports-csv")
6365 (version "1.0.5")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "backports.csv" version))
6370 (sha256
6371 (base32
6372 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6373 (build-system python-build-system)
6374 (home-page "https://github.com/ryanhiebert/backports.csv")
6375 (synopsis "Backport of Python 3's csv module for Python 2")
6376 (description
6377 "Provides a backport of Python 3's @code{csv} module for parsing
6378 comma separated values. The API of the @code{csv} module in Python 2
6379 is drastically different from the @code{csv} module in Python 3.
6380 This is due, for the most part, to the difference between str in
6381 Python 2 and Python 3.")
6382 (license license:psfl)))
6383
6384 (define-public python2-backports-csv
6385 (package-with-python2 python-backports-csv))
6386
6387 (define-public python2-backports-shutil-get-terminal-size
6388 (package
6389 (name "python2-backports-shutil-get-terminal-size")
6390 (version "1.0.0")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6395 (sha256
6396 (base32
6397 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6398 (build-system python-build-system)
6399 (arguments
6400 `(#:python ,python-2
6401 #:phases
6402 (modify-phases %standard-phases
6403 (replace 'check
6404 (lambda _
6405 (invoke "py.test" "-v"))))))
6406 (native-inputs
6407 `(("python2-pytest" ,python2-pytest)))
6408 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6409 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6410 (description
6411 "This package provides a backport of the @code{get_terminal_size
6412 function} from Python 3.3's @code{shutil}.
6413 Unlike the original version it is written in pure Python rather than C,
6414 so it might be a tiny bit slower.")
6415 (license license:expat)))
6416
6417 (define-public python-waf
6418 (package
6419 (name "python-waf")
6420 (version "2.0.11")
6421 (source (origin
6422 (method url-fetch)
6423 (uri (string-append "https://waf.io/"
6424 "waf-" version ".tar.bz2"))
6425 (sha256
6426 (base32
6427 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6428 (build-system python-build-system)
6429 (arguments
6430 '(#:phases
6431 (modify-phases %standard-phases
6432 (replace 'build
6433 (lambda _
6434 (invoke "python" "waf-light" "configure" "build")))
6435 (replace 'check
6436 (lambda _
6437 (invoke "python" "waf" "--version")))
6438 (replace 'install
6439 (lambda* (#:key outputs #:allow-other-keys)
6440 (let ((out (assoc-ref outputs "out")))
6441 (install-file "waf" (string-append out "/bin")))
6442 #t))
6443 ;; waf breaks when it is wrapped.
6444 (delete 'wrap))))
6445 (home-page "https://waf.io/")
6446 (synopsis "Python-based build system")
6447 (description
6448 "Waf is a Python-based framework for configuring, compiling and installing
6449 applications.")
6450 (license license:bsd-3)))
6451
6452 (define-public python2-waf
6453 (package-with-python2 python-waf))
6454
6455 (define-public python-pyzmq
6456 (package
6457 (name "python-pyzmq")
6458 (version "17.1.2")
6459 (source
6460 (origin
6461 (method url-fetch)
6462 (uri (pypi-uri "pyzmq" version))
6463 (sha256
6464 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6465 (build-system python-build-system)
6466 (arguments
6467 `(#:configure-flags
6468 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6469 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6470 ;; --inplace' for 'python setup.py test' to work.
6471 #:tests? #f))
6472 (inputs
6473 `(("zeromq" ,zeromq)))
6474 (native-inputs
6475 `(("pkg-config" ,pkg-config)
6476 ("python-nose" ,python-nose)))
6477 (home-page "https://github.com/zeromq/pyzmq")
6478 (synopsis "Python bindings for 0MQ")
6479 (description
6480 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6481 (license license:bsd-4)))
6482
6483 (define-public python2-pyzmq
6484 (package-with-python2 python-pyzmq))
6485
6486 (define-public python-pep8
6487 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6488 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6489 ;; some dependents' test suites, and nothing more.
6490 (package
6491 (name "python-pep8")
6492 (version "1.7.0")
6493 (source
6494 (origin
6495 (method url-fetch)
6496 (uri (pypi-uri "pep8" version))
6497 (sha256
6498 (base32
6499 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6500 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6501 (build-system python-build-system)
6502 (home-page "https://pep8.readthedocs.org/")
6503 (synopsis "Python style guide checker")
6504 (description
6505 "This tools checks Python code against some of the style conventions in
6506 PEP 8.")
6507 (license license:expat)))
6508
6509 (define-public python2-pep8
6510 (package-with-python2 python-pep8))
6511
6512 (define-public python-pyflakes
6513 (package
6514 (name "python-pyflakes")
6515 (version "2.1.1")
6516 (source
6517 (origin
6518 (method url-fetch)
6519 (uri (pypi-uri "pyflakes" version))
6520 (sha256
6521 (base32
6522 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6523 (build-system python-build-system)
6524 (home-page
6525 "https://github.com/pyflakes/pyflakes")
6526 (synopsis "Passive checker of Python programs")
6527 (description
6528 "Pyflakes statically checks Python source code for common errors.")
6529 (license license:expat)))
6530
6531 (define-public python2-pyflakes
6532 (package-with-python2 python-pyflakes))
6533
6534 (define-public python-mccabe
6535 (package
6536 (name "python-mccabe")
6537 (version "0.6.1")
6538 (source
6539 (origin
6540 (method url-fetch)
6541 (uri (pypi-uri "mccabe" version))
6542 (sha256
6543 (base32
6544 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6545 (build-system python-build-system)
6546 (native-inputs
6547 `(("python-pytest" ,python-pytest-bootstrap)
6548 ("python-pytest-runner" ,python-pytest-runner)))
6549 (home-page "https://github.com/flintwork/mccabe")
6550 (synopsis "McCabe checker, plugin for flake8")
6551 (description
6552 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6553 complexity of Python source code.")
6554 (license license:expat)))
6555
6556 (define-public python2-mccabe
6557 (package-with-python2 python-mccabe))
6558
6559 (define-public python-mccabe-0.2.1
6560 (package (inherit python-mccabe)
6561 (version "0.2.1")
6562 (source
6563 (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "mccabe" version))
6566 (sha256
6567 (base32
6568 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6569
6570 (define-public python2-mccabe-0.2.1
6571 (package-with-python2 python-mccabe-0.2.1))
6572
6573 ;; Flake8 2.4.1 requires an older version of pep8.
6574 ;; This should be removed ASAP.
6575 (define-public python-pep8-1.5.7
6576 (package (inherit python-pep8)
6577 (version "1.5.7")
6578 (source
6579 (origin
6580 (method url-fetch)
6581 (uri (pypi-uri "pep8" version))
6582 (sha256
6583 (base32
6584 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6585 (arguments
6586 ;; XXX Tests not compatible with Python 3.5.
6587 '(#:tests? #f))))
6588
6589 (define-public python2-pep8-1.5.7
6590 (package-with-python2 python-pep8-1.5.7))
6591
6592 ;; Flake8 2.4.1 requires an older version of pyflakes.
6593 ;; This should be removed ASAP.
6594 (define-public python-pyflakes-0.8.1
6595 (package (inherit python-pyflakes)
6596 (version "0.8.1")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "pyflakes" version))
6601 (sha256
6602 (base32
6603 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6604 (arguments
6605 ;; XXX Tests not compatible with Python 3.5.
6606 '(#:tests? #f))))
6607
6608 (define-public python2-pyflakes-0.8.1
6609 (package-with-python2 python-pyflakes-0.8.1))
6610
6611 (define-public python-flake8
6612 (package
6613 (name "python-flake8")
6614 (version "3.7.7")
6615 (source (origin
6616 (method url-fetch)
6617 (uri (pypi-uri "flake8" version))
6618 (sha256
6619 (base32
6620 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6621 (build-system python-build-system)
6622 (arguments
6623 `(#:phases
6624 (modify-phases %standard-phases
6625 (delete 'check)
6626 (add-after 'install 'check
6627 (lambda* (#:key inputs outputs #:allow-other-keys)
6628 (add-installed-pythonpath inputs outputs)
6629 (invoke "pytest" "-v")
6630 #t)))))
6631 (propagated-inputs
6632 `(("python-pycodestyle" ,python-pycodestyle)
6633 ("python-entrypoints" ,python-entrypoints)
6634 ("python-pyflakes" ,python-pyflakes)
6635 ("python-mccabe" ,python-mccabe)))
6636 (native-inputs
6637 `(("python-mock" ,python-mock)
6638 ("python-pytest" ,python-pytest-bootstrap)
6639 ("python-pytest-runner" ,python-pytest-runner)))
6640 (home-page "https://gitlab.com/pycqa/flake8")
6641 (synopsis
6642 "The modular source code checker: pep8, pyflakes and co")
6643 (description
6644 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6645 (properties `((python2-variant . ,(delay python2-flake8))))
6646 (license license:expat)))
6647
6648 (define-public python2-flake8
6649 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6650 (package (inherit base)
6651 (propagated-inputs
6652 `(("python2-configparser" ,python2-configparser)
6653 ("python2-enum34" ,python2-enum34)
6654 ("python2-typing" ,python2-typing)
6655 ,@(package-propagated-inputs base))))))
6656
6657 ;; python-hacking requires flake8 <2.6.0.
6658 (define-public python-flake8-2.5
6659 (package
6660 (inherit python-flake8)
6661 (version "2.5.5")
6662 (source (origin
6663 (method url-fetch)
6664 (uri (pypi-uri "flake8" version))
6665 (sha256
6666 (base32
6667 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6668 (propagated-inputs
6669 `(("python-pep8" ,python-pep8)
6670 ,@(package-propagated-inputs python-flake8)))
6671 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6672
6673 (define-public python2-flake8-2.5
6674 (package
6675 (inherit python2-flake8)
6676 (version (package-version python-flake8-2.5))
6677 (source (origin
6678 (inherit (package-source python-flake8-2.5))))
6679 (propagated-inputs
6680 `(("python2-pep8" ,python2-pep8)
6681 ,@(package-propagated-inputs python2-flake8)))))
6682
6683 (define-public python-flake8-polyfill
6684 (package
6685 (name "python-flake8-polyfill")
6686 (version "1.0.2")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (pypi-uri "flake8-polyfill" version))
6691 (sha256
6692 (base32
6693 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6694 (build-system python-build-system)
6695 (arguments
6696 '(#:phases
6697 (modify-phases %standard-phases
6698 (replace 'check
6699 (lambda _
6700 ;; Be compatible with Pytest 4:
6701 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6702 (substitute* "setup.cfg"
6703 (("\\[pytest\\]")
6704 "[tool:pytest]"))
6705
6706 (setenv "PYTHONPATH"
6707 (string-append (getcwd) "/build/lib:"
6708 (getenv "PYTHONPATH")))
6709 (invoke "py.test" "-v"))))))
6710 (native-inputs
6711 `(("python-flake8" ,python-flake8)
6712 ("python-mock" ,python-mock)
6713 ("python-pep8" ,python-pep8)
6714 ("python-pycodestyle" ,python-pycodestyle)
6715 ("python-pytest" ,python-pytest)))
6716 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6717 (synopsis "Polyfill package for Flake8 plugins")
6718 (description
6719 "This package that provides some compatibility helpers for Flake8
6720 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6721 (license license:expat)))
6722
6723 (define-public python2-flake8-polyfill
6724 (package-with-python2 python-flake8-polyfill))
6725
6726 (define-public python-mistune
6727 (package
6728 (name "python-mistune")
6729 (version "0.8.4")
6730 (source
6731 (origin
6732 (method url-fetch)
6733 (uri (pypi-uri "mistune" version))
6734 (sha256
6735 (base32
6736 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6737 (build-system python-build-system)
6738 (native-inputs
6739 `(("python-nose" ,python-nose)
6740 ("python-cython" ,python-cython)))
6741 (home-page "https://github.com/lepture/mistune")
6742 (synopsis "Markdown parser in pure Python")
6743 (description "This package provides a fast markdown parser in pure
6744 Python.")
6745 (license license:bsd-3)))
6746
6747 (define-public python2-mistune
6748 (package-with-python2 python-mistune))
6749
6750 (define-public python-markdown
6751 (package
6752 (name "python-markdown")
6753 (version "3.1.1")
6754 (source
6755 (origin
6756 (method url-fetch)
6757 (uri (pypi-uri "Markdown" version))
6758 (sha256
6759 (base32
6760 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6761 (build-system python-build-system)
6762 (native-inputs
6763 `(("python-nose" ,python-nose)
6764 ("python-pyyaml" ,python-pyyaml)))
6765 (home-page "https://python-markdown.github.io/")
6766 (synopsis "Python implementation of Markdown")
6767 (description
6768 "This package provides a Python implementation of John Gruber's
6769 Markdown. The library features international input, various Markdown
6770 extensions, and several HTML output formats. A command line wrapper
6771 markdown_py is also provided to convert Markdown files to HTML.")
6772 (license license:bsd-3)))
6773
6774 (define-public python2-markdown
6775 (package-with-python2 python-markdown))
6776
6777 (define-public python-ptyprocess
6778 (package
6779 (name "python-ptyprocess")
6780 (version "0.5.2")
6781 (source
6782 (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "ptyprocess" version))
6785 (sha256
6786 (base32
6787 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6788 (build-system python-build-system)
6789 (native-inputs
6790 `(("python-nose" ,python-nose)))
6791 (arguments
6792 `(#:phases
6793 (modify-phases %standard-phases
6794 (replace 'check
6795 (lambda _ (invoke "nosetests"))))))
6796 (home-page "https://github.com/pexpect/ptyprocess")
6797 (synopsis "Run a subprocess in a pseudo terminal")
6798 (description
6799 "This package provides a Python library used to launch a subprocess in a
6800 pseudo terminal (pty), and interact with both the process and its pty.")
6801 (license license:isc)))
6802
6803 (define-public python2-ptyprocess
6804 (package-with-python2 python-ptyprocess))
6805
6806 (define-public python-cram
6807 (package
6808 (name "python-cram")
6809 (version "0.7")
6810 (home-page "https://bitheap.org/cram/")
6811 (source (origin
6812 (method url-fetch)
6813 (uri (list (string-append home-page "cram-"
6814 version ".tar.gz")
6815 (pypi-uri "cram" version)))
6816 (sha256
6817 (base32
6818 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6819 (arguments
6820 '(#:phases
6821 (modify-phases %standard-phases
6822 (add-after 'unpack 'patch-source
6823 (lambda _
6824 (substitute* (find-files "cram" ".*\\.py$")
6825 ;; Replace default shell path.
6826 (("/bin/sh") (which "sh")))
6827 (substitute* (find-files "tests" ".*\\.t$")
6828 (("md5") "md5sum")
6829 (("/bin/bash") (which "bash"))
6830 (("/bin/sh") (which "sh")))
6831 (substitute* "cram/_test.py"
6832 ;; This hack works around a bug triggered by substituting
6833 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6834 ;; "cram -h", which breaks the output at 80 characters. This
6835 ;; causes the line showing the default shell to break into two
6836 ;; lines, but the test expects a single line...
6837 (("env\\['COLUMNS'\\] = '80'")
6838 "env['COLUMNS'] = '160'"))
6839
6840 (substitute* "Makefile"
6841 ;; Recent versions of python-coverage have caused the test
6842 ;; coverage to decrease (as of version 0.7). Allow that.
6843 (("--fail-under=100")
6844 "--fail-under=90"))
6845
6846 #t))
6847 (replace 'check
6848 ;; The test phase uses the built library and executable.
6849 (lambda* (#:key inputs outputs #:allow-other-keys)
6850 (add-installed-pythonpath inputs outputs)
6851 (setenv "PATH" (string-append (getenv "PATH") ":"
6852 (assoc-ref outputs "out") "/bin"))
6853 (invoke "make" "test"))))))
6854 (build-system python-build-system)
6855 (native-inputs
6856 `(("python-coverage" ,python-coverage)
6857 ("which" ,which)))
6858 (synopsis "Simple testing framework for command line applications")
6859 (description
6860 "Cram is a functional testing framework for command line applications.
6861 Cram tests look like snippets of interactive shell sessions. Cram runs each
6862 command and compares the command output in the test with the command’s actual
6863 output.")
6864 (license license:gpl2+)))
6865
6866 (define-public python2-cram
6867 (package-with-python2 python-cram))
6868
6869 (define-public python-straight-plugin
6870 (package
6871 (name "python-straight-plugin")
6872 (version "1.4.1")
6873 (source
6874 (origin
6875 (method url-fetch)
6876 (uri (pypi-uri "straight.plugin" version))
6877 (sha256
6878 (base32
6879 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6880 (build-system python-build-system)
6881 (home-page "https://github.com/ironfroggy/straight.plugin")
6882 (synopsis "Simple namespaced plugin facility")
6883 (description "Straight Plugin provides a type of plugin you can create from
6884 almost any existing Python modules, and an easy way for outside developers to
6885 add functionality and customization to your projects with their own plugins.")
6886 (license license:expat)))
6887
6888 (define-public python2-straight-plugin
6889 (package-with-python2 python-straight-plugin))
6890
6891 (define-public python-fonttools
6892 (package
6893 (name "python-fonttools")
6894 (version "3.38.0")
6895 (source (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "fonttools" version ".zip"))
6898 (sha256
6899 (base32
6900 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6901 (build-system python-build-system)
6902 (native-inputs
6903 `(("unzip" ,unzip)
6904 ("python-pytest" ,python-pytest)
6905 ("python-pytest-runner" ,python-pytest-runner)))
6906 (home-page "https://github.com/behdad/fonttools")
6907 (synopsis "Tools to manipulate font files")
6908 (description
6909 "FontTools/TTX is a library to manipulate font files from Python. It
6910 supports reading and writing of TrueType/OpenType fonts, reading and writing
6911 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6912 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6913 from an XML-based format.")
6914 (license license:expat)))
6915
6916 (define-public python2-fonttools
6917 (package-with-python2 python-fonttools))
6918
6919 (define-public python-ly
6920 (package
6921 (name "python-ly")
6922 (version "0.9.5")
6923 (source
6924 (origin
6925 (method url-fetch)
6926 (uri (pypi-uri name version))
6927 (sha256
6928 (base32
6929 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6930 (build-system python-build-system)
6931 (arguments
6932 ;; FIXME: Some tests need network access.
6933 '(#:tests? #f))
6934 (synopsis "Tool and library for manipulating LilyPond files")
6935 (description "This package provides a Python library to parse, manipulate
6936 or create documents in LilyPond format. A command line program ly is also
6937 provided that can be used to do various manipulations with LilyPond files.")
6938 (home-page "https://pypi.python.org/pypi/python-ly")
6939 (license license:gpl2+)))
6940
6941 (define-public python-appdirs
6942 (package
6943 (name "python-appdirs")
6944 (version "1.4.3")
6945 (source
6946 (origin
6947 (method url-fetch)
6948 (uri (pypi-uri "appdirs" version))
6949 (sha256
6950 (base32
6951 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6952 (build-system python-build-system)
6953 (home-page "https://github.com/ActiveState/appdirs")
6954 (synopsis
6955 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6956 (description
6957 "This module provides a portable way of finding out where user data
6958 should be stored on various operating systems.")
6959 (license license:expat)))
6960
6961 (define-public python2-appdirs
6962 (package-with-python2 python-appdirs))
6963
6964 (define-public python-llfuse
6965 (package
6966 (name "python-llfuse")
6967 (version "1.3.5")
6968 (source (origin
6969 (method url-fetch)
6970 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6971 (sha256
6972 (base32
6973 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6974 (build-system python-build-system)
6975 (inputs
6976 `(("fuse" ,fuse)
6977 ("attr" ,attr)))
6978 (native-inputs
6979 `(("pkg-config" ,pkg-config)))
6980 (synopsis "Python bindings for FUSE")
6981 (description
6982 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6983 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6984 (license license:lgpl2.0+)
6985 (properties `((python2-variant . ,(delay python2-llfuse))))))
6986
6987 (define-public python2-llfuse
6988 (package (inherit (package-with-python2
6989 (strip-python2-variant python-llfuse)))
6990 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6991
6992 ;; For attic-0.16
6993 (define-public python-llfuse-0.41
6994 (package (inherit python-llfuse)
6995 (version "0.41.1")
6996 (source (origin
6997 (method url-fetch)
6998 (uri (string-append
6999 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7000 "llfuse-" version ".tar.bz2"))
7001 (sha256
7002 (base32
7003 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7004 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7005 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7006 (license (list license:expat license:lgpl2.0+))))
7007
7008 (define-public python-msgpack
7009 (package
7010 (name "python-msgpack")
7011 (version "0.5.6")
7012 (source (origin
7013 (method url-fetch)
7014 (uri (pypi-uri "msgpack" version))
7015 (sha256
7016 (base32
7017 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7018 (build-system python-build-system)
7019 (arguments
7020 `(#:modules ((guix build utils)
7021 (guix build python-build-system)
7022 (ice-9 ftw)
7023 (srfi srfi-1)
7024 (srfi srfi-26))
7025 #:phases
7026 (modify-phases %standard-phases
7027 (replace 'check
7028 (lambda _
7029 (let ((cwd (getcwd)))
7030 (setenv "PYTHONPATH"
7031 (string-append cwd "/build/"
7032 (find (cut string-prefix? "lib" <>)
7033 (scandir (string-append cwd "/build")))
7034 ":"
7035 (getenv "PYTHONPATH")))
7036 (invoke "pytest" "-v" "test")))))))
7037 (native-inputs
7038 `(("python-pytest" ,python-pytest)))
7039 (synopsis "MessagePack (de)serializer")
7040 (description "MessagePack is a fast, compact binary serialization format,
7041 suitable for similar data to JSON. This package provides CPython bindings for
7042 reading and writing MessagePack data.")
7043 (home-page "https://pypi.python.org/pypi/msgpack/")
7044 (license license:asl2.0)))
7045
7046 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7047 ;; release 0.5. Some packages like borg still call it by the old name for now.
7048 ;; <https://bugs.gnu.org/30662>
7049 (define-public python-msgpack-transitional
7050 (package
7051 (inherit python-msgpack)
7052 (name "python-msgpack-transitional")
7053 (arguments
7054 (substitute-keyword-arguments (package-arguments python-msgpack)
7055 ((#:phases phases)
7056 `(modify-phases ,phases
7057 (add-after 'unpack 'configure-transitional
7058 (lambda _
7059 ;; Keep using the old name.
7060 (substitute* "setup.py"
7061 (("TRANSITIONAL = False")
7062 "TRANSITIONAL = 1"))
7063 #t))))))))
7064
7065 (define-public python2-msgpack
7066 (package-with-python2 python-msgpack))
7067
7068 (define-public python-netaddr
7069 (package
7070 (name "python-netaddr")
7071 (version "0.7.19")
7072 (source
7073 (origin
7074 (method url-fetch)
7075 (uri (pypi-uri "netaddr" version))
7076 (sha256
7077 (base32
7078 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7079 (build-system python-build-system)
7080 (arguments `(#:tests? #f)) ;; No tests.
7081 (home-page "https://github.com/drkjam/netaddr/")
7082 (synopsis "Pythonic manipulation of network addresses")
7083 (description
7084 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7085 and MAC network addresses.")
7086 (license license:bsd-3)))
7087
7088 (define-public python2-netaddr
7089 (package-with-python2 python-netaddr))
7090
7091 (define-public python2-pyroute2
7092 (package
7093 (name "python2-pyroute2")
7094 (version "0.5.6")
7095 (source
7096 (origin
7097 (method url-fetch)
7098 (uri (pypi-uri "pyroute2" version))
7099 (sha256
7100 (base32
7101 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7102 (build-system python-build-system)
7103 (arguments
7104 `(#:python ,python-2)) ;Python 3.x is not supported
7105 (home-page "https://github.com/svinota/pyroute2")
7106 (synopsis "Python netlink library")
7107 (description
7108 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7109 Supported netlink families and protocols include:
7110 @itemize
7111 @item rtnl, network settings - addresses, routes, traffic controls
7112 @item nfnetlink - netfilter API: ipset, nftables, ...
7113 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7114 @item devlink - manage and monitor devlink-enabled hardware
7115 @item generic - generic netlink families
7116 @itemize
7117 @item nl80211 - wireless functions API (basic support)
7118 @item taskstats - extended process statistics
7119 @item acpi_events - ACPI events monitoring
7120 @item thermal_events - thermal events monitoring
7121 @item VFS_DQUOT - disk quota events monitoring
7122 @end itemize
7123 @end itemize")
7124 (license license:gpl2+)))
7125
7126 (define-public python-wrapt
7127 (package
7128 (name "python-wrapt")
7129 (version "1.11.2")
7130 (source
7131 (origin
7132 (method url-fetch)
7133 (uri (pypi-uri "wrapt" version))
7134 (sha256
7135 (base32
7136 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7137 (build-system python-build-system)
7138 (arguments
7139 ;; Tests are not included in the tarball, they are only available in the
7140 ;; git repository.
7141 `(#:tests? #f))
7142 (home-page "https://github.com/GrahamDumpleton/wrapt")
7143 (synopsis "Module for decorators, wrappers and monkey patching")
7144 (description
7145 "The aim of the wrapt module is to provide a transparent object proxy for
7146 Python, which can be used as the basis for the construction of function
7147 wrappers and decorator functions.")
7148 (license license:bsd-2)))
7149
7150 (define-public python2-wrapt
7151 (package-with-python2 python-wrapt))
7152
7153 (define-public python-xlrd
7154 (package
7155 (name "python-xlrd")
7156 (version "1.0.0")
7157 (source (origin
7158 (method url-fetch)
7159 (uri (pypi-uri "xlrd" version))
7160 (sha256
7161 (base32
7162 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7163 (build-system python-build-system)
7164 (arguments
7165 `(#:phases
7166 (modify-phases %standard-phases
7167 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7168 ;; run tests instead for now.
7169 (replace 'check (lambda _ (invoke "nosetests"))))))
7170 (native-inputs `(("python-nose" ,python-nose)))
7171 (home-page "http://www.python-excel.org/")
7172 (synopsis "Library for extracting data from Excel files")
7173 (description "This package provides a library to extract data from
7174 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7175 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7176 Unicode-aware. It is not intended as an end-user tool.")
7177 (license license:bsd-3)))
7178
7179 (define-public python2-xlrd
7180 (package-with-python2 python-xlrd))
7181
7182 (define-public python-prettytable
7183 (package
7184 (name "python-prettytable")
7185 (version "0.7.2")
7186 (source
7187 (origin
7188 (method url-fetch)
7189 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7190 (sha256
7191 (base32
7192 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7193 (build-system python-build-system)
7194 (home-page "http://code.google.com/p/prettytable/")
7195 (synopsis "Display tabular data in an ASCII table format")
7196 (description
7197 "A library designed to represent tabular data in visually appealing ASCII
7198 tables. PrettyTable allows for selection of which columns are to be printed,
7199 independent alignment of columns (left or right justified or centred) and
7200 printing of sub-tables by specifying a row range.")
7201 (license license:bsd-3)))
7202
7203 (define-public python2-prettytable
7204 (package-with-python2 python-prettytable))
7205
7206 (define-public python-tables
7207 (package
7208 (name "python-tables")
7209 (version "3.4.4")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (pypi-uri "tables" version))
7214 (sha256
7215 (base32
7216 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7217 (modules '((guix build utils)))
7218 (snippet
7219 '(begin
7220 ;; Remove pre-compiled .pyc files from source.
7221 (for-each delete-file-recursively
7222 (find-files "." "__pycache__" #:directories? #t))
7223 (for-each delete-file (find-files "." "\\.pyc$"))
7224 #t))))
7225 (build-system python-build-system)
7226 (arguments
7227 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7228 ;; or "check", so we must override the build and check phases.
7229 #:phases
7230 (modify-phases %standard-phases
7231 (add-after 'unpack 'use-gcc
7232 (lambda _
7233 (substitute* "setup.py"
7234 (("compiler = new_compiler\\(\\)" line)
7235 (string-append line
7236 "\ncompiler.set_executables(compiler='gcc',"
7237 "compiler_so='gcc',"
7238 "linker_exe='gcc',"
7239 "linker_so='gcc -shared')")))
7240 #t))
7241 (replace 'build
7242 (lambda* (#:key inputs #:allow-other-keys)
7243 (invoke "python" "setup.py" "build"
7244 (string-append "--hdf5="
7245 (assoc-ref inputs "hdf5")))))
7246 (replace 'check
7247 (lambda* (#:key inputs #:allow-other-keys)
7248 (invoke "python" "setup.py" "check"
7249 (string-append "--hdf5="
7250 (assoc-ref inputs "hdf5"))))))))
7251 (propagated-inputs
7252 `(("python-numexpr" ,python-numexpr)
7253 ("python-numpy" ,python-numpy)))
7254 (native-inputs
7255 `(("python-cython" ,python-cython)
7256 ("pkg-config" ,pkg-config)))
7257 (inputs
7258 `(("hdf5" ,hdf5)
7259 ("bzip2" ,bzip2)
7260 ("zlib" ,zlib)))
7261 (home-page "http://www.pytables.org/")
7262 (synopsis "Hierarchical datasets for Python")
7263 (description "PyTables is a package for managing hierarchical datasets and
7264 designed to efficiently cope with extremely large amounts of data.")
7265 (license license:bsd-3)))
7266
7267 (define-public python2-tables
7268 (package-with-python2 python-tables))
7269
7270 (define-public python-pyasn1
7271 (package
7272 (name "python-pyasn1")
7273 (version "0.4.3")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "pyasn1" version))
7278 (sha256
7279 (base32
7280 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7281 (build-system python-build-system)
7282 (home-page "http://pyasn1.sourceforge.net/")
7283 (synopsis "ASN.1 types and codecs")
7284 (description
7285 "This is an implementation of ASN.1 types and codecs in Python. It is
7286 suitable for a wide range of protocols based on the ASN.1 specification.")
7287 (license license:bsd-2)))
7288
7289 (define-public python2-pyasn1
7290 (package-with-python2 python-pyasn1))
7291
7292 (define-public python-pyasn1-modules
7293 (package
7294 (name "python-pyasn1-modules")
7295 (version "0.2.2")
7296 (source
7297 (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "pyasn1-modules" version))
7300 (sha256
7301 (base32
7302 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7303 (build-system python-build-system)
7304 (propagated-inputs
7305 `(("python-pyasn1" ,python-pyasn1)))
7306 (home-page "https://sourceforge.net/projects/pyasn1/")
7307 (synopsis "ASN.1 codec implementations")
7308 (description
7309 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7310 implementations of ASN.1-based codecs and protocols.")
7311 (license license:bsd-3)))
7312
7313 (define-public python2-pyasn1-modules
7314 (package-with-python2 python-pyasn1-modules))
7315
7316 (define-public python-ipaddress
7317 (package
7318 (name "python-ipaddress")
7319 (version "1.0.22")
7320 (source (origin
7321 (method url-fetch)
7322 (uri (pypi-uri "ipaddress" version))
7323 (sha256
7324 (base32
7325 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7326 (build-system python-build-system)
7327 (home-page "https://github.com/phihag/ipaddress")
7328 (synopsis "IP address manipulation library")
7329 (description
7330 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7331 in Python. This library is used to create, poke at, and manipulate IPv4 and
7332 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7333 module to older versions of Python.")
7334 (license license:psfl)))
7335
7336 (define-public python2-ipaddress
7337 (package-with-python2 python-ipaddress))
7338
7339 (define-public python2-ipaddr
7340 (package
7341 (name "python2-ipaddr")
7342 (version "2.1.11")
7343 (source
7344 (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "ipaddr" version))
7347 (sha256
7348 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7349 (build-system python-build-system)
7350 (arguments
7351 `(#:python ,python-2 ;version 2 only
7352 #:phases
7353 (modify-phases %standard-phases
7354 (replace 'check
7355 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7356 (home-page "https://github.com/google/ipaddr-py")
7357 (synopsis "IP address manipulation library")
7358 (description
7359 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7360 IPv6 addresses and networks.
7361
7362 For new implementations you may prefer to use the standard module
7363 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7364 versions of Python.")
7365 (license license:asl2.0)))
7366
7367 (define-public python-idna
7368 (package
7369 (name "python-idna")
7370 (version "2.8")
7371 (source
7372 (origin
7373 (method url-fetch)
7374 (uri (pypi-uri "idna" version))
7375 (sha256
7376 (base32
7377 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7378 (build-system python-build-system)
7379 (home-page "https://github.com/kjd/idna")
7380 (synopsis "Internationalized domain names in applications")
7381 (description
7382 "This is a library to support the Internationalised Domain Names in
7383 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7384 protocol is often referred to as “IDNA2008” and can produce different results
7385 from the earlier standard from 2003. The library is also intended to act as a
7386 suitable drop-in replacement for the “encodings.idna” module that comes with
7387 the Python standard library but currently only supports the older 2003
7388 specification.")
7389 (license license:bsd-4)))
7390
7391 (define-public python-idna-2.7
7392 (package (inherit python-idna)
7393 (version "2.7")
7394 (source (origin
7395 (method url-fetch)
7396 (uri (pypi-uri "idna" version))
7397 (sha256
7398 (base32
7399 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7400
7401
7402 (define-public python2-idna
7403 (package-with-python2 python-idna))
7404
7405 (define-public python-idna-ssl
7406 (package
7407 (name "python-idna-ssl")
7408 (version "1.0.1")
7409 (source
7410 (origin
7411 (method url-fetch)
7412 (uri (pypi-uri "idna-ssl" version))
7413 (sha256
7414 (base32
7415 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7416 (build-system python-build-system)
7417 (arguments
7418 `(#:tests? #f)) ;circular dependency with python-aiohttp
7419 (home-page "https://github.com/aio-libs/idna-ssl")
7420 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7421 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7422 domains support.")
7423 (license license:expat)))
7424
7425 (define-public python-pretend
7426 (package
7427 (name "python-pretend")
7428 (version "1.0.9")
7429 (source
7430 (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "pretend" version))
7433 (sha256
7434 (base32
7435 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7436 (build-system python-build-system)
7437 (home-page "https://github.com/alex/pretend")
7438 (synopsis "Library for stubbing in Python")
7439 (description
7440 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7441 technique for writing tests. You may hear the term mixed up with mocks,
7442 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7443 responses, rather than doing any computation.")
7444 (license license:bsd-3)))
7445
7446 (define-public python2-pretend
7447 (package-with-python2 python-pretend))
7448
7449 (define-public python-pip
7450 (package
7451 (name "python-pip")
7452 (version "19.2.1")
7453 (source
7454 (origin
7455 (method url-fetch)
7456 (uri (pypi-uri "pip" version))
7457 (sha256
7458 (base32
7459 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7460 (build-system python-build-system)
7461 (arguments
7462 '(#:tests? #f)) ; there are no tests in the pypi archive.
7463 (home-page "https://pip.pypa.io/")
7464 (synopsis "Package manager for Python software")
7465 (description
7466 "Pip is a package manager for Python software, that finds packages on the
7467 Python Package Index (PyPI).")
7468 (license license:expat)))
7469
7470 (define-public python2-pip
7471 (package-with-python2 python-pip))
7472
7473 (define-public python-tlsh
7474 (package
7475 (name "python-tlsh")
7476 (version "3.4.5")
7477 (home-page "https://github.com/trendmicro/tlsh")
7478 (source
7479 (origin
7480 (method git-fetch)
7481 (uri (git-reference
7482 (url "https://github.com/trendmicro/tlsh.git")
7483 (commit (string-append "v" version))))
7484 (file-name (git-file-name name version))
7485 (sha256
7486 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7487 (build-system cmake-build-system)
7488 (arguments
7489 '(#:out-of-source? #f
7490 #:phases (modify-phases %standard-phases
7491 (replace
7492 'install
7493 (lambda* (#:key outputs #:allow-other-keys)
7494 ;; Build and install the Python bindings. The underlying
7495 ;; C++ library is apparently not meant to be installed.
7496 (let ((out (assoc-ref outputs "out")))
7497 (with-directory-excursion "py_ext"
7498 (and (system* "python" "setup.py" "build")
7499 (system* "python" "setup.py" "install"
7500 (string-append "--prefix=" out))))))))))
7501 (inputs `(("python" ,python-wrapper))) ;for the bindings
7502 (synopsis "Fuzzy matching library for Python")
7503 (description
7504 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7505 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7506 value which can be used for similarity comparisons. Similar objects have
7507 similar hash values, which allows for the detection of similar objects by
7508 comparing their hash values. The byte stream should have a sufficient amount
7509 of complexity; for example, a byte stream of identical bytes will not generate
7510 a hash value.")
7511 (license license:asl2.0)))
7512
7513 (define-public python2-tlsh
7514 (package
7515 (inherit python-tlsh)
7516 (name "python2-tlsh")
7517 (inputs `(("python" ,python-2)))))
7518
7519 (define-public python-termcolor
7520 (package
7521 (name "python-termcolor")
7522 (version "1.1.0")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "termcolor" version))
7527 (sha256
7528 (base32
7529 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7530 (build-system python-build-system)
7531 (arguments
7532 ;; There are no tests.
7533 `(#:tests? #f))
7534 (home-page "https://pypi.python.org/pypi/termcolor")
7535 (synopsis "ANSII Color formatting for terminal output")
7536 (description
7537 "This package provides ANSII Color formatting for output in terminals.")
7538 (license license:expat)))
7539
7540 (define-public python2-termcolor
7541 (package-with-python2 python-termcolor))
7542
7543 (define-public python-libarchive-c
7544 (package
7545 (name "python-libarchive-c")
7546 (version "2.8")
7547 (source (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "libarchive-c" version))
7550 (sha256
7551 (base32
7552 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7553 (build-system python-build-system)
7554 (arguments
7555 '(#:phases (modify-phases %standard-phases
7556 (add-before
7557 'build 'reference-libarchive
7558 (lambda* (#:key inputs #:allow-other-keys)
7559 ;; Retain the absolute file name of libarchive.so.
7560 (let ((libarchive (assoc-ref inputs "libarchive")))
7561 (substitute* "libarchive/ffi.py"
7562 (("find_library\\('archive'\\)")
7563 (string-append "'" libarchive
7564 "/lib/libarchive.so'"))))))
7565 (replace 'check
7566 (lambda _ (invoke "pytest" "-vv"))))))
7567 (native-inputs
7568 `(("python-mock" ,python-mock)
7569 ("python-pytest" ,python-pytest)))
7570 (inputs
7571 `(("libarchive" ,libarchive)))
7572 (home-page "https://github.com/Changaco/python-libarchive-c")
7573 (synopsis "Python interface to libarchive")
7574 (description
7575 "This package provides Python bindings to libarchive, a C library to
7576 access possibly compressed archives in many different formats. It uses
7577 Python's @code{ctypes} foreign function interface (FFI).")
7578 (license license:lgpl2.0+)))
7579
7580 (define-public python2-libarchive-c
7581 (package-with-python2 python-libarchive-c))
7582
7583 (define-public python-file
7584 (package
7585 (inherit file)
7586 (name "python-file")
7587 (build-system python-build-system)
7588 (arguments
7589 '(#:tests? #f ;no tests
7590 #:configure-flags '("--single-version-externally-managed" "--root=/")
7591 #:phases (modify-phases %standard-phases
7592 (add-before 'build 'change-directory
7593 (lambda _
7594 (chdir "python")
7595 #t))
7596 (add-before 'build 'set-library-file-name
7597 (lambda* (#:key inputs #:allow-other-keys)
7598 (let ((file (assoc-ref inputs "file")))
7599 (substitute* "magic.py"
7600 (("find_library\\('magic'\\)")
7601 (string-append "'" file "/lib/libmagic.so'")))
7602 #t))))))
7603 (inputs `(("file" ,file)))
7604 (native-inputs (if (%current-target-system)
7605 `(("self" ,this-package))
7606 '()))
7607 (synopsis "Python bindings to the libmagic file type guesser. Note that
7608 this module and the python-magic module both provide a \"magic.py\" file;
7609 these two modules, which are different and were developed separately, both
7610 serve the same purpose: provide Python bindings for libmagic.")))
7611
7612 (define-public python2-file
7613 (package-with-python2 python-file))
7614
7615 (define-public python-debian
7616 (package
7617 (name "python-debian")
7618 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7619 (version "0.1.36")
7620 (source
7621 (origin
7622 ;; Use git-fetch, as pypi doesn't include test suite.
7623 (method git-fetch)
7624 (uri (git-reference
7625 (url home-page)
7626 (commit version)))
7627 (file-name (git-file-name name version))
7628 (sha256
7629 (base32
7630 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7631 (build-system python-build-system)
7632 (arguments
7633 `(#:phases (modify-phases %standard-phases
7634 (add-after 'unpack 'remove-debian-specific-tests
7635 ;; python-apt, apt and dpkg are not yet available in guix,
7636 ;; and these tests heavily depend on them.
7637 (lambda _
7638 (delete-file "lib/debian/tests/test_deb822.py")
7639 (delete-file "lib/debian/tests/test_debfile.py")
7640 #t)))))
7641 (propagated-inputs
7642 `(("python-six" ,python-six)
7643 ("python-chardet" ,python-chardet)))
7644 (synopsis "Debian package related modules")
7645 (description
7646 ;; XXX: Use @enumerate instead of @itemize to work around
7647 ;; <http://bugs.gnu.org/21772>.
7648 "This package provides Python modules that abstract many formats of
7649 Debian-related files, such as:
7650
7651 @enumerate
7652 @item Debtags information;
7653 @item @file{debian/changelog} files;
7654 @item packages files, pdiffs;
7655 @item control files of single or multiple RFC822-style paragraphs---e.g.
7656 @file{debian/control}, @file{.changes}, @file{.dsc};
7657 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7658 contained files and meta-information.
7659 @end enumerate\n")
7660
7661 ;; Modules are either GPLv2+ or GPLv3+.
7662 (license license:gpl3+)))
7663
7664 (define-public python2-debian
7665 (package-with-python2 python-debian))
7666
7667 (define-public python-nbformat
7668 (package
7669 (name "python-nbformat")
7670 (version "4.4.0")
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "nbformat" version))
7675 (sha256
7676 (base32
7677 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7678 (build-system python-build-system)
7679 (arguments `(#:tests? #f)) ; no test target
7680 (propagated-inputs
7681 `(("python-ipython-genutils" ,python-ipython-genutils)
7682 ("python-jsonschema" ,python-jsonschema)
7683 ("python-jupyter-core" ,python-jupyter-core)
7684 ("python-traitlets" ,python-traitlets)))
7685 (home-page "http://jupyter.org")
7686 (synopsis "Jupyter Notebook format")
7687 (description "This package provides the reference implementation of the
7688 Jupyter Notebook format and Python APIs for working with notebooks.")
7689 (license license:bsd-3)))
7690
7691 (define-public python2-nbformat
7692 (package-with-python2 python-nbformat))
7693
7694 (define-public python-bleach
7695 (package
7696 (name "python-bleach")
7697 (version "1.4.3")
7698 (source
7699 (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "bleach" version))
7702 (sha256
7703 (base32
7704 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7705 (build-system python-build-system)
7706 (propagated-inputs
7707 `(("python-html5lib" ,python-html5lib-0.9)
7708 ("python-six" ,python-six)))
7709 (native-inputs
7710 `(("python-nose" ,python-nose)))
7711 (home-page "https://github.com/jsocol/bleach")
7712 (synopsis "Whitelist-based HTML-sanitizing tool")
7713 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7714 (license license:asl2.0)))
7715
7716 (define-public python2-bleach
7717 (package-with-python2 python-bleach))
7718
7719 (define-public python-entrypoints
7720 (package
7721 (name "python-entrypoints")
7722 (version "0.3")
7723 (source
7724 (origin
7725 (method url-fetch)
7726 (uri (pypi-uri "entrypoints" version))
7727 (sha256
7728 (base32
7729 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7730 (build-system python-build-system)
7731 ;; The package does not come with a setup.py file, so we have to generate
7732 ;; one ourselves.
7733 (arguments
7734 `(#:tests? #f
7735 #:phases
7736 (modify-phases %standard-phases
7737 (add-after 'unpack 'create-setup.py
7738 (lambda _
7739 (call-with-output-file "setup.py"
7740 (lambda (port)
7741 (format port "\
7742 from setuptools import setup
7743 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7744 " ,version))))))))
7745 (home-page "https://github.com/takluyver/entrypoints")
7746 (synopsis "Discover and load entry points from installed Python packages")
7747 (description "Entry points are a way for Python packages to advertise
7748 objects with some common interface. The most common examples are
7749 @code{console_scripts} entry points, which define shell commands by
7750 identifying a Python function to run. The @code{entrypoints} module contains
7751 functions to find and load entry points.")
7752 (license license:expat)))
7753
7754 (define-public python2-entrypoints
7755 (package-with-python2 python-entrypoints))
7756
7757 (define-public python-nbconvert
7758 (package
7759 (name "python-nbconvert")
7760 (version "5.0.0b1")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "nbconvert" version))
7765 (sha256
7766 (base32
7767 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7768 (build-system python-build-system)
7769 (arguments
7770 `(;; The "bdist_egg" target is disabled by default, causing the installation
7771 ;; to fail.
7772 #:configure-flags (list "bdist_egg")
7773 ;; FIXME: 5 failures, 40 errors.
7774 #:tests? #f))
7775 ;; #:phases
7776 ;; (modify-phases %standard-phases
7777 ;; (replace 'check
7778 ;; (lambda _
7779 ;; (zero? (system* "py.test" "-v")))))
7780 (native-inputs
7781 `(("python-pytest" ,python-pytest)))
7782 (propagated-inputs
7783 `(("python-bleach" ,python-bleach)
7784 ("python-entrypoints" ,python-entrypoints)
7785 ("python-jinja2" ,python-jinja2)
7786 ("python-jupyter-core" ,python-jupyter-core)
7787 ("python-mistune" ,python-mistune)
7788 ("python-nbformat" ,python-nbformat)
7789 ("python-pygments" ,python-pygments)
7790 ("python-traitlets" ,python-traitlets)))
7791 (home-page "http://jupyter.org")
7792 (synopsis "Converting Jupyter Notebooks")
7793 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7794 notebooks to various other formats via Jinja templates. It allows you to
7795 convert an @code{.ipynb} notebook file into various static formats including:
7796
7797 @enumerate
7798 @item HTML
7799 @item LaTeX
7800 @item PDF
7801 @item Reveal JS
7802 @item Markdown (md)
7803 @item ReStructured Text (rst)
7804 @item executable script
7805 @end enumerate\n")
7806 (license license:bsd-3)))
7807
7808 (define-public python2-nbconvert
7809 (package-with-python2 python-nbconvert))
7810
7811 (define-public python-notebook
7812 (package
7813 (name "python-notebook")
7814 (version "5.7.4")
7815 (source (origin
7816 (method url-fetch)
7817 (uri (pypi-uri "notebook" version))
7818 (sha256
7819 (base32
7820 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7821 (build-system python-build-system)
7822 (arguments
7823 `(#:phases
7824 (modify-phases %standard-phases
7825 (replace 'check
7826 (lambda _
7827 ;; These tests require a browser
7828 (delete-file-recursively "notebook/tests/selenium")
7829 ;; Some tests need HOME
7830 (setenv "HOME" "/tmp")
7831 ;; This file contains "warningfilters", which are not supported
7832 ;; by this version of nose.
7833 (delete-file "setup.cfg")
7834 (with-directory-excursion "/tmp"
7835 (invoke "nosetests" "-v"))
7836 #t)))))
7837 (propagated-inputs
7838 `(("python-jupyter-core" ,python-jupyter-core)
7839 ("python-nbformat" ,python-nbformat)
7840 ("python-nbconvert" ,python-nbconvert)
7841 ("python-prometheus-client" ,python-prometheus-client)
7842 ("python-send2trash" ,python-send2trash)
7843 ("python-terminado" ,python-terminado)))
7844 (native-inputs
7845 `(("python-nose" ,python-nose)
7846 ("python-sphinx" ,python-sphinx)
7847 ("python-requests" ,python-requests)))
7848 (home-page "http://jupyter.org/")
7849 (synopsis "Web-based notebook environment for interactive computing")
7850 (description
7851 "The Jupyter HTML notebook is a web-based notebook environment for
7852 interactive computing.")
7853 (properties `((python2-variant . ,(delay python2-notebook))))
7854 (license license:bsd-3)))
7855
7856 (define-public python2-notebook
7857 (let ((base (package-with-python2
7858 (strip-python2-variant python-notebook))))
7859 (package (inherit base)
7860 (native-inputs
7861 `(("python2-mock" ,python2-mock)
7862 ,@(package-native-inputs base)))
7863 (arguments
7864 (substitute-keyword-arguments (package-arguments base)
7865 ((#:phases phases)
7866 `(modify-phases ,phases
7867 (add-before 'check 'disable-test-case
7868 ;; The test requires network access to localhost. Curiously it
7869 ;; fails with Python 2 only. Simply make the test-case return
7870 ;; immediately.
7871 (lambda _
7872 (substitute*
7873 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7874 (("formats = self.nbconvert_api") "return #")))))))))))
7875
7876 (define-public python-widgetsnbextension
7877 (package
7878 (name "python-widgetsnbextension")
7879 (version "3.4.2")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "widgetsnbextension" version))
7884 (sha256
7885 (base32
7886 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7887 (build-system python-build-system)
7888 (propagated-inputs
7889 `(("python-ipykernel" ,python-ipykernel)
7890 ("python-notebook" ,python-notebook)))
7891 (native-inputs
7892 `(("python-certifi" ,python-certifi)
7893 ("python-nose" ,python-nose)))
7894 (home-page "https://ipython.org")
7895 (synopsis "IPython HTML widgets for Jupyter")
7896 (description "This package provides interactive HTML widgets for Jupyter
7897 notebooks.")
7898 (license license:bsd-3)))
7899
7900 (define-public python2-widgetsnbextension
7901 (package-with-python2 python-widgetsnbextension))
7902
7903 (define-public python-ipywidgets
7904 (package
7905 (name "python-ipywidgets")
7906 (version "5.2.2")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "ipywidgets" version))
7911 (sha256
7912 (base32
7913 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7914 (build-system python-build-system)
7915 (propagated-inputs
7916 `(("python-ipython" ,python-ipython)
7917 ("python-traitlets" ,python-traitlets)
7918 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7919 (native-inputs
7920 `(("python-nose" ,python-nose)
7921 ("python-pytest" ,python-pytest)))
7922 (home-page "https://ipython.org")
7923 (synopsis "IPython HTML widgets for Jupyter")
7924 (description "Ipywidgets are interactive HTML widgets for Jupyter
7925 notebooks and the IPython kernel. Notebooks come alive when interactive
7926 widgets are used. Users gain control of their data and can visualize changes
7927 in the data.")
7928 (license license:bsd-3)))
7929
7930 (define-public python2-ipywidgets
7931 (package-with-python2 python-ipywidgets))
7932
7933 (define-public python-jupyter-console
7934 (package
7935 (name "python-jupyter-console")
7936 (version "6.0.0")
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "jupyter_console" version))
7941 (sha256
7942 (base32
7943 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7944 (build-system python-build-system)
7945 (propagated-inputs
7946 `(("python-ipykernel" ,python-ipykernel)
7947 ("python-jupyter-client" ,python-jupyter-client)
7948 ("python-prompt-toolkit" ,python-prompt-toolkit)
7949 ("python-pygments" ,python-pygments)))
7950 (native-inputs
7951 `(("python-nose" ,python-nose)))
7952 (home-page "https://jupyter.org")
7953 (synopsis "Jupyter terminal console")
7954 (description "This package provides a terminal-based console frontend for
7955 Jupyter kernels. It also allows for console-based interaction with non-Python
7956 Jupyter kernels such as IJulia and IRKernel.")
7957 (license license:bsd-3)))
7958
7959 (define-public python2-jupyter-console
7960 (package
7961 (name "python2-jupyter-console")
7962 (version "5.2.0")
7963 (source
7964 (origin
7965 (method url-fetch)
7966 (uri (pypi-uri "jupyter_console" version))
7967 (sha256
7968 (base32
7969 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7970 (build-system python-build-system)
7971 ;; Tests only run in an TTY.
7972 (arguments `(#:tests? #f))
7973 (propagated-inputs
7974 `(("python2-ipykernel" ,python2-ipykernel)
7975 ("python2-jupyter-client" ,python2-jupyter-client)
7976 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7977 ("python2-pygments" ,python2-pygments)))
7978 (native-inputs
7979 `(("python2-nose" ,python2-nose)))
7980 (home-page "https://jupyter.org")
7981 (synopsis "Jupyter terminal console")
7982 (description "This package provides a terminal-based console frontend for
7983 Jupyter kernels. It also allows for console-based interaction with non-Python
7984 Jupyter kernels such as IJulia and IRKernel.")
7985 (license license:bsd-3)))
7986
7987 ;; The python-ipython and python-jupyter-console require each other. To get
7988 ;; the functionality in both packages working, strip down the
7989 ;; python-jupyter-console package when using it as an input to python-ipython.
7990 (define python-jupyter-console-minimal
7991 (package
7992 (inherit python-jupyter-console)
7993 (name "python-jupyter-console-minimal")
7994 (arguments
7995 (substitute-keyword-arguments
7996 (package-arguments python-jupyter-console)
7997 ((#:phases phases)
7998 `(modify-phases ,phases
7999 (add-after 'install 'delete-bin
8000 (lambda* (#:key outputs #:allow-other-keys)
8001 ;; Delete the bin files, to avoid conflicts in profiles
8002 ;; where python-ipython and python-jupyter-console are
8003 ;; both present.
8004 (delete-file-recursively
8005 (string-append
8006 (assoc-ref outputs "out") "/bin"))))))))
8007 ;; Remove the python-ipython propagated input, to avoid the cycle
8008 (propagated-inputs
8009 (alist-delete
8010 "python-ipython"
8011 (package-propagated-inputs python-jupyter-console)))))
8012
8013 (define-public python-qtconsole
8014 (package
8015 (name "python-qtconsole")
8016 (version "4.4.3")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (pypi-uri "qtconsole" version))
8021 (sha256
8022 (base32
8023 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8024 (build-system python-build-system)
8025 (arguments
8026 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8027 ;; but we only have the LTS version 5.x. This means that there might be
8028 ;; runtime errors, but since this is a dependency of the Jupyter package,
8029 ;; and Jupyter can be used without the qtconsole we can overlook this for
8030 ;; now.
8031 `(#:tests? #f
8032 #:phases
8033 (modify-phases %standard-phases
8034 (add-before 'check 'pre-check
8035 (lambda _
8036 (setenv "QT_QPA_PLATFORM" "offscreen")
8037 #t)))))
8038 (propagated-inputs
8039 `(("python-ipykernel" ,python-ipykernel)
8040 ("python-ipython" ,python-ipython)))
8041 (native-inputs
8042 `(("python-pytest" ,python-pytest)))
8043 (home-page "http://jupyter.org")
8044 (synopsis "Jupyter Qt console")
8045 (description "This package provides a Qt-based console for Jupyter with
8046 support for rich media output.")
8047 (license license:bsd-3)))
8048
8049 (define-public python-jsbeautifier
8050 (package
8051 (name "python-jsbeautifier")
8052 (version "1.10.2")
8053 (home-page "https://github.com/beautify-web/js-beautify")
8054 (source (origin
8055 (method git-fetch)
8056 (uri (git-reference
8057 (url home-page)
8058 (commit (string-append "v" version))))
8059 (file-name (git-file-name name version))
8060 (sha256
8061 (base32
8062 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8063 (build-system python-build-system)
8064 (arguments
8065 `(#:phases (modify-phases %standard-phases
8066 (add-after 'unpack 'chdir
8067 (lambda _
8068 ;; The upstream Git repository contains all the code,
8069 ;; but this package only builds the python code.
8070 (chdir "python")
8071 #t))
8072 (add-after 'unpack 'patch-python-six-requirements
8073 (lambda _
8074 (substitute* "python/setup.py"
8075 (("six>=1.12.0")
8076 "six>=1.11.0"))
8077 #t)))))
8078 (propagated-inputs
8079 `(("python-editorconfig" ,python-editorconfig)
8080 ("python-six" ,python-six)))
8081 (native-inputs
8082 `(("python-pytest" ,python-pytest)))
8083 (synopsis "JavaScript unobfuscator and beautifier")
8084 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8085 popular online obfuscators.")
8086 (license license:expat)))
8087
8088 (define-public jupyter
8089 (package
8090 (name "jupyter")
8091 (version "1.0.0")
8092 (source
8093 (origin
8094 (method url-fetch)
8095 (uri (pypi-uri "jupyter" version))
8096 (sha256
8097 (base32
8098 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8099 (build-system python-build-system)
8100 (arguments '(#:tests? #f)) ; there are none.
8101 (propagated-inputs
8102 `(("python-ipykernel" ,python-ipykernel)
8103 ("python-ipywidgets" ,python-ipywidgets)
8104 ("python-jupyter-console" ,python-jupyter-console)
8105 ("python-nbconvert" ,python-nbconvert)
8106 ("python-notebook" ,python-notebook)
8107 ("python-qtconsole" ,python-qtconsole)))
8108 (native-search-paths
8109 (list (search-path-specification
8110 (variable "JUPYTER_PATH")
8111 (files '("share/jupyter")))))
8112 (home-page "https://jupyter.org")
8113 (synopsis "Web application for interactive documents")
8114 (description
8115 "The Jupyter Notebook is a web application that allows you to create and
8116 share documents that contain live code, equations, visualizations and
8117 explanatory text. Uses include: data cleaning and transformation, numerical
8118 simulation, statistical modeling, machine learning and much more.")
8119 (license license:bsd-3)))
8120
8121 (define-public python-chardet
8122 (package
8123 (name "python-chardet")
8124 (version "3.0.4")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "chardet" version))
8129 (sha256
8130 (base32
8131 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8132 (native-inputs
8133 `(("python-hypothesis" ,python-hypothesis)
8134 ("python-pytest" ,python-pytest)
8135 ("python-pytest-runner" ,python-pytest-runner)))
8136 (build-system python-build-system)
8137 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8138 (arguments `(#:tests? #f))
8139 (home-page "https://github.com/chardet/chardet")
8140 (synopsis "Universal encoding detector for Python 2 and 3")
8141 (description
8142 "This package provides @code{chardet}, a Python module that can
8143 automatically detect a wide range of file encodings.")
8144 (license license:lgpl2.1+)))
8145
8146 (define-public python2-chardet
8147 (package-with-python2 python-chardet))
8148
8149 (define-public python-docopt
8150 (package
8151 (name "python-docopt")
8152 (version "0.6.2")
8153 (source
8154 (origin
8155 (method url-fetch)
8156 ;; The release on PyPI does not include tests.
8157 (uri (string-append
8158 "https://github.com/docopt/docopt/archive/"
8159 version ".tar.gz"))
8160 (file-name (string-append name "-" version ".tar.gz"))
8161 (sha256
8162 (base32
8163 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8164 (build-system python-build-system)
8165 (native-inputs
8166 `(("python-pytest" ,python-pytest)))
8167 (arguments
8168 `(#:phases
8169 (modify-phases %standard-phases
8170 (replace 'check
8171 (lambda _ (invoke "py.test"))))))
8172 (home-page "http://docopt.org")
8173 (synopsis "Command-line interface description language for Python")
8174 (description "This library allows the user to define a command-line
8175 interface from a program's help message rather than specifying it
8176 programmatically with command-line parsers like @code{getopt} and
8177 @code{argparse}.")
8178 (license license:expat)))
8179
8180 (define-public python2-docopt
8181 (package-with-python2 python-docopt))
8182
8183 (define-public python-pythondialog
8184 (package
8185 (name "python-pythondialog")
8186 (version "3.4.0")
8187 (source
8188 (origin
8189 (method url-fetch)
8190 (uri (pypi-uri "pythondialog" version))
8191 (sha256
8192 (base32
8193 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8194 (build-system python-build-system)
8195 (arguments
8196 `(#:phases
8197 (modify-phases %standard-phases
8198 (add-after 'unpack 'patch-path
8199 (lambda* (#:key inputs #:allow-other-keys)
8200 (let* ((dialog (assoc-ref inputs "dialog")))
8201 ;; Since this library really wants to grovel the search path, we
8202 ;; must hardcode dialog's store path into it.
8203 (substitute* "dialog.py"
8204 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8205 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8206 #t))))
8207 #:tests? #f)) ; no test suite
8208 (propagated-inputs
8209 `(("dialog" ,dialog)))
8210 (home-page "http://pythondialog.sourceforge.net/")
8211 (synopsis "Python interface to the UNIX dialog utility")
8212 (description "A Python wrapper for the dialog utility. Its purpose is to
8213 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8214 This allows one to make simple text-mode user interfaces on Unix-like systems")
8215 (license license:lgpl2.1)
8216 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8217
8218 (define-public python2-pythondialog
8219 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8220 (package
8221 (inherit base)
8222 (version (package-version python-pythondialog))
8223 (source (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "python2-pythondialog" version))
8226 (sha256
8227 (base32
8228 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8229
8230 (define-public python-configobj
8231 (package
8232 (name "python-configobj")
8233 (version "5.0.6")
8234 (source (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "configobj" version))
8237 (sha256
8238 (base32
8239 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8240 ;; Patch setup.py so it looks for python-setuptools, which is
8241 ;; required to parse the keyword 'install_requires' in setup.py.
8242 (patches (search-patches "python-configobj-setuptools.patch"))))
8243 (build-system python-build-system)
8244 (propagated-inputs
8245 `(("python-six" ,python-six)))
8246 (synopsis "Config file reading, writing and validation")
8247 (description "ConfigObj is a simple but powerful config file reader and
8248 writer: an ini file round tripper. Its main feature is that it is very easy to
8249 use, with a straightforward programmer’s interface and a simple syntax for
8250 config files.")
8251 (home-page "https://github.com/DiffSK/configobj")
8252 (license license:bsd-3)))
8253
8254 (define-public python2-configobj
8255 (package-with-python2 python-configobj))
8256
8257 (define-public python-configargparse
8258 (package
8259 (name "python-configargparse")
8260 (version "0.14.0")
8261 (source (origin
8262 (method url-fetch)
8263 (uri (pypi-uri "ConfigArgParse" version))
8264 (sha256
8265 (base32
8266 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8267 (build-system python-build-system)
8268 (native-inputs
8269 `(("python-pyyaml" ,python-pyyaml)))
8270 (arguments
8271 `(#:phases
8272 (modify-phases %standard-phases
8273 (replace 'check
8274 (lambda _
8275 ;; Bypass setuptools-shim because one test relies on "setup.py"
8276 ;; being the first argument passed to the python call.
8277 ;;
8278 ;; NOTE: Many tests do not run because they rely on Python's
8279 ;; built-in test.test_argparse, but we remove the unit tests from
8280 ;; our Python installation.
8281 (invoke "python" "setup.py" "test"))))))
8282 (synopsis "Replacement for argparse")
8283 (description "A drop-in replacement for argparse that allows options to also
8284 be set via config files and/or environment variables.")
8285 (home-page "https://github.com/bw2/ConfigArgParse")
8286 (license license:expat)))
8287
8288 (define-public python2-configargparse
8289 (package-with-python2 python-configargparse))
8290
8291 (define-public python-argparse-manpage
8292 (package
8293 (name "python-argparse-manpage")
8294 (version "1.1")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "argparse-manpage" version))
8299 (sha256
8300 (base32
8301 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8302 (build-system python-build-system)
8303 (home-page "https://github.com/praiskup/argparse-manpage")
8304 (synopsis "Build manual page from Python's ArgumentParser object")
8305 (description
8306 "This package provides tools to build manual pages from Python's
8307 @code{ArgumentParser} object.")
8308 (license license:asl2.0)))
8309
8310 (define-public python-contextlib2
8311 (package
8312 (name "python-contextlib2")
8313 (version "0.5.5")
8314 (source
8315 (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "contextlib2" version))
8318 (sha256
8319 (base32
8320 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8321 (build-system python-build-system)
8322 (home-page "http://contextlib2.readthedocs.org/")
8323 (synopsis "Tools for decorators and context managers")
8324 (description "This module is primarily a backport of the Python
8325 3.2 contextlib to earlier Python versions. Like contextlib, it
8326 provides utilities for common tasks involving decorators and context
8327 managers. It also contains additional features that are not part of
8328 the standard library.")
8329 (license license:psfl)))
8330
8331 (define-public python2-contextlib2
8332 (package
8333 (name "python2-contextlib2")
8334 (version "0.5.5")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "contextlib2" version))
8339 (sha256
8340 (base32
8341 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8342 (build-system python-build-system)
8343 (arguments
8344 `(#:python ,python-2
8345 #:phases
8346 (modify-phases %standard-phases
8347 (replace 'check
8348 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8349 (native-inputs
8350 `(("python2-unittest2" ,python2-unittest2)))
8351 (home-page "http://contextlib2.readthedocs.org/")
8352 (synopsis "Tools for decorators and context managers")
8353 (description "This module is primarily a backport of the Python
8354 3.2 contextlib to earlier Python versions. Like contextlib, it
8355 provides utilities for common tasks involving decorators and context
8356 managers. It also contains additional features that are not part of
8357 the standard library.")
8358 (license license:psfl)))
8359
8360 (define-public python-texttable
8361 (package
8362 (name "python-texttable")
8363 (version "0.9.1")
8364 (source
8365 (origin
8366 (method url-fetch)
8367 (uri (pypi-uri "texttable" version))
8368 (sha256
8369 (base32
8370 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8371 (build-system python-build-system)
8372 (arguments '(#:tests? #f)) ; no tests
8373 (home-page "https://github.com/foutaise/texttable/")
8374 (synopsis "Python module for creating simple ASCII tables")
8375 (description "Texttable is a Python module for creating simple ASCII
8376 tables.")
8377 (license license:lgpl2.1+)))
8378
8379 (define-public python2-texttable
8380 (package-with-python2 python-texttable))
8381
8382 (define-public python-atomicwrites
8383 (package
8384 (name "python-atomicwrites")
8385 (version "1.3.0")
8386 (source (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "atomicwrites" version))
8389 (sha256
8390 (base32
8391 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8392 (build-system python-build-system)
8393 (synopsis "Atomic file writes in Python")
8394 (description "Library for atomic file writes using platform dependent tools
8395 for atomic file system operations.")
8396 (home-page "https://github.com/untitaker/python-atomicwrites")
8397 (license license:expat)))
8398
8399 (define-public python2-atomicwrites
8400 (package-with-python2 python-atomicwrites))
8401
8402 (define-public python-click-threading
8403 (package
8404 (name "python-click-threading")
8405 (version "0.4.4")
8406 (source (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "click-threading" version))
8409 (sha256
8410 (base32
8411 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8412 (build-system python-build-system)
8413 (propagated-inputs
8414 `(("python-click" ,python-click)))
8415 (synopsis "Utilities for multithreading in Click")
8416 (description "This package provides utilities for multithreading in Click
8417 applications.")
8418 (home-page "https://github.com/click-contrib/click-threading")
8419 (license license:expat)))
8420
8421 (define-public python-click-log
8422 (package
8423 (name "python-click-log")
8424 (version "0.3.2")
8425 (source (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "click-log" version))
8428 (sha256
8429 (base32
8430 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8431 (build-system python-build-system)
8432 (propagated-inputs
8433 `(("python-click" ,python-click)))
8434 (synopsis "Logging for click applications")
8435 (description "This package provides a Python library for logging Click
8436 applications.")
8437 (home-page "https://github.com/click-contrib/click-log")
8438 (license license:expat)))
8439
8440 (define-public python-apipkg
8441 (package
8442 (name "python-apipkg")
8443 (version "1.4")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "apipkg" version))
8447 (sha256
8448 (base32
8449 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8450 (build-system python-build-system)
8451 (native-inputs
8452 `(("python-pytest" ,python-pytest)))
8453 (synopsis "Namespace control and lazy-import mechanism")
8454 (description "With apipkg you can control the exported namespace of a Python
8455 package and greatly reduce the number of imports for your users. It is a small
8456 pure Python module that works on virtually all Python versions.")
8457 (home-page "https://github.com/pytest-dev/apipkg")
8458 (license license:expat)))
8459
8460 (define-public python2-apipkg
8461 (package-with-python2 python-apipkg))
8462
8463 (define-public python-execnet
8464 (package
8465 (name "python-execnet")
8466 (version "1.4.1")
8467 (source (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "execnet" version))
8470 (sha256
8471 (base32
8472 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8473 (build-system python-build-system)
8474 (arguments
8475 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8476 ;; The two test failures are caused by the lack of an `ssh` executable.
8477 ;; The test suite can be run with pytest after the 'install' phase.
8478 #:tests? #f))
8479 (native-inputs
8480 `(("python-pytest" ,python-pytest)
8481 ("python-setuptools-scm" ,python-setuptools-scm)))
8482 (propagated-inputs
8483 `(("python-apipkg" ,python-apipkg)))
8484 (synopsis "Rapid multi-Python deployment")
8485 (description "Execnet provides a share-nothing model with
8486 channel-send/receive communication for distributing execution across many
8487 Python interpreters across version, platform and network barriers. It has a
8488 minimal and fast API targeting the following uses:
8489 @enumerate
8490 @item distribute tasks to (many) local or remote CPUs
8491 @item write and deploy hybrid multi-process applications
8492 @item write scripts to administer multiple environments
8493 @end enumerate")
8494 (home-page "http://codespeak.net/execnet/")
8495 (license license:expat)))
8496
8497 (define-public python2-execnet
8498 (package-with-python2 python-execnet))
8499
8500 (define-public python-icalendar
8501 (package
8502 (name "python-icalendar")
8503 (version "4.0.3")
8504 (source (origin
8505 (method url-fetch)
8506 (uri (pypi-uri "icalendar" version))
8507 (sha256
8508 (base32
8509 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8510 (build-system python-build-system)
8511 (propagated-inputs
8512 `(("python-dateutil" ,python-dateutil)
8513 ("python-pytz" ,python-pytz)))
8514 (synopsis "Python library for parsing iCalendar files")
8515 (description "The icalendar package is a parser/generator of iCalendar
8516 files for use with Python.")
8517 (home-page "https://github.com/collective/icalendar")
8518 (license license:bsd-2)))
8519
8520 (define-public python-args
8521 (package
8522 (name "python-args")
8523 (version "0.1.0")
8524 (source (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "args" version))
8527 (sha256
8528 (base32
8529 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8530 (build-system python-build-system)
8531 (home-page "https://github.com/kennethreitz/args")
8532 (synopsis "Command-line argument parser")
8533 (description
8534 "This library provides a Python module to parse command-line arguments.")
8535 (license license:bsd-3)))
8536
8537 (define-public python2-args
8538 (package-with-python2 python-args))
8539
8540 (define-public python-clint
8541 (package
8542 (name "python-clint")
8543 (version "0.5.1")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "clint" version))
8547 (sha256
8548 (base32
8549 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8550 (build-system python-build-system)
8551 (arguments
8552 '(#:phases
8553 (modify-phases %standard-phases
8554 (replace 'check
8555 (lambda _ (invoke "py.test" "-v"))))))
8556 (native-inputs
8557 `(("python-pytest" ,python-pytest)))
8558 (propagated-inputs
8559 `(("python-args" ,python-args)))
8560 (home-page "https://github.com/kennethreitz/clint")
8561 (synopsis "Command-line interface tools")
8562 (description
8563 "Clint is a Python module filled with a set of tools for developing
8564 command-line applications, including tools for colored and indented
8565 output, progress bar display, and pipes.")
8566 (license license:isc)))
8567
8568 (define-public python2-clint
8569 (package-with-python2 python-clint))
8570
8571 (define-public python-rply
8572 (package
8573 (name "python-rply")
8574 (version "0.7.5")
8575 (source (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "rply" version))
8578 (sha256
8579 (base32
8580 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8581 (build-system python-build-system)
8582 (propagated-inputs
8583 `(("python-appdirs" ,python-appdirs)))
8584 (home-page "https://github.com/alex/rply")
8585 (synopsis "Parser generator for Python")
8586 (description
8587 "This package provides a pure Python based parser generator, that also
8588 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8589 with a new public API, and RPython support.")
8590 (license license:bsd-3)))
8591
8592 (define-public python2-rply
8593 (package-with-python2 python-rply))
8594
8595 (define-public python-hy
8596 (package
8597 (name "python-hy")
8598 (version "0.13.0")
8599 (source (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "hy" version))
8602 (sha256
8603 (base32
8604 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8605 (build-system python-build-system)
8606 (arguments
8607 '(#:phases
8608 (modify-phases %standard-phases
8609 (replace 'check
8610 (lambda _
8611 ;; Tests require write access to HOME.
8612 (setenv "HOME" "/tmp")
8613 (invoke "nosetests"))))))
8614 (native-inputs
8615 `(("python-coverage" ,python-coverage)
8616 ("python-nose" ,python-nose)))
8617 (propagated-inputs
8618 `(("python-astor" ,python-astor)
8619 ("python-clint" ,python-clint)
8620 ("python-rply" ,python-rply)))
8621 (home-page "http://hylang.org/")
8622 (synopsis "Lisp frontend to Python")
8623 (description
8624 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8625 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8626 Python at your fingertips, in Lisp form.")
8627 (license license:expat)))
8628
8629 (define-public python2-hy
8630 (package-with-python2 python-hy))
8631
8632 (define-public python2-functools32
8633 (package
8634 (name "python2-functools32")
8635 (version "3.2.3-2")
8636 (source
8637 (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "functools32" version))
8640 (sha256
8641 (base32
8642 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8643 (build-system python-build-system)
8644 (arguments
8645 `(#:python ,python-2
8646 #:tests? #f)) ; no test target
8647 (home-page "https://github.com/MiCHiLU/python-functools32")
8648 (synopsis
8649 "Backport of the functools module from Python 3.2.3")
8650 (description
8651 "This package is a backport of the @code{functools} module from Python
8652 3.2.3 for use with older versions of Python and PyPy.")
8653 (license license:expat)))
8654
8655 (define-public python2-subprocess32
8656 (package
8657 (name "python2-subprocess32")
8658 (version "3.2.7")
8659 (source (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "subprocess32" version))
8662 (sha256
8663 (base32
8664 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8665 (patches
8666 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8667 (build-system python-build-system)
8668 (arguments
8669 `(#:python ,python-2
8670 ;; The test suite fails with Python > 2.7.13:
8671 ;; import test.support
8672 ;; ImportError: No module named support
8673 #:tests? #f
8674 #:phases
8675 (modify-phases %standard-phases
8676 (add-after 'unpack 'patch-/bin/sh
8677 (lambda _
8678 (substitute* '("subprocess32.py"
8679 "test_subprocess32.py")
8680 (("/bin/sh") (which "sh")))
8681 #t)))))
8682 (home-page "https://github.com/google/python-subprocess32")
8683 (synopsis "Backport of the subprocess module from Python 3.2")
8684 (description
8685 "This is a backport of the @code{subprocess} standard library module
8686 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8687 new features. On POSIX systems it is guaranteed to be reliable when used
8688 in threaded applications. It includes timeout support from Python 3.3 but
8689 otherwise matches 3.2’s API.")
8690 (license license:psfl)))
8691
8692 (define-public python2-futures
8693 (package
8694 (name "python2-futures")
8695 (version "3.2.0")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "futures" version))
8700 (sha256
8701 (base32
8702 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8703 (build-system python-build-system)
8704 (arguments
8705 `(#:python ,python-2
8706 #:phases
8707 (modify-phases %standard-phases
8708 (replace 'check
8709 (lambda _
8710 (invoke "python" "test_futures.py")
8711 #t)))))
8712 (home-page "https://github.com/agronholm/pythonfutures")
8713 (synopsis
8714 "Backport of the concurrent.futures package from Python 3.2")
8715 (description
8716 "The concurrent.futures module provides a high-level interface for
8717 asynchronously executing callables. This package backports the
8718 concurrent.futures package from Python 3.2")
8719 (license license:bsd-3)))
8720
8721 (define-public python-promise
8722 (package
8723 (name "python-promise")
8724 (version "0.4.2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "promise" version))
8729 (sha256
8730 (base32
8731 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8732 (build-system python-build-system)
8733 ;; Tests wants python-futures, which is a python2 only program, and
8734 ;; can't be found by python-promise at test time.
8735 (arguments `(#:tests? #f))
8736 (home-page "https://github.com/syrusakbary/promise")
8737 (synopsis "Promises/A+ implementation for Python")
8738 (description
8739 "Promises/A+ implementation for Python")
8740 (properties `((python2-variant . ,(delay python2-promise))))
8741 (license license:expat)))
8742
8743 (define-public python2-promise
8744 (let ((promise (package-with-python2
8745 (strip-python2-variant python-promise))))
8746 (package (inherit promise)
8747 (arguments (substitute-keyword-arguments (package-arguments promise)
8748 ((#:tests? _) #t)))
8749 (native-inputs
8750 `(("python2-futures" ,python2-futures)
8751 ("python2-pytest" ,python2-pytest)
8752 ,@(package-native-inputs promise))))))
8753
8754 (define-public python-progressbar33
8755 (package
8756 (name "python-progressbar33")
8757 (version "2.4")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "progressbar33" version))
8762 (sha256
8763 (base32
8764 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8765 (build-system python-build-system)
8766 (home-page "http://github.com/germangh/python-progressbar")
8767 (synopsis "Text progress bar library for Python")
8768 (description
8769 "This package provides a text progress bar library for Python. This
8770 version only differs from the original @code{progressbar} package in that it
8771 uses relative package imports instead of absolute imports, which is necessary
8772 for the module to work under Python 3.3.")
8773 ;; Either or both of these licenses may be selected.
8774 (license (list license:lgpl2.1+ license:bsd-3))))
8775
8776 (define-public python-colorama
8777 (package
8778 (name "python-colorama")
8779 (version "0.3.9")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "colorama" version))
8784 (sha256
8785 (base32
8786 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8787 (build-system python-build-system)
8788 (synopsis "Colored terminal text rendering for Python")
8789 (description "Colorama is a Python library for rendering colored terminal
8790 text.")
8791 (home-page "https://pypi.python.org/pypi/colorama")
8792 (license license:bsd-3)))
8793
8794 (define-public python2-colorama
8795 (package-with-python2 python-colorama))
8796
8797 (define-public python-rsa
8798 (package
8799 (name "python-rsa")
8800 (version "3.4.2")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "rsa" version))
8805 (sha256
8806 (base32
8807 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8808 (build-system python-build-system)
8809 (propagated-inputs
8810 `(("python-pyasn1" ,python-pyasn1)))
8811 (synopsis "Pure-Python RSA implementation")
8812 (description "Python-RSA is a pure-Python RSA implementation. It supports
8813 encryption and decryption, signing and verifying signatures, and key
8814 generation according to PKCS#1 version 1.5. It can be used as a Python
8815 library as well as on the command line.")
8816 (home-page "https://stuvel.eu/rsa")
8817 (license license:asl2.0)))
8818
8819 (define-public python2-rsa
8820 (package-with-python2 python-rsa))
8821
8822 (define-public python-pluggy
8823 (package
8824 (name "python-pluggy")
8825 (version "0.11.0")
8826 (source
8827 (origin
8828 (method url-fetch)
8829 (uri (pypi-uri "pluggy" version))
8830 (sha256
8831 (base32
8832 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8833 (build-system python-build-system)
8834 (native-inputs
8835 `(("python-setuptools-scm" ,python-setuptools-scm)))
8836 (synopsis "Plugin and hook calling mechanism for Python")
8837 (description "Pluggy is an extraction of the plugin manager as used by
8838 Pytest but stripped of Pytest specific details.")
8839 (home-page "https://pypi.python.org/pypi/pluggy")
8840 (license license:expat)))
8841
8842 (define-public python2-pluggy
8843 (package-with-python2 python-pluggy))
8844
8845 (define-public python-tox
8846 (package
8847 (name "python-tox")
8848 (version "2.8.1")
8849 (source
8850 (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "tox" version))
8853 (sha256
8854 (base32
8855 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8856 (build-system python-build-system)
8857 (arguments
8858 ;; FIXME: Tests require pytest-timeout, which itself requires
8859 ;; pytest>=2.8.0 for installation.
8860 '(#:tests? #f))
8861 (propagated-inputs
8862 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8863 ("python-py" ,python-py)
8864 ("python-virtualenv" ,python-virtualenv)))
8865 (native-inputs
8866 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8867 ("python-pytest" ,python-pytest) ; >= 2.3.5
8868 ("python-setuptools-scm" ,python-setuptools-scm)))
8869 (home-page "http://tox.testrun.org/")
8870 (synopsis "Virtualenv-based automation of test activities")
8871 (description "Tox is a generic virtualenv management and test command line
8872 tool. It can be used to check that a package installs correctly with
8873 different Python versions and interpreters, or run tests in each type of
8874 supported environment, or act as a frontend to continuous integration
8875 servers.")
8876 (license license:expat)))
8877
8878 (define-public python2-tox
8879 (package-with-python2 python-tox))
8880
8881 (define-public python-jmespath
8882 (package
8883 (name "python-jmespath")
8884 (version "0.9.3")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (pypi-uri "jmespath" version))
8889 (sha256
8890 (base32
8891 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8892 (build-system python-build-system)
8893 (native-inputs
8894 `(("python-nose" ,python-nose)))
8895 (synopsis "JSON Matching Expressions")
8896 (description "JMESPath (pronounced “james path”) is a Python library that
8897 allows one to declaratively specify how to extract elements from a JSON
8898 document.")
8899 (home-page "https://github.com/jmespath/jmespath.py")
8900 (license license:expat)))
8901
8902 (define-public python2-jmespath
8903 (package-with-python2 python-jmespath))
8904
8905 (define-public python-botocore
8906 (package
8907 (name "python-botocore")
8908 (version "1.12.149")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "botocore" version))
8913 (sha256
8914 (base32
8915 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8916 (build-system python-build-system)
8917 (arguments
8918 ;; FIXME: Many tests are failing.
8919 '(#:tests? #f))
8920 (propagated-inputs
8921 `(("python-dateutil" ,python-dateutil)
8922 ("python-docutils" ,python-docutils)
8923 ("python-jmespath" ,python-jmespath)))
8924 (native-inputs
8925 `(("python-mock" ,python-mock)
8926 ("python-nose" ,python-nose)
8927 ("behave" ,behave)
8928 ("python-tox" ,python-tox)
8929 ("python-urllib3" ,python-urllib3)
8930 ("python-wheel" ,python-wheel)))
8931 (home-page "https://github.com/boto/botocore")
8932 (synopsis "Low-level interface to AWS")
8933 (description "Botocore is a Python library that provides a low-level
8934 interface to the Amazon Web Services (AWS) API.")
8935 (license license:asl2.0)))
8936
8937 (define-public python2-botocore
8938 (package-with-python2 python-botocore))
8939
8940 (define-public python-xdo
8941 (package
8942 (name "python-xdo")
8943 (version "0.3")
8944 (source (origin
8945 (method url-fetch)
8946 (uri (string-append
8947 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8948 "python-xdo_" version ".orig.tar.gz"))
8949 (sha256
8950 (base32
8951 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8952 (build-system python-build-system)
8953 (arguments
8954 '(#:phases
8955 (modify-phases %standard-phases
8956 (add-before 'install 'patch-libxdo-path
8957 ;; Hardcode the path of dynamically loaded libxdo library.
8958 (lambda* (#:key inputs #:allow-other-keys)
8959 (let ((libxdo (string-append
8960 (assoc-ref inputs "xdotool")
8961 "/lib/libxdo.so")))
8962 (substitute* "xdo/_xdo.py"
8963 (("find_library\\(\"xdo\"\\)")
8964 (simple-format #f "\"~a\"" libxdo)))
8965 #t))))
8966 #:tests? #f)) ; no tests provided
8967 (propagated-inputs
8968 `(("python-six" ,python-six)))
8969 (inputs
8970 `(("xdotool" ,xdotool)
8971 ("libX11" ,libx11)))
8972 (home-page "https://tracker.debian.org/pkg/python-xdo")
8973 (synopsis "Python library for simulating X11 keyboard/mouse input")
8974 (description "Provides bindings to libxdo for manipulating X11 via simulated
8975 input. (Note that this is mostly a legacy library; you may wish to look at
8976 python-xdo for newer bindings.)")
8977 (license license:bsd-3)))
8978
8979 (define-public python2-xdo
8980 (package-with-python2 python-xdo))
8981
8982 (define-public python-mako
8983 (package
8984 (name "python-mako")
8985 (version "1.1.0")
8986 (source
8987 (origin
8988 (method url-fetch)
8989 (uri (pypi-uri "Mako" version))
8990 (sha256
8991 (base32
8992 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8993 (build-system python-build-system)
8994 (arguments
8995 `(#:phases (modify-phases %standard-phases
8996 (replace 'check
8997 (lambda _
8998 (invoke "pytest" "-vv"))))))
8999 (propagated-inputs
9000 `(("python-markupsafe" ,python-markupsafe)))
9001 (native-inputs
9002 `(("python-mock" ,python-mock)
9003 ("python-pytest" ,python-pytest)))
9004 (home-page "https://www.makotemplates.org/")
9005 (synopsis "Templating language for Python")
9006 (description "Mako is a templating language for Python that compiles
9007 templates into Python modules.")
9008 (license license:expat)))
9009
9010 (define-public python2-mako
9011 (package-with-python2 python-mako))
9012
9013 (define-public python-waitress
9014 (package
9015 (name "python-waitress")
9016 (version "1.1.0")
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "waitress" version))
9021 (patches (search-patches "python-waitress-fix-tests.patch"))
9022 (sha256
9023 (base32
9024 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9025 (build-system python-build-system)
9026 (home-page "https://github.com/Pylons/waitress")
9027 (synopsis "Waitress WSGI server")
9028 (description "Waitress is meant to be a production-quality pure-Python WSGI
9029 server with very acceptable performance.")
9030 (license license:zpl2.1)))
9031
9032 (define-public python2-waitress
9033 (package-with-python2 python-waitress))
9034
9035 (define-public python-pyquery
9036 (package
9037 (name "python-pyquery")
9038 (version "1.2.17")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "pyquery" version))
9043 (sha256
9044 (base32
9045 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9046 (build-system python-build-system)
9047 (native-inputs
9048 `(("python-webob" ,python-webob)
9049 ("python-webtest" ,python-webtest)))
9050 (propagated-inputs
9051 `(("python-lxml" ,python-lxml)
9052 ("python-cssselect" ,python-cssselect)))
9053 (home-page "https://github.com/gawel/pyquery")
9054 (synopsis "Make jQuery-like queries on xml documents")
9055 (description "pyquery allows you to make jQuery queries on xml documents.
9056 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9057 fast xml and html manipulation.")
9058 (license license:bsd-3)))
9059
9060 (define-public python-anyjson
9061 (package
9062 (name "python-anyjson")
9063 (version "0.3.3")
9064 (source
9065 (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "anyjson" version))
9068 (sha256
9069 (base32
9070 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9071 (build-system python-build-system)
9072 (arguments
9073 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9074 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9075 ;; whatever) so this transformation needs to be done before the tests
9076 ;; can be run. Maybe we could add a build step to transform beforehand
9077 ;; but it could be annoying/difficult.
9078 ;; We can enable tests for the Python 2 version, though, and do below.
9079 #:tests? #f))
9080 (home-page "https://bitbucket.org/runeh/anyjson/")
9081 (synopsis
9082 "Wraps best available JSON implementation in a common interface")
9083 (description
9084 "Anyjson loads whichever is the fastest JSON module installed
9085 and provides a uniform API regardless of which JSON implementation is used.")
9086 (license license:bsd-3)
9087 (properties `((python2-variant . ,(delay python2-anyjson))))))
9088
9089 (define-public python2-anyjson
9090 (let ((anyjson (package-with-python2
9091 (strip-python2-variant python-anyjson))))
9092 (package
9093 (inherit anyjson)
9094 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9095 #:tests? #t
9096 ,@(package-arguments anyjson)))
9097 (native-inputs `(("python2-nose" ,python2-nose))))))
9098
9099 (define-public python-amqp
9100 (package
9101 (name "python-amqp")
9102 (version "2.3.2")
9103 (source
9104 (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "amqp" version))
9107 (sha256
9108 (base32
9109 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9110 (build-system python-build-system)
9111 (native-inputs
9112 `(("python-case" ,python-case)
9113 ("python-pytest-sugar" ,python-pytest-sugar)
9114 ("python-mock" ,python-mock)))
9115 (propagated-inputs
9116 `(("python-vine" ,python-vine)))
9117 (home-page "https://github.com/celery/py-amqp")
9118 (synopsis
9119 "Low-level AMQP client for Python (fork of amqplib)")
9120 (description
9121 "This is a fork of amqplib which was originally written by Barry Pederson.
9122 It is maintained by the Celery project, and used by kombu as a pure python
9123 alternative when librabbitmq is not available.")
9124 (license license:lgpl2.1+)
9125 (properties `((python2-variant . ,(delay python2-amqp))))))
9126
9127 (define-public python2-amqp
9128 (let ((amqp (package-with-python2
9129 (strip-python2-variant python-amqp))))
9130 (package
9131 (inherit amqp)
9132 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9133 ;; unmaintained. Weirdly, does not do this on the python 3
9134 ;; version?
9135 #:tests? #f
9136 ,@(package-arguments amqp))))))
9137
9138 (define-public python-txamqp
9139 (package
9140 (name "python-txamqp")
9141 (version "0.8.2")
9142 (source
9143 (origin
9144 (method url-fetch)
9145 (uri (pypi-uri "txAMQP" version))
9146 (sha256
9147 (base32
9148 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9149 (build-system python-build-system)
9150 (propagated-inputs
9151 `(("python-six" ,python-six)
9152 ("python-twisted" ,python-twisted)))
9153 (home-page "https://github.com/txamqp/txamqp")
9154 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9155 (description
9156 "This package provides a Python library for communicating with AMQP peers
9157 and brokers using the asynchronous networking framework Twisted. It contains
9158 all the necessary code to connect, send and receive messages to/from an
9159 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9160 also includes support for using Thrift RPC over AMQP in Twisted
9161 applications.")
9162 (license license:asl2.0)))
9163
9164 (define-public python2-txamqp
9165 (package-with-python2 python-txamqp))
9166
9167 (define-public python-kombu
9168 (package
9169 (name "python-kombu")
9170 (version "4.2.2")
9171 (source
9172 (origin
9173 (method url-fetch)
9174 (uri (pypi-uri "kombu" version))
9175 (sha256
9176 (base32
9177 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9178 (build-system python-build-system)
9179 (native-inputs
9180 `(("python-mock" ,python-mock)
9181 ("python-case" ,python-case)
9182 ("python-pyro4" ,python-pyro4)
9183 ("python-pytest-sugar" ,python-pytest-sugar)
9184 ("python-pytz" ,python-pytz)))
9185 (propagated-inputs
9186 `(("python-anyjson" ,python-anyjson)
9187 ("python-amqp" ,python-amqp)
9188 ("python-redis" ,python-redis)))
9189 (home-page "https://kombu.readthedocs.io")
9190 (synopsis "Message passing library for Python")
9191 (description "The aim of Kombu is to make messaging in Python as easy as
9192 possible by providing an idiomatic high-level interface for the AMQ protocol,
9193 and also provide proven and tested solutions to common messaging problems.
9194 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9195 message orientation, queuing, routing, reliability and security, for which the
9196 RabbitMQ messaging server is the most popular implementation.")
9197 (license license:bsd-3)
9198 (properties `((python2-variant . ,(delay python2-kombu))))))
9199
9200 (define-public python2-kombu
9201 (let ((kombu (package-with-python2
9202 (strip-python2-variant python-kombu))))
9203 (package
9204 (inherit kombu)
9205 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9206 ;; It works fine on the python3 variant.
9207 #:tests? #f
9208 ,@(package-arguments kombu)))
9209 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9210 ,@(package-native-inputs kombu))))))
9211
9212 (define-public python-billiard
9213 (package
9214 (name "python-billiard")
9215 (version "3.5.0.5")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "billiard" version))
9220 (sha256
9221 (base32
9222 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9223 (build-system python-build-system)
9224 (native-inputs
9225 `(("python-case" ,python-case)
9226 ("python-pytest" ,python-pytest)))
9227 (home-page "https://github.com/celery/billiard")
9228 (synopsis
9229 "Python multiprocessing fork with improvements and bugfixes")
9230 (description
9231 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9232 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9233 pyprocessing package. This standalone variant is intended to be compatible with
9234 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9235 (license license:bsd-3)
9236 (properties `((python2-variant . ,(delay python2-billiard))))))
9237
9238 (define-public python2-billiard
9239 (let ((billiard (package-with-python2
9240 (strip-python2-variant python-billiard))))
9241 (package
9242 (inherit billiard)
9243 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9244 ("python2-mock" ,python2-mock)
9245 ,@(package-native-inputs billiard))))))
9246
9247 (define-public python-celery
9248 (package
9249 (name "python-celery")
9250 (version "4.2.1")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "celery" version))
9255 (sha256
9256 (base32
9257 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9258 (build-system python-build-system)
9259 (arguments
9260 '(;; TODO The tests fail with Python 3.7
9261 ;; https://github.com/celery/celery/issues/4849
9262 #:tests? #f
9263 #:phases
9264 (modify-phases %standard-phases
9265 (add-after 'unpack 'patch-requirements
9266 (lambda _
9267 (substitute* "requirements/test.txt"
9268 (("pytest>=3\\.0,<3\\.3")
9269 "pytest>=3.0"))
9270 #t)))))
9271 (native-inputs
9272 `(("python-case" ,python-case)
9273 ("python-pytest" ,python-pytest)))
9274 (propagated-inputs
9275 `(("python-pytz" ,python-pytz)
9276 ("python-billiard" ,python-billiard)
9277 ("python-kombu" ,python-kombu)))
9278 (home-page "https://celeryproject.org")
9279 (synopsis "Distributed Task Queue")
9280 (description "Celery is an asynchronous task queue/job queue based on
9281 distributed message passing. It is focused on real-time operation, but
9282 supports scheduling as well. The execution units, called tasks, are executed
9283 concurrently on a single or more worker servers using multiprocessing,
9284 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9285 synchronously (wait until ready).")
9286 (license license:bsd-3)
9287 (properties `((python2-variant . ,(delay python2-celery))))))
9288
9289 (define-public python2-celery
9290 (let ((celery (package-with-python2
9291 (strip-python2-variant python-celery))))
9292 (package
9293 (inherit celery)
9294 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9295 ("python2-mock" ,python2-mock)
9296 ,@(package-native-inputs celery))))))
9297
9298 (define-public python-translitcodec
9299 (package
9300 (name "python-translitcodec")
9301 (version "0.4.0")
9302 (source
9303 (origin
9304 (method url-fetch)
9305 (uri (pypi-uri "translitcodec" version))
9306 (sha256
9307 (base32
9308 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9309 (build-system python-build-system)
9310 (arguments
9311 `(#:tests? #f)) ; no tests provided
9312 (home-page
9313 "https://github.com/claudep/translitcodec")
9314 (synopsis
9315 "Unicode to 8-bit charset transliteration codec")
9316 (description
9317 "This package contains codecs for transliterating ISO 10646 texts into
9318 best-effort representations using smaller coded character sets (ASCII,
9319 ISO 8859, etc.).")
9320 (license license:expat)))
9321
9322 (define-public python2-translitcodec
9323 (package-with-python2 python-translitcodec))
9324
9325 (define-public python-editor
9326 (package
9327 (name "python-editor")
9328 (version "0.5")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "python-editor" version))
9333 (sha256
9334 (base32
9335 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9336 (build-system python-build-system)
9337 (home-page
9338 "https://github.com/fmoo/python-editor")
9339 (synopsis
9340 "Programmatically open an editor, capture the result")
9341 (description
9342 "python-editor is a library that provides the editor module for
9343 programmatically interfacing with your system's $EDITOR.")
9344 (license license:asl2.0)))
9345
9346 (define-public python2-editor
9347 (package-with-python2 python-editor))
9348
9349 (define-public python-vobject
9350 (package
9351 (name "python-vobject")
9352 (version "0.9.5")
9353 (source (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "vobject" version))
9356 (sha256
9357 (base32
9358 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9359 (build-system python-build-system)
9360 (arguments
9361 '(;; The test suite relies on some non-portable Windows interfaces.
9362 #:tests? #f))
9363 (propagated-inputs
9364 `(("python-dateutil" ,python-dateutil)
9365 ("python-pyicu" ,python-pyicu)))
9366 (synopsis "Parse and generate vCard and vCalendar files")
9367 (description "Vobject is intended to be a full featured Python package for
9368 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9369 are supported and well tested. vCard 3.0 files are supported, and all data
9370 should be imported, but only a few components are understood in a sophisticated
9371 way.")
9372 (home-page "http://eventable.github.io/vobject/")
9373 (license license:asl2.0)))
9374
9375 (define-public python2-vobject
9376 (package-with-python2 python-vobject))
9377
9378 (define-public python-munkres
9379 (package
9380 (name "python-munkres")
9381 (version "1.0.8")
9382 (source (origin
9383 (method url-fetch)
9384 (uri (pypi-uri "munkres" version))
9385 (sha256
9386 (base32
9387 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9388 (build-system python-build-system)
9389 (arguments
9390 '(#:tests? #f)) ; no test suite
9391 (home-page "http://software.clapper.org/munkres/")
9392 (synopsis "Implementation of the Munkres algorithm")
9393 (description "The Munkres module provides an implementation of the Munkres
9394 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9395 useful for solving the Assignment Problem.")
9396 (license license:bsd-3)))
9397
9398 (define-public python2-munkres
9399 (package-with-python2 python-munkres))
9400
9401 (define-public python-whoosh
9402 (package
9403 (name "python-whoosh")
9404 (version "2.7.4")
9405 (source
9406 (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "Whoosh" version))
9409 (sha256
9410 (base32
9411 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9412 (build-system python-build-system)
9413 (native-inputs
9414 `(("python-pytest" ,python-pytest)))
9415 (home-page "https://bitbucket.org/mchaput/whoosh")
9416 (synopsis "Full text indexing, search, and spell checking library")
9417 (description
9418 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9419 checking library.")
9420 (license license:bsd-2)))
9421
9422 (define-public python2-whoosh
9423 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9424 (package (inherit whoosh)
9425 (propagated-inputs
9426 `(("python2-backport-ssl-match-hostname"
9427 ,python2-backport-ssl-match-hostname)
9428 ,@(package-propagated-inputs whoosh))))))
9429
9430 (define-public python-pathlib
9431 (package
9432 (name "python-pathlib")
9433 (version "1.0.1")
9434 (source (origin
9435 (method url-fetch)
9436 (uri (pypi-uri "pathlib" version))
9437 (sha256
9438 (base32
9439 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9440 (build-system python-build-system)
9441 ;; The tests depend on the internal "test" module, which does not provide
9442 ;; a stable interface.
9443 (arguments `(#:tests? #f))
9444 (home-page "https://pathlib.readthedocs.org/")
9445 (synopsis "Object-oriented file system paths")
9446 (description "Pathlib offers a set of classes to handle file system paths.
9447 It offers the following advantages over using string objects:
9448
9449 @enumerate
9450 @item No more cumbersome use of os and os.path functions. Everything can
9451 be done easily through operators, attribute accesses, and method calls.
9452 @item Embodies the semantics of different path types. For example,
9453 comparing Windows paths ignores casing.
9454 @item Well-defined semantics, eliminating any inconsistencies or
9455 ambiguities (forward vs. backward slashes, etc.).
9456 @end enumerate
9457
9458 Note: In Python 3.4, pathlib is now part of the standard library. For other
9459 Python versions please consider python-pathlib2 instead, which tracks the
9460 standard library module. This module (python-pathlib) isn't maintained
9461 anymore.")
9462 (license license:expat)))
9463
9464 (define-public python2-pathlib
9465 (package-with-python2 python-pathlib))
9466
9467 (define-public python2-pathlib2
9468 (package
9469 (name "python2-pathlib2")
9470 (version "2.3.3")
9471 (source (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "pathlib2" version))
9474 (sha256
9475 (base32
9476 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9477 (build-system python-build-system)
9478 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9479 ;; version is 3.4 which already includes this package as part of the
9480 ;; standard library.
9481 (arguments
9482 `(#:python ,python-2))
9483 (propagated-inputs
9484 `(("python2-scandir" ,python2-scandir)
9485 ("python2-six" ,python2-six)))
9486 (home-page "https://pypi.python.org/pypi/pathlib2/")
9487 (synopsis "Object-oriented file system paths - backport of standard
9488 pathlib module")
9489 (description "The goal of pathlib2 is to provide a backport of standard
9490 pathlib module which tracks the standard library module, so all the newest
9491 features of the standard pathlib can be used also on older Python versions.
9492
9493 Pathlib offers a set of classes to handle file system paths. It offers the
9494 following advantages over using string objects:
9495
9496 @enumerate
9497 @item No more cumbersome use of os and os.path functions. Everything can
9498 be done easily through operators, attribute accesses, and method calls.
9499 @item Embodies the semantics of different path types. For example,
9500 comparing Windows paths ignores casing.
9501 @item Well-defined semantics, eliminating any inconsistencies or
9502 ambiguities (forward vs. backward slashes, etc.).
9503 @end enumerate")
9504 (license license:expat)))
9505
9506 (define-public python2-pathlib2-bootstrap
9507 (hidden-package
9508 (package
9509 (inherit python2-pathlib2)
9510 (name "python2-pathlib2-bootstrap")
9511 (propagated-inputs
9512 `(("python2-scandir" ,python2-scandir)
9513 ("python2-six" ,python2-six-bootstrap))))))
9514
9515 (define-public python-jellyfish
9516 (package
9517 (name "python-jellyfish")
9518 (version "0.5.6")
9519 (source (origin
9520 (method url-fetch)
9521 (uri (pypi-uri "jellyfish" version))
9522 (sha256
9523 (base32
9524 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9525 (build-system python-build-system)
9526 (native-inputs
9527 `(("python-pytest" ,python-pytest)))
9528 (home-page "https://github.com/jamesturk/jellyfish")
9529 (synopsis "Approximate and phonetic matching of strings")
9530 (description "Jellyfish uses a variety of string comparison and phonetic
9531 encoding algorithms to do fuzzy string matching.")
9532 (license license:bsd-2)
9533 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9534
9535 (define-public python2-jellyfish
9536 (let ((jellyfish (package-with-python2
9537 (strip-python2-variant python-jellyfish))))
9538 (package (inherit jellyfish)
9539 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9540 ,@(package-native-inputs jellyfish))))))
9541
9542 (define-public python2-unicodecsv
9543 (package
9544 (name "python2-unicodecsv")
9545 (version "0.14.1")
9546 (source (origin
9547 (method url-fetch)
9548 ;; The test suite is not included in the PyPi release.
9549 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9550 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9551 "archive/" version ".tar.gz"))
9552 (file-name (string-append name "-" version ".tar.gz"))
9553 (sha256
9554 (base32
9555 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9556 (build-system python-build-system)
9557 (arguments
9558 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9559 #:python ,python-2))
9560 (native-inputs
9561 `(("python2-unittest2" ,python2-unittest2)))
9562 (home-page "https://github.com/jdunck/python-unicodecsv")
9563 (synopsis "Unicode CSV module for Python 2")
9564 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9565 module, adding support for Unicode strings.")
9566 (license license:bsd-2)))
9567
9568 (define-public python-rarfile
9569 (package
9570 (name "python-rarfile")
9571 (version "2.8")
9572 (source (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "rarfile" version))
9575 (sha256
9576 (base32
9577 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9578 (build-system python-build-system)
9579 (arguments
9580 '(#:phases
9581 (modify-phases %standard-phases
9582 (replace 'check
9583 ;; Many tests fail, but the installation proceeds.
9584 (lambda _ (invoke "make" "-C" "test" "test"))))))
9585 (native-inputs
9586 `(("which" ,which))) ; required for tests
9587 (propagated-inputs
9588 `(("libarchive" ,libarchive)))
9589 (home-page "https://github.com/markokr/rarfile")
9590 (synopsis "RAR archive reader for Python")
9591 (description "This is Python module for RAR archive reading. The interface
9592 is made as zipfile like as possible.")
9593 (license license:isc)))
9594
9595 (define-public python2-rarfile
9596 (package-with-python2 python-rarfile))
9597
9598 (define-public python-magic
9599 (package
9600 (name "python-magic")
9601 (version "0.4.15")
9602 (source
9603 (origin
9604 (method url-fetch)
9605 (uri (pypi-uri "python-magic" version))
9606 (sha256
9607 (base32
9608 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9609 (file-name (string-append name "-" version "-checkout"))))
9610 (build-system python-build-system)
9611 (arguments
9612 ;; The tests are unreliable, so don't run them. The tests fail
9613 ;; under Python3 because they were written for Python2 and
9614 ;; contain import statements that do not work in Python3. One of
9615 ;; the tests fails under Python2 because its assertions are
9616 ;; overly stringent; it relies on comparing output strings which
9617 ;; are brittle and can change depending on the version of
9618 ;; libmagic being used and the system on which the test is
9619 ;; running. In my case, under GuixSD 0.10.0, only one test
9620 ;; failed, and it seems to have failed only because the version
9621 ;; of libmagic that is packaged in Guix outputs a slightly
9622 ;; different (but not wrong) string than the one that the test
9623 ;; expected.
9624 '(#:tests? #f
9625 #:phases (modify-phases %standard-phases
9626 ;; Replace a specific method call with a hard-coded
9627 ;; path to the necessary libmagic.so file in the
9628 ;; store. If we don't do this, then the method call
9629 ;; will fail to find the libmagic.so file, which in
9630 ;; turn will cause any application using
9631 ;; python-magic to fail.
9632 (add-before 'build 'hard-code-path-to-libmagic
9633 (lambda* (#:key inputs #:allow-other-keys)
9634 (let ((file (assoc-ref inputs "file")))
9635 (substitute* "magic.py"
9636 (("ctypes.util.find_library\\('magic'\\)")
9637 (string-append "'" file "/lib/libmagic.so'")))
9638 #t)))
9639 (add-before 'install 'disable-egg-compression
9640 (lambda _
9641 (let ((port (open-file "setup.cfg" "a")))
9642 (display "\n[easy_install]\nzip_ok = 0\n"
9643 port)
9644 (close-port port)
9645 #t))))))
9646 (inputs
9647 ;; python-magic needs to be able to find libmagic.so.
9648 `(("file" ,file)))
9649 (home-page
9650 "https://github.com/ahupp/python-magic")
9651 (synopsis
9652 "File type identification using libmagic")
9653 (description
9654 "This module uses ctypes to access the libmagic file type
9655 identification library. It makes use of the local magic database and
9656 supports both textual and MIME-type output. Note that this module and
9657 the python-file module both provide a \"magic.py\" file; these two
9658 modules, which are different and were developed separately, both serve
9659 the same purpose: to provide Python bindings for libmagic.")
9660 (license license:expat)))
9661
9662 (define-public python2-magic
9663 (package-with-python2 python-magic))
9664
9665 (define-public python2-s3cmd
9666 (package
9667 (name "python2-s3cmd")
9668 (version "1.6.1")
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9673 "s3cmd-" version ".tar.gz"))
9674 (sha256
9675 (base32
9676 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9677 (build-system python-build-system)
9678 (arguments
9679 ;; s3cmd is written for python2 only and contains no tests.
9680 `(#:python ,python-2
9681 #:tests? #f))
9682 (propagated-inputs
9683 `(("python2-dateutil" ,python2-dateutil)
9684 ;; The python-file package also provides a magic.py module.
9685 ;; This is an unfortunate state of affairs; however, s3cmd
9686 ;; fails to install if it cannot find specifically the
9687 ;; python-magic package. Thus we include it, instead of using
9688 ;; python-file. Ironically, s3cmd sometimes works better
9689 ;; without libmagic bindings at all:
9690 ;; https://github.com/s3tools/s3cmd/issues/198
9691 ("python2-magic" ,python2-magic)))
9692 (home-page "http://s3tools.org/s3cmd")
9693 (synopsis "Command line tool for S3-compatible storage services")
9694 (description
9695 "S3cmd is a command line tool for uploading, retrieving and managing data
9696 in storage services that are compatible with the Amazon Simple Storage
9697 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9698 GnuPG encryption, and more. It also supports management of Amazon's
9699 CloudFront content delivery network.")
9700 (license license:gpl2+)))
9701
9702 (define-public python-pkgconfig
9703 (package
9704 (name "python-pkgconfig")
9705 (version "1.3.1")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "pkgconfig" version))
9710 (sha256
9711 (base32
9712 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9713 (build-system python-build-system)
9714 (native-inputs
9715 `(("python-nose" ,python-nose)))
9716 (inputs
9717 `(("pkg-config" ,pkg-config)))
9718 (arguments
9719 `(#:phases
9720 (modify-phases %standard-phases
9721 (add-before 'build 'patch
9722 ;; Hard-code the path to pkg-config.
9723 (lambda _
9724 (substitute* "pkgconfig/pkgconfig.py"
9725 (("cmd = 'pkg-config")
9726 (string-append "cmd = '" (which "pkg-config"))))
9727 #t))
9728 (replace 'check
9729 (lambda _
9730 (invoke "nosetests" "test.py"))))))
9731 (home-page "https://github.com/matze/pkgconfig")
9732 (synopsis "Python interface for pkg-config")
9733 (description "This module provides a Python interface to pkg-config. It
9734 can be used to find all pkg-config packages, check if a package exists,
9735 check if a package meets certain version requirements, query CFLAGS and
9736 LDFLAGS and parse the output to build extensions with setup.py.")
9737 (license license:expat)))
9738
9739 (define-public python2-pkgconfig
9740 (package-with-python2 python-pkgconfig))
9741
9742 (define-public python-bz2file
9743 (package
9744 (name "python-bz2file")
9745 (version "0.98")
9746 (source
9747 (origin
9748 (method url-fetch)
9749 (uri (pypi-uri "bz2file" version))
9750 (sha256
9751 (base32
9752 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9753 (build-system python-build-system)
9754 (arguments
9755 `(#:tests? #f)) ; Tests use deprecated python modules.
9756 (home-page "https://github.com/nvawda/bz2file")
9757 (synopsis "Read and write bzip2-compressed files")
9758 (description
9759 "Bz2file is a Python library for reading and writing bzip2-compressed
9760 files. It contains a drop-in replacement for the I/O interface in the
9761 standard library's @code{bz2} module, including features from the latest
9762 development version of CPython that are not available in older releases.")
9763 (license license:asl2.0)))
9764
9765 (define-public python2-bz2file
9766 (package-with-python2 python-bz2file))
9767
9768 (define-public python-future
9769 (package
9770 (name "python-future")
9771 (version "0.17.1")
9772 (source
9773 (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "future" version))
9776 (sha256
9777 (base32
9778 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9779 (build-system python-build-system)
9780 ;; Many tests connect to the network or are otherwise flawed.
9781 ;; https://github.com/PythonCharmers/python-future/issues/210
9782 (arguments
9783 `(#:tests? #f))
9784 (home-page "http://python-future.org")
9785 (synopsis "Single-source support for Python 3 and 2")
9786 (description
9787 "@code{python-future} is the missing compatibility layer between Python 2 and
9788 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9789 to support both Python 2 and Python 3 with minimal overhead.")
9790 (license license:expat)))
9791
9792 (define-public python2-future
9793 (package-with-python2 python-future))
9794
9795 (define-public python-cysignals
9796 (package
9797 (name "python-cysignals")
9798 (version "1.9.0")
9799 (source
9800 (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "cysignals" version))
9803 (sha256
9804 (base32
9805 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9806 (build-system python-build-system)
9807 (native-inputs
9808 `(("python-cython" ,python-cython)
9809 ("python-sphinx" ,python-sphinx)))
9810 (inputs
9811 `(("pari-gp" ,pari-gp)))
9812 (arguments
9813 `(#:modules ((guix build python-build-system)
9814 ((guix build gnu-build-system) #:prefix gnu:)
9815 (guix build utils))
9816 ;; FIXME: Tests are executed after installation and currently fail
9817 ;; when not installing into standard locations; the author is working
9818 ;; on a fix.
9819 #:tests? #f
9820 #:phases
9821 (modify-phases %standard-phases
9822 (add-before
9823 'build 'configure
9824 (assoc-ref gnu:%standard-phases 'configure)))))
9825 (home-page
9826 "https://github.com/sagemath/cysignals")
9827 (synopsis
9828 "Handling of interrupts and signals for Cython")
9829 (description
9830 "The cysignals package provides mechanisms to handle interrupts (and
9831 other signals and errors) in Cython code, using two related approaches,
9832 for mixed Cython/Python code or external C libraries and pure Cython code,
9833 respectively.")
9834 (license license:lgpl3+)))
9835
9836 (define-public python2-cysignals
9837 (package-with-python2 python-cysignals))
9838
9839 (define-public python2-shedskin
9840 (package
9841 (name "python2-shedskin")
9842 (version "0.9.4")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (string-append "https://github.com/shedskin/shedskin/"
9847 "releases/download/v" version
9848 "/shedskin-" version ".tgz"))
9849 (sha256
9850 (base32
9851 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9852 (build-system python-build-system)
9853 (arguments
9854 `(#:python ,python-2
9855 #:phases (modify-phases %standard-phases
9856 (add-after 'unpack 'fix-resulting-include-libs
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((libgc (assoc-ref inputs "libgc"))
9859 (pcre (assoc-ref inputs "pcre")))
9860 (substitute* "shedskin/makefile.py"
9861 (("variable == 'CCFLAGS':[ ]*")
9862 (string-append "variable == 'CCFLAGS':\n"
9863 " line += ' -I " pcre "/include"
9864 " -I " libgc "/include'"))
9865 (("variable == 'LFLAGS':[ ]*")
9866 (string-append "variable == 'LFLAGS':\n"
9867 " line += ' -L" pcre "/lib"
9868 " -L " libgc "/lib'")))
9869 #t))))))
9870 (inputs `(("pcre" ,pcre)
9871 ("libgc" ,libgc)))
9872 (home-page "https://shedskin.github.io/")
9873 (synopsis "Experimental Python-2 to C++ Compiler")
9874 (description (string-append "This is an experimental compiler for a subset of
9875 Python. It generates C++ code and a Makefile."))
9876 (license (list license:gpl3 license:bsd-3 license:expat))))
9877
9878 (define-public python2-rope
9879 (package
9880 (name "python2-rope")
9881 (version "0.11.0")
9882 (source
9883 (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "rope" version))
9886 (sha256
9887 (base32
9888 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9889 (arguments
9890 ;; Rope has only partial python3 support, see `python-rope'
9891 `(#:python ,python-2))
9892 (build-system python-build-system)
9893 (native-inputs
9894 `(("python2-unittest2" ,python2-unittest2)))
9895 (home-page "https://github.com/python-rope/rope")
9896 (synopsis "Refactoring library for Python")
9897 (description "Rope is a refactoring library for Python. It facilitates
9898 the renaming, moving and extracting of attributes, functions, modules, fields
9899 and parameters in Python 2 source code. These refactorings can also be applied
9900 to occurrences in strings and comments.")
9901 (license license:gpl2)))
9902
9903 (define-public python-rope
9904 (package
9905 (inherit python2-rope)
9906 (name "python-rope")
9907 (arguments `(#:python ,python-wrapper
9908 ;; XXX: Only partial python3 support, results in some failing
9909 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9910 #:tests? #f))
9911 (properties `((python2-variant . ,(delay python2-rope))))))
9912
9913 (define-public python-py3status
9914 (package
9915 (name "python-py3status")
9916 (version "3.16")
9917 (source
9918 (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "py3status" version))
9921 (sha256
9922 (base32
9923 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9924 (build-system python-build-system)
9925 (inputs
9926 `(("file" ,file)))
9927 (arguments
9928 '(#:phases
9929 (modify-phases %standard-phases
9930 ;; 'file' is used for detection of configuration file encoding
9931 ;; let's make link the dependency to particular input
9932 (add-before 'build 'patch-file-path
9933 (lambda* (#:key inputs #:allow-other-keys)
9934 (let ((file-path (assoc-ref inputs "file")))
9935 (substitute* "py3status/parse_config.py"
9936 (("\\['file', '-b'")
9937 (string-append "['" file-path "/bin/file', '-b'")))
9938 #t))))
9939 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9940 (home-page "https://github.com/ultrabug/py3status")
9941 (synopsis "Extensible i3status wrapper written in Python")
9942 (description "py3status is an i3status wrapper which extends i3status
9943 functionality in a modular way, allowing you to extend your panel with your
9944 own code, responding to click events and updating clock every second.")
9945 (license license:bsd-3)))
9946
9947 (define-public python-tblib
9948 (package
9949 (name "python-tblib")
9950 (version "1.3.2")
9951 (source (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "tblib" version))
9954 (sha256 (base32
9955 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9956 (build-system python-build-system)
9957 (arguments
9958 `(#:phases
9959 (modify-phases %standard-phases
9960 (add-before 'check 'adjust-tests
9961 (lambda _
9962 (when (which "python3")
9963 ;; Adjust the example output to match that of Python 3.7:
9964 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9965 (substitute* "README.rst"
9966 (("Exception\\('fail',") "Exception('fail'"))
9967 #t)))
9968 (replace 'check
9969 (lambda _
9970 ;; Upstream runs tests after installation and the package itself
9971 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9972 ;; found.
9973 (setenv "PYTHONPATH"
9974 (string-append (getcwd) "/build/lib:"
9975 (getenv "PYTHONPATH")))
9976 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9977 (native-inputs
9978 `(("python-pytest" ,python-pytest)
9979 ("python-six" ,python-six)))
9980 (home-page "https://github.com/ionelmc/python-tblib")
9981 (synopsis "Traceback serialization library")
9982 (description
9983 "Traceback serialization allows you to:
9984
9985 @enumerate
9986 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9987 different processes. This allows better error handling when running code over
9988 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9989
9990 @item Parse traceback strings and raise with the parsed tracebacks.
9991 @end enumerate\n")
9992 (license license:bsd-3)))
9993
9994 (define-public python2-tblib
9995 (package-with-python2 python-tblib))
9996
9997 (define-public python-greenlet
9998 (package
9999 (name "python-greenlet")
10000 (version "0.4.15")
10001 (source (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "greenlet" version))
10004 (sha256
10005 (base32
10006 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10007 (build-system python-build-system)
10008 (home-page "https://greenlet.readthedocs.io/")
10009 (synopsis "Lightweight in-process concurrent programming")
10010 (description
10011 "Greenlet package is a spin-off of Stackless, a version of CPython
10012 that supports micro-threads called \"tasklets\". Tasklets run
10013 pseudo-concurrently (typically in a single or a few OS-level threads) and
10014 are synchronized with data exchanges on \"channels\".")
10015 (license (list license:psfl license:expat))))
10016
10017 (define-public python2-greenlet
10018 (package-with-python2 python-greenlet))
10019
10020 (define-public python-objgraph
10021 (package
10022 (name "python-objgraph")
10023 (version "3.4.0")
10024 (source
10025 (origin
10026 (method url-fetch)
10027 (uri (pypi-uri "objgraph" version))
10028 (sha256
10029 (base32
10030 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10031 (build-system python-build-system)
10032 (propagated-inputs
10033 `(("python-graphviz" ,python-graphviz)))
10034 (native-inputs
10035 `(("python-mock" ,python-mock)
10036 ("graphviz" ,graphviz)))
10037 (home-page "https://mg.pov.lt/objgraph/")
10038 (synopsis "Draw Python object reference graphs with graphviz")
10039 (description
10040 "This package provides tools to draw Python object reference graphs with
10041 graphviz.")
10042 (license license:expat)))
10043
10044 (define-public python-gevent
10045 (package
10046 (name "python-gevent")
10047 (version "1.3.7")
10048 (source (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "gevent" version))
10051 (sha256
10052 (base32
10053 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10054 (modules '((guix build utils)))
10055 (snippet
10056 '(begin
10057 ;; unbunding libev and c-ares
10058 (delete-file-recursively "deps")
10059 #t))))
10060 (build-system python-build-system)
10061 (arguments
10062 `(#:modules ((ice-9 ftw)
10063 (ice-9 match)
10064 (srfi srfi-26)
10065 (guix build utils)
10066 (guix build python-build-system))
10067 #:phases (modify-phases %standard-phases
10068 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10069 (lambda _
10070 (substitute* "src/gevent/subprocess.py"
10071 (("/bin/sh") (which "sh")))
10072 (for-each (lambda (file)
10073 (substitute* file
10074 (("/bin/sh") (which "sh"))
10075 (("/bin/true") (which "true"))))
10076 (find-files "src/greentest" "\\.py$"))
10077 #t))
10078 (add-before 'build 'do-not-use-bundled-sources
10079 (lambda* (#:key inputs #:allow-other-keys)
10080 (setenv "CONFIG_SHELL" (which "bash"))
10081 (setenv "LIBEV_EMBED" "false")
10082 (setenv "CARES_EMBED" "false")
10083 (setenv "EMBED" "false")
10084
10085 ;; Prevent building bundled libev.
10086 (substitute* "setup.py"
10087 (("run_make=_BUILDING")
10088 "run_make=False"))
10089
10090 (let ((greenlet (string-append
10091 (assoc-ref inputs "python-greenlet")
10092 "/include")))
10093 (match (scandir greenlet
10094 (lambda (item)
10095 (string-prefix? "python" item)))
10096 ((python)
10097 (setenv "C_INCLUDE_PATH"
10098 (string-append greenlet "/" python)))))
10099 #t))
10100 (add-before 'check 'skip-timer-test
10101 (lambda _
10102 ;; XXX: Skip 'TestTimerResolution', which appears to be
10103 ;; unreliable.
10104 (substitute* "src/greentest/test__core_timer.py"
10105 (("not greentest.RUNNING_ON_CI") "False"))
10106 #t))
10107 (replace 'check
10108 (lambda _
10109 ;; Make sure the build directory is on PYTHONPATH.
10110 (setenv "PYTHONPATH"
10111 (string-append
10112 (getenv "PYTHONPATH") ":"
10113 (getcwd) "/build/"
10114 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10115 (with-directory-excursion "src/greentest"
10116 ;; XXX: Many tests require network access. Instead we only
10117 ;; run known-good tests. Unfortunately we cannot use
10118 ;; recursion here since this directory also contains
10119 ;; Python-version-specific subfolders.
10120 (apply invoke "python" "testrunner.py" "--config"
10121 "known_failures.py"
10122 (scandir "." (cut regexp-exec
10123 (make-regexp "test_+(subprocess|core)")
10124 <>)))))))))
10125 (propagated-inputs
10126 `(("python-greenlet" ,python-greenlet)
10127 ("python-objgraph" ,python-objgraph)))
10128 (native-inputs
10129 `(("python-six" ,python-six)))
10130 (inputs
10131 `(("c-ares" ,c-ares)
10132 ("libev" ,libev)))
10133 (home-page "http://www.gevent.org/")
10134 (synopsis "Coroutine-based network library")
10135 (description
10136 "gevent is a coroutine-based Python networking library that uses greenlet
10137 to provide a high-level synchronous API on top of the libev event loop.")
10138 (license license:expat)
10139 (properties `((python2-variant . ,(delay python2-gevent))))))
10140
10141 (define-public python2-gevent
10142 (let ((base (package-with-python2
10143 (strip-python2-variant python-gevent))))
10144 (package
10145 (inherit base)
10146 (native-inputs `(,@(package-native-inputs python-gevent)
10147 ("python-mock" ,python2-mock))))))
10148
10149 (define-public python-fastimport
10150 (package
10151 (name "python-fastimport")
10152 (version "0.9.6")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (pypi-uri "fastimport" version))
10157 (sha256
10158 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10159 (build-system python-build-system)
10160 (home-page "https://github.com/jelmer/python-fastimport")
10161 (synopsis "VCS fastimport parser and generator in Python")
10162 (description "This package provides a parser for and generator of the Git
10163 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10164 format.")
10165 (license license:gpl2+)))
10166
10167 (define-public python2-fastimport
10168 (package-with-python2 python-fastimport))
10169
10170 (define-public python-twisted
10171 (package
10172 (name "python-twisted")
10173 (version "19.7.0")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10177 (sha256
10178 (base32
10179 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10180 (build-system python-build-system)
10181 (arguments
10182 '(#:tests? #f)) ; FIXME: some tests fail
10183 (propagated-inputs
10184 `(("python-zope-interface" ,python-zope-interface)
10185 ("python-pyhamcrest" ,python-pyhamcrest)
10186 ("python-incremental" ,python-incremental)
10187 ("python-hyperlink" ,python-hyperlink)
10188 ("python-constantly" ,python-constantly)
10189 ("python-automat" ,python-automat)))
10190 (home-page "https://twistedmatrix.com/")
10191 (synopsis "Asynchronous networking framework written in Python")
10192 (description
10193 "Twisted is an extensible framework for Python programming, with special
10194 focus on event-based network programming and multiprotocol integration.")
10195 (license license:expat)))
10196
10197 (define-public python2-twisted
10198 (package-with-python2 python-twisted))
10199
10200 (define-public python-pika
10201 (package
10202 (name "python-pika")
10203 (version "0.12.0")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "pika" version))
10208 (sha256
10209 (base32
10210 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10211 (build-system python-build-system)
10212 (native-inputs
10213 `(("python-pyev" ,python-pyev)
10214 ("python-tornado" ,python-tornado)
10215 ("python-twisted" ,python-twisted)))
10216 (home-page "https://pika.readthedocs.org")
10217 (synopsis "Pure Python AMQP Client Library")
10218 (description
10219 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10220 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10221 network support library.")
10222 (license license:bsd-3)))
10223
10224 (define-public python2-pika
10225 (package-with-python2 python-pika))
10226
10227 (define-public python-ply
10228 (package
10229 (name "python-ply")
10230 (version "3.10")
10231 (source
10232 (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "ply" version))
10235 (sha256
10236 (base32
10237 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10238 (build-system python-build-system)
10239 (home-page "http://www.dabeaz.com/ply/")
10240 (synopsis "Python Lex & Yacc")
10241 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10242 It uses LR parsing and does extensive error checking.")
10243 (license license:bsd-3)))
10244
10245 (define-public python2-ply
10246 (package-with-python2 python-ply))
10247
10248 (define-public python-tabulate
10249 (package
10250 (name "python-tabulate")
10251 (version "0.7.7")
10252 (source (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "tabulate" version))
10255 (sha256
10256 (base32
10257 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10258 (build-system python-build-system)
10259 (arguments
10260 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10261 ;; and the latest release is not tagged in the upstream repository.
10262 '(#:tests? #f))
10263 (home-page "https://bitbucket.org/astanin/python-tabulate")
10264 (synopsis "Pretty-print tabular data")
10265 (description
10266 "Tabulate is a library and command-line utility to pretty-print tabular
10267 data in Python.")
10268 (license license:expat)))
10269
10270 (define-public python2-tabulate
10271 (package-with-python2 python-tabulate))
10272
10273 (define-public python-kazoo
10274 (package
10275 (name "python-kazoo")
10276 (version "2.4.0")
10277 (source
10278 (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "kazoo" version))
10281 (sha256
10282 (base32
10283 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10284 (build-system python-build-system)
10285 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10286 (propagated-inputs
10287 `(("python-six" ,python-six)))
10288 (home-page "https://kazoo.readthedocs.org")
10289 (synopsis "High-level Zookeeper client library")
10290 (description
10291 "Kazoo is a Python client library for the Apache Zookeeper distributed
10292 application service. It is designed to be easy to use and to avoid common
10293 programming errors.")
10294 (license license:asl2.0)))
10295
10296 (define-public python2-kazoo
10297 (package-with-python2 python-kazoo))
10298
10299 (define-public python-pykafka
10300 (package
10301 (name "python-pykafka")
10302 (version "2.4.0")
10303 (source (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "pykafka" version))
10306 (sha256
10307 (base32
10308 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10309 (build-system python-build-system)
10310 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10311 (propagated-inputs
10312 `(("python-gevent" ,python-gevent)
10313 ("python-kazoo" ,python-kazoo)
10314 ("python-tabulate" ,python-tabulate)))
10315 (inputs
10316 `(("librdkafka" ,librdkafka)))
10317 (home-page "https://pykafka.readthedocs.io/")
10318 (synopsis "Apache Kafka client for Python")
10319 (description
10320 "PyKafka is a client for the Apache Kafka distributed messaging system.
10321 It includes Python implementations of Kafka producers and consumers, which
10322 are optionally backed by a C extension built on librdkafka.")
10323 (license license:asl2.0)))
10324
10325 (define-public python2-pykafka
10326 (package-with-python2 python-pykafka))
10327
10328 (define-public python-wcwidth
10329 (package
10330 (name "python-wcwidth")
10331 (version "0.1.7")
10332 (source
10333 (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "wcwidth" version))
10336 (sha256
10337 (base32
10338 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10339 (build-system python-build-system)
10340 (home-page "https://github.com/jquast/wcwidth")
10341 (synopsis "Measure number of terminal column cells of wide-character codes")
10342 (description "Wcwidth measures the number of terminal column cells of
10343 wide-character codes. It is useful for those implementing a terminal emulator,
10344 or programs that carefully produce output to be interpreted by one. It is a
10345 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10346 specified in POSIX.1-2001 and POSIX.1-2008.")
10347 (license license:expat)))
10348
10349 (define-public python2-wcwidth
10350 (package-with-python2 python-wcwidth))
10351
10352 (define-public python2-jsonrpclib
10353 (package
10354 (name "python2-jsonrpclib")
10355 (version "0.1.7")
10356 (source (origin
10357 (method url-fetch)
10358 (uri (pypi-uri "jsonrpclib" version))
10359 (sha256
10360 (base32
10361 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10362 (build-system python-build-system)
10363 (arguments
10364 `(#:tests? #f
10365 #:python ,python-2))
10366 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10367 (synopsis "Implementation of JSON-RPC specification for Python")
10368 (description
10369 "This library is an implementation of the JSON-RPC specification.
10370 It supports both the original 1.0 specification, as well as the
10371 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10372 etc.")
10373 (license license:asl2.0)))
10374
10375 (define-public python-chai
10376 (package
10377 (name "python-chai")
10378 (version "1.1.2")
10379 (source (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "chai" version))
10382 (sha256
10383 (base32
10384 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10385 (build-system python-build-system)
10386 (home-page "https://github.com/agoragames/chai")
10387 (synopsis "Mocking framework for Python")
10388 (description
10389 "Chai provides an api for mocking, stubbing and spying your python
10390 objects, patterned after the Mocha library for Ruby.")
10391 (license license:bsd-3)))
10392
10393 (define-public python2-chai
10394 (package-with-python2 python-chai))
10395
10396 (define-public python-inflection
10397 (package
10398 (name "python-inflection")
10399 (version "0.3.1")
10400 (source
10401 (origin (method url-fetch)
10402 (uri (pypi-uri "inflection" version))
10403 (sha256
10404 (base32
10405 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10406 (build-system python-build-system)
10407 (native-inputs
10408 `(("python-pytest" ,python-pytest)))
10409 (home-page "https://github.com/jpvanhal/inflection")
10410 (synopsis "Python string transformation library")
10411 (description
10412 "Inflection is a string transformation library. It singularizes
10413 and pluralizes English words, and transforms strings from CamelCase to
10414 underscored string.")
10415 (license license:expat)))
10416
10417 (define-public python2-inflection
10418 (package-with-python2 python-inflection))
10419
10420 (define-public python-pylev
10421 (package
10422 (name "python-pylev")
10423 (version "1.3.0")
10424 (source (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "pylev" version))
10427 (sha256
10428 (base32
10429 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10430 (build-system python-build-system)
10431 (home-page "https://github.com/toastdriven/pylev")
10432 (synopsis "Levenshtein distance implementation in Python")
10433 (description "Pure Python Levenshtein implementation, based off the
10434 Wikipedia code samples at
10435 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10436 (license license:bsd-3)))
10437
10438 (define-public python2-pylev
10439 (package-with-python2 python-pylev))
10440
10441 (define-public python-cleo
10442 (package
10443 (name "python-cleo")
10444 (version "0.6.1")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "cleo" version))
10448 (sha256
10449 (base32
10450 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10451 (build-system python-build-system)
10452 (native-inputs
10453 `(;; For testing
10454 ("python-mock" ,python-mock)
10455 ("python-pytest-mock" ,python-pytest-mock)
10456 ("python-pytest" ,python-pytest)))
10457 (propagated-inputs
10458 `(("python-backpack" ,python-backpack)
10459 ("python-pastel" ,python-pastel)
10460 ("python-pylev" ,python-pylev)))
10461 (home-page "https://github.com/sdispater/cleo")
10462 (synopsis "Command-line arguments library for Python")
10463 (description
10464 "Cleo allows you to create command-line commands with signature in
10465 docstring and colored output.")
10466 (license license:expat)))
10467
10468 (define-public python2-cleo
10469 (package-with-python2 python-cleo))
10470
10471 (define-public python-lazy-object-proxy
10472 (package
10473 (name "python-lazy-object-proxy")
10474 (version "1.3.1")
10475 (source (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "lazy-object-proxy" version))
10478 (sha256
10479 (base32
10480 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10481 (build-system python-build-system)
10482 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10483 (synopsis "Lazy object proxy for python")
10484 (description
10485 "Lazy object proxy is an object that wraps a callable but defers the call
10486 until the object is actually required, and caches the result of said call.")
10487 (license license:bsd-2)))
10488
10489 (define-public python2-lazy-object-proxy
10490 (package-with-python2 python-lazy-object-proxy))
10491
10492 (define-public python-dnspython
10493 (package
10494 (name "python-dnspython")
10495 (version "1.15.0")
10496 (source (origin
10497 (method url-fetch)
10498 (uri (string-append "http://www.dnspython.org/kits/"
10499 version "/dnspython-" version ".tar.gz"))
10500 (sha256
10501 (base32
10502 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10503 (build-system python-build-system)
10504 (arguments '(#:tests? #f)) ; XXX: requires internet access
10505 (home-page "http://www.dnspython.org")
10506 (synopsis "DNS toolkit for Python")
10507 (description
10508 "dnspython is a DNS toolkit for Python. It supports almost all record
10509 types. It can be used for queries, zone transfers, and dynamic updates.
10510 It supports TSIG authenticated messages and EDNS0.")
10511 (license license:expat)))
10512
10513 (define-public python2-dnspython
10514 (package-with-python2 python-dnspython))
10515
10516 (define-public python-email-validator
10517 (package
10518 (name "python-email-validator")
10519 (version "1.0.2")
10520 (source
10521 (origin (method url-fetch)
10522 (uri (pypi-uri "email_validator" version))
10523 (sha256
10524 (base32
10525 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10526 (build-system python-build-system)
10527 (arguments
10528 '(#:phases
10529 (modify-phases %standard-phases
10530 (add-before 'build 'use-dnspython
10531 (lambda _
10532 (substitute* "setup.py"
10533 (("dnspython3") "dnspython"))
10534 #t)))))
10535 (propagated-inputs
10536 `(("python-dnspython" ,python-dnspython)
10537 ("python-idna" ,python-idna)))
10538 (home-page "https://github.com/JoshData/python-email-validator")
10539 (synopsis "Email address validation library for Python")
10540 (description
10541 "This library validates email address syntax and deliverability.")
10542 (license license:cc0)))
10543
10544 (define-public python2-email-validator
10545 (package-with-python2 python-email-validator))
10546
10547 (define-public python-ukpostcodeparser
10548 (package
10549 (name "python-ukpostcodeparser")
10550 (version "1.0.3")
10551 (source (origin
10552 (method url-fetch)
10553 (uri (pypi-uri "UkPostcodeParser" version))
10554 (sha256
10555 (base32
10556 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10557 (build-system python-build-system)
10558 (home-page "https://github.com/hamstah/ukpostcodeparser")
10559 (synopsis "UK Postcode parser for Python")
10560 (description
10561 "This library provides the @code{parse_uk_postcode} function for
10562 parsing UK postcodes.")
10563 (license license:expat)))
10564
10565 (define-public python2-ukpostcodeparser
10566 (package-with-python2 python-ukpostcodeparser))
10567
10568 (define-public python-faker
10569 (package
10570 (name "python-faker")
10571 (version "0.7.9")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "Faker" version))
10575 (sha256
10576 (base32
10577 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10578 (patches
10579 (search-patches "python-faker-fix-build-32bit.patch"))
10580 (modules '((guix build utils)))
10581 (snippet
10582 '(begin
10583 (for-each delete-file (find-files "." "\\.pyc$"))
10584 #t))))
10585 (build-system python-build-system)
10586 (arguments
10587 '(#:phases
10588 (modify-phases %standard-phases
10589 (replace 'check
10590 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10591 (native-inputs
10592 `(;; For testing
10593 ("python-email-validator" ,python-email-validator)
10594 ("python-mock" ,python-mock)
10595 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10596 (propagated-inputs
10597 `(("python-dateutil" ,python-dateutil)
10598 ("python-six" ,python-six)))
10599 (home-page "https://github.com/joke2k/faker")
10600 (synopsis "Python package that generates fake data")
10601 (description
10602 "Faker is a Python package that generates fake data such as names,
10603 addresses, and phone numbers.")
10604 (license license:expat)
10605 (properties `((python2-variant . ,(delay python2-faker))))))
10606
10607 (define-public python2-faker
10608 (let ((base (package-with-python2 (strip-python2-variant
10609 python-faker))))
10610 (package
10611 (inherit base)
10612 (propagated-inputs
10613 `(("python2-ipaddress" ,python2-ipaddress)
10614 ,@(package-propagated-inputs base))))))
10615
10616 (define-public python-pyaml
10617 (package
10618 (name "python-pyaml")
10619 (version "18.11.0")
10620 (source (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "pyaml" version))
10623 (sha256
10624 (base32
10625 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10626 (build-system python-build-system)
10627 (native-inputs
10628 `(("python-unidecode" ,python-unidecode)))
10629 (propagated-inputs
10630 `(("python-pyyaml" ,python-pyyaml)))
10631 (home-page "https://github.com/mk-fg/pretty-yaml")
10632 (synopsis "YAML pretty-print library for Python")
10633 (description
10634 "pyaml is a PyYAML based python module to produce pretty and readable
10635 YAML-serialized data.")
10636 (license license:wtfpl2)))
10637
10638 (define-public python2-pyaml
10639 (package-with-python2 python-pyaml))
10640
10641 (define-public python-backpack
10642 (package
10643 (name "python-backpack")
10644 (version "0.1")
10645 (source
10646 (origin
10647 (method url-fetch)
10648 (uri (pypi-uri "backpack" version))
10649 (sha256
10650 (base32
10651 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10652 (build-system python-build-system)
10653 (native-inputs
10654 `(("python-pytest" ,python-pytest)
10655 ("python-nose" ,python-nose)))
10656 (propagated-inputs
10657 `(("python-simplejson" ,python-simplejson)))
10658 (home-page "https://github.com/sdispater/backpack")
10659 (synopsis "Utilities for working with Python collections")
10660 (description "Backpack provides some useful utilities for working with
10661 collections of data.")
10662 (license license:expat)))
10663
10664 (define-public python2-backpack
10665 (package-with-python2 python-backpack))
10666
10667 (define-public python-prompt-toolkit
10668 (package
10669 (name "python-prompt-toolkit")
10670 (version "2.0.7")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10675 (sha256
10676 (base32
10677 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10678 (build-system python-build-system)
10679 (arguments
10680 `(#:phases
10681 (modify-phases %standard-phases
10682 (delete 'check)
10683 (add-after 'install 'post-install-check
10684 (lambda* (#:key inputs outputs #:allow-other-keys)
10685 ;; HOME is needed for the test
10686 ;; "test_pathcompleter_can_expanduser".
10687 (setenv "HOME" "/tmp")
10688 (add-installed-pythonpath inputs outputs)
10689 (invoke "py.test"))))))
10690 (propagated-inputs
10691 `(("python-wcwidth" ,python-wcwidth)
10692 ("python-six" ,python-six)
10693 ("python-pygments" ,python-pygments)))
10694 (native-inputs
10695 `(("python-pytest" ,python-pytest)))
10696 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10697 (synopsis "Library for building command line interfaces in Python")
10698 (description
10699 "Prompt-Toolkit is a library for building interactive command line
10700 interfaces in Python. It's like GNU Readline but it also features syntax
10701 highlighting while typing, out-of-the-box multi-line input editing, advanced
10702 code completion, incremental search, support for Chinese double-width
10703 characters, mouse support, and auto suggestions.")
10704 (license license:bsd-3)))
10705
10706 (define-public python2-prompt-toolkit
10707 (package-with-python2 python-prompt-toolkit))
10708
10709 (define-public python-prompt-toolkit-1
10710 (package (inherit python-prompt-toolkit)
10711 (version "1.0.15")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10716 (sha256
10717 (base32
10718 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10719
10720 (define-public python2-prompt-toolkit-1
10721 (package-with-python2 python-prompt-toolkit-1))
10722
10723 (define-public python-jedi
10724 (package
10725 (name "python-jedi")
10726 (version "0.15.1")
10727 (source
10728 (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "jedi" version))
10731 (sha256
10732 (base32
10733 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10734 (build-system python-build-system)
10735 (arguments
10736 `(#:phases
10737 (modify-phases %standard-phases
10738 (add-after 'unpack 'disable-file-completion-test
10739 ;; A single parameterized test currently fail (see:
10740 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10741 (lambda _
10742 (substitute* "test/test_api/test_completion.py"
10743 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10744 #t))
10745 (replace 'check
10746 (lambda _
10747 (setenv "HOME" "/tmp")
10748 (invoke "python" "-m" "pytest"))))))
10749 (native-inputs
10750 `(("python-pytest" ,python-pytest)
10751 ("python-docopt" ,python-docopt)))
10752 (propagated-inputs
10753 `(("python-parso" ,python-parso)))
10754 (home-page "https://github.com/davidhalter/jedi")
10755 (synopsis "Autocompletion and static analysis library for Python")
10756 (description
10757 "Jedi is a static analysis tool for Python that can be used in Integrated
10758 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10759 on a deeper level than many other static analysis frameworks for Python.
10760
10761 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10762 well.")
10763 (license license:expat)))
10764
10765 (define-public python2-jedi
10766 (package-with-python2 python-jedi))
10767
10768 (define-public ptpython
10769 (package
10770 (name "ptpython")
10771 (version "0.34")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "ptpython" version))
10775 (sha256
10776 (base32
10777 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10778 (build-system python-build-system)
10779 (arguments
10780 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10781 (propagated-inputs
10782 `(("python-docopt" ,python-docopt)
10783 ("python-jedi" ,python-jedi)
10784 ("python-prompt-toolkit" ,python-prompt-toolkit)
10785 ("python-pygments" ,python-pygments)))
10786 (home-page "https://github.com/jonathanslenders/ptpython")
10787 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10788 (description
10789 "ptpython is a Python read-eval-print loop with IDE-like features.
10790 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10791 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10792 etc.")
10793 (license license:bsd-3)
10794 (properties `((python2-variant . ,(delay ptpython-2))))))
10795
10796 (define-public ptpython-2
10797 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10798 (package
10799 (inherit base)
10800 (name "ptpython2"))))
10801
10802 (define-public python-stem
10803 (package
10804 (name "python-stem")
10805 (version "1.7.1")
10806 (source
10807 (origin
10808 (method url-fetch)
10809 (uri (pypi-uri "stem" version))
10810 (sha256
10811 (base32
10812 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10813 (build-system python-build-system)
10814 (arguments
10815 `(#:phases
10816 (modify-phases %standard-phases
10817 (replace 'check
10818 (lambda _
10819 (invoke "./run_tests.py" "--unit")
10820 #t)))))
10821 (native-inputs
10822 `(("python-mock" ,python-mock)
10823 ("python-pycodestyle" ,python-pycodestyle)
10824 ("python-pyflakes" ,python-pyflakes)))
10825 (home-page "https://stem.torproject.org/")
10826 (synopsis
10827 "Python controller library that allows applications to interact with Tor")
10828 (description
10829 "Stem is a Python controller library for Tor. With it you can use Tor's
10830 control protocol to script against the Tor process and read descriptor data
10831 relays publish about themselves.")
10832 (license license:lgpl3)))
10833
10834 (define-public python2-stem
10835 (package-with-python2 python-stem))
10836
10837 (define-public python-pyserial
10838 (package
10839 (name "python-pyserial")
10840 (version "3.1.1")
10841 (source
10842 (origin
10843 (method url-fetch)
10844 (uri (pypi-uri "pyserial" version))
10845 (sha256
10846 (base32
10847 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10848 (build-system python-build-system)
10849 (arguments
10850 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10851 ;; #:phases
10852 ;; (modify-phases %standard-phases
10853 ;; (replace 'check
10854 ;; (lambda _
10855 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10856 (home-page
10857 "https://github.com/pyserial/pyserial")
10858 (synopsis "Python Serial Port Bindings")
10859 (description "@code{pyserial} provide serial port bindings for Python. It
10860 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10861 and/or Xon/Xoff. The port is accessed in RAW mode.")
10862 (license license:bsd-3)))
10863
10864 (define-public python2-pyserial
10865 (package-with-python2 python-pyserial))
10866
10867 (define-public python-kivy
10868 (package
10869 (name "python-kivy")
10870 (version "1.10.1")
10871 (source
10872 (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "Kivy" version))
10875 (file-name (string-append name "-" version ".tar.gz"))
10876 (sha256
10877 (base32
10878 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10879 (build-system python-build-system)
10880 (arguments
10881 `(#:tests? #f ; Tests require many optional packages
10882 #:phases
10883 (modify-phases %standard-phases
10884 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10885 (lambda* (#:key inputs #:allow-other-keys)
10886 (setenv "KIVY_SDL2_PATH"
10887 (string-append (assoc-ref inputs "sdl-union")
10888 "/include/SDL2"))
10889 #t)))))
10890 (native-inputs
10891 `(("git" ,git)
10892 ("pkg-config" ,pkg-config)
10893 ("python-cython" ,python-cython)))
10894 (inputs
10895 `(("gstreamer" ,gstreamer)
10896 ("mesa" ,mesa)
10897 ("sdl-union"
10898 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10899 (home-page "http://kivy.org")
10900 (synopsis
10901 "Multitouch application framework")
10902 (description
10903 "A software library for rapid development of
10904 hardware-accelerated multitouch applications.")
10905 (license license:expat)))
10906
10907 (define-public python2-kivy
10908 (package-with-python2 python-kivy))
10909
10910 (define-public python-kivy-next
10911 (deprecated-package "python-kivy-next" python-kivy))
10912
10913 (define-public python2-kivy-next
10914 (deprecated-package "python2-kivy-next" python2-kivy))
10915
10916 (define-public python-binaryornot
10917 (package
10918 (name "python-binaryornot")
10919 (version "0.4.4")
10920 (source (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "binaryornot" version))
10923 (sha256
10924 (base32
10925 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10926 (build-system python-build-system)
10927 (propagated-inputs
10928 `(("python-chardet" ,python-chardet)
10929 ("python-hypothesis" ,python-hypothesis)))
10930 (home-page "https://github.com/audreyr/binaryornot")
10931 (synopsis "Package to check if a file is binary or text")
10932 (description "Ultra-lightweight pure Python package to check if a file is
10933 binary or text.")
10934 (license license:bsd-3)
10935 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10936
10937 (define-public python2-binaryornot
10938 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10939 (package (inherit base)
10940 (propagated-inputs
10941 `(("python2-enum34" ,python2-enum34)
10942 ,@(package-propagated-inputs base))))))
10943
10944 (define-public python-binwalk
10945 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
10946 (revision "0"))
10947 (package
10948 (name "python-binwalk")
10949 (version (git-version "2.1.1" revision commit))
10950 (source
10951 (origin
10952 (method git-fetch)
10953 (uri (git-reference
10954 (url "https://github.com/ReFirmLabs/binwalk")
10955 (commit commit)))
10956 (file-name (git-file-name name version))
10957 (sha256
10958 (base32
10959 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
10960 (build-system python-build-system)
10961 (arguments
10962 `(#:phases
10963 (modify-phases %standard-phases
10964 (add-before 'check 'set-pythonpath
10965 (lambda _
10966 (setenv "PYTHONPATH"
10967 (string-append
10968 (getcwd) "/src/"
10969 ":" (getenv "PYTHONPATH")))
10970 (setenv "HOME" "")
10971 #t)))))
10972 (native-inputs
10973 `(("python-coverage" ,python-coverage)
10974 ("python-nose" ,python-nose)))
10975 (home-page "https://github.com/ReFirmLabs/binwalk")
10976 (synopsis "Firmware analysis tool")
10977 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
10978 (license license:expat))))
10979
10980 (define-public python-nltk
10981 (package
10982 (name "python-nltk")
10983 (version "3.2.1")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "nltk" version))
10987 (sha256
10988 (base32
10989 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10990 (build-system python-build-system)
10991 (arguments
10992 '(;; The tests require some extra resources to be downloaded.
10993 ;; TODO Try packaging these resources.
10994 #:tests? #f))
10995 (home-page "http://nltk.org/")
10996 (synopsis "Natural Language Toolkit")
10997 (description "It provides interfaces to over 50 corpora and lexical
10998 resources such as WordNet, along with a suite of text processing libraries
10999 for classification, tokenization, stemming, tagging, parsing, and semantic
11000 reasoning, wrappers for natural language processing libraries.")
11001 (license license:asl2.0)))
11002
11003 (define-public python2-nltk
11004 (package-with-python2 python-nltk))
11005
11006 (define-public python-pymongo
11007 (package
11008 (name "python-pymongo")
11009 (version "3.7.2")
11010 (source (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "pymongo" version))
11013 (sha256
11014 (base32
11015 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11016 (build-system python-build-system)
11017 (propagated-inputs
11018 `(("python-certifi" ,python-certifi)))
11019 (home-page "https://github.com/mongodb/mongo-python-driver")
11020 (synopsis "Python driver for MongoDB")
11021 (description "Python driver for MongoDB.")
11022 (license license:asl2.0)))
11023
11024 (define-public python2-pymongo
11025 (package-with-python2 python-pymongo))
11026
11027 (define-public python-consul
11028 (package
11029 (name "python-consul")
11030 (version "0.6.1")
11031 (source
11032 (origin
11033 (method url-fetch)
11034 (uri (pypi-uri "python-consul" version))
11035 (sha256
11036 (base32
11037 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11038 (build-system python-build-system)
11039 (arguments
11040 '(#:tests? #f)) ; The tests are not distributed
11041 (propagated-inputs
11042 `(("python-requests" ,python-requests)
11043 ("python-six" ,python-six)))
11044 (home-page "https://github.com/cablehead/python-consul")
11045 (synopsis "Python client for Consul")
11046 (description
11047 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11048 discovery, monitoring and configuration.")
11049 (license license:expat)))
11050
11051 (define-public python2-consul
11052 (package-with-python2 python-consul))
11053
11054 (define-public python-schematics
11055 (package
11056 (name "python-schematics")
11057 (version "1.1.1")
11058 (source
11059 (origin
11060 (method git-fetch)
11061 (uri (git-reference
11062 (url "https://github.com/schematics/schematics.git")
11063 (commit (string-append "v" version))))
11064 (file-name (git-file-name name version))
11065 (sha256
11066 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11067 (build-system python-build-system)
11068 (propagated-inputs
11069 `(("python-six" ,python-six)))
11070 (arguments
11071 ;; The tests require a bunch of not very nice packages with fixed
11072 ;; version requirements (e.g. python-coveralls).
11073 `(#:tests? #f))
11074 (home-page "https://github.com/schematics/schematics")
11075 (synopsis "Python Data Structures for Humans")
11076 (description "Python Data Structures for Humans.")
11077 (license license:bsd-3)))
11078
11079 (define-public python2-schematics
11080 (package-with-python2 python-schematics))
11081
11082 (define-public python-odfpy
11083 (package
11084 (name "python-odfpy")
11085 (version "1.3.3")
11086 (source (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "odfpy" version))
11089 (sha256
11090 (base32
11091 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11092 (arguments
11093 `(#:modules ((srfi srfi-1)
11094 (guix build python-build-system)
11095 (guix build utils))
11096 #:phases
11097 (modify-phases %standard-phases
11098 (replace 'check
11099 ;; The test runner invokes python2 and python3 for test*.py.
11100 ;; To avoid having both in inputs, we replicate it here.
11101 (lambda _
11102 (for-each (lambda (test-file) (invoke "python" test-file))
11103 (find-files "tests" "^test.*\\.py$"))
11104 #t)))))
11105 (build-system python-build-system)
11106 (home-page "https://github.com/eea/odfpy")
11107 (synopsis "Python API and tools to manipulate OpenDocument files")
11108 (description "Collection of libraries and utility programs written in
11109 Python to manipulate OpenDocument 1.2 files.")
11110 (license
11111 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11112 ;; number of files with other licenses.
11113 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11114
11115 (define-public python2-odfpy
11116 (package-with-python2 python-odfpy))
11117
11118 (define-public python-natsort
11119 (package
11120 (name "python-natsort")
11121 (version "5.4.1")
11122 (source (origin
11123 (method url-fetch)
11124 (uri (pypi-uri "natsort" version))
11125 (sha256
11126 (base32
11127 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11128 (build-system python-build-system)
11129 (arguments
11130 `(#:modules ((guix build utils)
11131 (guix build python-build-system)
11132 (srfi srfi-1)
11133 (srfi srfi-26)
11134 (ice-9 ftw))
11135 #:phases
11136 (modify-phases %standard-phases
11137 (add-before 'check 'set-cachedir
11138 ;; Tests require write access to $HOME by default
11139 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11140 (replace 'check
11141 (lambda _
11142 (let ((cwd (getcwd)))
11143 (setenv "PYTHONPATH"
11144 (string-append
11145 cwd "/build/"
11146 (find (cut string-prefix? "lib" <>)
11147 (scandir (string-append cwd "/build")))
11148 ":"
11149 (getenv "PYTHONPATH")))
11150 (invoke "pytest" "-v")))))))
11151 (native-inputs
11152 `(("python-hypothesis" ,python-hypothesis)
11153 ("python-pytest-cov" ,python-pytest-cov)
11154 ("python-pytest-mock" ,python-pytest-mock)
11155 ("python-pytest" ,python-pytest)))
11156 (propagated-inputs ; TODO: Add python-fastnumbers.
11157 `(("python-pyicu" ,python-pyicu)))
11158 (home-page "https://github.com/SethMMorton/natsort")
11159 (synopsis "Natural sorting for python and shell")
11160 (description
11161 "Natsort lets you apply natural sorting on lists instead of
11162 lexicographical. If you use the built-in @code{sorted} method in python
11163 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11164 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11165 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11166 identifies numbers and sorts them separately from strings. It can also sort
11167 version numbers, real numbers, mixed types and more, and comes with a shell
11168 command @command{natsort} that exposes this functionality in the command line.")
11169 (license license:expat)
11170 (properties `((python2-variant . ,(delay python2-natsort))))))
11171
11172 (define-public python2-natsort
11173 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11174 (package (inherit base)
11175 (native-inputs
11176 `(("python2-pathlib" ,python2-pathlib)
11177 ,@(package-native-inputs base))))))
11178
11179 (define-public python-glances
11180 (package
11181 (name "python-glances")
11182 (version "3.1.1")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "Glances" version))
11187 (sha256
11188 (base32
11189 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11190 (modules '((guix build utils)))
11191 (snippet
11192 '(begin
11193 ;; Glances phones PyPI for weekly update checks by default.
11194 ;; Disable these. The user can re-enable them if desired.
11195 (substitute* "glances/outdated.py"
11196 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11197 (string-append indentation
11198 "self.args.disable_check_update = True\n"
11199 line)))
11200 #t))))
11201 (build-system python-build-system)
11202 (propagated-inputs
11203 `(("python-future" ,python-future)
11204 ("python-psutil" ,python-psutil)))
11205 (home-page
11206 "https://github.com/nicolargo/glances")
11207 (synopsis "Cross-platform curses-based monitoring tool")
11208 (description
11209 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11210 Glances uses the PsUtil library to get information from your system. It
11211 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11212 (license license:lgpl3+)))
11213
11214 (define-public python2-glances
11215 (package-with-python2 python-glances))
11216
11217 (define-public python-graphql-core
11218 (package
11219 (name "python-graphql-core")
11220 (version "0.5.3")
11221 (source
11222 (origin
11223 (method url-fetch)
11224 (uri (pypi-uri "graphql-core" version))
11225 (sha256
11226 (base32
11227 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11228 (build-system python-build-system)
11229 (arguments
11230 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11231 #:phases
11232 (modify-phases %standard-phases
11233 (add-after 'unpack 'patch-hardcoded-version
11234 (lambda _ (substitute*
11235 "setup.py"
11236 (("'gevent==1.1rc1'") "'gevent'"))
11237 #t)))))
11238 (native-inputs
11239 `(("python-gevent" ,python-gevent)
11240 ("python-mock" ,python-mock)
11241 ("python-pytest-mock" ,python-pytest-mock)))
11242 (propagated-inputs
11243 `(("python-promise" ,python-promise)
11244 ("python-six" ,python-six)))
11245 (home-page "https://github.com/graphql-python/graphql-core")
11246 (synopsis "GraphQL implementation for Python")
11247 (description
11248 "GraphQL implementation for Python. GraphQL is a data query language and
11249 runtime designed and used to request and deliver data to mobile and web apps.
11250 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11251 to Python.")
11252 (license license:expat)))
11253
11254 (define-public python2-graphql-core
11255 (package-with-python2 python-graphql-core))
11256
11257 (define-public python-graphql-relay
11258 (package
11259 (name "python-graphql-relay")
11260 (version "0.4.5")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (pypi-uri "graphql-relay" version))
11265 (sha256
11266 (base32
11267 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11268 (build-system python-build-system)
11269 (arguments
11270 '(#:tests? #f)) ; The tests are not distributed
11271 (propagated-inputs
11272 `(("python-graphql-core" ,python-graphql-core)
11273 ("python-promise" ,python-promise)
11274 ("python-six" ,python-six)))
11275 (home-page "https://github.com/graphql-python/graphql-relay-py")
11276 (synopsis "Relay implementation for Python")
11277 (description
11278 "This is a library to allow the easy creation of Relay-compliant servers
11279 using the GraphQL Python reference implementation of a GraphQL server. It
11280 should be noted that the code is a exact port of the original
11281 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11282 from Facebook.")
11283 (license license:expat)))
11284
11285 (define-public python2-graphql-relay
11286 (package-with-python2 python-graphql-relay))
11287
11288 (define-public python-graphene
11289 (package
11290 (name "python-graphene")
11291 (version "0.10.2")
11292 (source
11293 (origin
11294 (method url-fetch)
11295 (uri (pypi-uri "graphene" version))
11296 (sha256
11297 (base32
11298 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11299 (build-system python-build-system)
11300 (propagated-inputs
11301 `(("python-graphql-core" ,python-graphql-core)
11302 ("python-graphql-relay" ,python-graphql-relay)
11303 ("python-iso8601" ,python-iso8601)
11304 ("python-promise" ,python-promise)
11305 ("python-six" ,python-six)))
11306 (arguments
11307 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11308 (home-page "http://graphene-python.org/")
11309 (synopsis "GraphQL Framework for Python")
11310 (description
11311 "Graphene is a Python library for building GraphQL schemas/types.
11312 A GraphQL schema describes your data model, and provides a GraphQL server
11313 with an associated set of resolve methods that know how to fetch data.")
11314 (properties `((python2-variant . ,(delay python2-graphene))))
11315 (license license:expat)))
11316
11317 (define-public python2-graphene
11318 (let ((base (package-with-python2
11319 (strip-python2-variant python-graphene))))
11320 (package (inherit base)
11321 (native-inputs
11322 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11323 ,@(package-native-inputs base))))))
11324
11325 (define-public python-nautilus
11326 (package
11327 (name "python-nautilus")
11328 (version "0.4.9")
11329 (source
11330 (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "nautilus" version))
11333 (sha256
11334 (base32
11335 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11336 (build-system python-build-system)
11337 (arguments `(#:tests? #f)) ; fails to import test modules
11338 (propagated-inputs
11339 `(("python-bcrypt" ,python-bcrypt)
11340 ("python-click" ,python-click)
11341 ("python-consul" ,python-consul)
11342 ("python-graphene" ,python-graphene)
11343 ("python-jinja2" ,python-jinja2)
11344 ("python-peewee" ,python-peewee)
11345 ("python-pika" ,python-pika)
11346 ("python-tornado" ,python-tornado)
11347 ("python-wtforms" ,python-wtforms)))
11348 (native-inputs
11349 `(("python-nose2" ,python-nose2)))
11350 (home-page "https://github.com/AlecAivazis/nautilus")
11351 (synopsis "Library for creating microservice applications")
11352 (description
11353 "Nautilus is a framework for flux based microservices that looks to
11354 provide extendible implementations of common aspects of a cloud so that you can
11355 focus on building massively scalable web applications.")
11356 (license license:expat)))
11357
11358 (define-public python-snowballstemmer
11359 (package
11360 (name "python-snowballstemmer")
11361 (version "1.2.1")
11362 (source (origin
11363 (method url-fetch)
11364 (uri (pypi-uri "snowballstemmer" version))
11365 (sha256
11366 (base32
11367 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11368 (build-system python-build-system)
11369 (arguments
11370 `(;; No tests exist
11371 #:tests? #f))
11372 (home-page "https://github.com/shibukawa/snowball_py")
11373 (synopsis "Snowball stemming library collection for Python")
11374 (description "This package provides 16 word stemmer algorithms generated
11375 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11376 English stemmer.")
11377 (license license:bsd-3)))
11378
11379 (define-public python2-snowballstemmer
11380 (package-with-python2 python-snowballstemmer))
11381
11382 (define-public python-setproctitle
11383 (package
11384 (name "python-setproctitle")
11385 (version "1.1.10")
11386 (source
11387 (origin
11388 (method url-fetch)
11389 (uri (pypi-uri "setproctitle" version))
11390 (sha256
11391 (base32
11392 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11393 (build-system python-build-system)
11394 (arguments
11395 '(#:phases
11396 (modify-phases %standard-phases
11397 (add-before 'check 'patch-Makefile
11398 ;; Stricly this is only required for the python2 variant.
11399 ;; But adding a phase in an inherited package seems to be
11400 ;; cumbersum. So we patch even for python3.
11401 (lambda _
11402 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11403 (when nose
11404 (substitute* "Makefile"
11405 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11406 (string-append nose "/bin/nosetests "))))
11407 #t)))
11408 (replace 'check
11409 (lambda _
11410 (setenv "PYTHON" (or (which "python3") (which "python")))
11411 (setenv "PYCONFIG" (or (which "python3-config")
11412 (which "python-config")))
11413 (setenv "CC" "gcc")
11414 ;; No need to extend PYTHONPATH to find the built package, since
11415 ;; the Makefile will build anyway
11416 (invoke "make" "check"))))))
11417 (native-inputs
11418 `(("procps" ,procps))) ; required for tests
11419 (home-page
11420 "https://github.com/dvarrazzo/py-setproctitle")
11421 (synopsis
11422 "Setproctitle implementation for Python to customize the process title")
11423 (description "The library allows a process to change its title (as displayed
11424 by system tools such as ps and top).
11425
11426 Changing the title is mostly useful in multi-process systems, for
11427 example when a master process is forked: changing the children's title
11428 allows to identify the task each process is busy with. The technique
11429 is used by PostgreSQL and the OpenSSH Server for example.")
11430 (license license:bsd-3)
11431 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11432
11433 (define-public python2-setproctitle
11434 (let ((base (package-with-python2
11435 (strip-python2-variant python-setproctitle))))
11436 (package
11437 (inherit base)
11438 (native-inputs `(("python2-nose" ,python2-nose)
11439 ,@(package-native-inputs base))))))
11440
11441 (define-public python-validictory
11442 (package
11443 (name "python-validictory")
11444 (version "1.0.1")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (pypi-uri "validictory" version))
11449 (sha256
11450 (base32
11451 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11452 (build-system python-build-system)
11453 (arguments
11454 '(#:phases
11455 (modify-phases %standard-phases
11456 (add-after 'unpack 'bootstrap
11457 ;; Move the tests out of the package directory to avoid
11458 ;; packaging them.
11459 (lambda* _
11460 (rename-file "validictory/tests" "tests")
11461 (delete-file "tests/__init__.py")))
11462 (replace 'check
11463 (lambda _
11464 ;; Extend PYTHONPATH so the built package will be found.
11465 (setenv "PYTHONPATH"
11466 (string-append (getcwd) "/build/lib:"
11467 (getenv "PYTHONPATH")))
11468 (invoke "py.test" "-vv" ))))))
11469 (native-inputs
11470 `(("python-pytest" ,python-pytest)))
11471 (home-page
11472 "https://github.com/jamesturk/validictory")
11473 (synopsis "General purpose Python data validator")
11474 (description "It allows validation of arbitrary Python data structures.
11475
11476 The schema format is based on the JSON Schema
11477 proposal (http://json-schema.org), so combined with json the library is also
11478 useful as a validator for JSON data.")
11479 (license license:expat)))
11480
11481 (define-public python2-validictory
11482 (package-with-python2 python-validictory))
11483
11484 (define-public python-pyelftools
11485 (package
11486 (name "python-pyelftools")
11487 (version "0.25")
11488 (source
11489 (origin
11490 (method url-fetch)
11491 (uri (pypi-uri "pyelftools" version))
11492 (sha256
11493 (base32
11494 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11495 (build-system python-build-system)
11496 (arguments
11497 `(#:phases
11498 (modify-phases %standard-phases
11499 (add-before 'check 'set-pythonpath
11500 (lambda _
11501 (setenv "PYTHONPATH"
11502 (string-append
11503 (getcwd) "/test/"
11504 ":" (getenv "PYTHONPATH")))
11505 #t)))))
11506 (home-page
11507 "https://github.com/eliben/pyelftools")
11508 (synopsis
11509 "Analyze binary and library file information")
11510 (description "This Python library provides interfaces for parsing and
11511 analyzing two binary and library file formats; the Executable and Linking
11512 Format (ELF), and debugging information in the Debugging With Attributed
11513 Record Format (DWARF).")
11514 (license license:public-domain)))
11515
11516 (define-public python-pyev
11517 (package
11518 (name "python-pyev")
11519 (version "0.9.0")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "pyev" version))
11524 (sha256
11525 (base32
11526 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11527 (build-system python-build-system)
11528 (arguments
11529 `(#:tests? #f ; no test suite
11530 #:phases
11531 (modify-phases %standard-phases
11532 (add-after 'unpack 'patch
11533 (lambda* (#:key inputs #:allow-other-keys)
11534 (let ((libev (string-append (assoc-ref inputs "libev")
11535 "/lib/libev.so.4")))
11536 (substitute* "setup.py"
11537 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11538 (string-append "libev_dll_name = \"" libev "\"")))))))))
11539 (inputs
11540 `(("libev" ,libev)))
11541 (home-page "http://pythonhosted.org/pyev/")
11542 (synopsis "Python libev interface")
11543 (description "Pyev provides a Python interface to libev.")
11544 (license license:gpl3)))
11545
11546 (define-public python2-pyev
11547 (package-with-python2 python-pyev))
11548
11549 (define-public python-imagesize
11550 (package
11551 (name "python-imagesize")
11552 (version "1.1.0")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "imagesize" version))
11557 (sha256
11558 (base32
11559 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11560 (build-system python-build-system)
11561 (home-page "https://github.com/shibukawa/imagesize_py")
11562 (synopsis "Gets image size of files in various formats in Python")
11563 (description
11564 "This package allows determination of image size from
11565 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11566 (license license:expat)))
11567
11568 (define-public python2-imagesize
11569 (package-with-python2 python-imagesize))
11570
11571 (define-public python-termstyle
11572 (package
11573 (name "python-termstyle")
11574 (version "0.1.11")
11575 (source
11576 (origin
11577 (method url-fetch)
11578 (uri (pypi-uri "termstyle" version))
11579 (sha256
11580 (base32
11581 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11582 (build-system python-build-system)
11583 (arguments
11584 '(#:phases
11585 (modify-phases %standard-phases
11586 (replace 'check
11587 (lambda _
11588 (invoke "python" "test3.py"))))))
11589 (home-page "https://github.com/gfxmonk/termstyle")
11590 (synopsis "Console text coloring for Python")
11591 (description "This package provides console text coloring for Python.")
11592 (license license:bsd-3)))
11593
11594 (define-public python-argcomplete
11595 (package
11596 (name "python-argcomplete")
11597 (version "1.7.0")
11598 (source
11599 (origin
11600 (method url-fetch)
11601 (uri (pypi-uri "argcomplete" version))
11602 (sha256
11603 (base32
11604 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11605 (build-system python-build-system)
11606 (native-inputs
11607 `(("python-pexpect" ,python-pexpect)
11608 ("tcsh" ,tcsh)
11609 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11610 (home-page "https://github.com/kislyuk/argcomplete")
11611 (synopsis "Shell tab completion for Python argparse")
11612 (description "argcomplete provides extensible command line tab completion
11613 of arguments and options for Python scripts using @code{argparse}. It's
11614 particularly useful for programs with many options or sub-parsers that can
11615 dynamically suggest completions; for example, when browsing resources over the
11616 network.")
11617 (license license:asl2.0)))
11618
11619 (define-public python2-argcomplete
11620 (package-with-python2 python-argcomplete))
11621
11622 (define-public python-xopen
11623 (package
11624 (name "python-xopen")
11625 (version "0.5.0")
11626 (source
11627 (origin
11628 (method url-fetch)
11629 (uri (pypi-uri "xopen" version))
11630 (sha256
11631 (base32
11632 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11633 (build-system python-build-system)
11634 (propagated-inputs
11635 `(("python-setuptools-scm" ,python-setuptools-scm)))
11636 (home-page "https://github.com/marcelm/xopen/")
11637 (synopsis "Open compressed files transparently")
11638 (description "This module provides an @code{xopen} function that works like
11639 Python's built-in @code{open} function, but can also deal with compressed files.
11640 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11641 recognized by their file extensions. The focus is on being as efficient as
11642 possible on all supported Python versions.")
11643 (license license:expat)))
11644
11645 (define-public python2-xopen
11646 (let ((base (package-with-python2
11647 (strip-python2-variant python-xopen))))
11648 (package
11649 (inherit base)
11650 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11651 ,@(package-propagated-inputs base))))))
11652
11653 (define-public python-cheetah
11654 (package
11655 (name "python-cheetah")
11656 (version "3.1.0")
11657 (source
11658 (origin
11659 (method url-fetch)
11660 (uri (pypi-uri "Cheetah3" version))
11661 (sha256
11662 (base32
11663 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11664 (build-system python-build-system)
11665 (arguments
11666 `(#:modules ((guix build utils)
11667 (guix build python-build-system)
11668 (ice-9 ftw)
11669 (srfi srfi-1)
11670 (srfi srfi-26))
11671 #:phases (modify-phases %standard-phases
11672 (add-after 'unpack 'use-absolute-python
11673 (lambda _
11674 (substitute* "Cheetah/CheetahWrapper.py"
11675 (("#!/usr/bin/env python")
11676 (string-append "#!" (which "python"))))
11677 #t))
11678 (replace 'check
11679 (lambda _
11680 (let ((cwd (getcwd)))
11681 (setenv "PYTHONPATH"
11682 (string-append
11683 cwd "/build/"
11684 (find (cut string-prefix? "lib" <>)
11685 (scandir (string-append cwd "/build")))
11686 ":" (getenv "PYTHONPATH")))
11687 (setenv "PATH"
11688 (string-append (getenv "PATH")
11689 ":" cwd "/bin"))
11690 (setenv "TMPDIR" "/tmp")
11691
11692 (substitute* "Cheetah/Tests/Test.py"
11693 (("unittest.TextTestRunner\\(\\)")
11694 "unittest.TextTestRunner(verbosity=2)"))
11695
11696 (invoke "python" "Cheetah/Tests/Test.py")))))))
11697 (propagated-inputs
11698 `(("python-markdown" ,python-markdown))) ;optional
11699 (home-page "http://cheetahtemplate.org/")
11700 (synopsis "Template engine")
11701 (description "Cheetah is a text-based template engine and Python code
11702 generator.
11703
11704 Cheetah can be used as a standalone templating utility or referenced as
11705 a library from other Python applications. It has many potential uses,
11706 but web developers looking for a viable alternative to ASP, JSP, PHP and
11707 PSP are expected to be its principle user group.
11708
11709 Features:
11710 @enumerate
11711 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11712 text-based format.
11713 @item Cleanly separates content, graphic design, and program code.
11714 @item Blends the power and flexibility of Python with a simple template language
11715 that non-programmers can understand.
11716 @item Gives template writers full access to any Python data structure, module,
11717 function, object, or method in their templates.
11718 @item Makes code reuse easy by providing an object-orientated interface to
11719 templates that is accessible from Python code or other Cheetah templates.
11720 One template can subclass another and selectively reimplement sections of it.
11721 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11722 improve the performance of a dynamic website.
11723 @item Compiles templates into optimized, yet readable, Python code.
11724 @end enumerate")
11725 (license (license:x11-style "file://LICENSE"))))
11726
11727 (define-public python2-cheetah
11728 (package-with-python2 python-cheetah))
11729
11730 (define-public python-dulwich
11731 (package
11732 (name "python-dulwich")
11733 (version "0.18.6")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (list (string-append "https://www.dulwich.io/releases/"
11738 "dulwich-" version ".tar.gz")
11739 (pypi-uri "dulwich" version)))
11740 (sha256
11741 (base32
11742 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11743 (build-system python-build-system)
11744 (arguments
11745 `(#:phases
11746 (modify-phases %standard-phases
11747 (add-before 'check 'fix-tests
11748 (lambda* (#:key inputs #:allow-other-keys)
11749 ;; The tests use Popen with a custom environment which doesn't
11750 ;; include PATH.
11751 (substitute* "dulwich/tests/compat/utils.py"
11752 (("'git'") (string-append "'"
11753 (which "git")
11754 "'")))
11755 (substitute* '("dulwich/tests/test_repository.py"
11756 "dulwich/tests/test_hooks.py")
11757 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11758 (setenv "TEST_RUNNER" "unittest")
11759 (setenv "PYTHONHASHSEED" "random")
11760 #t)))))
11761 (propagated-inputs
11762 `(("python-fastimport" ,python-fastimport)))
11763 (native-inputs
11764 `(("python-mock" ,python-mock)
11765 ("python-geventhttpclient" ,python-geventhttpclient)
11766 ("git" ,git)))
11767 (home-page "https://www.dulwich.io/")
11768 (synopsis "Git implementation in Python")
11769 (description "Dulwich is an implementation of the Git file formats and
11770 protocols written in pure Python.")
11771 ;; Can be used with either license.
11772 (license (list license:asl2.0 license:gpl2+))))
11773
11774 (define-public python2-dulwich
11775 (package-with-python2 python-dulwich))
11776
11777 (define-public python-pbkdf2
11778 (package
11779 (name "python-pbkdf2")
11780 (version "1.3")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "pbkdf2" version))
11785 (sha256
11786 (base32
11787 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11788 (build-system python-build-system)
11789 (arguments
11790 '(#:phases
11791 (modify-phases %standard-phases
11792 (replace 'check
11793 (lambda _
11794 (setenv "PYTHONPATH"
11795 (string-append (getcwd) "/build/lib:"
11796 (getenv "PYTHONPATH")))
11797 (invoke "python" "test/test_pbkdf2.py"))))))
11798 (propagated-inputs
11799 `(("python-pycrypto" ,python-pycrypto))) ; optional
11800 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11801 (synopsis "Password-based key derivation")
11802 (description "This module implements the password-based key derivation
11803 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11804
11805 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11806 is part of the RSA Public Key Cryptography Standards series. The provided
11807 implementation takes a password or a passphrase and a salt value (and
11808 optionally a iteration count, a digest module, and a MAC module) and provides
11809 a file-like object from which an arbitrarly-sized key can be read.")
11810 (license license:expat)))
11811
11812 (define-public python2-pbkdf2
11813 (package-with-python2 python-pbkdf2))
11814
11815 (define-public python-qrcode
11816 (package
11817 (name "python-qrcode")
11818 (version "6.1")
11819 (source
11820 (origin
11821 (method url-fetch)
11822 (uri (pypi-uri "qrcode" version))
11823 (sha256
11824 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11825 (build-system python-build-system)
11826 (arguments
11827 ;; FIXME: Tests require packaging 'pymaging'.
11828 '(#:tests? #f))
11829 (propagated-inputs
11830 `(("python-lxml" ,python-lxml) ; for SVG output
11831 ("python-pillow" ,python-pillow) ; for PNG output
11832 ("python-six" ,python-six)))
11833 (home-page "https://github.com/lincolnloop/python-qrcode")
11834 (synopsis "QR Code image generator")
11835 (description "This package provides a pure Python QR Code generator
11836 module. It uses the Python Imaging Library (PIL) to allow for the generation
11837 of QR Codes.
11838
11839 In addition this package provides a command line tool to generate QR codes and
11840 either write these QR codes to a file or do the output as ascii art at the
11841 console.")
11842 (license license:bsd-3)))
11843
11844 (define-public python2-qrcode
11845 (package-with-python2 python-qrcode))
11846
11847 (define-public python-rst2ansi
11848 (package
11849 (name "python-rst2ansi")
11850 (version "0.1.5")
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (pypi-uri "rst2ansi" version))
11855 (sha256
11856 (base32
11857 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11858 (build-system python-build-system)
11859 (propagated-inputs
11860 `(("python-docutils" ,python-docutils)))
11861 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11862 (synopsis "Convert RST to ANSI-decorated console output")
11863 (description
11864 "Python module dedicated to rendering RST (reStructuredText) documents
11865 to ansi-escaped strings suitable for display in a terminal.")
11866 (license license:expat)))
11867
11868 (define-public python-ansi2html
11869 (package
11870 (name "python-ansi2html")
11871 (version "1.2.0")
11872 (source
11873 (origin
11874 (method url-fetch)
11875 (uri (pypi-uri "ansi2html" version))
11876 (sha256
11877 (base32
11878 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11879 (build-system python-build-system)
11880 (native-inputs
11881 `(("python-mock" ,python-mock)
11882 ("python-nose" ,python-nose)))
11883 (propagated-inputs
11884 `(("python-six" ,python-six)))
11885 (home-page "https://github.com/ralphbean/ansi2html")
11886 (synopsis "Convert ANSI-decorated console output to HTML")
11887 (description
11888 "@command{ansi2html} is a Python library and command line utility for
11889 convering text with ANSI color codes to HTML or LaTeX.")
11890 (license license:gpl3+)))
11891
11892 (define-public python2-ansi2html
11893 (package-with-python2 python-ansi2html))
11894
11895 (define-public python-ddt
11896 (package
11897 (name "python-ddt")
11898 (version "1.1.3")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "ddt" version))
11903 (sha256
11904 (base32
11905 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11906 (build-system python-build-system)
11907 (native-inputs
11908 `(("python-mock" ,python-mock)
11909 ("python-nose" ,python-nose)))
11910 (propagated-inputs
11911 `(("python-six" ,python-six)
11912 ("python-pyyaml" ,python-pyyaml)))
11913 (home-page "https://github.com/txels/ddt")
11914 (synopsis "Data-Driven Tests")
11915 (description
11916 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11917 running it with different test data, and make it appear as multiple test
11918 cases.")
11919 (license license:expat)))
11920
11921 (define-public python2-ddt
11922 (package-with-python2 python-ddt))
11923
11924 (define-public python-pycountry
11925 (package
11926 (name "python-pycountry")
11927 (version "18.5.26")
11928 (source
11929 (origin
11930 (method url-fetch)
11931 (uri (pypi-uri "pycountry" version))
11932 (sha256
11933 (base32
11934 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11935 (build-system python-build-system)
11936 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11937 (synopsis "ISO databases for languages, countries, currencies, etc.")
11938 (description
11939 "@code{pycountry} provides the ISO databases for the standards:
11940 @enumerate
11941 @item 639-3 (Languages)
11942 @item 3166 (Countries)
11943 @item 3166-3 (Deleted Countries)
11944 @item 3166-2 (Subdivisions of countries)
11945 @item 4217 (Currencies)
11946 @item 15924 (Scripts)
11947 @end enumerate
11948 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11949 through a Python API.")
11950 (license license:lgpl2.1+)))
11951
11952 (define-public python2-pycountry
11953 (package-with-python2 python-pycountry))
11954
11955 (define-public python-pycosat
11956 (package
11957 (name "python-pycosat")
11958 (version "0.6.1")
11959 (source
11960 (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "pycosat" version))
11963 (sha256
11964 (base32
11965 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11966 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11967 (build-system python-build-system)
11968 (home-page "https://github.com/ContinuumIO/pycosat")
11969 (synopsis "Bindings to picosat (a SAT solver)")
11970 (description
11971 "This package provides efficient Python bindings to @code{picosat} on
11972 the C level. When importing pycosat, the @code{picosat} solver becomes part
11973 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11974 Problem} (SAT) solver.")
11975 (license license:expat)))
11976
11977 (define-public python2-pycosat
11978 (package-with-python2 python-pycosat))
11979
11980 (define-public python2-ruamel.ordereddict
11981 (package
11982 (name "python2-ruamel.ordereddict")
11983 (version "0.4.9")
11984 (source
11985 (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "ruamel.ordereddict" version))
11988 (sha256
11989 (base32
11990 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11991 (build-system python-build-system)
11992 (arguments
11993 `(#:python ,python-2
11994 #:phases
11995 (modify-phases %standard-phases
11996 (delete 'check)
11997 (add-after 'install 'check
11998 (lambda* (#:key inputs outputs #:allow-other-keys)
11999 (add-installed-pythonpath inputs outputs)
12000 (invoke "python" "test/testordereddict.py"))))))
12001 (home-page "https://bitbucket.org/ruamel/ordereddict")
12002 (synopsis "Version of dict that keeps keys in insertion order")
12003 (description
12004 "This is an implementation of an ordered dictionary with @dfn{Key
12005 Insertion Order} (KIO: updates of values do not affect the position of the
12006 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12007 removed and put at the back). The standard library module @code{OrderedDict},
12008 implemented later, implements a subset of @code{ordereddict} functionality.
12009 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12010 Order} (KSO, no sorting function can be specified, but a transform can be
12011 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12012 (license license:expat)))
12013
12014 (define-public python-pypeg2
12015 (package
12016 (name "python-pypeg2")
12017 (version "2.15.2")
12018 (source
12019 (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "pyPEG2" version))
12022 (sha256
12023 (base32
12024 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12025 (build-system python-build-system)
12026 (propagated-inputs `(("python-lxml" ,python-lxml)))
12027 (arguments
12028 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12029 '(#:tests? #f))
12030 (home-page "https://fdik.org/pyPEG/")
12031 (synopsis "Parsering Expression Grammars in Python")
12032 (description "PyPEG is an intrinsic parser interpreter framework for
12033 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12034 parse many formal languages.")
12035 (license license:gpl2)))
12036
12037 (define-public python-incremental
12038 (package
12039 (name "python-incremental")
12040 (version "17.5.0")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "incremental" version))
12045 (sha256
12046 (base32
12047 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12048 (build-system python-build-system)
12049 (home-page "https://github.com/hawkowl/incremental")
12050 (synopsis "Library for versioning Python projects")
12051 (description "Incremental is a small library that versions your Python
12052 projects.")
12053 (license license:expat)))
12054
12055 (define-public python2-incremental
12056 (package-with-python2 python-incremental))
12057
12058 (define-public python-invoke
12059 (package
12060 (name "python-invoke")
12061 (home-page "http://www.pyinvoke.org/")
12062 (version "1.1.0")
12063 (source (origin
12064 (method url-fetch)
12065 (uri (pypi-uri "invoke" version))
12066 (sha256
12067 (base32
12068 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12069 (build-system python-build-system)
12070 (arguments
12071 ;; XXX: Requires many dependencies that are not yet in Guix.
12072 `(#:tests? #f))
12073 (synopsis "Pythonic task execution")
12074 (description
12075 "Invoke is a Python task execution tool and library, drawing inspiration
12076 from various sources to arrive at a powerful and clean feature set. It is
12077 evolved from the Fabric project, but focuses on local and abstract concerns
12078 instead of servers and network commands.")
12079 (license license:bsd-3)))
12080
12081 (define-public python2-invoke
12082 (package-with-python2 python-invoke))
12083
12084 (define-public python-automat
12085 (package
12086 (name "python-automat")
12087 (version "0.7.0")
12088 (source (origin
12089 (method url-fetch)
12090 (uri (pypi-uri "Automat" version))
12091 (sha256
12092 (base32
12093 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12094 (build-system python-build-system)
12095 ;; We disable the tests because they require python-twisted, while
12096 ;; python-twisted depends on python-automat. Twisted is optional, but the
12097 ;; tests fail if it is not available. Also see
12098 ;; <https://github.com/glyph/automat/issues/71>.
12099 (arguments '(#:tests? #f))
12100 (native-inputs
12101 `(("python-m2r" ,python-m2r)
12102 ("python-setuptools-scm" ,python-setuptools-scm)
12103 ("python-graphviz" ,python-graphviz)))
12104 (propagated-inputs
12105 `(("python-six" ,python-six)
12106 ("python-attrs" ,python-attrs)))
12107 (home-page "https://github.com/glyph/Automat")
12108 (synopsis "Self-service finite-state machines")
12109 (description "Automat is a library for concise, idiomatic Python
12110 expression of finite-state automata (particularly deterministic finite-state
12111 transducers).")
12112 (license license:expat)))
12113
12114 (define-public python2-automat
12115 (package-with-python2 python-automat))
12116
12117 (define-public python-m2r
12118 (package
12119 (name "python-m2r")
12120 (version "0.2.1")
12121 (source (origin
12122 (method url-fetch)
12123 (uri (pypi-uri "m2r" version))
12124 (sha256
12125 (base32
12126 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12127 (build-system python-build-system)
12128 (propagated-inputs
12129 `(("python-docutils" ,python-docutils)
12130 ("python-mistune" ,python-mistune)))
12131 (native-inputs
12132 `(("python-pygments" ,python-pygments)
12133 ("python-mock" ,python-mock)))
12134 (home-page "https://github.com/miyakogi/m2r")
12135 (synopsis "Markdown to reStructuredText converter")
12136 (description "M2R converts a markdown file including reST markups to valid
12137 reST format.")
12138 (license license:expat)))
12139
12140 (define-public python2-m2r
12141 (package-with-python2 python-m2r))
12142
12143 (define-public python-constantly
12144 (package
12145 (name "python-constantly")
12146 (version "15.1.0")
12147 (source (origin
12148 (method url-fetch)
12149 (uri (pypi-uri "constantly" version))
12150 (sha256
12151 (base32
12152 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12153 (build-system python-build-system)
12154 (home-page "https://github.com/twisted/constantly")
12155 (synopsis "Symbolic constants in Python")
12156 (description "Constantly is a Python library that provides symbolic
12157 constant support. It includes collections and constants with text, numeric,
12158 and bit flag values.")
12159 (license license:expat)))
12160
12161 (define-public python2-constantly
12162 (package-with-python2 python-constantly))
12163
12164 (define-public python-attrs
12165 (package
12166 (name "python-attrs")
12167 (version "19.1.0")
12168 (source (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "attrs" version))
12171 (sha256
12172 (base32
12173 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12174 (build-system python-build-system)
12175 (arguments
12176 `(#:modules ((guix build utils)
12177 (guix build python-build-system)
12178 (ice-9 ftw)
12179 (srfi srfi-1)
12180 (srfi srfi-26))
12181 #:phases (modify-phases %standard-phases
12182 (replace 'check
12183 (lambda _
12184 (let ((cwd (getcwd)))
12185 (setenv "PYTHONPATH"
12186 (string-append
12187 cwd "/build/"
12188 (find (cut string-prefix? "lib" <>)
12189 (scandir (string-append cwd "/build")))
12190 ":"
12191 (getenv "PYTHONPATH")))
12192 (invoke "python" "-m" "pytest")))))))
12193 (native-inputs
12194 `(("python-coverage" ,python-coverage)
12195 ("python-hypothesis" ,python-hypothesis)
12196 ("python-pympler" ,python-pympler)
12197 ("python-pytest" ,python-pytest)
12198 ("python-six" ,python-six)
12199 ("python-sphinx" ,python-sphinx)
12200 ("python-zope-interface" ,python-zope-interface)))
12201 (home-page "https://github.com/python-attrs/attrs/")
12202 (synopsis "Attributes without boilerplate")
12203 (description "@code{attrs} is a Python package with class decorators that
12204 ease the chores of implementing the most common attribute-related object
12205 protocols.")
12206 (license license:expat)))
12207
12208 (define-public python2-attrs
12209 (package-with-python2 python-attrs))
12210
12211 (define-public python-attrs-bootstrap
12212 (package
12213 (inherit python-attrs)
12214 (name "python-attrs-bootstrap")
12215 (native-inputs `())
12216 (arguments `(#:tests? #f))))
12217
12218 (define-public python2-attrs-bootstrap
12219 (package-with-python2 python-attrs-bootstrap))
12220
12221 (define-public python2-cliapp
12222 (package
12223 (name "python2-cliapp")
12224 (version "1.20180812.1")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (string-append
12229 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12230 version ".tar.gz"))
12231 (sha256
12232 (base32
12233 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12234 (build-system python-build-system)
12235 (arguments
12236 `(#:python ,python-2
12237 #:phases
12238 (modify-phases %standard-phases
12239 ;; check phase needs to be run before the build phase. If not,
12240 ;; coverage-test-runner looks for tests for the built source files,
12241 ;; and fails.
12242 (delete 'check)
12243 (add-before 'build 'check
12244 (lambda _
12245 ;; Disable python3 tests
12246 (substitute* "check"
12247 (("python3") "# python3"))
12248 (invoke "./check"))))))
12249 (native-inputs
12250 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12251 ("python2-pep8" ,python2-pep8)))
12252 (propagated-inputs
12253 `(("python2-pyaml" ,python2-pyaml)))
12254 (home-page "https://liw.fi/cliapp/")
12255 (synopsis "Python framework for command line programs")
12256 (description "@code{python2-cliapp} is a python framework for
12257 command line programs. It contains the typical stuff such programs
12258 need to do, such as parsing the command line for options, and
12259 iterating over input files.")
12260 (license license:gpl2+)))
12261
12262 (define-public python2-ttystatus
12263 (package
12264 (name "python2-ttystatus")
12265 (version "0.36")
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (string-append
12270 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12271 version ".tar.gz"))
12272 (sha256
12273 (base32
12274 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12275 (build-system python-build-system)
12276 (native-inputs
12277 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12278 ("python2-pep8" ,python2-pep8)))
12279 (arguments
12280 `(#:python ,python-2
12281 #:phases
12282 (modify-phases %standard-phases
12283 ;; check phase needs to be run before the build phase. If not,
12284 ;; coverage-test-runner looks for tests for the built source files,
12285 ;; and fails.
12286 (delete 'check)
12287 (add-before 'build 'check
12288 (lambda _ (invoke "make" "check"))))))
12289 (home-page "https://liw.fi/ttystatus/")
12290 (synopsis "Python library for showing progress reporting and
12291 status updates on terminals")
12292 (description "@code{python2-ttystatus} is a python library for
12293 showing progress reporting and status updates on terminals, for
12294 command line programs. Output is automatically adapted to the width
12295 of the terminal: truncated if it does not fit, and resized if the
12296 terminal size changes.")
12297 (license license:gpl3+)))
12298
12299 (define-public python2-tracing
12300 (package
12301 (name "python2-tracing")
12302 (version "0.10")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (string-append
12307 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12308 version ".tar.gz"))
12309 (sha256
12310 (base32
12311 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12312 (build-system python-build-system)
12313 (arguments
12314 `(#:python ,python-2))
12315 (home-page "https://liw.fi/tracing/")
12316 (synopsis "Python debug logging helper")
12317 (description "@code{python2-tracing} is a python library for
12318 logging debug messages. It provides a way to turn debugging messages
12319 on and off, based on the filename they occur in. It is much faster
12320 than using @code{logging.Filter} to accomplish the same thing, which
12321 matters when code is run in production mode. The actual logging still
12322 happens using the @code{logging} library.")
12323 (license license:gpl3+)))
12324
12325 (define-public python2-larch
12326 (package
12327 (name "python2-larch")
12328 (version "1.20151025")
12329 (source
12330 (origin
12331 (method url-fetch)
12332 (uri (string-append
12333 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12334 version ".tar.gz"))
12335 (patches (search-patches
12336 "python2-larch-coverage-4.0a6-compatibility.patch"))
12337 (sha256
12338 (base32
12339 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12340 (build-system python-build-system)
12341 (arguments
12342 `(#:python ,python-2
12343 #:phases
12344 (modify-phases %standard-phases
12345 ;; check phase needs to be run before the build phase. If not,
12346 ;; coverage-test-runner looks for tests for the built source files,
12347 ;; and fails.
12348 (delete 'check)
12349 (add-before 'build 'check
12350 (lambda _ (invoke "make" "check"))))))
12351 (native-inputs
12352 `(("cmdtest" ,cmdtest)
12353 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12354 (propagated-inputs
12355 `(("python2-tracing" ,python2-tracing)))
12356 (home-page "https://liw.fi/larch/")
12357 (synopsis "Python copy-on-write B-tree library")
12358 (description "@code{python2-larch} is an implementation of
12359 particular kind of B-tree, based on research by Ohad Rodeh. See
12360 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12361 on the data structure.
12362
12363 The distinctive feature of this B-tree is that a node is never
12364 (conceptually) modified. Instead, all updates are done by
12365 copy-on-write. This makes it easy to clone a tree, and modify only the
12366 clone, while other processes access the original tree.")
12367 (license license:gpl3+)))
12368
12369 (define-public python-astroid
12370 (package
12371 (name "python-astroid")
12372 (version "2.1.0")
12373 (source
12374 (origin
12375 (method url-fetch)
12376 (uri (pypi-uri "astroid" version))
12377 (sha256
12378 (base32
12379 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12380 (build-system python-build-system)
12381 (propagated-inputs
12382 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12383 ("python-six" ,python-six)
12384 ("python-wrapt" ,python-wrapt)))
12385 (native-inputs
12386 `(("python-dateutil" ,python-dateutil)
12387 ("python-nose" ,python-nose)
12388 ("python-pytest" ,python-pytest)
12389 ("python-pytest-runner" ,python-pytest-runner)))
12390 (arguments
12391 `(#:phases
12392 (modify-phases %standard-phases
12393 (add-after 'unpack 'remove-spurious-test
12394 (lambda _
12395 ;; This can be removed after upgrading from python-3.7
12396 ;; https://github.com/PyCQA/astroid/issues/593
12397 ;; https://bugs.python.org/issue34056
12398 (delete-file "astroid/tests/unittest_modutils.py")
12399 #t))
12400 (replace 'check
12401 (lambda _
12402 (invoke "pytest" "astroid"))))))
12403 (home-page "https://github.com/PyCQA/astroid")
12404 (synopsis "Common base representation of python source code for pylint and
12405 other projects")
12406 (description "@code{python-astroid} provides a common base representation
12407 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12408
12409 It provides a compatible representation which comes from the _ast module. It
12410 rebuilds the tree generated by the builtin _ast module by recursively walking
12411 down the AST and building an extended ast. The new node classes have
12412 additional methods and attributes for different usages. They include some
12413 support for static inference and local name scopes. Furthermore, astroid
12414 builds partial trees by inspecting living objects.")
12415 (license license:lgpl2.1+)
12416 (properties `((python2-variant . ,(delay python2-astroid))))))
12417
12418 (define-public python2-astroid
12419 (let ((base (package-with-python2
12420 (strip-python2-variant python-astroid))))
12421 (package (inherit base)
12422 ;; Version 2.x removes python2 support.
12423 (version "1.6.5")
12424 (source
12425 (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "astroid" version))
12428 (sha256
12429 (base32
12430 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12431 (arguments
12432 (substitute-keyword-arguments (package-arguments base)
12433 ((#:phases phases)
12434 `(modify-phases ,phases
12435 (add-after 'unpack 'remove-spurious-test
12436 (lambda _
12437 ;; https://github.com/PyCQA/astroid/issues/276
12438 (delete-file "astroid/tests/unittest_brain.py")
12439 #t))
12440 (replace 'check
12441 (lambda _
12442 (invoke"python" "-m" "unittest" "discover"
12443 "-p" "unittest*.py")))))))
12444 (native-inputs `())
12445 (propagated-inputs
12446 `(("python2-backports-functools-lru-cache"
12447 ,python2-backports-functools-lru-cache)
12448 ("python2-enum34" ,python2-enum34)
12449 ("python2-singledispatch" ,python2-singledispatch)
12450 ,@(package-propagated-inputs base))))))
12451
12452 (define-public python-isort
12453 (package
12454 (name "python-isort")
12455 (version "4.3.4")
12456 (source
12457 (origin
12458 (method git-fetch)
12459 (uri (git-reference
12460 ;; Tests pass only from the Github sources
12461 (url "https://github.com/timothycrosley/isort")
12462 (commit version)))
12463 (file-name (git-file-name name version))
12464 (sha256
12465 (base32
12466 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12467 (build-system python-build-system)
12468 (native-inputs
12469 `(("python-mock" ,python-mock)
12470 ("python-pytest" ,python-pytest)))
12471 (home-page "https://github.com/timothycrosley/isort")
12472 (synopsis "Python utility/library to sort python imports")
12473 (description "@code{python-isort} is a python utility/library to sort
12474 imports alphabetically, and automatically separated into sections. It
12475 provides a command line utility, a python library and plugins for various
12476 editors.")
12477 (license license:expat)
12478 (properties `((python2-variant . ,(delay python2-isort))))))
12479
12480 (define-public python2-isort
12481 (let ((base (package-with-python2
12482 (strip-python2-variant python-isort))))
12483 (package (inherit base)
12484 (native-inputs
12485 `(("python2-futures" ,python2-futures)
12486 ,@(package-native-inputs base))))))
12487
12488 (define-public python2-backports-functools-lru-cache
12489 (package
12490 (name "python2-backports-functools-lru-cache")
12491 (version "1.5")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 ;; only the pypi tarballs contain the necessary metadata
12496 (uri (pypi-uri "backports.functools_lru_cache" version))
12497 (sha256
12498 (base32
12499 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12500 (build-system python-build-system)
12501 (native-inputs
12502 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12503 (arguments
12504 `(#:python ,python-2))
12505 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12506 (synopsis "Backport of functools.lru_cache from Python 3.3")
12507 (description "@code{python2-backports-functools-lru-cache} is a backport
12508 of @code{functools.lru_cache} from python 3.3.")
12509 (license license:expat)))
12510
12511 (define-public python-configparser
12512 (package
12513 (name "python-configparser")
12514 (version "3.7.1")
12515 (source
12516 (origin
12517 (method url-fetch)
12518 (uri (pypi-uri "configparser" version))
12519 (sha256
12520 (base32
12521 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12522 (build-system python-build-system)
12523 (home-page "https://github.com/jaraco/configparser/")
12524 (synopsis "Backport of configparser from python 3.5")
12525 (description "@code{python-configparser} is a backport of
12526 @code{configparser} from Python 3.5 so that it can be used directly
12527 in other versions.")
12528 (license license:expat)))
12529
12530 (define-public python2-configparser
12531 (package-with-python2 python-configparser))
12532
12533 (define-public python-mando
12534 (package
12535 (name "python-mando")
12536 (version "0.6.4")
12537 (source (origin
12538 (method url-fetch)
12539 (uri (pypi-uri "mando" version))
12540 (sha256
12541 (base32
12542 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12543 (build-system python-build-system)
12544 (propagated-inputs
12545 `(("python-rst2ansi" ,python-rst2ansi)
12546 ("python-six" ,python-six)))
12547 (native-inputs
12548 `(("python-pytest" ,python-pytest)))
12549 (home-page "https://mando.readthedocs.org/")
12550 (synopsis
12551 "Wrapper around argparse, allowing creation of complete CLI applications")
12552 (description
12553 "This package is a wrapper around argparse, allowing you to write complete CLI
12554 applications in seconds while maintaining all the flexibility.")
12555 (license license:expat)))
12556
12557 (define-public python2-mando
12558 (package-with-python2 python-mando))
12559
12560 (define-public python2-argparse
12561 (package
12562 (name "python2-argparse")
12563 (version "1.4.0")
12564 (source
12565 (origin
12566 (method url-fetch)
12567 (uri (pypi-uri "argparse" version))
12568 (sha256
12569 (base32
12570 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12571 (build-system python-build-system)
12572 (arguments
12573 `(#:python ,python-2))
12574 (home-page "https://github.com/ThomasWaldmann/argparse/")
12575 (synopsis "Python command-line parsing library")
12576 (description
12577 "This package is mostly for people who want to have @code{argparse} on
12578 older Pythons because it was not part of the standard library back then.")
12579 (license license:psfl)))
12580
12581 (define-public python-fudge
12582 (package
12583 (name "python-fudge")
12584 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12585 ;; package, which is currently the only use of this package.
12586 (version "0.9.6")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "fudge" version))
12591 (sha256
12592 (base32
12593 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12594 (build-system python-build-system)
12595 (arguments
12596 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12597 (home-page "https://github.com/fudge-py/fudge")
12598 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12599 (description
12600 "Fudge is a Python module for using fake objects (mocks and stubs) to
12601 test real ones.
12602
12603 In readable Python code, you declare the methods available on your fake object
12604 and how they should be called. Then you inject that into your application and
12605 start testing. This declarative approach means you don’t have to record and
12606 playback actions and you don’t have to inspect your fakes after running code.
12607 If the fake object was used incorrectly then you’ll see an informative
12608 exception message with a traceback that points to the culprit.")
12609 (license license:expat)))
12610
12611 (define-public python2-fudge
12612 (package-with-python2 python-fudge))
12613
12614 (define-public python-mwclient
12615 (package
12616 (name "python-mwclient")
12617 (version "0.8.4")
12618 (source
12619 (origin
12620 (method url-fetch)
12621 ;; The PyPI version wouldn't contain tests.
12622 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12623 "v" version ".tar.gz"))
12624 (file-name (string-append name "-" version ".tar.gz"))
12625 (sha256
12626 (base32
12627 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12628 (build-system python-build-system)
12629 (propagated-inputs
12630 `(("python-requests" ,python-requests)
12631 ("python-requests-oauthlib"
12632 ,python-requests-oauthlib)
12633 ("python-six" ,python-six)))
12634 (native-inputs
12635 `(("python-mock" ,python-mock)
12636 ("python-pytest" ,python-pytest)
12637 ("python-pytest-pep8" ,python-pytest-pep8)
12638 ("python-pytest-cache" ,python-pytest-cache)
12639 ("python-pytest-cov" ,python-pytest-cov)
12640 ("python-responses" ,python-responses)))
12641 (home-page "https://github.com/btongminh/mwclient")
12642 (synopsis "MediaWiki API client")
12643 (description "This package provides a MediaWiki API client.")
12644 (license license:expat)))
12645
12646 (define-public python2-mwclient
12647 (package-with-python2 python-mwclient))
12648
12649 (define-public python-utils
12650 (package
12651 (name "python-utils")
12652 (version "2.1.0")
12653 (source (origin
12654 (method url-fetch)
12655 (uri (pypi-uri "python-utils" version))
12656 (sha256
12657 (base32
12658 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12659 (build-system python-build-system)
12660 (native-inputs
12661 `(("pytest-runner" ,python-pytest-runner)
12662 ("pytest" ,python-pytest)
12663 ("six" ,python-six)))
12664 (home-page "https://github.com/WoLpH/python-utils")
12665 (synopsis "Convenient utilities not included with the standard Python install")
12666 (description
12667 "Python Utils is a collection of small Python functions and classes which
12668 make common patterns shorter and easier.")
12669 (license license:bsd-2)))
12670
12671 (define-public python2-utils
12672 (package-with-python2 python-utils))
12673
12674 (define-public python-diff-match-patch
12675 (package
12676 (name "python-diff-match-patch")
12677 (version "20121119")
12678 (source
12679 (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "diff-match-patch" version))
12682 (sha256
12683 (base32
12684 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12685 (build-system python-build-system)
12686 (home-page "https://code.google.com/p/google-diff-match-patch")
12687 (synopsis "Synchronize plain text")
12688 (description "Diff Match and Patch libraries offer robust algorithms to
12689 perform the operations required for synchronizing plain text.")
12690 (license license:asl2.0)))
12691
12692 (define-public python2-diff-match-patch
12693 (package-with-python2 python-diff-match-patch))
12694
12695 (define-public python-dirsync
12696 (package
12697 (name "python-dirsync")
12698 (version "2.2.3")
12699 (source
12700 (origin
12701 (method url-fetch)
12702 (uri (pypi-uri "dirsync" version))
12703 (sha256
12704 (base32
12705 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12706 (build-system python-build-system)
12707 (propagated-inputs
12708 `(("six" ,python-six)))
12709 (home-page "https://bitbucket.org/tkhyn/dirsync")
12710 (synopsis "Advanced directory tree synchronisation tool")
12711 (description "Advanced directory tree synchronisation tool.")
12712 (license license:expat)))
12713
12714 (define-public python2-dirsync
12715 (package-with-python2 python-dirsync))
12716
12717 (define-public python-levenshtein
12718 (package
12719 (name "python-levenshtein")
12720 (version "0.12.0")
12721 (source
12722 (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "python-Levenshtein" version))
12725 (sha256
12726 (base32
12727 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12728 (build-system python-build-system)
12729 (home-page "https://github.com/ztane/python-Levenshtein")
12730 (synopsis "Fast computation of Levenshtein distance and string similarity")
12731 (description
12732 "The Levenshtein Python C extension module contains functions for fast computation of
12733 @enumerate
12734 @item Levenshtein (edit) distance, and edit operations
12735 @item string similarity
12736 @item approximate median strings, and generally string averaging
12737 @item string sequence and set similarity
12738 @end enumerate
12739 It supports both normal and Unicode strings.")
12740 (license license:gpl2+)))
12741
12742 (define-public python2-levenshtein
12743 (package-with-python2 python-levenshtein))
12744
12745 (define-public python-scandir
12746 (package
12747 (name "python-scandir")
12748 (version "1.9.0")
12749 (source
12750 (origin
12751 (method url-fetch)
12752 (uri (pypi-uri "scandir" version))
12753 (sha256
12754 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12755 (build-system python-build-system)
12756 (arguments
12757 `(#:phases (modify-phases %standard-phases
12758 (replace 'check
12759 (lambda _
12760 (invoke "python" "test/run_tests.py"))))))
12761 (home-page "https://github.com/benhoyt/scandir")
12762 (synopsis "Directory iteration function")
12763 (description
12764 "Directory iteration function like os.listdir(), except that instead of
12765 returning a list of bare filenames, it yields DirEntry objects that include
12766 file type and stat information along with the name. Using scandir() increases
12767 the speed of os.walk() by 2-20 times (depending on the platform and file
12768 system) by avoiding unnecessary calls to os.stat() in most cases.
12769
12770 This package is part of the Python standard library since version 3.5.")
12771 (license license:bsd-3)))
12772
12773 (define-public python2-scandir
12774 (package-with-python2 python-scandir))
12775
12776 (define-public python2-stemming
12777 (package
12778 (name "python2-stemming")
12779 (version "1.0.1")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "stemming" version))
12784 (sha256
12785 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12786 (build-system python-build-system)
12787 (arguments
12788 `(#:python ,python-2))
12789 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12790 (synopsis "Python implementations of various stemming algorithms")
12791 (description
12792 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12793 stemming algorithms for English. These implementations are straightforward and
12794 efficient, unlike some Python versions of the same algorithms available on the
12795 Web. This package is an extraction of the stemming code included in the Whoosh
12796 search engine.")
12797 (license license:public-domain)))
12798
12799 (define-public python-factory-boy
12800 (package
12801 (name "python-factory-boy")
12802 (version "2.8.1")
12803 (source
12804 (origin
12805 (method url-fetch)
12806 (uri (pypi-uri "factory_boy" version))
12807 (sha256
12808 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12809 (build-system python-build-system)
12810 (arguments
12811 ;; Tests are not included in the tarball.
12812 `(#:tests? #f))
12813 (propagated-inputs
12814 `(("faker" ,python-faker)))
12815 (home-page "https://github.com/benhoyt/scandir")
12816 (synopsis "Versatile test fixtures replacement")
12817 (description
12818 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12819
12820 As a fixtures replacement tool, it aims to replace static, hard to maintain
12821 fixtures with easy-to-use factories for complex object.
12822
12823 Instead of building an exhaustive test setup with every possible combination
12824 of corner cases, factory_boy allows you to use objects customized for the
12825 current test, while only declaring the test-specific fields")
12826 (license license:expat)))
12827
12828 (define-public python2-factory-boy
12829 (package-with-python2 python-factory-boy))
12830
12831 (define-public python-translate-toolkit
12832 (package
12833 (name "python-translate-toolkit")
12834 (version "2.1.0")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12839 (sha256
12840 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12841 (build-system python-build-system)
12842 (native-inputs
12843 `(("python-pytest" ,python-pytest)
12844 ("python-sphinx" ,python-sphinx)))
12845 (propagated-inputs
12846 `(("python-babel" ,python-babel)
12847 ("python-beautifulsoup4" ,python-beautifulsoup4)
12848 ("python-chardet" ,python-chardet)
12849 ("python-diff-match-patch" ,python-diff-match-patch)
12850 ("python-levenshtein" ,python-levenshtein)
12851 ("python-lxml" ,python-lxml)
12852 ("python-six" ,python-six)
12853 ("python-vobject" ,python-vobject)
12854 ("python-pyyaml" ,python-pyyaml)))
12855 (arguments
12856 ;; TODO: tests are not run, because they end with
12857 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12858 ;; 'parse_funcs'
12859 ;; during test setup.
12860 `(#:tests? #f))
12861 (home-page "https://toolkit.translatehouse.org")
12862 (synopsis "Tools and API for translation and localization engineering")
12863 (description
12864 "Tools and API for translation and localization engineering. It contains
12865 several utilities, as well as an API for building localization tools.")
12866 (license license:gpl2+)))
12867
12868 (define-public python2-translate-toolkit
12869 (package-with-python2 python-translate-toolkit))
12870
12871 (define-public python-packaging
12872 (package
12873 (name "python-packaging")
12874 (version "19.0")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "packaging" version))
12879 (sha256
12880 (base32
12881 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12882 (build-system python-build-system)
12883 (arguments
12884 `(#:phases (modify-phases %standard-phases
12885 (replace 'check
12886 (lambda _ (invoke "py.test" "-vv"))))))
12887 (native-inputs
12888 `(("python-pretend" ,python-pretend)
12889 ("python-pytest" ,python-pytest)))
12890 (propagated-inputs
12891 `(("python-pyparsing" ,python-pyparsing)
12892 ("python-six" ,python-six)))
12893 (home-page "https://github.com/pypa/packaging")
12894 (synopsis "Core utilities for Python packages")
12895 (description "Packaging is a Python module for dealing with Python packages.
12896 It offers an interface for working with package versions, names, and dependency
12897 information.")
12898 ;; From 'LICENSE': This software is made available under the terms of
12899 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12900 ;; Contributions to this software is made under the terms of *both* these
12901 ;; licenses.
12902 (license (list license:asl2.0 license:bsd-2))))
12903
12904 (define-public python2-packaging
12905 (package-with-python2 python-packaging))
12906
12907 (define-public python-relatorio
12908 (package
12909 (name "python-relatorio")
12910 (version "0.8.0")
12911 (source
12912 (origin
12913 (method url-fetch)
12914 (uri (pypi-uri "relatorio" version))
12915 (sha256
12916 (base32
12917 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12918 (build-system python-build-system)
12919 (propagated-inputs
12920 `(("python-lxml" ,python-lxml)
12921 ("python-genshi" ,python-genshi)))
12922 (native-inputs
12923 `(("python-magic" ,python-magic)))
12924 (home-page "https://relatorio.tryton.org/")
12925 (synopsis "Templating library able to output ODT and PDF files")
12926 (description "Relatorio is a templating library which provides a way to
12927 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12928 for more filetypes can be easily added by creating plugins for them.")
12929 (license license:gpl3+)))
12930
12931 (define-public python2-relatorio
12932 (package-with-python2 python-relatorio))
12933
12934 (define-public python-radon
12935 (package
12936 (name "python-radon")
12937 (version "2.2.0")
12938 (source
12939 (origin
12940 (method url-fetch)
12941 (uri (pypi-uri "radon" version))
12942 (sha256
12943 (base32
12944 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12945 (build-system python-build-system)
12946 (arguments
12947 `(#:phases (modify-phases %standard-phases
12948 (replace 'check
12949 (lambda _
12950 (invoke "python" "radon/tests/run.py"))))))
12951 (propagated-inputs
12952 `(("python-colorama" ,python-colorama)
12953 ("python-flake8-polyfill" ,python-flake8-polyfill)
12954 ("python-mando" ,python-mando)))
12955 (native-inputs
12956 `(("python-pytest" ,python-pytest)
12957 ("python-pytest-mock" ,python-pytest-mock)))
12958 (home-page "https://radon.readthedocs.org/")
12959 (synopsis "Code Metrics in Python")
12960 (description "Radon is a Python tool which computes various code metrics.
12961 Supported metrics are:
12962 @itemize @bullet
12963 @item raw metrics: SLOC, comment lines, blank lines, &c.
12964 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12965 @item Halstead metrics (all of them)
12966 @item the Maintainability Index (a Visual Studio metric)
12967 @end itemize")
12968 (license license:expat)))
12969
12970 (define-public python2-radon
12971 (package-with-python2 python-radon))
12972
12973 (define-public python-sure
12974 (package
12975 (name "python-sure")
12976 (version "1.4.11")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "sure" version))
12981 (sha256
12982 (base32
12983 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12984 (build-system python-build-system)
12985 (propagated-inputs
12986 `(("python-mock" ,python-mock)
12987 ("python-six" ,python-six)))
12988 (native-inputs
12989 `(("python-nose" ,python-nose)))
12990 (home-page "https://github.com/gabrielfalcao/sure")
12991 (synopsis "Automated testing library in python for python")
12992 (description
12993 "Sure is a python library that leverages a DSL for writing assertions.
12994 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12995 (license license:gpl3+)))
12996
12997 (define-public python2-sure
12998 (package-with-python2 python-sure))
12999
13000 (define-public python2-couleur
13001 ;; This package does not seem to support python3 at all, hence,
13002 ;; only the python2 variant definition is provided.
13003 (package
13004 (name "python2-couleur")
13005 (version "0.6.2")
13006 (source
13007 (origin
13008 (method url-fetch)
13009 (uri (pypi-uri "couleur" version))
13010 (sha256
13011 (base32
13012 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13013 (build-system python-build-system)
13014 (arguments
13015 `(#:python ,python-2))
13016 (home-page "https://github.com/gabrielfalcao/couleur")
13017 (synopsis
13018 "ANSI terminal tool for python, colored shell and other handy fancy features")
13019 (description
13020 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13021 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13022 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13023 ;; https://github.com/gabrielfalcao/couleur/issues/11
13024 (license license:lgpl3+)))
13025
13026 (define-public python-misaka
13027 (package
13028 (name "python-misaka")
13029 (version "2.1.1")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "misaka" version))
13034 (sha256
13035 (base32
13036 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13037 (build-system python-build-system)
13038 (arguments
13039 `(;; Line 37 of setup.py calls self.run_command('develop')
13040 ;; in the 'check' phase. This command seems to be trying
13041 ;; to write to
13042 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13043 ;; for which it does not have the permission to write.
13044 #:tests? #f))
13045 (propagated-inputs
13046 `(("python-cffi" ,python-cffi)))
13047 (home-page "https://github.com/FSX/misaka")
13048 (synopsis "Python binding for Hoedown")
13049 (description
13050 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13051 library written in C. It features a fast HTML renderer and functionality to make custom
13052 renderers (e.g. man pages or LaTeX).")
13053 (license license:expat)))
13054
13055 (define-public python2-misaka
13056 (package-with-python2 python-misaka))
13057
13058 (define-public python2-steadymark
13059 ;; This is forced into being a python2 only variant
13060 ;; due to its dependence on couleur that has no support
13061 ;; for python3
13062 (package
13063 (name "python2-steadymark")
13064 (version "0.7.3")
13065 (source
13066 (origin
13067 (method url-fetch)
13068 (uri (pypi-uri "steadymark" version))
13069 (sha256
13070 (base32
13071 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13072 (build-system python-build-system)
13073 (native-inputs
13074 `(("python-couleur" ,python2-couleur)
13075 ("python-sure" ,python2-sure)
13076 ("python-misaka" ,python2-misaka)))
13077 (arguments
13078 `(#:python ,python-2
13079 #:phases
13080 (modify-phases %standard-phases
13081 (add-before 'build 'patch-setup-py
13082 (lambda _
13083 ;; Update requirements from dependency==version
13084 ;; to dependency>=version
13085 (substitute* "setup.py"
13086 (("==") ">="))
13087 #t)))))
13088 (home-page "https://github.com/gabrielfalcao/steadymark")
13089 (synopsis "Markdown-based test runner for python")
13090 (description
13091 "@code{Steadymark} allows documentation to be written in github-flavoured
13092 markdown. The documentation may contain snippets of code surrounded by python
13093 code blocks and @code{Steadymark} will find these snippets and run them, making
13094 sure that there are no old malfunctional examples in the documentation examples.")
13095 (license license:expat)))
13096
13097 (define-public python-jsonpointer
13098 (package
13099 (name "python-jsonpointer")
13100 (version "1.10")
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "jsonpointer" version))
13105 (sha256
13106 (base32
13107 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13108 (build-system python-build-system)
13109 (home-page "https://github.com/stefankoegl/python-json-pointer")
13110 (synopsis "Identify specific nodes in a JSON document")
13111 (description "@code{jsonpointer} allows you to access specific nodes
13112 by path in a JSON document (see RFC 6901).")
13113 (license license:bsd-3)))
13114
13115 (define-public python2-jsonpointer
13116 (package-with-python2 python-jsonpointer))
13117
13118 (define-public python-jsonpatch
13119 (package
13120 (name "python-jsonpatch")
13121 (version "1.16")
13122 (source
13123 (origin
13124 (method url-fetch)
13125 ;; pypi version lacks tests.js
13126 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13127 "archive/v" version ".tar.gz"))
13128 (file-name (string-append name "-" version ".tar.gz"))
13129 (sha256
13130 (base32
13131 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13132 (build-system python-build-system)
13133 (native-inputs
13134 `(("python-jsonpointer" ,python-jsonpointer)))
13135 (home-page "https://github.com/stefankoegl/python-json-patch")
13136 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13137 (description "@code{jsonpatch} is a library and program that allows
13138 applying JSON Patches according to RFC 6902.")
13139 (license license:bsd-3)))
13140
13141 (define-public python2-jsonpatch
13142 (package-with-python2 python-jsonpatch))
13143
13144 (define-public python-jsonpatch-0.4
13145 (package (inherit python-jsonpatch)
13146 (name "python-jsonpatch")
13147 (version "0.4")
13148 (source
13149 (origin
13150 (method url-fetch)
13151 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13152 "archive/v" version ".tar.gz"))
13153 (file-name (string-append name "-" version ".tar.gz"))
13154 (sha256
13155 (base32
13156 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13157
13158 (define-public python2-jsonpatch-0.4
13159 (package-with-python2 python-jsonpatch-0.4))
13160
13161 (define-public python-rfc3986
13162 (package
13163 (name "python-rfc3986")
13164 (version "1.1.0")
13165 (source (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "rfc3986" version))
13168 (sha256
13169 (base32
13170 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13171 (build-system python-build-system)
13172 (arguments
13173 `(#:modules ((guix build utils)
13174 (guix build python-build-system)
13175 (ice-9 ftw)
13176 (srfi srfi-1)
13177 (srfi srfi-26))
13178 #:phases
13179 (modify-phases %standard-phases
13180 (replace 'check
13181 (lambda _
13182 (let ((cwd (getcwd)))
13183 (setenv "PYTHONPATH"
13184 (string-append cwd "/build/"
13185 (find (cut string-prefix? "lib" <>)
13186 (scandir (string-append cwd "/build")))
13187 ":"
13188 (getenv "PYTHONPATH")))
13189 (invoke "pytest" "-v")))))))
13190 (native-inputs
13191 `(("python-pytest" ,python-pytest)))
13192 (home-page "https://rfc3986.readthedocs.io/")
13193 (synopsis "Parse and validate URI references")
13194 (description
13195 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13196 validation and authority parsing. This module also supports RFC@tie{}6874
13197 which adds support for zone identifiers to IPv6 addresses.")
13198 (license license:asl2.0)))
13199
13200 (define-public python2-rfc3986
13201 (package-with-python2 python-rfc3986))
13202
13203 (define-public python-rfc3987
13204 (package
13205 (name "python-rfc3987")
13206 (version "1.3.7")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "rfc3987" version))
13211 (sha256
13212 (base32
13213 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13214 (build-system python-build-system)
13215 (home-page "https://pypi.python.org/pypi/rfc3987")
13216 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13217 (description "@code{rfc3987} provides routines for parsing and
13218 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13219 (license license:gpl3+)))
13220
13221 (define-public python2-rfc3987
13222 (package-with-python2 python-rfc3987))
13223
13224 (define-public python-validate-email
13225 (package
13226 (name "python-validate-email")
13227 (version "1.3")
13228 (source
13229 (origin
13230 (method url-fetch)
13231 (uri (pypi-uri "validate_email" version))
13232 (sha256
13233 (base32
13234 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13235 (build-system python-build-system)
13236 (home-page "https://github.com/syrusakbary/validate_email")
13237 (synopsis "Verifies if an email address is valid and really exists")
13238 (description "@code{validate_email} can be used to verify if an email
13239 address is valid and really exists.")
13240 (license license:lgpl3+)))
13241
13242 (define-public python2-validate-email
13243 (package-with-python2 python-validate-email))
13244
13245 (define-public python-flex
13246 (package
13247 (name "python-flex")
13248 (version "6.10.0")
13249 (source
13250 (origin
13251 (method url-fetch)
13252 (uri (pypi-uri "flex" version))
13253 (sha256
13254 (base32
13255 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13256 (build-system python-build-system)
13257 (propagated-inputs
13258 `(("python-click" ,python-click)
13259 ("python-iso8601" ,python-iso8601)
13260 ("python-jsonpointer" ,python-jsonpointer)
13261 ("python-pyyaml" ,python-pyyaml)
13262 ("python-requests" ,python-requests)
13263 ("python-rfc3987" ,python-rfc3987)
13264 ("python-six" ,python-six)
13265 ("python-validate-email" ,python-validate-email)))
13266 (home-page "https://github.com/pipermerriam/flex")
13267 (synopsis "Validates Swagger schemata")
13268 (description "@code{flex} can be used to validate Swagger schemata.")
13269 (license license:bsd-3)))
13270
13271 (define-public python2-flex
13272 (package-with-python2 python-flex))
13273
13274 (define-public python-marshmallow
13275 (package
13276 (name "python-marshmallow")
13277 (version "3.0.0b14")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 (uri (pypi-uri "marshmallow" version))
13282 (sha256
13283 (base32
13284 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13285 (build-system python-build-system)
13286 (propagated-inputs
13287 `(("python-dateutil" ,python-dateutil)
13288 ("python-simplejson" ,python-simplejson)))
13289 (native-inputs
13290 `(("python-pytest" ,python-pytest)
13291 ("python-pytz" ,python-pytz)))
13292 (home-page "https://github.com/marshmallow-code/marshmallow")
13293 (synopsis "Convert complex datatypes to and from native
13294 Python datatypes.")
13295 (description "@code{marshmallow} provides a library for converting
13296 complex datatypes to and from native Python datatypes.")
13297 (license license:expat)))
13298
13299 (define-public python2-marshmallow
13300 (package-with-python2 python-marshmallow))
13301
13302 (define-public python-apispec
13303 (package
13304 (name "python-apispec")
13305 (version "0.25.3")
13306 (source
13307 (origin
13308 (method url-fetch)
13309 (uri (pypi-uri "apispec" version))
13310 (sha256
13311 (base32
13312 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13313 (build-system python-build-system)
13314 (propagated-inputs
13315 `(("python-pyyaml" ,python-pyyaml)))
13316 (native-inputs
13317 `(("python-pytest" ,python-pytest)
13318 ("python-flask" ,python-flask)
13319 ("python-marshmallow" ,python-marshmallow)
13320 ("python-tornado" ,python-tornado)
13321 ("python-bottle" ,python-bottle)
13322 ("python-mock" ,python-mock)))
13323 (home-page "https://github.com/marshmallow-code/apispec")
13324 (synopsis "Swagger 2.0 API specification generator")
13325 (description "@code{python-apispec} is a pluggable API specification
13326 generator. Currently supports the OpenAPI specification (f.k.a.
13327 Swagger 2.0).")
13328 (license license:expat)))
13329
13330 (define-public python2-apispec
13331 (package-with-python2 python-apispec))
13332
13333 (define-public python-flasgger
13334 (package
13335 (name "python-flasgger")
13336 (version "0.6.3")
13337 (source
13338 (origin
13339 (method git-fetch)
13340 (uri (git-reference
13341 (url "https://github.com/rochacbruno/flasgger.git")
13342 (commit version)))
13343 (file-name (git-file-name name version))
13344 (sha256
13345 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13346 (build-system python-build-system)
13347 (arguments
13348 `(#:phases
13349 (modify-phases %standard-phases
13350 (replace 'check
13351 (lambda* (#:key inputs outputs #:allow-other-keys)
13352 (substitute* "Makefile"
13353 (("flake8 flasgger --ignore=F403")
13354 "flake8 flasgger --ignore=E731,F403"))
13355 (setenv "PYTHONPATH" (string-append (getcwd)
13356 ":"
13357 (getenv "PYTHONPATH")))
13358 (invoke "py.test"))))))
13359 (propagated-inputs
13360 `(("python-flask" ,python-flask)
13361 ("python-pyyaml" ,python-pyyaml)
13362 ("python-jsonschema" ,python-jsonschema)
13363 ("python-mistune" ,python-mistune)
13364 ("python-six" ,python-six)))
13365 (native-inputs
13366 `(("python-decorator" ,python-decorator)
13367 ("python-flake8" ,python-flake8)
13368 ("python-flask-restful" ,python-flask-restful)
13369 ("python-flex" ,python-flex)
13370 ("python-pytest" ,python-pytest)
13371 ("python-pytest-cov" ,python-pytest-cov)
13372 ("python-marshmallow" ,python-marshmallow)
13373 ("python-apispec" ,python-apispec)))
13374 (home-page "https://github.com/rochacbruno/flasgger/")
13375 (synopsis "Extract Swagger specs from your Flask project")
13376 (description "@code{python-flasgger} allows extracting Swagger specs
13377 from your Flask project. It is a fork of Flask-Swagger.")
13378 (license license:expat)))
13379
13380 (define-public python2-flasgger
13381 (package-with-python2 python-flasgger))
13382
13383 (define-public python-swagger-spec-validator
13384 (package
13385 (name "python-swagger-spec-validator")
13386 (version "2.4.3")
13387 (source
13388 (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "swagger-spec-validator" version))
13391 (sha256
13392 (base32
13393 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13394 (build-system python-build-system)
13395 (propagated-inputs
13396 `(("python-jsonschema" ,python-jsonschema)
13397 ("python-pyyaml" ,python-pyyaml)
13398 ("python-six" ,python-six)))
13399 (home-page
13400 "https://github.com/Yelp/swagger_spec_validator")
13401 (synopsis "Validation of Swagger specifications")
13402 (description "@code{swagger_spec_validator} provides a library for
13403 validating Swagger API specifications.")
13404 (license license:asl2.0)))
13405
13406 (define-public python2-swagger-spec-validator
13407 (package-with-python2 python-swagger-spec-validator))
13408
13409 (define-public python-apache-libcloud
13410 (package
13411 (name "python-apache-libcloud")
13412 (version "2.4.0")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "apache-libcloud" version))
13417 (sha256
13418 (base32
13419 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13420 (build-system python-build-system)
13421 (arguments
13422 `(#:phases
13423 (modify-phases %standard-phases
13424 (add-after 'unpack 'patch-ssh
13425 (lambda* (#:key inputs #:allow-other-keys)
13426 (substitute* "libcloud/compute/ssh.py"
13427 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13428 "/bin/ssh" "'")))
13429 #t))
13430 (add-after 'unpack 'patch-tests
13431 (lambda _
13432 (substitute* "./libcloud/test/test_file_fixtures.py"
13433 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13434 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13435 return (httplib.OK,
13436 \"1234abcd\",
13437 {\"test\": \"value\"},
13438 httplib.responses[httplib.OK])
13439 def _ascii"))
13440 (substitute* "libcloud/test/compute/test_ssh_client.py"
13441 (("class ShellOutSSHClientTests")
13442 "@unittest.skip(\"Guix container doesn't have ssh service\")
13443 class ShellOutSSHClientTests")
13444 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13445 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13446 (("'.xF0', '.x90', '.x8D', '.x88'")
13447 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13448 #t))
13449 (add-before 'check 'copy-secret
13450 (lambda _
13451 (copy-file "libcloud/test/secrets.py-dist"
13452 "libcloud/test/secrets.py")
13453 #t)))))
13454 (inputs
13455 `(("openssh" ,openssh)))
13456 (propagated-inputs
13457 `(("python-paramiko" ,python-paramiko)
13458 ("python-requests" ,python-requests)))
13459 (native-inputs
13460 `(("python-lockfile" ,python-lockfile)
13461 ("python-mock" ,python-mock)
13462 ("python-pytest" ,python-pytest)
13463 ("python-pytest-runner" ,python-pytest-runner)
13464 ("python-requests-mock" ,python-requests-mock)))
13465 (home-page "https://libcloud.apache.org/")
13466 (synopsis "Unified Cloud API")
13467 (description "@code{libcloud} is a Python library for interacting with
13468 many of the popular cloud service providers using a unified API.")
13469 (license license:asl2.0)))
13470
13471 (define-public python2-apache-libcloud
13472 (package-with-python2 python-apache-libcloud))
13473
13474 (define-public python-smmap2
13475 (package
13476 (name "python-smmap2")
13477 (version "2.0.3")
13478 (source
13479 (origin
13480 (method url-fetch)
13481 (uri (pypi-uri "smmap2" version))
13482 (sha256
13483 (base32
13484 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13485 (build-system python-build-system)
13486 (native-inputs
13487 `(("python-nosexcover" ,python-nosexcover)))
13488 (home-page "https://github.com/Byron/smmap")
13489 (synopsis "Python sliding window memory map manager")
13490 (description "@code{smmap2} is a pure Python implementation of a sliding
13491 window memory map manager.")
13492 (license license:bsd-3)))
13493
13494 (define-public python2-smmap2
13495 (package-with-python2 python-smmap2))
13496
13497 (define-public python-regex
13498 (package
13499 (name "python-regex")
13500 (version "2019.04.14")
13501 (source (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "regex" version))
13504 (sha256
13505 (base32
13506 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13507 ;; TODO: Fix and enable regex_test.py tests that complain about the
13508 ;; test.support module not existing.
13509 (build-system python-build-system)
13510 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13511 (synopsis "Alternative regular expression module")
13512 (description "This regular expression implementation is backwards-
13513 compatible with the standard @code{re} module, but offers additional
13514 functionality like full case-folding for case-insensitive matches in Unicode.")
13515 (license license:psfl)))
13516
13517 (define-public python2-regex
13518 (package-with-python2 python-regex))
13519
13520 (define-public python2-pyopengl
13521 (package
13522 (name "python2-pyopengl")
13523 (version "3.1.0")
13524 (source
13525 (origin
13526 (method url-fetch)
13527 (uri (pypi-uri "PyOpenGL" version))
13528 (sha256
13529 (base32
13530 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13531 (arguments
13532 `(#:python ,python-2))
13533 (build-system python-build-system)
13534 (home-page "http://pyopengl.sourceforge.net")
13535 (synopsis "Standard OpenGL bindings for Python")
13536 (description
13537 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13538 related APIs. The binding is created using the standard @code{ctypes}
13539 library.")
13540 (license license:bsd-3)))
13541
13542 (define-public python2-pyopengl-accelerate
13543 (package
13544 (inherit python2-pyopengl)
13545 (name "python2-pyopengl-accelerate")
13546 (version "3.1.0")
13547 (source
13548 (origin
13549 (method url-fetch)
13550 (uri (pypi-uri "PyOpenGL-accelerate" version))
13551 (sha256
13552 (base32
13553 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13554 (synopsis "Acceleration code for PyOpenGL")
13555 (description
13556 "This is the Cython-coded accelerator module for PyOpenGL.")))
13557
13558 (define-public python-rencode
13559 (package
13560 (name "python-rencode")
13561 (version "1.0.5")
13562 (source
13563 (origin
13564 (method url-fetch)
13565 (uri (pypi-uri "rencode" version))
13566 (sha256
13567 (base32
13568 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13569 (build-system python-build-system)
13570 (arguments
13571 `(#:phases
13572 (modify-phases %standard-phases
13573 (add-before 'check 'delete-bogus-test
13574 ;; This test requires /home/aresch/Downloads, which is not provided by
13575 ;; the build environment.
13576 (lambda _
13577 (delete-file "rencode/t.py")
13578 #t)))))
13579 (native-inputs `(("pkg-config" ,pkg-config)
13580 ("python-cython" ,python-cython)))
13581 (home-page "https://github.com/aresch/rencode")
13582 (synopsis "Serialization of heterogeneous data structures")
13583 (description
13584 "The @code{rencode} module is a data structure serialization library,
13585 similar to @code{bencode} from the BitTorrent project. For complex,
13586 heterogeneous data structures with many small elements, r-encoding stake up
13587 significantly less space than b-encodings. This version of rencode is a
13588 complete rewrite in Cython to attempt to increase the performance over the
13589 pure Python module.")
13590 (license license:bsd-3)))
13591
13592 (define-public python2-rencode
13593 (package-with-python2 python-rencode))
13594
13595 (define-public python-xenon
13596 (package
13597 (name "python-xenon")
13598 (version "0.5.4")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "xenon" version))
13603 (sha256
13604 (base32
13605 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13606 (build-system python-build-system)
13607 (native-inputs
13608 `(("python-pyyaml" ,python-pyyaml)
13609 ("python-radon" ,python-radon)
13610 ("python-requests" ,python-requests)
13611 ("python-flake8" ,python-flake8)
13612 ("python-tox" ,python-tox)))
13613 (arguments
13614 `(#:phases
13615 (modify-phases %standard-phases
13616 (add-before 'build 'patch-test-requirements
13617 (lambda _
13618 ;; Remove httpretty dependency for tests.
13619 (substitute* "setup.py"
13620 (("httpretty") ""))
13621 #t)))))
13622 (home-page "https://xenon.readthedocs.org/")
13623 (synopsis "Monitor code metrics for Python on your CI server")
13624 (description
13625 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13626 Ideally, @code{xenon} is run every time code is committed. Through command
13627 line options, various thresholds can be set for the complexity of code. It
13628 will fail (i.e. it will exit with a non-zero exit code) when any of these
13629 requirements is not met.")
13630 (license license:expat)))
13631
13632 (define-public python2-xenon
13633 (package-with-python2 python-xenon))
13634
13635 (define-public python-pysocks
13636 (package
13637 (name "python-pysocks")
13638 (version "1.7.0")
13639 (source
13640 (origin
13641 (method url-fetch)
13642 (uri (pypi-uri "PySocks" version))
13643 (sha256
13644 (base32
13645 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13646 (build-system python-build-system)
13647 (arguments `(#:tests? #f))
13648 (home-page "https://github.com/Anorov/PySocks")
13649 (synopsis "SOCKS client module")
13650 (description "@code{pysocks} is an updated and semi-actively maintained
13651 version of @code{SocksiPy} with bug fixes and extra features.")
13652 (license license:bsd-3)))
13653
13654 (define-public python2-pysocks
13655 (package-with-python2 python-pysocks))
13656
13657 (define-public python-pydiff
13658 (package
13659 (name "python-pydiff")
13660 (version "0.2")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "pydiff" version))
13665 (sha256
13666 (base32
13667 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13668 (build-system python-build-system)
13669 (home-page "https://github.com/myint/pydiff")
13670 (synopsis "Library to diff two Python files at the bytecode level")
13671 (description
13672 "@code{pydiff} makes it easy to look for actual code changes while
13673 ignoring formatting changes.")
13674 (license license:expat)))
13675
13676 (define-public python2-pydiff
13677 (package-with-python2 python-pydiff))
13678
13679 (define-public python-tqdm
13680 (package
13681 (name "python-tqdm")
13682 (version "4.19.6")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "tqdm" version))
13687 (sha256
13688 (base32
13689 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13690 (build-system python-build-system)
13691 (native-inputs
13692 `(("python-flake8" ,python-flake8)
13693 ("python-nose" ,python-nose)
13694 ("python-coverage" ,python-coverage)))
13695 (home-page "https://github.com/tqdm/tqdm")
13696 (synopsis "Fast, extensible progress meter")
13697 (description
13698 "Make loops show a progress bar on the console by just wrapping any
13699 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13700 design and layout.")
13701 (license (list license:mpl2.0 license:expat))))
13702
13703 (define-public python2-tqdm
13704 (package-with-python2 python-tqdm))
13705
13706 (define-public python-pkginfo
13707 (package
13708 (name "python-pkginfo")
13709 (version "1.4.2")
13710 (source
13711 (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "pkginfo" version))
13714 (sha256
13715 (base32
13716 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13717 (build-system python-build-system)
13718 (arguments
13719 ;; The tests are broken upstream.
13720 '(#:tests? #f))
13721 (home-page
13722 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13723 (synopsis
13724 "Query metadatdata from sdists, bdists, and installed packages")
13725 (description
13726 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13727 source distriubtion (an sdist) or a binary distribution (e.g., created by
13728 running bdist_egg). It can also query the EGG-INFO directory of an installed
13729 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13730 created by running @code{python setup.py develop}).")
13731 (license license:expat)))
13732
13733 (define-public python2-pkginfo
13734 (package-with-python2 python-pkginfo))
13735
13736 (define-public python-twine
13737 (package
13738 (name "python-twine")
13739 (version "1.9.1")
13740 (source
13741 (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "twine" version))
13744 (sha256
13745 (base32
13746 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13747 (build-system python-build-system)
13748 (propagated-inputs
13749 `(("python-tqdm" ,python-tqdm)
13750 ("python-pkginfo" ,python-pkginfo)
13751 ("python-requests" ,python-requests)
13752 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13753 (home-page "https://github.com/pypa/twine")
13754 (synopsis "Collection of utilities for interacting with PyPI")
13755 (description
13756 "@code{twine} currently supports registering projects and uploading
13757 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13758 their files and supports any packaging format (including wheels).")
13759 (license license:asl2.0)))
13760
13761 (define-public python2-twine
13762 (package-with-python2 python-twine))
13763
13764 (define-public python-linecache2
13765 (package
13766 (name "python-linecache2")
13767 (version "1.0.0")
13768 (source
13769 (origin
13770 (method url-fetch)
13771 (uri (pypi-uri "linecache2" version))
13772 (sha256
13773 (base32
13774 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13775 (build-system python-build-system)
13776 (arguments
13777 `(;; The tests depend on unittest2, and our version is a bit too old.
13778 #:tests? #f))
13779 (native-inputs
13780 `(("python-pbr" ,python-pbr-minimal)))
13781 (home-page
13782 "https://github.com/testing-cabal/linecache2")
13783 (synopsis "Backports of the linecache module")
13784 (description
13785 "The linecache module allows one to get any line from any file, while
13786 attempting to optimize internally, using a cache, the common case where many
13787 lines are read from a single file.")
13788 (license license:psfl)))
13789
13790 (define-public python2-linecache2
13791 (package-with-python2 python-linecache2))
13792
13793 (define-public python-traceback2
13794 (package
13795 (name "python-traceback2")
13796 (version "1.4.0")
13797 (source
13798 (origin
13799 (method url-fetch)
13800 (uri (pypi-uri "traceback2" version))
13801 (sha256
13802 (base32
13803 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13804 (build-system python-build-system)
13805 (arguments
13806 `(;; python-traceback2 and python-unittest2 depend on one another.
13807 #:tests? #f))
13808 (native-inputs
13809 `(("python-pbr" ,python-pbr-minimal)))
13810 (propagated-inputs
13811 `(("python-linecache2" ,python-linecache2)))
13812 (home-page
13813 "https://github.com/testing-cabal/traceback2")
13814 (synopsis "Backports of the traceback module")
13815 (description
13816 "This module provides a standard interface to extract, format and print
13817 stack traces of Python programs. It exactly mimics the behavior of the Python
13818 interpreter when it prints a stack trace.")
13819 (license license:psfl)))
13820
13821 (define-public python2-traceback2
13822 (package-with-python2 python-traceback2))
13823
13824 (define-public python-ratelimiter
13825 (package
13826 (name "python-ratelimiter")
13827 (version "1.2.0")
13828 (source
13829 (origin
13830 (method url-fetch)
13831 (uri (pypi-uri "ratelimiter" version))
13832 (sha256
13833 (base32
13834 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13835 (build-system python-build-system)
13836 (arguments
13837 '(#:tests? #f)) ; There are no tests in the pypi archive.
13838 (home-page "https://github.com/RazerM/ratelimiter")
13839 (synopsis "Simple rate limiting object")
13840 (description
13841 "The @code{ratelimiter} module ensures that an operation will not be
13842 executed more than a given number of times during a given period.")
13843 (license license:asl2.0)))
13844
13845 (define-public python2-ratelimiter
13846 (package-with-python2 python-ratelimiter))
13847
13848 (define-public python-dukpy
13849 (package
13850 (name "python-dukpy")
13851 (version "0.3")
13852 (source
13853 (origin
13854 (method git-fetch)
13855 (uri (git-reference
13856 (url "https://github.com/kovidgoyal/dukpy.git")
13857 (commit (string-append "v" version))))
13858 (file-name (git-file-name name version))
13859 (sha256
13860 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13861 (build-system python-build-system)
13862 (home-page "https://github.com/kovidgoyal/dukpy")
13863 (synopsis "Run JavaScript in python")
13864 (description
13865 "dukpy is a JavaScript runtime environment for Python using the duktape
13866 embeddable JavaScript engine.")
13867 ;; Dukpy is licensed under MIT like the embedded duktape library,
13868 ;; with 'errors.c' as GPL3.
13869 (license (list license:expat license:gpl3))))
13870
13871 (define-public python2-dukpy
13872 (package-with-python2 python-dukpy))
13873
13874 (define-public python-jsonrpclib-pelix
13875 (package
13876 (name "python-jsonrpclib-pelix")
13877 (version "0.3.2")
13878 (source
13879 (origin
13880 (method url-fetch)
13881 (uri (pypi-uri "jsonrpclib-pelix" version))
13882 (sha256
13883 (base32
13884 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13885 (build-system python-build-system)
13886 (arguments
13887 `(#:tests? #f)) ; no tests in PyPI tarball
13888 (home-page "https://github.com/tcalmant/jsonrpclib/")
13889 (synopsis "JSON-RPC 2.0 client library for Python")
13890 (description
13891 "This library implements the JSON-RPC v2.0
13892 specification (backwards-compatible) as a client library for Python. This
13893 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13894 services.")
13895 (license license:asl2.0)))
13896
13897 (define-public python2-jsonrpclib-pelix
13898 (package-with-python2 python-jsonrpclib-pelix))
13899
13900 (define-public python-setuptools-scm-git-archive
13901 (package
13902 (name "python-setuptools-scm-git-archive")
13903 (version "1.0")
13904 (source
13905 (origin
13906 (method url-fetch)
13907 (uri (pypi-uri "setuptools_scm_git_archive" version))
13908 (sha256
13909 (base32
13910 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13911 (build-system python-build-system)
13912 (native-inputs
13913 `(("python-pytest" ,python-pytest)))
13914 (propagated-inputs
13915 `(("python-setuptools-scm" ,python-setuptools-scm)))
13916 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13917 (synopsis "Setuptools_scm plugin for git archives")
13918 (description
13919 "The setuptools_scm_git_archive package is a plugin to
13920 setuptools_scm, which supports obtaining versions from git archives that
13921 belong to tagged versions.")
13922 (license license:expat)))
13923
13924 (define-public python2-setuptools-scm-git-archive
13925 (package-with-python2 python-setuptools-scm-git-archive))
13926
13927 (define-public python-setuptools-git
13928 (package
13929 (name "python-setuptools-git")
13930 (version "1.2")
13931 (source
13932 (origin
13933 (method url-fetch)
13934 (uri (pypi-uri "setuptools-git" version))
13935 (sha256
13936 (base32
13937 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13938 (build-system python-build-system)
13939 (arguments
13940 `(#:phases
13941 (modify-phases %standard-phases
13942 ;; This is needed for tests.
13943 (add-after 'unpack 'configure-git
13944 (lambda _
13945 (setenv "HOME" "/tmp")
13946 (invoke "git" "config" "--global" "user.email" "guix")
13947 (invoke "git" "config" "--global" "user.name" "guix")
13948 #t)))))
13949 (native-inputs
13950 `(("git" ,git-minimal)))
13951 (home-page "https://github.com/msabramo/setuptools-git")
13952 (synopsis "Setuptools revision control system plugin for Git")
13953 (description
13954 "This package provides a plugin for Setuptools for revision control with
13955 Git.")
13956 (license license:bsd-3)))
13957
13958 (define-public python-pyclipper
13959 (package
13960 (name "python-pyclipper")
13961 (version "1.1.0.post1")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "pyclipper" version ".zip"))
13966 (sha256
13967 (base32
13968 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13969 (modules '((guix build utils)))
13970 (snippet
13971 '(begin
13972 ;; This file is generated by Cython.
13973 (delete-file "pyclipper/pyclipper.cpp") #t))))
13974 (build-system python-build-system)
13975 (arguments
13976 `(#:phases
13977 (modify-phases %standard-phases
13978 (add-before 'build 'cythonize-sources
13979 (lambda _
13980 (with-directory-excursion "pyclipper"
13981 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13982 (propagated-inputs
13983 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13984 (native-inputs
13985 `(("python-cython" ,python-cython)
13986 ("python-pytest" ,python-pytest)
13987 ("python-pytest-runner" ,python-pytest-runner)
13988 ("python-unittest2" ,python-unittest2)
13989 ("unzip" ,unzip)))
13990 (home-page "https://github.com/greginvm/pyclipper")
13991 (synopsis "Wrapper for Angus Johnson's Clipper library")
13992 (description
13993 "Pyclipper is a Cython wrapper for the C++ translation of the
13994 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13995 (license license:expat)))
13996
13997 (define-public python2-pyclipper
13998 (package-with-python2 python-pyclipper))
13999
14000 (define-public python2-booleanoperations
14001 (package
14002 (name "python2-booleanoperations")
14003 (version "0.7.1")
14004 (source
14005 (origin
14006 (method url-fetch)
14007 (uri (pypi-uri "booleanOperations" version ".zip"))
14008 (sha256
14009 (base32
14010 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14011 (build-system python-build-system)
14012 (arguments
14013 `(#:python ,python-2))
14014 (native-inputs
14015 `(("unzip" ,unzip)
14016 ("python2-pytest" ,python2-pytest)
14017 ("python2-pytest-runner" ,python2-pytest-runner)))
14018 (propagated-inputs
14019 `(("python-fonttools" ,python2-fonttools)
14020 ("python-pyclipper" ,python2-pyclipper)
14021 ("python-ufolib" ,python2-ufolib)))
14022 (home-page "https://github.com/typemytype/booleanOperations")
14023 (synopsis "Boolean operations on paths")
14024 (description
14025 "BooleanOperations provides a Python library that enables
14026 boolean operations on paths.")
14027 (license license:expat)))
14028
14029 (define-public python-tempdir
14030 (package
14031 (name "python-tempdir")
14032 (version "0.7.1")
14033 (source
14034 (origin
14035 (method url-fetch)
14036 (uri (pypi-uri "tempdir" version))
14037 (sha256
14038 (base32
14039 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14040 (build-system python-build-system)
14041 (home-page "https://pypi.org/project/tempdir/")
14042 (arguments
14043 ;; the package has no tests
14044 '(#:tests? #f))
14045 (synopsis "Python library for managing temporary directories")
14046 (description
14047 "This library manages temporary directories that are automatically
14048 deleted with all their contents when they are no longer needed. It is
14049 particularly convenient for use in tests.")
14050 (license license:expat)))
14051
14052 (define-public python2-tempdir
14053 (package-with-python2 python-tempdir))
14054
14055 (define-public python-activepapers
14056 (package
14057 (name "python-activepapers")
14058 (version "0.2.2")
14059 (source
14060 (origin
14061 (method url-fetch)
14062 (uri (pypi-uri "ActivePapers.Py" version))
14063 (sha256
14064 (base32
14065 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14066 (build-system python-build-system)
14067 (arguments
14068 `(#:modules ((ice-9 ftw)
14069 (srfi srfi-1)
14070 (guix build utils)
14071 (guix build python-build-system))
14072
14073 #:phases
14074 (modify-phases %standard-phases
14075 (add-after 'unpack 'delete-python2-code
14076 (lambda _
14077 (for-each delete-file
14078 '("lib/activepapers/builtins2.py"
14079 "lib/activepapers/standardlib2.py"
14080 "lib/activepapers/utility2.py"))))
14081 (replace 'check
14082 (lambda _
14083 ;; Deactivate the test cases that download files
14084 (setenv "NO_NETWORK_ACCESS" "1")
14085 ;; For some strange reason, some tests fail if nosetests runs all
14086 ;; test modules in a single execution. They pass if each test
14087 ;; module is run individually.
14088 (for-each (lambda (filename)
14089 (invoke "nosetests"
14090 (string-append "tests/" filename)))
14091 (scandir "tests"
14092 (lambda (filename)
14093 (string-suffix? ".py" filename)))))))))
14094 (native-inputs
14095 `(("python-tempdir" ,python-tempdir)
14096 ("python-nose" ,python-nose)))
14097 (propagated-inputs
14098 `(("python-h5py" ,python-h5py)))
14099 (home-page "http://www.activepapers.org/")
14100 (synopsis "Executable papers for scientific computing")
14101 (description
14102 "ActivePapers is a tool for working with executable papers, which
14103 combine data, code, and documentation in single-file packages,
14104 suitable for publication as supplementary material or on repositories
14105 such as figshare or Zenodo.")
14106 (properties `((python2-variant . ,(delay python2-activepapers))))
14107 (license license:bsd-3)))
14108
14109 (define-public python2-activepapers
14110 (let ((base (package-with-python2
14111 (strip-python2-variant python-activepapers))))
14112 (package
14113 (inherit base)
14114 (arguments
14115 (substitute-keyword-arguments (package-arguments base)
14116 ((#:phases phases)
14117 `(modify-phases ,phases
14118 (delete 'delete-python2-code)
14119 (add-after 'unpack 'delete-python3-code
14120 (lambda _
14121 (for-each delete-file
14122 '("lib/activepapers/builtins3.py"
14123 "lib/activepapers/standardlib3.py"
14124 "lib/activepapers/utility3.py")))))))))))
14125
14126 (define-public python-semver
14127 (package
14128 (name "python-semver")
14129 (version "2.7.9")
14130 (source
14131 (origin
14132 (method url-fetch)
14133 (uri (pypi-uri "semver" version))
14134 (sha256
14135 (base32
14136 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14137 (build-system python-build-system)
14138 (arguments
14139 `(#:phases
14140 (modify-phases %standard-phases
14141 (add-after 'unpack 'patch-test-requirements
14142 (lambda _
14143 (substitute* "setup.py"
14144 ;; Our Python is new enough.
14145 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14146 #t)))))
14147 (native-inputs
14148 `(("python-tox" ,python-tox)
14149 ("python-virtualenv" ,python-virtualenv)))
14150 (home-page "https://github.com/k-bx/python-semver")
14151 (synopsis "Python helper for Semantic Versioning")
14152 (description "This package provides a Python library for
14153 @url{Semantic Versioning, http://semver.org/}.")
14154 (license license:bsd-3)))
14155
14156 (define-public python2-semver
14157 (package-with-python2 python-semver))
14158
14159 (define-public python-pyro4
14160 (package
14161 (name "python-pyro4")
14162 (version "4.75")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "Pyro4" version))
14167 (sha256
14168 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14169 (build-system python-build-system)
14170 (propagated-inputs
14171 `(("python-serpent" ,python-serpent)))
14172 (home-page "https://pyro4.readthedocs.io")
14173 (synopsis "Distributed object middleware for Python")
14174 (description
14175 "Pyro enables you to build applications in which objects can talk to each
14176 other over the network. You can just use normal Python method calls to call
14177 objects on other machines, also known as remote procedure calls (RPC).")
14178 (license license:expat)))
14179
14180 (define-public python2-pyro
14181 (package
14182 (name "python2-pyro")
14183 (version "3.16")
14184 (source
14185 (origin
14186 (method url-fetch)
14187 (uri (pypi-uri "Pyro" version))
14188 (file-name (string-append "Pyro-" version ".tar.gz"))
14189 (sha256
14190 (base32
14191 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14192 (build-system python-build-system)
14193 (arguments
14194 ;; Pyro is not compatible with Python 3
14195 `(#:python ,python-2
14196 ;; Pyro has no test cases for automatic execution
14197 #:tests? #f))
14198 (home-page "http://pythonhosted.org/Pyro/")
14199 (synopsis "Distributed object manager for Python")
14200 (description "Pyro is a Distributed Object Technology system
14201 written in Python that is designed to be easy to use. It resembles
14202 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14203 which is a system and language independent Distributed Object Technology
14204 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14205 longer maintained. New projects should use Pyro4 instead, which
14206 is the new Pyro version that is actively developed.")
14207 (license license:expat)))
14208
14209 (define-public python2-scientific
14210 (package
14211 (name "python2-scientific")
14212 (version "2.9.4")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (string-append "https://bitbucket.org/khinsen/"
14217 "scientificpython/downloads/ScientificPython-"
14218 version ".tar.gz"))
14219 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14220 (sha256
14221 (base32
14222 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14223 (build-system python-build-system)
14224 (inputs
14225 `(("netcdf" ,netcdf)))
14226 (propagated-inputs
14227 `(("python-numpy" ,python2-numpy-1.8)
14228 ("python-pyro" ,python2-pyro)))
14229 (arguments
14230 ;; ScientificPython is not compatible with Python 3
14231 `(#:python ,python-2
14232 #:tests? #f ; No test suite
14233 #:phases
14234 (modify-phases %standard-phases
14235 (replace 'build
14236 (lambda* (#:key inputs #:allow-other-keys)
14237 (invoke "python" "setup.py" "build"
14238 (string-append "--netcdf_prefix="
14239 (assoc-ref inputs "netcdf"))))))))
14240 (home-page "https://bitbucket.org/khinsen/scientificpython")
14241 (synopsis "Python modules for scientific computing")
14242 (description "ScientificPython is a collection of Python modules that are
14243 useful for scientific computing. Most modules are rather general (Geometry,
14244 physical units, automatic derivatives, ...) whereas others are more
14245 domain-specific (e.g. netCDF and PDB support). The library is currently
14246 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14247 (license license:cecill-c)))
14248
14249 (define-public python2-mmtk
14250 (package
14251 (name "python2-mmtk")
14252 (version "2.7.11")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (string-append "https://bitbucket.org/khinsen/"
14257 "mmtk/downloads/MMTK-" version ".tar.gz"))
14258 (file-name (string-append "MMTK-" version ".tar.gz"))
14259 (sha256
14260 (base32
14261 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14262 (build-system python-build-system)
14263 (native-inputs
14264 `(("netcdf" ,netcdf)))
14265 (propagated-inputs
14266 `(("python-scientific" ,python2-scientific)
14267 ("python-tkinter" ,python-2 "tk")))
14268 (arguments
14269 `(#:python ,python-2
14270 #:tests? #f
14271 #:phases
14272 (modify-phases %standard-phases
14273 (add-before 'build 'includes-from-scientific
14274 (lambda* (#:key inputs #:allow-other-keys)
14275 (mkdir-p "Include/Scientific")
14276 (copy-recursively
14277 (string-append
14278 (assoc-ref inputs "python-scientific")
14279 "/include/python2.7/Scientific")
14280 "Include/Scientific"))))))
14281 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14282 (synopsis "Python library for molecular simulation")
14283 (description "MMTK is a library for molecular simulations with an emphasis
14284 on biomolecules. It provides widely used methods such as Molecular Dynamics
14285 and normal mode analysis, but also basic routines for implementing new methods
14286 for simulation and analysis. The library is currently not actively maintained
14287 and works only with Python 2 and NumPy < 1.9.")
14288 (license license:cecill-c)))
14289
14290 (define-public python-phonenumbers
14291 (package
14292 (name "python-phonenumbers")
14293 (version "8.9.1")
14294 (source
14295 (origin
14296 (method url-fetch)
14297 (uri (pypi-uri "phonenumbers" version))
14298 (sha256
14299 (base32
14300 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14301 (build-system python-build-system)
14302 (home-page
14303 "https://github.com/daviddrysdale/python-phonenumbers")
14304 (synopsis
14305 "Python library for dealing with international phone numbers")
14306 (description
14307 "This package provides a Python port of Google's libphonenumber library.")
14308 (license license:asl2.0)))
14309
14310 (define-public python2-phonenumbers
14311 (package-with-python2 python-phonenumbers))
14312
14313 (define-public python-send2trash
14314 (package
14315 (name "python-send2trash")
14316 (version "1.5.0")
14317 (source
14318 (origin (method git-fetch)
14319 ;; Source tarball on PyPI doesn't include tests.
14320 (uri (git-reference
14321 (url "https://github.com/hsoft/send2trash.git")
14322 (commit version)))
14323 (file-name (git-file-name name version))
14324 (sha256
14325 (base32
14326 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14327 (build-system python-build-system)
14328 (arguments
14329 '(#:phases
14330 (modify-phases %standard-phases
14331 (add-before 'check 'pre-check
14332 (lambda _
14333 (mkdir-p "/tmp/foo")
14334 (setenv "HOME" "/tmp/foo")
14335 #t)))))
14336 (home-page "https://github.com/hsoft/send2trash")
14337 (synopsis "Send files to the user's @file{~/Trash} directory")
14338 (description "This package provides a Python library to send files to the
14339 user's @file{~/Trash} directory.")
14340 (properties `((python2-variant . ,(delay python2-send2trash))))
14341 (license license:bsd-3)))
14342
14343 (define-public python2-send2trash
14344 (package
14345 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14346 (arguments
14347 (substitute-keyword-arguments (package-arguments python-send2trash)
14348 ((#:phases phases)
14349 `(modify-phases ,phases
14350 (add-before 'check 'setenv
14351 (lambda _
14352 (setenv "PYTHONPATH"
14353 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14354 #t))))))))
14355
14356 (define-public python-yapf
14357 (package
14358 (name "python-yapf")
14359 (version "0.24.0")
14360 (source
14361 (origin
14362 (method url-fetch)
14363 (uri (pypi-uri "yapf" version))
14364 (sha256
14365 (base32
14366 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14367 (build-system python-build-system)
14368 (home-page "https://github.com/google/yapf")
14369 (synopsis "Formatter for Python code")
14370 (description "YAPF is a formatter for Python code. It's based off of
14371 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14372 takes the code and reformats it to the best formatting that conforms to the
14373 style guide, even if the original code didn't violate the style guide.")
14374 (license license:asl2.0)))
14375
14376 (define-public python2-yapf
14377 (package-with-python2 python-yapf))
14378
14379 (define-public python-gyp
14380 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14381 (revision "0"))
14382 (package
14383 (name "python-gyp")
14384 ;; Google does not release versions,
14385 ;; based on second most recent commit date.
14386 (version (git-version "0.0.0" revision commit))
14387 (source
14388 (origin
14389 ;; Google does not release tarballs,
14390 ;; git checkout is needed.
14391 (method git-fetch)
14392 (uri (git-reference
14393 (url "https://chromium.googlesource.com/external/gyp")
14394 (commit commit)))
14395 (file-name (git-file-name name version))
14396 (sha256
14397 (base32
14398 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14399 (build-system python-build-system)
14400 (home-page "https://gyp.gsrc.io/")
14401 (synopsis "GYP is a Meta-Build system")
14402 (description
14403 "GYP builds build systems for large, cross platform applications.
14404 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14405 files, and Makefiles.")
14406 (license license:bsd-3))))
14407
14408 (define-public python2-gyp
14409 (package-with-python2 python-gyp))
14410
14411 (define-public python-whatever
14412 (package
14413 (name "python-whatever")
14414 (version "0.5")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14419 ".tar.gz"))
14420 (sha256
14421 (base32
14422 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14423 (file-name (string-append name "-" version ".tar.gz"))))
14424 (build-system python-build-system)
14425 (arguments
14426 `(#:phases
14427 (modify-phases %standard-phases
14428 (replace 'check
14429 (lambda _
14430 (invoke "py.test"))))))
14431 (native-inputs
14432 `(("python-pytest" ,python-pytest)))
14433 (home-page "http://github.com/Suor/whatever")
14434 (synopsis "Make anonymous functions by partial application of operators")
14435 (description "@code{whatever} provides an easy way to make anonymous
14436 functions by partial application of operators.")
14437 (license license:bsd-3)))
14438
14439 (define-public python2-whatever
14440 (package-with-python2 python-whatever))
14441
14442 (define-public python-funcy
14443 (package
14444 (name "python-funcy")
14445 (version "1.11")
14446 (source
14447 (origin
14448 (method git-fetch)
14449 (uri (git-reference
14450 (url "https://github.com/Suor/funcy.git")
14451 (commit version)))
14452 (sha256
14453 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14454 (file-name (git-file-name name version))))
14455 (build-system python-build-system)
14456 (arguments
14457 `(#:phases
14458 (modify-phases %standard-phases
14459 (replace 'check
14460 (lambda _
14461 (invoke "py.test"))))))
14462 (native-inputs
14463 `(("python-pytest" ,python-pytest)
14464 ("python-whatever" ,python-whatever)))
14465 (home-page "http://github.com/Suor/funcy")
14466 (synopsis "Functional tools")
14467 (description "@code{funcy} is a library that provides functional tools.
14468 Examples are:
14469 @enumerate
14470 @item merge - Merges collections of the same type
14471 @item walk - Type-preserving map
14472 @item select - Selects a part of a collection
14473 @item take - Takes the first n items of a collection
14474 @item first - Takes the first item of a collection
14475 @item remove - Predicated-removes items of a collection
14476 @item concat - Concatenates two collections
14477 @item flatten - Flattens a collection with subcollections
14478 @item distinct - Returns only distinct items
14479 @item split - Predicated-splits a collection
14480 @item split_at - Splits a collection at a given item
14481 @item group_by - Groups items by group
14482 @item pairwise - Pairs off adjacent items
14483 @item partial - Partially-applies a function
14484 @item curry - Curries a function
14485 @item compose - Composes functions
14486 @item complement - Complements a predicate
14487 @item all_fn - \"all\" with predicate
14488 @end enumerate")
14489 (license license:bsd-3)))
14490
14491 (define-public python2-funcy
14492 (package-with-python2 python-funcy))
14493
14494 (define-public python-isoweek
14495 (package
14496 (name "python-isoweek")
14497 (version "1.3.3")
14498 (source
14499 (origin
14500 (method url-fetch)
14501 (uri (pypi-uri "isoweek" version))
14502 (sha256
14503 (base32
14504 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14505 (build-system python-build-system)
14506 (home-page "https://github.com/gisle/isoweek")
14507 (synopsis "Objects representing a week")
14508 (description "The @code{isoweek} module provide the class Week that
14509 implements the week definition of ISO 8601. This standard also defines
14510 a notation for identifying weeks; yyyyWww (where the W is a literal).
14511 Week instances stringify to this form.")
14512 (license license:bsd-3)))
14513
14514 (define-public python2-isoweek
14515 (package-with-python2 python-isoweek))
14516
14517 (define-public python-tokenize-rt
14518 (package
14519 (name "python-tokenize-rt")
14520 (version "2.0.1")
14521 (source
14522 (origin
14523 (method url-fetch)
14524 (uri (pypi-uri "tokenize-rt" version))
14525 (sha256
14526 (base32
14527 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14528 (build-system python-build-system)
14529 (home-page "https://github.com/asottile/tokenize-rt")
14530 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14531 (description
14532 "This Python library is a wrapper around @code{tokenize} from the Python
14533 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14534 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14535 and @code{tokens_to_src} to roundtrip.")
14536 (license license:expat)))
14537
14538 (define-public python-future-fstrings
14539 (package
14540 (name "python-future-fstrings")
14541 (version "0.4.1")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 (uri (pypi-uri "future_fstrings" version))
14546 (sha256
14547 (base32
14548 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14549 (build-system python-build-system)
14550 (propagated-inputs
14551 `(("python-tokenize-rt" ,python-tokenize-rt)))
14552 (home-page "https://github.com/asottile/future-fstrings")
14553 (synopsis "Backport of fstrings to Python < 3.6")
14554 (description
14555 "This package provides a UTF-8 compatible encoding
14556 @code{future_fstrings}, which performs source manipulation. It decodes the
14557 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14558 @code{f} strings.")
14559 (license license:expat)))
14560
14561 (define-public python-typed-ast
14562 (package
14563 (name "python-typed-ast")
14564 (version "1.3.5")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "typed-ast" version))
14569 (sha256
14570 (base32
14571 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14572 (build-system python-build-system)
14573 (arguments
14574 `(#:modules ((guix build utils)
14575 (guix build python-build-system)
14576 (ice-9 ftw)
14577 (srfi srfi-1)
14578 (srfi srfi-26))
14579 #:phases
14580 (modify-phases %standard-phases
14581 (replace 'check
14582 (lambda _
14583 (let ((cwd (getcwd)))
14584 (setenv "PYTHONPATH"
14585 (string-append cwd "/build/"
14586 (find (cut string-prefix? "lib" <>)
14587 (scandir (string-append cwd "/build")))
14588 ":"
14589 (getenv "PYTHONPATH"))))
14590 (invoke "pytest")
14591 #t)))))
14592 (native-inputs `(("python-pytest" ,python-pytest)))
14593 (home-page "https://github.com/python/typed_ast")
14594 (synopsis "Fork of Python @code{ast} modules with type comment support")
14595 (description "This package provides a parser similar to the standard
14596 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14597 include PEP 484 type comments and are independent of the version of Python
14598 under which they are run. The @code{typed_ast} parsers produce the standard
14599 Python AST (plus type comments), and are both fast and correct, as they are
14600 based on the CPython 2.7 and 3.7 parsers.")
14601 ;; See the file "LICENSE" for the details.
14602 (license (list license:psfl
14603 license:asl2.0
14604 license:expat)))) ;ast27/Parser/spark.py
14605
14606 (define-public python-typing
14607 (package
14608 (name "python-typing")
14609 (version "3.6.6")
14610 (source
14611 (origin
14612 (method url-fetch)
14613 (uri (pypi-uri "typing" version))
14614 (sha256
14615 (base32
14616 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14617 (build-system python-build-system)
14618 (home-page "https://docs.python.org/3/library/typing.html")
14619 (synopsis "Type hints for Python")
14620 (description "This is a backport of the standard library @code{typing}
14621 module to Python versions older than 3.5. Typing defines a standard notation
14622 for Python function and variable type annotations. The notation can be used
14623 for documenting code in a concise, standard format, and it has been designed
14624 to also be used by static and runtime type checkers, static analyzers, IDEs
14625 and other tools.")
14626 (license license:psfl)))
14627
14628 (define-public python2-typing
14629 (package-with-python2 python-typing))
14630
14631 (define-public python-typing-extensions
14632 (package
14633 (name "python-typing-extensions")
14634 (version "3.7.2")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "typing_extensions" version))
14639 (sha256
14640 (base32
14641 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14642 (build-system python-build-system)
14643 (home-page
14644 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14645 (synopsis "Experimental type hints for Python")
14646 (description
14647 "The typing_extensions module contains additional @code{typing} hints not
14648 yet present in the of the @code{typing} standard library.
14649 Included are implementations of:
14650 @enumerate
14651 @item ClassVar
14652 @item ContextManager
14653 @item Counter
14654 @item DefaultDict
14655 @item Deque
14656 @item NewType
14657 @item NoReturn
14658 @item overload
14659 @item Protocol
14660 @item runtime
14661 @item Text
14662 @item Type
14663 @item TYPE_CHECKING
14664 @item AsyncGenerator
14665 @end enumerate\n")
14666 (license license:psfl)))
14667
14668 (define-public bpython
14669 (package
14670 (name "bpython")
14671 (version "0.17.1")
14672 (source
14673 (origin
14674 (method url-fetch)
14675 (uri (pypi-uri "bpython" version))
14676 (sha256
14677 (base32
14678 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14679 (build-system python-build-system)
14680 (arguments
14681 `(#:phases
14682 (modify-phases %standard-phases
14683 (add-after 'unpack 'remove-failing-test
14684 (lambda _
14685 ;; Remove failing test. FIXME: make it pass
14686 (delete-file "bpython/test/test_args.py")
14687 #t))
14688 (add-after 'wrap 'add-aliases
14689 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14690 (lambda* (#:key outputs #:allow-other-keys)
14691 (let ((out (assoc-ref outputs "out")))
14692 (for-each
14693 (lambda (old new)
14694 (symlink old (string-append out "/bin/" new)))
14695 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14696 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14697 #t)))))
14698 (propagated-inputs
14699 `(("python-pygments" ,python-pygments)
14700 ("python-requests" ,python-requests)
14701 ("python-babel" ,python-babel) ; optional, for internationalization
14702 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14703 ("python-greenlet" ,python-greenlet)
14704 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14705 ("python-six" ,python-six)))
14706 (native-inputs
14707 `(("python-sphinx" ,python-sphinx)
14708 ("python-mock" ,python-mock)))
14709 (home-page "https://bpython-interpreter.org/")
14710 (synopsis "Fancy interface to the Python interpreter")
14711 (description "Bpython is a fancy interface to the Python
14712 interpreter. bpython's main features are
14713
14714 @enumerate
14715 @item in-line syntax highlighting,
14716 @item readline-like autocomplete with suggestions displayed as you type,
14717 @item expected parameter list for any Python function,
14718 @item \"rewind\" function to pop the last line of code from memory and
14719 re-evaluate,
14720 @item send the code you've entered off to a pastebin,
14721 @item save the code you've entered to a file, and
14722 @item auto-indentation.
14723 @end enumerate")
14724 (license license:expat)))
14725
14726 (define-public bpython2
14727 (let ((base (package-with-python2
14728 (strip-python2-variant bpython))))
14729 (package (inherit base)
14730 (name "bpython2")
14731 (arguments
14732 `(#:python ,python-2
14733 #:phases
14734 (modify-phases %standard-phases
14735 (add-after 'unpack 'remove-failing-test
14736 (lambda _
14737 ;; Remove failing test. FIXME: make it pass
14738 (delete-file "bpython/test/test_args.py")
14739 ;; Disable failing test-cases (renaming inhibits they are
14740 ;; discovered)
14741 (substitute* "bpython/test/test_curtsies_repl.py"
14742 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14743 (string-append a "xxx_off_" b))
14744 (("^(\\s*def )(test_complex\\W)" _ a b)
14745 (string-append a "xxx_off_" b)))
14746 #t))
14747 (add-before 'build 'rename-scripts
14748 ;; rename the scripts to bypthon2, bpdb2, etc.
14749 (lambda _
14750 (substitute* "setup.py"
14751 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14752 (string-append name "2" rest "\n"))
14753 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14754 (string-append name "2" (or sub "") rest "\n")))
14755 #t))))))))
14756
14757 (define-public python-pyinotify
14758 (package
14759 (name "python-pyinotify")
14760 (version "0.9.6")
14761 (source (origin
14762 (method url-fetch)
14763 (uri (pypi-uri "pyinotify" version))
14764 (sha256
14765 (base32
14766 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14767 (build-system python-build-system)
14768 (arguments `(#:tests? #f)) ;no tests
14769 (home-page "https://github.com/seb-m/pyinotify")
14770 (synopsis "Python library for monitoring inotify events")
14771 (description
14772 "@code{pyinotify} provides a Python interface for monitoring
14773 file system events on Linux.")
14774 (license license:expat)))
14775
14776 (define-public python2-pyinotify
14777 (package-with-python2 python-pyinotify))
14778
14779 ;; Ada parser uses this version.
14780 (define-public python2-quex-0.67.3
14781 (package
14782 (name "python2-quex")
14783 (version "0.67.3")
14784 (source
14785 (origin
14786 (method url-fetch)
14787 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14788 (version-major+minor version)
14789 "/quex-" version ".zip"))
14790 (sha256
14791 (base32
14792 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14793 (build-system python-build-system)
14794 (native-inputs
14795 `(("unzip" ,unzip)))
14796 (arguments
14797 `(#:python ,python-2
14798 #:tests? #f
14799 #:phases
14800 (modify-phases %standard-phases
14801 (delete 'configure)
14802 (delete 'build)
14803 (replace 'install
14804 (lambda* (#:key outputs #:allow-other-keys)
14805 (let* ((out (assoc-ref outputs "out"))
14806 (share/quex (string-append out "/share/quex"))
14807 (bin (string-append out "/bin")))
14808 (copy-recursively "." share/quex)
14809 (mkdir-p bin)
14810 (symlink (string-append share/quex "/quex-exe.py")
14811 (string-append bin "/quex"))
14812 #t))))))
14813 (native-search-paths
14814 (list (search-path-specification
14815 (variable "QUEX_PATH")
14816 (files '("share/quex")))))
14817 (home-page "http://quex.sourceforge.net/")
14818 (synopsis "Lexical analyzer generator in Python")
14819 (description "@code{quex} is a lexical analyzer generator in Python.")
14820 (license license:lgpl2.1+))) ; Non-military
14821
14822 (define-public python2-quex
14823 (package (inherit python2-quex-0.67.3)
14824 (name "python2-quex")
14825 (version "0.68.1")
14826 (source
14827 (origin
14828 (method url-fetch)
14829 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14830 (sha256
14831 (base32
14832 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14833 (file-name (string-append name "-" version ".tar.gz"))))))
14834
14835 (define-public python-more-itertools
14836 (package
14837 (name "python-more-itertools")
14838 (version "7.1.0")
14839 (source
14840 (origin
14841 (method url-fetch)
14842 (uri (pypi-uri "more-itertools" version))
14843 (sha256
14844 (base32
14845 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14846 (build-system python-build-system)
14847 (home-page "https://github.com/erikrose/more-itertools")
14848 (synopsis "More routines for operating on iterables, beyond itertools")
14849 (description "Python's built-in @code{itertools} module implements a
14850 number of iterator building blocks inspired by constructs from APL, Haskell,
14851 and SML. @code{more-itertools} includes additional building blocks for
14852 working with iterables.")
14853 (properties `((python2-variant . ,(delay python2-more-itertools))))
14854 (license license:expat)))
14855
14856 ;; The 5.x series are the last versions supporting Python 2.7.
14857 (define-public python2-more-itertools
14858 (package
14859 (inherit python-more-itertools)
14860 (name "python2-more-itertools")
14861 (version "5.0.0")
14862 (source (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "more-itertools" version))
14865 (sha256
14866 (base32
14867 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14868 (arguments
14869 `(#:python ,python2-minimal))
14870 (propagated-inputs
14871 `(("python2-six" ,python2-six-bootstrap)))))
14872
14873 (define-public python-latexcodec
14874 (package
14875 (name "python-latexcodec")
14876 (version "1.0.6")
14877 (source
14878 (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "latexcodec" version))
14881 (sha256
14882 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14883 (build-system python-build-system)
14884 (inputs
14885 `(("python-six" ,python-six)))
14886 (home-page "https://readthedocs.org/projects/latexcodec/")
14887 (synopsis "Work with LaTeX code in Python")
14888 (description "Lexer and codec to work with LaTeX code in Python.")
14889 (license license:expat)))
14890
14891 (define-public python-pybtex
14892 (package
14893 (name "python-pybtex")
14894 (version "0.22.2")
14895 (source
14896 (origin
14897 (method url-fetch)
14898 (uri (pypi-uri "pybtex" version))
14899 (sha256
14900 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14901 (build-system python-build-system)
14902 (native-inputs
14903 `(("python-nose" ,python-nose)))
14904 (inputs
14905 `(("python-latexcodec" ,python-latexcodec)
14906 ("python-pyyaml" ,python-pyyaml)
14907 ("python-six" ,python-six)))
14908 (arguments
14909 `(#:test-target "nosetests"))
14910 (home-page "https://pybtex.org/")
14911 (synopsis "BibTeX-compatible bibliography processor")
14912 (description "Pybtex is a BibTeX-compatible bibliography processor written
14913 in Python. You can simply type pybtex instead of bibtex.")
14914 (license license:expat)))
14915
14916 (define-public python-onetimepass
14917 (package
14918 (name "python-onetimepass")
14919 (version "1.0.1")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "onetimepass" version))
14924 (sha256
14925 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14926 (build-system python-build-system)
14927 (propagated-inputs `(("python-six" ,python-six)))
14928 (home-page "https://github.com/tadeck/onetimepass/")
14929 (synopsis "One-time password library")
14930 (description "Python one-time password library for HMAC-based (HOTP) and
14931 time-based (TOTP) passwords.")
14932 (license license:expat)))
14933
14934 (define-public python-parso
14935 (package
14936 (name "python-parso")
14937 (version "0.5.1")
14938 (source
14939 (origin
14940 (method url-fetch)
14941 (uri (pypi-uri "parso" version))
14942 (sha256
14943 (base32
14944 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14945 (native-inputs
14946 `(("python-pytest" ,python-pytest)))
14947 (build-system python-build-system)
14948 (arguments
14949 `(#:phases (modify-phases %standard-phases
14950 (replace 'check
14951 (lambda _ (invoke "pytest" "-vv"))))))
14952 (home-page "https://github.com/davidhalter/parso")
14953 (synopsis "Python Parser")
14954 (description "Parso is a Python parser that supports error recovery and
14955 round-trip parsing for different Python versions (in multiple Python versions).
14956 Parso is also able to list multiple syntax errors in your Python file.")
14957 (license license:expat)))
14958
14959 (define-public python2-parso
14960 (package-with-python2 python-parso))
14961
14962 (define-public python-async-generator
14963 (package
14964 (name "python-async-generator")
14965 (version "1.10")
14966 (source
14967 (origin
14968 (method url-fetch)
14969 (uri (pypi-uri "async_generator" version))
14970 (sha256
14971 (base32
14972 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14973 (build-system python-build-system)
14974 (native-inputs
14975 `(("python-pytest" ,python-pytest)))
14976 (home-page "https://github.com/python-trio/async_generator")
14977 (synopsis "Async generators and context managers for Python 3.5+")
14978 (description "@code{async_generator} back-ports Python 3.6's native async
14979 generators and Python 3.7's context managers into Python 3.5.")
14980 ;; Dual licensed.
14981 (license (list license:expat license:asl2.0))))
14982
14983 (define-public python-async-timeout
14984 (package
14985 (name "python-async-timeout")
14986 (version "3.0.1")
14987 (source
14988 (origin
14989 (method url-fetch)
14990 (uri (pypi-uri "async-timeout" version))
14991 (sha256
14992 (base32
14993 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14994 (build-system python-build-system)
14995 (home-page "https://github.com/aio-libs/async_timeout/")
14996 (synopsis "Timeout context manager for asyncio programs")
14997 (description "@code{async-timeout} provides a timeout timeout context
14998 manager compatible with @code{asyncio}.")
14999 (license license:asl2.0)))
15000
15001 (define-public python-glob2
15002 (package
15003 (name "python-glob2")
15004 (version "0.6")
15005 (source
15006 (origin
15007 (method git-fetch)
15008 (uri (git-reference
15009 (url "https://github.com/miracle2k/python-glob2.git")
15010 (commit version)))
15011 (file-name (git-file-name name version))
15012 (sha256
15013 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15014 (build-system python-build-system)
15015 (home-page "https://github.com/miracle2k/python-glob2/")
15016 (synopsis "Extended Version of the python buildin glob module")
15017 (description "This is an extended version of the Python
15018 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15019 adds:
15020
15021 @itemize
15022 @item The ability to capture the text matched by glob patterns, and return
15023 those matches alongside the file names.
15024 @item A recursive @code{**} globbing syntax, akin for example to the
15025 @code{globstar} option of Bash.
15026 @item The ability to replace the file system functions used, in order to glob
15027 on virtual file systems.
15028 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15029 @end itemize
15030
15031 Glob2 currently based on the glob code from Python 3.3.1.")
15032 (license license:bsd-2)))
15033
15034 (define-public python2-glob2
15035 (package-with-python2 python-glob2))
15036
15037 (define-public python-gipc
15038 (package
15039 (name "python-gipc")
15040 (version "0.6.0")
15041 (source
15042 (origin
15043 (method url-fetch)
15044 (uri (pypi-uri "gipc" version ".zip"))
15045 (sha256
15046 (base32
15047 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15048 (build-system python-build-system)
15049 (native-inputs
15050 `(("unzip" ,unzip)))
15051 (propagated-inputs
15052 `(("python-gevent" ,python-gevent)))
15053 (home-page "http://gehrcke.de/gipc")
15054 (synopsis "Child process management in the context of gevent")
15055 (description "Usage of Python's multiprocessing package in a
15056 gevent-powered application may raise problems. With @code{gipc},
15057 process-based child processes can safely be created anywhere within a
15058 gevent-powered application.")
15059 (license license:expat)))
15060
15061 (define-public python2-gipc
15062 (package-with-python2 python-gipc))
15063
15064 (define-public python-fusepy
15065 (package
15066 (name "python-fusepy")
15067 (version "2.0.4")
15068 (source
15069 (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "fusepy" version))
15072 (sha256
15073 (base32
15074 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15075 (build-system python-build-system)
15076 (arguments
15077 `(#:phases
15078 (modify-phases %standard-phases
15079 (add-before 'build 'set-library-file-name
15080 (lambda* (#:key inputs #:allow-other-keys)
15081 (let ((fuse (assoc-ref inputs "fuse")))
15082 (substitute* "fuse.py"
15083 (("find_library\\('fuse'\\)")
15084 (string-append "'" fuse "/lib/libfuse.so'")))
15085 #t))))))
15086 (propagated-inputs
15087 `(("fuse" ,fuse)))
15088 (home-page "https://github.com/fusepy/fusepy")
15089 (synopsis "Simple ctypes bindings for FUSE")
15090 (description "Python module that provides a simple interface to FUSE and
15091 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15092 (license license:isc)))
15093
15094 (define-public python2-fusepy
15095 (package-with-python2 python-fusepy))
15096
15097 (define-public python2-gdrivefs
15098 (package
15099 (name "python2-gdrivefs")
15100 (version "0.14.9")
15101 (source
15102 (origin
15103 (method url-fetch)
15104 (uri (pypi-uri "gdrivefs" version))
15105 (sha256
15106 (base32
15107 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15108 (build-system python-build-system)
15109 (arguments
15110 `(#:python ,python-2
15111 #:phases
15112 (modify-phases %standard-phases
15113 (add-before 'build 'patch-setup-py
15114 (lambda _
15115 ;; Update requirements from dependency==version
15116 ;; to dependency>=version
15117 (substitute* "gdrivefs/resources/requirements.txt"
15118 (("==") ">="))
15119 #t)))))
15120 (native-inputs
15121 `(("python2-gipc" ,python2-gipc)
15122 ("python2-gevent" ,python2-gevent)
15123 ("python2-greenlet" ,python2-greenlet)
15124 ("python2-httplib2" ,python2-httplib2)
15125 ("python2-uritemplate" ,python2-uritemplate)
15126 ("python2-oauth2client" ,python2-oauth2client)
15127 ("python2-six" ,python2-six)))
15128 (propagated-inputs
15129 `(("python2-dateutil" ,python2-dateutil)
15130 ("python2-fusepy" ,python2-fusepy)
15131 ("python2-google-api-client" ,python2-google-api-client)))
15132 (home-page "https://github.com/dsoprea/GDriveFS")
15133 (synopsis "Mount Google Drive as a local file system")
15134 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15135 under Python 2.7.")
15136 (license license:gpl2)))
15137
15138 (define-public pybind11
15139 (package
15140 (name "pybind11")
15141 (version "2.3.0")
15142 (source (origin
15143 (method git-fetch)
15144 (uri (git-reference
15145 (url "https://github.com/pybind/pybind11.git")
15146 (commit (string-append "v" version))))
15147 (sha256
15148 (base32
15149 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15150 (file-name (git-file-name name version))))
15151 (build-system cmake-build-system)
15152 (native-inputs
15153 `(("python" ,python)
15154 ("python-pytest" ,python-pytest)))
15155 (arguments
15156 `(#:test-target "check"))
15157 (home-page "https://github.com/pybind/pybind11/")
15158 (synopsis "Seamless operability between C++11 and Python")
15159 (description "pybind11 is a lightweight header-only library that exposes
15160 C++ types in Python and vice versa, mainly to create Python bindings of
15161 existing C++ code. Its goals and syntax are similar to the excellent
15162 Boost.Python library by David Abrahams: to minimize boilerplate code in
15163 traditional extension modules by inferring type information using compile-time
15164 introspection.")
15165 (license license:expat)))
15166
15167 (define-public python-fasteners
15168 (package
15169 (name "python-fasteners")
15170 (version "0.14.1")
15171 (source
15172 (origin
15173 (method url-fetch)
15174 (uri (pypi-uri "fasteners" version))
15175 (sha256
15176 (base32
15177 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15178 (build-system python-build-system)
15179 (propagated-inputs
15180 `(("python-monotonic" ,python-monotonic)
15181 ("python-six" ,python-six)
15182 ("python-testtools" ,python-testtools)))
15183 (home-page "https://github.com/harlowja/fasteners")
15184 (synopsis "Python package that provides useful locks")
15185 (description
15186 "This package provides a Python program that provides following locks:
15187
15188 @itemize
15189 @item Locking decorator
15190 @item Reader-writer locks
15191 @item Inter-process locks
15192 @item Generic helpers
15193 @end itemize\n")
15194 (properties `((python2-variant . ,(delay python2-fasteners))))
15195 (license license:asl2.0)))
15196
15197 (define-public python2-fasteners
15198 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15199 (package
15200 (inherit base)
15201 (propagated-inputs
15202 `(("python2-futures" ,python2-futures)
15203 ,@(package-propagated-inputs base))))))
15204
15205 (define-public python-requests-file
15206 (package
15207 (name "python-requests-file")
15208 (version "1.4.3")
15209 (source
15210 (origin
15211 (method url-fetch)
15212 (uri (pypi-uri "requests-file" version))
15213 (sha256
15214 (base32
15215 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15216 (build-system python-build-system)
15217 (propagated-inputs
15218 `(("python-requests" ,python-requests)
15219 ("python-six" ,python-six)))
15220 (home-page
15221 "https://github.com/dashea/requests-file")
15222 (synopsis "File transport adapter for Requests")
15223 (description
15224 "Requests-File is a transport adapter for use with the Requests Python
15225 library to allow local file system access via @code{file://} URLs.")
15226 (license license:asl2.0)))
15227
15228 (define-public python2-requests-file
15229 (package-with-python2 python-requests-file))
15230
15231 (define-public python-tldextract
15232 (package
15233 (name "python-tldextract")
15234 (version "2.2.0")
15235 (source
15236 (origin
15237 (method url-fetch)
15238 (uri (pypi-uri "tldextract" version))
15239 (sha256
15240 (base32
15241 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15242 (build-system python-build-system)
15243 (native-inputs
15244 `(("python-pytest" ,python-pytest)
15245 ("python-responses" ,python-responses)))
15246 (propagated-inputs
15247 `(("python-idna" ,python-idna)
15248 ("python-requests" ,python-requests)
15249 ("python-requests-file" ,python-requests-file)))
15250 (home-page
15251 "https://github.com/john-kurkowski/tldextract")
15252 (synopsis
15253 "Separate the TLD from the registered domain and subdomains of a URL")
15254 (description
15255 "TLDExtract accurately separates the TLD from the registered domain and
15256 subdomains of a URL, using the Public Suffix List. By default, this includes
15257 the public ICANN TLDs and their exceptions. It can optionally support the
15258 Public Suffix List's private domains as well.")
15259 (license license:bsd-3)))
15260
15261 (define-public python2-tldextract
15262 (package-with-python2 python-tldextract))
15263
15264 (define-public python-pynamecheap
15265 (package
15266 (name "python-pynamecheap")
15267 (version "0.0.3")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "PyNamecheap" version))
15272 (sha256
15273 (base32
15274 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15275 (build-system python-build-system)
15276 (propagated-inputs
15277 `(("python-requests" ,python-requests)))
15278 (home-page
15279 "https://github.com/Bemmu/PyNamecheap")
15280 (synopsis
15281 "Namecheap API client in Python")
15282 (description
15283 "PyNamecheap is a Namecheap API client in Python.")
15284 (license license:expat)))
15285
15286 (define-public python2-pynamecheap
15287 (package-with-python2 python-pynamecheap))
15288
15289 (define-public python-dns-lexicon
15290 (package
15291 (name "python-dns-lexicon")
15292 (version "2.4.0")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "dns-lexicon" version))
15297 (sha256
15298 (base32
15299 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15300 (build-system python-build-system)
15301 (arguments
15302 `(#:tests? #f)) ;requires internet access
15303 (propagated-inputs
15304 `(("python-future" ,python-future)
15305 ("python-pynamecheap" ,python-pynamecheap)
15306 ("python-requests" ,python-requests)
15307 ("python-tldextract" ,python-tldextract)
15308 ("python-urllib3" ,python-urllib3)))
15309 (home-page "https://github.com/AnalogJ/lexicon")
15310 (synopsis
15311 "Manipulate DNS records on various DNS providers")
15312 (description
15313 "Lexicon provides a way to manipulate DNS records on multiple DNS
15314 providers in a standardized way. It has a CLI but it can also be used as a
15315 Python library. It was designed to be used in automation, specifically with
15316 Let's Encrypt.")
15317 (license license:expat)))
15318
15319 (define-public python2-dns-lexicon
15320 (package-with-python2 python-dns-lexicon))
15321
15322 (define-public python-commandlines
15323 (package
15324 (name "python-commandlines")
15325 (version "0.4.1")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "commandlines" version))
15330 (sha256
15331 (base32
15332 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15333 (build-system python-build-system)
15334 (home-page "https://github.com/chrissimpkins/commandlines")
15335 (synopsis "Command line argument to object parsing library")
15336 (description
15337 "@code{Commandlines} is a Python library for command line application
15338 development that supports command line argument parsing, command string
15339 validation testing and application logic.")
15340 (license license:expat)))
15341
15342 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15343 ;; python-numba. They have a very unflexible relationship.
15344 (define-public python-numba
15345 (package
15346 (name "python-numba")
15347 (version "0.42.0")
15348 (source
15349 (origin
15350 (method url-fetch)
15351 (uri (pypi-uri "numba" version))
15352 (sha256
15353 (base32
15354 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15355 (build-system python-build-system)
15356 (arguments
15357 `(#:modules ((guix build utils)
15358 (guix build python-build-system)
15359 (ice-9 ftw)
15360 (srfi srfi-1)
15361 (srfi srfi-26))
15362 #:phases
15363 (modify-phases %standard-phases
15364 (add-after 'unpack 'disable-proprietary-features
15365 (lambda _
15366 (setenv "NUMBA_DISABLE_HSA" "1")
15367 (setenv "NUMBA_DISABLE_CUDA" "1")
15368 #t))
15369 (add-after 'unpack 'remove-failing-tests
15370 (lambda _
15371 ;; FIXME: these tests fail for unknown reasons:
15372 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15373 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15374 (substitute* "numba/tests/test_dispatcher.py"
15375 (("def test(_non_writable_pycache)" _ m)
15376 (string-append "def guix_skip" m))
15377 (("def test(_non_creatable_pycache)" _ m)
15378 (string-append "def guix_skip" m))
15379 (("def test(_frozen)" _ m)
15380 (string-append "def guix_skip" m)))
15381
15382 ;; These tests fail because we don't run the tests from the build
15383 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15384 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15385 (substitute* "numba/tests/test_pycc.py"
15386 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15387 (string-append "def guix_skip" m)))
15388 #t))
15389 (replace 'check
15390 (lambda _
15391 (let ((cwd (getcwd)))
15392 (setenv "PYTHONPATH"
15393 (string-append cwd "/build/"
15394 (find (cut string-prefix? "lib" <>)
15395 (scandir (string-append cwd "/build")))
15396 ":"
15397 (getenv "PYTHONPATH")))
15398 ;; Something is wrong with the PYTHONPATH when running the
15399 ;; tests from the build directory, as it complains about not being
15400 ;; able to import certain modules.
15401 (with-directory-excursion "/tmp"
15402 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15403 #t)))))
15404 (propagated-inputs
15405 `(("python-llvmlite" ,python-llvmlite)
15406 ("python-numpy" ,python-numpy)
15407 ("python-singledispatch" ,python-singledispatch)))
15408 ;; Needed for tests.
15409 (inputs
15410 `(("python-jinja2" ,python-jinja2)
15411 ("python-pygments" ,python-pygments)))
15412 (home-page "https://numba.pydata.org")
15413 (synopsis "Compile Python code using LLVM")
15414 (description "Numba gives you the power to speed up your applications with
15415 high performance functions written directly in Python. With a few
15416 annotations, array-oriented and math-heavy Python code can be just-in-time
15417 compiled to native machine instructions, similar in performance to C, C++ and
15418 Fortran, without having to switch languages or Python interpreters.
15419
15420 Numba works by generating optimized machine code using the LLVM compiler
15421 infrastructure at import time, runtime, or statically (using the included pycc
15422 tool).")
15423 (license license:bsd-3)))
15424
15425 (define-public python-anndata
15426 (package
15427 (name "python-anndata")
15428 (version "0.6.18")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "anndata" version))
15433 (sha256
15434 (base32
15435 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15436 (build-system python-build-system)
15437 (propagated-inputs
15438 `(("python-h5py" ,python-h5py)
15439 ("python-natsort" ,python-natsort)
15440 ("python-pandas" ,python-pandas)
15441 ("python-scipy" ,python-scipy)))
15442 (home-page "https://github.com/theislab/anndata")
15443 (synopsis "Annotated data for data analysis pipelines")
15444 (description "Anndata is a package for simple (functional) high-level APIs
15445 for data analysis pipelines. In this context, it provides an efficient,
15446 scalable way of keeping track of data together with learned annotations and
15447 reduces the code overhead typically encountered when using a mostly
15448 object-oriented library such as @code{scikit-learn}.")
15449 (license license:bsd-3)))
15450
15451 (define-public python-dill
15452 (package
15453 (name "python-dill")
15454 (version "0.2.9")
15455 (source
15456 (origin
15457 (method url-fetch)
15458 (uri (pypi-uri "dill" version))
15459 (sha256
15460 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15461 (build-system python-build-system)
15462 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15463 (arguments '(#:tests? #f))
15464 (home-page "https://pypi.org/project/dill")
15465 (synopsis "Serialize all of Python")
15466 (description "Dill extends Python's @code{pickle} module for serializing
15467 and de-serializing Python objects to the majority of the built-in Python
15468 types. Dill provides the user the same interface as the @code{pickle} module,
15469 and also includes some additional features. In addition to pickling Python
15470 objects, @code{dill} provides the ability to save the state of an interpreter
15471 session in a single command. Hence, it would be feasible to save a
15472 interpreter session, close the interpreter, ship the pickled file to another
15473 computer, open a new interpreter, unpickle the session and thus continue from
15474 the saved state of the original interpreter session.")
15475 (license license:bsd-3)))
15476
15477 (define-public python-multiprocess
15478 (package
15479 (name "python-multiprocess")
15480 (version "0.70.6.1")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (pypi-uri "multiprocess" version))
15485 (sha256
15486 (base32
15487 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15488 (build-system python-build-system)
15489 (propagated-inputs
15490 `(("python-dill" ,python-dill)))
15491 (home-page "https://pypi.org/project/multiprocess")
15492 (synopsis "Multiprocessing and multithreading in Python")
15493 (description
15494 "This package is a fork of the multiprocessing Python package, a package
15495 which supports the spawning of processes using the API of the standard
15496 library's @code{threading} module.")
15497 (license license:bsd-3)))
15498
15499 (define-public python-toolz
15500 (package
15501 (name "python-toolz")
15502 (version "0.9.0")
15503 (source
15504 (origin
15505 (method url-fetch)
15506 (uri (pypi-uri "toolz" version))
15507 (sha256
15508 (base32
15509 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15510 (build-system python-build-system)
15511 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15512 ;; unregistered loader type"
15513 (arguments '(#:tests? #f))
15514 (home-page "https://github.com/pytoolz/toolz/")
15515 (synopsis "List processing tools and functional utilities")
15516 (description
15517 "This package provides a set of utility functions for iterators,
15518 functions, and dictionaries.")
15519 (license license:bsd-3)))
15520
15521 (define-public python2-toolz
15522 (package-with-python2 python-toolz))
15523
15524 (define-public python-cytoolz
15525 (package
15526 (name "python-cytoolz")
15527 (version "0.9.0.1")
15528 (source
15529 (origin
15530 (method url-fetch)
15531 (uri (pypi-uri "cytoolz" version))
15532 (sha256
15533 (base32
15534 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15535 (build-system python-build-system)
15536 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15537 ;; 'exceptions'"
15538 (arguments '(#:tests? #f))
15539 (propagated-inputs
15540 `(("python-toolz" ,python-toolz)))
15541 (native-inputs
15542 `(("python-cython" ,python-cython)))
15543 (home-page "https://github.com/pytoolz/cytoolz")
15544 (synopsis "High performance functional utilities")
15545 (description
15546 "The cytoolz package implements the same API as provided by toolz. The
15547 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15548 that is accessible to other projects developed in Cython.")
15549 (license license:bsd-3)))
15550
15551 (define-public python-sortedcontainers
15552 (package
15553 (name "python-sortedcontainers")
15554 (version "2.0.4")
15555 (source
15556 (origin
15557 (method url-fetch)
15558 (uri (pypi-uri "sortedcontainers" version))
15559 (sha256
15560 (base32
15561 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15562 (build-system python-build-system)
15563 (native-inputs
15564 `(("python-tox" ,python-tox)))
15565 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15566 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15567 (description
15568 "This package provides a sorted collections library, written in
15569 pure-Python.")
15570 (license license:asl2.0)))
15571
15572 (define-public python-cloudpickle
15573 (package
15574 (name "python-cloudpickle")
15575 (version "0.6.1")
15576 (source
15577 (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "cloudpickle" version))
15580 (sha256
15581 (base32
15582 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15583 (build-system python-build-system)
15584 ;; FIXME: there are 5 errors in 122 tests:
15585 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15586 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15587 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15588 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15589 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15590 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15591 (arguments '(#:tests? #f))
15592 (native-inputs
15593 `(("python-pytest" ,python-pytest)
15594 ("python-mock" ,python-mock)
15595 ("python-tornado" ,python-tornado)))
15596 (home-page "https://github.com/cloudpipe/cloudpickle")
15597 (synopsis "Extended pickling support for Python objects")
15598 (description
15599 "Cloudpickle makes it possible to serialize Python constructs not
15600 supported by the default pickle module from the Python standard library. It
15601 is especially useful for cluster computing where Python expressions are
15602 shipped over the network to execute on remote hosts, possibly close to the
15603 data.")
15604 (license license:bsd-3)))
15605
15606 (define-public python2-cloudpickle
15607 (package-with-python2 python-cloudpickle))
15608
15609 (define-public python-locket
15610 (package
15611 (name "python-locket")
15612 (version "0.2.0")
15613 (source
15614 (origin
15615 (method url-fetch)
15616 (uri (pypi-uri "locket" version))
15617 (sha256
15618 (base32
15619 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/mwilliamson/locket.py")
15622 (synopsis "File-based locks for Python")
15623 (description
15624 "Locket implements a lock that can be used by multiple processes provided
15625 they use the same path.")
15626 (license license:bsd-2)))
15627
15628 (define-public python2-locket
15629 (package-with-python2 python-locket))
15630
15631 (define-public python-blosc
15632 (package
15633 (name "python-blosc")
15634 (version "1.5.1")
15635 (source
15636 (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "blosc" version))
15639 (sha256
15640 (base32
15641 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15642 (build-system python-build-system)
15643 ;; FIXME: all tests pass, but then this error is printed:
15644 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15645 (arguments '(#:tests? #f))
15646 (propagated-inputs
15647 `(("python-numpy" ,python-numpy)))
15648 (home-page "https://github.com/blosc/python-blosc")
15649 (synopsis "Python wrapper for the Blosc data compressor library")
15650 (description "Blosc is a high performance compressor optimized for binary
15651 data. It has been designed to transmit data to the processor cache faster
15652 than the traditional, non-compressed, direct memory fetch approach via a
15653 @code{memcpy()} system call.
15654
15655 Blosc works well for compressing numerical arrays that contains data with
15656 relatively low entropy, like sparse data, time series, grids with
15657 regular-spaced values, etc.
15658
15659 This Python package wraps the Blosc library.")
15660 (license license:bsd-3)))
15661
15662 (define-public python2-blosc
15663 (package-with-python2 python-blosc))
15664
15665 (define-public python-partd
15666 (package
15667 (name "python-partd")
15668 (version "0.3.9")
15669 (source
15670 (origin
15671 (method url-fetch)
15672 (uri (pypi-uri "partd" version))
15673 (sha256
15674 (base32
15675 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15676 (build-system python-build-system)
15677 (propagated-inputs
15678 `(("python-blosc" ,python-blosc)
15679 ("python-locket" ,python-locket)
15680 ("python-numpy" ,python-numpy)
15681 ("python-pandas" ,python-pandas)
15682 ("python-pyzmq" ,python-pyzmq)
15683 ("python-toolz" ,python-toolz)))
15684 (home-page "https://github.com/dask/partd/")
15685 (synopsis "Appendable key-value storage")
15686 (description "Partd stores key-value pairs. Values are raw bytes. We
15687 append on old values. Partd excels at shuffling operations.")
15688 (license license:bsd-3)))
15689
15690 (define-public python2-partd
15691 (package-with-python2 python-partd))
15692
15693 (define-public python-dask
15694 (package
15695 (name "python-dask")
15696 (version "1.2.2")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "dask" version))
15701 (sha256
15702 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15703 (build-system python-build-system)
15704 ;; A single test out of 5000+ fails. This test is marked as xfail when
15705 ;; pytest-xdist is used.
15706 (arguments
15707 `(#:phases
15708 (modify-phases %standard-phases
15709 (add-after 'unpack 'disable-broken-test
15710 (lambda _
15711 (substitute* "dask/tests/test_threaded.py"
15712 (("def test_interrupt\\(\\)" m)
15713 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15714 m)))
15715 (when (which "python2")
15716 ;; This test fails with recent Pandas:
15717 ;; <https://github.com/dask/dask/issues/3794>.
15718 (substitute* "dask/dataframe/tests/test_dataframe.py"
15719 (("def test_info\\(\\)" m)
15720 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15721 m))))
15722 #t))
15723 (replace 'check
15724 (lambda _ (invoke "pytest" "-vv"))))))
15725 (propagated-inputs
15726 `(("python-cloudpickle" ,python-cloudpickle)
15727 ("python-numpy" ,python-numpy)
15728 ("python-pandas" ,python-pandas)
15729 ("python-partd" ,python-partd)
15730 ("python-toolz" ,python-toolz)
15731 ("python-pyyaml" ,python-pyyaml)))
15732 (native-inputs
15733 `(("python-pytest" ,python-pytest)
15734 ("python-pytest-runner" ,python-pytest-runner)))
15735 (home-page "https://github.com/dask/dask/")
15736 (synopsis "Parallel computing with task scheduling")
15737 (description
15738 "Dask is a flexible parallel computing library for analytics. It
15739 consists of two components: dynamic task scheduling optimized for computation,
15740 and large data collections like parallel arrays, dataframes, and lists that
15741 extend common interfaces like NumPy, Pandas, or Python iterators to
15742 larger-than-memory or distributed environments. These parallel collections
15743 run on top of the dynamic task schedulers. ")
15744 (license license:bsd-3)))
15745
15746 (define-public python2-dask
15747 (package-with-python2 python-dask))
15748
15749 (define-public python-ilinkedlist
15750 (package
15751 (name "python-ilinkedlist")
15752 (version "0.4.0")
15753 (source
15754 (origin
15755 (method url-fetch)
15756 (uri (pypi-uri "ilinkedlist" version))
15757 (sha256
15758 (base32
15759 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15760 (build-system python-build-system)
15761 (native-inputs `(("python-pytest" ,python-pytest)))
15762 (inputs `(("python" ,python)))
15763 (home-page "https://github.com/luther9/ilinkedlist-py")
15764 (synopsis "Immutable linked list library")
15765 (description
15766 "This is a implementation of immutable linked lists for Python. It
15767 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15768 Since a linked list is treated as immutable, it is hashable, and its length
15769 can be retrieved in constant time. Some of the terminology is inspired by
15770 LISP. It is possible to create an improper list by creating a @code{Pair}
15771 with a non-list @code{cdr}.")
15772 (license license:gpl3+)))
15773
15774 (define-public python-readlike
15775 (package
15776 (name "python-readlike")
15777 (version "0.1.3")
15778 (source
15779 (origin
15780 (method url-fetch)
15781 (uri (pypi-uri "readlike" version))
15782 (sha256
15783 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15784 (build-system python-build-system)
15785 (home-page "https://github.com/jangler/readlike")
15786 (synopsis "GNU Readline-like line editing module")
15787 (description
15788 "This Python module provides line editing functions similar to the default
15789 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15790 @code{readline} package, this one allows access to those capabilties in settings
15791 outside of a standard command-line interface. It is especially well-suited to
15792 interfacing with Urwid, due to a shared syntax for describing key inputs.
15793
15794 Currently, all stateless Readline commands are implemented. Yanking and history
15795 are not supported.")
15796 (license license:expat)))
15797
15798 (define-public python2-readlike
15799 (package-with-python2 python-readlike))
15800
15801 (define-public python-reparser
15802 (package
15803 (name "python-reparser")
15804 (version "1.4.3")
15805 (source
15806 (origin
15807 (method url-fetch)
15808 (uri (pypi-uri "ReParser" version))
15809 (sha256
15810 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15811 (build-system python-build-system)
15812 (home-page "https://github.com/xmikos/reparser")
15813 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15814 (description
15815 "This Python library provides a simple lexer/parser for inline markup based
15816 on regular expressions.")
15817 (license license:expat)))
15818
15819 (define-public python2-reparser
15820 (let ((reparser (package-with-python2
15821 (strip-python2-variant python-reparser))))
15822 (package (inherit reparser)
15823 (propagated-inputs
15824 `(("python2-enum34" ,python2-enum34)
15825 ,@(package-propagated-inputs reparser))))))
15826
15827 (define-public python-precis-i18n
15828 (package
15829 (name "python-precis-i18n")
15830 (version "1.0.0")
15831 (source
15832 (origin
15833 (method url-fetch)
15834 (uri (pypi-uri "precis_i18n" version))
15835 (sha256
15836 (base32
15837 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15838 (build-system python-build-system)
15839 (home-page "https://github.com/byllyfish/precis_i18n")
15840 (synopsis "Implementation of the PRECIS framework")
15841 (description
15842 "This module implements the PRECIS Framework as described in RFC 8264,
15843 RFC 8265 and RFC 8266.")
15844 (license license:expat)))
15845
15846 (define-public python-absl-py
15847 (package
15848 (name "python-absl-py")
15849 (version "0.6.1")
15850 (source
15851 (origin
15852 (method url-fetch)
15853 (uri (pypi-uri "absl-py" version))
15854 (sha256
15855 (base32
15856 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15857 (build-system python-build-system)
15858 (propagated-inputs
15859 `(("python-six" ,python-six)))
15860 (home-page "https://github.com/abseil/abseil-py")
15861 (synopsis "Abseil Python common libraries")
15862 (description
15863 "This package provides the Abseil Python Common Libraries, a collection
15864 of Python libraries for building Python applications.")
15865 (license license:asl2.0)))
15866
15867 (define-public python-astor
15868 (package
15869 (name "python-astor")
15870 (version "0.7.1")
15871 (source
15872 (origin
15873 (method url-fetch)
15874 (uri (pypi-uri "astor" version))
15875 (sha256
15876 (base32
15877 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15878 (build-system python-build-system)
15879 ;; FIXME: There are two errors and two test failures.
15880 (arguments `(#:tests? #f))
15881 (home-page "https://github.com/berkerpeksag/astor")
15882 (synopsis "Read and write Python ASTs")
15883 (description "Astor is designed to allow easy manipulation of Python
15884 source via the Abstract Syntax Tree.")
15885 (license license:bsd-3)))
15886
15887 (define-public python2-astor
15888 (package-with-python2 python-astor))
15889
15890 (define-public python-grpcio
15891 (package
15892 (name "python-grpcio")
15893 (version "1.17.1")
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "grpcio" version))
15898 (sha256
15899 (base32
15900 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15901 (build-system python-build-system)
15902 (propagated-inputs
15903 `(("python-six" ,python-six)))
15904 (home-page "https://grpc.io")
15905 (synopsis "HTTP/2-based RPC framework")
15906 (description "This package provides a Python library for communicating
15907 with the HTTP/2-based RPC framework gRPC.")
15908 (license license:asl2.0)))
15909
15910 (define-public python-astunparse
15911 (package
15912 (name "python-astunparse")
15913 (version "1.6.2")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "astunparse" version))
15918 (sha256
15919 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15920 (build-system python-build-system)
15921 (arguments '(#:tests? #f)) ; there are none
15922 (propagated-inputs
15923 `(("python-six" ,python-six)
15924 ("python-wheel" ,python-wheel)))
15925 (home-page "https://github.com/simonpercivall/astunparse")
15926 (synopsis "AST unparser for Python")
15927 (description "This package provides an AST unparser for Python. It is a
15928 factored out version of @code{unparse} found in the Python source
15929 distribution.")
15930 (license license:bsd-3)))
15931
15932 (define-public python-gast
15933 (package
15934 (name "python-gast")
15935 (version "0.2.2")
15936 (source
15937 (origin
15938 (method url-fetch)
15939 (uri (pypi-uri "gast" version))
15940 (sha256
15941 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15942 (build-system python-build-system)
15943 (propagated-inputs
15944 `(("python-astunparse" ,python-astunparse)))
15945 (home-page "https://pypi.org/project/gast/")
15946 (synopsis "Generic Python AST that abstracts the underlying Python version")
15947 (description
15948 "GAST provides a compatibility layer between the AST of various Python
15949 versions, as produced by @code{ast.parse} from the standard @code{ast}
15950 module.")
15951 (license license:bsd-3)))
15952
15953 (define-public python-wikidata
15954 (package
15955 (name "python-wikidata")
15956 (version "0.6.1")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "Wikidata" version))
15961 (sha256
15962 (base32
15963 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15964 (build-system python-build-system)
15965 (propagated-inputs
15966 `(("python-babel" ,python-babel)))
15967 (home-page "https://github.com/dahlia/wikidata")
15968 (synopsis "Wikidata client library")
15969 (description
15970 "This package provides a Python interface to
15971 @url{https://www.wikidata.org/, Wikidata}.")
15972 (properties '((upstream-name . "Wikidata")))
15973 (license license:gpl3+)))
15974
15975 (define-public python-doctest-ignore-unicode
15976 (package
15977 (name "python-doctest-ignore-unicode")
15978 (version "0.1.2")
15979 (source
15980 (origin
15981 (method url-fetch)
15982 (uri (pypi-uri "doctest-ignore-unicode" version))
15983 (sha256
15984 (base32
15985 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15986 (build-system python-build-system)
15987 (native-inputs
15988 `(("python-nose" ,python-nose)))
15989 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15990 (synopsis "Ignore Unicode literal prefixes in doctests")
15991 (description
15992 "This package adds support for a flag to ignore Unicode literal prefixes
15993 in doctests.")
15994 (license license:asl2.0)))
15995
15996 (define-public python-attr
15997 (package
15998 (name "python-attr")
15999 (version "0.3.1")
16000 (source
16001 (origin
16002 (method url-fetch)
16003 (uri (pypi-uri "attr" version))
16004 (sha256
16005 (base32
16006 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16007 (build-system python-build-system)
16008 (home-page "https://github.com/denis-ryzhkov/attr")
16009 (synopsis "Decorator for attributes of target function or class")
16010 (description "Simple decorator to set attributes of target function or
16011 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16012 (license license:expat)))
16013
16014 (define-public python-construct
16015 (package
16016 (name "python-construct")
16017 (version "2.9.45")
16018 (source
16019 (origin
16020 (method url-fetch)
16021 (uri (pypi-uri "construct" version))
16022 (sha256
16023 (base32
16024 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16025 (build-system python-build-system)
16026 (arguments
16027 `(#:tests? #f)) ; No tests exist.
16028 (propagated-inputs
16029 `(("python-extras" ,python-extras)
16030 ("python-arrow" ,python-arrow)
16031 ("python-numpy" ,python-numpy)
16032 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16033 (home-page "http://construct.readthedocs.io")
16034 (synopsis "Declarative and symmetrical parser and builder for binary data")
16035 (description
16036 "This package provides both simple, atomic constructs (such as
16037 integers of various sizes), as well as composite ones which allow you
16038 form hierarchical and sequential structures of increasing complexity.
16039 It features bit and byte granularity, easy debugging and testing, an
16040 easy-to-extend subclass system, and lots of primitive constructs to
16041 make your work easier.")
16042 (license license:expat)))
16043
16044 (define-public python-humanize
16045 (package
16046 (name "python-humanize")
16047 (version "0.5.1")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "humanize" version))
16052 (sha256
16053 (base32
16054 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16055 (arguments
16056 '(#:tests? #f)) ; tests not in pypi archive
16057 (build-system python-build-system)
16058 (home-page "https://github.com/jmoiron/humanize")
16059 (synopsis "Print numerical information in a human-readable form")
16060 (description "This package provides a Python module that displays numbers
16061 and dates in \"human readable\" forms. For example, it would display
16062 \"12345591313\" as \"12.3 billion\".")
16063 (license license:expat)))
16064
16065 (define-public python-txaio
16066 (package
16067 (name "python-txaio")
16068 (version "18.8.1")
16069 (source
16070 (origin
16071 (method url-fetch)
16072 (uri (pypi-uri "txaio" version))
16073 (sha256
16074 (base32
16075 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16076 (build-system python-build-system)
16077 (propagated-inputs
16078 `(("python-twisted" ,python-twisted)
16079 ("python-six" ,python-six)))
16080 (home-page "https://github.com/crossbario/txaio")
16081 (synopsis "Compatibility layer between Python asyncio and Twisted")
16082 (description "Txaio provides a compatibility layer between the Python
16083 @code{asyncio} module and @code{Twisted}.")
16084 (license license:expat)))
16085
16086 (define-public python-toolshed
16087 (package
16088 (name "python-toolshed")
16089 (version "0.4.6")
16090 (source
16091 (origin
16092 (method url-fetch)
16093 (uri (pypi-uri "toolshed" version))
16094 (sha256
16095 (base32
16096 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16097 (build-system python-build-system)
16098 (native-inputs
16099 `(("python-nose" ,python-nose)))
16100 (home-page "https://github.com/brentp/toolshed/")
16101 (synopsis "Collection of modules and functions for working with data")
16102 (description "This is a collection of well-tested, simple modules and
16103 functions that aim to reduce boilerplate when working with data.")
16104 (license license:bsd-2)))
16105
16106 (define-public python-annoy
16107 (package
16108 (name "python-annoy")
16109 (version "1.15.1")
16110 (source
16111 (origin
16112 (method url-fetch)
16113 (uri (pypi-uri "annoy" version))
16114 (sha256
16115 (base32
16116 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16117 (build-system python-build-system)
16118 (native-inputs
16119 `(("python-nose" ,python-nose)))
16120 (home-page "https://github.com/spotify/annoy/")
16121 (synopsis "Approximate nearest neighbors library")
16122 (description
16123 "Annoy is a C++ library with Python bindings to search for points in
16124 space that are close to a given query point. It also creates large read-only
16125 file-based data structures that are @code{mmap}ped into memory so that many
16126 processes may share the same data.")
16127 (license license:asl2.0)))
16128
16129 (define-public python-pylzma
16130 (package
16131 (name "python-pylzma")
16132 (version "0.5.0")
16133 (source
16134 (origin
16135 (method url-fetch)
16136 (uri (pypi-uri "pylzma" version))
16137 (sha256
16138 (base32
16139 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16140 (build-system python-build-system)
16141 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16142 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16143 (description "This package provides Python bindings for the LZMA library
16144 by Igor Pavlov.")
16145 (license license:lgpl2.1+)))
16146
16147 (define-public python2-pylzma
16148 (package-with-python2 python-pylzma))
16149
16150 (define-public python2-zeroconf
16151 (package
16152 (name "python2-zeroconf")
16153
16154 ;; This is the last version that supports Python 2.x.
16155 (version "0.19.1")
16156 (source
16157 (origin
16158 (method url-fetch)
16159 (uri (pypi-uri "zeroconf" version))
16160 (sha256
16161 (base32
16162 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16163 (build-system python-build-system)
16164 (arguments
16165 `(#:python ,python-2
16166 #:phases
16167 (modify-phases %standard-phases
16168 (add-after 'unpack 'patch-requires
16169 (lambda* (#:key inputs #:allow-other-keys)
16170 (substitute* "setup.py"
16171 (("enum-compat")
16172 "enum34"))
16173 #t)))))
16174 (native-inputs
16175 `(("python2-six" ,python2-six)
16176 ("python2-enum32" ,python2-enum34)
16177 ("python2-netifaces" ,python2-netifaces)
16178 ("python2-typing" ,python2-typing)))
16179 (home-page "https://github.com/jstasiak/python-zeroconf")
16180 (synopsis "Pure Python mDNS service discovery")
16181 (description
16182 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16183 compatible).")
16184 (license license:lgpl2.1+)))
16185
16186 (define-public python-bsddb3
16187 (package
16188 (name "python-bsddb3")
16189 (version "6.2.6")
16190 (source
16191 (origin
16192 (method url-fetch)
16193 (uri (pypi-uri "bsddb3" version))
16194 (sha256
16195 (base32
16196 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16197 (build-system python-build-system)
16198 (inputs
16199 `(("bdb" ,bdb)))
16200 (arguments
16201 '(#:phases
16202 (modify-phases %standard-phases
16203 (add-after 'unpack 'configure-locations
16204 (lambda* (#:key inputs #:allow-other-keys)
16205 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16206 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16207 #t))
16208 (replace 'check
16209 (lambda _
16210 (invoke "python3" "test3.py" "-v"))))))
16211 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16212 (synopsis "Python bindings for Oracle Berkeley DB")
16213 (description
16214 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16215 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16216 Transaction objects, and each of these is exposed as a Python type in the
16217 bsddb3.db module. The database objects can use various access methods: btree,
16218 hash, recno, and queue. Complete support of Berkeley DB distributed
16219 transactions. Complete support for Berkeley DB Replication Manager.
16220 Complete support for Berkeley DB Base Replication. Support for RPC.")
16221 (license license:bsd-3)))
16222
16223 (define-public python-dbfread
16224 (package
16225 (name "python-dbfread")
16226 (version "2.0.7")
16227 (source (origin
16228 (method url-fetch)
16229 (uri (pypi-uri "dbfread" version))
16230 (sha256
16231 (base32
16232 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16233 (build-system python-build-system)
16234 (native-inputs
16235 `(("python-pytest" ,python-pytest)))
16236 (home-page "https://dbfread.readthedocs.io")
16237 (synopsis "Read DBF Files with Python")
16238 (description
16239 "This library reads DBF files and returns the data as native Python data
16240 types for further processing. It is primarily intended for batch jobs and
16241 one-off scripts.")
16242 (license license:expat)))
16243
16244 (define-public python-cached-property
16245 (package
16246 (name "python-cached-property")
16247 (version "1.5.1")
16248 (source
16249 (origin
16250 (method url-fetch)
16251 (uri (pypi-uri "cached-property" version))
16252 (sha256
16253 (base32
16254 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16255 (build-system python-build-system)
16256 (arguments
16257 `(#:phases
16258 (modify-phases %standard-phases
16259 ;; https://github.com/pydanny/cached-property/issues/131
16260 ;; recent versions of freezegun break one test
16261 (add-after 'unpack 'disable-broken-test
16262 (lambda _
16263 (substitute* "tests/test_cached_property.py"
16264 (("def test_threads_ttl_expiry\\(self\\)" m)
16265 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16266 " " m)))
16267 #t)))))
16268 (native-inputs
16269 `(("python-freezegun" ,python-freezegun)))
16270 (home-page
16271 "https://github.com/pydanny/cached-property")
16272 (synopsis
16273 "Decorator for caching properties in classes")
16274 (description
16275 "This package provides a decorator which makes caching
16276 time-or-computationally-expensive properties quick and easy and works in Python
16277 2 or 3.")
16278 (license license:bsd-3)))
16279
16280 (define-public python-folium
16281 (package
16282 (name "python-folium")
16283 (version "0.10.0")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "folium" version))
16288 (sha256
16289 (base32
16290 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16291 (build-system python-build-system)
16292 (propagated-inputs
16293 `(("python-branca" ,python-branca)
16294 ("python-jinja2" ,python-jinja2)
16295 ("python-numpy" ,python-numpy)
16296 ("python-requests" ,python-requests)))
16297 (native-inputs
16298 `(("python-pytest" ,python-pytest)))
16299 (home-page "https://github.com/python-visualization/folium")
16300 (synopsis "Make beautiful maps with Leaflet.js & Python")
16301 (description "@code{folium} makes it easy to visualize data that’s been
16302 manipulated in Python on an interactive leaflet map. It enables both the
16303 binding of data to a map for @code{choropleth} visualizations as well as
16304 passing rich vector/raster/HTML visualizations as markers on the map.
16305
16306 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16307 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16308 supports Image, Video, GeoJSON and TopoJSON overlays.")
16309 (license license:expat)))
16310
16311 (define-public jube
16312 (package
16313 ;; This is a command-line tool, so no "python-" prefix.
16314 (name "jube")
16315 (version "2.2.2")
16316 (source (origin
16317 (method url-fetch)
16318 (uri (string-append
16319 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16320 version))
16321 (sha256
16322 (base32
16323 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16324 (file-name (string-append "jube-" version ".tar.gz"))))
16325 (build-system python-build-system)
16326 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16327 (synopsis "Benchmarking environment")
16328 (description
16329 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16330 benchmarked application, benchmark data is stored in a format that allows JUBE
16331 to deduct the desired information. This data can be parsed by automatic pre-
16332 and post-processing scripts that draw information and store it more densely
16333 for manual interpretation.")
16334 (license license:gpl3+)))
16335
16336 (define-public python-pyroutelib3
16337 (package
16338 (name "python-pyroutelib3")
16339 (version "1.3.post1")
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "pyroutelib3" version))
16344 (sha256
16345 (base32
16346 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16347 (build-system python-build-system)
16348 (propagated-inputs
16349 `(("python-dateutil" ,python-dateutil)))
16350 (home-page "https://github.com/MKuranowski/pyroutelib3")
16351 (synopsis "Library for simple routing on OSM data")
16352 (description "Library for simple routing on OSM data")
16353 (license license:gpl3+)))
16354
16355 (define-public python-elementpath
16356 (package
16357 (name "python-elementpath")
16358 (version "1.2.0")
16359 (source
16360 (origin
16361 (method url-fetch)
16362 (uri (pypi-uri "elementpath" version))
16363 (sha256
16364 (base32
16365 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16366 (build-system python-build-system)
16367 (home-page
16368 "https://github.com/sissaschool/elementpath")
16369 (synopsis
16370 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16371 (description
16372 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16373 for Python's ElementTree XML data structures, both for the standard
16374 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16375
16376 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16377 because lxml.etree already has it's own implementation of XPath 1.0.")
16378 (license license:expat)))
16379
16380 (define-public python-bibtexparser
16381 (package
16382 (name "python-bibtexparser")
16383 (version "1.1.0")
16384 (source
16385 (origin
16386 (method url-fetch)
16387 (uri (pypi-uri "bibtexparser" version))
16388 (sha256
16389 (base32
16390 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16391 (build-system python-build-system)
16392 (propagated-inputs
16393 `(("python-pyparsing" ,python-pyparsing)))
16394 (native-inputs
16395 `(("python-future" ,python-future)))
16396 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16397 (synopsis "Python library to parse BibTeX files")
16398 (description "BibtexParser is a Python library to parse BibTeX files.")
16399 (license (list license:bsd-3 license:lgpl3))))
16400
16401 (define-public python-distro
16402 (package
16403 (name "python-distro")
16404 (version "1.4.0")
16405 (source
16406 (origin
16407 (method url-fetch)
16408 (uri (pypi-uri "distro" version))
16409 (sha256
16410 (base32
16411 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16412 (build-system python-build-system)
16413 (native-inputs
16414 `(("python-pytest" ,python-pytest)))
16415 (home-page "https://github.com/nir0s/distro")
16416 (synopsis
16417 "OS platform information API")
16418 (description
16419 "@code{distro} provides information about the OS distribution it runs on,
16420 such as a reliable machine-readable ID, or version information.
16421
16422 It is the recommended replacement for Python's original
16423 `platform.linux_distribution` function (which will be removed in Python 3.8).
16424 @code{distro} also provides a command-line interface to output the platform
16425 information in various formats.")
16426 (license license:asl2.0)))