gnu: tensorflow: Provide older setuptools version.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;;
68 ;;; This file is part of GNU Guix.
69 ;;;
70 ;;; GNU Guix is free software; you can redistribute it and/or modify it
71 ;;; under the terms of the GNU General Public License as published by
72 ;;; the Free Software Foundation; either version 3 of the License, or (at
73 ;;; your option) any later version.
74 ;;;
75 ;;; GNU Guix is distributed in the hope that it will be useful, but
76 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
77 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 ;;; GNU General Public License for more details.
79 ;;;
80 ;;; You should have received a copy of the GNU General Public License
81 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
82
83 (define-module (gnu packages python-xyz)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages adns)
88 #:use-module (gnu packages attr)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages bash)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages compression)
93 #:use-module (gnu packages crypto)
94 #:use-module (gnu packages databases)
95 #:use-module (gnu packages dbm)
96 #:use-module (gnu packages file)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages gcc)
99 #:use-module (gnu packages geo)
100 #:use-module (gnu packages ghostscript)
101 #:use-module (gnu packages gl)
102 #:use-module (gnu packages glib)
103 #:use-module (gnu packages graphviz)
104 #:use-module (gnu packages graphics)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages icu4c)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages libffi)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages llvm)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages maths)
116 #:use-module (gnu packages monitoring)
117 #:use-module (gnu packages multiprecision)
118 #:use-module (gnu packages networking)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages openstack)
121 #:use-module (gnu packages pcre)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages python)
125 #:use-module (gnu packages python-check)
126 #:use-module (gnu packages python-compression)
127 #:use-module (gnu packages python-crypto)
128 #:use-module (gnu packages python-web)
129 #:use-module (gnu packages qt)
130 #:use-module (gnu packages readline)
131 #:use-module (gnu packages sdl)
132 #:use-module (gnu packages search)
133 #:use-module (gnu packages shells)
134 #:use-module (gnu packages sphinx)
135 #:use-module (gnu packages ssh)
136 #:use-module (gnu packages terminals)
137 #:use-module (gnu packages tex)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages time)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages version-control)
142 #:use-module (gnu packages video)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages base)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xdisorg)
148 #:use-module (gnu packages tcl)
149 #:use-module (gnu packages bdw-gc)
150 #:use-module (gnu packages serialization)
151 #:use-module (guix packages)
152 #:use-module (guix download)
153 #:use-module (guix git-download)
154 #:use-module (guix hg-download)
155 #:use-module (guix utils)
156 #:use-module (guix build-system gnu)
157 #:use-module (guix build-system cmake)
158 #:use-module (guix build-system python)
159 #:use-module (guix build-system trivial)
160 #:use-module (srfi srfi-1)
161 #:use-module (srfi srfi-26))
162
163 (define-public python-psutil
164 (package
165 (name "python-psutil")
166 (version "5.6.2")
167 (source
168 (origin
169 (method url-fetch)
170 (uri (pypi-uri "psutil" version))
171 (sha256
172 (base32
173 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
174 (build-system python-build-system)
175 (arguments
176 ;; FIXME: some tests does not return and times out.
177 '(#:tests? #f))
178 (home-page "https://www.github.com/giampaolo/psutil")
179 (synopsis "Library for retrieving information on running processes")
180 (description
181 "psutil (Python system and process utilities) is a library for retrieving
182 information on running processes and system utilization (CPU, memory, disks,
183 network) in Python. It is useful mainly for system monitoring, profiling and
184 limiting process resources and management of running processes. It implements
185 many functionalities offered by command line tools such as: ps, top, lsof,
186 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
187 pidof, tty, taskset, pmap.")
188 (properties `((python2-variant . ,(delay python2-psutil))))
189 (license license:bsd-3)))
190
191 (define-public python2-psutil
192 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
193 (package
194 (inherit base)
195 (propagated-inputs
196 `(("python2-enum34" ,python2-enum34) ;optional
197 ,@(package-propagated-inputs base))))))
198
199 (define-public python-shapely
200 (package
201 (name "python-shapely")
202 (version "1.6.4.post2")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "Shapely" version))
207 (sha256
208 (base32
209 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
210 (build-system python-build-system)
211 (native-inputs
212 `(("python-cython" ,python-cython)
213 ("python-matplotlib" ,python-matplotlib)
214 ("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)))
216 (inputs
217 `(("geos" ,geos)))
218 (propagated-inputs
219 `(("python-numpy" ,python-numpy)))
220 (arguments
221 `(#:phases
222 (modify-phases %standard-phases
223 (add-after 'unpack 'patch-geos-path
224 (lambda* (#:key inputs #:allow-other-keys)
225 (let ((geos (assoc-ref inputs "geos"))
226 (glibc (assoc-ref inputs ,(if (%current-target-system)
227 "cross-libc" "libc"))))
228 (substitute* "shapely/geos.py"
229 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
230 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
231 geos "/lib/libgeos_c.so'])"))
232 (("free = load_dll\\('c'\\)\\.free")
233 (string-append "free = load_dll('c', fallbacks=['"
234 glibc "/lib/libc.so.6']).free"))))
235 #t)))))
236 (home-page "https://github.com/Toblerity/Shapely")
237 (synopsis "Library for the manipulation and analysis of geometric objects")
238 (description "Shapely is a Python package for manipulation and analysis of
239 planar geometric objects. It is based on the @code{GEOS} library.")
240 (license license:bsd-3)))
241
242 (define-public python-shortuuid
243 (package
244 (name "python-shortuuid")
245 (version "0.5.0")
246 (source
247 (origin
248 (method url-fetch)
249 (uri (pypi-uri "shortuuid" version))
250 (sha256
251 (base32
252 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
253 (build-system python-build-system)
254 (native-inputs
255 `(("python-pep8" ,python-pep8)))
256 (home-page "https://github.com/skorokithakis/shortuuid")
257 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
258 (description
259 "@code{shortuuid} is a Python library for generating concise, unambiguous
260 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
261 module and then similar looking characters are removed.")
262 (license license:bsd-3)))
263
264 (define-public python-logwrap
265 (package
266 (name "python-logwrap")
267 (version "3.2.1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "logwrap" version ".zip"))
272 (sha256
273 (base32
274 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
275 (build-system python-build-system)
276 (propagated-inputs
277 `(("python-six" ,python-six)
278 ("python-typing" ,python-typing)))
279 (native-inputs
280 `(("unzip" ,unzip)
281 ("python-cython" ,python-cython)
282 ("python-pytest" ,python-pytest)
283 ("python-pytest-cov" ,python-pytest-cov)
284 ("python-pytest-runner" ,python-pytest-runner)))
285 (home-page "https://github.com/penguinolog/logwrap")
286 (synopsis "Decorator for logging function arguments")
287 (description "This package provides a decorator to log function arguments
288 and function call return values in a human-readable way.")
289 (license license:asl2.0)))
290
291 (define-public python2-shapely
292 (package-with-python2 python-shapely))
293
294 (define-public python-clyent
295 (package
296 (name "python-clyent")
297 (version "1.2.1")
298 (source
299 (origin
300 (method url-fetch)
301 (uri (pypi-uri "clyent" version))
302 (sha256
303 (base32
304 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
305 (build-system python-build-system)
306 (native-inputs
307 `(("python-mock" ,python-mock)))
308 (home-page "https://github.com/binstar/clyent")
309 (synopsis "Command line client library")
310 (description "Clyent is a Python command line utiliy library. It is used
311 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
312 (license license:bsd-3)))
313
314 (define-public python2-clyent
315 (package-with-python2 python-clyent))
316
317 (define-public python-babel
318 (package
319 (name "python-babel")
320 (version "2.7.0")
321 (source
322 (origin
323 (method url-fetch)
324 (uri (pypi-uri "Babel" version))
325 (sha256
326 (base32
327 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
328 (build-system python-build-system)
329 (native-inputs
330 `(("python-freezegun" ,python-freezegun)
331 ("python-pytest" ,python-pytest)))
332 (propagated-inputs
333 `(("python-pytz" ,python-pytz)))
334 (arguments
335 `(#:phases (modify-phases %standard-phases
336 (replace 'check
337 (lambda _
338 (invoke "pytest" "-vv" "-k"
339 (string-append
340 ;; XXX: These tests fail when using Pytest 4.x and
341 ;; Babel 2.6.0. Try removing this for later versions.
342 "not test_no_inherit_metazone_marker_never_in_output"
343 " and not test_smoke_dates"
344 " and not test_smoke_numbers")))))))
345 (home-page "http://babel.pocoo.org/")
346 (synopsis
347 "Tools for internationalizing Python applications")
348 (description
349 "Babel is composed of two major parts:
350 - tools to build and work with gettext message catalogs
351 - a Python interface to the CLDR (Common Locale Data Repository), providing
352 access to various locale display names, localized number and date formatting,
353 etc. ")
354 (license license:bsd-3)))
355
356 (define-public python2-babel
357 (package-with-python2 python-babel))
358
359 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
360 (define-public python2-babel-2.6
361 (package
362 (inherit python2-babel)
363 (version "2.6.0")
364 (source (origin
365 (method url-fetch)
366 (uri (pypi-uri "Babel" version))
367 (sha256
368 (base32
369 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
370
371 (define-public python2-backport-ssl-match-hostname
372 (package
373 (name "python2-backport-ssl-match-hostname")
374 (version "3.5.0.1")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (pypi-uri "backports.ssl_match_hostname" version))
379 (sha256
380 (base32
381 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
382 (build-system python-build-system)
383 (arguments
384 `(#:python ,python-2
385 #:tests? #f)) ; no test target
386 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
387 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
388 (description
389 "This backport brings the ssl.match_hostname() function to users of
390 earlier versions of Python. The function checks the hostname in the
391 certificate returned by the server to which a connection has been established,
392 and verifies that it matches the intended target hostname.")
393 (license license:psfl)))
394
395 (define-public python-hdf4
396 (package
397 (name "python-hdf4")
398 (version "0.9")
399 (source
400 (origin
401 (method url-fetch)
402 (uri (pypi-uri name version))
403 (sha256
404 (base32
405 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
406 (build-system python-build-system)
407 (native-inputs `(("nose" ,python-nose)))
408 (propagated-inputs `(("numpy" ,python-numpy)))
409 (inputs
410 `(("hdf4" ,hdf4)
411 ("libjpeg" ,libjpeg)
412 ("zlib" ,zlib)))
413 (arguments
414 `(#:phases
415 (modify-phases %standard-phases
416 (replace 'check
417 (lambda _
418 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
419 ;; on to import numpy. Somehow this works on their CI system.
420 ;; Let's just manage PYTHONPATH here instead.
421 (substitute* "runexamples.sh"
422 (("export PYTHONPATH=.*") ""))
423 (setenv "PYTHONPATH"
424 (string-append (getcwd) ":"
425 (getenv "PYTHONPATH")))
426 (invoke "./runexamples.sh")
427 (invoke "nosetests" "-v"))))))
428 (home-page "https://github.com/fhs/python-hdf4")
429 (synopsis "Python interface to the NCSA HDF4 library")
430 (description
431 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
432 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
433 NetCDF files can also be read and modified. Python-HDF4 is a fork of
434 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
435 (license license:expat)))
436
437 (define-public python2-hdf4
438 (package-with-python2 python-hdf4))
439
440 (define-public python-h5py
441 (package
442 (name "python-h5py")
443 (version "2.8.0")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "h5py" version))
448 (sha256
449 (base32
450 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
451 (build-system python-build-system)
452 (arguments
453 `(#:tests? #f ; no test target
454 #:phases
455 (modify-phases %standard-phases
456 (add-after 'unpack 'fix-hdf5-paths
457 (lambda* (#:key inputs #:allow-other-keys)
458 (let ((prefix (assoc-ref inputs "hdf5")))
459 (substitute* "setup_build.py"
460 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
461 (string-append "['" prefix "/lib" "']"))
462 (("'/opt/local/include', '/usr/local/include'")
463 (string-append "'" prefix "/include" "'")))
464 (substitute* "setup_configure.py"
465 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
466 (string-append "['" prefix "/lib" "']")))
467 #t))))))
468 (propagated-inputs
469 `(("python-six" ,python-six)
470 ("python-numpy" ,python-numpy)))
471 (inputs
472 `(("hdf5" ,hdf5)))
473 (native-inputs
474 `(("python-cython" ,python-cython)
475 ("python-pkgconfig" ,python-pkgconfig)))
476 (home-page "http://www.h5py.org/")
477 (synopsis "Read and write HDF5 files from Python")
478 (description
479 "The h5py package provides both a high- and low-level interface to the
480 HDF5 library from Python. The low-level interface is intended to be a
481 complete wrapping of the HDF5 API, while the high-level component supports
482 access to HDF5 files, datasets and groups using established Python and NumPy
483 concepts.")
484 (license license:bsd-3)))
485
486 (define-public python2-h5py
487 (package-with-python2 python-h5py))
488
489 (define-public python-sh
490 (package
491 (name "python-sh")
492 (version "1.12.14")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "sh" version))
497 (sha256
498 (base32
499 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
500 (build-system python-build-system)
501 (arguments
502 '(#:phases
503 (modify-phases %standard-phases
504 (replace 'check
505 (lambda _
506 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
507 (setenv "HOME" "/tmp")
508 (invoke "python" "sh.py" "test"))))))
509 (native-inputs
510 `(("python-coverage" ,python-coverage)))
511 (home-page "https://github.com/amoffat/sh")
512 (synopsis "Python subprocess replacement")
513 (description "This package provides a replacement for Python's
514 @code{subprocess} feature.")
515 (license license:expat)))
516
517 (define-public python2-sh
518 (package-with-python2 python-sh))
519
520 (define-public python-cftime
521 (package
522 (name "python-cftime")
523 (version "1.0.3.4")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "cftime" version))
528 (sha256
529 (base32
530 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
531 (build-system python-build-system)
532 (propagated-inputs
533 `(("python-numpy" ,python-numpy)))
534 (native-inputs
535 `(("python-coveralls" ,python-coveralls)
536 ("python-cython" ,python-cython)
537 ("python-pytest-cov" ,python-pytest-cov)))
538 (home-page "https://github.com/Unidata/cftime")
539 (synopsis "Library for time handling")
540 (description
541 "This package provides time-handling functionality that used to be part
542 of the netcdf4 package before.")
543 ;; This package claims to include code under the GPLv3 but is released
544 ;; under ISC.
545 (license (list license:isc license:gpl3+))))
546
547 (define-public python-netcdf4
548 (package
549 (name "python-netcdf4")
550 (version "1.4.2")
551 (source
552 (origin
553 (method url-fetch)
554 (uri (pypi-uri "netCDF4" version))
555 (sha256
556 (base32
557 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
558 (build-system python-build-system)
559 (arguments
560 '(#:phases
561 (modify-phases %standard-phases
562 (add-after 'unpack 'configure-locations
563 (lambda* (#:key inputs #:allow-other-keys)
564 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
565 #t)))))
566 (native-inputs
567 `(("python-cython" ,python-cython)))
568 (propagated-inputs
569 `(("python-numpy" ,python-numpy)
570 ("python-cftime" ,python-cftime)))
571 (inputs
572 `(("netcdf" ,netcdf)
573 ("hdf4" ,hdf4)
574 ("hdf5" ,hdf5)))
575 (home-page "https://github.com/Unidata/netcdf4-python")
576 (synopsis "Python/numpy interface to the netCDF library")
577 (description "Netcdf4-python is a Python interface to the netCDF C
578 library. netCDF version 4 has many features not found in earlier
579 versions of the library and is implemented on top of HDF5. This module
580 can read and write files in both the new netCDF 4 and the old netCDF 3
581 format, and can create files that are readable by HDF5 clients. The
582 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
583 to users of that module.")
584 ;; The software is mainly ISC, but includes some files covered
585 ;; by the Expat license.
586 (license (list license:isc license:expat))))
587
588 (define-public python2-netcdf4
589 (package-with-python2 python-netcdf4))
590
591 (define-public python-lockfile
592 (package
593 (name "python-lockfile")
594 (version "0.12.2")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "lockfile" version))
599 (sha256
600 (base32
601 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
602 (build-system python-build-system)
603 (arguments '(#:test-target "check"))
604 (native-inputs
605 `(("python-pbr" ,python-pbr)))
606 (home-page "https://launchpad.net/pylockfile")
607 (synopsis "Platform-independent file locking module")
608 (description
609 "The lockfile package exports a LockFile class which provides a simple
610 API for locking files.")
611 (license license:expat)))
612
613 (define-public python2-lockfile
614 (package-with-python2 python-lockfile))
615
616 (define-public python-semantic-version
617 (package
618 (name "python-semantic-version")
619 (version "2.6.0")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (pypi-uri "semantic_version" version))
624 (sha256
625 (base32
626 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
627 (build-system python-build-system)
628 (arguments
629 `(#:tests? #f)) ; PyPI tarball lacks tests
630 (home-page "https://github.com/rbarrois/python-semanticversion")
631 (synopsis "Semantic versioning module for Python")
632 (description
633 "The @code{semantic_version} class is a small library for handling
634 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
635
636 It can compare versions, generate a new version that represents a bump in one of
637 the version levels, and check whether any given string is a proper semantic
638 version identifier.")
639 (license license:bsd-3)))
640
641 (define-public python2-semantic-version
642 (package-with-python2 python-semantic-version))
643
644 (define-public python-serpent
645 (package
646 (name "python-serpent")
647 (version "1.28")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "serpent" version))
652 (sha256
653 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
654 (build-system python-build-system)
655 (native-inputs
656 `(("python-attrs" ,python-attrs)
657 ("python-pytz" ,python-pytz)))
658 (home-page "https://github.com/irmen/Serpent")
659 (synopsis "Serializer for literal Python expressions")
660 (description
661 "Serpent provides @code{ast.literal_eval()}-compatible object tree
662 serialization. It serializes an object tree into bytes (an utf-8 encoded
663 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
664 to rebuild the original object tree.
665
666 Because only safe literals are encoded, it is safe to send serpent data to
667 other machines, such as over the network.")
668 (license license:expat)))
669
670 (define-public python-setuptools
671 (package
672 (name "python-setuptools")
673 (version "41.0.1")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "setuptools" version ".zip"))
678 (sha256
679 (base32
680 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
681 (modules '((guix build utils)))
682 (snippet
683 '(begin
684 ;; Remove included binaries which are used to build self-extracting
685 ;; installers for Windows.
686 ;; TODO: Find some way to build them ourself so we can include them.
687 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
688 #t))))
689 (build-system python-build-system)
690 ;; FIXME: Tests require pytest, which itself relies on setuptools.
691 ;; One could bootstrap with an internal untested setuptools.
692 (arguments
693 `(#:tests? #f))
694 (home-page "https://pypi.python.org/pypi/setuptools")
695 (synopsis
696 "Library designed to facilitate packaging Python projects")
697 (description
698 "Setuptools is a fully-featured, stable library designed to facilitate
699 packaging Python projects, where packaging includes:
700 Python package and module definitions,
701 distribution package metadata,
702 test hooks,
703 project installation,
704 platform-specific details,
705 Python 3 support.")
706 ;; TODO: setuptools now bundles the following libraries:
707 ;; packaging, pyparsing, six and appdirs. How to unbundle?
708 (license (list license:psfl ; setuptools itself
709 license:expat ; six, appdirs, pyparsing
710 license:asl2.0 ; packaging is dual ASL2/BSD-2
711 license:bsd-2))))
712
713 (define-public python2-setuptools
714 (package-with-python2 python-setuptools))
715
716 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
717 (define-public python-setuptools-for-tensorflow
718 (hidden-package
719 (package
720 (inherit python-setuptools)
721 (version "39.1.0")
722 (source (origin
723 (inherit (package-source python-setuptools))
724 (uri (pypi-uri "setuptools" version ".zip"))
725 (sha256
726 (base32
727 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
728
729 (define-public python-uniseg
730 (package
731 (name "python-uniseg")
732 (version "0.7.1")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (pypi-uri "uniseg" version ".zip"))
737 (sha256
738 (base32
739 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
740 (build-system python-build-system)
741 (arguments
742 '(#:tests? #f)) ; The test suite requires network access.
743 (native-inputs
744 `(("unzip" ,unzip)))
745 (home-page
746 "https://bitbucket.org/emptypage/uniseg-python")
747 (synopsis
748 "Python library to determine Unicode text segmentations")
749 (description
750 "Uniseg is a Python package used to determine Unicode text segmentations.
751 Supported segmentations include:
752 @enumerate
753 @item @dfn{Code point} (any value in the Unicode codespace)
754 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
755 multiple Unicode code points, e.g. \"G\" + acute-accent)
756 @item Word break
757 @item Sentence break
758 @item Line break
759 @end enumerate")
760 (license license:expat)))
761
762 (define-public python2-uniseg
763 (package-with-python2 python-uniseg))
764
765 (define-public python-humanfriendly
766 (package
767 (name "python-humanfriendly")
768 (version "4.4.1")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (pypi-uri "humanfriendly" version))
773 (sha256
774 (base32
775 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
776 (build-system python-build-system)
777 (arguments
778 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
779 #:tests? #f))
780 (propagated-inputs
781 `(("python-monotonic" ,python-monotonic)))
782 (home-page "https://humanfriendly.readthedocs.io")
783 (synopsis "Human-friendly input and output in Python")
784 (description
785 "The functions and classes in @code{humanfriendly} can be used to make
786 text interfaces more user-friendly. It includes tools to parse and format
787 numbers, file sizes, and timespans, timers for long-running operations, menus
788 to allow the user to choose from a list of options, and terminal interaction
789 helpers.")
790 (license license:expat)))
791
792 (define-public python2-humanfriendly
793 (package-with-python2 python-humanfriendly))
794
795 (define-public python-capturer
796 (package
797 (name "python-capturer")
798 (version "2.4")
799 (source
800 (origin
801 (method url-fetch)
802 (uri (pypi-uri "capturer" version))
803 (sha256
804 (base32
805 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
806 (build-system python-build-system)
807 (arguments
808 `(#:tests? #f))
809 (propagated-inputs
810 `(("python-humanfriendly" ,python-humanfriendly)))
811 (home-page "https://capturer.readthedocs.io")
812 (synopsis "Capture stdout and stderr streams of the current process")
813 (description
814 "The capturer package makes it easy to capture the stdout and stderr
815 streams of the current process and subprocesses. Output can be relayed
816 to the terminal in real time but is also available to the Python program
817 for additional processing.")
818 (license license:expat)))
819
820 (define-public python2-capturer
821 (package-with-python2 python-capturer))
822
823 (define-public python-case
824 (package
825 (name "python-case")
826 (version "1.5.3")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "case" version))
831 (sha256
832 (base32
833 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
834 (build-system python-build-system)
835 (propagated-inputs
836 `(("python-mock" ,python-mock)
837 ("python-nose" ,python-nose)
838 ("python-six" ,python-six)
839 ("python-unittest2" ,python-unittest2)))
840 (native-inputs
841 `(("python-coverage" ,python-coverage)))
842 (home-page "https://github.com/celery/case")
843 (synopsis "Unittest utilities and convenience methods")
844 (description
845 "The @code{case} package provides utilities on top of unittest, including
846 some helpful Python 2 compatibility convenience methods.")
847 (license license:bsd-3)))
848
849 (define-public python-verboselogs
850 (package
851 (name "python-verboselogs")
852 (version "1.7")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "verboselogs" version))
857 (sha256
858 (base32
859 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
860 (build-system python-build-system)
861 (native-inputs
862 `(("python-mock" ,python-mock)
863 ("python-astroid" ,python-astroid)
864 ("python-pylint" ,python-pylint)))
865 (home-page "https://verboselogs.readthedocs.io")
866 (synopsis "Verbose logging level for Python's logging module")
867 (description
868 "The @code{verboselogs} package extends Python's @code{logging} module to
869 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
870 (license license:expat)))
871
872 (define-public python2-verboselogs
873 (package-with-python2 python-verboselogs))
874
875 (define-public python-coloredlogs
876 (package
877 (name "python-coloredlogs")
878 (version "7.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "coloredlogs" version))
883 (sha256
884 (base32
885 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
886 (build-system python-build-system)
887 (arguments
888 `(;Tests require some updated modules
889 #:tests? #f))
890 (propagated-inputs
891 `(("python-capturer" ,python-capturer)))
892 (home-page "https://coloredlogs.readthedocs.io")
893 (synopsis "Colored stream handler for Python's logging module")
894 (description
895 "The @code{coloredlogs} package enables colored terminal output for
896 Python's logging module. The @code{ColoredFormatter} class inherits from
897 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
898 messages in color.")
899 (license license:expat)))
900
901 (define-public python2-coloredlogs
902 (package-with-python2 python-coloredlogs))
903
904 (define-public python-et-xmlfile
905 (package
906 (name "python-et-xmlfile")
907 (version "1.0.1")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "et_xmlfile" version))
912 (sha256
913 (base32
914 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
915 (build-system python-build-system)
916 (arguments
917 `(#:phases (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 (invoke "pytest"))))))
921 (native-inputs
922 `(("python-pytest" ,python-pytest)
923 ("python-lxml" ,python-lxml))) ;used for the tests
924 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
925 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
926 (description "This Python library is based upon the @code{xmlfile} module
927 from @code{lxml}. It aims to provide a low memory, compatible implementation
928 of @code{xmlfile}.")
929 (license license:expat)))
930
931 (define-public python2-et-xmlfile
932 (package-with-python2 python-et-xmlfile))
933
934 (define-public python-openpyxl
935 (package
936 (name "python-openpyxl")
937 (version "2.6.2")
938 (source
939 (origin
940 ;; We use the upstream repository, as the tests are not included in the
941 ;; PyPI releases.
942 (method hg-fetch)
943 (uri (hg-reference
944 (url "https://bitbucket.org/openpyxl/openpyxl")
945 (changeset version)))
946 (file-name (string-append name "-" version "-checkout"))
947 (sha256
948 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
949 (build-system python-build-system)
950 (arguments
951 `(#:phases (modify-phases %standard-phases
952 (replace 'check
953 (lambda _
954 (invoke "pytest"))))))
955 (native-inputs
956 ;; For the test suite.
957 `(("python-lxml" ,python-lxml)
958 ("python-pillow" ,python-pillow)
959 ("python-pytest" ,python-pytest)))
960 (propagated-inputs
961 `(("python-et-xmlfile" ,python-et-xmlfile)
962 ("python-jdcal" ,python-jdcal)))
963 (home-page "https://openpyxl.readthedocs.io")
964 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
965 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
966 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
967 standard.")
968 (license license:expat)))
969
970 (define-public python-eventlet
971 (package
972 (name "python-eventlet")
973 (version "0.20.1")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "eventlet" version))
978 (sha256
979 (base32
980 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
981 (build-system python-build-system)
982 (propagated-inputs
983 `(("python-greenlet" ,python-greenlet)))
984 (arguments
985 ;; TODO: Requires unpackaged 'enum-compat'.
986 '(#:tests? #f))
987 (home-page "http://eventlet.net")
988 (synopsis "Concurrent networking library for Python")
989 (description
990 "Eventlet is a concurrent networking library for Python that
991 allows you to change how you run your code, not how you write it.
992 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
993 Coroutines ensure that the developer uses a blocking style of programming
994 that is similar to threading, but provide the benefits of non-blocking I/O.
995 The event dispatch is implicit, which means you can easily use @code{Eventlet}
996 from the Python interpreter, or as a small part of a larger application.")
997 (license license:expat)))
998
999 (define-public python2-eventlet
1000 (let ((base (package-with-python2
1001 (strip-python2-variant python-eventlet))))
1002 (package (inherit base)
1003 (propagated-inputs
1004 `(("python2-enum34" ,python2-enum34)
1005 ,@(package-propagated-inputs base))))))
1006
1007 (define-public python-six
1008 (package
1009 (name "python-six")
1010 (version "1.12.0")
1011 (source
1012 (origin
1013 (method url-fetch)
1014 (uri (pypi-uri "six" version))
1015 (sha256
1016 (base32
1017 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1018 (build-system python-build-system)
1019 (arguments
1020 `(#:phases
1021 (modify-phases %standard-phases
1022 (replace 'check
1023 (lambda _
1024 (invoke "py.test" "-v"))))))
1025 (native-inputs
1026 `(("python-py" ,python-py)
1027 ("python-pytest" ,python-pytest-bootstrap)))
1028 (home-page "https://pypi.python.org/pypi/six/")
1029 (synopsis "Python 2 and 3 compatibility utilities")
1030 (description
1031 "Six is a Python 2 and 3 compatibility library. It provides utility
1032 functions for smoothing over the differences between the Python versions with
1033 the goal of writing Python code that is compatible on both Python versions.
1034 Six supports every Python version since 2.5. It is contained in only one
1035 Python file, so it can be easily copied into your project.")
1036 (license license:x11)))
1037
1038 (define-public python2-six
1039 (package-with-python2 python-six))
1040
1041 (define-public python-six-bootstrap
1042 (package
1043 (inherit python-six)
1044 (name "python-six-bootstrap")
1045 (native-inputs `())
1046 (arguments `(#:tests? #f))))
1047
1048 (define-public python2-six-bootstrap
1049 (package-with-python2 python-six-bootstrap))
1050
1051 (define-public python-schedule
1052 (package
1053 (name "python-schedule")
1054 (version "0.4.3")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "schedule" version))
1059 (sha256
1060 (base32
1061 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1062 (build-system python-build-system)
1063 (native-inputs
1064 `(("python-pytest" ,python-pytest)
1065 ("python-mock" ,python-mock)))
1066 (home-page "https://github.com/dbader/schedule")
1067 (synopsis "Schedule periodic function calls in Python")
1068 (description
1069 "Schedule is an in-process scheduler for periodic jobs that uses the
1070 builder pattern for configuration. Schedule lets you run Python functions (or
1071 any other callable) periodically at pre-determined intervals using a simple,
1072 human-friendly syntax.")
1073 (license license:expat)))
1074
1075 (define-public python2-schedule
1076 (package-with-python2 python-schedule))
1077
1078 (define-public python-pandas
1079 (package
1080 (name "python-pandas")
1081 (version "0.24.2")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "pandas" version))
1086 (sha256
1087 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1088 (build-system python-build-system)
1089 (arguments
1090 `(#:modules ((guix build utils)
1091 (guix build python-build-system)
1092 (ice-9 ftw)
1093 (srfi srfi-26))
1094 #:phases (modify-phases %standard-phases
1095 (add-after 'unpack 'patch-which
1096 (lambda* (#:key inputs #:allow-other-keys)
1097 (let ((which (assoc-ref inputs "which")))
1098 (substitute* "pandas/io/clipboard/__init__.py"
1099 (("^CHECK_CMD = .*")
1100 (string-append "CHECK_CMD = \"" which "\"\n"))))
1101 #t))
1102 (replace 'check
1103 (lambda _
1104 (let ((build-directory
1105 (string-append
1106 (getcwd) "/build/"
1107 (car (scandir "build"
1108 (cut string-prefix? "lib." <>))))))
1109 ;; Disable the "strict data files" option which causes
1110 ;; the build to error out if required data files are
1111 ;; not available (as is the case with PyPI archives).
1112 (substitute* "setup.cfg"
1113 (("addopts = --strict-data-files") "addopts = "))
1114 (with-directory-excursion build-directory
1115 ;; Delete tests that require "moto" which is not yet
1116 ;; in Guix.
1117 (for-each delete-file
1118 '("pandas/tests/io/conftest.py"
1119 "pandas/tests/io/json/test_compression.py"
1120 "pandas/tests/io/parser/test_network.py"
1121 "pandas/tests/io/test_parquet.py"))
1122 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1123 "--skip-network" "-k"
1124 ;; XXX: Due to the deleted tests above.
1125 "not test_read_s3_jsonl"))))))))
1126 (propagated-inputs
1127 `(("python-numpy" ,python-numpy)
1128 ("python-openpyxl" ,python-openpyxl)
1129 ("python-pytz" ,python-pytz)
1130 ("python-dateutil" ,python-dateutil)
1131 ("python-xlrd" ,python-xlrd)))
1132 (inputs
1133 `(("which" ,which)))
1134 (native-inputs
1135 `(("python-cython" ,python-cython)
1136 ("python-beautifulsoup4" ,python-beautifulsoup4)
1137 ("python-lxml" ,python-lxml)
1138 ("python-html5lib" ,python-html5lib)
1139 ("python-nose" ,python-nose)
1140 ("python-pytest" ,python-pytest)
1141 ("python-pytest-mock" ,python-pytest-mock)))
1142 (home-page "https://pandas.pydata.org")
1143 (synopsis "Data structures for data analysis, time series, and statistics")
1144 (description
1145 "Pandas is a Python package providing fast, flexible, and expressive data
1146 structures designed to make working with structured (tabular,
1147 multidimensional, potentially heterogeneous) and time series data both easy
1148 and intuitive. It aims to be the fundamental high-level building block for
1149 doing practical, real world data analysis in Python.")
1150 (license license:bsd-3)))
1151
1152 (define-public python2-pandas
1153 (package-with-python2 python-pandas))
1154
1155 (define-public python2-mechanize
1156 (package
1157 (name "python2-mechanize")
1158 (version "0.2.5")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (pypi-uri "mechanize" version))
1163 (sha256
1164 (base32
1165 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1166 (build-system python-build-system)
1167 (arguments
1168 `(#:python ,python-2 ; apparently incompatible with Python 3
1169 #:tests? #f))
1170 ;; test fails with message
1171 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1172 ;; (python-3.3.2) or
1173 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1174 ;; (python-2.7.5).
1175 ;; The source code is from March 2011 and probably not up-to-date
1176 ;; with respect to python unit tests.
1177 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1178 (synopsis
1179 "Stateful programmatic web browsing in Python")
1180 (description
1181 "Mechanize implements stateful programmatic web browsing in Python,
1182 after Andy Lester’s Perl module WWW::Mechanize.")
1183 (license (license:non-copyleft
1184 "file://COPYING"
1185 "See COPYING in the distribution."))))
1186
1187
1188 (define-public python-simplejson
1189 (package
1190 (name "python-simplejson")
1191 (version "3.14.0")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "simplejson" version))
1196 (sha256
1197 (base32
1198 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1199 (build-system python-build-system)
1200 (home-page "http://simplejson.readthedocs.org/en/latest/")
1201 (synopsis
1202 "Json library for Python")
1203 (description
1204 "JSON (JavaScript Object Notation) is a subset of JavaScript
1205 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1206 format.
1207
1208 Simplejson exposes an API familiar to users of the standard library marshal
1209 and pickle modules. It is the externally maintained version of the json
1210 library contained in Python 2.6, but maintains compatibility with Python 2.5
1211 and (currently) has significant performance advantages, even without using
1212 the optional C extension for speedups. Simplejson is also supported on
1213 Python 3.3+.")
1214 (license license:x11)))
1215
1216 (define-public python2-simplejson
1217 (package-with-python2 python-simplejson))
1218
1219
1220 (define-public python-pyicu
1221 (package
1222 (name "python-pyicu")
1223 (version "2.3.1")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (pypi-uri "PyICU" version))
1228 (sha256
1229 (base32
1230 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1231 (build-system python-build-system)
1232 (inputs
1233 `(("icu4c" ,icu4c)))
1234 (native-inputs
1235 `(("python-pytest" ,python-pytest)
1236 ("python-six" ,python-six)))
1237 (home-page "https://github.com/ovalhub/pyicu")
1238 (synopsis "Python extension wrapping the ICU C++ API")
1239 (description
1240 "PyICU is a python extension wrapping the ICU C++ API.")
1241 (properties `((python2-variant . ,(delay python2-pyicu))))
1242 (license license:x11)))
1243
1244 (define-public python2-pyicu
1245 (let ((base (package-with-python2
1246 (strip-python2-variant python-pyicu))))
1247 (package
1248 (inherit base)
1249 (arguments
1250 `(,@(package-arguments base)
1251 #:phases
1252 (modify-phases %standard-phases
1253 (add-before 'check 'delete-failing-test
1254 (λ _
1255 ;; XXX: This fails due to Unicode issues unique to Python 2,
1256 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1257 (delete-file "test/test_Script.py")
1258 #t))))))))
1259
1260 (define-public python2-dogtail
1261 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1262 ;; spaces in indentation" with Python 3.
1263 (package
1264 (name "python2-dogtail")
1265 (version "0.9.9")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "dogtail" version))
1269 (sha256
1270 (base32
1271 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1272 (build-system python-build-system)
1273 (arguments `(#:python ,python-2
1274 #:tests? #f)) ; invalid command "test"
1275 ;; Currently no offical homepage.
1276 (home-page "https://pypi.python.org/pypi/dogtail/")
1277 (synopsis "GUI test tool and automation framework written in Python")
1278 (description
1279 "Dogtail is a GUI test tool and automation framework written in Python.
1280 It uses Accessibility (a11y) technologies to communicate with desktop
1281 applications. dogtail scripts are written in Python and executed like any
1282 other Python program.")
1283 (license license:gpl2+)))
1284
1285 (define-public python-empy
1286 (package
1287 (name "python-empy")
1288 (version "3.3.3")
1289 (source (origin
1290 (method url-fetch)
1291 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1292 version ".tar.gz"))
1293 (sha256
1294 (base32
1295 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1296 (build-system python-build-system)
1297 (arguments
1298 `(#:tests? #f)) ; python2 only
1299 (home-page "http://www.alcyone.com/software/empy/")
1300 (synopsis "Templating system for Python")
1301 (description
1302 "EmPy is a system for embedding Python expressions and statements in
1303 template text; it takes an EmPy source file, processes it, and produces
1304 output. This is accomplished via expansions, which are special signals to the
1305 EmPy system and are set off by a special prefix (by default the at sign, @@).
1306 EmPy can expand arbitrary Python expressions and statements in this way, as
1307 well as a variety of special forms. Textual data not explicitly delimited in
1308 this way is sent unaffected to the output, allowing Python to be used in
1309 effect as a markup language. Also supported are callbacks via hooks,
1310 recording and playback via diversions, and dynamic, chainable filters. The
1311 system is highly configurable via command line options and embedded
1312 commands.")
1313 (license license:lgpl2.1+)))
1314
1315 (define-public python2-empy
1316 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1317 (package
1318 (inherit base)
1319 (arguments `(,@(package-arguments base)
1320 #:tests? #t)))))
1321
1322 (define-public python2-element-tree
1323 (package
1324 (name "python2-element-tree")
1325 (version "1.2.6")
1326 (source (origin
1327 (method url-fetch)
1328 (uri (string-append
1329 "http://effbot.org/media/downloads/elementtree-"
1330 version "-20050316.tar.gz"))
1331 (sha256
1332 (base32
1333 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1334 (build-system python-build-system)
1335 (arguments
1336 `(#:python ,python-2 ; seems to be part of Python 3
1337 #:tests? #f)) ; no 'test' sub-command
1338 (synopsis "Toolkit for XML processing in Python")
1339 (description
1340 "ElementTree is a Python library supporting lightweight XML processing.")
1341 (home-page "http://effbot.org/zone/element-index.htm")
1342 (license (license:x11-style
1343 "http://docs.python.org/2/license.html"
1344 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1345
1346 (define-public python2-pybugz
1347 (package
1348 (name "python2-pybugz")
1349 (version "0.6.11")
1350 (source (origin
1351 (method url-fetch)
1352 (uri (string-append
1353 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1354 version ".tar.gz"))
1355 (sha256
1356 (base32
1357 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1358 (patches (search-patches "pybugz-stty.patch"
1359 "pybugz-encode-error.patch"))))
1360 (build-system python-build-system)
1361 (arguments
1362 `(#:python ,python-2 ; SyntaxError with Python 3
1363 #:tests? #f)) ; no 'test' sub-command
1364 (propagated-inputs
1365 `(("element-tree" ,python2-element-tree)))
1366 (synopsis "Python and command-line interface to Bugzilla")
1367 (description
1368 "PyBugz is a Python library and command-line tool to query the Bugzilla
1369 bug tracking system. It is meant as an aid to speed up interaction with the
1370 bug tracker.")
1371 (home-page "http://www.liquidx.net/pybugz/")
1372 (license license:gpl2)))
1373
1374 (define-public python2-enum
1375 (package
1376 (name "python2-enum")
1377 (version "0.4.6")
1378 (source (origin
1379 (method url-fetch)
1380 (uri (pypi-uri "enum" version))
1381 (sha256
1382 (base32
1383 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1384 (build-system python-build-system)
1385 (arguments
1386 `(#:python ,python-2))
1387 (home-page "http://pypi.python.org/pypi/enum/")
1388 (synopsis "Robust enumerated type support in Python")
1389 (description
1390 "This provides a module for robust enumerations in Python. It has
1391 been superseded by the Python standard library and is provided only for
1392 compatibility.")
1393 ;; Choice of either license.
1394 (license (list license:gpl3+ license:psfl))))
1395
1396 (define-public python-enum34
1397 (package
1398 (name "python-enum34")
1399 (version "1.1.6")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "enum34" version))
1404 (sha256
1405 (base32
1406 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1407 (build-system python-build-system)
1408 (home-page "https://pypi.python.org/pypi/enum34")
1409 (synopsis "Backported Python 3.4 Enum")
1410 (description
1411 "Enum34 is the new Python stdlib enum module available in Python 3.4
1412 backported for previous versions of Python from 2.4 to 3.3.")
1413 (license license:bsd-3)))
1414
1415 (define-public python2-enum34
1416 (package-with-python2 python-enum34))
1417
1418 (define-public python-parse-type
1419 (package
1420 (name "python-parse-type")
1421 (version "0.4.2")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (pypi-uri "parse_type" version))
1426 (sha256
1427 (base32
1428 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1429 (build-system python-build-system)
1430 (propagated-inputs
1431 `(("python-six" ,python-six)
1432 ("python-parse" ,python-parse)))
1433 (native-inputs
1434 `(("python-pytest" ,python-pytest)
1435 ("python-pytest-runner" ,python-pytest-runner)))
1436 (home-page "https://github.com/jenisys/parse_type")
1437 (synopsis "Extended parse module")
1438 (description
1439 "Parse_type extends the python parse module.")
1440 (properties
1441 `((python2-variant . ,(delay python2-parse-type))))
1442 (license license:bsd-3)))
1443
1444 (define-public python2-parse-type
1445 (let ((base (package-with-python2
1446 (strip-python2-variant python-parse-type))))
1447 (package (inherit base)
1448 (propagated-inputs
1449 `(("python2-enum34" ,python2-enum34)
1450 ,@(package-propagated-inputs base))))))
1451
1452 (define-public python-parse
1453 (package
1454 (name "python-parse")
1455 (version "1.8.4")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (pypi-uri "parse" version))
1460 (sha256
1461 (base32
1462 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1463 (build-system python-build-system)
1464 (arguments
1465 `(#:phases
1466 (modify-phases %standard-phases
1467 (replace 'check
1468 (lambda _ (invoke "python" "test_parse.py"))))))
1469 (home-page "https://github.com/r1chardj0n3s/parse")
1470 (synopsis "Parse strings")
1471 (description
1472 "Parse strings using a specification based on the Python @code{format()}
1473 syntax.")
1474 (license license:x11)))
1475
1476 (define-public python-polib
1477 (package
1478 (name "python-polib")
1479 (version "1.0.8")
1480 (source (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "polib" version))
1483 (sha256
1484 (base32
1485 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1486 (build-system python-build-system)
1487 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1488 (synopsis "Manipulate, create and modify gettext files")
1489 (description "Polib can manipulate any gettext format (po, pot and mo)
1490 files. It can be used to create po files from scratch or to modify
1491 existing ones.")
1492 (license license:expat)))
1493
1494 (define-public python2-polib
1495 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1496 (package
1497 (inherit base)
1498 (arguments `(,@(package-arguments base)
1499 ;; Tests don't work with python2.
1500 #:tests? #f)))))
1501
1502 (define-public scons
1503 (package
1504 (name "scons")
1505 (version "3.0.4")
1506 (source (origin
1507 (method git-fetch)
1508 (uri (git-reference
1509 (url "https://github.com/SCons/scons.git")
1510 (commit version)))
1511 (file-name (git-file-name name version))
1512 (sha256
1513 (base32
1514 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1515 (build-system python-build-system)
1516 (arguments
1517 `(#:use-setuptools? #f ; still relies on distutils
1518 #:tests? #f ; no 'python setup.py test' command
1519 #:phases
1520 (modify-phases %standard-phases
1521 (add-before 'build 'bootstrap
1522 (lambda _
1523 (substitute* "src/engine/SCons/compat/__init__.py"
1524 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1525 "sys.modules[new] = __import__(old)"))
1526 (substitute* "src/engine/SCons/Platform/__init__.py"
1527 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1528 "mod = __import__(full_name)"))
1529 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1530 (chdir "build/scons")
1531 #t)))))
1532 (home-page "http://scons.org/")
1533 (synopsis "Software construction tool written in Python")
1534 (description
1535 "SCons is a software construction tool. Think of SCons as an improved,
1536 cross-platform substitute for the classic Make utility with integrated
1537 functionality similar to autoconf/automake and compiler caches such as ccache.
1538 In short, SCons is an easier, more reliable and faster way to build
1539 software.")
1540 (license license:x11)))
1541
1542 (define-public scons-python2
1543 (package
1544 (inherit (package-with-python2 scons))
1545 (name "scons-python2")))
1546
1547 (define-public python-extras
1548 (package
1549 (name "python-extras")
1550 (version "1.0.0")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "extras" version))
1555 (sha256
1556 (base32
1557 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1558 (build-system python-build-system)
1559 (arguments
1560 ;; FIXME: Circular dependency on testtools.
1561 '(#:tests? #f))
1562 (home-page "https://github.com/testing-cabal/extras")
1563 (synopsis "Useful extensions to the Python standard library")
1564 (description
1565 "Extras is a set of extensions to the Python standard library.")
1566 (license license:expat)))
1567
1568 (define-public python2-extras
1569 (package-with-python2 python-extras))
1570
1571 (define-public python-mimeparse
1572 (package
1573 (name "python-mimeparse")
1574 (version "1.6.0")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "python-mimeparse" version))
1579 (sha256
1580 (base32
1581 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1582 (build-system python-build-system)
1583 (arguments
1584 '(#:phases
1585 (modify-phases %standard-phases
1586 (replace 'check
1587 (lambda _
1588 (invoke "./mimeparse_test.py"))))))
1589 (home-page
1590 "https://github.com/dbtsai/python-mimeparse")
1591 (synopsis "Python library for parsing MIME types")
1592 (description
1593 "Mimeparse provides basic functions for parsing MIME type names and
1594 matching them against a list of media-ranges.")
1595 (license license:expat)))
1596
1597 (define-public python2-mimeparse
1598 (package-with-python2 python-mimeparse))
1599
1600 (define-public python-miniboa
1601 (package
1602 (name "python-miniboa")
1603 (version "1.0.7")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "miniboa" version))
1608 (sha256
1609 (base32
1610 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1611 (build-system python-build-system)
1612 (home-page "https://github.com/shmup/miniboa")
1613 (synopsis "Simple, single-threaded Telnet server")
1614 (description
1615 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1616 server.")
1617 (license license:asl2.0)))
1618
1619 (define-public python2-miniboa
1620 (package-with-python2 python-miniboa))
1621
1622 (define-public python-pafy
1623 (package
1624 (name "python-pafy")
1625 (version "0.5.3.1")
1626 (source
1627 (origin
1628 (method url-fetch)
1629 (uri (pypi-uri "pafy" version))
1630 (sha256
1631 (base32
1632 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1633 (build-system python-build-system)
1634 (arguments
1635 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1636 (propagated-inputs
1637 ;; Youtube-dl is a python package which is imported in the file
1638 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1639 `(("youtube-dl" ,youtube-dl)))
1640 (home-page "https://np1.github.io/pafy/")
1641 (synopsis "Retrieve YouTube content and metadata")
1642 (description
1643 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1644 (license license:lgpl3+)))
1645
1646 (define-public python2-funcsigs
1647 (package
1648 (name "python2-funcsigs")
1649 (version "1.0.2")
1650 (source (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "funcsigs" version))
1653 (sha256
1654 (base32
1655 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1656 (build-system python-build-system)
1657 (arguments
1658 `(#:python ,python-2))
1659 (native-inputs
1660 `(("python2-unittest2" ,python2-unittest2)))
1661 (home-page "http://funcsigs.readthedocs.org")
1662 (synopsis "Python function signatures from PEP362")
1663 (description
1664 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1665 (license license:asl2.0)))
1666
1667 (define-public python2-funcsigs-bootstrap
1668 (package
1669 (inherit python2-funcsigs)
1670 (name "python2-funcsigs-bootstrap")
1671 (native-inputs `())
1672 (arguments
1673 `(#:tests? #f
1674 ,@(package-arguments python2-funcsigs)))))
1675
1676 (define-public python-py
1677 (package
1678 (name "python-py")
1679 (version "1.8.0")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "py" version))
1684 (sha256
1685 (base32
1686 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1687 (build-system python-build-system)
1688 (arguments
1689 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1690 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1691 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1692 ;; Is this module globally installed?"
1693 '(#:tests? #f))
1694 (native-inputs
1695 `(("python-setuptools-scm" ,python-setuptools-scm)))
1696 (home-page "https://github.com/pytest-dev/py")
1697 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1698 (description
1699 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1700 code introspection, and logging.")
1701 (license license:expat)))
1702
1703 (define-public python2-py
1704 (package-with-python2 python-py))
1705
1706 ;; Recent versions of python-fixtures and python-testrepository need
1707 ;; python-pbr for packaging, which itself needs these two packages for
1708 ;; testing.
1709 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1710 ;; same source, just without any test dependencies and with tests disabled.
1711 ;; python-pbr-minmal is then used to package python-fixtures and
1712 ;; python-testrepository.
1713 ;; Strictly speaking we currently could remove the test-requirements from the
1714 ;; normal python-pbr package (and save this package) since test are disabled
1715 ;; there anyway. But this may change in future.
1716 (define-public python-pbr-minimal
1717 (package
1718 (name "python-pbr-minimal")
1719 (version "3.0.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "pbr" version))
1724 (sha256
1725 (base32
1726 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1727 (build-system python-build-system)
1728 (arguments
1729 `(#:tests? #f))
1730 (home-page "http://docs.openstack.org/developer/pbr/")
1731 (synopsis "Minimal build of python-pbr used for bootstrapping")
1732 (description
1733 "Used only for bootstrapping python2-pbr, you should not need this.")
1734 (license license:asl2.0)))
1735
1736 (define-public python2-pbr-minimal
1737 (package-with-python2 python-pbr-minimal))
1738
1739 (define-public python-pbr
1740 (package
1741 (inherit python-pbr-minimal)
1742 (name "python-pbr")
1743 (arguments
1744 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1745 (propagated-inputs
1746 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1747 (native-inputs
1748 `(("python-fixtures" ,python-fixtures-bootstrap)
1749 ;; discover, coverage, hacking, subunit
1750 ("python-mock" ,python-mock)
1751 ("python-six" ,python-six)
1752 ("python-sphinx" ,python-sphinx)
1753 ("python-testrepository" ,python-testrepository-bootstrap)
1754 ("python-testresources" ,python-testresources-bootstrap)
1755 ("python-testscenarios" ,python-testscenarios-bootstrap)
1756 ("python-testtools" ,python-testtools-bootstrap)
1757 ("python-virtualenv" ,python-virtualenv)))
1758 (synopsis "Enhance the default behavior of Python’s setuptools")
1759 (description
1760 "Python Build Reasonableness (PBR) is a library that injects some useful
1761 and sensible default behaviors into your setuptools run. It will set
1762 versions, process requirements files and generate AUTHORS and ChangeLog file
1763 from git information.
1764 ")))
1765
1766 (define-public python2-pbr
1767 (package-with-python2 python-pbr))
1768
1769 (define-public python-pyrsistent
1770 (package
1771 (name "python-pyrsistent")
1772 (version "0.14.11")
1773 (home-page "https://github.com/tobgu/pyrsistent")
1774 (source (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "pyrsistent" version))
1777 (sha256
1778 (base32
1779 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("python-hypothesis" ,python-hypothesis)
1783 ("python-pytest" ,python-pytest)
1784 ("python-pytest-runner" ,python-pytest-runner)))
1785 (propagated-inputs
1786 `(("python-six" ,python-six)))
1787 (synopsis "Persistent data structures for Python")
1788 (description
1789 "Pyrsistent is a number of persistent collections (by some referred to as
1790 functional data structures). Persistent in the sense that they are immutable.
1791
1792 All methods on a data structure that would normally mutate it instead return a
1793 new copy of the structure containing the requested updates. The original
1794 structure is left untouched.")
1795 (license license:expat)))
1796
1797 (define-public python2-pyrsistent
1798 (package-with-python2 python-pyrsistent))
1799
1800 (define-public python-exif-read
1801 (package
1802 (name "python-exif-read")
1803 (version "2.1.2")
1804 (source (origin
1805 (method url-fetch)
1806 (uri (pypi-uri "ExifRead" version))
1807 (sha256
1808 (base32
1809 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1810 (build-system python-build-system)
1811 (arguments `(#:tests? #f)) ; no tests
1812 (home-page "https://github.com/ianare/exif-py")
1813 (synopsis "Python library to extract EXIF data from image files")
1814 (description
1815 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1816 files.")
1817 (license license:bsd-3)))
1818
1819 (define-public python2-exif-read
1820 (package-with-python2 python-exif-read))
1821
1822 (define-public python-pyld
1823 (package
1824 (name "python-pyld")
1825 (version "1.0.3")
1826 (source (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "PyLD" version))
1829 (sha256
1830 (base32
1831 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1832 (build-system python-build-system)
1833 (home-page "https://github.com/digitalbazaar/pyld")
1834 (synopsis "Python implementation of the JSON-LD specification")
1835 (description
1836 "PyLD is an implementation of the JSON-LD specification.")
1837 (license license:bsd-3)))
1838
1839 (define-public python2-pyld
1840 (package-with-python2 python-pyld))
1841
1842 (define-public python-click
1843 (package
1844 (name "python-click")
1845 (version "7.0")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (pypi-uri "click" version))
1850 (sha256
1851 (base32
1852 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1853 (build-system python-build-system)
1854 (arguments
1855 `(#:phases
1856 (modify-phases %standard-phases
1857 (add-after 'unpack 'fix-paths
1858 (lambda* (#:key inputs #:allow-other-keys)
1859 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1860 "cross-libc" "libc"))))
1861 (substitute* "click/_unicodefun.py"
1862 (("'locale'")
1863 (string-append "'" glibc "/bin/locale'"))))
1864 #t))
1865 (replace 'check
1866 (lambda _
1867 (invoke "python" "-m" "pytest"))))))
1868 (native-inputs
1869 `(("python-pytest" ,python-pytest)))
1870 (home-page "https://palletsprojects.com/p/click/")
1871 (synopsis "Command line library for Python")
1872 (description
1873 "Click is a Python package for creating command line interfaces in a
1874 composable way with as little code as necessary. Its name stands for
1875 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1876 with sensible defaults out of the box.")
1877 (license license:bsd-3)))
1878
1879 (define-public python2-click
1880 (package-with-python2 python-click))
1881
1882 (define-public python-wheel
1883 (package
1884 (name "python-wheel")
1885 (version "0.32.3")
1886 (source
1887 (origin
1888 (method url-fetch)
1889 (uri (pypi-uri "wheel" version))
1890 (sha256
1891 (base32
1892 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1893 (build-system python-build-system)
1894 (native-inputs
1895 `(("python-jsonschema" ,python-jsonschema)
1896 ("python-pytest-cov" ,python-pytest-cov)))
1897 (home-page "https://bitbucket.org/pypa/wheel/")
1898 (synopsis "Format for built Python packages")
1899 (description
1900 "A wheel is a ZIP-format archive with a specially formatted filename and
1901 the @code{.whl} extension. It is designed to contain all the files for a PEP
1902 376 compatible install in a way that is very close to the on-disk format. Many
1903 packages will be properly installed with only the @code{Unpack} step and the
1904 unpacked archive preserves enough information to @code{Spread} (copy data and
1905 scripts to their final locations) at any later time. Wheel files can be
1906 installed with a newer @code{pip} or with wheel's own command line utility.")
1907 (license license:expat)
1908 (properties `((python2-variant . ,(delay python2-wheel))))))
1909
1910 (define-public python2-wheel
1911 (let ((wheel (package-with-python2
1912 (strip-python2-variant python-wheel))))
1913 (package (inherit wheel)
1914 (native-inputs `(("python2-functools32" ,python2-functools32)
1915 ,@(package-native-inputs wheel))))))
1916
1917 (define-public python-vcversioner
1918 (package
1919 (name "python-vcversioner")
1920 (version "2.16.0.0")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "vcversioner" version))
1925 (sha256
1926 (base32
1927 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1928 (build-system python-build-system)
1929 (synopsis "Python library for version number discovery")
1930 (description "Vcversioner is a Python library that inspects tagging
1931 information in a variety of version control systems in order to discover
1932 version numbers.")
1933 (home-page "https://github.com/habnabit/vcversioner")
1934 (license license:isc)))
1935
1936 (define-public python2-vcversioner
1937 (package-with-python2 python-vcversioner))
1938
1939 (define-public python-jdcal
1940 (package
1941 (name "python-jdcal")
1942 (version "1.4")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "jdcal" version))
1947 (sha256
1948 (base32
1949 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1950 (build-system python-build-system)
1951 (arguments
1952 `(#:phases (modify-phases %standard-phases
1953 (replace 'check
1954 (lambda _
1955 (invoke "pytest"))))))
1956 (native-inputs
1957 `(("python-pytest" ,python-pytest)))
1958 (home-page "https://github.com/phn/jdcal")
1959 (synopsis "Functions to convert between Julian dates Gregorian dates")
1960 (description "This Python library provides functions for converting
1961 between Julian dates and Gregorian dates.")
1962 (license license:bsd-2)))
1963
1964 (define-public python2-jdcal
1965 (package-with-python2 python-jdcal))
1966
1967 (define-public python-jsonschema
1968 (package
1969 (name "python-jsonschema")
1970 (version "3.0.1")
1971 (source (origin
1972 (method url-fetch)
1973 (uri (pypi-uri "jsonschema" version))
1974 (sha256
1975 (base32
1976 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1977 (build-system python-build-system)
1978 (arguments
1979 '(#:phases
1980 (modify-phases %standard-phases
1981 (replace 'check
1982 (lambda _
1983 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1984 (invoke "trial" "jsonschema"))))))
1985 (native-inputs
1986 `(("python-setuptools_scm" ,python-setuptools-scm)
1987 ("python-twisted" ,python-twisted)))
1988 (propagated-inputs
1989 `(("python-attrs" ,python-attrs)
1990 ("python-pyrsistent" ,python-pyrsistent)
1991 ("python-six" ,python-six)))
1992 (home-page "https://github.com/Julian/jsonschema")
1993 (synopsis "Implementation of JSON Schema for Python")
1994 (description
1995 "Jsonschema is an implementation of JSON Schema for Python.")
1996 (license license:expat)
1997 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1998
1999 (define-public python2-jsonschema
2000 (let ((jsonschema (package-with-python2
2001 (strip-python2-variant python-jsonschema))))
2002 (package (inherit jsonschema)
2003 (propagated-inputs
2004 `(("python2-functools32" ,python2-functools32)
2005 ,@(package-propagated-inputs jsonschema))))))
2006
2007 ;; This old version is still required by docker-compose as of 1.24.0.
2008 (define-public python-jsonschema-2.6
2009 (package
2010 (name "python-jsonschema")
2011 (version "2.6.0")
2012 (source (origin
2013 (method url-fetch)
2014 (uri (pypi-uri "jsonschema" version))
2015 (sha256
2016 (base32
2017 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2018 (build-system python-build-system)
2019 (arguments
2020 '(#:phases
2021 (modify-phases %standard-phases
2022 (replace 'check (lambda _ (invoke "nosetests"))))))
2023 (native-inputs
2024 `(("python-nose" ,python-nose)
2025 ("python-vcversioner" ,python-vcversioner)))
2026 (home-page "https://github.com/Julian/jsonschema")
2027 (synopsis "Implementation of JSON Schema for Python")
2028 (description
2029 "Jsonschema is an implementation of JSON Schema for Python.")
2030 (license license:expat)
2031 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2032
2033 (define-public python-schema
2034 (package
2035 (name "python-schema")
2036 (version "0.6.6")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "schema" version))
2041 (sha256
2042 (base32
2043 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2044 (build-system python-build-system)
2045 (native-inputs
2046 `(("python-pytest" ,python-pytest)))
2047 (home-page "https://github.com/keleshev/schema")
2048 (synopsis "Simple data validation library")
2049 (description
2050 "@code{python-schema} is a library for validating Python data
2051 structures, such as those obtained from config-files, forms, external
2052 services or command-line parsing, converted from JSON/YAML (or
2053 something else) to Python data-types.")
2054 (license license:psfl)))
2055
2056 (define-public python2-schema
2057 (package-with-python2 python-schema))
2058
2059 (define-public python-schema-0.5
2060 (package (inherit python-schema)
2061 (version "0.5.0")
2062 (source
2063 (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "schema" version))
2066 (sha256
2067 (base32
2068 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2069
2070 (define-public python2-schema-0.5
2071 (package-with-python2 python-schema-0.5))
2072
2073 (define-public python-kitchen
2074 (package
2075 (name "python-kitchen")
2076 (version "1.2.5")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (pypi-uri "kitchen" version))
2081 (sha256
2082 (base32
2083 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2084 (build-system python-build-system)
2085 (propagated-inputs
2086 `(("python-chardet" ,python-chardet)))
2087 (home-page "https://github.com/fedora-infra/kitchen")
2088 (synopsis "Python API for snippets")
2089 (description "@code{kitchen} module provides a python API for all sorts of
2090 little useful snippets of code that everybody ends up writing for their projects
2091 but never seem big enough to build an independent release. Use kitchen and stop
2092 cutting and pasting that code over and over.")
2093 (license (list license:lgpl2.1+
2094 ;; subprocess.py, test_subprocess.py,
2095 ;; kitchen/pycompat25/defaultdict.py:
2096 license:psfl))))
2097
2098 (define-public python2-kitchen
2099 (package-with-python2 python-kitchen))
2100
2101 (define-public python-unidecode
2102 (package
2103 (name "python-unidecode")
2104 (version "1.1.0")
2105 (source (origin
2106 (method url-fetch)
2107 (uri (pypi-uri "Unidecode" version))
2108 (sha256
2109 (base32
2110 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2111 (build-system python-build-system)
2112 (home-page "https://pypi.python.org/pypi/Unidecode")
2113 (synopsis "ASCII transliterations of Unicode text")
2114 (description
2115 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2116 useful when integrating with legacy code that doesn't support Unicode, or for
2117 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2118 machine identifiers from human-readable Unicode strings that should still be
2119 somewhat intelligible.")
2120 (license license:gpl2+)))
2121
2122 (define-public python2-unidecode
2123 (package-with-python2 python-unidecode))
2124
2125 (define-public python-pyjwt
2126 (package
2127 (name "python-pyjwt")
2128 (version "1.5.3")
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "PyJWT" version))
2133 (sha256
2134 (base32
2135 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2136 (modules '((guix build utils)))
2137 (snippet
2138 '(begin
2139 (for-each delete-file-recursively
2140 (find-files "." "\\.pyc$"))
2141 #t))))
2142 (build-system python-build-system)
2143 (native-inputs
2144 `(("python-pytest" ,python-pytest)
2145 ("python-pytest-cov" ,python-pytest-cov)
2146 ("python-pytest-runner" ,python-pytest-runner)))
2147 (home-page "https://github.com/progrium/pyjwt")
2148 (synopsis "JSON Web Token implementation in Python")
2149 (description
2150 "PyJWT is a JSON Web Token implementation written in Python.")
2151 (license license:expat)))
2152
2153 (define-public python2-pyjwt
2154 (package-with-python2 python-pyjwt))
2155
2156 (define-public python-pykka
2157 (package
2158 (name "python-pykka")
2159 (version "1.2.1")
2160 (source
2161 (origin
2162 (method url-fetch)
2163 (uri (pypi-uri "Pykka" version))
2164 (sha256
2165 (base32
2166 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2167 (build-system python-build-system)
2168 (native-inputs
2169 `(("python-mock" ,python-mock)
2170 ("python-nose" ,python-nose)
2171 ("python-gevent" ,python-gevent)
2172 ("python-eventlet" ,python-eventlet)))
2173 (home-page "https://www.pykka.org/")
2174 (synopsis "Pykka is a Python implementation of the actor model")
2175 (description
2176 "Pykka is a Python implementation of the actor model.
2177 The actor model introduces some simple rules to control the sharing
2178 of state and cooperation between execution units, which makes it
2179 easier to build concurrent applications.")
2180 (license license:asl2.0)))
2181
2182 (define-public python2-pykka
2183 (package-with-python2 python-pykka))
2184
2185 (define-public python-pymsgbox
2186 (package
2187 (name "python-pymsgbox")
2188 (version "1.0.6")
2189 (source
2190 (origin
2191 (method git-fetch)
2192 (uri (git-reference
2193 ;; LICENSE.txt is not present on pypi
2194 (url "https://github.com/asweigart/PyMsgBox")
2195 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2196 (file-name (git-file-name name version))
2197 (sha256
2198 (base32
2199 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2200 (arguments
2201 ;; Circular dependency to run tests:
2202 ;; Tests need pyautogui, which depends on pymsgbox.
2203 '(#:tests? #f))
2204 (build-system python-build-system)
2205 (home-page "https://github.com/asweigart/PyMsgBox")
2206 (synopsis "Python module for JavaScript-like message boxes")
2207 (description
2208 "PyMsgBox is a simple, cross-platform, pure Python module for
2209 JavaScript-like message boxes. Types of dialog boxes include:
2210 @enumerate
2211 @item alert
2212 @item confirm
2213 @item prompt
2214 @item password
2215 @end enumerate
2216 ")
2217 (license license:bsd-3)))
2218
2219 (define-public python-pympler
2220 (package
2221 (name "python-pympler")
2222 (home-page "https://pythonhosted.org/Pympler/")
2223 (version "0.7")
2224 (source (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "Pympler" version))
2227 (sha256
2228 (base32
2229 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases (modify-phases %standard-phases
2233 (delete 'check)
2234 (add-after 'install 'check
2235 (lambda* (#:key inputs outputs #:allow-other-keys)
2236 (add-installed-pythonpath inputs outputs)
2237 (invoke "python" "setup.py" "test"))))))
2238 (synopsis "Measure, monitor and analyze memory behavior")
2239 (description
2240 "Pympler is a development tool to measure, monitor and analyze
2241 the memory behavior of Python objects in a running Python application.
2242
2243 By pympling a Python application, detailed insight in the size and the
2244 lifetime of Python objects can be obtained. Undesirable or unexpected
2245 runtime behavior like memory bloat and other @samp{pymples} can easily
2246 be identified.
2247
2248 A web profiling frontend exposes process statistics, garbage
2249 visualisation and class tracker statistics.")
2250 (license license:asl2.0)))
2251
2252 (define-public python2-pympler
2253 (package-with-python2 python-pympler))
2254
2255 (define-public python-itsdangerous
2256 (package
2257 (name "python-itsdangerous")
2258 (version "1.1.0")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "itsdangerous" version))
2263 (sha256
2264 (base32
2265 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2266 (build-system python-build-system)
2267 (home-page "https://palletsprojects.com/p/itsdangerous/")
2268 (synopsis "Python library for passing data to/from untrusted environments")
2269 (description
2270 "Itsdangerous provides various helpers to pass trusted data to untrusted
2271 environments and back.")
2272 (license license:bsd-3)))
2273
2274 (define-public python2-itsdangerous
2275 (package-with-python2 python-itsdangerous))
2276
2277 (define-public python-pyyaml
2278 (package
2279 (name "python-pyyaml")
2280 (version "3.13")
2281 (source
2282 (origin
2283 (method url-fetch)
2284 (uri (pypi-uri "PyYAML" version))
2285 (sha256
2286 (base32
2287 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2288 (build-system python-build-system)
2289 (inputs
2290 `(("libyaml" ,libyaml)))
2291 (home-page "http://pyyaml.org/wiki/PyYAML")
2292 (synopsis "YAML parser and emitter for Python")
2293 (description
2294 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2295 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2296 API, and sensible error messages. PyYAML supports standard YAML tags and
2297 provides Python-specific tags that allow to represent an arbitrary Python
2298 object.")
2299 (license license:expat)))
2300
2301 (define-public python2-pyyaml
2302 (package-with-python2 python-pyyaml))
2303
2304 (define-public python-vine
2305 (package
2306 (name "python-vine")
2307 (version "1.1.4")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "vine" version))
2312 (sha256
2313 (base32
2314 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2315 (build-system python-build-system)
2316 (native-inputs
2317 `(("python-pytest" ,python-pytest)
2318 ("python-case" ,python-case)))
2319 (home-page "https://github.com/celery/vine")
2320 (synopsis "Promises for Python")
2321 (description
2322 "@code{vine} provides a special implementation of promises in that it can
2323 be used both for \"promise of a value\" and lazy evaluation. The biggest
2324 upside for this is that everything in a promise can also be a promise,
2325 e.g. filters, callbacks and errbacks can all be promises.")
2326 (license license:bsd-3)))
2327
2328 (define-public python-virtualenv
2329 (package
2330 (name "python-virtualenv")
2331 (version "16.1.0")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "virtualenv" version))
2336 (sha256
2337 (base32
2338 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2339 (build-system python-build-system)
2340 (arguments
2341 `(#:phases
2342 (modify-phases %standard-phases
2343 (add-before 'check 'disable-failing-test
2344 (lambda _
2345 ;; Disable failing test. See upstream bug report
2346 ;; https://github.com/pypa/virtualenv/issues/957
2347 (substitute* "tests/test_virtualenv.py"
2348 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2349 #t)))))
2350 (native-inputs
2351 `(("python-mock" ,python-mock)
2352 ("python-pytest" ,python-pytest)))
2353 (home-page "https://virtualenv.pypa.io/")
2354 (synopsis "Virtual Python environment builder")
2355 (description
2356 "Virtualenv is a tool to create isolated Python environments.")
2357 (license license:expat)))
2358
2359 (define-public python2-virtualenv
2360 (package-with-python2 python-virtualenv))
2361
2362 (define-public python-markupsafe
2363 (package
2364 (name "python-markupsafe")
2365 (version "1.1.1")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 (uri (pypi-uri "MarkupSafe" version))
2370 (sha256
2371 (base32
2372 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2373 (build-system python-build-system)
2374 (arguments
2375 `(#:modules ((ice-9 ftw)
2376 (srfi srfi-1)
2377 (srfi srfi-26)
2378 (guix build utils)
2379 (guix build python-build-system))
2380 #:phases (modify-phases %standard-phases
2381 (replace 'check
2382 (lambda _
2383 (let ((cwd (getcwd))
2384 (libdir (find (cut string-prefix? "lib." <>)
2385 (scandir "build"))))
2386 (setenv "PYTHONPATH"
2387 (string-append cwd "/build/" libdir ":"
2388 (getenv "PYTHONPATH")))
2389 (invoke "pytest" "-vv")))))))
2390 (native-inputs
2391 `(("python-pytest" ,python-pytest)))
2392 (home-page "https://github.com/mitsuhiko/markupsafe")
2393 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2394 (description
2395 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2396 for Python.")
2397 (license license:bsd-3)))
2398
2399 (define-public python2-markupsafe
2400 (package-with-python2 python-markupsafe))
2401
2402 (define-public python-jinja2
2403 (package
2404 (name "python-jinja2")
2405 (version "2.10.1")
2406 (source
2407 (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "Jinja2" version))
2410 (sha256
2411 (base32
2412 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2413 (build-system python-build-system)
2414 (propagated-inputs
2415 `(("python-markupsafe" ,python-markupsafe)))
2416 (home-page "http://jinja.pocoo.org/")
2417 (synopsis "Python template engine")
2418 (description
2419 "Jinja2 is a small but fast and easy to use stand-alone template engine
2420 written in pure Python.")
2421 (license license:bsd-3)))
2422
2423 (define-public python2-jinja2
2424 (package-with-python2 python-jinja2))
2425
2426 (define-public python-pystache
2427 (package
2428 (name "python-pystache")
2429 (version "0.5.4")
2430 (source (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "pystache" version))
2433 (sha256
2434 (base32
2435 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2436 (build-system python-build-system)
2437 (arguments
2438 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2439 (home-page "http://defunkt.io/pystache/")
2440 (synopsis "Python logic-less template engine")
2441 (description
2442 "Pystache is a Python implementation of the framework agnostic,
2443 logic-free templating system Mustache.")
2444 (license license:expat)
2445 (properties `((python2-variant . ,(delay python2-pystache))))))
2446
2447 (define-public python2-pystache
2448 (package (inherit (package-with-python2
2449 (strip-python2-variant python-pystache)))
2450 (arguments
2451 `(#:python ,python-2
2452 #:phases
2453 (modify-phases %standard-phases
2454 (replace 'check
2455 (lambda _
2456 (invoke "python" "test_pystache.py"))))))))
2457
2458 (define-public python-joblib
2459 (package
2460 (name "python-joblib")
2461 (version "0.13.0")
2462 (source (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "joblib" version))
2465 (sha256
2466 (base32
2467 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2468 (build-system python-build-system)
2469 (arguments
2470 `(#:phases
2471 (modify-phases %standard-phases
2472 (replace 'check
2473 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2474 (native-inputs
2475 `(("python-pytest" ,python-pytest)))
2476 (home-page "https://joblib.readthedocs.io/")
2477 (synopsis "Using Python functions as pipeline jobs")
2478 (description
2479 "Joblib is a set of tools to provide lightweight pipelining in Python.
2480 In particular, joblib offers: transparent disk-caching of the output values
2481 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2482 logging and tracing of the execution.")
2483 (license license:bsd-3)))
2484
2485 (define-public python2-joblib
2486 (package-with-python2 python-joblib))
2487
2488 (define-public python-daemon
2489 (package
2490 (name "python-daemon")
2491 (version "2.2.3")
2492 (source
2493 (origin
2494 (method url-fetch)
2495 (uri (pypi-uri "python-daemon" version))
2496 (sha256
2497 (base32
2498 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2499 (build-system python-build-system)
2500 (arguments
2501 `(#:phases
2502 (modify-phases %standard-phases
2503 (add-before 'check 'disable-tests
2504 (lambda _
2505 ;; FIXME: Determine why test fails
2506 (substitute* "test/test_daemon.py"
2507 (("test_detaches_process_context")
2508 "skip_test_detaches_process_context"))
2509 #t)))))
2510 (propagated-inputs
2511 `(("python-lockfile" ,python-lockfile)))
2512 (native-inputs
2513 `(("python-unittest2" ,python-unittest2)
2514 ("python-testtools" ,python-testtools)
2515 ("python-testscenarios" ,python-testscenarios)
2516 ("python-mock" ,python-mock)
2517 ("python-docutils" ,python-docutils)))
2518 (home-page "https://pagure.io/python-daemon/")
2519 (synopsis "Python library for making a Unix daemon process")
2520 (description "Python-daemon is a library that assists a Python program to
2521 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2522
2523 This library provides a @code{DaemonContext} class that manages the following
2524 important tasks for becoming a daemon process:
2525 @enumerate
2526 @item Detach the process into its own process group.
2527 @item Set process environment appropriate for running inside a chroot.
2528 @item Renounce suid and sgid privileges.
2529 @item Close all open file descriptors.
2530 @item Change the working directory, uid, gid, and umask.
2531 @item Set appropriate signal handlers.
2532 @item Open new file descriptors for stdin, stdout, and stderr.
2533 @item Manage a specified PID lock file.
2534 @item Register cleanup functions for at-exit processing.
2535 @end enumerate")
2536 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2537 (license (list license:asl2.0 license:gpl3+))))
2538
2539 (define-public python-docutils
2540 (package
2541 (name "python-docutils")
2542 (version "0.14")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "docutils" version))
2547 (sha256
2548 (base32
2549 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2550 (build-system python-build-system)
2551 (arguments
2552 '(#:tests? #f)) ; no setup.py test command
2553 (home-page "http://docutils.sourceforge.net/")
2554 (synopsis "Python Documentation Utilities")
2555 (description
2556 "Docutils is a modular system for processing documentation into useful
2557 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2558 reStructuredText.")
2559 ;; Most of the source code is public domain, but some source files are
2560 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2561 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2562
2563 (define-public python2-docutils
2564 (package-with-python2 python-docutils))
2565
2566 (define-public python-pygments
2567 (package
2568 (name "python-pygments")
2569 (version "2.4.2")
2570 (source
2571 (origin
2572 (method url-fetch)
2573 (uri (pypi-uri "Pygments" version))
2574 (sha256
2575 (base32
2576 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2577 (build-system python-build-system)
2578 (arguments
2579 ;; FIXME: Tests require sphinx, which depends on this.
2580 '(#:tests? #f))
2581 (home-page "http://pygments.org/")
2582 (synopsis "Syntax highlighting")
2583 (description
2584 "Pygments is a syntax highlighting package written in Python.")
2585 (license license:bsd-2)))
2586
2587 (define-public python2-pygments
2588 (package-with-python2 python-pygments))
2589
2590 (define-public python-bumpversion
2591 (package
2592 (name "python-bumpversion")
2593 (version "0.5.3")
2594 (source
2595 (origin
2596 (method url-fetch)
2597 (uri (pypi-uri "bumpversion" version))
2598 (sha256
2599 (base32
2600 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2601 (build-system python-build-system)
2602 (home-page "https://github.com/peritus/bumpversion")
2603 (synopsis "Tool to bump software version")
2604 (description "This tool provides a command-line interface (CLI) to bump a
2605 software version simply.")
2606 (license license:expat)))
2607
2608 (define-public python-deprecated
2609 (package
2610 (name "python-deprecated")
2611 (version "1.2.5")
2612 (source
2613 (origin
2614 (method git-fetch)
2615 (uri (git-reference
2616 (url "https://github.com/tantale/deprecated.git")
2617 (commit (string-append "v" version))))
2618 (file-name (git-file-name name version))
2619 (sha256
2620 (base32
2621 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2622 (build-system python-build-system)
2623 (arguments
2624 `(#:phases (modify-phases %standard-phases
2625 (replace 'check
2626 (lambda _
2627 (invoke "pytest"))))))
2628 (propagated-inputs
2629 `(("python-wrapt" ,python-wrapt)))
2630 (native-inputs
2631 `(("python-bumpversion" ,python-bumpversion)
2632 ("python-pytest" ,python-pytest)
2633 ("python-pytest-cov" ,python-pytest-cov)
2634 ("python-sphinx" ,python-sphinx)
2635 ("python-tox" ,python-tox)))
2636 (home-page "https://github.com/tantale/deprecated")
2637 (synopsis "Python decorator to deprecate classes, functions or methods")
2638 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2639 to deprecate classes, functions or methods.")
2640 (license license:expat)))
2641
2642 (define-public python-pygithub
2643 (package
2644 (name "python-pygithub")
2645 (version "1.43.7")
2646 (source
2647 ;; We fetch from the Git repo because there are no tests in the PyPI
2648 ;; archive.
2649 (origin
2650 (method git-fetch)
2651 (uri (git-reference
2652 (url "https://github.com/PyGithub/PyGithub.git")
2653 (commit (string-append "v" version))))
2654 (file-name (git-file-name name version))
2655 (sha256
2656 (base32
2657 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2658 (build-system python-build-system)
2659 (arguments
2660 `(#:phases (modify-phases %standard-phases
2661 ;; Some tests rely on the network.
2662 (add-after 'unpack 'disable-failing-tests
2663 (lambda _
2664 (substitute* "tests/Issue142.py"
2665 (("testDecodeJson") "disabled_testDecodeJson"))
2666 #t))
2667 (add-before 'check 'prepare-for-tests
2668 (lambda _
2669 (for-each (lambda (f)
2670 (chmod f #o666))
2671 (find-files "./tests"))
2672 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2673 (setenv "PYTHONPATH"
2674 (string-append "./tests:" (getenv "PYTHONPATH")))
2675 #t)))))
2676 (propagated-inputs
2677 `(("python-deprecated" ,python-deprecated)
2678 ("python-pyjwt" ,python-pyjwt)
2679 ("python-requests" ,python-requests)))
2680 (native-inputs `(("python-httpretty" ,python-httpretty)))
2681 (home-page "https://pygithub.readthedocs.io/en/latest/")
2682 (synopsis "Python library for the GitHub API")
2683 (description "This library allows managing GitHub resources such as
2684 repositories, user profiles, and organizations in your Python applications,
2685 using version 3 of the GitHub application programming interface (API).")
2686 (license license:lgpl3+)))
2687
2688 (define-public python-rellu
2689 (package
2690 (name "python-rellu")
2691 (version "0.7")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "rellu" version))
2696 (sha256
2697 (base32
2698 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2699 (build-system python-build-system)
2700 (propagated-inputs
2701 `(("python-invoke" ,python-invoke)
2702 ("python-pygithub" ,python-pygithub)))
2703 (home-page "https://github.com/robotframework/rellu")
2704 (synopsis "Utilities to create PyPI releases")
2705 (description "This collection of utilities contains tooling and templates
2706 to assist in creating releases on GitHub and publishing them on PyPI. It is
2707 designed to be used by Robot Framework and tools and libraries in its
2708 ecosystem, but can naturally be used also by other projects.")
2709 (license license:asl2.0)))
2710
2711 (define-public python-robotframework
2712 (package
2713 (name "python-robotframework")
2714 (version "3.1.2")
2715 ;; There are no tests in the PyPI archive.
2716 (source
2717 (origin
2718 (method git-fetch)
2719 (uri (git-reference
2720 (url "https://github.com/robotframework/robotframework.git")
2721 (commit (string-append "v" version))))
2722 (file-name (git-file-name name version))
2723 (sha256
2724 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2725 (patches (search-patches
2726 "python-robotframework-honor-source-date-epoch.patch"))))
2727 (build-system python-build-system)
2728 (arguments
2729 `(#:phases (modify-phases %standard-phases
2730 (add-before 'build 'build-and-install-doc
2731 (lambda* (#:key outputs #:allow-other-keys)
2732 (let* ((doc-output (assoc-ref outputs "doc"))
2733 (doc (string-append doc-output "/share/"
2734 ,name "-" ,version "/")))
2735 (invoke "invoke" "library-docs" "all")
2736 (mkdir-p doc)
2737 (copy-recursively "doc/libraries"
2738 (string-append doc "/libraries"))
2739 #t)))
2740 (replace 'check
2741 (lambda _
2742 (invoke "python" "utest/run.py"))))))
2743 (native-inputs
2744 `(("python-invoke" ,python-invoke)
2745 ("python-rellu" ,python-rellu)
2746 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2747 (outputs '("out" "doc"))
2748 (home-page "https://robotframework.org")
2749 (synopsis "Generic automation framework")
2750 (description "Robot Framework is a generic automation framework for
2751 acceptance testing, acceptance test driven development (ATDD), and robotic
2752 process automation (RPA).")
2753 (license license:asl2.0)))
2754
2755 (define-public python-robotframework-lint
2756 ;; There is no properly tagged release; the commit below seems to correspond
2757 ;; to the 0.9 stable release available from PyPI. The tests are not
2758 ;; included in the PyPI archive, so we fetch the sources from the upstream
2759 ;; Git repo.
2760 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2761 (revision "1"))
2762 (package
2763 (name "python-robotframework-lint")
2764 (version (git-version "0.9.0" revision commit))
2765 (source
2766 (origin
2767 (method git-fetch)
2768 (uri (git-reference
2769 (url "https://github.com/boakley/robotframework-lint.git")
2770 (commit commit)))
2771 (file-name (git-file-name name version))
2772 (sha256
2773 (base32
2774 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2775 (build-system python-build-system)
2776 (arguments
2777 `(#:phases
2778 (modify-phases %standard-phases
2779 (replace 'check
2780 (lambda _
2781 (invoke "python" "-m" "robot" "-A"
2782 "tests/conf/default.args" "tests"))))))
2783 (propagated-inputs
2784 `(("python-robotframework" ,python-robotframework)))
2785 (home-page "https://github.com/boakley/robotframework-lint/")
2786 (synopsis "Static analysis tool (linter) for Robot Framework")
2787 (description "This package provides the @code{rflint} command-line
2788 utility, a static analysis tool (linter) for Robot Framework source files.")
2789 (license license:asl2.0))))
2790
2791 (define-public python-robotframework-sshlibrary
2792 (package
2793 (name "python-robotframework-sshlibrary")
2794 (version "3.3.0")
2795 ;; There are no tests in the PyPI archive.
2796 (source
2797 (origin
2798 (method git-fetch)
2799 (uri (git-reference
2800 (url "https://github.com/robotframework/SSHLibrary.git")
2801 (commit (string-append "v" version))))
2802 (file-name (git-file-name name version))
2803 (sha256
2804 (base32
2805 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2806 (build-system python-build-system)
2807 (arguments
2808 `(#:phases
2809 (modify-phases %standard-phases
2810 (add-before 'build 'build-and-install-doc
2811 (lambda* (#:key outputs #:allow-other-keys)
2812 (let* ((doc-output (assoc-ref outputs "doc"))
2813 (doc (string-append doc-output "/share/"
2814 ,name "-" ,version "/")))
2815 (invoke "chmod" "-R" "+w" "docs")
2816 (invoke "invoke" "kw-docs" "project-docs")
2817 (mkdir-p doc)
2818 (for-each delete-file (find-files "docs" "\\.rst"))
2819 (copy-recursively "docs" doc)
2820 #t)))
2821 (replace 'check
2822 (lambda _
2823 ;; Some tests require an SSH server; we remove them.
2824 (delete-file "utest/test_client_api.py")
2825 (delete-file "utest/test_scp.py")
2826 (invoke "python" "utest/run.py"))))))
2827 (propagated-inputs
2828 `(("python-robotframework" ,python-robotframework)
2829 ("python-paramiko" ,python-paramiko)
2830 ("python-scp" ,python-scp)))
2831 (native-inputs
2832 `(("openssh" ,openssh)
2833 ("which" ,which)
2834 ;; To generate the documentation
2835 ("python-docutils" ,python-docutils)
2836 ("python-invoke" ,python-invoke)
2837 ("python-pygments" ,python-pygments)
2838 ("python-rellu" ,python-rellu)))
2839 (outputs '("out" "doc"))
2840 (home-page "https://github.com/robotframework/SSHLibrary")
2841 (synopsis "Robot Framework library for SSH and SFTP")
2842 (description "SSHLibrary is a Robot Framework library providing support
2843 for SSH and SFTP. It has the following main usages:
2844 @itemize @bullet
2845 @item Executing commands on the remote machine, either blocking or non-blocking.
2846 @item Writing and reading in an interactive shell.
2847 @item Transferring files and directories over SFTP.
2848 @item Ensuring that files and directories exist on the remote machine.
2849 @end itemize")
2850 (license license:asl2.0)))
2851
2852 (define-public python-scp
2853 (package
2854 (name "python-scp")
2855 (version "0.13.2")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "scp" version))
2860 (sha256
2861 (base32
2862 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2863 (build-system python-build-system)
2864 (arguments
2865 '(#:tests? #f)) ;tests require an SSH server
2866 (propagated-inputs
2867 `(("python-paramiko" ,python-paramiko)))
2868 (home-page "https://github.com/jbardin/scp.py")
2869 (synopsis "SCP protocol module for Python and Paramiko")
2870 (description "The scp module extends the Paramiko library to send and
2871 receive files via the SCP1 protocol, as implemented by the OpenSSH
2872 @command{scp} program.")
2873 (license license:gpl2+)))
2874
2875 (define-public python-rst.linker
2876 (package
2877 (name "python-rst.linker")
2878 (version "1.10")
2879 (source
2880 (origin
2881 (method url-fetch)
2882 (uri (pypi-uri "rst.linker" version))
2883 (sha256
2884 (base32
2885 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2886 (build-system python-build-system)
2887 (propagated-inputs
2888 `(("python-dateutil" ,python-dateutil)
2889 ("python-six" ,python-six)))
2890 (native-inputs
2891 `(("python-setuptools-scm" ,python-setuptools-scm)))
2892 ;; Test would require path.py, which would introduce a cyclic dependence.
2893 (arguments `(#:tests? #f))
2894 ;; Note: As of version 1.7 the documentation is not worth building.
2895 (home-page "https://github.com/jaraco/rst.linker")
2896 (synopsis "Sphinx plugin to add links and timestamps")
2897 (description "rst.linker allows to automatically replace text by a
2898 reStructuredText external reference or timestamps. It's primary purpose is to
2899 augment the changelog, but it can be used for other documents, too.")
2900 (license license:expat)))
2901
2902 (define-public python2-rst.linker
2903 (package-with-python2 python-rst.linker))
2904
2905 (define-public python-feedgenerator
2906 (package
2907 (name "python-feedgenerator")
2908 (version "1.9")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "feedgenerator" version))
2913 (sha256
2914 (base32
2915 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2916 (modules '((guix build utils)))
2917 (snippet
2918 '(begin
2919 ;; Remove pre-compiled .pyc files from source.
2920 (for-each delete-file-recursively
2921 (find-files "." "__pycache__" #:directories? #t))
2922 (for-each delete-file (find-files "." "\\.pyc$"))
2923 #t))))
2924 (build-system python-build-system)
2925 (propagated-inputs
2926 `(("python-pytz" ,python-pytz)
2927 ("python-six" ,python-six)))
2928 (home-page "https://github.com/getpelican/feedgenerator")
2929 (synopsis
2930 "Standalone version of Django's Atom/RSS feed generator")
2931 (description
2932 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2933 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2934 (license license:bsd-3)))
2935
2936 (define-public python2-feedgenerator
2937 (package-with-python2 python-feedgenerator))
2938
2939 (define-public python-toml
2940 (package
2941 (name "python-toml")
2942 (version "0.9.4")
2943 (source
2944 (origin
2945 (method url-fetch)
2946 (uri (pypi-uri "toml" version))
2947 (sha256
2948 (base32
2949 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2950 (build-system python-build-system)
2951 (arguments
2952 `(#:tests? #f)) ;no tests suite in release
2953 (home-page "https://github.com/uiri/toml")
2954 (synopsis "Library for TOML")
2955 (description
2956 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2957 Language (TOML) configuration files.")
2958 (license license:expat)))
2959
2960 (define-public python-jsonrpc-server
2961 (package
2962 (name "python-jsonrpc-server")
2963 (version "0.1.2")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "python-jsonrpc-server" version))
2968 (sha256
2969 (base32
2970 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2971 (build-system python-build-system)
2972 (propagated-inputs
2973 `(("python-future" ,python-future)
2974 ("python-mock" ,python-mock)
2975 ("python-pytest" ,python-pytest)))
2976 (home-page
2977 "https://github.com/palantir/python-jsonrpc-server")
2978 (synopsis "JSON RPC 2.0 server library")
2979 (description
2980 "This package provides a JSON RPC 2.0 server library for Python.")
2981 (license license:expat)))
2982
2983 (define-public python-pydocstyle
2984 (package
2985 (name "python-pydocstyle")
2986 (version "3.0.0")
2987 (source
2988 (origin
2989 (method url-fetch)
2990 (uri (pypi-uri "pydocstyle" version))
2991 (sha256
2992 (base32
2993 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2994 (build-system python-build-system)
2995 (propagated-inputs
2996 `(("python-six" ,python-six)
2997 ("python-snowballstemmer" ,python-snowballstemmer)))
2998 (home-page
2999 "https://github.com/PyCQA/pydocstyle/")
3000 (synopsis "Python docstring style checker")
3001 (description
3002 "This package provides a style checker for the Python Language
3003 Server (PLS).")
3004 (license license:expat)))
3005
3006 (define-public python-language-server
3007 (package
3008 (name "python-language-server")
3009 (version "0.26.1")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "python-language-server" version))
3014 (sha256
3015 (base32
3016 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-pluggy" ,python-pluggy)
3020 ("python-jsonrpc-server" ,python-jsonrpc-server)
3021 ("python-jedi" ,python-jedi)
3022 ("python-yapf" ,python-yapf)
3023 ("python-pyflakes" ,python-pyflakes)
3024 ("python-pydocstyle" ,python-pydocstyle)
3025 ("python-pycodestyle" ,python-pycodestyle)
3026 ("python-mccabe" ,python-mccabe)
3027 ("python-rope" ,python-rope)
3028 ("python-autopep8" ,python-autopep8)
3029 ("python-pylint" ,python-pylint)))
3030 (home-page "https://github.com/palantir/python-language-server")
3031 (synopsis "Python implementation of the Language Server Protocol")
3032 (description
3033 "The Python Language Server (pyls) is an implementation of the Python 3
3034 language specification for the Language Server Protocol (LSP). This tool is
3035 used in text editing environments to provide a complete and integrated
3036 feature-set for programming Python effectively.")
3037 (license license:expat)))
3038
3039 (define-public python-black
3040 (package
3041 (name "python-black")
3042 (version "18.6b4")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "black" version))
3047 (sha256
3048 (base32
3049 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3050 (build-system python-build-system)
3051 (arguments
3052 `(#:phases
3053 (modify-phases %standard-phases
3054 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3055 (lambda _
3056 (let ((python3 (which "python3")))
3057 (substitute* '("tests/data/fmtonoff.py"
3058 "tests/data/string_prefixes.py"
3059 "tests/data/function.py")
3060 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3061 (string-append "#!" python3 (if (string? minor-version)
3062 minor-version
3063 ""))))))))))
3064 (propagated-inputs
3065 `(("python-click" ,python-click)
3066 ("python-attrs" ,python-attrs)
3067 ("python-appdirs" ,python-appdirs)
3068 ("python-toml" ,python-toml)))
3069 (home-page "https://github.com/ambv/black")
3070 (synopsis "The uncompromising code formatter")
3071 (description "Black is the uncompromising Python code formatter.")
3072 (license license:expat)))
3073
3074 (define-public python-blinker
3075 (package
3076 (name "python-blinker")
3077 (version "1.4")
3078 (source
3079 (origin
3080 (method url-fetch)
3081 (uri (pypi-uri "blinker" version))
3082 (sha256
3083 (base32
3084 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3085 (build-system python-build-system)
3086 (home-page "http://pythonhosted.org/blinker/")
3087 (synopsis "Fast, simple object-to-object and broadcast signaling")
3088 (description
3089 "Blinker provides a fast dispatching system that allows any number of
3090 interested parties to subscribe to events, or \"signals\".")
3091 (license license:expat)))
3092
3093 (define-public python2-blinker
3094 (package-with-python2 python-blinker))
3095
3096 (define-public pelican
3097 (package
3098 (name "pelican")
3099 (version "4.0.1")
3100 (source
3101 (origin
3102 (method url-fetch)
3103 (uri (pypi-uri "pelican" version))
3104 (sha256
3105 (base32
3106 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3107 (build-system python-build-system)
3108 (propagated-inputs
3109 `(("python-feedgenerator" ,python-feedgenerator)
3110 ("python-jinja2" ,python-jinja2)
3111 ("python-pygments" ,python-pygments)
3112 ("python-docutils" ,python-docutils)
3113 ("python-pytz" ,python-pytz)
3114 ("python-blinker" ,python-blinker)
3115 ("python-unidecode" ,python-unidecode)
3116 ("python-six" ,python-six)
3117 ("python-dateutil" ,python-dateutil)
3118 ("python-markdown" ,python-markdown)))
3119 (home-page "https://getpelican.com/")
3120 (arguments
3121 `(;; XXX Requires a lot more packages to do unit tests :P
3122 #:tests? #f
3123 #:phases (modify-phases %standard-phases
3124 (add-before
3125 'install 'adjust-requires
3126 ;; Since feedgenerator is installed from git, it doesn't
3127 ;; conform to the version requirements.
3128 ;;
3129 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3130 ;; version requirement so setuptools doesn't get confused.
3131 (lambda _
3132 (substitute* "setup.py"
3133 (("['\"]feedgenerator.*?['\"]")
3134 "'feedgenerator'")))))))
3135 (synopsis "Python-based static site publishing system")
3136 (description
3137 "Pelican is a tool to generate a static blog from reStructuredText,
3138 Markdown input files, and more. Pelican uses Jinja2 for templating
3139 and is very extensible.")
3140 (license license:agpl3+)))
3141
3142 (define-public mallard-ducktype
3143 (package
3144 (name "mallard-ducktype")
3145 (version "1.0.1")
3146 (source
3147 (origin
3148 (method git-fetch)
3149 ;; git-reference because a proper source tarball is not available
3150 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3151 (uri (git-reference
3152 (url "https://github.com/projectmallard/mallard-ducktype.git")
3153 (commit version)))
3154 (file-name (git-file-name name version))
3155 (sha256
3156 (base32
3157 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3158 (build-system python-build-system)
3159 (home-page "http://projectmallard.org")
3160 (synopsis "Convert Ducktype to Mallard documentation markup")
3161 (description
3162 "Ducktype is a lightweight syntax that can represent all the semantics
3163 of the Mallard XML documentation system. Ducktype files can be converted to
3164 Mallard using the @command{ducktype} tool. The yelp-tools package
3165 provides additional functionality on the produced Mallard documents.")
3166 (license license:expat)))
3167
3168 (define-public python-scikit-image
3169 (package
3170 (name "python-scikit-image")
3171 (version "0.14.2")
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (pypi-uri "scikit-image" version))
3176 (sha256
3177 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3178 (build-system python-build-system)
3179 (arguments
3180 ;; TODO: Some tests require running X11 server. Disable them?
3181 '(#:tests? #f))
3182 ;; See DEPENDS.txt for the list of build and run time requiremnts
3183 (propagated-inputs
3184 `(("python-cloudpickle" ,python-cloudpickle)
3185 ("python-dask" ,python-dask)
3186 ("python-matplotlib" ,python-matplotlib)
3187 ("python-networkx" ,python-networkx)
3188 ("python-numpy" ,python-numpy)
3189 ("python-pillow" ,python-pillow)
3190 ("python-pywavelets" ,python-pywavelets)
3191 ("python-scipy" ,python-scipy)
3192 ("python-six" ,python-six)))
3193 (native-inputs
3194 `(("python-cython" ,python-cython)))
3195 (home-page "http://scikit-image.org/")
3196 (synopsis "Image processing in Python")
3197 (description
3198 "Scikit-image is a collection of algorithms for image processing.")
3199 (license license:bsd-3)))
3200
3201 (define-public python2-scikit-image
3202 (package-with-python2 python-scikit-image))
3203
3204 (define-public python-cython
3205 (package
3206 (name "python-cython")
3207 (version "0.29.11")
3208 (source
3209 (origin
3210 (method url-fetch)
3211 (uri (pypi-uri "Cython" version))
3212 (sha256
3213 (base32
3214 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3215 (build-system python-build-system)
3216 ;; we need the full python package and not just the python-wrapper
3217 ;; because we need libpython3.3m.so
3218 (inputs
3219 `(("python" ,python)))
3220 (arguments
3221 `(#:phases
3222 (modify-phases %standard-phases
3223 (add-before 'check 'set-HOME
3224 ;; some tests require access to "$HOME/.cython"
3225 (lambda _ (setenv "HOME" "/tmp") #t))
3226
3227 ;; FIXME: These tests started failing on armhf after the 0.28 update
3228 ;; (commit c69d11c5930), both with an error such as this:
3229 ;; compiling (cpp) and running dictcomp ...
3230 ;; === C/C++ compiler error output: ===
3231 ;; ‘
3232 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3233 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3234 ,@(if (target-arm32?)
3235 `((add-before 'check 'disable-failing-tests
3236 (lambda _
3237 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3238 (for-each (lambda (test)
3239 (format disabled-tests "~a\n" test))
3240 '("memslice" "dictcomp"))
3241 (close-port disabled-tests)))))
3242 '())
3243
3244 (replace 'check
3245 (lambda _
3246 ;; Disable compiler optimizations to greatly reduce the running
3247 ;; time of the test suite.
3248 (setenv "CFLAGS" "-O0")
3249
3250 (invoke "python" "runtests.py" "-vv"
3251 "-j" (number->string (parallel-job-count))))))))
3252 (home-page "https://cython.org/")
3253 (synopsis "C extensions for Python")
3254 (description "Cython is an optimising static compiler for both the Python
3255 programming language and the extended Cython programming language. It makes
3256 writing C extensions for Python as easy as Python itself.")
3257 (license license:asl2.0)
3258 (properties `((python2-variant . ,(delay python2-cython))))))
3259
3260 (define-public python2-cython
3261 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3262 (package
3263 (inherit base)
3264 (name "python2-cython")
3265 (inputs
3266 `(("python-2" ,python-2))) ;this is not automatically changed
3267 (arguments
3268 (substitute-keyword-arguments (package-arguments base)
3269 ((#:phases phases)
3270 `(modify-phases ,phases
3271 (add-before 'check 'adjust-test_embed
3272 (lambda _
3273 (substitute* "runtests.py"
3274 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3275 ;; so it can give the right -L flag to GCC when embedding static
3276 ;; builds of Python. It is unaware that the Python "config"
3277 ;; directory (where the static library lives) was renamed in
3278 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3279 ;; which works fine, because that is where the shared library is.
3280 ;;
3281 ;; It also appears to be unaware that the Makefile in Demos/embed
3282 ;; already unconditionally pass the static library location to GCC,
3283 ;; after checking sysconfig.get_config_var('LIBPL).
3284 ;;
3285 ;; The effect is that the linker is unable to resolve libexpat
3286 ;; symbols when building for Python 2, because neither the Python 2
3287 ;; shared library nor Expat is available. To fix it, we can either
3288 ;; add Expat as an input and make it visible to the linker, or just
3289 ;; prevent it from overriding the Python shared library location.
3290 ;; The end result is identical, so we take the easy route.
3291 ((" or libname not in os\\.listdir\\(libdir\\)")
3292 ""))
3293 #t)))))))))
3294
3295 ;; The RPython toolchain currently does not support Python 3.
3296 (define-public python2-rpython
3297 (package
3298 (name "python2-rpython")
3299 (version "0.2.1")
3300 (source
3301 (origin
3302 (method url-fetch)
3303 (uri (pypi-uri "rpython" version))
3304 (sha256
3305 (base32
3306 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3307 (build-system python-build-system)
3308 (arguments `(#:python ,python-2))
3309 (native-inputs
3310 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3311 (home-page "https://rpython.readthedocs.org")
3312 (synopsis "Framework for implementing interpreters and virtual machines")
3313 (description "RPython is a translation and support framework for
3314 producing implementations of dynamic languages, emphasizing a clean separation
3315 between language specification and implementation aspects.")
3316 (license license:expat)))
3317
3318 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3319 ;; python-scipy still build, as these three packages are often used together.
3320 (define-public python-numpy
3321 (package
3322 (name "python-numpy")
3323 (version "1.15.4")
3324 (source
3325 (origin
3326 (method url-fetch)
3327 (uri (string-append
3328 "https://github.com/numpy/numpy/releases/download/v"
3329 version "/numpy-" version ".tar.gz"))
3330 (sha256
3331 (base32
3332 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3333 (build-system python-build-system)
3334 (inputs
3335 `(("openblas" ,openblas)
3336 ("lapack" ,lapack)))
3337 (native-inputs
3338 `(("python-cython" ,python-cython)
3339 ("python-pytest" ,python-pytest)
3340 ("gfortran" ,gfortran)))
3341 (arguments
3342 `(#:phases
3343 (modify-phases %standard-phases
3344 (add-before 'build 'configure-blas-lapack
3345 (lambda* (#:key inputs #:allow-other-keys)
3346 (call-with-output-file "site.cfg"
3347 (lambda (port)
3348 (format port
3349 "[openblas]
3350 libraries = openblas
3351 library_dirs = ~a/lib
3352 include_dirs = ~a/include
3353
3354 # backslash-n to make emacs happy
3355 \n[lapack]
3356 lapack_libs = lapack
3357 library_dirs = ~a/lib
3358 include_dirs = ~a/include
3359 "
3360 (assoc-ref inputs "openblas")
3361 (assoc-ref inputs "openblas")
3362 (assoc-ref inputs "lapack")
3363 (assoc-ref inputs "lapack"))))
3364 #t))
3365 (add-before 'build 'fix-executable-paths
3366 (lambda* (#:key inputs #:allow-other-keys)
3367 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3368 ;; instead of /bin/sh.
3369 (substitute* "numpy/distutils/exec_command.py"
3370 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3371 (string-append match-start (assoc-ref inputs "bash") match-end)))
3372 ;; Use "gcc" executable, not "cc".
3373 (substitute* "numpy/distutils/system_info.py"
3374 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3375 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3376 #t))
3377 ;; Tests can only be run after the library has been installed and not
3378 ;; within the source directory.
3379 (delete 'check)
3380 (add-after 'install 'check
3381 (lambda* (#:key outputs inputs #:allow-other-keys)
3382 ;; Make installed package available for running the tests
3383 (add-installed-pythonpath inputs outputs)
3384 ;; Make sure "f2py" etc is found.
3385 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3386 ":" (getenv "PATH")))
3387 (with-directory-excursion "/tmp"
3388 (invoke "python" "-c"
3389 "import numpy; numpy.test(verbose=2)")))))))
3390 (home-page "http://www.numpy.org/")
3391 (synopsis "Fundamental package for scientific computing with Python")
3392 (description "NumPy is the fundamental package for scientific computing
3393 with Python. It contains among other things: a powerful N-dimensional array
3394 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3395 and Fortran code, useful linear algebra, Fourier transform, and random number
3396 capabilities.")
3397 (license license:bsd-3)))
3398
3399 (define-public python2-numpy
3400 (package-with-python2 python-numpy))
3401
3402 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3403 ;; interest only for legacy code going back to NumPy's predecessor
3404 ;; Numeric.
3405 (define-public python2-numpy-1.8
3406 (package (inherit python2-numpy)
3407 (version "1.8.2")
3408 (source
3409 (origin
3410 (method url-fetch)
3411 (uri (string-append
3412 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3413 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3414 (sha256
3415 (base32
3416 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3417 (arguments
3418 (substitute-keyword-arguments (package-arguments python2-numpy)
3419 ((#:phases phases)
3420 `(modify-phases ,phases
3421 (replace 'configure-blas-lapack
3422 (lambda* (#:key inputs #:allow-other-keys)
3423 (call-with-output-file "site.cfg"
3424 (lambda (port)
3425 (format port
3426 "[openblas]
3427 libraries = openblas,lapack
3428 library_dirs = ~a/lib:~a/lib
3429 include_dirs = ~a/include:~a/include
3430 "
3431 (assoc-ref inputs "openblas")
3432 (assoc-ref inputs "lapack")
3433 (assoc-ref inputs "openblas")
3434 (assoc-ref inputs "lapack"))))
3435 #t))))))
3436 (native-inputs
3437 `(("python2-nose" ,python2-nose)))
3438 (description "NumPy is the fundamental package for scientific computing
3439 with Python. It contains among other things: a powerful N-dimensional array
3440 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3441 and Fortran code, useful linear algebra, Fourier transform, and random number
3442 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3443 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3444 Numeric.")
3445 (license license:bsd-3)))
3446
3447 (define-public python-munch
3448 (package
3449 (name "python-munch")
3450 (version "2.0.4")
3451 (source
3452 (origin
3453 (method url-fetch)
3454 (uri (pypi-uri "munch" version))
3455 (sha256
3456 (base32
3457 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3458 (build-system python-build-system)
3459 (home-page "https://github.com/Infinidat/munch")
3460 (synopsis "Dot-accessible dictionary")
3461 (description "Munch is a dot-accessible dictionary similar to JavaScript
3462 objects.")
3463 (license license:expat)))
3464
3465 (define-public python2-munch
3466 (package-with-python2 python-munch))
3467
3468 (define-public python-colormath
3469 (package
3470 (name "python-colormath")
3471 (version "3.0.0")
3472 (source
3473 (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "colormath" version))
3476 (sha256
3477 (base32
3478 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3479 (build-system python-build-system)
3480 (propagated-inputs
3481 `(("python-networkx" ,python-networkx)
3482 ("python-numpy" ,python-numpy)))
3483 (home-page "https://github.com/gtaylor/python-colormath")
3484 (synopsis "Color math and conversion library")
3485 (description
3486 "This is a Python library for color math and conversions.")
3487 (license license:bsd-3)))
3488
3489 (define-public python2-colormath
3490 (package-with-python2 python-colormath))
3491
3492 (define-public python-spectra
3493 (package
3494 (name "python-spectra")
3495 (version "0.0.11")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (pypi-uri "spectra" version))
3500 (sha256
3501 (base32
3502 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3503 (build-system python-build-system)
3504 (arguments
3505 `(#:phases
3506 (modify-phases %standard-phases
3507 (replace 'check
3508 (lambda _ (invoke "nosetests" "-v"))))))
3509 (propagated-inputs
3510 `(("python-colormath" ,python-colormath)))
3511 (native-inputs
3512 `(("python-nose" ,python-nose)))
3513 (home-page "https://github.com/jsvine/spectra")
3514 (synopsis "Color scales and color conversion")
3515 (description
3516 "This package provides a Python library intended to make color math,
3517 color scales, and color space conversion easy. It has support for:
3518
3519 @enumerate
3520 @item Color scales
3521 @item Color ranges
3522 @item Color blending
3523 @item Brightening/darkening colors
3524 @item Saturating/desaturating colors
3525 @item Conversion to/from multiple color spaces.
3526 @end enumerate\n")
3527 (license license:expat)))
3528
3529 (define-public python2-spectra
3530 (package-with-python2 python-spectra))
3531
3532 (define-public python-numpy-documentation
3533 (package
3534 (name "python-numpy-documentation")
3535 (version (package-version python-numpy))
3536 (source (package-source python-numpy))
3537 (build-system python-build-system)
3538 (native-inputs
3539 `(("python-matplotlib" ,python-matplotlib)
3540 ("python-numpy" ,python-numpy)
3541 ("pkg-config" ,pkg-config)
3542 ("python-sphinx" ,python-sphinx)
3543 ("python-numpydoc" ,python-numpydoc)
3544 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3545 texlive-fonts-cm-super
3546 texlive-fonts-ec
3547 texlive-generic-ifxetex
3548 texlive-generic-pdftex
3549 texlive-latex-amsfonts
3550 texlive-latex-capt-of
3551 texlive-latex-cmap
3552 texlive-latex-environ
3553 texlive-latex-eqparbox
3554 texlive-latex-etoolbox
3555 texlive-latex-expdlist
3556 texlive-latex-fancyhdr
3557 texlive-latex-fancyvrb
3558 texlive-latex-fncychap
3559 texlive-latex-float
3560 texlive-latex-framed
3561 texlive-latex-geometry
3562 texlive-latex-graphics
3563 texlive-latex-hyperref
3564 texlive-latex-mdwtools
3565 texlive-latex-multirow
3566 texlive-latex-needspace
3567 texlive-latex-oberdiek
3568 texlive-latex-parskip
3569 texlive-latex-preview
3570 texlive-latex-tabulary
3571 texlive-latex-threeparttable
3572 texlive-latex-titlesec
3573 texlive-latex-trimspaces
3574 texlive-latex-ucs
3575 texlive-latex-upquote
3576 texlive-latex-url
3577 texlive-latex-varwidth
3578 texlive-latex-wrapfig)))
3579 ("texinfo" ,texinfo)
3580 ("perl" ,perl)
3581 ("scipy-sphinx-theme"
3582 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3583 (method git-fetch)
3584 (uri (git-reference
3585 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3586 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3587 (sha256
3588 (base32
3589 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3590 ,@(package-native-inputs python-numpy)))
3591 (arguments
3592 `(#:tests? #f ; we're only generating the documentation
3593 #:phases
3594 (modify-phases %standard-phases
3595 (delete 'build)
3596 (replace 'install
3597 (lambda* (#:key inputs outputs #:allow-other-keys)
3598 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3599 (doc (string-append
3600 data "/doc/" ,name "-"
3601 ,(package-version python-numpy)))
3602 (info-reader (string-append data "/info"))
3603 (html (string-append doc "/html"))
3604 (scipy-sphinx-theme "scipy-sphinx-theme")
3605 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3606 (pyver ,(string-append "PYVER=")))
3607
3608 ;; FIXME: this is needed to for texlive-union to generate
3609 ;; fonts, which are not found.
3610 (setenv "HOME" "/tmp")
3611
3612 (with-directory-excursion "doc"
3613 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3614 (mkdir-p html)
3615 (invoke "make" "html" pyver)
3616 (invoke "make" "latex" "PAPER=a4" pyver)
3617 (invoke "make" "-C" "build/latex"
3618 "all-pdf" "PAPER=a4" pyver)
3619 ;; FIXME: Generation of the info file fails.
3620 ;; (invoke "make" "info" pyver)
3621 ;; (mkdir-p info)
3622 ;; (copy-file "build/texinfo/numpy.info"
3623 ;; (string-append info "/numpy.info"))
3624 (for-each (lambda (file)
3625 (copy-file (string-append "build/latex" file)
3626 (string-append doc file)))
3627 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3628 (with-directory-excursion "build/html"
3629 (for-each (lambda (file)
3630 (let* ((dir (dirname file))
3631 (tgt-dir (string-append html "/" dir)))
3632 (unless (equal? "." dir)
3633 (mkdir-p tgt-dir))
3634 (install-file file html)))
3635 (find-files "." ".*")))))
3636 #t)))))
3637 (home-page (package-home-page python-numpy))
3638 (synopsis "Documentation for the python-numpy package")
3639 (description (package-description python-numpy))
3640 (license (package-license python-numpy))))
3641
3642 (define-public python2-numpy-documentation
3643 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3644 (package
3645 (inherit numpy-documentation)
3646 (native-inputs `(("python2-functools32" ,python2-functools32)
3647 ,@(package-native-inputs numpy-documentation))))))
3648
3649 (define-public python-pygit2
3650 (package
3651 (name "python-pygit2")
3652 (version "0.28.2")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "pygit2" version))
3657 (sha256
3658 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3659 (build-system python-build-system)
3660 (arguments
3661 '(#:tests? #f)) ; tests don't run correctly in our environment
3662 (propagated-inputs
3663 `(("python-six" ,python-six)
3664 ("python-cffi" ,python-cffi)
3665 ("libgit2" ,libgit2)
3666 ("python-tox" ,python-tox)))
3667 (native-inputs
3668 `(("python-pytest" ,python-pytest)))
3669 (home-page "https://github.com/libgit2/pygit2")
3670 (synopsis "Python bindings for libgit2")
3671 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3672 library, libgit2 implements Git plumbing.")
3673 ;; GPL2.0 only, with linking exception.
3674 (license license:gpl2)))
3675
3676 (define-public python2-pygit2
3677 (package-with-python2 python-pygit2))
3678
3679 (define-public python-pyparsing
3680 (package
3681 (name "python-pyparsing")
3682 (version "2.3.1")
3683 (source
3684 (origin
3685 (method url-fetch)
3686 (uri (pypi-uri "pyparsing" version))
3687 (sha256
3688 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3689 (build-system python-build-system)
3690 (outputs '("out" "doc"))
3691 (arguments
3692 `(#:tests? #f ; no test target
3693 #:phases
3694 (modify-phases %standard-phases
3695 (add-after 'install 'install-doc
3696 (lambda* (#:key outputs #:allow-other-keys)
3697 (let* ((doc (string-append (assoc-ref outputs "doc")
3698 "/share/doc/" ,name "-" ,version))
3699 (html-doc (string-append doc "/html"))
3700 (examples (string-append doc "/examples")))
3701 (mkdir-p html-doc)
3702 (mkdir-p examples)
3703 (for-each
3704 (lambda (dir tgt)
3705 (map (lambda (file)
3706 (install-file file tgt))
3707 (find-files dir ".*")))
3708 (list "docs" "htmldoc" "examples")
3709 (list doc html-doc examples))
3710 #t))))))
3711 (home-page "https://github.com/pyparsing/pyparsing")
3712 (synopsis "Python parsing class library")
3713 (description
3714 "The pyparsing module is an alternative approach to creating and
3715 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3716 of regular expressions. The pyparsing module provides a library of classes
3717 that client code uses to construct the grammar directly in Python code.")
3718 (license license:expat)))
3719
3720 (define-public python2-pyparsing
3721 (package-with-python2 python-pyparsing))
3722
3723 (define-public python-numpydoc
3724 (package
3725 (name "python-numpydoc")
3726 (version "0.8.0")
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri (pypi-uri "numpydoc" version))
3731 (sha256
3732 (base32
3733 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3734 (build-system python-build-system)
3735 (propagated-inputs
3736 `(("python-sphinx" ,python-sphinx)))
3737 (native-inputs
3738 `(("python-nose" ,python-nose)))
3739 (home-page "https://pypi.python.org/pypi/numpydoc")
3740 (synopsis
3741 "Numpy's Sphinx extensions")
3742 (description
3743 "Sphinx extension to support docstrings in Numpy format.")
3744 (license license:bsd-2)))
3745
3746 (define-public python2-numpydoc
3747 (package-with-python2 python-numpydoc))
3748
3749 (define-public python-numexpr
3750 (package
3751 (name "python-numexpr")
3752 (version "2.6.5")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (pypi-uri "numexpr" version))
3757 (sha256
3758 (base32
3759 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3760 (build-system python-build-system)
3761 (arguments `(#:tests? #f)) ; no tests included
3762 (propagated-inputs
3763 `(("python-numpy" ,python-numpy)))
3764 (home-page "https://github.com/pydata/numexpr")
3765 (synopsis "Fast numerical expression evaluator for NumPy")
3766 (description
3767 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3768 expressions that operate on arrays are accelerated and use less memory than
3769 doing the same calculation in Python. In addition, its multi-threaded
3770 capabilities can make use of all your cores, which may accelerate
3771 computations, most specially if they are not memory-bounded (e.g. those using
3772 transcendental functions).")
3773 (license license:expat)))
3774
3775 (define-public python2-numexpr
3776 (package-with-python2 python-numexpr))
3777
3778 (define-public python-cycler
3779 (package
3780 (name "python-cycler")
3781 (version "0.10.0")
3782 (source (origin
3783 (method url-fetch)
3784 (uri (pypi-uri "cycler" version))
3785 (sha256
3786 (base32
3787 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3788 (build-system python-build-system)
3789 (arguments
3790 ;; XXX: The current version requires 'coveralls' which we don't have.
3791 ;; Enable this for the next release which uses 'python-pytest'.
3792 '(#:tests? #f))
3793 (propagated-inputs
3794 `(("python-six" ,python-six)))
3795 (home-page "http://matplotlib.org/cycler/")
3796 (synopsis "Composable keyword argument iterator")
3797 (description
3798 "When using @code{matplotlib} and plotting more than one line, it is
3799 common to want to be able to want to be able to cycle over one or more artist
3800 styles; but the plotting logic can quickly become involved.
3801 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3802 @code{Cycler} class was developed.")
3803 (license license:bsd-3)))
3804
3805 (define-public python2-cycler
3806 (package-with-python2 python-cycler))
3807
3808 (define-public python-colorspacious
3809 (package
3810 (name "python-colorspacious")
3811 (version "1.1.0")
3812 (source
3813 (origin
3814 (method git-fetch)
3815 (uri (git-reference
3816 (url "https://github.com/njsmith/colorspacious.git")
3817 (commit (string-append "v" version))))
3818 (file-name (git-file-name name version))
3819 (sha256
3820 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3821 (build-system python-build-system)
3822 (propagated-inputs
3823 `(("python-numpy" ,python-numpy)))
3824 (native-inputs
3825 `(("python-nose" ,python-nose)))
3826 (arguments
3827 `(#:phases
3828 (modify-phases %standard-phases
3829 (replace 'check
3830 (lambda _
3831 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3832 (home-page "https://github.com/njsmith/colorspacious")
3833 (synopsis "Python library for colorspace conversions")
3834 (description "@code{colorspacious} is a Python library that lets you
3835 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3836 (license license:expat)))
3837
3838 (define-public python2-colorspacious
3839 (package-with-python2 python-colorspacious))
3840
3841 (define-public python-matplotlib
3842 (package
3843 (name "python-matplotlib")
3844 (version "2.2.3")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (pypi-uri "matplotlib" version))
3849 (sha256
3850 (base32
3851 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3852 (build-system python-build-system)
3853 (propagated-inputs ; the following packages are all needed at run time
3854 `(("python-cycler" ,python-cycler)
3855 ("python-kiwisolver" ,python-kiwisolver)
3856 ("python-pyparsing" ,python-pyparsing)
3857 ("python-pygobject" ,python-pygobject)
3858 ("gobject-introspection" ,gobject-introspection)
3859 ("python-tkinter" ,python "tk")
3860 ("python-dateutil" ,python-dateutil)
3861 ("python-numpy" ,python-numpy)
3862 ("python-pillow" ,python-pillow)
3863 ("python-pytz" ,python-pytz)
3864 ("python-six" ,python-six)
3865 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3866 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3867 ;; object. For this reason we need to import both libraries.
3868 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3869 ("python-pycairo" ,python-pycairo)
3870 ("python-cairocffi" ,python-cairocffi)))
3871 (inputs
3872 `(("libpng" ,libpng)
3873 ("imagemagick" ,imagemagick)
3874 ("freetype" ,freetype)
3875 ("cairo" ,cairo)
3876 ("glib" ,glib)
3877 ;; FIXME: Add backends when available.
3878 ;("python-wxpython" ,python-wxpython)
3879 ("tcl" ,tcl)
3880 ("tk" ,tk)))
3881 (native-inputs
3882 `(("pkg-config" ,pkg-config)
3883 ("python-nose" ,python-nose)
3884 ("python-mock" ,python-mock)))
3885 (arguments
3886 `(#:phases
3887 (modify-phases %standard-phases
3888 (add-before 'build 'configure-environment
3889 (lambda* (#:key outputs inputs #:allow-other-keys)
3890 (let ((cairo (assoc-ref inputs "cairo")))
3891 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3892 ;; has not effect.
3893 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3894 (setenv "HOME" (getcwd))
3895 (call-with-output-file "setup.cfg"
3896 (lambda (port)
3897 (format port "[directories]~%
3898 basedirlist = ~a,~a~%
3899 [rc_options]~%
3900 backend = TkAgg~%"
3901 (assoc-ref inputs "tcl")
3902 (assoc-ref inputs "tk")))))
3903 #t)))))
3904 (home-page "http://matplotlib.org")
3905 (synopsis "2D plotting library for Python")
3906 (description
3907 "Matplotlib is a Python 2D plotting library which produces publication
3908 quality figures in a variety of hardcopy formats and interactive environments
3909 across platforms. Matplotlib can be used in Python scripts, the python and
3910 ipython shell, web application servers, and six graphical user interface
3911 toolkits.")
3912 (license license:psfl)
3913 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3914
3915 (define-public python2-matplotlib
3916 (let ((matplotlib (package-with-python2
3917 (strip-python2-variant python-matplotlib))))
3918 (package (inherit matplotlib)
3919 ;; Make sure to use special packages for Python 2 instead
3920 ;; of those automatically rewritten by package-with-python2.
3921 (propagated-inputs
3922 `(("python2-pycairo" ,python2-pycairo)
3923 ("python2-backports-functools-lru-cache"
3924 ,python2-backports-functools-lru-cache)
3925 ("python2-functools32" ,python2-functools32)
3926 ("python2-pygobject-2" ,python2-pygobject-2)
3927 ("python2-subprocess32" ,python2-subprocess32)
3928 ("python2-tkinter" ,python-2 "tk")
3929 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3930 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3931
3932 (define-public python-matplotlib-documentation
3933 (package
3934 (name "python-matplotlib-documentation")
3935 (version (package-version python-matplotlib))
3936 (source (package-source python-matplotlib))
3937 (build-system python-build-system)
3938 (native-inputs
3939 `(("python-matplotlib" ,python-matplotlib)
3940 ("python-colorspacious" ,python-colorspacious)
3941 ("python-sphinx" ,python-sphinx)
3942 ("python-sphinx-gallery" ,python-sphinx-gallery)
3943 ("python-numpydoc" ,python-numpydoc)
3944 ("python-ipython" ,python-ipython)
3945 ("python-ipykernel" ,python-ipykernel)
3946 ("python-mock" ,python-mock)
3947 ("graphviz" ,graphviz)
3948 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3949 texlive-latex-amsmath
3950 texlive-latex-enumitem
3951 texlive-latex-expdlist
3952 texlive-latex-geometry
3953 texlive-latex-preview
3954 texlive-latex-type1cm
3955 texlive-latex-ucs
3956
3957 texlive-generic-pdftex
3958
3959 texlive-fonts-amsfonts
3960 texlive-fonts-ec
3961 texlive-fonts-adobe-times
3962 texlive-fonts-txfonts)))
3963 ("texinfo" ,texinfo)
3964 ,@(package-native-inputs python-matplotlib)))
3965 (arguments
3966 `(#:tests? #f ; we're only generating documentation
3967 #:phases
3968 (modify-phases %standard-phases
3969 (replace 'build
3970 (lambda _
3971 (chdir "doc")
3972 (setenv "PYTHONPATH"
3973 (string-append (getenv "PYTHONPATH")
3974 ":" (getcwd) "/../examples/units"))
3975 (substitute* "conf.py"
3976 ;; Don't use git.
3977 (("^SHA = check_output.*")
3978 (string-append "SHA = \"" ,version "\"\n"))
3979 ;; Don't fetch intersphinx files from the Internet
3980 (("^explicit_order_folders" m)
3981 (string-append "intersphinx_mapping = {}\n" m))
3982 (("'sphinx.ext.intersphinx',") "")
3983 ;; Disable URL embedding which requires internet access.
3984 (("'https://docs.scipy.org/doc/numpy'") "None")
3985 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3986 (invoke "make"
3987 "SPHINXBUILD=sphinx-build"
3988 "SPHINXOPTS=" ; don't abort on warnings
3989 "html" "texinfo")))
3990 (replace 'install
3991 (lambda* (#:key inputs outputs #:allow-other-keys)
3992 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3993 (doc (string-append data "/doc/python-matplotlib-" ,version))
3994 (info (string-append data "/info"))
3995 (html (string-append doc "/html")))
3996 (mkdir-p html)
3997 (mkdir-p info)
3998 (copy-recursively "build/html" html)
3999 (symlink (string-append html "/_images")
4000 (string-append info "/matplotlib-figures"))
4001 (with-directory-excursion "build/texinfo"
4002 (substitute* "matplotlib.texi"
4003 (("@image\\{([^,]*)" all file)
4004 (string-append "@image{matplotlib-figures/" file)))
4005 (symlink (string-append html "/_images")
4006 "./matplotlib-figures")
4007 (invoke "makeinfo" "--no-split"
4008 "-o" "matplotlib.info" "matplotlib.texi"))
4009 (install-file "build/texinfo/matplotlib.info" info))
4010 #t)))))
4011 (home-page (package-home-page python-matplotlib))
4012 (synopsis "Documentation for the python-matplotlib package")
4013 (description (package-description python-matplotlib))
4014 (license (package-license python-matplotlib))))
4015
4016 (define-public python2-matplotlib-documentation
4017 (package-with-python2 python-matplotlib-documentation))
4018
4019 (define-public python-matplotlib-venn
4020 (package
4021 (name "python-matplotlib-venn")
4022 (version "0.11.5")
4023 (source
4024 (origin
4025 (method url-fetch)
4026 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4027 (sha256
4028 (base32
4029 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4030 (build-system python-build-system)
4031 (arguments '(#:tests? #f)) ; tests are not included
4032 (propagated-inputs
4033 `(("python-matplotlib" ,python-matplotlib)
4034 ("python-numpy" ,python-numpy)
4035 ("python-scipy" ,python-scipy)))
4036 (native-inputs
4037 `(("unzip" ,unzip)))
4038 (home-page "https://github.com/konstantint/matplotlib-venn")
4039 (synopsis "Plot area-proportional Venn diagrams")
4040 (description
4041 "This package provides tools for plotting area-proportional two- and
4042 three-way Venn diagrams in @code{matplotlib}.")
4043 (license license:expat)))
4044
4045 (define-public python2-pysnptools
4046 (package
4047 (name "python2-pysnptools")
4048 (version "0.3.13")
4049 (source
4050 (origin
4051 (method url-fetch)
4052 (uri (pypi-uri "pysnptools" version))
4053 (sha256
4054 (base32
4055 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4056 (build-system python-build-system)
4057 (arguments
4058 `(#:python ,python-2 ; only Python 2.7 is supported
4059 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4060 (propagated-inputs
4061 `(("python2-numpy" ,python2-numpy)
4062 ("python2-scipy" ,python2-scipy)
4063 ("python2-pandas" ,python2-pandas)))
4064 (native-inputs
4065 `(("python2-cython" ,python2-cython)))
4066 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4067 (synopsis "Library for reading and manipulating genetic data")
4068 (description
4069 "PySnpTools is a library for reading and manipulating genetic data. It
4070 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4071 those files. It can also efficiently manipulate ranges of integers using set
4072 operators such as union, intersection, and difference.")
4073 (license license:asl2.0)))
4074
4075 (define-public python-scipy
4076 (package
4077 (name "python-scipy")
4078 (version "1.2.2")
4079 (source
4080 (origin
4081 (method url-fetch)
4082 (uri (pypi-uri "scipy" version))
4083 (sha256
4084 (base32
4085 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4086 (build-system python-build-system)
4087 (propagated-inputs
4088 `(("python-numpy" ,python-numpy)
4089 ("python-matplotlib" ,python-matplotlib)
4090 ("python-pyparsing" ,python-pyparsing)))
4091 (inputs
4092 `(("lapack" ,lapack)
4093 ("openblas" ,openblas)))
4094 (native-inputs
4095 `(("python-cython" ,python-cython)
4096 ("python-pytest" ,python-pytest)
4097 ("python-sphinx" ,python-sphinx)
4098 ("python-numpydoc" ,python-numpydoc)
4099 ("gfortran" ,gfortran)
4100 ("perl" ,perl)
4101 ("which" ,which)))
4102 (outputs '("out" "doc"))
4103 (arguments
4104 `(#:phases
4105 (modify-phases %standard-phases
4106 (add-after 'unpack 'disable-broken-tests
4107 (lambda _
4108 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4109 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4110 (string-append indent
4111 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4112 m)))
4113 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4114 (("^def test_parallel_threads\\(\\):" m)
4115 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4116 m)))
4117 #t))
4118 (add-before 'build 'configure-openblas
4119 (lambda* (#:key inputs #:allow-other-keys)
4120 (call-with-output-file "site.cfg"
4121 (lambda (port)
4122 (format port
4123 "[blas]
4124 libraries = openblas
4125 library_dirs = ~a/lib
4126 include_dirs = ~a/include
4127
4128 # backslash-n to make emacs happy
4129 \n[atlas]
4130 library_dirs = ~a/lib
4131 atlas_libs = openblas
4132 "
4133 (assoc-ref inputs "openblas")
4134 (assoc-ref inputs "openblas")
4135 (assoc-ref inputs "openblas"))))
4136 #t))
4137 (add-after 'install 'install-doc
4138 (lambda* (#:key inputs outputs #:allow-other-keys)
4139 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4140 (doc (string-append data "/doc/" ,name "-" ,version))
4141 (html (string-append doc "/html"))
4142 (pyver ,(string-append "PYVER=" (version-major+minor
4143 (package-version python))))
4144 ;; By default it tries to run sphinx-build through the Python
4145 ;; interpreter which won't work with our shell wrapper.
4146 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4147 ;; Make installed package available for building the
4148 ;; documentation
4149 (add-installed-pythonpath inputs outputs)
4150 (with-directory-excursion "doc"
4151 ;; Fix generation of images for mathematical expressions.
4152 (substitute* (find-files "source" "conf\\.py")
4153 (("pngmath_use_preview = True")
4154 "pngmath_use_preview = False"))
4155 (mkdir-p html)
4156 (invoke "make" "html" pyver sphinxbuild)
4157 (with-directory-excursion "build/html"
4158 (for-each (lambda (file)
4159 (let* ((dir (dirname file))
4160 (tgt-dir (string-append html "/" dir)))
4161 (install-file file html)))
4162 (find-files "." ".*")))))
4163 #t))
4164 ;; Tests can only be run after the library has been installed and not
4165 ;; within the source directory.
4166 (delete 'check)
4167 (add-after 'install 'check
4168 (lambda* (#:key inputs outputs #:allow-other-keys)
4169 (add-installed-pythonpath inputs outputs)
4170 (with-directory-excursion "/tmp"
4171 (invoke "python" "-c"
4172 "import scipy; scipy.test(verbose=2)")))))))
4173 (home-page "https://www.scipy.org/")
4174 (synopsis "The Scipy library provides efficient numerical routines")
4175 (description "The SciPy library is one of the core packages that make up
4176 the SciPy stack. It provides many user-friendly and efficient numerical
4177 routines such as routines for numerical integration and optimization.")
4178 (properties `((python2-variant . ,(delay python2-scipy))))
4179 (license license:bsd-3)))
4180
4181 (define-public python2-scipy
4182 (package-with-python2
4183 (strip-python2-variant python-scipy)))
4184
4185 (define-public python-socksipy-branch
4186 (package
4187 (name "python-socksipy-branch")
4188 (version "1.01")
4189 (source
4190 (origin
4191 (method url-fetch)
4192 (uri (pypi-uri "SocksiPy-branch" version))
4193 (sha256
4194 (base32
4195 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4196 (build-system python-build-system)
4197 (arguments
4198 `(#:tests? #f)) ; There are no tests
4199 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4200 (synopsis "Python SOCKS module")
4201 (description
4202 "SocksiPy - A Python SOCKS client module. It provides a
4203 socket-like interface that supports connections to any TCP
4204 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4205 The original version was developed by Dan Haim, this is a
4206 branch created by Mario Vilas to address some open issues,
4207 as the original project seems to have been abandoned circa 2007.")
4208 (license license:bsd-3)))
4209
4210 (define-public python2-socksipy-branch
4211 (package-with-python2 python-socksipy-branch))
4212
4213 (define-public python-pycodestyle
4214 (package
4215 (name "python-pycodestyle")
4216 (version "2.5.0")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "pycodestyle" version))
4221 (sha256
4222 (base32
4223 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4224 (build-system python-build-system)
4225 (home-page "https://pycodestyle.readthedocs.io/")
4226 (synopsis "Python style guide checker")
4227 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4228 Python code against some of the style conventions in
4229 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4230 (license license:expat)))
4231
4232 (define-public python2-pycodestyle
4233 (package-with-python2 python-pycodestyle))
4234
4235 (define-public python-multidict
4236 (package
4237 (name "python-multidict")
4238 (version "4.2.0")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "multidict" version))
4243 (sha256
4244 (base32
4245 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4246 (build-system python-build-system)
4247 (native-inputs
4248 `(("python-pytest" ,python-pytest)
4249 ("python-pytest-runner" ,python-pytest-runner)))
4250 (home-page "https://github.com/aio-libs/multidict/")
4251 (synopsis "Multidict implementation")
4252 (description "Multidict is dict-like collection of key-value pairs
4253 where key might be occurred more than once in the container.")
4254 (license license:asl2.0)))
4255
4256 (define-public python-orderedmultidict
4257 (package
4258 (name "python-orderedmultidict")
4259 (version "0.7.11")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "orderedmultidict" version))
4264 (sha256
4265 (base32
4266 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4267 (build-system python-build-system)
4268 (arguments
4269 `(#:phases
4270 (modify-phases %standard-phases
4271 (add-after 'unpack 'fix-tests
4272 (lambda _
4273 ;; The package uses nosetest for running the tests.
4274 ;; Adding this initfile allows to run the test suite
4275 ;; without requiring nosetest.
4276 (with-output-to-file "tests/__init__.py" newline)
4277 #t)))))
4278 (propagated-inputs
4279 `(("python-six" ,python-six)))
4280 (native-inputs
4281 `(("python-pycodestyle" ,python-pycodestyle)))
4282 (home-page "https://github.com/gruns/orderedmultidict")
4283 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4284 (description "This package contains a library for ordered multivalue
4285 dictionaries. A multivalue dictionary is a dictionary that can store
4286 multiple values for the same key. An ordered multivalue dictionary is a
4287 multivalue dictionary that retains the order of insertions and deletions.")
4288 (license license:unlicense)))
4289
4290 (define-public python2-orderedmultidict
4291 (package-with-python2 python-orderedmultidict))
4292
4293 (define-public python-autopep8
4294 (package
4295 (name "python-autopep8")
4296 (version "1.3.5")
4297 (source
4298 (origin
4299 (method url-fetch)
4300 (uri (pypi-uri "autopep8" version))
4301 (sha256
4302 (base32
4303 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4304 (build-system python-build-system)
4305 (propagated-inputs
4306 `(("python-pycodestyle" ,python-pycodestyle)))
4307 (home-page "https://github.com/hhatto/autopep8")
4308 (synopsis "Format Python code according to the PEP 8 style guide")
4309 (description
4310 "@code{autopep8} automatically formats Python code to conform to
4311 the PEP 8 style guide. It uses the pycodestyle utility to determine
4312 what parts of the code needs to be formatted. @code{autopep8} is
4313 capable of fixing most of the formatting issues that can be reported
4314 by pycodestyle.")
4315 (license (license:non-copyleft
4316 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4317
4318 (define-public python2-autopep8
4319 (package-with-python2 python-autopep8))
4320
4321 (define-public python-distutils-extra
4322 (package
4323 (name "python-distutils-extra")
4324 (version "2.38")
4325 (source
4326 (origin
4327 (method url-fetch)
4328 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4329 version "/+download/python-distutils-extra-"
4330 version ".tar.gz"))
4331 (sha256
4332 (base32
4333 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4334 (build-system python-build-system)
4335 (home-page "https://launchpad.net/python-distutils-extra/")
4336 (synopsis "Enhancements to Python's distutils")
4337 (description
4338 "The python-distutils-extra module enables you to easily integrate
4339 gettext support, themed icons, and scrollkeeper-based documentation into
4340 Python's distutils.")
4341 (license license:gpl2)))
4342
4343 (define-public python2-distutils-extra
4344 (package-with-python2 python-distutils-extra))
4345
4346 (define-public python2-elib.intl
4347 (package
4348 (name "python2-elib.intl")
4349 (version "0.0.3")
4350 (source
4351 (origin
4352 ;; This project doesn't tag releases or publish tarballs, so we take
4353 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4354 (method git-fetch)
4355 (uri (git-reference
4356 (url "https://github.com/dieterv/elib.intl.git")
4357 (commit "d09997cfef")))
4358 (file-name (string-append name "-" version "-checkout"))
4359 (sha256
4360 (base32
4361 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4362 (build-system python-build-system)
4363 (arguments
4364 ;; incompatible with Python 3 (exception syntax)
4365 `(#:python ,python-2
4366 #:tests? #f))
4367 (home-page "https://github.com/dieterv/elib.intl")
4368 (synopsis "Enhanced internationalization for Python")
4369 (description
4370 "The elib.intl module provides enhanced internationalization (I18N)
4371 services for your Python modules and applications.")
4372 (license license:lgpl3+)))
4373
4374 (define-public python-olefile
4375 (package
4376 (name "python-olefile")
4377 (version "0.46")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4382 "download/v" version "/olefile-" version ".tar.gz"))
4383 (file-name (string-append name "-" version ".tar.gz"))
4384 (sha256
4385 (base32
4386 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4387 (build-system python-build-system)
4388 (home-page "https://www.decalage.info/python/olefileio")
4389 (synopsis "Read and write Microsoft OLE2 files.")
4390 (description
4391 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4392 Storage or Compound Document, Microsoft Office). It is an improved version of
4393 the OleFileIO module from PIL, the Python Image Library.")
4394 (license license:bsd-3)))
4395
4396 (define-public python2-olefile
4397 (package-with-python2 python-olefile))
4398
4399 (define-public python-pillow
4400 (package
4401 (name "python-pillow")
4402 (version "6.1.0")
4403 (source
4404 (origin
4405 (method url-fetch)
4406 (uri (pypi-uri "Pillow" version))
4407 (sha256
4408 (base32
4409 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4410 (build-system python-build-system)
4411 (native-inputs
4412 `(("python-pytest" ,python-pytest)))
4413 (inputs
4414 `(("freetype" ,freetype)
4415 ("lcms" ,lcms)
4416 ("zlib" ,zlib)
4417 ("libjpeg" ,libjpeg)
4418 ("openjpeg" ,openjpeg)
4419 ("libtiff" ,libtiff)
4420 ("libwebp" ,libwebp)))
4421 (propagated-inputs
4422 `(("python-olefile" ,python-olefile)))
4423 (arguments
4424 `(#:phases
4425 (modify-phases %standard-phases
4426 (add-after 'unpack 'patch-ldconfig
4427 (lambda _
4428 (substitute* "setup.py"
4429 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4430 (delete 'check) ; We must run checks after python-pillow is installed.
4431 (add-after 'install 'check-installed
4432 (lambda* (#:key outputs inputs #:allow-other-keys)
4433 (begin
4434 (setenv "HOME" (getcwd))
4435 ;; Make installed package available for running the tests.
4436 (add-installed-pythonpath inputs outputs)
4437 (invoke "python" "selftest.py" "--installed")
4438 (invoke "python" "-m" "pytest" "-vv")))))))
4439 (home-page "https://python-pillow.org")
4440 (synopsis "Fork of the Python Imaging Library")
4441 (description
4442 "The Python Imaging Library adds image processing capabilities to your
4443 Python interpreter. This library provides extensive file format support, an
4444 efficient internal representation, and fairly powerful image processing
4445 capabilities. The core image library is designed for fast access to data
4446 stored in a few basic pixel formats. It should provide a solid foundation for
4447 a general image processing tool.")
4448 (license (license:x11-style
4449 "http://www.pythonware.com/products/pil/license.htm"
4450 "The PIL Software License"))))
4451
4452 (define-public python2-pillow
4453 (package-with-python2 python-pillow))
4454
4455 (define-public python-pycparser
4456 (package
4457 (name "python-pycparser")
4458 (version "2.19")
4459 (source
4460 (origin
4461 (method url-fetch)
4462 (uri (pypi-uri "pycparser" version))
4463 (sha256
4464 (base32
4465 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4466 (outputs '("out" "doc"))
4467 (build-system python-build-system)
4468 (native-inputs
4469 `(("pkg-config" ,pkg-config)))
4470 (arguments
4471 `(#:phases
4472 (modify-phases %standard-phases
4473 (replace 'check
4474 (lambda _
4475 (with-directory-excursion "tests"
4476 (invoke "python" "all_tests.py"))
4477 #t))
4478 (add-after 'install 'install-doc
4479 (lambda* (#:key outputs #:allow-other-keys)
4480 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4481 (doc (string-append data "/doc/" ,name "-" ,version))
4482 (examples (string-append doc "/examples")))
4483 (mkdir-p examples)
4484 (for-each (lambda (file)
4485 (copy-file (string-append "." file)
4486 (string-append doc file)))
4487 '("/README.rst" "/CHANGES" "/LICENSE"))
4488 (copy-recursively "examples" examples)
4489 #t))))))
4490 (home-page "https://github.com/eliben/pycparser")
4491 (synopsis "C parser in Python")
4492 (description
4493 "Pycparser is a complete parser of the C language, written in pure Python
4494 using the PLY parsing library. It parses C code into an AST and can serve as
4495 a front-end for C compilers or analysis tools.")
4496 (license license:bsd-3)))
4497
4498 (define-public python2-pycparser
4499 (package-with-python2 python-pycparser))
4500
4501 (define-public python-pywavelets
4502 (package
4503 (name "python-pywavelets")
4504 (version "1.0.1")
4505 (home-page "https://github.com/PyWavelets/pywt")
4506 (source (origin
4507 (method url-fetch)
4508 (uri (pypi-uri "PyWavelets" version))
4509 (sha256
4510 (base32
4511 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4512 (build-system python-build-system)
4513 (arguments
4514 '(#:modules ((ice-9 ftw)
4515 (srfi srfi-1)
4516 (srfi srfi-26)
4517 (guix build utils)
4518 (guix build python-build-system))
4519 #:phases (modify-phases %standard-phases
4520 (replace 'check
4521 (lambda _
4522 (let ((cwd (getcwd))
4523 (libdir (find (cut string-prefix? "lib." <>)
4524 (scandir "build"))))
4525 (with-directory-excursion (string-append cwd "/build/" libdir)
4526 (invoke "nosetests" "-v" "."))))))))
4527 (native-inputs
4528 `(("python-matplotlib" ,python-matplotlib) ;for tests
4529 ("python-nose" ,python-nose)))
4530 (propagated-inputs
4531 `(("python-numpy" ,python-numpy)))
4532 (synopsis "Wavelet transforms in Python")
4533 (description
4534 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4535 mathematical basis functions that are localized in both time and frequency.
4536 Wavelet transforms are time-frequency transforms employing wavelets. They are
4537 similar to Fourier transforms, the difference being that Fourier transforms are
4538 localized only in frequency instead of in time and frequency.")
4539 (license license:expat)))
4540
4541 (define-public python2-pywavelets
4542 (package-with-python2 python-pywavelets))
4543
4544 (define-public python-xcffib
4545 (package
4546 (name "python-xcffib")
4547 (version "0.6.0")
4548 (source
4549 (origin
4550 (method url-fetch)
4551 (uri (pypi-uri "xcffib" version))
4552 (sha256
4553 (base32
4554 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4555 (build-system python-build-system)
4556 (inputs
4557 `(("libxcb" ,libxcb)))
4558 (propagated-inputs
4559 `(("python-cffi" ,python-cffi) ; used at run time
4560 ("python-six" ,python-six)))
4561 (arguments
4562 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4563 #:tests? #f
4564 #:phases
4565 (modify-phases %standard-phases
4566 (add-after 'unpack 'fix-libxcb-path
4567 (lambda* (#:key inputs #:allow-other-keys)
4568 (let ((libxcb (assoc-ref inputs "libxcb")))
4569 (substitute* '("xcffib/__init__.py")
4570 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4571 #t)))
4572 (add-after 'install 'install-doc
4573 (lambda* (#:key outputs #:allow-other-keys)
4574 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4575 "/doc/" ,name "-" ,version)))
4576 (mkdir-p doc)
4577 (copy-file "README.md"
4578 (string-append doc "/README.md"))
4579 #t))))))
4580 (home-page "https://github.com/tych0/xcffib")
4581 (synopsis "XCB Python bindings")
4582 (description
4583 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4584 support for Python 3 and PyPy. It is based on cffi.")
4585 (license license:expat)))
4586
4587 (define-public python2-xcffib
4588 (package-with-python2 python-xcffib))
4589
4590 (define-public python-cairocffi
4591 (package
4592 (name "python-cairocffi")
4593 (version "0.9.0")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (pypi-uri "cairocffi" version))
4598 (sha256
4599 (base32
4600 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4601 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4602 (build-system python-build-system)
4603 (outputs '("out" "doc"))
4604 (inputs
4605 `(("glib" ,glib)
4606 ("gtk+" ,gtk+)
4607 ("gdk-pixbuf" ,gdk-pixbuf)
4608 ("cairo" ,cairo)
4609 ("pango" ,pango)))
4610 (native-inputs
4611 `(("pkg-config" ,pkg-config)
4612 ("python-pytest" ,python-pytest)
4613 ("python-pytest-cov" ,python-pytest-cov)
4614 ("python-pytest-runner" ,python-pytest-runner)
4615 ("python-sphinx" ,python-sphinx)
4616 ("python-docutils" ,python-docutils)))
4617 (propagated-inputs
4618 `(("python-xcffib" ,python-xcffib))) ; used at run time
4619 (arguments
4620 `(#:phases
4621 (modify-phases %standard-phases
4622 (add-after 'unpack 'patch-paths
4623 (lambda* (#:key inputs outputs #:allow-other-keys)
4624 (substitute* (find-files "." "\\.py$")
4625 (("dlopen\\(ffi, 'cairo'")
4626 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4627 "/lib/libcairo.so.2'"))
4628 (("dlopen\\(ffi, 'gdk-3'")
4629 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4630 "/lib/libgtk-3.so.0'"))
4631 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4632 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4633 "/lib/libgdk_pixbuf-2.0.so.0'"))
4634 (("dlopen\\(ffi, 'glib-2.0'")
4635 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4636 "/lib/libglib-2.0.so.0'"))
4637 (("dlopen\\(ffi, 'gobject-2.0'")
4638 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4639 "/lib/libgobject-2.0.so.0'"))
4640 (("dlopen\\(ffi, 'pangocairo-1.0'")
4641 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4642 "/lib/libpangocairo-1.0.so.0'"))
4643 (("dlopen\\(ffi, 'pango-1.0'")
4644 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4645 "/lib/libpango-1.0.so.0'")))
4646 #t))
4647 (add-after 'install 'install-doc
4648 (lambda* (#:key inputs outputs #:allow-other-keys)
4649 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4650 (doc (string-append data "/doc/" ,name "-" ,version))
4651 (html (string-append doc "/html")))
4652 (setenv "LD_LIBRARY_PATH"
4653 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4654 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4655 (setenv "LANG" "en_US.UTF-8")
4656 (mkdir-p html)
4657 (for-each (lambda (file)
4658 (copy-file (string-append "." file)
4659 (string-append doc file)))
4660 '("/README.rst" "/CHANGES" "/LICENSE"))
4661 (system* "python" "setup.py" "build_sphinx")
4662 (copy-recursively "docs/_build/html" html)
4663 #t))))))
4664 (home-page "https://github.com/Kozea/cairocffi")
4665 (synopsis "Python bindings and object-oriented API for Cairo")
4666 (description
4667 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4668 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4669 graphics library with support for multiple backends including image buffers,
4670 PNG, PostScript, PDF, and SVG file output.")
4671 (license license:bsd-3)))
4672
4673 (define-public python2-cairocffi
4674 (package-with-python2 python-cairocffi))
4675
4676 (define-public python-decorator
4677 (package
4678 (name "python-decorator")
4679 (version "4.3.0")
4680 (source
4681 (origin
4682 (method url-fetch)
4683 (uri (pypi-uri "decorator" version))
4684 (sha256
4685 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4686 (build-system python-build-system)
4687 (home-page "https://pypi.python.org/pypi/decorator/")
4688 (synopsis "Python module to simplify usage of decorators")
4689 (description
4690 "The aim of the decorator module is to simplify the usage of decorators
4691 for the average programmer, and to popularize decorators usage giving examples
4692 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4693 etc. The core of this module is a decorator factory.")
4694 (license license:expat)))
4695
4696 (define-public python2-decorator
4697 (package-with-python2 python-decorator))
4698
4699 (define-public python-drmaa
4700 (package
4701 (name "python-drmaa")
4702 (version "0.7.7")
4703 (source
4704 (origin
4705 (method url-fetch)
4706 (uri (pypi-uri "drmaa" version))
4707 (sha256
4708 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4709 (build-system python-build-system)
4710 ;; The test suite requires libdrmaa which is provided by the cluster
4711 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4712 ;; should be set to the path of the libdrmaa library.
4713 (arguments '(#:tests? #f))
4714 (native-inputs
4715 `(("python-nose" ,python-nose)))
4716 (home-page "https://pypi.python.org/pypi/drmaa")
4717 (synopsis "Python bindings for the DRMAA library")
4718 (description
4719 "A Python package for Distributed Resource Management (DRM) job
4720 submission and control. This package is an implementation of the DRMAA 1.0
4721 Python language binding specification.")
4722 (license license:bsd-3)))
4723
4724 (define-public python2-drmaa
4725 (package-with-python2 python-drmaa))
4726
4727 (define-public python-grako
4728 (package
4729 (name "python-grako")
4730 (version "3.99.9")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri
4735 (pypi-uri "grako" version ".zip"))
4736 (sha256
4737 (base32
4738 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4739 (build-system python-build-system)
4740 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4741 (native-inputs
4742 `(("unzip" ,unzip)
4743 ("python-pytest" ,python-pytest)
4744 ("python-pytest-runner" ,python-pytest-runner)))
4745 (home-page "https://bitbucket.org/neogeny/grako")
4746 (synopsis "EBNF parser generator")
4747 (description
4748 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4749 memoizing PEG/Packrat parser in Python.")
4750 (license license:bsd-3)))
4751
4752 (define-public python2-grako
4753 (package-with-python2 python-grako))
4754
4755 (define-public python-gridmap
4756 (package
4757 (name "python-gridmap")
4758 (version "0.13.0")
4759 (source
4760 (origin
4761 (method git-fetch)
4762 (uri (git-reference
4763 (url "https://github.com/pygridtools/gridmap.git")
4764 (commit (string-append "v" version))))
4765 (file-name (git-file-name name version))
4766 (sha256
4767 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4768 (build-system python-build-system)
4769 (arguments
4770 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4771 (propagated-inputs
4772 `(("python-psutil" ,python-psutil)
4773 ("python-drmaa" ,python-drmaa)
4774 ("python-pyzmq" ,python-pyzmq)))
4775 (home-page "https://github.com/pygridtools/gridmap")
4776 (synopsis "Create jobs on a cluster directly from Python")
4777 (description
4778 "Gridmap is a Python package to allow you to easily create jobs on the
4779 cluster directly from Python. You can directly map Python functions onto the
4780 cluster without needing to write any wrapper code yourself.")
4781 (license license:gpl3+)))
4782
4783 (define-public python2-gridmap
4784 (package-with-python2 python-gridmap))
4785
4786 (define-public python-honcho
4787 (package
4788 (name "python-honcho")
4789 (version "1.0.1")
4790 (source
4791 (origin
4792 (method git-fetch)
4793 (uri (git-reference
4794 (url "https://github.com/nickstenning/honcho.git")
4795 (commit (string-append "v" version))))
4796 (file-name (git-file-name name version))
4797 (sha256
4798 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4799 (build-system python-build-system)
4800 (native-inputs
4801 `(("python-pytest" ,python-pytest)
4802 ("python-mock" ,python-mock)
4803 ("python-tox" ,python-tox)
4804 ("which" ,which))) ;for tests
4805 (propagated-inputs
4806 `(("python-jinja2" ,python-jinja2)))
4807 (arguments
4808 `(#:phases
4809 (modify-phases %standard-phases
4810 (delete 'check)
4811 (add-after 'install 'check
4812 (lambda* (#:key outputs inputs #:allow-other-keys)
4813 ;; fix honcho path in testsuite
4814 (substitute* "tests/conftest.py"
4815 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4816 "/bin/honcho" "'")))
4817 ;; It's easier to run tests after install.
4818 ;; Make installed package available for running the tests
4819 (add-installed-pythonpath inputs outputs)
4820 (invoke "py.test" "-v"))))))
4821 (home-page "https://github.com/nickstenning/honcho")
4822 (synopsis "Manage Procfile-based applications")
4823 (description
4824 "A Procfile is a file which describes how to run an application
4825 consisting of several processes. honcho starts all listed processes.
4826 The output of all running processes is collected by honcho and
4827 displayed.")
4828 (license license:expat)))
4829
4830 (define-public python2-honcho
4831 (package-with-python2 python-honcho))
4832
4833 (define-public python-pexpect
4834 (package
4835 (name "python-pexpect")
4836 (version "4.6.0")
4837 (source
4838 (origin
4839 (method url-fetch)
4840 (uri (pypi-uri "pexpect" version))
4841 (sha256
4842 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4843 (build-system python-build-system)
4844 (arguments
4845 `(#:phases
4846 (modify-phases %standard-phases
4847 (add-before 'check 'prepare-tests
4848 (lambda _
4849 (substitute* (find-files "tests")
4850 (("/bin/ls") (which "ls"))
4851 (("/bin/echo") (which "echo"))
4852 (("/bin/which") (which "which"))
4853 ;; Many tests try to use the /bin directory which
4854 ;; is not present in the build environment.
4855 ;; Use one that's non-empty and unlikely to change.
4856 (("/bin'") "/dev'"))
4857 ;; XXX: Socket connection test gets "Connection reset by peer".
4858 ;; Why does it not work? Delete for now.
4859 (delete-file "tests/test_socket.py")
4860 #t))
4861 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4862 (native-inputs
4863 `(("python-nose" ,python-nose)
4864 ("python-pytest" ,python-pytest)
4865 ("man-db" ,man-db)
4866 ("which" ,which)
4867 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4868 (propagated-inputs
4869 `(("python-ptyprocess" ,python-ptyprocess)))
4870 (home-page "http://pexpect.readthedocs.org/")
4871 (synopsis "Controlling interactive console applications")
4872 (description
4873 "Pexpect is a pure Python module for spawning child applications;
4874 controlling them; and responding to expected patterns in their output.
4875 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4876 child application and control it as if a human were typing commands.")
4877 (license license:isc)))
4878
4879 (define-public python2-pexpect
4880 (package-with-python2 python-pexpect))
4881
4882 (define-public python-setuptools-scm
4883 (package
4884 (name "python-setuptools-scm")
4885 (version "3.2.0")
4886 (source (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "setuptools_scm" version))
4889 (sha256
4890 (base32
4891 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4892 (build-system python-build-system)
4893 (home-page "https://github.com/pypa/setuptools_scm/")
4894 (synopsis "Manage Python package versions in SCM metadata")
4895 (description
4896 "Setuptools_scm handles managing your Python package versions in
4897 @dfn{software configuration management} (SCM) metadata instead of declaring
4898 them as the version argument or in a SCM managed file.")
4899 (license license:expat)))
4900
4901 (define-public python2-setuptools-scm
4902 (package-with-python2 python-setuptools-scm))
4903
4904 (define-public python-pathlib2
4905 (package
4906 (name "python-pathlib2")
4907 (version "2.3.3")
4908 (source
4909 (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "pathlib2" version))
4912 (sha256
4913 (base32
4914 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4915 (build-system python-build-system)
4916 (propagated-inputs
4917 `(("python-scandir" ,python-scandir)
4918 ("python-six" ,python-six)))
4919 (home-page "https://pypi.python.org/pypi/pathlib2/")
4920 (synopsis "Object-oriented file system paths")
4921 (description "The goal of pathlib2 is to provide a backport of the
4922 standard @code{pathlib} module which tracks the standard library module, so
4923 all the newest features of the standard @code{pathlib} can be used also on
4924 older Python versions.")
4925 (license license:expat)))
4926
4927 (define-public python-importlib-metadata
4928 (package
4929 (name "python-importlib-metadata")
4930 (version "0.18")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (pypi-uri "importlib_metadata" version))
4935 (sha256
4936 (base32
4937 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4938 (build-system python-build-system)
4939 (propagated-inputs
4940 `(("python-configparser" ,python-configparser)
4941 ("python-contextlib2" ,python-contextlib2)
4942 ("python-docutils" ,python-docutils)
4943 ("python-pathlib2" ,python-pathlib2)
4944 ("python-rst.linker" ,python-rst.linker)
4945 ("python-zipp" ,python-zipp)))
4946 (native-inputs
4947 `(("python-setuptools-scm" ,python-setuptools-scm)
4948 ("python-sphinx" ,python-sphinx)))
4949 (home-page "https://importlib-metadata.readthedocs.io/")
4950 (synopsis "Read metadata from Python packages")
4951 (description
4952 "@code{importlib_metadata} is a library which provides an API for
4953 accessing an installed Python package's metadata, such as its entry points or
4954 its top-level name. This functionality intends to replace most uses of
4955 @code{pkg_resources} entry point API and metadata API. Along with
4956 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4957 need to use the older and less efficient @code{pkg_resources} package.")
4958 (license license:asl2.0)))
4959
4960 (define-public python-jaraco-packaging
4961 (package
4962 (name "python-jaraco-packaging")
4963 (version "6.1")
4964 (source
4965 (origin
4966 (method url-fetch)
4967 (uri (pypi-uri "jaraco.packaging" version))
4968 (sha256
4969 (base32
4970 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4971 (build-system python-build-system)
4972 (propagated-inputs
4973 `(("python-pytest" ,python-pytest)
4974 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4975 ("python-pytest-flake8" ,python-pytest-flake8)
4976 ("python-rst.linker" ,python-rst.linker)
4977 ("python-setuptools" ,python-setuptools)
4978 ("python-setuptools-scm" ,python-setuptools-scm)
4979 ("python-six" ,python-six)
4980 ("python-sphinx" ,python-sphinx)))
4981 (home-page "https://github.com/jaraco/jaraco.packaging")
4982 (synopsis "Tools to supplement packaging Python releases")
4983 (description
4984 "This package provides various tools to supplement packaging Python
4985 releases.")
4986 (license license:expat)))
4987
4988 (define-public python-pathpy
4989 (package
4990 (name "python-pathpy")
4991 (version "11.5.0")
4992 (source
4993 (origin
4994 (method url-fetch)
4995 (uri (pypi-uri "path.py" version))
4996 (sha256
4997 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4998 (outputs '("out" "doc"))
4999 (build-system python-build-system)
5000 (propagated-inputs
5001 `(("python-appdirs" ,python-appdirs)))
5002 (native-inputs
5003 `(("python-setuptools-scm" ,python-setuptools-scm)
5004 ("python-sphinx" ,python-sphinx)
5005 ("python-rst.linker" ,python-rst.linker)
5006 ("python-pytest" ,python-pytest)
5007 ("python-pytest-runner" ,python-pytest-runner)
5008 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5009 (arguments
5010 `(#:phases
5011 (modify-phases %standard-phases
5012 (add-after 'build 'build-doc
5013 (lambda _
5014 (setenv "LANG" "en_US.UTF-8")
5015 (invoke "python" "setup.py" "build_sphinx")))
5016 (add-after 'install 'install-doc
5017 (lambda* (#:key outputs #:allow-other-keys)
5018 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5019 (doc (string-append data "/doc/" ,name "-" ,version))
5020 (html (string-append doc "/html")))
5021 (mkdir-p html)
5022 (for-each (lambda (file)
5023 (copy-file file (string-append doc "/" file)))
5024 '("README.rst" "CHANGES.rst"))
5025 (copy-recursively "build/sphinx/html" html)
5026 #t)))
5027 (replace 'check
5028 (lambda _
5029 ;; The import time test aborts if an import takes longer than
5030 ;; 100ms. It may very well take a little longer than that.
5031 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5032 (home-page "https://github.com/jaraco/path.py")
5033 (synopsis "Python module wrapper for built-in os.path")
5034 (description
5035 "@code{path.py} implements path objects as first-class entities, allowing
5036 common operations on files to be invoked on those path objects directly.")
5037 (license license:expat)))
5038
5039 (define-public python2-pathpy
5040 (package-with-python2 python-pathpy))
5041
5042 (define-public python-simplegeneric
5043 (package
5044 (name "python-simplegeneric")
5045 (version "0.8.1")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "simplegeneric" version ".zip"))
5050 (sha256
5051 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5052 (build-system python-build-system)
5053 (native-inputs
5054 `(("unzip" ,unzip)))
5055 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5056 (synopsis "Python module for simple generic functions")
5057 (description
5058 "The simplegeneric module lets you define simple single-dispatch generic
5059 functions, akin to Python’s built-in generic functions like @code{len()},
5060 @code{iter()} and so on. However, instead of using specially-named methods,
5061 these generic functions use simple lookup tables, akin to those used by
5062 e.g. @code{pickle.dump()} and other generic functions found in the Python
5063 standard library.")
5064 (license license:zpl2.1)))
5065
5066 (define-public python2-simplegeneric
5067 (package-with-python2 python-simplegeneric))
5068
5069 (define-public python-ipython-genutils
5070 ;; TODO: This package is retired, check if can be removed, see description.
5071 (package
5072 (name "python-ipython-genutils")
5073 (version "0.1.0")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (pypi-uri "ipython_genutils" version))
5078 (sha256
5079 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5080 (build-system python-build-system)
5081 (arguments `(#:tests? #f)) ; no tests
5082 (home-page "https://ipython.org")
5083 (synopsis "Vestigial utilities from IPython")
5084 (description
5085 "This package provides retired utilities from IPython. No packages
5086 outside IPython/Jupyter should depend on it.
5087
5088 This package shouldn't exist. It contains some common utilities shared by
5089 Jupyter and IPython projects during The Big Split. As soon as possible, those
5090 packages will remove their dependency on this, and this package will go
5091 away.")
5092 (license license:bsd-3)))
5093
5094 (define-public python2-ipython-genutils
5095 (package-with-python2 python-ipython-genutils))
5096
5097 (define-public python-traitlets
5098 (package
5099 (name "python-traitlets")
5100 (version "4.3.2")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "traitlets" version))
5105 (sha256
5106 (base32
5107 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5108 (build-system python-build-system)
5109 (arguments
5110 `(#:phases
5111 (modify-phases %standard-phases
5112 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5113 (propagated-inputs
5114 `(("python-ipython-genutils" ,python-ipython-genutils)
5115 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5116 (native-inputs
5117 `(("python-pytest" ,python-pytest)))
5118 (properties `((python2-variant . ,(delay python2-traitlets))))
5119 (home-page "https://ipython.org")
5120 (synopsis "Configuration system for Python applications")
5121 (description
5122 "Traitlets is a framework that lets Python classes have attributes with
5123 type checking, dynamically calculated default values, and ‘on change’
5124 callbacks. The package also includes a mechanism to use traitlets for
5125 configuration, loading values from files or from command line arguments. This
5126 is a distinct layer on top of traitlets, so you can use traitlets in your code
5127 without using the configuration machinery.")
5128 (license license:bsd-3)))
5129
5130 (define-public python2-traitlets
5131 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5132 (package
5133 (inherit traitlets)
5134 (propagated-inputs
5135 `(("python2-enum34" ,python2-enum34)
5136 ,@(package-propagated-inputs traitlets))))))
5137
5138 (define-public python-jupyter-core
5139 (package
5140 (name "python-jupyter-core")
5141 (version "4.4.0")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (string-append (pypi-uri "jupyter_core" version)))
5146 (sha256
5147 (base32
5148 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5149 (build-system python-build-system)
5150 ;; FIXME: not sure how to run the tests
5151 (arguments `(#:tests? #f))
5152 (propagated-inputs
5153 `(("python-traitlets" ,python-traitlets)))
5154 (home-page "http://jupyter.org/")
5155 (synopsis "Jupyter base package")
5156 (description
5157 "Jupyter core is the base package on which Jupyter projects rely.")
5158 (license license:bsd-3)))
5159
5160 (define-public python2-jupyter-core
5161 (package-with-python2 python-jupyter-core))
5162
5163 (define-public python-jupyter-client
5164 (package
5165 (name "python-jupyter-client")
5166 (version "5.2.4")
5167 (source
5168 (origin
5169 (method url-fetch)
5170 (uri (pypi-uri "jupyter_client" version))
5171 (sha256
5172 (base32
5173 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5174 (build-system python-build-system)
5175 ;; Tests fail because of missing native python kernel which I assume is
5176 ;; provided by the ipython package, which we cannot use because it would
5177 ;; cause a dependency cycle.
5178 (arguments `(#:tests? #f))
5179 (propagated-inputs
5180 `(("python-pyzmq" ,python-pyzmq)
5181 ("python-traitlets" ,python-traitlets)
5182 ("python-jupyter-core" ,python-jupyter-core)))
5183 (home-page "http://jupyter.org/")
5184 (synopsis "Jupyter protocol implementation and client libraries")
5185 (description
5186 "The @code{jupyter_client} package contains the reference implementation
5187 of the Jupyter protocol. It also provides client and kernel management APIs
5188 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5189 installing @code{kernelspec}s for use with Jupyter frontends.")
5190 (license license:bsd-3)))
5191
5192 (define-public python2-jupyter-client
5193 (package-with-python2 python-jupyter-client))
5194
5195 (define-public python-ipykernel
5196 (package
5197 (name "python-ipykernel")
5198 (version "5.1.1")
5199 (source
5200 (origin
5201 (method url-fetch)
5202 (uri (pypi-uri "ipykernel" version))
5203 (sha256
5204 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5205 (build-system python-build-system)
5206 (arguments
5207 `(#:phases
5208 (modify-phases %standard-phases
5209 (replace 'check
5210 (lambda _
5211 (setenv "HOME" "/tmp")
5212 (invoke "pytest" "-v")
5213 #t))
5214 (add-after 'install 'set-python-file-name
5215 (lambda* (#:key outputs #:allow-other-keys)
5216 ;; Record the absolute file name of the 'python' executable in
5217 ;; 'kernel.json'.
5218 (let ((out (assoc-ref outputs "out")))
5219 (substitute* (string-append out "/share/jupyter"
5220 "/kernels/python3/kernel.json")
5221 (("\"python\"")
5222 (string-append "\"" (which "python") "\"")))
5223 #t))))))
5224 (propagated-inputs
5225 `(("python-ipython" ,python-ipython)
5226 ;; imported at runtime during connect
5227 ("python-jupyter-client" ,python-jupyter-client)))
5228 (native-inputs
5229 `(("python-pytest" ,python-pytest)
5230 ("python-nose" ,python-nose)))
5231 (home-page "https://ipython.org")
5232 (synopsis "IPython Kernel for Jupyter")
5233 (description
5234 "This package provides the IPython kernel for Jupyter.")
5235 (license license:bsd-3)))
5236
5237 ;; Version 5.1.1 and above no longer support Python 2.
5238 (define-public python2-ipykernel
5239 (package
5240 (name "python2-ipykernel")
5241 (version "5.1.0")
5242 (source
5243 (origin
5244 (method url-fetch)
5245 (uri (pypi-uri "ipykernel" version))
5246 (sha256
5247 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5248 (build-system python-build-system)
5249 (arguments
5250 `(#:python ,python-2
5251 #:phases
5252 (modify-phases %standard-phases
5253 (replace 'check
5254 (lambda _
5255 (setenv "HOME" "/tmp")
5256 (invoke "pytest" "-v")
5257 #t)))))
5258 (propagated-inputs
5259 `(("python2-ipython" ,python2-ipython)
5260 ;; imported at runtime during connect
5261 ("python2-jupyter-client" ,python2-jupyter-client)))
5262 (native-inputs
5263 `(("python2-pytest" ,python2-pytest)
5264 ("python2-nose" ,python2-nose)))
5265 (home-page "https://ipython.org")
5266 (synopsis "IPython Kernel for Jupyter")
5267 (description
5268 "This package provides the IPython kernel for Jupyter.")
5269 (license license:bsd-3)))
5270
5271 (define-public python-pari-jupyter
5272 (package
5273 (name "python-pari-jupyter")
5274 (version "1.3.2")
5275 (source
5276 (origin
5277 (method url-fetch)
5278 (uri (pypi-uri "pari_jupyter" version))
5279 (sha256
5280 (base32
5281 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5282 (build-system python-build-system)
5283 (propagated-inputs
5284 `(("python-ipykernel" ,python-ipykernel)))
5285 (inputs
5286 `(("pari-gp" ,pari-gp)
5287 ("readline" ,readline)))
5288 (arguments
5289 `(#:tests? #f)) ; no test suite
5290 (home-page
5291 "https://github.com/jdemeyer/pari_jupyter")
5292 (synopsis "A Jupyter kernel for PARI/GP")
5293 (description "The package provides a PARI/GP kernel for Jupyter.")
5294 (license license:gpl3+)))
5295
5296 (define-public python-backcall
5297 (package
5298 (name "python-backcall")
5299 (version "0.1.0")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "backcall" version))
5304 (sha256
5305 (base32
5306 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5307 (build-system python-build-system)
5308 (home-page "https://github.com/takluyver/backcall/")
5309 (synopsis "Specifications for callback functions passed in to an API")
5310 (description
5311 "If your code lets other people supply callback functions, it's important
5312 to specify the function signature you expect, and check that functions support
5313 that. Adding extra parameters later would break other peoples code unless
5314 you're careful. The @code{backcall} package provides a way of specifying the
5315 callback signature using a prototype function.")
5316 (license license:bsd-3)))
5317
5318 ;; This is the latest release of the LTS version of ipython with support for
5319 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5320 ;; dropped support for Python 2.7.
5321 (define-public python2-ipython
5322 (package
5323 (name "python2-ipython")
5324 (version "5.8.0")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (pypi-uri "ipython" version ".tar.gz"))
5329 (sha256
5330 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5331 (build-system python-build-system)
5332 (propagated-inputs
5333 `(("python2-backports-shutil-get-terminal-size"
5334 ,python2-backports-shutil-get-terminal-size)
5335 ("python2-pathlib2" ,python2-pathlib2)
5336 ("python2-pyzmq" ,python2-pyzmq)
5337 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5338 ("python2-terminado" ,python2-terminado)
5339 ("python2-matplotlib" ,python2-matplotlib)
5340 ("python2-numpy" ,python2-numpy)
5341 ("python2-numpydoc" ,python2-numpydoc)
5342 ("python2-jinja2" ,python2-jinja2)
5343 ("python2-mistune" ,python2-mistune)
5344 ("python2-pexpect" ,python2-pexpect)
5345 ("python2-pickleshare" ,python2-pickleshare)
5346 ("python2-simplegeneric" ,python2-simplegeneric)
5347 ("python2-jsonschema" ,python2-jsonschema)
5348 ("python2-traitlets" ,python2-traitlets)
5349 ("python2-nbformat" ,python2-nbformat)
5350 ("python2-pygments" ,python2-pygments)))
5351 (inputs
5352 `(("readline" ,readline)
5353 ("which" ,which)))
5354 (native-inputs
5355 `(("graphviz" ,graphviz)
5356 ("pkg-config" ,pkg-config)
5357 ("python2-requests" ,python2-requests) ;; for tests
5358 ("python2-testpath" ,python2-testpath)
5359 ("python2-mock" ,python2-mock)
5360 ("python2-nose" ,python2-nose)))
5361 (arguments
5362 `(#:python ,python-2
5363 #:phases
5364 (modify-phases %standard-phases
5365 (add-before 'check 'delete-broken-tests
5366 (lambda* (#:key inputs #:allow-other-keys)
5367 ;; These tests throw errors for unknown reasons.
5368 (delete-file "IPython/core/tests/test_profile.py")
5369 (delete-file "IPython/core/tests/test_interactiveshell.py")
5370 (delete-file "IPython/core/tests/test_magic.py")
5371 #t)))))
5372 (home-page "https://ipython.org")
5373 (synopsis "IPython is a tool for interactive computing in Python")
5374 (description
5375 "IPython provides a rich architecture for interactive computing with:
5376 Powerful interactive shells, a browser-based notebook, support for interactive
5377 data visualization, embeddable interpreters and tools for parallel
5378 computing.")
5379 (license license:bsd-3)))
5380
5381 (define-public python-ipython
5382 (package
5383 (name "python-ipython")
5384 (version "7.5.0")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (pypi-uri "ipython" version ".tar.gz"))
5389 (sha256
5390 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5391 (build-system python-build-system)
5392 (propagated-inputs
5393 `(("python-backcall" ,python-backcall)
5394 ("python-pyzmq" ,python-pyzmq)
5395 ("python-prompt-toolkit" ,python-prompt-toolkit)
5396 ("python-terminado" ,python-terminado)
5397 ("python-matplotlib" ,python-matplotlib)
5398 ("python-numpy" ,python-numpy)
5399 ("python-numpydoc" ,python-numpydoc)
5400 ("python-jedi" ,python-jedi)
5401 ("python-jinja2" ,python-jinja2)
5402 ("python-mistune" ,python-mistune)
5403 ("python-pexpect" ,python-pexpect)
5404 ("python-pickleshare" ,python-pickleshare)
5405 ("python-simplegeneric" ,python-simplegeneric)
5406 ("python-jsonschema" ,python-jsonschema)
5407 ("python-traitlets" ,python-traitlets)
5408 ("python-nbformat" ,python-nbformat)
5409 ("python-pygments" ,python-pygments)))
5410 (inputs
5411 `(("readline" ,readline)
5412 ("which" ,which)))
5413 (native-inputs
5414 `(("graphviz" ,graphviz)
5415 ("pkg-config" ,pkg-config)
5416 ("python-requests" ,python-requests) ;; for tests
5417 ("python-testpath" ,python-testpath)
5418 ("python-nose" ,python-nose)))
5419 (arguments
5420 `(#:phases
5421 (modify-phases %standard-phases
5422 ;; Tests can only be run after the library has been installed and not
5423 ;; within the source directory.
5424 (delete 'check)
5425 (add-after 'install 'check
5426 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5427 (if tests?
5428 (begin
5429 ;; Make installed package available for running the tests
5430 (add-installed-pythonpath inputs outputs)
5431 (setenv "HOME" "/tmp/") ;; required by a test
5432 ;; We only test the core because one of the other tests
5433 ;; tries to import ipykernel.
5434 (invoke "python" "IPython/testing/iptest.py"
5435 "-v" "IPython/core/tests"))
5436 #t)))
5437 (add-before 'check 'fix-tests
5438 (lambda* (#:key inputs #:allow-other-keys)
5439 (substitute* "./IPython/utils/_process_posix.py"
5440 (("/usr/bin/env', 'which") (which "which")))
5441 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5442 (("#!/usr/bin/env python")
5443 (string-append "#!" (which "python"))))
5444 ;; This test introduces a circular dependency on ipykernel
5445 ;; (which depends on ipython).
5446 (delete-file "IPython/core/tests/test_display.py")
5447 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5448 (delete-file "IPython/core/tests/test_interactiveshell.py")
5449 #t)))))
5450 (home-page "https://ipython.org")
5451 (synopsis "IPython is a tool for interactive computing in Python")
5452 (description
5453 "IPython provides a rich architecture for interactive computing with:
5454 Powerful interactive shells, a browser-based notebook, support for interactive
5455 data visualization, embeddable interpreters and tools for parallel
5456 computing.")
5457 (license license:bsd-3)))
5458
5459 (define-public python-ipython-documentation
5460 (package
5461 (inherit python-ipython)
5462 (name "python-ipython-documentation")
5463 (version (package-version python-ipython))
5464 (arguments
5465 `(#:phases
5466 (modify-phases %standard-phases
5467 (delete 'build)
5468 (delete 'check)
5469 (replace 'install
5470 (lambda* (#:key outputs #:allow-other-keys)
5471 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5472 (doc (string-append data "/doc/" ,name "-" ,version))
5473 (html (string-append doc "/html"))
5474 (man1 (string-append data "/man/man1"))
5475 (info (string-append data "/info"))
5476 (examples (string-append doc "/examples"))
5477 (python-arg (string-append "PYTHON=" (which "python"))))
5478 (setenv "LANG" "en_US.utf8")
5479 (with-directory-excursion "docs"
5480 ;; FIXME: pdf fails to build
5481 ;;(system* "make" "pdf" "PAPER=a4")
5482 (system* "make" python-arg "html")
5483 ;; FIXME: the generated texi file contains ^@^@, which trips
5484 ;; up the parser.
5485 ;; (system* "make" python-arg "info")
5486 )
5487 (copy-recursively "docs/man" man1)
5488 (copy-recursively "examples" examples)
5489 (copy-recursively "docs/build/html" html)
5490 ;; (copy-file "docs/build/latex/ipython.pdf"
5491 ;; (string-append doc "/ipython.pdf"))
5492 (mkdir-p info)
5493 ;; (copy-file "docs/build/texinfo/ipython.info"
5494 ;; (string-append info "/ipython.info"))
5495 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5496 #t)))))
5497 (inputs
5498 `(("python-ipython" ,python-ipython)
5499 ("python-ipykernel" ,python-ipykernel)))
5500 (native-inputs
5501 `(("python-sphinx" ,python-sphinx)
5502 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5503 ;; FIXME: It's possible that a smaller union would work just as well.
5504 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5505 texlive-fonts-ec
5506 texlive-generic-ifxetex
5507 texlive-generic-pdftex
5508 texlive-latex-amsfonts
5509 texlive-latex-capt-of
5510 texlive-latex-cmap
5511 texlive-latex-environ
5512 texlive-latex-eqparbox
5513 texlive-latex-etoolbox
5514 texlive-latex-expdlist
5515 texlive-latex-fancyhdr
5516 texlive-latex-fancyvrb
5517 texlive-latex-fncychap
5518 texlive-latex-float
5519 texlive-latex-framed
5520 texlive-latex-geometry
5521 texlive-latex-graphics
5522 texlive-latex-hyperref
5523 texlive-latex-mdwtools
5524 texlive-latex-multirow
5525 texlive-latex-needspace
5526 texlive-latex-oberdiek
5527 texlive-latex-parskip
5528 texlive-latex-preview
5529 texlive-latex-tabulary
5530 texlive-latex-threeparttable
5531 texlive-latex-titlesec
5532 texlive-latex-trimspaces
5533 texlive-latex-ucs
5534 texlive-latex-upquote
5535 texlive-latex-url
5536 texlive-latex-varwidth
5537 texlive-latex-wrapfig)))
5538 ("texinfo" ,texinfo)))))
5539
5540 (define-public python-urwid
5541 (package
5542 (name "python-urwid")
5543 (version "2.0.1")
5544 (source
5545 (origin
5546 (method url-fetch)
5547 (uri (pypi-uri "urwid" version))
5548 (sha256
5549 (base32
5550 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5551 (build-system python-build-system)
5552 (home-page "http://urwid.org")
5553 (synopsis "Console user interface library for Python")
5554 (description
5555 "Urwid is a curses-based UI/widget library for Python. It includes many
5556 features useful for text console applications.")
5557 (license license:lgpl2.1+)))
5558
5559 (define-public python2-urwid
5560 (package-with-python2 python-urwid))
5561
5562 (define-public python-urwidtrees
5563 (package
5564 (name "python-urwidtrees")
5565 (version "1.0.2")
5566 (source
5567 (origin
5568 (method url-fetch)
5569 ;; package author intends on distributing via github rather than pypi:
5570 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5571 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5572 version ".tar.gz"))
5573 (file-name (string-append name "-" version ".tar.gz"))
5574 (sha256
5575 (base32
5576 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5577 (build-system python-build-system)
5578 (arguments
5579 '(#:tests? #f)) ; no tests
5580 (propagated-inputs `(("python-urwid" ,python-urwid)))
5581 (home-page "https://github.com/pazz/urwidtrees")
5582 (synopsis "Tree widgets for urwid")
5583 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5584 toolkit. Use it to build trees of widgets.")
5585 (license license:gpl3+)))
5586
5587 (define-public python2-urwidtrees
5588 (package-with-python2 python-urwidtrees))
5589
5590 (define-public python-ua-parser
5591 (package
5592 (name "python-ua-parser")
5593 (version "0.8.0")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "ua-parser" version))
5598 (sha256
5599 (base32
5600 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5601 (build-system python-build-system)
5602 (arguments
5603 `(#:tests? #f)) ;no test suite in release
5604 (native-inputs
5605 `(("python-pyyaml" ,python-pyyaml)))
5606 (home-page "https://github.com/ua-parser/uap-python")
5607 (synopsis "User agent parser")
5608 (description
5609 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5610 (license license:asl2.0)))
5611
5612 (define-public python2-ua-parser
5613 (package-with-python2 python-ua-parser))
5614
5615 (define-public python-user-agents
5616 (package
5617 (name "python-user-agents")
5618 (version "1.1.0")
5619 (source
5620 (origin
5621 (method url-fetch)
5622 (uri (pypi-uri "user-agents" version))
5623 (sha256
5624 (base32
5625 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5626 (build-system python-build-system)
5627 (arguments
5628 `(#:tests? #f)) ;missing devices.json test file in release
5629 (propagated-inputs
5630 `(("python-ua-parser" ,python-ua-parser)))
5631 (home-page "https://github.com/selwin/python-user-agents")
5632 (synopsis "User Agent strings parsing library")
5633 (description
5634 "A library to identify devices (phones, tablets) and their capabilities by
5635 parsing (browser/HTTP) user agent strings.")
5636 (license license:expat)))
5637
5638 (define-public python2-user-agents
5639 (package-with-python2 python-user-agents))
5640
5641 (define-public python-dbus
5642 (package
5643 (name "python-dbus")
5644 (version "1.2.8")
5645 (source
5646 (origin
5647 (method url-fetch)
5648 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5649 "dbus-python-" version ".tar.gz"))
5650 (sha256
5651 (base32
5652 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5653 (build-system gnu-build-system)
5654 (arguments
5655 '(#:phases
5656 (modify-phases %standard-phases
5657 (add-before
5658 'check 'pre-check
5659 (lambda _
5660 ;; XXX: For the missing '/etc/machine-id'.
5661 (substitute* "test/run-test.sh"
5662 (("DBUS_FATAL_WARNINGS=1")
5663 "DBUS_FATAL_WARNINGS=0"))
5664 #t)))))
5665 (native-inputs
5666 `(("pkg-config" ,pkg-config)))
5667 (inputs
5668 `(("python" ,python-wrapper)
5669 ("dbus-glib" ,dbus-glib)))
5670 (synopsis "Python bindings for D-bus")
5671 (description "python-dbus provides bindings for libdbus, the reference
5672 implementation of D-Bus.")
5673 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5674 (license license:expat)))
5675
5676 (define-public python2-dbus
5677 (package (inherit python-dbus)
5678 (name "python2-dbus")
5679 (inputs `(("python" ,python-2)
5680 ,@(alist-delete "python"
5681 (package-inputs python-dbus)
5682 equal?)))
5683 ;; FIXME: on Python 2, the test_utf8 fails with:
5684 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5685 (arguments `(#:tests? #f))))
5686
5687 (define-public python-notify2
5688 (package
5689 (name "python-notify2")
5690 (version "0.3.1")
5691 (source
5692 (origin
5693 (method url-fetch)
5694 (uri (pypi-uri "notify2" version))
5695 (sha256
5696 (base32
5697 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5698 (build-system python-build-system)
5699 (arguments `(#:tests? #f)) ; tests depend on system state
5700 (native-inputs
5701 `(("python-dbus" ,python-dbus)))
5702 (home-page "https://bitbucket.org/takluyver/pynotify2")
5703 (synopsis "Python interface to D-Bus notifications")
5704 (description
5705 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5706 It is a reimplementation of pynotify in pure Python, and an alternative to
5707 the GObject Introspection bindings to libnotify for non-GTK applications.")
5708 (license (list license:bsd-2
5709 license:lgpl2.1+))))
5710
5711 (define-public python2-notify2
5712 (package-with-python2 python-notify2))
5713
5714 (define-public python-lxml
5715 (package
5716 (name "python-lxml")
5717 (version "4.2.5")
5718 (source
5719 (origin
5720 (method url-fetch)
5721 (uri (pypi-uri "lxml" version))
5722 (sha256
5723 (base32
5724 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5725 (build-system python-build-system)
5726 (inputs
5727 `(("libxml2" ,libxml2)
5728 ("libxslt" ,libxslt)))
5729 (home-page "http://lxml.de/")
5730 (synopsis
5731 "Python XML processing library")
5732 (description
5733 "The lxml XML toolkit is a Pythonic binding for the C libraries
5734 libxml2 and libxslt.")
5735 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5736
5737 (define-public python2-lxml
5738 (package-with-python2 python-lxml))
5739
5740 ;; beautifulsoup4 has a totally different namespace than 3.x,
5741 ;; and pypi seems to put it under its own name, so I guess we should too
5742 (define-public python-beautifulsoup4
5743 (package
5744 (name "python-beautifulsoup4")
5745 (version "4.7.1")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "beautifulsoup4" version))
5750 (sha256
5751 (base32
5752 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5753 (build-system python-build-system)
5754 (arguments
5755 `(#:phases
5756 (modify-phases %standard-phases
5757 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5758 ;; must use this conversion script when building with Python 3. The
5759 ;; conversion script also runs the tests.
5760 ;; For more information, see the file 'convert-py3k' in the source
5761 ;; distribution.
5762 (replace 'check
5763 (lambda _ (invoke "./convert-py3k"))))))
5764 (propagated-inputs
5765 `(("python-soupsieve" ,python-soupsieve)))
5766 (home-page
5767 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5768 (synopsis
5769 "Python screen-scraping library")
5770 (description
5771 "Beautiful Soup is a Python library designed for rapidly setting up
5772 screen-scraping projects. It offers Pythonic idioms for navigating,
5773 searching, and modifying a parse tree, providing a toolkit for
5774 dissecting a document and extracting what you need. It automatically
5775 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5776 (license license:expat)
5777 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5778
5779 (define-public python2-beautifulsoup4
5780 (package
5781 (inherit (package-with-python2
5782 (strip-python2-variant python-beautifulsoup4)))
5783 (arguments `(#:python ,python-2))))
5784
5785 (define-public python-soupsieve
5786 (package
5787 (name "python-soupsieve")
5788 (version "1.9.2")
5789 (source
5790 (origin
5791 (method url-fetch)
5792 (uri (pypi-uri "soupsieve" version))
5793 (sha256
5794 (base32
5795 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5796 (build-system python-build-system)
5797 (arguments `(#:tests? #f))
5798 ;;XXX: 2 tests fail currently despite claming they were to be
5799 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5800 ;;don't want to create a circular dependency.
5801 (home-page "https://github.com/facelessuser/soupsieve")
5802 (synopsis "CSS selector library")
5803 (description
5804 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5805 Soup 4. It aims to provide selecting, matching, and filtering using modern
5806 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5807 specifications up through the latest CSS level 4 drafts and beyond (though
5808 some are not yet implemented).")
5809 (properties `((python2-variant . ,(delay python2-soupsieve))))
5810 (license license:expat)))
5811
5812 (define-public python2-soupsieve
5813 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5814 (package
5815 (inherit base)
5816 (propagated-inputs
5817 `(("python2-backports-functools-lru-cache"
5818 ,python2-backports-functools-lru-cache)
5819 ,@(package-propagated-inputs base))))))
5820
5821 (define-public python-netifaces
5822 (package
5823 (name "python-netifaces")
5824 (version "0.10.7")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "netifaces" version))
5829 (sha256
5830 (base32
5831 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5832 (build-system python-build-system)
5833 (home-page "https://github.com/al45tair/netifaces")
5834 (synopsis
5835 "Python module for portable network interface information")
5836 (description
5837 "Netifaces is a Python module providing information on network
5838 interfaces in an easy and portable manner.")
5839 (license license:expat)))
5840
5841 (define-public python2-netifaces
5842 (package-with-python2 python-netifaces))
5843
5844 (define-public python-networkx
5845 (package
5846 (name "python-networkx")
5847 (version "2.2")
5848 (source
5849 (origin
5850 (method url-fetch)
5851 (uri (pypi-uri "networkx" version ".zip"))
5852 (sha256
5853 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5854 (build-system python-build-system)
5855 ;; python-decorator is needed at runtime.
5856 (propagated-inputs
5857 `(("python-decorator" ,python-decorator)))
5858 (native-inputs
5859 `(("python-nose" ,python-nose)
5860 ("unzip" ,unzip)))
5861 (home-page "https://networkx.github.io/")
5862 (synopsis "Python module for creating and manipulating graphs and networks")
5863 (description
5864 "NetworkX is a Python package for the creation, manipulation, and study
5865 of the structure, dynamics, and functions of complex networks.")
5866 (license license:bsd-3)))
5867
5868 (define-public python2-networkx
5869 (package-with-python2 python-networkx))
5870
5871 (define-public python-datrie
5872 (package
5873 (name "python-datrie")
5874 (version "0.8")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "datrie" version))
5879 (sha256
5880 (base32
5881 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5882 (build-system python-build-system)
5883 (native-inputs
5884 `(("python-cython" ,python-cython)
5885 ("python-hypothesis" ,python-hypothesis)
5886 ("python-pytest" ,python-pytest)
5887 ("python-pytest-runner" ,python-pytest-runner)))
5888 (home-page "https://github.com/kmike/datrie")
5889 (synopsis "Fast, efficiently stored trie for Python")
5890 (description
5891 "This package provides a fast, efficiently stored trie implementation for
5892 Python.")
5893 (license license:lgpl2.1+)))
5894
5895 (define-public snakemake
5896 (package
5897 (name "snakemake")
5898 (version "5.2.4")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "snakemake" version))
5903 (sha256
5904 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5905 (build-system python-build-system)
5906 (arguments
5907 ;; TODO: Package missing test dependencies.
5908 '(#:tests? #f
5909 #:phases
5910 (modify-phases %standard-phases
5911 ;; For cluster execution Snakemake will call Python. Since there is
5912 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5913 ;; this by calling the snakemake wrapper instead.
5914 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5915 (lambda* (#:key outputs #:allow-other-keys)
5916 (substitute* "snakemake/executors.py"
5917 (("\\{sys.executable\\} -m snakemake")
5918 (string-append (assoc-ref outputs "out")
5919 "/bin/snakemake")))
5920 #t)))))
5921 (propagated-inputs
5922 `(("python-gitpython" ,python-gitpython)
5923 ("python-wrapt" ,python-wrapt)
5924 ("python-requests" ,python-requests)
5925 ("python-appdirs" ,python-appdirs)
5926 ("python-configargparse" ,python-configargparse)
5927 ("python-datrie" ,python-datrie)
5928 ("python-docutils" ,python-docutils)
5929 ("python-jinja2" ,python-jinja2)
5930 ("python-jsonschema" ,python-jsonschema)
5931 ("python-networkx" ,python-networkx)
5932 ("python-pyyaml" ,python-pyyaml)
5933 ("python-ratelimiter" ,python-ratelimiter)))
5934 (home-page "https://snakemake.readthedocs.io")
5935 (synopsis "Python-based execution environment for make-like workflows")
5936 (description
5937 "Snakemake aims to reduce the complexity of creating workflows by
5938 providing a clean and modern domain specific specification language (DSL) in
5939 Python style, together with a fast and comfortable execution environment.")
5940 (license license:expat)))
5941
5942 ;; This is currently needed for the pigx-* packages.
5943 (define-public snakemake-4
5944 (package (inherit snakemake)
5945 (version "4.4.0")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (pypi-uri "snakemake" version))
5950 (sha256
5951 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5952 (propagated-inputs
5953 `(("python-wrapt" ,python-wrapt)
5954 ("python-requests" ,python-requests)
5955 ("python-appdirs" ,python-appdirs)
5956 ("python-configargparse" ,python-configargparse)
5957 ("python-pyyaml" ,python-pyyaml)
5958 ("python-ratelimiter" ,python-ratelimiter)))))
5959
5960 (define-public python-pyqrcode
5961 (package
5962 (name "python-pyqrcode")
5963 (version "1.2.1")
5964 (source
5965 (origin
5966 (method url-fetch)
5967 (uri (pypi-uri "PyQRCode" version))
5968 (sha256
5969 (base32
5970 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5971 (build-system python-build-system)
5972 (home-page
5973 "https://github.com/mnooner256/pyqrcode")
5974 (synopsis "QR code generator")
5975 (description
5976 "Pyqrcode is a QR code generator written purely in Python with
5977 SVG, EPS, PNG and terminal output.")
5978 (license license:bsd-3)))
5979
5980 (define-public python-seaborn
5981 (package
5982 (name "python-seaborn")
5983 (version "0.9.0")
5984 (source
5985 (origin
5986 (method url-fetch)
5987 (uri (pypi-uri "seaborn" version))
5988 (sha256
5989 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5990 (build-system python-build-system)
5991 (arguments
5992 `(#:phases
5993 (modify-phases %standard-phases
5994 (add-before 'check 'start-xserver
5995 (lambda* (#:key inputs #:allow-other-keys)
5996 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5997 ;; There must be a running X server and make check doesn't
5998 ;; start one. Therefore we must do it.
5999 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6000 (setenv "DISPLAY" ":1")
6001 #t)))
6002 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6003 (propagated-inputs
6004 `(("python-pandas" ,python-pandas)
6005 ("python-matplotlib" ,python-matplotlib)
6006 ("python-numpy" ,python-numpy)
6007 ("python-scipy" ,python-scipy)))
6008 (native-inputs
6009 `(("python-pytest" ,python-pytest)
6010 ("xorg-server" ,xorg-server)))
6011 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6012 (synopsis "Statistical data visualization")
6013 (description
6014 "Seaborn is a library for making attractive and informative statistical
6015 graphics in Python. It is built on top of matplotlib and tightly integrated
6016 with the PyData stack, including support for numpy and pandas data structures
6017 and statistical routines from scipy and statsmodels.")
6018 (license license:bsd-3)))
6019
6020 (define-public python2-seaborn
6021 (package-with-python2 python-seaborn))
6022
6023 (define-public python-mpmath
6024 (package
6025 (name "python-mpmath")
6026 (version "0.19")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (string-append "http://mpmath.org/files/mpmath-"
6030 version ".tar.gz"))
6031 (sha256
6032 (base32
6033 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6034 (build-system python-build-system)
6035 (arguments
6036 '(#:phases
6037 (modify-phases %standard-phases
6038 (replace 'check
6039 (lambda _
6040 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6041 (home-page "http://mpmath.org")
6042 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6043 (description
6044 "@code{mpmath} can be used as an arbitrary-precision substitute for
6045 Python's float/complex types and math/cmath modules, but also does much
6046 more advanced mathematics.")
6047 (license license:bsd-3)))
6048
6049 (define-public python2-mpmath
6050 (package-with-python2 python-mpmath))
6051
6052 (define-public python-bigfloat
6053 (package
6054 (name "python-bigfloat")
6055 (version "0.3.0")
6056 (source
6057 (origin
6058 (method url-fetch)
6059 (uri (pypi-uri "bigfloat" version))
6060 (sha256
6061 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6062 (build-system python-build-system)
6063 (inputs
6064 `(("mpfr" ,mpfr)))
6065 (home-page "https://github.com/mdickinson/bigfloat")
6066 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6067 (description
6068 "This package provides a Python interface to the MPFR library for
6069 multiprecision arithmetic.")
6070 (license license:lgpl3+)))
6071
6072 (define-public python2-bigfloat
6073 (package-with-python2 python-bigfloat))
6074
6075 (define-public python-sympy
6076 (package
6077 (name "python-sympy")
6078 (version "1.1.1")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (string-append
6083 "https://github.com/sympy/sympy/releases/download/sympy-"
6084 version "/sympy-" version ".tar.gz"))
6085 (sha256
6086 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6087 (build-system python-build-system)
6088 (arguments
6089 `(#:phases
6090 (modify-phases %standard-phases
6091 ;; Run the core tests after installation. By default it would run
6092 ;; *all* tests, which take a very long time to complete and are known
6093 ;; to be flaky.
6094 (delete 'check)
6095 (add-after 'install 'check
6096 (lambda* (#:key outputs #:allow-other-keys)
6097 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6098 #t)))))
6099 (propagated-inputs
6100 `(("python-mpmath" ,python-mpmath)))
6101 (home-page "http://www.sympy.org/")
6102 (synopsis "Python library for symbolic mathematics")
6103 (description
6104 "SymPy is a Python library for symbolic mathematics. It aims to become a
6105 full-featured computer algebra system (CAS) while keeping the code as simple
6106 as possible in order to be comprehensible and easily extensible.")
6107 (license license:bsd-3)))
6108
6109 (define-public python2-sympy
6110 (package
6111 (inherit (package-with-python2 python-sympy))
6112 (arguments
6113 `(#:phases
6114 (modify-phases %standard-phases
6115 ;; Run the core tests after installation. By default it would run
6116 ;; *all* tests, which take a very long time to complete and are known
6117 ;; to be flaky.
6118 (delete 'check)
6119 (add-after 'install 'check
6120 (lambda* (#:key outputs #:allow-other-keys)
6121 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6122 #t)))))))
6123
6124 (define-public python-q
6125 (package
6126 (name "python-q")
6127 (version "2.6")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "q" version))
6132 (sha256
6133 (base32
6134 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6135 (build-system python-build-system)
6136 (home-page "https://github.com/zestyping/q")
6137 (synopsis "Quick-and-dirty debugging output for tired programmers")
6138 (description
6139 "q is a Python module for \"print\" style of debugging Python code. It
6140 provides convenient short API for print out of values, tracebacks, and
6141 falling into the Python interpreter.")
6142 (license license:asl2.0)))
6143
6144 (define-public python2-q
6145 (package-with-python2 python-q))
6146
6147 (define-public python2-xlib
6148 (package
6149 (name "python2-xlib")
6150 (version "0.14")
6151 (source (origin
6152 (method url-fetch)
6153 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6154 "/" version "/"
6155 "python-xlib-" version ".tar.gz"))
6156 (sha256
6157 (base32
6158 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6159 (build-system python-build-system)
6160 (arguments
6161 `(#:python ,python-2 ;Python 2 only
6162 #:tests? #f)) ;no tests
6163 (home-page "http://python-xlib.sourceforge.net/")
6164 (synopsis "Python X11 client library")
6165 (description
6166 "The Python X Library is intended to be a fully functional X client
6167 library for Python programs. It is useful to implement low-level X clients.
6168 It is written entirely in Python.")
6169 (license license:gpl2+)))
6170
6171 (define-public python-singledispatch
6172 (package
6173 (name "python-singledispatch")
6174 (version "3.4.0.3")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "singledispatch" version))
6179 (sha256
6180 (base32
6181 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6182 (build-system python-build-system)
6183 (native-inputs
6184 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6185 (home-page
6186 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6187 (synopsis "Backport of singledispatch feature from Python 3.4")
6188 (description
6189 "This library brings functools.singledispatch from Python 3.4 to Python
6190 2.6-3.3.")
6191 (license license:expat)))
6192
6193 (define-public python2-singledispatch
6194 (package-with-python2 python-singledispatch))
6195
6196 ;; the python- version can be removed with python-3.5
6197 (define-public python-backports-abc
6198 (package
6199 (name "python-backports-abc")
6200 (version "0.5")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "backports_abc" version))
6205 (sha256
6206 (base32
6207 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6208 (build-system python-build-system)
6209 (home-page "https://github.com/cython/backports_abc")
6210 (synopsis "Backport of additions to the 'collections.abc' module")
6211 (description
6212 "Python-backports-abc provides a backport of additions to the
6213 @code{collections.abc} module in Python-3.5.")
6214 (license license:psfl)))
6215
6216 (define-public python2-backports-abc
6217 (package-with-python2 python-backports-abc))
6218
6219 (define-public python-backports-csv
6220 (package
6221 (name "python-backports-csv")
6222 (version "1.0.5")
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (pypi-uri "backports.csv" version))
6227 (sha256
6228 (base32
6229 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6230 (build-system python-build-system)
6231 (home-page "https://github.com/ryanhiebert/backports.csv")
6232 (synopsis "Backport of Python 3's csv module for Python 2")
6233 (description
6234 "Provides a backport of Python 3's @code{csv} module for parsing
6235 comma separated values. The API of the @code{csv} module in Python 2
6236 is drastically different from the @code{csv} module in Python 3.
6237 This is due, for the most part, to the difference between str in
6238 Python 2 and Python 3.")
6239 (license license:psfl)))
6240
6241 (define-public python2-backports-csv
6242 (package-with-python2 python-backports-csv))
6243
6244 (define-public python2-backports-shutil-get-terminal-size
6245 (package
6246 (name "python2-backports-shutil-get-terminal-size")
6247 (version "1.0.0")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6252 (sha256
6253 (base32
6254 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6255 (build-system python-build-system)
6256 (arguments
6257 `(#:python ,python-2
6258 #:phases
6259 (modify-phases %standard-phases
6260 (replace 'check
6261 (lambda _
6262 (invoke "py.test" "-v"))))))
6263 (native-inputs
6264 `(("python2-pytest" ,python2-pytest)))
6265 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6266 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6267 (description
6268 "This package provides a backport of the @code{get_terminal_size
6269 function} from Python 3.3's @code{shutil}.
6270 Unlike the original version it is written in pure Python rather than C,
6271 so it might be a tiny bit slower.")
6272 (license license:expat)))
6273
6274 (define-public python-waf
6275 (package
6276 (name "python-waf")
6277 (version "2.0.11")
6278 (source (origin
6279 (method url-fetch)
6280 (uri (string-append "https://waf.io/"
6281 "waf-" version ".tar.bz2"))
6282 (sha256
6283 (base32
6284 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6285 (build-system python-build-system)
6286 (arguments
6287 '(#:phases
6288 (modify-phases %standard-phases
6289 (replace 'build
6290 (lambda _
6291 (invoke "python" "waf-light" "configure" "build")))
6292 (replace 'check
6293 (lambda _
6294 (invoke "python" "waf" "--version")))
6295 (replace 'install
6296 (lambda* (#:key outputs #:allow-other-keys)
6297 (let ((out (assoc-ref outputs "out")))
6298 (install-file "waf" (string-append out "/bin")))
6299 #t))
6300 ;; waf breaks when it is wrapped.
6301 (delete 'wrap))))
6302 (home-page "https://waf.io/")
6303 (synopsis "Python-based build system")
6304 (description
6305 "Waf is a Python-based framework for configuring, compiling and installing
6306 applications.")
6307 (license license:bsd-3)))
6308
6309 (define-public python2-waf
6310 (package-with-python2 python-waf))
6311
6312 (define-public python-pyzmq
6313 (package
6314 (name "python-pyzmq")
6315 (version "17.1.2")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "pyzmq" version))
6320 (sha256
6321 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6322 (build-system python-build-system)
6323 (arguments
6324 `(#:configure-flags
6325 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6326 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6327 ;; --inplace' for 'python setup.py test' to work.
6328 #:tests? #f))
6329 (inputs
6330 `(("zeromq" ,zeromq)))
6331 (native-inputs
6332 `(("pkg-config" ,pkg-config)
6333 ("python-nose" ,python-nose)))
6334 (home-page "https://github.com/zeromq/pyzmq")
6335 (synopsis "Python bindings for 0MQ")
6336 (description
6337 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6338 (license license:bsd-4)))
6339
6340 (define-public python2-pyzmq
6341 (package-with-python2 python-pyzmq))
6342
6343 (define-public python-pep8
6344 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6345 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6346 ;; some dependents' test suites, and nothing more.
6347 (package
6348 (name "python-pep8")
6349 (version "1.7.0")
6350 (source
6351 (origin
6352 (method url-fetch)
6353 (uri (pypi-uri "pep8" version))
6354 (sha256
6355 (base32
6356 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6357 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6358 (build-system python-build-system)
6359 (home-page "https://pep8.readthedocs.org/")
6360 (synopsis "Python style guide checker")
6361 (description
6362 "This tools checks Python code against some of the style conventions in
6363 PEP 8.")
6364 (license license:expat)))
6365
6366 (define-public python2-pep8
6367 (package-with-python2 python-pep8))
6368
6369 (define-public python-pyflakes
6370 (package
6371 (name "python-pyflakes")
6372 (version "2.1.1")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (pypi-uri "pyflakes" version))
6377 (sha256
6378 (base32
6379 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6380 (build-system python-build-system)
6381 (home-page
6382 "https://github.com/pyflakes/pyflakes")
6383 (synopsis "Passive checker of Python programs")
6384 (description
6385 "Pyflakes statically checks Python source code for common errors.")
6386 (license license:expat)))
6387
6388 (define-public python2-pyflakes
6389 (package-with-python2 python-pyflakes))
6390
6391 (define-public python-mccabe
6392 (package
6393 (name "python-mccabe")
6394 (version "0.6.1")
6395 (source
6396 (origin
6397 (method url-fetch)
6398 (uri (pypi-uri "mccabe" version))
6399 (sha256
6400 (base32
6401 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6402 (build-system python-build-system)
6403 (native-inputs
6404 `(("python-pytest" ,python-pytest-bootstrap)
6405 ("python-pytest-runner" ,python-pytest-runner)))
6406 (home-page "https://github.com/flintwork/mccabe")
6407 (synopsis "McCabe checker, plugin for flake8")
6408 (description
6409 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6410 complexity of Python source code.")
6411 (license license:expat)))
6412
6413 (define-public python2-mccabe
6414 (package-with-python2 python-mccabe))
6415
6416 (define-public python-mccabe-0.2.1
6417 (package (inherit python-mccabe)
6418 (version "0.2.1")
6419 (source
6420 (origin
6421 (method url-fetch)
6422 (uri (pypi-uri "mccabe" version))
6423 (sha256
6424 (base32
6425 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6426
6427 (define-public python2-mccabe-0.2.1
6428 (package-with-python2 python-mccabe-0.2.1))
6429
6430 ;; Flake8 2.4.1 requires an older version of pep8.
6431 ;; This should be removed ASAP.
6432 (define-public python-pep8-1.5.7
6433 (package (inherit python-pep8)
6434 (version "1.5.7")
6435 (source
6436 (origin
6437 (method url-fetch)
6438 (uri (pypi-uri "pep8" version))
6439 (sha256
6440 (base32
6441 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6442 (arguments
6443 ;; XXX Tests not compatible with Python 3.5.
6444 '(#:tests? #f))))
6445
6446 (define-public python2-pep8-1.5.7
6447 (package-with-python2 python-pep8-1.5.7))
6448
6449 ;; Flake8 2.4.1 requires an older version of pyflakes.
6450 ;; This should be removed ASAP.
6451 (define-public python-pyflakes-0.8.1
6452 (package (inherit python-pyflakes)
6453 (version "0.8.1")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "pyflakes" version))
6458 (sha256
6459 (base32
6460 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6461 (arguments
6462 ;; XXX Tests not compatible with Python 3.5.
6463 '(#:tests? #f))))
6464
6465 (define-public python2-pyflakes-0.8.1
6466 (package-with-python2 python-pyflakes-0.8.1))
6467
6468 (define-public python-flake8
6469 (package
6470 (name "python-flake8")
6471 (version "3.7.7")
6472 (source (origin
6473 (method url-fetch)
6474 (uri (pypi-uri "flake8" version))
6475 (sha256
6476 (base32
6477 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6478 (build-system python-build-system)
6479 (arguments
6480 `(#:phases
6481 (modify-phases %standard-phases
6482 (delete 'check)
6483 (add-after 'install 'check
6484 (lambda* (#:key inputs outputs #:allow-other-keys)
6485 (add-installed-pythonpath inputs outputs)
6486 (invoke "pytest" "-v")
6487 #t)))))
6488 (propagated-inputs
6489 `(("python-pycodestyle" ,python-pycodestyle)
6490 ("python-entrypoints" ,python-entrypoints)
6491 ("python-pyflakes" ,python-pyflakes)
6492 ("python-mccabe" ,python-mccabe)))
6493 (native-inputs
6494 `(("python-mock" ,python-mock)
6495 ("python-pytest" ,python-pytest-bootstrap)
6496 ("python-pytest-runner" ,python-pytest-runner)))
6497 (home-page "https://gitlab.com/pycqa/flake8")
6498 (synopsis
6499 "The modular source code checker: pep8, pyflakes and co")
6500 (description
6501 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6502 (properties `((python2-variant . ,(delay python2-flake8))))
6503 (license license:expat)))
6504
6505 (define-public python2-flake8
6506 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6507 (package (inherit base)
6508 (propagated-inputs
6509 `(("python2-configparser" ,python2-configparser)
6510 ("python2-enum34" ,python2-enum34)
6511 ("python2-typing" ,python2-typing)
6512 ,@(package-propagated-inputs base))))))
6513
6514 ;; python-hacking requires flake8 <2.6.0.
6515 (define-public python-flake8-2.5
6516 (package
6517 (inherit python-flake8)
6518 (version "2.5.5")
6519 (source (origin
6520 (method url-fetch)
6521 (uri (pypi-uri "flake8" version))
6522 (sha256
6523 (base32
6524 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6525 (propagated-inputs
6526 `(("python-pep8" ,python-pep8)
6527 ,@(package-propagated-inputs python-flake8)))
6528 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6529
6530 (define-public python2-flake8-2.5
6531 (package
6532 (inherit python2-flake8)
6533 (version (package-version python-flake8-2.5))
6534 (source (origin
6535 (inherit (package-source python-flake8-2.5))))
6536 (propagated-inputs
6537 `(("python2-pep8" ,python2-pep8)
6538 ,@(package-propagated-inputs python2-flake8)))))
6539
6540 (define-public python-flake8-polyfill
6541 (package
6542 (name "python-flake8-polyfill")
6543 (version "1.0.2")
6544 (source
6545 (origin
6546 (method url-fetch)
6547 (uri (pypi-uri "flake8-polyfill" version))
6548 (sha256
6549 (base32
6550 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6551 (build-system python-build-system)
6552 (arguments
6553 '(#:phases
6554 (modify-phases %standard-phases
6555 (replace 'check
6556 (lambda _
6557 ;; Be compatible with Pytest 4:
6558 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6559 (substitute* "setup.cfg"
6560 (("\\[pytest\\]")
6561 "[tool:pytest]"))
6562
6563 (setenv "PYTHONPATH"
6564 (string-append (getcwd) "/build/lib:"
6565 (getenv "PYTHONPATH")))
6566 (invoke "py.test" "-v"))))))
6567 (native-inputs
6568 `(("python-flake8" ,python-flake8)
6569 ("python-mock" ,python-mock)
6570 ("python-pep8" ,python-pep8)
6571 ("python-pycodestyle" ,python-pycodestyle)
6572 ("python-pytest" ,python-pytest)))
6573 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6574 (synopsis "Polyfill package for Flake8 plugins")
6575 (description
6576 "This package that provides some compatibility helpers for Flake8
6577 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6578 (license license:expat)))
6579
6580 (define-public python2-flake8-polyfill
6581 (package-with-python2 python-flake8-polyfill))
6582
6583 (define-public python-mistune
6584 (package
6585 (name "python-mistune")
6586 (version "0.8.4")
6587 (source
6588 (origin
6589 (method url-fetch)
6590 (uri (pypi-uri "mistune" version))
6591 (sha256
6592 (base32
6593 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6594 (build-system python-build-system)
6595 (native-inputs
6596 `(("python-nose" ,python-nose)
6597 ("python-cython" ,python-cython)))
6598 (home-page "https://github.com/lepture/mistune")
6599 (synopsis "Markdown parser in pure Python")
6600 (description "This package provides a fast markdown parser in pure
6601 Python.")
6602 (license license:bsd-3)))
6603
6604 (define-public python2-mistune
6605 (package-with-python2 python-mistune))
6606
6607 (define-public python-markdown
6608 (package
6609 (name "python-markdown")
6610 (version "3.1.1")
6611 (source
6612 (origin
6613 (method url-fetch)
6614 (uri (pypi-uri "Markdown" version))
6615 (sha256
6616 (base32
6617 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6618 (build-system python-build-system)
6619 (native-inputs
6620 `(("python-nose" ,python-nose)
6621 ("python-pyyaml" ,python-pyyaml)))
6622 (home-page "https://python-markdown.github.io/")
6623 (synopsis "Python implementation of Markdown")
6624 (description
6625 "This package provides a Python implementation of John Gruber's
6626 Markdown. The library features international input, various Markdown
6627 extensions, and several HTML output formats. A command line wrapper
6628 markdown_py is also provided to convert Markdown files to HTML.")
6629 (license license:bsd-3)))
6630
6631 (define-public python2-markdown
6632 (package-with-python2 python-markdown))
6633
6634 (define-public python-ptyprocess
6635 (package
6636 (name "python-ptyprocess")
6637 (version "0.5.2")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "ptyprocess" version))
6642 (sha256
6643 (base32
6644 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6645 (build-system python-build-system)
6646 (native-inputs
6647 `(("python-nose" ,python-nose)))
6648 (arguments
6649 `(#:phases
6650 (modify-phases %standard-phases
6651 (replace 'check
6652 (lambda _ (invoke "nosetests"))))))
6653 (home-page "https://github.com/pexpect/ptyprocess")
6654 (synopsis "Run a subprocess in a pseudo terminal")
6655 (description
6656 "This package provides a Python library used to launch a subprocess in a
6657 pseudo terminal (pty), and interact with both the process and its pty.")
6658 (license license:isc)))
6659
6660 (define-public python2-ptyprocess
6661 (package-with-python2 python-ptyprocess))
6662
6663 (define-public python-cram
6664 (package
6665 (name "python-cram")
6666 (version "0.7")
6667 (home-page "https://bitheap.org/cram/")
6668 (source (origin
6669 (method url-fetch)
6670 (uri (list (string-append home-page "cram-"
6671 version ".tar.gz")
6672 (pypi-uri "cram" version)))
6673 (sha256
6674 (base32
6675 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6676 (arguments
6677 '(#:phases
6678 (modify-phases %standard-phases
6679 (add-after 'unpack 'patch-source
6680 (lambda _
6681 (substitute* (find-files "cram" ".*\\.py$")
6682 ;; Replace default shell path.
6683 (("/bin/sh") (which "sh")))
6684 (substitute* (find-files "tests" ".*\\.t$")
6685 (("md5") "md5sum")
6686 (("/bin/bash") (which "bash"))
6687 (("/bin/sh") (which "sh")))
6688 (substitute* "cram/_test.py"
6689 ;; This hack works around a bug triggered by substituting
6690 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6691 ;; "cram -h", which breaks the output at 80 characters. This
6692 ;; causes the line showing the default shell to break into two
6693 ;; lines, but the test expects a single line...
6694 (("env\\['COLUMNS'\\] = '80'")
6695 "env['COLUMNS'] = '160'"))
6696
6697 (substitute* "Makefile"
6698 ;; Recent versions of python-coverage have caused the test
6699 ;; coverage to decrease (as of version 0.7). Allow that.
6700 (("--fail-under=100")
6701 "--fail-under=90"))
6702
6703 #t))
6704 (replace 'check
6705 ;; The test phase uses the built library and executable.
6706 (lambda* (#:key inputs outputs #:allow-other-keys)
6707 (add-installed-pythonpath inputs outputs)
6708 (setenv "PATH" (string-append (getenv "PATH") ":"
6709 (assoc-ref outputs "out") "/bin"))
6710 (invoke "make" "test"))))))
6711 (build-system python-build-system)
6712 (native-inputs
6713 `(("python-coverage" ,python-coverage)
6714 ("which" ,which)))
6715 (synopsis "Simple testing framework for command line applications")
6716 (description
6717 "Cram is a functional testing framework for command line applications.
6718 Cram tests look like snippets of interactive shell sessions. Cram runs each
6719 command and compares the command output in the test with the command’s actual
6720 output.")
6721 (license license:gpl2+)))
6722
6723 (define-public python2-cram
6724 (package-with-python2 python-cram))
6725
6726 (define-public python-straight-plugin
6727 (package
6728 (name "python-straight-plugin")
6729 (version "1.4.1")
6730 (source
6731 (origin
6732 (method url-fetch)
6733 (uri (pypi-uri "straight.plugin" version))
6734 (sha256
6735 (base32
6736 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6737 (build-system python-build-system)
6738 (home-page "https://github.com/ironfroggy/straight.plugin")
6739 (synopsis "Simple namespaced plugin facility")
6740 (description "Straight Plugin provides a type of plugin you can create from
6741 almost any existing Python modules, and an easy way for outside developers to
6742 add functionality and customization to your projects with their own plugins.")
6743 (license license:expat)))
6744
6745 (define-public python2-straight-plugin
6746 (package-with-python2 python-straight-plugin))
6747
6748 (define-public python-fonttools
6749 (package
6750 (name "python-fonttools")
6751 (version "3.38.0")
6752 (source (origin
6753 (method url-fetch)
6754 (uri (pypi-uri "fonttools" version ".zip"))
6755 (sha256
6756 (base32
6757 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6758 (build-system python-build-system)
6759 (native-inputs
6760 `(("unzip" ,unzip)
6761 ("python-pytest" ,python-pytest)
6762 ("python-pytest-runner" ,python-pytest-runner)))
6763 (home-page "https://github.com/behdad/fonttools")
6764 (synopsis "Tools to manipulate font files")
6765 (description
6766 "FontTools/TTX is a library to manipulate font files from Python. It
6767 supports reading and writing of TrueType/OpenType fonts, reading and writing
6768 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6769 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6770 from an XML-based format.")
6771 (license license:expat)))
6772
6773 (define-public python2-fonttools
6774 (package-with-python2 python-fonttools))
6775
6776 (define-public python-ly
6777 (package
6778 (name "python-ly")
6779 (version "0.9.5")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (pypi-uri name version))
6784 (sha256
6785 (base32
6786 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6787 (build-system python-build-system)
6788 (arguments
6789 ;; FIXME: Some tests need network access.
6790 '(#:tests? #f))
6791 (synopsis "Tool and library for manipulating LilyPond files")
6792 (description "This package provides a Python library to parse, manipulate
6793 or create documents in LilyPond format. A command line program ly is also
6794 provided that can be used to do various manipulations with LilyPond files.")
6795 (home-page "https://pypi.python.org/pypi/python-ly")
6796 (license license:gpl2+)))
6797
6798 (define-public python-appdirs
6799 (package
6800 (name "python-appdirs")
6801 (version "1.4.3")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "appdirs" version))
6806 (sha256
6807 (base32
6808 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6809 (build-system python-build-system)
6810 (home-page "https://github.com/ActiveState/appdirs")
6811 (synopsis
6812 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6813 (description
6814 "This module provides a portable way of finding out where user data
6815 should be stored on various operating systems.")
6816 (license license:expat)))
6817
6818 (define-public python2-appdirs
6819 (package-with-python2 python-appdirs))
6820
6821 (define-public python-llfuse
6822 (package
6823 (name "python-llfuse")
6824 (version "1.3.5")
6825 (source (origin
6826 (method url-fetch)
6827 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6828 (sha256
6829 (base32
6830 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6831 (build-system python-build-system)
6832 (inputs
6833 `(("fuse" ,fuse)
6834 ("attr" ,attr)))
6835 (native-inputs
6836 `(("pkg-config" ,pkg-config)))
6837 (synopsis "Python bindings for FUSE")
6838 (description
6839 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6840 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6841 (license license:lgpl2.0+)
6842 (properties `((python2-variant . ,(delay python2-llfuse))))))
6843
6844 (define-public python2-llfuse
6845 (package (inherit (package-with-python2
6846 (strip-python2-variant python-llfuse)))
6847 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6848
6849 ;; For attic-0.16
6850 (define-public python-llfuse-0.41
6851 (package (inherit python-llfuse)
6852 (version "0.41.1")
6853 (source (origin
6854 (method url-fetch)
6855 (uri (string-append
6856 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6857 "llfuse-" version ".tar.bz2"))
6858 (sha256
6859 (base32
6860 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6861 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6862 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6863 (license (list license:expat license:lgpl2.0+))))
6864
6865 (define-public python-msgpack
6866 (package
6867 (name "python-msgpack")
6868 (version "0.5.6")
6869 (source (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "msgpack" version))
6872 (sha256
6873 (base32
6874 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6875 (build-system python-build-system)
6876 (arguments
6877 `(#:modules ((guix build utils)
6878 (guix build python-build-system)
6879 (ice-9 ftw)
6880 (srfi srfi-1)
6881 (srfi srfi-26))
6882 #:phases
6883 (modify-phases %standard-phases
6884 (replace 'check
6885 (lambda _
6886 (let ((cwd (getcwd)))
6887 (setenv "PYTHONPATH"
6888 (string-append cwd "/build/"
6889 (find (cut string-prefix? "lib" <>)
6890 (scandir (string-append cwd "/build")))
6891 ":"
6892 (getenv "PYTHONPATH")))
6893 (invoke "pytest" "-v" "test")))))))
6894 (native-inputs
6895 `(("python-pytest" ,python-pytest)))
6896 (synopsis "MessagePack (de)serializer")
6897 (description "MessagePack is a fast, compact binary serialization format,
6898 suitable for similar data to JSON. This package provides CPython bindings for
6899 reading and writing MessagePack data.")
6900 (home-page "https://pypi.python.org/pypi/msgpack/")
6901 (license license:asl2.0)))
6902
6903 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6904 ;; release 0.5. Some packages like borg still call it by the old name for now.
6905 ;; <https://bugs.gnu.org/30662>
6906 (define-public python-msgpack-transitional
6907 (package
6908 (inherit python-msgpack)
6909 (name "python-msgpack-transitional")
6910 (arguments
6911 (substitute-keyword-arguments (package-arguments python-msgpack)
6912 ((#:phases phases)
6913 `(modify-phases ,phases
6914 (add-after 'unpack 'configure-transitional
6915 (lambda _
6916 ;; Keep using the old name.
6917 (substitute* "setup.py"
6918 (("TRANSITIONAL = False")
6919 "TRANSITIONAL = 1"))
6920 #t))))))))
6921
6922 (define-public python2-msgpack
6923 (package-with-python2 python-msgpack))
6924
6925 (define-public python-netaddr
6926 (package
6927 (name "python-netaddr")
6928 (version "0.7.19")
6929 (source
6930 (origin
6931 (method url-fetch)
6932 (uri (pypi-uri "netaddr" version))
6933 (sha256
6934 (base32
6935 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6936 (build-system python-build-system)
6937 (arguments `(#:tests? #f)) ;; No tests.
6938 (home-page "https://github.com/drkjam/netaddr/")
6939 (synopsis "Pythonic manipulation of network addresses")
6940 (description
6941 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6942 and MAC network addresses.")
6943 (license license:bsd-3)))
6944
6945 (define-public python2-netaddr
6946 (package-with-python2 python-netaddr))
6947
6948 (define-public python2-pyroute2
6949 (package
6950 (name "python2-pyroute2")
6951 (version "0.5.6")
6952 (source
6953 (origin
6954 (method url-fetch)
6955 (uri (pypi-uri "pyroute2" version))
6956 (sha256
6957 (base32
6958 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6959 (build-system python-build-system)
6960 (arguments
6961 `(#:python ,python-2)) ;Python 3.x is not supported
6962 (home-page "https://github.com/svinota/pyroute2")
6963 (synopsis "Python netlink library")
6964 (description
6965 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6966 Supported netlink families and protocols include:
6967 @itemize
6968 @item rtnl, network settings - addresses, routes, traffic controls
6969 @item nfnetlink - netfilter API: ipset, nftables, ...
6970 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6971 @item devlink - manage and monitor devlink-enabled hardware
6972 @item generic - generic netlink families
6973 @itemize
6974 @item nl80211 - wireless functions API (basic support)
6975 @item taskstats - extended process statistics
6976 @item acpi_events - ACPI events monitoring
6977 @item thermal_events - thermal events monitoring
6978 @item VFS_DQUOT - disk quota events monitoring
6979 @end itemize
6980 @end itemize")
6981 (license license:gpl2+)))
6982
6983 (define-public python-wrapt
6984 (package
6985 (name "python-wrapt")
6986 (version "1.11.1")
6987 (source
6988 (origin
6989 (method url-fetch)
6990 (uri (pypi-uri "wrapt" version))
6991 (sha256
6992 (base32
6993 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6994 (build-system python-build-system)
6995 (arguments
6996 ;; Tests are not included in the tarball, they are only available in the
6997 ;; git repository.
6998 `(#:tests? #f))
6999 (home-page "https://github.com/GrahamDumpleton/wrapt")
7000 (synopsis "Module for decorators, wrappers and monkey patching")
7001 (description
7002 "The aim of the wrapt module is to provide a transparent object proxy for
7003 Python, which can be used as the basis for the construction of function
7004 wrappers and decorator functions.")
7005 (license license:bsd-2)))
7006
7007 (define-public python2-wrapt
7008 (package-with-python2 python-wrapt))
7009
7010 (define-public python-xlrd
7011 (package
7012 (name "python-xlrd")
7013 (version "1.0.0")
7014 (source (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "xlrd" version))
7017 (sha256
7018 (base32
7019 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7020 (build-system python-build-system)
7021 (arguments
7022 `(#:phases
7023 (modify-phases %standard-phases
7024 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7025 ;; run tests instead for now.
7026 (replace 'check (lambda _ (invoke "nosetests"))))))
7027 (native-inputs `(("python-nose" ,python-nose)))
7028 (home-page "http://www.python-excel.org/")
7029 (synopsis "Library for extracting data from Excel files")
7030 (description "This package provides a library to extract data from
7031 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7032 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7033 Unicode-aware. It is not intended as an end-user tool.")
7034 (license license:bsd-3)))
7035
7036 (define-public python2-xlrd
7037 (package-with-python2 python-xlrd))
7038
7039 (define-public python-prettytable
7040 (package
7041 (name "python-prettytable")
7042 (version "0.7.2")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7047 (sha256
7048 (base32
7049 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7050 (build-system python-build-system)
7051 (home-page "http://code.google.com/p/prettytable/")
7052 (synopsis "Display tabular data in an ASCII table format")
7053 (description
7054 "A library designed to represent tabular data in visually appealing ASCII
7055 tables. PrettyTable allows for selection of which columns are to be printed,
7056 independent alignment of columns (left or right justified or centred) and
7057 printing of sub-tables by specifying a row range.")
7058 (license license:bsd-3)))
7059
7060 (define-public python2-prettytable
7061 (package-with-python2 python-prettytable))
7062
7063 (define-public python-tables
7064 (package
7065 (name "python-tables")
7066 (version "3.4.4")
7067 (source
7068 (origin
7069 (method url-fetch)
7070 (uri (pypi-uri "tables" version))
7071 (sha256
7072 (base32
7073 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7074 (modules '((guix build utils)))
7075 (snippet
7076 '(begin
7077 ;; Remove pre-compiled .pyc files from source.
7078 (for-each delete-file-recursively
7079 (find-files "." "__pycache__" #:directories? #t))
7080 (for-each delete-file (find-files "." "\\.pyc$"))
7081 #t))))
7082 (build-system python-build-system)
7083 (arguments
7084 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7085 ;; or "check", so we must override the build and check phases.
7086 #:phases
7087 (modify-phases %standard-phases
7088 (add-after 'unpack 'use-gcc
7089 (lambda _
7090 (substitute* "setup.py"
7091 (("compiler = new_compiler\\(\\)" line)
7092 (string-append line
7093 "\ncompiler.set_executables(compiler='gcc',"
7094 "compiler_so='gcc',"
7095 "linker_exe='gcc',"
7096 "linker_so='gcc -shared')")))
7097 #t))
7098 (replace 'build
7099 (lambda* (#:key inputs #:allow-other-keys)
7100 (invoke "python" "setup.py" "build"
7101 (string-append "--hdf5="
7102 (assoc-ref inputs "hdf5")))))
7103 (replace 'check
7104 (lambda* (#:key inputs #:allow-other-keys)
7105 (invoke "python" "setup.py" "check"
7106 (string-append "--hdf5="
7107 (assoc-ref inputs "hdf5"))))))))
7108 (propagated-inputs
7109 `(("python-numexpr" ,python-numexpr)
7110 ("python-numpy" ,python-numpy)))
7111 (native-inputs
7112 `(("python-cython" ,python-cython)
7113 ("pkg-config" ,pkg-config)))
7114 (inputs
7115 `(("hdf5" ,hdf5)
7116 ("bzip2" ,bzip2)
7117 ("zlib" ,zlib)))
7118 (home-page "http://www.pytables.org/")
7119 (synopsis "Hierarchical datasets for Python")
7120 (description "PyTables is a package for managing hierarchical datasets and
7121 designed to efficiently cope with extremely large amounts of data.")
7122 (license license:bsd-3)))
7123
7124 (define-public python2-tables
7125 (package-with-python2 python-tables))
7126
7127 (define-public python-pyasn1
7128 (package
7129 (name "python-pyasn1")
7130 (version "0.4.3")
7131 (source
7132 (origin
7133 (method url-fetch)
7134 (uri (pypi-uri "pyasn1" version))
7135 (sha256
7136 (base32
7137 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7138 (build-system python-build-system)
7139 (home-page "http://pyasn1.sourceforge.net/")
7140 (synopsis "ASN.1 types and codecs")
7141 (description
7142 "This is an implementation of ASN.1 types and codecs in Python. It is
7143 suitable for a wide range of protocols based on the ASN.1 specification.")
7144 (license license:bsd-2)))
7145
7146 (define-public python2-pyasn1
7147 (package-with-python2 python-pyasn1))
7148
7149 (define-public python-pyasn1-modules
7150 (package
7151 (name "python-pyasn1-modules")
7152 (version "0.2.2")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "pyasn1-modules" version))
7157 (sha256
7158 (base32
7159 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7160 (build-system python-build-system)
7161 (propagated-inputs
7162 `(("python-pyasn1" ,python-pyasn1)))
7163 (home-page "https://sourceforge.net/projects/pyasn1/")
7164 (synopsis "ASN.1 codec implementations")
7165 (description
7166 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7167 implementations of ASN.1-based codecs and protocols.")
7168 (license license:bsd-3)))
7169
7170 (define-public python2-pyasn1-modules
7171 (package-with-python2 python-pyasn1-modules))
7172
7173 (define-public python-ipaddress
7174 (package
7175 (name "python-ipaddress")
7176 (version "1.0.22")
7177 (source (origin
7178 (method url-fetch)
7179 (uri (pypi-uri "ipaddress" version))
7180 (sha256
7181 (base32
7182 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7183 (build-system python-build-system)
7184 (home-page "https://github.com/phihag/ipaddress")
7185 (synopsis "IP address manipulation library")
7186 (description
7187 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7188 in Python. This library is used to create, poke at, and manipulate IPv4 and
7189 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7190 module to older versions of Python.")
7191 (license license:psfl)))
7192
7193 (define-public python2-ipaddress
7194 (package-with-python2 python-ipaddress))
7195
7196 (define-public python2-ipaddr
7197 (package
7198 (name "python2-ipaddr")
7199 (version "2.1.11")
7200 (source
7201 (origin
7202 (method url-fetch)
7203 (uri (pypi-uri "ipaddr" version))
7204 (sha256
7205 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7206 (build-system python-build-system)
7207 (arguments
7208 `(#:python ,python-2 ;version 2 only
7209 #:phases
7210 (modify-phases %standard-phases
7211 (replace 'check
7212 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7213 (home-page "https://github.com/google/ipaddr-py")
7214 (synopsis "IP address manipulation library")
7215 (description
7216 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7217 IPv6 addresses and networks.
7218
7219 For new implementations you may prefer to use the standard module
7220 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7221 versions of Python.")
7222 (license license:asl2.0)))
7223
7224 (define-public python-idna
7225 (package
7226 (name "python-idna")
7227 (version "2.8")
7228 (source
7229 (origin
7230 (method url-fetch)
7231 (uri (pypi-uri "idna" version))
7232 (sha256
7233 (base32
7234 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7235 (build-system python-build-system)
7236 (home-page "https://github.com/kjd/idna")
7237 (synopsis "Internationalized domain names in applications")
7238 (description
7239 "This is a library to support the Internationalised Domain Names in
7240 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7241 protocol is often referred to as “IDNA2008” and can produce different results
7242 from the earlier standard from 2003. The library is also intended to act as a
7243 suitable drop-in replacement for the “encodings.idna” module that comes with
7244 the Python standard library but currently only supports the older 2003
7245 specification.")
7246 (license license:bsd-4)))
7247
7248 (define-public python-idna-2.7
7249 (package (inherit python-idna)
7250 (version "2.7")
7251 (source (origin
7252 (method url-fetch)
7253 (uri (pypi-uri "idna" version))
7254 (sha256
7255 (base32
7256 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7257
7258
7259 (define-public python2-idna
7260 (package-with-python2 python-idna))
7261
7262 (define-public python-idna-ssl
7263 (package
7264 (name "python-idna-ssl")
7265 (version "1.0.1")
7266 (source
7267 (origin
7268 (method url-fetch)
7269 (uri (pypi-uri "idna-ssl" version))
7270 (sha256
7271 (base32
7272 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7273 (build-system python-build-system)
7274 (arguments
7275 `(#:tests? #f)) ;circular dependency with python-aiohttp
7276 (home-page "https://github.com/aio-libs/idna-ssl")
7277 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7278 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7279 domains support.")
7280 (license license:expat)))
7281
7282 (define-public python-pretend
7283 (package
7284 (name "python-pretend")
7285 (version "1.0.9")
7286 (source
7287 (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "pretend" version))
7290 (sha256
7291 (base32
7292 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7293 (build-system python-build-system)
7294 (home-page "https://github.com/alex/pretend")
7295 (synopsis "Library for stubbing in Python")
7296 (description
7297 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7298 technique for writing tests. You may hear the term mixed up with mocks,
7299 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7300 responses, rather than doing any computation.")
7301 (license license:bsd-3)))
7302
7303 (define-public python2-pretend
7304 (package-with-python2 python-pretend))
7305
7306 (define-public python-pip
7307 (package
7308 (name "python-pip")
7309 (version "18.1")
7310 (source
7311 (origin
7312 (method url-fetch)
7313 (uri (pypi-uri "pip" version))
7314 (sha256
7315 (base32
7316 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7317 (build-system python-build-system)
7318 (arguments
7319 '(#:tests? #f)) ; there are no tests in the pypi archive.
7320 (home-page "https://pip.pypa.io/")
7321 (synopsis "Package manager for Python software")
7322 (description
7323 "Pip is a package manager for Python software, that finds packages on the
7324 Python Package Index (PyPI).")
7325 (license license:expat)))
7326
7327 (define-public python2-pip
7328 (package-with-python2 python-pip))
7329
7330 (define-public python-tlsh
7331 (package
7332 (name "python-tlsh")
7333 (version "3.4.5")
7334 (home-page "https://github.com/trendmicro/tlsh")
7335 (source
7336 (origin
7337 (method git-fetch)
7338 (uri (git-reference
7339 (url "https://github.com/trendmicro/tlsh.git")
7340 (commit (string-append "v" version))))
7341 (file-name (git-file-name name version))
7342 (sha256
7343 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7344 (build-system cmake-build-system)
7345 (arguments
7346 '(#:out-of-source? #f
7347 #:phases (modify-phases %standard-phases
7348 (replace
7349 'install
7350 (lambda* (#:key outputs #:allow-other-keys)
7351 ;; Build and install the Python bindings. The underlying
7352 ;; C++ library is apparently not meant to be installed.
7353 (let ((out (assoc-ref outputs "out")))
7354 (with-directory-excursion "py_ext"
7355 (and (system* "python" "setup.py" "build")
7356 (system* "python" "setup.py" "install"
7357 (string-append "--prefix=" out))))))))))
7358 (inputs `(("python" ,python-wrapper))) ;for the bindings
7359 (synopsis "Fuzzy matching library for Python")
7360 (description
7361 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7362 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7363 value which can be used for similarity comparisons. Similar objects have
7364 similar hash values, which allows for the detection of similar objects by
7365 comparing their hash values. The byte stream should have a sufficient amount
7366 of complexity; for example, a byte stream of identical bytes will not generate
7367 a hash value.")
7368 (license license:asl2.0)))
7369
7370 (define-public python2-tlsh
7371 (package
7372 (inherit python-tlsh)
7373 (name "python2-tlsh")
7374 (inputs `(("python" ,python-2)))))
7375
7376 (define-public python-termcolor
7377 (package
7378 (name "python-termcolor")
7379 (version "1.1.0")
7380 (source
7381 (origin
7382 (method url-fetch)
7383 (uri (pypi-uri "termcolor" version))
7384 (sha256
7385 (base32
7386 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7387 (build-system python-build-system)
7388 (arguments
7389 ;; There are no tests.
7390 `(#:tests? #f))
7391 (home-page "https://pypi.python.org/pypi/termcolor")
7392 (synopsis "ANSII Color formatting for terminal output")
7393 (description
7394 "This package provides ANSII Color formatting for output in terminals.")
7395 (license license:expat)))
7396
7397 (define-public python2-termcolor
7398 (package-with-python2 python-termcolor))
7399
7400 (define-public python-libarchive-c
7401 (package
7402 (name "python-libarchive-c")
7403 (version "2.8")
7404 (source (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "libarchive-c" version))
7407 (sha256
7408 (base32
7409 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7410 (build-system python-build-system)
7411 (arguments
7412 '(#:phases (modify-phases %standard-phases
7413 (add-before
7414 'build 'reference-libarchive
7415 (lambda* (#:key inputs #:allow-other-keys)
7416 ;; Retain the absolute file name of libarchive.so.
7417 (let ((libarchive (assoc-ref inputs "libarchive")))
7418 (substitute* "libarchive/ffi.py"
7419 (("find_library\\('archive'\\)")
7420 (string-append "'" libarchive
7421 "/lib/libarchive.so'"))))))
7422 (replace 'check
7423 (lambda _ (invoke "pytest" "-vv"))))))
7424 (native-inputs
7425 `(("python-mock" ,python-mock)
7426 ("python-pytest" ,python-pytest)))
7427 (inputs
7428 `(("libarchive" ,libarchive)))
7429 (home-page "https://github.com/Changaco/python-libarchive-c")
7430 (synopsis "Python interface to libarchive")
7431 (description
7432 "This package provides Python bindings to libarchive, a C library to
7433 access possibly compressed archives in many different formats. It uses
7434 Python's @code{ctypes} foreign function interface (FFI).")
7435 (license license:lgpl2.0+)))
7436
7437 (define-public python2-libarchive-c
7438 (package-with-python2 python-libarchive-c))
7439
7440 (define-public python-file
7441 (package
7442 (inherit file)
7443 (name "python-file")
7444 (build-system python-build-system)
7445 (arguments
7446 '(#:tests? #f ;no tests
7447 #:configure-flags '("--single-version-externally-managed" "--root=/")
7448 #:phases (modify-phases %standard-phases
7449 (add-before 'build 'change-directory
7450 (lambda _
7451 (chdir "python")
7452 #t))
7453 (add-before 'build 'set-library-file-name
7454 (lambda* (#:key inputs #:allow-other-keys)
7455 (let ((file (assoc-ref inputs "file")))
7456 (substitute* "magic.py"
7457 (("find_library\\('magic'\\)")
7458 (string-append "'" file "/lib/libmagic.so'")))
7459 #t))))))
7460 (inputs `(("file" ,file)))
7461 (native-inputs (if (%current-target-system)
7462 `(("self" ,this-package))
7463 '()))
7464 (synopsis "Python bindings to the libmagic file type guesser. Note that
7465 this module and the python-magic module both provide a \"magic.py\" file;
7466 these two modules, which are different and were developed separately, both
7467 serve the same purpose: provide Python bindings for libmagic.")))
7468
7469 (define-public python2-file
7470 (package-with-python2 python-file))
7471
7472 (define-public python-debian
7473 (package
7474 (name "python-debian")
7475 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7476 (version "0.1.28")
7477 (source
7478 (origin
7479 (method url-fetch)
7480 (uri (pypi-uri name version))
7481 (sha256
7482 (base32
7483 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7484 (build-system python-build-system)
7485 (propagated-inputs
7486 `(("python-six" ,python-six)))
7487 (synopsis "Debian package related modules")
7488 (description
7489 ;; XXX: Use @enumerate instead of @itemize to work around
7490 ;; <http://bugs.gnu.org/21772>.
7491 "This package provides Python modules that abstract many formats of
7492 Debian-related files, such as:
7493
7494 @enumerate
7495 @item Debtags information;
7496 @item @file{debian/changelog} files;
7497 @item packages files, pdiffs;
7498 @item control files of single or multiple RFC822-style paragraphs---e.g.
7499 @file{debian/control}, @file{.changes}, @file{.dsc};
7500 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7501 contained files and meta-information.
7502 @end enumerate\n")
7503
7504 ;; Modules are either GPLv2+ or GPLv3+.
7505 (license license:gpl3+)))
7506
7507 (define-public python2-debian
7508 (package-with-python2 python-debian))
7509
7510 (define-public python-nbformat
7511 (package
7512 (name "python-nbformat")
7513 (version "4.4.0")
7514 (source
7515 (origin
7516 (method url-fetch)
7517 (uri (pypi-uri "nbformat" version))
7518 (sha256
7519 (base32
7520 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7521 (build-system python-build-system)
7522 (arguments `(#:tests? #f)) ; no test target
7523 (propagated-inputs
7524 `(("python-ipython-genutils" ,python-ipython-genutils)
7525 ("python-jsonschema" ,python-jsonschema)
7526 ("python-jupyter-core" ,python-jupyter-core)
7527 ("python-traitlets" ,python-traitlets)))
7528 (home-page "http://jupyter.org")
7529 (synopsis "Jupyter Notebook format")
7530 (description "This package provides the reference implementation of the
7531 Jupyter Notebook format and Python APIs for working with notebooks.")
7532 (license license:bsd-3)))
7533
7534 (define-public python2-nbformat
7535 (package-with-python2 python-nbformat))
7536
7537 (define-public python-bleach
7538 (package
7539 (name "python-bleach")
7540 (version "1.4.3")
7541 (source
7542 (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "bleach" version))
7545 (sha256
7546 (base32
7547 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7548 (build-system python-build-system)
7549 (propagated-inputs
7550 `(("python-html5lib" ,python-html5lib-0.9)
7551 ("python-six" ,python-six)))
7552 (native-inputs
7553 `(("python-nose" ,python-nose)))
7554 (home-page "https://github.com/jsocol/bleach")
7555 (synopsis "Whitelist-based HTML-sanitizing tool")
7556 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7557 (license license:asl2.0)))
7558
7559 (define-public python2-bleach
7560 (package-with-python2 python-bleach))
7561
7562 (define-public python-entrypoints
7563 (package
7564 (name "python-entrypoints")
7565 (version "0.3")
7566 (source
7567 (origin
7568 (method url-fetch)
7569 (uri (pypi-uri "entrypoints" version))
7570 (sha256
7571 (base32
7572 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7573 (build-system python-build-system)
7574 ;; The package does not come with a setup.py file, so we have to generate
7575 ;; one ourselves.
7576 (arguments
7577 `(#:tests? #f
7578 #:phases
7579 (modify-phases %standard-phases
7580 (add-after 'unpack 'create-setup.py
7581 (lambda _
7582 (call-with-output-file "setup.py"
7583 (lambda (port)
7584 (format port "\
7585 from setuptools import setup
7586 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7587 " ,version))))))))
7588 (home-page "https://github.com/takluyver/entrypoints")
7589 (synopsis "Discover and load entry points from installed Python packages")
7590 (description "Entry points are a way for Python packages to advertise
7591 objects with some common interface. The most common examples are
7592 @code{console_scripts} entry points, which define shell commands by
7593 identifying a Python function to run. The @code{entrypoints} module contains
7594 functions to find and load entry points.")
7595 (license license:expat)))
7596
7597 (define-public python2-entrypoints
7598 (package-with-python2 python-entrypoints))
7599
7600 (define-public python-nbconvert
7601 (package
7602 (name "python-nbconvert")
7603 (version "5.0.0b1")
7604 (source
7605 (origin
7606 (method url-fetch)
7607 (uri (pypi-uri "nbconvert" version))
7608 (sha256
7609 (base32
7610 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7611 (build-system python-build-system)
7612 (arguments
7613 `(;; The "bdist_egg" target is disabled by default, causing the installation
7614 ;; to fail.
7615 #:configure-flags (list "bdist_egg")
7616 ;; FIXME: 5 failures, 40 errors.
7617 #:tests? #f))
7618 ;; #:phases
7619 ;; (modify-phases %standard-phases
7620 ;; (replace 'check
7621 ;; (lambda _
7622 ;; (zero? (system* "py.test" "-v")))))
7623 (native-inputs
7624 `(("python-pytest" ,python-pytest)))
7625 (propagated-inputs
7626 `(("python-bleach" ,python-bleach)
7627 ("python-entrypoints" ,python-entrypoints)
7628 ("python-jinja2" ,python-jinja2)
7629 ("python-jupyter-core" ,python-jupyter-core)
7630 ("python-mistune" ,python-mistune)
7631 ("python-nbformat" ,python-nbformat)
7632 ("python-pygments" ,python-pygments)
7633 ("python-traitlets" ,python-traitlets)))
7634 (home-page "http://jupyter.org")
7635 (synopsis "Converting Jupyter Notebooks")
7636 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7637 notebooks to various other formats via Jinja templates. It allows you to
7638 convert an @code{.ipynb} notebook file into various static formats including:
7639
7640 @enumerate
7641 @item HTML
7642 @item LaTeX
7643 @item PDF
7644 @item Reveal JS
7645 @item Markdown (md)
7646 @item ReStructured Text (rst)
7647 @item executable script
7648 @end enumerate\n")
7649 (license license:bsd-3)))
7650
7651 (define-public python2-nbconvert
7652 (package-with-python2 python-nbconvert))
7653
7654 (define-public python-notebook
7655 (package
7656 (name "python-notebook")
7657 (version "5.7.4")
7658 (source (origin
7659 (method url-fetch)
7660 (uri (pypi-uri "notebook" version))
7661 (sha256
7662 (base32
7663 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7664 (build-system python-build-system)
7665 (arguments
7666 `(#:phases
7667 (modify-phases %standard-phases
7668 (replace 'check
7669 (lambda _
7670 ;; These tests require a browser
7671 (delete-file-recursively "notebook/tests/selenium")
7672 ;; Some tests need HOME
7673 (setenv "HOME" "/tmp")
7674 ;; This file contains "warningfilters", which are not supported
7675 ;; by this version of nose.
7676 (delete-file "setup.cfg")
7677 (with-directory-excursion "/tmp"
7678 (invoke "nosetests" "-v"))
7679 #t)))))
7680 (propagated-inputs
7681 `(("python-jupyter-core" ,python-jupyter-core)
7682 ("python-nbformat" ,python-nbformat)
7683 ("python-nbconvert" ,python-nbconvert)
7684 ("python-prometheus-client" ,python-prometheus-client)
7685 ("python-send2trash" ,python-send2trash)
7686 ("python-terminado" ,python-terminado)))
7687 (native-inputs
7688 `(("python-nose" ,python-nose)
7689 ("python-sphinx" ,python-sphinx)
7690 ("python-requests" ,python-requests)))
7691 (home-page "http://jupyter.org/")
7692 (synopsis "Web-based notebook environment for interactive computing")
7693 (description
7694 "The Jupyter HTML notebook is a web-based notebook environment for
7695 interactive computing.")
7696 (properties `((python2-variant . ,(delay python2-notebook))))
7697 (license license:bsd-3)))
7698
7699 (define-public python2-notebook
7700 (let ((base (package-with-python2
7701 (strip-python2-variant python-notebook))))
7702 (package (inherit base)
7703 (native-inputs
7704 `(("python2-mock" ,python2-mock)
7705 ,@(package-native-inputs base)))
7706 (arguments
7707 (substitute-keyword-arguments (package-arguments base)
7708 ((#:phases phases)
7709 `(modify-phases ,phases
7710 (add-before 'check 'disable-test-case
7711 ;; The test requires network access to localhost. Curiously it
7712 ;; fails with Python 2 only. Simply make the test-case return
7713 ;; immediately.
7714 (lambda _
7715 (substitute*
7716 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7717 (("formats = self.nbconvert_api") "return #")))))))))))
7718
7719 (define-public python-widgetsnbextension
7720 (package
7721 (name "python-widgetsnbextension")
7722 (version "3.4.2")
7723 (source
7724 (origin
7725 (method url-fetch)
7726 (uri (pypi-uri "widgetsnbextension" version))
7727 (sha256
7728 (base32
7729 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7730 (build-system python-build-system)
7731 (propagated-inputs
7732 `(("python-ipykernel" ,python-ipykernel)
7733 ("python-notebook" ,python-notebook)))
7734 (native-inputs
7735 `(("python-certifi" ,python-certifi)
7736 ("python-nose" ,python-nose)))
7737 (home-page "https://ipython.org")
7738 (synopsis "IPython HTML widgets for Jupyter")
7739 (description "This package provides interactive HTML widgets for Jupyter
7740 notebooks.")
7741 (license license:bsd-3)))
7742
7743 (define-public python2-widgetsnbextension
7744 (package-with-python2 python-widgetsnbextension))
7745
7746 (define-public python-ipywidgets
7747 (package
7748 (name "python-ipywidgets")
7749 (version "5.2.2")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (pypi-uri "ipywidgets" version))
7754 (sha256
7755 (base32
7756 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7757 (build-system python-build-system)
7758 (propagated-inputs
7759 `(("python-ipython" ,python-ipython)
7760 ("python-traitlets" ,python-traitlets)
7761 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7762 (native-inputs
7763 `(("python-nose" ,python-nose)
7764 ("python-pytest" ,python-pytest)))
7765 (home-page "https://ipython.org")
7766 (synopsis "IPython HTML widgets for Jupyter")
7767 (description "Ipywidgets are interactive HTML widgets for Jupyter
7768 notebooks and the IPython kernel. Notebooks come alive when interactive
7769 widgets are used. Users gain control of their data and can visualize changes
7770 in the data.")
7771 (license license:bsd-3)))
7772
7773 (define-public python2-ipywidgets
7774 (package-with-python2 python-ipywidgets))
7775
7776 (define-public python-jupyter-console
7777 (package
7778 (name "python-jupyter-console")
7779 (version "6.0.0")
7780 (source
7781 (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "jupyter_console" version))
7784 (sha256
7785 (base32
7786 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7787 (build-system python-build-system)
7788 (propagated-inputs
7789 `(("python-ipykernel" ,python-ipykernel)
7790 ("python-jupyter-client" ,python-jupyter-client)
7791 ("python-prompt-toolkit" ,python-prompt-toolkit)
7792 ("python-pygments" ,python-pygments)))
7793 (native-inputs
7794 `(("python-nose" ,python-nose)))
7795 (home-page "https://jupyter.org")
7796 (synopsis "Jupyter terminal console")
7797 (description "This package provides a terminal-based console frontend for
7798 Jupyter kernels. It also allows for console-based interaction with non-Python
7799 Jupyter kernels such as IJulia and IRKernel.")
7800 (license license:bsd-3)))
7801
7802 (define-public python2-jupyter-console
7803 (package
7804 (name "python2-jupyter-console")
7805 (version "5.2.0")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "jupyter_console" version))
7810 (sha256
7811 (base32
7812 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7813 (build-system python-build-system)
7814 ;; Tests only run in an TTY.
7815 (arguments `(#:tests? #f))
7816 (propagated-inputs
7817 `(("python2-ipykernel" ,python2-ipykernel)
7818 ("python2-jupyter-client" ,python2-jupyter-client)
7819 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7820 ("python2-pygments" ,python2-pygments)))
7821 (native-inputs
7822 `(("python2-nose" ,python2-nose)))
7823 (home-page "https://jupyter.org")
7824 (synopsis "Jupyter terminal console")
7825 (description "This package provides a terminal-based console frontend for
7826 Jupyter kernels. It also allows for console-based interaction with non-Python
7827 Jupyter kernels such as IJulia and IRKernel.")
7828 (license license:bsd-3)))
7829
7830 ;; The python-ipython and python-jupyter-console require each other. To get
7831 ;; the functionality in both packages working, strip down the
7832 ;; python-jupyter-console package when using it as an input to python-ipython.
7833 (define python-jupyter-console-minimal
7834 (package
7835 (inherit python-jupyter-console)
7836 (name "python-jupyter-console-minimal")
7837 (arguments
7838 (substitute-keyword-arguments
7839 (package-arguments python-jupyter-console)
7840 ((#:phases phases)
7841 `(modify-phases ,phases
7842 (add-after 'install 'delete-bin
7843 (lambda* (#:key outputs #:allow-other-keys)
7844 ;; Delete the bin files, to avoid conflicts in profiles
7845 ;; where python-ipython and python-jupyter-console are
7846 ;; both present.
7847 (delete-file-recursively
7848 (string-append
7849 (assoc-ref outputs "out") "/bin"))))))))
7850 ;; Remove the python-ipython propagated input, to avoid the cycle
7851 (propagated-inputs
7852 (alist-delete
7853 "python-ipython"
7854 (package-propagated-inputs python-jupyter-console)))))
7855
7856 (define-public python-qtconsole
7857 (package
7858 (name "python-qtconsole")
7859 (version "4.4.3")
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (pypi-uri "qtconsole" version))
7864 (sha256
7865 (base32
7866 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7867 (build-system python-build-system)
7868 (arguments
7869 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7870 ;; but we only have the LTS version 5.x. This means that there might be
7871 ;; runtime errors, but since this is a dependency of the Jupyter package,
7872 ;; and Jupyter can be used without the qtconsole we can overlook this for
7873 ;; now.
7874 `(#:tests? #f
7875 #:phases
7876 (modify-phases %standard-phases
7877 (add-before 'check 'pre-check
7878 (lambda _
7879 (setenv "QT_QPA_PLATFORM" "offscreen")
7880 #t)))))
7881 (propagated-inputs
7882 `(("python-ipykernel" ,python-ipykernel)
7883 ("python-ipython" ,python-ipython)))
7884 (native-inputs
7885 `(("python-pytest" ,python-pytest)))
7886 (home-page "http://jupyter.org")
7887 (synopsis "Jupyter Qt console")
7888 (description "This package provides a Qt-based console for Jupyter with
7889 support for rich media output.")
7890 (license license:bsd-3)))
7891
7892 (define-public jupyter
7893 (package
7894 (name "jupyter")
7895 (version "1.0.0")
7896 (source
7897 (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "jupyter" version))
7900 (sha256
7901 (base32
7902 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7903 (build-system python-build-system)
7904 (arguments '(#:tests? #f)) ; there are none.
7905 (propagated-inputs
7906 `(("python-ipykernel" ,python-ipykernel)
7907 ("python-ipywidgets" ,python-ipywidgets)
7908 ("python-jupyter-console" ,python-jupyter-console)
7909 ("python-nbconvert" ,python-nbconvert)
7910 ("python-notebook" ,python-notebook)
7911 ("python-qtconsole" ,python-qtconsole)))
7912 (native-search-paths
7913 (list (search-path-specification
7914 (variable "JUPYTER_PATH")
7915 (files '("share/jupyter")))))
7916 (home-page "https://jupyter.org")
7917 (synopsis "Web application for interactive documents")
7918 (description
7919 "The Jupyter Notebook is a web application that allows you to create and
7920 share documents that contain live code, equations, visualizations and
7921 explanatory text. Uses include: data cleaning and transformation, numerical
7922 simulation, statistical modeling, machine learning and much more.")
7923 (license license:bsd-3)))
7924
7925 (define-public python-chardet
7926 (package
7927 (name "python-chardet")
7928 (version "3.0.4")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "chardet" version))
7933 (sha256
7934 (base32
7935 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7936 (native-inputs
7937 `(("python-hypothesis" ,python-hypothesis)
7938 ("python-pytest" ,python-pytest)
7939 ("python-pytest-runner" ,python-pytest-runner)))
7940 (build-system python-build-system)
7941 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7942 (arguments `(#:tests? #f))
7943 (home-page "https://github.com/chardet/chardet")
7944 (synopsis "Universal encoding detector for Python 2 and 3")
7945 (description
7946 "This package provides @code{chardet}, a Python module that can
7947 automatically detect a wide range of file encodings.")
7948 (license license:lgpl2.1+)))
7949
7950 (define-public python2-chardet
7951 (package-with-python2 python-chardet))
7952
7953 (define-public python-docopt
7954 (package
7955 (name "python-docopt")
7956 (version "0.6.2")
7957 (source
7958 (origin
7959 (method url-fetch)
7960 ;; The release on PyPI does not include tests.
7961 (uri (string-append
7962 "https://github.com/docopt/docopt/archive/"
7963 version ".tar.gz"))
7964 (file-name (string-append name "-" version ".tar.gz"))
7965 (sha256
7966 (base32
7967 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7968 (build-system python-build-system)
7969 (native-inputs
7970 `(("python-pytest" ,python-pytest)))
7971 (arguments
7972 `(#:phases
7973 (modify-phases %standard-phases
7974 (replace 'check
7975 (lambda _ (invoke "py.test"))))))
7976 (home-page "http://docopt.org")
7977 (synopsis "Command-line interface description language for Python")
7978 (description "This library allows the user to define a command-line
7979 interface from a program's help message rather than specifying it
7980 programmatically with command-line parsers like @code{getopt} and
7981 @code{argparse}.")
7982 (license license:expat)))
7983
7984 (define-public python2-docopt
7985 (package-with-python2 python-docopt))
7986
7987 (define-public python-pythondialog
7988 (package
7989 (name "python-pythondialog")
7990 (version "3.4.0")
7991 (source
7992 (origin
7993 (method url-fetch)
7994 (uri (pypi-uri "pythondialog" version))
7995 (sha256
7996 (base32
7997 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7998 (build-system python-build-system)
7999 (arguments
8000 `(#:phases
8001 (modify-phases %standard-phases
8002 (add-after 'unpack 'patch-path
8003 (lambda* (#:key inputs #:allow-other-keys)
8004 (let* ((dialog (assoc-ref inputs "dialog")))
8005 ;; Since this library really wants to grovel the search path, we
8006 ;; must hardcode dialog's store path into it.
8007 (substitute* "dialog.py"
8008 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8009 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8010 #t))))
8011 #:tests? #f)) ; no test suite
8012 (propagated-inputs
8013 `(("dialog" ,dialog)))
8014 (home-page "http://pythondialog.sourceforge.net/")
8015 (synopsis "Python interface to the UNIX dialog utility")
8016 (description "A Python wrapper for the dialog utility. Its purpose is to
8017 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8018 This allows one to make simple text-mode user interfaces on Unix-like systems")
8019 (license license:lgpl2.1)
8020 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8021
8022 (define-public python2-pythondialog
8023 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8024 (package
8025 (inherit base)
8026 (version (package-version python-pythondialog))
8027 (source (origin
8028 (method url-fetch)
8029 (uri (pypi-uri "python2-pythondialog" version))
8030 (sha256
8031 (base32
8032 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8033
8034 (define-public python-configobj
8035 (package
8036 (name "python-configobj")
8037 (version "5.0.6")
8038 (source (origin
8039 (method url-fetch)
8040 (uri (pypi-uri "configobj" version))
8041 (sha256
8042 (base32
8043 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8044 ;; Patch setup.py so it looks for python-setuptools, which is
8045 ;; required to parse the keyword 'install_requires' in setup.py.
8046 (patches (search-patches "python-configobj-setuptools.patch"))))
8047 (build-system python-build-system)
8048 (propagated-inputs
8049 `(("python-six" ,python-six)))
8050 (synopsis "Config file reading, writing and validation")
8051 (description "ConfigObj is a simple but powerful config file reader and
8052 writer: an ini file round tripper. Its main feature is that it is very easy to
8053 use, with a straightforward programmer’s interface and a simple syntax for
8054 config files.")
8055 (home-page "https://github.com/DiffSK/configobj")
8056 (license license:bsd-3)))
8057
8058 (define-public python2-configobj
8059 (package-with-python2 python-configobj))
8060
8061 (define-public python-configargparse
8062 (package
8063 (name "python-configargparse")
8064 (version "0.14.0")
8065 (source (origin
8066 (method url-fetch)
8067 (uri (pypi-uri "ConfigArgParse" version))
8068 (sha256
8069 (base32
8070 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8071 (build-system python-build-system)
8072 (native-inputs
8073 `(("python-pyyaml" ,python-pyyaml)))
8074 (arguments
8075 `(#:phases
8076 (modify-phases %standard-phases
8077 (replace 'check
8078 (lambda _
8079 ;; Bypass setuptools-shim because one test relies on "setup.py"
8080 ;; being the first argument passed to the python call.
8081 ;;
8082 ;; NOTE: Many tests do not run because they rely on Python's
8083 ;; built-in test.test_argparse, but we remove the unit tests from
8084 ;; our Python installation.
8085 (invoke "python" "setup.py" "test"))))))
8086 (synopsis "Replacement for argparse")
8087 (description "A drop-in replacement for argparse that allows options to also
8088 be set via config files and/or environment variables.")
8089 (home-page "https://github.com/bw2/ConfigArgParse")
8090 (license license:expat)))
8091
8092 (define-public python2-configargparse
8093 (package-with-python2 python-configargparse))
8094
8095 (define-public python-argparse-manpage
8096 (package
8097 (name "python-argparse-manpage")
8098 (version "1.1")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "argparse-manpage" version))
8103 (sha256
8104 (base32
8105 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8106 (build-system python-build-system)
8107 (home-page "https://github.com/praiskup/argparse-manpage")
8108 (synopsis "Build manual page from Python's ArgumentParser object")
8109 (description
8110 "This package provides tools to build manual pages from Python's
8111 @code{ArgumentParser} object.")
8112 (license license:asl2.0)))
8113
8114 (define-public python-contextlib2
8115 (package
8116 (name "python-contextlib2")
8117 (version "0.5.5")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "contextlib2" version))
8122 (sha256
8123 (base32
8124 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8125 (build-system python-build-system)
8126 (home-page "http://contextlib2.readthedocs.org/")
8127 (synopsis "Tools for decorators and context managers")
8128 (description "This module is primarily a backport of the Python
8129 3.2 contextlib to earlier Python versions. Like contextlib, it
8130 provides utilities for common tasks involving decorators and context
8131 managers. It also contains additional features that are not part of
8132 the standard library.")
8133 (license license:psfl)))
8134
8135 (define-public python2-contextlib2
8136 (package
8137 (name "python2-contextlib2")
8138 (version "0.5.5")
8139 (source
8140 (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "contextlib2" version))
8143 (sha256
8144 (base32
8145 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8146 (build-system python-build-system)
8147 (arguments
8148 `(#:python ,python-2
8149 #:phases
8150 (modify-phases %standard-phases
8151 (replace 'check
8152 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8153 (native-inputs
8154 `(("python2-unittest2" ,python2-unittest2)))
8155 (home-page "http://contextlib2.readthedocs.org/")
8156 (synopsis "Tools for decorators and context managers")
8157 (description "This module is primarily a backport of the Python
8158 3.2 contextlib to earlier Python versions. Like contextlib, it
8159 provides utilities for common tasks involving decorators and context
8160 managers. It also contains additional features that are not part of
8161 the standard library.")
8162 (license license:psfl)))
8163
8164 (define-public python-texttable
8165 (package
8166 (name "python-texttable")
8167 (version "0.9.1")
8168 (source
8169 (origin
8170 (method url-fetch)
8171 (uri (pypi-uri "texttable" version))
8172 (sha256
8173 (base32
8174 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8175 (build-system python-build-system)
8176 (arguments '(#:tests? #f)) ; no tests
8177 (home-page "https://github.com/foutaise/texttable/")
8178 (synopsis "Python module for creating simple ASCII tables")
8179 (description "Texttable is a Python module for creating simple ASCII
8180 tables.")
8181 (license license:lgpl2.1+)))
8182
8183 (define-public python2-texttable
8184 (package-with-python2 python-texttable))
8185
8186 (define-public python-atomicwrites
8187 (package
8188 (name "python-atomicwrites")
8189 (version "1.3.0")
8190 (source (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "atomicwrites" version))
8193 (sha256
8194 (base32
8195 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8196 (build-system python-build-system)
8197 (synopsis "Atomic file writes in Python")
8198 (description "Library for atomic file writes using platform dependent tools
8199 for atomic file system operations.")
8200 (home-page "https://github.com/untitaker/python-atomicwrites")
8201 (license license:expat)))
8202
8203 (define-public python2-atomicwrites
8204 (package-with-python2 python-atomicwrites))
8205
8206 (define-public python-click-threading
8207 (package
8208 (name "python-click-threading")
8209 (version "0.4.4")
8210 (source (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "click-threading" version))
8213 (sha256
8214 (base32
8215 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8216 (build-system python-build-system)
8217 (propagated-inputs
8218 `(("python-click" ,python-click)))
8219 (synopsis "Utilities for multithreading in Click")
8220 (description "This package provides utilities for multithreading in Click
8221 applications.")
8222 (home-page "https://github.com/click-contrib/click-threading")
8223 (license license:expat)))
8224
8225 (define-public python-click-log
8226 (package
8227 (name "python-click-log")
8228 (version "0.3.2")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "click-log" version))
8232 (sha256
8233 (base32
8234 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8235 (build-system python-build-system)
8236 (propagated-inputs
8237 `(("python-click" ,python-click)))
8238 (synopsis "Logging for click applications")
8239 (description "This package provides a Python library for logging Click
8240 applications.")
8241 (home-page "https://github.com/click-contrib/click-log")
8242 (license license:expat)))
8243
8244 (define-public python-apipkg
8245 (package
8246 (name "python-apipkg")
8247 (version "1.4")
8248 (source (origin
8249 (method url-fetch)
8250 (uri (pypi-uri "apipkg" version))
8251 (sha256
8252 (base32
8253 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8254 (build-system python-build-system)
8255 (native-inputs
8256 `(("python-pytest" ,python-pytest)))
8257 (synopsis "Namespace control and lazy-import mechanism")
8258 (description "With apipkg you can control the exported namespace of a Python
8259 package and greatly reduce the number of imports for your users. It is a small
8260 pure Python module that works on virtually all Python versions.")
8261 (home-page "https://github.com/pytest-dev/apipkg")
8262 (license license:expat)))
8263
8264 (define-public python2-apipkg
8265 (package-with-python2 python-apipkg))
8266
8267 (define-public python-execnet
8268 (package
8269 (name "python-execnet")
8270 (version "1.4.1")
8271 (source (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "execnet" version))
8274 (sha256
8275 (base32
8276 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8277 (build-system python-build-system)
8278 (arguments
8279 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8280 ;; The two test failures are caused by the lack of an `ssh` executable.
8281 ;; The test suite can be run with pytest after the 'install' phase.
8282 #:tests? #f))
8283 (native-inputs
8284 `(("python-pytest" ,python-pytest)
8285 ("python-setuptools-scm" ,python-setuptools-scm)))
8286 (propagated-inputs
8287 `(("python-apipkg" ,python-apipkg)))
8288 (synopsis "Rapid multi-Python deployment")
8289 (description "Execnet provides a share-nothing model with
8290 channel-send/receive communication for distributing execution across many
8291 Python interpreters across version, platform and network barriers. It has a
8292 minimal and fast API targeting the following uses:
8293 @enumerate
8294 @item distribute tasks to (many) local or remote CPUs
8295 @item write and deploy hybrid multi-process applications
8296 @item write scripts to administer multiple environments
8297 @end enumerate")
8298 (home-page "http://codespeak.net/execnet/")
8299 (license license:expat)))
8300
8301 (define-public python2-execnet
8302 (package-with-python2 python-execnet))
8303
8304 (define-public python-icalendar
8305 (package
8306 (name "python-icalendar")
8307 (version "4.0.3")
8308 (source (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "icalendar" version))
8311 (sha256
8312 (base32
8313 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8314 (build-system python-build-system)
8315 (propagated-inputs
8316 `(("python-dateutil" ,python-dateutil)
8317 ("python-pytz" ,python-pytz)))
8318 (synopsis "Python library for parsing iCalendar files")
8319 (description "The icalendar package is a parser/generator of iCalendar
8320 files for use with Python.")
8321 (home-page "https://github.com/collective/icalendar")
8322 (license license:bsd-2)))
8323
8324 (define-public python-args
8325 (package
8326 (name "python-args")
8327 (version "0.1.0")
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "args" version))
8331 (sha256
8332 (base32
8333 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8334 (build-system python-build-system)
8335 (home-page "https://github.com/kennethreitz/args")
8336 (synopsis "Command-line argument parser")
8337 (description
8338 "This library provides a Python module to parse command-line arguments.")
8339 (license license:bsd-3)))
8340
8341 (define-public python2-args
8342 (package-with-python2 python-args))
8343
8344 (define-public python-clint
8345 (package
8346 (name "python-clint")
8347 (version "0.5.1")
8348 (source (origin
8349 (method url-fetch)
8350 (uri (pypi-uri "clint" version))
8351 (sha256
8352 (base32
8353 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8354 (build-system python-build-system)
8355 (arguments
8356 '(#:phases
8357 (modify-phases %standard-phases
8358 (replace 'check
8359 (lambda _ (invoke "py.test" "-v"))))))
8360 (native-inputs
8361 `(("python-pytest" ,python-pytest)))
8362 (propagated-inputs
8363 `(("python-args" ,python-args)))
8364 (home-page "https://github.com/kennethreitz/clint")
8365 (synopsis "Command-line interface tools")
8366 (description
8367 "Clint is a Python module filled with a set of tools for developing
8368 command-line applications, including tools for colored and indented
8369 output, progress bar display, and pipes.")
8370 (license license:isc)))
8371
8372 (define-public python2-clint
8373 (package-with-python2 python-clint))
8374
8375 (define-public python-rply
8376 (package
8377 (name "python-rply")
8378 (version "0.7.5")
8379 (source (origin
8380 (method url-fetch)
8381 (uri (pypi-uri "rply" version))
8382 (sha256
8383 (base32
8384 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8385 (build-system python-build-system)
8386 (propagated-inputs
8387 `(("python-appdirs" ,python-appdirs)))
8388 (home-page "https://github.com/alex/rply")
8389 (synopsis "Parser generator for Python")
8390 (description
8391 "This package provides a pure Python based parser generator, that also
8392 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8393 with a new public API, and RPython support.")
8394 (license license:bsd-3)))
8395
8396 (define-public python2-rply
8397 (package-with-python2 python-rply))
8398
8399 (define-public python-hy
8400 (package
8401 (name "python-hy")
8402 (version "0.13.0")
8403 (source (origin
8404 (method url-fetch)
8405 (uri (pypi-uri "hy" version))
8406 (sha256
8407 (base32
8408 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8409 (build-system python-build-system)
8410 (arguments
8411 '(#:phases
8412 (modify-phases %standard-phases
8413 (replace 'check
8414 (lambda _
8415 ;; Tests require write access to HOME.
8416 (setenv "HOME" "/tmp")
8417 (invoke "nosetests"))))))
8418 (native-inputs
8419 `(("python-coverage" ,python-coverage)
8420 ("python-nose" ,python-nose)))
8421 (propagated-inputs
8422 `(("python-astor" ,python-astor)
8423 ("python-clint" ,python-clint)
8424 ("python-rply" ,python-rply)))
8425 (home-page "http://hylang.org/")
8426 (synopsis "Lisp frontend to Python")
8427 (description
8428 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8429 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8430 Python at your fingertips, in Lisp form.")
8431 (license license:expat)))
8432
8433 (define-public python2-hy
8434 (package-with-python2 python-hy))
8435
8436 (define-public python2-functools32
8437 (package
8438 (name "python2-functools32")
8439 (version "3.2.3-2")
8440 (source
8441 (origin
8442 (method url-fetch)
8443 (uri (pypi-uri "functools32" version))
8444 (sha256
8445 (base32
8446 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8447 (build-system python-build-system)
8448 (arguments
8449 `(#:python ,python-2
8450 #:tests? #f)) ; no test target
8451 (home-page "https://github.com/MiCHiLU/python-functools32")
8452 (synopsis
8453 "Backport of the functools module from Python 3.2.3")
8454 (description
8455 "This package is a backport of the @code{functools} module from Python
8456 3.2.3 for use with older versions of Python and PyPy.")
8457 (license license:expat)))
8458
8459 (define-public python2-subprocess32
8460 (package
8461 (name "python2-subprocess32")
8462 (version "3.2.7")
8463 (source (origin
8464 (method url-fetch)
8465 (uri (pypi-uri "subprocess32" version))
8466 (sha256
8467 (base32
8468 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8469 (patches
8470 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8471 (build-system python-build-system)
8472 (arguments
8473 `(#:python ,python-2
8474 ;; The test suite fails with Python > 2.7.13:
8475 ;; import test.support
8476 ;; ImportError: No module named support
8477 #:tests? #f
8478 #:phases
8479 (modify-phases %standard-phases
8480 (add-after 'unpack 'patch-/bin/sh
8481 (lambda _
8482 (substitute* '("subprocess32.py"
8483 "test_subprocess32.py")
8484 (("/bin/sh") (which "sh")))
8485 #t)))))
8486 (home-page "https://github.com/google/python-subprocess32")
8487 (synopsis "Backport of the subprocess module from Python 3.2")
8488 (description
8489 "This is a backport of the @code{subprocess} standard library module
8490 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8491 new features. On POSIX systems it is guaranteed to be reliable when used
8492 in threaded applications. It includes timeout support from Python 3.3 but
8493 otherwise matches 3.2’s API.")
8494 (license license:psfl)))
8495
8496 (define-public python2-futures
8497 (package
8498 (name "python2-futures")
8499 (version "3.2.0")
8500 (source
8501 (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "futures" version))
8504 (sha256
8505 (base32
8506 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8507 (build-system python-build-system)
8508 (arguments
8509 `(#:python ,python-2
8510 #:phases
8511 (modify-phases %standard-phases
8512 (replace 'check
8513 (lambda _
8514 (invoke "python" "test_futures.py")
8515 #t)))))
8516 (home-page "https://github.com/agronholm/pythonfutures")
8517 (synopsis
8518 "Backport of the concurrent.futures package from Python 3.2")
8519 (description
8520 "The concurrent.futures module provides a high-level interface for
8521 asynchronously executing callables. This package backports the
8522 concurrent.futures package from Python 3.2")
8523 (license license:bsd-3)))
8524
8525 (define-public python-promise
8526 (package
8527 (name "python-promise")
8528 (version "0.4.2")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "promise" version))
8533 (sha256
8534 (base32
8535 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8536 (build-system python-build-system)
8537 ;; Tests wants python-futures, which is a python2 only program, and
8538 ;; can't be found by python-promise at test time.
8539 (arguments `(#:tests? #f))
8540 (home-page "https://github.com/syrusakbary/promise")
8541 (synopsis "Promises/A+ implementation for Python")
8542 (description
8543 "Promises/A+ implementation for Python")
8544 (properties `((python2-variant . ,(delay python2-promise))))
8545 (license license:expat)))
8546
8547 (define-public python2-promise
8548 (let ((promise (package-with-python2
8549 (strip-python2-variant python-promise))))
8550 (package (inherit promise)
8551 (arguments (substitute-keyword-arguments (package-arguments promise)
8552 ((#:tests? _) #t)))
8553 (native-inputs
8554 `(("python2-futures" ,python2-futures)
8555 ("python2-pytest" ,python2-pytest)
8556 ,@(package-native-inputs promise))))))
8557
8558 (define-public python-progressbar33
8559 (package
8560 (name "python-progressbar33")
8561 (version "2.4")
8562 (source
8563 (origin
8564 (method url-fetch)
8565 (uri (pypi-uri "progressbar33" version))
8566 (sha256
8567 (base32
8568 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8569 (build-system python-build-system)
8570 (home-page "http://github.com/germangh/python-progressbar")
8571 (synopsis "Text progress bar library for Python")
8572 (description
8573 "This package provides a text progress bar library for Python. This
8574 version only differs from the original @code{progressbar} package in that it
8575 uses relative package imports instead of absolute imports, which is necessary
8576 for the module to work under Python 3.3.")
8577 ;; Either or both of these licenses may be selected.
8578 (license (list license:lgpl2.1+ license:bsd-3))))
8579
8580 (define-public python-colorama
8581 (package
8582 (name "python-colorama")
8583 (version "0.3.9")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "colorama" version))
8588 (sha256
8589 (base32
8590 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8591 (build-system python-build-system)
8592 (synopsis "Colored terminal text rendering for Python")
8593 (description "Colorama is a Python library for rendering colored terminal
8594 text.")
8595 (home-page "https://pypi.python.org/pypi/colorama")
8596 (license license:bsd-3)))
8597
8598 (define-public python2-colorama
8599 (package-with-python2 python-colorama))
8600
8601 (define-public python-rsa
8602 (package
8603 (name "python-rsa")
8604 (version "3.4.2")
8605 (source
8606 (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "rsa" version))
8609 (sha256
8610 (base32
8611 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8612 (build-system python-build-system)
8613 (propagated-inputs
8614 `(("python-pyasn1" ,python-pyasn1)))
8615 (synopsis "Pure-Python RSA implementation")
8616 (description "Python-RSA is a pure-Python RSA implementation. It supports
8617 encryption and decryption, signing and verifying signatures, and key
8618 generation according to PKCS#1 version 1.5. It can be used as a Python
8619 library as well as on the command line.")
8620 (home-page "https://stuvel.eu/rsa")
8621 (license license:asl2.0)))
8622
8623 (define-public python2-rsa
8624 (package-with-python2 python-rsa))
8625
8626 (define-public python-pluggy
8627 (package
8628 (name "python-pluggy")
8629 (version "0.11.0")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "pluggy" version))
8634 (sha256
8635 (base32
8636 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8637 (build-system python-build-system)
8638 (native-inputs
8639 `(("python-setuptools-scm" ,python-setuptools-scm)))
8640 (synopsis "Plugin and hook calling mechanism for Python")
8641 (description "Pluggy is an extraction of the plugin manager as used by
8642 Pytest but stripped of Pytest specific details.")
8643 (home-page "https://pypi.python.org/pypi/pluggy")
8644 (license license:expat)))
8645
8646 (define-public python2-pluggy
8647 (package-with-python2 python-pluggy))
8648
8649 (define-public python-tox
8650 (package
8651 (name "python-tox")
8652 (version "2.8.1")
8653 (source
8654 (origin
8655 (method url-fetch)
8656 (uri (pypi-uri "tox" version))
8657 (sha256
8658 (base32
8659 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8660 (build-system python-build-system)
8661 (arguments
8662 ;; FIXME: Tests require pytest-timeout, which itself requires
8663 ;; pytest>=2.8.0 for installation.
8664 '(#:tests? #f))
8665 (propagated-inputs
8666 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8667 ("python-py" ,python-py)
8668 ("python-virtualenv" ,python-virtualenv)))
8669 (native-inputs
8670 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8671 ("python-pytest" ,python-pytest) ; >= 2.3.5
8672 ("python-setuptools-scm" ,python-setuptools-scm)))
8673 (home-page "http://tox.testrun.org/")
8674 (synopsis "Virtualenv-based automation of test activities")
8675 (description "Tox is a generic virtualenv management and test command line
8676 tool. It can be used to check that a package installs correctly with
8677 different Python versions and interpreters, or run tests in each type of
8678 supported environment, or act as a frontend to continuous integration
8679 servers.")
8680 (license license:expat)))
8681
8682 (define-public python2-tox
8683 (package-with-python2 python-tox))
8684
8685 (define-public python-jmespath
8686 (package
8687 (name "python-jmespath")
8688 (version "0.9.3")
8689 (source
8690 (origin
8691 (method url-fetch)
8692 (uri (pypi-uri "jmespath" version))
8693 (sha256
8694 (base32
8695 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8696 (build-system python-build-system)
8697 (native-inputs
8698 `(("python-nose" ,python-nose)))
8699 (synopsis "JSON Matching Expressions")
8700 (description "JMESPath (pronounced “james path”) is a Python library that
8701 allows one to declaratively specify how to extract elements from a JSON
8702 document.")
8703 (home-page "https://github.com/jmespath/jmespath.py")
8704 (license license:expat)))
8705
8706 (define-public python2-jmespath
8707 (package-with-python2 python-jmespath))
8708
8709 (define-public python-botocore
8710 (package
8711 (name "python-botocore")
8712 (version "1.12.149")
8713 (source
8714 (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "botocore" version))
8717 (sha256
8718 (base32
8719 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8720 (build-system python-build-system)
8721 (arguments
8722 ;; FIXME: Many tests are failing.
8723 '(#:tests? #f))
8724 (propagated-inputs
8725 `(("python-dateutil" ,python-dateutil)
8726 ("python-docutils" ,python-docutils)
8727 ("python-jmespath" ,python-jmespath)))
8728 (native-inputs
8729 `(("python-mock" ,python-mock)
8730 ("python-nose" ,python-nose)
8731 ("behave" ,behave)
8732 ("python-tox" ,python-tox)
8733 ("python-urllib3" ,python-urllib3)
8734 ("python-wheel" ,python-wheel)))
8735 (home-page "https://github.com/boto/botocore")
8736 (synopsis "Low-level interface to AWS")
8737 (description "Botocore is a Python library that provides a low-level
8738 interface to the Amazon Web Services (AWS) API.")
8739 (license license:asl2.0)))
8740
8741 (define-public python2-botocore
8742 (package-with-python2 python-botocore))
8743
8744 (define-public python-xdo
8745 (package
8746 (name "python-xdo")
8747 (version "0.3")
8748 (source (origin
8749 (method url-fetch)
8750 (uri (string-append
8751 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8752 "python-xdo_" version ".orig.tar.gz"))
8753 (sha256
8754 (base32
8755 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8756 (build-system python-build-system)
8757 (arguments
8758 '(#:phases
8759 (modify-phases %standard-phases
8760 (add-before 'install 'patch-libxdo-path
8761 ;; Hardcode the path of dynamically loaded libxdo library.
8762 (lambda* (#:key inputs #:allow-other-keys)
8763 (let ((libxdo (string-append
8764 (assoc-ref inputs "xdotool")
8765 "/lib/libxdo.so")))
8766 (substitute* "xdo/_xdo.py"
8767 (("find_library\\(\"xdo\"\\)")
8768 (simple-format #f "\"~a\"" libxdo)))
8769 #t))))
8770 #:tests? #f)) ; no tests provided
8771 (propagated-inputs
8772 `(("python-six" ,python-six)))
8773 (inputs
8774 `(("xdotool" ,xdotool)
8775 ("libX11" ,libx11)))
8776 (home-page "https://tracker.debian.org/pkg/python-xdo")
8777 (synopsis "Python library for simulating X11 keyboard/mouse input")
8778 (description "Provides bindings to libxdo for manipulating X11 via simulated
8779 input. (Note that this is mostly a legacy library; you may wish to look at
8780 python-xdo for newer bindings.)")
8781 (license license:bsd-3)))
8782
8783 (define-public python2-xdo
8784 (package-with-python2 python-xdo))
8785
8786 (define-public python-mako
8787 (package
8788 (name "python-mako")
8789 (version "1.0.13")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "Mako" version))
8794 (sha256
8795 (base32
8796 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8797 (build-system python-build-system)
8798 (propagated-inputs
8799 `(("python-markupsafe" ,python-markupsafe)))
8800 (native-inputs
8801 `(("python-mock" ,python-mock)
8802 ("python-nose" ,python-nose)
8803 ("python-pytest" ,python-pytest)))
8804 (home-page "https://www.makotemplates.org/")
8805 (synopsis "Templating language for Python")
8806 (description "Mako is a templating language for Python that compiles
8807 templates into Python modules.")
8808 (license license:expat)))
8809
8810 (define-public python2-mako
8811 (package-with-python2 python-mako))
8812
8813 (define-public python-waitress
8814 (package
8815 (name "python-waitress")
8816 (version "1.1.0")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "waitress" version))
8821 (patches (search-patches "python-waitress-fix-tests.patch"))
8822 (sha256
8823 (base32
8824 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8825 (build-system python-build-system)
8826 (home-page "https://github.com/Pylons/waitress")
8827 (synopsis "Waitress WSGI server")
8828 (description "Waitress is meant to be a production-quality pure-Python WSGI
8829 server with very acceptable performance.")
8830 (license license:zpl2.1)))
8831
8832 (define-public python2-waitress
8833 (package-with-python2 python-waitress))
8834
8835 (define-public python-pyquery
8836 (package
8837 (name "python-pyquery")
8838 (version "1.2.17")
8839 (source
8840 (origin
8841 (method url-fetch)
8842 (uri (pypi-uri "pyquery" version))
8843 (sha256
8844 (base32
8845 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8846 (build-system python-build-system)
8847 (native-inputs
8848 `(("python-webob" ,python-webob)
8849 ("python-webtest" ,python-webtest)))
8850 (propagated-inputs
8851 `(("python-lxml" ,python-lxml)
8852 ("python-cssselect" ,python-cssselect)))
8853 (home-page "https://github.com/gawel/pyquery")
8854 (synopsis "Make jQuery-like queries on xml documents")
8855 (description "pyquery allows you to make jQuery queries on xml documents.
8856 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8857 fast xml and html manipulation.")
8858 (license license:bsd-3)))
8859
8860 (define-public python-anyjson
8861 (package
8862 (name "python-anyjson")
8863 (version "0.3.3")
8864 (source
8865 (origin
8866 (method url-fetch)
8867 (uri (pypi-uri "anyjson" version))
8868 (sha256
8869 (base32
8870 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8871 (build-system python-build-system)
8872 (arguments
8873 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8874 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8875 ;; whatever) so this transformation needs to be done before the tests
8876 ;; can be run. Maybe we could add a build step to transform beforehand
8877 ;; but it could be annoying/difficult.
8878 ;; We can enable tests for the Python 2 version, though, and do below.
8879 #:tests? #f))
8880 (home-page "https://bitbucket.org/runeh/anyjson/")
8881 (synopsis
8882 "Wraps best available JSON implementation in a common interface")
8883 (description
8884 "Anyjson loads whichever is the fastest JSON module installed
8885 and provides a uniform API regardless of which JSON implementation is used.")
8886 (license license:bsd-3)
8887 (properties `((python2-variant . ,(delay python2-anyjson))))))
8888
8889 (define-public python2-anyjson
8890 (let ((anyjson (package-with-python2
8891 (strip-python2-variant python-anyjson))))
8892 (package
8893 (inherit anyjson)
8894 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8895 #:tests? #t
8896 ,@(package-arguments anyjson)))
8897 (native-inputs `(("python2-nose" ,python2-nose))))))
8898
8899 (define-public python-amqp
8900 (package
8901 (name "python-amqp")
8902 (version "2.3.2")
8903 (source
8904 (origin
8905 (method url-fetch)
8906 (uri (pypi-uri "amqp" version))
8907 (sha256
8908 (base32
8909 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8910 (build-system python-build-system)
8911 (native-inputs
8912 `(("python-case" ,python-case)
8913 ("python-pytest-sugar" ,python-pytest-sugar)
8914 ("python-mock" ,python-mock)))
8915 (propagated-inputs
8916 `(("python-vine" ,python-vine)))
8917 (home-page "https://github.com/celery/py-amqp")
8918 (synopsis
8919 "Low-level AMQP client for Python (fork of amqplib)")
8920 (description
8921 "This is a fork of amqplib which was originally written by Barry Pederson.
8922 It is maintained by the Celery project, and used by kombu as a pure python
8923 alternative when librabbitmq is not available.")
8924 (license license:lgpl2.1+)
8925 (properties `((python2-variant . ,(delay python2-amqp))))))
8926
8927 (define-public python2-amqp
8928 (let ((amqp (package-with-python2
8929 (strip-python2-variant python-amqp))))
8930 (package
8931 (inherit amqp)
8932 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8933 ;; unmaintained. Weirdly, does not do this on the python 3
8934 ;; version?
8935 #:tests? #f
8936 ,@(package-arguments amqp))))))
8937
8938 (define-public python-txamqp
8939 (package
8940 (name "python-txamqp")
8941 (version "0.8.2")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "txAMQP" version))
8946 (sha256
8947 (base32
8948 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8949 (build-system python-build-system)
8950 (propagated-inputs
8951 `(("python-six" ,python-six)
8952 ("python-twisted" ,python-twisted)))
8953 (home-page "https://github.com/txamqp/txamqp")
8954 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8955 (description
8956 "This package provides a Python library for communicating with AMQP peers
8957 and brokers using the asynchronous networking framework Twisted. It contains
8958 all the necessary code to connect, send and receive messages to/from an
8959 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8960 also includes support for using Thrift RPC over AMQP in Twisted
8961 applications.")
8962 (license license:asl2.0)))
8963
8964 (define-public python2-txamqp
8965 (package-with-python2 python-txamqp))
8966
8967 (define-public python-kombu
8968 (package
8969 (name "python-kombu")
8970 (version "4.2.2")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "kombu" version))
8975 (sha256
8976 (base32
8977 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8978 (build-system python-build-system)
8979 (native-inputs
8980 `(("python-mock" ,python-mock)
8981 ("python-case" ,python-case)
8982 ("python-pyro4" ,python-pyro4)
8983 ("python-pytest-sugar" ,python-pytest-sugar)
8984 ("python-pytz" ,python-pytz)))
8985 (propagated-inputs
8986 `(("python-anyjson" ,python-anyjson)
8987 ("python-amqp" ,python-amqp)
8988 ("python-redis" ,python-redis)))
8989 (home-page "https://kombu.readthedocs.io")
8990 (synopsis "Message passing library for Python")
8991 (description "The aim of Kombu is to make messaging in Python as easy as
8992 possible by providing an idiomatic high-level interface for the AMQ protocol,
8993 and also provide proven and tested solutions to common messaging problems.
8994 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8995 message orientation, queuing, routing, reliability and security, for which the
8996 RabbitMQ messaging server is the most popular implementation.")
8997 (license license:bsd-3)
8998 (properties `((python2-variant . ,(delay python2-kombu))))))
8999
9000 (define-public python2-kombu
9001 (let ((kombu (package-with-python2
9002 (strip-python2-variant python-kombu))))
9003 (package
9004 (inherit kombu)
9005 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9006 ;; It works fine on the python3 variant.
9007 #:tests? #f
9008 ,@(package-arguments kombu)))
9009 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9010 ,@(package-native-inputs kombu))))))
9011
9012 (define-public python-billiard
9013 (package
9014 (name "python-billiard")
9015 (version "3.5.0.5")
9016 (source
9017 (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "billiard" version))
9020 (sha256
9021 (base32
9022 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9023 (build-system python-build-system)
9024 (native-inputs
9025 `(("python-case" ,python-case)
9026 ("python-pytest" ,python-pytest)))
9027 (home-page "https://github.com/celery/billiard")
9028 (synopsis
9029 "Python multiprocessing fork with improvements and bugfixes")
9030 (description
9031 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9032 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9033 pyprocessing package. This standalone variant is intended to be compatible with
9034 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9035 (license license:bsd-3)
9036 (properties `((python2-variant . ,(delay python2-billiard))))))
9037
9038 (define-public python2-billiard
9039 (let ((billiard (package-with-python2
9040 (strip-python2-variant python-billiard))))
9041 (package
9042 (inherit billiard)
9043 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9044 ("python2-mock" ,python2-mock)
9045 ,@(package-native-inputs billiard))))))
9046
9047 (define-public python-celery
9048 (package
9049 (name "python-celery")
9050 (version "4.2.1")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "celery" version))
9055 (sha256
9056 (base32
9057 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9058 (build-system python-build-system)
9059 (arguments
9060 '(;; TODO The tests fail with Python 3.7
9061 ;; https://github.com/celery/celery/issues/4849
9062 #:tests? #f
9063 #:phases
9064 (modify-phases %standard-phases
9065 (add-after 'unpack 'patch-requirements
9066 (lambda _
9067 (substitute* "requirements/test.txt"
9068 (("pytest>=3\\.0,<3\\.3")
9069 "pytest>=3.0"))
9070 #t)))))
9071 (native-inputs
9072 `(("python-case" ,python-case)
9073 ("python-pytest" ,python-pytest)))
9074 (propagated-inputs
9075 `(("python-pytz" ,python-pytz)
9076 ("python-billiard" ,python-billiard)
9077 ("python-kombu" ,python-kombu)))
9078 (home-page "https://celeryproject.org")
9079 (synopsis "Distributed Task Queue")
9080 (description "Celery is an asynchronous task queue/job queue based on
9081 distributed message passing. It is focused on real-time operation, but
9082 supports scheduling as well. The execution units, called tasks, are executed
9083 concurrently on a single or more worker servers using multiprocessing,
9084 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9085 synchronously (wait until ready).")
9086 (license license:bsd-3)
9087 (properties `((python2-variant . ,(delay python2-celery))))))
9088
9089 (define-public python2-celery
9090 (let ((celery (package-with-python2
9091 (strip-python2-variant python-celery))))
9092 (package
9093 (inherit celery)
9094 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9095 ("python2-mock" ,python2-mock)
9096 ,@(package-native-inputs celery))))))
9097
9098 (define-public python-translitcodec
9099 (package
9100 (name "python-translitcodec")
9101 (version "0.4.0")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "translitcodec" version))
9106 (sha256
9107 (base32
9108 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9109 (build-system python-build-system)
9110 (arguments
9111 `(#:tests? #f)) ; no tests provided
9112 (home-page
9113 "https://github.com/claudep/translitcodec")
9114 (synopsis
9115 "Unicode to 8-bit charset transliteration codec")
9116 (description
9117 "This package contains codecs for transliterating ISO 10646 texts into
9118 best-effort representations using smaller coded character sets (ASCII,
9119 ISO 8859, etc.).")
9120 (license license:expat)))
9121
9122 (define-public python2-translitcodec
9123 (package-with-python2 python-translitcodec))
9124
9125 (define-public python-editor
9126 (package
9127 (name "python-editor")
9128 (version "0.5")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "python-editor" version))
9133 (sha256
9134 (base32
9135 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9136 (build-system python-build-system)
9137 (home-page
9138 "https://github.com/fmoo/python-editor")
9139 (synopsis
9140 "Programmatically open an editor, capture the result")
9141 (description
9142 "python-editor is a library that provides the editor module for
9143 programmatically interfacing with your system's $EDITOR.")
9144 (license license:asl2.0)))
9145
9146 (define-public python2-editor
9147 (package-with-python2 python-editor))
9148
9149 (define-public python-vobject
9150 (package
9151 (name "python-vobject")
9152 (version "0.9.5")
9153 (source (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "vobject" version))
9156 (sha256
9157 (base32
9158 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9159 (build-system python-build-system)
9160 (arguments
9161 '(;; The test suite relies on some non-portable Windows interfaces.
9162 #:tests? #f))
9163 (propagated-inputs
9164 `(("python-dateutil" ,python-dateutil)
9165 ("python-pyicu" ,python-pyicu)))
9166 (synopsis "Parse and generate vCard and vCalendar files")
9167 (description "Vobject is intended to be a full featured Python package for
9168 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9169 are supported and well tested. vCard 3.0 files are supported, and all data
9170 should be imported, but only a few components are understood in a sophisticated
9171 way.")
9172 (home-page "http://eventable.github.io/vobject/")
9173 (license license:asl2.0)))
9174
9175 (define-public python2-vobject
9176 (package-with-python2 python-vobject))
9177
9178 (define-public python-munkres
9179 (package
9180 (name "python-munkres")
9181 (version "1.0.8")
9182 (source (origin
9183 (method url-fetch)
9184 (uri (pypi-uri "munkres" version))
9185 (sha256
9186 (base32
9187 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9188 (build-system python-build-system)
9189 (arguments
9190 '(#:tests? #f)) ; no test suite
9191 (home-page "http://software.clapper.org/munkres/")
9192 (synopsis "Implementation of the Munkres algorithm")
9193 (description "The Munkres module provides an implementation of the Munkres
9194 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9195 useful for solving the Assignment Problem.")
9196 (license license:bsd-3)))
9197
9198 (define-public python2-munkres
9199 (package-with-python2 python-munkres))
9200
9201 (define-public python-whoosh
9202 (package
9203 (name "python-whoosh")
9204 (version "2.7.4")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "Whoosh" version))
9209 (sha256
9210 (base32
9211 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9212 (build-system python-build-system)
9213 (native-inputs
9214 `(("python-pytest" ,python-pytest)))
9215 (home-page "https://bitbucket.org/mchaput/whoosh")
9216 (synopsis "Full text indexing, search, and spell checking library")
9217 (description
9218 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9219 checking library.")
9220 (license license:bsd-2)))
9221
9222 (define-public python2-whoosh
9223 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9224 (package (inherit whoosh)
9225 (propagated-inputs
9226 `(("python2-backport-ssl-match-hostname"
9227 ,python2-backport-ssl-match-hostname)
9228 ,@(package-propagated-inputs whoosh))))))
9229
9230 (define-public python-pathlib
9231 (package
9232 (name "python-pathlib")
9233 (version "1.0.1")
9234 (source (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "pathlib" version))
9237 (sha256
9238 (base32
9239 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9240 (build-system python-build-system)
9241 ;; The tests depend on the internal "test" module, which does not provide
9242 ;; a stable interface.
9243 (arguments `(#:tests? #f))
9244 (home-page "https://pathlib.readthedocs.org/")
9245 (synopsis "Object-oriented file system paths")
9246 (description "Pathlib offers a set of classes to handle file system paths.
9247 It offers the following advantages over using string objects:
9248
9249 @enumerate
9250 @item No more cumbersome use of os and os.path functions. Everything can
9251 be done easily through operators, attribute accesses, and method calls.
9252 @item Embodies the semantics of different path types. For example,
9253 comparing Windows paths ignores casing.
9254 @item Well-defined semantics, eliminating any inconsistencies or
9255 ambiguities (forward vs. backward slashes, etc.).
9256 @end enumerate
9257
9258 Note: In Python 3.4, pathlib is now part of the standard library. For other
9259 Python versions please consider python-pathlib2 instead, which tracks the
9260 standard library module. This module (python-pathlib) isn't maintained
9261 anymore.")
9262 (license license:expat)))
9263
9264 (define-public python2-pathlib
9265 (package-with-python2 python-pathlib))
9266
9267 (define-public python2-pathlib2
9268 (package
9269 (name "python2-pathlib2")
9270 (version "2.3.3")
9271 (source (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "pathlib2" version))
9274 (sha256
9275 (base32
9276 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9277 (build-system python-build-system)
9278 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9279 ;; version is 3.4 which already includes this package as part of the
9280 ;; standard library.
9281 (arguments
9282 `(#:python ,python-2))
9283 (propagated-inputs
9284 `(("python2-scandir" ,python2-scandir)
9285 ("python2-six" ,python2-six)))
9286 (home-page "https://pypi.python.org/pypi/pathlib2/")
9287 (synopsis "Object-oriented file system paths - backport of standard
9288 pathlib module")
9289 (description "The goal of pathlib2 is to provide a backport of standard
9290 pathlib module which tracks the standard library module, so all the newest
9291 features of the standard pathlib can be used also on older Python versions.
9292
9293 Pathlib offers a set of classes to handle file system paths. It offers the
9294 following advantages over using string objects:
9295
9296 @enumerate
9297 @item No more cumbersome use of os and os.path functions. Everything can
9298 be done easily through operators, attribute accesses, and method calls.
9299 @item Embodies the semantics of different path types. For example,
9300 comparing Windows paths ignores casing.
9301 @item Well-defined semantics, eliminating any inconsistencies or
9302 ambiguities (forward vs. backward slashes, etc.).
9303 @end enumerate")
9304 (license license:expat)))
9305
9306 (define-public python2-pathlib2-bootstrap
9307 (hidden-package
9308 (package
9309 (inherit python2-pathlib2)
9310 (name "python2-pathlib2-bootstrap")
9311 (propagated-inputs
9312 `(("python2-scandir" ,python2-scandir)
9313 ("python2-six" ,python2-six-bootstrap))))))
9314
9315 (define-public python-jellyfish
9316 (package
9317 (name "python-jellyfish")
9318 (version "0.5.6")
9319 (source (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "jellyfish" version))
9322 (sha256
9323 (base32
9324 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9325 (build-system python-build-system)
9326 (native-inputs
9327 `(("python-pytest" ,python-pytest)))
9328 (home-page "https://github.com/jamesturk/jellyfish")
9329 (synopsis "Approximate and phonetic matching of strings")
9330 (description "Jellyfish uses a variety of string comparison and phonetic
9331 encoding algorithms to do fuzzy string matching.")
9332 (license license:bsd-2)
9333 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9334
9335 (define-public python2-jellyfish
9336 (let ((jellyfish (package-with-python2
9337 (strip-python2-variant python-jellyfish))))
9338 (package (inherit jellyfish)
9339 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9340 ,@(package-native-inputs jellyfish))))))
9341
9342 (define-public python2-unicodecsv
9343 (package
9344 (name "python2-unicodecsv")
9345 (version "0.14.1")
9346 (source (origin
9347 (method url-fetch)
9348 ;; The test suite is not included in the PyPi release.
9349 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9350 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9351 "archive/" version ".tar.gz"))
9352 (file-name (string-append name "-" version ".tar.gz"))
9353 (sha256
9354 (base32
9355 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9356 (build-system python-build-system)
9357 (arguments
9358 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9359 #:python ,python-2))
9360 (native-inputs
9361 `(("python2-unittest2" ,python2-unittest2)))
9362 (home-page "https://github.com/jdunck/python-unicodecsv")
9363 (synopsis "Unicode CSV module for Python 2")
9364 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9365 module, adding support for Unicode strings.")
9366 (license license:bsd-2)))
9367
9368 (define-public python-rarfile
9369 (package
9370 (name "python-rarfile")
9371 (version "2.8")
9372 (source (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "rarfile" version))
9375 (sha256
9376 (base32
9377 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9378 (build-system python-build-system)
9379 (arguments
9380 '(#:phases
9381 (modify-phases %standard-phases
9382 (replace 'check
9383 ;; Many tests fail, but the installation proceeds.
9384 (lambda _ (invoke "make" "-C" "test" "test"))))))
9385 (native-inputs
9386 `(("which" ,which))) ; required for tests
9387 (propagated-inputs
9388 `(("libarchive" ,libarchive)))
9389 (home-page "https://github.com/markokr/rarfile")
9390 (synopsis "RAR archive reader for Python")
9391 (description "This is Python module for RAR archive reading. The interface
9392 is made as zipfile like as possible.")
9393 (license license:isc)))
9394
9395 (define-public python2-rarfile
9396 (package-with-python2 python-rarfile))
9397
9398 (define-public python-magic
9399 (package
9400 (name "python-magic")
9401 (version "0.4.15")
9402 (source
9403 (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "python-magic" version))
9406 (sha256
9407 (base32
9408 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9409 (file-name (string-append name "-" version "-checkout"))))
9410 (build-system python-build-system)
9411 (arguments
9412 ;; The tests are unreliable, so don't run them. The tests fail
9413 ;; under Python3 because they were written for Python2 and
9414 ;; contain import statements that do not work in Python3. One of
9415 ;; the tests fails under Python2 because its assertions are
9416 ;; overly stringent; it relies on comparing output strings which
9417 ;; are brittle and can change depending on the version of
9418 ;; libmagic being used and the system on which the test is
9419 ;; running. In my case, under GuixSD 0.10.0, only one test
9420 ;; failed, and it seems to have failed only because the version
9421 ;; of libmagic that is packaged in Guix outputs a slightly
9422 ;; different (but not wrong) string than the one that the test
9423 ;; expected.
9424 '(#:tests? #f
9425 #:phases (modify-phases %standard-phases
9426 ;; Replace a specific method call with a hard-coded
9427 ;; path to the necessary libmagic.so file in the
9428 ;; store. If we don't do this, then the method call
9429 ;; will fail to find the libmagic.so file, which in
9430 ;; turn will cause any application using
9431 ;; python-magic to fail.
9432 (add-before 'build 'hard-code-path-to-libmagic
9433 (lambda* (#:key inputs #:allow-other-keys)
9434 (let ((file (assoc-ref inputs "file")))
9435 (substitute* "magic.py"
9436 (("ctypes.util.find_library\\('magic'\\)")
9437 (string-append "'" file "/lib/libmagic.so'")))
9438 #t)))
9439 (add-before 'install 'disable-egg-compression
9440 (lambda _
9441 (let ((port (open-file "setup.cfg" "a")))
9442 (display "\n[easy_install]\nzip_ok = 0\n"
9443 port)
9444 (close-port port)
9445 #t))))))
9446 (inputs
9447 ;; python-magic needs to be able to find libmagic.so.
9448 `(("file" ,file)))
9449 (home-page
9450 "https://github.com/ahupp/python-magic")
9451 (synopsis
9452 "File type identification using libmagic")
9453 (description
9454 "This module uses ctypes to access the libmagic file type
9455 identification library. It makes use of the local magic database and
9456 supports both textual and MIME-type output. Note that this module and
9457 the python-file module both provide a \"magic.py\" file; these two
9458 modules, which are different and were developed separately, both serve
9459 the same purpose: to provide Python bindings for libmagic.")
9460 (license license:expat)))
9461
9462 (define-public python2-magic
9463 (package-with-python2 python-magic))
9464
9465 (define-public python2-s3cmd
9466 (package
9467 (name "python2-s3cmd")
9468 (version "1.6.1")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9473 "s3cmd-" version ".tar.gz"))
9474 (sha256
9475 (base32
9476 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9477 (build-system python-build-system)
9478 (arguments
9479 ;; s3cmd is written for python2 only and contains no tests.
9480 `(#:python ,python-2
9481 #:tests? #f))
9482 (propagated-inputs
9483 `(("python2-dateutil" ,python2-dateutil)
9484 ;; The python-file package also provides a magic.py module.
9485 ;; This is an unfortunate state of affairs; however, s3cmd
9486 ;; fails to install if it cannot find specifically the
9487 ;; python-magic package. Thus we include it, instead of using
9488 ;; python-file. Ironically, s3cmd sometimes works better
9489 ;; without libmagic bindings at all:
9490 ;; https://github.com/s3tools/s3cmd/issues/198
9491 ("python2-magic" ,python2-magic)))
9492 (home-page "http://s3tools.org/s3cmd")
9493 (synopsis "Command line tool for S3-compatible storage services")
9494 (description
9495 "S3cmd is a command line tool for uploading, retrieving and managing data
9496 in storage services that are compatible with the Amazon Simple Storage
9497 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9498 GnuPG encryption, and more. It also supports management of Amazon's
9499 CloudFront content delivery network.")
9500 (license license:gpl2+)))
9501
9502 (define-public python-pkgconfig
9503 (package
9504 (name "python-pkgconfig")
9505 (version "1.3.1")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "pkgconfig" version))
9510 (sha256
9511 (base32
9512 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9513 (build-system python-build-system)
9514 (native-inputs
9515 `(("python-nose" ,python-nose)))
9516 (inputs
9517 `(("pkg-config" ,pkg-config)))
9518 (arguments
9519 `(#:phases
9520 (modify-phases %standard-phases
9521 (add-before 'build 'patch
9522 ;; Hard-code the path to pkg-config.
9523 (lambda _
9524 (substitute* "pkgconfig/pkgconfig.py"
9525 (("cmd = 'pkg-config")
9526 (string-append "cmd = '" (which "pkg-config"))))
9527 #t))
9528 (replace 'check
9529 (lambda _
9530 (invoke "nosetests" "test.py"))))))
9531 (home-page "https://github.com/matze/pkgconfig")
9532 (synopsis "Python interface for pkg-config")
9533 (description "This module provides a Python interface to pkg-config. It
9534 can be used to find all pkg-config packages, check if a package exists,
9535 check if a package meets certain version requirements, query CFLAGS and
9536 LDFLAGS and parse the output to build extensions with setup.py.")
9537 (license license:expat)))
9538
9539 (define-public python2-pkgconfig
9540 (package-with-python2 python-pkgconfig))
9541
9542 (define-public python-bz2file
9543 (package
9544 (name "python-bz2file")
9545 (version "0.98")
9546 (source
9547 (origin
9548 (method url-fetch)
9549 (uri (pypi-uri "bz2file" version))
9550 (sha256
9551 (base32
9552 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9553 (build-system python-build-system)
9554 (arguments
9555 `(#:tests? #f)) ; Tests use deprecated python modules.
9556 (home-page "https://github.com/nvawda/bz2file")
9557 (synopsis "Read and write bzip2-compressed files")
9558 (description
9559 "Bz2file is a Python library for reading and writing bzip2-compressed
9560 files. It contains a drop-in replacement for the I/O interface in the
9561 standard library's @code{bz2} module, including features from the latest
9562 development version of CPython that are not available in older releases.")
9563 (license license:asl2.0)))
9564
9565 (define-public python2-bz2file
9566 (package-with-python2 python-bz2file))
9567
9568 (define-public python-future
9569 (package
9570 (name "python-future")
9571 (version "0.17.1")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "future" version))
9576 (sha256
9577 (base32
9578 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9579 (build-system python-build-system)
9580 ;; Many tests connect to the network or are otherwise flawed.
9581 ;; https://github.com/PythonCharmers/python-future/issues/210
9582 (arguments
9583 `(#:tests? #f))
9584 (home-page "http://python-future.org")
9585 (synopsis "Single-source support for Python 3 and 2")
9586 (description
9587 "@code{python-future} is the missing compatibility layer between Python 2 and
9588 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9589 to support both Python 2 and Python 3 with minimal overhead.")
9590 (license license:expat)))
9591
9592 (define-public python2-future
9593 (package-with-python2 python-future))
9594
9595 (define-public python-cysignals
9596 (package
9597 (name "python-cysignals")
9598 (version "1.9.0")
9599 (source
9600 (origin
9601 (method url-fetch)
9602 (uri (pypi-uri "cysignals" version))
9603 (sha256
9604 (base32
9605 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9606 (build-system python-build-system)
9607 (native-inputs
9608 `(("python-cython" ,python-cython)
9609 ("python-sphinx" ,python-sphinx)))
9610 (inputs
9611 `(("pari-gp" ,pari-gp)))
9612 (arguments
9613 `(#:modules ((guix build python-build-system)
9614 ((guix build gnu-build-system) #:prefix gnu:)
9615 (guix build utils))
9616 ;; FIXME: Tests are executed after installation and currently fail
9617 ;; when not installing into standard locations; the author is working
9618 ;; on a fix.
9619 #:tests? #f
9620 #:phases
9621 (modify-phases %standard-phases
9622 (add-before
9623 'build 'configure
9624 (assoc-ref gnu:%standard-phases 'configure)))))
9625 (home-page
9626 "https://github.com/sagemath/cysignals")
9627 (synopsis
9628 "Handling of interrupts and signals for Cython")
9629 (description
9630 "The cysignals package provides mechanisms to handle interrupts (and
9631 other signals and errors) in Cython code, using two related approaches,
9632 for mixed Cython/Python code or external C libraries and pure Cython code,
9633 respectively.")
9634 (license license:lgpl3+)))
9635
9636 (define-public python2-cysignals
9637 (package-with-python2 python-cysignals))
9638
9639 (define-public python2-shedskin
9640 (package
9641 (name "python2-shedskin")
9642 (version "0.9.4")
9643 (source
9644 (origin
9645 (method url-fetch)
9646 (uri (string-append "https://github.com/shedskin/shedskin/"
9647 "releases/download/v" version
9648 "/shedskin-" version ".tgz"))
9649 (sha256
9650 (base32
9651 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9652 (build-system python-build-system)
9653 (arguments
9654 `(#:python ,python-2
9655 #:phases (modify-phases %standard-phases
9656 (add-after 'unpack 'fix-resulting-include-libs
9657 (lambda* (#:key inputs #:allow-other-keys)
9658 (let ((libgc (assoc-ref inputs "libgc"))
9659 (pcre (assoc-ref inputs "pcre")))
9660 (substitute* "shedskin/makefile.py"
9661 (("variable == 'CCFLAGS':[ ]*")
9662 (string-append "variable == 'CCFLAGS':\n"
9663 " line += ' -I " pcre "/include"
9664 " -I " libgc "/include'"))
9665 (("variable == 'LFLAGS':[ ]*")
9666 (string-append "variable == 'LFLAGS':\n"
9667 " line += ' -L" pcre "/lib"
9668 " -L " libgc "/lib'")))
9669 #t))))))
9670 (inputs `(("pcre" ,pcre)
9671 ("libgc" ,libgc)))
9672 (home-page "https://shedskin.github.io/")
9673 (synopsis "Experimental Python-2 to C++ Compiler")
9674 (description (string-append "This is an experimental compiler for a subset of
9675 Python. It generates C++ code and a Makefile."))
9676 (license (list license:gpl3 license:bsd-3 license:expat))))
9677
9678 (define-public python2-rope
9679 (package
9680 (name "python2-rope")
9681 (version "0.11.0")
9682 (source
9683 (origin
9684 (method url-fetch)
9685 (uri (pypi-uri "rope" version))
9686 (sha256
9687 (base32
9688 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9689 (arguments
9690 ;; Rope has only partial python3 support, see `python-rope'
9691 `(#:python ,python-2))
9692 (build-system python-build-system)
9693 (native-inputs
9694 `(("python2-unittest2" ,python2-unittest2)))
9695 (home-page "https://github.com/python-rope/rope")
9696 (synopsis "Refactoring library for Python")
9697 (description "Rope is a refactoring library for Python. It facilitates
9698 the renaming, moving and extracting of attributes, functions, modules, fields
9699 and parameters in Python 2 source code. These refactorings can also be applied
9700 to occurrences in strings and comments.")
9701 (license license:gpl2)))
9702
9703 (define-public python-rope
9704 (package
9705 (inherit python2-rope)
9706 (name "python-rope")
9707 (arguments `(#:python ,python-wrapper
9708 ;; XXX: Only partial python3 support, results in some failing
9709 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9710 #:tests? #f))
9711 (properties `((python2-variant . ,(delay python2-rope))))))
9712
9713 (define-public python-py3status
9714 (package
9715 (name "python-py3status")
9716 (version "3.16")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "py3status" version))
9721 (sha256
9722 (base32
9723 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9724 (build-system python-build-system)
9725 (inputs
9726 `(("file" ,file)))
9727 (arguments
9728 '(#:phases
9729 (modify-phases %standard-phases
9730 ;; 'file' is used for detection of configuration file encoding
9731 ;; let's make link the dependency to particular input
9732 (add-before 'build 'patch-file-path
9733 (lambda* (#:key inputs #:allow-other-keys)
9734 (let ((file-path (assoc-ref inputs "file")))
9735 (substitute* "py3status/parse_config.py"
9736 (("\\['file', '-b'")
9737 (string-append "['" file-path "/bin/file', '-b'")))
9738 #t))))
9739 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9740 (home-page "https://github.com/ultrabug/py3status")
9741 (synopsis "Extensible i3status wrapper written in Python")
9742 (description "py3status is an i3status wrapper which extends i3status
9743 functionality in a modular way, allowing you to extend your panel with your
9744 own code, responding to click events and updating clock every second.")
9745 (license license:bsd-3)))
9746
9747 (define-public python-tblib
9748 (package
9749 (name "python-tblib")
9750 (version "1.3.2")
9751 (source (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "tblib" version))
9754 (sha256 (base32
9755 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9756 (build-system python-build-system)
9757 (arguments
9758 `(#:phases
9759 (modify-phases %standard-phases
9760 (add-before 'check 'adjust-tests
9761 (lambda _
9762 (when (which "python3")
9763 ;; Adjust the example output to match that of Python 3.7:
9764 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9765 (substitute* "README.rst"
9766 (("Exception\\('fail',") "Exception('fail'"))
9767 #t)))
9768 (replace 'check
9769 (lambda _
9770 ;; Upstream runs tests after installation and the package itself
9771 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9772 ;; found.
9773 (setenv "PYTHONPATH"
9774 (string-append (getcwd) "/build/lib:"
9775 (getenv "PYTHONPATH")))
9776 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9777 (native-inputs
9778 `(("python-pytest" ,python-pytest)
9779 ("python-six" ,python-six)))
9780 (home-page "https://github.com/ionelmc/python-tblib")
9781 (synopsis "Traceback serialization library")
9782 (description
9783 "Traceback serialization allows you to:
9784
9785 @enumerate
9786 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9787 different processes. This allows better error handling when running code over
9788 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9789
9790 @item Parse traceback strings and raise with the parsed tracebacks.
9791 @end enumerate\n")
9792 (license license:bsd-3)))
9793
9794 (define-public python2-tblib
9795 (package-with-python2 python-tblib))
9796
9797 (define-public python-greenlet
9798 (package
9799 (name "python-greenlet")
9800 (version "0.4.15")
9801 (source (origin
9802 (method url-fetch)
9803 (uri (pypi-uri "greenlet" version))
9804 (sha256
9805 (base32
9806 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9807 (build-system python-build-system)
9808 (home-page "https://greenlet.readthedocs.io/")
9809 (synopsis "Lightweight in-process concurrent programming")
9810 (description
9811 "Greenlet package is a spin-off of Stackless, a version of CPython
9812 that supports micro-threads called \"tasklets\". Tasklets run
9813 pseudo-concurrently (typically in a single or a few OS-level threads) and
9814 are synchronized with data exchanges on \"channels\".")
9815 (license (list license:psfl license:expat))))
9816
9817 (define-public python2-greenlet
9818 (package-with-python2 python-greenlet))
9819
9820 (define-public python-objgraph
9821 (package
9822 (name "python-objgraph")
9823 (version "3.4.0")
9824 (source
9825 (origin
9826 (method url-fetch)
9827 (uri (pypi-uri "objgraph" version))
9828 (sha256
9829 (base32
9830 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9831 (build-system python-build-system)
9832 (propagated-inputs
9833 `(("python-graphviz" ,python-graphviz)))
9834 (native-inputs
9835 `(("python-mock" ,python-mock)
9836 ("graphviz" ,graphviz)))
9837 (home-page "https://mg.pov.lt/objgraph/")
9838 (synopsis "Draw Python object reference graphs with graphviz")
9839 (description
9840 "This package provides tools to draw Python object reference graphs with
9841 graphviz.")
9842 (license license:expat)))
9843
9844 (define-public python-gevent
9845 (package
9846 (name "python-gevent")
9847 (version "1.3.7")
9848 (source (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "gevent" version))
9851 (sha256
9852 (base32
9853 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9854 (modules '((guix build utils)))
9855 (snippet
9856 '(begin
9857 ;; unbunding libev and c-ares
9858 (delete-file-recursively "deps")
9859 #t))))
9860 (build-system python-build-system)
9861 (arguments
9862 `(#:modules ((ice-9 ftw)
9863 (ice-9 match)
9864 (srfi srfi-26)
9865 (guix build utils)
9866 (guix build python-build-system))
9867 #:phases (modify-phases %standard-phases
9868 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9869 (lambda _
9870 (substitute* "src/gevent/subprocess.py"
9871 (("/bin/sh") (which "sh")))
9872 (for-each (lambda (file)
9873 (substitute* file
9874 (("/bin/sh") (which "sh"))
9875 (("/bin/true") (which "true"))))
9876 (find-files "src/greentest" "\\.py$"))
9877 #t))
9878 (add-before 'build 'do-not-use-bundled-sources
9879 (lambda* (#:key inputs #:allow-other-keys)
9880 (setenv "CONFIG_SHELL" (which "bash"))
9881 (setenv "LIBEV_EMBED" "false")
9882 (setenv "CARES_EMBED" "false")
9883 (setenv "EMBED" "false")
9884
9885 ;; Prevent building bundled libev.
9886 (substitute* "setup.py"
9887 (("run_make=_BUILDING")
9888 "run_make=False"))
9889
9890 (let ((greenlet (string-append
9891 (assoc-ref inputs "python-greenlet")
9892 "/include")))
9893 (match (scandir greenlet
9894 (lambda (item)
9895 (string-prefix? "python" item)))
9896 ((python)
9897 (setenv "C_INCLUDE_PATH"
9898 (string-append greenlet "/" python)))))
9899 #t))
9900 (add-before 'check 'skip-timer-test
9901 (lambda _
9902 ;; XXX: Skip 'TestTimerResolution', which appears to be
9903 ;; unreliable.
9904 (substitute* "src/greentest/test__core_timer.py"
9905 (("not greentest.RUNNING_ON_CI") "False"))
9906 #t))
9907 (replace 'check
9908 (lambda _
9909 ;; Make sure the build directory is on PYTHONPATH.
9910 (setenv "PYTHONPATH"
9911 (string-append
9912 (getenv "PYTHONPATH") ":"
9913 (getcwd) "/build/"
9914 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9915 (with-directory-excursion "src/greentest"
9916 ;; XXX: Many tests require network access. Instead we only
9917 ;; run known-good tests. Unfortunately we cannot use
9918 ;; recursion here since this directory also contains
9919 ;; Python-version-specific subfolders.
9920 (apply invoke "python" "testrunner.py" "--config"
9921 "known_failures.py"
9922 (scandir "." (cut regexp-exec
9923 (make-regexp "test_+(subprocess|core)")
9924 <>)))))))))
9925 (propagated-inputs
9926 `(("python-greenlet" ,python-greenlet)
9927 ("python-objgraph" ,python-objgraph)))
9928 (native-inputs
9929 `(("python-six" ,python-six)))
9930 (inputs
9931 `(("c-ares" ,c-ares)
9932 ("libev" ,libev)))
9933 (home-page "http://www.gevent.org/")
9934 (synopsis "Coroutine-based network library")
9935 (description
9936 "gevent is a coroutine-based Python networking library that uses greenlet
9937 to provide a high-level synchronous API on top of the libev event loop.")
9938 (license license:expat)
9939 (properties `((python2-variant . ,(delay python2-gevent))))))
9940
9941 (define-public python2-gevent
9942 (let ((base (package-with-python2
9943 (strip-python2-variant python-gevent))))
9944 (package
9945 (inherit base)
9946 (native-inputs `(,@(package-native-inputs python-gevent)
9947 ("python-mock" ,python2-mock))))))
9948
9949 (define-public python-fastimport
9950 (package
9951 (name "python-fastimport")
9952 (version "0.9.6")
9953 (source
9954 (origin
9955 (method url-fetch)
9956 (uri (pypi-uri "fastimport" version))
9957 (sha256
9958 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9959 (build-system python-build-system)
9960 (home-page "https://github.com/jelmer/python-fastimport")
9961 (synopsis "VCS fastimport parser and generator in Python")
9962 (description "This package provides a parser for and generator of the Git
9963 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9964 format.")
9965 (license license:gpl2+)))
9966
9967 (define-public python2-fastimport
9968 (package-with-python2 python-fastimport))
9969
9970 (define-public python-twisted
9971 (package
9972 (name "python-twisted")
9973 (version "19.2.1")
9974 (source (origin
9975 (method url-fetch)
9976 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9977 (sha256
9978 (base32
9979 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9980 (build-system python-build-system)
9981 (arguments
9982 '(#:tests? #f)) ; FIXME: some tests fail
9983 (propagated-inputs
9984 `(("python-zope-interface" ,python-zope-interface)
9985 ("python-pyhamcrest" ,python-pyhamcrest)
9986 ("python-incremental" ,python-incremental)
9987 ("python-hyperlink" ,python-hyperlink)
9988 ("python-constantly" ,python-constantly)
9989 ("python-automat" ,python-automat)))
9990 (home-page "https://twistedmatrix.com/")
9991 (synopsis "Asynchronous networking framework written in Python")
9992 (description
9993 "Twisted is an extensible framework for Python programming, with special
9994 focus on event-based network programming and multiprotocol integration.")
9995 (license license:expat)))
9996
9997 (define-public python2-twisted
9998 (package-with-python2 python-twisted))
9999
10000 (define-public python-pika
10001 (package
10002 (name "python-pika")
10003 (version "0.12.0")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (pypi-uri "pika" version))
10008 (sha256
10009 (base32
10010 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10011 (build-system python-build-system)
10012 (native-inputs
10013 `(("python-pyev" ,python-pyev)
10014 ("python-tornado" ,python-tornado)
10015 ("python-twisted" ,python-twisted)))
10016 (home-page "https://pika.readthedocs.org")
10017 (synopsis "Pure Python AMQP Client Library")
10018 (description
10019 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10020 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10021 network support library.")
10022 (license license:bsd-3)))
10023
10024 (define-public python2-pika
10025 (package-with-python2 python-pika))
10026
10027 (define-public python-ply
10028 (package
10029 (name "python-ply")
10030 (version "3.10")
10031 (source
10032 (origin
10033 (method url-fetch)
10034 (uri (pypi-uri "ply" version))
10035 (sha256
10036 (base32
10037 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10038 (build-system python-build-system)
10039 (home-page "http://www.dabeaz.com/ply/")
10040 (synopsis "Python Lex & Yacc")
10041 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10042 It uses LR parsing and does extensive error checking.")
10043 (license license:bsd-3)))
10044
10045 (define-public python2-ply
10046 (package-with-python2 python-ply))
10047
10048 (define-public python-tabulate
10049 (package
10050 (name "python-tabulate")
10051 (version "0.7.7")
10052 (source (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "tabulate" version))
10055 (sha256
10056 (base32
10057 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10058 (build-system python-build-system)
10059 (arguments
10060 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10061 ;; and the latest release is not tagged in the upstream repository.
10062 '(#:tests? #f))
10063 (home-page "https://bitbucket.org/astanin/python-tabulate")
10064 (synopsis "Pretty-print tabular data")
10065 (description
10066 "Tabulate is a library and command-line utility to pretty-print tabular
10067 data in Python.")
10068 (license license:expat)))
10069
10070 (define-public python2-tabulate
10071 (package-with-python2 python-tabulate))
10072
10073 (define-public python-kazoo
10074 (package
10075 (name "python-kazoo")
10076 (version "2.4.0")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "kazoo" version))
10081 (sha256
10082 (base32
10083 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10084 (build-system python-build-system)
10085 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10086 (propagated-inputs
10087 `(("python-six" ,python-six)))
10088 (home-page "https://kazoo.readthedocs.org")
10089 (synopsis "High-level Zookeeper client library")
10090 (description
10091 "Kazoo is a Python client library for the Apache Zookeeper distributed
10092 application service. It is designed to be easy to use and to avoid common
10093 programming errors.")
10094 (license license:asl2.0)))
10095
10096 (define-public python2-kazoo
10097 (package-with-python2 python-kazoo))
10098
10099 (define-public python-pykafka
10100 (package
10101 (name "python-pykafka")
10102 (version "2.4.0")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "pykafka" version))
10106 (sha256
10107 (base32
10108 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10109 (build-system python-build-system)
10110 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10111 (propagated-inputs
10112 `(("python-gevent" ,python-gevent)
10113 ("python-kazoo" ,python-kazoo)
10114 ("python-tabulate" ,python-tabulate)))
10115 (inputs
10116 `(("librdkafka" ,librdkafka)))
10117 (home-page "https://pykafka.readthedocs.io/")
10118 (synopsis "Apache Kafka client for Python")
10119 (description
10120 "PyKafka is a client for the Apache Kafka distributed messaging system.
10121 It includes Python implementations of Kafka producers and consumers, which
10122 are optionally backed by a C extension built on librdkafka.")
10123 (license license:asl2.0)))
10124
10125 (define-public python2-pykafka
10126 (package-with-python2 python-pykafka))
10127
10128 (define-public python-wcwidth
10129 (package
10130 (name "python-wcwidth")
10131 (version "0.1.7")
10132 (source
10133 (origin
10134 (method url-fetch)
10135 (uri (pypi-uri "wcwidth" version))
10136 (sha256
10137 (base32
10138 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10139 (build-system python-build-system)
10140 (home-page "https://github.com/jquast/wcwidth")
10141 (synopsis "Measure number of terminal column cells of wide-character codes")
10142 (description "Wcwidth measures the number of terminal column cells of
10143 wide-character codes. It is useful for those implementing a terminal emulator,
10144 or programs that carefully produce output to be interpreted by one. It is a
10145 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10146 specified in POSIX.1-2001 and POSIX.1-2008.")
10147 (license license:expat)))
10148
10149 (define-public python2-wcwidth
10150 (package-with-python2 python-wcwidth))
10151
10152 (define-public python2-jsonrpclib
10153 (package
10154 (name "python2-jsonrpclib")
10155 (version "0.1.7")
10156 (source (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "jsonrpclib" version))
10159 (sha256
10160 (base32
10161 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10162 (build-system python-build-system)
10163 (arguments
10164 `(#:tests? #f
10165 #:python ,python-2))
10166 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10167 (synopsis "Implementation of JSON-RPC specification for Python")
10168 (description
10169 "This library is an implementation of the JSON-RPC specification.
10170 It supports both the original 1.0 specification, as well as the
10171 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10172 etc.")
10173 (license license:asl2.0)))
10174
10175 (define-public python-chai
10176 (package
10177 (name "python-chai")
10178 (version "1.1.2")
10179 (source (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "chai" version))
10182 (sha256
10183 (base32
10184 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10185 (build-system python-build-system)
10186 (home-page "https://github.com/agoragames/chai")
10187 (synopsis "Mocking framework for Python")
10188 (description
10189 "Chai provides an api for mocking, stubbing and spying your python
10190 objects, patterned after the Mocha library for Ruby.")
10191 (license license:bsd-3)))
10192
10193 (define-public python2-chai
10194 (package-with-python2 python-chai))
10195
10196 (define-public python-inflection
10197 (package
10198 (name "python-inflection")
10199 (version "0.3.1")
10200 (source
10201 (origin (method url-fetch)
10202 (uri (pypi-uri "inflection" version))
10203 (sha256
10204 (base32
10205 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10206 (build-system python-build-system)
10207 (native-inputs
10208 `(("python-pytest" ,python-pytest)))
10209 (home-page "https://github.com/jpvanhal/inflection")
10210 (synopsis "Python string transformation library")
10211 (description
10212 "Inflection is a string transformation library. It singularizes
10213 and pluralizes English words, and transforms strings from CamelCase to
10214 underscored string.")
10215 (license license:expat)))
10216
10217 (define-public python2-inflection
10218 (package-with-python2 python-inflection))
10219
10220 (define-public python-pylev
10221 (package
10222 (name "python-pylev")
10223 (version "1.3.0")
10224 (source (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "pylev" version))
10227 (sha256
10228 (base32
10229 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10230 (build-system python-build-system)
10231 (home-page "https://github.com/toastdriven/pylev")
10232 (synopsis "Levenshtein distance implementation in Python")
10233 (description "Pure Python Levenshtein implementation, based off the
10234 Wikipedia code samples at
10235 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10236 (license license:bsd-3)))
10237
10238 (define-public python2-pylev
10239 (package-with-python2 python-pylev))
10240
10241 (define-public python-cleo
10242 (package
10243 (name "python-cleo")
10244 (version "0.6.1")
10245 (source (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "cleo" version))
10248 (sha256
10249 (base32
10250 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10251 (build-system python-build-system)
10252 (native-inputs
10253 `(;; For testing
10254 ("python-mock" ,python-mock)
10255 ("python-pytest-mock" ,python-pytest-mock)
10256 ("python-pytest" ,python-pytest)))
10257 (propagated-inputs
10258 `(("python-backpack" ,python-backpack)
10259 ("python-pastel" ,python-pastel)
10260 ("python-pylev" ,python-pylev)))
10261 (home-page "https://github.com/sdispater/cleo")
10262 (synopsis "Command-line arguments library for Python")
10263 (description
10264 "Cleo allows you to create command-line commands with signature in
10265 docstring and colored output.")
10266 (license license:expat)))
10267
10268 (define-public python2-cleo
10269 (package-with-python2 python-cleo))
10270
10271 (define-public python-lazy-object-proxy
10272 (package
10273 (name "python-lazy-object-proxy")
10274 (version "1.3.1")
10275 (source (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "lazy-object-proxy" version))
10278 (sha256
10279 (base32
10280 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10281 (build-system python-build-system)
10282 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10283 (synopsis "Lazy object proxy for python")
10284 (description
10285 "Lazy object proxy is an object that wraps a callable but defers the call
10286 until the object is actually required, and caches the result of said call.")
10287 (license license:bsd-2)))
10288
10289 (define-public python2-lazy-object-proxy
10290 (package-with-python2 python-lazy-object-proxy))
10291
10292 (define-public python-dnspython
10293 (package
10294 (name "python-dnspython")
10295 (version "1.15.0")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (string-append "http://www.dnspython.org/kits/"
10299 version "/dnspython-" version ".tar.gz"))
10300 (sha256
10301 (base32
10302 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10303 (build-system python-build-system)
10304 (arguments '(#:tests? #f)) ; XXX: requires internet access
10305 (home-page "http://www.dnspython.org")
10306 (synopsis "DNS toolkit for Python")
10307 (description
10308 "dnspython is a DNS toolkit for Python. It supports almost all record
10309 types. It can be used for queries, zone transfers, and dynamic updates.
10310 It supports TSIG authenticated messages and EDNS0.")
10311 (license license:expat)))
10312
10313 (define-public python2-dnspython
10314 (package-with-python2 python-dnspython))
10315
10316 (define-public python-email-validator
10317 (package
10318 (name "python-email-validator")
10319 (version "1.0.2")
10320 (source
10321 (origin (method url-fetch)
10322 (uri (pypi-uri "email_validator" version))
10323 (sha256
10324 (base32
10325 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10326 (build-system python-build-system)
10327 (arguments
10328 '(#:phases
10329 (modify-phases %standard-phases
10330 (add-before 'build 'use-dnspython
10331 (lambda _
10332 (substitute* "setup.py"
10333 (("dnspython3") "dnspython"))
10334 #t)))))
10335 (propagated-inputs
10336 `(("python-dnspython" ,python-dnspython)
10337 ("python-idna" ,python-idna)))
10338 (home-page "https://github.com/JoshData/python-email-validator")
10339 (synopsis "Email address validation library for Python")
10340 (description
10341 "This library validates email address syntax and deliverability.")
10342 (license license:cc0)))
10343
10344 (define-public python2-email-validator
10345 (package-with-python2 python-email-validator))
10346
10347 (define-public python-ukpostcodeparser
10348 (package
10349 (name "python-ukpostcodeparser")
10350 (version "1.0.3")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "UkPostcodeParser" version))
10354 (sha256
10355 (base32
10356 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10357 (build-system python-build-system)
10358 (home-page "https://github.com/hamstah/ukpostcodeparser")
10359 (synopsis "UK Postcode parser for Python")
10360 (description
10361 "This library provides the @code{parse_uk_postcode} function for
10362 parsing UK postcodes.")
10363 (license license:expat)))
10364
10365 (define-public python2-ukpostcodeparser
10366 (package-with-python2 python-ukpostcodeparser))
10367
10368 (define-public python-faker
10369 (package
10370 (name "python-faker")
10371 (version "0.7.9")
10372 (source (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "Faker" version))
10375 (sha256
10376 (base32
10377 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10378 (patches
10379 (search-patches "python-faker-fix-build-32bit.patch"))
10380 (modules '((guix build utils)))
10381 (snippet
10382 '(begin
10383 (for-each delete-file (find-files "." "\\.pyc$"))
10384 #t))))
10385 (build-system python-build-system)
10386 (arguments
10387 '(#:phases
10388 (modify-phases %standard-phases
10389 (replace 'check
10390 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10391 (native-inputs
10392 `(;; For testing
10393 ("python-email-validator" ,python-email-validator)
10394 ("python-mock" ,python-mock)
10395 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10396 (propagated-inputs
10397 `(("python-dateutil" ,python-dateutil)
10398 ("python-six" ,python-six)))
10399 (home-page "https://github.com/joke2k/faker")
10400 (synopsis "Python package that generates fake data")
10401 (description
10402 "Faker is a Python package that generates fake data such as names,
10403 addresses, and phone numbers.")
10404 (license license:expat)
10405 (properties `((python2-variant . ,(delay python2-faker))))))
10406
10407 (define-public python2-faker
10408 (let ((base (package-with-python2 (strip-python2-variant
10409 python-faker))))
10410 (package
10411 (inherit base)
10412 (propagated-inputs
10413 `(("python2-ipaddress" ,python2-ipaddress)
10414 ,@(package-propagated-inputs base))))))
10415
10416 (define-public python-pyaml
10417 (package
10418 (name "python-pyaml")
10419 (version "18.11.0")
10420 (source (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "pyaml" version))
10423 (sha256
10424 (base32
10425 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10426 (build-system python-build-system)
10427 (native-inputs
10428 `(("python-unidecode" ,python-unidecode)))
10429 (propagated-inputs
10430 `(("python-pyyaml" ,python-pyyaml)))
10431 (home-page "https://github.com/mk-fg/pretty-yaml")
10432 (synopsis "YAML pretty-print library for Python")
10433 (description
10434 "pyaml is a PyYAML based python module to produce pretty and readable
10435 YAML-serialized data.")
10436 (license license:wtfpl2)))
10437
10438 (define-public python2-pyaml
10439 (package-with-python2 python-pyaml))
10440
10441 (define-public python-backpack
10442 (package
10443 (name "python-backpack")
10444 (version "0.1")
10445 (source
10446 (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "backpack" version))
10449 (sha256
10450 (base32
10451 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10452 (build-system python-build-system)
10453 (native-inputs
10454 `(("python-pytest" ,python-pytest)
10455 ("python-nose" ,python-nose)))
10456 (propagated-inputs
10457 `(("python-simplejson" ,python-simplejson)))
10458 (home-page "https://github.com/sdispater/backpack")
10459 (synopsis "Utilities for working with Python collections")
10460 (description "Backpack provides some useful utilities for working with
10461 collections of data.")
10462 (license license:expat)))
10463
10464 (define-public python2-backpack
10465 (package-with-python2 python-backpack))
10466
10467 (define-public python-prompt-toolkit
10468 (package
10469 (name "python-prompt-toolkit")
10470 (version "2.0.7")
10471 (source
10472 (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10475 (sha256
10476 (base32
10477 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10478 (build-system python-build-system)
10479 (arguments
10480 `(#:phases
10481 (modify-phases %standard-phases
10482 (delete 'check)
10483 (add-after 'install 'post-install-check
10484 (lambda* (#:key inputs outputs #:allow-other-keys)
10485 ;; HOME is needed for the test
10486 ;; "test_pathcompleter_can_expanduser".
10487 (setenv "HOME" "/tmp")
10488 (add-installed-pythonpath inputs outputs)
10489 (invoke "py.test"))))))
10490 (propagated-inputs
10491 `(("python-wcwidth" ,python-wcwidth)
10492 ("python-six" ,python-six)
10493 ("python-pygments" ,python-pygments)))
10494 (native-inputs
10495 `(("python-pytest" ,python-pytest)))
10496 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10497 (synopsis "Library for building command line interfaces in Python")
10498 (description
10499 "Prompt-Toolkit is a library for building interactive command line
10500 interfaces in Python. It's like GNU Readline but it also features syntax
10501 highlighting while typing, out-of-the-box multi-line input editing, advanced
10502 code completion, incremental search, support for Chinese double-width
10503 characters, mouse support, and auto suggestions.")
10504 (license license:bsd-3)))
10505
10506 (define-public python2-prompt-toolkit
10507 (package-with-python2 python-prompt-toolkit))
10508
10509 (define-public python-prompt-toolkit-1
10510 (package (inherit python-prompt-toolkit)
10511 (version "1.0.15")
10512 (source
10513 (origin
10514 (method url-fetch)
10515 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10516 (sha256
10517 (base32
10518 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10519
10520 (define-public python2-prompt-toolkit-1
10521 (package-with-python2 python-prompt-toolkit-1))
10522
10523 (define-public python-jedi
10524 (package
10525 (name "python-jedi")
10526 (version "0.13.3")
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "jedi" version))
10531 (sha256
10532 (base32
10533 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10534 (build-system python-build-system)
10535 (arguments
10536 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10537 ;; https://github.com/davidhalter/jedi/issues/1263)
10538 #:tests? #f
10539 #:phases
10540 (modify-phases %standard-phases
10541 (replace 'check
10542 (lambda* (#:key tests? #:allow-other-keys)
10543 (when tests?
10544 (invoke "py.test" "-vv")))))))
10545 (native-inputs
10546 `(("python-pytest" ,python-pytest)
10547 ("python-docopt" ,python-docopt)))
10548 (propagated-inputs
10549 `(("python-parso" ,python-parso)))
10550 (home-page "https://github.com/davidhalter/jedi")
10551 (synopsis "Autocompletion and static analysis library for Python")
10552 (description
10553 "Jedi is a static analysis tool for Python that can be used in Integrated
10554 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10555 on a deeper level than many other static analysis frameworks for Python.
10556
10557 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10558 well.")
10559 (license license:expat)))
10560
10561 (define-public python2-jedi
10562 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10563 (package
10564 (inherit base)
10565 (arguments (substitute-keyword-arguments (package-arguments base)
10566 ((#:tests? _) #t))))))
10567
10568 (define-public ptpython
10569 (package
10570 (name "ptpython")
10571 (version "0.34")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "ptpython" version))
10575 (sha256
10576 (base32
10577 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10578 (build-system python-build-system)
10579 (arguments
10580 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10581 (propagated-inputs
10582 `(("python-docopt" ,python-docopt)
10583 ("python-jedi" ,python-jedi)
10584 ("python-prompt-toolkit" ,python-prompt-toolkit)
10585 ("python-pygments" ,python-pygments)))
10586 (home-page "https://github.com/jonathanslenders/ptpython")
10587 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10588 (description
10589 "ptpython is a Python read-eval-print loop with IDE-like features.
10590 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10591 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10592 etc.")
10593 (license license:bsd-3)
10594 (properties `((python2-variant . ,(delay ptpython-2))))))
10595
10596 (define-public ptpython-2
10597 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10598 (package
10599 (inherit base)
10600 (name "ptpython2"))))
10601
10602 (define-public python-stem
10603 (package
10604 (name "python-stem")
10605 (version "1.7.1")
10606 (source
10607 (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "stem" version))
10610 (sha256
10611 (base32
10612 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10613 (build-system python-build-system)
10614 (arguments
10615 `(#:phases
10616 (modify-phases %standard-phases
10617 (replace 'check
10618 (lambda _
10619 (invoke "./run_tests.py" "--unit")
10620 #t)))))
10621 (native-inputs
10622 `(("python-mock" ,python-mock)
10623 ("python-pycodestyle" ,python-pycodestyle)
10624 ("python-pyflakes" ,python-pyflakes)))
10625 (home-page "https://stem.torproject.org/")
10626 (synopsis
10627 "Python controller library that allows applications to interact with Tor")
10628 (description
10629 "Stem is a Python controller library for Tor. With it you can use Tor's
10630 control protocol to script against the Tor process and read descriptor data
10631 relays publish about themselves.")
10632 (license license:lgpl3)))
10633
10634 (define-public python2-stem
10635 (package-with-python2 python-stem))
10636
10637 (define-public python-pyserial
10638 (package
10639 (name "python-pyserial")
10640 (version "3.1.1")
10641 (source
10642 (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "pyserial" version))
10645 (sha256
10646 (base32
10647 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10648 (build-system python-build-system)
10649 (arguments
10650 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10651 ;; #:phases
10652 ;; (modify-phases %standard-phases
10653 ;; (replace 'check
10654 ;; (lambda _
10655 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10656 (home-page
10657 "https://github.com/pyserial/pyserial")
10658 (synopsis "Python Serial Port Bindings")
10659 (description "@code{pyserial} provide serial port bindings for Python. It
10660 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10661 and/or Xon/Xoff. The port is accessed in RAW mode.")
10662 (license license:bsd-3)))
10663
10664 (define-public python2-pyserial
10665 (package-with-python2 python-pyserial))
10666
10667 (define-public python-kivy
10668 (package
10669 (name "python-kivy")
10670 (version "1.10.1")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "Kivy" version))
10675 (file-name (string-append name "-" version ".tar.gz"))
10676 (sha256
10677 (base32
10678 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10679 (build-system python-build-system)
10680 (arguments
10681 `(#:tests? #f ; Tests require many optional packages
10682 #:phases
10683 (modify-phases %standard-phases
10684 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10685 (lambda* (#:key inputs #:allow-other-keys)
10686 (setenv "KIVY_SDL2_PATH"
10687 (string-append (assoc-ref inputs "sdl-union")
10688 "/include/SDL2"))
10689 #t)))))
10690 (native-inputs
10691 `(("git" ,git)
10692 ("pkg-config" ,pkg-config)
10693 ("python-cython" ,python-cython)))
10694 (inputs
10695 `(("gstreamer" ,gstreamer)
10696 ("mesa" ,mesa)
10697 ("sdl-union"
10698 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10699 (home-page "http://kivy.org")
10700 (synopsis
10701 "Multitouch application framework")
10702 (description
10703 "A software library for rapid development of
10704 hardware-accelerated multitouch applications.")
10705 (license license:expat)))
10706
10707 (define-public python2-kivy
10708 (package-with-python2 python-kivy))
10709
10710 (define-public python-kivy-next
10711 (deprecated-package "python-kivy-next" python-kivy))
10712
10713 (define-public python2-kivy-next
10714 (deprecated-package "python2-kivy-next" python2-kivy))
10715
10716 (define-public python-binaryornot
10717 (package
10718 (name "python-binaryornot")
10719 (version "0.4.4")
10720 (source (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "binaryornot" version))
10723 (sha256
10724 (base32
10725 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10726 (build-system python-build-system)
10727 (propagated-inputs
10728 `(("python-chardet" ,python-chardet)
10729 ("python-hypothesis" ,python-hypothesis)))
10730 (home-page "https://github.com/audreyr/binaryornot")
10731 (synopsis "Package to check if a file is binary or text")
10732 (description "Ultra-lightweight pure Python package to check if a file is
10733 binary or text.")
10734 (license license:bsd-3)
10735 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10736
10737 (define-public python2-binaryornot
10738 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10739 (package (inherit base)
10740 (propagated-inputs
10741 `(("python2-enum34" ,python2-enum34)
10742 ,@(package-propagated-inputs base))))))
10743
10744 (define-public python-nltk
10745 (package
10746 (name "python-nltk")
10747 (version "3.2.1")
10748 (source (origin
10749 (method url-fetch)
10750 (uri (pypi-uri "nltk" version))
10751 (sha256
10752 (base32
10753 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10754 (build-system python-build-system)
10755 (arguments
10756 '(;; The tests require some extra resources to be downloaded.
10757 ;; TODO Try packaging these resources.
10758 #:tests? #f))
10759 (home-page "http://nltk.org/")
10760 (synopsis "Natural Language Toolkit")
10761 (description "It provides interfaces to over 50 corpora and lexical
10762 resources such as WordNet, along with a suite of text processing libraries
10763 for classification, tokenization, stemming, tagging, parsing, and semantic
10764 reasoning, wrappers for natural language processing libraries.")
10765 (license license:asl2.0)))
10766
10767 (define-public python2-nltk
10768 (package-with-python2 python-nltk))
10769
10770 (define-public python-pymongo
10771 (package
10772 (name "python-pymongo")
10773 (version "3.7.2")
10774 (source (origin
10775 (method url-fetch)
10776 (uri (pypi-uri "pymongo" version))
10777 (sha256
10778 (base32
10779 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10780 (build-system python-build-system)
10781 (propagated-inputs
10782 `(("python-certifi" ,python-certifi)))
10783 (home-page "https://github.com/mongodb/mongo-python-driver")
10784 (synopsis "Python driver for MongoDB")
10785 (description "Python driver for MongoDB.")
10786 (license license:asl2.0)))
10787
10788 (define-public python2-pymongo
10789 (package-with-python2 python-pymongo))
10790
10791 (define-public python-consul
10792 (package
10793 (name "python-consul")
10794 (version "0.6.1")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "python-consul" version))
10799 (sha256
10800 (base32
10801 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10802 (build-system python-build-system)
10803 (arguments
10804 '(#:tests? #f)) ; The tests are not distributed
10805 (propagated-inputs
10806 `(("python-requests" ,python-requests)
10807 ("python-six" ,python-six)))
10808 (home-page "https://github.com/cablehead/python-consul")
10809 (synopsis "Python client for Consul")
10810 (description
10811 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10812 discovery, monitoring and configuration.")
10813 (license license:expat)))
10814
10815 (define-public python2-consul
10816 (package-with-python2 python-consul))
10817
10818 (define-public python-schematics
10819 (package
10820 (name "python-schematics")
10821 (version "1.1.1")
10822 (source
10823 (origin
10824 (method git-fetch)
10825 (uri (git-reference
10826 (url "https://github.com/schematics/schematics.git")
10827 (commit (string-append "v" version))))
10828 (file-name (git-file-name name version))
10829 (sha256
10830 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10831 (build-system python-build-system)
10832 (propagated-inputs
10833 `(("python-six" ,python-six)))
10834 (arguments
10835 ;; The tests require a bunch of not very nice packages with fixed
10836 ;; version requirements (e.g. python-coveralls).
10837 `(#:tests? #f))
10838 (home-page "https://github.com/schematics/schematics")
10839 (synopsis "Python Data Structures for Humans")
10840 (description "Python Data Structures for Humans.")
10841 (license license:bsd-3)))
10842
10843 (define-public python2-schematics
10844 (package-with-python2 python-schematics))
10845
10846 (define-public python-odfpy
10847 (package
10848 (name "python-odfpy")
10849 (version "1.3.3")
10850 (source (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "odfpy" version))
10853 (sha256
10854 (base32
10855 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10856 (arguments
10857 `(#:modules ((srfi srfi-1)
10858 (guix build python-build-system)
10859 (guix build utils))
10860 #:phases
10861 (modify-phases %standard-phases
10862 (replace 'check
10863 ;; The test runner invokes python2 and python3 for test*.py.
10864 ;; To avoid having both in inputs, we replicate it here.
10865 (lambda _
10866 (for-each (lambda (test-file) (invoke "python" test-file))
10867 (find-files "tests" "^test.*\\.py$"))
10868 #t)))))
10869 (build-system python-build-system)
10870 (home-page "https://github.com/eea/odfpy")
10871 (synopsis "Python API and tools to manipulate OpenDocument files")
10872 (description "Collection of libraries and utility programs written in
10873 Python to manipulate OpenDocument 1.2 files.")
10874 (license
10875 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10876 ;; number of files with other licenses.
10877 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10878
10879 (define-public python2-odfpy
10880 (package-with-python2 python-odfpy))
10881
10882 (define-public python-natsort
10883 (package
10884 (name "python-natsort")
10885 (version "5.4.1")
10886 (source (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "natsort" version))
10889 (sha256
10890 (base32
10891 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10892 (build-system python-build-system)
10893 (arguments
10894 `(#:modules ((guix build utils)
10895 (guix build python-build-system)
10896 (srfi srfi-1)
10897 (srfi srfi-26)
10898 (ice-9 ftw))
10899 #:phases
10900 (modify-phases %standard-phases
10901 (add-before 'check 'set-cachedir
10902 ;; Tests require write access to $HOME by default
10903 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10904 (replace 'check
10905 (lambda _
10906 (let ((cwd (getcwd)))
10907 (setenv "PYTHONPATH"
10908 (string-append
10909 cwd "/build/"
10910 (find (cut string-prefix? "lib" <>)
10911 (scandir (string-append cwd "/build")))
10912 ":"
10913 (getenv "PYTHONPATH")))
10914 (invoke "pytest" "-v")))))))
10915 (native-inputs
10916 `(("python-hypothesis" ,python-hypothesis)
10917 ("python-pytest-cov" ,python-pytest-cov)
10918 ("python-pytest-mock" ,python-pytest-mock)
10919 ("python-pytest" ,python-pytest)))
10920 (propagated-inputs ; TODO: Add python-fastnumbers.
10921 `(("python-pyicu" ,python-pyicu)))
10922 (home-page "https://github.com/SethMMorton/natsort")
10923 (synopsis "Natural sorting for python and shell")
10924 (description
10925 "Natsort lets you apply natural sorting on lists instead of
10926 lexicographical. If you use the built-in @code{sorted} method in python
10927 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10928 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10929 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10930 identifies numbers and sorts them separately from strings. It can also sort
10931 version numbers, real numbers, mixed types and more, and comes with a shell
10932 command @command{natsort} that exposes this functionality in the command line.")
10933 (license license:expat)
10934 (properties `((python2-variant . ,(delay python2-natsort))))))
10935
10936 (define-public python2-natsort
10937 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10938 (package (inherit base)
10939 (native-inputs
10940 `(("python2-pathlib" ,python2-pathlib)
10941 ,@(package-native-inputs base))))))
10942
10943 (define-public python-glances
10944 (package
10945 (name "python-glances")
10946 (version "3.0.2")
10947 (source
10948 (origin
10949 (method url-fetch)
10950 (uri (pypi-uri "Glances" version))
10951 (sha256
10952 (base32
10953 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10954 (build-system python-build-system)
10955 (propagated-inputs
10956 `(("python-psutil" ,python-psutil)))
10957 (home-page
10958 "https://github.com/nicolargo/glances")
10959 (synopsis
10960 "A cross-platform curses-based monitoring tool")
10961 (description
10962 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10963 Glances uses the PsUtil library to get information from your system. It monitors
10964 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10965 (license license:lgpl3+)))
10966
10967 (define-public python2-glances
10968 (package-with-python2 python-glances))
10969
10970 (define-public python-graphql-core
10971 (package
10972 (name "python-graphql-core")
10973 (version "0.5.3")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "graphql-core" version))
10978 (sha256
10979 (base32
10980 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10981 (build-system python-build-system)
10982 (arguments
10983 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10984 #:phases
10985 (modify-phases %standard-phases
10986 (add-after 'unpack 'patch-hardcoded-version
10987 (lambda _ (substitute*
10988 "setup.py"
10989 (("'gevent==1.1rc1'") "'gevent'"))
10990 #t)))))
10991 (native-inputs
10992 `(("python-gevent" ,python-gevent)
10993 ("python-mock" ,python-mock)
10994 ("python-pytest-mock" ,python-pytest-mock)))
10995 (propagated-inputs
10996 `(("python-promise" ,python-promise)
10997 ("python-six" ,python-six)))
10998 (home-page "https://github.com/graphql-python/graphql-core")
10999 (synopsis "GraphQL implementation for Python")
11000 (description
11001 "GraphQL implementation for Python. GraphQL is a data query language and
11002 runtime designed and used to request and deliver data to mobile and web apps.
11003 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11004 to Python.")
11005 (license license:expat)))
11006
11007 (define-public python2-graphql-core
11008 (package-with-python2 python-graphql-core))
11009
11010 (define-public python-graphql-relay
11011 (package
11012 (name "python-graphql-relay")
11013 (version "0.4.5")
11014 (source
11015 (origin
11016 (method url-fetch)
11017 (uri (pypi-uri "graphql-relay" version))
11018 (sha256
11019 (base32
11020 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11021 (build-system python-build-system)
11022 (arguments
11023 '(#:tests? #f)) ; The tests are not distributed
11024 (propagated-inputs
11025 `(("python-graphql-core" ,python-graphql-core)
11026 ("python-promise" ,python-promise)
11027 ("python-six" ,python-six)))
11028 (home-page "https://github.com/graphql-python/graphql-relay-py")
11029 (synopsis "Relay implementation for Python")
11030 (description
11031 "This is a library to allow the easy creation of Relay-compliant servers
11032 using the GraphQL Python reference implementation of a GraphQL server. It
11033 should be noted that the code is a exact port of the original
11034 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11035 from Facebook.")
11036 (license license:expat)))
11037
11038 (define-public python2-graphql-relay
11039 (package-with-python2 python-graphql-relay))
11040
11041 (define-public python-graphene
11042 (package
11043 (name "python-graphene")
11044 (version "0.10.2")
11045 (source
11046 (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "graphene" version))
11049 (sha256
11050 (base32
11051 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11052 (build-system python-build-system)
11053 (propagated-inputs
11054 `(("python-graphql-core" ,python-graphql-core)
11055 ("python-graphql-relay" ,python-graphql-relay)
11056 ("python-iso8601" ,python-iso8601)
11057 ("python-promise" ,python-promise)
11058 ("python-six" ,python-six)))
11059 (arguments
11060 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11061 (home-page "http://graphene-python.org/")
11062 (synopsis "GraphQL Framework for Python")
11063 (description
11064 "Graphene is a Python library for building GraphQL schemas/types.
11065 A GraphQL schema describes your data model, and provides a GraphQL server
11066 with an associated set of resolve methods that know how to fetch data.")
11067 (properties `((python2-variant . ,(delay python2-graphene))))
11068 (license license:expat)))
11069
11070 (define-public python2-graphene
11071 (let ((base (package-with-python2
11072 (strip-python2-variant python-graphene))))
11073 (package (inherit base)
11074 (native-inputs
11075 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11076 ,@(package-native-inputs base))))))
11077
11078 (define-public python-nautilus
11079 (package
11080 (name "python-nautilus")
11081 (version "0.4.9")
11082 (source
11083 (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "nautilus" version))
11086 (sha256
11087 (base32
11088 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11089 (build-system python-build-system)
11090 (arguments `(#:tests? #f)) ; fails to import test modules
11091 (propagated-inputs
11092 `(("python-bcrypt" ,python-bcrypt)
11093 ("python-click" ,python-click)
11094 ("python-consul" ,python-consul)
11095 ("python-graphene" ,python-graphene)
11096 ("python-jinja2" ,python-jinja2)
11097 ("python-peewee" ,python-peewee)
11098 ("python-pika" ,python-pika)
11099 ("python-tornado" ,python-tornado)
11100 ("python-wtforms" ,python-wtforms)))
11101 (native-inputs
11102 `(("python-nose2" ,python-nose2)))
11103 (home-page "https://github.com/AlecAivazis/nautilus")
11104 (synopsis "Library for creating microservice applications")
11105 (description
11106 "Nautilus is a framework for flux based microservices that looks to
11107 provide extendible implementations of common aspects of a cloud so that you can
11108 focus on building massively scalable web applications.")
11109 (license license:expat)))
11110
11111 (define-public python-snowballstemmer
11112 (package
11113 (name "python-snowballstemmer")
11114 (version "1.2.1")
11115 (source (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "snowballstemmer" version))
11118 (sha256
11119 (base32
11120 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11121 (build-system python-build-system)
11122 (arguments
11123 `(;; No tests exist
11124 #:tests? #f))
11125 (home-page "https://github.com/shibukawa/snowball_py")
11126 (synopsis "Snowball stemming library collection for Python")
11127 (description "This package provides 16 word stemmer algorithms generated
11128 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11129 English stemmer.")
11130 (license license:bsd-3)))
11131
11132 (define-public python2-snowballstemmer
11133 (package-with-python2 python-snowballstemmer))
11134
11135 (define-public python-setproctitle
11136 (package
11137 (name "python-setproctitle")
11138 (version "1.1.10")
11139 (source
11140 (origin
11141 (method url-fetch)
11142 (uri (pypi-uri "setproctitle" version))
11143 (sha256
11144 (base32
11145 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11146 (build-system python-build-system)
11147 (arguments
11148 '(#:phases
11149 (modify-phases %standard-phases
11150 (add-before 'check 'patch-Makefile
11151 ;; Stricly this is only required for the python2 variant.
11152 ;; But adding a phase in an inherited package seems to be
11153 ;; cumbersum. So we patch even for python3.
11154 (lambda _
11155 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11156 (when nose
11157 (substitute* "Makefile"
11158 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11159 (string-append nose "/bin/nosetests "))))
11160 #t)))
11161 (replace 'check
11162 (lambda _
11163 (setenv "PYTHON" (or (which "python3") (which "python")))
11164 (setenv "PYCONFIG" (or (which "python3-config")
11165 (which "python-config")))
11166 (setenv "CC" "gcc")
11167 ;; No need to extend PYTHONPATH to find the built package, since
11168 ;; the Makefile will build anyway
11169 (invoke "make" "check"))))))
11170 (native-inputs
11171 `(("procps" ,procps))) ; required for tests
11172 (home-page
11173 "https://github.com/dvarrazzo/py-setproctitle")
11174 (synopsis
11175 "Setproctitle implementation for Python to customize the process title")
11176 (description "The library allows a process to change its title (as displayed
11177 by system tools such as ps and top).
11178
11179 Changing the title is mostly useful in multi-process systems, for
11180 example when a master process is forked: changing the children's title
11181 allows to identify the task each process is busy with. The technique
11182 is used by PostgreSQL and the OpenSSH Server for example.")
11183 (license license:bsd-3)
11184 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11185
11186 (define-public python2-setproctitle
11187 (let ((base (package-with-python2
11188 (strip-python2-variant python-setproctitle))))
11189 (package
11190 (inherit base)
11191 (native-inputs `(("python2-nose" ,python2-nose)
11192 ,@(package-native-inputs base))))))
11193
11194 (define-public python-validictory
11195 (package
11196 (name "python-validictory")
11197 (version "1.0.1")
11198 (source
11199 (origin
11200 (method url-fetch)
11201 (uri (pypi-uri "validictory" version))
11202 (sha256
11203 (base32
11204 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11205 (build-system python-build-system)
11206 (arguments
11207 '(#:phases
11208 (modify-phases %standard-phases
11209 (add-after 'unpack 'bootstrap
11210 ;; Move the tests out of the package directory to avoid
11211 ;; packaging them.
11212 (lambda* _
11213 (rename-file "validictory/tests" "tests")
11214 (delete-file "tests/__init__.py")))
11215 (replace 'check
11216 (lambda _
11217 ;; Extend PYTHONPATH so the built package will be found.
11218 (setenv "PYTHONPATH"
11219 (string-append (getcwd) "/build/lib:"
11220 (getenv "PYTHONPATH")))
11221 (invoke "py.test" "-vv" ))))))
11222 (native-inputs
11223 `(("python-pytest" ,python-pytest)))
11224 (home-page
11225 "https://github.com/jamesturk/validictory")
11226 (synopsis "General purpose Python data validator")
11227 (description "It allows validation of arbitrary Python data structures.
11228
11229 The schema format is based on the JSON Schema
11230 proposal (http://json-schema.org), so combined with json the library is also
11231 useful as a validator for JSON data.")
11232 (license license:expat)))
11233
11234 (define-public python2-validictory
11235 (package-with-python2 python-validictory))
11236
11237 (define-public python-pyelftools
11238 (package
11239 (name "python-pyelftools")
11240 (version "0.25")
11241 (source
11242 (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "pyelftools" version))
11245 (sha256
11246 (base32
11247 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11248 (build-system python-build-system)
11249 (arguments
11250 `(#:phases
11251 (modify-phases %standard-phases
11252 (add-before 'check 'set-pythonpath
11253 (lambda _
11254 (setenv "PYTHONPATH"
11255 (string-append
11256 (getcwd) "/test/"
11257 ":" (getenv "PYTHONPATH")))
11258 #t)))))
11259 (home-page
11260 "https://github.com/eliben/pyelftools")
11261 (synopsis
11262 "Analyze binary and library file information")
11263 (description "This Python library provides interfaces for parsing and
11264 analyzing two binary and library file formats; the Executable and Linking
11265 Format (ELF), and debugging information in the Debugging With Attributed
11266 Record Format (DWARF).")
11267 (license license:public-domain)))
11268
11269 (define-public python-pyev
11270 (package
11271 (name "python-pyev")
11272 (version "0.9.0")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "pyev" version))
11277 (sha256
11278 (base32
11279 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11280 (build-system python-build-system)
11281 (arguments
11282 `(#:tests? #f ; no test suite
11283 #:phases
11284 (modify-phases %standard-phases
11285 (add-after 'unpack 'patch
11286 (lambda* (#:key inputs #:allow-other-keys)
11287 (let ((libev (string-append (assoc-ref inputs "libev")
11288 "/lib/libev.so.4")))
11289 (substitute* "setup.py"
11290 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11291 (string-append "libev_dll_name = \"" libev "\"")))))))))
11292 (inputs
11293 `(("libev" ,libev)))
11294 (home-page "http://pythonhosted.org/pyev/")
11295 (synopsis "Python libev interface")
11296 (description "Pyev provides a Python interface to libev.")
11297 (license license:gpl3)))
11298
11299 (define-public python2-pyev
11300 (package-with-python2 python-pyev))
11301
11302 (define-public python-imagesize
11303 (package
11304 (name "python-imagesize")
11305 (version "1.1.0")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "imagesize" version))
11310 (sha256
11311 (base32
11312 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11313 (build-system python-build-system)
11314 (home-page "https://github.com/shibukawa/imagesize_py")
11315 (synopsis "Gets image size of files in various formats in Python")
11316 (description
11317 "This package allows determination of image size from
11318 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11319 (license license:expat)))
11320
11321 (define-public python2-imagesize
11322 (package-with-python2 python-imagesize))
11323
11324 (define-public python-termstyle
11325 (package
11326 (name "python-termstyle")
11327 (version "0.1.11")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (pypi-uri "termstyle" version))
11332 (sha256
11333 (base32
11334 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11335 (build-system python-build-system)
11336 (arguments
11337 '(#:phases
11338 (modify-phases %standard-phases
11339 (replace 'check
11340 (lambda _
11341 (invoke "python" "test3.py"))))))
11342 (home-page "https://github.com/gfxmonk/termstyle")
11343 (synopsis "Console text coloring for Python")
11344 (description "This package provides console text coloring for Python.")
11345 (license license:bsd-3)))
11346
11347 (define-public python-argcomplete
11348 (package
11349 (name "python-argcomplete")
11350 (version "1.7.0")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (pypi-uri "argcomplete" version))
11355 (sha256
11356 (base32
11357 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11358 (build-system python-build-system)
11359 (native-inputs
11360 `(("python-pexpect" ,python-pexpect)
11361 ("tcsh" ,tcsh)
11362 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11363 (home-page "https://github.com/kislyuk/argcomplete")
11364 (synopsis "Shell tab completion for Python argparse")
11365 (description "argcomplete provides extensible command line tab completion
11366 of arguments and options for Python scripts using @code{argparse}. It's
11367 particularly useful for programs with many options or sub-parsers that can
11368 dynamically suggest completions; for example, when browsing resources over the
11369 network.")
11370 (license license:asl2.0)))
11371
11372 (define-public python2-argcomplete
11373 (package-with-python2 python-argcomplete))
11374
11375 (define-public python-xopen
11376 (package
11377 (name "python-xopen")
11378 (version "0.5.0")
11379 (source
11380 (origin
11381 (method url-fetch)
11382 (uri (pypi-uri "xopen" version))
11383 (sha256
11384 (base32
11385 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11386 (build-system python-build-system)
11387 (propagated-inputs
11388 `(("python-setuptools-scm" ,python-setuptools-scm)))
11389 (home-page "https://github.com/marcelm/xopen/")
11390 (synopsis "Open compressed files transparently")
11391 (description "This module provides an @code{xopen} function that works like
11392 Python's built-in @code{open} function, but can also deal with compressed files.
11393 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11394 recognized by their file extensions. The focus is on being as efficient as
11395 possible on all supported Python versions.")
11396 (license license:expat)))
11397
11398 (define-public python2-xopen
11399 (let ((base (package-with-python2
11400 (strip-python2-variant python-xopen))))
11401 (package
11402 (inherit base)
11403 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11404 ,@(package-propagated-inputs base))))))
11405
11406 (define-public python-cheetah
11407 (package
11408 (name "python-cheetah")
11409 (version "3.1.0")
11410 (source
11411 (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "Cheetah3" version))
11414 (sha256
11415 (base32
11416 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11417 (build-system python-build-system)
11418 (arguments
11419 `(#:modules ((guix build utils)
11420 (guix build python-build-system)
11421 (ice-9 ftw)
11422 (srfi srfi-1)
11423 (srfi srfi-26))
11424 #:phases (modify-phases %standard-phases
11425 (add-after 'unpack 'use-absolute-python
11426 (lambda _
11427 (substitute* "Cheetah/CheetahWrapper.py"
11428 (("#!/usr/bin/env python")
11429 (string-append "#!" (which "python"))))
11430 #t))
11431 (replace 'check
11432 (lambda _
11433 (let ((cwd (getcwd)))
11434 (setenv "PYTHONPATH"
11435 (string-append
11436 cwd "/build/"
11437 (find (cut string-prefix? "lib" <>)
11438 (scandir (string-append cwd "/build")))
11439 ":" (getenv "PYTHONPATH")))
11440 (setenv "PATH"
11441 (string-append (getenv "PATH")
11442 ":" cwd "/bin"))
11443 (setenv "TMPDIR" "/tmp")
11444
11445 (substitute* "Cheetah/Tests/Test.py"
11446 (("unittest.TextTestRunner\\(\\)")
11447 "unittest.TextTestRunner(verbosity=2)"))
11448
11449 (invoke "python" "Cheetah/Tests/Test.py")))))))
11450 (propagated-inputs
11451 `(("python-markdown" ,python-markdown))) ;optional
11452 (home-page "http://cheetahtemplate.org/")
11453 (synopsis "Template engine")
11454 (description "Cheetah is a text-based template engine and Python code
11455 generator.
11456
11457 Cheetah can be used as a standalone templating utility or referenced as
11458 a library from other Python applications. It has many potential uses,
11459 but web developers looking for a viable alternative to ASP, JSP, PHP and
11460 PSP are expected to be its principle user group.
11461
11462 Features:
11463 @enumerate
11464 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11465 text-based format.
11466 @item Cleanly separates content, graphic design, and program code.
11467 @item Blends the power and flexibility of Python with a simple template language
11468 that non-programmers can understand.
11469 @item Gives template writers full access to any Python data structure, module,
11470 function, object, or method in their templates.
11471 @item Makes code reuse easy by providing an object-orientated interface to
11472 templates that is accessible from Python code or other Cheetah templates.
11473 One template can subclass another and selectively reimplement sections of it.
11474 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11475 improve the performance of a dynamic website.
11476 @item Compiles templates into optimized, yet readable, Python code.
11477 @end enumerate")
11478 (license (license:x11-style "file://LICENSE"))))
11479
11480 (define-public python2-cheetah
11481 (package-with-python2 python-cheetah))
11482
11483 (define-public python-dulwich
11484 (package
11485 (name "python-dulwich")
11486 (version "0.18.6")
11487 (source
11488 (origin
11489 (method url-fetch)
11490 (uri (list (string-append "https://www.dulwich.io/releases/"
11491 "dulwich-" version ".tar.gz")
11492 (pypi-uri "dulwich" version)))
11493 (sha256
11494 (base32
11495 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11496 (build-system python-build-system)
11497 (arguments
11498 `(#:phases
11499 (modify-phases %standard-phases
11500 (add-before 'check 'fix-tests
11501 (lambda* (#:key inputs #:allow-other-keys)
11502 ;; The tests use Popen with a custom environment which doesn't
11503 ;; include PATH.
11504 (substitute* "dulwich/tests/compat/utils.py"
11505 (("'git'") (string-append "'"
11506 (which "git")
11507 "'")))
11508 (substitute* '("dulwich/tests/test_repository.py"
11509 "dulwich/tests/test_hooks.py")
11510 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11511 (setenv "TEST_RUNNER" "unittest")
11512 (setenv "PYTHONHASHSEED" "random")
11513 #t)))))
11514 (propagated-inputs
11515 `(("python-fastimport" ,python-fastimport)))
11516 (native-inputs
11517 `(("python-mock" ,python-mock)
11518 ("python-geventhttpclient" ,python-geventhttpclient)
11519 ("git" ,git)))
11520 (home-page "https://www.dulwich.io/")
11521 (synopsis "Git implementation in Python")
11522 (description "Dulwich is an implementation of the Git file formats and
11523 protocols written in pure Python.")
11524 ;; Can be used with either license.
11525 (license (list license:asl2.0 license:gpl2+))))
11526
11527 (define-public python2-dulwich
11528 (package-with-python2 python-dulwich))
11529
11530 (define-public python-pbkdf2
11531 (package
11532 (name "python-pbkdf2")
11533 (version "1.3")
11534 (source
11535 (origin
11536 (method url-fetch)
11537 (uri (pypi-uri "pbkdf2" version))
11538 (sha256
11539 (base32
11540 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11541 (build-system python-build-system)
11542 (arguments
11543 '(#:phases
11544 (modify-phases %standard-phases
11545 (replace 'check
11546 (lambda _
11547 (setenv "PYTHONPATH"
11548 (string-append (getcwd) "/build/lib:"
11549 (getenv "PYTHONPATH")))
11550 (invoke "python" "test/test_pbkdf2.py"))))))
11551 (propagated-inputs
11552 `(("python-pycrypto" ,python-pycrypto))) ; optional
11553 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11554 (synopsis "Password-based key derivation")
11555 (description "This module implements the password-based key derivation
11556 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11557
11558 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11559 is part of the RSA Public Key Cryptography Standards series. The provided
11560 implementation takes a password or a passphrase and a salt value (and
11561 optionally a iteration count, a digest module, and a MAC module) and provides
11562 a file-like object from which an arbitrarly-sized key can be read.")
11563 (license license:expat)))
11564
11565 (define-public python2-pbkdf2
11566 (package-with-python2 python-pbkdf2))
11567
11568 (define-public python-qrcode
11569 (package
11570 (name "python-qrcode")
11571 (version "6.1")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "qrcode" version))
11576 (sha256
11577 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11578 (build-system python-build-system)
11579 (arguments
11580 ;; FIXME: Tests require packaging 'pymaging'.
11581 '(#:tests? #f))
11582 (propagated-inputs
11583 `(("python-lxml" ,python-lxml) ; for SVG output
11584 ("python-pillow" ,python-pillow) ; for PNG output
11585 ("python-six" ,python-six)))
11586 (home-page "https://github.com/lincolnloop/python-qrcode")
11587 (synopsis "QR Code image generator")
11588 (description "This package provides a pure Python QR Code generator
11589 module. It uses the Python Imaging Library (PIL) to allow for the generation
11590 of QR Codes.
11591
11592 In addition this package provides a command line tool to generate QR codes and
11593 either write these QR codes to a file or do the output as ascii art at the
11594 console.")
11595 (license license:bsd-3)))
11596
11597 (define-public python2-qrcode
11598 (package-with-python2 python-qrcode))
11599
11600 (define-public python-rst2ansi
11601 (package
11602 (name "python-rst2ansi")
11603 (version "0.1.5")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "rst2ansi" version))
11608 (sha256
11609 (base32
11610 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11611 (build-system python-build-system)
11612 (propagated-inputs
11613 `(("python-docutils" ,python-docutils)))
11614 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11615 (synopsis "Convert RST to ANSI-decorated console output")
11616 (description
11617 "Python module dedicated to rendering RST (reStructuredText) documents
11618 to ansi-escaped strings suitable for display in a terminal.")
11619 (license license:expat)))
11620
11621 (define-public python-ansi2html
11622 (package
11623 (name "python-ansi2html")
11624 (version "1.2.0")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "ansi2html" version))
11629 (sha256
11630 (base32
11631 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11632 (build-system python-build-system)
11633 (native-inputs
11634 `(("python-mock" ,python-mock)
11635 ("python-nose" ,python-nose)))
11636 (propagated-inputs
11637 `(("python-six" ,python-six)))
11638 (home-page "https://github.com/ralphbean/ansi2html")
11639 (synopsis "Convert ANSI-decorated console output to HTML")
11640 (description
11641 "@command{ansi2html} is a Python library and command line utility for
11642 convering text with ANSI color codes to HTML or LaTeX.")
11643 (license license:gpl3+)))
11644
11645 (define-public python2-ansi2html
11646 (package-with-python2 python-ansi2html))
11647
11648 (define-public python-ddt
11649 (package
11650 (name "python-ddt")
11651 (version "1.1.3")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "ddt" version))
11656 (sha256
11657 (base32
11658 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11659 (build-system python-build-system)
11660 (native-inputs
11661 `(("python-mock" ,python-mock)
11662 ("python-nose" ,python-nose)))
11663 (propagated-inputs
11664 `(("python-six" ,python-six)
11665 ("python-pyyaml" ,python-pyyaml)))
11666 (home-page "https://github.com/txels/ddt")
11667 (synopsis "Data-Driven Tests")
11668 (description
11669 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11670 running it with different test data, and make it appear as multiple test
11671 cases.")
11672 (license license:expat)))
11673
11674 (define-public python2-ddt
11675 (package-with-python2 python-ddt))
11676
11677 (define-public python-pycountry
11678 (package
11679 (name "python-pycountry")
11680 (version "18.5.26")
11681 (source
11682 (origin
11683 (method url-fetch)
11684 (uri (pypi-uri "pycountry" version))
11685 (sha256
11686 (base32
11687 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11688 (build-system python-build-system)
11689 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11690 (synopsis "ISO databases for languages, countries, currencies, etc.")
11691 (description
11692 "@code{pycountry} provides the ISO databases for the standards:
11693 @enumerate
11694 @item 639-3 (Languages)
11695 @item 3166 (Countries)
11696 @item 3166-3 (Deleted Countries)
11697 @item 3166-2 (Subdivisions of countries)
11698 @item 4217 (Currencies)
11699 @item 15924 (Scripts)
11700 @end enumerate
11701 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11702 through a Python API.")
11703 (license license:lgpl2.1+)))
11704
11705 (define-public python2-pycountry
11706 (package-with-python2 python-pycountry))
11707
11708 (define-public python-pycosat
11709 (package
11710 (name "python-pycosat")
11711 (version "0.6.1")
11712 (source
11713 (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "pycosat" version))
11716 (sha256
11717 (base32
11718 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11719 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11720 (build-system python-build-system)
11721 (home-page "https://github.com/ContinuumIO/pycosat")
11722 (synopsis "Bindings to picosat (a SAT solver)")
11723 (description
11724 "This package provides efficient Python bindings to @code{picosat} on
11725 the C level. When importing pycosat, the @code{picosat} solver becomes part
11726 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11727 Problem} (SAT) solver.")
11728 (license license:expat)))
11729
11730 (define-public python2-pycosat
11731 (package-with-python2 python-pycosat))
11732
11733 (define-public python2-ruamel.ordereddict
11734 (package
11735 (name "python2-ruamel.ordereddict")
11736 (version "0.4.9")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "ruamel.ordereddict" version))
11741 (sha256
11742 (base32
11743 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11744 (build-system python-build-system)
11745 (arguments
11746 `(#:python ,python-2
11747 #:phases
11748 (modify-phases %standard-phases
11749 (delete 'check)
11750 (add-after 'install 'check
11751 (lambda* (#:key inputs outputs #:allow-other-keys)
11752 (add-installed-pythonpath inputs outputs)
11753 (invoke "python" "test/testordereddict.py"))))))
11754 (home-page "https://bitbucket.org/ruamel/ordereddict")
11755 (synopsis "Version of dict that keeps keys in insertion order")
11756 (description
11757 "This is an implementation of an ordered dictionary with @dfn{Key
11758 Insertion Order} (KIO: updates of values do not affect the position of the
11759 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11760 removed and put at the back). The standard library module @code{OrderedDict},
11761 implemented later, implements a subset of @code{ordereddict} functionality.
11762 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11763 Order} (KSO, no sorting function can be specified, but a transform can be
11764 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11765 (license license:expat)))
11766
11767 (define-public python-pypeg2
11768 (package
11769 (name "python-pypeg2")
11770 (version "2.15.2")
11771 (source
11772 (origin
11773 (method url-fetch)
11774 (uri (pypi-uri "pyPEG2" version))
11775 (sha256
11776 (base32
11777 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11778 (build-system python-build-system)
11779 (propagated-inputs `(("python-lxml" ,python-lxml)))
11780 (arguments
11781 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11782 '(#:tests? #f))
11783 (home-page "https://fdik.org/pyPEG/")
11784 (synopsis "Parsering Expression Grammars in Python")
11785 (description "PyPEG is an intrinsic parser interpreter framework for
11786 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11787 parse many formal languages.")
11788 (license license:gpl2)))
11789
11790 (define-public python-incremental
11791 (package
11792 (name "python-incremental")
11793 (version "17.5.0")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "incremental" version))
11798 (sha256
11799 (base32
11800 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11801 (build-system python-build-system)
11802 (home-page "https://github.com/hawkowl/incremental")
11803 (synopsis "Library for versioning Python projects")
11804 (description "Incremental is a small library that versions your Python
11805 projects.")
11806 (license license:expat)))
11807
11808 (define-public python2-incremental
11809 (package-with-python2 python-incremental))
11810
11811 (define-public python-invoke
11812 (package
11813 (name "python-invoke")
11814 (home-page "http://www.pyinvoke.org/")
11815 (version "1.1.0")
11816 (source (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "invoke" version))
11819 (sha256
11820 (base32
11821 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11822 (build-system python-build-system)
11823 (arguments
11824 ;; XXX: Requires many dependencies that are not yet in Guix.
11825 `(#:tests? #f))
11826 (synopsis "Pythonic task execution")
11827 (description
11828 "Invoke is a Python task execution tool and library, drawing inspiration
11829 from various sources to arrive at a powerful and clean feature set. It is
11830 evolved from the Fabric project, but focuses on local and abstract concerns
11831 instead of servers and network commands.")
11832 (license license:bsd-3)))
11833
11834 (define-public python2-invoke
11835 (package-with-python2 python-invoke))
11836
11837 (define-public python-automat
11838 (package
11839 (name "python-automat")
11840 (version "0.7.0")
11841 (source (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "Automat" version))
11844 (sha256
11845 (base32
11846 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11847 (build-system python-build-system)
11848 ;; We disable the tests because they require python-twisted, while
11849 ;; python-twisted depends on python-automat. Twisted is optional, but the
11850 ;; tests fail if it is not available. Also see
11851 ;; <https://github.com/glyph/automat/issues/71>.
11852 (arguments '(#:tests? #f))
11853 (native-inputs
11854 `(("python-m2r" ,python-m2r)
11855 ("python-setuptools-scm" ,python-setuptools-scm)
11856 ("python-graphviz" ,python-graphviz)))
11857 (propagated-inputs
11858 `(("python-six" ,python-six)
11859 ("python-attrs" ,python-attrs)))
11860 (home-page "https://github.com/glyph/Automat")
11861 (synopsis "Self-service finite-state machines")
11862 (description "Automat is a library for concise, idiomatic Python
11863 expression of finite-state automata (particularly deterministic finite-state
11864 transducers).")
11865 (license license:expat)))
11866
11867 (define-public python2-automat
11868 (package-with-python2 python-automat))
11869
11870 (define-public python-m2r
11871 (package
11872 (name "python-m2r")
11873 (version "0.2.1")
11874 (source (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "m2r" version))
11877 (sha256
11878 (base32
11879 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11880 (build-system python-build-system)
11881 (propagated-inputs
11882 `(("python-docutils" ,python-docutils)
11883 ("python-mistune" ,python-mistune)))
11884 (native-inputs
11885 `(("python-pygments" ,python-pygments)
11886 ("python-mock" ,python-mock)))
11887 (home-page "https://github.com/miyakogi/m2r")
11888 (synopsis "Markdown to reStructuredText converter")
11889 (description "M2R converts a markdown file including reST markups to valid
11890 reST format.")
11891 (license license:expat)))
11892
11893 (define-public python2-m2r
11894 (package-with-python2 python-m2r))
11895
11896 (define-public python-constantly
11897 (package
11898 (name "python-constantly")
11899 (version "15.1.0")
11900 (source (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "constantly" version))
11903 (sha256
11904 (base32
11905 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11906 (build-system python-build-system)
11907 (home-page "https://github.com/twisted/constantly")
11908 (synopsis "Symbolic constants in Python")
11909 (description "Constantly is a Python library that provides symbolic
11910 constant support. It includes collections and constants with text, numeric,
11911 and bit flag values.")
11912 (license license:expat)))
11913
11914 (define-public python2-constantly
11915 (package-with-python2 python-constantly))
11916
11917 (define-public python-attrs
11918 (package
11919 (name "python-attrs")
11920 (version "19.1.0")
11921 (source (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "attrs" version))
11924 (sha256
11925 (base32
11926 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11927 (build-system python-build-system)
11928 (arguments
11929 `(#:modules ((guix build utils)
11930 (guix build python-build-system)
11931 (ice-9 ftw)
11932 (srfi srfi-1)
11933 (srfi srfi-26))
11934 #:phases (modify-phases %standard-phases
11935 (replace 'check
11936 (lambda _
11937 (let ((cwd (getcwd)))
11938 (setenv "PYTHONPATH"
11939 (string-append
11940 cwd "/build/"
11941 (find (cut string-prefix? "lib" <>)
11942 (scandir (string-append cwd "/build")))
11943 ":"
11944 (getenv "PYTHONPATH")))
11945 (invoke "python" "-m" "pytest")))))))
11946 (native-inputs
11947 `(("python-coverage" ,python-coverage)
11948 ("python-hypothesis" ,python-hypothesis)
11949 ("python-pympler" ,python-pympler)
11950 ("python-pytest" ,python-pytest)
11951 ("python-six" ,python-six)
11952 ("python-sphinx" ,python-sphinx)
11953 ("python-zope-interface" ,python-zope-interface)))
11954 (home-page "https://github.com/python-attrs/attrs/")
11955 (synopsis "Attributes without boilerplate")
11956 (description "@code{attrs} is a Python package with class decorators that
11957 ease the chores of implementing the most common attribute-related object
11958 protocols.")
11959 (license license:expat)))
11960
11961 (define-public python2-attrs
11962 (package-with-python2 python-attrs))
11963
11964 (define-public python-attrs-bootstrap
11965 (package
11966 (inherit python-attrs)
11967 (name "python-attrs-bootstrap")
11968 (native-inputs `())
11969 (arguments `(#:tests? #f))))
11970
11971 (define-public python2-attrs-bootstrap
11972 (package-with-python2 python-attrs-bootstrap))
11973
11974 (define-public python2-cliapp
11975 (package
11976 (name "python2-cliapp")
11977 (version "1.20180812.1")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (string-append
11982 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11983 version ".tar.gz"))
11984 (sha256
11985 (base32
11986 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11987 (build-system python-build-system)
11988 (arguments
11989 `(#:python ,python-2
11990 #:phases
11991 (modify-phases %standard-phases
11992 ;; check phase needs to be run before the build phase. If not,
11993 ;; coverage-test-runner looks for tests for the built source files,
11994 ;; and fails.
11995 (delete 'check)
11996 (add-before 'build 'check
11997 (lambda _
11998 ;; Disable python3 tests
11999 (substitute* "check"
12000 (("python3") "# python3"))
12001 (invoke "./check"))))))
12002 (native-inputs
12003 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12004 ("python2-pep8" ,python2-pep8)))
12005 (propagated-inputs
12006 `(("python2-pyaml" ,python2-pyaml)))
12007 (home-page "https://liw.fi/cliapp/")
12008 (synopsis "Python framework for command line programs")
12009 (description "@code{python2-cliapp} is a python framework for
12010 command line programs. It contains the typical stuff such programs
12011 need to do, such as parsing the command line for options, and
12012 iterating over input files.")
12013 (license license:gpl2+)))
12014
12015 (define-public python2-ttystatus
12016 (package
12017 (name "python2-ttystatus")
12018 (version "0.36")
12019 (source
12020 (origin
12021 (method url-fetch)
12022 (uri (string-append
12023 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12024 version ".tar.gz"))
12025 (sha256
12026 (base32
12027 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12028 (build-system python-build-system)
12029 (native-inputs
12030 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12031 ("python2-pep8" ,python2-pep8)))
12032 (arguments
12033 `(#:python ,python-2
12034 #:phases
12035 (modify-phases %standard-phases
12036 ;; check phase needs to be run before the build phase. If not,
12037 ;; coverage-test-runner looks for tests for the built source files,
12038 ;; and fails.
12039 (delete 'check)
12040 (add-before 'build 'check
12041 (lambda _ (invoke "make" "check"))))))
12042 (home-page "https://liw.fi/ttystatus/")
12043 (synopsis "Python library for showing progress reporting and
12044 status updates on terminals")
12045 (description "@code{python2-ttystatus} is a python library for
12046 showing progress reporting and status updates on terminals, for
12047 command line programs. Output is automatically adapted to the width
12048 of the terminal: truncated if it does not fit, and resized if the
12049 terminal size changes.")
12050 (license license:gpl3+)))
12051
12052 (define-public python2-tracing
12053 (package
12054 (name "python2-tracing")
12055 (version "0.10")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (string-append
12060 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12061 version ".tar.gz"))
12062 (sha256
12063 (base32
12064 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12065 (build-system python-build-system)
12066 (arguments
12067 `(#:python ,python-2))
12068 (home-page "https://liw.fi/tracing/")
12069 (synopsis "Python debug logging helper")
12070 (description "@code{python2-tracing} is a python library for
12071 logging debug messages. It provides a way to turn debugging messages
12072 on and off, based on the filename they occur in. It is much faster
12073 than using @code{logging.Filter} to accomplish the same thing, which
12074 matters when code is run in production mode. The actual logging still
12075 happens using the @code{logging} library.")
12076 (license license:gpl3+)))
12077
12078 (define-public python2-larch
12079 (package
12080 (name "python2-larch")
12081 (version "1.20151025")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 (uri (string-append
12086 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12087 version ".tar.gz"))
12088 (patches (search-patches
12089 "python2-larch-coverage-4.0a6-compatibility.patch"))
12090 (sha256
12091 (base32
12092 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12093 (build-system python-build-system)
12094 (arguments
12095 `(#:python ,python-2
12096 #:phases
12097 (modify-phases %standard-phases
12098 ;; check phase needs to be run before the build phase. If not,
12099 ;; coverage-test-runner looks for tests for the built source files,
12100 ;; and fails.
12101 (delete 'check)
12102 (add-before 'build 'check
12103 (lambda _ (invoke "make" "check"))))))
12104 (native-inputs
12105 `(("cmdtest" ,cmdtest)
12106 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12107 (propagated-inputs
12108 `(("python2-tracing" ,python2-tracing)))
12109 (home-page "https://liw.fi/larch/")
12110 (synopsis "Python copy-on-write B-tree library")
12111 (description "@code{python2-larch} is an implementation of
12112 particular kind of B-tree, based on research by Ohad Rodeh. See
12113 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12114 on the data structure.
12115
12116 The distinctive feature of this B-tree is that a node is never
12117 (conceptually) modified. Instead, all updates are done by
12118 copy-on-write. This makes it easy to clone a tree, and modify only the
12119 clone, while other processes access the original tree.")
12120 (license license:gpl3+)))
12121
12122 (define-public python-astroid
12123 (package
12124 (name "python-astroid")
12125 (version "2.1.0")
12126 (source
12127 (origin
12128 (method url-fetch)
12129 (uri (pypi-uri "astroid" version))
12130 (sha256
12131 (base32
12132 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12133 (build-system python-build-system)
12134 (propagated-inputs
12135 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12136 ("python-six" ,python-six)
12137 ("python-wrapt" ,python-wrapt)))
12138 (native-inputs
12139 `(("python-dateutil" ,python-dateutil)
12140 ("python-nose" ,python-nose)
12141 ("python-pytest" ,python-pytest)
12142 ("python-pytest-runner" ,python-pytest-runner)))
12143 (arguments
12144 `(#:phases
12145 (modify-phases %standard-phases
12146 (add-after 'unpack 'remove-spurious-test
12147 (lambda _
12148 ;; This can be removed after upgrading from python-3.7
12149 ;; https://github.com/PyCQA/astroid/issues/593
12150 ;; https://bugs.python.org/issue34056
12151 (delete-file "astroid/tests/unittest_modutils.py")
12152 #t))
12153 (replace 'check
12154 (lambda _
12155 (invoke "pytest" "astroid"))))))
12156 (home-page "https://github.com/PyCQA/astroid")
12157 (synopsis "Common base representation of python source code for pylint and
12158 other projects")
12159 (description "@code{python-astroid} provides a common base representation
12160 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12161
12162 It provides a compatible representation which comes from the _ast module. It
12163 rebuilds the tree generated by the builtin _ast module by recursively walking
12164 down the AST and building an extended ast. The new node classes have
12165 additional methods and attributes for different usages. They include some
12166 support for static inference and local name scopes. Furthermore, astroid
12167 builds partial trees by inspecting living objects.")
12168 (license license:lgpl2.1+)
12169 (properties `((python2-variant . ,(delay python2-astroid))))))
12170
12171 (define-public python2-astroid
12172 (let ((base (package-with-python2
12173 (strip-python2-variant python-astroid))))
12174 (package (inherit base)
12175 ;; Version 2.x removes python2 support.
12176 (version "1.6.5")
12177 (source
12178 (origin
12179 (method url-fetch)
12180 (uri (pypi-uri "astroid" version))
12181 (sha256
12182 (base32
12183 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12184 (arguments
12185 (substitute-keyword-arguments (package-arguments base)
12186 ((#:phases phases)
12187 `(modify-phases ,phases
12188 (add-after 'unpack 'remove-spurious-test
12189 (lambda _
12190 ;; https://github.com/PyCQA/astroid/issues/276
12191 (delete-file "astroid/tests/unittest_brain.py")
12192 #t))
12193 (replace 'check
12194 (lambda _
12195 (invoke"python" "-m" "unittest" "discover"
12196 "-p" "unittest*.py")))))))
12197 (native-inputs `())
12198 (propagated-inputs
12199 `(("python2-backports-functools-lru-cache"
12200 ,python2-backports-functools-lru-cache)
12201 ("python2-enum34" ,python2-enum34)
12202 ("python2-singledispatch" ,python2-singledispatch)
12203 ,@(package-propagated-inputs base))))))
12204
12205 (define-public python-isort
12206 (package
12207 (name "python-isort")
12208 (version "4.3.4")
12209 (source
12210 (origin
12211 (method git-fetch)
12212 (uri (git-reference
12213 ;; Tests pass only from the Github sources
12214 (url "https://github.com/timothycrosley/isort")
12215 (commit version)))
12216 (file-name (git-file-name name version))
12217 (sha256
12218 (base32
12219 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12220 (build-system python-build-system)
12221 (native-inputs
12222 `(("python-mock" ,python-mock)
12223 ("python-pytest" ,python-pytest)))
12224 (home-page "https://github.com/timothycrosley/isort")
12225 (synopsis "Python utility/library to sort python imports")
12226 (description "@code{python-isort} is a python utility/library to sort
12227 imports alphabetically, and automatically separated into sections. It
12228 provides a command line utility, a python library and plugins for various
12229 editors.")
12230 (license license:expat)
12231 (properties `((python2-variant . ,(delay python2-isort))))))
12232
12233 (define-public python2-isort
12234 (let ((base (package-with-python2
12235 (strip-python2-variant python-isort))))
12236 (package (inherit base)
12237 (native-inputs
12238 `(("python2-futures" ,python2-futures)
12239 ,@(package-native-inputs base))))))
12240
12241 (define-public python2-backports-functools-lru-cache
12242 (package
12243 (name "python2-backports-functools-lru-cache")
12244 (version "1.5")
12245 (source
12246 (origin
12247 (method url-fetch)
12248 ;; only the pypi tarballs contain the necessary metadata
12249 (uri (pypi-uri "backports.functools_lru_cache" version))
12250 (sha256
12251 (base32
12252 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12253 (build-system python-build-system)
12254 (native-inputs
12255 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12256 (arguments
12257 `(#:python ,python-2))
12258 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12259 (synopsis "Backport of functools.lru_cache from Python 3.3")
12260 (description "@code{python2-backports-functools-lru-cache} is a backport
12261 of @code{functools.lru_cache} from python 3.3.")
12262 (license license:expat)))
12263
12264 (define-public python-configparser
12265 (package
12266 (name "python-configparser")
12267 (version "3.7.1")
12268 (source
12269 (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "configparser" version))
12272 (sha256
12273 (base32
12274 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12275 (build-system python-build-system)
12276 (home-page "https://github.com/jaraco/configparser/")
12277 (synopsis "Backport of configparser from python 3.5")
12278 (description "@code{python-configparser} is a backport of
12279 @code{configparser} from Python 3.5 so that it can be used directly
12280 in other versions.")
12281 (license license:expat)))
12282
12283 (define-public python2-configparser
12284 (package-with-python2 python-configparser))
12285
12286 (define-public python-mando
12287 (package
12288 (name "python-mando")
12289 (version "0.6.4")
12290 (source (origin
12291 (method url-fetch)
12292 (uri (pypi-uri "mando" version))
12293 (sha256
12294 (base32
12295 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12296 (build-system python-build-system)
12297 (propagated-inputs
12298 `(("python-rst2ansi" ,python-rst2ansi)
12299 ("python-six" ,python-six)))
12300 (native-inputs
12301 `(("python-pytest" ,python-pytest)))
12302 (home-page "https://mando.readthedocs.org/")
12303 (synopsis
12304 "Wrapper around argparse, allowing creation of complete CLI applications")
12305 (description
12306 "This package is a wrapper around argparse, allowing you to write complete CLI
12307 applications in seconds while maintaining all the flexibility.")
12308 (license license:expat)))
12309
12310 (define-public python2-mando
12311 (package-with-python2 python-mando))
12312
12313 (define-public python2-argparse
12314 (package
12315 (name "python2-argparse")
12316 (version "1.4.0")
12317 (source
12318 (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "argparse" version))
12321 (sha256
12322 (base32
12323 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12324 (build-system python-build-system)
12325 (arguments
12326 `(#:python ,python-2))
12327 (home-page "https://github.com/ThomasWaldmann/argparse/")
12328 (synopsis "Python command-line parsing library")
12329 (description
12330 "This package is mostly for people who want to have @code{argparse} on
12331 older Pythons because it was not part of the standard library back then.")
12332 (license license:psfl)))
12333
12334 (define-public python-fudge
12335 (package
12336 (name "python-fudge")
12337 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12338 ;; package, which is currently the only use of this package.
12339 (version "0.9.6")
12340 (source
12341 (origin
12342 (method url-fetch)
12343 (uri (pypi-uri "fudge" version))
12344 (sha256
12345 (base32
12346 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12347 (build-system python-build-system)
12348 (arguments
12349 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12350 (home-page "https://github.com/fudge-py/fudge")
12351 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12352 (description
12353 "Fudge is a Python module for using fake objects (mocks and stubs) to
12354 test real ones.
12355
12356 In readable Python code, you declare the methods available on your fake object
12357 and how they should be called. Then you inject that into your application and
12358 start testing. This declarative approach means you don’t have to record and
12359 playback actions and you don’t have to inspect your fakes after running code.
12360 If the fake object was used incorrectly then you’ll see an informative
12361 exception message with a traceback that points to the culprit.")
12362 (license license:expat)))
12363
12364 (define-public python2-fudge
12365 (package-with-python2 python-fudge))
12366
12367 (define-public python-mwclient
12368 (package
12369 (name "python-mwclient")
12370 (version "0.8.4")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 ;; The PyPI version wouldn't contain tests.
12375 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12376 "v" version ".tar.gz"))
12377 (file-name (string-append name "-" version ".tar.gz"))
12378 (sha256
12379 (base32
12380 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12381 (build-system python-build-system)
12382 (propagated-inputs
12383 `(("python-requests" ,python-requests)
12384 ("python-requests-oauthlib"
12385 ,python-requests-oauthlib)
12386 ("python-six" ,python-six)))
12387 (native-inputs
12388 `(("python-mock" ,python-mock)
12389 ("python-pytest" ,python-pytest)
12390 ("python-pytest-pep8" ,python-pytest-pep8)
12391 ("python-pytest-cache" ,python-pytest-cache)
12392 ("python-pytest-cov" ,python-pytest-cov)
12393 ("python-responses" ,python-responses)))
12394 (home-page "https://github.com/btongminh/mwclient")
12395 (synopsis "MediaWiki API client")
12396 (description "This package provides a MediaWiki API client.")
12397 (license license:expat)))
12398
12399 (define-public python2-mwclient
12400 (package-with-python2 python-mwclient))
12401
12402 (define-public python-utils
12403 (package
12404 (name "python-utils")
12405 (version "2.1.0")
12406 (source (origin
12407 (method url-fetch)
12408 (uri (pypi-uri "python-utils" version))
12409 (sha256
12410 (base32
12411 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12412 (build-system python-build-system)
12413 (native-inputs
12414 `(("pytest-runner" ,python-pytest-runner)
12415 ("pytest" ,python-pytest)
12416 ("six" ,python-six)))
12417 (home-page "https://github.com/WoLpH/python-utils")
12418 (synopsis "Convenient utilities not included with the standard Python install")
12419 (description
12420 "Python Utils is a collection of small Python functions and classes which
12421 make common patterns shorter and easier.")
12422 (license license:bsd-2)))
12423
12424 (define-public python2-utils
12425 (package-with-python2 python-utils))
12426
12427 (define-public python-diff-match-patch
12428 (package
12429 (name "python-diff-match-patch")
12430 (version "20121119")
12431 (source
12432 (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "diff-match-patch" version))
12435 (sha256
12436 (base32
12437 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12438 (build-system python-build-system)
12439 (home-page "https://code.google.com/p/google-diff-match-patch")
12440 (synopsis "Synchronize plain text")
12441 (description "Diff Match and Patch libraries offer robust algorithms to
12442 perform the operations required for synchronizing plain text.")
12443 (license license:asl2.0)))
12444
12445 (define-public python2-diff-match-patch
12446 (package-with-python2 python-diff-match-patch))
12447
12448 (define-public python-dirsync
12449 (package
12450 (name "python-dirsync")
12451 (version "2.2.3")
12452 (source
12453 (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "dirsync" version))
12456 (sha256
12457 (base32
12458 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12459 (build-system python-build-system)
12460 (propagated-inputs
12461 `(("six" ,python-six)))
12462 (home-page "https://bitbucket.org/tkhyn/dirsync")
12463 (synopsis "Advanced directory tree synchronisation tool")
12464 (description "Advanced directory tree synchronisation tool.")
12465 (license license:expat)))
12466
12467 (define-public python2-dirsync
12468 (package-with-python2 python-dirsync))
12469
12470 (define-public python-levenshtein
12471 (package
12472 (name "python-levenshtein")
12473 (version "0.12.0")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (pypi-uri "python-Levenshtein" version))
12478 (sha256
12479 (base32
12480 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12481 (build-system python-build-system)
12482 (home-page "https://github.com/ztane/python-Levenshtein")
12483 (synopsis "Fast computation of Levenshtein distance and string similarity")
12484 (description
12485 "The Levenshtein Python C extension module contains functions for fast computation of
12486 @enumerate
12487 @item Levenshtein (edit) distance, and edit operations
12488 @item string similarity
12489 @item approximate median strings, and generally string averaging
12490 @item string sequence and set similarity
12491 @end enumerate
12492 It supports both normal and Unicode strings.")
12493 (license license:gpl2+)))
12494
12495 (define-public python2-levenshtein
12496 (package-with-python2 python-levenshtein))
12497
12498 (define-public python-scandir
12499 (package
12500 (name "python-scandir")
12501 (version "1.9.0")
12502 (source
12503 (origin
12504 (method url-fetch)
12505 (uri (pypi-uri "scandir" version))
12506 (sha256
12507 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12508 (build-system python-build-system)
12509 (arguments
12510 `(#:phases (modify-phases %standard-phases
12511 (replace 'check
12512 (lambda _
12513 (invoke "python" "test/run_tests.py"))))))
12514 (home-page "https://github.com/benhoyt/scandir")
12515 (synopsis "Directory iteration function")
12516 (description
12517 "Directory iteration function like os.listdir(), except that instead of
12518 returning a list of bare filenames, it yields DirEntry objects that include
12519 file type and stat information along with the name. Using scandir() increases
12520 the speed of os.walk() by 2-20 times (depending on the platform and file
12521 system) by avoiding unnecessary calls to os.stat() in most cases.
12522
12523 This package is part of the Python standard library since version 3.5.")
12524 (license license:bsd-3)))
12525
12526 (define-public python2-scandir
12527 (package-with-python2 python-scandir))
12528
12529 (define-public python2-stemming
12530 (package
12531 (name "python2-stemming")
12532 (version "1.0.1")
12533 (source
12534 (origin
12535 (method url-fetch)
12536 (uri (pypi-uri "stemming" version))
12537 (sha256
12538 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12539 (build-system python-build-system)
12540 (arguments
12541 `(#:python ,python-2))
12542 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12543 (synopsis "Python implementations of various stemming algorithms")
12544 (description
12545 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12546 stemming algorithms for English. These implementations are straightforward and
12547 efficient, unlike some Python versions of the same algorithms available on the
12548 Web. This package is an extraction of the stemming code included in the Whoosh
12549 search engine.")
12550 (license license:public-domain)))
12551
12552 (define-public python-factory-boy
12553 (package
12554 (name "python-factory-boy")
12555 (version "2.8.1")
12556 (source
12557 (origin
12558 (method url-fetch)
12559 (uri (pypi-uri "factory_boy" version))
12560 (sha256
12561 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12562 (build-system python-build-system)
12563 (arguments
12564 ;; Tests are not included in the tarball.
12565 `(#:tests? #f))
12566 (propagated-inputs
12567 `(("faker" ,python-faker)))
12568 (home-page "https://github.com/benhoyt/scandir")
12569 (synopsis "Versatile test fixtures replacement")
12570 (description
12571 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12572
12573 As a fixtures replacement tool, it aims to replace static, hard to maintain
12574 fixtures with easy-to-use factories for complex object.
12575
12576 Instead of building an exhaustive test setup with every possible combination
12577 of corner cases, factory_boy allows you to use objects customized for the
12578 current test, while only declaring the test-specific fields")
12579 (license license:expat)))
12580
12581 (define-public python2-factory-boy
12582 (package-with-python2 python-factory-boy))
12583
12584 (define-public python-translate-toolkit
12585 (package
12586 (name "python-translate-toolkit")
12587 (version "2.1.0")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12592 (sha256
12593 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12594 (build-system python-build-system)
12595 (native-inputs
12596 `(("python-pytest" ,python-pytest)
12597 ("python-sphinx" ,python-sphinx)))
12598 (propagated-inputs
12599 `(("python-babel" ,python-babel)
12600 ("python-beautifulsoup4" ,python-beautifulsoup4)
12601 ("python-chardet" ,python-chardet)
12602 ("python-diff-match-patch" ,python-diff-match-patch)
12603 ("python-levenshtein" ,python-levenshtein)
12604 ("python-lxml" ,python-lxml)
12605 ("python-six" ,python-six)
12606 ("python-vobject" ,python-vobject)
12607 ("python-pyyaml" ,python-pyyaml)))
12608 (arguments
12609 ;; TODO: tests are not run, because they end with
12610 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12611 ;; 'parse_funcs'
12612 ;; during test setup.
12613 `(#:tests? #f))
12614 (home-page "https://toolkit.translatehouse.org")
12615 (synopsis "Tools and API for translation and localization engineering")
12616 (description
12617 "Tools and API for translation and localization engineering. It contains
12618 several utilities, as well as an API for building localization tools.")
12619 (license license:gpl2+)))
12620
12621 (define-public python2-translate-toolkit
12622 (package-with-python2 python-translate-toolkit))
12623
12624 (define-public python-packaging
12625 (package
12626 (name "python-packaging")
12627 (version "19.0")
12628 (source
12629 (origin
12630 (method url-fetch)
12631 (uri (pypi-uri "packaging" version))
12632 (sha256
12633 (base32
12634 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12635 (build-system python-build-system)
12636 (arguments
12637 `(#:phases (modify-phases %standard-phases
12638 (replace 'check
12639 (lambda _ (invoke "py.test" "-vv"))))))
12640 (native-inputs
12641 `(("python-pretend" ,python-pretend)
12642 ("python-pytest" ,python-pytest)))
12643 (propagated-inputs
12644 `(("python-pyparsing" ,python-pyparsing)
12645 ("python-six" ,python-six)))
12646 (home-page "https://github.com/pypa/packaging")
12647 (synopsis "Core utilities for Python packages")
12648 (description "Packaging is a Python module for dealing with Python packages.
12649 It offers an interface for working with package versions, names, and dependency
12650 information.")
12651 ;; From 'LICENSE': This software is made available under the terms of
12652 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12653 ;; Contributions to this software is made under the terms of *both* these
12654 ;; licenses.
12655 (license (list license:asl2.0 license:bsd-2))))
12656
12657 (define-public python2-packaging
12658 (package-with-python2 python-packaging))
12659
12660 (define-public python-relatorio
12661 (package
12662 (name "python-relatorio")
12663 (version "0.8.0")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "relatorio" version))
12668 (sha256
12669 (base32
12670 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12671 (build-system python-build-system)
12672 (propagated-inputs
12673 `(("python-lxml" ,python-lxml)
12674 ("python-genshi" ,python-genshi)))
12675 (native-inputs
12676 `(("python-magic" ,python-magic)))
12677 (home-page "https://relatorio.tryton.org/")
12678 (synopsis "Templating library able to output ODT and PDF files")
12679 (description "Relatorio is a templating library which provides a way to
12680 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12681 for more filetypes can be easily added by creating plugins for them.")
12682 (license license:gpl3+)))
12683
12684 (define-public python2-relatorio
12685 (package-with-python2 python-relatorio))
12686
12687 (define-public python-radon
12688 (package
12689 (name "python-radon")
12690 (version "2.2.0")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "radon" version))
12695 (sha256
12696 (base32
12697 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12698 (build-system python-build-system)
12699 (arguments
12700 `(#:phases (modify-phases %standard-phases
12701 (replace 'check
12702 (lambda _
12703 (invoke "python" "radon/tests/run.py"))))))
12704 (propagated-inputs
12705 `(("python-colorama" ,python-colorama)
12706 ("python-flake8-polyfill" ,python-flake8-polyfill)
12707 ("python-mando" ,python-mando)))
12708 (native-inputs
12709 `(("python-pytest" ,python-pytest)
12710 ("python-pytest-mock" ,python-pytest-mock)))
12711 (home-page "https://radon.readthedocs.org/")
12712 (synopsis "Code Metrics in Python")
12713 (description "Radon is a Python tool which computes various code metrics.
12714 Supported metrics are:
12715 @itemize @bullet
12716 @item raw metrics: SLOC, comment lines, blank lines, &c.
12717 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12718 @item Halstead metrics (all of them)
12719 @item the Maintainability Index (a Visual Studio metric)
12720 @end itemize")
12721 (license license:expat)))
12722
12723 (define-public python2-radon
12724 (package-with-python2 python-radon))
12725
12726 (define-public python-sure
12727 (package
12728 (name "python-sure")
12729 (version "1.4.11")
12730 (source
12731 (origin
12732 (method url-fetch)
12733 (uri (pypi-uri "sure" version))
12734 (sha256
12735 (base32
12736 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12737 (build-system python-build-system)
12738 (propagated-inputs
12739 `(("python-mock" ,python-mock)
12740 ("python-six" ,python-six)))
12741 (native-inputs
12742 `(("python-nose" ,python-nose)))
12743 (home-page "https://github.com/gabrielfalcao/sure")
12744 (synopsis "Automated testing library in python for python")
12745 (description
12746 "Sure is a python library that leverages a DSL for writing assertions.
12747 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12748 (license license:gpl3+)))
12749
12750 (define-public python2-sure
12751 (package-with-python2 python-sure))
12752
12753 (define-public python2-couleur
12754 ;; This package does not seem to support python3 at all, hence,
12755 ;; only the python2 variant definition is provided.
12756 (package
12757 (name "python2-couleur")
12758 (version "0.6.2")
12759 (source
12760 (origin
12761 (method url-fetch)
12762 (uri (pypi-uri "couleur" version))
12763 (sha256
12764 (base32
12765 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12766 (build-system python-build-system)
12767 (arguments
12768 `(#:python ,python-2))
12769 (home-page "https://github.com/gabrielfalcao/couleur")
12770 (synopsis
12771 "ANSI terminal tool for python, colored shell and other handy fancy features")
12772 (description
12773 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12774 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12775 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12776 ;; https://github.com/gabrielfalcao/couleur/issues/11
12777 (license license:lgpl3+)))
12778
12779 (define-public python-misaka
12780 (package
12781 (name "python-misaka")
12782 (version "2.1.1")
12783 (source
12784 (origin
12785 (method url-fetch)
12786 (uri (pypi-uri "misaka" version))
12787 (sha256
12788 (base32
12789 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12790 (build-system python-build-system)
12791 (arguments
12792 `(;; Line 37 of setup.py calls self.run_command('develop')
12793 ;; in the 'check' phase. This command seems to be trying
12794 ;; to write to
12795 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12796 ;; for which it does not have the permission to write.
12797 #:tests? #f))
12798 (propagated-inputs
12799 `(("python-cffi" ,python-cffi)))
12800 (home-page "https://github.com/FSX/misaka")
12801 (synopsis "Python binding for Hoedown")
12802 (description
12803 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12804 library written in C. It features a fast HTML renderer and functionality to make custom
12805 renderers (e.g. man pages or LaTeX).")
12806 (license license:expat)))
12807
12808 (define-public python2-misaka
12809 (package-with-python2 python-misaka))
12810
12811 (define-public python2-steadymark
12812 ;; This is forced into being a python2 only variant
12813 ;; due to its dependence on couleur that has no support
12814 ;; for python3
12815 (package
12816 (name "python2-steadymark")
12817 (version "0.7.3")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "steadymark" version))
12822 (sha256
12823 (base32
12824 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12825 (build-system python-build-system)
12826 (native-inputs
12827 `(("python-couleur" ,python2-couleur)
12828 ("python-sure" ,python2-sure)
12829 ("python-misaka" ,python2-misaka)))
12830 (arguments
12831 `(#:python ,python-2
12832 #:phases
12833 (modify-phases %standard-phases
12834 (add-before 'build 'patch-setup-py
12835 (lambda _
12836 ;; Update requirements from dependency==version
12837 ;; to dependency>=version
12838 (substitute* "setup.py"
12839 (("==") ">="))
12840 #t)))))
12841 (home-page "https://github.com/gabrielfalcao/steadymark")
12842 (synopsis "Markdown-based test runner for python")
12843 (description
12844 "@code{Steadymark} allows documentation to be written in github-flavoured
12845 markdown. The documentation may contain snippets of code surrounded by python
12846 code blocks and @code{Steadymark} will find these snippets and run them, making
12847 sure that there are no old malfunctional examples in the documentation examples.")
12848 (license license:expat)))
12849
12850 (define-public python-jsonpointer
12851 (package
12852 (name "python-jsonpointer")
12853 (version "1.10")
12854 (source
12855 (origin
12856 (method url-fetch)
12857 (uri (pypi-uri "jsonpointer" version))
12858 (sha256
12859 (base32
12860 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12861 (build-system python-build-system)
12862 (home-page "https://github.com/stefankoegl/python-json-pointer")
12863 (synopsis "Identify specific nodes in a JSON document")
12864 (description "@code{jsonpointer} allows you to access specific nodes
12865 by path in a JSON document (see RFC 6901).")
12866 (license license:bsd-3)))
12867
12868 (define-public python2-jsonpointer
12869 (package-with-python2 python-jsonpointer))
12870
12871 (define-public python-jsonpatch
12872 (package
12873 (name "python-jsonpatch")
12874 (version "1.16")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 ;; pypi version lacks tests.js
12879 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12880 "archive/v" version ".tar.gz"))
12881 (file-name (string-append name "-" version ".tar.gz"))
12882 (sha256
12883 (base32
12884 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12885 (build-system python-build-system)
12886 (native-inputs
12887 `(("python-jsonpointer" ,python-jsonpointer)))
12888 (home-page "https://github.com/stefankoegl/python-json-patch")
12889 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12890 (description "@code{jsonpatch} is a library and program that allows
12891 applying JSON Patches according to RFC 6902.")
12892 (license license:bsd-3)))
12893
12894 (define-public python2-jsonpatch
12895 (package-with-python2 python-jsonpatch))
12896
12897 (define-public python-jsonpatch-0.4
12898 (package (inherit python-jsonpatch)
12899 (name "python-jsonpatch")
12900 (version "0.4")
12901 (source
12902 (origin
12903 (method url-fetch)
12904 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12905 "archive/v" version ".tar.gz"))
12906 (file-name (string-append name "-" version ".tar.gz"))
12907 (sha256
12908 (base32
12909 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12910
12911 (define-public python2-jsonpatch-0.4
12912 (package-with-python2 python-jsonpatch-0.4))
12913
12914 (define-public python-rfc3986
12915 (package
12916 (name "python-rfc3986")
12917 (version "1.1.0")
12918 (source (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "rfc3986" version))
12921 (sha256
12922 (base32
12923 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12924 (build-system python-build-system)
12925 (arguments
12926 `(#:modules ((guix build utils)
12927 (guix build python-build-system)
12928 (ice-9 ftw)
12929 (srfi srfi-1)
12930 (srfi srfi-26))
12931 #:phases
12932 (modify-phases %standard-phases
12933 (replace 'check
12934 (lambda _
12935 (let ((cwd (getcwd)))
12936 (setenv "PYTHONPATH"
12937 (string-append cwd "/build/"
12938 (find (cut string-prefix? "lib" <>)
12939 (scandir (string-append cwd "/build")))
12940 ":"
12941 (getenv "PYTHONPATH")))
12942 (invoke "pytest" "-v")))))))
12943 (native-inputs
12944 `(("python-pytest" ,python-pytest)))
12945 (home-page "https://rfc3986.readthedocs.io/")
12946 (synopsis "Parse and validate URI references")
12947 (description
12948 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12949 validation and authority parsing. This module also supports RFC@tie{}6874
12950 which adds support for zone identifiers to IPv6 addresses.")
12951 (license license:asl2.0)))
12952
12953 (define-public python2-rfc3986
12954 (package-with-python2 python-rfc3986))
12955
12956 (define-public python-rfc3987
12957 (package
12958 (name "python-rfc3987")
12959 (version "1.3.7")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "rfc3987" version))
12964 (sha256
12965 (base32
12966 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12967 (build-system python-build-system)
12968 (home-page "https://pypi.python.org/pypi/rfc3987")
12969 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12970 (description "@code{rfc3987} provides routines for parsing and
12971 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12972 (license license:gpl3+)))
12973
12974 (define-public python2-rfc3987
12975 (package-with-python2 python-rfc3987))
12976
12977 (define-public python-validate-email
12978 (package
12979 (name "python-validate-email")
12980 (version "1.3")
12981 (source
12982 (origin
12983 (method url-fetch)
12984 (uri (pypi-uri "validate_email" version))
12985 (sha256
12986 (base32
12987 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12988 (build-system python-build-system)
12989 (home-page "https://github.com/syrusakbary/validate_email")
12990 (synopsis "Verifies if an email address is valid and really exists")
12991 (description "@code{validate_email} can be used to verify if an email
12992 address is valid and really exists.")
12993 (license license:lgpl3+)))
12994
12995 (define-public python2-validate-email
12996 (package-with-python2 python-validate-email))
12997
12998 (define-public python-flex
12999 (package
13000 (name "python-flex")
13001 (version "6.10.0")
13002 (source
13003 (origin
13004 (method url-fetch)
13005 (uri (pypi-uri "flex" version))
13006 (sha256
13007 (base32
13008 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13009 (build-system python-build-system)
13010 (propagated-inputs
13011 `(("python-click" ,python-click)
13012 ("python-iso8601" ,python-iso8601)
13013 ("python-jsonpointer" ,python-jsonpointer)
13014 ("python-pyyaml" ,python-pyyaml)
13015 ("python-requests" ,python-requests)
13016 ("python-rfc3987" ,python-rfc3987)
13017 ("python-six" ,python-six)
13018 ("python-validate-email" ,python-validate-email)))
13019 (home-page "https://github.com/pipermerriam/flex")
13020 (synopsis "Validates Swagger schemata")
13021 (description "@code{flex} can be used to validate Swagger schemata.")
13022 (license license:bsd-3)))
13023
13024 (define-public python2-flex
13025 (package-with-python2 python-flex))
13026
13027 (define-public python-marshmallow
13028 (package
13029 (name "python-marshmallow")
13030 (version "3.0.0b14")
13031 (source
13032 (origin
13033 (method url-fetch)
13034 (uri (pypi-uri "marshmallow" version))
13035 (sha256
13036 (base32
13037 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13038 (build-system python-build-system)
13039 (propagated-inputs
13040 `(("python-dateutil" ,python-dateutil)
13041 ("python-simplejson" ,python-simplejson)))
13042 (native-inputs
13043 `(("python-pytest" ,python-pytest)
13044 ("python-pytz" ,python-pytz)))
13045 (home-page "https://github.com/marshmallow-code/marshmallow")
13046 (synopsis "Convert complex datatypes to and from native
13047 Python datatypes.")
13048 (description "@code{marshmallow} provides a library for converting
13049 complex datatypes to and from native Python datatypes.")
13050 (license license:expat)))
13051
13052 (define-public python2-marshmallow
13053 (package-with-python2 python-marshmallow))
13054
13055 (define-public python-apispec
13056 (package
13057 (name "python-apispec")
13058 (version "0.25.3")
13059 (source
13060 (origin
13061 (method url-fetch)
13062 (uri (pypi-uri "apispec" version))
13063 (sha256
13064 (base32
13065 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13066 (build-system python-build-system)
13067 (propagated-inputs
13068 `(("python-pyyaml" ,python-pyyaml)))
13069 (native-inputs
13070 `(("python-pytest" ,python-pytest)
13071 ("python-flask" ,python-flask)
13072 ("python-marshmallow" ,python-marshmallow)
13073 ("python-tornado" ,python-tornado)
13074 ("python-bottle" ,python-bottle)
13075 ("python-mock" ,python-mock)))
13076 (home-page "https://github.com/marshmallow-code/apispec")
13077 (synopsis "Swagger 2.0 API specification generator")
13078 (description "@code{python-apispec} is a pluggable API specification
13079 generator. Currently supports the OpenAPI specification (f.k.a.
13080 Swagger 2.0).")
13081 (license license:expat)))
13082
13083 (define-public python2-apispec
13084 (package-with-python2 python-apispec))
13085
13086 (define-public python-flasgger
13087 (package
13088 (name "python-flasgger")
13089 (version "0.6.3")
13090 (source
13091 (origin
13092 (method git-fetch)
13093 (uri (git-reference
13094 (url "https://github.com/rochacbruno/flasgger.git")
13095 (commit version)))
13096 (file-name (git-file-name name version))
13097 (sha256
13098 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13099 (build-system python-build-system)
13100 (arguments
13101 `(#:phases
13102 (modify-phases %standard-phases
13103 (replace 'check
13104 (lambda* (#:key inputs outputs #:allow-other-keys)
13105 (substitute* "Makefile"
13106 (("flake8 flasgger --ignore=F403")
13107 "flake8 flasgger --ignore=E731,F403"))
13108 (setenv "PYTHONPATH" (string-append (getcwd)
13109 ":"
13110 (getenv "PYTHONPATH")))
13111 (invoke "py.test"))))))
13112 (propagated-inputs
13113 `(("python-flask" ,python-flask)
13114 ("python-pyyaml" ,python-pyyaml)
13115 ("python-jsonschema" ,python-jsonschema)
13116 ("python-mistune" ,python-mistune)
13117 ("python-six" ,python-six)))
13118 (native-inputs
13119 `(("python-decorator" ,python-decorator)
13120 ("python-flake8" ,python-flake8)
13121 ("python-flask-restful" ,python-flask-restful)
13122 ("python-flex" ,python-flex)
13123 ("python-pytest" ,python-pytest)
13124 ("python-pytest-cov" ,python-pytest-cov)
13125 ("python-marshmallow" ,python-marshmallow)
13126 ("python-apispec" ,python-apispec)))
13127 (home-page "https://github.com/rochacbruno/flasgger/")
13128 (synopsis "Extract Swagger specs from your Flask project")
13129 (description "@code{python-flasgger} allows extracting Swagger specs
13130 from your Flask project. It is a fork of Flask-Swagger.")
13131 (license license:expat)))
13132
13133 (define-public python2-flasgger
13134 (package-with-python2 python-flasgger))
13135
13136 (define-public python-swagger-spec-validator
13137 (package
13138 (name "python-swagger-spec-validator")
13139 (version "2.4.3")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "swagger-spec-validator" version))
13144 (sha256
13145 (base32
13146 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13147 (build-system python-build-system)
13148 (propagated-inputs
13149 `(("python-jsonschema" ,python-jsonschema)
13150 ("python-pyyaml" ,python-pyyaml)
13151 ("python-six" ,python-six)))
13152 (home-page
13153 "https://github.com/Yelp/swagger_spec_validator")
13154 (synopsis "Validation of Swagger specifications")
13155 (description "@code{swagger_spec_validator} provides a library for
13156 validating Swagger API specifications.")
13157 (license license:asl2.0)))
13158
13159 (define-public python2-swagger-spec-validator
13160 (package-with-python2 python-swagger-spec-validator))
13161
13162 (define-public python-apache-libcloud
13163 (package
13164 (name "python-apache-libcloud")
13165 (version "2.4.0")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (pypi-uri "apache-libcloud" version))
13170 (sha256
13171 (base32
13172 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13173 (build-system python-build-system)
13174 (arguments
13175 `(#:phases
13176 (modify-phases %standard-phases
13177 (add-after 'unpack 'patch-ssh
13178 (lambda* (#:key inputs #:allow-other-keys)
13179 (substitute* "libcloud/compute/ssh.py"
13180 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13181 "/bin/ssh" "'")))
13182 #t))
13183 (add-after 'unpack 'patch-tests
13184 (lambda _
13185 (substitute* "./libcloud/test/test_file_fixtures.py"
13186 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13187 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13188 return (httplib.OK,
13189 \"1234abcd\",
13190 {\"test\": \"value\"},
13191 httplib.responses[httplib.OK])
13192 def _ascii"))
13193 (substitute* "libcloud/test/compute/test_ssh_client.py"
13194 (("class ShellOutSSHClientTests")
13195 "@unittest.skip(\"Guix container doesn't have ssh service\")
13196 class ShellOutSSHClientTests")
13197 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13198 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13199 (("'.xF0', '.x90', '.x8D', '.x88'")
13200 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13201 #t))
13202 (add-before 'check 'copy-secret
13203 (lambda _
13204 (copy-file "libcloud/test/secrets.py-dist"
13205 "libcloud/test/secrets.py")
13206 #t)))))
13207 (inputs
13208 `(("openssh" ,openssh)))
13209 (propagated-inputs
13210 `(("python-paramiko" ,python-paramiko)
13211 ("python-requests" ,python-requests)))
13212 (native-inputs
13213 `(("python-lockfile" ,python-lockfile)
13214 ("python-mock" ,python-mock)
13215 ("python-pytest" ,python-pytest)
13216 ("python-pytest-runner" ,python-pytest-runner)
13217 ("python-requests-mock" ,python-requests-mock)))
13218 (home-page "https://libcloud.apache.org/")
13219 (synopsis "Unified Cloud API")
13220 (description "@code{libcloud} is a Python library for interacting with
13221 many of the popular cloud service providers using a unified API.")
13222 (license license:asl2.0)))
13223
13224 (define-public python2-apache-libcloud
13225 (package-with-python2 python-apache-libcloud))
13226
13227 (define-public python-smmap2
13228 (package
13229 (name "python-smmap2")
13230 (version "2.0.3")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "smmap2" version))
13235 (sha256
13236 (base32
13237 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13238 (build-system python-build-system)
13239 (native-inputs
13240 `(("python-nosexcover" ,python-nosexcover)))
13241 (home-page "https://github.com/Byron/smmap")
13242 (synopsis "Python sliding window memory map manager")
13243 (description "@code{smmap2} is a pure Python implementation of a sliding
13244 window memory map manager.")
13245 (license license:bsd-3)))
13246
13247 (define-public python2-smmap2
13248 (package-with-python2 python-smmap2))
13249
13250 (define-public python-regex
13251 (package
13252 (name "python-regex")
13253 (version "2019.04.14")
13254 (source (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "regex" version))
13257 (sha256
13258 (base32
13259 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13260 ;; TODO: Fix and enable regex_test.py tests that complain about the
13261 ;; test.support module not existing.
13262 (build-system python-build-system)
13263 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13264 (synopsis "Alternative regular expression module")
13265 (description "This regular expression implementation is backwards-
13266 compatible with the standard @code{re} module, but offers additional
13267 functionality like full case-folding for case-insensitive matches in Unicode.")
13268 (license license:psfl)))
13269
13270 (define-public python2-regex
13271 (package-with-python2 python-regex))
13272
13273 (define-public python2-pyopengl
13274 (package
13275 (name "python2-pyopengl")
13276 (version "3.1.0")
13277 (source
13278 (origin
13279 (method url-fetch)
13280 (uri (pypi-uri "PyOpenGL" version))
13281 (sha256
13282 (base32
13283 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13284 (arguments
13285 `(#:python ,python-2))
13286 (build-system python-build-system)
13287 (home-page "http://pyopengl.sourceforge.net")
13288 (synopsis "Standard OpenGL bindings for Python")
13289 (description
13290 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13291 related APIs. The binding is created using the standard @code{ctypes}
13292 library.")
13293 (license license:bsd-3)))
13294
13295 (define-public python2-pyopengl-accelerate
13296 (package
13297 (inherit python2-pyopengl)
13298 (name "python2-pyopengl-accelerate")
13299 (version "3.1.0")
13300 (source
13301 (origin
13302 (method url-fetch)
13303 (uri (pypi-uri "PyOpenGL-accelerate" version))
13304 (sha256
13305 (base32
13306 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13307 (synopsis "Acceleration code for PyOpenGL")
13308 (description
13309 "This is the Cython-coded accelerator module for PyOpenGL.")))
13310
13311 (define-public python-rencode
13312 (package
13313 (name "python-rencode")
13314 (version "1.0.5")
13315 (source
13316 (origin
13317 (method url-fetch)
13318 (uri (pypi-uri "rencode" version))
13319 (sha256
13320 (base32
13321 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13322 (build-system python-build-system)
13323 (arguments
13324 `(#:phases
13325 (modify-phases %standard-phases
13326 (add-before 'check 'delete-bogus-test
13327 ;; This test requires /home/aresch/Downloads, which is not provided by
13328 ;; the build environment.
13329 (lambda _
13330 (delete-file "rencode/t.py")
13331 #t)))))
13332 (native-inputs `(("pkg-config" ,pkg-config)
13333 ("python-cython" ,python-cython)))
13334 (home-page "https://github.com/aresch/rencode")
13335 (synopsis "Serialization of heterogeneous data structures")
13336 (description
13337 "The @code{rencode} module is a data structure serialization library,
13338 similar to @code{bencode} from the BitTorrent project. For complex,
13339 heterogeneous data structures with many small elements, r-encoding stake up
13340 significantly less space than b-encodings. This version of rencode is a
13341 complete rewrite in Cython to attempt to increase the performance over the
13342 pure Python module.")
13343 (license license:bsd-3)))
13344
13345 (define-public python2-rencode
13346 (package-with-python2 python-rencode))
13347
13348 (define-public python-xenon
13349 (package
13350 (name "python-xenon")
13351 (version "0.5.4")
13352 (source
13353 (origin
13354 (method url-fetch)
13355 (uri (pypi-uri "xenon" version))
13356 (sha256
13357 (base32
13358 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13359 (build-system python-build-system)
13360 (native-inputs
13361 `(("python-pyyaml" ,python-pyyaml)
13362 ("python-radon" ,python-radon)
13363 ("python-requests" ,python-requests)
13364 ("python-flake8" ,python-flake8)
13365 ("python-tox" ,python-tox)))
13366 (arguments
13367 `(#:phases
13368 (modify-phases %standard-phases
13369 (add-before 'build 'patch-test-requirements
13370 (lambda _
13371 ;; Remove httpretty dependency for tests.
13372 (substitute* "setup.py"
13373 (("httpretty") ""))
13374 #t)))))
13375 (home-page "https://xenon.readthedocs.org/")
13376 (synopsis "Monitor code metrics for Python on your CI server")
13377 (description
13378 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13379 Ideally, @code{xenon} is run every time code is committed. Through command
13380 line options, various thresholds can be set for the complexity of code. It
13381 will fail (i.e. it will exit with a non-zero exit code) when any of these
13382 requirements is not met.")
13383 (license license:expat)))
13384
13385 (define-public python2-xenon
13386 (package-with-python2 python-xenon))
13387
13388 (define-public python-pysocks
13389 (package
13390 (name "python-pysocks")
13391 (version "1.7.0")
13392 (source
13393 (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "PySocks" version))
13396 (sha256
13397 (base32
13398 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13399 (build-system python-build-system)
13400 (arguments `(#:tests? #f))
13401 (home-page "https://github.com/Anorov/PySocks")
13402 (synopsis "SOCKS client module")
13403 (description "@code{pysocks} is an updated and semi-actively maintained
13404 version of @code{SocksiPy} with bug fixes and extra features.")
13405 (license license:bsd-3)))
13406
13407 (define-public python2-pysocks
13408 (package-with-python2 python-pysocks))
13409
13410 (define-public python-pydiff
13411 (package
13412 (name "python-pydiff")
13413 (version "0.2")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "pydiff" version))
13418 (sha256
13419 (base32
13420 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13421 (build-system python-build-system)
13422 (home-page "https://github.com/myint/pydiff")
13423 (synopsis "Library to diff two Python files at the bytecode level")
13424 (description
13425 "@code{pydiff} makes it easy to look for actual code changes while
13426 ignoring formatting changes.")
13427 (license license:expat)))
13428
13429 (define-public python2-pydiff
13430 (package-with-python2 python-pydiff))
13431
13432 (define-public python-tqdm
13433 (package
13434 (name "python-tqdm")
13435 (version "4.19.6")
13436 (source
13437 (origin
13438 (method url-fetch)
13439 (uri (pypi-uri "tqdm" version))
13440 (sha256
13441 (base32
13442 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13443 (build-system python-build-system)
13444 (native-inputs
13445 `(("python-flake8" ,python-flake8)
13446 ("python-nose" ,python-nose)
13447 ("python-coverage" ,python-coverage)))
13448 (home-page "https://github.com/tqdm/tqdm")
13449 (synopsis "Fast, extensible progress meter")
13450 (description
13451 "Make loops show a progress bar on the console by just wrapping any
13452 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13453 design and layout.")
13454 (license (list license:mpl2.0 license:expat))))
13455
13456 (define-public python2-tqdm
13457 (package-with-python2 python-tqdm))
13458
13459 (define-public python-pkginfo
13460 (package
13461 (name "python-pkginfo")
13462 (version "1.4.2")
13463 (source
13464 (origin
13465 (method url-fetch)
13466 (uri (pypi-uri "pkginfo" version))
13467 (sha256
13468 (base32
13469 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13470 (build-system python-build-system)
13471 (arguments
13472 ;; The tests are broken upstream.
13473 '(#:tests? #f))
13474 (home-page
13475 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13476 (synopsis
13477 "Query metadatdata from sdists, bdists, and installed packages")
13478 (description
13479 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13480 source distriubtion (an sdist) or a binary distribution (e.g., created by
13481 running bdist_egg). It can also query the EGG-INFO directory of an installed
13482 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13483 created by running @code{python setup.py develop}).")
13484 (license license:expat)))
13485
13486 (define-public python2-pkginfo
13487 (package-with-python2 python-pkginfo))
13488
13489 (define-public python-twine
13490 (package
13491 (name "python-twine")
13492 (version "1.9.1")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "twine" version))
13497 (sha256
13498 (base32
13499 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13500 (build-system python-build-system)
13501 (propagated-inputs
13502 `(("python-tqdm" ,python-tqdm)
13503 ("python-pkginfo" ,python-pkginfo)
13504 ("python-requests" ,python-requests)
13505 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13506 (home-page "https://github.com/pypa/twine")
13507 (synopsis "Collection of utilities for interacting with PyPI")
13508 (description
13509 "@code{twine} currently supports registering projects and uploading
13510 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13511 their files and supports any packaging format (including wheels).")
13512 (license license:asl2.0)))
13513
13514 (define-public python2-twine
13515 (package-with-python2 python-twine))
13516
13517 (define-public python-linecache2
13518 (package
13519 (name "python-linecache2")
13520 (version "1.0.0")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "linecache2" version))
13525 (sha256
13526 (base32
13527 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13528 (build-system python-build-system)
13529 (arguments
13530 `(;; The tests depend on unittest2, and our version is a bit too old.
13531 #:tests? #f))
13532 (native-inputs
13533 `(("python-pbr" ,python-pbr-minimal)))
13534 (home-page
13535 "https://github.com/testing-cabal/linecache2")
13536 (synopsis "Backports of the linecache module")
13537 (description
13538 "The linecache module allows one to get any line from any file, while
13539 attempting to optimize internally, using a cache, the common case where many
13540 lines are read from a single file.")
13541 (license license:psfl)))
13542
13543 (define-public python2-linecache2
13544 (package-with-python2 python-linecache2))
13545
13546 (define-public python-traceback2
13547 (package
13548 (name "python-traceback2")
13549 (version "1.4.0")
13550 (source
13551 (origin
13552 (method url-fetch)
13553 (uri (pypi-uri "traceback2" version))
13554 (sha256
13555 (base32
13556 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13557 (build-system python-build-system)
13558 (arguments
13559 `(;; python-traceback2 and python-unittest2 depend on one another.
13560 #:tests? #f))
13561 (native-inputs
13562 `(("python-pbr" ,python-pbr-minimal)))
13563 (propagated-inputs
13564 `(("python-linecache2" ,python-linecache2)))
13565 (home-page
13566 "https://github.com/testing-cabal/traceback2")
13567 (synopsis "Backports of the traceback module")
13568 (description
13569 "This module provides a standard interface to extract, format and print
13570 stack traces of Python programs. It exactly mimics the behavior of the Python
13571 interpreter when it prints a stack trace.")
13572 (license license:psfl)))
13573
13574 (define-public python2-traceback2
13575 (package-with-python2 python-traceback2))
13576
13577 (define-public python-ratelimiter
13578 (package
13579 (name "python-ratelimiter")
13580 (version "1.2.0")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "ratelimiter" version))
13585 (sha256
13586 (base32
13587 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13588 (build-system python-build-system)
13589 (arguments
13590 '(#:tests? #f)) ; There are no tests in the pypi archive.
13591 (home-page "https://github.com/RazerM/ratelimiter")
13592 (synopsis "Simple rate limiting object")
13593 (description
13594 "The @code{ratelimiter} module ensures that an operation will not be
13595 executed more than a given number of times during a given period.")
13596 (license license:asl2.0)))
13597
13598 (define-public python2-ratelimiter
13599 (package-with-python2 python-ratelimiter))
13600
13601 (define-public python-dukpy
13602 (package
13603 (name "python-dukpy")
13604 (version "0.3")
13605 (source
13606 (origin
13607 (method git-fetch)
13608 (uri (git-reference
13609 (url "https://github.com/kovidgoyal/dukpy.git")
13610 (commit (string-append "v" version))))
13611 (file-name (git-file-name name version))
13612 (sha256
13613 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13614 (build-system python-build-system)
13615 (home-page "https://github.com/kovidgoyal/dukpy")
13616 (synopsis "Run JavaScript in python")
13617 (description
13618 "dukpy is a JavaScript runtime environment for Python using the duktape
13619 embeddable JavaScript engine.")
13620 ;; Dukpy is licensed under MIT like the embedded duktape library,
13621 ;; with 'errors.c' as GPL3.
13622 (license (list license:expat license:gpl3))))
13623
13624 (define-public python2-dukpy
13625 (package-with-python2 python-dukpy))
13626
13627 (define-public python-jsonrpclib-pelix
13628 (package
13629 (name "python-jsonrpclib-pelix")
13630 (version "0.3.2")
13631 (source
13632 (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "jsonrpclib-pelix" version))
13635 (sha256
13636 (base32
13637 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13638 (build-system python-build-system)
13639 (arguments
13640 `(#:tests? #f)) ; no tests in PyPI tarball
13641 (home-page "https://github.com/tcalmant/jsonrpclib/")
13642 (synopsis "JSON-RPC 2.0 client library for Python")
13643 (description
13644 "This library implements the JSON-RPC v2.0
13645 specification (backwards-compatible) as a client library for Python. This
13646 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13647 services.")
13648 (license license:asl2.0)))
13649
13650 (define-public python2-jsonrpclib-pelix
13651 (package-with-python2 python-jsonrpclib-pelix))
13652
13653 (define-public python-setuptools-scm-git-archive
13654 (package
13655 (name "python-setuptools-scm-git-archive")
13656 (version "1.0")
13657 (source
13658 (origin
13659 (method url-fetch)
13660 (uri (pypi-uri "setuptools_scm_git_archive" version))
13661 (sha256
13662 (base32
13663 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13664 (build-system python-build-system)
13665 (native-inputs
13666 `(("python-pytest" ,python-pytest)))
13667 (propagated-inputs
13668 `(("python-setuptools-scm" ,python-setuptools-scm)))
13669 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13670 (synopsis "Setuptools_scm plugin for git archives")
13671 (description
13672 "The setuptools_scm_git_archive package is a plugin to
13673 setuptools_scm, which supports obtaining versions from git archives that
13674 belong to tagged versions.")
13675 (license license:expat)))
13676
13677 (define-public python2-setuptools-scm-git-archive
13678 (package-with-python2 python-setuptools-scm-git-archive))
13679
13680 (define-public python-setuptools-git
13681 (package
13682 (name "python-setuptools-git")
13683 (version "1.2")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "setuptools-git" version))
13688 (sha256
13689 (base32
13690 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13691 (build-system python-build-system)
13692 (arguments
13693 `(#:phases
13694 (modify-phases %standard-phases
13695 ;; This is needed for tests.
13696 (add-after 'unpack 'configure-git
13697 (lambda _
13698 (setenv "HOME" "/tmp")
13699 (invoke "git" "config" "--global" "user.email" "guix")
13700 (invoke "git" "config" "--global" "user.name" "guix")
13701 #t)))))
13702 (native-inputs
13703 `(("git" ,git-minimal)))
13704 (home-page "https://github.com/msabramo/setuptools-git")
13705 (synopsis "Setuptools revision control system plugin for Git")
13706 (description
13707 "This package provides a plugin for Setuptools for revision control with
13708 Git.")
13709 (license license:bsd-3)))
13710
13711 (define-public python-pyclipper
13712 (package
13713 (name "python-pyclipper")
13714 (version "1.1.0.post1")
13715 (source
13716 (origin
13717 (method url-fetch)
13718 (uri (pypi-uri "pyclipper" version ".zip"))
13719 (sha256
13720 (base32
13721 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13722 (modules '((guix build utils)))
13723 (snippet
13724 '(begin
13725 ;; This file is generated by Cython.
13726 (delete-file "pyclipper/pyclipper.cpp") #t))))
13727 (build-system python-build-system)
13728 (arguments
13729 `(#:phases
13730 (modify-phases %standard-phases
13731 (add-before 'build 'cythonize-sources
13732 (lambda _
13733 (with-directory-excursion "pyclipper"
13734 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13735 (propagated-inputs
13736 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13737 (native-inputs
13738 `(("python-cython" ,python-cython)
13739 ("python-pytest" ,python-pytest)
13740 ("python-pytest-runner" ,python-pytest-runner)
13741 ("python-unittest2" ,python-unittest2)
13742 ("unzip" ,unzip)))
13743 (home-page "https://github.com/greginvm/pyclipper")
13744 (synopsis "Wrapper for Angus Johnson's Clipper library")
13745 (description
13746 "Pyclipper is a Cython wrapper for the C++ translation of the
13747 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13748 (license license:expat)))
13749
13750 (define-public python2-pyclipper
13751 (package-with-python2 python-pyclipper))
13752
13753 (define-public python2-booleanoperations
13754 (package
13755 (name "python2-booleanoperations")
13756 (version "0.7.1")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "booleanOperations" version ".zip"))
13761 (sha256
13762 (base32
13763 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13764 (build-system python-build-system)
13765 (arguments
13766 `(#:python ,python-2))
13767 (native-inputs
13768 `(("unzip" ,unzip)
13769 ("python2-pytest" ,python2-pytest)
13770 ("python2-pytest-runner" ,python2-pytest-runner)))
13771 (propagated-inputs
13772 `(("python-fonttools" ,python2-fonttools)
13773 ("python-pyclipper" ,python2-pyclipper)
13774 ("python-ufolib" ,python2-ufolib)))
13775 (home-page "https://github.com/typemytype/booleanOperations")
13776 (synopsis "Boolean operations on paths")
13777 (description
13778 "BooleanOperations provides a Python library that enables
13779 boolean operations on paths.")
13780 (license license:expat)))
13781
13782 (define-public python-tempdir
13783 (package
13784 (name "python-tempdir")
13785 (version "0.7.1")
13786 (source
13787 (origin
13788 (method url-fetch)
13789 (uri (pypi-uri "tempdir" version))
13790 (sha256
13791 (base32
13792 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13793 (build-system python-build-system)
13794 (home-page "https://pypi.org/project/tempdir/")
13795 (arguments
13796 ;; the package has no tests
13797 '(#:tests? #f))
13798 (synopsis "Python library for managing temporary directories")
13799 (description
13800 "This library manages temporary directories that are automatically
13801 deleted with all their contents when they are no longer needed. It is
13802 particularly convenient for use in tests.")
13803 (license license:expat)))
13804
13805 (define-public python2-tempdir
13806 (package-with-python2 python-tempdir))
13807
13808 (define-public python-activepapers
13809 (package
13810 (name "python-activepapers")
13811 (version "0.2.2")
13812 (source
13813 (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "ActivePapers.Py" version))
13816 (sha256
13817 (base32
13818 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13819 (build-system python-build-system)
13820 (arguments
13821 `(#:modules ((ice-9 ftw)
13822 (srfi srfi-1)
13823 (guix build utils)
13824 (guix build python-build-system))
13825
13826 #:phases
13827 (modify-phases %standard-phases
13828 (add-after 'unpack 'delete-python2-code
13829 (lambda _
13830 (for-each delete-file
13831 '("lib/activepapers/builtins2.py"
13832 "lib/activepapers/standardlib2.py"
13833 "lib/activepapers/utility2.py"))))
13834 (replace 'check
13835 (lambda _
13836 ;; Deactivate the test cases that download files
13837 (setenv "NO_NETWORK_ACCESS" "1")
13838 ;; For some strange reason, some tests fail if nosetests runs all
13839 ;; test modules in a single execution. They pass if each test
13840 ;; module is run individually.
13841 (for-each (lambda (filename)
13842 (invoke "nosetests"
13843 (string-append "tests/" filename)))
13844 (scandir "tests"
13845 (lambda (filename)
13846 (string-suffix? ".py" filename)))))))))
13847 (native-inputs
13848 `(("python-tempdir" ,python-tempdir)
13849 ("python-nose" ,python-nose)))
13850 (propagated-inputs
13851 `(("python-h5py" ,python-h5py)))
13852 (home-page "http://www.activepapers.org/")
13853 (synopsis "Executable papers for scientific computing")
13854 (description
13855 "ActivePapers is a tool for working with executable papers, which
13856 combine data, code, and documentation in single-file packages,
13857 suitable for publication as supplementary material or on repositories
13858 such as figshare or Zenodo.")
13859 (properties `((python2-variant . ,(delay python2-activepapers))))
13860 (license license:bsd-3)))
13861
13862 (define-public python2-activepapers
13863 (let ((base (package-with-python2
13864 (strip-python2-variant python-activepapers))))
13865 (package
13866 (inherit base)
13867 (arguments
13868 (substitute-keyword-arguments (package-arguments base)
13869 ((#:phases phases)
13870 `(modify-phases ,phases
13871 (delete 'delete-python2-code)
13872 (add-after 'unpack 'delete-python3-code
13873 (lambda _
13874 (for-each delete-file
13875 '("lib/activepapers/builtins3.py"
13876 "lib/activepapers/standardlib3.py"
13877 "lib/activepapers/utility3.py")))))))))))
13878
13879 (define-public python-semver
13880 (package
13881 (name "python-semver")
13882 (version "2.7.9")
13883 (source
13884 (origin
13885 (method url-fetch)
13886 (uri (pypi-uri "semver" version))
13887 (sha256
13888 (base32
13889 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13890 (build-system python-build-system)
13891 (arguments
13892 `(#:phases
13893 (modify-phases %standard-phases
13894 (add-after 'unpack 'patch-test-requirements
13895 (lambda _
13896 (substitute* "setup.py"
13897 ;; Our Python is new enough.
13898 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13899 #t)))))
13900 (native-inputs
13901 `(("python-tox" ,python-tox)
13902 ("python-virtualenv" ,python-virtualenv)))
13903 (home-page "https://github.com/k-bx/python-semver")
13904 (synopsis "Python helper for Semantic Versioning")
13905 (description "This package provides a Python library for
13906 @url{Semantic Versioning, http://semver.org/}.")
13907 (license license:bsd-3)))
13908
13909 (define-public python2-semver
13910 (package-with-python2 python-semver))
13911
13912 (define-public python-pyro4
13913 (package
13914 (name "python-pyro4")
13915 (version "4.75")
13916 (source
13917 (origin
13918 (method url-fetch)
13919 (uri (pypi-uri "Pyro4" version))
13920 (sha256
13921 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13922 (build-system python-build-system)
13923 (propagated-inputs
13924 `(("python-serpent" ,python-serpent)))
13925 (home-page "https://pyro4.readthedocs.io")
13926 (synopsis "Distributed object middleware for Python")
13927 (description
13928 "Pyro enables you to build applications in which objects can talk to each
13929 other over the network. You can just use normal Python method calls to call
13930 objects on other machines, also known as remote procedure calls (RPC).")
13931 (license license:expat)))
13932
13933 (define-public python2-pyro
13934 (package
13935 (name "python2-pyro")
13936 (version "3.16")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (pypi-uri "Pyro" version))
13941 (file-name (string-append "Pyro-" version ".tar.gz"))
13942 (sha256
13943 (base32
13944 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13945 (build-system python-build-system)
13946 (arguments
13947 ;; Pyro is not compatible with Python 3
13948 `(#:python ,python-2
13949 ;; Pyro has no test cases for automatic execution
13950 #:tests? #f))
13951 (home-page "http://pythonhosted.org/Pyro/")
13952 (synopsis "Distributed object manager for Python")
13953 (description "Pyro is a Distributed Object Technology system
13954 written in Python that is designed to be easy to use. It resembles
13955 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13956 which is a system and language independent Distributed Object Technology
13957 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13958 longer maintained. New projects should use Pyro4 instead, which
13959 is the new Pyro version that is actively developed.")
13960 (license license:expat)))
13961
13962 (define-public python2-scientific
13963 (package
13964 (name "python2-scientific")
13965 (version "2.9.4")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (string-append "https://bitbucket.org/khinsen/"
13970 "scientificpython/downloads/ScientificPython-"
13971 version ".tar.gz"))
13972 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13973 (sha256
13974 (base32
13975 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13976 (build-system python-build-system)
13977 (inputs
13978 `(("netcdf" ,netcdf)))
13979 (propagated-inputs
13980 `(("python-numpy" ,python2-numpy-1.8)
13981 ("python-pyro" ,python2-pyro)))
13982 (arguments
13983 ;; ScientificPython is not compatible with Python 3
13984 `(#:python ,python-2
13985 #:tests? #f ; No test suite
13986 #:phases
13987 (modify-phases %standard-phases
13988 (replace 'build
13989 (lambda* (#:key inputs #:allow-other-keys)
13990 (invoke "python" "setup.py" "build"
13991 (string-append "--netcdf_prefix="
13992 (assoc-ref inputs "netcdf"))))))))
13993 (home-page "https://bitbucket.org/khinsen/scientificpython")
13994 (synopsis "Python modules for scientific computing")
13995 (description "ScientificPython is a collection of Python modules that are
13996 useful for scientific computing. Most modules are rather general (Geometry,
13997 physical units, automatic derivatives, ...) whereas others are more
13998 domain-specific (e.g. netCDF and PDB support). The library is currently
13999 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14000 (license license:cecill-c)))
14001
14002 (define-public python2-mmtk
14003 (package
14004 (name "python2-mmtk")
14005 (version "2.7.11")
14006 (source
14007 (origin
14008 (method url-fetch)
14009 (uri (string-append "https://bitbucket.org/khinsen/"
14010 "mmtk/downloads/MMTK-" version ".tar.gz"))
14011 (file-name (string-append "MMTK-" version ".tar.gz"))
14012 (sha256
14013 (base32
14014 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14015 (build-system python-build-system)
14016 (native-inputs
14017 `(("netcdf" ,netcdf)))
14018 (propagated-inputs
14019 `(("python-scientific" ,python2-scientific)
14020 ("python-tkinter" ,python-2 "tk")))
14021 (arguments
14022 `(#:python ,python-2
14023 #:tests? #f
14024 #:phases
14025 (modify-phases %standard-phases
14026 (add-before 'build 'includes-from-scientific
14027 (lambda* (#:key inputs #:allow-other-keys)
14028 (mkdir-p "Include/Scientific")
14029 (copy-recursively
14030 (string-append
14031 (assoc-ref inputs "python-scientific")
14032 "/include/python2.7/Scientific")
14033 "Include/Scientific"))))))
14034 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14035 (synopsis "Python library for molecular simulation")
14036 (description "MMTK is a library for molecular simulations with an emphasis
14037 on biomolecules. It provides widely used methods such as Molecular Dynamics
14038 and normal mode analysis, but also basic routines for implementing new methods
14039 for simulation and analysis. The library is currently not actively maintained
14040 and works only with Python 2 and NumPy < 1.9.")
14041 (license license:cecill-c)))
14042
14043 (define-public python-phonenumbers
14044 (package
14045 (name "python-phonenumbers")
14046 (version "8.9.1")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "phonenumbers" version))
14051 (sha256
14052 (base32
14053 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14054 (build-system python-build-system)
14055 (home-page
14056 "https://github.com/daviddrysdale/python-phonenumbers")
14057 (synopsis
14058 "Python library for dealing with international phone numbers")
14059 (description
14060 "This package provides a Python port of Google's libphonenumber library.")
14061 (license license:asl2.0)))
14062
14063 (define-public python2-phonenumbers
14064 (package-with-python2 python-phonenumbers))
14065
14066 (define-public python-send2trash
14067 (package
14068 (name "python-send2trash")
14069 (version "1.5.0")
14070 (source
14071 (origin (method git-fetch)
14072 ;; Source tarball on PyPI doesn't include tests.
14073 (uri (git-reference
14074 (url "https://github.com/hsoft/send2trash.git")
14075 (commit version)))
14076 (file-name (git-file-name name version))
14077 (sha256
14078 (base32
14079 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14080 (build-system python-build-system)
14081 (arguments
14082 '(#:phases
14083 (modify-phases %standard-phases
14084 (add-before 'check 'pre-check
14085 (lambda _
14086 (mkdir-p "/tmp/foo")
14087 (setenv "HOME" "/tmp/foo")
14088 #t)))))
14089 (home-page "https://github.com/hsoft/send2trash")
14090 (synopsis "Send files to the user's @file{~/Trash} directory")
14091 (description "This package provides a Python library to send files to the
14092 user's @file{~/Trash} directory.")
14093 (properties `((python2-variant . ,(delay python2-send2trash))))
14094 (license license:bsd-3)))
14095
14096 (define-public python2-send2trash
14097 (package
14098 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14099 (arguments
14100 (substitute-keyword-arguments (package-arguments python-send2trash)
14101 ((#:phases phases)
14102 `(modify-phases ,phases
14103 (add-before 'check 'setenv
14104 (lambda _
14105 (setenv "PYTHONPATH"
14106 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14107 #t))))))))
14108
14109 (define-public python-yapf
14110 (package
14111 (name "python-yapf")
14112 (version "0.24.0")
14113 (source
14114 (origin
14115 (method url-fetch)
14116 (uri (pypi-uri "yapf" version))
14117 (sha256
14118 (base32
14119 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14120 (build-system python-build-system)
14121 (home-page "https://github.com/google/yapf")
14122 (synopsis "Formatter for Python code")
14123 (description "YAPF is a formatter for Python code. It's based off of
14124 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14125 takes the code and reformats it to the best formatting that conforms to the
14126 style guide, even if the original code didn't violate the style guide.")
14127 (license license:asl2.0)))
14128
14129 (define-public python2-yapf
14130 (package-with-python2 python-yapf))
14131
14132 (define-public python-gyp
14133 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14134 (revision "0"))
14135 (package
14136 (name "python-gyp")
14137 ;; Google does not release versions,
14138 ;; based on second most recent commit date.
14139 (version (git-version "0.0.0" revision commit))
14140 (source
14141 (origin
14142 ;; Google does not release tarballs,
14143 ;; git checkout is needed.
14144 (method git-fetch)
14145 (uri (git-reference
14146 (url "https://chromium.googlesource.com/external/gyp")
14147 (commit commit)))
14148 (file-name (git-file-name name version))
14149 (sha256
14150 (base32
14151 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14152 (build-system python-build-system)
14153 (home-page "https://gyp.gsrc.io/")
14154 (synopsis "GYP is a Meta-Build system")
14155 (description
14156 "GYP builds build systems for large, cross platform applications.
14157 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14158 files, and Makefiles.")
14159 (license license:bsd-3))))
14160
14161 (define-public python2-gyp
14162 (package-with-python2 python-gyp))
14163
14164 (define-public python-whatever
14165 (package
14166 (name "python-whatever")
14167 (version "0.5")
14168 (source
14169 (origin
14170 (method url-fetch)
14171 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14172 ".tar.gz"))
14173 (sha256
14174 (base32
14175 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14176 (file-name (string-append name "-" version ".tar.gz"))))
14177 (build-system python-build-system)
14178 (arguments
14179 `(#:phases
14180 (modify-phases %standard-phases
14181 (replace 'check
14182 (lambda _
14183 (invoke "py.test"))))))
14184 (native-inputs
14185 `(("python-pytest" ,python-pytest)))
14186 (home-page "http://github.com/Suor/whatever")
14187 (synopsis "Make anonymous functions by partial application of operators")
14188 (description "@code{whatever} provides an easy way to make anonymous
14189 functions by partial application of operators.")
14190 (license license:bsd-3)))
14191
14192 (define-public python2-whatever
14193 (package-with-python2 python-whatever))
14194
14195 (define-public python-funcy
14196 (package
14197 (name "python-funcy")
14198 (version "1.11")
14199 (source
14200 (origin
14201 (method git-fetch)
14202 (uri (git-reference
14203 (url "https://github.com/Suor/funcy.git")
14204 (commit version)))
14205 (sha256
14206 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14207 (file-name (git-file-name name version))))
14208 (build-system python-build-system)
14209 (arguments
14210 `(#:phases
14211 (modify-phases %standard-phases
14212 (replace 'check
14213 (lambda _
14214 (invoke "py.test"))))))
14215 (native-inputs
14216 `(("python-pytest" ,python-pytest)
14217 ("python-whatever" ,python-whatever)))
14218 (home-page "http://github.com/Suor/funcy")
14219 (synopsis "Functional tools")
14220 (description "@code{funcy} is a library that provides functional tools.
14221 Examples are:
14222 @enumerate
14223 @item merge - Merges collections of the same type
14224 @item walk - Type-preserving map
14225 @item select - Selects a part of a collection
14226 @item take - Takes the first n items of a collection
14227 @item first - Takes the first item of a collection
14228 @item remove - Predicated-removes items of a collection
14229 @item concat - Concatenates two collections
14230 @item flatten - Flattens a collection with subcollections
14231 @item distinct - Returns only distinct items
14232 @item split - Predicated-splits a collection
14233 @item split_at - Splits a collection at a given item
14234 @item group_by - Groups items by group
14235 @item pairwise - Pairs off adjacent items
14236 @item partial - Partially-applies a function
14237 @item curry - Curries a function
14238 @item compose - Composes functions
14239 @item complement - Complements a predicate
14240 @item all_fn - \"all\" with predicate
14241 @end enumerate")
14242 (license license:bsd-3)))
14243
14244 (define-public python2-funcy
14245 (package-with-python2 python-funcy))
14246
14247 (define-public python-isoweek
14248 (package
14249 (name "python-isoweek")
14250 (version "1.3.3")
14251 (source
14252 (origin
14253 (method url-fetch)
14254 (uri (pypi-uri "isoweek" version))
14255 (sha256
14256 (base32
14257 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14258 (build-system python-build-system)
14259 (home-page "https://github.com/gisle/isoweek")
14260 (synopsis "Objects representing a week")
14261 (description "The @code{isoweek} module provide the class Week that
14262 implements the week definition of ISO 8601. This standard also defines
14263 a notation for identifying weeks; yyyyWww (where the W is a literal).
14264 Week instances stringify to this form.")
14265 (license license:bsd-3)))
14266
14267 (define-public python2-isoweek
14268 (package-with-python2 python-isoweek))
14269
14270 (define-public python-tokenize-rt
14271 (package
14272 (name "python-tokenize-rt")
14273 (version "2.0.1")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "tokenize-rt" version))
14278 (sha256
14279 (base32
14280 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14281 (build-system python-build-system)
14282 (home-page "https://github.com/asottile/tokenize-rt")
14283 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14284 (description
14285 "This Python library is a wrapper around @code{tokenize} from the Python
14286 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14287 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14288 and @code{tokens_to_src} to roundtrip.")
14289 (license license:expat)))
14290
14291 (define-public python-future-fstrings
14292 (package
14293 (name "python-future-fstrings")
14294 (version "0.4.1")
14295 (source
14296 (origin
14297 (method url-fetch)
14298 (uri (pypi-uri "future_fstrings" version))
14299 (sha256
14300 (base32
14301 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14302 (build-system python-build-system)
14303 (propagated-inputs
14304 `(("python-tokenize-rt" ,python-tokenize-rt)))
14305 (home-page "https://github.com/asottile/future-fstrings")
14306 (synopsis "Backport of fstrings to Python < 3.6")
14307 (description
14308 "This package provides a UTF-8 compatible encoding
14309 @code{future_fstrings}, which performs source manipulation. It decodes the
14310 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14311 @code{f} strings.")
14312 (license license:expat)))
14313
14314 (define-public python-typed-ast
14315 (package
14316 (name "python-typed-ast")
14317 (version "1.3.5")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (pypi-uri "typed-ast" version))
14322 (sha256
14323 (base32
14324 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14325 (build-system python-build-system)
14326 (arguments
14327 `(#:modules ((guix build utils)
14328 (guix build python-build-system)
14329 (ice-9 ftw)
14330 (srfi srfi-1)
14331 (srfi srfi-26))
14332 #:phases
14333 (modify-phases %standard-phases
14334 (replace 'check
14335 (lambda _
14336 (let ((cwd (getcwd)))
14337 (setenv "PYTHONPATH"
14338 (string-append cwd "/build/"
14339 (find (cut string-prefix? "lib" <>)
14340 (scandir (string-append cwd "/build")))
14341 ":"
14342 (getenv "PYTHONPATH"))))
14343 (invoke "pytest")
14344 #t)))))
14345 (native-inputs `(("python-pytest" ,python-pytest)))
14346 (home-page "https://github.com/python/typed_ast")
14347 (synopsis "Fork of Python @code{ast} modules with type comment support")
14348 (description "This package provides a parser similar to the standard
14349 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14350 include PEP 484 type comments and are independent of the version of Python
14351 under which they are run. The @code{typed_ast} parsers produce the standard
14352 Python AST (plus type comments), and are both fast and correct, as they are
14353 based on the CPython 2.7 and 3.7 parsers.")
14354 ;; See the file "LICENSE" for the details.
14355 (license (list license:psfl
14356 license:asl2.0
14357 license:expat)))) ;ast27/Parser/spark.py
14358
14359 (define-public python-typing
14360 (package
14361 (name "python-typing")
14362 (version "3.6.6")
14363 (source
14364 (origin
14365 (method url-fetch)
14366 (uri (pypi-uri "typing" version))
14367 (sha256
14368 (base32
14369 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14370 (build-system python-build-system)
14371 (home-page "https://docs.python.org/3/library/typing.html")
14372 (synopsis "Type hints for Python")
14373 (description "This is a backport of the standard library @code{typing}
14374 module to Python versions older than 3.5. Typing defines a standard notation
14375 for Python function and variable type annotations. The notation can be used
14376 for documenting code in a concise, standard format, and it has been designed
14377 to also be used by static and runtime type checkers, static analyzers, IDEs
14378 and other tools.")
14379 (license license:psfl)))
14380
14381 (define-public python2-typing
14382 (package-with-python2 python-typing))
14383
14384 (define-public python-typing-extensions
14385 (package
14386 (name "python-typing-extensions")
14387 (version "3.7.2")
14388 (source
14389 (origin
14390 (method url-fetch)
14391 (uri (pypi-uri "typing_extensions" version))
14392 (sha256
14393 (base32
14394 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14395 (build-system python-build-system)
14396 (home-page
14397 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14398 (synopsis "Experimental type hints for Python")
14399 (description
14400 "The typing_extensions module contains additional @code{typing} hints not
14401 yet present in the of the @code{typing} standard library.
14402 Included are implementations of:
14403 @enumerate
14404 @item ClassVar
14405 @item ContextManager
14406 @item Counter
14407 @item DefaultDict
14408 @item Deque
14409 @item NewType
14410 @item NoReturn
14411 @item overload
14412 @item Protocol
14413 @item runtime
14414 @item Text
14415 @item Type
14416 @item TYPE_CHECKING
14417 @item AsyncGenerator
14418 @end enumerate\n")
14419 (license license:psfl)))
14420
14421 (define-public bpython
14422 (package
14423 (name "bpython")
14424 (version "0.17.1")
14425 (source
14426 (origin
14427 (method url-fetch)
14428 (uri (pypi-uri "bpython" version))
14429 (sha256
14430 (base32
14431 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14432 (build-system python-build-system)
14433 (arguments
14434 `(#:phases
14435 (modify-phases %standard-phases
14436 (add-after 'unpack 'remove-failing-test
14437 (lambda _
14438 ;; Remove failing test. FIXME: make it pass
14439 (delete-file "bpython/test/test_args.py")
14440 #t))
14441 (add-after 'wrap 'add-aliases
14442 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14443 (lambda* (#:key outputs #:allow-other-keys)
14444 (let ((out (assoc-ref outputs "out")))
14445 (for-each
14446 (lambda (old new)
14447 (symlink old (string-append out "/bin/" new)))
14448 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14449 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14450 #t)))))
14451 (propagated-inputs
14452 `(("python-pygments" ,python-pygments)
14453 ("python-requests" ,python-requests)
14454 ("python-babel" ,python-babel) ; optional, for internationalization
14455 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14456 ("python-greenlet" ,python-greenlet)
14457 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14458 ("python-six" ,python-six)))
14459 (native-inputs
14460 `(("python-sphinx" ,python-sphinx)
14461 ("python-mock" ,python-mock)))
14462 (home-page "https://bpython-interpreter.org/")
14463 (synopsis "Fancy interface to the Python interpreter")
14464 (description "Bpython is a fancy interface to the Python
14465 interpreter. bpython's main features are
14466
14467 @enumerate
14468 @item in-line syntax highlighting,
14469 @item readline-like autocomplete with suggestions displayed as you type,
14470 @item expected parameter list for any Python function,
14471 @item \"rewind\" function to pop the last line of code from memory and
14472 re-evaluate,
14473 @item send the code you've entered off to a pastebin,
14474 @item save the code you've entered to a file, and
14475 @item auto-indentation.
14476 @end enumerate")
14477 (license license:expat)))
14478
14479 (define-public bpython2
14480 (let ((base (package-with-python2
14481 (strip-python2-variant bpython))))
14482 (package (inherit base)
14483 (name "bpython2")
14484 (arguments
14485 `(#:python ,python-2
14486 #:phases
14487 (modify-phases %standard-phases
14488 (add-after 'unpack 'remove-failing-test
14489 (lambda _
14490 ;; Remove failing test. FIXME: make it pass
14491 (delete-file "bpython/test/test_args.py")
14492 ;; Disable failing test-cases (renaming inhibits they are
14493 ;; discovered)
14494 (substitute* "bpython/test/test_curtsies_repl.py"
14495 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14496 (string-append a "xxx_off_" b))
14497 (("^(\\s*def )(test_complex\\W)" _ a b)
14498 (string-append a "xxx_off_" b)))
14499 #t))
14500 (add-before 'build 'rename-scripts
14501 ;; rename the scripts to bypthon2, bpdb2, etc.
14502 (lambda _
14503 (substitute* "setup.py"
14504 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14505 (string-append name "2" rest "\n"))
14506 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14507 (string-append name "2" (or sub "") rest "\n")))
14508 #t))))))))
14509
14510 (define-public python-pyinotify
14511 (package
14512 (name "python-pyinotify")
14513 (version "0.9.6")
14514 (source (origin
14515 (method url-fetch)
14516 (uri (pypi-uri "pyinotify" version))
14517 (sha256
14518 (base32
14519 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14520 (build-system python-build-system)
14521 (arguments `(#:tests? #f)) ;no tests
14522 (home-page "https://github.com/seb-m/pyinotify")
14523 (synopsis "Python library for monitoring inotify events")
14524 (description
14525 "@code{pyinotify} provides a Python interface for monitoring
14526 file system events on Linux.")
14527 (license license:expat)))
14528
14529 (define-public python2-pyinotify
14530 (package-with-python2 python-pyinotify))
14531
14532 ;; Ada parser uses this version.
14533 (define-public python2-quex-0.67.3
14534 (package
14535 (name "python2-quex")
14536 (version "0.67.3")
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14541 (version-major+minor version)
14542 "/quex-" version ".zip"))
14543 (sha256
14544 (base32
14545 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14546 (build-system python-build-system)
14547 (native-inputs
14548 `(("unzip" ,unzip)))
14549 (arguments
14550 `(#:python ,python-2
14551 #:tests? #f
14552 #:phases
14553 (modify-phases %standard-phases
14554 (delete 'configure)
14555 (delete 'build)
14556 (replace 'install
14557 (lambda* (#:key outputs #:allow-other-keys)
14558 (let* ((out (assoc-ref outputs "out"))
14559 (share/quex (string-append out "/share/quex"))
14560 (bin (string-append out "/bin")))
14561 (copy-recursively "." share/quex)
14562 (mkdir-p bin)
14563 (symlink (string-append share/quex "/quex-exe.py")
14564 (string-append bin "/quex"))
14565 #t))))))
14566 (native-search-paths
14567 (list (search-path-specification
14568 (variable "QUEX_PATH")
14569 (files '("share/quex")))))
14570 (home-page "http://quex.sourceforge.net/")
14571 (synopsis "Lexical analyzer generator in Python")
14572 (description "@code{quex} is a lexical analyzer generator in Python.")
14573 (license license:lgpl2.1+))) ; Non-military
14574
14575 (define-public python2-quex
14576 (package (inherit python2-quex-0.67.3)
14577 (name "python2-quex")
14578 (version "0.68.1")
14579 (source
14580 (origin
14581 (method url-fetch)
14582 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14583 (sha256
14584 (base32
14585 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14586 (file-name (string-append name "-" version ".tar.gz"))))))
14587
14588 (define-public python-more-itertools
14589 (package
14590 (name "python-more-itertools")
14591 (version "7.1.0")
14592 (source
14593 (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "more-itertools" version))
14596 (sha256
14597 (base32
14598 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14599 (build-system python-build-system)
14600 (home-page "https://github.com/erikrose/more-itertools")
14601 (synopsis "More routines for operating on iterables, beyond itertools")
14602 (description "Python's built-in @code{itertools} module implements a
14603 number of iterator building blocks inspired by constructs from APL, Haskell,
14604 and SML. @code{more-itertools} includes additional building blocks for
14605 working with iterables.")
14606 (properties `((python2-variant . ,(delay python2-more-itertools))))
14607 (license license:expat)))
14608
14609 ;; The 5.x series are the last versions supporting Python 2.7.
14610 (define-public python2-more-itertools
14611 (package
14612 (inherit python-more-itertools)
14613 (name "python2-more-itertools")
14614 (version "5.0.0")
14615 (source (origin
14616 (method url-fetch)
14617 (uri (pypi-uri "more-itertools" version))
14618 (sha256
14619 (base32
14620 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14621 (arguments
14622 `(#:python ,python2-minimal))
14623 (propagated-inputs
14624 `(("python2-six" ,python2-six-bootstrap)))))
14625
14626 (define-public python-latexcodec
14627 (package
14628 (name "python-latexcodec")
14629 (version "1.0.6")
14630 (source
14631 (origin
14632 (method url-fetch)
14633 (uri (pypi-uri "latexcodec" version))
14634 (sha256
14635 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14636 (build-system python-build-system)
14637 (inputs
14638 `(("python-six" ,python-six)))
14639 (home-page "https://readthedocs.org/projects/latexcodec/")
14640 (synopsis "Work with LaTeX code in Python")
14641 (description "Lexer and codec to work with LaTeX code in Python.")
14642 (license license:expat)))
14643
14644 (define-public python-pybtex
14645 (package
14646 (name "python-pybtex")
14647 (version "0.21")
14648 (source
14649 (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "pybtex" version))
14652 (sha256
14653 (base32
14654 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14655 (build-system python-build-system)
14656 (native-inputs
14657 `(("python-nose" ,python-nose)))
14658 (inputs
14659 `(("python-latexcodec" ,python-latexcodec)
14660 ("python-pyyaml" ,python-pyyaml)
14661 ("python-six" ,python-six)))
14662 (arguments
14663 `(#:test-target "nosetests"))
14664 (home-page "https://pybtex.org/")
14665 (synopsis "BibTeX-compatible bibliography processor")
14666 (description "Pybtex is a BibTeX-compatible bibliography processor written
14667 in Python. You can simply type pybtex instead of bibtex.")
14668 (license license:expat)))
14669
14670 (define-public python-onetimepass
14671 (package
14672 (name "python-onetimepass")
14673 (version "1.0.1")
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (pypi-uri "onetimepass" version))
14678 (sha256
14679 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14680 (build-system python-build-system)
14681 (propagated-inputs `(("python-six" ,python-six)))
14682 (home-page "https://github.com/tadeck/onetimepass/")
14683 (synopsis "One-time password library")
14684 (description "Python one-time password library for HMAC-based (HOTP) and
14685 time-based (TOTP) passwords.")
14686 (license license:expat)))
14687
14688 (define-public python-parso
14689 (package
14690 (name "python-parso")
14691 (version "0.3.1")
14692 (source
14693 (origin
14694 (method url-fetch)
14695 (uri (pypi-uri "parso" version))
14696 (sha256
14697 (base32
14698 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14699 (native-inputs
14700 `(("python-pytest" ,python-pytest)))
14701 (build-system python-build-system)
14702 (home-page "https://github.com/davidhalter/parso")
14703 (synopsis "Python Parser")
14704 (description "Parso is a Python parser that supports error recovery and
14705 round-trip parsing for different Python versions (in multiple Python versions).
14706 Parso is also able to list multiple syntax errors in your Python file.")
14707 (license license:expat)))
14708
14709 (define-public python2-parso
14710 (package-with-python2 python-parso))
14711
14712 (define-public python-async-generator
14713 (package
14714 (name "python-async-generator")
14715 (version "1.10")
14716 (source
14717 (origin
14718 (method url-fetch)
14719 (uri (pypi-uri "async_generator" version))
14720 (sha256
14721 (base32
14722 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14723 (build-system python-build-system)
14724 (native-inputs
14725 `(("python-pytest" ,python-pytest)))
14726 (home-page "https://github.com/python-trio/async_generator")
14727 (synopsis "Async generators and context managers for Python 3.5+")
14728 (description "@code{async_generator} back-ports Python 3.6's native async
14729 generators and Python 3.7's context managers into Python 3.5.")
14730 ;; Dual licensed.
14731 (license (list license:expat license:asl2.0))))
14732
14733 (define-public python-async-timeout
14734 (package
14735 (name "python-async-timeout")
14736 (version "3.0.1")
14737 (source
14738 (origin
14739 (method url-fetch)
14740 (uri (pypi-uri "async-timeout" version))
14741 (sha256
14742 (base32
14743 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14744 (build-system python-build-system)
14745 (home-page "https://github.com/aio-libs/async_timeout/")
14746 (synopsis "Timeout context manager for asyncio programs")
14747 (description "@code{async-timeout} provides a timeout timeout context
14748 manager compatible with @code{asyncio}.")
14749 (license license:asl2.0)))
14750
14751 (define-public python-glob2
14752 (package
14753 (name "python-glob2")
14754 (version "0.6")
14755 (source
14756 (origin
14757 (method git-fetch)
14758 (uri (git-reference
14759 (url "https://github.com/miracle2k/python-glob2.git")
14760 (commit version)))
14761 (file-name (git-file-name name version))
14762 (sha256
14763 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14764 (build-system python-build-system)
14765 (home-page "https://github.com/miracle2k/python-glob2/")
14766 (synopsis "Extended Version of the python buildin glob module")
14767 (description "This is an extended version of the Python
14768 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14769 adds:
14770
14771 @itemize
14772 @item The ability to capture the text matched by glob patterns, and return
14773 those matches alongside the file names.
14774 @item A recursive @code{**} globbing syntax, akin for example to the
14775 @code{globstar} option of Bash.
14776 @item The ability to replace the file system functions used, in order to glob
14777 on virtual file systems.
14778 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14779 @end itemize
14780
14781 Glob2 currently based on the glob code from Python 3.3.1.")
14782 (license license:bsd-2)))
14783
14784 (define-public python2-glob2
14785 (package-with-python2 python-glob2))
14786
14787 (define-public python-gipc
14788 (package
14789 (name "python-gipc")
14790 (version "0.6.0")
14791 (source
14792 (origin
14793 (method url-fetch)
14794 (uri (pypi-uri "gipc" version ".zip"))
14795 (sha256
14796 (base32
14797 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14798 (build-system python-build-system)
14799 (native-inputs
14800 `(("unzip" ,unzip)))
14801 (propagated-inputs
14802 `(("python-gevent" ,python-gevent)))
14803 (home-page "http://gehrcke.de/gipc")
14804 (synopsis "Child process management in the context of gevent")
14805 (description "Usage of Python's multiprocessing package in a
14806 gevent-powered application may raise problems. With @code{gipc},
14807 process-based child processes can safely be created anywhere within a
14808 gevent-powered application.")
14809 (license license:expat)))
14810
14811 (define-public python2-gipc
14812 (package-with-python2 python-gipc))
14813
14814 (define-public python-fusepy
14815 (package
14816 (name "python-fusepy")
14817 (version "2.0.4")
14818 (source
14819 (origin
14820 (method url-fetch)
14821 (uri (pypi-uri "fusepy" version))
14822 (sha256
14823 (base32
14824 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14825 (build-system python-build-system)
14826 (arguments
14827 `(#:phases
14828 (modify-phases %standard-phases
14829 (add-before 'build 'set-library-file-name
14830 (lambda* (#:key inputs #:allow-other-keys)
14831 (let ((fuse (assoc-ref inputs "fuse")))
14832 (substitute* "fuse.py"
14833 (("find_library\\('fuse'\\)")
14834 (string-append "'" fuse "/lib/libfuse.so'")))
14835 #t))))))
14836 (propagated-inputs
14837 `(("fuse" ,fuse)))
14838 (home-page "https://github.com/fusepy/fusepy")
14839 (synopsis "Simple ctypes bindings for FUSE")
14840 (description "Python module that provides a simple interface to FUSE and
14841 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14842 (license license:isc)))
14843
14844 (define-public python2-fusepy
14845 (package-with-python2 python-fusepy))
14846
14847 (define-public python2-gdrivefs
14848 (package
14849 (name "python2-gdrivefs")
14850 (version "0.14.9")
14851 (source
14852 (origin
14853 (method url-fetch)
14854 (uri (pypi-uri "gdrivefs" version))
14855 (sha256
14856 (base32
14857 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14858 (build-system python-build-system)
14859 (arguments
14860 `(#:python ,python-2
14861 #:phases
14862 (modify-phases %standard-phases
14863 (add-before 'build 'patch-setup-py
14864 (lambda _
14865 ;; Update requirements from dependency==version
14866 ;; to dependency>=version
14867 (substitute* "gdrivefs/resources/requirements.txt"
14868 (("==") ">="))
14869 #t)))))
14870 (native-inputs
14871 `(("python2-gipc" ,python2-gipc)
14872 ("python2-gevent" ,python2-gevent)
14873 ("python2-greenlet" ,python2-greenlet)
14874 ("python2-httplib2" ,python2-httplib2)
14875 ("python2-uritemplate" ,python2-uritemplate)
14876 ("python2-oauth2client" ,python2-oauth2client)
14877 ("python2-six" ,python2-six)))
14878 (propagated-inputs
14879 `(("python2-dateutil" ,python2-dateutil)
14880 ("python2-fusepy" ,python2-fusepy)
14881 ("python2-google-api-client" ,python2-google-api-client)))
14882 (home-page "https://github.com/dsoprea/GDriveFS")
14883 (synopsis "Mount Google Drive as a local file system")
14884 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14885 under Python 2.7.")
14886 (license license:gpl2)))
14887
14888 (define-public pybind11
14889 (package
14890 (name "pybind11")
14891 (version "2.2.4")
14892 (source (origin
14893 (method git-fetch)
14894 (uri (git-reference
14895 (url "https://github.com/pybind/pybind11.git")
14896 (commit (string-append "v" version))))
14897 (sha256
14898 (base32
14899 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14900 (file-name (git-file-name name version))))
14901 (build-system cmake-build-system)
14902 (native-inputs
14903 `(("python" ,python)
14904 ("python-pytest" ,python-pytest)))
14905 (arguments
14906 `(#:test-target "check"))
14907 (home-page "https://github.com/pybind/pybind11/")
14908 (synopsis "Seamless operability between C++11 and Python")
14909 (description "pybind11 is a lightweight header-only library that exposes
14910 C++ types in Python and vice versa, mainly to create Python bindings of
14911 existing C++ code. Its goals and syntax are similar to the excellent
14912 Boost.Python library by David Abrahams: to minimize boilerplate code in
14913 traditional extension modules by inferring type information using compile-time
14914 introspection.")
14915 (license license:expat)))
14916
14917 (define-public python-fasteners
14918 (package
14919 (name "python-fasteners")
14920 (version "0.14.1")
14921 (source
14922 (origin
14923 (method url-fetch)
14924 (uri (pypi-uri "fasteners" version))
14925 (sha256
14926 (base32
14927 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14928 (build-system python-build-system)
14929 (propagated-inputs
14930 `(("python-monotonic" ,python-monotonic)
14931 ("python-six" ,python-six)
14932 ("python-testtools" ,python-testtools)))
14933 (home-page "https://github.com/harlowja/fasteners")
14934 (synopsis "Python package that provides useful locks")
14935 (description
14936 "This package provides a Python program that provides following locks:
14937
14938 @itemize
14939 @item Locking decorator
14940 @item Reader-writer locks
14941 @item Inter-process locks
14942 @item Generic helpers
14943 @end itemize\n")
14944 (properties `((python2-variant . ,(delay python2-fasteners))))
14945 (license license:asl2.0)))
14946
14947 (define-public python2-fasteners
14948 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14949 (package
14950 (inherit base)
14951 (propagated-inputs
14952 `(("python2-futures" ,python2-futures)
14953 ,@(package-propagated-inputs base))))))
14954
14955 (define-public python-requests-file
14956 (package
14957 (name "python-requests-file")
14958 (version "1.4.3")
14959 (source
14960 (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "requests-file" version))
14963 (sha256
14964 (base32
14965 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14966 (build-system python-build-system)
14967 (propagated-inputs
14968 `(("python-requests" ,python-requests)
14969 ("python-six" ,python-six)))
14970 (home-page
14971 "https://github.com/dashea/requests-file")
14972 (synopsis "File transport adapter for Requests")
14973 (description
14974 "Requests-File is a transport adapter for use with the Requests Python
14975 library to allow local file system access via @code{file://} URLs.")
14976 (license license:asl2.0)))
14977
14978 (define-public python2-requests-file
14979 (package-with-python2 python-requests-file))
14980
14981 (define-public python-tldextract
14982 (package
14983 (name "python-tldextract")
14984 (version "2.2.0")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "tldextract" version))
14989 (sha256
14990 (base32
14991 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14992 (build-system python-build-system)
14993 (native-inputs
14994 `(("python-pytest" ,python-pytest)
14995 ("python-responses" ,python-responses)))
14996 (propagated-inputs
14997 `(("python-idna" ,python-idna)
14998 ("python-requests" ,python-requests)
14999 ("python-requests-file" ,python-requests-file)))
15000 (home-page
15001 "https://github.com/john-kurkowski/tldextract")
15002 (synopsis
15003 "Separate the TLD from the registered domain and subdomains of a URL")
15004 (description
15005 "TLDExtract accurately separates the TLD from the registered domain and
15006 subdomains of a URL, using the Public Suffix List. By default, this includes
15007 the public ICANN TLDs and their exceptions. It can optionally support the
15008 Public Suffix List's private domains as well.")
15009 (license license:bsd-3)))
15010
15011 (define-public python2-tldextract
15012 (package-with-python2 python-tldextract))
15013
15014 (define-public python-pynamecheap
15015 (package
15016 (name "python-pynamecheap")
15017 (version "0.0.3")
15018 (source
15019 (origin
15020 (method url-fetch)
15021 (uri (pypi-uri "PyNamecheap" version))
15022 (sha256
15023 (base32
15024 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15025 (build-system python-build-system)
15026 (propagated-inputs
15027 `(("python-requests" ,python-requests)))
15028 (home-page
15029 "https://github.com/Bemmu/PyNamecheap")
15030 (synopsis
15031 "Namecheap API client in Python")
15032 (description
15033 "PyNamecheap is a Namecheap API client in Python.")
15034 (license license:expat)))
15035
15036 (define-public python2-pynamecheap
15037 (package-with-python2 python-pynamecheap))
15038
15039 (define-public python-dns-lexicon
15040 (package
15041 (name "python-dns-lexicon")
15042 (version "2.4.0")
15043 (source
15044 (origin
15045 (method url-fetch)
15046 (uri (pypi-uri "dns-lexicon" version))
15047 (sha256
15048 (base32
15049 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15050 (build-system python-build-system)
15051 (arguments
15052 `(#:tests? #f)) ;requires internet access
15053 (propagated-inputs
15054 `(("python-future" ,python-future)
15055 ("python-pynamecheap" ,python-pynamecheap)
15056 ("python-requests" ,python-requests)
15057 ("python-tldextract" ,python-tldextract)
15058 ("python-urllib3" ,python-urllib3)))
15059 (home-page "https://github.com/AnalogJ/lexicon")
15060 (synopsis
15061 "Manipulate DNS records on various DNS providers")
15062 (description
15063 "Lexicon provides a way to manipulate DNS records on multiple DNS
15064 providers in a standardized way. It has a CLI but it can also be used as a
15065 Python library. It was designed to be used in automation, specifically with
15066 Let's Encrypt.")
15067 (license license:expat)))
15068
15069 (define-public python2-dns-lexicon
15070 (package-with-python2 python-dns-lexicon))
15071
15072 (define-public python-commandlines
15073 (package
15074 (name "python-commandlines")
15075 (version "0.4.1")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (pypi-uri "commandlines" version))
15080 (sha256
15081 (base32
15082 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15083 (build-system python-build-system)
15084 (home-page "https://github.com/chrissimpkins/commandlines")
15085 (synopsis "Command line argument to object parsing library")
15086 (description
15087 "@code{Commandlines} is a Python library for command line application
15088 development that supports command line argument parsing, command string
15089 validation testing and application logic.")
15090 (license license:expat)))
15091
15092 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15093 ;; python-numba. They have a very unflexible relationship.
15094 (define-public python-numba
15095 (package
15096 (name "python-numba")
15097 (version "0.42.0")
15098 (source
15099 (origin
15100 (method url-fetch)
15101 (uri (pypi-uri "numba" version))
15102 (sha256
15103 (base32
15104 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15105 (build-system python-build-system)
15106 (arguments
15107 `(#:modules ((guix build utils)
15108 (guix build python-build-system)
15109 (ice-9 ftw)
15110 (srfi srfi-1)
15111 (srfi srfi-26))
15112 #:phases
15113 (modify-phases %standard-phases
15114 (add-after 'unpack 'disable-proprietary-features
15115 (lambda _
15116 (setenv "NUMBA_DISABLE_HSA" "1")
15117 (setenv "NUMBA_DISABLE_CUDA" "1")
15118 #t))
15119 (add-after 'unpack 'remove-failing-tests
15120 (lambda _
15121 ;; FIXME: these tests fail for unknown reasons:
15122 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15123 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15124 (substitute* "numba/tests/test_dispatcher.py"
15125 (("def test(_non_writable_pycache)" _ m)
15126 (string-append "def guix_skip" m))
15127 (("def test(_non_creatable_pycache)" _ m)
15128 (string-append "def guix_skip" m))
15129 (("def test(_frozen)" _ m)
15130 (string-append "def guix_skip" m)))
15131
15132 ;; These tests fail because we don't run the tests from the build
15133 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15134 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15135 (substitute* "numba/tests/test_pycc.py"
15136 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15137 (string-append "def guix_skip" m)))
15138 #t))
15139 (replace 'check
15140 (lambda _
15141 (let ((cwd (getcwd)))
15142 (setenv "PYTHONPATH"
15143 (string-append cwd "/build/"
15144 (find (cut string-prefix? "lib" <>)
15145 (scandir (string-append cwd "/build")))
15146 ":"
15147 (getenv "PYTHONPATH")))
15148 ;; Something is wrong with the PYTHONPATH when running the
15149 ;; tests from the build directory, as it complains about not being
15150 ;; able to import certain modules.
15151 (with-directory-excursion "/tmp"
15152 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15153 #t)))))
15154 (propagated-inputs
15155 `(("python-llvmlite" ,python-llvmlite)
15156 ("python-numpy" ,python-numpy)
15157 ("python-singledispatch" ,python-singledispatch)))
15158 ;; Needed for tests.
15159 (inputs
15160 `(("python-jinja2" ,python-jinja2)
15161 ("python-pygments" ,python-pygments)))
15162 (home-page "https://numba.pydata.org")
15163 (synopsis "Compile Python code using LLVM")
15164 (description "Numba gives you the power to speed up your applications with
15165 high performance functions written directly in Python. With a few
15166 annotations, array-oriented and math-heavy Python code can be just-in-time
15167 compiled to native machine instructions, similar in performance to C, C++ and
15168 Fortran, without having to switch languages or Python interpreters.
15169
15170 Numba works by generating optimized machine code using the LLVM compiler
15171 infrastructure at import time, runtime, or statically (using the included pycc
15172 tool).")
15173 (license license:bsd-3)))
15174
15175 (define-public python-anndata
15176 (package
15177 (name "python-anndata")
15178 (version "0.6.18")
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "anndata" version))
15183 (sha256
15184 (base32
15185 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15186 (build-system python-build-system)
15187 (propagated-inputs
15188 `(("python-h5py" ,python-h5py)
15189 ("python-natsort" ,python-natsort)
15190 ("python-pandas" ,python-pandas)
15191 ("python-scipy" ,python-scipy)))
15192 (home-page "https://github.com/theislab/anndata")
15193 (synopsis "Annotated data for data analysis pipelines")
15194 (description "Anndata is a package for simple (functional) high-level APIs
15195 for data analysis pipelines. In this context, it provides an efficient,
15196 scalable way of keeping track of data together with learned annotations and
15197 reduces the code overhead typically encountered when using a mostly
15198 object-oriented library such as @code{scikit-learn}.")
15199 (license license:bsd-3)))
15200
15201 (define-public python-dill
15202 (package
15203 (name "python-dill")
15204 (version "0.2.9")
15205 (source
15206 (origin
15207 (method url-fetch)
15208 (uri (pypi-uri "dill" version))
15209 (sha256
15210 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15211 (build-system python-build-system)
15212 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15213 (arguments '(#:tests? #f))
15214 (home-page "https://pypi.org/project/dill")
15215 (synopsis "Serialize all of Python")
15216 (description "Dill extends Python's @code{pickle} module for serializing
15217 and de-serializing Python objects to the majority of the built-in Python
15218 types. Dill provides the user the same interface as the @code{pickle} module,
15219 and also includes some additional features. In addition to pickling Python
15220 objects, @code{dill} provides the ability to save the state of an interpreter
15221 session in a single command. Hence, it would be feasible to save a
15222 interpreter session, close the interpreter, ship the pickled file to another
15223 computer, open a new interpreter, unpickle the session and thus continue from
15224 the saved state of the original interpreter session.")
15225 (license license:bsd-3)))
15226
15227 (define-public python-multiprocess
15228 (package
15229 (name "python-multiprocess")
15230 (version "0.70.6.1")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "multiprocess" version))
15235 (sha256
15236 (base32
15237 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15238 (build-system python-build-system)
15239 (propagated-inputs
15240 `(("python-dill" ,python-dill)))
15241 (home-page "https://pypi.org/project/multiprocess")
15242 (synopsis "Multiprocessing and multithreading in Python")
15243 (description
15244 "This package is a fork of the multiprocessing Python package, a package
15245 which supports the spawning of processes using the API of the standard
15246 library's @code{threading} module.")
15247 (license license:bsd-3)))
15248
15249 (define-public python-toolz
15250 (package
15251 (name "python-toolz")
15252 (version "0.9.0")
15253 (source
15254 (origin
15255 (method url-fetch)
15256 (uri (pypi-uri "toolz" version))
15257 (sha256
15258 (base32
15259 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15260 (build-system python-build-system)
15261 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15262 ;; unregistered loader type"
15263 (arguments '(#:tests? #f))
15264 (home-page "https://github.com/pytoolz/toolz/")
15265 (synopsis "List processing tools and functional utilities")
15266 (description
15267 "This package provides a set of utility functions for iterators,
15268 functions, and dictionaries.")
15269 (license license:bsd-3)))
15270
15271 (define-public python2-toolz
15272 (package-with-python2 python-toolz))
15273
15274 (define-public python-cytoolz
15275 (package
15276 (name "python-cytoolz")
15277 (version "0.9.0.1")
15278 (source
15279 (origin
15280 (method url-fetch)
15281 (uri (pypi-uri "cytoolz" version))
15282 (sha256
15283 (base32
15284 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15285 (build-system python-build-system)
15286 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15287 ;; 'exceptions'"
15288 (arguments '(#:tests? #f))
15289 (propagated-inputs
15290 `(("python-toolz" ,python-toolz)))
15291 (native-inputs
15292 `(("python-cython" ,python-cython)))
15293 (home-page "https://github.com/pytoolz/cytoolz")
15294 (synopsis "High performance functional utilities")
15295 (description
15296 "The cytoolz package implements the same API as provided by toolz. The
15297 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15298 that is accessible to other projects developed in Cython.")
15299 (license license:bsd-3)))
15300
15301 (define-public python-sortedcontainers
15302 (package
15303 (name "python-sortedcontainers")
15304 (version "2.0.4")
15305 (source
15306 (origin
15307 (method url-fetch)
15308 (uri (pypi-uri "sortedcontainers" version))
15309 (sha256
15310 (base32
15311 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15312 (build-system python-build-system)
15313 (native-inputs
15314 `(("python-tox" ,python-tox)))
15315 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15316 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15317 (description
15318 "This package provides a sorted collections library, written in
15319 pure-Python.")
15320 (license license:asl2.0)))
15321
15322 (define-public python-cloudpickle
15323 (package
15324 (name "python-cloudpickle")
15325 (version "0.6.1")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "cloudpickle" version))
15330 (sha256
15331 (base32
15332 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15333 (build-system python-build-system)
15334 ;; FIXME: there are 5 errors in 122 tests:
15335 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15336 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15337 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15338 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15339 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15340 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15341 (arguments '(#:tests? #f))
15342 (native-inputs
15343 `(("python-pytest" ,python-pytest)
15344 ("python-mock" ,python-mock)
15345 ("python-tornado" ,python-tornado)))
15346 (home-page "https://github.com/cloudpipe/cloudpickle")
15347 (synopsis "Extended pickling support for Python objects")
15348 (description
15349 "Cloudpickle makes it possible to serialize Python constructs not
15350 supported by the default pickle module from the Python standard library. It
15351 is especially useful for cluster computing where Python expressions are
15352 shipped over the network to execute on remote hosts, possibly close to the
15353 data.")
15354 (license license:bsd-3)))
15355
15356 (define-public python2-cloudpickle
15357 (package-with-python2 python-cloudpickle))
15358
15359 (define-public python-locket
15360 (package
15361 (name "python-locket")
15362 (version "0.2.0")
15363 (source
15364 (origin
15365 (method url-fetch)
15366 (uri (pypi-uri "locket" version))
15367 (sha256
15368 (base32
15369 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15370 (build-system python-build-system)
15371 (home-page "https://github.com/mwilliamson/locket.py")
15372 (synopsis "File-based locks for Python")
15373 (description
15374 "Locket implements a lock that can be used by multiple processes provided
15375 they use the same path.")
15376 (license license:bsd-2)))
15377
15378 (define-public python2-locket
15379 (package-with-python2 python-locket))
15380
15381 (define-public python-blosc
15382 (package
15383 (name "python-blosc")
15384 (version "1.5.1")
15385 (source
15386 (origin
15387 (method url-fetch)
15388 (uri (pypi-uri "blosc" version))
15389 (sha256
15390 (base32
15391 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15392 (build-system python-build-system)
15393 ;; FIXME: all tests pass, but then this error is printed:
15394 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15395 (arguments '(#:tests? #f))
15396 (propagated-inputs
15397 `(("python-numpy" ,python-numpy)))
15398 (home-page "https://github.com/blosc/python-blosc")
15399 (synopsis "Python wrapper for the Blosc data compressor library")
15400 (description "Blosc is a high performance compressor optimized for binary
15401 data. It has been designed to transmit data to the processor cache faster
15402 than the traditional, non-compressed, direct memory fetch approach via a
15403 @code{memcpy()} system call.
15404
15405 Blosc works well for compressing numerical arrays that contains data with
15406 relatively low entropy, like sparse data, time series, grids with
15407 regular-spaced values, etc.
15408
15409 This Python package wraps the Blosc library.")
15410 (license license:bsd-3)))
15411
15412 (define-public python2-blosc
15413 (package-with-python2 python-blosc))
15414
15415 (define-public python-partd
15416 (package
15417 (name "python-partd")
15418 (version "0.3.9")
15419 (source
15420 (origin
15421 (method url-fetch)
15422 (uri (pypi-uri "partd" version))
15423 (sha256
15424 (base32
15425 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15426 (build-system python-build-system)
15427 (propagated-inputs
15428 `(("python-blosc" ,python-blosc)
15429 ("python-locket" ,python-locket)
15430 ("python-numpy" ,python-numpy)
15431 ("python-pandas" ,python-pandas)
15432 ("python-pyzmq" ,python-pyzmq)
15433 ("python-toolz" ,python-toolz)))
15434 (home-page "https://github.com/dask/partd/")
15435 (synopsis "Appendable key-value storage")
15436 (description "Partd stores key-value pairs. Values are raw bytes. We
15437 append on old values. Partd excels at shuffling operations.")
15438 (license license:bsd-3)))
15439
15440 (define-public python2-partd
15441 (package-with-python2 python-partd))
15442
15443 (define-public python-dask
15444 (package
15445 (name "python-dask")
15446 (version "1.2.2")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "dask" version))
15451 (sha256
15452 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15453 (build-system python-build-system)
15454 ;; A single test out of 5000+ fails. This test is marked as xfail when
15455 ;; pytest-xdist is used.
15456 (arguments
15457 `(#:phases
15458 (modify-phases %standard-phases
15459 (add-after 'unpack 'disable-broken-test
15460 (lambda _
15461 (substitute* "dask/tests/test_threaded.py"
15462 (("def test_interrupt\\(\\)" m)
15463 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15464 m)))
15465 (when (which "python2")
15466 ;; This test fails with recent Pandas:
15467 ;; <https://github.com/dask/dask/issues/3794>.
15468 (substitute* "dask/dataframe/tests/test_dataframe.py"
15469 (("def test_info\\(\\)" m)
15470 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15471 m))))
15472 #t))
15473 (replace 'check
15474 (lambda _ (invoke "pytest" "-vv"))))))
15475 (propagated-inputs
15476 `(("python-cloudpickle" ,python-cloudpickle)
15477 ("python-numpy" ,python-numpy)
15478 ("python-pandas" ,python-pandas)
15479 ("python-partd" ,python-partd)
15480 ("python-toolz" ,python-toolz)
15481 ("python-pyyaml" ,python-pyyaml)))
15482 (native-inputs
15483 `(("python-pytest" ,python-pytest)
15484 ("python-pytest-runner" ,python-pytest-runner)))
15485 (home-page "https://github.com/dask/dask/")
15486 (synopsis "Parallel computing with task scheduling")
15487 (description
15488 "Dask is a flexible parallel computing library for analytics. It
15489 consists of two components: dynamic task scheduling optimized for computation,
15490 and large data collections like parallel arrays, dataframes, and lists that
15491 extend common interfaces like NumPy, Pandas, or Python iterators to
15492 larger-than-memory or distributed environments. These parallel collections
15493 run on top of the dynamic task schedulers. ")
15494 (license license:bsd-3)))
15495
15496 (define-public python2-dask
15497 (package-with-python2 python-dask))
15498
15499 (define-public python-ilinkedlist
15500 (package
15501 (name "python-ilinkedlist")
15502 (version "0.4.0")
15503 (source
15504 (origin
15505 (method url-fetch)
15506 (uri (pypi-uri "ilinkedlist" version))
15507 (sha256
15508 (base32
15509 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15510 (build-system python-build-system)
15511 (native-inputs `(("python-pytest" ,python-pytest)))
15512 (inputs `(("python" ,python)))
15513 (home-page "https://github.com/luther9/ilinkedlist-py")
15514 (synopsis "Immutable linked list library")
15515 (description
15516 "This is a implementation of immutable linked lists for Python. It
15517 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15518 Since a linked list is treated as immutable, it is hashable, and its length
15519 can be retrieved in constant time. Some of the terminology is inspired by
15520 LISP. It is possible to create an improper list by creating a @code{Pair}
15521 with a non-list @code{cdr}.")
15522 (license license:gpl3+)))
15523
15524 (define-public python-readlike
15525 (package
15526 (name "python-readlike")
15527 (version "0.1.3")
15528 (source
15529 (origin
15530 (method url-fetch)
15531 (uri (pypi-uri "readlike" version))
15532 (sha256
15533 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15534 (build-system python-build-system)
15535 (home-page "https://github.com/jangler/readlike")
15536 (synopsis "GNU Readline-like line editing module")
15537 (description
15538 "This Python module provides line editing functions similar to the default
15539 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15540 @code{readline} package, this one allows access to those capabilties in settings
15541 outside of a standard command-line interface. It is especially well-suited to
15542 interfacing with Urwid, due to a shared syntax for describing key inputs.
15543
15544 Currently, all stateless Readline commands are implemented. Yanking and history
15545 are not supported.")
15546 (license license:expat)))
15547
15548 (define-public python2-readlike
15549 (package-with-python2 python-readlike))
15550
15551 (define-public python-reparser
15552 (package
15553 (name "python-reparser")
15554 (version "1.4.3")
15555 (source
15556 (origin
15557 (method url-fetch)
15558 (uri (pypi-uri "ReParser" version))
15559 (sha256
15560 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15561 (build-system python-build-system)
15562 (home-page "https://github.com/xmikos/reparser")
15563 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15564 (description
15565 "This Python library provides a simple lexer/parser for inline markup based
15566 on regular expressions.")
15567 (license license:expat)))
15568
15569 (define-public python2-reparser
15570 (let ((reparser (package-with-python2
15571 (strip-python2-variant python-reparser))))
15572 (package (inherit reparser)
15573 (propagated-inputs
15574 `(("python2-enum34" ,python2-enum34)
15575 ,@(package-propagated-inputs reparser))))))
15576
15577 (define-public python-precis-i18n
15578 (package
15579 (name "python-precis-i18n")
15580 (version "1.0.0")
15581 (source
15582 (origin
15583 (method url-fetch)
15584 (uri (pypi-uri "precis_i18n" version))
15585 (sha256
15586 (base32
15587 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15588 (build-system python-build-system)
15589 (home-page "https://github.com/byllyfish/precis_i18n")
15590 (synopsis "Implementation of the PRECIS framework")
15591 (description
15592 "This module implements the PRECIS Framework as described in RFC 8264,
15593 RFC 8265 and RFC 8266.")
15594 (license license:expat)))
15595
15596 (define-public python-absl-py
15597 (package
15598 (name "python-absl-py")
15599 (version "0.6.1")
15600 (source
15601 (origin
15602 (method url-fetch)
15603 (uri (pypi-uri "absl-py" version))
15604 (sha256
15605 (base32
15606 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15607 (build-system python-build-system)
15608 (propagated-inputs
15609 `(("python-six" ,python-six)))
15610 (home-page "https://github.com/abseil/abseil-py")
15611 (synopsis "Abseil Python common libraries")
15612 (description
15613 "This package provides the Abseil Python Common Libraries, a collection
15614 of Python libraries for building Python applications.")
15615 (license license:asl2.0)))
15616
15617 (define-public python-astor
15618 (package
15619 (name "python-astor")
15620 (version "0.7.1")
15621 (source
15622 (origin
15623 (method url-fetch)
15624 (uri (pypi-uri "astor" version))
15625 (sha256
15626 (base32
15627 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15628 (build-system python-build-system)
15629 ;; FIXME: There are two errors and two test failures.
15630 (arguments `(#:tests? #f))
15631 (home-page "https://github.com/berkerpeksag/astor")
15632 (synopsis "Read and write Python ASTs")
15633 (description "Astor is designed to allow easy manipulation of Python
15634 source via the Abstract Syntax Tree.")
15635 (license license:bsd-3)))
15636
15637 (define-public python2-astor
15638 (package-with-python2 python-astor))
15639
15640 (define-public python-grpcio
15641 (package
15642 (name "python-grpcio")
15643 (version "1.17.1")
15644 (source
15645 (origin
15646 (method url-fetch)
15647 (uri (pypi-uri "grpcio" version))
15648 (sha256
15649 (base32
15650 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15651 (build-system python-build-system)
15652 (propagated-inputs
15653 `(("python-six" ,python-six)))
15654 (home-page "https://grpc.io")
15655 (synopsis "HTTP/2-based RPC framework")
15656 (description "This package provides a Python library for communicating
15657 with the HTTP/2-based RPC framework gRPC.")
15658 (license license:asl2.0)))
15659
15660 (define-public python-astunparse
15661 (package
15662 (name "python-astunparse")
15663 (version "1.6.2")
15664 (source
15665 (origin
15666 (method url-fetch)
15667 (uri (pypi-uri "astunparse" version))
15668 (sha256
15669 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15670 (build-system python-build-system)
15671 (arguments '(#:tests? #f)) ; there are none
15672 (propagated-inputs
15673 `(("python-six" ,python-six)
15674 ("python-wheel" ,python-wheel)))
15675 (home-page "https://github.com/simonpercivall/astunparse")
15676 (synopsis "AST unparser for Python")
15677 (description "This package provides an AST unparser for Python. It is a
15678 factored out version of @code{unparse} found in the Python source
15679 distribution.")
15680 (license license:bsd-3)))
15681
15682 (define-public python-gast
15683 (package
15684 (name "python-gast")
15685 (version "0.2.2")
15686 (source
15687 (origin
15688 (method url-fetch)
15689 (uri (pypi-uri "gast" version))
15690 (sha256
15691 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15692 (build-system python-build-system)
15693 (propagated-inputs
15694 `(("python-astunparse" ,python-astunparse)))
15695 (home-page "https://pypi.org/project/gast/")
15696 (synopsis "Generic Python AST that abstracts the underlying Python version")
15697 (description
15698 "GAST provides a compatibility layer between the AST of various Python
15699 versions, as produced by @code{ast.parse} from the standard @code{ast}
15700 module.")
15701 (license license:bsd-3)))
15702
15703 (define-public python-wikidata
15704 (package
15705 (name "python-wikidata")
15706 (version "0.6.1")
15707 (source
15708 (origin
15709 (method url-fetch)
15710 (uri (pypi-uri "Wikidata" version))
15711 (sha256
15712 (base32
15713 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15714 (build-system python-build-system)
15715 (propagated-inputs
15716 `(("python-babel" ,python-babel)))
15717 (home-page "https://github.com/dahlia/wikidata")
15718 (synopsis "Wikidata client library")
15719 (description
15720 "This package provides a Python interface to
15721 @url{https://www.wikidata.org/, Wikidata}.")
15722 (properties '((upstream-name . "Wikidata")))
15723 (license license:gpl3+)))
15724
15725 (define-public python-doctest-ignore-unicode
15726 (package
15727 (name "python-doctest-ignore-unicode")
15728 (version "0.1.2")
15729 (source
15730 (origin
15731 (method url-fetch)
15732 (uri (pypi-uri "doctest-ignore-unicode" version))
15733 (sha256
15734 (base32
15735 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15736 (build-system python-build-system)
15737 (native-inputs
15738 `(("python-nose" ,python-nose)))
15739 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15740 (synopsis "Ignore Unicode literal prefixes in doctests")
15741 (description
15742 "This package adds support for a flag to ignore Unicode literal prefixes
15743 in doctests.")
15744 (license license:asl2.0)))
15745
15746 (define-public python-attr
15747 (package
15748 (name "python-attr")
15749 (version "0.3.1")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "attr" version))
15754 (sha256
15755 (base32
15756 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15757 (build-system python-build-system)
15758 (home-page "https://github.com/denis-ryzhkov/attr")
15759 (synopsis "Decorator for attributes of target function or class")
15760 (description "Simple decorator to set attributes of target function or
15761 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15762 (license license:expat)))
15763
15764 (define-public python-construct
15765 (package
15766 (name "python-construct")
15767 (version "2.9.45")
15768 (source
15769 (origin
15770 (method url-fetch)
15771 (uri (pypi-uri "construct" version))
15772 (sha256
15773 (base32
15774 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15775 (build-system python-build-system)
15776 (arguments
15777 `(#:tests? #f)) ; No tests exist.
15778 (propagated-inputs
15779 `(("python-extras" ,python-extras)
15780 ("python-arrow" ,python-arrow)
15781 ("python-numpy" ,python-numpy)
15782 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15783 (home-page "http://construct.readthedocs.io")
15784 (synopsis "Declarative and symmetrical parser and builder for binary data")
15785 (description
15786 "This package provides both simple, atomic constructs (such as
15787 integers of various sizes), as well as composite ones which allow you
15788 form hierarchical and sequential structures of increasing complexity.
15789 It features bit and byte granularity, easy debugging and testing, an
15790 easy-to-extend subclass system, and lots of primitive constructs to
15791 make your work easier.")
15792 (license license:expat)))
15793
15794 (define-public python-humanize
15795 (package
15796 (name "python-humanize")
15797 (version "0.5.1")
15798 (source
15799 (origin
15800 (method url-fetch)
15801 (uri (pypi-uri "humanize" version))
15802 (sha256
15803 (base32
15804 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15805 (arguments
15806 '(#:tests? #f)) ; tests not in pypi archive
15807 (build-system python-build-system)
15808 (home-page "https://github.com/jmoiron/humanize")
15809 (synopsis "Print numerical information in a human-readable form")
15810 (description "This package provides a Python module that displays numbers
15811 and dates in \"human readable\" forms. For example, it would display
15812 \"12345591313\" as \"12.3 billion\".")
15813 (license license:expat)))
15814
15815 (define-public python-txaio
15816 (package
15817 (name "python-txaio")
15818 (version "18.8.1")
15819 (source
15820 (origin
15821 (method url-fetch)
15822 (uri (pypi-uri "txaio" version))
15823 (sha256
15824 (base32
15825 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15826 (build-system python-build-system)
15827 (propagated-inputs
15828 `(("python-twisted" ,python-twisted)
15829 ("python-six" ,python-six)))
15830 (home-page "https://github.com/crossbario/txaio")
15831 (synopsis "Compatibility layer between Python asyncio and Twisted")
15832 (description "Txaio provides a compatibility layer between the Python
15833 @code{asyncio} module and @code{Twisted}.")
15834 (license license:expat)))
15835
15836 (define-public python-toolshed
15837 (package
15838 (name "python-toolshed")
15839 (version "0.4.6")
15840 (source
15841 (origin
15842 (method url-fetch)
15843 (uri (pypi-uri "toolshed" version))
15844 (sha256
15845 (base32
15846 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15847 (build-system python-build-system)
15848 (native-inputs
15849 `(("python-nose" ,python-nose)))
15850 (home-page "https://github.com/brentp/toolshed/")
15851 (synopsis "Collection of modules and functions for working with data")
15852 (description "This is a collection of well-tested, simple modules and
15853 functions that aim to reduce boilerplate when working with data.")
15854 (license license:bsd-2)))
15855
15856 (define-public python-annoy
15857 (package
15858 (name "python-annoy")
15859 (version "1.15.1")
15860 (source
15861 (origin
15862 (method url-fetch)
15863 (uri (pypi-uri "annoy" version))
15864 (sha256
15865 (base32
15866 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15867 (build-system python-build-system)
15868 (native-inputs
15869 `(("python-nose" ,python-nose)))
15870 (home-page "https://github.com/spotify/annoy/")
15871 (synopsis "Approximate nearest neighbors library")
15872 (description
15873 "Annoy is a C++ library with Python bindings to search for points in
15874 space that are close to a given query point. It also creates large read-only
15875 file-based data structures that are @code{mmap}ped into memory so that many
15876 processes may share the same data.")
15877 (license license:asl2.0)))
15878
15879 (define-public python-pylzma
15880 (package
15881 (name "python-pylzma")
15882 (version "0.5.0")
15883 (source
15884 (origin
15885 (method url-fetch)
15886 (uri (pypi-uri "pylzma" version))
15887 (sha256
15888 (base32
15889 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15890 (build-system python-build-system)
15891 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15892 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15893 (description "This package provides Python bindings for the LZMA library
15894 by Igor Pavlov.")
15895 (license license:lgpl2.1+)))
15896
15897 (define-public python2-pylzma
15898 (package-with-python2 python-pylzma))
15899
15900 (define-public python2-zeroconf
15901 (package
15902 (name "python2-zeroconf")
15903
15904 ;; This is the last version that supports Python 2.x.
15905 (version "0.19.1")
15906 (source
15907 (origin
15908 (method url-fetch)
15909 (uri (pypi-uri "zeroconf" version))
15910 (sha256
15911 (base32
15912 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15913 (build-system python-build-system)
15914 (arguments
15915 `(#:python ,python-2
15916 #:phases
15917 (modify-phases %standard-phases
15918 (add-after 'unpack 'patch-requires
15919 (lambda* (#:key inputs #:allow-other-keys)
15920 (substitute* "setup.py"
15921 (("enum-compat")
15922 "enum34"))
15923 #t)))))
15924 (native-inputs
15925 `(("python2-six" ,python2-six)
15926 ("python2-enum32" ,python2-enum34)
15927 ("python2-netifaces" ,python2-netifaces)
15928 ("python2-typing" ,python2-typing)))
15929 (home-page "https://github.com/jstasiak/python-zeroconf")
15930 (synopsis "Pure Python mDNS service discovery")
15931 (description
15932 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15933 compatible).")
15934 (license license:lgpl2.1+)))
15935
15936 (define-public python-bsddb3
15937 (package
15938 (name "python-bsddb3")
15939 (version "6.2.6")
15940 (source
15941 (origin
15942 (method url-fetch)
15943 (uri (pypi-uri "bsddb3" version))
15944 (sha256
15945 (base32
15946 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15947 (build-system python-build-system)
15948 (inputs
15949 `(("bdb" ,bdb)))
15950 (arguments
15951 '(#:phases
15952 (modify-phases %standard-phases
15953 (add-after 'unpack 'configure-locations
15954 (lambda* (#:key inputs #:allow-other-keys)
15955 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15956 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15957 #t))
15958 (replace 'check
15959 (lambda _
15960 (invoke "python3" "test3.py" "-v"))))))
15961 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15962 (synopsis "Python bindings for Oracle Berkeley DB")
15963 (description
15964 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15965 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15966 Transaction objects, and each of these is exposed as a Python type in the
15967 bsddb3.db module. The database objects can use various access methods: btree,
15968 hash, recno, and queue. Complete support of Berkeley DB distributed
15969 transactions. Complete support for Berkeley DB Replication Manager.
15970 Complete support for Berkeley DB Base Replication. Support for RPC.")
15971 (license license:bsd-3)))
15972
15973 (define-public python-dbfread
15974 (package
15975 (name "python-dbfread")
15976 (version "2.0.7")
15977 (source (origin
15978 (method url-fetch)
15979 (uri (pypi-uri "dbfread" version))
15980 (sha256
15981 (base32
15982 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15983 (build-system python-build-system)
15984 (native-inputs
15985 `(("python-pytest" ,python-pytest)))
15986 (home-page "https://dbfread.readthedocs.io")
15987 (synopsis "Read DBF Files with Python")
15988 (description
15989 "This library reads DBF files and returns the data as native Python data
15990 types for further processing. It is primarily intended for batch jobs and
15991 one-off scripts.")
15992 (license license:expat)))
15993
15994 (define-public python-cached-property
15995 (package
15996 (name "python-cached-property")
15997 (version "1.5.1")
15998 (source
15999 (origin
16000 (method url-fetch)
16001 (uri (pypi-uri "cached-property" version))
16002 (sha256
16003 (base32
16004 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16005 (build-system python-build-system)
16006 (arguments
16007 `(#:phases
16008 (modify-phases %standard-phases
16009 ;; https://github.com/pydanny/cached-property/issues/131
16010 ;; recent versions of freezegun break one test
16011 (add-after 'unpack 'disable-broken-test
16012 (lambda _
16013 (substitute* "tests/test_cached_property.py"
16014 (("def test_threads_ttl_expiry\\(self\\)" m)
16015 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16016 " " m)))
16017 #t)))))
16018 (native-inputs
16019 `(("python-freezegun" ,python-freezegun)))
16020 (home-page
16021 "https://github.com/pydanny/cached-property")
16022 (synopsis
16023 "Decorator for caching properties in classes")
16024 (description
16025 "This package provides a decorator which makes caching
16026 time-or-computationally-expensive properties quick and easy and works in Python
16027 2 or 3.")
16028 (license license:bsd-3)))