Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;;
69 ;;; This file is part of GNU Guix.
70 ;;;
71 ;;; GNU Guix is free software; you can redistribute it and/or modify it
72 ;;; under the terms of the GNU General Public License as published by
73 ;;; the Free Software Foundation; either version 3 of the License, or (at
74 ;;; your option) any later version.
75 ;;;
76 ;;; GNU Guix is distributed in the hope that it will be useful, but
77 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 ;;; GNU General Public License for more details.
80 ;;;
81 ;;; You should have received a copy of the GNU General Public License
82 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
83
84 (define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages dbm)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
117 #:use-module (gnu packages monitoring)
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-check)
127 #:use-module (gnu packages python-compression)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sphinx)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
151 #:use-module (gnu packages serialization)
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
155 #:use-module (guix hg-download)
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
163
164 (define-public python-psutil
165 (package
166 (name "python-psutil")
167 (version "5.6.2")
168 (source
169 (origin
170 (method url-fetch)
171 (uri (pypi-uri "psutil" version))
172 (sha256
173 (base32
174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
175 (build-system python-build-system)
176 (arguments
177 ;; FIXME: some tests does not return and times out.
178 '(#:tests? #f))
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
181 (description
182 "psutil (Python system and process utilities) is a library for retrieving
183 information on running processes and system utilization (CPU, memory, disks,
184 network) in Python. It is useful mainly for system monitoring, profiling and
185 limiting process resources and management of running processes. It implements
186 many functionalities offered by command line tools such as: ps, top, lsof,
187 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188 pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
191
192 (define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
194 (package
195 (inherit base)
196 (propagated-inputs
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
199
200 (define-public python-shapely
201 (package
202 (name "python-shapely")
203 (version "1.6.4.post2")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (pypi-uri "Shapely" version))
208 (sha256
209 (base32
210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
211 (build-system python-build-system)
212 (native-inputs
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
217 (inputs
218 `(("geos" ,geos)))
219 (propagated-inputs
220 `(("python-numpy" ,python-numpy)))
221 (arguments
222 `(#:phases
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
236 #t)))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240 planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
242
243 (define-public python-shortuuid
244 (package
245 (name "python-shortuuid")
246 (version "0.5.0")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (pypi-uri "shortuuid" version))
251 (sha256
252 (base32
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
255 (native-inputs
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
259 (description
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262 module and then similar looking characters are removed.")
263 (license license:bsd-3)))
264
265 (define-public python-logwrap
266 (package
267 (name "python-logwrap")
268 (version "3.2.1")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (pypi-uri "logwrap" version ".zip"))
273 (sha256
274 (base32
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
277 (propagated-inputs
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
280 (native-inputs
281 `(("unzip" ,unzip)
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289 and function call return values in a human-readable way.")
290 (license license:asl2.0)))
291
292 (define-public python2-shapely
293 (package-with-python2 python-shapely))
294
295 (define-public python-clyent
296 (package
297 (name "python-clyent")
298 (version "1.2.1")
299 (source
300 (origin
301 (method url-fetch)
302 (uri (pypi-uri "clyent" version))
303 (sha256
304 (base32
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
307 (native-inputs
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
314
315 (define-public python2-clyent
316 (package-with-python2 python-clyent))
317
318 (define-public python-babel
319 (package
320 (name "python-babel")
321 (version "2.7.0")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "Babel" version))
326 (sha256
327 (base32
328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
329 (build-system python-build-system)
330 (native-inputs
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
333 (propagated-inputs
334 `(("python-pytz" ,python-pytz)))
335 (arguments
336 `(#:phases (modify-phases %standard-phases
337 (replace 'check
338 (lambda _
339 (invoke "pytest" "-vv" "-k"
340 (string-append
341 ;; XXX: These tests fail when using Pytest 4.x and
342 ;; Babel 2.6.0. Try removing this for later versions.
343 "not test_no_inherit_metazone_marker_never_in_output"
344 " and not test_smoke_dates"
345 " and not test_smoke_numbers")))))))
346 (home-page "http://babel.pocoo.org/")
347 (synopsis
348 "Tools for internationalizing Python applications")
349 (description
350 "Babel is composed of two major parts:
351 - tools to build and work with gettext message catalogs
352 - a Python interface to the CLDR (Common Locale Data Repository), providing
353 access to various locale display names, localized number and date formatting,
354 etc. ")
355 (license license:bsd-3)))
356
357 (define-public python2-babel
358 (package-with-python2 python-babel))
359
360 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
361 (define-public python2-babel-2.6
362 (package
363 (inherit python2-babel)
364 (version "2.6.0")
365 (source (origin
366 (method url-fetch)
367 (uri (pypi-uri "Babel" version))
368 (sha256
369 (base32
370 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
371
372 (define-public python2-backport-ssl-match-hostname
373 (package
374 (name "python2-backport-ssl-match-hostname")
375 (version "3.5.0.1")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (pypi-uri "backports.ssl_match_hostname" version))
380 (sha256
381 (base32
382 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
383 (build-system python-build-system)
384 (arguments
385 `(#:python ,python-2
386 #:tests? #f)) ; no test target
387 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
388 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
389 (description
390 "This backport brings the ssl.match_hostname() function to users of
391 earlier versions of Python. The function checks the hostname in the
392 certificate returned by the server to which a connection has been established,
393 and verifies that it matches the intended target hostname.")
394 (license license:psfl)))
395
396 (define-public python-hdf4
397 (package
398 (name "python-hdf4")
399 (version "0.9")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (pypi-uri name version))
404 (sha256
405 (base32
406 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
407 (build-system python-build-system)
408 (native-inputs `(("nose" ,python-nose)))
409 (propagated-inputs `(("numpy" ,python-numpy)))
410 (inputs
411 `(("hdf4" ,hdf4)
412 ("libjpeg" ,libjpeg)
413 ("zlib" ,zlib)))
414 (arguments
415 `(#:phases
416 (modify-phases %standard-phases
417 (replace 'check
418 (lambda _
419 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
420 ;; on to import numpy. Somehow this works on their CI system.
421 ;; Let's just manage PYTHONPATH here instead.
422 (substitute* "runexamples.sh"
423 (("export PYTHONPATH=.*") ""))
424 (setenv "PYTHONPATH"
425 (string-append (getcwd) ":"
426 (getenv "PYTHONPATH")))
427 (invoke "./runexamples.sh")
428 (invoke "nosetests" "-v"))))))
429 (home-page "https://github.com/fhs/python-hdf4")
430 (synopsis "Python interface to the NCSA HDF4 library")
431 (description
432 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
433 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
434 NetCDF files can also be read and modified. Python-HDF4 is a fork of
435 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
436 (license license:expat)))
437
438 (define-public python2-hdf4
439 (package-with-python2 python-hdf4))
440
441 (define-public python-h5py
442 (package
443 (name "python-h5py")
444 (version "2.8.0")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (pypi-uri "h5py" version))
449 (sha256
450 (base32
451 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
452 (build-system python-build-system)
453 (arguments
454 `(#:tests? #f ; no test target
455 #:phases
456 (modify-phases %standard-phases
457 (add-after 'unpack 'fix-hdf5-paths
458 (lambda* (#:key inputs #:allow-other-keys)
459 (let ((prefix (assoc-ref inputs "hdf5")))
460 (substitute* "setup_build.py"
461 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
462 (string-append "['" prefix "/lib" "']"))
463 (("'/opt/local/include', '/usr/local/include'")
464 (string-append "'" prefix "/include" "'")))
465 (substitute* "setup_configure.py"
466 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
467 (string-append "['" prefix "/lib" "']")))
468 #t))))))
469 (propagated-inputs
470 `(("python-six" ,python-six)
471 ("python-numpy" ,python-numpy)))
472 (inputs
473 `(("hdf5" ,hdf5)))
474 (native-inputs
475 `(("python-cython" ,python-cython)
476 ("python-pkgconfig" ,python-pkgconfig)))
477 (home-page "http://www.h5py.org/")
478 (synopsis "Read and write HDF5 files from Python")
479 (description
480 "The h5py package provides both a high- and low-level interface to the
481 HDF5 library from Python. The low-level interface is intended to be a
482 complete wrapping of the HDF5 API, while the high-level component supports
483 access to HDF5 files, datasets and groups using established Python and NumPy
484 concepts.")
485 (license license:bsd-3)))
486
487 (define-public python2-h5py
488 (package-with-python2 python-h5py))
489
490 (define-public python-sh
491 (package
492 (name "python-sh")
493 (version "1.12.14")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (pypi-uri "sh" version))
498 (sha256
499 (base32
500 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
501 (build-system python-build-system)
502 (arguments
503 '(#:phases
504 (modify-phases %standard-phases
505 (replace 'check
506 (lambda _
507 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
508 (setenv "HOME" "/tmp")
509 (invoke "python" "sh.py" "test"))))))
510 (native-inputs
511 `(("python-coverage" ,python-coverage)))
512 (home-page "https://github.com/amoffat/sh")
513 (synopsis "Python subprocess replacement")
514 (description "This package provides a replacement for Python's
515 @code{subprocess} feature.")
516 (license license:expat)))
517
518 (define-public python2-sh
519 (package-with-python2 python-sh))
520
521 (define-public python-cftime
522 (package
523 (name "python-cftime")
524 (version "1.0.3.4")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "cftime" version))
529 (sha256
530 (base32
531 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
532 (build-system python-build-system)
533 (propagated-inputs
534 `(("python-numpy" ,python-numpy)))
535 (native-inputs
536 `(("python-coveralls" ,python-coveralls)
537 ("python-cython" ,python-cython)
538 ("python-pytest-cov" ,python-pytest-cov)))
539 (home-page "https://github.com/Unidata/cftime")
540 (synopsis "Library for time handling")
541 (description
542 "This package provides time-handling functionality that used to be part
543 of the netcdf4 package before.")
544 ;; This package claims to include code under the GPLv3 but is released
545 ;; under ISC.
546 (license (list license:isc license:gpl3+))))
547
548 (define-public python-netcdf4
549 (package
550 (name "python-netcdf4")
551 (version "1.4.2")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "netCDF4" version))
556 (sha256
557 (base32
558 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
559 (build-system python-build-system)
560 (arguments
561 '(#:phases
562 (modify-phases %standard-phases
563 (add-after 'unpack 'configure-locations
564 (lambda* (#:key inputs #:allow-other-keys)
565 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
566 #t)))))
567 (native-inputs
568 `(("python-cython" ,python-cython)))
569 (propagated-inputs
570 `(("python-numpy" ,python-numpy)
571 ("python-cftime" ,python-cftime)))
572 (inputs
573 `(("netcdf" ,netcdf)
574 ("hdf4" ,hdf4)
575 ("hdf5" ,hdf5)))
576 (home-page "https://github.com/Unidata/netcdf4-python")
577 (synopsis "Python/numpy interface to the netCDF library")
578 (description "Netcdf4-python is a Python interface to the netCDF C
579 library. netCDF version 4 has many features not found in earlier
580 versions of the library and is implemented on top of HDF5. This module
581 can read and write files in both the new netCDF 4 and the old netCDF 3
582 format, and can create files that are readable by HDF5 clients. The
583 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
584 to users of that module.")
585 ;; The software is mainly ISC, but includes some files covered
586 ;; by the Expat license.
587 (license (list license:isc license:expat))))
588
589 (define-public python2-netcdf4
590 (package-with-python2 python-netcdf4))
591
592 (define-public python-lockfile
593 (package
594 (name "python-lockfile")
595 (version "0.12.2")
596 (source
597 (origin
598 (method url-fetch)
599 (uri (pypi-uri "lockfile" version))
600 (sha256
601 (base32
602 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
603 (build-system python-build-system)
604 (arguments '(#:test-target "check"))
605 (native-inputs
606 `(("python-pbr" ,python-pbr)))
607 (home-page "https://launchpad.net/pylockfile")
608 (synopsis "Platform-independent file locking module")
609 (description
610 "The lockfile package exports a LockFile class which provides a simple
611 API for locking files.")
612 (license license:expat)))
613
614 (define-public python2-lockfile
615 (package-with-python2 python-lockfile))
616
617 (define-public python-semantic-version
618 (package
619 (name "python-semantic-version")
620 (version "2.6.0")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "semantic_version" version))
625 (sha256
626 (base32
627 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
628 (build-system python-build-system)
629 (arguments
630 `(#:tests? #f)) ; PyPI tarball lacks tests
631 (home-page "https://github.com/rbarrois/python-semanticversion")
632 (synopsis "Semantic versioning module for Python")
633 (description
634 "The @code{semantic_version} class is a small library for handling
635 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
636
637 It can compare versions, generate a new version that represents a bump in one of
638 the version levels, and check whether any given string is a proper semantic
639 version identifier.")
640 (license license:bsd-3)))
641
642 (define-public python2-semantic-version
643 (package-with-python2 python-semantic-version))
644
645 (define-public python-serpent
646 (package
647 (name "python-serpent")
648 (version "1.28")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "serpent" version))
653 (sha256
654 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
655 (build-system python-build-system)
656 (native-inputs
657 `(("python-attrs" ,python-attrs)
658 ("python-pytz" ,python-pytz)))
659 (home-page "https://github.com/irmen/Serpent")
660 (synopsis "Serializer for literal Python expressions")
661 (description
662 "Serpent provides @code{ast.literal_eval()}-compatible object tree
663 serialization. It serializes an object tree into bytes (an utf-8 encoded
664 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
665 to rebuild the original object tree.
666
667 Because only safe literals are encoded, it is safe to send serpent data to
668 other machines, such as over the network.")
669 (license license:expat)))
670
671 (define-public python-setuptools
672 (package
673 (name "python-setuptools")
674 (version "41.0.1")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (pypi-uri "setuptools" version ".zip"))
679 (sha256
680 (base32
681 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
682 (modules '((guix build utils)))
683 (snippet
684 '(begin
685 ;; Remove included binaries which are used to build self-extracting
686 ;; installers for Windows.
687 ;; TODO: Find some way to build them ourself so we can include them.
688 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
689 #t))))
690 (build-system python-build-system)
691 ;; FIXME: Tests require pytest, which itself relies on setuptools.
692 ;; One could bootstrap with an internal untested setuptools.
693 (arguments
694 `(#:tests? #f))
695 (home-page "https://pypi.python.org/pypi/setuptools")
696 (synopsis
697 "Library designed to facilitate packaging Python projects")
698 (description
699 "Setuptools is a fully-featured, stable library designed to facilitate
700 packaging Python projects, where packaging includes:
701 Python package and module definitions,
702 distribution package metadata,
703 test hooks,
704 project installation,
705 platform-specific details,
706 Python 3 support.")
707 ;; TODO: setuptools now bundles the following libraries:
708 ;; packaging, pyparsing, six and appdirs. How to unbundle?
709 (license (list license:psfl ; setuptools itself
710 license:expat ; six, appdirs, pyparsing
711 license:asl2.0 ; packaging is dual ASL2/BSD-2
712 license:bsd-2))))
713
714 (define-public python2-setuptools
715 (package-with-python2 python-setuptools))
716
717 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
718 (define-public python-setuptools-for-tensorflow
719 (hidden-package
720 (package
721 (inherit python-setuptools)
722 (version "39.1.0")
723 (source (origin
724 (inherit (package-source python-setuptools))
725 (uri (pypi-uri "setuptools" version ".zip"))
726 (sha256
727 (base32
728 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
729
730 (define-public python-uniseg
731 (package
732 (name "python-uniseg")
733 (version "0.7.1")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (pypi-uri "uniseg" version ".zip"))
738 (sha256
739 (base32
740 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
741 (build-system python-build-system)
742 (arguments
743 '(#:tests? #f)) ; The test suite requires network access.
744 (native-inputs
745 `(("unzip" ,unzip)))
746 (home-page
747 "https://bitbucket.org/emptypage/uniseg-python")
748 (synopsis
749 "Python library to determine Unicode text segmentations")
750 (description
751 "Uniseg is a Python package used to determine Unicode text segmentations.
752 Supported segmentations include:
753 @enumerate
754 @item @dfn{Code point} (any value in the Unicode codespace)
755 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
756 multiple Unicode code points, e.g. \"G\" + acute-accent)
757 @item Word break
758 @item Sentence break
759 @item Line break
760 @end enumerate")
761 (license license:expat)))
762
763 (define-public python2-uniseg
764 (package-with-python2 python-uniseg))
765
766 (define-public python-humanfriendly
767 (package
768 (name "python-humanfriendly")
769 (version "4.4.1")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (pypi-uri "humanfriendly" version))
774 (sha256
775 (base32
776 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
777 (build-system python-build-system)
778 (arguments
779 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
780 #:tests? #f))
781 (propagated-inputs
782 `(("python-monotonic" ,python-monotonic)))
783 (home-page "https://humanfriendly.readthedocs.io")
784 (synopsis "Human-friendly input and output in Python")
785 (description
786 "The functions and classes in @code{humanfriendly} can be used to make
787 text interfaces more user-friendly. It includes tools to parse and format
788 numbers, file sizes, and timespans, timers for long-running operations, menus
789 to allow the user to choose from a list of options, and terminal interaction
790 helpers.")
791 (license license:expat)))
792
793 (define-public python2-humanfriendly
794 (package-with-python2 python-humanfriendly))
795
796 (define-public python-capturer
797 (package
798 (name "python-capturer")
799 (version "2.4")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "capturer" version))
804 (sha256
805 (base32
806 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
807 (build-system python-build-system)
808 (arguments
809 `(#:tests? #f))
810 (propagated-inputs
811 `(("python-humanfriendly" ,python-humanfriendly)))
812 (home-page "https://capturer.readthedocs.io")
813 (synopsis "Capture stdout and stderr streams of the current process")
814 (description
815 "The capturer package makes it easy to capture the stdout and stderr
816 streams of the current process and subprocesses. Output can be relayed
817 to the terminal in real time but is also available to the Python program
818 for additional processing.")
819 (license license:expat)))
820
821 (define-public python2-capturer
822 (package-with-python2 python-capturer))
823
824 (define-public python-case
825 (package
826 (name "python-case")
827 (version "1.5.3")
828 (source
829 (origin
830 (method url-fetch)
831 (uri (pypi-uri "case" version))
832 (sha256
833 (base32
834 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
835 (build-system python-build-system)
836 (propagated-inputs
837 `(("python-mock" ,python-mock)
838 ("python-nose" ,python-nose)
839 ("python-six" ,python-six)
840 ("python-unittest2" ,python-unittest2)))
841 (native-inputs
842 `(("python-coverage" ,python-coverage)))
843 (home-page "https://github.com/celery/case")
844 (synopsis "Unittest utilities and convenience methods")
845 (description
846 "The @code{case} package provides utilities on top of unittest, including
847 some helpful Python 2 compatibility convenience methods.")
848 (license license:bsd-3)))
849
850 (define-public python-verboselogs
851 (package
852 (name "python-verboselogs")
853 (version "1.7")
854 (source
855 (origin
856 (method url-fetch)
857 (uri (pypi-uri "verboselogs" version))
858 (sha256
859 (base32
860 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
861 (build-system python-build-system)
862 (native-inputs
863 `(("python-mock" ,python-mock)
864 ("python-astroid" ,python-astroid)
865 ("python-pylint" ,python-pylint)))
866 (home-page "https://verboselogs.readthedocs.io")
867 (synopsis "Verbose logging level for Python's logging module")
868 (description
869 "The @code{verboselogs} package extends Python's @code{logging} module to
870 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
871 (license license:expat)))
872
873 (define-public python2-verboselogs
874 (package-with-python2 python-verboselogs))
875
876 (define-public python-coloredlogs
877 (package
878 (name "python-coloredlogs")
879 (version "7.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "coloredlogs" version))
884 (sha256
885 (base32
886 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
887 (build-system python-build-system)
888 (arguments
889 `(;Tests require some updated modules
890 #:tests? #f))
891 (propagated-inputs
892 `(("python-capturer" ,python-capturer)))
893 (home-page "https://coloredlogs.readthedocs.io")
894 (synopsis "Colored stream handler for Python's logging module")
895 (description
896 "The @code{coloredlogs} package enables colored terminal output for
897 Python's logging module. The @code{ColoredFormatter} class inherits from
898 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
899 messages in color.")
900 (license license:expat)))
901
902 (define-public python2-coloredlogs
903 (package-with-python2 python-coloredlogs))
904
905 (define-public python-et-xmlfile
906 (package
907 (name "python-et-xmlfile")
908 (version "1.0.1")
909 (source
910 (origin
911 (method url-fetch)
912 (uri (pypi-uri "et_xmlfile" version))
913 (sha256
914 (base32
915 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
916 (build-system python-build-system)
917 (arguments
918 `(#:phases (modify-phases %standard-phases
919 (replace 'check
920 (lambda _
921 (invoke "pytest"))))))
922 (native-inputs
923 `(("python-pytest" ,python-pytest)
924 ("python-lxml" ,python-lxml))) ;used for the tests
925 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
926 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
927 (description "This Python library is based upon the @code{xmlfile} module
928 from @code{lxml}. It aims to provide a low memory, compatible implementation
929 of @code{xmlfile}.")
930 (license license:expat)))
931
932 (define-public python2-et-xmlfile
933 (package-with-python2 python-et-xmlfile))
934
935 (define-public python-openpyxl
936 (package
937 (name "python-openpyxl")
938 (version "2.6.2")
939 (source
940 (origin
941 ;; We use the upstream repository, as the tests are not included in the
942 ;; PyPI releases.
943 (method hg-fetch)
944 (uri (hg-reference
945 (url "https://bitbucket.org/openpyxl/openpyxl")
946 (changeset version)))
947 (file-name (string-append name "-" version "-checkout"))
948 (sha256
949 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
950 (build-system python-build-system)
951 (arguments
952 `(#:phases (modify-phases %standard-phases
953 (replace 'check
954 (lambda _
955 (invoke "pytest"))))))
956 (native-inputs
957 ;; For the test suite.
958 `(("python-lxml" ,python-lxml)
959 ("python-pillow" ,python-pillow)
960 ("python-pytest" ,python-pytest)))
961 (propagated-inputs
962 `(("python-et-xmlfile" ,python-et-xmlfile)
963 ("python-jdcal" ,python-jdcal)))
964 (home-page "https://openpyxl.readthedocs.io")
965 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
966 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
967 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
968 standard.")
969 (license license:expat)))
970
971 (define-public python-eventlet
972 (package
973 (name "python-eventlet")
974 (version "0.20.1")
975 (source
976 (origin
977 (method url-fetch)
978 (uri (pypi-uri "eventlet" version))
979 (sha256
980 (base32
981 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
982 (build-system python-build-system)
983 (propagated-inputs
984 `(("python-greenlet" ,python-greenlet)))
985 (arguments
986 ;; TODO: Requires unpackaged 'enum-compat'.
987 '(#:tests? #f))
988 (home-page "http://eventlet.net")
989 (synopsis "Concurrent networking library for Python")
990 (description
991 "Eventlet is a concurrent networking library for Python that
992 allows you to change how you run your code, not how you write it.
993 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
994 Coroutines ensure that the developer uses a blocking style of programming
995 that is similar to threading, but provide the benefits of non-blocking I/O.
996 The event dispatch is implicit, which means you can easily use @code{Eventlet}
997 from the Python interpreter, or as a small part of a larger application.")
998 (license license:expat)))
999
1000 (define-public python2-eventlet
1001 (let ((base (package-with-python2
1002 (strip-python2-variant python-eventlet))))
1003 (package (inherit base)
1004 (propagated-inputs
1005 `(("python2-enum34" ,python2-enum34)
1006 ,@(package-propagated-inputs base))))))
1007
1008 (define-public python-six
1009 (package
1010 (name "python-six")
1011 (version "1.12.0")
1012 (source
1013 (origin
1014 (method url-fetch)
1015 (uri (pypi-uri "six" version))
1016 (sha256
1017 (base32
1018 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1019 (build-system python-build-system)
1020 (arguments
1021 `(#:phases
1022 (modify-phases %standard-phases
1023 (replace 'check
1024 (lambda _
1025 (invoke "py.test" "-v"))))))
1026 (native-inputs
1027 `(("python-py" ,python-py)
1028 ("python-pytest" ,python-pytest-bootstrap)))
1029 (home-page "https://pypi.python.org/pypi/six/")
1030 (synopsis "Python 2 and 3 compatibility utilities")
1031 (description
1032 "Six is a Python 2 and 3 compatibility library. It provides utility
1033 functions for smoothing over the differences between the Python versions with
1034 the goal of writing Python code that is compatible on both Python versions.
1035 Six supports every Python version since 2.5. It is contained in only one
1036 Python file, so it can be easily copied into your project.")
1037 (license license:x11)))
1038
1039 (define-public python2-six
1040 (package-with-python2 python-six))
1041
1042 (define-public python-six-bootstrap
1043 (package
1044 (inherit python-six)
1045 (name "python-six-bootstrap")
1046 (native-inputs `())
1047 (arguments `(#:tests? #f))))
1048
1049 (define-public python2-six-bootstrap
1050 (package-with-python2 python-six-bootstrap))
1051
1052 (define-public python-schedule
1053 (package
1054 (name "python-schedule")
1055 (version "0.4.3")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "schedule" version))
1060 (sha256
1061 (base32
1062 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1063 (build-system python-build-system)
1064 (native-inputs
1065 `(("python-pytest" ,python-pytest)
1066 ("python-mock" ,python-mock)))
1067 (home-page "https://github.com/dbader/schedule")
1068 (synopsis "Schedule periodic function calls in Python")
1069 (description
1070 "Schedule is an in-process scheduler for periodic jobs that uses the
1071 builder pattern for configuration. Schedule lets you run Python functions (or
1072 any other callable) periodically at pre-determined intervals using a simple,
1073 human-friendly syntax.")
1074 (license license:expat)))
1075
1076 (define-public python2-schedule
1077 (package-with-python2 python-schedule))
1078
1079 (define-public python-pandas
1080 (package
1081 (name "python-pandas")
1082 (version "0.24.2")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "pandas" version))
1087 (sha256
1088 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1089 (build-system python-build-system)
1090 (arguments
1091 `(#:modules ((guix build utils)
1092 (guix build python-build-system)
1093 (ice-9 ftw)
1094 (srfi srfi-26))
1095 #:phases (modify-phases %standard-phases
1096 (add-after 'unpack 'patch-which
1097 (lambda* (#:key inputs #:allow-other-keys)
1098 (let ((which (assoc-ref inputs "which")))
1099 (substitute* "pandas/io/clipboard/__init__.py"
1100 (("^CHECK_CMD = .*")
1101 (string-append "CHECK_CMD = \"" which "\"\n"))))
1102 #t))
1103 (replace 'check
1104 (lambda _
1105 (let ((build-directory
1106 (string-append
1107 (getcwd) "/build/"
1108 (car (scandir "build"
1109 (cut string-prefix? "lib." <>))))))
1110 ;; Disable the "strict data files" option which causes
1111 ;; the build to error out if required data files are
1112 ;; not available (as is the case with PyPI archives).
1113 (substitute* "setup.cfg"
1114 (("addopts = --strict-data-files") "addopts = "))
1115 (with-directory-excursion build-directory
1116 ;; Delete tests that require "moto" which is not yet
1117 ;; in Guix.
1118 (for-each delete-file
1119 '("pandas/tests/io/conftest.py"
1120 "pandas/tests/io/json/test_compression.py"
1121 "pandas/tests/io/parser/test_network.py"
1122 "pandas/tests/io/test_parquet.py"))
1123 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1124 "--skip-network" "-k"
1125 ;; XXX: Due to the deleted tests above.
1126 "not test_read_s3_jsonl"))))))))
1127 (propagated-inputs
1128 `(("python-numpy" ,python-numpy)
1129 ("python-openpyxl" ,python-openpyxl)
1130 ("python-pytz" ,python-pytz)
1131 ("python-dateutil" ,python-dateutil)
1132 ("python-xlrd" ,python-xlrd)))
1133 (inputs
1134 `(("which" ,which)))
1135 (native-inputs
1136 `(("python-cython" ,python-cython)
1137 ("python-beautifulsoup4" ,python-beautifulsoup4)
1138 ("python-lxml" ,python-lxml)
1139 ("python-html5lib" ,python-html5lib)
1140 ("python-nose" ,python-nose)
1141 ("python-pytest" ,python-pytest)
1142 ("python-pytest-mock" ,python-pytest-mock)))
1143 (home-page "https://pandas.pydata.org")
1144 (synopsis "Data structures for data analysis, time series, and statistics")
1145 (description
1146 "Pandas is a Python package providing fast, flexible, and expressive data
1147 structures designed to make working with structured (tabular,
1148 multidimensional, potentially heterogeneous) and time series data both easy
1149 and intuitive. It aims to be the fundamental high-level building block for
1150 doing practical, real world data analysis in Python.")
1151 (license license:bsd-3)))
1152
1153 (define-public python2-pandas
1154 (package-with-python2 python-pandas))
1155
1156 (define-public python2-mechanize
1157 (package
1158 (name "python2-mechanize")
1159 (version "0.2.5")
1160 (source
1161 (origin
1162 (method url-fetch)
1163 (uri (pypi-uri "mechanize" version))
1164 (sha256
1165 (base32
1166 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:python ,python-2 ; apparently incompatible with Python 3
1170 #:tests? #f))
1171 ;; test fails with message
1172 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1173 ;; (python-3.3.2) or
1174 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1175 ;; (python-2.7.5).
1176 ;; The source code is from March 2011 and probably not up-to-date
1177 ;; with respect to python unit tests.
1178 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1179 (synopsis
1180 "Stateful programmatic web browsing in Python")
1181 (description
1182 "Mechanize implements stateful programmatic web browsing in Python,
1183 after Andy Lester’s Perl module WWW::Mechanize.")
1184 (license (license:non-copyleft
1185 "file://COPYING"
1186 "See COPYING in the distribution."))))
1187
1188
1189 (define-public python-simplejson
1190 (package
1191 (name "python-simplejson")
1192 (version "3.14.0")
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri (pypi-uri "simplejson" version))
1197 (sha256
1198 (base32
1199 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1200 (build-system python-build-system)
1201 (home-page "http://simplejson.readthedocs.org/en/latest/")
1202 (synopsis
1203 "Json library for Python")
1204 (description
1205 "JSON (JavaScript Object Notation) is a subset of JavaScript
1206 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1207 format.
1208
1209 Simplejson exposes an API familiar to users of the standard library marshal
1210 and pickle modules. It is the externally maintained version of the json
1211 library contained in Python 2.6, but maintains compatibility with Python 2.5
1212 and (currently) has significant performance advantages, even without using
1213 the optional C extension for speedups. Simplejson is also supported on
1214 Python 3.3+.")
1215 (license license:x11)))
1216
1217 (define-public python2-simplejson
1218 (package-with-python2 python-simplejson))
1219
1220
1221 (define-public python-pyicu
1222 (package
1223 (name "python-pyicu")
1224 (version "2.3.1")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "PyICU" version))
1229 (sha256
1230 (base32
1231 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1232 (build-system python-build-system)
1233 (inputs
1234 `(("icu4c" ,icu4c)))
1235 (native-inputs
1236 `(("python-pytest" ,python-pytest)
1237 ("python-six" ,python-six)))
1238 (home-page "https://github.com/ovalhub/pyicu")
1239 (synopsis "Python extension wrapping the ICU C++ API")
1240 (description
1241 "PyICU is a python extension wrapping the ICU C++ API.")
1242 (properties `((python2-variant . ,(delay python2-pyicu))))
1243 (license license:x11)))
1244
1245 (define-public python2-pyicu
1246 (let ((base (package-with-python2
1247 (strip-python2-variant python-pyicu))))
1248 (package
1249 (inherit base)
1250 (arguments
1251 `(,@(package-arguments base)
1252 #:phases
1253 (modify-phases %standard-phases
1254 (add-before 'check 'delete-failing-test
1255 (λ _
1256 ;; XXX: This fails due to Unicode issues unique to Python 2,
1257 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1258 (delete-file "test/test_Script.py")
1259 #t))))))))
1260
1261 (define-public python2-dogtail
1262 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1263 ;; spaces in indentation" with Python 3.
1264 (package
1265 (name "python2-dogtail")
1266 (version "0.9.9")
1267 (source (origin
1268 (method url-fetch)
1269 (uri (pypi-uri "dogtail" version))
1270 (sha256
1271 (base32
1272 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1273 (build-system python-build-system)
1274 (arguments `(#:python ,python-2
1275 #:tests? #f)) ; invalid command "test"
1276 ;; Currently no offical homepage.
1277 (home-page "https://pypi.python.org/pypi/dogtail/")
1278 (synopsis "GUI test tool and automation framework written in Python")
1279 (description
1280 "Dogtail is a GUI test tool and automation framework written in Python.
1281 It uses Accessibility (a11y) technologies to communicate with desktop
1282 applications. dogtail scripts are written in Python and executed like any
1283 other Python program.")
1284 (license license:gpl2+)))
1285
1286 (define-public python-empy
1287 (package
1288 (name "python-empy")
1289 (version "3.3.3")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1293 version ".tar.gz"))
1294 (sha256
1295 (base32
1296 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1297 (build-system python-build-system)
1298 (arguments
1299 `(#:tests? #f)) ; python2 only
1300 (home-page "http://www.alcyone.com/software/empy/")
1301 (synopsis "Templating system for Python")
1302 (description
1303 "EmPy is a system for embedding Python expressions and statements in
1304 template text; it takes an EmPy source file, processes it, and produces
1305 output. This is accomplished via expansions, which are special signals to the
1306 EmPy system and are set off by a special prefix (by default the at sign, @@).
1307 EmPy can expand arbitrary Python expressions and statements in this way, as
1308 well as a variety of special forms. Textual data not explicitly delimited in
1309 this way is sent unaffected to the output, allowing Python to be used in
1310 effect as a markup language. Also supported are callbacks via hooks,
1311 recording and playback via diversions, and dynamic, chainable filters. The
1312 system is highly configurable via command line options and embedded
1313 commands.")
1314 (license license:lgpl2.1+)))
1315
1316 (define-public python2-empy
1317 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1318 (package
1319 (inherit base)
1320 (arguments `(,@(package-arguments base)
1321 #:tests? #t)))))
1322
1323 (define-public python2-element-tree
1324 (package
1325 (name "python2-element-tree")
1326 (version "1.2.6")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (string-append
1330 "http://effbot.org/media/downloads/elementtree-"
1331 version "-20050316.tar.gz"))
1332 (sha256
1333 (base32
1334 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1335 (build-system python-build-system)
1336 (arguments
1337 `(#:python ,python-2 ; seems to be part of Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (synopsis "Toolkit for XML processing in Python")
1340 (description
1341 "ElementTree is a Python library supporting lightweight XML processing.")
1342 (home-page "http://effbot.org/zone/element-index.htm")
1343 (license (license:x11-style
1344 "http://docs.python.org/2/license.html"
1345 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1346
1347 (define-public python2-pybugz
1348 (package
1349 (name "python2-pybugz")
1350 (version "0.6.11")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append
1354 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1355 version ".tar.gz"))
1356 (sha256
1357 (base32
1358 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1359 (patches (search-patches "pybugz-stty.patch"
1360 "pybugz-encode-error.patch"))))
1361 (build-system python-build-system)
1362 (arguments
1363 `(#:python ,python-2 ; SyntaxError with Python 3
1364 #:tests? #f)) ; no 'test' sub-command
1365 (propagated-inputs
1366 `(("element-tree" ,python2-element-tree)))
1367 (synopsis "Python and command-line interface to Bugzilla")
1368 (description
1369 "PyBugz is a Python library and command-line tool to query the Bugzilla
1370 bug tracking system. It is meant as an aid to speed up interaction with the
1371 bug tracker.")
1372 (home-page "http://www.liquidx.net/pybugz/")
1373 (license license:gpl2)))
1374
1375 (define-public python2-enum
1376 (package
1377 (name "python2-enum")
1378 (version "0.4.6")
1379 (source (origin
1380 (method url-fetch)
1381 (uri (pypi-uri "enum" version))
1382 (sha256
1383 (base32
1384 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1385 (build-system python-build-system)
1386 (arguments
1387 `(#:python ,python-2))
1388 (home-page "http://pypi.python.org/pypi/enum/")
1389 (synopsis "Robust enumerated type support in Python")
1390 (description
1391 "This provides a module for robust enumerations in Python. It has
1392 been superseded by the Python standard library and is provided only for
1393 compatibility.")
1394 ;; Choice of either license.
1395 (license (list license:gpl3+ license:psfl))))
1396
1397 (define-public python-enum34
1398 (package
1399 (name "python-enum34")
1400 (version "1.1.6")
1401 (source
1402 (origin
1403 (method url-fetch)
1404 (uri (pypi-uri "enum34" version))
1405 (sha256
1406 (base32
1407 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1408 (build-system python-build-system)
1409 (home-page "https://pypi.python.org/pypi/enum34")
1410 (synopsis "Backported Python 3.4 Enum")
1411 (description
1412 "Enum34 is the new Python stdlib enum module available in Python 3.4
1413 backported for previous versions of Python from 2.4 to 3.3.")
1414 (license license:bsd-3)))
1415
1416 (define-public python2-enum34
1417 (package-with-python2 python-enum34))
1418
1419 (define-public python-parse-type
1420 (package
1421 (name "python-parse-type")
1422 (version "0.4.2")
1423 (source
1424 (origin
1425 (method url-fetch)
1426 (uri (pypi-uri "parse_type" version))
1427 (sha256
1428 (base32
1429 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1430 (build-system python-build-system)
1431 (propagated-inputs
1432 `(("python-six" ,python-six)
1433 ("python-parse" ,python-parse)))
1434 (native-inputs
1435 `(("python-pytest" ,python-pytest)
1436 ("python-pytest-runner" ,python-pytest-runner)))
1437 (home-page "https://github.com/jenisys/parse_type")
1438 (synopsis "Extended parse module")
1439 (description
1440 "Parse_type extends the python parse module.")
1441 (properties
1442 `((python2-variant . ,(delay python2-parse-type))))
1443 (license license:bsd-3)))
1444
1445 (define-public python2-parse-type
1446 (let ((base (package-with-python2
1447 (strip-python2-variant python-parse-type))))
1448 (package (inherit base)
1449 (propagated-inputs
1450 `(("python2-enum34" ,python2-enum34)
1451 ,@(package-propagated-inputs base))))))
1452
1453 (define-public python-parse
1454 (package
1455 (name "python-parse")
1456 (version "1.8.4")
1457 (source
1458 (origin
1459 (method url-fetch)
1460 (uri (pypi-uri "parse" version))
1461 (sha256
1462 (base32
1463 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:phases
1467 (modify-phases %standard-phases
1468 (replace 'check
1469 (lambda _ (invoke "python" "test_parse.py"))))))
1470 (home-page "https://github.com/r1chardj0n3s/parse")
1471 (synopsis "Parse strings")
1472 (description
1473 "Parse strings using a specification based on the Python @code{format()}
1474 syntax.")
1475 (license license:x11)))
1476
1477 (define-public python-polib
1478 (package
1479 (name "python-polib")
1480 (version "1.0.8")
1481 (source (origin
1482 (method url-fetch)
1483 (uri (pypi-uri "polib" version))
1484 (sha256
1485 (base32
1486 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1487 (build-system python-build-system)
1488 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1489 (synopsis "Manipulate, create and modify gettext files")
1490 (description "Polib can manipulate any gettext format (po, pot and mo)
1491 files. It can be used to create po files from scratch or to modify
1492 existing ones.")
1493 (license license:expat)))
1494
1495 (define-public python2-polib
1496 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1497 (package
1498 (inherit base)
1499 (arguments `(,@(package-arguments base)
1500 ;; Tests don't work with python2.
1501 #:tests? #f)))))
1502
1503 (define-public scons
1504 (package
1505 (name "scons")
1506 (version "3.0.4")
1507 (source (origin
1508 (method git-fetch)
1509 (uri (git-reference
1510 (url "https://github.com/SCons/scons.git")
1511 (commit version)))
1512 (file-name (git-file-name name version))
1513 (sha256
1514 (base32
1515 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1516 (build-system python-build-system)
1517 (arguments
1518 `(#:use-setuptools? #f ; still relies on distutils
1519 #:tests? #f ; no 'python setup.py test' command
1520 #:phases
1521 (modify-phases %standard-phases
1522 (add-before 'build 'bootstrap
1523 (lambda _
1524 (substitute* "src/engine/SCons/compat/__init__.py"
1525 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1526 "sys.modules[new] = __import__(old)"))
1527 (substitute* "src/engine/SCons/Platform/__init__.py"
1528 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1529 "mod = __import__(full_name)"))
1530 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1531 (chdir "build/scons")
1532 #t)))))
1533 (home-page "http://scons.org/")
1534 (synopsis "Software construction tool written in Python")
1535 (description
1536 "SCons is a software construction tool. Think of SCons as an improved,
1537 cross-platform substitute for the classic Make utility with integrated
1538 functionality similar to autoconf/automake and compiler caches such as ccache.
1539 In short, SCons is an easier, more reliable and faster way to build
1540 software.")
1541 (license license:x11)))
1542
1543 (define-public scons-python2
1544 (package
1545 (inherit (package-with-python2 scons))
1546 (name "scons-python2")))
1547
1548 (define-public python-extras
1549 (package
1550 (name "python-extras")
1551 (version "1.0.0")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "extras" version))
1556 (sha256
1557 (base32
1558 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1559 (build-system python-build-system)
1560 (arguments
1561 ;; FIXME: Circular dependency on testtools.
1562 '(#:tests? #f))
1563 (home-page "https://github.com/testing-cabal/extras")
1564 (synopsis "Useful extensions to the Python standard library")
1565 (description
1566 "Extras is a set of extensions to the Python standard library.")
1567 (license license:expat)))
1568
1569 (define-public python2-extras
1570 (package-with-python2 python-extras))
1571
1572 (define-public python-mimeparse
1573 (package
1574 (name "python-mimeparse")
1575 (version "1.6.0")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "python-mimeparse" version))
1580 (sha256
1581 (base32
1582 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1583 (build-system python-build-system)
1584 (arguments
1585 '(#:phases
1586 (modify-phases %standard-phases
1587 (replace 'check
1588 (lambda _
1589 (invoke "./mimeparse_test.py"))))))
1590 (home-page
1591 "https://github.com/dbtsai/python-mimeparse")
1592 (synopsis "Python library for parsing MIME types")
1593 (description
1594 "Mimeparse provides basic functions for parsing MIME type names and
1595 matching them against a list of media-ranges.")
1596 (license license:expat)))
1597
1598 (define-public python2-mimeparse
1599 (package-with-python2 python-mimeparse))
1600
1601 (define-public python-miniboa
1602 (package
1603 (name "python-miniboa")
1604 (version "1.0.7")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "miniboa" version))
1609 (sha256
1610 (base32
1611 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1612 (build-system python-build-system)
1613 (home-page "https://github.com/shmup/miniboa")
1614 (synopsis "Simple, single-threaded Telnet server")
1615 (description
1616 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1617 server.")
1618 (license license:asl2.0)))
1619
1620 (define-public python2-miniboa
1621 (package-with-python2 python-miniboa))
1622
1623 (define-public python-pafy
1624 (package
1625 (name "python-pafy")
1626 (version "0.5.3.1")
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri (pypi-uri "pafy" version))
1631 (sha256
1632 (base32
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1635 (arguments
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1637 (propagated-inputs
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1643 (description
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1646
1647 (define-public python2-funcsigs
1648 (package
1649 (name "python2-funcsigs")
1650 (version "1.0.2")
1651 (source (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "funcsigs" version))
1654 (sha256
1655 (base32
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1658 (arguments
1659 `(#:python ,python-2))
1660 (native-inputs
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1664 (description
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1667
1668 (define-public python2-funcsigs-bootstrap
1669 (package
1670 (inherit python2-funcsigs)
1671 (name "python2-funcsigs-bootstrap")
1672 (native-inputs `())
1673 (arguments
1674 `(#:tests? #f
1675 ,@(package-arguments python2-funcsigs)))))
1676
1677 (define-public python-py
1678 (package
1679 (name "python-py")
1680 (version "1.8.0")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (pypi-uri "py" version))
1685 (sha256
1686 (base32
1687 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1688 (build-system python-build-system)
1689 (arguments
1690 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1691 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1692 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1693 ;; Is this module globally installed?"
1694 '(#:tests? #f))
1695 (native-inputs
1696 `(("python-setuptools-scm" ,python-setuptools-scm)))
1697 (home-page "https://github.com/pytest-dev/py")
1698 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1699 (description
1700 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1701 code introspection, and logging.")
1702 (license license:expat)))
1703
1704 (define-public python2-py
1705 (package-with-python2 python-py))
1706
1707 ;; Recent versions of python-fixtures and python-testrepository need
1708 ;; python-pbr for packaging, which itself needs these two packages for
1709 ;; testing.
1710 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1711 ;; same source, just without any test dependencies and with tests disabled.
1712 ;; python-pbr-minmal is then used to package python-fixtures and
1713 ;; python-testrepository.
1714 ;; Strictly speaking we currently could remove the test-requirements from the
1715 ;; normal python-pbr package (and save this package) since test are disabled
1716 ;; there anyway. But this may change in future.
1717 (define-public python-pbr-minimal
1718 (package
1719 (name "python-pbr-minimal")
1720 (version "3.0.1")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "pbr" version))
1725 (sha256
1726 (base32
1727 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1728 (build-system python-build-system)
1729 (arguments
1730 `(#:tests? #f))
1731 (home-page "http://docs.openstack.org/developer/pbr/")
1732 (synopsis "Minimal build of python-pbr used for bootstrapping")
1733 (description
1734 "Used only for bootstrapping python2-pbr, you should not need this.")
1735 (license license:asl2.0)))
1736
1737 (define-public python2-pbr-minimal
1738 (package-with-python2 python-pbr-minimal))
1739
1740 (define-public python-pbr
1741 (package
1742 (inherit python-pbr-minimal)
1743 (name "python-pbr")
1744 (arguments
1745 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1746 (propagated-inputs
1747 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1748 (native-inputs
1749 `(("python-fixtures" ,python-fixtures-bootstrap)
1750 ;; discover, coverage, hacking, subunit
1751 ("python-mock" ,python-mock)
1752 ("python-six" ,python-six)
1753 ("python-sphinx" ,python-sphinx)
1754 ("python-testrepository" ,python-testrepository-bootstrap)
1755 ("python-testresources" ,python-testresources-bootstrap)
1756 ("python-testscenarios" ,python-testscenarios-bootstrap)
1757 ("python-testtools" ,python-testtools-bootstrap)
1758 ("python-virtualenv" ,python-virtualenv)))
1759 (synopsis "Enhance the default behavior of Python’s setuptools")
1760 (description
1761 "Python Build Reasonableness (PBR) is a library that injects some useful
1762 and sensible default behaviors into your setuptools run. It will set
1763 versions, process requirements files and generate AUTHORS and ChangeLog file
1764 from git information.
1765 ")))
1766
1767 (define-public python2-pbr
1768 (package-with-python2 python-pbr))
1769
1770 (define-public python-pyrsistent
1771 (package
1772 (name "python-pyrsistent")
1773 (version "0.14.11")
1774 (home-page "https://github.com/tobgu/pyrsistent")
1775 (source (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "pyrsistent" version))
1778 (sha256
1779 (base32
1780 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1781 (build-system python-build-system)
1782 (native-inputs
1783 `(("python-hypothesis" ,python-hypothesis)
1784 ("python-pytest" ,python-pytest)
1785 ("python-pytest-runner" ,python-pytest-runner)))
1786 (propagated-inputs
1787 `(("python-six" ,python-six)))
1788 (synopsis "Persistent data structures for Python")
1789 (description
1790 "Pyrsistent is a number of persistent collections (by some referred to as
1791 functional data structures). Persistent in the sense that they are immutable.
1792
1793 All methods on a data structure that would normally mutate it instead return a
1794 new copy of the structure containing the requested updates. The original
1795 structure is left untouched.")
1796 (license license:expat)))
1797
1798 (define-public python2-pyrsistent
1799 (package-with-python2 python-pyrsistent))
1800
1801 (define-public python-exif-read
1802 (package
1803 (name "python-exif-read")
1804 (version "2.1.2")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "ExifRead" version))
1808 (sha256
1809 (base32
1810 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1811 (build-system python-build-system)
1812 (arguments `(#:tests? #f)) ; no tests
1813 (home-page "https://github.com/ianare/exif-py")
1814 (synopsis "Python library to extract EXIF data from image files")
1815 (description
1816 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1817 files.")
1818 (license license:bsd-3)))
1819
1820 (define-public python2-exif-read
1821 (package-with-python2 python-exif-read))
1822
1823 (define-public python-pyld
1824 (package
1825 (name "python-pyld")
1826 (version "1.0.3")
1827 (source (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "PyLD" version))
1830 (sha256
1831 (base32
1832 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1833 (build-system python-build-system)
1834 (home-page "https://github.com/digitalbazaar/pyld")
1835 (synopsis "Python implementation of the JSON-LD specification")
1836 (description
1837 "PyLD is an implementation of the JSON-LD specification.")
1838 (license license:bsd-3)))
1839
1840 (define-public python2-pyld
1841 (package-with-python2 python-pyld))
1842
1843 (define-public python-click
1844 (package
1845 (name "python-click")
1846 (version "7.0")
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (pypi-uri "click" version))
1851 (sha256
1852 (base32
1853 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1854 (build-system python-build-system)
1855 (arguments
1856 `(#:phases
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'fix-paths
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1861 "cross-libc" "libc"))))
1862 (substitute* "click/_unicodefun.py"
1863 (("'locale'")
1864 (string-append "'" glibc "/bin/locale'"))))
1865 #t))
1866 (replace 'check
1867 (lambda _
1868 (invoke "python" "-m" "pytest"))))))
1869 (native-inputs
1870 `(("python-pytest" ,python-pytest)))
1871 (home-page "https://palletsprojects.com/p/click/")
1872 (synopsis "Command line library for Python")
1873 (description
1874 "Click is a Python package for creating command line interfaces in a
1875 composable way with as little code as necessary. Its name stands for
1876 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1877 with sensible defaults out of the box.")
1878 (license license:bsd-3)))
1879
1880 (define-public python2-click
1881 (package-with-python2 python-click))
1882
1883 (define-public python-wheel
1884 (package
1885 (name "python-wheel")
1886 (version "0.32.3")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "wheel" version))
1891 (sha256
1892 (base32
1893 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1894 (build-system python-build-system)
1895 (native-inputs
1896 `(("python-jsonschema" ,python-jsonschema)
1897 ("python-pytest-cov" ,python-pytest-cov)))
1898 (home-page "https://bitbucket.org/pypa/wheel/")
1899 (synopsis "Format for built Python packages")
1900 (description
1901 "A wheel is a ZIP-format archive with a specially formatted filename and
1902 the @code{.whl} extension. It is designed to contain all the files for a PEP
1903 376 compatible install in a way that is very close to the on-disk format. Many
1904 packages will be properly installed with only the @code{Unpack} step and the
1905 unpacked archive preserves enough information to @code{Spread} (copy data and
1906 scripts to their final locations) at any later time. Wheel files can be
1907 installed with a newer @code{pip} or with wheel's own command line utility.")
1908 (license license:expat)
1909 (properties `((python2-variant . ,(delay python2-wheel))))))
1910
1911 (define-public python2-wheel
1912 (let ((wheel (package-with-python2
1913 (strip-python2-variant python-wheel))))
1914 (package (inherit wheel)
1915 (native-inputs `(("python2-functools32" ,python2-functools32)
1916 ,@(package-native-inputs wheel))))))
1917
1918 (define-public python-vcversioner
1919 (package
1920 (name "python-vcversioner")
1921 (version "2.16.0.0")
1922 (source
1923 (origin
1924 (method url-fetch)
1925 (uri (pypi-uri "vcversioner" version))
1926 (sha256
1927 (base32
1928 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1929 (build-system python-build-system)
1930 (synopsis "Python library for version number discovery")
1931 (description "Vcversioner is a Python library that inspects tagging
1932 information in a variety of version control systems in order to discover
1933 version numbers.")
1934 (home-page "https://github.com/habnabit/vcversioner")
1935 (license license:isc)))
1936
1937 (define-public python2-vcversioner
1938 (package-with-python2 python-vcversioner))
1939
1940 (define-public python-jdcal
1941 (package
1942 (name "python-jdcal")
1943 (version "1.4")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "jdcal" version))
1948 (sha256
1949 (base32
1950 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1951 (build-system python-build-system)
1952 (arguments
1953 `(#:phases (modify-phases %standard-phases
1954 (replace 'check
1955 (lambda _
1956 (invoke "pytest"))))))
1957 (native-inputs
1958 `(("python-pytest" ,python-pytest)))
1959 (home-page "https://github.com/phn/jdcal")
1960 (synopsis "Functions to convert between Julian dates Gregorian dates")
1961 (description "This Python library provides functions for converting
1962 between Julian dates and Gregorian dates.")
1963 (license license:bsd-2)))
1964
1965 (define-public python2-jdcal
1966 (package-with-python2 python-jdcal))
1967
1968 (define-public python-jsonschema
1969 (package
1970 (name "python-jsonschema")
1971 (version "3.0.1")
1972 (source (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "jsonschema" version))
1975 (sha256
1976 (base32
1977 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1978 (build-system python-build-system)
1979 (arguments
1980 '(#:phases
1981 (modify-phases %standard-phases
1982 (replace 'check
1983 (lambda _
1984 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1985 (invoke "trial" "jsonschema"))))))
1986 (native-inputs
1987 `(("python-setuptools_scm" ,python-setuptools-scm)
1988 ("python-twisted" ,python-twisted)))
1989 (propagated-inputs
1990 `(("python-attrs" ,python-attrs)
1991 ("python-pyrsistent" ,python-pyrsistent)
1992 ("python-six" ,python-six)))
1993 (home-page "https://github.com/Julian/jsonschema")
1994 (synopsis "Implementation of JSON Schema for Python")
1995 (description
1996 "Jsonschema is an implementation of JSON Schema for Python.")
1997 (license license:expat)
1998 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1999
2000 (define-public python2-jsonschema
2001 (let ((jsonschema (package-with-python2
2002 (strip-python2-variant python-jsonschema))))
2003 (package (inherit jsonschema)
2004 (propagated-inputs
2005 `(("python2-functools32" ,python2-functools32)
2006 ,@(package-propagated-inputs jsonschema))))))
2007
2008 ;; This old version is still required by docker-compose as of 1.24.0.
2009 (define-public python-jsonschema-2.6
2010 (package
2011 (name "python-jsonschema")
2012 (version "2.6.0")
2013 (source (origin
2014 (method url-fetch)
2015 (uri (pypi-uri "jsonschema" version))
2016 (sha256
2017 (base32
2018 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2019 (build-system python-build-system)
2020 (arguments
2021 '(#:phases
2022 (modify-phases %standard-phases
2023 (replace 'check (lambda _ (invoke "nosetests"))))))
2024 (native-inputs
2025 `(("python-nose" ,python-nose)
2026 ("python-vcversioner" ,python-vcversioner)))
2027 (home-page "https://github.com/Julian/jsonschema")
2028 (synopsis "Implementation of JSON Schema for Python")
2029 (description
2030 "Jsonschema is an implementation of JSON Schema for Python.")
2031 (license license:expat)
2032 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2033
2034 (define-public python-schema
2035 (package
2036 (name "python-schema")
2037 (version "0.6.6")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "schema" version))
2042 (sha256
2043 (base32
2044 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2045 (build-system python-build-system)
2046 (native-inputs
2047 `(("python-pytest" ,python-pytest)))
2048 (home-page "https://github.com/keleshev/schema")
2049 (synopsis "Simple data validation library")
2050 (description
2051 "@code{python-schema} is a library for validating Python data
2052 structures, such as those obtained from config-files, forms, external
2053 services or command-line parsing, converted from JSON/YAML (or
2054 something else) to Python data-types.")
2055 (license license:psfl)))
2056
2057 (define-public python2-schema
2058 (package-with-python2 python-schema))
2059
2060 (define-public python-schema-0.5
2061 (package (inherit python-schema)
2062 (version "0.5.0")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2070
2071 (define-public python2-schema-0.5
2072 (package-with-python2 python-schema-0.5))
2073
2074 (define-public python-kitchen
2075 (package
2076 (name "python-kitchen")
2077 (version "1.2.5")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "kitchen" version))
2082 (sha256
2083 (base32
2084 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2085 (build-system python-build-system)
2086 (propagated-inputs
2087 `(("python-chardet" ,python-chardet)))
2088 (home-page "https://github.com/fedora-infra/kitchen")
2089 (synopsis "Python API for snippets")
2090 (description "@code{kitchen} module provides a python API for all sorts of
2091 little useful snippets of code that everybody ends up writing for their projects
2092 but never seem big enough to build an independent release. Use kitchen and stop
2093 cutting and pasting that code over and over.")
2094 (license (list license:lgpl2.1+
2095 ;; subprocess.py, test_subprocess.py,
2096 ;; kitchen/pycompat25/defaultdict.py:
2097 license:psfl))))
2098
2099 (define-public python2-kitchen
2100 (package-with-python2 python-kitchen))
2101
2102 (define-public python-unidecode
2103 (package
2104 (name "python-unidecode")
2105 (version "1.1.0")
2106 (source (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "Unidecode" version))
2109 (sha256
2110 (base32
2111 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2112 (build-system python-build-system)
2113 (home-page "https://pypi.python.org/pypi/Unidecode")
2114 (synopsis "ASCII transliterations of Unicode text")
2115 (description
2116 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2117 useful when integrating with legacy code that doesn't support Unicode, or for
2118 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2119 machine identifiers from human-readable Unicode strings that should still be
2120 somewhat intelligible.")
2121 (license license:gpl2+)))
2122
2123 (define-public python2-unidecode
2124 (package-with-python2 python-unidecode))
2125
2126 (define-public python-pyjwt
2127 (package
2128 (name "python-pyjwt")
2129 (version "1.5.3")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "PyJWT" version))
2134 (sha256
2135 (base32
2136 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2137 (modules '((guix build utils)))
2138 (snippet
2139 '(begin
2140 (for-each delete-file-recursively
2141 (find-files "." "\\.pyc$"))
2142 #t))))
2143 (build-system python-build-system)
2144 (native-inputs
2145 `(("python-pytest" ,python-pytest)
2146 ("python-pytest-cov" ,python-pytest-cov)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/progrium/pyjwt")
2149 (synopsis "JSON Web Token implementation in Python")
2150 (description
2151 "PyJWT is a JSON Web Token implementation written in Python.")
2152 (license license:expat)))
2153
2154 (define-public python2-pyjwt
2155 (package-with-python2 python-pyjwt))
2156
2157 (define-public python-pykka
2158 (package
2159 (name "python-pykka")
2160 (version "1.2.1")
2161 (source
2162 (origin
2163 (method url-fetch)
2164 (uri (pypi-uri "Pykka" version))
2165 (sha256
2166 (base32
2167 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-mock" ,python-mock)
2171 ("python-nose" ,python-nose)
2172 ("python-gevent" ,python-gevent)
2173 ("python-eventlet" ,python-eventlet)))
2174 (home-page "https://www.pykka.org/")
2175 (synopsis "Pykka is a Python implementation of the actor model")
2176 (description
2177 "Pykka is a Python implementation of the actor model.
2178 The actor model introduces some simple rules to control the sharing
2179 of state and cooperation between execution units, which makes it
2180 easier to build concurrent applications.")
2181 (license license:asl2.0)))
2182
2183 (define-public python2-pykka
2184 (package-with-python2 python-pykka))
2185
2186 (define-public python-pymsgbox
2187 (package
2188 (name "python-pymsgbox")
2189 (version "1.0.6")
2190 (source
2191 (origin
2192 (method git-fetch)
2193 (uri (git-reference
2194 ;; LICENSE.txt is not present on pypi
2195 (url "https://github.com/asweigart/PyMsgBox")
2196 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2197 (file-name (git-file-name name version))
2198 (sha256
2199 (base32
2200 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2201 (arguments
2202 ;; Circular dependency to run tests:
2203 ;; Tests need pyautogui, which depends on pymsgbox.
2204 '(#:tests? #f))
2205 (build-system python-build-system)
2206 (home-page "https://github.com/asweigart/PyMsgBox")
2207 (synopsis "Python module for JavaScript-like message boxes")
2208 (description
2209 "PyMsgBox is a simple, cross-platform, pure Python module for
2210 JavaScript-like message boxes. Types of dialog boxes include:
2211 @enumerate
2212 @item alert
2213 @item confirm
2214 @item prompt
2215 @item password
2216 @end enumerate
2217 ")
2218 (license license:bsd-3)))
2219
2220 (define-public python-pympler
2221 (package
2222 (name "python-pympler")
2223 (home-page "https://pythonhosted.org/Pympler/")
2224 (version "0.7")
2225 (source (origin
2226 (method url-fetch)
2227 (uri (pypi-uri "Pympler" version))
2228 (sha256
2229 (base32
2230 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2231 (build-system python-build-system)
2232 (arguments
2233 `(#:phases (modify-phases %standard-phases
2234 (delete 'check)
2235 (add-after 'install 'check
2236 (lambda* (#:key inputs outputs #:allow-other-keys)
2237 (add-installed-pythonpath inputs outputs)
2238 (invoke "python" "setup.py" "test"))))))
2239 (synopsis "Measure, monitor and analyze memory behavior")
2240 (description
2241 "Pympler is a development tool to measure, monitor and analyze
2242 the memory behavior of Python objects in a running Python application.
2243
2244 By pympling a Python application, detailed insight in the size and the
2245 lifetime of Python objects can be obtained. Undesirable or unexpected
2246 runtime behavior like memory bloat and other @samp{pymples} can easily
2247 be identified.
2248
2249 A web profiling frontend exposes process statistics, garbage
2250 visualisation and class tracker statistics.")
2251 (license license:asl2.0)))
2252
2253 (define-public python2-pympler
2254 (package-with-python2 python-pympler))
2255
2256 (define-public python-itsdangerous
2257 (package
2258 (name "python-itsdangerous")
2259 (version "1.1.0")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (pypi-uri "itsdangerous" version))
2264 (sha256
2265 (base32
2266 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2267 (build-system python-build-system)
2268 (home-page "https://palletsprojects.com/p/itsdangerous/")
2269 (synopsis "Python library for passing data to/from untrusted environments")
2270 (description
2271 "Itsdangerous provides various helpers to pass trusted data to untrusted
2272 environments and back.")
2273 (license license:bsd-3)))
2274
2275 (define-public python2-itsdangerous
2276 (package-with-python2 python-itsdangerous))
2277
2278 (define-public python-pyyaml
2279 (package
2280 (name "python-pyyaml")
2281 (version "3.13")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "PyYAML" version))
2286 (sha256
2287 (base32
2288 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2289 (build-system python-build-system)
2290 (inputs
2291 `(("libyaml" ,libyaml)))
2292 (home-page "http://pyyaml.org/wiki/PyYAML")
2293 (synopsis "YAML parser and emitter for Python")
2294 (description
2295 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2296 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2297 API, and sensible error messages. PyYAML supports standard YAML tags and
2298 provides Python-specific tags that allow to represent an arbitrary Python
2299 object.")
2300 (license license:expat)))
2301
2302 (define-public python2-pyyaml
2303 (package-with-python2 python-pyyaml))
2304
2305 (define-public python-vine
2306 (package
2307 (name "python-vine")
2308 (version "1.1.4")
2309 (source
2310 (origin
2311 (method url-fetch)
2312 (uri (pypi-uri "vine" version))
2313 (sha256
2314 (base32
2315 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2316 (build-system python-build-system)
2317 (native-inputs
2318 `(("python-pytest" ,python-pytest)
2319 ("python-case" ,python-case)))
2320 (home-page "https://github.com/celery/vine")
2321 (synopsis "Promises for Python")
2322 (description
2323 "@code{vine} provides a special implementation of promises in that it can
2324 be used both for \"promise of a value\" and lazy evaluation. The biggest
2325 upside for this is that everything in a promise can also be a promise,
2326 e.g. filters, callbacks and errbacks can all be promises.")
2327 (license license:bsd-3)))
2328
2329 (define-public python-virtualenv
2330 (package
2331 (name "python-virtualenv")
2332 (version "16.1.0")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "virtualenv" version))
2337 (sha256
2338 (base32
2339 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2340 (build-system python-build-system)
2341 (arguments
2342 `(#:phases
2343 (modify-phases %standard-phases
2344 (add-before 'check 'disable-failing-test
2345 (lambda _
2346 ;; Disable failing test. See upstream bug report
2347 ;; https://github.com/pypa/virtualenv/issues/957
2348 (substitute* "tests/test_virtualenv.py"
2349 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2350 #t)))))
2351 (native-inputs
2352 `(("python-mock" ,python-mock)
2353 ("python-pytest" ,python-pytest)))
2354 (home-page "https://virtualenv.pypa.io/")
2355 (synopsis "Virtual Python environment builder")
2356 (description
2357 "Virtualenv is a tool to create isolated Python environments.")
2358 (license license:expat)))
2359
2360 (define-public python2-virtualenv
2361 (package-with-python2 python-virtualenv))
2362
2363 (define-public python-markupsafe
2364 (package
2365 (name "python-markupsafe")
2366 (version "1.1.1")
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "MarkupSafe" version))
2371 (sha256
2372 (base32
2373 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2374 (build-system python-build-system)
2375 (arguments
2376 `(#:modules ((ice-9 ftw)
2377 (srfi srfi-1)
2378 (srfi srfi-26)
2379 (guix build utils)
2380 (guix build python-build-system))
2381 #:phases (modify-phases %standard-phases
2382 (replace 'check
2383 (lambda _
2384 (let ((cwd (getcwd))
2385 (libdir (find (cut string-prefix? "lib." <>)
2386 (scandir "build"))))
2387 (setenv "PYTHONPATH"
2388 (string-append cwd "/build/" libdir ":"
2389 (getenv "PYTHONPATH")))
2390 (invoke "pytest" "-vv")))))))
2391 (native-inputs
2392 `(("python-pytest" ,python-pytest)))
2393 (home-page "https://github.com/mitsuhiko/markupsafe")
2394 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2395 (description
2396 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2397 for Python.")
2398 (license license:bsd-3)))
2399
2400 (define-public python2-markupsafe
2401 (package-with-python2 python-markupsafe))
2402
2403 (define-public python-jinja2
2404 (package
2405 (name "python-jinja2")
2406 (version "2.10.1")
2407 (source
2408 (origin
2409 (method url-fetch)
2410 (uri (pypi-uri "Jinja2" version))
2411 (sha256
2412 (base32
2413 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2414 (build-system python-build-system)
2415 (propagated-inputs
2416 `(("python-markupsafe" ,python-markupsafe)))
2417 (home-page "http://jinja.pocoo.org/")
2418 (synopsis "Python template engine")
2419 (description
2420 "Jinja2 is a small but fast and easy to use stand-alone template engine
2421 written in pure Python.")
2422 (license license:bsd-3)))
2423
2424 (define-public python2-jinja2
2425 (package-with-python2 python-jinja2))
2426
2427 (define-public python-pystache
2428 (package
2429 (name "python-pystache")
2430 (version "0.5.4")
2431 (source (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "pystache" version))
2434 (sha256
2435 (base32
2436 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2437 (build-system python-build-system)
2438 (arguments
2439 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2440 (home-page "http://defunkt.io/pystache/")
2441 (synopsis "Python logic-less template engine")
2442 (description
2443 "Pystache is a Python implementation of the framework agnostic,
2444 logic-free templating system Mustache.")
2445 (license license:expat)
2446 (properties `((python2-variant . ,(delay python2-pystache))))))
2447
2448 (define-public python2-pystache
2449 (package (inherit (package-with-python2
2450 (strip-python2-variant python-pystache)))
2451 (arguments
2452 `(#:python ,python-2
2453 #:phases
2454 (modify-phases %standard-phases
2455 (replace 'check
2456 (lambda _
2457 (invoke "python" "test_pystache.py"))))))))
2458
2459 (define-public python-joblib
2460 (package
2461 (name "python-joblib")
2462 (version "0.13.0")
2463 (source (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "joblib" version))
2466 (sha256
2467 (base32
2468 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2469 (build-system python-build-system)
2470 (arguments
2471 `(#:phases
2472 (modify-phases %standard-phases
2473 (replace 'check
2474 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2475 (native-inputs
2476 `(("python-pytest" ,python-pytest)))
2477 (home-page "https://joblib.readthedocs.io/")
2478 (synopsis "Using Python functions as pipeline jobs")
2479 (description
2480 "Joblib is a set of tools to provide lightweight pipelining in Python.
2481 In particular, joblib offers: transparent disk-caching of the output values
2482 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2483 logging and tracing of the execution.")
2484 (license license:bsd-3)))
2485
2486 (define-public python2-joblib
2487 (package-with-python2 python-joblib))
2488
2489 (define-public python-daemon
2490 (package
2491 (name "python-daemon")
2492 (version "2.2.3")
2493 (source
2494 (origin
2495 (method url-fetch)
2496 (uri (pypi-uri "python-daemon" version))
2497 (sha256
2498 (base32
2499 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2500 (build-system python-build-system)
2501 (arguments
2502 `(#:phases
2503 (modify-phases %standard-phases
2504 (add-before 'check 'disable-tests
2505 (lambda _
2506 ;; FIXME: Determine why test fails
2507 (substitute* "test/test_daemon.py"
2508 (("test_detaches_process_context")
2509 "skip_test_detaches_process_context"))
2510 #t)))))
2511 (propagated-inputs
2512 `(("python-lockfile" ,python-lockfile)))
2513 (native-inputs
2514 `(("python-unittest2" ,python-unittest2)
2515 ("python-testtools" ,python-testtools)
2516 ("python-testscenarios" ,python-testscenarios)
2517 ("python-mock" ,python-mock)
2518 ("python-docutils" ,python-docutils)))
2519 (home-page "https://pagure.io/python-daemon/")
2520 (synopsis "Python library for making a Unix daemon process")
2521 (description "Python-daemon is a library that assists a Python program to
2522 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2523
2524 This library provides a @code{DaemonContext} class that manages the following
2525 important tasks for becoming a daemon process:
2526 @enumerate
2527 @item Detach the process into its own process group.
2528 @item Set process environment appropriate for running inside a chroot.
2529 @item Renounce suid and sgid privileges.
2530 @item Close all open file descriptors.
2531 @item Change the working directory, uid, gid, and umask.
2532 @item Set appropriate signal handlers.
2533 @item Open new file descriptors for stdin, stdout, and stderr.
2534 @item Manage a specified PID lock file.
2535 @item Register cleanup functions for at-exit processing.
2536 @end enumerate")
2537 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2538 (license (list license:asl2.0 license:gpl3+))))
2539
2540 (define-public python-docutils
2541 (package
2542 (name "python-docutils")
2543 (version "0.14")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "docutils" version))
2548 (sha256
2549 (base32
2550 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2551 (build-system python-build-system)
2552 (arguments
2553 '(#:tests? #f)) ; no setup.py test command
2554 (home-page "http://docutils.sourceforge.net/")
2555 (synopsis "Python Documentation Utilities")
2556 (description
2557 "Docutils is a modular system for processing documentation into useful
2558 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2559 reStructuredText.")
2560 ;; Most of the source code is public domain, but some source files are
2561 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2562 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2563
2564 (define-public python2-docutils
2565 (package-with-python2 python-docutils))
2566
2567 (define-public python-pygments
2568 (package
2569 (name "python-pygments")
2570 (version "2.4.2")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Pygments" version))
2575 (sha256
2576 (base32
2577 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2578 (build-system python-build-system)
2579 (arguments
2580 ;; FIXME: Tests require sphinx, which depends on this.
2581 '(#:tests? #f))
2582 (home-page "http://pygments.org/")
2583 (synopsis "Syntax highlighting")
2584 (description
2585 "Pygments is a syntax highlighting package written in Python.")
2586 (license license:bsd-2)))
2587
2588 (define-public python2-pygments
2589 (package-with-python2 python-pygments))
2590
2591 (define-public python-bumpversion
2592 (package
2593 (name "python-bumpversion")
2594 (version "0.5.3")
2595 (source
2596 (origin
2597 (method url-fetch)
2598 (uri (pypi-uri "bumpversion" version))
2599 (sha256
2600 (base32
2601 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2602 (build-system python-build-system)
2603 (home-page "https://github.com/peritus/bumpversion")
2604 (synopsis "Tool to bump software version")
2605 (description "This tool provides a command-line interface (CLI) to bump a
2606 software version simply.")
2607 (license license:expat)))
2608
2609 (define-public python-deprecated
2610 (package
2611 (name "python-deprecated")
2612 (version "1.2.5")
2613 (source
2614 (origin
2615 (method git-fetch)
2616 (uri (git-reference
2617 (url "https://github.com/tantale/deprecated.git")
2618 (commit (string-append "v" version))))
2619 (file-name (git-file-name name version))
2620 (sha256
2621 (base32
2622 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(#:phases (modify-phases %standard-phases
2626 (replace 'check
2627 (lambda _
2628 (invoke "pytest"))))))
2629 (propagated-inputs
2630 `(("python-wrapt" ,python-wrapt)))
2631 (native-inputs
2632 `(("python-bumpversion" ,python-bumpversion)
2633 ("python-pytest" ,python-pytest)
2634 ("python-pytest-cov" ,python-pytest-cov)
2635 ("python-sphinx" ,python-sphinx)
2636 ("python-tox" ,python-tox)))
2637 (home-page "https://github.com/tantale/deprecated")
2638 (synopsis "Python decorator to deprecate classes, functions or methods")
2639 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2640 to deprecate classes, functions or methods.")
2641 (license license:expat)))
2642
2643 (define-public python-pygithub
2644 (package
2645 (name "python-pygithub")
2646 (version "1.43.7")
2647 (source
2648 ;; We fetch from the Git repo because there are no tests in the PyPI
2649 ;; archive.
2650 (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://github.com/PyGithub/PyGithub.git")
2654 (commit (string-append "v" version))))
2655 (file-name (git-file-name name version))
2656 (sha256
2657 (base32
2658 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2659 (build-system python-build-system)
2660 (arguments
2661 `(#:phases (modify-phases %standard-phases
2662 ;; Some tests rely on the network.
2663 (add-after 'unpack 'disable-failing-tests
2664 (lambda _
2665 (substitute* "tests/Issue142.py"
2666 (("testDecodeJson") "disabled_testDecodeJson"))
2667 #t))
2668 (add-before 'check 'prepare-for-tests
2669 (lambda _
2670 (for-each (lambda (f)
2671 (chmod f #o666))
2672 (find-files "./tests"))
2673 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2674 (setenv "PYTHONPATH"
2675 (string-append "./tests:" (getenv "PYTHONPATH")))
2676 #t)))))
2677 (propagated-inputs
2678 `(("python-deprecated" ,python-deprecated)
2679 ("python-pyjwt" ,python-pyjwt)
2680 ("python-requests" ,python-requests)))
2681 (native-inputs `(("python-httpretty" ,python-httpretty)))
2682 (home-page "https://pygithub.readthedocs.io/en/latest/")
2683 (synopsis "Python library for the GitHub API")
2684 (description "This library allows managing GitHub resources such as
2685 repositories, user profiles, and organizations in your Python applications,
2686 using version 3 of the GitHub application programming interface (API).")
2687 (license license:lgpl3+)))
2688
2689 (define-public python-rellu
2690 (package
2691 (name "python-rellu")
2692 (version "0.7")
2693 (source
2694 (origin
2695 (method url-fetch)
2696 (uri (pypi-uri "rellu" version))
2697 (sha256
2698 (base32
2699 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2700 (build-system python-build-system)
2701 (propagated-inputs
2702 `(("python-invoke" ,python-invoke)
2703 ("python-pygithub" ,python-pygithub)))
2704 (home-page "https://github.com/robotframework/rellu")
2705 (synopsis "Utilities to create PyPI releases")
2706 (description "This collection of utilities contains tooling and templates
2707 to assist in creating releases on GitHub and publishing them on PyPI. It is
2708 designed to be used by Robot Framework and tools and libraries in its
2709 ecosystem, but can naturally be used also by other projects.")
2710 (license license:asl2.0)))
2711
2712 (define-public python-robotframework
2713 (package
2714 (name "python-robotframework")
2715 (version "3.1.2")
2716 ;; There are no tests in the PyPI archive.
2717 (source
2718 (origin
2719 (method git-fetch)
2720 (uri (git-reference
2721 (url "https://github.com/robotframework/robotframework.git")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2724 (sha256
2725 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2726 (patches (search-patches
2727 "python-robotframework-honor-source-date-epoch.patch"))))
2728 (build-system python-build-system)
2729 (arguments
2730 `(#:phases (modify-phases %standard-phases
2731 (add-before 'build 'build-and-install-doc
2732 (lambda* (#:key outputs #:allow-other-keys)
2733 (let* ((doc-output (assoc-ref outputs "doc"))
2734 (doc (string-append doc-output "/share/"
2735 ,name "-" ,version "/")))
2736 (invoke "invoke" "library-docs" "all")
2737 (mkdir-p doc)
2738 (copy-recursively "doc/libraries"
2739 (string-append doc "/libraries"))
2740 #t)))
2741 (replace 'check
2742 (lambda _
2743 (invoke "python" "utest/run.py"))))))
2744 (native-inputs
2745 `(("python-invoke" ,python-invoke)
2746 ("python-rellu" ,python-rellu)
2747 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2748 (outputs '("out" "doc"))
2749 (home-page "https://robotframework.org")
2750 (synopsis "Generic automation framework")
2751 (description "Robot Framework is a generic automation framework for
2752 acceptance testing, acceptance test driven development (ATDD), and robotic
2753 process automation (RPA).")
2754 (license license:asl2.0)))
2755
2756 (define-public python-robotframework-lint
2757 ;; There is no properly tagged release; the commit below seems to correspond
2758 ;; to the 0.9 stable release available from PyPI. The tests are not
2759 ;; included in the PyPI archive, so we fetch the sources from the upstream
2760 ;; Git repo.
2761 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2762 (revision "1"))
2763 (package
2764 (name "python-robotframework-lint")
2765 (version (git-version "0.9.0" revision commit))
2766 (source
2767 (origin
2768 (method git-fetch)
2769 (uri (git-reference
2770 (url "https://github.com/boakley/robotframework-lint.git")
2771 (commit commit)))
2772 (file-name (git-file-name name version))
2773 (sha256
2774 (base32
2775 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2776 (build-system python-build-system)
2777 (arguments
2778 `(#:phases
2779 (modify-phases %standard-phases
2780 (replace 'check
2781 (lambda _
2782 (invoke "python" "-m" "robot" "-A"
2783 "tests/conf/default.args" "tests"))))))
2784 (propagated-inputs
2785 `(("python-robotframework" ,python-robotframework)))
2786 (home-page "https://github.com/boakley/robotframework-lint/")
2787 (synopsis "Static analysis tool (linter) for Robot Framework")
2788 (description "This package provides the @code{rflint} command-line
2789 utility, a static analysis tool (linter) for Robot Framework source files.")
2790 (license license:asl2.0))))
2791
2792 (define-public python-robotframework-sshlibrary
2793 (package
2794 (name "python-robotframework-sshlibrary")
2795 (version "3.3.0")
2796 ;; There are no tests in the PyPI archive.
2797 (source
2798 (origin
2799 (method git-fetch)
2800 (uri (git-reference
2801 (url "https://github.com/robotframework/SSHLibrary.git")
2802 (commit (string-append "v" version))))
2803 (file-name (git-file-name name version))
2804 (sha256
2805 (base32
2806 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2807 (build-system python-build-system)
2808 (arguments
2809 `(#:phases
2810 (modify-phases %standard-phases
2811 (add-before 'build 'build-and-install-doc
2812 (lambda* (#:key outputs #:allow-other-keys)
2813 (let* ((doc-output (assoc-ref outputs "doc"))
2814 (doc (string-append doc-output "/share/"
2815 ,name "-" ,version "/")))
2816 (invoke "chmod" "-R" "+w" "docs")
2817 (invoke "invoke" "kw-docs" "project-docs")
2818 (mkdir-p doc)
2819 (for-each delete-file (find-files "docs" "\\.rst"))
2820 (copy-recursively "docs" doc)
2821 #t)))
2822 (replace 'check
2823 (lambda _
2824 ;; Some tests require an SSH server; we remove them.
2825 (delete-file "utest/test_client_api.py")
2826 (delete-file "utest/test_scp.py")
2827 (invoke "python" "utest/run.py"))))))
2828 (propagated-inputs
2829 `(("python-robotframework" ,python-robotframework)
2830 ("python-paramiko" ,python-paramiko)
2831 ("python-scp" ,python-scp)))
2832 (native-inputs
2833 `(("openssh" ,openssh)
2834 ("which" ,which)
2835 ;; To generate the documentation
2836 ("python-docutils" ,python-docutils)
2837 ("python-invoke" ,python-invoke)
2838 ("python-pygments" ,python-pygments)
2839 ("python-rellu" ,python-rellu)))
2840 (outputs '("out" "doc"))
2841 (home-page "https://github.com/robotframework/SSHLibrary")
2842 (synopsis "Robot Framework library for SSH and SFTP")
2843 (description "SSHLibrary is a Robot Framework library providing support
2844 for SSH and SFTP. It has the following main usages:
2845 @itemize @bullet
2846 @item Executing commands on the remote machine, either blocking or non-blocking.
2847 @item Writing and reading in an interactive shell.
2848 @item Transferring files and directories over SFTP.
2849 @item Ensuring that files and directories exist on the remote machine.
2850 @end itemize")
2851 (license license:asl2.0)))
2852
2853 (define-public python-scp
2854 (package
2855 (name "python-scp")
2856 (version "0.13.2")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (pypi-uri "scp" version))
2861 (sha256
2862 (base32
2863 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2864 (build-system python-build-system)
2865 (arguments
2866 '(#:tests? #f)) ;tests require an SSH server
2867 (propagated-inputs
2868 `(("python-paramiko" ,python-paramiko)))
2869 (home-page "https://github.com/jbardin/scp.py")
2870 (synopsis "SCP protocol module for Python and Paramiko")
2871 (description "The scp module extends the Paramiko library to send and
2872 receive files via the SCP1 protocol, as implemented by the OpenSSH
2873 @command{scp} program.")
2874 (license license:gpl2+)))
2875
2876 (define-public python-rst.linker
2877 (package
2878 (name "python-rst.linker")
2879 (version "1.10")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "rst.linker" version))
2884 (sha256
2885 (base32
2886 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2887 (build-system python-build-system)
2888 (propagated-inputs
2889 `(("python-dateutil" ,python-dateutil)
2890 ("python-six" ,python-six)))
2891 (native-inputs
2892 `(("python-setuptools-scm" ,python-setuptools-scm)))
2893 ;; Test would require path.py, which would introduce a cyclic dependence.
2894 (arguments `(#:tests? #f))
2895 ;; Note: As of version 1.7 the documentation is not worth building.
2896 (home-page "https://github.com/jaraco/rst.linker")
2897 (synopsis "Sphinx plugin to add links and timestamps")
2898 (description "rst.linker allows to automatically replace text by a
2899 reStructuredText external reference or timestamps. It's primary purpose is to
2900 augment the changelog, but it can be used for other documents, too.")
2901 (license license:expat)))
2902
2903 (define-public python2-rst.linker
2904 (package-with-python2 python-rst.linker))
2905
2906 (define-public python-feedgenerator
2907 (package
2908 (name "python-feedgenerator")
2909 (version "1.9")
2910 (source
2911 (origin
2912 (method url-fetch)
2913 (uri (pypi-uri "feedgenerator" version))
2914 (sha256
2915 (base32
2916 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2917 (modules '((guix build utils)))
2918 (snippet
2919 '(begin
2920 ;; Remove pre-compiled .pyc files from source.
2921 (for-each delete-file-recursively
2922 (find-files "." "__pycache__" #:directories? #t))
2923 (for-each delete-file (find-files "." "\\.pyc$"))
2924 #t))))
2925 (build-system python-build-system)
2926 (propagated-inputs
2927 `(("python-pytz" ,python-pytz)
2928 ("python-six" ,python-six)))
2929 (home-page "https://github.com/getpelican/feedgenerator")
2930 (synopsis
2931 "Standalone version of Django's Atom/RSS feed generator")
2932 (description
2933 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2934 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2935 (license license:bsd-3)))
2936
2937 (define-public python2-feedgenerator
2938 (package-with-python2 python-feedgenerator))
2939
2940 (define-public python-toml
2941 (package
2942 (name "python-toml")
2943 (version "0.9.4")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "toml" version))
2948 (sha256
2949 (base32
2950 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2951 (build-system python-build-system)
2952 (arguments
2953 `(#:tests? #f)) ;no tests suite in release
2954 (home-page "https://github.com/uiri/toml")
2955 (synopsis "Library for TOML")
2956 (description
2957 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2958 Language (TOML) configuration files.")
2959 (license license:expat)))
2960
2961 (define-public python-jsonrpc-server
2962 (package
2963 (name "python-jsonrpc-server")
2964 (version "0.1.2")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "python-jsonrpc-server" version))
2969 (sha256
2970 (base32
2971 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-future" ,python-future)
2975 ("python-mock" ,python-mock)
2976 ("python-pytest" ,python-pytest)))
2977 (home-page
2978 "https://github.com/palantir/python-jsonrpc-server")
2979 (synopsis "JSON RPC 2.0 server library")
2980 (description
2981 "This package provides a JSON RPC 2.0 server library for Python.")
2982 (license license:expat)))
2983
2984 (define-public python-pydocstyle
2985 (package
2986 (name "python-pydocstyle")
2987 (version "3.0.0")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "pydocstyle" version))
2992 (sha256
2993 (base32
2994 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2995 (build-system python-build-system)
2996 (propagated-inputs
2997 `(("python-six" ,python-six)
2998 ("python-snowballstemmer" ,python-snowballstemmer)))
2999 (home-page
3000 "https://github.com/PyCQA/pydocstyle/")
3001 (synopsis "Python docstring style checker")
3002 (description
3003 "This package provides a style checker for the Python Language
3004 Server (PLS).")
3005 (license license:expat)))
3006
3007 (define-public python-language-server
3008 (package
3009 (name "python-language-server")
3010 (version "0.26.1")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "python-language-server" version))
3015 (sha256
3016 (base32
3017 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3018 (build-system python-build-system)
3019 (propagated-inputs
3020 `(("python-pluggy" ,python-pluggy)
3021 ("python-jsonrpc-server" ,python-jsonrpc-server)
3022 ("python-jedi" ,python-jedi)
3023 ("python-yapf" ,python-yapf)
3024 ("python-pyflakes" ,python-pyflakes)
3025 ("python-pydocstyle" ,python-pydocstyle)
3026 ("python-pycodestyle" ,python-pycodestyle)
3027 ("python-mccabe" ,python-mccabe)
3028 ("python-rope" ,python-rope)
3029 ("python-autopep8" ,python-autopep8)
3030 ("python-pylint" ,python-pylint)))
3031 (home-page "https://github.com/palantir/python-language-server")
3032 (synopsis "Python implementation of the Language Server Protocol")
3033 (description
3034 "The Python Language Server (pyls) is an implementation of the Python 3
3035 language specification for the Language Server Protocol (LSP). This tool is
3036 used in text editing environments to provide a complete and integrated
3037 feature-set for programming Python effectively.")
3038 (license license:expat)))
3039
3040 (define-public python-black
3041 (package
3042 (name "python-black")
3043 (version "18.6b4")
3044 (source
3045 (origin
3046 (method url-fetch)
3047 (uri (pypi-uri "black" version))
3048 (sha256
3049 (base32
3050 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3051 (build-system python-build-system)
3052 (arguments
3053 `(#:phases
3054 (modify-phases %standard-phases
3055 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3056 (lambda _
3057 (let ((python3 (which "python3")))
3058 (substitute* '("tests/data/fmtonoff.py"
3059 "tests/data/string_prefixes.py"
3060 "tests/data/function.py")
3061 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3062 (string-append "#!" python3 (if (string? minor-version)
3063 minor-version
3064 ""))))))))))
3065 (propagated-inputs
3066 `(("python-click" ,python-click)
3067 ("python-attrs" ,python-attrs)
3068 ("python-appdirs" ,python-appdirs)
3069 ("python-toml" ,python-toml)))
3070 (home-page "https://github.com/ambv/black")
3071 (synopsis "The uncompromising code formatter")
3072 (description "Black is the uncompromising Python code formatter.")
3073 (license license:expat)))
3074
3075 (define-public python-blinker
3076 (package
3077 (name "python-blinker")
3078 (version "1.4")
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (pypi-uri "blinker" version))
3083 (sha256
3084 (base32
3085 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3086 (build-system python-build-system)
3087 (home-page "http://pythonhosted.org/blinker/")
3088 (synopsis "Fast, simple object-to-object and broadcast signaling")
3089 (description
3090 "Blinker provides a fast dispatching system that allows any number of
3091 interested parties to subscribe to events, or \"signals\".")
3092 (license license:expat)))
3093
3094 (define-public python2-blinker
3095 (package-with-python2 python-blinker))
3096
3097 (define-public pelican
3098 (package
3099 (name "pelican")
3100 (version "4.0.1")
3101 (source
3102 (origin
3103 (method url-fetch)
3104 (uri (pypi-uri "pelican" version))
3105 (sha256
3106 (base32
3107 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3108 (build-system python-build-system)
3109 (propagated-inputs
3110 `(("python-feedgenerator" ,python-feedgenerator)
3111 ("python-jinja2" ,python-jinja2)
3112 ("python-pygments" ,python-pygments)
3113 ("python-docutils" ,python-docutils)
3114 ("python-pytz" ,python-pytz)
3115 ("python-blinker" ,python-blinker)
3116 ("python-unidecode" ,python-unidecode)
3117 ("python-six" ,python-six)
3118 ("python-dateutil" ,python-dateutil)
3119 ("python-markdown" ,python-markdown)))
3120 (home-page "https://getpelican.com/")
3121 (arguments
3122 `(;; XXX Requires a lot more packages to do unit tests :P
3123 #:tests? #f
3124 #:phases (modify-phases %standard-phases
3125 (add-before
3126 'install 'adjust-requires
3127 ;; Since feedgenerator is installed from git, it doesn't
3128 ;; conform to the version requirements.
3129 ;;
3130 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3131 ;; version requirement so setuptools doesn't get confused.
3132 (lambda _
3133 (substitute* "setup.py"
3134 (("['\"]feedgenerator.*?['\"]")
3135 "'feedgenerator'")))))))
3136 (synopsis "Python-based static site publishing system")
3137 (description
3138 "Pelican is a tool to generate a static blog from reStructuredText,
3139 Markdown input files, and more. Pelican uses Jinja2 for templating
3140 and is very extensible.")
3141 (license license:agpl3+)))
3142
3143 (define-public mallard-ducktype
3144 (package
3145 (name "mallard-ducktype")
3146 (version "1.0.2")
3147 (source
3148 (origin
3149 (method git-fetch)
3150 ;; git-reference because tests are not included in pypi source tarball
3151 ;; https://issues.guix.gnu.org/issue/36755#2
3152 (uri (git-reference
3153 (url "https://github.com/projectmallard/mallard-ducktype.git")
3154 (commit version)))
3155 (file-name (git-file-name name version))
3156 (sha256
3157 (base32
3158 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3159 (build-system python-build-system)
3160 (arguments
3161 '(#:phases
3162 (modify-phases %standard-phases
3163 (replace 'check
3164 (lambda _
3165 (with-directory-excursion "tests"
3166 (invoke "sh" "runtests")))))))
3167 (home-page "http://projectmallard.org")
3168 (synopsis "Convert Ducktype to Mallard documentation markup")
3169 (description
3170 "Ducktype is a lightweight syntax that can represent all the semantics
3171 of the Mallard XML documentation system. Ducktype files can be converted to
3172 Mallard using the @command{ducktype} tool. The yelp-tools package
3173 provides additional functionality on the produced Mallard documents.")
3174 (license license:expat)))
3175
3176 (define-public python-scikit-image
3177 (package
3178 (name "python-scikit-image")
3179 (version "0.14.2")
3180 (source
3181 (origin
3182 (method url-fetch)
3183 (uri (pypi-uri "scikit-image" version))
3184 (sha256
3185 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3186 (build-system python-build-system)
3187 (arguments
3188 ;; TODO: Some tests require running X11 server. Disable them?
3189 '(#:tests? #f))
3190 ;; See DEPENDS.txt for the list of build and run time requiremnts
3191 (propagated-inputs
3192 `(("python-cloudpickle" ,python-cloudpickle)
3193 ("python-dask" ,python-dask)
3194 ("python-matplotlib" ,python-matplotlib)
3195 ("python-networkx" ,python-networkx)
3196 ("python-numpy" ,python-numpy)
3197 ("python-pillow" ,python-pillow)
3198 ("python-pywavelets" ,python-pywavelets)
3199 ("python-scipy" ,python-scipy)
3200 ("python-six" ,python-six)))
3201 (native-inputs
3202 `(("python-cython" ,python-cython)))
3203 (home-page "http://scikit-image.org/")
3204 (synopsis "Image processing in Python")
3205 (description
3206 "Scikit-image is a collection of algorithms for image processing.")
3207 (license license:bsd-3)))
3208
3209 (define-public python2-scikit-image
3210 (package-with-python2 python-scikit-image))
3211
3212 (define-public python-cython
3213 (package
3214 (name "python-cython")
3215 (version "0.29.13")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (pypi-uri "Cython" version))
3220 (sha256
3221 (base32
3222 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3223 (build-system python-build-system)
3224 ;; we need the full python package and not just the python-wrapper
3225 ;; because we need libpython3.3m.so
3226 (inputs
3227 `(("python" ,python)))
3228 (arguments
3229 `(#:phases
3230 (modify-phases %standard-phases
3231 (add-before 'check 'set-HOME
3232 ;; some tests require access to "$HOME/.cython"
3233 (lambda _ (setenv "HOME" "/tmp") #t))
3234
3235 ;; FIXME: These tests started failing on armhf after the 0.28 update
3236 ;; (commit c69d11c5930), both with an error such as this:
3237 ;; compiling (cpp) and running dictcomp ...
3238 ;; === C/C++ compiler error output: ===
3239 ;; ‘
3240 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3241 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3242 ,@(if (target-arm32?)
3243 `((add-before 'check 'disable-failing-tests
3244 (lambda _
3245 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3246 (for-each (lambda (test)
3247 (format disabled-tests "~a\n" test))
3248 '("memslice" "dictcomp"))
3249 (close-port disabled-tests)))))
3250 '())
3251
3252 (replace 'check
3253 (lambda _
3254 ;; Disable compiler optimizations to greatly reduce the running
3255 ;; time of the test suite.
3256 (setenv "CFLAGS" "-O0")
3257
3258 (invoke "python" "runtests.py" "-vv"
3259 "-j" (number->string (parallel-job-count))))))))
3260 (home-page "https://cython.org/")
3261 (synopsis "C extensions for Python")
3262 (description "Cython is an optimising static compiler for both the Python
3263 programming language and the extended Cython programming language. It makes
3264 writing C extensions for Python as easy as Python itself.")
3265 (license license:asl2.0)
3266 (properties `((python2-variant . ,(delay python2-cython))))))
3267
3268 (define-public python2-cython
3269 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3270 (package
3271 (inherit base)
3272 (name "python2-cython")
3273 (inputs
3274 `(("python-2" ,python-2))) ;this is not automatically changed
3275 (arguments
3276 (substitute-keyword-arguments (package-arguments base)
3277 ((#:phases phases)
3278 `(modify-phases ,phases
3279 (add-before 'check 'adjust-test_embed
3280 (lambda _
3281 (substitute* "runtests.py"
3282 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3283 ;; so it can give the right -L flag to GCC when embedding static
3284 ;; builds of Python. It is unaware that the Python "config"
3285 ;; directory (where the static library lives) was renamed in
3286 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3287 ;; which works fine, because that is where the shared library is.
3288 ;;
3289 ;; It also appears to be unaware that the Makefile in Demos/embed
3290 ;; already unconditionally pass the static library location to GCC,
3291 ;; after checking sysconfig.get_config_var('LIBPL).
3292 ;;
3293 ;; The effect is that the linker is unable to resolve libexpat
3294 ;; symbols when building for Python 2, because neither the Python 2
3295 ;; shared library nor Expat is available. To fix it, we can either
3296 ;; add Expat as an input and make it visible to the linker, or just
3297 ;; prevent it from overriding the Python shared library location.
3298 ;; The end result is identical, so we take the easy route.
3299 ((" or libname not in os\\.listdir\\(libdir\\)")
3300 ""))
3301 #t)))))))))
3302
3303 ;; The RPython toolchain currently does not support Python 3.
3304 (define-public python2-rpython
3305 (package
3306 (name "python2-rpython")
3307 (version "0.2.1")
3308 (source
3309 (origin
3310 (method url-fetch)
3311 (uri (pypi-uri "rpython" version))
3312 (sha256
3313 (base32
3314 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3315 (build-system python-build-system)
3316 (arguments `(#:python ,python-2))
3317 (native-inputs
3318 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3319 (home-page "https://rpython.readthedocs.org")
3320 (synopsis "Framework for implementing interpreters and virtual machines")
3321 (description "RPython is a translation and support framework for
3322 producing implementations of dynamic languages, emphasizing a clean separation
3323 between language specification and implementation aspects.")
3324 (license license:expat)))
3325
3326 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3327 ;; python-scipy still build, as these three packages are often used together.
3328 (define-public python-numpy
3329 (package
3330 (name "python-numpy")
3331 (version "1.15.4")
3332 (source
3333 (origin
3334 (method url-fetch)
3335 (uri (string-append
3336 "https://github.com/numpy/numpy/releases/download/v"
3337 version "/numpy-" version ".tar.gz"))
3338 (sha256
3339 (base32
3340 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3341 (build-system python-build-system)
3342 (inputs
3343 `(("openblas" ,openblas)
3344 ("lapack" ,lapack)))
3345 (native-inputs
3346 `(("python-cython" ,python-cython)
3347 ("python-pytest" ,python-pytest)
3348 ("gfortran" ,gfortran)))
3349 (arguments
3350 `(#:phases
3351 (modify-phases %standard-phases
3352 (add-before 'build 'configure-blas-lapack
3353 (lambda* (#:key inputs #:allow-other-keys)
3354 (call-with-output-file "site.cfg"
3355 (lambda (port)
3356 (format port
3357 "[openblas]
3358 libraries = openblas
3359 library_dirs = ~a/lib
3360 include_dirs = ~a/include
3361
3362 # backslash-n to make emacs happy
3363 \n[lapack]
3364 lapack_libs = lapack
3365 library_dirs = ~a/lib
3366 include_dirs = ~a/include
3367 "
3368 (assoc-ref inputs "openblas")
3369 (assoc-ref inputs "openblas")
3370 (assoc-ref inputs "lapack")
3371 (assoc-ref inputs "lapack"))))
3372 #t))
3373 (add-before 'build 'fix-executable-paths
3374 (lambda* (#:key inputs #:allow-other-keys)
3375 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3376 ;; instead of /bin/sh.
3377 (substitute* "numpy/distutils/exec_command.py"
3378 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3379 (string-append match-start (assoc-ref inputs "bash") match-end)))
3380 ;; Use "gcc" executable, not "cc".
3381 (substitute* "numpy/distutils/system_info.py"
3382 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3383 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3384 #t))
3385 ;; Tests can only be run after the library has been installed and not
3386 ;; within the source directory.
3387 (delete 'check)
3388 (add-after 'install 'check
3389 (lambda* (#:key outputs inputs #:allow-other-keys)
3390 ;; Make installed package available for running the tests
3391 (add-installed-pythonpath inputs outputs)
3392 ;; Make sure "f2py" etc is found.
3393 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3394 ":" (getenv "PATH")))
3395 (with-directory-excursion "/tmp"
3396 (invoke "python" "-c"
3397 "import numpy; numpy.test(verbose=2)")))))))
3398 (home-page "http://www.numpy.org/")
3399 (synopsis "Fundamental package for scientific computing with Python")
3400 (description "NumPy is the fundamental package for scientific computing
3401 with Python. It contains among other things: a powerful N-dimensional array
3402 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3403 and Fortran code, useful linear algebra, Fourier transform, and random number
3404 capabilities.")
3405 (license license:bsd-3)))
3406
3407 (define-public python2-numpy
3408 (package-with-python2 python-numpy))
3409
3410 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3411 ;; interest only for legacy code going back to NumPy's predecessor
3412 ;; Numeric.
3413 (define-public python2-numpy-1.8
3414 (package (inherit python2-numpy)
3415 (version "1.8.2")
3416 (source
3417 (origin
3418 (method url-fetch)
3419 (uri (string-append
3420 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3421 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3422 (sha256
3423 (base32
3424 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3425 (arguments
3426 (substitute-keyword-arguments (package-arguments python2-numpy)
3427 ((#:phases phases)
3428 `(modify-phases ,phases
3429 (replace 'configure-blas-lapack
3430 (lambda* (#:key inputs #:allow-other-keys)
3431 (call-with-output-file "site.cfg"
3432 (lambda (port)
3433 (format port
3434 "[openblas]
3435 libraries = openblas,lapack
3436 library_dirs = ~a/lib:~a/lib
3437 include_dirs = ~a/include:~a/include
3438 "
3439 (assoc-ref inputs "openblas")
3440 (assoc-ref inputs "lapack")
3441 (assoc-ref inputs "openblas")
3442 (assoc-ref inputs "lapack"))))
3443 #t))))))
3444 (native-inputs
3445 `(("python2-nose" ,python2-nose)))
3446 (description "NumPy is the fundamental package for scientific computing
3447 with Python. It contains among other things: a powerful N-dimensional array
3448 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3449 and Fortran code, useful linear algebra, Fourier transform, and random number
3450 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3451 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3452 Numeric.")
3453 (license license:bsd-3)))
3454
3455 (define-public python-munch
3456 (package
3457 (name "python-munch")
3458 (version "2.0.4")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (pypi-uri "munch" version))
3463 (sha256
3464 (base32
3465 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3466 (build-system python-build-system)
3467 (home-page "https://github.com/Infinidat/munch")
3468 (synopsis "Dot-accessible dictionary")
3469 (description "Munch is a dot-accessible dictionary similar to JavaScript
3470 objects.")
3471 (license license:expat)))
3472
3473 (define-public python2-munch
3474 (package-with-python2 python-munch))
3475
3476 (define-public python-colormath
3477 (package
3478 (name "python-colormath")
3479 (version "3.0.0")
3480 (source
3481 (origin
3482 (method url-fetch)
3483 (uri (pypi-uri "colormath" version))
3484 (sha256
3485 (base32
3486 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3487 (build-system python-build-system)
3488 (propagated-inputs
3489 `(("python-networkx" ,python-networkx)
3490 ("python-numpy" ,python-numpy)))
3491 (home-page "https://github.com/gtaylor/python-colormath")
3492 (synopsis "Color math and conversion library")
3493 (description
3494 "This is a Python library for color math and conversions.")
3495 (license license:bsd-3)))
3496
3497 (define-public python2-colormath
3498 (package-with-python2 python-colormath))
3499
3500 (define-public python-spectra
3501 (package
3502 (name "python-spectra")
3503 (version "0.0.11")
3504 (source
3505 (origin
3506 (method url-fetch)
3507 (uri (pypi-uri "spectra" version))
3508 (sha256
3509 (base32
3510 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3511 (build-system python-build-system)
3512 (arguments
3513 `(#:phases
3514 (modify-phases %standard-phases
3515 (replace 'check
3516 (lambda _ (invoke "nosetests" "-v"))))))
3517 (propagated-inputs
3518 `(("python-colormath" ,python-colormath)))
3519 (native-inputs
3520 `(("python-nose" ,python-nose)))
3521 (home-page "https://github.com/jsvine/spectra")
3522 (synopsis "Color scales and color conversion")
3523 (description
3524 "This package provides a Python library intended to make color math,
3525 color scales, and color space conversion easy. It has support for:
3526
3527 @enumerate
3528 @item Color scales
3529 @item Color ranges
3530 @item Color blending
3531 @item Brightening/darkening colors
3532 @item Saturating/desaturating colors
3533 @item Conversion to/from multiple color spaces.
3534 @end enumerate\n")
3535 (license license:expat)))
3536
3537 (define-public python2-spectra
3538 (package-with-python2 python-spectra))
3539
3540 (define-public python-numpy-documentation
3541 (package
3542 (name "python-numpy-documentation")
3543 (version (package-version python-numpy))
3544 (source (package-source python-numpy))
3545 (build-system python-build-system)
3546 (native-inputs
3547 `(("python-matplotlib" ,python-matplotlib)
3548 ("python-numpy" ,python-numpy)
3549 ("pkg-config" ,pkg-config)
3550 ("python-sphinx" ,python-sphinx)
3551 ("python-numpydoc" ,python-numpydoc)
3552 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3553 texlive-fonts-ec
3554 texlive-generic-ifxetex
3555 texlive-generic-pdftex
3556 texlive-amsfonts
3557 texlive-latex-capt-of
3558 texlive-latex-cmap
3559 texlive-latex-environ
3560 texlive-latex-eqparbox
3561 texlive-latex-etoolbox
3562 texlive-latex-expdlist
3563 texlive-latex-fancyhdr
3564 texlive-latex-fancyvrb
3565 texlive-latex-fncychap
3566 texlive-latex-float
3567 texlive-latex-framed
3568 texlive-latex-geometry
3569 texlive-latex-graphics
3570 texlive-latex-hyperref
3571 texlive-latex-mdwtools
3572 texlive-latex-multirow
3573 texlive-latex-needspace
3574 texlive-latex-oberdiek
3575 texlive-latex-parskip
3576 texlive-latex-preview
3577 texlive-latex-tabulary
3578 texlive-latex-threeparttable
3579 texlive-latex-titlesec
3580 texlive-latex-trimspaces
3581 texlive-latex-ucs
3582 texlive-latex-upquote
3583 texlive-latex-url
3584 texlive-latex-varwidth
3585 texlive-latex-wrapfig)))
3586 ("texinfo" ,texinfo)
3587 ("perl" ,perl)
3588 ("scipy-sphinx-theme"
3589 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3590 (method git-fetch)
3591 (uri (git-reference
3592 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3593 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3594 (sha256
3595 (base32
3596 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3597 ,@(package-native-inputs python-numpy)))
3598 (arguments
3599 `(#:tests? #f ; we're only generating the documentation
3600 #:phases
3601 (modify-phases %standard-phases
3602 (delete 'build)
3603 (replace 'install
3604 (lambda* (#:key inputs outputs #:allow-other-keys)
3605 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3606 (doc (string-append
3607 data "/doc/" ,name "-"
3608 ,(package-version python-numpy)))
3609 (info-reader (string-append data "/info"))
3610 (html (string-append doc "/html"))
3611 (scipy-sphinx-theme "scipy-sphinx-theme")
3612 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3613 (pyver ,(string-append "PYVER=")))
3614
3615 ;; FIXME: this is needed to for texlive-union to generate
3616 ;; fonts, which are not found.
3617 (setenv "HOME" "/tmp")
3618
3619 (with-directory-excursion "doc"
3620 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3621 (mkdir-p html)
3622 (invoke "make" "html" pyver)
3623 (invoke "make" "latex" "PAPER=a4" pyver)
3624 (invoke "make" "-C" "build/latex"
3625 "all-pdf" "PAPER=a4" pyver)
3626 ;; FIXME: Generation of the info file fails.
3627 ;; (invoke "make" "info" pyver)
3628 ;; (mkdir-p info)
3629 ;; (copy-file "build/texinfo/numpy.info"
3630 ;; (string-append info "/numpy.info"))
3631 (for-each (lambda (file)
3632 (copy-file (string-append "build/latex" file)
3633 (string-append doc file)))
3634 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3635 (with-directory-excursion "build/html"
3636 (for-each (lambda (file)
3637 (let* ((dir (dirname file))
3638 (tgt-dir (string-append html "/" dir)))
3639 (unless (equal? "." dir)
3640 (mkdir-p tgt-dir))
3641 (install-file file html)))
3642 (find-files "." ".*")))))
3643 #t)))))
3644 (home-page (package-home-page python-numpy))
3645 (synopsis "Documentation for the python-numpy package")
3646 (description (package-description python-numpy))
3647 (license (package-license python-numpy))))
3648
3649 (define-public python2-numpy-documentation
3650 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3651 (package
3652 (inherit numpy-documentation)
3653 (native-inputs `(("python2-functools32" ,python2-functools32)
3654 ,@(package-native-inputs numpy-documentation))))))
3655
3656 (define-public python-pygit2
3657 (package
3658 (name "python-pygit2")
3659 (version "0.28.2")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "pygit2" version))
3664 (sha256
3665 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3666 (build-system python-build-system)
3667 (arguments
3668 '(#:tests? #f)) ; tests don't run correctly in our environment
3669 (propagated-inputs
3670 `(("python-six" ,python-six)
3671 ("python-cffi" ,python-cffi)
3672 ("libgit2" ,libgit2)
3673 ("python-tox" ,python-tox)))
3674 (native-inputs
3675 `(("python-pytest" ,python-pytest)))
3676 (home-page "https://github.com/libgit2/pygit2")
3677 (synopsis "Python bindings for libgit2")
3678 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3679 library, libgit2 implements Git plumbing.")
3680 ;; GPL2.0 only, with linking exception.
3681 (license license:gpl2)))
3682
3683 (define-public python2-pygit2
3684 (package-with-python2 python-pygit2))
3685
3686 (define-public python-pyparsing
3687 (package
3688 (name "python-pyparsing")
3689 (version "2.3.1")
3690 (source
3691 (origin
3692 (method url-fetch)
3693 (uri (pypi-uri "pyparsing" version))
3694 (sha256
3695 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3696 (build-system python-build-system)
3697 (outputs '("out" "doc"))
3698 (arguments
3699 `(#:tests? #f ; no test target
3700 #:phases
3701 (modify-phases %standard-phases
3702 (add-after 'install 'install-doc
3703 (lambda* (#:key outputs #:allow-other-keys)
3704 (let* ((doc (string-append (assoc-ref outputs "doc")
3705 "/share/doc/" ,name "-" ,version))
3706 (html-doc (string-append doc "/html"))
3707 (examples (string-append doc "/examples")))
3708 (mkdir-p html-doc)
3709 (mkdir-p examples)
3710 (for-each
3711 (lambda (dir tgt)
3712 (map (lambda (file)
3713 (install-file file tgt))
3714 (find-files dir ".*")))
3715 (list "docs" "htmldoc" "examples")
3716 (list doc html-doc examples))
3717 #t))))))
3718 (home-page "https://github.com/pyparsing/pyparsing")
3719 (synopsis "Python parsing class library")
3720 (description
3721 "The pyparsing module is an alternative approach to creating and
3722 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3723 of regular expressions. The pyparsing module provides a library of classes
3724 that client code uses to construct the grammar directly in Python code.")
3725 (license license:expat)))
3726
3727 (define-public python2-pyparsing
3728 (package-with-python2 python-pyparsing))
3729
3730 (define-public python-numpydoc
3731 (package
3732 (name "python-numpydoc")
3733 (version "0.8.0")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "numpydoc" version))
3738 (sha256
3739 (base32
3740 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3741 (build-system python-build-system)
3742 (propagated-inputs
3743 `(("python-sphinx" ,python-sphinx)))
3744 (native-inputs
3745 `(("python-nose" ,python-nose)))
3746 (home-page "https://pypi.python.org/pypi/numpydoc")
3747 (synopsis
3748 "Numpy's Sphinx extensions")
3749 (description
3750 "Sphinx extension to support docstrings in Numpy format.")
3751 (license license:bsd-2)))
3752
3753 (define-public python2-numpydoc
3754 (package-with-python2 python-numpydoc))
3755
3756 (define-public python-numexpr
3757 (package
3758 (name "python-numexpr")
3759 (version "2.6.5")
3760 (source
3761 (origin
3762 (method url-fetch)
3763 (uri (pypi-uri "numexpr" version))
3764 (sha256
3765 (base32
3766 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3767 (build-system python-build-system)
3768 (arguments `(#:tests? #f)) ; no tests included
3769 (propagated-inputs
3770 `(("python-numpy" ,python-numpy)))
3771 (home-page "https://github.com/pydata/numexpr")
3772 (synopsis "Fast numerical expression evaluator for NumPy")
3773 (description
3774 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3775 expressions that operate on arrays are accelerated and use less memory than
3776 doing the same calculation in Python. In addition, its multi-threaded
3777 capabilities can make use of all your cores, which may accelerate
3778 computations, most specially if they are not memory-bounded (e.g. those using
3779 transcendental functions).")
3780 (license license:expat)))
3781
3782 (define-public python2-numexpr
3783 (package-with-python2 python-numexpr))
3784
3785 (define-public python-cycler
3786 (package
3787 (name "python-cycler")
3788 (version "0.10.0")
3789 (source (origin
3790 (method url-fetch)
3791 (uri (pypi-uri "cycler" version))
3792 (sha256
3793 (base32
3794 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3795 (build-system python-build-system)
3796 (arguments
3797 ;; XXX: The current version requires 'coveralls' which we don't have.
3798 ;; Enable this for the next release which uses 'python-pytest'.
3799 '(#:tests? #f))
3800 (propagated-inputs
3801 `(("python-six" ,python-six)))
3802 (home-page "http://matplotlib.org/cycler/")
3803 (synopsis "Composable keyword argument iterator")
3804 (description
3805 "When using @code{matplotlib} and plotting more than one line, it is
3806 common to want to be able to want to be able to cycle over one or more artist
3807 styles; but the plotting logic can quickly become involved.
3808 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3809 @code{Cycler} class was developed.")
3810 (license license:bsd-3)))
3811
3812 (define-public python2-cycler
3813 (package-with-python2 python-cycler))
3814
3815 (define-public python-colorspacious
3816 (package
3817 (name "python-colorspacious")
3818 (version "1.1.0")
3819 (source
3820 (origin
3821 (method git-fetch)
3822 (uri (git-reference
3823 (url "https://github.com/njsmith/colorspacious.git")
3824 (commit (string-append "v" version))))
3825 (file-name (git-file-name name version))
3826 (sha256
3827 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3828 (build-system python-build-system)
3829 (propagated-inputs
3830 `(("python-numpy" ,python-numpy)))
3831 (native-inputs
3832 `(("python-nose" ,python-nose)))
3833 (arguments
3834 `(#:phases
3835 (modify-phases %standard-phases
3836 (replace 'check
3837 (lambda _
3838 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3839 (home-page "https://github.com/njsmith/colorspacious")
3840 (synopsis "Python library for colorspace conversions")
3841 (description "@code{colorspacious} is a Python library that lets you
3842 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3843 (license license:expat)))
3844
3845 (define-public python2-colorspacious
3846 (package-with-python2 python-colorspacious))
3847
3848 (define-public python-matplotlib
3849 (package
3850 (name "python-matplotlib")
3851 (version "2.2.3")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "matplotlib" version))
3856 (sha256
3857 (base32
3858 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3859 (build-system python-build-system)
3860 (propagated-inputs ; the following packages are all needed at run time
3861 `(("python-cycler" ,python-cycler)
3862 ("python-kiwisolver" ,python-kiwisolver)
3863 ("python-pyparsing" ,python-pyparsing)
3864 ("python-pygobject" ,python-pygobject)
3865 ("gobject-introspection" ,gobject-introspection)
3866 ("python-tkinter" ,python "tk")
3867 ("python-dateutil" ,python-dateutil)
3868 ("python-numpy" ,python-numpy)
3869 ("python-pillow" ,python-pillow)
3870 ("python-pytz" ,python-pytz)
3871 ("python-six" ,python-six)
3872 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3873 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3874 ;; object. For this reason we need to import both libraries.
3875 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3876 ("python-pycairo" ,python-pycairo)
3877 ("python-cairocffi" ,python-cairocffi)))
3878 (inputs
3879 `(("libpng" ,libpng)
3880 ("imagemagick" ,imagemagick)
3881 ("freetype" ,freetype)
3882 ("cairo" ,cairo)
3883 ("glib" ,glib)
3884 ;; FIXME: Add backends when available.
3885 ;("python-wxpython" ,python-wxpython)
3886 ("tcl" ,tcl)
3887 ("tk" ,tk)))
3888 (native-inputs
3889 `(("pkg-config" ,pkg-config)
3890 ("python-nose" ,python-nose)
3891 ("python-mock" ,python-mock)))
3892 (arguments
3893 `(#:phases
3894 (modify-phases %standard-phases
3895 (add-before 'build 'configure-environment
3896 (lambda* (#:key outputs inputs #:allow-other-keys)
3897 (let ((cairo (assoc-ref inputs "cairo")))
3898 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3899 ;; has not effect.
3900 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3901 (setenv "HOME" (getcwd))
3902 (call-with-output-file "setup.cfg"
3903 (lambda (port)
3904 (format port "[directories]~%
3905 basedirlist = ~a,~a~%
3906 [rc_options]~%
3907 backend = TkAgg~%"
3908 (assoc-ref inputs "tcl")
3909 (assoc-ref inputs "tk")))))
3910 #t)))))
3911 (home-page "http://matplotlib.org")
3912 (synopsis "2D plotting library for Python")
3913 (description
3914 "Matplotlib is a Python 2D plotting library which produces publication
3915 quality figures in a variety of hardcopy formats and interactive environments
3916 across platforms. Matplotlib can be used in Python scripts, the python and
3917 ipython shell, web application servers, and six graphical user interface
3918 toolkits.")
3919 (license license:psfl)
3920 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3921
3922 (define-public python2-matplotlib
3923 (let ((matplotlib (package-with-python2
3924 (strip-python2-variant python-matplotlib))))
3925 (package (inherit matplotlib)
3926 ;; Make sure to use special packages for Python 2 instead
3927 ;; of those automatically rewritten by package-with-python2.
3928 (propagated-inputs
3929 `(("python2-pycairo" ,python2-pycairo)
3930 ("python2-backports-functools-lru-cache"
3931 ,python2-backports-functools-lru-cache)
3932 ("python2-functools32" ,python2-functools32)
3933 ("python2-pygobject-2" ,python2-pygobject-2)
3934 ("python2-subprocess32" ,python2-subprocess32)
3935 ("python2-tkinter" ,python-2 "tk")
3936 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3937 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3938
3939 (define-public python-matplotlib-documentation
3940 (package
3941 (name "python-matplotlib-documentation")
3942 (version (package-version python-matplotlib))
3943 (source (package-source python-matplotlib))
3944 (build-system python-build-system)
3945 (native-inputs
3946 `(("python-matplotlib" ,python-matplotlib)
3947 ("python-colorspacious" ,python-colorspacious)
3948 ("python-sphinx" ,python-sphinx)
3949 ("python-sphinx-gallery" ,python-sphinx-gallery)
3950 ("python-numpydoc" ,python-numpydoc)
3951 ("python-ipython" ,python-ipython)
3952 ("python-ipykernel" ,python-ipykernel)
3953 ("python-mock" ,python-mock)
3954 ("graphviz" ,graphviz)
3955 ("texlive" ,(texlive-union (list texlive-amsfonts
3956 texlive-latex-amsmath
3957 texlive-latex-enumitem
3958 texlive-latex-expdlist
3959 texlive-latex-geometry
3960 texlive-latex-preview
3961 texlive-latex-type1cm
3962 texlive-latex-ucs
3963
3964 texlive-generic-pdftex
3965
3966 texlive-fonts-ec
3967 texlive-fonts-adobe-times
3968 texlive-fonts-txfonts)))
3969 ("texinfo" ,texinfo)
3970 ,@(package-native-inputs python-matplotlib)))
3971 (arguments
3972 `(#:tests? #f ; we're only generating documentation
3973 #:phases
3974 (modify-phases %standard-phases
3975 (replace 'build
3976 (lambda _
3977 (chdir "doc")
3978 (setenv "PYTHONPATH"
3979 (string-append (getenv "PYTHONPATH")
3980 ":" (getcwd) "/../examples/units"))
3981 (substitute* "conf.py"
3982 ;; Don't use git.
3983 (("^SHA = check_output.*")
3984 (string-append "SHA = \"" ,version "\"\n"))
3985 ;; Don't fetch intersphinx files from the Internet
3986 (("^explicit_order_folders" m)
3987 (string-append "intersphinx_mapping = {}\n" m))
3988 (("'sphinx.ext.intersphinx',") "")
3989 ;; Disable URL embedding which requires internet access.
3990 (("'https://docs.scipy.org/doc/numpy'") "None")
3991 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3992 (invoke "make"
3993 "SPHINXBUILD=sphinx-build"
3994 "SPHINXOPTS=" ; don't abort on warnings
3995 "html" "texinfo")))
3996 (replace 'install
3997 (lambda* (#:key inputs outputs #:allow-other-keys)
3998 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3999 (doc (string-append data "/doc/python-matplotlib-" ,version))
4000 (info (string-append data "/info"))
4001 (html (string-append doc "/html")))
4002 (mkdir-p html)
4003 (mkdir-p info)
4004 (copy-recursively "build/html" html)
4005 (symlink (string-append html "/_images")
4006 (string-append info "/matplotlib-figures"))
4007 (with-directory-excursion "build/texinfo"
4008 (substitute* "matplotlib.texi"
4009 (("@image\\{([^,]*)" all file)
4010 (string-append "@image{matplotlib-figures/" file)))
4011 (symlink (string-append html "/_images")
4012 "./matplotlib-figures")
4013 (invoke "makeinfo" "--no-split"
4014 "-o" "matplotlib.info" "matplotlib.texi"))
4015 (install-file "build/texinfo/matplotlib.info" info))
4016 #t)))))
4017 (home-page (package-home-page python-matplotlib))
4018 (synopsis "Documentation for the python-matplotlib package")
4019 (description (package-description python-matplotlib))
4020 (license (package-license python-matplotlib))))
4021
4022 (define-public python2-matplotlib-documentation
4023 (package-with-python2 python-matplotlib-documentation))
4024
4025 (define-public python-matplotlib-venn
4026 (package
4027 (name "python-matplotlib-venn")
4028 (version "0.11.5")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4033 (sha256
4034 (base32
4035 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4036 (build-system python-build-system)
4037 (arguments '(#:tests? #f)) ; tests are not included
4038 (propagated-inputs
4039 `(("python-matplotlib" ,python-matplotlib)
4040 ("python-numpy" ,python-numpy)
4041 ("python-scipy" ,python-scipy)))
4042 (native-inputs
4043 `(("unzip" ,unzip)))
4044 (home-page "https://github.com/konstantint/matplotlib-venn")
4045 (synopsis "Plot area-proportional Venn diagrams")
4046 (description
4047 "This package provides tools for plotting area-proportional two- and
4048 three-way Venn diagrams in @code{matplotlib}.")
4049 (license license:expat)))
4050
4051 (define-public python2-pysnptools
4052 (package
4053 (name "python2-pysnptools")
4054 (version "0.3.13")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (pypi-uri "pysnptools" version))
4059 (sha256
4060 (base32
4061 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4062 (build-system python-build-system)
4063 (arguments
4064 `(#:python ,python-2 ; only Python 2.7 is supported
4065 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4066 (propagated-inputs
4067 `(("python2-numpy" ,python2-numpy)
4068 ("python2-scipy" ,python2-scipy)
4069 ("python2-pandas" ,python2-pandas)))
4070 (native-inputs
4071 `(("python2-cython" ,python2-cython)))
4072 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4073 (synopsis "Library for reading and manipulating genetic data")
4074 (description
4075 "PySnpTools is a library for reading and manipulating genetic data. It
4076 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4077 those files. It can also efficiently manipulate ranges of integers using set
4078 operators such as union, intersection, and difference.")
4079 (license license:asl2.0)))
4080
4081 (define-public python-scipy
4082 (package
4083 (name "python-scipy")
4084 (version "1.2.2")
4085 (source
4086 (origin
4087 (method url-fetch)
4088 (uri (pypi-uri "scipy" version))
4089 (sha256
4090 (base32
4091 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4092 (build-system python-build-system)
4093 (propagated-inputs
4094 `(("python-numpy" ,python-numpy)
4095 ("python-matplotlib" ,python-matplotlib)
4096 ("python-pyparsing" ,python-pyparsing)))
4097 (inputs
4098 `(("lapack" ,lapack)
4099 ("openblas" ,openblas)))
4100 (native-inputs
4101 `(("python-cython" ,python-cython)
4102 ("python-pytest" ,python-pytest)
4103 ("python-sphinx" ,python-sphinx)
4104 ("python-numpydoc" ,python-numpydoc)
4105 ("gfortran" ,gfortran)
4106 ("perl" ,perl)
4107 ("which" ,which)))
4108 (outputs '("out" "doc"))
4109 (arguments
4110 `(#:phases
4111 (modify-phases %standard-phases
4112 (add-after 'unpack 'disable-broken-tests
4113 (lambda _
4114 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4115 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4116 (string-append indent
4117 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4118 m)))
4119 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4120 (("^def test_parallel_threads\\(\\):" m)
4121 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4122 m)))
4123 #t))
4124 (add-before 'build 'configure-openblas
4125 (lambda* (#:key inputs #:allow-other-keys)
4126 (call-with-output-file "site.cfg"
4127 (lambda (port)
4128 (format port
4129 "[blas]
4130 libraries = openblas
4131 library_dirs = ~a/lib
4132 include_dirs = ~a/include
4133
4134 # backslash-n to make emacs happy
4135 \n[atlas]
4136 library_dirs = ~a/lib
4137 atlas_libs = openblas
4138 "
4139 (assoc-ref inputs "openblas")
4140 (assoc-ref inputs "openblas")
4141 (assoc-ref inputs "openblas"))))
4142 #t))
4143 (add-after 'install 'install-doc
4144 (lambda* (#:key inputs outputs #:allow-other-keys)
4145 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4146 (doc (string-append data "/doc/" ,name "-" ,version))
4147 (html (string-append doc "/html"))
4148 (pyver ,(string-append "PYVER=" (version-major+minor
4149 (package-version python))))
4150 ;; By default it tries to run sphinx-build through the Python
4151 ;; interpreter which won't work with our shell wrapper.
4152 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4153 ;; Make installed package available for building the
4154 ;; documentation
4155 (add-installed-pythonpath inputs outputs)
4156 (with-directory-excursion "doc"
4157 ;; Fix generation of images for mathematical expressions.
4158 (substitute* (find-files "source" "conf\\.py")
4159 (("pngmath_use_preview = True")
4160 "pngmath_use_preview = False"))
4161 (mkdir-p html)
4162 (invoke "make" "html" pyver sphinxbuild)
4163 (with-directory-excursion "build/html"
4164 (for-each (lambda (file)
4165 (let* ((dir (dirname file))
4166 (tgt-dir (string-append html "/" dir)))
4167 (install-file file html)))
4168 (find-files "." ".*")))))
4169 #t))
4170 ;; Tests can only be run after the library has been installed and not
4171 ;; within the source directory.
4172 (delete 'check)
4173 (add-after 'install 'check
4174 (lambda* (#:key inputs outputs #:allow-other-keys)
4175 (add-installed-pythonpath inputs outputs)
4176 (with-directory-excursion "/tmp"
4177 (invoke "python" "-c"
4178 "import scipy; scipy.test(verbose=2)")))))))
4179 (home-page "https://www.scipy.org/")
4180 (synopsis "The Scipy library provides efficient numerical routines")
4181 (description "The SciPy library is one of the core packages that make up
4182 the SciPy stack. It provides many user-friendly and efficient numerical
4183 routines such as routines for numerical integration and optimization.")
4184 (properties `((python2-variant . ,(delay python2-scipy))))
4185 (license license:bsd-3)))
4186
4187 (define-public python2-scipy
4188 (package-with-python2
4189 (strip-python2-variant python-scipy)))
4190
4191 (define-public python-socksipy-branch
4192 (package
4193 (name "python-socksipy-branch")
4194 (version "1.01")
4195 (source
4196 (origin
4197 (method url-fetch)
4198 (uri (pypi-uri "SocksiPy-branch" version))
4199 (sha256
4200 (base32
4201 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4202 (build-system python-build-system)
4203 (arguments
4204 `(#:tests? #f)) ; There are no tests
4205 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4206 (synopsis "Python SOCKS module")
4207 (description
4208 "SocksiPy - A Python SOCKS client module. It provides a
4209 socket-like interface that supports connections to any TCP
4210 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4211 The original version was developed by Dan Haim, this is a
4212 branch created by Mario Vilas to address some open issues,
4213 as the original project seems to have been abandoned circa 2007.")
4214 (license license:bsd-3)))
4215
4216 (define-public python2-socksipy-branch
4217 (package-with-python2 python-socksipy-branch))
4218
4219 (define-public python-pycodestyle
4220 (package
4221 (name "python-pycodestyle")
4222 (version "2.5.0")
4223 (source
4224 (origin
4225 (method url-fetch)
4226 (uri (pypi-uri "pycodestyle" version))
4227 (sha256
4228 (base32
4229 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4230 (build-system python-build-system)
4231 (home-page "https://pycodestyle.readthedocs.io/")
4232 (synopsis "Python style guide checker")
4233 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4234 Python code against some of the style conventions in
4235 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4236 (license license:expat)))
4237
4238 (define-public python2-pycodestyle
4239 (package-with-python2 python-pycodestyle))
4240
4241 (define-public python-multidict
4242 (package
4243 (name "python-multidict")
4244 (version "4.2.0")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (pypi-uri "multidict" version))
4249 (sha256
4250 (base32
4251 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4252 (build-system python-build-system)
4253 (native-inputs
4254 `(("python-pytest" ,python-pytest)
4255 ("python-pytest-runner" ,python-pytest-runner)))
4256 (home-page "https://github.com/aio-libs/multidict/")
4257 (synopsis "Multidict implementation")
4258 (description "Multidict is dict-like collection of key-value pairs
4259 where key might be occurred more than once in the container.")
4260 (license license:asl2.0)))
4261
4262 (define-public python-orderedmultidict
4263 (package
4264 (name "python-orderedmultidict")
4265 (version "0.7.11")
4266 (source
4267 (origin
4268 (method url-fetch)
4269 (uri (pypi-uri "orderedmultidict" version))
4270 (sha256
4271 (base32
4272 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4273 (build-system python-build-system)
4274 (arguments
4275 `(#:phases
4276 (modify-phases %standard-phases
4277 (add-after 'unpack 'fix-tests
4278 (lambda _
4279 ;; The package uses nosetest for running the tests.
4280 ;; Adding this initfile allows to run the test suite
4281 ;; without requiring nosetest.
4282 (with-output-to-file "tests/__init__.py" newline)
4283 #t)))))
4284 (propagated-inputs
4285 `(("python-six" ,python-six)))
4286 (native-inputs
4287 `(("python-pycodestyle" ,python-pycodestyle)))
4288 (home-page "https://github.com/gruns/orderedmultidict")
4289 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4290 (description "This package contains a library for ordered multivalue
4291 dictionaries. A multivalue dictionary is a dictionary that can store
4292 multiple values for the same key. An ordered multivalue dictionary is a
4293 multivalue dictionary that retains the order of insertions and deletions.")
4294 (license license:unlicense)))
4295
4296 (define-public python2-orderedmultidict
4297 (package-with-python2 python-orderedmultidict))
4298
4299 (define-public python-autopep8
4300 (package
4301 (name "python-autopep8")
4302 (version "1.3.5")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (pypi-uri "autopep8" version))
4307 (sha256
4308 (base32
4309 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4310 (build-system python-build-system)
4311 (propagated-inputs
4312 `(("python-pycodestyle" ,python-pycodestyle)))
4313 (home-page "https://github.com/hhatto/autopep8")
4314 (synopsis "Format Python code according to the PEP 8 style guide")
4315 (description
4316 "@code{autopep8} automatically formats Python code to conform to
4317 the PEP 8 style guide. It uses the pycodestyle utility to determine
4318 what parts of the code needs to be formatted. @code{autopep8} is
4319 capable of fixing most of the formatting issues that can be reported
4320 by pycodestyle.")
4321 (license (license:non-copyleft
4322 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4323
4324 (define-public python2-autopep8
4325 (package-with-python2 python-autopep8))
4326
4327 (define-public python-distutils-extra
4328 (package
4329 (name "python-distutils-extra")
4330 (version "2.38")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4335 version "/+download/python-distutils-extra-"
4336 version ".tar.gz"))
4337 (sha256
4338 (base32
4339 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4340 (build-system python-build-system)
4341 (home-page "https://launchpad.net/python-distutils-extra/")
4342 (synopsis "Enhancements to Python's distutils")
4343 (description
4344 "The python-distutils-extra module enables you to easily integrate
4345 gettext support, themed icons, and scrollkeeper-based documentation into
4346 Python's distutils.")
4347 (license license:gpl2)))
4348
4349 (define-public python2-distutils-extra
4350 (package-with-python2 python-distutils-extra))
4351
4352 (define-public python2-elib.intl
4353 (package
4354 (name "python2-elib.intl")
4355 (version "0.0.3")
4356 (source
4357 (origin
4358 ;; This project doesn't tag releases or publish tarballs, so we take
4359 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4360 (method git-fetch)
4361 (uri (git-reference
4362 (url "https://github.com/dieterv/elib.intl.git")
4363 (commit "d09997cfef")))
4364 (file-name (string-append name "-" version "-checkout"))
4365 (sha256
4366 (base32
4367 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4368 (build-system python-build-system)
4369 (arguments
4370 ;; incompatible with Python 3 (exception syntax)
4371 `(#:python ,python-2
4372 #:tests? #f))
4373 (home-page "https://github.com/dieterv/elib.intl")
4374 (synopsis "Enhanced internationalization for Python")
4375 (description
4376 "The elib.intl module provides enhanced internationalization (I18N)
4377 services for your Python modules and applications.")
4378 (license license:lgpl3+)))
4379
4380 (define-public python-olefile
4381 (package
4382 (name "python-olefile")
4383 (version "0.46")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4388 "download/v" version "/olefile-" version ".tar.gz"))
4389 (file-name (string-append name "-" version ".tar.gz"))
4390 (sha256
4391 (base32
4392 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4393 (build-system python-build-system)
4394 (home-page "https://www.decalage.info/python/olefileio")
4395 (synopsis "Read and write Microsoft OLE2 files.")
4396 (description
4397 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4398 Storage or Compound Document, Microsoft Office). It is an improved version of
4399 the OleFileIO module from PIL, the Python Image Library.")
4400 (license license:bsd-3)))
4401
4402 (define-public python2-olefile
4403 (package-with-python2 python-olefile))
4404
4405 (define-public python-pillow
4406 (package
4407 (name "python-pillow")
4408 (version "6.1.0")
4409 (source
4410 (origin
4411 (method url-fetch)
4412 (uri (pypi-uri "Pillow" version))
4413 (sha256
4414 (base32
4415 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4416 (build-system python-build-system)
4417 (native-inputs
4418 `(("python-pytest" ,python-pytest)))
4419 (inputs
4420 `(("freetype" ,freetype)
4421 ("lcms" ,lcms)
4422 ("zlib" ,zlib)
4423 ("libjpeg" ,libjpeg)
4424 ("openjpeg" ,openjpeg)
4425 ("libtiff" ,libtiff)
4426 ("libwebp" ,libwebp)))
4427 (propagated-inputs
4428 `(("python-olefile" ,python-olefile)))
4429 (arguments
4430 `(#:phases
4431 (modify-phases %standard-phases
4432 (add-after 'unpack 'patch-ldconfig
4433 (lambda _
4434 (substitute* "setup.py"
4435 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4436 (delete 'check) ; We must run checks after python-pillow is installed.
4437 (add-after 'install 'check-installed
4438 (lambda* (#:key outputs inputs #:allow-other-keys)
4439 (begin
4440 (setenv "HOME" (getcwd))
4441 ;; Make installed package available for running the tests.
4442 (add-installed-pythonpath inputs outputs)
4443 (invoke "python" "selftest.py" "--installed")
4444 (invoke "python" "-m" "pytest" "-vv")))))))
4445 (home-page "https://python-pillow.org")
4446 (synopsis "Fork of the Python Imaging Library")
4447 (description
4448 "The Python Imaging Library adds image processing capabilities to your
4449 Python interpreter. This library provides extensive file format support, an
4450 efficient internal representation, and fairly powerful image processing
4451 capabilities. The core image library is designed for fast access to data
4452 stored in a few basic pixel formats. It should provide a solid foundation for
4453 a general image processing tool.")
4454 (license (license:x11-style
4455 "http://www.pythonware.com/products/pil/license.htm"
4456 "The PIL Software License"))))
4457
4458 (define-public python2-pillow
4459 (package-with-python2 python-pillow))
4460
4461 (define-public python-pycparser
4462 (package
4463 (name "python-pycparser")
4464 (version "2.19")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (pypi-uri "pycparser" version))
4469 (sha256
4470 (base32
4471 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4472 (outputs '("out" "doc"))
4473 (build-system python-build-system)
4474 (native-inputs
4475 `(("pkg-config" ,pkg-config)))
4476 (arguments
4477 `(#:phases
4478 (modify-phases %standard-phases
4479 (replace 'check
4480 (lambda _
4481 (with-directory-excursion "tests"
4482 (invoke "python" "all_tests.py"))
4483 #t))
4484 (add-after 'install 'install-doc
4485 (lambda* (#:key outputs #:allow-other-keys)
4486 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4487 (doc (string-append data "/doc/" ,name "-" ,version))
4488 (examples (string-append doc "/examples")))
4489 (mkdir-p examples)
4490 (for-each (lambda (file)
4491 (copy-file (string-append "." file)
4492 (string-append doc file)))
4493 '("/README.rst" "/CHANGES" "/LICENSE"))
4494 (copy-recursively "examples" examples)
4495 #t))))))
4496 (home-page "https://github.com/eliben/pycparser")
4497 (synopsis "C parser in Python")
4498 (description
4499 "Pycparser is a complete parser of the C language, written in pure Python
4500 using the PLY parsing library. It parses C code into an AST and can serve as
4501 a front-end for C compilers or analysis tools.")
4502 (license license:bsd-3)))
4503
4504 (define-public python2-pycparser
4505 (package-with-python2 python-pycparser))
4506
4507 (define-public python-pywavelets
4508 (package
4509 (name "python-pywavelets")
4510 (version "1.0.1")
4511 (home-page "https://github.com/PyWavelets/pywt")
4512 (source (origin
4513 (method url-fetch)
4514 (uri (pypi-uri "PyWavelets" version))
4515 (sha256
4516 (base32
4517 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4518 (build-system python-build-system)
4519 (arguments
4520 '(#:modules ((ice-9 ftw)
4521 (srfi srfi-1)
4522 (srfi srfi-26)
4523 (guix build utils)
4524 (guix build python-build-system))
4525 #:phases (modify-phases %standard-phases
4526 (replace 'check
4527 (lambda _
4528 (let ((cwd (getcwd))
4529 (libdir (find (cut string-prefix? "lib." <>)
4530 (scandir "build"))))
4531 (with-directory-excursion (string-append cwd "/build/" libdir)
4532 (invoke "nosetests" "-v" "."))))))))
4533 (native-inputs
4534 `(("python-matplotlib" ,python-matplotlib) ;for tests
4535 ("python-nose" ,python-nose)))
4536 (propagated-inputs
4537 `(("python-numpy" ,python-numpy)))
4538 (synopsis "Wavelet transforms in Python")
4539 (description
4540 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4541 mathematical basis functions that are localized in both time and frequency.
4542 Wavelet transforms are time-frequency transforms employing wavelets. They are
4543 similar to Fourier transforms, the difference being that Fourier transforms are
4544 localized only in frequency instead of in time and frequency.")
4545 (license license:expat)))
4546
4547 (define-public python2-pywavelets
4548 (package-with-python2 python-pywavelets))
4549
4550 (define-public python-xcffib
4551 (package
4552 (name "python-xcffib")
4553 (version "0.6.0")
4554 (source
4555 (origin
4556 (method url-fetch)
4557 (uri (pypi-uri "xcffib" version))
4558 (sha256
4559 (base32
4560 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4561 (build-system python-build-system)
4562 (inputs
4563 `(("libxcb" ,libxcb)))
4564 (propagated-inputs
4565 `(("python-cffi" ,python-cffi) ; used at run time
4566 ("python-six" ,python-six)))
4567 (arguments
4568 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4569 #:tests? #f
4570 #:phases
4571 (modify-phases %standard-phases
4572 (add-after 'unpack 'fix-libxcb-path
4573 (lambda* (#:key inputs #:allow-other-keys)
4574 (let ((libxcb (assoc-ref inputs "libxcb")))
4575 (substitute* '("xcffib/__init__.py")
4576 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4577 #t)))
4578 (add-after 'install 'install-doc
4579 (lambda* (#:key outputs #:allow-other-keys)
4580 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4581 "/doc/" ,name "-" ,version)))
4582 (mkdir-p doc)
4583 (copy-file "README.md"
4584 (string-append doc "/README.md"))
4585 #t))))))
4586 (home-page "https://github.com/tych0/xcffib")
4587 (synopsis "XCB Python bindings")
4588 (description
4589 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4590 support for Python 3 and PyPy. It is based on cffi.")
4591 (license license:expat)))
4592
4593 (define-public python2-xcffib
4594 (package-with-python2 python-xcffib))
4595
4596 (define-public python-cairocffi
4597 (package
4598 (name "python-cairocffi")
4599 (version "0.9.0")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "cairocffi" version))
4604 (sha256
4605 (base32
4606 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4607 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4608 (build-system python-build-system)
4609 (outputs '("out" "doc"))
4610 (inputs
4611 `(("glib" ,glib)
4612 ("gtk+" ,gtk+)
4613 ("gdk-pixbuf" ,gdk-pixbuf)
4614 ("cairo" ,cairo)
4615 ("pango" ,pango)))
4616 (native-inputs
4617 `(("pkg-config" ,pkg-config)
4618 ("python-pytest" ,python-pytest)
4619 ("python-pytest-cov" ,python-pytest-cov)
4620 ("python-pytest-runner" ,python-pytest-runner)
4621 ("python-sphinx" ,python-sphinx)
4622 ("python-docutils" ,python-docutils)))
4623 (propagated-inputs
4624 `(("python-xcffib" ,python-xcffib))) ; used at run time
4625 (arguments
4626 `(#:phases
4627 (modify-phases %standard-phases
4628 (add-after 'unpack 'patch-paths
4629 (lambda* (#:key inputs outputs #:allow-other-keys)
4630 (substitute* (find-files "." "\\.py$")
4631 (("dlopen\\(ffi, 'cairo'")
4632 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4633 "/lib/libcairo.so.2'"))
4634 (("dlopen\\(ffi, 'gdk-3'")
4635 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4636 "/lib/libgtk-3.so.0'"))
4637 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4638 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4639 "/lib/libgdk_pixbuf-2.0.so.0'"))
4640 (("dlopen\\(ffi, 'glib-2.0'")
4641 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4642 "/lib/libglib-2.0.so.0'"))
4643 (("dlopen\\(ffi, 'gobject-2.0'")
4644 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4645 "/lib/libgobject-2.0.so.0'"))
4646 (("dlopen\\(ffi, 'pangocairo-1.0'")
4647 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4648 "/lib/libpangocairo-1.0.so.0'"))
4649 (("dlopen\\(ffi, 'pango-1.0'")
4650 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4651 "/lib/libpango-1.0.so.0'")))
4652 #t))
4653 (add-after 'install 'install-doc
4654 (lambda* (#:key inputs outputs #:allow-other-keys)
4655 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4656 (doc (string-append data "/doc/" ,name "-" ,version))
4657 (html (string-append doc "/html")))
4658 (setenv "LD_LIBRARY_PATH"
4659 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4660 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4661 (setenv "LANG" "en_US.UTF-8")
4662 (mkdir-p html)
4663 (for-each (lambda (file)
4664 (copy-file (string-append "." file)
4665 (string-append doc file)))
4666 '("/README.rst" "/CHANGES" "/LICENSE"))
4667 (system* "python" "setup.py" "build_sphinx")
4668 (copy-recursively "docs/_build/html" html)
4669 #t))))))
4670 (home-page "https://github.com/Kozea/cairocffi")
4671 (synopsis "Python bindings and object-oriented API for Cairo")
4672 (description
4673 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4674 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4675 graphics library with support for multiple backends including image buffers,
4676 PNG, PostScript, PDF, and SVG file output.")
4677 (license license:bsd-3)))
4678
4679 (define-public python2-cairocffi
4680 (package-with-python2 python-cairocffi))
4681
4682 (define-public python-decorator
4683 (package
4684 (name "python-decorator")
4685 (version "4.3.0")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "decorator" version))
4690 (sha256
4691 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4692 (build-system python-build-system)
4693 (home-page "https://pypi.python.org/pypi/decorator/")
4694 (synopsis "Python module to simplify usage of decorators")
4695 (description
4696 "The aim of the decorator module is to simplify the usage of decorators
4697 for the average programmer, and to popularize decorators usage giving examples
4698 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4699 etc. The core of this module is a decorator factory.")
4700 (license license:expat)))
4701
4702 (define-public python2-decorator
4703 (package-with-python2 python-decorator))
4704
4705 (define-public python-drmaa
4706 (package
4707 (name "python-drmaa")
4708 (version "0.7.7")
4709 (source
4710 (origin
4711 (method url-fetch)
4712 (uri (pypi-uri "drmaa" version))
4713 (sha256
4714 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4715 (build-system python-build-system)
4716 ;; The test suite requires libdrmaa which is provided by the cluster
4717 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4718 ;; should be set to the path of the libdrmaa library.
4719 (arguments '(#:tests? #f))
4720 (native-inputs
4721 `(("python-nose" ,python-nose)))
4722 (home-page "https://pypi.python.org/pypi/drmaa")
4723 (synopsis "Python bindings for the DRMAA library")
4724 (description
4725 "A Python package for Distributed Resource Management (DRM) job
4726 submission and control. This package is an implementation of the DRMAA 1.0
4727 Python language binding specification.")
4728 (license license:bsd-3)))
4729
4730 (define-public python2-drmaa
4731 (package-with-python2 python-drmaa))
4732
4733 (define-public python-grako
4734 (package
4735 (name "python-grako")
4736 (version "3.99.9")
4737 (source
4738 (origin
4739 (method url-fetch)
4740 (uri
4741 (pypi-uri "grako" version ".zip"))
4742 (sha256
4743 (base32
4744 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4745 (build-system python-build-system)
4746 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4747 (native-inputs
4748 `(("unzip" ,unzip)
4749 ("python-pytest" ,python-pytest)
4750 ("python-pytest-runner" ,python-pytest-runner)))
4751 (home-page "https://bitbucket.org/neogeny/grako")
4752 (synopsis "EBNF parser generator")
4753 (description
4754 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4755 memoizing PEG/Packrat parser in Python.")
4756 (license license:bsd-3)))
4757
4758 (define-public python2-grako
4759 (package-with-python2 python-grako))
4760
4761 (define-public python-gridmap
4762 (package
4763 (name "python-gridmap")
4764 (version "0.13.0")
4765 (source
4766 (origin
4767 (method git-fetch)
4768 (uri (git-reference
4769 (url "https://github.com/pygridtools/gridmap.git")
4770 (commit (string-append "v" version))))
4771 (file-name (git-file-name name version))
4772 (sha256
4773 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4774 (build-system python-build-system)
4775 (arguments
4776 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4777 (propagated-inputs
4778 `(("python-psutil" ,python-psutil)
4779 ("python-drmaa" ,python-drmaa)
4780 ("python-pyzmq" ,python-pyzmq)))
4781 (home-page "https://github.com/pygridtools/gridmap")
4782 (synopsis "Create jobs on a cluster directly from Python")
4783 (description
4784 "Gridmap is a Python package to allow you to easily create jobs on the
4785 cluster directly from Python. You can directly map Python functions onto the
4786 cluster without needing to write any wrapper code yourself.")
4787 (license license:gpl3+)))
4788
4789 (define-public python2-gridmap
4790 (package-with-python2 python-gridmap))
4791
4792 (define-public python-honcho
4793 (package
4794 (name "python-honcho")
4795 (version "1.0.1")
4796 (source
4797 (origin
4798 (method git-fetch)
4799 (uri (git-reference
4800 (url "https://github.com/nickstenning/honcho.git")
4801 (commit (string-append "v" version))))
4802 (file-name (git-file-name name version))
4803 (sha256
4804 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4805 (build-system python-build-system)
4806 (native-inputs
4807 `(("python-pytest" ,python-pytest)
4808 ("python-mock" ,python-mock)
4809 ("python-tox" ,python-tox)
4810 ("which" ,which))) ;for tests
4811 (propagated-inputs
4812 `(("python-jinja2" ,python-jinja2)))
4813 (arguments
4814 `(#:phases
4815 (modify-phases %standard-phases
4816 (delete 'check)
4817 (add-after 'install 'check
4818 (lambda* (#:key outputs inputs #:allow-other-keys)
4819 ;; fix honcho path in testsuite
4820 (substitute* "tests/conftest.py"
4821 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4822 "/bin/honcho" "'")))
4823 ;; It's easier to run tests after install.
4824 ;; Make installed package available for running the tests
4825 (add-installed-pythonpath inputs outputs)
4826 (invoke "py.test" "-v"))))))
4827 (home-page "https://github.com/nickstenning/honcho")
4828 (synopsis "Manage Procfile-based applications")
4829 (description
4830 "A Procfile is a file which describes how to run an application
4831 consisting of several processes. honcho starts all listed processes.
4832 The output of all running processes is collected by honcho and
4833 displayed.")
4834 (license license:expat)))
4835
4836 (define-public python2-honcho
4837 (package-with-python2 python-honcho))
4838
4839 (define-public python-pexpect
4840 (package
4841 (name "python-pexpect")
4842 (version "4.6.0")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "pexpect" version))
4847 (sha256
4848 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4849 (build-system python-build-system)
4850 (arguments
4851 `(#:phases
4852 (modify-phases %standard-phases
4853 (add-before 'check 'prepare-tests
4854 (lambda _
4855 (substitute* (find-files "tests")
4856 (("/bin/ls") (which "ls"))
4857 (("/bin/echo") (which "echo"))
4858 (("/bin/which") (which "which"))
4859 ;; Many tests try to use the /bin directory which
4860 ;; is not present in the build environment.
4861 ;; Use one that's non-empty and unlikely to change.
4862 (("/bin'") "/dev'"))
4863 ;; XXX: Socket connection test gets "Connection reset by peer".
4864 ;; Why does it not work? Delete for now.
4865 (delete-file "tests/test_socket.py")
4866 #t))
4867 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4868 (native-inputs
4869 `(("python-nose" ,python-nose)
4870 ("python-pytest" ,python-pytest)
4871 ("man-db" ,man-db)
4872 ("which" ,which)
4873 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4874 (propagated-inputs
4875 `(("python-ptyprocess" ,python-ptyprocess)))
4876 (home-page "http://pexpect.readthedocs.org/")
4877 (synopsis "Controlling interactive console applications")
4878 (description
4879 "Pexpect is a pure Python module for spawning child applications;
4880 controlling them; and responding to expected patterns in their output.
4881 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4882 child application and control it as if a human were typing commands.")
4883 (license license:isc)))
4884
4885 (define-public python2-pexpect
4886 (package-with-python2 python-pexpect))
4887
4888 (define-public python-setuptools-scm
4889 (package
4890 (name "python-setuptools-scm")
4891 (version "3.2.0")
4892 (source (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "setuptools_scm" version))
4895 (sha256
4896 (base32
4897 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4898 (build-system python-build-system)
4899 (home-page "https://github.com/pypa/setuptools_scm/")
4900 (synopsis "Manage Python package versions in SCM metadata")
4901 (description
4902 "Setuptools_scm handles managing your Python package versions in
4903 @dfn{software configuration management} (SCM) metadata instead of declaring
4904 them as the version argument or in a SCM managed file.")
4905 (license license:expat)))
4906
4907 (define-public python2-setuptools-scm
4908 (package-with-python2 python-setuptools-scm))
4909
4910 (define-public python-pathlib2
4911 (package
4912 (name "python-pathlib2")
4913 (version "2.3.3")
4914 (source
4915 (origin
4916 (method url-fetch)
4917 (uri (pypi-uri "pathlib2" version))
4918 (sha256
4919 (base32
4920 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4921 (build-system python-build-system)
4922 (propagated-inputs
4923 `(("python-scandir" ,python-scandir)
4924 ("python-six" ,python-six)))
4925 (home-page "https://pypi.python.org/pypi/pathlib2/")
4926 (synopsis "Object-oriented file system paths")
4927 (description "The goal of pathlib2 is to provide a backport of the
4928 standard @code{pathlib} module which tracks the standard library module, so
4929 all the newest features of the standard @code{pathlib} can be used also on
4930 older Python versions.")
4931 (license license:expat)))
4932
4933 (define-public python-importlib-metadata
4934 (package
4935 (name "python-importlib-metadata")
4936 (version "0.18")
4937 (source
4938 (origin
4939 (method url-fetch)
4940 (uri (pypi-uri "importlib_metadata" version))
4941 (sha256
4942 (base32
4943 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4944 (build-system python-build-system)
4945 (propagated-inputs
4946 `(("python-configparser" ,python-configparser)
4947 ("python-contextlib2" ,python-contextlib2)
4948 ("python-docutils" ,python-docutils)
4949 ("python-pathlib2" ,python-pathlib2)
4950 ("python-rst.linker" ,python-rst.linker)
4951 ("python-zipp" ,python-zipp)))
4952 (native-inputs
4953 `(("python-setuptools-scm" ,python-setuptools-scm)
4954 ("python-sphinx" ,python-sphinx)))
4955 (home-page "https://importlib-metadata.readthedocs.io/")
4956 (synopsis "Read metadata from Python packages")
4957 (description
4958 "@code{importlib_metadata} is a library which provides an API for
4959 accessing an installed Python package's metadata, such as its entry points or
4960 its top-level name. This functionality intends to replace most uses of
4961 @code{pkg_resources} entry point API and metadata API. Along with
4962 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4963 need to use the older and less efficient @code{pkg_resources} package.")
4964 (license license:asl2.0)))
4965
4966 (define-public python-jaraco-packaging
4967 (package
4968 (name "python-jaraco-packaging")
4969 (version "6.1")
4970 (source
4971 (origin
4972 (method url-fetch)
4973 (uri (pypi-uri "jaraco.packaging" version))
4974 (sha256
4975 (base32
4976 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4977 (build-system python-build-system)
4978 (propagated-inputs
4979 `(("python-pytest" ,python-pytest)
4980 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4981 ("python-pytest-flake8" ,python-pytest-flake8)
4982 ("python-rst.linker" ,python-rst.linker)
4983 ("python-setuptools" ,python-setuptools)
4984 ("python-setuptools-scm" ,python-setuptools-scm)
4985 ("python-six" ,python-six)
4986 ("python-sphinx" ,python-sphinx)))
4987 (home-page "https://github.com/jaraco/jaraco.packaging")
4988 (synopsis "Tools to supplement packaging Python releases")
4989 (description
4990 "This package provides various tools to supplement packaging Python
4991 releases.")
4992 (license license:expat)))
4993
4994 (define-public python-pathpy
4995 (package
4996 (name "python-pathpy")
4997 (version "11.5.0")
4998 (source
4999 (origin
5000 (method url-fetch)
5001 (uri (pypi-uri "path.py" version))
5002 (sha256
5003 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5004 (outputs '("out" "doc"))
5005 (build-system python-build-system)
5006 (propagated-inputs
5007 `(("python-appdirs" ,python-appdirs)))
5008 (native-inputs
5009 `(("python-setuptools-scm" ,python-setuptools-scm)
5010 ("python-sphinx" ,python-sphinx)
5011 ("python-rst.linker" ,python-rst.linker)
5012 ("python-pytest" ,python-pytest)
5013 ("python-pytest-runner" ,python-pytest-runner)
5014 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5015 (arguments
5016 `(#:phases
5017 (modify-phases %standard-phases
5018 (add-after 'build 'build-doc
5019 (lambda _
5020 (setenv "LANG" "en_US.UTF-8")
5021 (invoke "python" "setup.py" "build_sphinx")))
5022 (add-after 'install 'install-doc
5023 (lambda* (#:key outputs #:allow-other-keys)
5024 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5025 (doc (string-append data "/doc/" ,name "-" ,version))
5026 (html (string-append doc "/html")))
5027 (mkdir-p html)
5028 (for-each (lambda (file)
5029 (copy-file file (string-append doc "/" file)))
5030 '("README.rst" "CHANGES.rst"))
5031 (copy-recursively "build/sphinx/html" html)
5032 #t)))
5033 (replace 'check
5034 (lambda _
5035 ;; The import time test aborts if an import takes longer than
5036 ;; 100ms. It may very well take a little longer than that.
5037 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5038 (home-page "https://github.com/jaraco/path.py")
5039 (synopsis "Python module wrapper for built-in os.path")
5040 (description
5041 "@code{path.py} implements path objects as first-class entities, allowing
5042 common operations on files to be invoked on those path objects directly.")
5043 (license license:expat)))
5044
5045 (define-public python2-pathpy
5046 (package-with-python2 python-pathpy))
5047
5048 (define-public python-simplegeneric
5049 (package
5050 (name "python-simplegeneric")
5051 (version "0.8.1")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "simplegeneric" version ".zip"))
5056 (sha256
5057 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5058 (build-system python-build-system)
5059 (native-inputs
5060 `(("unzip" ,unzip)))
5061 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5062 (synopsis "Python module for simple generic functions")
5063 (description
5064 "The simplegeneric module lets you define simple single-dispatch generic
5065 functions, akin to Python’s built-in generic functions like @code{len()},
5066 @code{iter()} and so on. However, instead of using specially-named methods,
5067 these generic functions use simple lookup tables, akin to those used by
5068 e.g. @code{pickle.dump()} and other generic functions found in the Python
5069 standard library.")
5070 (license license:zpl2.1)))
5071
5072 (define-public python2-simplegeneric
5073 (package-with-python2 python-simplegeneric))
5074
5075 (define-public python-ipython-genutils
5076 ;; TODO: This package is retired, check if can be removed, see description.
5077 (package
5078 (name "python-ipython-genutils")
5079 (version "0.1.0")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (pypi-uri "ipython_genutils" version))
5084 (sha256
5085 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5086 (build-system python-build-system)
5087 (arguments `(#:tests? #f)) ; no tests
5088 (home-page "https://ipython.org")
5089 (synopsis "Vestigial utilities from IPython")
5090 (description
5091 "This package provides retired utilities from IPython. No packages
5092 outside IPython/Jupyter should depend on it.
5093
5094 This package shouldn't exist. It contains some common utilities shared by
5095 Jupyter and IPython projects during The Big Split. As soon as possible, those
5096 packages will remove their dependency on this, and this package will go
5097 away.")
5098 (license license:bsd-3)))
5099
5100 (define-public python2-ipython-genutils
5101 (package-with-python2 python-ipython-genutils))
5102
5103 (define-public python-traitlets
5104 (package
5105 (name "python-traitlets")
5106 (version "4.3.2")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (pypi-uri "traitlets" version))
5111 (sha256
5112 (base32
5113 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5114 (build-system python-build-system)
5115 (arguments
5116 `(#:phases
5117 (modify-phases %standard-phases
5118 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5119 (propagated-inputs
5120 `(("python-ipython-genutils" ,python-ipython-genutils)
5121 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5122 (native-inputs
5123 `(("python-pytest" ,python-pytest)))
5124 (properties `((python2-variant . ,(delay python2-traitlets))))
5125 (home-page "https://ipython.org")
5126 (synopsis "Configuration system for Python applications")
5127 (description
5128 "Traitlets is a framework that lets Python classes have attributes with
5129 type checking, dynamically calculated default values, and ‘on change’
5130 callbacks. The package also includes a mechanism to use traitlets for
5131 configuration, loading values from files or from command line arguments. This
5132 is a distinct layer on top of traitlets, so you can use traitlets in your code
5133 without using the configuration machinery.")
5134 (license license:bsd-3)))
5135
5136 (define-public python2-traitlets
5137 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5138 (package
5139 (inherit traitlets)
5140 (propagated-inputs
5141 `(("python2-enum34" ,python2-enum34)
5142 ,@(package-propagated-inputs traitlets))))))
5143
5144 (define-public python-jupyter-core
5145 (package
5146 (name "python-jupyter-core")
5147 (version "4.4.0")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (string-append (pypi-uri "jupyter_core" version)))
5152 (sha256
5153 (base32
5154 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5155 (build-system python-build-system)
5156 ;; FIXME: not sure how to run the tests
5157 (arguments `(#:tests? #f))
5158 (propagated-inputs
5159 `(("python-traitlets" ,python-traitlets)))
5160 (home-page "http://jupyter.org/")
5161 (synopsis "Jupyter base package")
5162 (description
5163 "Jupyter core is the base package on which Jupyter projects rely.")
5164 (license license:bsd-3)))
5165
5166 (define-public python2-jupyter-core
5167 (package-with-python2 python-jupyter-core))
5168
5169 (define-public python-jupyter-client
5170 (package
5171 (name "python-jupyter-client")
5172 (version "5.2.4")
5173 (source
5174 (origin
5175 (method url-fetch)
5176 (uri (pypi-uri "jupyter_client" version))
5177 (sha256
5178 (base32
5179 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5180 (build-system python-build-system)
5181 ;; Tests fail because of missing native python kernel which I assume is
5182 ;; provided by the ipython package, which we cannot use because it would
5183 ;; cause a dependency cycle.
5184 (arguments
5185 `(#:tests? #f
5186
5187 #:phases (modify-phases %standard-phases
5188 (add-after 'unpack 'set-tool-file-names
5189 (lambda* (#:key inputs #:allow-other-keys)
5190 (let ((iproute (assoc-ref inputs "iproute")))
5191 (substitute* "jupyter_client/localinterfaces.py"
5192 (("'ip'")
5193 (string-append "'" iproute "/sbin/ip'")))
5194 #t))))))
5195 (inputs
5196 `(("iproute" ,iproute)))
5197 (propagated-inputs
5198 `(("python-pyzmq" ,python-pyzmq)
5199 ("python-traitlets" ,python-traitlets)
5200 ("python-jupyter-core" ,python-jupyter-core)))
5201 (home-page "http://jupyter.org/")
5202 (synopsis "Jupyter protocol implementation and client libraries")
5203 (description
5204 "The @code{jupyter_client} package contains the reference implementation
5205 of the Jupyter protocol. It also provides client and kernel management APIs
5206 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5207 installing @code{kernelspec}s for use with Jupyter frontends.")
5208 (license license:bsd-3)))
5209
5210 (define-public python2-jupyter-client
5211 (package-with-python2 python-jupyter-client))
5212
5213 (define-public python-ipykernel
5214 (package
5215 (name "python-ipykernel")
5216 (version "5.1.1")
5217 (source
5218 (origin
5219 (method url-fetch)
5220 (uri (pypi-uri "ipykernel" version))
5221 (sha256
5222 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5223 (build-system python-build-system)
5224 (arguments
5225 `(#:phases
5226 (modify-phases %standard-phases
5227 (replace 'check
5228 (lambda _
5229 (setenv "HOME" "/tmp")
5230 (invoke "pytest" "-v")
5231 #t))
5232 (add-after 'install 'set-python-file-name
5233 (lambda* (#:key outputs #:allow-other-keys)
5234 ;; Record the absolute file name of the 'python' executable in
5235 ;; 'kernel.json'.
5236 (let ((out (assoc-ref outputs "out")))
5237 (substitute* (string-append out "/share/jupyter"
5238 "/kernels/python3/kernel.json")
5239 (("\"python\"")
5240 (string-append "\"" (which "python") "\"")))
5241 #t))))))
5242 (propagated-inputs
5243 `(("python-ipython" ,python-ipython)
5244 ;; imported at runtime during connect
5245 ("python-jupyter-client" ,python-jupyter-client)))
5246 (native-inputs
5247 `(("python-pytest" ,python-pytest)
5248 ("python-nose" ,python-nose)))
5249 (home-page "https://ipython.org")
5250 (synopsis "IPython Kernel for Jupyter")
5251 (description
5252 "This package provides the IPython kernel for Jupyter.")
5253 (license license:bsd-3)))
5254
5255 ;; Version 5.1.1 and above no longer support Python 2.
5256 (define-public python2-ipykernel
5257 (package
5258 (name "python2-ipykernel")
5259 (version "5.1.0")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "ipykernel" version))
5264 (sha256
5265 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5266 (build-system python-build-system)
5267 (arguments
5268 `(#:python ,python-2
5269 #:phases
5270 (modify-phases %standard-phases
5271 (replace 'check
5272 (lambda _
5273 (setenv "HOME" "/tmp")
5274 (invoke "pytest" "-v")
5275 #t)))))
5276 (propagated-inputs
5277 `(("python2-ipython" ,python2-ipython)
5278 ;; imported at runtime during connect
5279 ("python2-jupyter-client" ,python2-jupyter-client)))
5280 (native-inputs
5281 `(("python2-pytest" ,python2-pytest)
5282 ("python2-nose" ,python2-nose)))
5283 (home-page "https://ipython.org")
5284 (synopsis "IPython Kernel for Jupyter")
5285 (description
5286 "This package provides the IPython kernel for Jupyter.")
5287 (license license:bsd-3)))
5288
5289 (define-public python-pari-jupyter
5290 (package
5291 (name "python-pari-jupyter")
5292 (version "1.3.2")
5293 (source
5294 (origin
5295 (method url-fetch)
5296 (uri (pypi-uri "pari_jupyter" version))
5297 (sha256
5298 (base32
5299 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5300 (build-system python-build-system)
5301 (propagated-inputs
5302 `(("python-ipykernel" ,python-ipykernel)))
5303 (inputs
5304 `(("pari-gp" ,pari-gp)
5305 ("readline" ,readline)))
5306 (arguments
5307 `(#:tests? #f)) ; no test suite
5308 (home-page
5309 "https://github.com/jdemeyer/pari_jupyter")
5310 (synopsis "A Jupyter kernel for PARI/GP")
5311 (description "The package provides a PARI/GP kernel for Jupyter.")
5312 (license license:gpl3+)))
5313
5314 (define-public python-backcall
5315 (package
5316 (name "python-backcall")
5317 (version "0.1.0")
5318 (source
5319 (origin
5320 (method url-fetch)
5321 (uri (pypi-uri "backcall" version))
5322 (sha256
5323 (base32
5324 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5325 (build-system python-build-system)
5326 (home-page "https://github.com/takluyver/backcall/")
5327 (synopsis "Specifications for callback functions passed in to an API")
5328 (description
5329 "If your code lets other people supply callback functions, it's important
5330 to specify the function signature you expect, and check that functions support
5331 that. Adding extra parameters later would break other peoples code unless
5332 you're careful. The @code{backcall} package provides a way of specifying the
5333 callback signature using a prototype function.")
5334 (license license:bsd-3)))
5335
5336 ;; This is the latest release of the LTS version of ipython with support for
5337 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5338 ;; dropped support for Python 2.7.
5339 (define-public python2-ipython
5340 (package
5341 (name "python2-ipython")
5342 (version "5.8.0")
5343 (source
5344 (origin
5345 (method url-fetch)
5346 (uri (pypi-uri "ipython" version ".tar.gz"))
5347 (sha256
5348 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5349 (build-system python-build-system)
5350 (propagated-inputs
5351 `(("python2-backports-shutil-get-terminal-size"
5352 ,python2-backports-shutil-get-terminal-size)
5353 ("python2-pathlib2" ,python2-pathlib2)
5354 ("python2-pyzmq" ,python2-pyzmq)
5355 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5356 ("python2-terminado" ,python2-terminado)
5357 ("python2-matplotlib" ,python2-matplotlib)
5358 ("python2-numpy" ,python2-numpy)
5359 ("python2-numpydoc" ,python2-numpydoc)
5360 ("python2-jinja2" ,python2-jinja2)
5361 ("python2-mistune" ,python2-mistune)
5362 ("python2-pexpect" ,python2-pexpect)
5363 ("python2-pickleshare" ,python2-pickleshare)
5364 ("python2-simplegeneric" ,python2-simplegeneric)
5365 ("python2-jsonschema" ,python2-jsonschema)
5366 ("python2-traitlets" ,python2-traitlets)
5367 ("python2-nbformat" ,python2-nbformat)
5368 ("python2-pygments" ,python2-pygments)))
5369 (inputs
5370 `(("readline" ,readline)
5371 ("which" ,which)))
5372 (native-inputs
5373 `(("graphviz" ,graphviz)
5374 ("pkg-config" ,pkg-config)
5375 ("python2-requests" ,python2-requests) ;; for tests
5376 ("python2-testpath" ,python2-testpath)
5377 ("python2-mock" ,python2-mock)
5378 ("python2-nose" ,python2-nose)))
5379 (arguments
5380 `(#:python ,python-2
5381 #:phases
5382 (modify-phases %standard-phases
5383 (add-before 'check 'delete-broken-tests
5384 (lambda* (#:key inputs #:allow-other-keys)
5385 ;; These tests throw errors for unknown reasons.
5386 (delete-file "IPython/core/tests/test_profile.py")
5387 (delete-file "IPython/core/tests/test_interactiveshell.py")
5388 (delete-file "IPython/core/tests/test_magic.py")
5389 #t)))))
5390 (home-page "https://ipython.org")
5391 (synopsis "IPython is a tool for interactive computing in Python")
5392 (description
5393 "IPython provides a rich architecture for interactive computing with:
5394 Powerful interactive shells, a browser-based notebook, support for interactive
5395 data visualization, embeddable interpreters and tools for parallel
5396 computing.")
5397 (license license:bsd-3)))
5398
5399 (define-public python-ipython
5400 (package
5401 (name "python-ipython")
5402 (version "7.5.0")
5403 (source
5404 (origin
5405 (method url-fetch)
5406 (uri (pypi-uri "ipython" version ".tar.gz"))
5407 (sha256
5408 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5409 (build-system python-build-system)
5410 (propagated-inputs
5411 `(("python-backcall" ,python-backcall)
5412 ("python-pyzmq" ,python-pyzmq)
5413 ("python-prompt-toolkit" ,python-prompt-toolkit)
5414 ("python-terminado" ,python-terminado)
5415 ("python-matplotlib" ,python-matplotlib)
5416 ("python-numpy" ,python-numpy)
5417 ("python-numpydoc" ,python-numpydoc)
5418 ("python-jedi" ,python-jedi)
5419 ("python-jinja2" ,python-jinja2)
5420 ("python-mistune" ,python-mistune)
5421 ("python-pexpect" ,python-pexpect)
5422 ("python-pickleshare" ,python-pickleshare)
5423 ("python-simplegeneric" ,python-simplegeneric)
5424 ("python-jsonschema" ,python-jsonschema)
5425 ("python-traitlets" ,python-traitlets)
5426 ("python-nbformat" ,python-nbformat)
5427 ("python-pygments" ,python-pygments)))
5428 (inputs
5429 `(("readline" ,readline)
5430 ("which" ,which)))
5431 (native-inputs
5432 `(("graphviz" ,graphviz)
5433 ("pkg-config" ,pkg-config)
5434 ("python-requests" ,python-requests) ;; for tests
5435 ("python-testpath" ,python-testpath)
5436 ("python-nose" ,python-nose)))
5437 (arguments
5438 `(#:phases
5439 (modify-phases %standard-phases
5440 ;; Tests can only be run after the library has been installed and not
5441 ;; within the source directory.
5442 (delete 'check)
5443 (add-after 'install 'check
5444 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5445 (if tests?
5446 (begin
5447 ;; Make installed package available for running the tests
5448 (add-installed-pythonpath inputs outputs)
5449 (setenv "HOME" "/tmp/") ;; required by a test
5450 ;; We only test the core because one of the other tests
5451 ;; tries to import ipykernel.
5452 (invoke "python" "IPython/testing/iptest.py"
5453 "-v" "IPython/core/tests"))
5454 #t)))
5455 (add-before 'check 'fix-tests
5456 (lambda* (#:key inputs #:allow-other-keys)
5457 (substitute* "./IPython/utils/_process_posix.py"
5458 (("/usr/bin/env', 'which") (which "which")))
5459 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5460 (("#!/usr/bin/env python")
5461 (string-append "#!" (which "python"))))
5462 ;; This test introduces a circular dependency on ipykernel
5463 ;; (which depends on ipython).
5464 (delete-file "IPython/core/tests/test_display.py")
5465 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5466 (delete-file "IPython/core/tests/test_interactiveshell.py")
5467 #t)))))
5468 (home-page "https://ipython.org")
5469 (synopsis "IPython is a tool for interactive computing in Python")
5470 (description
5471 "IPython provides a rich architecture for interactive computing with:
5472 Powerful interactive shells, a browser-based notebook, support for interactive
5473 data visualization, embeddable interpreters and tools for parallel
5474 computing.")
5475 (license license:bsd-3)))
5476
5477 (define-public python-ipython-documentation
5478 (package
5479 (inherit python-ipython)
5480 (name "python-ipython-documentation")
5481 (version (package-version python-ipython))
5482 (arguments
5483 `(#:phases
5484 (modify-phases %standard-phases
5485 (delete 'build)
5486 (delete 'check)
5487 (replace 'install
5488 (lambda* (#:key outputs #:allow-other-keys)
5489 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5490 (doc (string-append data "/doc/" ,name "-" ,version))
5491 (html (string-append doc "/html"))
5492 (man1 (string-append data "/man/man1"))
5493 (info (string-append data "/info"))
5494 (examples (string-append doc "/examples"))
5495 (python-arg (string-append "PYTHON=" (which "python"))))
5496 (setenv "LANG" "en_US.utf8")
5497 (with-directory-excursion "docs"
5498 ;; FIXME: pdf fails to build
5499 ;;(system* "make" "pdf" "PAPER=a4")
5500 (system* "make" python-arg "html")
5501 ;; FIXME: the generated texi file contains ^@^@, which trips
5502 ;; up the parser.
5503 ;; (system* "make" python-arg "info")
5504 )
5505 (copy-recursively "docs/man" man1)
5506 (copy-recursively "examples" examples)
5507 (copy-recursively "docs/build/html" html)
5508 ;; (copy-file "docs/build/latex/ipython.pdf"
5509 ;; (string-append doc "/ipython.pdf"))
5510 (mkdir-p info)
5511 ;; (copy-file "docs/build/texinfo/ipython.info"
5512 ;; (string-append info "/ipython.info"))
5513 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5514 #t)))))
5515 (inputs
5516 `(("python-ipython" ,python-ipython)
5517 ("python-ipykernel" ,python-ipykernel)))
5518 (native-inputs
5519 `(("python-sphinx" ,python-sphinx)
5520 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5521 ;; FIXME: It's possible that a smaller union would work just as well.
5522 ("texlive" ,(texlive-union (list texlive-amsfonts
5523 texlive-fonts-ec
5524 texlive-generic-ifxetex
5525 texlive-generic-pdftex
5526 texlive-latex-capt-of
5527 texlive-latex-cmap
5528 texlive-latex-environ
5529 texlive-latex-eqparbox
5530 texlive-latex-etoolbox
5531 texlive-latex-expdlist
5532 texlive-latex-fancyhdr
5533 texlive-latex-fancyvrb
5534 texlive-latex-fncychap
5535 texlive-latex-float
5536 texlive-latex-framed
5537 texlive-latex-geometry
5538 texlive-latex-graphics
5539 texlive-latex-hyperref
5540 texlive-latex-mdwtools
5541 texlive-latex-multirow
5542 texlive-latex-needspace
5543 texlive-latex-oberdiek
5544 texlive-latex-parskip
5545 texlive-latex-preview
5546 texlive-latex-tabulary
5547 texlive-latex-threeparttable
5548 texlive-latex-titlesec
5549 texlive-latex-trimspaces
5550 texlive-latex-ucs
5551 texlive-latex-upquote
5552 texlive-latex-url
5553 texlive-latex-varwidth
5554 texlive-latex-wrapfig)))
5555 ("texinfo" ,texinfo)))))
5556
5557 (define-public python-urwid
5558 (package
5559 (name "python-urwid")
5560 (version "2.0.1")
5561 (source
5562 (origin
5563 (method url-fetch)
5564 (uri (pypi-uri "urwid" version))
5565 (sha256
5566 (base32
5567 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5568 (build-system python-build-system)
5569 (home-page "http://urwid.org")
5570 (synopsis "Console user interface library for Python")
5571 (description
5572 "Urwid is a curses-based UI/widget library for Python. It includes many
5573 features useful for text console applications.")
5574 (license license:lgpl2.1+)))
5575
5576 (define-public python2-urwid
5577 (package-with-python2 python-urwid))
5578
5579 (define-public python-urwidtrees
5580 (package
5581 (name "python-urwidtrees")
5582 (version "1.0.2")
5583 (source
5584 (origin
5585 (method url-fetch)
5586 ;; package author intends on distributing via github rather than pypi:
5587 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5588 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5589 version ".tar.gz"))
5590 (file-name (string-append name "-" version ".tar.gz"))
5591 (sha256
5592 (base32
5593 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5594 (build-system python-build-system)
5595 (arguments
5596 '(#:tests? #f)) ; no tests
5597 (propagated-inputs `(("python-urwid" ,python-urwid)))
5598 (home-page "https://github.com/pazz/urwidtrees")
5599 (synopsis "Tree widgets for urwid")
5600 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5601 toolkit. Use it to build trees of widgets.")
5602 (license license:gpl3+)))
5603
5604 (define-public python2-urwidtrees
5605 (package-with-python2 python-urwidtrees))
5606
5607 (define-public python-ua-parser
5608 (package
5609 (name "python-ua-parser")
5610 (version "0.8.0")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "ua-parser" version))
5615 (sha256
5616 (base32
5617 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5618 (build-system python-build-system)
5619 (arguments
5620 `(#:tests? #f)) ;no test suite in release
5621 (native-inputs
5622 `(("python-pyyaml" ,python-pyyaml)))
5623 (home-page "https://github.com/ua-parser/uap-python")
5624 (synopsis "User agent parser")
5625 (description
5626 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5627 (license license:asl2.0)))
5628
5629 (define-public python2-ua-parser
5630 (package-with-python2 python-ua-parser))
5631
5632 (define-public python-user-agents
5633 (package
5634 (name "python-user-agents")
5635 (version "1.1.0")
5636 (source
5637 (origin
5638 (method url-fetch)
5639 (uri (pypi-uri "user-agents" version))
5640 (sha256
5641 (base32
5642 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5643 (build-system python-build-system)
5644 (arguments
5645 `(#:tests? #f)) ;missing devices.json test file in release
5646 (propagated-inputs
5647 `(("python-ua-parser" ,python-ua-parser)))
5648 (home-page "https://github.com/selwin/python-user-agents")
5649 (synopsis "User Agent strings parsing library")
5650 (description
5651 "A library to identify devices (phones, tablets) and their capabilities by
5652 parsing (browser/HTTP) user agent strings.")
5653 (license license:expat)))
5654
5655 (define-public python2-user-agents
5656 (package-with-python2 python-user-agents))
5657
5658 (define-public python-dbus
5659 (package
5660 (name "python-dbus")
5661 (version "1.2.8")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5666 "dbus-python-" version ".tar.gz"))
5667 (sha256
5668 (base32
5669 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5670 (build-system gnu-build-system)
5671 (arguments
5672 '(#:phases
5673 (modify-phases %standard-phases
5674 (add-before
5675 'check 'pre-check
5676 (lambda _
5677 ;; XXX: For the missing '/etc/machine-id'.
5678 (substitute* "test/run-test.sh"
5679 (("DBUS_FATAL_WARNINGS=1")
5680 "DBUS_FATAL_WARNINGS=0"))
5681 #t)))))
5682 (native-inputs
5683 `(("pkg-config" ,pkg-config)))
5684 (inputs
5685 `(("python" ,python-wrapper)
5686 ("dbus-glib" ,dbus-glib)))
5687 (synopsis "Python bindings for D-bus")
5688 (description "python-dbus provides bindings for libdbus, the reference
5689 implementation of D-Bus.")
5690 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5691 (license license:expat)))
5692
5693 (define-public python2-dbus
5694 (package (inherit python-dbus)
5695 (name "python2-dbus")
5696 (inputs `(("python" ,python-2)
5697 ,@(alist-delete "python"
5698 (package-inputs python-dbus)
5699 equal?)))
5700 ;; FIXME: on Python 2, the test_utf8 fails with:
5701 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5702 (arguments `(#:tests? #f))))
5703
5704 (define-public python-notify2
5705 (package
5706 (name "python-notify2")
5707 (version "0.3.1")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "notify2" version))
5712 (sha256
5713 (base32
5714 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5715 (build-system python-build-system)
5716 (arguments `(#:tests? #f)) ; tests depend on system state
5717 (native-inputs
5718 `(("python-dbus" ,python-dbus)))
5719 (home-page "https://bitbucket.org/takluyver/pynotify2")
5720 (synopsis "Python interface to D-Bus notifications")
5721 (description
5722 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5723 It is a reimplementation of pynotify in pure Python, and an alternative to
5724 the GObject Introspection bindings to libnotify for non-GTK applications.")
5725 (license (list license:bsd-2
5726 license:lgpl2.1+))))
5727
5728 (define-public python2-notify2
5729 (package-with-python2 python-notify2))
5730
5731 (define-public python-lxml
5732 (package
5733 (name "python-lxml")
5734 (version "4.2.5")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "lxml" version))
5739 (sha256
5740 (base32
5741 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5742 (build-system python-build-system)
5743 (inputs
5744 `(("libxml2" ,libxml2)
5745 ("libxslt" ,libxslt)))
5746 (home-page "http://lxml.de/")
5747 (synopsis
5748 "Python XML processing library")
5749 (description
5750 "The lxml XML toolkit is a Pythonic binding for the C libraries
5751 libxml2 and libxslt.")
5752 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5753
5754 (define-public python2-lxml
5755 (package-with-python2 python-lxml))
5756
5757 ;; beautifulsoup4 has a totally different namespace than 3.x,
5758 ;; and pypi seems to put it under its own name, so I guess we should too
5759 (define-public python-beautifulsoup4
5760 (package
5761 (name "python-beautifulsoup4")
5762 (version "4.7.1")
5763 (source
5764 (origin
5765 (method url-fetch)
5766 (uri (pypi-uri "beautifulsoup4" version))
5767 (sha256
5768 (base32
5769 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5770 (build-system python-build-system)
5771 (arguments
5772 `(#:phases
5773 (modify-phases %standard-phases
5774 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5775 ;; must use this conversion script when building with Python 3. The
5776 ;; conversion script also runs the tests.
5777 ;; For more information, see the file 'convert-py3k' in the source
5778 ;; distribution.
5779 (replace 'check
5780 (lambda _ (invoke "./convert-py3k"))))))
5781 (propagated-inputs
5782 `(("python-soupsieve" ,python-soupsieve)))
5783 (home-page
5784 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5785 (synopsis
5786 "Python screen-scraping library")
5787 (description
5788 "Beautiful Soup is a Python library designed for rapidly setting up
5789 screen-scraping projects. It offers Pythonic idioms for navigating,
5790 searching, and modifying a parse tree, providing a toolkit for
5791 dissecting a document and extracting what you need. It automatically
5792 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5793 (license license:expat)
5794 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5795
5796 (define-public python2-beautifulsoup4
5797 (package
5798 (inherit (package-with-python2
5799 (strip-python2-variant python-beautifulsoup4)))
5800 (arguments `(#:python ,python-2))))
5801
5802 (define-public python-soupsieve
5803 (package
5804 (name "python-soupsieve")
5805 (version "1.9.2")
5806 (source
5807 (origin
5808 (method url-fetch)
5809 (uri (pypi-uri "soupsieve" version))
5810 (sha256
5811 (base32
5812 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5813 (build-system python-build-system)
5814 (arguments `(#:tests? #f))
5815 ;;XXX: 2 tests fail currently despite claming they were to be
5816 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5817 ;;don't want to create a circular dependency.
5818 (home-page "https://github.com/facelessuser/soupsieve")
5819 (synopsis "CSS selector library")
5820 (description
5821 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5822 Soup 4. It aims to provide selecting, matching, and filtering using modern
5823 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5824 specifications up through the latest CSS level 4 drafts and beyond (though
5825 some are not yet implemented).")
5826 (properties `((python2-variant . ,(delay python2-soupsieve))))
5827 (license license:expat)))
5828
5829 (define-public python2-soupsieve
5830 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5831 (package
5832 (inherit base)
5833 (propagated-inputs
5834 `(("python2-backports-functools-lru-cache"
5835 ,python2-backports-functools-lru-cache)
5836 ,@(package-propagated-inputs base))))))
5837
5838 (define-public python-netifaces
5839 (package
5840 (name "python-netifaces")
5841 (version "0.10.7")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (pypi-uri "netifaces" version))
5846 (sha256
5847 (base32
5848 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5849 (build-system python-build-system)
5850 (home-page "https://github.com/al45tair/netifaces")
5851 (synopsis
5852 "Python module for portable network interface information")
5853 (description
5854 "Netifaces is a Python module providing information on network
5855 interfaces in an easy and portable manner.")
5856 (license license:expat)))
5857
5858 (define-public python2-netifaces
5859 (package-with-python2 python-netifaces))
5860
5861 (define-public python-networkx
5862 (package
5863 (name "python-networkx")
5864 (version "2.2")
5865 (source
5866 (origin
5867 (method url-fetch)
5868 (uri (pypi-uri "networkx" version ".zip"))
5869 (sha256
5870 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5871 (build-system python-build-system)
5872 ;; python-decorator is needed at runtime.
5873 (propagated-inputs
5874 `(("python-decorator" ,python-decorator)))
5875 (native-inputs
5876 `(("python-nose" ,python-nose)
5877 ("unzip" ,unzip)))
5878 (home-page "https://networkx.github.io/")
5879 (synopsis "Python module for creating and manipulating graphs and networks")
5880 (description
5881 "NetworkX is a Python package for the creation, manipulation, and study
5882 of the structure, dynamics, and functions of complex networks.")
5883 (license license:bsd-3)))
5884
5885 (define-public python2-networkx
5886 (package-with-python2 python-networkx))
5887
5888 (define-public python-datrie
5889 (package
5890 (name "python-datrie")
5891 (version "0.8")
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "datrie" version))
5896 (sha256
5897 (base32
5898 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5899 (build-system python-build-system)
5900 (native-inputs
5901 `(("python-cython" ,python-cython)
5902 ("python-hypothesis" ,python-hypothesis)
5903 ("python-pytest" ,python-pytest)
5904 ("python-pytest-runner" ,python-pytest-runner)))
5905 (home-page "https://github.com/kmike/datrie")
5906 (synopsis "Fast, efficiently stored trie for Python")
5907 (description
5908 "This package provides a fast, efficiently stored trie implementation for
5909 Python.")
5910 (license license:lgpl2.1+)))
5911
5912 (define-public snakemake
5913 (package
5914 (name "snakemake")
5915 (version "5.2.4")
5916 (source
5917 (origin
5918 (method url-fetch)
5919 (uri (pypi-uri "snakemake" version))
5920 (sha256
5921 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5922 (build-system python-build-system)
5923 (arguments
5924 ;; TODO: Package missing test dependencies.
5925 '(#:tests? #f
5926 #:phases
5927 (modify-phases %standard-phases
5928 ;; For cluster execution Snakemake will call Python. Since there is
5929 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5930 ;; this by calling the snakemake wrapper instead.
5931 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5932 (lambda* (#:key outputs #:allow-other-keys)
5933 (substitute* "snakemake/executors.py"
5934 (("\\{sys.executable\\} -m snakemake")
5935 (string-append (assoc-ref outputs "out")
5936 "/bin/snakemake")))
5937 #t)))))
5938 (propagated-inputs
5939 `(("python-gitpython" ,python-gitpython)
5940 ("python-wrapt" ,python-wrapt)
5941 ("python-requests" ,python-requests)
5942 ("python-appdirs" ,python-appdirs)
5943 ("python-configargparse" ,python-configargparse)
5944 ("python-datrie" ,python-datrie)
5945 ("python-docutils" ,python-docutils)
5946 ("python-jinja2" ,python-jinja2)
5947 ("python-jsonschema" ,python-jsonschema)
5948 ("python-networkx" ,python-networkx)
5949 ("python-pyyaml" ,python-pyyaml)
5950 ("python-ratelimiter" ,python-ratelimiter)))
5951 (home-page "https://snakemake.readthedocs.io")
5952 (synopsis "Python-based execution environment for make-like workflows")
5953 (description
5954 "Snakemake aims to reduce the complexity of creating workflows by
5955 providing a clean and modern domain specific specification language (DSL) in
5956 Python style, together with a fast and comfortable execution environment.")
5957 (license license:expat)))
5958
5959 ;; This is currently needed for the pigx-* packages.
5960 (define-public snakemake-4
5961 (package (inherit snakemake)
5962 (version "4.4.0")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (pypi-uri "snakemake" version))
5967 (sha256
5968 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5969 (propagated-inputs
5970 `(("python-wrapt" ,python-wrapt)
5971 ("python-requests" ,python-requests)
5972 ("python-appdirs" ,python-appdirs)
5973 ("python-configargparse" ,python-configargparse)
5974 ("python-pyyaml" ,python-pyyaml)
5975 ("python-ratelimiter" ,python-ratelimiter)))))
5976
5977 (define-public python-pyqrcode
5978 (package
5979 (name "python-pyqrcode")
5980 (version "1.2.1")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "PyQRCode" version))
5985 (sha256
5986 (base32
5987 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5988 (build-system python-build-system)
5989 (home-page
5990 "https://github.com/mnooner256/pyqrcode")
5991 (synopsis "QR code generator")
5992 (description
5993 "Pyqrcode is a QR code generator written purely in Python with
5994 SVG, EPS, PNG and terminal output.")
5995 (license license:bsd-3)))
5996
5997 (define-public python-seaborn
5998 (package
5999 (name "python-seaborn")
6000 (version "0.9.0")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (pypi-uri "seaborn" version))
6005 (sha256
6006 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6007 (build-system python-build-system)
6008 (arguments
6009 `(#:phases
6010 (modify-phases %standard-phases
6011 (add-before 'check 'start-xserver
6012 (lambda* (#:key inputs #:allow-other-keys)
6013 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6014 ;; There must be a running X server and make check doesn't
6015 ;; start one. Therefore we must do it.
6016 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6017 (setenv "DISPLAY" ":1")
6018 #t)))
6019 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6020 (propagated-inputs
6021 `(("python-pandas" ,python-pandas)
6022 ("python-matplotlib" ,python-matplotlib)
6023 ("python-numpy" ,python-numpy)
6024 ("python-scipy" ,python-scipy)))
6025 (native-inputs
6026 `(("python-pytest" ,python-pytest)
6027 ("xorg-server" ,xorg-server)))
6028 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6029 (synopsis "Statistical data visualization")
6030 (description
6031 "Seaborn is a library for making attractive and informative statistical
6032 graphics in Python. It is built on top of matplotlib and tightly integrated
6033 with the PyData stack, including support for numpy and pandas data structures
6034 and statistical routines from scipy and statsmodels.")
6035 (license license:bsd-3)))
6036
6037 (define-public python2-seaborn
6038 (package-with-python2 python-seaborn))
6039
6040 (define-public python-mpmath
6041 (package
6042 (name "python-mpmath")
6043 (version "0.19")
6044 (source (origin
6045 (method url-fetch)
6046 (uri (string-append "http://mpmath.org/files/mpmath-"
6047 version ".tar.gz"))
6048 (sha256
6049 (base32
6050 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6051 (build-system python-build-system)
6052 (arguments
6053 '(#:phases
6054 (modify-phases %standard-phases
6055 (replace 'check
6056 (lambda _
6057 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6058 (home-page "http://mpmath.org")
6059 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6060 (description
6061 "@code{mpmath} can be used as an arbitrary-precision substitute for
6062 Python's float/complex types and math/cmath modules, but also does much
6063 more advanced mathematics.")
6064 (license license:bsd-3)))
6065
6066 (define-public python2-mpmath
6067 (package-with-python2 python-mpmath))
6068
6069 (define-public python-bigfloat
6070 (package
6071 (name "python-bigfloat")
6072 (version "0.3.0")
6073 (source
6074 (origin
6075 (method url-fetch)
6076 (uri (pypi-uri "bigfloat" version))
6077 (sha256
6078 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6079 (build-system python-build-system)
6080 (inputs
6081 `(("mpfr" ,mpfr)))
6082 (home-page "https://github.com/mdickinson/bigfloat")
6083 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6084 (description
6085 "This package provides a Python interface to the MPFR library for
6086 multiprecision arithmetic.")
6087 (license license:lgpl3+)))
6088
6089 (define-public python2-bigfloat
6090 (package-with-python2 python-bigfloat))
6091
6092 (define-public python-sympy
6093 (package
6094 (name "python-sympy")
6095 (version "1.1.1")
6096 (source
6097 (origin
6098 (method url-fetch)
6099 (uri (string-append
6100 "https://github.com/sympy/sympy/releases/download/sympy-"
6101 version "/sympy-" version ".tar.gz"))
6102 (sha256
6103 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:phases
6107 (modify-phases %standard-phases
6108 ;; Run the core tests after installation. By default it would run
6109 ;; *all* tests, which take a very long time to complete and are known
6110 ;; to be flaky.
6111 (delete 'check)
6112 (add-after 'install 'check
6113 (lambda* (#:key outputs #:allow-other-keys)
6114 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6115 #t)))))
6116 (propagated-inputs
6117 `(("python-mpmath" ,python-mpmath)))
6118 (home-page "http://www.sympy.org/")
6119 (synopsis "Python library for symbolic mathematics")
6120 (description
6121 "SymPy is a Python library for symbolic mathematics. It aims to become a
6122 full-featured computer algebra system (CAS) while keeping the code as simple
6123 as possible in order to be comprehensible and easily extensible.")
6124 (license license:bsd-3)))
6125
6126 (define-public python2-sympy
6127 (package
6128 (inherit (package-with-python2 python-sympy))
6129 (arguments
6130 `(#:phases
6131 (modify-phases %standard-phases
6132 ;; Run the core tests after installation. By default it would run
6133 ;; *all* tests, which take a very long time to complete and are known
6134 ;; to be flaky.
6135 (delete 'check)
6136 (add-after 'install 'check
6137 (lambda* (#:key outputs #:allow-other-keys)
6138 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6139 #t)))))))
6140
6141 (define-public python-q
6142 (package
6143 (name "python-q")
6144 (version "2.6")
6145 (source
6146 (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "q" version))
6149 (sha256
6150 (base32
6151 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6152 (build-system python-build-system)
6153 (home-page "https://github.com/zestyping/q")
6154 (synopsis "Quick-and-dirty debugging output for tired programmers")
6155 (description
6156 "q is a Python module for \"print\" style of debugging Python code. It
6157 provides convenient short API for print out of values, tracebacks, and
6158 falling into the Python interpreter.")
6159 (license license:asl2.0)))
6160
6161 (define-public python2-q
6162 (package-with-python2 python-q))
6163
6164 (define-public python2-xlib
6165 (package
6166 (name "python2-xlib")
6167 (version "0.14")
6168 (source (origin
6169 (method url-fetch)
6170 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6171 "/" version "/"
6172 "python-xlib-" version ".tar.gz"))
6173 (sha256
6174 (base32
6175 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6176 (build-system python-build-system)
6177 (arguments
6178 `(#:python ,python-2 ;Python 2 only
6179 #:tests? #f)) ;no tests
6180 (home-page "http://python-xlib.sourceforge.net/")
6181 (synopsis "Python X11 client library")
6182 (description
6183 "The Python X Library is intended to be a fully functional X client
6184 library for Python programs. It is useful to implement low-level X clients.
6185 It is written entirely in Python.")
6186 (license license:gpl2+)))
6187
6188 (define-public python-singledispatch
6189 (package
6190 (name "python-singledispatch")
6191 (version "3.4.0.3")
6192 (source
6193 (origin
6194 (method url-fetch)
6195 (uri (pypi-uri "singledispatch" version))
6196 (sha256
6197 (base32
6198 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6199 (build-system python-build-system)
6200 (native-inputs
6201 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6202 (home-page
6203 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6204 (synopsis "Backport of singledispatch feature from Python 3.4")
6205 (description
6206 "This library brings functools.singledispatch from Python 3.4 to Python
6207 2.6-3.3.")
6208 (license license:expat)))
6209
6210 (define-public python2-singledispatch
6211 (package-with-python2 python-singledispatch))
6212
6213 ;; the python- version can be removed with python-3.5
6214 (define-public python-backports-abc
6215 (package
6216 (name "python-backports-abc")
6217 (version "0.5")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "backports_abc" version))
6222 (sha256
6223 (base32
6224 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6225 (build-system python-build-system)
6226 (home-page "https://github.com/cython/backports_abc")
6227 (synopsis "Backport of additions to the 'collections.abc' module")
6228 (description
6229 "Python-backports-abc provides a backport of additions to the
6230 @code{collections.abc} module in Python-3.5.")
6231 (license license:psfl)))
6232
6233 (define-public python2-backports-abc
6234 (package-with-python2 python-backports-abc))
6235
6236 (define-public python-backports-csv
6237 (package
6238 (name "python-backports-csv")
6239 (version "1.0.5")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "backports.csv" version))
6244 (sha256
6245 (base32
6246 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6247 (build-system python-build-system)
6248 (home-page "https://github.com/ryanhiebert/backports.csv")
6249 (synopsis "Backport of Python 3's csv module for Python 2")
6250 (description
6251 "Provides a backport of Python 3's @code{csv} module for parsing
6252 comma separated values. The API of the @code{csv} module in Python 2
6253 is drastically different from the @code{csv} module in Python 3.
6254 This is due, for the most part, to the difference between str in
6255 Python 2 and Python 3.")
6256 (license license:psfl)))
6257
6258 (define-public python2-backports-csv
6259 (package-with-python2 python-backports-csv))
6260
6261 (define-public python2-backports-shutil-get-terminal-size
6262 (package
6263 (name "python2-backports-shutil-get-terminal-size")
6264 (version "1.0.0")
6265 (source
6266 (origin
6267 (method url-fetch)
6268 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6269 (sha256
6270 (base32
6271 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6272 (build-system python-build-system)
6273 (arguments
6274 `(#:python ,python-2
6275 #:phases
6276 (modify-phases %standard-phases
6277 (replace 'check
6278 (lambda _
6279 (invoke "py.test" "-v"))))))
6280 (native-inputs
6281 `(("python2-pytest" ,python2-pytest)))
6282 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6283 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6284 (description
6285 "This package provides a backport of the @code{get_terminal_size
6286 function} from Python 3.3's @code{shutil}.
6287 Unlike the original version it is written in pure Python rather than C,
6288 so it might be a tiny bit slower.")
6289 (license license:expat)))
6290
6291 (define-public python-waf
6292 (package
6293 (name "python-waf")
6294 (version "2.0.11")
6295 (source (origin
6296 (method url-fetch)
6297 (uri (string-append "https://waf.io/"
6298 "waf-" version ".tar.bz2"))
6299 (sha256
6300 (base32
6301 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6302 (build-system python-build-system)
6303 (arguments
6304 '(#:phases
6305 (modify-phases %standard-phases
6306 (replace 'build
6307 (lambda _
6308 (invoke "python" "waf-light" "configure" "build")))
6309 (replace 'check
6310 (lambda _
6311 (invoke "python" "waf" "--version")))
6312 (replace 'install
6313 (lambda* (#:key outputs #:allow-other-keys)
6314 (let ((out (assoc-ref outputs "out")))
6315 (install-file "waf" (string-append out "/bin")))
6316 #t))
6317 ;; waf breaks when it is wrapped.
6318 (delete 'wrap))))
6319 (home-page "https://waf.io/")
6320 (synopsis "Python-based build system")
6321 (description
6322 "Waf is a Python-based framework for configuring, compiling and installing
6323 applications.")
6324 (license license:bsd-3)))
6325
6326 (define-public python2-waf
6327 (package-with-python2 python-waf))
6328
6329 (define-public python-pyzmq
6330 (package
6331 (name "python-pyzmq")
6332 (version "17.1.2")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "pyzmq" version))
6337 (sha256
6338 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6339 (build-system python-build-system)
6340 (arguments
6341 `(#:configure-flags
6342 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6343 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6344 ;; --inplace' for 'python setup.py test' to work.
6345 #:tests? #f))
6346 (inputs
6347 `(("zeromq" ,zeromq)))
6348 (native-inputs
6349 `(("pkg-config" ,pkg-config)
6350 ("python-nose" ,python-nose)))
6351 (home-page "https://github.com/zeromq/pyzmq")
6352 (synopsis "Python bindings for 0MQ")
6353 (description
6354 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6355 (license license:bsd-4)))
6356
6357 (define-public python2-pyzmq
6358 (package-with-python2 python-pyzmq))
6359
6360 (define-public python-pep8
6361 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6362 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6363 ;; some dependents' test suites, and nothing more.
6364 (package
6365 (name "python-pep8")
6366 (version "1.7.0")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "pep8" version))
6371 (sha256
6372 (base32
6373 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6374 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6375 (build-system python-build-system)
6376 (home-page "https://pep8.readthedocs.org/")
6377 (synopsis "Python style guide checker")
6378 (description
6379 "This tools checks Python code against some of the style conventions in
6380 PEP 8.")
6381 (license license:expat)))
6382
6383 (define-public python2-pep8
6384 (package-with-python2 python-pep8))
6385
6386 (define-public python-pyflakes
6387 (package
6388 (name "python-pyflakes")
6389 (version "2.1.1")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "pyflakes" version))
6394 (sha256
6395 (base32
6396 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6397 (build-system python-build-system)
6398 (home-page
6399 "https://github.com/pyflakes/pyflakes")
6400 (synopsis "Passive checker of Python programs")
6401 (description
6402 "Pyflakes statically checks Python source code for common errors.")
6403 (license license:expat)))
6404
6405 (define-public python2-pyflakes
6406 (package-with-python2 python-pyflakes))
6407
6408 (define-public python-mccabe
6409 (package
6410 (name "python-mccabe")
6411 (version "0.6.1")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "mccabe" version))
6416 (sha256
6417 (base32
6418 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6419 (build-system python-build-system)
6420 (native-inputs
6421 `(("python-pytest" ,python-pytest-bootstrap)
6422 ("python-pytest-runner" ,python-pytest-runner)))
6423 (home-page "https://github.com/flintwork/mccabe")
6424 (synopsis "McCabe checker, plugin for flake8")
6425 (description
6426 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6427 complexity of Python source code.")
6428 (license license:expat)))
6429
6430 (define-public python2-mccabe
6431 (package-with-python2 python-mccabe))
6432
6433 (define-public python-mccabe-0.2.1
6434 (package (inherit python-mccabe)
6435 (version "0.2.1")
6436 (source
6437 (origin
6438 (method url-fetch)
6439 (uri (pypi-uri "mccabe" version))
6440 (sha256
6441 (base32
6442 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6443
6444 (define-public python2-mccabe-0.2.1
6445 (package-with-python2 python-mccabe-0.2.1))
6446
6447 ;; Flake8 2.4.1 requires an older version of pep8.
6448 ;; This should be removed ASAP.
6449 (define-public python-pep8-1.5.7
6450 (package (inherit python-pep8)
6451 (version "1.5.7")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "pep8" version))
6456 (sha256
6457 (base32
6458 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6459 (arguments
6460 ;; XXX Tests not compatible with Python 3.5.
6461 '(#:tests? #f))))
6462
6463 (define-public python2-pep8-1.5.7
6464 (package-with-python2 python-pep8-1.5.7))
6465
6466 ;; Flake8 2.4.1 requires an older version of pyflakes.
6467 ;; This should be removed ASAP.
6468 (define-public python-pyflakes-0.8.1
6469 (package (inherit python-pyflakes)
6470 (version "0.8.1")
6471 (source
6472 (origin
6473 (method url-fetch)
6474 (uri (pypi-uri "pyflakes" version))
6475 (sha256
6476 (base32
6477 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6478 (arguments
6479 ;; XXX Tests not compatible with Python 3.5.
6480 '(#:tests? #f))))
6481
6482 (define-public python2-pyflakes-0.8.1
6483 (package-with-python2 python-pyflakes-0.8.1))
6484
6485 (define-public python-flake8
6486 (package
6487 (name "python-flake8")
6488 (version "3.7.7")
6489 (source (origin
6490 (method url-fetch)
6491 (uri (pypi-uri "flake8" version))
6492 (sha256
6493 (base32
6494 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6495 (build-system python-build-system)
6496 (arguments
6497 `(#:phases
6498 (modify-phases %standard-phases
6499 (delete 'check)
6500 (add-after 'install 'check
6501 (lambda* (#:key inputs outputs #:allow-other-keys)
6502 (add-installed-pythonpath inputs outputs)
6503 (invoke "pytest" "-v")
6504 #t)))))
6505 (propagated-inputs
6506 `(("python-pycodestyle" ,python-pycodestyle)
6507 ("python-entrypoints" ,python-entrypoints)
6508 ("python-pyflakes" ,python-pyflakes)
6509 ("python-mccabe" ,python-mccabe)))
6510 (native-inputs
6511 `(("python-mock" ,python-mock)
6512 ("python-pytest" ,python-pytest-bootstrap)
6513 ("python-pytest-runner" ,python-pytest-runner)))
6514 (home-page "https://gitlab.com/pycqa/flake8")
6515 (synopsis
6516 "The modular source code checker: pep8, pyflakes and co")
6517 (description
6518 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6519 (properties `((python2-variant . ,(delay python2-flake8))))
6520 (license license:expat)))
6521
6522 (define-public python2-flake8
6523 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6524 (package (inherit base)
6525 (propagated-inputs
6526 `(("python2-configparser" ,python2-configparser)
6527 ("python2-enum34" ,python2-enum34)
6528 ("python2-typing" ,python2-typing)
6529 ,@(package-propagated-inputs base))))))
6530
6531 ;; python-hacking requires flake8 <2.6.0.
6532 (define-public python-flake8-2.5
6533 (package
6534 (inherit python-flake8)
6535 (version "2.5.5")
6536 (source (origin
6537 (method url-fetch)
6538 (uri (pypi-uri "flake8" version))
6539 (sha256
6540 (base32
6541 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6542 (propagated-inputs
6543 `(("python-pep8" ,python-pep8)
6544 ,@(package-propagated-inputs python-flake8)))
6545 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6546
6547 (define-public python2-flake8-2.5
6548 (package
6549 (inherit python2-flake8)
6550 (version (package-version python-flake8-2.5))
6551 (source (origin
6552 (inherit (package-source python-flake8-2.5))))
6553 (propagated-inputs
6554 `(("python2-pep8" ,python2-pep8)
6555 ,@(package-propagated-inputs python2-flake8)))))
6556
6557 (define-public python-flake8-polyfill
6558 (package
6559 (name "python-flake8-polyfill")
6560 (version "1.0.2")
6561 (source
6562 (origin
6563 (method url-fetch)
6564 (uri (pypi-uri "flake8-polyfill" version))
6565 (sha256
6566 (base32
6567 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6568 (build-system python-build-system)
6569 (arguments
6570 '(#:phases
6571 (modify-phases %standard-phases
6572 (replace 'check
6573 (lambda _
6574 ;; Be compatible with Pytest 4:
6575 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6576 (substitute* "setup.cfg"
6577 (("\\[pytest\\]")
6578 "[tool:pytest]"))
6579
6580 (setenv "PYTHONPATH"
6581 (string-append (getcwd) "/build/lib:"
6582 (getenv "PYTHONPATH")))
6583 (invoke "py.test" "-v"))))))
6584 (native-inputs
6585 `(("python-flake8" ,python-flake8)
6586 ("python-mock" ,python-mock)
6587 ("python-pep8" ,python-pep8)
6588 ("python-pycodestyle" ,python-pycodestyle)
6589 ("python-pytest" ,python-pytest)))
6590 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6591 (synopsis "Polyfill package for Flake8 plugins")
6592 (description
6593 "This package that provides some compatibility helpers for Flake8
6594 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6595 (license license:expat)))
6596
6597 (define-public python2-flake8-polyfill
6598 (package-with-python2 python-flake8-polyfill))
6599
6600 (define-public python-mistune
6601 (package
6602 (name "python-mistune")
6603 (version "0.8.4")
6604 (source
6605 (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "mistune" version))
6608 (sha256
6609 (base32
6610 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6611 (build-system python-build-system)
6612 (native-inputs
6613 `(("python-nose" ,python-nose)
6614 ("python-cython" ,python-cython)))
6615 (home-page "https://github.com/lepture/mistune")
6616 (synopsis "Markdown parser in pure Python")
6617 (description "This package provides a fast markdown parser in pure
6618 Python.")
6619 (license license:bsd-3)))
6620
6621 (define-public python2-mistune
6622 (package-with-python2 python-mistune))
6623
6624 (define-public python-markdown
6625 (package
6626 (name "python-markdown")
6627 (version "3.1.1")
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (pypi-uri "Markdown" version))
6632 (sha256
6633 (base32
6634 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6635 (build-system python-build-system)
6636 (native-inputs
6637 `(("python-nose" ,python-nose)
6638 ("python-pyyaml" ,python-pyyaml)))
6639 (home-page "https://python-markdown.github.io/")
6640 (synopsis "Python implementation of Markdown")
6641 (description
6642 "This package provides a Python implementation of John Gruber's
6643 Markdown. The library features international input, various Markdown
6644 extensions, and several HTML output formats. A command line wrapper
6645 markdown_py is also provided to convert Markdown files to HTML.")
6646 (license license:bsd-3)))
6647
6648 (define-public python2-markdown
6649 (package-with-python2 python-markdown))
6650
6651 (define-public python-ptyprocess
6652 (package
6653 (name "python-ptyprocess")
6654 (version "0.5.2")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "ptyprocess" version))
6659 (sha256
6660 (base32
6661 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6662 (build-system python-build-system)
6663 (native-inputs
6664 `(("python-nose" ,python-nose)))
6665 (arguments
6666 `(#:phases
6667 (modify-phases %standard-phases
6668 (replace 'check
6669 (lambda _ (invoke "nosetests"))))))
6670 (home-page "https://github.com/pexpect/ptyprocess")
6671 (synopsis "Run a subprocess in a pseudo terminal")
6672 (description
6673 "This package provides a Python library used to launch a subprocess in a
6674 pseudo terminal (pty), and interact with both the process and its pty.")
6675 (license license:isc)))
6676
6677 (define-public python2-ptyprocess
6678 (package-with-python2 python-ptyprocess))
6679
6680 (define-public python-cram
6681 (package
6682 (name "python-cram")
6683 (version "0.7")
6684 (home-page "https://bitheap.org/cram/")
6685 (source (origin
6686 (method url-fetch)
6687 (uri (list (string-append home-page "cram-"
6688 version ".tar.gz")
6689 (pypi-uri "cram" version)))
6690 (sha256
6691 (base32
6692 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6693 (arguments
6694 '(#:phases
6695 (modify-phases %standard-phases
6696 (add-after 'unpack 'patch-source
6697 (lambda _
6698 (substitute* (find-files "cram" ".*\\.py$")
6699 ;; Replace default shell path.
6700 (("/bin/sh") (which "sh")))
6701 (substitute* (find-files "tests" ".*\\.t$")
6702 (("md5") "md5sum")
6703 (("/bin/bash") (which "bash"))
6704 (("/bin/sh") (which "sh")))
6705 (substitute* "cram/_test.py"
6706 ;; This hack works around a bug triggered by substituting
6707 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6708 ;; "cram -h", which breaks the output at 80 characters. This
6709 ;; causes the line showing the default shell to break into two
6710 ;; lines, but the test expects a single line...
6711 (("env\\['COLUMNS'\\] = '80'")
6712 "env['COLUMNS'] = '160'"))
6713
6714 (substitute* "Makefile"
6715 ;; Recent versions of python-coverage have caused the test
6716 ;; coverage to decrease (as of version 0.7). Allow that.
6717 (("--fail-under=100")
6718 "--fail-under=90"))
6719
6720 #t))
6721 (replace 'check
6722 ;; The test phase uses the built library and executable.
6723 (lambda* (#:key inputs outputs #:allow-other-keys)
6724 (add-installed-pythonpath inputs outputs)
6725 (setenv "PATH" (string-append (getenv "PATH") ":"
6726 (assoc-ref outputs "out") "/bin"))
6727 (invoke "make" "test"))))))
6728 (build-system python-build-system)
6729 (native-inputs
6730 `(("python-coverage" ,python-coverage)
6731 ("which" ,which)))
6732 (synopsis "Simple testing framework for command line applications")
6733 (description
6734 "Cram is a functional testing framework for command line applications.
6735 Cram tests look like snippets of interactive shell sessions. Cram runs each
6736 command and compares the command output in the test with the command’s actual
6737 output.")
6738 (license license:gpl2+)))
6739
6740 (define-public python2-cram
6741 (package-with-python2 python-cram))
6742
6743 (define-public python-straight-plugin
6744 (package
6745 (name "python-straight-plugin")
6746 (version "1.4.1")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (pypi-uri "straight.plugin" version))
6751 (sha256
6752 (base32
6753 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6754 (build-system python-build-system)
6755 (home-page "https://github.com/ironfroggy/straight.plugin")
6756 (synopsis "Simple namespaced plugin facility")
6757 (description "Straight Plugin provides a type of plugin you can create from
6758 almost any existing Python modules, and an easy way for outside developers to
6759 add functionality and customization to your projects with their own plugins.")
6760 (license license:expat)))
6761
6762 (define-public python2-straight-plugin
6763 (package-with-python2 python-straight-plugin))
6764
6765 (define-public python-fonttools
6766 (package
6767 (name "python-fonttools")
6768 (version "3.38.0")
6769 (source (origin
6770 (method url-fetch)
6771 (uri (pypi-uri "fonttools" version ".zip"))
6772 (sha256
6773 (base32
6774 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6775 (build-system python-build-system)
6776 (native-inputs
6777 `(("unzip" ,unzip)
6778 ("python-pytest" ,python-pytest)
6779 ("python-pytest-runner" ,python-pytest-runner)))
6780 (home-page "https://github.com/behdad/fonttools")
6781 (synopsis "Tools to manipulate font files")
6782 (description
6783 "FontTools/TTX is a library to manipulate font files from Python. It
6784 supports reading and writing of TrueType/OpenType fonts, reading and writing
6785 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6786 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6787 from an XML-based format.")
6788 (license license:expat)))
6789
6790 (define-public python2-fonttools
6791 (package-with-python2 python-fonttools))
6792
6793 (define-public python-ly
6794 (package
6795 (name "python-ly")
6796 (version "0.9.5")
6797 (source
6798 (origin
6799 (method url-fetch)
6800 (uri (pypi-uri name version))
6801 (sha256
6802 (base32
6803 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6804 (build-system python-build-system)
6805 (arguments
6806 ;; FIXME: Some tests need network access.
6807 '(#:tests? #f))
6808 (synopsis "Tool and library for manipulating LilyPond files")
6809 (description "This package provides a Python library to parse, manipulate
6810 or create documents in LilyPond format. A command line program ly is also
6811 provided that can be used to do various manipulations with LilyPond files.")
6812 (home-page "https://pypi.python.org/pypi/python-ly")
6813 (license license:gpl2+)))
6814
6815 (define-public python-appdirs
6816 (package
6817 (name "python-appdirs")
6818 (version "1.4.3")
6819 (source
6820 (origin
6821 (method url-fetch)
6822 (uri (pypi-uri "appdirs" version))
6823 (sha256
6824 (base32
6825 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6826 (build-system python-build-system)
6827 (home-page "https://github.com/ActiveState/appdirs")
6828 (synopsis
6829 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6830 (description
6831 "This module provides a portable way of finding out where user data
6832 should be stored on various operating systems.")
6833 (license license:expat)))
6834
6835 (define-public python2-appdirs
6836 (package-with-python2 python-appdirs))
6837
6838 (define-public python-llfuse
6839 (package
6840 (name "python-llfuse")
6841 (version "1.3.5")
6842 (source (origin
6843 (method url-fetch)
6844 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6845 (sha256
6846 (base32
6847 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6848 (build-system python-build-system)
6849 (inputs
6850 `(("fuse" ,fuse)
6851 ("attr" ,attr)))
6852 (native-inputs
6853 `(("pkg-config" ,pkg-config)))
6854 (synopsis "Python bindings for FUSE")
6855 (description
6856 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6857 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6858 (license license:lgpl2.0+)
6859 (properties `((python2-variant . ,(delay python2-llfuse))))))
6860
6861 (define-public python2-llfuse
6862 (package (inherit (package-with-python2
6863 (strip-python2-variant python-llfuse)))
6864 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6865
6866 ;; For attic-0.16
6867 (define-public python-llfuse-0.41
6868 (package (inherit python-llfuse)
6869 (version "0.41.1")
6870 (source (origin
6871 (method url-fetch)
6872 (uri (string-append
6873 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6874 "llfuse-" version ".tar.bz2"))
6875 (sha256
6876 (base32
6877 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6878 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6879 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6880 (license (list license:expat license:lgpl2.0+))))
6881
6882 (define-public python-msgpack
6883 (package
6884 (name "python-msgpack")
6885 (version "0.5.6")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "msgpack" version))
6889 (sha256
6890 (base32
6891 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6892 (build-system python-build-system)
6893 (arguments
6894 `(#:modules ((guix build utils)
6895 (guix build python-build-system)
6896 (ice-9 ftw)
6897 (srfi srfi-1)
6898 (srfi srfi-26))
6899 #:phases
6900 (modify-phases %standard-phases
6901 (replace 'check
6902 (lambda _
6903 (let ((cwd (getcwd)))
6904 (setenv "PYTHONPATH"
6905 (string-append cwd "/build/"
6906 (find (cut string-prefix? "lib" <>)
6907 (scandir (string-append cwd "/build")))
6908 ":"
6909 (getenv "PYTHONPATH")))
6910 (invoke "pytest" "-v" "test")))))))
6911 (native-inputs
6912 `(("python-pytest" ,python-pytest)))
6913 (synopsis "MessagePack (de)serializer")
6914 (description "MessagePack is a fast, compact binary serialization format,
6915 suitable for similar data to JSON. This package provides CPython bindings for
6916 reading and writing MessagePack data.")
6917 (home-page "https://pypi.python.org/pypi/msgpack/")
6918 (license license:asl2.0)))
6919
6920 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6921 ;; release 0.5. Some packages like borg still call it by the old name for now.
6922 ;; <https://bugs.gnu.org/30662>
6923 (define-public python-msgpack-transitional
6924 (package
6925 (inherit python-msgpack)
6926 (name "python-msgpack-transitional")
6927 (arguments
6928 (substitute-keyword-arguments (package-arguments python-msgpack)
6929 ((#:phases phases)
6930 `(modify-phases ,phases
6931 (add-after 'unpack 'configure-transitional
6932 (lambda _
6933 ;; Keep using the old name.
6934 (substitute* "setup.py"
6935 (("TRANSITIONAL = False")
6936 "TRANSITIONAL = 1"))
6937 #t))))))))
6938
6939 (define-public python2-msgpack
6940 (package-with-python2 python-msgpack))
6941
6942 (define-public python-netaddr
6943 (package
6944 (name "python-netaddr")
6945 (version "0.7.19")
6946 (source
6947 (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "netaddr" version))
6950 (sha256
6951 (base32
6952 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6953 (build-system python-build-system)
6954 (arguments `(#:tests? #f)) ;; No tests.
6955 (home-page "https://github.com/drkjam/netaddr/")
6956 (synopsis "Pythonic manipulation of network addresses")
6957 (description
6958 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6959 and MAC network addresses.")
6960 (license license:bsd-3)))
6961
6962 (define-public python2-netaddr
6963 (package-with-python2 python-netaddr))
6964
6965 (define-public python2-pyroute2
6966 (package
6967 (name "python2-pyroute2")
6968 (version "0.5.6")
6969 (source
6970 (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "pyroute2" version))
6973 (sha256
6974 (base32
6975 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6976 (build-system python-build-system)
6977 (arguments
6978 `(#:python ,python-2)) ;Python 3.x is not supported
6979 (home-page "https://github.com/svinota/pyroute2")
6980 (synopsis "Python netlink library")
6981 (description
6982 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6983 Supported netlink families and protocols include:
6984 @itemize
6985 @item rtnl, network settings - addresses, routes, traffic controls
6986 @item nfnetlink - netfilter API: ipset, nftables, ...
6987 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6988 @item devlink - manage and monitor devlink-enabled hardware
6989 @item generic - generic netlink families
6990 @itemize
6991 @item nl80211 - wireless functions API (basic support)
6992 @item taskstats - extended process statistics
6993 @item acpi_events - ACPI events monitoring
6994 @item thermal_events - thermal events monitoring
6995 @item VFS_DQUOT - disk quota events monitoring
6996 @end itemize
6997 @end itemize")
6998 (license license:gpl2+)))
6999
7000 (define-public python-wrapt
7001 (package
7002 (name "python-wrapt")
7003 (version "1.11.2")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "wrapt" version))
7008 (sha256
7009 (base32
7010 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7011 (build-system python-build-system)
7012 (arguments
7013 ;; Tests are not included in the tarball, they are only available in the
7014 ;; git repository.
7015 `(#:tests? #f))
7016 (home-page "https://github.com/GrahamDumpleton/wrapt")
7017 (synopsis "Module for decorators, wrappers and monkey patching")
7018 (description
7019 "The aim of the wrapt module is to provide a transparent object proxy for
7020 Python, which can be used as the basis for the construction of function
7021 wrappers and decorator functions.")
7022 (license license:bsd-2)))
7023
7024 (define-public python2-wrapt
7025 (package-with-python2 python-wrapt))
7026
7027 (define-public python-xlrd
7028 (package
7029 (name "python-xlrd")
7030 (version "1.0.0")
7031 (source (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "xlrd" version))
7034 (sha256
7035 (base32
7036 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7037 (build-system python-build-system)
7038 (arguments
7039 `(#:phases
7040 (modify-phases %standard-phases
7041 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7042 ;; run tests instead for now.
7043 (replace 'check (lambda _ (invoke "nosetests"))))))
7044 (native-inputs `(("python-nose" ,python-nose)))
7045 (home-page "http://www.python-excel.org/")
7046 (synopsis "Library for extracting data from Excel files")
7047 (description "This package provides a library to extract data from
7048 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7049 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7050 Unicode-aware. It is not intended as an end-user tool.")
7051 (license license:bsd-3)))
7052
7053 (define-public python2-xlrd
7054 (package-with-python2 python-xlrd))
7055
7056 (define-public python-prettytable
7057 (package
7058 (name "python-prettytable")
7059 (version "0.7.2")
7060 (source
7061 (origin
7062 (method url-fetch)
7063 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7064 (sha256
7065 (base32
7066 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7067 (build-system python-build-system)
7068 (home-page "http://code.google.com/p/prettytable/")
7069 (synopsis "Display tabular data in an ASCII table format")
7070 (description
7071 "A library designed to represent tabular data in visually appealing ASCII
7072 tables. PrettyTable allows for selection of which columns are to be printed,
7073 independent alignment of columns (left or right justified or centred) and
7074 printing of sub-tables by specifying a row range.")
7075 (license license:bsd-3)))
7076
7077 (define-public python2-prettytable
7078 (package-with-python2 python-prettytable))
7079
7080 (define-public python-tables
7081 (package
7082 (name "python-tables")
7083 (version "3.4.4")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (pypi-uri "tables" version))
7088 (sha256
7089 (base32
7090 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7091 (modules '((guix build utils)))
7092 (snippet
7093 '(begin
7094 ;; Remove pre-compiled .pyc files from source.
7095 (for-each delete-file-recursively
7096 (find-files "." "__pycache__" #:directories? #t))
7097 (for-each delete-file (find-files "." "\\.pyc$"))
7098 #t))))
7099 (build-system python-build-system)
7100 (arguments
7101 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7102 ;; or "check", so we must override the build and check phases.
7103 #:phases
7104 (modify-phases %standard-phases
7105 (add-after 'unpack 'use-gcc
7106 (lambda _
7107 (substitute* "setup.py"
7108 (("compiler = new_compiler\\(\\)" line)
7109 (string-append line
7110 "\ncompiler.set_executables(compiler='gcc',"
7111 "compiler_so='gcc',"
7112 "linker_exe='gcc',"
7113 "linker_so='gcc -shared')")))
7114 #t))
7115 (replace 'build
7116 (lambda* (#:key inputs #:allow-other-keys)
7117 (invoke "python" "setup.py" "build"
7118 (string-append "--hdf5="
7119 (assoc-ref inputs "hdf5")))))
7120 (replace 'check
7121 (lambda* (#:key inputs #:allow-other-keys)
7122 (invoke "python" "setup.py" "check"
7123 (string-append "--hdf5="
7124 (assoc-ref inputs "hdf5"))))))))
7125 (propagated-inputs
7126 `(("python-numexpr" ,python-numexpr)
7127 ("python-numpy" ,python-numpy)))
7128 (native-inputs
7129 `(("python-cython" ,python-cython)
7130 ("pkg-config" ,pkg-config)))
7131 (inputs
7132 `(("hdf5" ,hdf5)
7133 ("bzip2" ,bzip2)
7134 ("zlib" ,zlib)))
7135 (home-page "http://www.pytables.org/")
7136 (synopsis "Hierarchical datasets for Python")
7137 (description "PyTables is a package for managing hierarchical datasets and
7138 designed to efficiently cope with extremely large amounts of data.")
7139 (license license:bsd-3)))
7140
7141 (define-public python2-tables
7142 (package-with-python2 python-tables))
7143
7144 (define-public python-pyasn1
7145 (package
7146 (name "python-pyasn1")
7147 (version "0.4.3")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "pyasn1" version))
7152 (sha256
7153 (base32
7154 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7155 (build-system python-build-system)
7156 (home-page "http://pyasn1.sourceforge.net/")
7157 (synopsis "ASN.1 types and codecs")
7158 (description
7159 "This is an implementation of ASN.1 types and codecs in Python. It is
7160 suitable for a wide range of protocols based on the ASN.1 specification.")
7161 (license license:bsd-2)))
7162
7163 (define-public python2-pyasn1
7164 (package-with-python2 python-pyasn1))
7165
7166 (define-public python-pyasn1-modules
7167 (package
7168 (name "python-pyasn1-modules")
7169 (version "0.2.2")
7170 (source
7171 (origin
7172 (method url-fetch)
7173 (uri (pypi-uri "pyasn1-modules" version))
7174 (sha256
7175 (base32
7176 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7177 (build-system python-build-system)
7178 (propagated-inputs
7179 `(("python-pyasn1" ,python-pyasn1)))
7180 (home-page "https://sourceforge.net/projects/pyasn1/")
7181 (synopsis "ASN.1 codec implementations")
7182 (description
7183 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7184 implementations of ASN.1-based codecs and protocols.")
7185 (license license:bsd-3)))
7186
7187 (define-public python2-pyasn1-modules
7188 (package-with-python2 python-pyasn1-modules))
7189
7190 (define-public python-ipaddress
7191 (package
7192 (name "python-ipaddress")
7193 (version "1.0.22")
7194 (source (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "ipaddress" version))
7197 (sha256
7198 (base32
7199 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7200 (build-system python-build-system)
7201 (home-page "https://github.com/phihag/ipaddress")
7202 (synopsis "IP address manipulation library")
7203 (description
7204 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7205 in Python. This library is used to create, poke at, and manipulate IPv4 and
7206 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7207 module to older versions of Python.")
7208 (license license:psfl)))
7209
7210 (define-public python2-ipaddress
7211 (package-with-python2 python-ipaddress))
7212
7213 (define-public python2-ipaddr
7214 (package
7215 (name "python2-ipaddr")
7216 (version "2.1.11")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "ipaddr" version))
7221 (sha256
7222 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7223 (build-system python-build-system)
7224 (arguments
7225 `(#:python ,python-2 ;version 2 only
7226 #:phases
7227 (modify-phases %standard-phases
7228 (replace 'check
7229 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7230 (home-page "https://github.com/google/ipaddr-py")
7231 (synopsis "IP address manipulation library")
7232 (description
7233 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7234 IPv6 addresses and networks.
7235
7236 For new implementations you may prefer to use the standard module
7237 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7238 versions of Python.")
7239 (license license:asl2.0)))
7240
7241 (define-public python-idna
7242 (package
7243 (name "python-idna")
7244 (version "2.8")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "idna" version))
7249 (sha256
7250 (base32
7251 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7252 (build-system python-build-system)
7253 (home-page "https://github.com/kjd/idna")
7254 (synopsis "Internationalized domain names in applications")
7255 (description
7256 "This is a library to support the Internationalised Domain Names in
7257 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7258 protocol is often referred to as “IDNA2008” and can produce different results
7259 from the earlier standard from 2003. The library is also intended to act as a
7260 suitable drop-in replacement for the “encodings.idna” module that comes with
7261 the Python standard library but currently only supports the older 2003
7262 specification.")
7263 (license license:bsd-4)))
7264
7265 (define-public python-idna-2.7
7266 (package (inherit python-idna)
7267 (version "2.7")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (pypi-uri "idna" version))
7271 (sha256
7272 (base32
7273 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7274
7275
7276 (define-public python2-idna
7277 (package-with-python2 python-idna))
7278
7279 (define-public python-idna-ssl
7280 (package
7281 (name "python-idna-ssl")
7282 (version "1.0.1")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "idna-ssl" version))
7287 (sha256
7288 (base32
7289 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:tests? #f)) ;circular dependency with python-aiohttp
7293 (home-page "https://github.com/aio-libs/idna-ssl")
7294 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7295 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7296 domains support.")
7297 (license license:expat)))
7298
7299 (define-public python-pretend
7300 (package
7301 (name "python-pretend")
7302 (version "1.0.9")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "pretend" version))
7307 (sha256
7308 (base32
7309 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7310 (build-system python-build-system)
7311 (home-page "https://github.com/alex/pretend")
7312 (synopsis "Library for stubbing in Python")
7313 (description
7314 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7315 technique for writing tests. You may hear the term mixed up with mocks,
7316 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7317 responses, rather than doing any computation.")
7318 (license license:bsd-3)))
7319
7320 (define-public python2-pretend
7321 (package-with-python2 python-pretend))
7322
7323 (define-public python-pip
7324 (package
7325 (name "python-pip")
7326 (version "19.2.1")
7327 (source
7328 (origin
7329 (method url-fetch)
7330 (uri (pypi-uri "pip" version))
7331 (sha256
7332 (base32
7333 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7334 (build-system python-build-system)
7335 (arguments
7336 '(#:tests? #f)) ; there are no tests in the pypi archive.
7337 (home-page "https://pip.pypa.io/")
7338 (synopsis "Package manager for Python software")
7339 (description
7340 "Pip is a package manager for Python software, that finds packages on the
7341 Python Package Index (PyPI).")
7342 (license license:expat)))
7343
7344 (define-public python2-pip
7345 (package-with-python2 python-pip))
7346
7347 (define-public python-tlsh
7348 (package
7349 (name "python-tlsh")
7350 (version "3.4.5")
7351 (home-page "https://github.com/trendmicro/tlsh")
7352 (source
7353 (origin
7354 (method git-fetch)
7355 (uri (git-reference
7356 (url "https://github.com/trendmicro/tlsh.git")
7357 (commit (string-append "v" version))))
7358 (file-name (git-file-name name version))
7359 (sha256
7360 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7361 (build-system cmake-build-system)
7362 (arguments
7363 '(#:out-of-source? #f
7364 #:phases (modify-phases %standard-phases
7365 (replace
7366 'install
7367 (lambda* (#:key outputs #:allow-other-keys)
7368 ;; Build and install the Python bindings. The underlying
7369 ;; C++ library is apparently not meant to be installed.
7370 (let ((out (assoc-ref outputs "out")))
7371 (with-directory-excursion "py_ext"
7372 (and (system* "python" "setup.py" "build")
7373 (system* "python" "setup.py" "install"
7374 (string-append "--prefix=" out))))))))))
7375 (inputs `(("python" ,python-wrapper))) ;for the bindings
7376 (synopsis "Fuzzy matching library for Python")
7377 (description
7378 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7379 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7380 value which can be used for similarity comparisons. Similar objects have
7381 similar hash values, which allows for the detection of similar objects by
7382 comparing their hash values. The byte stream should have a sufficient amount
7383 of complexity; for example, a byte stream of identical bytes will not generate
7384 a hash value.")
7385 (license license:asl2.0)))
7386
7387 (define-public python2-tlsh
7388 (package
7389 (inherit python-tlsh)
7390 (name "python2-tlsh")
7391 (inputs `(("python" ,python-2)))))
7392
7393 (define-public python-termcolor
7394 (package
7395 (name "python-termcolor")
7396 (version "1.1.0")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "termcolor" version))
7401 (sha256
7402 (base32
7403 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7404 (build-system python-build-system)
7405 (arguments
7406 ;; There are no tests.
7407 `(#:tests? #f))
7408 (home-page "https://pypi.python.org/pypi/termcolor")
7409 (synopsis "ANSII Color formatting for terminal output")
7410 (description
7411 "This package provides ANSII Color formatting for output in terminals.")
7412 (license license:expat)))
7413
7414 (define-public python2-termcolor
7415 (package-with-python2 python-termcolor))
7416
7417 (define-public python-libarchive-c
7418 (package
7419 (name "python-libarchive-c")
7420 (version "2.8")
7421 (source (origin
7422 (method url-fetch)
7423 (uri (pypi-uri "libarchive-c" version))
7424 (sha256
7425 (base32
7426 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7427 (build-system python-build-system)
7428 (arguments
7429 '(#:phases (modify-phases %standard-phases
7430 (add-before
7431 'build 'reference-libarchive
7432 (lambda* (#:key inputs #:allow-other-keys)
7433 ;; Retain the absolute file name of libarchive.so.
7434 (let ((libarchive (assoc-ref inputs "libarchive")))
7435 (substitute* "libarchive/ffi.py"
7436 (("find_library\\('archive'\\)")
7437 (string-append "'" libarchive
7438 "/lib/libarchive.so'"))))))
7439 (replace 'check
7440 (lambda _ (invoke "pytest" "-vv"))))))
7441 (native-inputs
7442 `(("python-mock" ,python-mock)
7443 ("python-pytest" ,python-pytest)))
7444 (inputs
7445 `(("libarchive" ,libarchive)))
7446 (home-page "https://github.com/Changaco/python-libarchive-c")
7447 (synopsis "Python interface to libarchive")
7448 (description
7449 "This package provides Python bindings to libarchive, a C library to
7450 access possibly compressed archives in many different formats. It uses
7451 Python's @code{ctypes} foreign function interface (FFI).")
7452 (license license:lgpl2.0+)))
7453
7454 (define-public python2-libarchive-c
7455 (package-with-python2 python-libarchive-c))
7456
7457 (define-public python-file
7458 (package
7459 (inherit file)
7460 (name "python-file")
7461 (build-system python-build-system)
7462 (arguments
7463 '(#:tests? #f ;no tests
7464 #:configure-flags '("--single-version-externally-managed" "--root=/")
7465 #:phases (modify-phases %standard-phases
7466 (add-before 'build 'change-directory
7467 (lambda _
7468 (chdir "python")
7469 #t))
7470 (add-before 'build 'set-library-file-name
7471 (lambda* (#:key inputs #:allow-other-keys)
7472 (let ((file (assoc-ref inputs "file")))
7473 (substitute* "magic.py"
7474 (("find_library\\('magic'\\)")
7475 (string-append "'" file "/lib/libmagic.so'")))
7476 #t))))))
7477 (inputs `(("file" ,file)))
7478 (native-inputs (if (%current-target-system)
7479 `(("self" ,this-package))
7480 '()))
7481 (synopsis "Python bindings to the libmagic file type guesser. Note that
7482 this module and the python-magic module both provide a \"magic.py\" file;
7483 these two modules, which are different and were developed separately, both
7484 serve the same purpose: provide Python bindings for libmagic.")))
7485
7486 (define-public python2-file
7487 (package-with-python2 python-file))
7488
7489 (define-public python-debian
7490 (package
7491 (name "python-debian")
7492 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7493 (version "0.1.28")
7494 (source
7495 (origin
7496 (method url-fetch)
7497 (uri (pypi-uri name version))
7498 (sha256
7499 (base32
7500 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7501 (build-system python-build-system)
7502 (propagated-inputs
7503 `(("python-six" ,python-six)))
7504 (synopsis "Debian package related modules")
7505 (description
7506 ;; XXX: Use @enumerate instead of @itemize to work around
7507 ;; <http://bugs.gnu.org/21772>.
7508 "This package provides Python modules that abstract many formats of
7509 Debian-related files, such as:
7510
7511 @enumerate
7512 @item Debtags information;
7513 @item @file{debian/changelog} files;
7514 @item packages files, pdiffs;
7515 @item control files of single or multiple RFC822-style paragraphs---e.g.
7516 @file{debian/control}, @file{.changes}, @file{.dsc};
7517 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7518 contained files and meta-information.
7519 @end enumerate\n")
7520
7521 ;; Modules are either GPLv2+ or GPLv3+.
7522 (license license:gpl3+)))
7523
7524 (define-public python2-debian
7525 (package-with-python2 python-debian))
7526
7527 (define-public python-nbformat
7528 (package
7529 (name "python-nbformat")
7530 (version "4.4.0")
7531 (source
7532 (origin
7533 (method url-fetch)
7534 (uri (pypi-uri "nbformat" version))
7535 (sha256
7536 (base32
7537 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7538 (build-system python-build-system)
7539 (arguments `(#:tests? #f)) ; no test target
7540 (propagated-inputs
7541 `(("python-ipython-genutils" ,python-ipython-genutils)
7542 ("python-jsonschema" ,python-jsonschema)
7543 ("python-jupyter-core" ,python-jupyter-core)
7544 ("python-traitlets" ,python-traitlets)))
7545 (home-page "http://jupyter.org")
7546 (synopsis "Jupyter Notebook format")
7547 (description "This package provides the reference implementation of the
7548 Jupyter Notebook format and Python APIs for working with notebooks.")
7549 (license license:bsd-3)))
7550
7551 (define-public python2-nbformat
7552 (package-with-python2 python-nbformat))
7553
7554 (define-public python-bleach
7555 (package
7556 (name "python-bleach")
7557 (version "1.4.3")
7558 (source
7559 (origin
7560 (method url-fetch)
7561 (uri (pypi-uri "bleach" version))
7562 (sha256
7563 (base32
7564 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7565 (build-system python-build-system)
7566 (propagated-inputs
7567 `(("python-html5lib" ,python-html5lib-0.9)
7568 ("python-six" ,python-six)))
7569 (native-inputs
7570 `(("python-nose" ,python-nose)))
7571 (home-page "https://github.com/jsocol/bleach")
7572 (synopsis "Whitelist-based HTML-sanitizing tool")
7573 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7574 (license license:asl2.0)))
7575
7576 (define-public python2-bleach
7577 (package-with-python2 python-bleach))
7578
7579 (define-public python-entrypoints
7580 (package
7581 (name "python-entrypoints")
7582 (version "0.3")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "entrypoints" version))
7587 (sha256
7588 (base32
7589 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7590 (build-system python-build-system)
7591 ;; The package does not come with a setup.py file, so we have to generate
7592 ;; one ourselves.
7593 (arguments
7594 `(#:tests? #f
7595 #:phases
7596 (modify-phases %standard-phases
7597 (add-after 'unpack 'create-setup.py
7598 (lambda _
7599 (call-with-output-file "setup.py"
7600 (lambda (port)
7601 (format port "\
7602 from setuptools import setup
7603 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7604 " ,version))))))))
7605 (home-page "https://github.com/takluyver/entrypoints")
7606 (synopsis "Discover and load entry points from installed Python packages")
7607 (description "Entry points are a way for Python packages to advertise
7608 objects with some common interface. The most common examples are
7609 @code{console_scripts} entry points, which define shell commands by
7610 identifying a Python function to run. The @code{entrypoints} module contains
7611 functions to find and load entry points.")
7612 (license license:expat)))
7613
7614 (define-public python2-entrypoints
7615 (package-with-python2 python-entrypoints))
7616
7617 (define-public python-nbconvert
7618 (package
7619 (name "python-nbconvert")
7620 (version "5.0.0b1")
7621 (source
7622 (origin
7623 (method url-fetch)
7624 (uri (pypi-uri "nbconvert" version))
7625 (sha256
7626 (base32
7627 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7628 (build-system python-build-system)
7629 (arguments
7630 `(;; The "bdist_egg" target is disabled by default, causing the installation
7631 ;; to fail.
7632 #:configure-flags (list "bdist_egg")
7633 ;; FIXME: 5 failures, 40 errors.
7634 #:tests? #f))
7635 ;; #:phases
7636 ;; (modify-phases %standard-phases
7637 ;; (replace 'check
7638 ;; (lambda _
7639 ;; (zero? (system* "py.test" "-v")))))
7640 (native-inputs
7641 `(("python-pytest" ,python-pytest)))
7642 (propagated-inputs
7643 `(("python-bleach" ,python-bleach)
7644 ("python-entrypoints" ,python-entrypoints)
7645 ("python-jinja2" ,python-jinja2)
7646 ("python-jupyter-core" ,python-jupyter-core)
7647 ("python-mistune" ,python-mistune)
7648 ("python-nbformat" ,python-nbformat)
7649 ("python-pygments" ,python-pygments)
7650 ("python-traitlets" ,python-traitlets)))
7651 (home-page "http://jupyter.org")
7652 (synopsis "Converting Jupyter Notebooks")
7653 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7654 notebooks to various other formats via Jinja templates. It allows you to
7655 convert an @code{.ipynb} notebook file into various static formats including:
7656
7657 @enumerate
7658 @item HTML
7659 @item LaTeX
7660 @item PDF
7661 @item Reveal JS
7662 @item Markdown (md)
7663 @item ReStructured Text (rst)
7664 @item executable script
7665 @end enumerate\n")
7666 (license license:bsd-3)))
7667
7668 (define-public python2-nbconvert
7669 (package-with-python2 python-nbconvert))
7670
7671 (define-public python-notebook
7672 (package
7673 (name "python-notebook")
7674 (version "5.7.4")
7675 (source (origin
7676 (method url-fetch)
7677 (uri (pypi-uri "notebook" version))
7678 (sha256
7679 (base32
7680 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7681 (build-system python-build-system)
7682 (arguments
7683 `(#:phases
7684 (modify-phases %standard-phases
7685 (replace 'check
7686 (lambda _
7687 ;; These tests require a browser
7688 (delete-file-recursively "notebook/tests/selenium")
7689 ;; Some tests need HOME
7690 (setenv "HOME" "/tmp")
7691 ;; This file contains "warningfilters", which are not supported
7692 ;; by this version of nose.
7693 (delete-file "setup.cfg")
7694 (with-directory-excursion "/tmp"
7695 (invoke "nosetests" "-v"))
7696 #t)))))
7697 (propagated-inputs
7698 `(("python-jupyter-core" ,python-jupyter-core)
7699 ("python-nbformat" ,python-nbformat)
7700 ("python-nbconvert" ,python-nbconvert)
7701 ("python-prometheus-client" ,python-prometheus-client)
7702 ("python-send2trash" ,python-send2trash)
7703 ("python-terminado" ,python-terminado)))
7704 (native-inputs
7705 `(("python-nose" ,python-nose)
7706 ("python-sphinx" ,python-sphinx)
7707 ("python-requests" ,python-requests)))
7708 (home-page "http://jupyter.org/")
7709 (synopsis "Web-based notebook environment for interactive computing")
7710 (description
7711 "The Jupyter HTML notebook is a web-based notebook environment for
7712 interactive computing.")
7713 (properties `((python2-variant . ,(delay python2-notebook))))
7714 (license license:bsd-3)))
7715
7716 (define-public python2-notebook
7717 (let ((base (package-with-python2
7718 (strip-python2-variant python-notebook))))
7719 (package (inherit base)
7720 (native-inputs
7721 `(("python2-mock" ,python2-mock)
7722 ,@(package-native-inputs base)))
7723 (arguments
7724 (substitute-keyword-arguments (package-arguments base)
7725 ((#:phases phases)
7726 `(modify-phases ,phases
7727 (add-before 'check 'disable-test-case
7728 ;; The test requires network access to localhost. Curiously it
7729 ;; fails with Python 2 only. Simply make the test-case return
7730 ;; immediately.
7731 (lambda _
7732 (substitute*
7733 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7734 (("formats = self.nbconvert_api") "return #")))))))))))
7735
7736 (define-public python-widgetsnbextension
7737 (package
7738 (name "python-widgetsnbextension")
7739 (version "3.4.2")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (pypi-uri "widgetsnbextension" version))
7744 (sha256
7745 (base32
7746 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7747 (build-system python-build-system)
7748 (propagated-inputs
7749 `(("python-ipykernel" ,python-ipykernel)
7750 ("python-notebook" ,python-notebook)))
7751 (native-inputs
7752 `(("python-certifi" ,python-certifi)
7753 ("python-nose" ,python-nose)))
7754 (home-page "https://ipython.org")
7755 (synopsis "IPython HTML widgets for Jupyter")
7756 (description "This package provides interactive HTML widgets for Jupyter
7757 notebooks.")
7758 (license license:bsd-3)))
7759
7760 (define-public python2-widgetsnbextension
7761 (package-with-python2 python-widgetsnbextension))
7762
7763 (define-public python-ipywidgets
7764 (package
7765 (name "python-ipywidgets")
7766 (version "5.2.2")
7767 (source
7768 (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "ipywidgets" version))
7771 (sha256
7772 (base32
7773 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7774 (build-system python-build-system)
7775 (propagated-inputs
7776 `(("python-ipython" ,python-ipython)
7777 ("python-traitlets" ,python-traitlets)
7778 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7779 (native-inputs
7780 `(("python-nose" ,python-nose)
7781 ("python-pytest" ,python-pytest)))
7782 (home-page "https://ipython.org")
7783 (synopsis "IPython HTML widgets for Jupyter")
7784 (description "Ipywidgets are interactive HTML widgets for Jupyter
7785 notebooks and the IPython kernel. Notebooks come alive when interactive
7786 widgets are used. Users gain control of their data and can visualize changes
7787 in the data.")
7788 (license license:bsd-3)))
7789
7790 (define-public python2-ipywidgets
7791 (package-with-python2 python-ipywidgets))
7792
7793 (define-public python-jupyter-console
7794 (package
7795 (name "python-jupyter-console")
7796 (version "6.0.0")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "jupyter_console" version))
7801 (sha256
7802 (base32
7803 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7804 (build-system python-build-system)
7805 (propagated-inputs
7806 `(("python-ipykernel" ,python-ipykernel)
7807 ("python-jupyter-client" ,python-jupyter-client)
7808 ("python-prompt-toolkit" ,python-prompt-toolkit)
7809 ("python-pygments" ,python-pygments)))
7810 (native-inputs
7811 `(("python-nose" ,python-nose)))
7812 (home-page "https://jupyter.org")
7813 (synopsis "Jupyter terminal console")
7814 (description "This package provides a terminal-based console frontend for
7815 Jupyter kernels. It also allows for console-based interaction with non-Python
7816 Jupyter kernels such as IJulia and IRKernel.")
7817 (license license:bsd-3)))
7818
7819 (define-public python2-jupyter-console
7820 (package
7821 (name "python2-jupyter-console")
7822 (version "5.2.0")
7823 (source
7824 (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "jupyter_console" version))
7827 (sha256
7828 (base32
7829 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7830 (build-system python-build-system)
7831 ;; Tests only run in an TTY.
7832 (arguments `(#:tests? #f))
7833 (propagated-inputs
7834 `(("python2-ipykernel" ,python2-ipykernel)
7835 ("python2-jupyter-client" ,python2-jupyter-client)
7836 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7837 ("python2-pygments" ,python2-pygments)))
7838 (native-inputs
7839 `(("python2-nose" ,python2-nose)))
7840 (home-page "https://jupyter.org")
7841 (synopsis "Jupyter terminal console")
7842 (description "This package provides a terminal-based console frontend for
7843 Jupyter kernels. It also allows for console-based interaction with non-Python
7844 Jupyter kernels such as IJulia and IRKernel.")
7845 (license license:bsd-3)))
7846
7847 ;; The python-ipython and python-jupyter-console require each other. To get
7848 ;; the functionality in both packages working, strip down the
7849 ;; python-jupyter-console package when using it as an input to python-ipython.
7850 (define python-jupyter-console-minimal
7851 (package
7852 (inherit python-jupyter-console)
7853 (name "python-jupyter-console-minimal")
7854 (arguments
7855 (substitute-keyword-arguments
7856 (package-arguments python-jupyter-console)
7857 ((#:phases phases)
7858 `(modify-phases ,phases
7859 (add-after 'install 'delete-bin
7860 (lambda* (#:key outputs #:allow-other-keys)
7861 ;; Delete the bin files, to avoid conflicts in profiles
7862 ;; where python-ipython and python-jupyter-console are
7863 ;; both present.
7864 (delete-file-recursively
7865 (string-append
7866 (assoc-ref outputs "out") "/bin"))))))))
7867 ;; Remove the python-ipython propagated input, to avoid the cycle
7868 (propagated-inputs
7869 (alist-delete
7870 "python-ipython"
7871 (package-propagated-inputs python-jupyter-console)))))
7872
7873 (define-public python-qtconsole
7874 (package
7875 (name "python-qtconsole")
7876 (version "4.4.3")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "qtconsole" version))
7881 (sha256
7882 (base32
7883 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7884 (build-system python-build-system)
7885 (arguments
7886 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7887 ;; but we only have the LTS version 5.x. This means that there might be
7888 ;; runtime errors, but since this is a dependency of the Jupyter package,
7889 ;; and Jupyter can be used without the qtconsole we can overlook this for
7890 ;; now.
7891 `(#:tests? #f
7892 #:phases
7893 (modify-phases %standard-phases
7894 (add-before 'check 'pre-check
7895 (lambda _
7896 (setenv "QT_QPA_PLATFORM" "offscreen")
7897 #t)))))
7898 (propagated-inputs
7899 `(("python-ipykernel" ,python-ipykernel)
7900 ("python-ipython" ,python-ipython)))
7901 (native-inputs
7902 `(("python-pytest" ,python-pytest)))
7903 (home-page "http://jupyter.org")
7904 (synopsis "Jupyter Qt console")
7905 (description "This package provides a Qt-based console for Jupyter with
7906 support for rich media output.")
7907 (license license:bsd-3)))
7908
7909 (define-public jupyter
7910 (package
7911 (name "jupyter")
7912 (version "1.0.0")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "jupyter" version))
7917 (sha256
7918 (base32
7919 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7920 (build-system python-build-system)
7921 (arguments '(#:tests? #f)) ; there are none.
7922 (propagated-inputs
7923 `(("python-ipykernel" ,python-ipykernel)
7924 ("python-ipywidgets" ,python-ipywidgets)
7925 ("python-jupyter-console" ,python-jupyter-console)
7926 ("python-nbconvert" ,python-nbconvert)
7927 ("python-notebook" ,python-notebook)
7928 ("python-qtconsole" ,python-qtconsole)))
7929 (native-search-paths
7930 (list (search-path-specification
7931 (variable "JUPYTER_PATH")
7932 (files '("share/jupyter")))))
7933 (home-page "https://jupyter.org")
7934 (synopsis "Web application for interactive documents")
7935 (description
7936 "The Jupyter Notebook is a web application that allows you to create and
7937 share documents that contain live code, equations, visualizations and
7938 explanatory text. Uses include: data cleaning and transformation, numerical
7939 simulation, statistical modeling, machine learning and much more.")
7940 (license license:bsd-3)))
7941
7942 (define-public python-chardet
7943 (package
7944 (name "python-chardet")
7945 (version "3.0.4")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (pypi-uri "chardet" version))
7950 (sha256
7951 (base32
7952 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7953 (native-inputs
7954 `(("python-hypothesis" ,python-hypothesis)
7955 ("python-pytest" ,python-pytest)
7956 ("python-pytest-runner" ,python-pytest-runner)))
7957 (build-system python-build-system)
7958 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7959 (arguments `(#:tests? #f))
7960 (home-page "https://github.com/chardet/chardet")
7961 (synopsis "Universal encoding detector for Python 2 and 3")
7962 (description
7963 "This package provides @code{chardet}, a Python module that can
7964 automatically detect a wide range of file encodings.")
7965 (license license:lgpl2.1+)))
7966
7967 (define-public python2-chardet
7968 (package-with-python2 python-chardet))
7969
7970 (define-public python-docopt
7971 (package
7972 (name "python-docopt")
7973 (version "0.6.2")
7974 (source
7975 (origin
7976 (method url-fetch)
7977 ;; The release on PyPI does not include tests.
7978 (uri (string-append
7979 "https://github.com/docopt/docopt/archive/"
7980 version ".tar.gz"))
7981 (file-name (string-append name "-" version ".tar.gz"))
7982 (sha256
7983 (base32
7984 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7985 (build-system python-build-system)
7986 (native-inputs
7987 `(("python-pytest" ,python-pytest)))
7988 (arguments
7989 `(#:phases
7990 (modify-phases %standard-phases
7991 (replace 'check
7992 (lambda _ (invoke "py.test"))))))
7993 (home-page "http://docopt.org")
7994 (synopsis "Command-line interface description language for Python")
7995 (description "This library allows the user to define a command-line
7996 interface from a program's help message rather than specifying it
7997 programmatically with command-line parsers like @code{getopt} and
7998 @code{argparse}.")
7999 (license license:expat)))
8000
8001 (define-public python2-docopt
8002 (package-with-python2 python-docopt))
8003
8004 (define-public python-pythondialog
8005 (package
8006 (name "python-pythondialog")
8007 (version "3.4.0")
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "pythondialog" version))
8012 (sha256
8013 (base32
8014 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8015 (build-system python-build-system)
8016 (arguments
8017 `(#:phases
8018 (modify-phases %standard-phases
8019 (add-after 'unpack 'patch-path
8020 (lambda* (#:key inputs #:allow-other-keys)
8021 (let* ((dialog (assoc-ref inputs "dialog")))
8022 ;; Since this library really wants to grovel the search path, we
8023 ;; must hardcode dialog's store path into it.
8024 (substitute* "dialog.py"
8025 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8026 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8027 #t))))
8028 #:tests? #f)) ; no test suite
8029 (propagated-inputs
8030 `(("dialog" ,dialog)))
8031 (home-page "http://pythondialog.sourceforge.net/")
8032 (synopsis "Python interface to the UNIX dialog utility")
8033 (description "A Python wrapper for the dialog utility. Its purpose is to
8034 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8035 This allows one to make simple text-mode user interfaces on Unix-like systems")
8036 (license license:lgpl2.1)
8037 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8038
8039 (define-public python2-pythondialog
8040 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8041 (package
8042 (inherit base)
8043 (version (package-version python-pythondialog))
8044 (source (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "python2-pythondialog" version))
8047 (sha256
8048 (base32
8049 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8050
8051 (define-public python-configobj
8052 (package
8053 (name "python-configobj")
8054 (version "5.0.6")
8055 (source (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "configobj" version))
8058 (sha256
8059 (base32
8060 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8061 ;; Patch setup.py so it looks for python-setuptools, which is
8062 ;; required to parse the keyword 'install_requires' in setup.py.
8063 (patches (search-patches "python-configobj-setuptools.patch"))))
8064 (build-system python-build-system)
8065 (propagated-inputs
8066 `(("python-six" ,python-six)))
8067 (synopsis "Config file reading, writing and validation")
8068 (description "ConfigObj is a simple but powerful config file reader and
8069 writer: an ini file round tripper. Its main feature is that it is very easy to
8070 use, with a straightforward programmer’s interface and a simple syntax for
8071 config files.")
8072 (home-page "https://github.com/DiffSK/configobj")
8073 (license license:bsd-3)))
8074
8075 (define-public python2-configobj
8076 (package-with-python2 python-configobj))
8077
8078 (define-public python-configargparse
8079 (package
8080 (name "python-configargparse")
8081 (version "0.14.0")
8082 (source (origin
8083 (method url-fetch)
8084 (uri (pypi-uri "ConfigArgParse" version))
8085 (sha256
8086 (base32
8087 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8088 (build-system python-build-system)
8089 (native-inputs
8090 `(("python-pyyaml" ,python-pyyaml)))
8091 (arguments
8092 `(#:phases
8093 (modify-phases %standard-phases
8094 (replace 'check
8095 (lambda _
8096 ;; Bypass setuptools-shim because one test relies on "setup.py"
8097 ;; being the first argument passed to the python call.
8098 ;;
8099 ;; NOTE: Many tests do not run because they rely on Python's
8100 ;; built-in test.test_argparse, but we remove the unit tests from
8101 ;; our Python installation.
8102 (invoke "python" "setup.py" "test"))))))
8103 (synopsis "Replacement for argparse")
8104 (description "A drop-in replacement for argparse that allows options to also
8105 be set via config files and/or environment variables.")
8106 (home-page "https://github.com/bw2/ConfigArgParse")
8107 (license license:expat)))
8108
8109 (define-public python2-configargparse
8110 (package-with-python2 python-configargparse))
8111
8112 (define-public python-argparse-manpage
8113 (package
8114 (name "python-argparse-manpage")
8115 (version "1.1")
8116 (source
8117 (origin
8118 (method url-fetch)
8119 (uri (pypi-uri "argparse-manpage" version))
8120 (sha256
8121 (base32
8122 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8123 (build-system python-build-system)
8124 (home-page "https://github.com/praiskup/argparse-manpage")
8125 (synopsis "Build manual page from Python's ArgumentParser object")
8126 (description
8127 "This package provides tools to build manual pages from Python's
8128 @code{ArgumentParser} object.")
8129 (license license:asl2.0)))
8130
8131 (define-public python-contextlib2
8132 (package
8133 (name "python-contextlib2")
8134 (version "0.5.5")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "contextlib2" version))
8139 (sha256
8140 (base32
8141 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8142 (build-system python-build-system)
8143 (home-page "http://contextlib2.readthedocs.org/")
8144 (synopsis "Tools for decorators and context managers")
8145 (description "This module is primarily a backport of the Python
8146 3.2 contextlib to earlier Python versions. Like contextlib, it
8147 provides utilities for common tasks involving decorators and context
8148 managers. It also contains additional features that are not part of
8149 the standard library.")
8150 (license license:psfl)))
8151
8152 (define-public python2-contextlib2
8153 (package
8154 (name "python2-contextlib2")
8155 (version "0.5.5")
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "contextlib2" version))
8160 (sha256
8161 (base32
8162 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8163 (build-system python-build-system)
8164 (arguments
8165 `(#:python ,python-2
8166 #:phases
8167 (modify-phases %standard-phases
8168 (replace 'check
8169 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8170 (native-inputs
8171 `(("python2-unittest2" ,python2-unittest2)))
8172 (home-page "http://contextlib2.readthedocs.org/")
8173 (synopsis "Tools for decorators and context managers")
8174 (description "This module is primarily a backport of the Python
8175 3.2 contextlib to earlier Python versions. Like contextlib, it
8176 provides utilities for common tasks involving decorators and context
8177 managers. It also contains additional features that are not part of
8178 the standard library.")
8179 (license license:psfl)))
8180
8181 (define-public python-texttable
8182 (package
8183 (name "python-texttable")
8184 (version "0.9.1")
8185 (source
8186 (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "texttable" version))
8189 (sha256
8190 (base32
8191 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8192 (build-system python-build-system)
8193 (arguments '(#:tests? #f)) ; no tests
8194 (home-page "https://github.com/foutaise/texttable/")
8195 (synopsis "Python module for creating simple ASCII tables")
8196 (description "Texttable is a Python module for creating simple ASCII
8197 tables.")
8198 (license license:lgpl2.1+)))
8199
8200 (define-public python2-texttable
8201 (package-with-python2 python-texttable))
8202
8203 (define-public python-atomicwrites
8204 (package
8205 (name "python-atomicwrites")
8206 (version "1.3.0")
8207 (source (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "atomicwrites" version))
8210 (sha256
8211 (base32
8212 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8213 (build-system python-build-system)
8214 (synopsis "Atomic file writes in Python")
8215 (description "Library for atomic file writes using platform dependent tools
8216 for atomic file system operations.")
8217 (home-page "https://github.com/untitaker/python-atomicwrites")
8218 (license license:expat)))
8219
8220 (define-public python2-atomicwrites
8221 (package-with-python2 python-atomicwrites))
8222
8223 (define-public python-click-threading
8224 (package
8225 (name "python-click-threading")
8226 (version "0.4.4")
8227 (source (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "click-threading" version))
8230 (sha256
8231 (base32
8232 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8233 (build-system python-build-system)
8234 (propagated-inputs
8235 `(("python-click" ,python-click)))
8236 (synopsis "Utilities for multithreading in Click")
8237 (description "This package provides utilities for multithreading in Click
8238 applications.")
8239 (home-page "https://github.com/click-contrib/click-threading")
8240 (license license:expat)))
8241
8242 (define-public python-click-log
8243 (package
8244 (name "python-click-log")
8245 (version "0.3.2")
8246 (source (origin
8247 (method url-fetch)
8248 (uri (pypi-uri "click-log" version))
8249 (sha256
8250 (base32
8251 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8252 (build-system python-build-system)
8253 (propagated-inputs
8254 `(("python-click" ,python-click)))
8255 (synopsis "Logging for click applications")
8256 (description "This package provides a Python library for logging Click
8257 applications.")
8258 (home-page "https://github.com/click-contrib/click-log")
8259 (license license:expat)))
8260
8261 (define-public python-apipkg
8262 (package
8263 (name "python-apipkg")
8264 (version "1.4")
8265 (source (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "apipkg" version))
8268 (sha256
8269 (base32
8270 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8271 (build-system python-build-system)
8272 (native-inputs
8273 `(("python-pytest" ,python-pytest)))
8274 (synopsis "Namespace control and lazy-import mechanism")
8275 (description "With apipkg you can control the exported namespace of a Python
8276 package and greatly reduce the number of imports for your users. It is a small
8277 pure Python module that works on virtually all Python versions.")
8278 (home-page "https://github.com/pytest-dev/apipkg")
8279 (license license:expat)))
8280
8281 (define-public python2-apipkg
8282 (package-with-python2 python-apipkg))
8283
8284 (define-public python-execnet
8285 (package
8286 (name "python-execnet")
8287 (version "1.4.1")
8288 (source (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "execnet" version))
8291 (sha256
8292 (base32
8293 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8294 (build-system python-build-system)
8295 (arguments
8296 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8297 ;; The two test failures are caused by the lack of an `ssh` executable.
8298 ;; The test suite can be run with pytest after the 'install' phase.
8299 #:tests? #f))
8300 (native-inputs
8301 `(("python-pytest" ,python-pytest)
8302 ("python-setuptools-scm" ,python-setuptools-scm)))
8303 (propagated-inputs
8304 `(("python-apipkg" ,python-apipkg)))
8305 (synopsis "Rapid multi-Python deployment")
8306 (description "Execnet provides a share-nothing model with
8307 channel-send/receive communication for distributing execution across many
8308 Python interpreters across version, platform and network barriers. It has a
8309 minimal and fast API targeting the following uses:
8310 @enumerate
8311 @item distribute tasks to (many) local or remote CPUs
8312 @item write and deploy hybrid multi-process applications
8313 @item write scripts to administer multiple environments
8314 @end enumerate")
8315 (home-page "http://codespeak.net/execnet/")
8316 (license license:expat)))
8317
8318 (define-public python2-execnet
8319 (package-with-python2 python-execnet))
8320
8321 (define-public python-icalendar
8322 (package
8323 (name "python-icalendar")
8324 (version "4.0.3")
8325 (source (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "icalendar" version))
8328 (sha256
8329 (base32
8330 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8331 (build-system python-build-system)
8332 (propagated-inputs
8333 `(("python-dateutil" ,python-dateutil)
8334 ("python-pytz" ,python-pytz)))
8335 (synopsis "Python library for parsing iCalendar files")
8336 (description "The icalendar package is a parser/generator of iCalendar
8337 files for use with Python.")
8338 (home-page "https://github.com/collective/icalendar")
8339 (license license:bsd-2)))
8340
8341 (define-public python-args
8342 (package
8343 (name "python-args")
8344 (version "0.1.0")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "args" version))
8348 (sha256
8349 (base32
8350 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8351 (build-system python-build-system)
8352 (home-page "https://github.com/kennethreitz/args")
8353 (synopsis "Command-line argument parser")
8354 (description
8355 "This library provides a Python module to parse command-line arguments.")
8356 (license license:bsd-3)))
8357
8358 (define-public python2-args
8359 (package-with-python2 python-args))
8360
8361 (define-public python-clint
8362 (package
8363 (name "python-clint")
8364 (version "0.5.1")
8365 (source (origin
8366 (method url-fetch)
8367 (uri (pypi-uri "clint" version))
8368 (sha256
8369 (base32
8370 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8371 (build-system python-build-system)
8372 (arguments
8373 '(#:phases
8374 (modify-phases %standard-phases
8375 (replace 'check
8376 (lambda _ (invoke "py.test" "-v"))))))
8377 (native-inputs
8378 `(("python-pytest" ,python-pytest)))
8379 (propagated-inputs
8380 `(("python-args" ,python-args)))
8381 (home-page "https://github.com/kennethreitz/clint")
8382 (synopsis "Command-line interface tools")
8383 (description
8384 "Clint is a Python module filled with a set of tools for developing
8385 command-line applications, including tools for colored and indented
8386 output, progress bar display, and pipes.")
8387 (license license:isc)))
8388
8389 (define-public python2-clint
8390 (package-with-python2 python-clint))
8391
8392 (define-public python-rply
8393 (package
8394 (name "python-rply")
8395 (version "0.7.5")
8396 (source (origin
8397 (method url-fetch)
8398 (uri (pypi-uri "rply" version))
8399 (sha256
8400 (base32
8401 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8402 (build-system python-build-system)
8403 (propagated-inputs
8404 `(("python-appdirs" ,python-appdirs)))
8405 (home-page "https://github.com/alex/rply")
8406 (synopsis "Parser generator for Python")
8407 (description
8408 "This package provides a pure Python based parser generator, that also
8409 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8410 with a new public API, and RPython support.")
8411 (license license:bsd-3)))
8412
8413 (define-public python2-rply
8414 (package-with-python2 python-rply))
8415
8416 (define-public python-hy
8417 (package
8418 (name "python-hy")
8419 (version "0.13.0")
8420 (source (origin
8421 (method url-fetch)
8422 (uri (pypi-uri "hy" version))
8423 (sha256
8424 (base32
8425 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8426 (build-system python-build-system)
8427 (arguments
8428 '(#:phases
8429 (modify-phases %standard-phases
8430 (replace 'check
8431 (lambda _
8432 ;; Tests require write access to HOME.
8433 (setenv "HOME" "/tmp")
8434 (invoke "nosetests"))))))
8435 (native-inputs
8436 `(("python-coverage" ,python-coverage)
8437 ("python-nose" ,python-nose)))
8438 (propagated-inputs
8439 `(("python-astor" ,python-astor)
8440 ("python-clint" ,python-clint)
8441 ("python-rply" ,python-rply)))
8442 (home-page "http://hylang.org/")
8443 (synopsis "Lisp frontend to Python")
8444 (description
8445 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8446 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8447 Python at your fingertips, in Lisp form.")
8448 (license license:expat)))
8449
8450 (define-public python2-hy
8451 (package-with-python2 python-hy))
8452
8453 (define-public python2-functools32
8454 (package
8455 (name "python2-functools32")
8456 (version "3.2.3-2")
8457 (source
8458 (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "functools32" version))
8461 (sha256
8462 (base32
8463 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8464 (build-system python-build-system)
8465 (arguments
8466 `(#:python ,python-2
8467 #:tests? #f)) ; no test target
8468 (home-page "https://github.com/MiCHiLU/python-functools32")
8469 (synopsis
8470 "Backport of the functools module from Python 3.2.3")
8471 (description
8472 "This package is a backport of the @code{functools} module from Python
8473 3.2.3 for use with older versions of Python and PyPy.")
8474 (license license:expat)))
8475
8476 (define-public python2-subprocess32
8477 (package
8478 (name "python2-subprocess32")
8479 (version "3.2.7")
8480 (source (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "subprocess32" version))
8483 (sha256
8484 (base32
8485 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8486 (patches
8487 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8488 (build-system python-build-system)
8489 (arguments
8490 `(#:python ,python-2
8491 ;; The test suite fails with Python > 2.7.13:
8492 ;; import test.support
8493 ;; ImportError: No module named support
8494 #:tests? #f
8495 #:phases
8496 (modify-phases %standard-phases
8497 (add-after 'unpack 'patch-/bin/sh
8498 (lambda _
8499 (substitute* '("subprocess32.py"
8500 "test_subprocess32.py")
8501 (("/bin/sh") (which "sh")))
8502 #t)))))
8503 (home-page "https://github.com/google/python-subprocess32")
8504 (synopsis "Backport of the subprocess module from Python 3.2")
8505 (description
8506 "This is a backport of the @code{subprocess} standard library module
8507 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8508 new features. On POSIX systems it is guaranteed to be reliable when used
8509 in threaded applications. It includes timeout support from Python 3.3 but
8510 otherwise matches 3.2’s API.")
8511 (license license:psfl)))
8512
8513 (define-public python2-futures
8514 (package
8515 (name "python2-futures")
8516 (version "3.2.0")
8517 (source
8518 (origin
8519 (method url-fetch)
8520 (uri (pypi-uri "futures" version))
8521 (sha256
8522 (base32
8523 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8524 (build-system python-build-system)
8525 (arguments
8526 `(#:python ,python-2
8527 #:phases
8528 (modify-phases %standard-phases
8529 (replace 'check
8530 (lambda _
8531 (invoke "python" "test_futures.py")
8532 #t)))))
8533 (home-page "https://github.com/agronholm/pythonfutures")
8534 (synopsis
8535 "Backport of the concurrent.futures package from Python 3.2")
8536 (description
8537 "The concurrent.futures module provides a high-level interface for
8538 asynchronously executing callables. This package backports the
8539 concurrent.futures package from Python 3.2")
8540 (license license:bsd-3)))
8541
8542 (define-public python-promise
8543 (package
8544 (name "python-promise")
8545 (version "0.4.2")
8546 (source
8547 (origin
8548 (method url-fetch)
8549 (uri (pypi-uri "promise" version))
8550 (sha256
8551 (base32
8552 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8553 (build-system python-build-system)
8554 ;; Tests wants python-futures, which is a python2 only program, and
8555 ;; can't be found by python-promise at test time.
8556 (arguments `(#:tests? #f))
8557 (home-page "https://github.com/syrusakbary/promise")
8558 (synopsis "Promises/A+ implementation for Python")
8559 (description
8560 "Promises/A+ implementation for Python")
8561 (properties `((python2-variant . ,(delay python2-promise))))
8562 (license license:expat)))
8563
8564 (define-public python2-promise
8565 (let ((promise (package-with-python2
8566 (strip-python2-variant python-promise))))
8567 (package (inherit promise)
8568 (arguments (substitute-keyword-arguments (package-arguments promise)
8569 ((#:tests? _) #t)))
8570 (native-inputs
8571 `(("python2-futures" ,python2-futures)
8572 ("python2-pytest" ,python2-pytest)
8573 ,@(package-native-inputs promise))))))
8574
8575 (define-public python-progressbar33
8576 (package
8577 (name "python-progressbar33")
8578 (version "2.4")
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "progressbar33" version))
8583 (sha256
8584 (base32
8585 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8586 (build-system python-build-system)
8587 (home-page "http://github.com/germangh/python-progressbar")
8588 (synopsis "Text progress bar library for Python")
8589 (description
8590 "This package provides a text progress bar library for Python. This
8591 version only differs from the original @code{progressbar} package in that it
8592 uses relative package imports instead of absolute imports, which is necessary
8593 for the module to work under Python 3.3.")
8594 ;; Either or both of these licenses may be selected.
8595 (license (list license:lgpl2.1+ license:bsd-3))))
8596
8597 (define-public python-colorama
8598 (package
8599 (name "python-colorama")
8600 (version "0.3.9")
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "colorama" version))
8605 (sha256
8606 (base32
8607 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8608 (build-system python-build-system)
8609 (synopsis "Colored terminal text rendering for Python")
8610 (description "Colorama is a Python library for rendering colored terminal
8611 text.")
8612 (home-page "https://pypi.python.org/pypi/colorama")
8613 (license license:bsd-3)))
8614
8615 (define-public python2-colorama
8616 (package-with-python2 python-colorama))
8617
8618 (define-public python-rsa
8619 (package
8620 (name "python-rsa")
8621 (version "3.4.2")
8622 (source
8623 (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "rsa" version))
8626 (sha256
8627 (base32
8628 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8629 (build-system python-build-system)
8630 (propagated-inputs
8631 `(("python-pyasn1" ,python-pyasn1)))
8632 (synopsis "Pure-Python RSA implementation")
8633 (description "Python-RSA is a pure-Python RSA implementation. It supports
8634 encryption and decryption, signing and verifying signatures, and key
8635 generation according to PKCS#1 version 1.5. It can be used as a Python
8636 library as well as on the command line.")
8637 (home-page "https://stuvel.eu/rsa")
8638 (license license:asl2.0)))
8639
8640 (define-public python2-rsa
8641 (package-with-python2 python-rsa))
8642
8643 (define-public python-pluggy
8644 (package
8645 (name "python-pluggy")
8646 (version "0.11.0")
8647 (source
8648 (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "pluggy" version))
8651 (sha256
8652 (base32
8653 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8654 (build-system python-build-system)
8655 (native-inputs
8656 `(("python-setuptools-scm" ,python-setuptools-scm)))
8657 (synopsis "Plugin and hook calling mechanism for Python")
8658 (description "Pluggy is an extraction of the plugin manager as used by
8659 Pytest but stripped of Pytest specific details.")
8660 (home-page "https://pypi.python.org/pypi/pluggy")
8661 (license license:expat)))
8662
8663 (define-public python2-pluggy
8664 (package-with-python2 python-pluggy))
8665
8666 (define-public python-tox
8667 (package
8668 (name "python-tox")
8669 (version "2.8.1")
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "tox" version))
8674 (sha256
8675 (base32
8676 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8677 (build-system python-build-system)
8678 (arguments
8679 ;; FIXME: Tests require pytest-timeout, which itself requires
8680 ;; pytest>=2.8.0 for installation.
8681 '(#:tests? #f))
8682 (propagated-inputs
8683 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8684 ("python-py" ,python-py)
8685 ("python-virtualenv" ,python-virtualenv)))
8686 (native-inputs
8687 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8688 ("python-pytest" ,python-pytest) ; >= 2.3.5
8689 ("python-setuptools-scm" ,python-setuptools-scm)))
8690 (home-page "http://tox.testrun.org/")
8691 (synopsis "Virtualenv-based automation of test activities")
8692 (description "Tox is a generic virtualenv management and test command line
8693 tool. It can be used to check that a package installs correctly with
8694 different Python versions and interpreters, or run tests in each type of
8695 supported environment, or act as a frontend to continuous integration
8696 servers.")
8697 (license license:expat)))
8698
8699 (define-public python2-tox
8700 (package-with-python2 python-tox))
8701
8702 (define-public python-jmespath
8703 (package
8704 (name "python-jmespath")
8705 (version "0.9.3")
8706 (source
8707 (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "jmespath" version))
8710 (sha256
8711 (base32
8712 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8713 (build-system python-build-system)
8714 (native-inputs
8715 `(("python-nose" ,python-nose)))
8716 (synopsis "JSON Matching Expressions")
8717 (description "JMESPath (pronounced “james path”) is a Python library that
8718 allows one to declaratively specify how to extract elements from a JSON
8719 document.")
8720 (home-page "https://github.com/jmespath/jmespath.py")
8721 (license license:expat)))
8722
8723 (define-public python2-jmespath
8724 (package-with-python2 python-jmespath))
8725
8726 (define-public python-botocore
8727 (package
8728 (name "python-botocore")
8729 (version "1.12.149")
8730 (source
8731 (origin
8732 (method url-fetch)
8733 (uri (pypi-uri "botocore" version))
8734 (sha256
8735 (base32
8736 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8737 (build-system python-build-system)
8738 (arguments
8739 ;; FIXME: Many tests are failing.
8740 '(#:tests? #f))
8741 (propagated-inputs
8742 `(("python-dateutil" ,python-dateutil)
8743 ("python-docutils" ,python-docutils)
8744 ("python-jmespath" ,python-jmespath)))
8745 (native-inputs
8746 `(("python-mock" ,python-mock)
8747 ("python-nose" ,python-nose)
8748 ("behave" ,behave)
8749 ("python-tox" ,python-tox)
8750 ("python-urllib3" ,python-urllib3)
8751 ("python-wheel" ,python-wheel)))
8752 (home-page "https://github.com/boto/botocore")
8753 (synopsis "Low-level interface to AWS")
8754 (description "Botocore is a Python library that provides a low-level
8755 interface to the Amazon Web Services (AWS) API.")
8756 (license license:asl2.0)))
8757
8758 (define-public python2-botocore
8759 (package-with-python2 python-botocore))
8760
8761 (define-public python-xdo
8762 (package
8763 (name "python-xdo")
8764 (version "0.3")
8765 (source (origin
8766 (method url-fetch)
8767 (uri (string-append
8768 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8769 "python-xdo_" version ".orig.tar.gz"))
8770 (sha256
8771 (base32
8772 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8773 (build-system python-build-system)
8774 (arguments
8775 '(#:phases
8776 (modify-phases %standard-phases
8777 (add-before 'install 'patch-libxdo-path
8778 ;; Hardcode the path of dynamically loaded libxdo library.
8779 (lambda* (#:key inputs #:allow-other-keys)
8780 (let ((libxdo (string-append
8781 (assoc-ref inputs "xdotool")
8782 "/lib/libxdo.so")))
8783 (substitute* "xdo/_xdo.py"
8784 (("find_library\\(\"xdo\"\\)")
8785 (simple-format #f "\"~a\"" libxdo)))
8786 #t))))
8787 #:tests? #f)) ; no tests provided
8788 (propagated-inputs
8789 `(("python-six" ,python-six)))
8790 (inputs
8791 `(("xdotool" ,xdotool)
8792 ("libX11" ,libx11)))
8793 (home-page "https://tracker.debian.org/pkg/python-xdo")
8794 (synopsis "Python library for simulating X11 keyboard/mouse input")
8795 (description "Provides bindings to libxdo for manipulating X11 via simulated
8796 input. (Note that this is mostly a legacy library; you may wish to look at
8797 python-xdo for newer bindings.)")
8798 (license license:bsd-3)))
8799
8800 (define-public python2-xdo
8801 (package-with-python2 python-xdo))
8802
8803 (define-public python-mako
8804 (package
8805 (name "python-mako")
8806 (version "1.1.0")
8807 (source
8808 (origin
8809 (method url-fetch)
8810 (uri (pypi-uri "Mako" version))
8811 (sha256
8812 (base32
8813 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8814 (build-system python-build-system)
8815 (arguments
8816 `(#:phases (modify-phases %standard-phases
8817 (replace 'check
8818 (lambda _
8819 (invoke "pytest" "-vv"))))))
8820 (propagated-inputs
8821 `(("python-markupsafe" ,python-markupsafe)))
8822 (native-inputs
8823 `(("python-mock" ,python-mock)
8824 ("python-pytest" ,python-pytest)))
8825 (home-page "https://www.makotemplates.org/")
8826 (synopsis "Templating language for Python")
8827 (description "Mako is a templating language for Python that compiles
8828 templates into Python modules.")
8829 (license license:expat)))
8830
8831 (define-public python2-mako
8832 (package-with-python2 python-mako))
8833
8834 (define-public python-waitress
8835 (package
8836 (name "python-waitress")
8837 (version "1.1.0")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "waitress" version))
8842 (patches (search-patches "python-waitress-fix-tests.patch"))
8843 (sha256
8844 (base32
8845 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8846 (build-system python-build-system)
8847 (home-page "https://github.com/Pylons/waitress")
8848 (synopsis "Waitress WSGI server")
8849 (description "Waitress is meant to be a production-quality pure-Python WSGI
8850 server with very acceptable performance.")
8851 (license license:zpl2.1)))
8852
8853 (define-public python2-waitress
8854 (package-with-python2 python-waitress))
8855
8856 (define-public python-pyquery
8857 (package
8858 (name "python-pyquery")
8859 (version "1.2.17")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "pyquery" version))
8864 (sha256
8865 (base32
8866 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8867 (build-system python-build-system)
8868 (native-inputs
8869 `(("python-webob" ,python-webob)
8870 ("python-webtest" ,python-webtest)))
8871 (propagated-inputs
8872 `(("python-lxml" ,python-lxml)
8873 ("python-cssselect" ,python-cssselect)))
8874 (home-page "https://github.com/gawel/pyquery")
8875 (synopsis "Make jQuery-like queries on xml documents")
8876 (description "pyquery allows you to make jQuery queries on xml documents.
8877 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8878 fast xml and html manipulation.")
8879 (license license:bsd-3)))
8880
8881 (define-public python-anyjson
8882 (package
8883 (name "python-anyjson")
8884 (version "0.3.3")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (pypi-uri "anyjson" version))
8889 (sha256
8890 (base32
8891 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8892 (build-system python-build-system)
8893 (arguments
8894 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8895 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8896 ;; whatever) so this transformation needs to be done before the tests
8897 ;; can be run. Maybe we could add a build step to transform beforehand
8898 ;; but it could be annoying/difficult.
8899 ;; We can enable tests for the Python 2 version, though, and do below.
8900 #:tests? #f))
8901 (home-page "https://bitbucket.org/runeh/anyjson/")
8902 (synopsis
8903 "Wraps best available JSON implementation in a common interface")
8904 (description
8905 "Anyjson loads whichever is the fastest JSON module installed
8906 and provides a uniform API regardless of which JSON implementation is used.")
8907 (license license:bsd-3)
8908 (properties `((python2-variant . ,(delay python2-anyjson))))))
8909
8910 (define-public python2-anyjson
8911 (let ((anyjson (package-with-python2
8912 (strip-python2-variant python-anyjson))))
8913 (package
8914 (inherit anyjson)
8915 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8916 #:tests? #t
8917 ,@(package-arguments anyjson)))
8918 (native-inputs `(("python2-nose" ,python2-nose))))))
8919
8920 (define-public python-amqp
8921 (package
8922 (name "python-amqp")
8923 (version "2.3.2")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "amqp" version))
8928 (sha256
8929 (base32
8930 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8931 (build-system python-build-system)
8932 (native-inputs
8933 `(("python-case" ,python-case)
8934 ("python-pytest-sugar" ,python-pytest-sugar)
8935 ("python-mock" ,python-mock)))
8936 (propagated-inputs
8937 `(("python-vine" ,python-vine)))
8938 (home-page "https://github.com/celery/py-amqp")
8939 (synopsis
8940 "Low-level AMQP client for Python (fork of amqplib)")
8941 (description
8942 "This is a fork of amqplib which was originally written by Barry Pederson.
8943 It is maintained by the Celery project, and used by kombu as a pure python
8944 alternative when librabbitmq is not available.")
8945 (license license:lgpl2.1+)
8946 (properties `((python2-variant . ,(delay python2-amqp))))))
8947
8948 (define-public python2-amqp
8949 (let ((amqp (package-with-python2
8950 (strip-python2-variant python-amqp))))
8951 (package
8952 (inherit amqp)
8953 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8954 ;; unmaintained. Weirdly, does not do this on the python 3
8955 ;; version?
8956 #:tests? #f
8957 ,@(package-arguments amqp))))))
8958
8959 (define-public python-txamqp
8960 (package
8961 (name "python-txamqp")
8962 (version "0.8.2")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "txAMQP" version))
8967 (sha256
8968 (base32
8969 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8970 (build-system python-build-system)
8971 (propagated-inputs
8972 `(("python-six" ,python-six)
8973 ("python-twisted" ,python-twisted)))
8974 (home-page "https://github.com/txamqp/txamqp")
8975 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8976 (description
8977 "This package provides a Python library for communicating with AMQP peers
8978 and brokers using the asynchronous networking framework Twisted. It contains
8979 all the necessary code to connect, send and receive messages to/from an
8980 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8981 also includes support for using Thrift RPC over AMQP in Twisted
8982 applications.")
8983 (license license:asl2.0)))
8984
8985 (define-public python2-txamqp
8986 (package-with-python2 python-txamqp))
8987
8988 (define-public python-kombu
8989 (package
8990 (name "python-kombu")
8991 (version "4.2.2")
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (pypi-uri "kombu" version))
8996 (sha256
8997 (base32
8998 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8999 (build-system python-build-system)
9000 (native-inputs
9001 `(("python-mock" ,python-mock)
9002 ("python-case" ,python-case)
9003 ("python-pyro4" ,python-pyro4)
9004 ("python-pytest-sugar" ,python-pytest-sugar)
9005 ("python-pytz" ,python-pytz)))
9006 (propagated-inputs
9007 `(("python-anyjson" ,python-anyjson)
9008 ("python-amqp" ,python-amqp)
9009 ("python-redis" ,python-redis)))
9010 (home-page "https://kombu.readthedocs.io")
9011 (synopsis "Message passing library for Python")
9012 (description "The aim of Kombu is to make messaging in Python as easy as
9013 possible by providing an idiomatic high-level interface for the AMQ protocol,
9014 and also provide proven and tested solutions to common messaging problems.
9015 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9016 message orientation, queuing, routing, reliability and security, for which the
9017 RabbitMQ messaging server is the most popular implementation.")
9018 (license license:bsd-3)
9019 (properties `((python2-variant . ,(delay python2-kombu))))))
9020
9021 (define-public python2-kombu
9022 (let ((kombu (package-with-python2
9023 (strip-python2-variant python-kombu))))
9024 (package
9025 (inherit kombu)
9026 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9027 ;; It works fine on the python3 variant.
9028 #:tests? #f
9029 ,@(package-arguments kombu)))
9030 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9031 ,@(package-native-inputs kombu))))))
9032
9033 (define-public python-billiard
9034 (package
9035 (name "python-billiard")
9036 (version "3.5.0.5")
9037 (source
9038 (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "billiard" version))
9041 (sha256
9042 (base32
9043 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9044 (build-system python-build-system)
9045 (native-inputs
9046 `(("python-case" ,python-case)
9047 ("python-pytest" ,python-pytest)))
9048 (home-page "https://github.com/celery/billiard")
9049 (synopsis
9050 "Python multiprocessing fork with improvements and bugfixes")
9051 (description
9052 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9053 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9054 pyprocessing package. This standalone variant is intended to be compatible with
9055 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9056 (license license:bsd-3)
9057 (properties `((python2-variant . ,(delay python2-billiard))))))
9058
9059 (define-public python2-billiard
9060 (let ((billiard (package-with-python2
9061 (strip-python2-variant python-billiard))))
9062 (package
9063 (inherit billiard)
9064 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9065 ("python2-mock" ,python2-mock)
9066 ,@(package-native-inputs billiard))))))
9067
9068 (define-public python-celery
9069 (package
9070 (name "python-celery")
9071 (version "4.2.1")
9072 (source
9073 (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "celery" version))
9076 (sha256
9077 (base32
9078 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9079 (build-system python-build-system)
9080 (arguments
9081 '(;; TODO The tests fail with Python 3.7
9082 ;; https://github.com/celery/celery/issues/4849
9083 #:tests? #f
9084 #:phases
9085 (modify-phases %standard-phases
9086 (add-after 'unpack 'patch-requirements
9087 (lambda _
9088 (substitute* "requirements/test.txt"
9089 (("pytest>=3\\.0,<3\\.3")
9090 "pytest>=3.0"))
9091 #t)))))
9092 (native-inputs
9093 `(("python-case" ,python-case)
9094 ("python-pytest" ,python-pytest)))
9095 (propagated-inputs
9096 `(("python-pytz" ,python-pytz)
9097 ("python-billiard" ,python-billiard)
9098 ("python-kombu" ,python-kombu)))
9099 (home-page "https://celeryproject.org")
9100 (synopsis "Distributed Task Queue")
9101 (description "Celery is an asynchronous task queue/job queue based on
9102 distributed message passing. It is focused on real-time operation, but
9103 supports scheduling as well. The execution units, called tasks, are executed
9104 concurrently on a single or more worker servers using multiprocessing,
9105 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9106 synchronously (wait until ready).")
9107 (license license:bsd-3)
9108 (properties `((python2-variant . ,(delay python2-celery))))))
9109
9110 (define-public python2-celery
9111 (let ((celery (package-with-python2
9112 (strip-python2-variant python-celery))))
9113 (package
9114 (inherit celery)
9115 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9116 ("python2-mock" ,python2-mock)
9117 ,@(package-native-inputs celery))))))
9118
9119 (define-public python-translitcodec
9120 (package
9121 (name "python-translitcodec")
9122 (version "0.4.0")
9123 (source
9124 (origin
9125 (method url-fetch)
9126 (uri (pypi-uri "translitcodec" version))
9127 (sha256
9128 (base32
9129 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9130 (build-system python-build-system)
9131 (arguments
9132 `(#:tests? #f)) ; no tests provided
9133 (home-page
9134 "https://github.com/claudep/translitcodec")
9135 (synopsis
9136 "Unicode to 8-bit charset transliteration codec")
9137 (description
9138 "This package contains codecs for transliterating ISO 10646 texts into
9139 best-effort representations using smaller coded character sets (ASCII,
9140 ISO 8859, etc.).")
9141 (license license:expat)))
9142
9143 (define-public python2-translitcodec
9144 (package-with-python2 python-translitcodec))
9145
9146 (define-public python-editor
9147 (package
9148 (name "python-editor")
9149 (version "0.5")
9150 (source
9151 (origin
9152 (method url-fetch)
9153 (uri (pypi-uri "python-editor" version))
9154 (sha256
9155 (base32
9156 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9157 (build-system python-build-system)
9158 (home-page
9159 "https://github.com/fmoo/python-editor")
9160 (synopsis
9161 "Programmatically open an editor, capture the result")
9162 (description
9163 "python-editor is a library that provides the editor module for
9164 programmatically interfacing with your system's $EDITOR.")
9165 (license license:asl2.0)))
9166
9167 (define-public python2-editor
9168 (package-with-python2 python-editor))
9169
9170 (define-public python-vobject
9171 (package
9172 (name "python-vobject")
9173 (version "0.9.5")
9174 (source (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "vobject" version))
9177 (sha256
9178 (base32
9179 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9180 (build-system python-build-system)
9181 (arguments
9182 '(;; The test suite relies on some non-portable Windows interfaces.
9183 #:tests? #f))
9184 (propagated-inputs
9185 `(("python-dateutil" ,python-dateutil)
9186 ("python-pyicu" ,python-pyicu)))
9187 (synopsis "Parse and generate vCard and vCalendar files")
9188 (description "Vobject is intended to be a full featured Python package for
9189 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9190 are supported and well tested. vCard 3.0 files are supported, and all data
9191 should be imported, but only a few components are understood in a sophisticated
9192 way.")
9193 (home-page "http://eventable.github.io/vobject/")
9194 (license license:asl2.0)))
9195
9196 (define-public python2-vobject
9197 (package-with-python2 python-vobject))
9198
9199 (define-public python-munkres
9200 (package
9201 (name "python-munkres")
9202 (version "1.0.8")
9203 (source (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "munkres" version))
9206 (sha256
9207 (base32
9208 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9209 (build-system python-build-system)
9210 (arguments
9211 '(#:tests? #f)) ; no test suite
9212 (home-page "http://software.clapper.org/munkres/")
9213 (synopsis "Implementation of the Munkres algorithm")
9214 (description "The Munkres module provides an implementation of the Munkres
9215 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9216 useful for solving the Assignment Problem.")
9217 (license license:bsd-3)))
9218
9219 (define-public python2-munkres
9220 (package-with-python2 python-munkres))
9221
9222 (define-public python-whoosh
9223 (package
9224 (name "python-whoosh")
9225 (version "2.7.4")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "Whoosh" version))
9230 (sha256
9231 (base32
9232 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9233 (build-system python-build-system)
9234 (native-inputs
9235 `(("python-pytest" ,python-pytest)))
9236 (home-page "https://bitbucket.org/mchaput/whoosh")
9237 (synopsis "Full text indexing, search, and spell checking library")
9238 (description
9239 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9240 checking library.")
9241 (license license:bsd-2)))
9242
9243 (define-public python2-whoosh
9244 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9245 (package (inherit whoosh)
9246 (propagated-inputs
9247 `(("python2-backport-ssl-match-hostname"
9248 ,python2-backport-ssl-match-hostname)
9249 ,@(package-propagated-inputs whoosh))))))
9250
9251 (define-public python-pathlib
9252 (package
9253 (name "python-pathlib")
9254 (version "1.0.1")
9255 (source (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "pathlib" version))
9258 (sha256
9259 (base32
9260 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9261 (build-system python-build-system)
9262 ;; The tests depend on the internal "test" module, which does not provide
9263 ;; a stable interface.
9264 (arguments `(#:tests? #f))
9265 (home-page "https://pathlib.readthedocs.org/")
9266 (synopsis "Object-oriented file system paths")
9267 (description "Pathlib offers a set of classes to handle file system paths.
9268 It offers the following advantages over using string objects:
9269
9270 @enumerate
9271 @item No more cumbersome use of os and os.path functions. Everything can
9272 be done easily through operators, attribute accesses, and method calls.
9273 @item Embodies the semantics of different path types. For example,
9274 comparing Windows paths ignores casing.
9275 @item Well-defined semantics, eliminating any inconsistencies or
9276 ambiguities (forward vs. backward slashes, etc.).
9277 @end enumerate
9278
9279 Note: In Python 3.4, pathlib is now part of the standard library. For other
9280 Python versions please consider python-pathlib2 instead, which tracks the
9281 standard library module. This module (python-pathlib) isn't maintained
9282 anymore.")
9283 (license license:expat)))
9284
9285 (define-public python2-pathlib
9286 (package-with-python2 python-pathlib))
9287
9288 (define-public python2-pathlib2
9289 (package
9290 (name "python2-pathlib2")
9291 (version "2.3.3")
9292 (source (origin
9293 (method url-fetch)
9294 (uri (pypi-uri "pathlib2" version))
9295 (sha256
9296 (base32
9297 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9298 (build-system python-build-system)
9299 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9300 ;; version is 3.4 which already includes this package as part of the
9301 ;; standard library.
9302 (arguments
9303 `(#:python ,python-2))
9304 (propagated-inputs
9305 `(("python2-scandir" ,python2-scandir)
9306 ("python2-six" ,python2-six)))
9307 (home-page "https://pypi.python.org/pypi/pathlib2/")
9308 (synopsis "Object-oriented file system paths - backport of standard
9309 pathlib module")
9310 (description "The goal of pathlib2 is to provide a backport of standard
9311 pathlib module which tracks the standard library module, so all the newest
9312 features of the standard pathlib can be used also on older Python versions.
9313
9314 Pathlib offers a set of classes to handle file system paths. It offers the
9315 following advantages over using string objects:
9316
9317 @enumerate
9318 @item No more cumbersome use of os and os.path functions. Everything can
9319 be done easily through operators, attribute accesses, and method calls.
9320 @item Embodies the semantics of different path types. For example,
9321 comparing Windows paths ignores casing.
9322 @item Well-defined semantics, eliminating any inconsistencies or
9323 ambiguities (forward vs. backward slashes, etc.).
9324 @end enumerate")
9325 (license license:expat)))
9326
9327 (define-public python2-pathlib2-bootstrap
9328 (hidden-package
9329 (package
9330 (inherit python2-pathlib2)
9331 (name "python2-pathlib2-bootstrap")
9332 (propagated-inputs
9333 `(("python2-scandir" ,python2-scandir)
9334 ("python2-six" ,python2-six-bootstrap))))))
9335
9336 (define-public python-jellyfish
9337 (package
9338 (name "python-jellyfish")
9339 (version "0.5.6")
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "jellyfish" version))
9343 (sha256
9344 (base32
9345 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9346 (build-system python-build-system)
9347 (native-inputs
9348 `(("python-pytest" ,python-pytest)))
9349 (home-page "https://github.com/jamesturk/jellyfish")
9350 (synopsis "Approximate and phonetic matching of strings")
9351 (description "Jellyfish uses a variety of string comparison and phonetic
9352 encoding algorithms to do fuzzy string matching.")
9353 (license license:bsd-2)
9354 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9355
9356 (define-public python2-jellyfish
9357 (let ((jellyfish (package-with-python2
9358 (strip-python2-variant python-jellyfish))))
9359 (package (inherit jellyfish)
9360 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9361 ,@(package-native-inputs jellyfish))))))
9362
9363 (define-public python2-unicodecsv
9364 (package
9365 (name "python2-unicodecsv")
9366 (version "0.14.1")
9367 (source (origin
9368 (method url-fetch)
9369 ;; The test suite is not included in the PyPi release.
9370 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9371 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9372 "archive/" version ".tar.gz"))
9373 (file-name (string-append name "-" version ".tar.gz"))
9374 (sha256
9375 (base32
9376 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9377 (build-system python-build-system)
9378 (arguments
9379 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9380 #:python ,python-2))
9381 (native-inputs
9382 `(("python2-unittest2" ,python2-unittest2)))
9383 (home-page "https://github.com/jdunck/python-unicodecsv")
9384 (synopsis "Unicode CSV module for Python 2")
9385 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9386 module, adding support for Unicode strings.")
9387 (license license:bsd-2)))
9388
9389 (define-public python-rarfile
9390 (package
9391 (name "python-rarfile")
9392 (version "2.8")
9393 (source (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "rarfile" version))
9396 (sha256
9397 (base32
9398 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9399 (build-system python-build-system)
9400 (arguments
9401 '(#:phases
9402 (modify-phases %standard-phases
9403 (replace 'check
9404 ;; Many tests fail, but the installation proceeds.
9405 (lambda _ (invoke "make" "-C" "test" "test"))))))
9406 (native-inputs
9407 `(("which" ,which))) ; required for tests
9408 (propagated-inputs
9409 `(("libarchive" ,libarchive)))
9410 (home-page "https://github.com/markokr/rarfile")
9411 (synopsis "RAR archive reader for Python")
9412 (description "This is Python module for RAR archive reading. The interface
9413 is made as zipfile like as possible.")
9414 (license license:isc)))
9415
9416 (define-public python2-rarfile
9417 (package-with-python2 python-rarfile))
9418
9419 (define-public python-magic
9420 (package
9421 (name "python-magic")
9422 (version "0.4.15")
9423 (source
9424 (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "python-magic" version))
9427 (sha256
9428 (base32
9429 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9430 (file-name (string-append name "-" version "-checkout"))))
9431 (build-system python-build-system)
9432 (arguments
9433 ;; The tests are unreliable, so don't run them. The tests fail
9434 ;; under Python3 because they were written for Python2 and
9435 ;; contain import statements that do not work in Python3. One of
9436 ;; the tests fails under Python2 because its assertions are
9437 ;; overly stringent; it relies on comparing output strings which
9438 ;; are brittle and can change depending on the version of
9439 ;; libmagic being used and the system on which the test is
9440 ;; running. In my case, under GuixSD 0.10.0, only one test
9441 ;; failed, and it seems to have failed only because the version
9442 ;; of libmagic that is packaged in Guix outputs a slightly
9443 ;; different (but not wrong) string than the one that the test
9444 ;; expected.
9445 '(#:tests? #f
9446 #:phases (modify-phases %standard-phases
9447 ;; Replace a specific method call with a hard-coded
9448 ;; path to the necessary libmagic.so file in the
9449 ;; store. If we don't do this, then the method call
9450 ;; will fail to find the libmagic.so file, which in
9451 ;; turn will cause any application using
9452 ;; python-magic to fail.
9453 (add-before 'build 'hard-code-path-to-libmagic
9454 (lambda* (#:key inputs #:allow-other-keys)
9455 (let ((file (assoc-ref inputs "file")))
9456 (substitute* "magic.py"
9457 (("ctypes.util.find_library\\('magic'\\)")
9458 (string-append "'" file "/lib/libmagic.so'")))
9459 #t)))
9460 (add-before 'install 'disable-egg-compression
9461 (lambda _
9462 (let ((port (open-file "setup.cfg" "a")))
9463 (display "\n[easy_install]\nzip_ok = 0\n"
9464 port)
9465 (close-port port)
9466 #t))))))
9467 (inputs
9468 ;; python-magic needs to be able to find libmagic.so.
9469 `(("file" ,file)))
9470 (home-page
9471 "https://github.com/ahupp/python-magic")
9472 (synopsis
9473 "File type identification using libmagic")
9474 (description
9475 "This module uses ctypes to access the libmagic file type
9476 identification library. It makes use of the local magic database and
9477 supports both textual and MIME-type output. Note that this module and
9478 the python-file module both provide a \"magic.py\" file; these two
9479 modules, which are different and were developed separately, both serve
9480 the same purpose: to provide Python bindings for libmagic.")
9481 (license license:expat)))
9482
9483 (define-public python2-magic
9484 (package-with-python2 python-magic))
9485
9486 (define-public python2-s3cmd
9487 (package
9488 (name "python2-s3cmd")
9489 (version "1.6.1")
9490 (source
9491 (origin
9492 (method url-fetch)
9493 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9494 "s3cmd-" version ".tar.gz"))
9495 (sha256
9496 (base32
9497 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9498 (build-system python-build-system)
9499 (arguments
9500 ;; s3cmd is written for python2 only and contains no tests.
9501 `(#:python ,python-2
9502 #:tests? #f))
9503 (propagated-inputs
9504 `(("python2-dateutil" ,python2-dateutil)
9505 ;; The python-file package also provides a magic.py module.
9506 ;; This is an unfortunate state of affairs; however, s3cmd
9507 ;; fails to install if it cannot find specifically the
9508 ;; python-magic package. Thus we include it, instead of using
9509 ;; python-file. Ironically, s3cmd sometimes works better
9510 ;; without libmagic bindings at all:
9511 ;; https://github.com/s3tools/s3cmd/issues/198
9512 ("python2-magic" ,python2-magic)))
9513 (home-page "http://s3tools.org/s3cmd")
9514 (synopsis "Command line tool for S3-compatible storage services")
9515 (description
9516 "S3cmd is a command line tool for uploading, retrieving and managing data
9517 in storage services that are compatible with the Amazon Simple Storage
9518 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9519 GnuPG encryption, and more. It also supports management of Amazon's
9520 CloudFront content delivery network.")
9521 (license license:gpl2+)))
9522
9523 (define-public python-pkgconfig
9524 (package
9525 (name "python-pkgconfig")
9526 (version "1.3.1")
9527 (source
9528 (origin
9529 (method url-fetch)
9530 (uri (pypi-uri "pkgconfig" version))
9531 (sha256
9532 (base32
9533 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9534 (build-system python-build-system)
9535 (native-inputs
9536 `(("python-nose" ,python-nose)))
9537 (inputs
9538 `(("pkg-config" ,pkg-config)))
9539 (arguments
9540 `(#:phases
9541 (modify-phases %standard-phases
9542 (add-before 'build 'patch
9543 ;; Hard-code the path to pkg-config.
9544 (lambda _
9545 (substitute* "pkgconfig/pkgconfig.py"
9546 (("cmd = 'pkg-config")
9547 (string-append "cmd = '" (which "pkg-config"))))
9548 #t))
9549 (replace 'check
9550 (lambda _
9551 (invoke "nosetests" "test.py"))))))
9552 (home-page "https://github.com/matze/pkgconfig")
9553 (synopsis "Python interface for pkg-config")
9554 (description "This module provides a Python interface to pkg-config. It
9555 can be used to find all pkg-config packages, check if a package exists,
9556 check if a package meets certain version requirements, query CFLAGS and
9557 LDFLAGS and parse the output to build extensions with setup.py.")
9558 (license license:expat)))
9559
9560 (define-public python2-pkgconfig
9561 (package-with-python2 python-pkgconfig))
9562
9563 (define-public python-bz2file
9564 (package
9565 (name "python-bz2file")
9566 (version "0.98")
9567 (source
9568 (origin
9569 (method url-fetch)
9570 (uri (pypi-uri "bz2file" version))
9571 (sha256
9572 (base32
9573 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9574 (build-system python-build-system)
9575 (arguments
9576 `(#:tests? #f)) ; Tests use deprecated python modules.
9577 (home-page "https://github.com/nvawda/bz2file")
9578 (synopsis "Read and write bzip2-compressed files")
9579 (description
9580 "Bz2file is a Python library for reading and writing bzip2-compressed
9581 files. It contains a drop-in replacement for the I/O interface in the
9582 standard library's @code{bz2} module, including features from the latest
9583 development version of CPython that are not available in older releases.")
9584 (license license:asl2.0)))
9585
9586 (define-public python2-bz2file
9587 (package-with-python2 python-bz2file))
9588
9589 (define-public python-future
9590 (package
9591 (name "python-future")
9592 (version "0.17.1")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "future" version))
9597 (sha256
9598 (base32
9599 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9600 (build-system python-build-system)
9601 ;; Many tests connect to the network or are otherwise flawed.
9602 ;; https://github.com/PythonCharmers/python-future/issues/210
9603 (arguments
9604 `(#:tests? #f))
9605 (home-page "http://python-future.org")
9606 (synopsis "Single-source support for Python 3 and 2")
9607 (description
9608 "@code{python-future} is the missing compatibility layer between Python 2 and
9609 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9610 to support both Python 2 and Python 3 with minimal overhead.")
9611 (license license:expat)))
9612
9613 (define-public python2-future
9614 (package-with-python2 python-future))
9615
9616 (define-public python-cysignals
9617 (package
9618 (name "python-cysignals")
9619 (version "1.9.0")
9620 (source
9621 (origin
9622 (method url-fetch)
9623 (uri (pypi-uri "cysignals" version))
9624 (sha256
9625 (base32
9626 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9627 (build-system python-build-system)
9628 (native-inputs
9629 `(("python-cython" ,python-cython)
9630 ("python-sphinx" ,python-sphinx)))
9631 (inputs
9632 `(("pari-gp" ,pari-gp)))
9633 (arguments
9634 `(#:modules ((guix build python-build-system)
9635 ((guix build gnu-build-system) #:prefix gnu:)
9636 (guix build utils))
9637 ;; FIXME: Tests are executed after installation and currently fail
9638 ;; when not installing into standard locations; the author is working
9639 ;; on a fix.
9640 #:tests? #f
9641 #:phases
9642 (modify-phases %standard-phases
9643 (add-before
9644 'build 'configure
9645 (assoc-ref gnu:%standard-phases 'configure)))))
9646 (home-page
9647 "https://github.com/sagemath/cysignals")
9648 (synopsis
9649 "Handling of interrupts and signals for Cython")
9650 (description
9651 "The cysignals package provides mechanisms to handle interrupts (and
9652 other signals and errors) in Cython code, using two related approaches,
9653 for mixed Cython/Python code or external C libraries and pure Cython code,
9654 respectively.")
9655 (license license:lgpl3+)))
9656
9657 (define-public python2-cysignals
9658 (package-with-python2 python-cysignals))
9659
9660 (define-public python2-shedskin
9661 (package
9662 (name "python2-shedskin")
9663 (version "0.9.4")
9664 (source
9665 (origin
9666 (method url-fetch)
9667 (uri (string-append "https://github.com/shedskin/shedskin/"
9668 "releases/download/v" version
9669 "/shedskin-" version ".tgz"))
9670 (sha256
9671 (base32
9672 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9673 (build-system python-build-system)
9674 (arguments
9675 `(#:python ,python-2
9676 #:phases (modify-phases %standard-phases
9677 (add-after 'unpack 'fix-resulting-include-libs
9678 (lambda* (#:key inputs #:allow-other-keys)
9679 (let ((libgc (assoc-ref inputs "libgc"))
9680 (pcre (assoc-ref inputs "pcre")))
9681 (substitute* "shedskin/makefile.py"
9682 (("variable == 'CCFLAGS':[ ]*")
9683 (string-append "variable == 'CCFLAGS':\n"
9684 " line += ' -I " pcre "/include"
9685 " -I " libgc "/include'"))
9686 (("variable == 'LFLAGS':[ ]*")
9687 (string-append "variable == 'LFLAGS':\n"
9688 " line += ' -L" pcre "/lib"
9689 " -L " libgc "/lib'")))
9690 #t))))))
9691 (inputs `(("pcre" ,pcre)
9692 ("libgc" ,libgc)))
9693 (home-page "https://shedskin.github.io/")
9694 (synopsis "Experimental Python-2 to C++ Compiler")
9695 (description (string-append "This is an experimental compiler for a subset of
9696 Python. It generates C++ code and a Makefile."))
9697 (license (list license:gpl3 license:bsd-3 license:expat))))
9698
9699 (define-public python2-rope
9700 (package
9701 (name "python2-rope")
9702 (version "0.11.0")
9703 (source
9704 (origin
9705 (method url-fetch)
9706 (uri (pypi-uri "rope" version))
9707 (sha256
9708 (base32
9709 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9710 (arguments
9711 ;; Rope has only partial python3 support, see `python-rope'
9712 `(#:python ,python-2))
9713 (build-system python-build-system)
9714 (native-inputs
9715 `(("python2-unittest2" ,python2-unittest2)))
9716 (home-page "https://github.com/python-rope/rope")
9717 (synopsis "Refactoring library for Python")
9718 (description "Rope is a refactoring library for Python. It facilitates
9719 the renaming, moving and extracting of attributes, functions, modules, fields
9720 and parameters in Python 2 source code. These refactorings can also be applied
9721 to occurrences in strings and comments.")
9722 (license license:gpl2)))
9723
9724 (define-public python-rope
9725 (package
9726 (inherit python2-rope)
9727 (name "python-rope")
9728 (arguments `(#:python ,python-wrapper
9729 ;; XXX: Only partial python3 support, results in some failing
9730 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9731 #:tests? #f))
9732 (properties `((python2-variant . ,(delay python2-rope))))))
9733
9734 (define-public python-py3status
9735 (package
9736 (name "python-py3status")
9737 (version "3.16")
9738 (source
9739 (origin
9740 (method url-fetch)
9741 (uri (pypi-uri "py3status" version))
9742 (sha256
9743 (base32
9744 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9745 (build-system python-build-system)
9746 (inputs
9747 `(("file" ,file)))
9748 (arguments
9749 '(#:phases
9750 (modify-phases %standard-phases
9751 ;; 'file' is used for detection of configuration file encoding
9752 ;; let's make link the dependency to particular input
9753 (add-before 'build 'patch-file-path
9754 (lambda* (#:key inputs #:allow-other-keys)
9755 (let ((file-path (assoc-ref inputs "file")))
9756 (substitute* "py3status/parse_config.py"
9757 (("\\['file', '-b'")
9758 (string-append "['" file-path "/bin/file', '-b'")))
9759 #t))))
9760 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9761 (home-page "https://github.com/ultrabug/py3status")
9762 (synopsis "Extensible i3status wrapper written in Python")
9763 (description "py3status is an i3status wrapper which extends i3status
9764 functionality in a modular way, allowing you to extend your panel with your
9765 own code, responding to click events and updating clock every second.")
9766 (license license:bsd-3)))
9767
9768 (define-public python-tblib
9769 (package
9770 (name "python-tblib")
9771 (version "1.3.2")
9772 (source (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "tblib" version))
9775 (sha256 (base32
9776 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9777 (build-system python-build-system)
9778 (arguments
9779 `(#:phases
9780 (modify-phases %standard-phases
9781 (add-before 'check 'adjust-tests
9782 (lambda _
9783 (when (which "python3")
9784 ;; Adjust the example output to match that of Python 3.7:
9785 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9786 (substitute* "README.rst"
9787 (("Exception\\('fail',") "Exception('fail'"))
9788 #t)))
9789 (replace 'check
9790 (lambda _
9791 ;; Upstream runs tests after installation and the package itself
9792 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9793 ;; found.
9794 (setenv "PYTHONPATH"
9795 (string-append (getcwd) "/build/lib:"
9796 (getenv "PYTHONPATH")))
9797 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9798 (native-inputs
9799 `(("python-pytest" ,python-pytest)
9800 ("python-six" ,python-six)))
9801 (home-page "https://github.com/ionelmc/python-tblib")
9802 (synopsis "Traceback serialization library")
9803 (description
9804 "Traceback serialization allows you to:
9805
9806 @enumerate
9807 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9808 different processes. This allows better error handling when running code over
9809 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9810
9811 @item Parse traceback strings and raise with the parsed tracebacks.
9812 @end enumerate\n")
9813 (license license:bsd-3)))
9814
9815 (define-public python2-tblib
9816 (package-with-python2 python-tblib))
9817
9818 (define-public python-greenlet
9819 (package
9820 (name "python-greenlet")
9821 (version "0.4.15")
9822 (source (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "greenlet" version))
9825 (sha256
9826 (base32
9827 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9828 (build-system python-build-system)
9829 (home-page "https://greenlet.readthedocs.io/")
9830 (synopsis "Lightweight in-process concurrent programming")
9831 (description
9832 "Greenlet package is a spin-off of Stackless, a version of CPython
9833 that supports micro-threads called \"tasklets\". Tasklets run
9834 pseudo-concurrently (typically in a single or a few OS-level threads) and
9835 are synchronized with data exchanges on \"channels\".")
9836 (license (list license:psfl license:expat))))
9837
9838 (define-public python2-greenlet
9839 (package-with-python2 python-greenlet))
9840
9841 (define-public python-objgraph
9842 (package
9843 (name "python-objgraph")
9844 (version "3.4.0")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "objgraph" version))
9849 (sha256
9850 (base32
9851 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9852 (build-system python-build-system)
9853 (propagated-inputs
9854 `(("python-graphviz" ,python-graphviz)))
9855 (native-inputs
9856 `(("python-mock" ,python-mock)
9857 ("graphviz" ,graphviz)))
9858 (home-page "https://mg.pov.lt/objgraph/")
9859 (synopsis "Draw Python object reference graphs with graphviz")
9860 (description
9861 "This package provides tools to draw Python object reference graphs with
9862 graphviz.")
9863 (license license:expat)))
9864
9865 (define-public python-gevent
9866 (package
9867 (name "python-gevent")
9868 (version "1.3.7")
9869 (source (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "gevent" version))
9872 (sha256
9873 (base32
9874 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9875 (modules '((guix build utils)))
9876 (snippet
9877 '(begin
9878 ;; unbunding libev and c-ares
9879 (delete-file-recursively "deps")
9880 #t))))
9881 (build-system python-build-system)
9882 (arguments
9883 `(#:modules ((ice-9 ftw)
9884 (ice-9 match)
9885 (srfi srfi-26)
9886 (guix build utils)
9887 (guix build python-build-system))
9888 #:phases (modify-phases %standard-phases
9889 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9890 (lambda _
9891 (substitute* "src/gevent/subprocess.py"
9892 (("/bin/sh") (which "sh")))
9893 (for-each (lambda (file)
9894 (substitute* file
9895 (("/bin/sh") (which "sh"))
9896 (("/bin/true") (which "true"))))
9897 (find-files "src/greentest" "\\.py$"))
9898 #t))
9899 (add-before 'build 'do-not-use-bundled-sources
9900 (lambda* (#:key inputs #:allow-other-keys)
9901 (setenv "CONFIG_SHELL" (which "bash"))
9902 (setenv "LIBEV_EMBED" "false")
9903 (setenv "CARES_EMBED" "false")
9904 (setenv "EMBED" "false")
9905
9906 ;; Prevent building bundled libev.
9907 (substitute* "setup.py"
9908 (("run_make=_BUILDING")
9909 "run_make=False"))
9910
9911 (let ((greenlet (string-append
9912 (assoc-ref inputs "python-greenlet")
9913 "/include")))
9914 (match (scandir greenlet
9915 (lambda (item)
9916 (string-prefix? "python" item)))
9917 ((python)
9918 (setenv "C_INCLUDE_PATH"
9919 (string-append greenlet "/" python)))))
9920 #t))
9921 (add-before 'check 'skip-timer-test
9922 (lambda _
9923 ;; XXX: Skip 'TestTimerResolution', which appears to be
9924 ;; unreliable.
9925 (substitute* "src/greentest/test__core_timer.py"
9926 (("not greentest.RUNNING_ON_CI") "False"))
9927 #t))
9928 (replace 'check
9929 (lambda _
9930 ;; Make sure the build directory is on PYTHONPATH.
9931 (setenv "PYTHONPATH"
9932 (string-append
9933 (getenv "PYTHONPATH") ":"
9934 (getcwd) "/build/"
9935 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9936 (with-directory-excursion "src/greentest"
9937 ;; XXX: Many tests require network access. Instead we only
9938 ;; run known-good tests. Unfortunately we cannot use
9939 ;; recursion here since this directory also contains
9940 ;; Python-version-specific subfolders.
9941 (apply invoke "python" "testrunner.py" "--config"
9942 "known_failures.py"
9943 (scandir "." (cut regexp-exec
9944 (make-regexp "test_+(subprocess|core)")
9945 <>)))))))))
9946 (propagated-inputs
9947 `(("python-greenlet" ,python-greenlet)
9948 ("python-objgraph" ,python-objgraph)))
9949 (native-inputs
9950 `(("python-six" ,python-six)))
9951 (inputs
9952 `(("c-ares" ,c-ares)
9953 ("libev" ,libev)))
9954 (home-page "http://www.gevent.org/")
9955 (synopsis "Coroutine-based network library")
9956 (description
9957 "gevent is a coroutine-based Python networking library that uses greenlet
9958 to provide a high-level synchronous API on top of the libev event loop.")
9959 (license license:expat)
9960 (properties `((python2-variant . ,(delay python2-gevent))))))
9961
9962 (define-public python2-gevent
9963 (let ((base (package-with-python2
9964 (strip-python2-variant python-gevent))))
9965 (package
9966 (inherit base)
9967 (native-inputs `(,@(package-native-inputs python-gevent)
9968 ("python-mock" ,python2-mock))))))
9969
9970 (define-public python-fastimport
9971 (package
9972 (name "python-fastimport")
9973 (version "0.9.6")
9974 (source
9975 (origin
9976 (method url-fetch)
9977 (uri (pypi-uri "fastimport" version))
9978 (sha256
9979 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9980 (build-system python-build-system)
9981 (home-page "https://github.com/jelmer/python-fastimport")
9982 (synopsis "VCS fastimport parser and generator in Python")
9983 (description "This package provides a parser for and generator of the Git
9984 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9985 format.")
9986 (license license:gpl2+)))
9987
9988 (define-public python2-fastimport
9989 (package-with-python2 python-fastimport))
9990
9991 (define-public python-twisted
9992 (package
9993 (name "python-twisted")
9994 (version "19.7.0")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9998 (sha256
9999 (base32
10000 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10001 (build-system python-build-system)
10002 (arguments
10003 '(#:tests? #f)) ; FIXME: some tests fail
10004 (propagated-inputs
10005 `(("python-zope-interface" ,python-zope-interface)
10006 ("python-pyhamcrest" ,python-pyhamcrest)
10007 ("python-incremental" ,python-incremental)
10008 ("python-hyperlink" ,python-hyperlink)
10009 ("python-constantly" ,python-constantly)
10010 ("python-automat" ,python-automat)))
10011 (home-page "https://twistedmatrix.com/")
10012 (synopsis "Asynchronous networking framework written in Python")
10013 (description
10014 "Twisted is an extensible framework for Python programming, with special
10015 focus on event-based network programming and multiprotocol integration.")
10016 (license license:expat)))
10017
10018 (define-public python2-twisted
10019 (package-with-python2 python-twisted))
10020
10021 (define-public python-pika
10022 (package
10023 (name "python-pika")
10024 (version "0.12.0")
10025 (source
10026 (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "pika" version))
10029 (sha256
10030 (base32
10031 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10032 (build-system python-build-system)
10033 (native-inputs
10034 `(("python-pyev" ,python-pyev)
10035 ("python-tornado" ,python-tornado)
10036 ("python-twisted" ,python-twisted)))
10037 (home-page "https://pika.readthedocs.org")
10038 (synopsis "Pure Python AMQP Client Library")
10039 (description
10040 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10041 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10042 network support library.")
10043 (license license:bsd-3)))
10044
10045 (define-public python2-pika
10046 (package-with-python2 python-pika))
10047
10048 (define-public python-ply
10049 (package
10050 (name "python-ply")
10051 (version "3.10")
10052 (source
10053 (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "ply" version))
10056 (sha256
10057 (base32
10058 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10059 (build-system python-build-system)
10060 (home-page "http://www.dabeaz.com/ply/")
10061 (synopsis "Python Lex & Yacc")
10062 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10063 It uses LR parsing and does extensive error checking.")
10064 (license license:bsd-3)))
10065
10066 (define-public python2-ply
10067 (package-with-python2 python-ply))
10068
10069 (define-public python-tabulate
10070 (package
10071 (name "python-tabulate")
10072 (version "0.7.7")
10073 (source (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "tabulate" version))
10076 (sha256
10077 (base32
10078 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10079 (build-system python-build-system)
10080 (arguments
10081 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10082 ;; and the latest release is not tagged in the upstream repository.
10083 '(#:tests? #f))
10084 (home-page "https://bitbucket.org/astanin/python-tabulate")
10085 (synopsis "Pretty-print tabular data")
10086 (description
10087 "Tabulate is a library and command-line utility to pretty-print tabular
10088 data in Python.")
10089 (license license:expat)))
10090
10091 (define-public python2-tabulate
10092 (package-with-python2 python-tabulate))
10093
10094 (define-public python-kazoo
10095 (package
10096 (name "python-kazoo")
10097 (version "2.4.0")
10098 (source
10099 (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "kazoo" version))
10102 (sha256
10103 (base32
10104 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10105 (build-system python-build-system)
10106 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10107 (propagated-inputs
10108 `(("python-six" ,python-six)))
10109 (home-page "https://kazoo.readthedocs.org")
10110 (synopsis "High-level Zookeeper client library")
10111 (description
10112 "Kazoo is a Python client library for the Apache Zookeeper distributed
10113 application service. It is designed to be easy to use and to avoid common
10114 programming errors.")
10115 (license license:asl2.0)))
10116
10117 (define-public python2-kazoo
10118 (package-with-python2 python-kazoo))
10119
10120 (define-public python-pykafka
10121 (package
10122 (name "python-pykafka")
10123 (version "2.4.0")
10124 (source (origin
10125 (method url-fetch)
10126 (uri (pypi-uri "pykafka" version))
10127 (sha256
10128 (base32
10129 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10130 (build-system python-build-system)
10131 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10132 (propagated-inputs
10133 `(("python-gevent" ,python-gevent)
10134 ("python-kazoo" ,python-kazoo)
10135 ("python-tabulate" ,python-tabulate)))
10136 (inputs
10137 `(("librdkafka" ,librdkafka)))
10138 (home-page "https://pykafka.readthedocs.io/")
10139 (synopsis "Apache Kafka client for Python")
10140 (description
10141 "PyKafka is a client for the Apache Kafka distributed messaging system.
10142 It includes Python implementations of Kafka producers and consumers, which
10143 are optionally backed by a C extension built on librdkafka.")
10144 (license license:asl2.0)))
10145
10146 (define-public python2-pykafka
10147 (package-with-python2 python-pykafka))
10148
10149 (define-public python-wcwidth
10150 (package
10151 (name "python-wcwidth")
10152 (version "0.1.7")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (pypi-uri "wcwidth" version))
10157 (sha256
10158 (base32
10159 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10160 (build-system python-build-system)
10161 (home-page "https://github.com/jquast/wcwidth")
10162 (synopsis "Measure number of terminal column cells of wide-character codes")
10163 (description "Wcwidth measures the number of terminal column cells of
10164 wide-character codes. It is useful for those implementing a terminal emulator,
10165 or programs that carefully produce output to be interpreted by one. It is a
10166 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10167 specified in POSIX.1-2001 and POSIX.1-2008.")
10168 (license license:expat)))
10169
10170 (define-public python2-wcwidth
10171 (package-with-python2 python-wcwidth))
10172
10173 (define-public python2-jsonrpclib
10174 (package
10175 (name "python2-jsonrpclib")
10176 (version "0.1.7")
10177 (source (origin
10178 (method url-fetch)
10179 (uri (pypi-uri "jsonrpclib" version))
10180 (sha256
10181 (base32
10182 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10183 (build-system python-build-system)
10184 (arguments
10185 `(#:tests? #f
10186 #:python ,python-2))
10187 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10188 (synopsis "Implementation of JSON-RPC specification for Python")
10189 (description
10190 "This library is an implementation of the JSON-RPC specification.
10191 It supports both the original 1.0 specification, as well as the
10192 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10193 etc.")
10194 (license license:asl2.0)))
10195
10196 (define-public python-chai
10197 (package
10198 (name "python-chai")
10199 (version "1.1.2")
10200 (source (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "chai" version))
10203 (sha256
10204 (base32
10205 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10206 (build-system python-build-system)
10207 (home-page "https://github.com/agoragames/chai")
10208 (synopsis "Mocking framework for Python")
10209 (description
10210 "Chai provides an api for mocking, stubbing and spying your python
10211 objects, patterned after the Mocha library for Ruby.")
10212 (license license:bsd-3)))
10213
10214 (define-public python2-chai
10215 (package-with-python2 python-chai))
10216
10217 (define-public python-inflection
10218 (package
10219 (name "python-inflection")
10220 (version "0.3.1")
10221 (source
10222 (origin (method url-fetch)
10223 (uri (pypi-uri "inflection" version))
10224 (sha256
10225 (base32
10226 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10227 (build-system python-build-system)
10228 (native-inputs
10229 `(("python-pytest" ,python-pytest)))
10230 (home-page "https://github.com/jpvanhal/inflection")
10231 (synopsis "Python string transformation library")
10232 (description
10233 "Inflection is a string transformation library. It singularizes
10234 and pluralizes English words, and transforms strings from CamelCase to
10235 underscored string.")
10236 (license license:expat)))
10237
10238 (define-public python2-inflection
10239 (package-with-python2 python-inflection))
10240
10241 (define-public python-pylev
10242 (package
10243 (name "python-pylev")
10244 (version "1.3.0")
10245 (source (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "pylev" version))
10248 (sha256
10249 (base32
10250 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10251 (build-system python-build-system)
10252 (home-page "https://github.com/toastdriven/pylev")
10253 (synopsis "Levenshtein distance implementation in Python")
10254 (description "Pure Python Levenshtein implementation, based off the
10255 Wikipedia code samples at
10256 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10257 (license license:bsd-3)))
10258
10259 (define-public python2-pylev
10260 (package-with-python2 python-pylev))
10261
10262 (define-public python-cleo
10263 (package
10264 (name "python-cleo")
10265 (version "0.6.1")
10266 (source (origin
10267 (method url-fetch)
10268 (uri (pypi-uri "cleo" version))
10269 (sha256
10270 (base32
10271 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10272 (build-system python-build-system)
10273 (native-inputs
10274 `(;; For testing
10275 ("python-mock" ,python-mock)
10276 ("python-pytest-mock" ,python-pytest-mock)
10277 ("python-pytest" ,python-pytest)))
10278 (propagated-inputs
10279 `(("python-backpack" ,python-backpack)
10280 ("python-pastel" ,python-pastel)
10281 ("python-pylev" ,python-pylev)))
10282 (home-page "https://github.com/sdispater/cleo")
10283 (synopsis "Command-line arguments library for Python")
10284 (description
10285 "Cleo allows you to create command-line commands with signature in
10286 docstring and colored output.")
10287 (license license:expat)))
10288
10289 (define-public python2-cleo
10290 (package-with-python2 python-cleo))
10291
10292 (define-public python-lazy-object-proxy
10293 (package
10294 (name "python-lazy-object-proxy")
10295 (version "1.3.1")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (pypi-uri "lazy-object-proxy" version))
10299 (sha256
10300 (base32
10301 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10302 (build-system python-build-system)
10303 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10304 (synopsis "Lazy object proxy for python")
10305 (description
10306 "Lazy object proxy is an object that wraps a callable but defers the call
10307 until the object is actually required, and caches the result of said call.")
10308 (license license:bsd-2)))
10309
10310 (define-public python2-lazy-object-proxy
10311 (package-with-python2 python-lazy-object-proxy))
10312
10313 (define-public python-dnspython
10314 (package
10315 (name "python-dnspython")
10316 (version "1.15.0")
10317 (source (origin
10318 (method url-fetch)
10319 (uri (string-append "http://www.dnspython.org/kits/"
10320 version "/dnspython-" version ".tar.gz"))
10321 (sha256
10322 (base32
10323 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10324 (build-system python-build-system)
10325 (arguments '(#:tests? #f)) ; XXX: requires internet access
10326 (home-page "http://www.dnspython.org")
10327 (synopsis "DNS toolkit for Python")
10328 (description
10329 "dnspython is a DNS toolkit for Python. It supports almost all record
10330 types. It can be used for queries, zone transfers, and dynamic updates.
10331 It supports TSIG authenticated messages and EDNS0.")
10332 (license license:expat)))
10333
10334 (define-public python2-dnspython
10335 (package-with-python2 python-dnspython))
10336
10337 (define-public python-email-validator
10338 (package
10339 (name "python-email-validator")
10340 (version "1.0.2")
10341 (source
10342 (origin (method url-fetch)
10343 (uri (pypi-uri "email_validator" version))
10344 (sha256
10345 (base32
10346 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10347 (build-system python-build-system)
10348 (arguments
10349 '(#:phases
10350 (modify-phases %standard-phases
10351 (add-before 'build 'use-dnspython
10352 (lambda _
10353 (substitute* "setup.py"
10354 (("dnspython3") "dnspython"))
10355 #t)))))
10356 (propagated-inputs
10357 `(("python-dnspython" ,python-dnspython)
10358 ("python-idna" ,python-idna)))
10359 (home-page "https://github.com/JoshData/python-email-validator")
10360 (synopsis "Email address validation library for Python")
10361 (description
10362 "This library validates email address syntax and deliverability.")
10363 (license license:cc0)))
10364
10365 (define-public python2-email-validator
10366 (package-with-python2 python-email-validator))
10367
10368 (define-public python-ukpostcodeparser
10369 (package
10370 (name "python-ukpostcodeparser")
10371 (version "1.0.3")
10372 (source (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "UkPostcodeParser" version))
10375 (sha256
10376 (base32
10377 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10378 (build-system python-build-system)
10379 (home-page "https://github.com/hamstah/ukpostcodeparser")
10380 (synopsis "UK Postcode parser for Python")
10381 (description
10382 "This library provides the @code{parse_uk_postcode} function for
10383 parsing UK postcodes.")
10384 (license license:expat)))
10385
10386 (define-public python2-ukpostcodeparser
10387 (package-with-python2 python-ukpostcodeparser))
10388
10389 (define-public python-faker
10390 (package
10391 (name "python-faker")
10392 (version "0.7.9")
10393 (source (origin
10394 (method url-fetch)
10395 (uri (pypi-uri "Faker" version))
10396 (sha256
10397 (base32
10398 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10399 (patches
10400 (search-patches "python-faker-fix-build-32bit.patch"))
10401 (modules '((guix build utils)))
10402 (snippet
10403 '(begin
10404 (for-each delete-file (find-files "." "\\.pyc$"))
10405 #t))))
10406 (build-system python-build-system)
10407 (arguments
10408 '(#:phases
10409 (modify-phases %standard-phases
10410 (replace 'check
10411 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10412 (native-inputs
10413 `(;; For testing
10414 ("python-email-validator" ,python-email-validator)
10415 ("python-mock" ,python-mock)
10416 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10417 (propagated-inputs
10418 `(("python-dateutil" ,python-dateutil)
10419 ("python-six" ,python-six)))
10420 (home-page "https://github.com/joke2k/faker")
10421 (synopsis "Python package that generates fake data")
10422 (description
10423 "Faker is a Python package that generates fake data such as names,
10424 addresses, and phone numbers.")
10425 (license license:expat)
10426 (properties `((python2-variant . ,(delay python2-faker))))))
10427
10428 (define-public python2-faker
10429 (let ((base (package-with-python2 (strip-python2-variant
10430 python-faker))))
10431 (package
10432 (inherit base)
10433 (propagated-inputs
10434 `(("python2-ipaddress" ,python2-ipaddress)
10435 ,@(package-propagated-inputs base))))))
10436
10437 (define-public python-pyaml
10438 (package
10439 (name "python-pyaml")
10440 (version "18.11.0")
10441 (source (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "pyaml" version))
10444 (sha256
10445 (base32
10446 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10447 (build-system python-build-system)
10448 (native-inputs
10449 `(("python-unidecode" ,python-unidecode)))
10450 (propagated-inputs
10451 `(("python-pyyaml" ,python-pyyaml)))
10452 (home-page "https://github.com/mk-fg/pretty-yaml")
10453 (synopsis "YAML pretty-print library for Python")
10454 (description
10455 "pyaml is a PyYAML based python module to produce pretty and readable
10456 YAML-serialized data.")
10457 (license license:wtfpl2)))
10458
10459 (define-public python2-pyaml
10460 (package-with-python2 python-pyaml))
10461
10462 (define-public python-backpack
10463 (package
10464 (name "python-backpack")
10465 (version "0.1")
10466 (source
10467 (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "backpack" version))
10470 (sha256
10471 (base32
10472 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10473 (build-system python-build-system)
10474 (native-inputs
10475 `(("python-pytest" ,python-pytest)
10476 ("python-nose" ,python-nose)))
10477 (propagated-inputs
10478 `(("python-simplejson" ,python-simplejson)))
10479 (home-page "https://github.com/sdispater/backpack")
10480 (synopsis "Utilities for working with Python collections")
10481 (description "Backpack provides some useful utilities for working with
10482 collections of data.")
10483 (license license:expat)))
10484
10485 (define-public python2-backpack
10486 (package-with-python2 python-backpack))
10487
10488 (define-public python-prompt-toolkit
10489 (package
10490 (name "python-prompt-toolkit")
10491 (version "2.0.7")
10492 (source
10493 (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10496 (sha256
10497 (base32
10498 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10499 (build-system python-build-system)
10500 (arguments
10501 `(#:phases
10502 (modify-phases %standard-phases
10503 (delete 'check)
10504 (add-after 'install 'post-install-check
10505 (lambda* (#:key inputs outputs #:allow-other-keys)
10506 ;; HOME is needed for the test
10507 ;; "test_pathcompleter_can_expanduser".
10508 (setenv "HOME" "/tmp")
10509 (add-installed-pythonpath inputs outputs)
10510 (invoke "py.test"))))))
10511 (propagated-inputs
10512 `(("python-wcwidth" ,python-wcwidth)
10513 ("python-six" ,python-six)
10514 ("python-pygments" ,python-pygments)))
10515 (native-inputs
10516 `(("python-pytest" ,python-pytest)))
10517 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10518 (synopsis "Library for building command line interfaces in Python")
10519 (description
10520 "Prompt-Toolkit is a library for building interactive command line
10521 interfaces in Python. It's like GNU Readline but it also features syntax
10522 highlighting while typing, out-of-the-box multi-line input editing, advanced
10523 code completion, incremental search, support for Chinese double-width
10524 characters, mouse support, and auto suggestions.")
10525 (license license:bsd-3)))
10526
10527 (define-public python2-prompt-toolkit
10528 (package-with-python2 python-prompt-toolkit))
10529
10530 (define-public python-prompt-toolkit-1
10531 (package (inherit python-prompt-toolkit)
10532 (version "1.0.15")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10537 (sha256
10538 (base32
10539 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10540
10541 (define-public python2-prompt-toolkit-1
10542 (package-with-python2 python-prompt-toolkit-1))
10543
10544 (define-public python-jedi
10545 (package
10546 (name "python-jedi")
10547 (version "0.13.3")
10548 (source
10549 (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "jedi" version))
10552 (sha256
10553 (base32
10554 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10555 (build-system python-build-system)
10556 (arguments
10557 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10558 ;; https://github.com/davidhalter/jedi/issues/1263)
10559 #:tests? #f
10560 #:phases
10561 (modify-phases %standard-phases
10562 (replace 'check
10563 (lambda* (#:key tests? #:allow-other-keys)
10564 (when tests?
10565 (invoke "py.test" "-vv")))))))
10566 (native-inputs
10567 `(("python-pytest" ,python-pytest)
10568 ("python-docopt" ,python-docopt)))
10569 (propagated-inputs
10570 `(("python-parso" ,python-parso)))
10571 (home-page "https://github.com/davidhalter/jedi")
10572 (synopsis "Autocompletion and static analysis library for Python")
10573 (description
10574 "Jedi is a static analysis tool for Python that can be used in Integrated
10575 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10576 on a deeper level than many other static analysis frameworks for Python.
10577
10578 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10579 well.")
10580 (license license:expat)))
10581
10582 (define-public python2-jedi
10583 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10584 (package
10585 (inherit base)
10586 (arguments (substitute-keyword-arguments (package-arguments base)
10587 ((#:tests? _) #t))))))
10588
10589 (define-public ptpython
10590 (package
10591 (name "ptpython")
10592 (version "0.34")
10593 (source (origin
10594 (method url-fetch)
10595 (uri (pypi-uri "ptpython" version))
10596 (sha256
10597 (base32
10598 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10599 (build-system python-build-system)
10600 (arguments
10601 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10602 (propagated-inputs
10603 `(("python-docopt" ,python-docopt)
10604 ("python-jedi" ,python-jedi)
10605 ("python-prompt-toolkit" ,python-prompt-toolkit)
10606 ("python-pygments" ,python-pygments)))
10607 (home-page "https://github.com/jonathanslenders/ptpython")
10608 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10609 (description
10610 "ptpython is a Python read-eval-print loop with IDE-like features.
10611 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10612 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10613 etc.")
10614 (license license:bsd-3)
10615 (properties `((python2-variant . ,(delay ptpython-2))))))
10616
10617 (define-public ptpython-2
10618 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10619 (package
10620 (inherit base)
10621 (name "ptpython2"))))
10622
10623 (define-public python-stem
10624 (package
10625 (name "python-stem")
10626 (version "1.7.1")
10627 (source
10628 (origin
10629 (method url-fetch)
10630 (uri (pypi-uri "stem" version))
10631 (sha256
10632 (base32
10633 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10634 (build-system python-build-system)
10635 (arguments
10636 `(#:phases
10637 (modify-phases %standard-phases
10638 (replace 'check
10639 (lambda _
10640 (invoke "./run_tests.py" "--unit")
10641 #t)))))
10642 (native-inputs
10643 `(("python-mock" ,python-mock)
10644 ("python-pycodestyle" ,python-pycodestyle)
10645 ("python-pyflakes" ,python-pyflakes)))
10646 (home-page "https://stem.torproject.org/")
10647 (synopsis
10648 "Python controller library that allows applications to interact with Tor")
10649 (description
10650 "Stem is a Python controller library for Tor. With it you can use Tor's
10651 control protocol to script against the Tor process and read descriptor data
10652 relays publish about themselves.")
10653 (license license:lgpl3)))
10654
10655 (define-public python2-stem
10656 (package-with-python2 python-stem))
10657
10658 (define-public python-pyserial
10659 (package
10660 (name "python-pyserial")
10661 (version "3.1.1")
10662 (source
10663 (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "pyserial" version))
10666 (sha256
10667 (base32
10668 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10669 (build-system python-build-system)
10670 (arguments
10671 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10672 ;; #:phases
10673 ;; (modify-phases %standard-phases
10674 ;; (replace 'check
10675 ;; (lambda _
10676 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10677 (home-page
10678 "https://github.com/pyserial/pyserial")
10679 (synopsis "Python Serial Port Bindings")
10680 (description "@code{pyserial} provide serial port bindings for Python. It
10681 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10682 and/or Xon/Xoff. The port is accessed in RAW mode.")
10683 (license license:bsd-3)))
10684
10685 (define-public python2-pyserial
10686 (package-with-python2 python-pyserial))
10687
10688 (define-public python-kivy
10689 (package
10690 (name "python-kivy")
10691 (version "1.10.1")
10692 (source
10693 (origin
10694 (method url-fetch)
10695 (uri (pypi-uri "Kivy" version))
10696 (file-name (string-append name "-" version ".tar.gz"))
10697 (sha256
10698 (base32
10699 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10700 (build-system python-build-system)
10701 (arguments
10702 `(#:tests? #f ; Tests require many optional packages
10703 #:phases
10704 (modify-phases %standard-phases
10705 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10706 (lambda* (#:key inputs #:allow-other-keys)
10707 (setenv "KIVY_SDL2_PATH"
10708 (string-append (assoc-ref inputs "sdl-union")
10709 "/include/SDL2"))
10710 #t)))))
10711 (native-inputs
10712 `(("git" ,git)
10713 ("pkg-config" ,pkg-config)
10714 ("python-cython" ,python-cython)))
10715 (inputs
10716 `(("gstreamer" ,gstreamer)
10717 ("mesa" ,mesa)
10718 ("sdl-union"
10719 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10720 (home-page "http://kivy.org")
10721 (synopsis
10722 "Multitouch application framework")
10723 (description
10724 "A software library for rapid development of
10725 hardware-accelerated multitouch applications.")
10726 (license license:expat)))
10727
10728 (define-public python2-kivy
10729 (package-with-python2 python-kivy))
10730
10731 (define-public python-kivy-next
10732 (deprecated-package "python-kivy-next" python-kivy))
10733
10734 (define-public python2-kivy-next
10735 (deprecated-package "python2-kivy-next" python2-kivy))
10736
10737 (define-public python-binaryornot
10738 (package
10739 (name "python-binaryornot")
10740 (version "0.4.4")
10741 (source (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "binaryornot" version))
10744 (sha256
10745 (base32
10746 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10747 (build-system python-build-system)
10748 (propagated-inputs
10749 `(("python-chardet" ,python-chardet)
10750 ("python-hypothesis" ,python-hypothesis)))
10751 (home-page "https://github.com/audreyr/binaryornot")
10752 (synopsis "Package to check if a file is binary or text")
10753 (description "Ultra-lightweight pure Python package to check if a file is
10754 binary or text.")
10755 (license license:bsd-3)
10756 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10757
10758 (define-public python2-binaryornot
10759 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10760 (package (inherit base)
10761 (propagated-inputs
10762 `(("python2-enum34" ,python2-enum34)
10763 ,@(package-propagated-inputs base))))))
10764
10765 (define-public python-nltk
10766 (package
10767 (name "python-nltk")
10768 (version "3.2.1")
10769 (source (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "nltk" version))
10772 (sha256
10773 (base32
10774 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10775 (build-system python-build-system)
10776 (arguments
10777 '(;; The tests require some extra resources to be downloaded.
10778 ;; TODO Try packaging these resources.
10779 #:tests? #f))
10780 (home-page "http://nltk.org/")
10781 (synopsis "Natural Language Toolkit")
10782 (description "It provides interfaces to over 50 corpora and lexical
10783 resources such as WordNet, along with a suite of text processing libraries
10784 for classification, tokenization, stemming, tagging, parsing, and semantic
10785 reasoning, wrappers for natural language processing libraries.")
10786 (license license:asl2.0)))
10787
10788 (define-public python2-nltk
10789 (package-with-python2 python-nltk))
10790
10791 (define-public python-pymongo
10792 (package
10793 (name "python-pymongo")
10794 (version "3.7.2")
10795 (source (origin
10796 (method url-fetch)
10797 (uri (pypi-uri "pymongo" version))
10798 (sha256
10799 (base32
10800 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10801 (build-system python-build-system)
10802 (propagated-inputs
10803 `(("python-certifi" ,python-certifi)))
10804 (home-page "https://github.com/mongodb/mongo-python-driver")
10805 (synopsis "Python driver for MongoDB")
10806 (description "Python driver for MongoDB.")
10807 (license license:asl2.0)))
10808
10809 (define-public python2-pymongo
10810 (package-with-python2 python-pymongo))
10811
10812 (define-public python-consul
10813 (package
10814 (name "python-consul")
10815 (version "0.6.1")
10816 (source
10817 (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "python-consul" version))
10820 (sha256
10821 (base32
10822 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10823 (build-system python-build-system)
10824 (arguments
10825 '(#:tests? #f)) ; The tests are not distributed
10826 (propagated-inputs
10827 `(("python-requests" ,python-requests)
10828 ("python-six" ,python-six)))
10829 (home-page "https://github.com/cablehead/python-consul")
10830 (synopsis "Python client for Consul")
10831 (description
10832 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10833 discovery, monitoring and configuration.")
10834 (license license:expat)))
10835
10836 (define-public python2-consul
10837 (package-with-python2 python-consul))
10838
10839 (define-public python-schematics
10840 (package
10841 (name "python-schematics")
10842 (version "1.1.1")
10843 (source
10844 (origin
10845 (method git-fetch)
10846 (uri (git-reference
10847 (url "https://github.com/schematics/schematics.git")
10848 (commit (string-append "v" version))))
10849 (file-name (git-file-name name version))
10850 (sha256
10851 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10852 (build-system python-build-system)
10853 (propagated-inputs
10854 `(("python-six" ,python-six)))
10855 (arguments
10856 ;; The tests require a bunch of not very nice packages with fixed
10857 ;; version requirements (e.g. python-coveralls).
10858 `(#:tests? #f))
10859 (home-page "https://github.com/schematics/schematics")
10860 (synopsis "Python Data Structures for Humans")
10861 (description "Python Data Structures for Humans.")
10862 (license license:bsd-3)))
10863
10864 (define-public python2-schematics
10865 (package-with-python2 python-schematics))
10866
10867 (define-public python-odfpy
10868 (package
10869 (name "python-odfpy")
10870 (version "1.3.3")
10871 (source (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "odfpy" version))
10874 (sha256
10875 (base32
10876 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10877 (arguments
10878 `(#:modules ((srfi srfi-1)
10879 (guix build python-build-system)
10880 (guix build utils))
10881 #:phases
10882 (modify-phases %standard-phases
10883 (replace 'check
10884 ;; The test runner invokes python2 and python3 for test*.py.
10885 ;; To avoid having both in inputs, we replicate it here.
10886 (lambda _
10887 (for-each (lambda (test-file) (invoke "python" test-file))
10888 (find-files "tests" "^test.*\\.py$"))
10889 #t)))))
10890 (build-system python-build-system)
10891 (home-page "https://github.com/eea/odfpy")
10892 (synopsis "Python API and tools to manipulate OpenDocument files")
10893 (description "Collection of libraries and utility programs written in
10894 Python to manipulate OpenDocument 1.2 files.")
10895 (license
10896 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10897 ;; number of files with other licenses.
10898 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10899
10900 (define-public python2-odfpy
10901 (package-with-python2 python-odfpy))
10902
10903 (define-public python-natsort
10904 (package
10905 (name "python-natsort")
10906 (version "5.4.1")
10907 (source (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "natsort" version))
10910 (sha256
10911 (base32
10912 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10913 (build-system python-build-system)
10914 (arguments
10915 `(#:modules ((guix build utils)
10916 (guix build python-build-system)
10917 (srfi srfi-1)
10918 (srfi srfi-26)
10919 (ice-9 ftw))
10920 #:phases
10921 (modify-phases %standard-phases
10922 (add-before 'check 'set-cachedir
10923 ;; Tests require write access to $HOME by default
10924 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10925 (replace 'check
10926 (lambda _
10927 (let ((cwd (getcwd)))
10928 (setenv "PYTHONPATH"
10929 (string-append
10930 cwd "/build/"
10931 (find (cut string-prefix? "lib" <>)
10932 (scandir (string-append cwd "/build")))
10933 ":"
10934 (getenv "PYTHONPATH")))
10935 (invoke "pytest" "-v")))))))
10936 (native-inputs
10937 `(("python-hypothesis" ,python-hypothesis)
10938 ("python-pytest-cov" ,python-pytest-cov)
10939 ("python-pytest-mock" ,python-pytest-mock)
10940 ("python-pytest" ,python-pytest)))
10941 (propagated-inputs ; TODO: Add python-fastnumbers.
10942 `(("python-pyicu" ,python-pyicu)))
10943 (home-page "https://github.com/SethMMorton/natsort")
10944 (synopsis "Natural sorting for python and shell")
10945 (description
10946 "Natsort lets you apply natural sorting on lists instead of
10947 lexicographical. If you use the built-in @code{sorted} method in python
10948 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10949 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10950 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10951 identifies numbers and sorts them separately from strings. It can also sort
10952 version numbers, real numbers, mixed types and more, and comes with a shell
10953 command @command{natsort} that exposes this functionality in the command line.")
10954 (license license:expat)
10955 (properties `((python2-variant . ,(delay python2-natsort))))))
10956
10957 (define-public python2-natsort
10958 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10959 (package (inherit base)
10960 (native-inputs
10961 `(("python2-pathlib" ,python2-pathlib)
10962 ,@(package-native-inputs base))))))
10963
10964 (define-public python-glances
10965 (package
10966 (name "python-glances")
10967 (version "3.1.1")
10968 (source
10969 (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "Glances" version))
10972 (sha256
10973 (base32
10974 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
10975 (modules '((guix build utils)))
10976 (snippet
10977 '(begin
10978 ;; Glances phones PyPI for weekly update checks by default.
10979 ;; Disable these. The user can re-enable them if desired.
10980 (substitute* "glances/outdated.py"
10981 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
10982 (string-append indentation
10983 "self.args.disable_check_update = True\n"
10984 line)))
10985 #t))))
10986 (build-system python-build-system)
10987 (propagated-inputs
10988 `(("python-future" ,python-future)
10989 ("python-psutil" ,python-psutil)))
10990 (home-page
10991 "https://github.com/nicolargo/glances")
10992 (synopsis "Cross-platform curses-based monitoring tool")
10993 (description
10994 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10995 Glances uses the PsUtil library to get information from your system. It
10996 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10997 (license license:lgpl3+)))
10998
10999 (define-public python2-glances
11000 (package-with-python2 python-glances))
11001
11002 (define-public python-graphql-core
11003 (package
11004 (name "python-graphql-core")
11005 (version "0.5.3")
11006 (source
11007 (origin
11008 (method url-fetch)
11009 (uri (pypi-uri "graphql-core" version))
11010 (sha256
11011 (base32
11012 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11013 (build-system python-build-system)
11014 (arguments
11015 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11016 #:phases
11017 (modify-phases %standard-phases
11018 (add-after 'unpack 'patch-hardcoded-version
11019 (lambda _ (substitute*
11020 "setup.py"
11021 (("'gevent==1.1rc1'") "'gevent'"))
11022 #t)))))
11023 (native-inputs
11024 `(("python-gevent" ,python-gevent)
11025 ("python-mock" ,python-mock)
11026 ("python-pytest-mock" ,python-pytest-mock)))
11027 (propagated-inputs
11028 `(("python-promise" ,python-promise)
11029 ("python-six" ,python-six)))
11030 (home-page "https://github.com/graphql-python/graphql-core")
11031 (synopsis "GraphQL implementation for Python")
11032 (description
11033 "GraphQL implementation for Python. GraphQL is a data query language and
11034 runtime designed and used to request and deliver data to mobile and web apps.
11035 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11036 to Python.")
11037 (license license:expat)))
11038
11039 (define-public python2-graphql-core
11040 (package-with-python2 python-graphql-core))
11041
11042 (define-public python-graphql-relay
11043 (package
11044 (name "python-graphql-relay")
11045 (version "0.4.5")
11046 (source
11047 (origin
11048 (method url-fetch)
11049 (uri (pypi-uri "graphql-relay" version))
11050 (sha256
11051 (base32
11052 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11053 (build-system python-build-system)
11054 (arguments
11055 '(#:tests? #f)) ; The tests are not distributed
11056 (propagated-inputs
11057 `(("python-graphql-core" ,python-graphql-core)
11058 ("python-promise" ,python-promise)
11059 ("python-six" ,python-six)))
11060 (home-page "https://github.com/graphql-python/graphql-relay-py")
11061 (synopsis "Relay implementation for Python")
11062 (description
11063 "This is a library to allow the easy creation of Relay-compliant servers
11064 using the GraphQL Python reference implementation of a GraphQL server. It
11065 should be noted that the code is a exact port of the original
11066 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11067 from Facebook.")
11068 (license license:expat)))
11069
11070 (define-public python2-graphql-relay
11071 (package-with-python2 python-graphql-relay))
11072
11073 (define-public python-graphene
11074 (package
11075 (name "python-graphene")
11076 (version "0.10.2")
11077 (source
11078 (origin
11079 (method url-fetch)
11080 (uri (pypi-uri "graphene" version))
11081 (sha256
11082 (base32
11083 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11084 (build-system python-build-system)
11085 (propagated-inputs
11086 `(("python-graphql-core" ,python-graphql-core)
11087 ("python-graphql-relay" ,python-graphql-relay)
11088 ("python-iso8601" ,python-iso8601)
11089 ("python-promise" ,python-promise)
11090 ("python-six" ,python-six)))
11091 (arguments
11092 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11093 (home-page "http://graphene-python.org/")
11094 (synopsis "GraphQL Framework for Python")
11095 (description
11096 "Graphene is a Python library for building GraphQL schemas/types.
11097 A GraphQL schema describes your data model, and provides a GraphQL server
11098 with an associated set of resolve methods that know how to fetch data.")
11099 (properties `((python2-variant . ,(delay python2-graphene))))
11100 (license license:expat)))
11101
11102 (define-public python2-graphene
11103 (let ((base (package-with-python2
11104 (strip-python2-variant python-graphene))))
11105 (package (inherit base)
11106 (native-inputs
11107 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11108 ,@(package-native-inputs base))))))
11109
11110 (define-public python-nautilus
11111 (package
11112 (name "python-nautilus")
11113 (version "0.4.9")
11114 (source
11115 (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "nautilus" version))
11118 (sha256
11119 (base32
11120 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11121 (build-system python-build-system)
11122 (arguments `(#:tests? #f)) ; fails to import test modules
11123 (propagated-inputs
11124 `(("python-bcrypt" ,python-bcrypt)
11125 ("python-click" ,python-click)
11126 ("python-consul" ,python-consul)
11127 ("python-graphene" ,python-graphene)
11128 ("python-jinja2" ,python-jinja2)
11129 ("python-peewee" ,python-peewee)
11130 ("python-pika" ,python-pika)
11131 ("python-tornado" ,python-tornado)
11132 ("python-wtforms" ,python-wtforms)))
11133 (native-inputs
11134 `(("python-nose2" ,python-nose2)))
11135 (home-page "https://github.com/AlecAivazis/nautilus")
11136 (synopsis "Library for creating microservice applications")
11137 (description
11138 "Nautilus is a framework for flux based microservices that looks to
11139 provide extendible implementations of common aspects of a cloud so that you can
11140 focus on building massively scalable web applications.")
11141 (license license:expat)))
11142
11143 (define-public python-snowballstemmer
11144 (package
11145 (name "python-snowballstemmer")
11146 (version "1.2.1")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "snowballstemmer" version))
11150 (sha256
11151 (base32
11152 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11153 (build-system python-build-system)
11154 (arguments
11155 `(;; No tests exist
11156 #:tests? #f))
11157 (home-page "https://github.com/shibukawa/snowball_py")
11158 (synopsis "Snowball stemming library collection for Python")
11159 (description "This package provides 16 word stemmer algorithms generated
11160 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11161 English stemmer.")
11162 (license license:bsd-3)))
11163
11164 (define-public python2-snowballstemmer
11165 (package-with-python2 python-snowballstemmer))
11166
11167 (define-public python-setproctitle
11168 (package
11169 (name "python-setproctitle")
11170 (version "1.1.10")
11171 (source
11172 (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "setproctitle" version))
11175 (sha256
11176 (base32
11177 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11178 (build-system python-build-system)
11179 (arguments
11180 '(#:phases
11181 (modify-phases %standard-phases
11182 (add-before 'check 'patch-Makefile
11183 ;; Stricly this is only required for the python2 variant.
11184 ;; But adding a phase in an inherited package seems to be
11185 ;; cumbersum. So we patch even for python3.
11186 (lambda _
11187 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11188 (when nose
11189 (substitute* "Makefile"
11190 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11191 (string-append nose "/bin/nosetests "))))
11192 #t)))
11193 (replace 'check
11194 (lambda _
11195 (setenv "PYTHON" (or (which "python3") (which "python")))
11196 (setenv "PYCONFIG" (or (which "python3-config")
11197 (which "python-config")))
11198 (setenv "CC" "gcc")
11199 ;; No need to extend PYTHONPATH to find the built package, since
11200 ;; the Makefile will build anyway
11201 (invoke "make" "check"))))))
11202 (native-inputs
11203 `(("procps" ,procps))) ; required for tests
11204 (home-page
11205 "https://github.com/dvarrazzo/py-setproctitle")
11206 (synopsis
11207 "Setproctitle implementation for Python to customize the process title")
11208 (description "The library allows a process to change its title (as displayed
11209 by system tools such as ps and top).
11210
11211 Changing the title is mostly useful in multi-process systems, for
11212 example when a master process is forked: changing the children's title
11213 allows to identify the task each process is busy with. The technique
11214 is used by PostgreSQL and the OpenSSH Server for example.")
11215 (license license:bsd-3)
11216 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11217
11218 (define-public python2-setproctitle
11219 (let ((base (package-with-python2
11220 (strip-python2-variant python-setproctitle))))
11221 (package
11222 (inherit base)
11223 (native-inputs `(("python2-nose" ,python2-nose)
11224 ,@(package-native-inputs base))))))
11225
11226 (define-public python-validictory
11227 (package
11228 (name "python-validictory")
11229 (version "1.0.1")
11230 (source
11231 (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "validictory" version))
11234 (sha256
11235 (base32
11236 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11237 (build-system python-build-system)
11238 (arguments
11239 '(#:phases
11240 (modify-phases %standard-phases
11241 (add-after 'unpack 'bootstrap
11242 ;; Move the tests out of the package directory to avoid
11243 ;; packaging them.
11244 (lambda* _
11245 (rename-file "validictory/tests" "tests")
11246 (delete-file "tests/__init__.py")))
11247 (replace 'check
11248 (lambda _
11249 ;; Extend PYTHONPATH so the built package will be found.
11250 (setenv "PYTHONPATH"
11251 (string-append (getcwd) "/build/lib:"
11252 (getenv "PYTHONPATH")))
11253 (invoke "py.test" "-vv" ))))))
11254 (native-inputs
11255 `(("python-pytest" ,python-pytest)))
11256 (home-page
11257 "https://github.com/jamesturk/validictory")
11258 (synopsis "General purpose Python data validator")
11259 (description "It allows validation of arbitrary Python data structures.
11260
11261 The schema format is based on the JSON Schema
11262 proposal (http://json-schema.org), so combined with json the library is also
11263 useful as a validator for JSON data.")
11264 (license license:expat)))
11265
11266 (define-public python2-validictory
11267 (package-with-python2 python-validictory))
11268
11269 (define-public python-pyelftools
11270 (package
11271 (name "python-pyelftools")
11272 (version "0.25")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "pyelftools" version))
11277 (sha256
11278 (base32
11279 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11280 (build-system python-build-system)
11281 (arguments
11282 `(#:phases
11283 (modify-phases %standard-phases
11284 (add-before 'check 'set-pythonpath
11285 (lambda _
11286 (setenv "PYTHONPATH"
11287 (string-append
11288 (getcwd) "/test/"
11289 ":" (getenv "PYTHONPATH")))
11290 #t)))))
11291 (home-page
11292 "https://github.com/eliben/pyelftools")
11293 (synopsis
11294 "Analyze binary and library file information")
11295 (description "This Python library provides interfaces for parsing and
11296 analyzing two binary and library file formats; the Executable and Linking
11297 Format (ELF), and debugging information in the Debugging With Attributed
11298 Record Format (DWARF).")
11299 (license license:public-domain)))
11300
11301 (define-public python-pyev
11302 (package
11303 (name "python-pyev")
11304 (version "0.9.0")
11305 (source
11306 (origin
11307 (method url-fetch)
11308 (uri (pypi-uri "pyev" version))
11309 (sha256
11310 (base32
11311 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11312 (build-system python-build-system)
11313 (arguments
11314 `(#:tests? #f ; no test suite
11315 #:phases
11316 (modify-phases %standard-phases
11317 (add-after 'unpack 'patch
11318 (lambda* (#:key inputs #:allow-other-keys)
11319 (let ((libev (string-append (assoc-ref inputs "libev")
11320 "/lib/libev.so.4")))
11321 (substitute* "setup.py"
11322 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11323 (string-append "libev_dll_name = \"" libev "\"")))))))))
11324 (inputs
11325 `(("libev" ,libev)))
11326 (home-page "http://pythonhosted.org/pyev/")
11327 (synopsis "Python libev interface")
11328 (description "Pyev provides a Python interface to libev.")
11329 (license license:gpl3)))
11330
11331 (define-public python2-pyev
11332 (package-with-python2 python-pyev))
11333
11334 (define-public python-imagesize
11335 (package
11336 (name "python-imagesize")
11337 (version "1.1.0")
11338 (source
11339 (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "imagesize" version))
11342 (sha256
11343 (base32
11344 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11345 (build-system python-build-system)
11346 (home-page "https://github.com/shibukawa/imagesize_py")
11347 (synopsis "Gets image size of files in various formats in Python")
11348 (description
11349 "This package allows determination of image size from
11350 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11351 (license license:expat)))
11352
11353 (define-public python2-imagesize
11354 (package-with-python2 python-imagesize))
11355
11356 (define-public python-termstyle
11357 (package
11358 (name "python-termstyle")
11359 (version "0.1.11")
11360 (source
11361 (origin
11362 (method url-fetch)
11363 (uri (pypi-uri "termstyle" version))
11364 (sha256
11365 (base32
11366 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11367 (build-system python-build-system)
11368 (arguments
11369 '(#:phases
11370 (modify-phases %standard-phases
11371 (replace 'check
11372 (lambda _
11373 (invoke "python" "test3.py"))))))
11374 (home-page "https://github.com/gfxmonk/termstyle")
11375 (synopsis "Console text coloring for Python")
11376 (description "This package provides console text coloring for Python.")
11377 (license license:bsd-3)))
11378
11379 (define-public python-argcomplete
11380 (package
11381 (name "python-argcomplete")
11382 (version "1.7.0")
11383 (source
11384 (origin
11385 (method url-fetch)
11386 (uri (pypi-uri "argcomplete" version))
11387 (sha256
11388 (base32
11389 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11390 (build-system python-build-system)
11391 (native-inputs
11392 `(("python-pexpect" ,python-pexpect)
11393 ("tcsh" ,tcsh)
11394 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11395 (home-page "https://github.com/kislyuk/argcomplete")
11396 (synopsis "Shell tab completion for Python argparse")
11397 (description "argcomplete provides extensible command line tab completion
11398 of arguments and options for Python scripts using @code{argparse}. It's
11399 particularly useful for programs with many options or sub-parsers that can
11400 dynamically suggest completions; for example, when browsing resources over the
11401 network.")
11402 (license license:asl2.0)))
11403
11404 (define-public python2-argcomplete
11405 (package-with-python2 python-argcomplete))
11406
11407 (define-public python-xopen
11408 (package
11409 (name "python-xopen")
11410 (version "0.5.0")
11411 (source
11412 (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "xopen" version))
11415 (sha256
11416 (base32
11417 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11418 (build-system python-build-system)
11419 (propagated-inputs
11420 `(("python-setuptools-scm" ,python-setuptools-scm)))
11421 (home-page "https://github.com/marcelm/xopen/")
11422 (synopsis "Open compressed files transparently")
11423 (description "This module provides an @code{xopen} function that works like
11424 Python's built-in @code{open} function, but can also deal with compressed files.
11425 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11426 recognized by their file extensions. The focus is on being as efficient as
11427 possible on all supported Python versions.")
11428 (license license:expat)))
11429
11430 (define-public python2-xopen
11431 (let ((base (package-with-python2
11432 (strip-python2-variant python-xopen))))
11433 (package
11434 (inherit base)
11435 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11436 ,@(package-propagated-inputs base))))))
11437
11438 (define-public python-cheetah
11439 (package
11440 (name "python-cheetah")
11441 (version "3.1.0")
11442 (source
11443 (origin
11444 (method url-fetch)
11445 (uri (pypi-uri "Cheetah3" version))
11446 (sha256
11447 (base32
11448 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11449 (build-system python-build-system)
11450 (arguments
11451 `(#:modules ((guix build utils)
11452 (guix build python-build-system)
11453 (ice-9 ftw)
11454 (srfi srfi-1)
11455 (srfi srfi-26))
11456 #:phases (modify-phases %standard-phases
11457 (add-after 'unpack 'use-absolute-python
11458 (lambda _
11459 (substitute* "Cheetah/CheetahWrapper.py"
11460 (("#!/usr/bin/env python")
11461 (string-append "#!" (which "python"))))
11462 #t))
11463 (replace 'check
11464 (lambda _
11465 (let ((cwd (getcwd)))
11466 (setenv "PYTHONPATH"
11467 (string-append
11468 cwd "/build/"
11469 (find (cut string-prefix? "lib" <>)
11470 (scandir (string-append cwd "/build")))
11471 ":" (getenv "PYTHONPATH")))
11472 (setenv "PATH"
11473 (string-append (getenv "PATH")
11474 ":" cwd "/bin"))
11475 (setenv "TMPDIR" "/tmp")
11476
11477 (substitute* "Cheetah/Tests/Test.py"
11478 (("unittest.TextTestRunner\\(\\)")
11479 "unittest.TextTestRunner(verbosity=2)"))
11480
11481 (invoke "python" "Cheetah/Tests/Test.py")))))))
11482 (propagated-inputs
11483 `(("python-markdown" ,python-markdown))) ;optional
11484 (home-page "http://cheetahtemplate.org/")
11485 (synopsis "Template engine")
11486 (description "Cheetah is a text-based template engine and Python code
11487 generator.
11488
11489 Cheetah can be used as a standalone templating utility or referenced as
11490 a library from other Python applications. It has many potential uses,
11491 but web developers looking for a viable alternative to ASP, JSP, PHP and
11492 PSP are expected to be its principle user group.
11493
11494 Features:
11495 @enumerate
11496 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11497 text-based format.
11498 @item Cleanly separates content, graphic design, and program code.
11499 @item Blends the power and flexibility of Python with a simple template language
11500 that non-programmers can understand.
11501 @item Gives template writers full access to any Python data structure, module,
11502 function, object, or method in their templates.
11503 @item Makes code reuse easy by providing an object-orientated interface to
11504 templates that is accessible from Python code or other Cheetah templates.
11505 One template can subclass another and selectively reimplement sections of it.
11506 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11507 improve the performance of a dynamic website.
11508 @item Compiles templates into optimized, yet readable, Python code.
11509 @end enumerate")
11510 (license (license:x11-style "file://LICENSE"))))
11511
11512 (define-public python2-cheetah
11513 (package-with-python2 python-cheetah))
11514
11515 (define-public python-dulwich
11516 (package
11517 (name "python-dulwich")
11518 (version "0.18.6")
11519 (source
11520 (origin
11521 (method url-fetch)
11522 (uri (list (string-append "https://www.dulwich.io/releases/"
11523 "dulwich-" version ".tar.gz")
11524 (pypi-uri "dulwich" version)))
11525 (sha256
11526 (base32
11527 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11528 (build-system python-build-system)
11529 (arguments
11530 `(#:phases
11531 (modify-phases %standard-phases
11532 (add-before 'check 'fix-tests
11533 (lambda* (#:key inputs #:allow-other-keys)
11534 ;; The tests use Popen with a custom environment which doesn't
11535 ;; include PATH.
11536 (substitute* "dulwich/tests/compat/utils.py"
11537 (("'git'") (string-append "'"
11538 (which "git")
11539 "'")))
11540 (substitute* '("dulwich/tests/test_repository.py"
11541 "dulwich/tests/test_hooks.py")
11542 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11543 (setenv "TEST_RUNNER" "unittest")
11544 (setenv "PYTHONHASHSEED" "random")
11545 #t)))))
11546 (propagated-inputs
11547 `(("python-fastimport" ,python-fastimport)))
11548 (native-inputs
11549 `(("python-mock" ,python-mock)
11550 ("python-geventhttpclient" ,python-geventhttpclient)
11551 ("git" ,git)))
11552 (home-page "https://www.dulwich.io/")
11553 (synopsis "Git implementation in Python")
11554 (description "Dulwich is an implementation of the Git file formats and
11555 protocols written in pure Python.")
11556 ;; Can be used with either license.
11557 (license (list license:asl2.0 license:gpl2+))))
11558
11559 (define-public python2-dulwich
11560 (package-with-python2 python-dulwich))
11561
11562 (define-public python-pbkdf2
11563 (package
11564 (name "python-pbkdf2")
11565 (version "1.3")
11566 (source
11567 (origin
11568 (method url-fetch)
11569 (uri (pypi-uri "pbkdf2" version))
11570 (sha256
11571 (base32
11572 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11573 (build-system python-build-system)
11574 (arguments
11575 '(#:phases
11576 (modify-phases %standard-phases
11577 (replace 'check
11578 (lambda _
11579 (setenv "PYTHONPATH"
11580 (string-append (getcwd) "/build/lib:"
11581 (getenv "PYTHONPATH")))
11582 (invoke "python" "test/test_pbkdf2.py"))))))
11583 (propagated-inputs
11584 `(("python-pycrypto" ,python-pycrypto))) ; optional
11585 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11586 (synopsis "Password-based key derivation")
11587 (description "This module implements the password-based key derivation
11588 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11589
11590 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11591 is part of the RSA Public Key Cryptography Standards series. The provided
11592 implementation takes a password or a passphrase and a salt value (and
11593 optionally a iteration count, a digest module, and a MAC module) and provides
11594 a file-like object from which an arbitrarly-sized key can be read.")
11595 (license license:expat)))
11596
11597 (define-public python2-pbkdf2
11598 (package-with-python2 python-pbkdf2))
11599
11600 (define-public python-qrcode
11601 (package
11602 (name "python-qrcode")
11603 (version "6.1")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "qrcode" version))
11608 (sha256
11609 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11610 (build-system python-build-system)
11611 (arguments
11612 ;; FIXME: Tests require packaging 'pymaging'.
11613 '(#:tests? #f))
11614 (propagated-inputs
11615 `(("python-lxml" ,python-lxml) ; for SVG output
11616 ("python-pillow" ,python-pillow) ; for PNG output
11617 ("python-six" ,python-six)))
11618 (home-page "https://github.com/lincolnloop/python-qrcode")
11619 (synopsis "QR Code image generator")
11620 (description "This package provides a pure Python QR Code generator
11621 module. It uses the Python Imaging Library (PIL) to allow for the generation
11622 of QR Codes.
11623
11624 In addition this package provides a command line tool to generate QR codes and
11625 either write these QR codes to a file or do the output as ascii art at the
11626 console.")
11627 (license license:bsd-3)))
11628
11629 (define-public python2-qrcode
11630 (package-with-python2 python-qrcode))
11631
11632 (define-public python-rst2ansi
11633 (package
11634 (name "python-rst2ansi")
11635 (version "0.1.5")
11636 (source
11637 (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "rst2ansi" version))
11640 (sha256
11641 (base32
11642 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11643 (build-system python-build-system)
11644 (propagated-inputs
11645 `(("python-docutils" ,python-docutils)))
11646 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11647 (synopsis "Convert RST to ANSI-decorated console output")
11648 (description
11649 "Python module dedicated to rendering RST (reStructuredText) documents
11650 to ansi-escaped strings suitable for display in a terminal.")
11651 (license license:expat)))
11652
11653 (define-public python-ansi2html
11654 (package
11655 (name "python-ansi2html")
11656 (version "1.2.0")
11657 (source
11658 (origin
11659 (method url-fetch)
11660 (uri (pypi-uri "ansi2html" version))
11661 (sha256
11662 (base32
11663 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11664 (build-system python-build-system)
11665 (native-inputs
11666 `(("python-mock" ,python-mock)
11667 ("python-nose" ,python-nose)))
11668 (propagated-inputs
11669 `(("python-six" ,python-six)))
11670 (home-page "https://github.com/ralphbean/ansi2html")
11671 (synopsis "Convert ANSI-decorated console output to HTML")
11672 (description
11673 "@command{ansi2html} is a Python library and command line utility for
11674 convering text with ANSI color codes to HTML or LaTeX.")
11675 (license license:gpl3+)))
11676
11677 (define-public python2-ansi2html
11678 (package-with-python2 python-ansi2html))
11679
11680 (define-public python-ddt
11681 (package
11682 (name "python-ddt")
11683 (version "1.1.3")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (pypi-uri "ddt" version))
11688 (sha256
11689 (base32
11690 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11691 (build-system python-build-system)
11692 (native-inputs
11693 `(("python-mock" ,python-mock)
11694 ("python-nose" ,python-nose)))
11695 (propagated-inputs
11696 `(("python-six" ,python-six)
11697 ("python-pyyaml" ,python-pyyaml)))
11698 (home-page "https://github.com/txels/ddt")
11699 (synopsis "Data-Driven Tests")
11700 (description
11701 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11702 running it with different test data, and make it appear as multiple test
11703 cases.")
11704 (license license:expat)))
11705
11706 (define-public python2-ddt
11707 (package-with-python2 python-ddt))
11708
11709 (define-public python-pycountry
11710 (package
11711 (name "python-pycountry")
11712 (version "18.5.26")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (pypi-uri "pycountry" version))
11717 (sha256
11718 (base32
11719 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11720 (build-system python-build-system)
11721 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11722 (synopsis "ISO databases for languages, countries, currencies, etc.")
11723 (description
11724 "@code{pycountry} provides the ISO databases for the standards:
11725 @enumerate
11726 @item 639-3 (Languages)
11727 @item 3166 (Countries)
11728 @item 3166-3 (Deleted Countries)
11729 @item 3166-2 (Subdivisions of countries)
11730 @item 4217 (Currencies)
11731 @item 15924 (Scripts)
11732 @end enumerate
11733 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11734 through a Python API.")
11735 (license license:lgpl2.1+)))
11736
11737 (define-public python2-pycountry
11738 (package-with-python2 python-pycountry))
11739
11740 (define-public python-pycosat
11741 (package
11742 (name "python-pycosat")
11743 (version "0.6.1")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "pycosat" version))
11748 (sha256
11749 (base32
11750 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11751 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11752 (build-system python-build-system)
11753 (home-page "https://github.com/ContinuumIO/pycosat")
11754 (synopsis "Bindings to picosat (a SAT solver)")
11755 (description
11756 "This package provides efficient Python bindings to @code{picosat} on
11757 the C level. When importing pycosat, the @code{picosat} solver becomes part
11758 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11759 Problem} (SAT) solver.")
11760 (license license:expat)))
11761
11762 (define-public python2-pycosat
11763 (package-with-python2 python-pycosat))
11764
11765 (define-public python2-ruamel.ordereddict
11766 (package
11767 (name "python2-ruamel.ordereddict")
11768 (version "0.4.9")
11769 (source
11770 (origin
11771 (method url-fetch)
11772 (uri (pypi-uri "ruamel.ordereddict" version))
11773 (sha256
11774 (base32
11775 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11776 (build-system python-build-system)
11777 (arguments
11778 `(#:python ,python-2
11779 #:phases
11780 (modify-phases %standard-phases
11781 (delete 'check)
11782 (add-after 'install 'check
11783 (lambda* (#:key inputs outputs #:allow-other-keys)
11784 (add-installed-pythonpath inputs outputs)
11785 (invoke "python" "test/testordereddict.py"))))))
11786 (home-page "https://bitbucket.org/ruamel/ordereddict")
11787 (synopsis "Version of dict that keeps keys in insertion order")
11788 (description
11789 "This is an implementation of an ordered dictionary with @dfn{Key
11790 Insertion Order} (KIO: updates of values do not affect the position of the
11791 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11792 removed and put at the back). The standard library module @code{OrderedDict},
11793 implemented later, implements a subset of @code{ordereddict} functionality.
11794 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11795 Order} (KSO, no sorting function can be specified, but a transform can be
11796 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11797 (license license:expat)))
11798
11799 (define-public python-pypeg2
11800 (package
11801 (name "python-pypeg2")
11802 (version "2.15.2")
11803 (source
11804 (origin
11805 (method url-fetch)
11806 (uri (pypi-uri "pyPEG2" version))
11807 (sha256
11808 (base32
11809 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11810 (build-system python-build-system)
11811 (propagated-inputs `(("python-lxml" ,python-lxml)))
11812 (arguments
11813 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11814 '(#:tests? #f))
11815 (home-page "https://fdik.org/pyPEG/")
11816 (synopsis "Parsering Expression Grammars in Python")
11817 (description "PyPEG is an intrinsic parser interpreter framework for
11818 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11819 parse many formal languages.")
11820 (license license:gpl2)))
11821
11822 (define-public python-incremental
11823 (package
11824 (name "python-incremental")
11825 (version "17.5.0")
11826 (source
11827 (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "incremental" version))
11830 (sha256
11831 (base32
11832 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11833 (build-system python-build-system)
11834 (home-page "https://github.com/hawkowl/incremental")
11835 (synopsis "Library for versioning Python projects")
11836 (description "Incremental is a small library that versions your Python
11837 projects.")
11838 (license license:expat)))
11839
11840 (define-public python2-incremental
11841 (package-with-python2 python-incremental))
11842
11843 (define-public python-invoke
11844 (package
11845 (name "python-invoke")
11846 (home-page "http://www.pyinvoke.org/")
11847 (version "1.1.0")
11848 (source (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "invoke" version))
11851 (sha256
11852 (base32
11853 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11854 (build-system python-build-system)
11855 (arguments
11856 ;; XXX: Requires many dependencies that are not yet in Guix.
11857 `(#:tests? #f))
11858 (synopsis "Pythonic task execution")
11859 (description
11860 "Invoke is a Python task execution tool and library, drawing inspiration
11861 from various sources to arrive at a powerful and clean feature set. It is
11862 evolved from the Fabric project, but focuses on local and abstract concerns
11863 instead of servers and network commands.")
11864 (license license:bsd-3)))
11865
11866 (define-public python2-invoke
11867 (package-with-python2 python-invoke))
11868
11869 (define-public python-automat
11870 (package
11871 (name "python-automat")
11872 (version "0.7.0")
11873 (source (origin
11874 (method url-fetch)
11875 (uri (pypi-uri "Automat" version))
11876 (sha256
11877 (base32
11878 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11879 (build-system python-build-system)
11880 ;; We disable the tests because they require python-twisted, while
11881 ;; python-twisted depends on python-automat. Twisted is optional, but the
11882 ;; tests fail if it is not available. Also see
11883 ;; <https://github.com/glyph/automat/issues/71>.
11884 (arguments '(#:tests? #f))
11885 (native-inputs
11886 `(("python-m2r" ,python-m2r)
11887 ("python-setuptools-scm" ,python-setuptools-scm)
11888 ("python-graphviz" ,python-graphviz)))
11889 (propagated-inputs
11890 `(("python-six" ,python-six)
11891 ("python-attrs" ,python-attrs)))
11892 (home-page "https://github.com/glyph/Automat")
11893 (synopsis "Self-service finite-state machines")
11894 (description "Automat is a library for concise, idiomatic Python
11895 expression of finite-state automata (particularly deterministic finite-state
11896 transducers).")
11897 (license license:expat)))
11898
11899 (define-public python2-automat
11900 (package-with-python2 python-automat))
11901
11902 (define-public python-m2r
11903 (package
11904 (name "python-m2r")
11905 (version "0.2.1")
11906 (source (origin
11907 (method url-fetch)
11908 (uri (pypi-uri "m2r" version))
11909 (sha256
11910 (base32
11911 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11912 (build-system python-build-system)
11913 (propagated-inputs
11914 `(("python-docutils" ,python-docutils)
11915 ("python-mistune" ,python-mistune)))
11916 (native-inputs
11917 `(("python-pygments" ,python-pygments)
11918 ("python-mock" ,python-mock)))
11919 (home-page "https://github.com/miyakogi/m2r")
11920 (synopsis "Markdown to reStructuredText converter")
11921 (description "M2R converts a markdown file including reST markups to valid
11922 reST format.")
11923 (license license:expat)))
11924
11925 (define-public python2-m2r
11926 (package-with-python2 python-m2r))
11927
11928 (define-public python-constantly
11929 (package
11930 (name "python-constantly")
11931 (version "15.1.0")
11932 (source (origin
11933 (method url-fetch)
11934 (uri (pypi-uri "constantly" version))
11935 (sha256
11936 (base32
11937 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11938 (build-system python-build-system)
11939 (home-page "https://github.com/twisted/constantly")
11940 (synopsis "Symbolic constants in Python")
11941 (description "Constantly is a Python library that provides symbolic
11942 constant support. It includes collections and constants with text, numeric,
11943 and bit flag values.")
11944 (license license:expat)))
11945
11946 (define-public python2-constantly
11947 (package-with-python2 python-constantly))
11948
11949 (define-public python-attrs
11950 (package
11951 (name "python-attrs")
11952 (version "19.1.0")
11953 (source (origin
11954 (method url-fetch)
11955 (uri (pypi-uri "attrs" version))
11956 (sha256
11957 (base32
11958 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11959 (build-system python-build-system)
11960 (arguments
11961 `(#:modules ((guix build utils)
11962 (guix build python-build-system)
11963 (ice-9 ftw)
11964 (srfi srfi-1)
11965 (srfi srfi-26))
11966 #:phases (modify-phases %standard-phases
11967 (replace 'check
11968 (lambda _
11969 (let ((cwd (getcwd)))
11970 (setenv "PYTHONPATH"
11971 (string-append
11972 cwd "/build/"
11973 (find (cut string-prefix? "lib" <>)
11974 (scandir (string-append cwd "/build")))
11975 ":"
11976 (getenv "PYTHONPATH")))
11977 (invoke "python" "-m" "pytest")))))))
11978 (native-inputs
11979 `(("python-coverage" ,python-coverage)
11980 ("python-hypothesis" ,python-hypothesis)
11981 ("python-pympler" ,python-pympler)
11982 ("python-pytest" ,python-pytest)
11983 ("python-six" ,python-six)
11984 ("python-sphinx" ,python-sphinx)
11985 ("python-zope-interface" ,python-zope-interface)))
11986 (home-page "https://github.com/python-attrs/attrs/")
11987 (synopsis "Attributes without boilerplate")
11988 (description "@code{attrs} is a Python package with class decorators that
11989 ease the chores of implementing the most common attribute-related object
11990 protocols.")
11991 (license license:expat)))
11992
11993 (define-public python2-attrs
11994 (package-with-python2 python-attrs))
11995
11996 (define-public python-attrs-bootstrap
11997 (package
11998 (inherit python-attrs)
11999 (name "python-attrs-bootstrap")
12000 (native-inputs `())
12001 (arguments `(#:tests? #f))))
12002
12003 (define-public python2-attrs-bootstrap
12004 (package-with-python2 python-attrs-bootstrap))
12005
12006 (define-public python2-cliapp
12007 (package
12008 (name "python2-cliapp")
12009 (version "1.20180812.1")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (string-append
12014 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12015 version ".tar.gz"))
12016 (sha256
12017 (base32
12018 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12019 (build-system python-build-system)
12020 (arguments
12021 `(#:python ,python-2
12022 #:phases
12023 (modify-phases %standard-phases
12024 ;; check phase needs to be run before the build phase. If not,
12025 ;; coverage-test-runner looks for tests for the built source files,
12026 ;; and fails.
12027 (delete 'check)
12028 (add-before 'build 'check
12029 (lambda _
12030 ;; Disable python3 tests
12031 (substitute* "check"
12032 (("python3") "# python3"))
12033 (invoke "./check"))))))
12034 (native-inputs
12035 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12036 ("python2-pep8" ,python2-pep8)))
12037 (propagated-inputs
12038 `(("python2-pyaml" ,python2-pyaml)))
12039 (home-page "https://liw.fi/cliapp/")
12040 (synopsis "Python framework for command line programs")
12041 (description "@code{python2-cliapp} is a python framework for
12042 command line programs. It contains the typical stuff such programs
12043 need to do, such as parsing the command line for options, and
12044 iterating over input files.")
12045 (license license:gpl2+)))
12046
12047 (define-public python2-ttystatus
12048 (package
12049 (name "python2-ttystatus")
12050 (version "0.36")
12051 (source
12052 (origin
12053 (method url-fetch)
12054 (uri (string-append
12055 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12056 version ".tar.gz"))
12057 (sha256
12058 (base32
12059 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12060 (build-system python-build-system)
12061 (native-inputs
12062 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12063 ("python2-pep8" ,python2-pep8)))
12064 (arguments
12065 `(#:python ,python-2
12066 #:phases
12067 (modify-phases %standard-phases
12068 ;; check phase needs to be run before the build phase. If not,
12069 ;; coverage-test-runner looks for tests for the built source files,
12070 ;; and fails.
12071 (delete 'check)
12072 (add-before 'build 'check
12073 (lambda _ (invoke "make" "check"))))))
12074 (home-page "https://liw.fi/ttystatus/")
12075 (synopsis "Python library for showing progress reporting and
12076 status updates on terminals")
12077 (description "@code{python2-ttystatus} is a python library for
12078 showing progress reporting and status updates on terminals, for
12079 command line programs. Output is automatically adapted to the width
12080 of the terminal: truncated if it does not fit, and resized if the
12081 terminal size changes.")
12082 (license license:gpl3+)))
12083
12084 (define-public python2-tracing
12085 (package
12086 (name "python2-tracing")
12087 (version "0.10")
12088 (source
12089 (origin
12090 (method url-fetch)
12091 (uri (string-append
12092 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12093 version ".tar.gz"))
12094 (sha256
12095 (base32
12096 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12097 (build-system python-build-system)
12098 (arguments
12099 `(#:python ,python-2))
12100 (home-page "https://liw.fi/tracing/")
12101 (synopsis "Python debug logging helper")
12102 (description "@code{python2-tracing} is a python library for
12103 logging debug messages. It provides a way to turn debugging messages
12104 on and off, based on the filename they occur in. It is much faster
12105 than using @code{logging.Filter} to accomplish the same thing, which
12106 matters when code is run in production mode. The actual logging still
12107 happens using the @code{logging} library.")
12108 (license license:gpl3+)))
12109
12110 (define-public python2-larch
12111 (package
12112 (name "python2-larch")
12113 (version "1.20151025")
12114 (source
12115 (origin
12116 (method url-fetch)
12117 (uri (string-append
12118 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12119 version ".tar.gz"))
12120 (patches (search-patches
12121 "python2-larch-coverage-4.0a6-compatibility.patch"))
12122 (sha256
12123 (base32
12124 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12125 (build-system python-build-system)
12126 (arguments
12127 `(#:python ,python-2
12128 #:phases
12129 (modify-phases %standard-phases
12130 ;; check phase needs to be run before the build phase. If not,
12131 ;; coverage-test-runner looks for tests for the built source files,
12132 ;; and fails.
12133 (delete 'check)
12134 (add-before 'build 'check
12135 (lambda _ (invoke "make" "check"))))))
12136 (native-inputs
12137 `(("cmdtest" ,cmdtest)
12138 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12139 (propagated-inputs
12140 `(("python2-tracing" ,python2-tracing)))
12141 (home-page "https://liw.fi/larch/")
12142 (synopsis "Python copy-on-write B-tree library")
12143 (description "@code{python2-larch} is an implementation of
12144 particular kind of B-tree, based on research by Ohad Rodeh. See
12145 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12146 on the data structure.
12147
12148 The distinctive feature of this B-tree is that a node is never
12149 (conceptually) modified. Instead, all updates are done by
12150 copy-on-write. This makes it easy to clone a tree, and modify only the
12151 clone, while other processes access the original tree.")
12152 (license license:gpl3+)))
12153
12154 (define-public python-astroid
12155 (package
12156 (name "python-astroid")
12157 (version "2.1.0")
12158 (source
12159 (origin
12160 (method url-fetch)
12161 (uri (pypi-uri "astroid" version))
12162 (sha256
12163 (base32
12164 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12165 (build-system python-build-system)
12166 (propagated-inputs
12167 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12168 ("python-six" ,python-six)
12169 ("python-wrapt" ,python-wrapt)))
12170 (native-inputs
12171 `(("python-dateutil" ,python-dateutil)
12172 ("python-nose" ,python-nose)
12173 ("python-pytest" ,python-pytest)
12174 ("python-pytest-runner" ,python-pytest-runner)))
12175 (arguments
12176 `(#:phases
12177 (modify-phases %standard-phases
12178 (add-after 'unpack 'remove-spurious-test
12179 (lambda _
12180 ;; This can be removed after upgrading from python-3.7
12181 ;; https://github.com/PyCQA/astroid/issues/593
12182 ;; https://bugs.python.org/issue34056
12183 (delete-file "astroid/tests/unittest_modutils.py")
12184 #t))
12185 (replace 'check
12186 (lambda _
12187 (invoke "pytest" "astroid"))))))
12188 (home-page "https://github.com/PyCQA/astroid")
12189 (synopsis "Common base representation of python source code for pylint and
12190 other projects")
12191 (description "@code{python-astroid} provides a common base representation
12192 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12193
12194 It provides a compatible representation which comes from the _ast module. It
12195 rebuilds the tree generated by the builtin _ast module by recursively walking
12196 down the AST and building an extended ast. The new node classes have
12197 additional methods and attributes for different usages. They include some
12198 support for static inference and local name scopes. Furthermore, astroid
12199 builds partial trees by inspecting living objects.")
12200 (license license:lgpl2.1+)
12201 (properties `((python2-variant . ,(delay python2-astroid))))))
12202
12203 (define-public python2-astroid
12204 (let ((base (package-with-python2
12205 (strip-python2-variant python-astroid))))
12206 (package (inherit base)
12207 ;; Version 2.x removes python2 support.
12208 (version "1.6.5")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "astroid" version))
12213 (sha256
12214 (base32
12215 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12216 (arguments
12217 (substitute-keyword-arguments (package-arguments base)
12218 ((#:phases phases)
12219 `(modify-phases ,phases
12220 (add-after 'unpack 'remove-spurious-test
12221 (lambda _
12222 ;; https://github.com/PyCQA/astroid/issues/276
12223 (delete-file "astroid/tests/unittest_brain.py")
12224 #t))
12225 (replace 'check
12226 (lambda _
12227 (invoke"python" "-m" "unittest" "discover"
12228 "-p" "unittest*.py")))))))
12229 (native-inputs `())
12230 (propagated-inputs
12231 `(("python2-backports-functools-lru-cache"
12232 ,python2-backports-functools-lru-cache)
12233 ("python2-enum34" ,python2-enum34)
12234 ("python2-singledispatch" ,python2-singledispatch)
12235 ,@(package-propagated-inputs base))))))
12236
12237 (define-public python-isort
12238 (package
12239 (name "python-isort")
12240 (version "4.3.4")
12241 (source
12242 (origin
12243 (method git-fetch)
12244 (uri (git-reference
12245 ;; Tests pass only from the Github sources
12246 (url "https://github.com/timothycrosley/isort")
12247 (commit version)))
12248 (file-name (git-file-name name version))
12249 (sha256
12250 (base32
12251 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12252 (build-system python-build-system)
12253 (native-inputs
12254 `(("python-mock" ,python-mock)
12255 ("python-pytest" ,python-pytest)))
12256 (home-page "https://github.com/timothycrosley/isort")
12257 (synopsis "Python utility/library to sort python imports")
12258 (description "@code{python-isort} is a python utility/library to sort
12259 imports alphabetically, and automatically separated into sections. It
12260 provides a command line utility, a python library and plugins for various
12261 editors.")
12262 (license license:expat)
12263 (properties `((python2-variant . ,(delay python2-isort))))))
12264
12265 (define-public python2-isort
12266 (let ((base (package-with-python2
12267 (strip-python2-variant python-isort))))
12268 (package (inherit base)
12269 (native-inputs
12270 `(("python2-futures" ,python2-futures)
12271 ,@(package-native-inputs base))))))
12272
12273 (define-public python2-backports-functools-lru-cache
12274 (package
12275 (name "python2-backports-functools-lru-cache")
12276 (version "1.5")
12277 (source
12278 (origin
12279 (method url-fetch)
12280 ;; only the pypi tarballs contain the necessary metadata
12281 (uri (pypi-uri "backports.functools_lru_cache" version))
12282 (sha256
12283 (base32
12284 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12285 (build-system python-build-system)
12286 (native-inputs
12287 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12288 (arguments
12289 `(#:python ,python-2))
12290 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12291 (synopsis "Backport of functools.lru_cache from Python 3.3")
12292 (description "@code{python2-backports-functools-lru-cache} is a backport
12293 of @code{functools.lru_cache} from python 3.3.")
12294 (license license:expat)))
12295
12296 (define-public python-configparser
12297 (package
12298 (name "python-configparser")
12299 (version "3.7.1")
12300 (source
12301 (origin
12302 (method url-fetch)
12303 (uri (pypi-uri "configparser" version))
12304 (sha256
12305 (base32
12306 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12307 (build-system python-build-system)
12308 (home-page "https://github.com/jaraco/configparser/")
12309 (synopsis "Backport of configparser from python 3.5")
12310 (description "@code{python-configparser} is a backport of
12311 @code{configparser} from Python 3.5 so that it can be used directly
12312 in other versions.")
12313 (license license:expat)))
12314
12315 (define-public python2-configparser
12316 (package-with-python2 python-configparser))
12317
12318 (define-public python-mando
12319 (package
12320 (name "python-mando")
12321 (version "0.6.4")
12322 (source (origin
12323 (method url-fetch)
12324 (uri (pypi-uri "mando" version))
12325 (sha256
12326 (base32
12327 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12328 (build-system python-build-system)
12329 (propagated-inputs
12330 `(("python-rst2ansi" ,python-rst2ansi)
12331 ("python-six" ,python-six)))
12332 (native-inputs
12333 `(("python-pytest" ,python-pytest)))
12334 (home-page "https://mando.readthedocs.org/")
12335 (synopsis
12336 "Wrapper around argparse, allowing creation of complete CLI applications")
12337 (description
12338 "This package is a wrapper around argparse, allowing you to write complete CLI
12339 applications in seconds while maintaining all the flexibility.")
12340 (license license:expat)))
12341
12342 (define-public python2-mando
12343 (package-with-python2 python-mando))
12344
12345 (define-public python2-argparse
12346 (package
12347 (name "python2-argparse")
12348 (version "1.4.0")
12349 (source
12350 (origin
12351 (method url-fetch)
12352 (uri (pypi-uri "argparse" version))
12353 (sha256
12354 (base32
12355 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12356 (build-system python-build-system)
12357 (arguments
12358 `(#:python ,python-2))
12359 (home-page "https://github.com/ThomasWaldmann/argparse/")
12360 (synopsis "Python command-line parsing library")
12361 (description
12362 "This package is mostly for people who want to have @code{argparse} on
12363 older Pythons because it was not part of the standard library back then.")
12364 (license license:psfl)))
12365
12366 (define-public python-fudge
12367 (package
12368 (name "python-fudge")
12369 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12370 ;; package, which is currently the only use of this package.
12371 (version "0.9.6")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "fudge" version))
12376 (sha256
12377 (base32
12378 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12379 (build-system python-build-system)
12380 (arguments
12381 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12382 (home-page "https://github.com/fudge-py/fudge")
12383 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12384 (description
12385 "Fudge is a Python module for using fake objects (mocks and stubs) to
12386 test real ones.
12387
12388 In readable Python code, you declare the methods available on your fake object
12389 and how they should be called. Then you inject that into your application and
12390 start testing. This declarative approach means you don’t have to record and
12391 playback actions and you don’t have to inspect your fakes after running code.
12392 If the fake object was used incorrectly then you’ll see an informative
12393 exception message with a traceback that points to the culprit.")
12394 (license license:expat)))
12395
12396 (define-public python2-fudge
12397 (package-with-python2 python-fudge))
12398
12399 (define-public python-mwclient
12400 (package
12401 (name "python-mwclient")
12402 (version "0.8.4")
12403 (source
12404 (origin
12405 (method url-fetch)
12406 ;; The PyPI version wouldn't contain tests.
12407 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12408 "v" version ".tar.gz"))
12409 (file-name (string-append name "-" version ".tar.gz"))
12410 (sha256
12411 (base32
12412 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12413 (build-system python-build-system)
12414 (propagated-inputs
12415 `(("python-requests" ,python-requests)
12416 ("python-requests-oauthlib"
12417 ,python-requests-oauthlib)
12418 ("python-six" ,python-six)))
12419 (native-inputs
12420 `(("python-mock" ,python-mock)
12421 ("python-pytest" ,python-pytest)
12422 ("python-pytest-pep8" ,python-pytest-pep8)
12423 ("python-pytest-cache" ,python-pytest-cache)
12424 ("python-pytest-cov" ,python-pytest-cov)
12425 ("python-responses" ,python-responses)))
12426 (home-page "https://github.com/btongminh/mwclient")
12427 (synopsis "MediaWiki API client")
12428 (description "This package provides a MediaWiki API client.")
12429 (license license:expat)))
12430
12431 (define-public python2-mwclient
12432 (package-with-python2 python-mwclient))
12433
12434 (define-public python-utils
12435 (package
12436 (name "python-utils")
12437 (version "2.1.0")
12438 (source (origin
12439 (method url-fetch)
12440 (uri (pypi-uri "python-utils" version))
12441 (sha256
12442 (base32
12443 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12444 (build-system python-build-system)
12445 (native-inputs
12446 `(("pytest-runner" ,python-pytest-runner)
12447 ("pytest" ,python-pytest)
12448 ("six" ,python-six)))
12449 (home-page "https://github.com/WoLpH/python-utils")
12450 (synopsis "Convenient utilities not included with the standard Python install")
12451 (description
12452 "Python Utils is a collection of small Python functions and classes which
12453 make common patterns shorter and easier.")
12454 (license license:bsd-2)))
12455
12456 (define-public python2-utils
12457 (package-with-python2 python-utils))
12458
12459 (define-public python-diff-match-patch
12460 (package
12461 (name "python-diff-match-patch")
12462 (version "20121119")
12463 (source
12464 (origin
12465 (method url-fetch)
12466 (uri (pypi-uri "diff-match-patch" version))
12467 (sha256
12468 (base32
12469 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12470 (build-system python-build-system)
12471 (home-page "https://code.google.com/p/google-diff-match-patch")
12472 (synopsis "Synchronize plain text")
12473 (description "Diff Match and Patch libraries offer robust algorithms to
12474 perform the operations required for synchronizing plain text.")
12475 (license license:asl2.0)))
12476
12477 (define-public python2-diff-match-patch
12478 (package-with-python2 python-diff-match-patch))
12479
12480 (define-public python-dirsync
12481 (package
12482 (name "python-dirsync")
12483 (version "2.2.3")
12484 (source
12485 (origin
12486 (method url-fetch)
12487 (uri (pypi-uri "dirsync" version))
12488 (sha256
12489 (base32
12490 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12491 (build-system python-build-system)
12492 (propagated-inputs
12493 `(("six" ,python-six)))
12494 (home-page "https://bitbucket.org/tkhyn/dirsync")
12495 (synopsis "Advanced directory tree synchronisation tool")
12496 (description "Advanced directory tree synchronisation tool.")
12497 (license license:expat)))
12498
12499 (define-public python2-dirsync
12500 (package-with-python2 python-dirsync))
12501
12502 (define-public python-levenshtein
12503 (package
12504 (name "python-levenshtein")
12505 (version "0.12.0")
12506 (source
12507 (origin
12508 (method url-fetch)
12509 (uri (pypi-uri "python-Levenshtein" version))
12510 (sha256
12511 (base32
12512 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12513 (build-system python-build-system)
12514 (home-page "https://github.com/ztane/python-Levenshtein")
12515 (synopsis "Fast computation of Levenshtein distance and string similarity")
12516 (description
12517 "The Levenshtein Python C extension module contains functions for fast computation of
12518 @enumerate
12519 @item Levenshtein (edit) distance, and edit operations
12520 @item string similarity
12521 @item approximate median strings, and generally string averaging
12522 @item string sequence and set similarity
12523 @end enumerate
12524 It supports both normal and Unicode strings.")
12525 (license license:gpl2+)))
12526
12527 (define-public python2-levenshtein
12528 (package-with-python2 python-levenshtein))
12529
12530 (define-public python-scandir
12531 (package
12532 (name "python-scandir")
12533 (version "1.9.0")
12534 (source
12535 (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "scandir" version))
12538 (sha256
12539 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12540 (build-system python-build-system)
12541 (arguments
12542 `(#:phases (modify-phases %standard-phases
12543 (replace 'check
12544 (lambda _
12545 (invoke "python" "test/run_tests.py"))))))
12546 (home-page "https://github.com/benhoyt/scandir")
12547 (synopsis "Directory iteration function")
12548 (description
12549 "Directory iteration function like os.listdir(), except that instead of
12550 returning a list of bare filenames, it yields DirEntry objects that include
12551 file type and stat information along with the name. Using scandir() increases
12552 the speed of os.walk() by 2-20 times (depending on the platform and file
12553 system) by avoiding unnecessary calls to os.stat() in most cases.
12554
12555 This package is part of the Python standard library since version 3.5.")
12556 (license license:bsd-3)))
12557
12558 (define-public python2-scandir
12559 (package-with-python2 python-scandir))
12560
12561 (define-public python2-stemming
12562 (package
12563 (name "python2-stemming")
12564 (version "1.0.1")
12565 (source
12566 (origin
12567 (method url-fetch)
12568 (uri (pypi-uri "stemming" version))
12569 (sha256
12570 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12571 (build-system python-build-system)
12572 (arguments
12573 `(#:python ,python-2))
12574 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12575 (synopsis "Python implementations of various stemming algorithms")
12576 (description
12577 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12578 stemming algorithms for English. These implementations are straightforward and
12579 efficient, unlike some Python versions of the same algorithms available on the
12580 Web. This package is an extraction of the stemming code included in the Whoosh
12581 search engine.")
12582 (license license:public-domain)))
12583
12584 (define-public python-factory-boy
12585 (package
12586 (name "python-factory-boy")
12587 (version "2.8.1")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "factory_boy" version))
12592 (sha256
12593 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12594 (build-system python-build-system)
12595 (arguments
12596 ;; Tests are not included in the tarball.
12597 `(#:tests? #f))
12598 (propagated-inputs
12599 `(("faker" ,python-faker)))
12600 (home-page "https://github.com/benhoyt/scandir")
12601 (synopsis "Versatile test fixtures replacement")
12602 (description
12603 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12604
12605 As a fixtures replacement tool, it aims to replace static, hard to maintain
12606 fixtures with easy-to-use factories for complex object.
12607
12608 Instead of building an exhaustive test setup with every possible combination
12609 of corner cases, factory_boy allows you to use objects customized for the
12610 current test, while only declaring the test-specific fields")
12611 (license license:expat)))
12612
12613 (define-public python2-factory-boy
12614 (package-with-python2 python-factory-boy))
12615
12616 (define-public python-translate-toolkit
12617 (package
12618 (name "python-translate-toolkit")
12619 (version "2.1.0")
12620 (source
12621 (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12624 (sha256
12625 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12626 (build-system python-build-system)
12627 (native-inputs
12628 `(("python-pytest" ,python-pytest)
12629 ("python-sphinx" ,python-sphinx)))
12630 (propagated-inputs
12631 `(("python-babel" ,python-babel)
12632 ("python-beautifulsoup4" ,python-beautifulsoup4)
12633 ("python-chardet" ,python-chardet)
12634 ("python-diff-match-patch" ,python-diff-match-patch)
12635 ("python-levenshtein" ,python-levenshtein)
12636 ("python-lxml" ,python-lxml)
12637 ("python-six" ,python-six)
12638 ("python-vobject" ,python-vobject)
12639 ("python-pyyaml" ,python-pyyaml)))
12640 (arguments
12641 ;; TODO: tests are not run, because they end with
12642 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12643 ;; 'parse_funcs'
12644 ;; during test setup.
12645 `(#:tests? #f))
12646 (home-page "https://toolkit.translatehouse.org")
12647 (synopsis "Tools and API for translation and localization engineering")
12648 (description
12649 "Tools and API for translation and localization engineering. It contains
12650 several utilities, as well as an API for building localization tools.")
12651 (license license:gpl2+)))
12652
12653 (define-public python2-translate-toolkit
12654 (package-with-python2 python-translate-toolkit))
12655
12656 (define-public python-packaging
12657 (package
12658 (name "python-packaging")
12659 (version "19.0")
12660 (source
12661 (origin
12662 (method url-fetch)
12663 (uri (pypi-uri "packaging" version))
12664 (sha256
12665 (base32
12666 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12667 (build-system python-build-system)
12668 (arguments
12669 `(#:phases (modify-phases %standard-phases
12670 (replace 'check
12671 (lambda _ (invoke "py.test" "-vv"))))))
12672 (native-inputs
12673 `(("python-pretend" ,python-pretend)
12674 ("python-pytest" ,python-pytest)))
12675 (propagated-inputs
12676 `(("python-pyparsing" ,python-pyparsing)
12677 ("python-six" ,python-six)))
12678 (home-page "https://github.com/pypa/packaging")
12679 (synopsis "Core utilities for Python packages")
12680 (description "Packaging is a Python module for dealing with Python packages.
12681 It offers an interface for working with package versions, names, and dependency
12682 information.")
12683 ;; From 'LICENSE': This software is made available under the terms of
12684 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12685 ;; Contributions to this software is made under the terms of *both* these
12686 ;; licenses.
12687 (license (list license:asl2.0 license:bsd-2))))
12688
12689 (define-public python2-packaging
12690 (package-with-python2 python-packaging))
12691
12692 (define-public python-relatorio
12693 (package
12694 (name "python-relatorio")
12695 (version "0.8.0")
12696 (source
12697 (origin
12698 (method url-fetch)
12699 (uri (pypi-uri "relatorio" version))
12700 (sha256
12701 (base32
12702 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12703 (build-system python-build-system)
12704 (propagated-inputs
12705 `(("python-lxml" ,python-lxml)
12706 ("python-genshi" ,python-genshi)))
12707 (native-inputs
12708 `(("python-magic" ,python-magic)))
12709 (home-page "https://relatorio.tryton.org/")
12710 (synopsis "Templating library able to output ODT and PDF files")
12711 (description "Relatorio is a templating library which provides a way to
12712 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12713 for more filetypes can be easily added by creating plugins for them.")
12714 (license license:gpl3+)))
12715
12716 (define-public python2-relatorio
12717 (package-with-python2 python-relatorio))
12718
12719 (define-public python-radon
12720 (package
12721 (name "python-radon")
12722 (version "2.2.0")
12723 (source
12724 (origin
12725 (method url-fetch)
12726 (uri (pypi-uri "radon" version))
12727 (sha256
12728 (base32
12729 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12730 (build-system python-build-system)
12731 (arguments
12732 `(#:phases (modify-phases %standard-phases
12733 (replace 'check
12734 (lambda _
12735 (invoke "python" "radon/tests/run.py"))))))
12736 (propagated-inputs
12737 `(("python-colorama" ,python-colorama)
12738 ("python-flake8-polyfill" ,python-flake8-polyfill)
12739 ("python-mando" ,python-mando)))
12740 (native-inputs
12741 `(("python-pytest" ,python-pytest)
12742 ("python-pytest-mock" ,python-pytest-mock)))
12743 (home-page "https://radon.readthedocs.org/")
12744 (synopsis "Code Metrics in Python")
12745 (description "Radon is a Python tool which computes various code metrics.
12746 Supported metrics are:
12747 @itemize @bullet
12748 @item raw metrics: SLOC, comment lines, blank lines, &c.
12749 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12750 @item Halstead metrics (all of them)
12751 @item the Maintainability Index (a Visual Studio metric)
12752 @end itemize")
12753 (license license:expat)))
12754
12755 (define-public python2-radon
12756 (package-with-python2 python-radon))
12757
12758 (define-public python-sure
12759 (package
12760 (name "python-sure")
12761 (version "1.4.11")
12762 (source
12763 (origin
12764 (method url-fetch)
12765 (uri (pypi-uri "sure" version))
12766 (sha256
12767 (base32
12768 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12769 (build-system python-build-system)
12770 (propagated-inputs
12771 `(("python-mock" ,python-mock)
12772 ("python-six" ,python-six)))
12773 (native-inputs
12774 `(("python-nose" ,python-nose)))
12775 (home-page "https://github.com/gabrielfalcao/sure")
12776 (synopsis "Automated testing library in python for python")
12777 (description
12778 "Sure is a python library that leverages a DSL for writing assertions.
12779 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12780 (license license:gpl3+)))
12781
12782 (define-public python2-sure
12783 (package-with-python2 python-sure))
12784
12785 (define-public python2-couleur
12786 ;; This package does not seem to support python3 at all, hence,
12787 ;; only the python2 variant definition is provided.
12788 (package
12789 (name "python2-couleur")
12790 (version "0.6.2")
12791 (source
12792 (origin
12793 (method url-fetch)
12794 (uri (pypi-uri "couleur" version))
12795 (sha256
12796 (base32
12797 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12798 (build-system python-build-system)
12799 (arguments
12800 `(#:python ,python-2))
12801 (home-page "https://github.com/gabrielfalcao/couleur")
12802 (synopsis
12803 "ANSI terminal tool for python, colored shell and other handy fancy features")
12804 (description
12805 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12806 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12807 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12808 ;; https://github.com/gabrielfalcao/couleur/issues/11
12809 (license license:lgpl3+)))
12810
12811 (define-public python-misaka
12812 (package
12813 (name "python-misaka")
12814 (version "2.1.1")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "misaka" version))
12819 (sha256
12820 (base32
12821 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12822 (build-system python-build-system)
12823 (arguments
12824 `(;; Line 37 of setup.py calls self.run_command('develop')
12825 ;; in the 'check' phase. This command seems to be trying
12826 ;; to write to
12827 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12828 ;; for which it does not have the permission to write.
12829 #:tests? #f))
12830 (propagated-inputs
12831 `(("python-cffi" ,python-cffi)))
12832 (home-page "https://github.com/FSX/misaka")
12833 (synopsis "Python binding for Hoedown")
12834 (description
12835 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12836 library written in C. It features a fast HTML renderer and functionality to make custom
12837 renderers (e.g. man pages or LaTeX).")
12838 (license license:expat)))
12839
12840 (define-public python2-misaka
12841 (package-with-python2 python-misaka))
12842
12843 (define-public python2-steadymark
12844 ;; This is forced into being a python2 only variant
12845 ;; due to its dependence on couleur that has no support
12846 ;; for python3
12847 (package
12848 (name "python2-steadymark")
12849 (version "0.7.3")
12850 (source
12851 (origin
12852 (method url-fetch)
12853 (uri (pypi-uri "steadymark" version))
12854 (sha256
12855 (base32
12856 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12857 (build-system python-build-system)
12858 (native-inputs
12859 `(("python-couleur" ,python2-couleur)
12860 ("python-sure" ,python2-sure)
12861 ("python-misaka" ,python2-misaka)))
12862 (arguments
12863 `(#:python ,python-2
12864 #:phases
12865 (modify-phases %standard-phases
12866 (add-before 'build 'patch-setup-py
12867 (lambda _
12868 ;; Update requirements from dependency==version
12869 ;; to dependency>=version
12870 (substitute* "setup.py"
12871 (("==") ">="))
12872 #t)))))
12873 (home-page "https://github.com/gabrielfalcao/steadymark")
12874 (synopsis "Markdown-based test runner for python")
12875 (description
12876 "@code{Steadymark} allows documentation to be written in github-flavoured
12877 markdown. The documentation may contain snippets of code surrounded by python
12878 code blocks and @code{Steadymark} will find these snippets and run them, making
12879 sure that there are no old malfunctional examples in the documentation examples.")
12880 (license license:expat)))
12881
12882 (define-public python-jsonpointer
12883 (package
12884 (name "python-jsonpointer")
12885 (version "1.10")
12886 (source
12887 (origin
12888 (method url-fetch)
12889 (uri (pypi-uri "jsonpointer" version))
12890 (sha256
12891 (base32
12892 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12893 (build-system python-build-system)
12894 (home-page "https://github.com/stefankoegl/python-json-pointer")
12895 (synopsis "Identify specific nodes in a JSON document")
12896 (description "@code{jsonpointer} allows you to access specific nodes
12897 by path in a JSON document (see RFC 6901).")
12898 (license license:bsd-3)))
12899
12900 (define-public python2-jsonpointer
12901 (package-with-python2 python-jsonpointer))
12902
12903 (define-public python-jsonpatch
12904 (package
12905 (name "python-jsonpatch")
12906 (version "1.16")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 ;; pypi version lacks tests.js
12911 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12912 "archive/v" version ".tar.gz"))
12913 (file-name (string-append name "-" version ".tar.gz"))
12914 (sha256
12915 (base32
12916 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12917 (build-system python-build-system)
12918 (native-inputs
12919 `(("python-jsonpointer" ,python-jsonpointer)))
12920 (home-page "https://github.com/stefankoegl/python-json-patch")
12921 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12922 (description "@code{jsonpatch} is a library and program that allows
12923 applying JSON Patches according to RFC 6902.")
12924 (license license:bsd-3)))
12925
12926 (define-public python2-jsonpatch
12927 (package-with-python2 python-jsonpatch))
12928
12929 (define-public python-jsonpatch-0.4
12930 (package (inherit python-jsonpatch)
12931 (name "python-jsonpatch")
12932 (version "0.4")
12933 (source
12934 (origin
12935 (method url-fetch)
12936 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12937 "archive/v" version ".tar.gz"))
12938 (file-name (string-append name "-" version ".tar.gz"))
12939 (sha256
12940 (base32
12941 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12942
12943 (define-public python2-jsonpatch-0.4
12944 (package-with-python2 python-jsonpatch-0.4))
12945
12946 (define-public python-rfc3986
12947 (package
12948 (name "python-rfc3986")
12949 (version "1.1.0")
12950 (source (origin
12951 (method url-fetch)
12952 (uri (pypi-uri "rfc3986" version))
12953 (sha256
12954 (base32
12955 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12956 (build-system python-build-system)
12957 (arguments
12958 `(#:modules ((guix build utils)
12959 (guix build python-build-system)
12960 (ice-9 ftw)
12961 (srfi srfi-1)
12962 (srfi srfi-26))
12963 #:phases
12964 (modify-phases %standard-phases
12965 (replace 'check
12966 (lambda _
12967 (let ((cwd (getcwd)))
12968 (setenv "PYTHONPATH"
12969 (string-append cwd "/build/"
12970 (find (cut string-prefix? "lib" <>)
12971 (scandir (string-append cwd "/build")))
12972 ":"
12973 (getenv "PYTHONPATH")))
12974 (invoke "pytest" "-v")))))))
12975 (native-inputs
12976 `(("python-pytest" ,python-pytest)))
12977 (home-page "https://rfc3986.readthedocs.io/")
12978 (synopsis "Parse and validate URI references")
12979 (description
12980 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12981 validation and authority parsing. This module also supports RFC@tie{}6874
12982 which adds support for zone identifiers to IPv6 addresses.")
12983 (license license:asl2.0)))
12984
12985 (define-public python2-rfc3986
12986 (package-with-python2 python-rfc3986))
12987
12988 (define-public python-rfc3987
12989 (package
12990 (name "python-rfc3987")
12991 (version "1.3.7")
12992 (source
12993 (origin
12994 (method url-fetch)
12995 (uri (pypi-uri "rfc3987" version))
12996 (sha256
12997 (base32
12998 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12999 (build-system python-build-system)
13000 (home-page "https://pypi.python.org/pypi/rfc3987")
13001 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13002 (description "@code{rfc3987} provides routines for parsing and
13003 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13004 (license license:gpl3+)))
13005
13006 (define-public python2-rfc3987
13007 (package-with-python2 python-rfc3987))
13008
13009 (define-public python-validate-email
13010 (package
13011 (name "python-validate-email")
13012 (version "1.3")
13013 (source
13014 (origin
13015 (method url-fetch)
13016 (uri (pypi-uri "validate_email" version))
13017 (sha256
13018 (base32
13019 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13020 (build-system python-build-system)
13021 (home-page "https://github.com/syrusakbary/validate_email")
13022 (synopsis "Verifies if an email address is valid and really exists")
13023 (description "@code{validate_email} can be used to verify if an email
13024 address is valid and really exists.")
13025 (license license:lgpl3+)))
13026
13027 (define-public python2-validate-email
13028 (package-with-python2 python-validate-email))
13029
13030 (define-public python-flex
13031 (package
13032 (name "python-flex")
13033 (version "6.10.0")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "flex" version))
13038 (sha256
13039 (base32
13040 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13041 (build-system python-build-system)
13042 (propagated-inputs
13043 `(("python-click" ,python-click)
13044 ("python-iso8601" ,python-iso8601)
13045 ("python-jsonpointer" ,python-jsonpointer)
13046 ("python-pyyaml" ,python-pyyaml)
13047 ("python-requests" ,python-requests)
13048 ("python-rfc3987" ,python-rfc3987)
13049 ("python-six" ,python-six)
13050 ("python-validate-email" ,python-validate-email)))
13051 (home-page "https://github.com/pipermerriam/flex")
13052 (synopsis "Validates Swagger schemata")
13053 (description "@code{flex} can be used to validate Swagger schemata.")
13054 (license license:bsd-3)))
13055
13056 (define-public python2-flex
13057 (package-with-python2 python-flex))
13058
13059 (define-public python-marshmallow
13060 (package
13061 (name "python-marshmallow")
13062 (version "3.0.0b14")
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (pypi-uri "marshmallow" version))
13067 (sha256
13068 (base32
13069 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13070 (build-system python-build-system)
13071 (propagated-inputs
13072 `(("python-dateutil" ,python-dateutil)
13073 ("python-simplejson" ,python-simplejson)))
13074 (native-inputs
13075 `(("python-pytest" ,python-pytest)
13076 ("python-pytz" ,python-pytz)))
13077 (home-page "https://github.com/marshmallow-code/marshmallow")
13078 (synopsis "Convert complex datatypes to and from native
13079 Python datatypes.")
13080 (description "@code{marshmallow} provides a library for converting
13081 complex datatypes to and from native Python datatypes.")
13082 (license license:expat)))
13083
13084 (define-public python2-marshmallow
13085 (package-with-python2 python-marshmallow))
13086
13087 (define-public python-apispec
13088 (package
13089 (name "python-apispec")
13090 (version "0.25.3")
13091 (source
13092 (origin
13093 (method url-fetch)
13094 (uri (pypi-uri "apispec" version))
13095 (sha256
13096 (base32
13097 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13098 (build-system python-build-system)
13099 (propagated-inputs
13100 `(("python-pyyaml" ,python-pyyaml)))
13101 (native-inputs
13102 `(("python-pytest" ,python-pytest)
13103 ("python-flask" ,python-flask)
13104 ("python-marshmallow" ,python-marshmallow)
13105 ("python-tornado" ,python-tornado)
13106 ("python-bottle" ,python-bottle)
13107 ("python-mock" ,python-mock)))
13108 (home-page "https://github.com/marshmallow-code/apispec")
13109 (synopsis "Swagger 2.0 API specification generator")
13110 (description "@code{python-apispec} is a pluggable API specification
13111 generator. Currently supports the OpenAPI specification (f.k.a.
13112 Swagger 2.0).")
13113 (license license:expat)))
13114
13115 (define-public python2-apispec
13116 (package-with-python2 python-apispec))
13117
13118 (define-public python-flasgger
13119 (package
13120 (name "python-flasgger")
13121 (version "0.6.3")
13122 (source
13123 (origin
13124 (method git-fetch)
13125 (uri (git-reference
13126 (url "https://github.com/rochacbruno/flasgger.git")
13127 (commit version)))
13128 (file-name (git-file-name name version))
13129 (sha256
13130 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:phases
13134 (modify-phases %standard-phases
13135 (replace 'check
13136 (lambda* (#:key inputs outputs #:allow-other-keys)
13137 (substitute* "Makefile"
13138 (("flake8 flasgger --ignore=F403")
13139 "flake8 flasgger --ignore=E731,F403"))
13140 (setenv "PYTHONPATH" (string-append (getcwd)
13141 ":"
13142 (getenv "PYTHONPATH")))
13143 (invoke "py.test"))))))
13144 (propagated-inputs
13145 `(("python-flask" ,python-flask)
13146 ("python-pyyaml" ,python-pyyaml)
13147 ("python-jsonschema" ,python-jsonschema)
13148 ("python-mistune" ,python-mistune)
13149 ("python-six" ,python-six)))
13150 (native-inputs
13151 `(("python-decorator" ,python-decorator)
13152 ("python-flake8" ,python-flake8)
13153 ("python-flask-restful" ,python-flask-restful)
13154 ("python-flex" ,python-flex)
13155 ("python-pytest" ,python-pytest)
13156 ("python-pytest-cov" ,python-pytest-cov)
13157 ("python-marshmallow" ,python-marshmallow)
13158 ("python-apispec" ,python-apispec)))
13159 (home-page "https://github.com/rochacbruno/flasgger/")
13160 (synopsis "Extract Swagger specs from your Flask project")
13161 (description "@code{python-flasgger} allows extracting Swagger specs
13162 from your Flask project. It is a fork of Flask-Swagger.")
13163 (license license:expat)))
13164
13165 (define-public python2-flasgger
13166 (package-with-python2 python-flasgger))
13167
13168 (define-public python-swagger-spec-validator
13169 (package
13170 (name "python-swagger-spec-validator")
13171 (version "2.4.3")
13172 (source
13173 (origin
13174 (method url-fetch)
13175 (uri (pypi-uri "swagger-spec-validator" version))
13176 (sha256
13177 (base32
13178 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13179 (build-system python-build-system)
13180 (propagated-inputs
13181 `(("python-jsonschema" ,python-jsonschema)
13182 ("python-pyyaml" ,python-pyyaml)
13183 ("python-six" ,python-six)))
13184 (home-page
13185 "https://github.com/Yelp/swagger_spec_validator")
13186 (synopsis "Validation of Swagger specifications")
13187 (description "@code{swagger_spec_validator} provides a library for
13188 validating Swagger API specifications.")
13189 (license license:asl2.0)))
13190
13191 (define-public python2-swagger-spec-validator
13192 (package-with-python2 python-swagger-spec-validator))
13193
13194 (define-public python-apache-libcloud
13195 (package
13196 (name "python-apache-libcloud")
13197 (version "2.4.0")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "apache-libcloud" version))
13202 (sha256
13203 (base32
13204 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13205 (build-system python-build-system)
13206 (arguments
13207 `(#:phases
13208 (modify-phases %standard-phases
13209 (add-after 'unpack 'patch-ssh
13210 (lambda* (#:key inputs #:allow-other-keys)
13211 (substitute* "libcloud/compute/ssh.py"
13212 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13213 "/bin/ssh" "'")))
13214 #t))
13215 (add-after 'unpack 'patch-tests
13216 (lambda _
13217 (substitute* "./libcloud/test/test_file_fixtures.py"
13218 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13219 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13220 return (httplib.OK,
13221 \"1234abcd\",
13222 {\"test\": \"value\"},
13223 httplib.responses[httplib.OK])
13224 def _ascii"))
13225 (substitute* "libcloud/test/compute/test_ssh_client.py"
13226 (("class ShellOutSSHClientTests")
13227 "@unittest.skip(\"Guix container doesn't have ssh service\")
13228 class ShellOutSSHClientTests")
13229 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13230 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13231 (("'.xF0', '.x90', '.x8D', '.x88'")
13232 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13233 #t))
13234 (add-before 'check 'copy-secret
13235 (lambda _
13236 (copy-file "libcloud/test/secrets.py-dist"
13237 "libcloud/test/secrets.py")
13238 #t)))))
13239 (inputs
13240 `(("openssh" ,openssh)))
13241 (propagated-inputs
13242 `(("python-paramiko" ,python-paramiko)
13243 ("python-requests" ,python-requests)))
13244 (native-inputs
13245 `(("python-lockfile" ,python-lockfile)
13246 ("python-mock" ,python-mock)
13247 ("python-pytest" ,python-pytest)
13248 ("python-pytest-runner" ,python-pytest-runner)
13249 ("python-requests-mock" ,python-requests-mock)))
13250 (home-page "https://libcloud.apache.org/")
13251 (synopsis "Unified Cloud API")
13252 (description "@code{libcloud} is a Python library for interacting with
13253 many of the popular cloud service providers using a unified API.")
13254 (license license:asl2.0)))
13255
13256 (define-public python2-apache-libcloud
13257 (package-with-python2 python-apache-libcloud))
13258
13259 (define-public python-smmap2
13260 (package
13261 (name "python-smmap2")
13262 (version "2.0.3")
13263 (source
13264 (origin
13265 (method url-fetch)
13266 (uri (pypi-uri "smmap2" version))
13267 (sha256
13268 (base32
13269 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13270 (build-system python-build-system)
13271 (native-inputs
13272 `(("python-nosexcover" ,python-nosexcover)))
13273 (home-page "https://github.com/Byron/smmap")
13274 (synopsis "Python sliding window memory map manager")
13275 (description "@code{smmap2} is a pure Python implementation of a sliding
13276 window memory map manager.")
13277 (license license:bsd-3)))
13278
13279 (define-public python2-smmap2
13280 (package-with-python2 python-smmap2))
13281
13282 (define-public python-regex
13283 (package
13284 (name "python-regex")
13285 (version "2019.04.14")
13286 (source (origin
13287 (method url-fetch)
13288 (uri (pypi-uri "regex" version))
13289 (sha256
13290 (base32
13291 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13292 ;; TODO: Fix and enable regex_test.py tests that complain about the
13293 ;; test.support module not existing.
13294 (build-system python-build-system)
13295 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13296 (synopsis "Alternative regular expression module")
13297 (description "This regular expression implementation is backwards-
13298 compatible with the standard @code{re} module, but offers additional
13299 functionality like full case-folding for case-insensitive matches in Unicode.")
13300 (license license:psfl)))
13301
13302 (define-public python2-regex
13303 (package-with-python2 python-regex))
13304
13305 (define-public python2-pyopengl
13306 (package
13307 (name "python2-pyopengl")
13308 (version "3.1.0")
13309 (source
13310 (origin
13311 (method url-fetch)
13312 (uri (pypi-uri "PyOpenGL" version))
13313 (sha256
13314 (base32
13315 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13316 (arguments
13317 `(#:python ,python-2))
13318 (build-system python-build-system)
13319 (home-page "http://pyopengl.sourceforge.net")
13320 (synopsis "Standard OpenGL bindings for Python")
13321 (description
13322 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13323 related APIs. The binding is created using the standard @code{ctypes}
13324 library.")
13325 (license license:bsd-3)))
13326
13327 (define-public python2-pyopengl-accelerate
13328 (package
13329 (inherit python2-pyopengl)
13330 (name "python2-pyopengl-accelerate")
13331 (version "3.1.0")
13332 (source
13333 (origin
13334 (method url-fetch)
13335 (uri (pypi-uri "PyOpenGL-accelerate" version))
13336 (sha256
13337 (base32
13338 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13339 (synopsis "Acceleration code for PyOpenGL")
13340 (description
13341 "This is the Cython-coded accelerator module for PyOpenGL.")))
13342
13343 (define-public python-rencode
13344 (package
13345 (name "python-rencode")
13346 (version "1.0.5")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "rencode" version))
13351 (sha256
13352 (base32
13353 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13354 (build-system python-build-system)
13355 (arguments
13356 `(#:phases
13357 (modify-phases %standard-phases
13358 (add-before 'check 'delete-bogus-test
13359 ;; This test requires /home/aresch/Downloads, which is not provided by
13360 ;; the build environment.
13361 (lambda _
13362 (delete-file "rencode/t.py")
13363 #t)))))
13364 (native-inputs `(("pkg-config" ,pkg-config)
13365 ("python-cython" ,python-cython)))
13366 (home-page "https://github.com/aresch/rencode")
13367 (synopsis "Serialization of heterogeneous data structures")
13368 (description
13369 "The @code{rencode} module is a data structure serialization library,
13370 similar to @code{bencode} from the BitTorrent project. For complex,
13371 heterogeneous data structures with many small elements, r-encoding stake up
13372 significantly less space than b-encodings. This version of rencode is a
13373 complete rewrite in Cython to attempt to increase the performance over the
13374 pure Python module.")
13375 (license license:bsd-3)))
13376
13377 (define-public python2-rencode
13378 (package-with-python2 python-rencode))
13379
13380 (define-public python-xenon
13381 (package
13382 (name "python-xenon")
13383 (version "0.5.4")
13384 (source
13385 (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "xenon" version))
13388 (sha256
13389 (base32
13390 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13391 (build-system python-build-system)
13392 (native-inputs
13393 `(("python-pyyaml" ,python-pyyaml)
13394 ("python-radon" ,python-radon)
13395 ("python-requests" ,python-requests)
13396 ("python-flake8" ,python-flake8)
13397 ("python-tox" ,python-tox)))
13398 (arguments
13399 `(#:phases
13400 (modify-phases %standard-phases
13401 (add-before 'build 'patch-test-requirements
13402 (lambda _
13403 ;; Remove httpretty dependency for tests.
13404 (substitute* "setup.py"
13405 (("httpretty") ""))
13406 #t)))))
13407 (home-page "https://xenon.readthedocs.org/")
13408 (synopsis "Monitor code metrics for Python on your CI server")
13409 (description
13410 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13411 Ideally, @code{xenon} is run every time code is committed. Through command
13412 line options, various thresholds can be set for the complexity of code. It
13413 will fail (i.e. it will exit with a non-zero exit code) when any of these
13414 requirements is not met.")
13415 (license license:expat)))
13416
13417 (define-public python2-xenon
13418 (package-with-python2 python-xenon))
13419
13420 (define-public python-pysocks
13421 (package
13422 (name "python-pysocks")
13423 (version "1.7.0")
13424 (source
13425 (origin
13426 (method url-fetch)
13427 (uri (pypi-uri "PySocks" version))
13428 (sha256
13429 (base32
13430 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13431 (build-system python-build-system)
13432 (arguments `(#:tests? #f))
13433 (home-page "https://github.com/Anorov/PySocks")
13434 (synopsis "SOCKS client module")
13435 (description "@code{pysocks} is an updated and semi-actively maintained
13436 version of @code{SocksiPy} with bug fixes and extra features.")
13437 (license license:bsd-3)))
13438
13439 (define-public python2-pysocks
13440 (package-with-python2 python-pysocks))
13441
13442 (define-public python-pydiff
13443 (package
13444 (name "python-pydiff")
13445 (version "0.2")
13446 (source
13447 (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "pydiff" version))
13450 (sha256
13451 (base32
13452 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13453 (build-system python-build-system)
13454 (home-page "https://github.com/myint/pydiff")
13455 (synopsis "Library to diff two Python files at the bytecode level")
13456 (description
13457 "@code{pydiff} makes it easy to look for actual code changes while
13458 ignoring formatting changes.")
13459 (license license:expat)))
13460
13461 (define-public python2-pydiff
13462 (package-with-python2 python-pydiff))
13463
13464 (define-public python-tqdm
13465 (package
13466 (name "python-tqdm")
13467 (version "4.19.6")
13468 (source
13469 (origin
13470 (method url-fetch)
13471 (uri (pypi-uri "tqdm" version))
13472 (sha256
13473 (base32
13474 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13475 (build-system python-build-system)
13476 (native-inputs
13477 `(("python-flake8" ,python-flake8)
13478 ("python-nose" ,python-nose)
13479 ("python-coverage" ,python-coverage)))
13480 (home-page "https://github.com/tqdm/tqdm")
13481 (synopsis "Fast, extensible progress meter")
13482 (description
13483 "Make loops show a progress bar on the console by just wrapping any
13484 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13485 design and layout.")
13486 (license (list license:mpl2.0 license:expat))))
13487
13488 (define-public python2-tqdm
13489 (package-with-python2 python-tqdm))
13490
13491 (define-public python-pkginfo
13492 (package
13493 (name "python-pkginfo")
13494 (version "1.4.2")
13495 (source
13496 (origin
13497 (method url-fetch)
13498 (uri (pypi-uri "pkginfo" version))
13499 (sha256
13500 (base32
13501 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13502 (build-system python-build-system)
13503 (arguments
13504 ;; The tests are broken upstream.
13505 '(#:tests? #f))
13506 (home-page
13507 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13508 (synopsis
13509 "Query metadatdata from sdists, bdists, and installed packages")
13510 (description
13511 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13512 source distriubtion (an sdist) or a binary distribution (e.g., created by
13513 running bdist_egg). It can also query the EGG-INFO directory of an installed
13514 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13515 created by running @code{python setup.py develop}).")
13516 (license license:expat)))
13517
13518 (define-public python2-pkginfo
13519 (package-with-python2 python-pkginfo))
13520
13521 (define-public python-twine
13522 (package
13523 (name "python-twine")
13524 (version "1.9.1")
13525 (source
13526 (origin
13527 (method url-fetch)
13528 (uri (pypi-uri "twine" version))
13529 (sha256
13530 (base32
13531 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13532 (build-system python-build-system)
13533 (propagated-inputs
13534 `(("python-tqdm" ,python-tqdm)
13535 ("python-pkginfo" ,python-pkginfo)
13536 ("python-requests" ,python-requests)
13537 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13538 (home-page "https://github.com/pypa/twine")
13539 (synopsis "Collection of utilities for interacting with PyPI")
13540 (description
13541 "@code{twine} currently supports registering projects and uploading
13542 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13543 their files and supports any packaging format (including wheels).")
13544 (license license:asl2.0)))
13545
13546 (define-public python2-twine
13547 (package-with-python2 python-twine))
13548
13549 (define-public python-linecache2
13550 (package
13551 (name "python-linecache2")
13552 (version "1.0.0")
13553 (source
13554 (origin
13555 (method url-fetch)
13556 (uri (pypi-uri "linecache2" version))
13557 (sha256
13558 (base32
13559 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13560 (build-system python-build-system)
13561 (arguments
13562 `(;; The tests depend on unittest2, and our version is a bit too old.
13563 #:tests? #f))
13564 (native-inputs
13565 `(("python-pbr" ,python-pbr-minimal)))
13566 (home-page
13567 "https://github.com/testing-cabal/linecache2")
13568 (synopsis "Backports of the linecache module")
13569 (description
13570 "The linecache module allows one to get any line from any file, while
13571 attempting to optimize internally, using a cache, the common case where many
13572 lines are read from a single file.")
13573 (license license:psfl)))
13574
13575 (define-public python2-linecache2
13576 (package-with-python2 python-linecache2))
13577
13578 (define-public python-traceback2
13579 (package
13580 (name "python-traceback2")
13581 (version "1.4.0")
13582 (source
13583 (origin
13584 (method url-fetch)
13585 (uri (pypi-uri "traceback2" version))
13586 (sha256
13587 (base32
13588 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13589 (build-system python-build-system)
13590 (arguments
13591 `(;; python-traceback2 and python-unittest2 depend on one another.
13592 #:tests? #f))
13593 (native-inputs
13594 `(("python-pbr" ,python-pbr-minimal)))
13595 (propagated-inputs
13596 `(("python-linecache2" ,python-linecache2)))
13597 (home-page
13598 "https://github.com/testing-cabal/traceback2")
13599 (synopsis "Backports of the traceback module")
13600 (description
13601 "This module provides a standard interface to extract, format and print
13602 stack traces of Python programs. It exactly mimics the behavior of the Python
13603 interpreter when it prints a stack trace.")
13604 (license license:psfl)))
13605
13606 (define-public python2-traceback2
13607 (package-with-python2 python-traceback2))
13608
13609 (define-public python-ratelimiter
13610 (package
13611 (name "python-ratelimiter")
13612 (version "1.2.0")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "ratelimiter" version))
13617 (sha256
13618 (base32
13619 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13620 (build-system python-build-system)
13621 (arguments
13622 '(#:tests? #f)) ; There are no tests in the pypi archive.
13623 (home-page "https://github.com/RazerM/ratelimiter")
13624 (synopsis "Simple rate limiting object")
13625 (description
13626 "The @code{ratelimiter} module ensures that an operation will not be
13627 executed more than a given number of times during a given period.")
13628 (license license:asl2.0)))
13629
13630 (define-public python2-ratelimiter
13631 (package-with-python2 python-ratelimiter))
13632
13633 (define-public python-dukpy
13634 (package
13635 (name "python-dukpy")
13636 (version "0.3")
13637 (source
13638 (origin
13639 (method git-fetch)
13640 (uri (git-reference
13641 (url "https://github.com/kovidgoyal/dukpy.git")
13642 (commit (string-append "v" version))))
13643 (file-name (git-file-name name version))
13644 (sha256
13645 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13646 (build-system python-build-system)
13647 (home-page "https://github.com/kovidgoyal/dukpy")
13648 (synopsis "Run JavaScript in python")
13649 (description
13650 "dukpy is a JavaScript runtime environment for Python using the duktape
13651 embeddable JavaScript engine.")
13652 ;; Dukpy is licensed under MIT like the embedded duktape library,
13653 ;; with 'errors.c' as GPL3.
13654 (license (list license:expat license:gpl3))))
13655
13656 (define-public python2-dukpy
13657 (package-with-python2 python-dukpy))
13658
13659 (define-public python-jsonrpclib-pelix
13660 (package
13661 (name "python-jsonrpclib-pelix")
13662 (version "0.3.2")
13663 (source
13664 (origin
13665 (method url-fetch)
13666 (uri (pypi-uri "jsonrpclib-pelix" version))
13667 (sha256
13668 (base32
13669 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13670 (build-system python-build-system)
13671 (arguments
13672 `(#:tests? #f)) ; no tests in PyPI tarball
13673 (home-page "https://github.com/tcalmant/jsonrpclib/")
13674 (synopsis "JSON-RPC 2.0 client library for Python")
13675 (description
13676 "This library implements the JSON-RPC v2.0
13677 specification (backwards-compatible) as a client library for Python. This
13678 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13679 services.")
13680 (license license:asl2.0)))
13681
13682 (define-public python2-jsonrpclib-pelix
13683 (package-with-python2 python-jsonrpclib-pelix))
13684
13685 (define-public python-setuptools-scm-git-archive
13686 (package
13687 (name "python-setuptools-scm-git-archive")
13688 (version "1.0")
13689 (source
13690 (origin
13691 (method url-fetch)
13692 (uri (pypi-uri "setuptools_scm_git_archive" version))
13693 (sha256
13694 (base32
13695 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13696 (build-system python-build-system)
13697 (native-inputs
13698 `(("python-pytest" ,python-pytest)))
13699 (propagated-inputs
13700 `(("python-setuptools-scm" ,python-setuptools-scm)))
13701 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13702 (synopsis "Setuptools_scm plugin for git archives")
13703 (description
13704 "The setuptools_scm_git_archive package is a plugin to
13705 setuptools_scm, which supports obtaining versions from git archives that
13706 belong to tagged versions.")
13707 (license license:expat)))
13708
13709 (define-public python2-setuptools-scm-git-archive
13710 (package-with-python2 python-setuptools-scm-git-archive))
13711
13712 (define-public python-setuptools-git
13713 (package
13714 (name "python-setuptools-git")
13715 (version "1.2")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "setuptools-git" version))
13720 (sha256
13721 (base32
13722 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13723 (build-system python-build-system)
13724 (arguments
13725 `(#:phases
13726 (modify-phases %standard-phases
13727 ;; This is needed for tests.
13728 (add-after 'unpack 'configure-git
13729 (lambda _
13730 (setenv "HOME" "/tmp")
13731 (invoke "git" "config" "--global" "user.email" "guix")
13732 (invoke "git" "config" "--global" "user.name" "guix")
13733 #t)))))
13734 (native-inputs
13735 `(("git" ,git-minimal)))
13736 (home-page "https://github.com/msabramo/setuptools-git")
13737 (synopsis "Setuptools revision control system plugin for Git")
13738 (description
13739 "This package provides a plugin for Setuptools for revision control with
13740 Git.")
13741 (license license:bsd-3)))
13742
13743 (define-public python-pyclipper
13744 (package
13745 (name "python-pyclipper")
13746 (version "1.1.0.post1")
13747 (source
13748 (origin
13749 (method url-fetch)
13750 (uri (pypi-uri "pyclipper" version ".zip"))
13751 (sha256
13752 (base32
13753 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13754 (modules '((guix build utils)))
13755 (snippet
13756 '(begin
13757 ;; This file is generated by Cython.
13758 (delete-file "pyclipper/pyclipper.cpp") #t))))
13759 (build-system python-build-system)
13760 (arguments
13761 `(#:phases
13762 (modify-phases %standard-phases
13763 (add-before 'build 'cythonize-sources
13764 (lambda _
13765 (with-directory-excursion "pyclipper"
13766 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13767 (propagated-inputs
13768 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13769 (native-inputs
13770 `(("python-cython" ,python-cython)
13771 ("python-pytest" ,python-pytest)
13772 ("python-pytest-runner" ,python-pytest-runner)
13773 ("python-unittest2" ,python-unittest2)
13774 ("unzip" ,unzip)))
13775 (home-page "https://github.com/greginvm/pyclipper")
13776 (synopsis "Wrapper for Angus Johnson's Clipper library")
13777 (description
13778 "Pyclipper is a Cython wrapper for the C++ translation of the
13779 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13780 (license license:expat)))
13781
13782 (define-public python2-pyclipper
13783 (package-with-python2 python-pyclipper))
13784
13785 (define-public python2-booleanoperations
13786 (package
13787 (name "python2-booleanoperations")
13788 (version "0.7.1")
13789 (source
13790 (origin
13791 (method url-fetch)
13792 (uri (pypi-uri "booleanOperations" version ".zip"))
13793 (sha256
13794 (base32
13795 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13796 (build-system python-build-system)
13797 (arguments
13798 `(#:python ,python-2))
13799 (native-inputs
13800 `(("unzip" ,unzip)
13801 ("python2-pytest" ,python2-pytest)
13802 ("python2-pytest-runner" ,python2-pytest-runner)))
13803 (propagated-inputs
13804 `(("python-fonttools" ,python2-fonttools)
13805 ("python-pyclipper" ,python2-pyclipper)
13806 ("python-ufolib" ,python2-ufolib)))
13807 (home-page "https://github.com/typemytype/booleanOperations")
13808 (synopsis "Boolean operations on paths")
13809 (description
13810 "BooleanOperations provides a Python library that enables
13811 boolean operations on paths.")
13812 (license license:expat)))
13813
13814 (define-public python-tempdir
13815 (package
13816 (name "python-tempdir")
13817 (version "0.7.1")
13818 (source
13819 (origin
13820 (method url-fetch)
13821 (uri (pypi-uri "tempdir" version))
13822 (sha256
13823 (base32
13824 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13825 (build-system python-build-system)
13826 (home-page "https://pypi.org/project/tempdir/")
13827 (arguments
13828 ;; the package has no tests
13829 '(#:tests? #f))
13830 (synopsis "Python library for managing temporary directories")
13831 (description
13832 "This library manages temporary directories that are automatically
13833 deleted with all their contents when they are no longer needed. It is
13834 particularly convenient for use in tests.")
13835 (license license:expat)))
13836
13837 (define-public python2-tempdir
13838 (package-with-python2 python-tempdir))
13839
13840 (define-public python-activepapers
13841 (package
13842 (name "python-activepapers")
13843 (version "0.2.2")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (pypi-uri "ActivePapers.Py" version))
13848 (sha256
13849 (base32
13850 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13851 (build-system python-build-system)
13852 (arguments
13853 `(#:modules ((ice-9 ftw)
13854 (srfi srfi-1)
13855 (guix build utils)
13856 (guix build python-build-system))
13857
13858 #:phases
13859 (modify-phases %standard-phases
13860 (add-after 'unpack 'delete-python2-code
13861 (lambda _
13862 (for-each delete-file
13863 '("lib/activepapers/builtins2.py"
13864 "lib/activepapers/standardlib2.py"
13865 "lib/activepapers/utility2.py"))))
13866 (replace 'check
13867 (lambda _
13868 ;; Deactivate the test cases that download files
13869 (setenv "NO_NETWORK_ACCESS" "1")
13870 ;; For some strange reason, some tests fail if nosetests runs all
13871 ;; test modules in a single execution. They pass if each test
13872 ;; module is run individually.
13873 (for-each (lambda (filename)
13874 (invoke "nosetests"
13875 (string-append "tests/" filename)))
13876 (scandir "tests"
13877 (lambda (filename)
13878 (string-suffix? ".py" filename)))))))))
13879 (native-inputs
13880 `(("python-tempdir" ,python-tempdir)
13881 ("python-nose" ,python-nose)))
13882 (propagated-inputs
13883 `(("python-h5py" ,python-h5py)))
13884 (home-page "http://www.activepapers.org/")
13885 (synopsis "Executable papers for scientific computing")
13886 (description
13887 "ActivePapers is a tool for working with executable papers, which
13888 combine data, code, and documentation in single-file packages,
13889 suitable for publication as supplementary material or on repositories
13890 such as figshare or Zenodo.")
13891 (properties `((python2-variant . ,(delay python2-activepapers))))
13892 (license license:bsd-3)))
13893
13894 (define-public python2-activepapers
13895 (let ((base (package-with-python2
13896 (strip-python2-variant python-activepapers))))
13897 (package
13898 (inherit base)
13899 (arguments
13900 (substitute-keyword-arguments (package-arguments base)
13901 ((#:phases phases)
13902 `(modify-phases ,phases
13903 (delete 'delete-python2-code)
13904 (add-after 'unpack 'delete-python3-code
13905 (lambda _
13906 (for-each delete-file
13907 '("lib/activepapers/builtins3.py"
13908 "lib/activepapers/standardlib3.py"
13909 "lib/activepapers/utility3.py")))))))))))
13910
13911 (define-public python-semver
13912 (package
13913 (name "python-semver")
13914 (version "2.7.9")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 (uri (pypi-uri "semver" version))
13919 (sha256
13920 (base32
13921 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13922 (build-system python-build-system)
13923 (arguments
13924 `(#:phases
13925 (modify-phases %standard-phases
13926 (add-after 'unpack 'patch-test-requirements
13927 (lambda _
13928 (substitute* "setup.py"
13929 ;; Our Python is new enough.
13930 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13931 #t)))))
13932 (native-inputs
13933 `(("python-tox" ,python-tox)
13934 ("python-virtualenv" ,python-virtualenv)))
13935 (home-page "https://github.com/k-bx/python-semver")
13936 (synopsis "Python helper for Semantic Versioning")
13937 (description "This package provides a Python library for
13938 @url{Semantic Versioning, http://semver.org/}.")
13939 (license license:bsd-3)))
13940
13941 (define-public python2-semver
13942 (package-with-python2 python-semver))
13943
13944 (define-public python-pyro4
13945 (package
13946 (name "python-pyro4")
13947 (version "4.75")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "Pyro4" version))
13952 (sha256
13953 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13954 (build-system python-build-system)
13955 (propagated-inputs
13956 `(("python-serpent" ,python-serpent)))
13957 (home-page "https://pyro4.readthedocs.io")
13958 (synopsis "Distributed object middleware for Python")
13959 (description
13960 "Pyro enables you to build applications in which objects can talk to each
13961 other over the network. You can just use normal Python method calls to call
13962 objects on other machines, also known as remote procedure calls (RPC).")
13963 (license license:expat)))
13964
13965 (define-public python2-pyro
13966 (package
13967 (name "python2-pyro")
13968 (version "3.16")
13969 (source
13970 (origin
13971 (method url-fetch)
13972 (uri (pypi-uri "Pyro" version))
13973 (file-name (string-append "Pyro-" version ".tar.gz"))
13974 (sha256
13975 (base32
13976 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13977 (build-system python-build-system)
13978 (arguments
13979 ;; Pyro is not compatible with Python 3
13980 `(#:python ,python-2
13981 ;; Pyro has no test cases for automatic execution
13982 #:tests? #f))
13983 (home-page "http://pythonhosted.org/Pyro/")
13984 (synopsis "Distributed object manager for Python")
13985 (description "Pyro is a Distributed Object Technology system
13986 written in Python that is designed to be easy to use. It resembles
13987 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13988 which is a system and language independent Distributed Object Technology
13989 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13990 longer maintained. New projects should use Pyro4 instead, which
13991 is the new Pyro version that is actively developed.")
13992 (license license:expat)))
13993
13994 (define-public python2-scientific
13995 (package
13996 (name "python2-scientific")
13997 (version "2.9.4")
13998 (source
13999 (origin
14000 (method url-fetch)
14001 (uri (string-append "https://bitbucket.org/khinsen/"
14002 "scientificpython/downloads/ScientificPython-"
14003 version ".tar.gz"))
14004 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14005 (sha256
14006 (base32
14007 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14008 (build-system python-build-system)
14009 (inputs
14010 `(("netcdf" ,netcdf)))
14011 (propagated-inputs
14012 `(("python-numpy" ,python2-numpy-1.8)
14013 ("python-pyro" ,python2-pyro)))
14014 (arguments
14015 ;; ScientificPython is not compatible with Python 3
14016 `(#:python ,python-2
14017 #:tests? #f ; No test suite
14018 #:phases
14019 (modify-phases %standard-phases
14020 (replace 'build
14021 (lambda* (#:key inputs #:allow-other-keys)
14022 (invoke "python" "setup.py" "build"
14023 (string-append "--netcdf_prefix="
14024 (assoc-ref inputs "netcdf"))))))))
14025 (home-page "https://bitbucket.org/khinsen/scientificpython")
14026 (synopsis "Python modules for scientific computing")
14027 (description "ScientificPython is a collection of Python modules that are
14028 useful for scientific computing. Most modules are rather general (Geometry,
14029 physical units, automatic derivatives, ...) whereas others are more
14030 domain-specific (e.g. netCDF and PDB support). The library is currently
14031 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14032 (license license:cecill-c)))
14033
14034 (define-public python2-mmtk
14035 (package
14036 (name "python2-mmtk")
14037 (version "2.7.11")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (string-append "https://bitbucket.org/khinsen/"
14042 "mmtk/downloads/MMTK-" version ".tar.gz"))
14043 (file-name (string-append "MMTK-" version ".tar.gz"))
14044 (sha256
14045 (base32
14046 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14047 (build-system python-build-system)
14048 (native-inputs
14049 `(("netcdf" ,netcdf)))
14050 (propagated-inputs
14051 `(("python-scientific" ,python2-scientific)
14052 ("python-tkinter" ,python-2 "tk")))
14053 (arguments
14054 `(#:python ,python-2
14055 #:tests? #f
14056 #:phases
14057 (modify-phases %standard-phases
14058 (add-before 'build 'includes-from-scientific
14059 (lambda* (#:key inputs #:allow-other-keys)
14060 (mkdir-p "Include/Scientific")
14061 (copy-recursively
14062 (string-append
14063 (assoc-ref inputs "python-scientific")
14064 "/include/python2.7/Scientific")
14065 "Include/Scientific"))))))
14066 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14067 (synopsis "Python library for molecular simulation")
14068 (description "MMTK is a library for molecular simulations with an emphasis
14069 on biomolecules. It provides widely used methods such as Molecular Dynamics
14070 and normal mode analysis, but also basic routines for implementing new methods
14071 for simulation and analysis. The library is currently not actively maintained
14072 and works only with Python 2 and NumPy < 1.9.")
14073 (license license:cecill-c)))
14074
14075 (define-public python-phonenumbers
14076 (package
14077 (name "python-phonenumbers")
14078 (version "8.9.1")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "phonenumbers" version))
14083 (sha256
14084 (base32
14085 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14086 (build-system python-build-system)
14087 (home-page
14088 "https://github.com/daviddrysdale/python-phonenumbers")
14089 (synopsis
14090 "Python library for dealing with international phone numbers")
14091 (description
14092 "This package provides a Python port of Google's libphonenumber library.")
14093 (license license:asl2.0)))
14094
14095 (define-public python2-phonenumbers
14096 (package-with-python2 python-phonenumbers))
14097
14098 (define-public python-send2trash
14099 (package
14100 (name "python-send2trash")
14101 (version "1.5.0")
14102 (source
14103 (origin (method git-fetch)
14104 ;; Source tarball on PyPI doesn't include tests.
14105 (uri (git-reference
14106 (url "https://github.com/hsoft/send2trash.git")
14107 (commit version)))
14108 (file-name (git-file-name name version))
14109 (sha256
14110 (base32
14111 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14112 (build-system python-build-system)
14113 (arguments
14114 '(#:phases
14115 (modify-phases %standard-phases
14116 (add-before 'check 'pre-check
14117 (lambda _
14118 (mkdir-p "/tmp/foo")
14119 (setenv "HOME" "/tmp/foo")
14120 #t)))))
14121 (home-page "https://github.com/hsoft/send2trash")
14122 (synopsis "Send files to the user's @file{~/Trash} directory")
14123 (description "This package provides a Python library to send files to the
14124 user's @file{~/Trash} directory.")
14125 (properties `((python2-variant . ,(delay python2-send2trash))))
14126 (license license:bsd-3)))
14127
14128 (define-public python2-send2trash
14129 (package
14130 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14131 (arguments
14132 (substitute-keyword-arguments (package-arguments python-send2trash)
14133 ((#:phases phases)
14134 `(modify-phases ,phases
14135 (add-before 'check 'setenv
14136 (lambda _
14137 (setenv "PYTHONPATH"
14138 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14139 #t))))))))
14140
14141 (define-public python-yapf
14142 (package
14143 (name "python-yapf")
14144 (version "0.24.0")
14145 (source
14146 (origin
14147 (method url-fetch)
14148 (uri (pypi-uri "yapf" version))
14149 (sha256
14150 (base32
14151 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14152 (build-system python-build-system)
14153 (home-page "https://github.com/google/yapf")
14154 (synopsis "Formatter for Python code")
14155 (description "YAPF is a formatter for Python code. It's based off of
14156 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14157 takes the code and reformats it to the best formatting that conforms to the
14158 style guide, even if the original code didn't violate the style guide.")
14159 (license license:asl2.0)))
14160
14161 (define-public python2-yapf
14162 (package-with-python2 python-yapf))
14163
14164 (define-public python-gyp
14165 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14166 (revision "0"))
14167 (package
14168 (name "python-gyp")
14169 ;; Google does not release versions,
14170 ;; based on second most recent commit date.
14171 (version (git-version "0.0.0" revision commit))
14172 (source
14173 (origin
14174 ;; Google does not release tarballs,
14175 ;; git checkout is needed.
14176 (method git-fetch)
14177 (uri (git-reference
14178 (url "https://chromium.googlesource.com/external/gyp")
14179 (commit commit)))
14180 (file-name (git-file-name name version))
14181 (sha256
14182 (base32
14183 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14184 (build-system python-build-system)
14185 (home-page "https://gyp.gsrc.io/")
14186 (synopsis "GYP is a Meta-Build system")
14187 (description
14188 "GYP builds build systems for large, cross platform applications.
14189 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14190 files, and Makefiles.")
14191 (license license:bsd-3))))
14192
14193 (define-public python2-gyp
14194 (package-with-python2 python-gyp))
14195
14196 (define-public python-whatever
14197 (package
14198 (name "python-whatever")
14199 (version "0.5")
14200 (source
14201 (origin
14202 (method url-fetch)
14203 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14204 ".tar.gz"))
14205 (sha256
14206 (base32
14207 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14208 (file-name (string-append name "-" version ".tar.gz"))))
14209 (build-system python-build-system)
14210 (arguments
14211 `(#:phases
14212 (modify-phases %standard-phases
14213 (replace 'check
14214 (lambda _
14215 (invoke "py.test"))))))
14216 (native-inputs
14217 `(("python-pytest" ,python-pytest)))
14218 (home-page "http://github.com/Suor/whatever")
14219 (synopsis "Make anonymous functions by partial application of operators")
14220 (description "@code{whatever} provides an easy way to make anonymous
14221 functions by partial application of operators.")
14222 (license license:bsd-3)))
14223
14224 (define-public python2-whatever
14225 (package-with-python2 python-whatever))
14226
14227 (define-public python-funcy
14228 (package
14229 (name "python-funcy")
14230 (version "1.11")
14231 (source
14232 (origin
14233 (method git-fetch)
14234 (uri (git-reference
14235 (url "https://github.com/Suor/funcy.git")
14236 (commit version)))
14237 (sha256
14238 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14239 (file-name (git-file-name name version))))
14240 (build-system python-build-system)
14241 (arguments
14242 `(#:phases
14243 (modify-phases %standard-phases
14244 (replace 'check
14245 (lambda _
14246 (invoke "py.test"))))))
14247 (native-inputs
14248 `(("python-pytest" ,python-pytest)
14249 ("python-whatever" ,python-whatever)))
14250 (home-page "http://github.com/Suor/funcy")
14251 (synopsis "Functional tools")
14252 (description "@code{funcy} is a library that provides functional tools.
14253 Examples are:
14254 @enumerate
14255 @item merge - Merges collections of the same type
14256 @item walk - Type-preserving map
14257 @item select - Selects a part of a collection
14258 @item take - Takes the first n items of a collection
14259 @item first - Takes the first item of a collection
14260 @item remove - Predicated-removes items of a collection
14261 @item concat - Concatenates two collections
14262 @item flatten - Flattens a collection with subcollections
14263 @item distinct - Returns only distinct items
14264 @item split - Predicated-splits a collection
14265 @item split_at - Splits a collection at a given item
14266 @item group_by - Groups items by group
14267 @item pairwise - Pairs off adjacent items
14268 @item partial - Partially-applies a function
14269 @item curry - Curries a function
14270 @item compose - Composes functions
14271 @item complement - Complements a predicate
14272 @item all_fn - \"all\" with predicate
14273 @end enumerate")
14274 (license license:bsd-3)))
14275
14276 (define-public python2-funcy
14277 (package-with-python2 python-funcy))
14278
14279 (define-public python-isoweek
14280 (package
14281 (name "python-isoweek")
14282 (version "1.3.3")
14283 (source
14284 (origin
14285 (method url-fetch)
14286 (uri (pypi-uri "isoweek" version))
14287 (sha256
14288 (base32
14289 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14290 (build-system python-build-system)
14291 (home-page "https://github.com/gisle/isoweek")
14292 (synopsis "Objects representing a week")
14293 (description "The @code{isoweek} module provide the class Week that
14294 implements the week definition of ISO 8601. This standard also defines
14295 a notation for identifying weeks; yyyyWww (where the W is a literal).
14296 Week instances stringify to this form.")
14297 (license license:bsd-3)))
14298
14299 (define-public python2-isoweek
14300 (package-with-python2 python-isoweek))
14301
14302 (define-public python-tokenize-rt
14303 (package
14304 (name "python-tokenize-rt")
14305 (version "2.0.1")
14306 (source
14307 (origin
14308 (method url-fetch)
14309 (uri (pypi-uri "tokenize-rt" version))
14310 (sha256
14311 (base32
14312 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14313 (build-system python-build-system)
14314 (home-page "https://github.com/asottile/tokenize-rt")
14315 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14316 (description
14317 "This Python library is a wrapper around @code{tokenize} from the Python
14318 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14319 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14320 and @code{tokens_to_src} to roundtrip.")
14321 (license license:expat)))
14322
14323 (define-public python-future-fstrings
14324 (package
14325 (name "python-future-fstrings")
14326 (version "0.4.1")
14327 (source
14328 (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "future_fstrings" version))
14331 (sha256
14332 (base32
14333 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14334 (build-system python-build-system)
14335 (propagated-inputs
14336 `(("python-tokenize-rt" ,python-tokenize-rt)))
14337 (home-page "https://github.com/asottile/future-fstrings")
14338 (synopsis "Backport of fstrings to Python < 3.6")
14339 (description
14340 "This package provides a UTF-8 compatible encoding
14341 @code{future_fstrings}, which performs source manipulation. It decodes the
14342 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14343 @code{f} strings.")
14344 (license license:expat)))
14345
14346 (define-public python-typed-ast
14347 (package
14348 (name "python-typed-ast")
14349 (version "1.3.5")
14350 (source
14351 (origin
14352 (method url-fetch)
14353 (uri (pypi-uri "typed-ast" version))
14354 (sha256
14355 (base32
14356 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14357 (build-system python-build-system)
14358 (arguments
14359 `(#:modules ((guix build utils)
14360 (guix build python-build-system)
14361 (ice-9 ftw)
14362 (srfi srfi-1)
14363 (srfi srfi-26))
14364 #:phases
14365 (modify-phases %standard-phases
14366 (replace 'check
14367 (lambda _
14368 (let ((cwd (getcwd)))
14369 (setenv "PYTHONPATH"
14370 (string-append cwd "/build/"
14371 (find (cut string-prefix? "lib" <>)
14372 (scandir (string-append cwd "/build")))
14373 ":"
14374 (getenv "PYTHONPATH"))))
14375 (invoke "pytest")
14376 #t)))))
14377 (native-inputs `(("python-pytest" ,python-pytest)))
14378 (home-page "https://github.com/python/typed_ast")
14379 (synopsis "Fork of Python @code{ast} modules with type comment support")
14380 (description "This package provides a parser similar to the standard
14381 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14382 include PEP 484 type comments and are independent of the version of Python
14383 under which they are run. The @code{typed_ast} parsers produce the standard
14384 Python AST (plus type comments), and are both fast and correct, as they are
14385 based on the CPython 2.7 and 3.7 parsers.")
14386 ;; See the file "LICENSE" for the details.
14387 (license (list license:psfl
14388 license:asl2.0
14389 license:expat)))) ;ast27/Parser/spark.py
14390
14391 (define-public python-typing
14392 (package
14393 (name "python-typing")
14394 (version "3.6.6")
14395 (source
14396 (origin
14397 (method url-fetch)
14398 (uri (pypi-uri "typing" version))
14399 (sha256
14400 (base32
14401 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14402 (build-system python-build-system)
14403 (home-page "https://docs.python.org/3/library/typing.html")
14404 (synopsis "Type hints for Python")
14405 (description "This is a backport of the standard library @code{typing}
14406 module to Python versions older than 3.5. Typing defines a standard notation
14407 for Python function and variable type annotations. The notation can be used
14408 for documenting code in a concise, standard format, and it has been designed
14409 to also be used by static and runtime type checkers, static analyzers, IDEs
14410 and other tools.")
14411 (license license:psfl)))
14412
14413 (define-public python2-typing
14414 (package-with-python2 python-typing))
14415
14416 (define-public python-typing-extensions
14417 (package
14418 (name "python-typing-extensions")
14419 (version "3.7.2")
14420 (source
14421 (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "typing_extensions" version))
14424 (sha256
14425 (base32
14426 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14427 (build-system python-build-system)
14428 (home-page
14429 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14430 (synopsis "Experimental type hints for Python")
14431 (description
14432 "The typing_extensions module contains additional @code{typing} hints not
14433 yet present in the of the @code{typing} standard library.
14434 Included are implementations of:
14435 @enumerate
14436 @item ClassVar
14437 @item ContextManager
14438 @item Counter
14439 @item DefaultDict
14440 @item Deque
14441 @item NewType
14442 @item NoReturn
14443 @item overload
14444 @item Protocol
14445 @item runtime
14446 @item Text
14447 @item Type
14448 @item TYPE_CHECKING
14449 @item AsyncGenerator
14450 @end enumerate\n")
14451 (license license:psfl)))
14452
14453 (define-public bpython
14454 (package
14455 (name "bpython")
14456 (version "0.17.1")
14457 (source
14458 (origin
14459 (method url-fetch)
14460 (uri (pypi-uri "bpython" version))
14461 (sha256
14462 (base32
14463 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14464 (build-system python-build-system)
14465 (arguments
14466 `(#:phases
14467 (modify-phases %standard-phases
14468 (add-after 'unpack 'remove-failing-test
14469 (lambda _
14470 ;; Remove failing test. FIXME: make it pass
14471 (delete-file "bpython/test/test_args.py")
14472 #t))
14473 (add-after 'wrap 'add-aliases
14474 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14475 (lambda* (#:key outputs #:allow-other-keys)
14476 (let ((out (assoc-ref outputs "out")))
14477 (for-each
14478 (lambda (old new)
14479 (symlink old (string-append out "/bin/" new)))
14480 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14481 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14482 #t)))))
14483 (propagated-inputs
14484 `(("python-pygments" ,python-pygments)
14485 ("python-requests" ,python-requests)
14486 ("python-babel" ,python-babel) ; optional, for internationalization
14487 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14488 ("python-greenlet" ,python-greenlet)
14489 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14490 ("python-six" ,python-six)))
14491 (native-inputs
14492 `(("python-sphinx" ,python-sphinx)
14493 ("python-mock" ,python-mock)))
14494 (home-page "https://bpython-interpreter.org/")
14495 (synopsis "Fancy interface to the Python interpreter")
14496 (description "Bpython is a fancy interface to the Python
14497 interpreter. bpython's main features are
14498
14499 @enumerate
14500 @item in-line syntax highlighting,
14501 @item readline-like autocomplete with suggestions displayed as you type,
14502 @item expected parameter list for any Python function,
14503 @item \"rewind\" function to pop the last line of code from memory and
14504 re-evaluate,
14505 @item send the code you've entered off to a pastebin,
14506 @item save the code you've entered to a file, and
14507 @item auto-indentation.
14508 @end enumerate")
14509 (license license:expat)))
14510
14511 (define-public bpython2
14512 (let ((base (package-with-python2
14513 (strip-python2-variant bpython))))
14514 (package (inherit base)
14515 (name "bpython2")
14516 (arguments
14517 `(#:python ,python-2
14518 #:phases
14519 (modify-phases %standard-phases
14520 (add-after 'unpack 'remove-failing-test
14521 (lambda _
14522 ;; Remove failing test. FIXME: make it pass
14523 (delete-file "bpython/test/test_args.py")
14524 ;; Disable failing test-cases (renaming inhibits they are
14525 ;; discovered)
14526 (substitute* "bpython/test/test_curtsies_repl.py"
14527 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14528 (string-append a "xxx_off_" b))
14529 (("^(\\s*def )(test_complex\\W)" _ a b)
14530 (string-append a "xxx_off_" b)))
14531 #t))
14532 (add-before 'build 'rename-scripts
14533 ;; rename the scripts to bypthon2, bpdb2, etc.
14534 (lambda _
14535 (substitute* "setup.py"
14536 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14537 (string-append name "2" rest "\n"))
14538 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14539 (string-append name "2" (or sub "") rest "\n")))
14540 #t))))))))
14541
14542 (define-public python-pyinotify
14543 (package
14544 (name "python-pyinotify")
14545 (version "0.9.6")
14546 (source (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "pyinotify" version))
14549 (sha256
14550 (base32
14551 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14552 (build-system python-build-system)
14553 (arguments `(#:tests? #f)) ;no tests
14554 (home-page "https://github.com/seb-m/pyinotify")
14555 (synopsis "Python library for monitoring inotify events")
14556 (description
14557 "@code{pyinotify} provides a Python interface for monitoring
14558 file system events on Linux.")
14559 (license license:expat)))
14560
14561 (define-public python2-pyinotify
14562 (package-with-python2 python-pyinotify))
14563
14564 ;; Ada parser uses this version.
14565 (define-public python2-quex-0.67.3
14566 (package
14567 (name "python2-quex")
14568 (version "0.67.3")
14569 (source
14570 (origin
14571 (method url-fetch)
14572 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14573 (version-major+minor version)
14574 "/quex-" version ".zip"))
14575 (sha256
14576 (base32
14577 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14578 (build-system python-build-system)
14579 (native-inputs
14580 `(("unzip" ,unzip)))
14581 (arguments
14582 `(#:python ,python-2
14583 #:tests? #f
14584 #:phases
14585 (modify-phases %standard-phases
14586 (delete 'configure)
14587 (delete 'build)
14588 (replace 'install
14589 (lambda* (#:key outputs #:allow-other-keys)
14590 (let* ((out (assoc-ref outputs "out"))
14591 (share/quex (string-append out "/share/quex"))
14592 (bin (string-append out "/bin")))
14593 (copy-recursively "." share/quex)
14594 (mkdir-p bin)
14595 (symlink (string-append share/quex "/quex-exe.py")
14596 (string-append bin "/quex"))
14597 #t))))))
14598 (native-search-paths
14599 (list (search-path-specification
14600 (variable "QUEX_PATH")
14601 (files '("share/quex")))))
14602 (home-page "http://quex.sourceforge.net/")
14603 (synopsis "Lexical analyzer generator in Python")
14604 (description "@code{quex} is a lexical analyzer generator in Python.")
14605 (license license:lgpl2.1+))) ; Non-military
14606
14607 (define-public python2-quex
14608 (package (inherit python2-quex-0.67.3)
14609 (name "python2-quex")
14610 (version "0.68.1")
14611 (source
14612 (origin
14613 (method url-fetch)
14614 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14615 (sha256
14616 (base32
14617 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14618 (file-name (string-append name "-" version ".tar.gz"))))))
14619
14620 (define-public python-more-itertools
14621 (package
14622 (name "python-more-itertools")
14623 (version "7.1.0")
14624 (source
14625 (origin
14626 (method url-fetch)
14627 (uri (pypi-uri "more-itertools" version))
14628 (sha256
14629 (base32
14630 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14631 (build-system python-build-system)
14632 (home-page "https://github.com/erikrose/more-itertools")
14633 (synopsis "More routines for operating on iterables, beyond itertools")
14634 (description "Python's built-in @code{itertools} module implements a
14635 number of iterator building blocks inspired by constructs from APL, Haskell,
14636 and SML. @code{more-itertools} includes additional building blocks for
14637 working with iterables.")
14638 (properties `((python2-variant . ,(delay python2-more-itertools))))
14639 (license license:expat)))
14640
14641 ;; The 5.x series are the last versions supporting Python 2.7.
14642 (define-public python2-more-itertools
14643 (package
14644 (inherit python-more-itertools)
14645 (name "python2-more-itertools")
14646 (version "5.0.0")
14647 (source (origin
14648 (method url-fetch)
14649 (uri (pypi-uri "more-itertools" version))
14650 (sha256
14651 (base32
14652 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14653 (arguments
14654 `(#:python ,python2-minimal))
14655 (propagated-inputs
14656 `(("python2-six" ,python2-six-bootstrap)))))
14657
14658 (define-public python-latexcodec
14659 (package
14660 (name "python-latexcodec")
14661 (version "1.0.6")
14662 (source
14663 (origin
14664 (method url-fetch)
14665 (uri (pypi-uri "latexcodec" version))
14666 (sha256
14667 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14668 (build-system python-build-system)
14669 (inputs
14670 `(("python-six" ,python-six)))
14671 (home-page "https://readthedocs.org/projects/latexcodec/")
14672 (synopsis "Work with LaTeX code in Python")
14673 (description "Lexer and codec to work with LaTeX code in Python.")
14674 (license license:expat)))
14675
14676 (define-public python-pybtex
14677 (package
14678 (name "python-pybtex")
14679 (version "0.21")
14680 (source
14681 (origin
14682 (method url-fetch)
14683 (uri (pypi-uri "pybtex" version))
14684 (sha256
14685 (base32
14686 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14687 (build-system python-build-system)
14688 (native-inputs
14689 `(("python-nose" ,python-nose)))
14690 (inputs
14691 `(("python-latexcodec" ,python-latexcodec)
14692 ("python-pyyaml" ,python-pyyaml)
14693 ("python-six" ,python-six)))
14694 (arguments
14695 `(#:test-target "nosetests"))
14696 (home-page "https://pybtex.org/")
14697 (synopsis "BibTeX-compatible bibliography processor")
14698 (description "Pybtex is a BibTeX-compatible bibliography processor written
14699 in Python. You can simply type pybtex instead of bibtex.")
14700 (license license:expat)))
14701
14702 (define-public python-onetimepass
14703 (package
14704 (name "python-onetimepass")
14705 (version "1.0.1")
14706 (source
14707 (origin
14708 (method url-fetch)
14709 (uri (pypi-uri "onetimepass" version))
14710 (sha256
14711 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14712 (build-system python-build-system)
14713 (propagated-inputs `(("python-six" ,python-six)))
14714 (home-page "https://github.com/tadeck/onetimepass/")
14715 (synopsis "One-time password library")
14716 (description "Python one-time password library for HMAC-based (HOTP) and
14717 time-based (TOTP) passwords.")
14718 (license license:expat)))
14719
14720 (define-public python-parso
14721 (package
14722 (name "python-parso")
14723 (version "0.3.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "parso" version))
14728 (sha256
14729 (base32
14730 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14731 (native-inputs
14732 `(("python-pytest" ,python-pytest)))
14733 (build-system python-build-system)
14734 (home-page "https://github.com/davidhalter/parso")
14735 (synopsis "Python Parser")
14736 (description "Parso is a Python parser that supports error recovery and
14737 round-trip parsing for different Python versions (in multiple Python versions).
14738 Parso is also able to list multiple syntax errors in your Python file.")
14739 (license license:expat)))
14740
14741 (define-public python2-parso
14742 (package-with-python2 python-parso))
14743
14744 (define-public python-async-generator
14745 (package
14746 (name "python-async-generator")
14747 (version "1.10")
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "async_generator" version))
14752 (sha256
14753 (base32
14754 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14755 (build-system python-build-system)
14756 (native-inputs
14757 `(("python-pytest" ,python-pytest)))
14758 (home-page "https://github.com/python-trio/async_generator")
14759 (synopsis "Async generators and context managers for Python 3.5+")
14760 (description "@code{async_generator} back-ports Python 3.6's native async
14761 generators and Python 3.7's context managers into Python 3.5.")
14762 ;; Dual licensed.
14763 (license (list license:expat license:asl2.0))))
14764
14765 (define-public python-async-timeout
14766 (package
14767 (name "python-async-timeout")
14768 (version "3.0.1")
14769 (source
14770 (origin
14771 (method url-fetch)
14772 (uri (pypi-uri "async-timeout" version))
14773 (sha256
14774 (base32
14775 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14776 (build-system python-build-system)
14777 (home-page "https://github.com/aio-libs/async_timeout/")
14778 (synopsis "Timeout context manager for asyncio programs")
14779 (description "@code{async-timeout} provides a timeout timeout context
14780 manager compatible with @code{asyncio}.")
14781 (license license:asl2.0)))
14782
14783 (define-public python-glob2
14784 (package
14785 (name "python-glob2")
14786 (version "0.6")
14787 (source
14788 (origin
14789 (method git-fetch)
14790 (uri (git-reference
14791 (url "https://github.com/miracle2k/python-glob2.git")
14792 (commit version)))
14793 (file-name (git-file-name name version))
14794 (sha256
14795 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14796 (build-system python-build-system)
14797 (home-page "https://github.com/miracle2k/python-glob2/")
14798 (synopsis "Extended Version of the python buildin glob module")
14799 (description "This is an extended version of the Python
14800 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14801 adds:
14802
14803 @itemize
14804 @item The ability to capture the text matched by glob patterns, and return
14805 those matches alongside the file names.
14806 @item A recursive @code{**} globbing syntax, akin for example to the
14807 @code{globstar} option of Bash.
14808 @item The ability to replace the file system functions used, in order to glob
14809 on virtual file systems.
14810 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14811 @end itemize
14812
14813 Glob2 currently based on the glob code from Python 3.3.1.")
14814 (license license:bsd-2)))
14815
14816 (define-public python2-glob2
14817 (package-with-python2 python-glob2))
14818
14819 (define-public python-gipc
14820 (package
14821 (name "python-gipc")
14822 (version "0.6.0")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "gipc" version ".zip"))
14827 (sha256
14828 (base32
14829 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14830 (build-system python-build-system)
14831 (native-inputs
14832 `(("unzip" ,unzip)))
14833 (propagated-inputs
14834 `(("python-gevent" ,python-gevent)))
14835 (home-page "http://gehrcke.de/gipc")
14836 (synopsis "Child process management in the context of gevent")
14837 (description "Usage of Python's multiprocessing package in a
14838 gevent-powered application may raise problems. With @code{gipc},
14839 process-based child processes can safely be created anywhere within a
14840 gevent-powered application.")
14841 (license license:expat)))
14842
14843 (define-public python2-gipc
14844 (package-with-python2 python-gipc))
14845
14846 (define-public python-fusepy
14847 (package
14848 (name "python-fusepy")
14849 (version "2.0.4")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "fusepy" version))
14854 (sha256
14855 (base32
14856 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14857 (build-system python-build-system)
14858 (arguments
14859 `(#:phases
14860 (modify-phases %standard-phases
14861 (add-before 'build 'set-library-file-name
14862 (lambda* (#:key inputs #:allow-other-keys)
14863 (let ((fuse (assoc-ref inputs "fuse")))
14864 (substitute* "fuse.py"
14865 (("find_library\\('fuse'\\)")
14866 (string-append "'" fuse "/lib/libfuse.so'")))
14867 #t))))))
14868 (propagated-inputs
14869 `(("fuse" ,fuse)))
14870 (home-page "https://github.com/fusepy/fusepy")
14871 (synopsis "Simple ctypes bindings for FUSE")
14872 (description "Python module that provides a simple interface to FUSE and
14873 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14874 (license license:isc)))
14875
14876 (define-public python2-fusepy
14877 (package-with-python2 python-fusepy))
14878
14879 (define-public python2-gdrivefs
14880 (package
14881 (name "python2-gdrivefs")
14882 (version "0.14.9")
14883 (source
14884 (origin
14885 (method url-fetch)
14886 (uri (pypi-uri "gdrivefs" version))
14887 (sha256
14888 (base32
14889 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14890 (build-system python-build-system)
14891 (arguments
14892 `(#:python ,python-2
14893 #:phases
14894 (modify-phases %standard-phases
14895 (add-before 'build 'patch-setup-py
14896 (lambda _
14897 ;; Update requirements from dependency==version
14898 ;; to dependency>=version
14899 (substitute* "gdrivefs/resources/requirements.txt"
14900 (("==") ">="))
14901 #t)))))
14902 (native-inputs
14903 `(("python2-gipc" ,python2-gipc)
14904 ("python2-gevent" ,python2-gevent)
14905 ("python2-greenlet" ,python2-greenlet)
14906 ("python2-httplib2" ,python2-httplib2)
14907 ("python2-uritemplate" ,python2-uritemplate)
14908 ("python2-oauth2client" ,python2-oauth2client)
14909 ("python2-six" ,python2-six)))
14910 (propagated-inputs
14911 `(("python2-dateutil" ,python2-dateutil)
14912 ("python2-fusepy" ,python2-fusepy)
14913 ("python2-google-api-client" ,python2-google-api-client)))
14914 (home-page "https://github.com/dsoprea/GDriveFS")
14915 (synopsis "Mount Google Drive as a local file system")
14916 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14917 under Python 2.7.")
14918 (license license:gpl2)))
14919
14920 (define-public pybind11
14921 (package
14922 (name "pybind11")
14923 (version "2.3.0")
14924 (source (origin
14925 (method git-fetch)
14926 (uri (git-reference
14927 (url "https://github.com/pybind/pybind11.git")
14928 (commit (string-append "v" version))))
14929 (sha256
14930 (base32
14931 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
14932 (file-name (git-file-name name version))))
14933 (build-system cmake-build-system)
14934 (native-inputs
14935 `(("python" ,python)
14936 ("python-pytest" ,python-pytest)))
14937 (arguments
14938 `(#:test-target "check"))
14939 (home-page "https://github.com/pybind/pybind11/")
14940 (synopsis "Seamless operability between C++11 and Python")
14941 (description "pybind11 is a lightweight header-only library that exposes
14942 C++ types in Python and vice versa, mainly to create Python bindings of
14943 existing C++ code. Its goals and syntax are similar to the excellent
14944 Boost.Python library by David Abrahams: to minimize boilerplate code in
14945 traditional extension modules by inferring type information using compile-time
14946 introspection.")
14947 (license license:expat)))
14948
14949 (define-public python-fasteners
14950 (package
14951 (name "python-fasteners")
14952 (version "0.14.1")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "fasteners" version))
14957 (sha256
14958 (base32
14959 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14960 (build-system python-build-system)
14961 (propagated-inputs
14962 `(("python-monotonic" ,python-monotonic)
14963 ("python-six" ,python-six)
14964 ("python-testtools" ,python-testtools)))
14965 (home-page "https://github.com/harlowja/fasteners")
14966 (synopsis "Python package that provides useful locks")
14967 (description
14968 "This package provides a Python program that provides following locks:
14969
14970 @itemize
14971 @item Locking decorator
14972 @item Reader-writer locks
14973 @item Inter-process locks
14974 @item Generic helpers
14975 @end itemize\n")
14976 (properties `((python2-variant . ,(delay python2-fasteners))))
14977 (license license:asl2.0)))
14978
14979 (define-public python2-fasteners
14980 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14981 (package
14982 (inherit base)
14983 (propagated-inputs
14984 `(("python2-futures" ,python2-futures)
14985 ,@(package-propagated-inputs base))))))
14986
14987 (define-public python-requests-file
14988 (package
14989 (name "python-requests-file")
14990 (version "1.4.3")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "requests-file" version))
14995 (sha256
14996 (base32
14997 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14998 (build-system python-build-system)
14999 (propagated-inputs
15000 `(("python-requests" ,python-requests)
15001 ("python-six" ,python-six)))
15002 (home-page
15003 "https://github.com/dashea/requests-file")
15004 (synopsis "File transport adapter for Requests")
15005 (description
15006 "Requests-File is a transport adapter for use with the Requests Python
15007 library to allow local file system access via @code{file://} URLs.")
15008 (license license:asl2.0)))
15009
15010 (define-public python2-requests-file
15011 (package-with-python2 python-requests-file))
15012
15013 (define-public python-tldextract
15014 (package
15015 (name "python-tldextract")
15016 (version "2.2.0")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "tldextract" version))
15021 (sha256
15022 (base32
15023 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15024 (build-system python-build-system)
15025 (native-inputs
15026 `(("python-pytest" ,python-pytest)
15027 ("python-responses" ,python-responses)))
15028 (propagated-inputs
15029 `(("python-idna" ,python-idna)
15030 ("python-requests" ,python-requests)
15031 ("python-requests-file" ,python-requests-file)))
15032 (home-page
15033 "https://github.com/john-kurkowski/tldextract")
15034 (synopsis
15035 "Separate the TLD from the registered domain and subdomains of a URL")
15036 (description
15037 "TLDExtract accurately separates the TLD from the registered domain and
15038 subdomains of a URL, using the Public Suffix List. By default, this includes
15039 the public ICANN TLDs and their exceptions. It can optionally support the
15040 Public Suffix List's private domains as well.")
15041 (license license:bsd-3)))
15042
15043 (define-public python2-tldextract
15044 (package-with-python2 python-tldextract))
15045
15046 (define-public python-pynamecheap
15047 (package
15048 (name "python-pynamecheap")
15049 (version "0.0.3")
15050 (source
15051 (origin
15052 (method url-fetch)
15053 (uri (pypi-uri "PyNamecheap" version))
15054 (sha256
15055 (base32
15056 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15057 (build-system python-build-system)
15058 (propagated-inputs
15059 `(("python-requests" ,python-requests)))
15060 (home-page
15061 "https://github.com/Bemmu/PyNamecheap")
15062 (synopsis
15063 "Namecheap API client in Python")
15064 (description
15065 "PyNamecheap is a Namecheap API client in Python.")
15066 (license license:expat)))
15067
15068 (define-public python2-pynamecheap
15069 (package-with-python2 python-pynamecheap))
15070
15071 (define-public python-dns-lexicon
15072 (package
15073 (name "python-dns-lexicon")
15074 (version "2.4.0")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "dns-lexicon" version))
15079 (sha256
15080 (base32
15081 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15082 (build-system python-build-system)
15083 (arguments
15084 `(#:tests? #f)) ;requires internet access
15085 (propagated-inputs
15086 `(("python-future" ,python-future)
15087 ("python-pynamecheap" ,python-pynamecheap)
15088 ("python-requests" ,python-requests)
15089 ("python-tldextract" ,python-tldextract)
15090 ("python-urllib3" ,python-urllib3)))
15091 (home-page "https://github.com/AnalogJ/lexicon")
15092 (synopsis
15093 "Manipulate DNS records on various DNS providers")
15094 (description
15095 "Lexicon provides a way to manipulate DNS records on multiple DNS
15096 providers in a standardized way. It has a CLI but it can also be used as a
15097 Python library. It was designed to be used in automation, specifically with
15098 Let's Encrypt.")
15099 (license license:expat)))
15100
15101 (define-public python2-dns-lexicon
15102 (package-with-python2 python-dns-lexicon))
15103
15104 (define-public python-commandlines
15105 (package
15106 (name "python-commandlines")
15107 (version "0.4.1")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "commandlines" version))
15112 (sha256
15113 (base32
15114 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15115 (build-system python-build-system)
15116 (home-page "https://github.com/chrissimpkins/commandlines")
15117 (synopsis "Command line argument to object parsing library")
15118 (description
15119 "@code{Commandlines} is a Python library for command line application
15120 development that supports command line argument parsing, command string
15121 validation testing and application logic.")
15122 (license license:expat)))
15123
15124 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15125 ;; python-numba. They have a very unflexible relationship.
15126 (define-public python-numba
15127 (package
15128 (name "python-numba")
15129 (version "0.42.0")
15130 (source
15131 (origin
15132 (method url-fetch)
15133 (uri (pypi-uri "numba" version))
15134 (sha256
15135 (base32
15136 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15137 (build-system python-build-system)
15138 (arguments
15139 `(#:modules ((guix build utils)
15140 (guix build python-build-system)
15141 (ice-9 ftw)
15142 (srfi srfi-1)
15143 (srfi srfi-26))
15144 #:phases
15145 (modify-phases %standard-phases
15146 (add-after 'unpack 'disable-proprietary-features
15147 (lambda _
15148 (setenv "NUMBA_DISABLE_HSA" "1")
15149 (setenv "NUMBA_DISABLE_CUDA" "1")
15150 #t))
15151 (add-after 'unpack 'remove-failing-tests
15152 (lambda _
15153 ;; FIXME: these tests fail for unknown reasons:
15154 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15155 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15156 (substitute* "numba/tests/test_dispatcher.py"
15157 (("def test(_non_writable_pycache)" _ m)
15158 (string-append "def guix_skip" m))
15159 (("def test(_non_creatable_pycache)" _ m)
15160 (string-append "def guix_skip" m))
15161 (("def test(_frozen)" _ m)
15162 (string-append "def guix_skip" m)))
15163
15164 ;; These tests fail because we don't run the tests from the build
15165 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15166 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15167 (substitute* "numba/tests/test_pycc.py"
15168 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15169 (string-append "def guix_skip" m)))
15170 #t))
15171 (replace 'check
15172 (lambda _
15173 (let ((cwd (getcwd)))
15174 (setenv "PYTHONPATH"
15175 (string-append cwd "/build/"
15176 (find (cut string-prefix? "lib" <>)
15177 (scandir (string-append cwd "/build")))
15178 ":"
15179 (getenv "PYTHONPATH")))
15180 ;; Something is wrong with the PYTHONPATH when running the
15181 ;; tests from the build directory, as it complains about not being
15182 ;; able to import certain modules.
15183 (with-directory-excursion "/tmp"
15184 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15185 #t)))))
15186 (propagated-inputs
15187 `(("python-llvmlite" ,python-llvmlite)
15188 ("python-numpy" ,python-numpy)
15189 ("python-singledispatch" ,python-singledispatch)))
15190 ;; Needed for tests.
15191 (inputs
15192 `(("python-jinja2" ,python-jinja2)
15193 ("python-pygments" ,python-pygments)))
15194 (home-page "https://numba.pydata.org")
15195 (synopsis "Compile Python code using LLVM")
15196 (description "Numba gives you the power to speed up your applications with
15197 high performance functions written directly in Python. With a few
15198 annotations, array-oriented and math-heavy Python code can be just-in-time
15199 compiled to native machine instructions, similar in performance to C, C++ and
15200 Fortran, without having to switch languages or Python interpreters.
15201
15202 Numba works by generating optimized machine code using the LLVM compiler
15203 infrastructure at import time, runtime, or statically (using the included pycc
15204 tool).")
15205 (license license:bsd-3)))
15206
15207 (define-public python-anndata
15208 (package
15209 (name "python-anndata")
15210 (version "0.6.18")
15211 (source
15212 (origin
15213 (method url-fetch)
15214 (uri (pypi-uri "anndata" version))
15215 (sha256
15216 (base32
15217 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15218 (build-system python-build-system)
15219 (propagated-inputs
15220 `(("python-h5py" ,python-h5py)
15221 ("python-natsort" ,python-natsort)
15222 ("python-pandas" ,python-pandas)
15223 ("python-scipy" ,python-scipy)))
15224 (home-page "https://github.com/theislab/anndata")
15225 (synopsis "Annotated data for data analysis pipelines")
15226 (description "Anndata is a package for simple (functional) high-level APIs
15227 for data analysis pipelines. In this context, it provides an efficient,
15228 scalable way of keeping track of data together with learned annotations and
15229 reduces the code overhead typically encountered when using a mostly
15230 object-oriented library such as @code{scikit-learn}.")
15231 (license license:bsd-3)))
15232
15233 (define-public python-dill
15234 (package
15235 (name "python-dill")
15236 (version "0.2.9")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "dill" version))
15241 (sha256
15242 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15243 (build-system python-build-system)
15244 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15245 (arguments '(#:tests? #f))
15246 (home-page "https://pypi.org/project/dill")
15247 (synopsis "Serialize all of Python")
15248 (description "Dill extends Python's @code{pickle} module for serializing
15249 and de-serializing Python objects to the majority of the built-in Python
15250 types. Dill provides the user the same interface as the @code{pickle} module,
15251 and also includes some additional features. In addition to pickling Python
15252 objects, @code{dill} provides the ability to save the state of an interpreter
15253 session in a single command. Hence, it would be feasible to save a
15254 interpreter session, close the interpreter, ship the pickled file to another
15255 computer, open a new interpreter, unpickle the session and thus continue from
15256 the saved state of the original interpreter session.")
15257 (license license:bsd-3)))
15258
15259 (define-public python-multiprocess
15260 (package
15261 (name "python-multiprocess")
15262 (version "0.70.6.1")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "multiprocess" version))
15267 (sha256
15268 (base32
15269 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15270 (build-system python-build-system)
15271 (propagated-inputs
15272 `(("python-dill" ,python-dill)))
15273 (home-page "https://pypi.org/project/multiprocess")
15274 (synopsis "Multiprocessing and multithreading in Python")
15275 (description
15276 "This package is a fork of the multiprocessing Python package, a package
15277 which supports the spawning of processes using the API of the standard
15278 library's @code{threading} module.")
15279 (license license:bsd-3)))
15280
15281 (define-public python-toolz
15282 (package
15283 (name "python-toolz")
15284 (version "0.9.0")
15285 (source
15286 (origin
15287 (method url-fetch)
15288 (uri (pypi-uri "toolz" version))
15289 (sha256
15290 (base32
15291 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15292 (build-system python-build-system)
15293 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15294 ;; unregistered loader type"
15295 (arguments '(#:tests? #f))
15296 (home-page "https://github.com/pytoolz/toolz/")
15297 (synopsis "List processing tools and functional utilities")
15298 (description
15299 "This package provides a set of utility functions for iterators,
15300 functions, and dictionaries.")
15301 (license license:bsd-3)))
15302
15303 (define-public python2-toolz
15304 (package-with-python2 python-toolz))
15305
15306 (define-public python-cytoolz
15307 (package
15308 (name "python-cytoolz")
15309 (version "0.9.0.1")
15310 (source
15311 (origin
15312 (method url-fetch)
15313 (uri (pypi-uri "cytoolz" version))
15314 (sha256
15315 (base32
15316 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15317 (build-system python-build-system)
15318 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15319 ;; 'exceptions'"
15320 (arguments '(#:tests? #f))
15321 (propagated-inputs
15322 `(("python-toolz" ,python-toolz)))
15323 (native-inputs
15324 `(("python-cython" ,python-cython)))
15325 (home-page "https://github.com/pytoolz/cytoolz")
15326 (synopsis "High performance functional utilities")
15327 (description
15328 "The cytoolz package implements the same API as provided by toolz. The
15329 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15330 that is accessible to other projects developed in Cython.")
15331 (license license:bsd-3)))
15332
15333 (define-public python-sortedcontainers
15334 (package
15335 (name "python-sortedcontainers")
15336 (version "2.0.4")
15337 (source
15338 (origin
15339 (method url-fetch)
15340 (uri (pypi-uri "sortedcontainers" version))
15341 (sha256
15342 (base32
15343 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15344 (build-system python-build-system)
15345 (native-inputs
15346 `(("python-tox" ,python-tox)))
15347 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15348 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15349 (description
15350 "This package provides a sorted collections library, written in
15351 pure-Python.")
15352 (license license:asl2.0)))
15353
15354 (define-public python-cloudpickle
15355 (package
15356 (name "python-cloudpickle")
15357 (version "0.6.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "cloudpickle" version))
15362 (sha256
15363 (base32
15364 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15365 (build-system python-build-system)
15366 ;; FIXME: there are 5 errors in 122 tests:
15367 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15368 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15369 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15370 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15371 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15372 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15373 (arguments '(#:tests? #f))
15374 (native-inputs
15375 `(("python-pytest" ,python-pytest)
15376 ("python-mock" ,python-mock)
15377 ("python-tornado" ,python-tornado)))
15378 (home-page "https://github.com/cloudpipe/cloudpickle")
15379 (synopsis "Extended pickling support for Python objects")
15380 (description
15381 "Cloudpickle makes it possible to serialize Python constructs not
15382 supported by the default pickle module from the Python standard library. It
15383 is especially useful for cluster computing where Python expressions are
15384 shipped over the network to execute on remote hosts, possibly close to the
15385 data.")
15386 (license license:bsd-3)))
15387
15388 (define-public python2-cloudpickle
15389 (package-with-python2 python-cloudpickle))
15390
15391 (define-public python-locket
15392 (package
15393 (name "python-locket")
15394 (version "0.2.0")
15395 (source
15396 (origin
15397 (method url-fetch)
15398 (uri (pypi-uri "locket" version))
15399 (sha256
15400 (base32
15401 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15402 (build-system python-build-system)
15403 (home-page "https://github.com/mwilliamson/locket.py")
15404 (synopsis "File-based locks for Python")
15405 (description
15406 "Locket implements a lock that can be used by multiple processes provided
15407 they use the same path.")
15408 (license license:bsd-2)))
15409
15410 (define-public python2-locket
15411 (package-with-python2 python-locket))
15412
15413 (define-public python-blosc
15414 (package
15415 (name "python-blosc")
15416 (version "1.5.1")
15417 (source
15418 (origin
15419 (method url-fetch)
15420 (uri (pypi-uri "blosc" version))
15421 (sha256
15422 (base32
15423 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15424 (build-system python-build-system)
15425 ;; FIXME: all tests pass, but then this error is printed:
15426 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15427 (arguments '(#:tests? #f))
15428 (propagated-inputs
15429 `(("python-numpy" ,python-numpy)))
15430 (home-page "https://github.com/blosc/python-blosc")
15431 (synopsis "Python wrapper for the Blosc data compressor library")
15432 (description "Blosc is a high performance compressor optimized for binary
15433 data. It has been designed to transmit data to the processor cache faster
15434 than the traditional, non-compressed, direct memory fetch approach via a
15435 @code{memcpy()} system call.
15436
15437 Blosc works well for compressing numerical arrays that contains data with
15438 relatively low entropy, like sparse data, time series, grids with
15439 regular-spaced values, etc.
15440
15441 This Python package wraps the Blosc library.")
15442 (license license:bsd-3)))
15443
15444 (define-public python2-blosc
15445 (package-with-python2 python-blosc))
15446
15447 (define-public python-partd
15448 (package
15449 (name "python-partd")
15450 (version "0.3.9")
15451 (source
15452 (origin
15453 (method url-fetch)
15454 (uri (pypi-uri "partd" version))
15455 (sha256
15456 (base32
15457 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15458 (build-system python-build-system)
15459 (propagated-inputs
15460 `(("python-blosc" ,python-blosc)
15461 ("python-locket" ,python-locket)
15462 ("python-numpy" ,python-numpy)
15463 ("python-pandas" ,python-pandas)
15464 ("python-pyzmq" ,python-pyzmq)
15465 ("python-toolz" ,python-toolz)))
15466 (home-page "https://github.com/dask/partd/")
15467 (synopsis "Appendable key-value storage")
15468 (description "Partd stores key-value pairs. Values are raw bytes. We
15469 append on old values. Partd excels at shuffling operations.")
15470 (license license:bsd-3)))
15471
15472 (define-public python2-partd
15473 (package-with-python2 python-partd))
15474
15475 (define-public python-dask
15476 (package
15477 (name "python-dask")
15478 (version "1.2.2")
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "dask" version))
15483 (sha256
15484 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15485 (build-system python-build-system)
15486 ;; A single test out of 5000+ fails. This test is marked as xfail when
15487 ;; pytest-xdist is used.
15488 (arguments
15489 `(#:phases
15490 (modify-phases %standard-phases
15491 (add-after 'unpack 'disable-broken-test
15492 (lambda _
15493 (substitute* "dask/tests/test_threaded.py"
15494 (("def test_interrupt\\(\\)" m)
15495 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15496 m)))
15497 (when (which "python2")
15498 ;; This test fails with recent Pandas:
15499 ;; <https://github.com/dask/dask/issues/3794>.
15500 (substitute* "dask/dataframe/tests/test_dataframe.py"
15501 (("def test_info\\(\\)" m)
15502 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15503 m))))
15504 #t))
15505 (replace 'check
15506 (lambda _ (invoke "pytest" "-vv"))))))
15507 (propagated-inputs
15508 `(("python-cloudpickle" ,python-cloudpickle)
15509 ("python-numpy" ,python-numpy)
15510 ("python-pandas" ,python-pandas)
15511 ("python-partd" ,python-partd)
15512 ("python-toolz" ,python-toolz)
15513 ("python-pyyaml" ,python-pyyaml)))
15514 (native-inputs
15515 `(("python-pytest" ,python-pytest)
15516 ("python-pytest-runner" ,python-pytest-runner)))
15517 (home-page "https://github.com/dask/dask/")
15518 (synopsis "Parallel computing with task scheduling")
15519 (description
15520 "Dask is a flexible parallel computing library for analytics. It
15521 consists of two components: dynamic task scheduling optimized for computation,
15522 and large data collections like parallel arrays, dataframes, and lists that
15523 extend common interfaces like NumPy, Pandas, or Python iterators to
15524 larger-than-memory or distributed environments. These parallel collections
15525 run on top of the dynamic task schedulers. ")
15526 (license license:bsd-3)))
15527
15528 (define-public python2-dask
15529 (package-with-python2 python-dask))
15530
15531 (define-public python-ilinkedlist
15532 (package
15533 (name "python-ilinkedlist")
15534 (version "0.4.0")
15535 (source
15536 (origin
15537 (method url-fetch)
15538 (uri (pypi-uri "ilinkedlist" version))
15539 (sha256
15540 (base32
15541 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15542 (build-system python-build-system)
15543 (native-inputs `(("python-pytest" ,python-pytest)))
15544 (inputs `(("python" ,python)))
15545 (home-page "https://github.com/luther9/ilinkedlist-py")
15546 (synopsis "Immutable linked list library")
15547 (description
15548 "This is a implementation of immutable linked lists for Python. It
15549 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15550 Since a linked list is treated as immutable, it is hashable, and its length
15551 can be retrieved in constant time. Some of the terminology is inspired by
15552 LISP. It is possible to create an improper list by creating a @code{Pair}
15553 with a non-list @code{cdr}.")
15554 (license license:gpl3+)))
15555
15556 (define-public python-readlike
15557 (package
15558 (name "python-readlike")
15559 (version "0.1.3")
15560 (source
15561 (origin
15562 (method url-fetch)
15563 (uri (pypi-uri "readlike" version))
15564 (sha256
15565 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15566 (build-system python-build-system)
15567 (home-page "https://github.com/jangler/readlike")
15568 (synopsis "GNU Readline-like line editing module")
15569 (description
15570 "This Python module provides line editing functions similar to the default
15571 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15572 @code{readline} package, this one allows access to those capabilties in settings
15573 outside of a standard command-line interface. It is especially well-suited to
15574 interfacing with Urwid, due to a shared syntax for describing key inputs.
15575
15576 Currently, all stateless Readline commands are implemented. Yanking and history
15577 are not supported.")
15578 (license license:expat)))
15579
15580 (define-public python2-readlike
15581 (package-with-python2 python-readlike))
15582
15583 (define-public python-reparser
15584 (package
15585 (name "python-reparser")
15586 (version "1.4.3")
15587 (source
15588 (origin
15589 (method url-fetch)
15590 (uri (pypi-uri "ReParser" version))
15591 (sha256
15592 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15593 (build-system python-build-system)
15594 (home-page "https://github.com/xmikos/reparser")
15595 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15596 (description
15597 "This Python library provides a simple lexer/parser for inline markup based
15598 on regular expressions.")
15599 (license license:expat)))
15600
15601 (define-public python2-reparser
15602 (let ((reparser (package-with-python2
15603 (strip-python2-variant python-reparser))))
15604 (package (inherit reparser)
15605 (propagated-inputs
15606 `(("python2-enum34" ,python2-enum34)
15607 ,@(package-propagated-inputs reparser))))))
15608
15609 (define-public python-precis-i18n
15610 (package
15611 (name "python-precis-i18n")
15612 (version "1.0.0")
15613 (source
15614 (origin
15615 (method url-fetch)
15616 (uri (pypi-uri "precis_i18n" version))
15617 (sha256
15618 (base32
15619 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/byllyfish/precis_i18n")
15622 (synopsis "Implementation of the PRECIS framework")
15623 (description
15624 "This module implements the PRECIS Framework as described in RFC 8264,
15625 RFC 8265 and RFC 8266.")
15626 (license license:expat)))
15627
15628 (define-public python-absl-py
15629 (package
15630 (name "python-absl-py")
15631 (version "0.6.1")
15632 (source
15633 (origin
15634 (method url-fetch)
15635 (uri (pypi-uri "absl-py" version))
15636 (sha256
15637 (base32
15638 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15639 (build-system python-build-system)
15640 (propagated-inputs
15641 `(("python-six" ,python-six)))
15642 (home-page "https://github.com/abseil/abseil-py")
15643 (synopsis "Abseil Python common libraries")
15644 (description
15645 "This package provides the Abseil Python Common Libraries, a collection
15646 of Python libraries for building Python applications.")
15647 (license license:asl2.0)))
15648
15649 (define-public python-astor
15650 (package
15651 (name "python-astor")
15652 (version "0.7.1")
15653 (source
15654 (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "astor" version))
15657 (sha256
15658 (base32
15659 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15660 (build-system python-build-system)
15661 ;; FIXME: There are two errors and two test failures.
15662 (arguments `(#:tests? #f))
15663 (home-page "https://github.com/berkerpeksag/astor")
15664 (synopsis "Read and write Python ASTs")
15665 (description "Astor is designed to allow easy manipulation of Python
15666 source via the Abstract Syntax Tree.")
15667 (license license:bsd-3)))
15668
15669 (define-public python2-astor
15670 (package-with-python2 python-astor))
15671
15672 (define-public python-grpcio
15673 (package
15674 (name "python-grpcio")
15675 (version "1.17.1")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "grpcio" version))
15680 (sha256
15681 (base32
15682 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15683 (build-system python-build-system)
15684 (propagated-inputs
15685 `(("python-six" ,python-six)))
15686 (home-page "https://grpc.io")
15687 (synopsis "HTTP/2-based RPC framework")
15688 (description "This package provides a Python library for communicating
15689 with the HTTP/2-based RPC framework gRPC.")
15690 (license license:asl2.0)))
15691
15692 (define-public python-astunparse
15693 (package
15694 (name "python-astunparse")
15695 (version "1.6.2")
15696 (source
15697 (origin
15698 (method url-fetch)
15699 (uri (pypi-uri "astunparse" version))
15700 (sha256
15701 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15702 (build-system python-build-system)
15703 (arguments '(#:tests? #f)) ; there are none
15704 (propagated-inputs
15705 `(("python-six" ,python-six)
15706 ("python-wheel" ,python-wheel)))
15707 (home-page "https://github.com/simonpercivall/astunparse")
15708 (synopsis "AST unparser for Python")
15709 (description "This package provides an AST unparser for Python. It is a
15710 factored out version of @code{unparse} found in the Python source
15711 distribution.")
15712 (license license:bsd-3)))
15713
15714 (define-public python-gast
15715 (package
15716 (name "python-gast")
15717 (version "0.2.2")
15718 (source
15719 (origin
15720 (method url-fetch)
15721 (uri (pypi-uri "gast" version))
15722 (sha256
15723 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15724 (build-system python-build-system)
15725 (propagated-inputs
15726 `(("python-astunparse" ,python-astunparse)))
15727 (home-page "https://pypi.org/project/gast/")
15728 (synopsis "Generic Python AST that abstracts the underlying Python version")
15729 (description
15730 "GAST provides a compatibility layer between the AST of various Python
15731 versions, as produced by @code{ast.parse} from the standard @code{ast}
15732 module.")
15733 (license license:bsd-3)))
15734
15735 (define-public python-wikidata
15736 (package
15737 (name "python-wikidata")
15738 (version "0.6.1")
15739 (source
15740 (origin
15741 (method url-fetch)
15742 (uri (pypi-uri "Wikidata" version))
15743 (sha256
15744 (base32
15745 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15746 (build-system python-build-system)
15747 (propagated-inputs
15748 `(("python-babel" ,python-babel)))
15749 (home-page "https://github.com/dahlia/wikidata")
15750 (synopsis "Wikidata client library")
15751 (description
15752 "This package provides a Python interface to
15753 @url{https://www.wikidata.org/, Wikidata}.")
15754 (properties '((upstream-name . "Wikidata")))
15755 (license license:gpl3+)))
15756
15757 (define-public python-doctest-ignore-unicode
15758 (package
15759 (name "python-doctest-ignore-unicode")
15760 (version "0.1.2")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (pypi-uri "doctest-ignore-unicode" version))
15765 (sha256
15766 (base32
15767 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15768 (build-system python-build-system)
15769 (native-inputs
15770 `(("python-nose" ,python-nose)))
15771 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15772 (synopsis "Ignore Unicode literal prefixes in doctests")
15773 (description
15774 "This package adds support for a flag to ignore Unicode literal prefixes
15775 in doctests.")
15776 (license license:asl2.0)))
15777
15778 (define-public python-attr
15779 (package
15780 (name "python-attr")
15781 (version "0.3.1")
15782 (source
15783 (origin
15784 (method url-fetch)
15785 (uri (pypi-uri "attr" version))
15786 (sha256
15787 (base32
15788 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15789 (build-system python-build-system)
15790 (home-page "https://github.com/denis-ryzhkov/attr")
15791 (synopsis "Decorator for attributes of target function or class")
15792 (description "Simple decorator to set attributes of target function or
15793 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15794 (license license:expat)))
15795
15796 (define-public python-construct
15797 (package
15798 (name "python-construct")
15799 (version "2.9.45")
15800 (source
15801 (origin
15802 (method url-fetch)
15803 (uri (pypi-uri "construct" version))
15804 (sha256
15805 (base32
15806 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15807 (build-system python-build-system)
15808 (arguments
15809 `(#:tests? #f)) ; No tests exist.
15810 (propagated-inputs
15811 `(("python-extras" ,python-extras)
15812 ("python-arrow" ,python-arrow)
15813 ("python-numpy" ,python-numpy)
15814 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15815 (home-page "http://construct.readthedocs.io")
15816 (synopsis "Declarative and symmetrical parser and builder for binary data")
15817 (description
15818 "This package provides both simple, atomic constructs (such as
15819 integers of various sizes), as well as composite ones which allow you
15820 form hierarchical and sequential structures of increasing complexity.
15821 It features bit and byte granularity, easy debugging and testing, an
15822 easy-to-extend subclass system, and lots of primitive constructs to
15823 make your work easier.")
15824 (license license:expat)))
15825
15826 (define-public python-humanize
15827 (package
15828 (name "python-humanize")
15829 (version "0.5.1")
15830 (source
15831 (origin
15832 (method url-fetch)
15833 (uri (pypi-uri "humanize" version))
15834 (sha256
15835 (base32
15836 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15837 (arguments
15838 '(#:tests? #f)) ; tests not in pypi archive
15839 (build-system python-build-system)
15840 (home-page "https://github.com/jmoiron/humanize")
15841 (synopsis "Print numerical information in a human-readable form")
15842 (description "This package provides a Python module that displays numbers
15843 and dates in \"human readable\" forms. For example, it would display
15844 \"12345591313\" as \"12.3 billion\".")
15845 (license license:expat)))
15846
15847 (define-public python-txaio
15848 (package
15849 (name "python-txaio")
15850 (version "18.8.1")
15851 (source
15852 (origin
15853 (method url-fetch)
15854 (uri (pypi-uri "txaio" version))
15855 (sha256
15856 (base32
15857 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15858 (build-system python-build-system)
15859 (propagated-inputs
15860 `(("python-twisted" ,python-twisted)
15861 ("python-six" ,python-six)))
15862 (home-page "https://github.com/crossbario/txaio")
15863 (synopsis "Compatibility layer between Python asyncio and Twisted")
15864 (description "Txaio provides a compatibility layer between the Python
15865 @code{asyncio} module and @code{Twisted}.")
15866 (license license:expat)))
15867
15868 (define-public python-toolshed
15869 (package
15870 (name "python-toolshed")
15871 (version "0.4.6")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "toolshed" version))
15876 (sha256
15877 (base32
15878 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15879 (build-system python-build-system)
15880 (native-inputs
15881 `(("python-nose" ,python-nose)))
15882 (home-page "https://github.com/brentp/toolshed/")
15883 (synopsis "Collection of modules and functions for working with data")
15884 (description "This is a collection of well-tested, simple modules and
15885 functions that aim to reduce boilerplate when working with data.")
15886 (license license:bsd-2)))
15887
15888 (define-public python-annoy
15889 (package
15890 (name "python-annoy")
15891 (version "1.15.1")
15892 (source
15893 (origin
15894 (method url-fetch)
15895 (uri (pypi-uri "annoy" version))
15896 (sha256
15897 (base32
15898 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15899 (build-system python-build-system)
15900 (native-inputs
15901 `(("python-nose" ,python-nose)))
15902 (home-page "https://github.com/spotify/annoy/")
15903 (synopsis "Approximate nearest neighbors library")
15904 (description
15905 "Annoy is a C++ library with Python bindings to search for points in
15906 space that are close to a given query point. It also creates large read-only
15907 file-based data structures that are @code{mmap}ped into memory so that many
15908 processes may share the same data.")
15909 (license license:asl2.0)))
15910
15911 (define-public python-pylzma
15912 (package
15913 (name "python-pylzma")
15914 (version "0.5.0")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "pylzma" version))
15919 (sha256
15920 (base32
15921 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15922 (build-system python-build-system)
15923 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15924 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15925 (description "This package provides Python bindings for the LZMA library
15926 by Igor Pavlov.")
15927 (license license:lgpl2.1+)))
15928
15929 (define-public python2-pylzma
15930 (package-with-python2 python-pylzma))
15931
15932 (define-public python2-zeroconf
15933 (package
15934 (name "python2-zeroconf")
15935
15936 ;; This is the last version that supports Python 2.x.
15937 (version "0.19.1")
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "zeroconf" version))
15942 (sha256
15943 (base32
15944 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15945 (build-system python-build-system)
15946 (arguments
15947 `(#:python ,python-2
15948 #:phases
15949 (modify-phases %standard-phases
15950 (add-after 'unpack 'patch-requires
15951 (lambda* (#:key inputs #:allow-other-keys)
15952 (substitute* "setup.py"
15953 (("enum-compat")
15954 "enum34"))
15955 #t)))))
15956 (native-inputs
15957 `(("python2-six" ,python2-six)
15958 ("python2-enum32" ,python2-enum34)
15959 ("python2-netifaces" ,python2-netifaces)
15960 ("python2-typing" ,python2-typing)))
15961 (home-page "https://github.com/jstasiak/python-zeroconf")
15962 (synopsis "Pure Python mDNS service discovery")
15963 (description
15964 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15965 compatible).")
15966 (license license:lgpl2.1+)))
15967
15968 (define-public python-bsddb3
15969 (package
15970 (name "python-bsddb3")
15971 (version "6.2.6")
15972 (source
15973 (origin
15974 (method url-fetch)
15975 (uri (pypi-uri "bsddb3" version))
15976 (sha256
15977 (base32
15978 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15979 (build-system python-build-system)
15980 (inputs
15981 `(("bdb" ,bdb)))
15982 (arguments
15983 '(#:phases
15984 (modify-phases %standard-phases
15985 (add-after 'unpack 'configure-locations
15986 (lambda* (#:key inputs #:allow-other-keys)
15987 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15988 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15989 #t))
15990 (replace 'check
15991 (lambda _
15992 (invoke "python3" "test3.py" "-v"))))))
15993 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15994 (synopsis "Python bindings for Oracle Berkeley DB")
15995 (description
15996 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15997 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15998 Transaction objects, and each of these is exposed as a Python type in the
15999 bsddb3.db module. The database objects can use various access methods: btree,
16000 hash, recno, and queue. Complete support of Berkeley DB distributed
16001 transactions. Complete support for Berkeley DB Replication Manager.
16002 Complete support for Berkeley DB Base Replication. Support for RPC.")
16003 (license license:bsd-3)))
16004
16005 (define-public python-dbfread
16006 (package
16007 (name "python-dbfread")
16008 (version "2.0.7")
16009 (source (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "dbfread" version))
16012 (sha256
16013 (base32
16014 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16015 (build-system python-build-system)
16016 (native-inputs
16017 `(("python-pytest" ,python-pytest)))
16018 (home-page "https://dbfread.readthedocs.io")
16019 (synopsis "Read DBF Files with Python")
16020 (description
16021 "This library reads DBF files and returns the data as native Python data
16022 types for further processing. It is primarily intended for batch jobs and
16023 one-off scripts.")
16024 (license license:expat)))
16025
16026 (define-public python-cached-property
16027 (package
16028 (name "python-cached-property")
16029 (version "1.5.1")
16030 (source
16031 (origin
16032 (method url-fetch)
16033 (uri (pypi-uri "cached-property" version))
16034 (sha256
16035 (base32
16036 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16037 (build-system python-build-system)
16038 (arguments
16039 `(#:phases
16040 (modify-phases %standard-phases
16041 ;; https://github.com/pydanny/cached-property/issues/131
16042 ;; recent versions of freezegun break one test
16043 (add-after 'unpack 'disable-broken-test
16044 (lambda _
16045 (substitute* "tests/test_cached_property.py"
16046 (("def test_threads_ttl_expiry\\(self\\)" m)
16047 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16048 " " m)))
16049 #t)))))
16050 (native-inputs
16051 `(("python-freezegun" ,python-freezegun)))
16052 (home-page
16053 "https://github.com/pydanny/cached-property")
16054 (synopsis
16055 "Decorator for caching properties in classes")
16056 (description
16057 "This package provides a decorator which makes caching
16058 time-or-computationally-expensive properties quick and easy and works in Python
16059 2 or 3.")
16060 (license license:bsd-3)))
16061
16062 (define-public python-folium
16063 (package
16064 (name "python-folium")
16065 (version "0.10.0")
16066 (source
16067 (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "folium" version))
16070 (sha256
16071 (base32
16072 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16073 (build-system python-build-system)
16074 (propagated-inputs
16075 `(("python-branca" ,python-branca)
16076 ("python-jinja2" ,python-jinja2)
16077 ("python-numpy" ,python-numpy)
16078 ("python-requests" ,python-requests)))
16079 (native-inputs
16080 `(("python-pytest" ,python-pytest)))
16081 (home-page "https://github.com/python-visualization/folium")
16082 (synopsis "Make beautiful maps with Leaflet.js & Python")
16083 (description "@code{folium} makes it easy to visualize data that’s been
16084 manipulated in Python on an interactive leaflet map. It enables both the
16085 binding of data to a map for @code{choropleth} visualizations as well as
16086 passing rich vector/raster/HTML visualizations as markers on the map.
16087
16088 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16089 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16090 supports Image, Video, GeoJSON and TopoJSON overlays.")
16091 (license license:expat)))
16092
16093 (define-public jube
16094 (package
16095 ;; This is a command-line tool, so no "python-" prefix.
16096 (name "jube")
16097 (version "2.2.2")
16098 (source (origin
16099 (method url-fetch)
16100 (uri (string-append
16101 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16102 version))
16103 (sha256
16104 (base32
16105 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16106 (file-name (string-append "jube-" version ".tar.gz"))))
16107 (build-system python-build-system)
16108 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16109 (synopsis "Benchmarking environment")
16110 (description
16111 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16112 benchmarked application, benchmark data is stored in a format that allows JUBE
16113 to deduct the desired information. This data can be parsed by automatic pre-
16114 and post-processing scripts that draw information and store it more densely
16115 for manual interpretation.")
16116 (license license:gpl3+)))
16117
16118 (define-public python-pyroutelib3
16119 (package
16120 (name "python-pyroutelib3")
16121 (version "1.3.post1")
16122 (source
16123 (origin
16124 (method url-fetch)
16125 (uri (pypi-uri "pyroutelib3" version))
16126 (sha256
16127 (base32
16128 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16129 (build-system python-build-system)
16130 (propagated-inputs
16131 `(("python-dateutil" ,python-dateutil)))
16132 (home-page "https://github.com/MKuranowski/pyroutelib3")
16133 (synopsis "Library for simple routing on OSM data")
16134 (description "Library for simple routing on OSM data")
16135 (license license:gpl3+)))
16136
16137 (define-public python-elementpath
16138 (package
16139 (name "python-elementpath")
16140 (version "1.2.0")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "elementpath" version))
16145 (sha256
16146 (base32
16147 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16148 (build-system python-build-system)
16149 (home-page
16150 "https://github.com/sissaschool/elementpath")
16151 (synopsis
16152 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16153 (description
16154 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16155 for Python's ElementTree XML data structures, both for the standard
16156 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16157
16158 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16159 because lxml.etree already has it's own implementation of XPath 1.0.")
16160 (license license:expat)))