gnu: python-pyicu: Update to 2.3.1.
[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 ;;;
65 ;;; This file is part of GNU Guix.
66 ;;;
67 ;;; GNU Guix is free software; you can redistribute it and/or modify it
68 ;;; under the terms of the GNU General Public License as published by
69 ;;; the Free Software Foundation; either version 3 of the License, or (at
70 ;;; your option) any later version.
71 ;;;
72 ;;; GNU Guix is distributed in the hope that it will be useful, but
73 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
74 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 ;;; GNU General Public License for more details.
76 ;;;
77 ;;; You should have received a copy of the GNU General Public License
78 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
79
80 (define-module (gnu packages python-xyz)
81 #:use-module ((guix licenses) #:prefix license:)
82 #:use-module (gnu packages)
83 #:use-module (gnu packages algebra)
84 #:use-module (gnu packages adns)
85 #:use-module (gnu packages attr)
86 #:use-module (gnu packages backup)
87 #:use-module (gnu packages bash)
88 #:use-module (gnu packages check)
89 #:use-module (gnu packages compression)
90 #:use-module (gnu packages crypto)
91 #:use-module (gnu packages databases)
92 #:use-module (gnu packages dbm)
93 #:use-module (gnu packages file)
94 #:use-module (gnu packages fontutils)
95 #:use-module (gnu packages gcc)
96 #:use-module (gnu packages geo)
97 #:use-module (gnu packages ghostscript)
98 #:use-module (gnu packages gl)
99 #:use-module (gnu packages glib)
100 #:use-module (gnu packages graphviz)
101 #:use-module (gnu packages graphics)
102 #:use-module (gnu packages gstreamer)
103 #:use-module (gnu packages gtk)
104 #:use-module (gnu packages icu4c)
105 #:use-module (gnu packages image)
106 #:use-module (gnu packages imagemagick)
107 #:use-module (gnu packages libevent)
108 #:use-module (gnu packages libffi)
109 #:use-module (gnu packages linux)
110 #:use-module (gnu packages llvm)
111 #:use-module (gnu packages man)
112 #:use-module (gnu packages maths)
113 #:use-module (gnu packages monitoring)
114 #:use-module (gnu packages multiprecision)
115 #:use-module (gnu packages networking)
116 #:use-module (gnu packages ncurses)
117 #:use-module (gnu packages openstack)
118 #:use-module (gnu packages pcre)
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages pkg-config)
121 #:use-module (gnu packages python)
122 #:use-module (gnu packages python-check)
123 #:use-module (gnu packages python-compression)
124 #:use-module (gnu packages python-crypto)
125 #:use-module (gnu packages python-web)
126 #:use-module (gnu packages qt)
127 #:use-module (gnu packages readline)
128 #:use-module (gnu packages sdl)
129 #:use-module (gnu packages search)
130 #:use-module (gnu packages shells)
131 #:use-module (gnu packages sphinx)
132 #:use-module (gnu packages ssh)
133 #:use-module (gnu packages terminals)
134 #:use-module (gnu packages tex)
135 #:use-module (gnu packages texinfo)
136 #:use-module (gnu packages time)
137 #:use-module (gnu packages tls)
138 #:use-module (gnu packages version-control)
139 #:use-module (gnu packages video)
140 #:use-module (gnu packages web)
141 #:use-module (gnu packages base)
142 #:use-module (gnu packages xml)
143 #:use-module (gnu packages xorg)
144 #:use-module (gnu packages xdisorg)
145 #:use-module (gnu packages tcl)
146 #:use-module (gnu packages bdw-gc)
147 #:use-module (gnu packages serialization)
148 #:use-module (guix packages)
149 #:use-module (guix download)
150 #:use-module (guix git-download)
151 #:use-module (guix hg-download)
152 #:use-module (guix utils)
153 #:use-module (guix build-system gnu)
154 #:use-module (guix build-system cmake)
155 #:use-module (guix build-system python)
156 #:use-module (guix build-system trivial)
157 #:use-module (srfi srfi-1)
158 #:use-module (srfi srfi-26))
159
160 (define-public python-psutil
161 (package
162 (name "python-psutil")
163 (version "5.6.2")
164 (source
165 (origin
166 (method url-fetch)
167 (uri (pypi-uri "psutil" version))
168 (sha256
169 (base32
170 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
171 (build-system python-build-system)
172 (arguments
173 ;; FIXME: some tests does not return and times out.
174 '(#:tests? #f))
175 (home-page "https://www.github.com/giampaolo/psutil")
176 (synopsis "Library for retrieving information on running processes")
177 (description
178 "psutil (Python system and process utilities) is a library for retrieving
179 information on running processes and system utilization (CPU, memory, disks,
180 network) in Python. It is useful mainly for system monitoring, profiling and
181 limiting process resources and management of running processes. It implements
182 many functionalities offered by command line tools such as: ps, top, lsof,
183 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
184 pidof, tty, taskset, pmap.")
185 (properties `((python2-variant . ,(delay python2-psutil))))
186 (license license:bsd-3)))
187
188 (define-public python2-psutil
189 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
190 (package
191 (inherit base)
192 (propagated-inputs
193 `(("python2-enum34" ,python2-enum34) ;optional
194 ,@(package-propagated-inputs base))))))
195
196 (define-public python-shapely
197 (package
198 (name "python-shapely")
199 (version "1.6.4.post2")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (pypi-uri "Shapely" version))
204 (sha256
205 (base32
206 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
207 (build-system python-build-system)
208 (native-inputs
209 `(("python-cython" ,python-cython)
210 ("python-matplotlib" ,python-matplotlib)
211 ("python-pytest" ,python-pytest)
212 ("python-pytest-cov" ,python-pytest-cov)))
213 (inputs
214 `(("geos" ,geos)))
215 (propagated-inputs
216 `(("python-numpy" ,python-numpy)))
217 (arguments
218 `(#:phases
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch-geos-path
221 (lambda* (#:key inputs #:allow-other-keys)
222 (let ((geos (assoc-ref inputs "geos"))
223 (glibc (assoc-ref inputs ,(if (%current-target-system)
224 "cross-libc" "libc"))))
225 (substitute* "shapely/geos.py"
226 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
227 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
228 geos "/lib/libgeos_c.so'])"))
229 (("free = load_dll\\('c'\\)\\.free")
230 (string-append "free = load_dll('c', fallbacks=['"
231 glibc "/lib/libc.so.6']).free"))))
232 #t)))))
233 (home-page "https://github.com/Toblerity/Shapely")
234 (synopsis "Library for the manipulation and analysis of geometric objects")
235 (description "Shapely is a Python package for manipulation and analysis of
236 planar geometric objects. It is based on the @code{GEOS} library.")
237 (license license:bsd-3)))
238
239 (define-public python-shortuuid
240 (package
241 (name "python-shortuuid")
242 (version "0.5.0")
243 (source
244 (origin
245 (method url-fetch)
246 (uri (pypi-uri "shortuuid" version))
247 (sha256
248 (base32
249 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
250 (build-system python-build-system)
251 (native-inputs
252 `(("python-pep8" ,python-pep8)))
253 (home-page "https://github.com/skorokithakis/shortuuid")
254 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
255 (description
256 "@code{shortuuid} is a Python library for generating concise, unambiguous
257 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
258 module and then similar looking characters are removed.")
259 (license license:bsd-3)))
260
261 (define-public python-logwrap
262 (package
263 (name "python-logwrap")
264 (version "3.2.1")
265 (source
266 (origin
267 (method url-fetch)
268 (uri (pypi-uri "logwrap" version ".zip"))
269 (sha256
270 (base32
271 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
272 (build-system python-build-system)
273 (propagated-inputs
274 `(("python-six" ,python-six)
275 ("python-typing" ,python-typing)))
276 (native-inputs
277 `(("unzip" ,unzip)
278 ("python-cython" ,python-cython)
279 ("python-pytest" ,python-pytest)
280 ("python-pytest-cov" ,python-pytest-cov)
281 ("python-pytest-runner" ,python-pytest-runner)))
282 (home-page "https://github.com/penguinolog/logwrap")
283 (synopsis "Decorator for logging function arguments")
284 (description "This package provides a decorator to log function arguments
285 and function call return values in a human-readable way.")
286 (license license:asl2.0)))
287
288 (define-public python2-shapely
289 (package-with-python2 python-shapely))
290
291 (define-public python-clyent
292 (package
293 (name "python-clyent")
294 (version "1.2.1")
295 (source
296 (origin
297 (method url-fetch)
298 (uri (pypi-uri "clyent" version))
299 (sha256
300 (base32
301 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
302 (build-system python-build-system)
303 (native-inputs
304 `(("python-mock" ,python-mock)))
305 (home-page "https://github.com/binstar/clyent")
306 (synopsis "Command line client library")
307 (description "Clyent is a Python command line utiliy library. It is used
308 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
309 (license license:bsd-3)))
310
311 (define-public python2-clyent
312 (package-with-python2 python-clyent))
313
314 (define-public python-babel
315 (package
316 (name "python-babel")
317 (version "2.7.0")
318 (source
319 (origin
320 (method url-fetch)
321 (uri (pypi-uri "Babel" version))
322 (sha256
323 (base32
324 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
325 (build-system python-build-system)
326 (native-inputs
327 `(("python-freezegun" ,python-freezegun)
328 ("python-pytest" ,python-pytest)))
329 (propagated-inputs
330 `(("python-pytz" ,python-pytz)))
331 (arguments
332 `(#:phases (modify-phases %standard-phases
333 (replace 'check
334 (lambda _
335 (invoke "pytest" "-vv" "-k"
336 (string-append
337 ;; XXX: These tests fail when using Pytest 4.x and
338 ;; Babel 2.6.0. Try removing this for later versions.
339 "not test_no_inherit_metazone_marker_never_in_output"
340 " and not test_smoke_dates"
341 " and not test_smoke_numbers")))))))
342 (home-page "http://babel.pocoo.org/")
343 (synopsis
344 "Tools for internationalizing Python applications")
345 (description
346 "Babel is composed of two major parts:
347 - tools to build and work with gettext message catalogs
348 - a Python interface to the CLDR (Common Locale Data Repository), providing
349 access to various locale display names, localized number and date formatting,
350 etc. ")
351 (license license:bsd-3)))
352
353 (define-public python2-babel
354 (package-with-python2 python-babel))
355
356 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
357 (define-public python2-babel-2.6
358 (package
359 (inherit python2-babel)
360 (version "2.6.0")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "Babel" version))
364 (sha256
365 (base32
366 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
367
368 (define-public python2-backport-ssl-match-hostname
369 (package
370 (name "python2-backport-ssl-match-hostname")
371 (version "3.5.0.1")
372 (source
373 (origin
374 (method url-fetch)
375 (uri (pypi-uri "backports.ssl_match_hostname" version))
376 (sha256
377 (base32
378 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
379 (build-system python-build-system)
380 (arguments
381 `(#:python ,python-2
382 #:tests? #f)) ; no test target
383 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
384 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
385 (description
386 "This backport brings the ssl.match_hostname() function to users of
387 earlier versions of Python. The function checks the hostname in the
388 certificate returned by the server to which a connection has been established,
389 and verifies that it matches the intended target hostname.")
390 (license license:psfl)))
391
392 (define-public python-hdf4
393 (package
394 (name "python-hdf4")
395 (version "0.9")
396 (source
397 (origin
398 (method url-fetch)
399 (uri (pypi-uri name version))
400 (sha256
401 (base32
402 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
403 (build-system python-build-system)
404 (native-inputs `(("nose" ,python-nose)))
405 (propagated-inputs `(("numpy" ,python-numpy)))
406 (inputs
407 `(("hdf4" ,hdf4)
408 ("libjpeg" ,libjpeg)
409 ("zlib" ,zlib)))
410 (arguments
411 `(#:phases
412 (modify-phases %standard-phases
413 (replace 'check
414 (lambda _
415 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
416 ;; on to import numpy. Somehow this works on their CI system.
417 ;; Let's just manage PYTHONPATH here instead.
418 (substitute* "runexamples.sh"
419 (("export PYTHONPATH=.*") ""))
420 (setenv "PYTHONPATH"
421 (string-append (getcwd) ":"
422 (getenv "PYTHONPATH")))
423 (invoke "./runexamples.sh")
424 (invoke "nosetests" "-v"))))))
425 (home-page "https://github.com/fhs/python-hdf4")
426 (synopsis "Python interface to the NCSA HDF4 library")
427 (description
428 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
429 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
430 NetCDF files can also be read and modified. Python-HDF4 is a fork of
431 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
432 (license license:expat)))
433
434 (define-public python2-hdf4
435 (package-with-python2 python-hdf4))
436
437 (define-public python-h5py
438 (package
439 (name "python-h5py")
440 (version "2.8.0")
441 (source
442 (origin
443 (method url-fetch)
444 (uri (pypi-uri "h5py" version))
445 (sha256
446 (base32
447 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
448 (build-system python-build-system)
449 (arguments
450 `(#:tests? #f ; no test target
451 #:phases
452 (modify-phases %standard-phases
453 (add-after 'unpack 'fix-hdf5-paths
454 (lambda* (#:key inputs #:allow-other-keys)
455 (let ((prefix (assoc-ref inputs "hdf5")))
456 (substitute* "setup_build.py"
457 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
458 (string-append "['" prefix "/lib" "']"))
459 (("'/opt/local/include', '/usr/local/include'")
460 (string-append "'" prefix "/include" "'")))
461 (substitute* "setup_configure.py"
462 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
463 (string-append "['" prefix "/lib" "']")))
464 #t))))))
465 (propagated-inputs
466 `(("python-six" ,python-six)
467 ("python-numpy" ,python-numpy)))
468 (inputs
469 `(("hdf5" ,hdf5)))
470 (native-inputs
471 `(("python-cython" ,python-cython)
472 ("python-pkgconfig" ,python-pkgconfig)))
473 (home-page "http://www.h5py.org/")
474 (synopsis "Read and write HDF5 files from Python")
475 (description
476 "The h5py package provides both a high- and low-level interface to the
477 HDF5 library from Python. The low-level interface is intended to be a
478 complete wrapping of the HDF5 API, while the high-level component supports
479 access to HDF5 files, datasets and groups using established Python and NumPy
480 concepts.")
481 (license license:bsd-3)))
482
483 (define-public python2-h5py
484 (package-with-python2 python-h5py))
485
486 (define-public python-sh
487 (package
488 (name "python-sh")
489 (version "1.12.14")
490 (source
491 (origin
492 (method url-fetch)
493 (uri (pypi-uri "sh" version))
494 (sha256
495 (base32
496 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
497 (build-system python-build-system)
498 (arguments
499 '(#:phases
500 (modify-phases %standard-phases
501 (replace 'check
502 (lambda _
503 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
504 (setenv "HOME" "/tmp")
505 (invoke "python" "sh.py" "test"))))))
506 (native-inputs
507 `(("python-coverage" ,python-coverage)))
508 (home-page "https://github.com/amoffat/sh")
509 (synopsis "Python subprocess replacement")
510 (description "This package provides a replacement for Python's
511 @code{subprocess} feature.")
512 (license license:expat)))
513
514 (define-public python2-sh
515 (package-with-python2 python-sh))
516
517 (define-public python-cftime
518 (package
519 (name "python-cftime")
520 (version "1.0.3.4")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "cftime" version))
525 (sha256
526 (base32
527 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
528 (build-system python-build-system)
529 (propagated-inputs
530 `(("python-numpy" ,python-numpy)))
531 (native-inputs
532 `(("python-coveralls" ,python-coveralls)
533 ("python-cython" ,python-cython)
534 ("python-pytest-cov" ,python-pytest-cov)))
535 (home-page "https://github.com/Unidata/cftime")
536 (synopsis "Library for time handling")
537 (description
538 "This package provides time-handling functionality that used to be part
539 of the netcdf4 package before.")
540 ;; This package claims to include code under the GPLv3 but is released
541 ;; under ISC.
542 (license (list license:isc license:gpl3+))))
543
544 (define-public python-netcdf4
545 (package
546 (name "python-netcdf4")
547 (version "1.4.2")
548 (source
549 (origin
550 (method url-fetch)
551 (uri (pypi-uri "netCDF4" version))
552 (sha256
553 (base32
554 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
555 (build-system python-build-system)
556 (arguments
557 '(#:phases
558 (modify-phases %standard-phases
559 (add-after 'unpack 'configure-locations
560 (lambda* (#:key inputs #:allow-other-keys)
561 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
562 #t)))))
563 (native-inputs
564 `(("python-cython" ,python-cython)))
565 (propagated-inputs
566 `(("python-numpy" ,python-numpy)
567 ("python-cftime" ,python-cftime)))
568 (inputs
569 `(("netcdf" ,netcdf)
570 ("hdf4" ,hdf4)
571 ("hdf5" ,hdf5)))
572 (home-page "https://github.com/Unidata/netcdf4-python")
573 (synopsis "Python/numpy interface to the netCDF library")
574 (description "Netcdf4-python is a Python interface to the netCDF C
575 library. netCDF version 4 has many features not found in earlier
576 versions of the library and is implemented on top of HDF5. This module
577 can read and write files in both the new netCDF 4 and the old netCDF 3
578 format, and can create files that are readable by HDF5 clients. The
579 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
580 to users of that module.")
581 ;; The software is mainly ISC, but includes some files covered
582 ;; by the Expat license.
583 (license (list license:isc license:expat))))
584
585 (define-public python2-netcdf4
586 (package-with-python2 python-netcdf4))
587
588 (define-public python-lockfile
589 (package
590 (name "python-lockfile")
591 (version "0.12.2")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "lockfile" version))
596 (sha256
597 (base32
598 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
599 (build-system python-build-system)
600 (arguments '(#:test-target "check"))
601 (native-inputs
602 `(("python-pbr" ,python-pbr)))
603 (home-page "https://launchpad.net/pylockfile")
604 (synopsis "Platform-independent file locking module")
605 (description
606 "The lockfile package exports a LockFile class which provides a simple
607 API for locking files.")
608 (license license:expat)))
609
610 (define-public python2-lockfile
611 (package-with-python2 python-lockfile))
612
613 (define-public python-semantic-version
614 (package
615 (name "python-semantic-version")
616 (version "2.6.0")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (pypi-uri "semantic_version" version))
621 (sha256
622 (base32
623 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
624 (build-system python-build-system)
625 (arguments
626 `(#:tests? #f)) ; PyPI tarball lacks tests
627 (home-page "https://github.com/rbarrois/python-semanticversion")
628 (synopsis "Semantic versioning module for Python")
629 (description
630 "The @code{semantic_version} class is a small library for handling
631 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
632
633 It can compare versions, generate a new version that represents a bump in one of
634 the version levels, and check whether any given string is a proper semantic
635 version identifier.")
636 (license license:bsd-3)))
637
638 (define-public python2-semantic-version
639 (package-with-python2 python-semantic-version))
640
641 (define-public python-serpent
642 (package
643 (name "python-serpent")
644 (version "1.28")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "serpent" version))
649 (sha256
650 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-attrs" ,python-attrs)
654 ("python-pytz" ,python-pytz)))
655 (home-page "https://github.com/irmen/Serpent")
656 (synopsis "Serializer for literal Python expressions")
657 (description
658 "Serpent provides @code{ast.literal_eval()}-compatible object tree
659 serialization. It serializes an object tree into bytes (an utf-8 encoded
660 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
661 to rebuild the original object tree.
662
663 Because only safe literals are encoded, it is safe to send serpent data to
664 other machines, such as over the network.")
665 (license license:expat)))
666
667 (define-public python-setuptools
668 (package
669 (name "python-setuptools")
670 (version "40.8.0")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "setuptools" version ".zip"))
675 (sha256
676 (base32
677 "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf"))
678 (modules '((guix build utils)))
679 (snippet
680 '(begin
681 ;; Remove included binaries which are used to build self-extracting
682 ;; installers for Windows.
683 ;; TODO: Find some way to build them ourself so we can include them.
684 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
685 #t))))
686 (build-system python-build-system)
687 ;; FIXME: Tests require pytest, which itself relies on setuptools.
688 ;; One could bootstrap with an internal untested setuptools.
689 (arguments
690 `(#:tests? #f))
691 (home-page "https://pypi.python.org/pypi/setuptools")
692 (synopsis
693 "Library designed to facilitate packaging Python projects")
694 (description
695 "Setuptools is a fully-featured, stable library designed to facilitate
696 packaging Python projects, where packaging includes:
697 Python package and module definitions,
698 distribution package metadata,
699 test hooks,
700 project installation,
701 platform-specific details,
702 Python 3 support.")
703 ;; TODO: setuptools now bundles the following libraries:
704 ;; packaging, pyparsing, six and appdirs. How to unbundle?
705 (license (list license:psfl ; setuptools itself
706 license:expat ; six, appdirs, pyparsing
707 license:asl2.0 ; packaging is dual ASL2/BSD-2
708 license:bsd-2))))
709
710 (define-public python2-setuptools
711 (package-with-python2 python-setuptools))
712
713 (define-public python-uniseg
714 (package
715 (name "python-uniseg")
716 (version "0.7.1")
717 (source
718 (origin
719 (method url-fetch)
720 (uri (pypi-uri "uniseg" version ".zip"))
721 (sha256
722 (base32
723 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
724 (build-system python-build-system)
725 (arguments
726 '(#:tests? #f)) ; The test suite requires network access.
727 (native-inputs
728 `(("unzip" ,unzip)))
729 (home-page
730 "https://bitbucket.org/emptypage/uniseg-python")
731 (synopsis
732 "Python library to determine Unicode text segmentations")
733 (description
734 "Uniseg is a Python package used to determine Unicode text segmentations.
735 Supported segmentations include:
736 @enumerate
737 @item @dfn{Code point} (any value in the Unicode codespace)
738 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
739 multiple Unicode code points, e.g. \"G\" + acute-accent)
740 @item Word break
741 @item Sentence break
742 @item Line break
743 @end enumerate")
744 (license license:expat)))
745
746 (define-public python2-uniseg
747 (package-with-python2 python-uniseg))
748
749 (define-public python-humanfriendly
750 (package
751 (name "python-humanfriendly")
752 (version "4.4.1")
753 (source
754 (origin
755 (method url-fetch)
756 (uri (pypi-uri "humanfriendly" version))
757 (sha256
758 (base32
759 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
760 (build-system python-build-system)
761 (arguments
762 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
763 #:tests? #f))
764 (propagated-inputs
765 `(("python-monotonic" ,python-monotonic)))
766 (home-page "https://humanfriendly.readthedocs.io")
767 (synopsis "Human-friendly input and output in Python")
768 (description
769 "The functions and classes in @code{humanfriendly} can be used to make
770 text interfaces more user-friendly. It includes tools to parse and format
771 numbers, file sizes, and timespans, timers for long-running operations, menus
772 to allow the user to choose from a list of options, and terminal interaction
773 helpers.")
774 (license license:expat)))
775
776 (define-public python2-humanfriendly
777 (package-with-python2 python-humanfriendly))
778
779 (define-public python-capturer
780 (package
781 (name "python-capturer")
782 (version "2.4")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "capturer" version))
787 (sha256
788 (base32
789 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
790 (build-system python-build-system)
791 (arguments
792 `(#:tests? #f))
793 (propagated-inputs
794 `(("python-humanfriendly" ,python-humanfriendly)))
795 (home-page "https://capturer.readthedocs.io")
796 (synopsis "Capture stdout and stderr streams of the current process")
797 (description
798 "The capturer package makes it easy to capture the stdout and stderr
799 streams of the current process and subprocesses. Output can be relayed
800 to the terminal in real time but is also available to the Python program
801 for additional processing.")
802 (license license:expat)))
803
804 (define-public python2-capturer
805 (package-with-python2 python-capturer))
806
807 (define-public python-case
808 (package
809 (name "python-case")
810 (version "1.5.3")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "case" version))
815 (sha256
816 (base32
817 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
818 (build-system python-build-system)
819 (propagated-inputs
820 `(("python-mock" ,python-mock)
821 ("python-nose" ,python-nose)
822 ("python-six" ,python-six)
823 ("python-unittest2" ,python-unittest2)))
824 (native-inputs
825 `(("python-coverage" ,python-coverage)))
826 (home-page "https://github.com/celery/case")
827 (synopsis "Unittest utilities and convenience methods")
828 (description
829 "The @code{case} package provides utilities on top of unittest, including
830 some helpful Python 2 compatibility convenience methods.")
831 (license license:bsd-3)))
832
833 (define-public python-verboselogs
834 (package
835 (name "python-verboselogs")
836 (version "1.7")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (pypi-uri "verboselogs" version))
841 (sha256
842 (base32
843 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
844 (build-system python-build-system)
845 (native-inputs
846 `(("python-mock" ,python-mock)
847 ("python-astroid" ,python-astroid)
848 ("python-pylint" ,python-pylint)))
849 (home-page "https://verboselogs.readthedocs.io")
850 (synopsis "Verbose logging level for Python's logging module")
851 (description
852 "The @code{verboselogs} package extends Python's @code{logging} module to
853 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
854 (license license:expat)))
855
856 (define-public python2-verboselogs
857 (package-with-python2 python-verboselogs))
858
859 (define-public python-coloredlogs
860 (package
861 (name "python-coloredlogs")
862 (version "7.3")
863 (source
864 (origin
865 (method url-fetch)
866 (uri (pypi-uri "coloredlogs" version))
867 (sha256
868 (base32
869 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
870 (build-system python-build-system)
871 (arguments
872 `(;Tests require some updated modules
873 #:tests? #f))
874 (propagated-inputs
875 `(("python-capturer" ,python-capturer)))
876 (home-page "https://coloredlogs.readthedocs.io")
877 (synopsis "Colored stream handler for Python's logging module")
878 (description
879 "The @code{coloredlogs} package enables colored terminal output for
880 Python's logging module. The @code{ColoredFormatter} class inherits from
881 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
882 messages in color.")
883 (license license:expat)))
884
885 (define-public python2-coloredlogs
886 (package-with-python2 python-coloredlogs))
887
888 (define-public python-et-xmlfile
889 (package
890 (name "python-et-xmlfile")
891 (version "1.0.1")
892 (source
893 (origin
894 (method url-fetch)
895 (uri (pypi-uri "et_xmlfile" version))
896 (sha256
897 (base32
898 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
899 (build-system python-build-system)
900 (arguments
901 `(#:phases (modify-phases %standard-phases
902 (replace 'check
903 (lambda _
904 (invoke "pytest"))))))
905 (native-inputs
906 `(("python-pytest" ,python-pytest)
907 ("python-lxml" ,python-lxml))) ;used for the tests
908 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
909 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
910 (description "This Python library is based upon the @code{xmlfile} module
911 from @code{lxml}. It aims to provide a low memory, compatible implementation
912 of @code{xmlfile}.")
913 (license license:expat)))
914
915 (define-public python2-et-xmlfile
916 (package-with-python2 python-et-xmlfile))
917
918 (define-public python-openpyxl
919 (package
920 (name "python-openpyxl")
921 (version "2.6.2")
922 (source
923 (origin
924 ;; We use the upstream repository, as the tests are not included in the
925 ;; PyPI releases.
926 (method hg-fetch)
927 (uri (hg-reference
928 (url "https://bitbucket.org/openpyxl/openpyxl")
929 (changeset version)))
930 (file-name (string-append name "-" version "-checkout"))
931 (sha256
932 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
933 (build-system python-build-system)
934 (arguments
935 `(#:phases (modify-phases %standard-phases
936 (replace 'check
937 (lambda _
938 (invoke "pytest"))))))
939 (native-inputs
940 ;; For the test suite.
941 `(("python-lxml" ,python-lxml)
942 ("python-pillow" ,python-pillow)
943 ("python-pytest" ,python-pytest)))
944 (propagated-inputs
945 `(("python-et-xmlfile" ,python-et-xmlfile)
946 ("python-jdcal" ,python-jdcal)))
947 (home-page "https://openpyxl.readthedocs.io")
948 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
949 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
950 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
951 standard.")
952 (license license:expat)))
953
954 (define-public python-eventlet
955 (package
956 (name "python-eventlet")
957 (version "0.20.1")
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "eventlet" version))
962 (sha256
963 (base32
964 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
965 (build-system python-build-system)
966 (propagated-inputs
967 `(("python-greenlet" ,python-greenlet)))
968 (arguments
969 ;; TODO: Requires unpackaged 'enum-compat'.
970 '(#:tests? #f))
971 (home-page "http://eventlet.net")
972 (synopsis "Concurrent networking library for Python")
973 (description
974 "Eventlet is a concurrent networking library for Python that
975 allows you to change how you run your code, not how you write it.
976 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
977 Coroutines ensure that the developer uses a blocking style of programming
978 that is similar to threading, but provide the benefits of non-blocking I/O.
979 The event dispatch is implicit, which means you can easily use @code{Eventlet}
980 from the Python interpreter, or as a small part of a larger application.")
981 (license license:expat)))
982
983 (define-public python2-eventlet
984 (let ((base (package-with-python2
985 (strip-python2-variant python-eventlet))))
986 (package (inherit base)
987 (propagated-inputs
988 `(("python2-enum34" ,python2-enum34)
989 ,@(package-propagated-inputs base))))))
990
991 (define-public python-six
992 (package
993 (name "python-six")
994 (version "1.12.0")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "six" version))
999 (sha256
1000 (base32
1001 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:phases
1005 (modify-phases %standard-phases
1006 (replace 'check
1007 (lambda _
1008 (invoke "py.test" "-v"))))))
1009 (native-inputs
1010 `(("python-py" ,python-py)
1011 ("python-pytest" ,python-pytest-bootstrap)))
1012 (home-page "https://pypi.python.org/pypi/six/")
1013 (synopsis "Python 2 and 3 compatibility utilities")
1014 (description
1015 "Six is a Python 2 and 3 compatibility library. It provides utility
1016 functions for smoothing over the differences between the Python versions with
1017 the goal of writing Python code that is compatible on both Python versions.
1018 Six supports every Python version since 2.5. It is contained in only one
1019 Python file, so it can be easily copied into your project.")
1020 (license license:x11)))
1021
1022 (define-public python2-six
1023 (package-with-python2 python-six))
1024
1025 (define-public python-six-bootstrap
1026 (package
1027 (inherit python-six)
1028 (name "python-six-bootstrap")
1029 (native-inputs `())
1030 (arguments `(#:tests? #f))))
1031
1032 (define-public python2-six-bootstrap
1033 (package-with-python2 python-six-bootstrap))
1034
1035 (define-public python-schedule
1036 (package
1037 (name "python-schedule")
1038 (version "0.4.3")
1039 (source
1040 (origin
1041 (method url-fetch)
1042 (uri (pypi-uri "schedule" version))
1043 (sha256
1044 (base32
1045 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1046 (build-system python-build-system)
1047 (native-inputs
1048 `(("python-pytest" ,python-pytest)
1049 ("python-mock" ,python-mock)))
1050 (home-page "https://github.com/dbader/schedule")
1051 (synopsis "Schedule periodic function calls in Python")
1052 (description
1053 "Schedule is an in-process scheduler for periodic jobs that uses the
1054 builder pattern for configuration. Schedule lets you run Python functions (or
1055 any other callable) periodically at pre-determined intervals using a simple,
1056 human-friendly syntax.")
1057 (license license:expat)))
1058
1059 (define-public python2-schedule
1060 (package-with-python2 python-schedule))
1061
1062 (define-public python-pandas
1063 (package
1064 (name "python-pandas")
1065 (version "0.24.2")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (pypi-uri "pandas" version))
1070 (sha256
1071 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1072 (build-system python-build-system)
1073 (arguments
1074 `(#:modules ((guix build utils)
1075 (guix build python-build-system)
1076 (ice-9 ftw)
1077 (srfi srfi-26))
1078 #:phases (modify-phases %standard-phases
1079 (add-after 'unpack 'patch-which
1080 (lambda* (#:key inputs #:allow-other-keys)
1081 (let ((which (assoc-ref inputs "which")))
1082 (substitute* "pandas/io/clipboard/__init__.py"
1083 (("^CHECK_CMD = .*")
1084 (string-append "CHECK_CMD = \"" which "\"\n"))))
1085 #t))
1086 (replace 'check
1087 (lambda _
1088 (let ((build-directory
1089 (string-append
1090 (getcwd) "/build/"
1091 (car (scandir "build"
1092 (cut string-prefix? "lib." <>))))))
1093 ;; Disable the "strict data files" option which causes
1094 ;; the build to error out if required data files are
1095 ;; not available (as is the case with PyPI archives).
1096 (substitute* "setup.cfg"
1097 (("addopts = --strict-data-files") "addopts = "))
1098 (with-directory-excursion build-directory
1099 ;; Delete tests that require "moto" which is not yet
1100 ;; in Guix.
1101 (for-each delete-file
1102 '("pandas/tests/io/conftest.py"
1103 "pandas/tests/io/json/test_compression.py"
1104 "pandas/tests/io/parser/test_network.py"
1105 "pandas/tests/io/test_parquet.py"))
1106 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1107 "--skip-network" "-k"
1108 ;; XXX: Due to the deleted tests above.
1109 "not test_read_s3_jsonl"))))))))
1110 (propagated-inputs
1111 `(("python-numpy" ,python-numpy)
1112 ("python-openpyxl" ,python-openpyxl)
1113 ("python-pytz" ,python-pytz)
1114 ("python-dateutil" ,python-dateutil)
1115 ("python-xlrd" ,python-xlrd)))
1116 (inputs
1117 `(("which" ,which)))
1118 (native-inputs
1119 `(("python-cython" ,python-cython)
1120 ("python-beautifulsoup4" ,python-beautifulsoup4)
1121 ("python-lxml" ,python-lxml)
1122 ("python-html5lib" ,python-html5lib)
1123 ("python-nose" ,python-nose)
1124 ("python-pytest" ,python-pytest)
1125 ("python-pytest-mock" ,python-pytest-mock)))
1126 (home-page "https://pandas.pydata.org")
1127 (synopsis "Data structures for data analysis, time series, and statistics")
1128 (description
1129 "Pandas is a Python package providing fast, flexible, and expressive data
1130 structures designed to make working with structured (tabular,
1131 multidimensional, potentially heterogeneous) and time series data both easy
1132 and intuitive. It aims to be the fundamental high-level building block for
1133 doing practical, real world data analysis in Python.")
1134 (license license:bsd-3)))
1135
1136 (define-public python2-pandas
1137 (package-with-python2 python-pandas))
1138
1139 (define-public python2-mechanize
1140 (package
1141 (name "python2-mechanize")
1142 (version "0.2.5")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "mechanize" version))
1147 (sha256
1148 (base32
1149 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1150 (build-system python-build-system)
1151 (arguments
1152 `(#:python ,python-2 ; apparently incompatible with Python 3
1153 #:tests? #f))
1154 ;; test fails with message
1155 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1156 ;; (python-3.3.2) or
1157 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1158 ;; (python-2.7.5).
1159 ;; The source code is from March 2011 and probably not up-to-date
1160 ;; with respect to python unit tests.
1161 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1162 (synopsis
1163 "Stateful programmatic web browsing in Python")
1164 (description
1165 "Mechanize implements stateful programmatic web browsing in Python,
1166 after Andy Lester’s Perl module WWW::Mechanize.")
1167 (license (license:non-copyleft
1168 "file://COPYING"
1169 "See COPYING in the distribution."))))
1170
1171
1172 (define-public python-simplejson
1173 (package
1174 (name "python-simplejson")
1175 (version "3.14.0")
1176 (source
1177 (origin
1178 (method url-fetch)
1179 (uri (pypi-uri "simplejson" version))
1180 (sha256
1181 (base32
1182 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1183 (build-system python-build-system)
1184 (home-page "http://simplejson.readthedocs.org/en/latest/")
1185 (synopsis
1186 "Json library for Python")
1187 (description
1188 "JSON (JavaScript Object Notation) is a subset of JavaScript
1189 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1190 format.
1191
1192 Simplejson exposes an API familiar to users of the standard library marshal
1193 and pickle modules. It is the externally maintained version of the json
1194 library contained in Python 2.6, but maintains compatibility with Python 2.5
1195 and (currently) has significant performance advantages, even without using
1196 the optional C extension for speedups. Simplejson is also supported on
1197 Python 3.3+.")
1198 (license license:x11)))
1199
1200 (define-public python2-simplejson
1201 (package-with-python2 python-simplejson))
1202
1203
1204 (define-public python-pyicu
1205 (package
1206 (name "python-pyicu")
1207 (version "2.3.1")
1208 (source
1209 (origin
1210 (method url-fetch)
1211 (uri (pypi-uri "PyICU" version))
1212 (sha256
1213 (base32
1214 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1215 (build-system python-build-system)
1216 (inputs
1217 `(("icu4c" ,icu4c)))
1218 (native-inputs
1219 `(("python-pytest" ,python-pytest)
1220 ("python-six" ,python-six)))
1221 (home-page "https://github.com/ovalhub/pyicu")
1222 (synopsis "Python extension wrapping the ICU C++ API")
1223 (description
1224 "PyICU is a python extension wrapping the ICU C++ API.")
1225 (properties `((python2-variant . ,(delay python2-pyicu))))
1226 (license license:x11)))
1227
1228 (define-public python2-pyicu
1229 (let ((base (package-with-python2
1230 (strip-python2-variant python-pyicu))))
1231 (package
1232 (inherit base)
1233 (arguments
1234 `(,@(package-arguments base)
1235 #:phases
1236 (modify-phases %standard-phases
1237 (add-before 'check 'delete-failing-test
1238 (λ _
1239 ;; XXX: This fails due to Unicode issues unique to Python 2,
1240 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1241 (delete-file "test/test_Script.py")
1242 #t))))))))
1243
1244 (define-public python2-dogtail
1245 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1246 ;; spaces in indentation" with Python 3.
1247 (package
1248 (name "python2-dogtail")
1249 (version "0.9.9")
1250 (source (origin
1251 (method url-fetch)
1252 (uri (pypi-uri "dogtail" version))
1253 (sha256
1254 (base32
1255 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1256 (build-system python-build-system)
1257 (arguments `(#:python ,python-2
1258 #:tests? #f)) ; invalid command "test"
1259 ;; Currently no offical homepage.
1260 (home-page "https://pypi.python.org/pypi/dogtail/")
1261 (synopsis "GUI test tool and automation framework written in Python")
1262 (description
1263 "Dogtail is a GUI test tool and automation framework written in Python.
1264 It uses Accessibility (a11y) technologies to communicate with desktop
1265 applications. dogtail scripts are written in Python and executed like any
1266 other Python program.")
1267 (license license:gpl2+)))
1268
1269 (define-public python-empy
1270 (package
1271 (name "python-empy")
1272 (version "3.3.3")
1273 (source (origin
1274 (method url-fetch)
1275 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1276 version ".tar.gz"))
1277 (sha256
1278 (base32
1279 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1280 (build-system python-build-system)
1281 (arguments
1282 `(#:tests? #f)) ; python2 only
1283 (home-page "http://www.alcyone.com/software/empy/")
1284 (synopsis "Templating system for Python")
1285 (description
1286 "EmPy is a system for embedding Python expressions and statements in
1287 template text; it takes an EmPy source file, processes it, and produces
1288 output. This is accomplished via expansions, which are special signals to the
1289 EmPy system and are set off by a special prefix (by default the at sign, @@).
1290 EmPy can expand arbitrary Python expressions and statements in this way, as
1291 well as a variety of special forms. Textual data not explicitly delimited in
1292 this way is sent unaffected to the output, allowing Python to be used in
1293 effect as a markup language. Also supported are callbacks via hooks,
1294 recording and playback via diversions, and dynamic, chainable filters. The
1295 system is highly configurable via command line options and embedded
1296 commands.")
1297 (license license:lgpl2.1+)))
1298
1299 (define-public python2-empy
1300 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1301 (package
1302 (inherit base)
1303 (arguments `(,@(package-arguments base)
1304 #:tests? #t)))))
1305
1306 (define-public python2-element-tree
1307 (package
1308 (name "python2-element-tree")
1309 (version "1.2.6")
1310 (source (origin
1311 (method url-fetch)
1312 (uri (string-append
1313 "http://effbot.org/media/downloads/elementtree-"
1314 version "-20050316.tar.gz"))
1315 (sha256
1316 (base32
1317 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1318 (build-system python-build-system)
1319 (arguments
1320 `(#:python ,python-2 ; seems to be part of Python 3
1321 #:tests? #f)) ; no 'test' sub-command
1322 (synopsis "Toolkit for XML processing in Python")
1323 (description
1324 "ElementTree is a Python library supporting lightweight XML processing.")
1325 (home-page "http://effbot.org/zone/element-index.htm")
1326 (license (license:x11-style
1327 "http://docs.python.org/2/license.html"
1328 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1329
1330 (define-public python2-pybugz
1331 (package
1332 (name "python2-pybugz")
1333 (version "0.6.11")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1338 version ".tar.gz"))
1339 (sha256
1340 (base32
1341 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1342 (patches (search-patches "pybugz-stty.patch"
1343 "pybugz-encode-error.patch"))))
1344 (build-system python-build-system)
1345 (arguments
1346 `(#:python ,python-2 ; SyntaxError with Python 3
1347 #:tests? #f)) ; no 'test' sub-command
1348 (propagated-inputs
1349 `(("element-tree" ,python2-element-tree)))
1350 (synopsis "Python and command-line interface to Bugzilla")
1351 (description
1352 "PyBugz is a Python library and command-line tool to query the Bugzilla
1353 bug tracking system. It is meant as an aid to speed up interaction with the
1354 bug tracker.")
1355 (home-page "http://www.liquidx.net/pybugz/")
1356 (license license:gpl2)))
1357
1358 (define-public python2-enum
1359 (package
1360 (name "python2-enum")
1361 (version "0.4.6")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (pypi-uri "enum" version))
1365 (sha256
1366 (base32
1367 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:python ,python-2))
1371 (home-page "http://pypi.python.org/pypi/enum/")
1372 (synopsis "Robust enumerated type support in Python")
1373 (description
1374 "This provides a module for robust enumerations in Python. It has
1375 been superseded by the Python standard library and is provided only for
1376 compatibility.")
1377 ;; Choice of either license.
1378 (license (list license:gpl3+ license:psfl))))
1379
1380 (define-public python-enum34
1381 (package
1382 (name "python-enum34")
1383 (version "1.1.6")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "enum34" version))
1388 (sha256
1389 (base32
1390 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1391 (build-system python-build-system)
1392 (home-page "https://pypi.python.org/pypi/enum34")
1393 (synopsis "Backported Python 3.4 Enum")
1394 (description
1395 "Enum34 is the new Python stdlib enum module available in Python 3.4
1396 backported for previous versions of Python from 2.4 to 3.3.")
1397 (license license:bsd-3)))
1398
1399 (define-public python2-enum34
1400 (package-with-python2 python-enum34))
1401
1402 (define-public python-parse-type
1403 (package
1404 (name "python-parse-type")
1405 (version "0.4.2")
1406 (source
1407 (origin
1408 (method url-fetch)
1409 (uri (pypi-uri "parse_type" version))
1410 (sha256
1411 (base32
1412 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1413 (build-system python-build-system)
1414 (propagated-inputs
1415 `(("python-six" ,python-six)
1416 ("python-parse" ,python-parse)))
1417 (native-inputs
1418 `(("python-pytest" ,python-pytest)
1419 ("python-pytest-runner" ,python-pytest-runner)))
1420 (home-page "https://github.com/jenisys/parse_type")
1421 (synopsis "Extended parse module")
1422 (description
1423 "Parse_type extends the python parse module.")
1424 (properties
1425 `((python2-variant . ,(delay python2-parse-type))))
1426 (license license:bsd-3)))
1427
1428 (define-public python2-parse-type
1429 (let ((base (package-with-python2
1430 (strip-python2-variant python-parse-type))))
1431 (package (inherit base)
1432 (propagated-inputs
1433 `(("python2-enum34" ,python2-enum34)
1434 ,@(package-propagated-inputs base))))))
1435
1436 (define-public python-parse
1437 (package
1438 (name "python-parse")
1439 (version "1.8.4")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (pypi-uri "parse" version))
1444 (sha256
1445 (base32
1446 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1447 (build-system python-build-system)
1448 (arguments
1449 `(#:phases
1450 (modify-phases %standard-phases
1451 (replace 'check
1452 (lambda _ (invoke "python" "test_parse.py"))))))
1453 (home-page "https://github.com/r1chardj0n3s/parse")
1454 (synopsis "Parse strings")
1455 (description
1456 "Parse strings using a specification based on the Python @code{format()}
1457 syntax.")
1458 (license license:x11)))
1459
1460 (define-public python-polib
1461 (package
1462 (name "python-polib")
1463 (version "1.0.8")
1464 (source (origin
1465 (method url-fetch)
1466 (uri (pypi-uri "polib" version))
1467 (sha256
1468 (base32
1469 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1470 (build-system python-build-system)
1471 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1472 (synopsis "Manipulate, create and modify gettext files")
1473 (description "Polib can manipulate any gettext format (po, pot and mo)
1474 files. It can be used to create po files from scratch or to modify
1475 existing ones.")
1476 (license license:expat)))
1477
1478 (define-public python2-polib
1479 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1480 (package
1481 (inherit base)
1482 (arguments `(,@(package-arguments base)
1483 ;; Tests don't work with python2.
1484 #:tests? #f)))))
1485
1486 (define-public scons
1487 (package
1488 (name "scons")
1489 (version "3.0.4")
1490 (source (origin
1491 (method git-fetch)
1492 (uri (git-reference
1493 (url "https://github.com/SCons/scons.git")
1494 (commit version)))
1495 (file-name (git-file-name name version))
1496 (sha256
1497 (base32
1498 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1499 (build-system python-build-system)
1500 (arguments
1501 `(#:use-setuptools? #f ; still relies on distutils
1502 #:tests? #f ; no 'python setup.py test' command
1503 #:phases
1504 (modify-phases %standard-phases
1505 (add-before 'build 'bootstrap
1506 (lambda _
1507 (substitute* "src/engine/SCons/compat/__init__.py"
1508 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1509 "sys.modules[new] = __import__(old)"))
1510 (substitute* "src/engine/SCons/Platform/__init__.py"
1511 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1512 "mod = __import__(full_name)"))
1513 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1514 (chdir "build/scons")
1515 #t)))))
1516 (home-page "http://scons.org/")
1517 (synopsis "Software construction tool written in Python")
1518 (description
1519 "SCons is a software construction tool. Think of SCons as an improved,
1520 cross-platform substitute for the classic Make utility with integrated
1521 functionality similar to autoconf/automake and compiler caches such as ccache.
1522 In short, SCons is an easier, more reliable and faster way to build
1523 software.")
1524 (license license:x11)))
1525
1526 (define-public scons-python2
1527 (package
1528 (inherit (package-with-python2 scons))
1529 (name "scons-python2")))
1530
1531 (define-public python-extras
1532 (package
1533 (name "python-extras")
1534 (version "1.0.0")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "extras" version))
1539 (sha256
1540 (base32
1541 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1542 (build-system python-build-system)
1543 (arguments
1544 ;; FIXME: Circular dependency on testtools.
1545 '(#:tests? #f))
1546 (home-page "https://github.com/testing-cabal/extras")
1547 (synopsis "Useful extensions to the Python standard library")
1548 (description
1549 "Extras is a set of extensions to the Python standard library.")
1550 (license license:expat)))
1551
1552 (define-public python2-extras
1553 (package-with-python2 python-extras))
1554
1555 (define-public python-mimeparse
1556 (package
1557 (name "python-mimeparse")
1558 (version "1.6.0")
1559 (source
1560 (origin
1561 (method url-fetch)
1562 (uri (pypi-uri "python-mimeparse" version))
1563 (sha256
1564 (base32
1565 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1566 (build-system python-build-system)
1567 (arguments
1568 '(#:phases
1569 (modify-phases %standard-phases
1570 (replace 'check
1571 (lambda _
1572 (invoke "./mimeparse_test.py"))))))
1573 (home-page
1574 "https://github.com/dbtsai/python-mimeparse")
1575 (synopsis "Python library for parsing MIME types")
1576 (description
1577 "Mimeparse provides basic functions for parsing MIME type names and
1578 matching them against a list of media-ranges.")
1579 (license license:expat)))
1580
1581 (define-public python2-mimeparse
1582 (package-with-python2 python-mimeparse))
1583
1584 (define-public python-miniboa
1585 (package
1586 (name "python-miniboa")
1587 (version "1.0.7")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "miniboa" version))
1592 (sha256
1593 (base32
1594 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1595 (build-system python-build-system)
1596 (home-page "https://github.com/shmup/miniboa")
1597 (synopsis "Simple, single-threaded Telnet server")
1598 (description
1599 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1600 server.")
1601 (license license:asl2.0)))
1602
1603 (define-public python2-miniboa
1604 (package-with-python2 python-miniboa))
1605
1606 (define-public python-pafy
1607 (package
1608 (name "python-pafy")
1609 (version "0.5.3.1")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri (pypi-uri "pafy" version))
1614 (sha256
1615 (base32
1616 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1617 (build-system python-build-system)
1618 (arguments
1619 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1620 (propagated-inputs
1621 ;; Youtube-dl is a python package which is imported in the file
1622 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1623 `(("youtube-dl" ,youtube-dl)))
1624 (home-page "https://np1.github.io/pafy/")
1625 (synopsis "Retrieve YouTube content and metadata")
1626 (description
1627 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1628 (license license:lgpl3+)))
1629
1630 (define-public python2-funcsigs
1631 (package
1632 (name "python2-funcsigs")
1633 (version "1.0.2")
1634 (source (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "funcsigs" version))
1637 (sha256
1638 (base32
1639 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1640 (build-system python-build-system)
1641 (arguments
1642 `(#:python ,python-2))
1643 (native-inputs
1644 `(("python2-unittest2" ,python2-unittest2)))
1645 (home-page "http://funcsigs.readthedocs.org")
1646 (synopsis "Python function signatures from PEP362")
1647 (description
1648 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1649 (license license:asl2.0)))
1650
1651 (define-public python2-funcsigs-bootstrap
1652 (package
1653 (inherit python2-funcsigs)
1654 (name "python2-funcsigs-bootstrap")
1655 (native-inputs `())
1656 (arguments
1657 `(#:tests? #f
1658 ,@(package-arguments python2-funcsigs)))))
1659
1660 (define-public python-py
1661 (package
1662 (name "python-py")
1663 (version "1.8.0")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "py" version))
1668 (sha256
1669 (base32
1670 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1671 (build-system python-build-system)
1672 (arguments
1673 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1674 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1675 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1676 ;; Is this module globally installed?"
1677 '(#:tests? #f))
1678 (native-inputs
1679 `(("python-setuptools-scm" ,python-setuptools-scm)))
1680 (home-page "https://github.com/pytest-dev/py")
1681 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1682 (description
1683 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1684 code introspection, and logging.")
1685 (license license:expat)))
1686
1687 (define-public python2-py
1688 (package-with-python2 python-py))
1689
1690 ;; Recent versions of python-fixtures and python-testrepository need
1691 ;; python-pbr for packaging, which itself needs these two packages for
1692 ;; testing.
1693 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1694 ;; same source, just without any test dependencies and with tests disabled.
1695 ;; python-pbr-minmal is then used to package python-fixtures and
1696 ;; python-testrepository.
1697 ;; Strictly speaking we currently could remove the test-requirements from the
1698 ;; normal python-pbr package (and save this package) since test are disabled
1699 ;; there anyway. But this may change in future.
1700 (define-public python-pbr-minimal
1701 (package
1702 (name "python-pbr-minimal")
1703 (version "3.0.1")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (pypi-uri "pbr" version))
1708 (sha256
1709 (base32
1710 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1711 (build-system python-build-system)
1712 (arguments
1713 `(#:tests? #f))
1714 (home-page "http://docs.openstack.org/developer/pbr/")
1715 (synopsis "Minimal build of python-pbr used for bootstrapping")
1716 (description
1717 "Used only for bootstrapping python2-pbr, you should not need this.")
1718 (license license:asl2.0)))
1719
1720 (define-public python2-pbr-minimal
1721 (package-with-python2 python-pbr-minimal))
1722
1723 (define-public python-pbr
1724 (package
1725 (inherit python-pbr-minimal)
1726 (name "python-pbr")
1727 (arguments
1728 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1729 (propagated-inputs
1730 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1731 (native-inputs
1732 `(("python-fixtures" ,python-fixtures-bootstrap)
1733 ;; discover, coverage, hacking, subunit
1734 ("python-mock" ,python-mock)
1735 ("python-six" ,python-six)
1736 ("python-sphinx" ,python-sphinx)
1737 ("python-testrepository" ,python-testrepository-bootstrap)
1738 ("python-testresources" ,python-testresources-bootstrap)
1739 ("python-testscenarios" ,python-testscenarios-bootstrap)
1740 ("python-testtools" ,python-testtools-bootstrap)
1741 ("python-virtualenv" ,python-virtualenv)))
1742 (synopsis "Enhance the default behavior of Python’s setuptools")
1743 (description
1744 "Python Build Reasonableness (PBR) is a library that injects some useful
1745 and sensible default behaviors into your setuptools run. It will set
1746 versions, process requirements files and generate AUTHORS and ChangeLog file
1747 from git information.
1748 ")))
1749
1750 (define-public python2-pbr
1751 (package-with-python2 python-pbr))
1752
1753 (define-public python-pyrsistent
1754 (package
1755 (name "python-pyrsistent")
1756 (version "0.14.11")
1757 (home-page "https://github.com/tobgu/pyrsistent")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "pyrsistent" version))
1761 (sha256
1762 (base32
1763 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1764 (build-system python-build-system)
1765 (native-inputs
1766 `(("python-hypothesis" ,python-hypothesis)
1767 ("python-pytest" ,python-pytest)
1768 ("python-pytest-runner" ,python-pytest-runner)))
1769 (propagated-inputs
1770 `(("python-six" ,python-six)))
1771 (synopsis "Persistent data structures for Python")
1772 (description
1773 "Pyrsistent is a number of persistent collections (by some referred to as
1774 functional data structures). Persistent in the sense that they are immutable.
1775
1776 All methods on a data structure that would normally mutate it instead return a
1777 new copy of the structure containing the requested updates. The original
1778 structure is left untouched.")
1779 (license license:expat)))
1780
1781 (define-public python2-pyrsistent
1782 (package-with-python2 python-pyrsistent))
1783
1784 (define-public python-exif-read
1785 (package
1786 (name "python-exif-read")
1787 (version "2.1.2")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (pypi-uri "ExifRead" version))
1791 (sha256
1792 (base32
1793 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1794 (build-system python-build-system)
1795 (arguments `(#:tests? #f)) ; no tests
1796 (home-page "https://github.com/ianare/exif-py")
1797 (synopsis "Python library to extract EXIF data from image files")
1798 (description
1799 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1800 files.")
1801 (license license:bsd-3)))
1802
1803 (define-public python2-exif-read
1804 (package-with-python2 python-exif-read))
1805
1806 (define-public python-pyld
1807 (package
1808 (name "python-pyld")
1809 (version "1.0.3")
1810 (source (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "PyLD" version))
1813 (sha256
1814 (base32
1815 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1816 (build-system python-build-system)
1817 (home-page "https://github.com/digitalbazaar/pyld")
1818 (synopsis "Python implementation of the JSON-LD specification")
1819 (description
1820 "PyLD is an implementation of the JSON-LD specification.")
1821 (license license:bsd-3)))
1822
1823 (define-public python2-pyld
1824 (package-with-python2 python-pyld))
1825
1826 (define-public python-click
1827 (package
1828 (name "python-click")
1829 (version "7.0")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "click" version))
1834 (sha256
1835 (base32
1836 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1837 (build-system python-build-system)
1838 (arguments
1839 `(#:phases
1840 (modify-phases %standard-phases
1841 (add-after 'unpack 'fix-paths
1842 (lambda* (#:key inputs #:allow-other-keys)
1843 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1844 "cross-libc" "libc"))))
1845 (substitute* "click/_unicodefun.py"
1846 (("'locale'")
1847 (string-append "'" glibc "/bin/locale'"))))
1848 #t))
1849 (replace 'check
1850 (lambda _
1851 (invoke "python" "-m" "pytest"))))))
1852 (native-inputs
1853 `(("python-pytest" ,python-pytest)))
1854 (home-page "https://palletsprojects.com/p/click/")
1855 (synopsis "Command line library for Python")
1856 (description
1857 "Click is a Python package for creating command line interfaces in a
1858 composable way with as little code as necessary. Its name stands for
1859 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1860 with sensible defaults out of the box.")
1861 (license license:bsd-3)))
1862
1863 (define-public python2-click
1864 (package-with-python2 python-click))
1865
1866 (define-public python-wheel
1867 (package
1868 (name "python-wheel")
1869 (version "0.32.3")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (pypi-uri "wheel" version))
1874 (sha256
1875 (base32
1876 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1877 (build-system python-build-system)
1878 (native-inputs
1879 `(("python-jsonschema" ,python-jsonschema)
1880 ("python-pytest-cov" ,python-pytest-cov)))
1881 (home-page "https://bitbucket.org/pypa/wheel/")
1882 (synopsis "Format for built Python packages")
1883 (description
1884 "A wheel is a ZIP-format archive with a specially formatted filename and
1885 the @code{.whl} extension. It is designed to contain all the files for a PEP
1886 376 compatible install in a way that is very close to the on-disk format. Many
1887 packages will be properly installed with only the @code{Unpack} step and the
1888 unpacked archive preserves enough information to @code{Spread} (copy data and
1889 scripts to their final locations) at any later time. Wheel files can be
1890 installed with a newer @code{pip} or with wheel's own command line utility.")
1891 (license license:expat)
1892 (properties `((python2-variant . ,(delay python2-wheel))))))
1893
1894 (define-public python2-wheel
1895 (let ((wheel (package-with-python2
1896 (strip-python2-variant python-wheel))))
1897 (package (inherit wheel)
1898 (native-inputs `(("python2-functools32" ,python2-functools32)
1899 ,@(package-native-inputs wheel))))))
1900
1901 (define-public python-vcversioner
1902 (package
1903 (name "python-vcversioner")
1904 (version "2.16.0.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "vcversioner" version))
1909 (sha256
1910 (base32
1911 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1912 (build-system python-build-system)
1913 (synopsis "Python library for version number discovery")
1914 (description "Vcversioner is a Python library that inspects tagging
1915 information in a variety of version control systems in order to discover
1916 version numbers.")
1917 (home-page "https://github.com/habnabit/vcversioner")
1918 (license license:isc)))
1919
1920 (define-public python2-vcversioner
1921 (package-with-python2 python-vcversioner))
1922
1923 (define-public python-jdcal
1924 (package
1925 (name "python-jdcal")
1926 (version "1.4")
1927 (source
1928 (origin
1929 (method url-fetch)
1930 (uri (pypi-uri "jdcal" version))
1931 (sha256
1932 (base32
1933 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1934 (build-system python-build-system)
1935 (arguments
1936 `(#:phases (modify-phases %standard-phases
1937 (replace 'check
1938 (lambda _
1939 (invoke "pytest"))))))
1940 (native-inputs
1941 `(("python-pytest" ,python-pytest)))
1942 (home-page "https://github.com/phn/jdcal")
1943 (synopsis "Functions to convert between Julian dates Gregorian dates")
1944 (description "This Python library provides functions for converting
1945 between Julian dates and Gregorian dates.")
1946 (license license:bsd-2)))
1947
1948 (define-public python2-jdcal
1949 (package-with-python2 python-jdcal))
1950
1951 (define-public python-jsonschema
1952 (package
1953 (name "python-jsonschema")
1954 (version "3.0.1")
1955 (source (origin
1956 (method url-fetch)
1957 (uri (pypi-uri "jsonschema" version))
1958 (sha256
1959 (base32
1960 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1961 (build-system python-build-system)
1962 (arguments
1963 '(#:phases
1964 (modify-phases %standard-phases
1965 (replace 'check
1966 (lambda _
1967 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1968 (invoke "trial" "jsonschema"))))))
1969 (native-inputs
1970 `(("python-setuptools_scm" ,python-setuptools-scm)
1971 ("python-twisted" ,python-twisted)))
1972 (propagated-inputs
1973 `(("python-attrs" ,python-attrs)
1974 ("python-pyrsistent" ,python-pyrsistent)
1975 ("python-six" ,python-six)))
1976 (home-page "https://github.com/Julian/jsonschema")
1977 (synopsis "Implementation of JSON Schema for Python")
1978 (description
1979 "Jsonschema is an implementation of JSON Schema for Python.")
1980 (license license:expat)
1981 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1982
1983 (define-public python2-jsonschema
1984 (let ((jsonschema (package-with-python2
1985 (strip-python2-variant python-jsonschema))))
1986 (package (inherit jsonschema)
1987 (propagated-inputs
1988 `(("python2-functools32" ,python2-functools32)
1989 ,@(package-propagated-inputs jsonschema))))))
1990
1991 ;; This old version is still required by docker-compose as of 1.24.0.
1992 (define-public python-jsonschema-2.6
1993 (package
1994 (name "python-jsonschema")
1995 (version "2.6.0")
1996 (source (origin
1997 (method url-fetch)
1998 (uri (pypi-uri "jsonschema" version))
1999 (sha256
2000 (base32
2001 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2002 (build-system python-build-system)
2003 (arguments
2004 '(#:phases
2005 (modify-phases %standard-phases
2006 (replace 'check (lambda _ (invoke "nosetests"))))))
2007 (native-inputs
2008 `(("python-nose" ,python-nose)
2009 ("python-vcversioner" ,python-vcversioner)))
2010 (home-page "https://github.com/Julian/jsonschema")
2011 (synopsis "Implementation of JSON Schema for Python")
2012 (description
2013 "Jsonschema is an implementation of JSON Schema for Python.")
2014 (license license:expat)
2015 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2016
2017 (define-public python-schema
2018 (package
2019 (name "python-schema")
2020 (version "0.6.6")
2021 (source
2022 (origin
2023 (method url-fetch)
2024 (uri (pypi-uri "schema" version))
2025 (sha256
2026 (base32
2027 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2028 (build-system python-build-system)
2029 (native-inputs
2030 `(("python-pytest" ,python-pytest)))
2031 (home-page "https://github.com/keleshev/schema")
2032 (synopsis "Simple data validation library")
2033 (description
2034 "@code{python-schema} is a library for validating Python data
2035 structures, such as those obtained from config-files, forms, external
2036 services or command-line parsing, converted from JSON/YAML (or
2037 something else) to Python data-types.")
2038 (license license:psfl)))
2039
2040 (define-public python2-schema
2041 (package-with-python2 python-schema))
2042
2043 (define-public python-schema-0.5
2044 (package (inherit python-schema)
2045 (version "0.5.0")
2046 (source
2047 (origin
2048 (method url-fetch)
2049 (uri (pypi-uri "schema" version))
2050 (sha256
2051 (base32
2052 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2053
2054 (define-public python2-schema-0.5
2055 (package-with-python2 python-schema-0.5))
2056
2057 (define-public python-kitchen
2058 (package
2059 (name "python-kitchen")
2060 (version "1.2.5")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "kitchen" version))
2065 (sha256
2066 (base32
2067 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2068 (build-system python-build-system)
2069 (propagated-inputs
2070 `(("python-chardet" ,python-chardet)))
2071 (home-page "https://github.com/fedora-infra/kitchen")
2072 (synopsis "Python API for snippets")
2073 (description "@code{kitchen} module provides a python API for all sorts of
2074 little useful snippets of code that everybody ends up writing for their projects
2075 but never seem big enough to build an independent release. Use kitchen and stop
2076 cutting and pasting that code over and over.")
2077 (license (list license:lgpl2.1+
2078 ;; subprocess.py, test_subprocess.py,
2079 ;; kitchen/pycompat25/defaultdict.py:
2080 license:psfl))))
2081
2082 (define-public python2-kitchen
2083 (package-with-python2 python-kitchen))
2084
2085 (define-public python-unidecode
2086 (package
2087 (name "python-unidecode")
2088 (version "1.1.0")
2089 (source (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "Unidecode" version))
2092 (sha256
2093 (base32
2094 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2095 (build-system python-build-system)
2096 (home-page "https://pypi.python.org/pypi/Unidecode")
2097 (synopsis "ASCII transliterations of Unicode text")
2098 (description
2099 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2100 useful when integrating with legacy code that doesn't support Unicode, or for
2101 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2102 machine identifiers from human-readable Unicode strings that should still be
2103 somewhat intelligible.")
2104 (license license:gpl2+)))
2105
2106 (define-public python2-unidecode
2107 (package-with-python2 python-unidecode))
2108
2109 (define-public python-pyjwt
2110 (package
2111 (name "python-pyjwt")
2112 (version "1.5.3")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "PyJWT" version))
2117 (sha256
2118 (base32
2119 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2120 (modules '((guix build utils)))
2121 (snippet
2122 '(begin
2123 (for-each delete-file-recursively
2124 (find-files "." "\\.pyc$"))
2125 #t))))
2126 (build-system python-build-system)
2127 (native-inputs
2128 `(("python-pytest" ,python-pytest)
2129 ("python-pytest-cov" ,python-pytest-cov)
2130 ("python-pytest-runner" ,python-pytest-runner)))
2131 (home-page "https://github.com/progrium/pyjwt")
2132 (synopsis "JSON Web Token implementation in Python")
2133 (description
2134 "PyJWT is a JSON Web Token implementation written in Python.")
2135 (license license:expat)))
2136
2137 (define-public python2-pyjwt
2138 (package-with-python2 python-pyjwt))
2139
2140 (define-public python-pykka
2141 (package
2142 (name "python-pykka")
2143 (version "1.2.1")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (pypi-uri "Pykka" version))
2148 (sha256
2149 (base32
2150 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2151 (build-system python-build-system)
2152 (native-inputs
2153 `(("python-mock" ,python-mock)
2154 ("python-nose" ,python-nose)
2155 ("python-gevent" ,python-gevent)
2156 ("python-eventlet" ,python-eventlet)))
2157 (home-page "https://www.pykka.org/")
2158 (synopsis "Pykka is a Python implementation of the actor model")
2159 (description
2160 "Pykka is a Python implementation of the actor model.
2161 The actor model introduces some simple rules to control the sharing
2162 of state and cooperation between execution units, which makes it
2163 easier to build concurrent applications.")
2164 (license license:asl2.0)))
2165
2166 (define-public python2-pykka
2167 (package-with-python2 python-pykka))
2168
2169 (define-public python-pymsgbox
2170 (package
2171 (name "python-pymsgbox")
2172 (version "1.0.6")
2173 (source
2174 (origin
2175 (method git-fetch)
2176 (uri (git-reference
2177 ;; LICENSE.txt is not present on pypi
2178 (url "https://github.com/asweigart/PyMsgBox")
2179 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2180 (file-name (git-file-name name version))
2181 (sha256
2182 (base32
2183 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2184 (arguments
2185 ;; Circular dependency to run tests:
2186 ;; Tests need pyautogui, which depends on pymsgbox.
2187 '(#:tests? #f))
2188 (build-system python-build-system)
2189 (home-page "https://github.com/asweigart/PyMsgBox")
2190 (synopsis "Python module for JavaScript-like message boxes")
2191 (description
2192 "PyMsgBox is a simple, cross-platform, pure Python module for
2193 JavaScript-like message boxes. Types of dialog boxes include:
2194 @enumerate
2195 @item alert
2196 @item confirm
2197 @item prompt
2198 @item password
2199 @end enumerate
2200 ")
2201 (license license:bsd-3)))
2202
2203 (define-public python-pympler
2204 (package
2205 (name "python-pympler")
2206 (home-page "https://pythonhosted.org/Pympler/")
2207 (version "0.6")
2208 (source (origin
2209 (method url-fetch)
2210 (uri (pypi-uri "Pympler" version))
2211 (sha256
2212 (base32
2213 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
2214 (build-system python-build-system)
2215 (arguments
2216 `(#:phases (modify-phases %standard-phases
2217 (delete 'check)
2218 (add-after 'install 'check
2219 (lambda* (#:key inputs outputs #:allow-other-keys)
2220 (add-installed-pythonpath inputs outputs)
2221 (invoke "python" "setup.py" "test"))))))
2222 (synopsis "Measure, monitor and analyze memory behavior")
2223 (description
2224 "Pympler is a development tool to measure, monitor and analyze
2225 the memory behavior of Python objects in a running Python application.
2226
2227 By pympling a Python application, detailed insight in the size and the
2228 lifetime of Python objects can be obtained. Undesirable or unexpected
2229 runtime behavior like memory bloat and other @samp{pymples} can easily
2230 be identified.
2231
2232 A web profiling frontend exposes process statistics, garbage
2233 visualisation and class tracker statistics.")
2234 (license license:asl2.0)))
2235
2236 (define-public python2-pympler
2237 (package-with-python2 python-pympler))
2238
2239 (define-public python-itsdangerous
2240 (package
2241 (name "python-itsdangerous")
2242 (version "1.1.0")
2243 (source
2244 (origin
2245 (method url-fetch)
2246 (uri (pypi-uri "itsdangerous" version))
2247 (sha256
2248 (base32
2249 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2250 (build-system python-build-system)
2251 (home-page "https://palletsprojects.com/p/itsdangerous/")
2252 (synopsis "Python library for passing data to/from untrusted environments")
2253 (description
2254 "Itsdangerous provides various helpers to pass trusted data to untrusted
2255 environments and back.")
2256 (license license:bsd-3)))
2257
2258 (define-public python2-itsdangerous
2259 (package-with-python2 python-itsdangerous))
2260
2261 (define-public python-pyyaml
2262 (package
2263 (name "python-pyyaml")
2264 (version "3.13")
2265 (source
2266 (origin
2267 (method url-fetch)
2268 (uri (pypi-uri "PyYAML" version))
2269 (sha256
2270 (base32
2271 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2272 (build-system python-build-system)
2273 (inputs
2274 `(("libyaml" ,libyaml)))
2275 (home-page "http://pyyaml.org/wiki/PyYAML")
2276 (synopsis "YAML parser and emitter for Python")
2277 (description
2278 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2279 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2280 API, and sensible error messages. PyYAML supports standard YAML tags and
2281 provides Python-specific tags that allow to represent an arbitrary Python
2282 object.")
2283 (license license:expat)))
2284
2285 (define-public python2-pyyaml
2286 (package-with-python2 python-pyyaml))
2287
2288 (define-public python-vine
2289 (package
2290 (name "python-vine")
2291 (version "1.1.4")
2292 (source
2293 (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "vine" version))
2296 (sha256
2297 (base32
2298 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2299 (build-system python-build-system)
2300 (native-inputs
2301 `(("python-pytest" ,python-pytest)
2302 ("python-case" ,python-case)))
2303 (home-page "https://github.com/celery/vine")
2304 (synopsis "Promises for Python")
2305 (description
2306 "@code{vine} provides a special implementation of promises in that it can
2307 be used both for \"promise of a value\" and lazy evaluation. The biggest
2308 upside for this is that everything in a promise can also be a promise,
2309 e.g. filters, callbacks and errbacks can all be promises.")
2310 (license license:bsd-3)))
2311
2312 (define-public python-virtualenv
2313 (package
2314 (name "python-virtualenv")
2315 (version "16.1.0")
2316 (source
2317 (origin
2318 (method url-fetch)
2319 (uri (pypi-uri "virtualenv" version))
2320 (sha256
2321 (base32
2322 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2323 (build-system python-build-system)
2324 (arguments
2325 `(#:phases
2326 (modify-phases %standard-phases
2327 (add-before 'check 'disable-failing-test
2328 (lambda _
2329 ;; Disable failing test. See upstream bug report
2330 ;; https://github.com/pypa/virtualenv/issues/957
2331 (substitute* "tests/test_virtualenv.py"
2332 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2333 #t)))))
2334 (native-inputs
2335 `(("python-mock" ,python-mock)
2336 ("python-pytest" ,python-pytest)))
2337 (home-page "https://virtualenv.pypa.io/")
2338 (synopsis "Virtual Python environment builder")
2339 (description
2340 "Virtualenv is a tool to create isolated Python environments.")
2341 (license license:expat)))
2342
2343 (define-public python2-virtualenv
2344 (package-with-python2 python-virtualenv))
2345
2346 (define-public python-markupsafe
2347 (package
2348 (name "python-markupsafe")
2349 (version "1.1.1")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "MarkupSafe" version))
2354 (sha256
2355 (base32
2356 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2357 (build-system python-build-system)
2358 (arguments
2359 `(#:modules ((ice-9 ftw)
2360 (srfi srfi-1)
2361 (srfi srfi-26)
2362 (guix build utils)
2363 (guix build python-build-system))
2364 #:phases (modify-phases %standard-phases
2365 (replace 'check
2366 (lambda _
2367 (let ((cwd (getcwd))
2368 (libdir (find (cut string-prefix? "lib." <>)
2369 (scandir "build"))))
2370 (setenv "PYTHONPATH"
2371 (string-append cwd "/build/" libdir ":"
2372 (getenv "PYTHONPATH")))
2373 (invoke "pytest" "-vv")))))))
2374 (native-inputs
2375 `(("python-pytest" ,python-pytest)))
2376 (home-page "https://github.com/mitsuhiko/markupsafe")
2377 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2378 (description
2379 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2380 for Python.")
2381 (license license:bsd-3)))
2382
2383 (define-public python2-markupsafe
2384 (package-with-python2 python-markupsafe))
2385
2386 (define-public python-jinja2
2387 (package
2388 (name "python-jinja2")
2389 (version "2.10.1")
2390 (source
2391 (origin
2392 (method url-fetch)
2393 (uri (pypi-uri "Jinja2" version))
2394 (sha256
2395 (base32
2396 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2397 (build-system python-build-system)
2398 (propagated-inputs
2399 `(("python-markupsafe" ,python-markupsafe)))
2400 (home-page "http://jinja.pocoo.org/")
2401 (synopsis "Python template engine")
2402 (description
2403 "Jinja2 is a small but fast and easy to use stand-alone template engine
2404 written in pure Python.")
2405 (license license:bsd-3)))
2406
2407 (define-public python2-jinja2
2408 (package-with-python2 python-jinja2))
2409
2410 (define-public python-pystache
2411 (package
2412 (name "python-pystache")
2413 (version "0.5.4")
2414 (source (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "pystache" version))
2417 (sha256
2418 (base32
2419 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2420 (build-system python-build-system)
2421 (arguments
2422 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2423 (home-page "http://defunkt.io/pystache/")
2424 (synopsis "Python logic-less template engine")
2425 (description
2426 "Pystache is a Python implementation of the framework agnostic,
2427 logic-free templating system Mustache.")
2428 (license license:expat)
2429 (properties `((python2-variant . ,(delay python2-pystache))))))
2430
2431 (define-public python2-pystache
2432 (package (inherit (package-with-python2
2433 (strip-python2-variant python-pystache)))
2434 (arguments
2435 `(#:python ,python-2
2436 #:phases
2437 (modify-phases %standard-phases
2438 (replace 'check
2439 (lambda _
2440 (invoke "python" "test_pystache.py"))))))))
2441
2442 (define-public python-joblib
2443 (package
2444 (name "python-joblib")
2445 (version "0.13.0")
2446 (source (origin
2447 (method url-fetch)
2448 (uri (pypi-uri "joblib" version))
2449 (sha256
2450 (base32
2451 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2452 (build-system python-build-system)
2453 (arguments
2454 `(#:phases
2455 (modify-phases %standard-phases
2456 (replace 'check
2457 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2458 (native-inputs
2459 `(("python-pytest" ,python-pytest)))
2460 (home-page "https://joblib.readthedocs.io/")
2461 (synopsis "Using Python functions as pipeline jobs")
2462 (description
2463 "Joblib is a set of tools to provide lightweight pipelining in Python.
2464 In particular, joblib offers: transparent disk-caching of the output values
2465 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2466 logging and tracing of the execution.")
2467 (license license:bsd-3)))
2468
2469 (define-public python2-joblib
2470 (package-with-python2 python-joblib))
2471
2472 (define-public python-daemon
2473 (package
2474 (name "python-daemon")
2475 (version "2.2.3")
2476 (source
2477 (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "python-daemon" version))
2480 (sha256
2481 (base32
2482 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2483 (build-system python-build-system)
2484 (arguments
2485 `(#:phases
2486 (modify-phases %standard-phases
2487 (add-before 'check 'disable-tests
2488 (lambda _
2489 ;; FIXME: Determine why test fails
2490 (substitute* "test/test_daemon.py"
2491 (("test_detaches_process_context")
2492 "skip_test_detaches_process_context"))
2493 #t)))))
2494 (propagated-inputs
2495 `(("python-lockfile" ,python-lockfile)))
2496 (native-inputs
2497 `(("python-unittest2" ,python-unittest2)
2498 ("python-testtools" ,python-testtools)
2499 ("python-testscenarios" ,python-testscenarios)
2500 ("python-mock" ,python-mock)
2501 ("python-docutils" ,python-docutils)))
2502 (home-page "https://pagure.io/python-daemon/")
2503 (synopsis "Python library for making a Unix daemon process")
2504 (description "Python-daemon is a library that assists a Python program to
2505 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2506
2507 This library provides a @code{DaemonContext} class that manages the following
2508 important tasks for becoming a daemon process:
2509 @enumerate
2510 @item Detach the process into its own process group.
2511 @item Set process environment appropriate for running inside a chroot.
2512 @item Renounce suid and sgid privileges.
2513 @item Close all open file descriptors.
2514 @item Change the working directory, uid, gid, and umask.
2515 @item Set appropriate signal handlers.
2516 @item Open new file descriptors for stdin, stdout, and stderr.
2517 @item Manage a specified PID lock file.
2518 @item Register cleanup functions for at-exit processing.
2519 @end enumerate")
2520 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2521 (license (list license:asl2.0 license:gpl3+))))
2522
2523 (define-public python-docutils
2524 (package
2525 (name "python-docutils")
2526 (version "0.14")
2527 (source
2528 (origin
2529 (method url-fetch)
2530 (uri (pypi-uri "docutils" version))
2531 (sha256
2532 (base32
2533 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2534 (build-system python-build-system)
2535 (arguments
2536 '(#:tests? #f)) ; no setup.py test command
2537 (home-page "http://docutils.sourceforge.net/")
2538 (synopsis "Python Documentation Utilities")
2539 (description
2540 "Docutils is a modular system for processing documentation into useful
2541 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2542 reStructuredText.")
2543 ;; Most of the source code is public domain, but some source files are
2544 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2545 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2546
2547 (define-public python2-docutils
2548 (package-with-python2 python-docutils))
2549
2550 (define-public python-pygments
2551 (package
2552 (name "python-pygments")
2553 (version "2.4.2")
2554 (source
2555 (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "Pygments" version))
2558 (sha256
2559 (base32
2560 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2561 (build-system python-build-system)
2562 (arguments
2563 ;; FIXME: Tests require sphinx, which depends on this.
2564 '(#:tests? #f))
2565 (home-page "http://pygments.org/")
2566 (synopsis "Syntax highlighting")
2567 (description
2568 "Pygments is a syntax highlighting package written in Python.")
2569 (license license:bsd-2)))
2570
2571 (define-public python2-pygments
2572 (package-with-python2 python-pygments))
2573
2574 (define-public python-bumpversion
2575 (package
2576 (name "python-bumpversion")
2577 (version "0.5.3")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "bumpversion" version))
2582 (sha256
2583 (base32
2584 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2585 (build-system python-build-system)
2586 (home-page "https://github.com/peritus/bumpversion")
2587 (synopsis "Tool to bump software version")
2588 (description "This tool provides a command-line interface (CLI) to bump a
2589 software version simply.")
2590 (license license:expat)))
2591
2592 (define-public python-deprecated
2593 (package
2594 (name "python-deprecated")
2595 (version "1.2.5")
2596 (source
2597 (origin
2598 (method git-fetch)
2599 (uri (git-reference
2600 (url "https://github.com/tantale/deprecated.git")
2601 (commit (string-append "v" version))))
2602 (file-name (git-file-name name version))
2603 (sha256
2604 (base32
2605 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2606 (build-system python-build-system)
2607 (arguments
2608 `(#:phases (modify-phases %standard-phases
2609 (replace 'check
2610 (lambda _
2611 (invoke "pytest"))))))
2612 (propagated-inputs
2613 `(("python-wrapt" ,python-wrapt)))
2614 (native-inputs
2615 `(("python-bumpversion" ,python-bumpversion)
2616 ("python-pytest" ,python-pytest)
2617 ("python-pytest-cov" ,python-pytest-cov)
2618 ("python-sphinx" ,python-sphinx)
2619 ("python-tox" ,python-tox)))
2620 (home-page "https://github.com/tantale/deprecated")
2621 (synopsis "Python decorator to deprecate classes, functions or methods")
2622 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2623 to deprecate classes, functions or methods.")
2624 (license license:expat)))
2625
2626 (define-public python-pygithub
2627 (package
2628 (name "python-pygithub")
2629 (version "1.43.7")
2630 (source
2631 ;; We fetch from the Git repo because there are no tests in the PyPI
2632 ;; archive.
2633 (origin
2634 (method git-fetch)
2635 (uri (git-reference
2636 (url "https://github.com/PyGithub/PyGithub.git")
2637 (commit (string-append "v" version))))
2638 (file-name (git-file-name name version))
2639 (sha256
2640 (base32
2641 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2642 (build-system python-build-system)
2643 (arguments
2644 `(#:phases (modify-phases %standard-phases
2645 ;; Some tests rely on the network.
2646 (add-after 'unpack 'disable-failing-tests
2647 (lambda _
2648 (substitute* "tests/Issue142.py"
2649 (("testDecodeJson") "disabled_testDecodeJson"))
2650 #t))
2651 (add-before 'check 'prepare-for-tests
2652 (lambda _
2653 (for-each (lambda (f)
2654 (chmod f #o666))
2655 (find-files "./tests"))
2656 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2657 (setenv "PYTHONPATH"
2658 (string-append "./tests:" (getenv "PYTHONPATH")))
2659 #t)))))
2660 (propagated-inputs
2661 `(("python-deprecated" ,python-deprecated)
2662 ("python-pyjwt" ,python-pyjwt)
2663 ("python-requests" ,python-requests)))
2664 (native-inputs `(("python-httpretty" ,python-httpretty)))
2665 (home-page "https://pygithub.readthedocs.io/en/latest/")
2666 (synopsis "Python library for the GitHub API")
2667 (description "This library allows managing GitHub resources such as
2668 repositories, user profiles, and organizations in your Python applications,
2669 using version 3 of the GitHub application programming interface (API).")
2670 (license license:lgpl3+)))
2671
2672 (define-public python-rellu
2673 (package
2674 (name "python-rellu")
2675 (version "0.7")
2676 (source
2677 (origin
2678 (method url-fetch)
2679 (uri (pypi-uri "rellu" version))
2680 (sha256
2681 (base32
2682 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2683 (build-system python-build-system)
2684 (propagated-inputs
2685 `(("python-invoke" ,python-invoke)
2686 ("python-pygithub" ,python-pygithub)))
2687 (home-page "https://github.com/robotframework/rellu")
2688 (synopsis "Utilities to create PyPI releases")
2689 (description "This collection of utilities contains tooling and templates
2690 to assist in creating releases on GitHub and publishing them on PyPI. It is
2691 designed to be used by Robot Framework and tools and libraries in its
2692 ecosystem, but can naturally be used also by other projects.")
2693 (license license:asl2.0)))
2694
2695 (define-public python-robotframework
2696 (package
2697 (name "python-robotframework")
2698 (version "3.1.2")
2699 ;; There are no tests in the PyPI archive.
2700 (source
2701 (origin
2702 (method git-fetch)
2703 (uri (git-reference
2704 (url "https://github.com/robotframework/robotframework.git")
2705 (commit (string-append "v" version))))
2706 (file-name (git-file-name name version))
2707 (sha256
2708 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2709 (patches (search-patches
2710 "python-robotframework-honor-source-date-epoch.patch"))))
2711 (build-system python-build-system)
2712 (arguments
2713 `(#:phases (modify-phases %standard-phases
2714 (add-before 'build 'build-and-install-doc
2715 (lambda* (#:key outputs #:allow-other-keys)
2716 (let* ((doc-output (assoc-ref outputs "doc"))
2717 (doc (string-append doc-output "/share/"
2718 ,name "-" ,version "/")))
2719 (invoke "invoke" "library-docs" "all")
2720 (mkdir-p doc)
2721 (copy-recursively "doc/libraries"
2722 (string-append doc "/libraries"))
2723 #t)))
2724 (replace 'check
2725 (lambda _
2726 (invoke "python" "utest/run.py"))))))
2727 (native-inputs
2728 `(("python-invoke" ,python-invoke)
2729 ("python-rellu" ,python-rellu)
2730 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2731 (outputs '("out" "doc"))
2732 (home-page "https://robotframework.org")
2733 (synopsis "Generic automation framework")
2734 (description "Robot Framework is a generic automation framework for
2735 acceptance testing, acceptance test driven development (ATDD), and robotic
2736 process automation (RPA).")
2737 (license license:asl2.0)))
2738
2739 (define-public python-robotframework-lint
2740 ;; There is no properly tagged release; the commit below seems to correspond
2741 ;; to the 0.9 stable release available from PyPI. The tests are not
2742 ;; included in the PyPI archive, so we fetch the sources from the upstream
2743 ;; Git repo.
2744 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2745 (revision "1"))
2746 (package
2747 (name "python-robotframework-lint")
2748 (version (git-version "0.9.0" revision commit))
2749 (source
2750 (origin
2751 (method git-fetch)
2752 (uri (git-reference
2753 (url "https://github.com/boakley/robotframework-lint.git")
2754 (commit commit)))
2755 (file-name (git-file-name name version))
2756 (sha256
2757 (base32
2758 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2759 (build-system python-build-system)
2760 (arguments
2761 `(#:phases
2762 (modify-phases %standard-phases
2763 (replace 'check
2764 (lambda _
2765 (invoke "python" "-m" "robot" "-A"
2766 "tests/conf/default.args" "tests"))))))
2767 (propagated-inputs
2768 `(("python-robotframework" ,python-robotframework)))
2769 (home-page "https://github.com/boakley/robotframework-lint/")
2770 (synopsis "Static analysis tool (linter) for Robot Framework")
2771 (description "This package provides the @code{rflint} command-line
2772 utility, a static analysis tool (linter) for Robot Framework source files.")
2773 (license license:asl2.0))))
2774
2775 (define-public python-robotframework-sshlibrary
2776 (package
2777 (name "python-robotframework-sshlibrary")
2778 (version "3.3.0")
2779 ;; There are no tests in the PyPI archive.
2780 (source
2781 (origin
2782 (method git-fetch)
2783 (uri (git-reference
2784 (url "https://github.com/robotframework/SSHLibrary.git")
2785 (commit (string-append "v" version))))
2786 (file-name (git-file-name name version))
2787 (sha256
2788 (base32
2789 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2790 (build-system python-build-system)
2791 (arguments
2792 `(#:phases
2793 (modify-phases %standard-phases
2794 (add-before 'build 'build-and-install-doc
2795 (lambda* (#:key outputs #:allow-other-keys)
2796 (let* ((doc-output (assoc-ref outputs "doc"))
2797 (doc (string-append doc-output "/share/"
2798 ,name "-" ,version "/")))
2799 (invoke "chmod" "-R" "+w" "docs")
2800 (invoke "invoke" "kw-docs" "project-docs")
2801 (mkdir-p doc)
2802 (for-each delete-file (find-files "docs" "\\.rst"))
2803 (copy-recursively "docs" doc)
2804 #t)))
2805 (replace 'check
2806 (lambda _
2807 ;; Some tests require an SSH server; we remove them.
2808 (delete-file "utest/test_client_api.py")
2809 (delete-file "utest/test_scp.py")
2810 (invoke "python" "utest/run.py"))))))
2811 (propagated-inputs
2812 `(("python-robotframework" ,python-robotframework)
2813 ("python-paramiko" ,python-paramiko)
2814 ("python-scp" ,python-scp)))
2815 (native-inputs
2816 `(("openssh" ,openssh)
2817 ("which" ,which)
2818 ;; To generate the documentation
2819 ("python-docutils" ,python-docutils)
2820 ("python-invoke" ,python-invoke)
2821 ("python-pygments" ,python-pygments)
2822 ("python-rellu" ,python-rellu)))
2823 (outputs '("out" "doc"))
2824 (home-page "https://github.com/robotframework/SSHLibrary")
2825 (synopsis "Robot Framework library for SSH and SFTP")
2826 (description "SSHLibrary is a Robot Framework library providing support
2827 for SSH and SFTP. It has the following main usages:
2828 @itemize @bullet
2829 @item Executing commands on the remote machine, either blocking or non-blocking.
2830 @item Writing and reading in an interactive shell.
2831 @item Transferring files and directories over SFTP.
2832 @item Ensuring that files and directories exist on the remote machine.
2833 @end itemize")
2834 (license license:asl2.0)))
2835
2836 (define-public python-scp
2837 (package
2838 (name "python-scp")
2839 (version "0.13.2")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "scp" version))
2844 (sha256
2845 (base32
2846 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2847 (build-system python-build-system)
2848 (arguments
2849 '(#:tests? #f)) ;tests require an SSH server
2850 (propagated-inputs
2851 `(("python-paramiko" ,python-paramiko)))
2852 (home-page "https://github.com/jbardin/scp.py")
2853 (synopsis "SCP protocol module for Python and Paramiko")
2854 (description "The scp module extends the Paramiko library to send and
2855 receive files via the SCP1 protocol, as implemented by the OpenSSH
2856 @command{scp} program.")
2857 (license license:gpl2+)))
2858
2859 (define-public python-rst.linker
2860 (package
2861 (name "python-rst.linker")
2862 (version "1.10")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "rst.linker" version))
2867 (sha256
2868 (base32
2869 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2870 (build-system python-build-system)
2871 (propagated-inputs
2872 `(("python-dateutil" ,python-dateutil)
2873 ("python-six" ,python-six)))
2874 (native-inputs
2875 `(("python-setuptools-scm" ,python-setuptools-scm)))
2876 ;; Test would require path.py, which would introduce a cyclic dependence.
2877 (arguments `(#:tests? #f))
2878 ;; Note: As of version 1.7 the documentation is not worth building.
2879 (home-page "https://github.com/jaraco/rst.linker")
2880 (synopsis "Sphinx plugin to add links and timestamps")
2881 (description "rst.linker allows to automatically replace text by a
2882 reStructuredText external reference or timestamps. It's primary purpose is to
2883 augment the changelog, but it can be used for other documents, too.")
2884 (license license:expat)))
2885
2886 (define-public python2-rst.linker
2887 (package-with-python2 python-rst.linker))
2888
2889 (define-public python-feedgenerator
2890 (package
2891 (name "python-feedgenerator")
2892 (version "1.9")
2893 (source
2894 (origin
2895 (method url-fetch)
2896 (uri (pypi-uri "feedgenerator" version))
2897 (sha256
2898 (base32
2899 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2900 (modules '((guix build utils)))
2901 (snippet
2902 '(begin
2903 ;; Remove pre-compiled .pyc files from source.
2904 (for-each delete-file-recursively
2905 (find-files "." "__pycache__" #:directories? #t))
2906 (for-each delete-file (find-files "." "\\.pyc$"))
2907 #t))))
2908 (build-system python-build-system)
2909 (propagated-inputs
2910 `(("python-pytz" ,python-pytz)
2911 ("python-six" ,python-six)))
2912 (home-page "https://github.com/getpelican/feedgenerator")
2913 (synopsis
2914 "Standalone version of Django's Atom/RSS feed generator")
2915 (description
2916 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2917 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2918 (license license:bsd-3)))
2919
2920 (define-public python2-feedgenerator
2921 (package-with-python2 python-feedgenerator))
2922
2923 (define-public python-toml
2924 (package
2925 (name "python-toml")
2926 (version "0.9.4")
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "toml" version))
2931 (sha256
2932 (base32
2933 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2934 (build-system python-build-system)
2935 (arguments
2936 `(#:tests? #f)) ;no tests suite in release
2937 (home-page "https://github.com/uiri/toml")
2938 (synopsis "Library for TOML")
2939 (description
2940 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2941 Language (TOML) configuration files.")
2942 (license license:expat)))
2943
2944 (define-public python-jsonrpc-server
2945 (package
2946 (name "python-jsonrpc-server")
2947 (version "0.1.2")
2948 (source
2949 (origin
2950 (method url-fetch)
2951 (uri (pypi-uri "python-jsonrpc-server" version))
2952 (sha256
2953 (base32
2954 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2955 (build-system python-build-system)
2956 (propagated-inputs
2957 `(("python-future" ,python-future)
2958 ("python-mock" ,python-mock)
2959 ("python-pytest" ,python-pytest)))
2960 (home-page
2961 "https://github.com/palantir/python-jsonrpc-server")
2962 (synopsis "JSON RPC 2.0 server library")
2963 (description
2964 "This package provides a JSON RPC 2.0 server library for Python.")
2965 (license license:expat)))
2966
2967 (define-public python-pydocstyle
2968 (package
2969 (name "python-pydocstyle")
2970 (version "3.0.0")
2971 (source
2972 (origin
2973 (method url-fetch)
2974 (uri (pypi-uri "pydocstyle" version))
2975 (sha256
2976 (base32
2977 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2978 (build-system python-build-system)
2979 (propagated-inputs
2980 `(("python-six" ,python-six)
2981 ("python-snowballstemmer" ,python-snowballstemmer)))
2982 (home-page
2983 "https://github.com/PyCQA/pydocstyle/")
2984 (synopsis "Python docstring style checker")
2985 (description
2986 "This package provides a style checker for the Python Language
2987 Server (PLS).")
2988 (license license:expat)))
2989
2990 (define-public python-language-server
2991 (package
2992 (name "python-language-server")
2993 (version "0.26.1")
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (pypi-uri "python-language-server" version))
2998 (sha256
2999 (base32
3000 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3001 (build-system python-build-system)
3002 (propagated-inputs
3003 `(("python-pluggy" ,python-pluggy)
3004 ("python-jsonrpc-server" ,python-jsonrpc-server)
3005 ("python-jedi" ,python-jedi)
3006 ("python-yapf" ,python-yapf)
3007 ("python-pyflakes" ,python-pyflakes)
3008 ("python-pydocstyle" ,python-pydocstyle)
3009 ("python-pycodestyle" ,python-pycodestyle)
3010 ("python-mccabe" ,python-mccabe)
3011 ("python-rope" ,python-rope)
3012 ("python-autopep8" ,python-autopep8)
3013 ("python-pylint" ,python-pylint)))
3014 (home-page "https://github.com/palantir/python-language-server")
3015 (synopsis "Python implementation of the Language Server Protocol")
3016 (description
3017 "The Python Language Server (pyls) is an implementation of the Python 3
3018 language specification for the Language Server Protocol (LSP). This tool is
3019 used in text editing environments to provide a complete and integrated
3020 feature-set for programming Python effectively.")
3021 (license license:expat)))
3022
3023 (define-public python-black
3024 (package
3025 (name "python-black")
3026 (version "18.6b4")
3027 (source
3028 (origin
3029 (method url-fetch)
3030 (uri (pypi-uri "black" version))
3031 (sha256
3032 (base32
3033 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3034 (build-system python-build-system)
3035 (arguments
3036 `(#:phases
3037 (modify-phases %standard-phases
3038 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3039 (lambda _
3040 (let ((python3 (which "python3")))
3041 (substitute* '("tests/data/fmtonoff.py"
3042 "tests/data/string_prefixes.py"
3043 "tests/data/function.py")
3044 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3045 (string-append "#!" python3 (if (string? minor-version)
3046 minor-version
3047 ""))))))))))
3048 (propagated-inputs
3049 `(("python-click" ,python-click)
3050 ("python-attrs" ,python-attrs)
3051 ("python-appdirs" ,python-appdirs)
3052 ("python-toml" ,python-toml)))
3053 (home-page "https://github.com/ambv/black")
3054 (synopsis "The uncompromising code formatter")
3055 (description "Black is the uncompromising Python code formatter.")
3056 (license license:expat)))
3057
3058 (define-public python-blinker
3059 (package
3060 (name "python-blinker")
3061 (version "1.4")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (pypi-uri "blinker" version))
3066 (sha256
3067 (base32
3068 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3069 (build-system python-build-system)
3070 (home-page "http://pythonhosted.org/blinker/")
3071 (synopsis "Fast, simple object-to-object and broadcast signaling")
3072 (description
3073 "Blinker provides a fast dispatching system that allows any number of
3074 interested parties to subscribe to events, or \"signals\".")
3075 (license license:expat)))
3076
3077 (define-public python2-blinker
3078 (package-with-python2 python-blinker))
3079
3080 (define-public pelican
3081 (package
3082 (name "pelican")
3083 (version "4.0.1")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (pypi-uri "pelican" version))
3088 (sha256
3089 (base32
3090 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3091 (build-system python-build-system)
3092 (propagated-inputs
3093 `(("python-feedgenerator" ,python-feedgenerator)
3094 ("python-jinja2" ,python-jinja2)
3095 ("python-pygments" ,python-pygments)
3096 ("python-docutils" ,python-docutils)
3097 ("python-pytz" ,python-pytz)
3098 ("python-blinker" ,python-blinker)
3099 ("python-unidecode" ,python-unidecode)
3100 ("python-six" ,python-six)
3101 ("python-dateutil" ,python-dateutil)
3102 ("python-markdown" ,python-markdown)))
3103 (home-page "https://getpelican.com/")
3104 (arguments
3105 `(;; XXX Requires a lot more packages to do unit tests :P
3106 #:tests? #f
3107 #:phases (modify-phases %standard-phases
3108 (add-before
3109 'install 'adjust-requires
3110 ;; Since feedgenerator is installed from git, it doesn't
3111 ;; conform to the version requirements.
3112 ;;
3113 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3114 ;; version requirement so setuptools doesn't get confused.
3115 (lambda _
3116 (substitute* "setup.py"
3117 (("['\"]feedgenerator.*?['\"]")
3118 "'feedgenerator'")))))))
3119 (synopsis "Python-based static site publishing system")
3120 (description
3121 "Pelican is a tool to generate a static blog from reStructuredText,
3122 Markdown input files, and more. Pelican uses Jinja2 for templating
3123 and is very extensible.")
3124 (license license:agpl3+)))
3125
3126 (define-public mallard-ducktype
3127 (package
3128 (name "mallard-ducktype")
3129 (version "1.0.1")
3130 (source
3131 (origin
3132 (method git-fetch)
3133 ;; git-reference because a proper source tarball is not available
3134 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3135 (uri (git-reference
3136 (url "https://github.com/projectmallard/mallard-ducktype.git")
3137 (commit version)))
3138 (file-name (git-file-name name version))
3139 (sha256
3140 (base32
3141 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3142 (build-system python-build-system)
3143 (home-page "http://projectmallard.org")
3144 (synopsis "Convert Ducktype to Mallard documentation markup")
3145 (description
3146 "Ducktype is a lightweight syntax that can represent all the semantics
3147 of the Mallard XML documentation system. Ducktype files can be converted to
3148 Mallard using the @command{ducktype} tool. The yelp-tools package
3149 provides additional functionality on the produced Mallard documents.")
3150 (license license:expat)))
3151
3152 (define-public python-scikit-image
3153 (package
3154 (name "python-scikit-image")
3155 (version "0.14.2")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "scikit-image" version))
3160 (sha256
3161 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3162 (build-system python-build-system)
3163 (arguments
3164 ;; TODO: Some tests require running X11 server. Disable them?
3165 '(#:tests? #f))
3166 ;; See DEPENDS.txt for the list of build and run time requiremnts
3167 (propagated-inputs
3168 `(("python-cloudpickle" ,python-cloudpickle)
3169 ("python-dask" ,python-dask)
3170 ("python-matplotlib" ,python-matplotlib)
3171 ("python-networkx" ,python-networkx)
3172 ("python-numpy" ,python-numpy)
3173 ("python-pillow" ,python-pillow)
3174 ("python-pywavelets" ,python-pywavelets)
3175 ("python-scipy" ,python-scipy)
3176 ("python-six" ,python-six)))
3177 (native-inputs
3178 `(("python-cython" ,python-cython)))
3179 (home-page "http://scikit-image.org/")
3180 (synopsis "Image processing in Python")
3181 (description
3182 "Scikit-image is a collection of algorithms for image processing.")
3183 (license license:bsd-3)))
3184
3185 (define-public python2-scikit-image
3186 (package-with-python2 python-scikit-image))
3187
3188 (define-public python-cython
3189 (package
3190 (name "python-cython")
3191 (version "0.29.11")
3192 (source
3193 (origin
3194 (method url-fetch)
3195 (uri (pypi-uri "Cython" version))
3196 (sha256
3197 (base32
3198 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3199 (build-system python-build-system)
3200 ;; we need the full python package and not just the python-wrapper
3201 ;; because we need libpython3.3m.so
3202 (inputs
3203 `(("python" ,python)))
3204 (arguments
3205 `(#:phases
3206 (modify-phases %standard-phases
3207 (add-before 'check 'set-HOME
3208 ;; some tests require access to "$HOME/.cython"
3209 (lambda _ (setenv "HOME" "/tmp") #t))
3210
3211 ;; FIXME: These tests started failing on armhf after the 0.28 update
3212 ;; (commit c69d11c5930), both with an error such as this:
3213 ;; compiling (cpp) and running dictcomp ...
3214 ;; === C/C++ compiler error output: ===
3215 ;; ‘
3216 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3217 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3218 ,@(if (target-arm32?)
3219 `((add-before 'check 'disable-failing-tests
3220 (lambda _
3221 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3222 (for-each (lambda (test)
3223 (format disabled-tests "~a\n" test))
3224 '("memslice" "dictcomp"))
3225 (close-port disabled-tests)))))
3226 '())
3227
3228 (replace 'check
3229 (lambda _
3230 (invoke "python" "runtests.py" "-vv"))))))
3231 (home-page "https://cython.org/")
3232 (synopsis "C extensions for Python")
3233 (description "Cython is an optimising static compiler for both the Python
3234 programming language and the extended Cython programming language. It makes
3235 writing C extensions for Python as easy as Python itself.")
3236 (license license:asl2.0)
3237 (properties `((python2-variant . ,(delay python2-cython))))))
3238
3239 (define-public python2-cython
3240 (package (inherit (package-with-python2
3241 (strip-python2-variant python-cython)))
3242 (name "python2-cython")
3243 (inputs
3244 `(("python-2" ,python-2))))) ; this is not automatically changed
3245
3246 ;; The RPython toolchain currently does not support Python 3.
3247 (define-public python2-rpython
3248 (package
3249 (name "python2-rpython")
3250 (version "0.2.1")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "rpython" version))
3255 (sha256
3256 (base32
3257 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3258 (build-system python-build-system)
3259 (arguments `(#:python ,python-2))
3260 (native-inputs
3261 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3262 (home-page "https://rpython.readthedocs.org")
3263 (synopsis "Framework for implementing interpreters and virtual machines")
3264 (description "RPython is a translation and support framework for
3265 producing implementations of dynamic languages, emphasizing a clean separation
3266 between language specification and implementation aspects.")
3267 (license license:expat)))
3268
3269 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3270 ;; python-scipy still build, as these three packages are often used together.
3271 (define-public python-numpy
3272 (package
3273 (name "python-numpy")
3274 (version "1.15.4")
3275 (source
3276 (origin
3277 (method url-fetch)
3278 (uri (string-append
3279 "https://github.com/numpy/numpy/releases/download/v"
3280 version "/numpy-" version ".tar.gz"))
3281 (sha256
3282 (base32
3283 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3284 (build-system python-build-system)
3285 (inputs
3286 `(("openblas" ,openblas)
3287 ("lapack" ,lapack)))
3288 (native-inputs
3289 `(("python-cython" ,python-cython)
3290 ("python-pytest" ,python-pytest)
3291 ("gfortran" ,gfortran)))
3292 (arguments
3293 `(#:phases
3294 (modify-phases %standard-phases
3295 (add-before 'build 'configure-blas-lapack
3296 (lambda* (#:key inputs #:allow-other-keys)
3297 (call-with-output-file "site.cfg"
3298 (lambda (port)
3299 (format port
3300 "[openblas]
3301 libraries = openblas
3302 library_dirs = ~a/lib
3303 include_dirs = ~a/include
3304
3305 # backslash-n to make emacs happy
3306 \n[lapack]
3307 lapack_libs = lapack
3308 library_dirs = ~a/lib
3309 include_dirs = ~a/include
3310 "
3311 (assoc-ref inputs "openblas")
3312 (assoc-ref inputs "openblas")
3313 (assoc-ref inputs "lapack")
3314 (assoc-ref inputs "lapack"))))
3315 #t))
3316 (add-before 'build 'fix-executable-paths
3317 (lambda* (#:key inputs #:allow-other-keys)
3318 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3319 ;; instead of /bin/sh.
3320 (substitute* "numpy/distutils/exec_command.py"
3321 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3322 (string-append match-start (assoc-ref inputs "bash") match-end)))
3323 ;; Use "gcc" executable, not "cc".
3324 (substitute* "numpy/distutils/system_info.py"
3325 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3326 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3327 #t))
3328 ;; Tests can only be run after the library has been installed and not
3329 ;; within the source directory.
3330 (delete 'check)
3331 (add-after 'install 'check
3332 (lambda* (#:key outputs inputs #:allow-other-keys)
3333 ;; Make installed package available for running the tests
3334 (add-installed-pythonpath inputs outputs)
3335 ;; Make sure "f2py" etc is found.
3336 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3337 ":" (getenv "PATH")))
3338 (with-directory-excursion "/tmp"
3339 (invoke "python" "-c"
3340 "import numpy; numpy.test(verbose=2)")))))))
3341 (home-page "http://www.numpy.org/")
3342 (synopsis "Fundamental package for scientific computing with Python")
3343 (description "NumPy is the fundamental package for scientific computing
3344 with Python. It contains among other things: a powerful N-dimensional array
3345 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3346 and Fortran code, useful linear algebra, Fourier transform, and random number
3347 capabilities.")
3348 (license license:bsd-3)))
3349
3350 (define-public python2-numpy
3351 (package-with-python2 python-numpy))
3352
3353 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3354 ;; interest only for legacy code going back to NumPy's predecessor
3355 ;; Numeric.
3356 (define-public python2-numpy-1.8
3357 (package (inherit python2-numpy)
3358 (version "1.8.2")
3359 (source
3360 (origin
3361 (method url-fetch)
3362 (uri (string-append
3363 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3364 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3365 (sha256
3366 (base32
3367 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3368 (arguments
3369 (substitute-keyword-arguments (package-arguments python2-numpy)
3370 ((#:phases phases)
3371 `(modify-phases ,phases
3372 (replace 'configure-blas-lapack
3373 (lambda* (#:key inputs #:allow-other-keys)
3374 (call-with-output-file "site.cfg"
3375 (lambda (port)
3376 (format port
3377 "[openblas]
3378 libraries = openblas,lapack
3379 library_dirs = ~a/lib:~a/lib
3380 include_dirs = ~a/include:~a/include
3381 "
3382 (assoc-ref inputs "openblas")
3383 (assoc-ref inputs "lapack")
3384 (assoc-ref inputs "openblas")
3385 (assoc-ref inputs "lapack"))))
3386 #t))))))
3387 (native-inputs
3388 `(("python2-nose" ,python2-nose)))
3389 (description "NumPy is the fundamental package for scientific computing
3390 with Python. It contains among other things: a powerful N-dimensional array
3391 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3392 and Fortran code, useful linear algebra, Fourier transform, and random number
3393 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3394 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3395 Numeric.")
3396 (license license:bsd-3)))
3397
3398 (define-public python-munch
3399 (package
3400 (name "python-munch")
3401 (version "2.0.4")
3402 (source
3403 (origin
3404 (method url-fetch)
3405 (uri (pypi-uri "munch" version))
3406 (sha256
3407 (base32
3408 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3409 (build-system python-build-system)
3410 (home-page "https://github.com/Infinidat/munch")
3411 (synopsis "Dot-accessible dictionary")
3412 (description "Munch is a dot-accessible dictionary similar to JavaScript
3413 objects.")
3414 (license license:expat)))
3415
3416 (define-public python2-munch
3417 (package-with-python2 python-munch))
3418
3419 (define-public python-colormath
3420 (package
3421 (name "python-colormath")
3422 (version "3.0.0")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (pypi-uri "colormath" version))
3427 (sha256
3428 (base32
3429 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3430 (build-system python-build-system)
3431 (propagated-inputs
3432 `(("python-networkx" ,python-networkx)
3433 ("python-numpy" ,python-numpy)))
3434 (home-page "https://github.com/gtaylor/python-colormath")
3435 (synopsis "Color math and conversion library")
3436 (description
3437 "This is a Python library for color math and conversions.")
3438 (license license:bsd-3)))
3439
3440 (define-public python2-colormath
3441 (package-with-python2 python-colormath))
3442
3443 (define-public python-spectra
3444 (package
3445 (name "python-spectra")
3446 (version "0.0.11")
3447 (source
3448 (origin
3449 (method url-fetch)
3450 (uri (pypi-uri "spectra" version))
3451 (sha256
3452 (base32
3453 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3454 (build-system python-build-system)
3455 (arguments
3456 `(#:phases
3457 (modify-phases %standard-phases
3458 (replace 'check
3459 (lambda _ (invoke "nosetests" "-v"))))))
3460 (propagated-inputs
3461 `(("python-colormath" ,python-colormath)))
3462 (native-inputs
3463 `(("python-nose" ,python-nose)))
3464 (home-page "https://github.com/jsvine/spectra")
3465 (synopsis "Color scales and color conversion")
3466 (description
3467 "This package provides a Python library intended to make color math,
3468 color scales, and color space conversion easy. It has support for:
3469
3470 @enumerate
3471 @item Color scales
3472 @item Color ranges
3473 @item Color blending
3474 @item Brightening/darkening colors
3475 @item Saturating/desaturating colors
3476 @item Conversion to/from multiple color spaces.
3477 @end enumerate\n")
3478 (license license:expat)))
3479
3480 (define-public python2-spectra
3481 (package-with-python2 python-spectra))
3482
3483 (define-public python-numpy-documentation
3484 (package
3485 (name "python-numpy-documentation")
3486 (version (package-version python-numpy))
3487 (source (package-source python-numpy))
3488 (build-system python-build-system)
3489 (native-inputs
3490 `(("python-matplotlib" ,python-matplotlib)
3491 ("python-numpy" ,python-numpy)
3492 ("pkg-config" ,pkg-config)
3493 ("python-sphinx" ,python-sphinx)
3494 ("python-numpydoc" ,python-numpydoc)
3495 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3496 texlive-fonts-cm-super
3497 texlive-fonts-ec
3498 texlive-generic-ifxetex
3499 texlive-generic-pdftex
3500 texlive-latex-amsfonts
3501 texlive-latex-capt-of
3502 texlive-latex-cmap
3503 texlive-latex-environ
3504 texlive-latex-eqparbox
3505 texlive-latex-etoolbox
3506 texlive-latex-expdlist
3507 texlive-latex-fancyhdr
3508 texlive-latex-fancyvrb
3509 texlive-latex-fncychap
3510 texlive-latex-float
3511 texlive-latex-framed
3512 texlive-latex-geometry
3513 texlive-latex-graphics
3514 texlive-latex-hyperref
3515 texlive-latex-mdwtools
3516 texlive-latex-multirow
3517 texlive-latex-needspace
3518 texlive-latex-oberdiek
3519 texlive-latex-parskip
3520 texlive-latex-preview
3521 texlive-latex-tabulary
3522 texlive-latex-threeparttable
3523 texlive-latex-titlesec
3524 texlive-latex-trimspaces
3525 texlive-latex-ucs
3526 texlive-latex-upquote
3527 texlive-latex-url
3528 texlive-latex-varwidth
3529 texlive-latex-wrapfig)))
3530 ("texinfo" ,texinfo)
3531 ("perl" ,perl)
3532 ("scipy-sphinx-theme"
3533 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3534 (method git-fetch)
3535 (uri (git-reference
3536 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3537 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3538 (sha256
3539 (base32
3540 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3541 ,@(package-native-inputs python-numpy)))
3542 (arguments
3543 `(#:tests? #f ; we're only generating the documentation
3544 #:phases
3545 (modify-phases %standard-phases
3546 (delete 'build)
3547 (replace 'install
3548 (lambda* (#:key inputs outputs #:allow-other-keys)
3549 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3550 (doc (string-append
3551 data "/doc/" ,name "-"
3552 ,(package-version python-numpy)))
3553 (info-reader (string-append data "/info"))
3554 (html (string-append doc "/html"))
3555 (scipy-sphinx-theme "scipy-sphinx-theme")
3556 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3557 (pyver ,(string-append "PYVER=")))
3558
3559 ;; FIXME: this is needed to for texlive-union to generate
3560 ;; fonts, which are not found.
3561 (setenv "HOME" "/tmp")
3562
3563 (with-directory-excursion "doc"
3564 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3565 (mkdir-p html)
3566 (invoke "make" "html" pyver)
3567 (invoke "make" "latex" "PAPER=a4" pyver)
3568 (invoke "make" "-C" "build/latex"
3569 "all-pdf" "PAPER=a4" pyver)
3570 ;; FIXME: Generation of the info file fails.
3571 ;; (invoke "make" "info" pyver)
3572 ;; (mkdir-p info)
3573 ;; (copy-file "build/texinfo/numpy.info"
3574 ;; (string-append info "/numpy.info"))
3575 (for-each (lambda (file)
3576 (copy-file (string-append "build/latex" file)
3577 (string-append doc file)))
3578 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3579 (with-directory-excursion "build/html"
3580 (for-each (lambda (file)
3581 (let* ((dir (dirname file))
3582 (tgt-dir (string-append html "/" dir)))
3583 (unless (equal? "." dir)
3584 (mkdir-p tgt-dir))
3585 (install-file file html)))
3586 (find-files "." ".*")))))
3587 #t)))))
3588 (home-page (package-home-page python-numpy))
3589 (synopsis "Documentation for the python-numpy package")
3590 (description (package-description python-numpy))
3591 (license (package-license python-numpy))))
3592
3593 (define-public python2-numpy-documentation
3594 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3595 (package
3596 (inherit numpy-documentation)
3597 (native-inputs `(("python2-functools32" ,python2-functools32)
3598 ,@(package-native-inputs numpy-documentation))))))
3599
3600 (define-public python-pygit2
3601 (package
3602 (name "python-pygit2")
3603 (version "0.28.2")
3604 (source
3605 (origin
3606 (method url-fetch)
3607 (uri (pypi-uri "pygit2" version))
3608 (sha256
3609 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3610 (build-system python-build-system)
3611 (arguments
3612 '(#:tests? #f)) ; tests don't run correctly in our environment
3613 (propagated-inputs
3614 `(("python-six" ,python-six)
3615 ("python-cffi" ,python-cffi)
3616 ("libgit2" ,libgit2)
3617 ("python-tox" ,python-tox)))
3618 (native-inputs
3619 `(("python-pytest" ,python-pytest)))
3620 (home-page "https://github.com/libgit2/pygit2")
3621 (synopsis "Python bindings for libgit2")
3622 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3623 library, libgit2 implements Git plumbing.")
3624 ;; GPL2.0 only, with linking exception.
3625 (license license:gpl2)))
3626
3627 (define-public python2-pygit2
3628 (package-with-python2 python-pygit2))
3629
3630 (define-public python-pyparsing
3631 (package
3632 (name "python-pyparsing")
3633 (version "2.3.1")
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "pyparsing" version))
3638 (sha256
3639 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3640 (build-system python-build-system)
3641 (outputs '("out" "doc"))
3642 (arguments
3643 `(#:tests? #f ; no test target
3644 #:phases
3645 (modify-phases %standard-phases
3646 (add-after 'install 'install-doc
3647 (lambda* (#:key outputs #:allow-other-keys)
3648 (let* ((doc (string-append (assoc-ref outputs "doc")
3649 "/share/doc/" ,name "-" ,version))
3650 (html-doc (string-append doc "/html"))
3651 (examples (string-append doc "/examples")))
3652 (mkdir-p html-doc)
3653 (mkdir-p examples)
3654 (for-each
3655 (lambda (dir tgt)
3656 (map (lambda (file)
3657 (install-file file tgt))
3658 (find-files dir ".*")))
3659 (list "docs" "htmldoc" "examples")
3660 (list doc html-doc examples))
3661 #t))))))
3662 (home-page "https://github.com/pyparsing/pyparsing")
3663 (synopsis "Python parsing class library")
3664 (description
3665 "The pyparsing module is an alternative approach to creating and
3666 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3667 of regular expressions. The pyparsing module provides a library of classes
3668 that client code uses to construct the grammar directly in Python code.")
3669 (license license:expat)))
3670
3671 (define-public python2-pyparsing
3672 (package-with-python2 python-pyparsing))
3673
3674 (define-public python-numpydoc
3675 (package
3676 (name "python-numpydoc")
3677 (version "0.8.0")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (pypi-uri "numpydoc" version))
3682 (sha256
3683 (base32
3684 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3685 (build-system python-build-system)
3686 (propagated-inputs
3687 `(("python-sphinx" ,python-sphinx)))
3688 (native-inputs
3689 `(("python-nose" ,python-nose)))
3690 (home-page "https://pypi.python.org/pypi/numpydoc")
3691 (synopsis
3692 "Numpy's Sphinx extensions")
3693 (description
3694 "Sphinx extension to support docstrings in Numpy format.")
3695 (license license:bsd-2)))
3696
3697 (define-public python2-numpydoc
3698 (package-with-python2 python-numpydoc))
3699
3700 (define-public python-numexpr
3701 (package
3702 (name "python-numexpr")
3703 (version "2.6.5")
3704 (source
3705 (origin
3706 (method url-fetch)
3707 (uri (pypi-uri "numexpr" version))
3708 (sha256
3709 (base32
3710 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3711 (build-system python-build-system)
3712 (arguments `(#:tests? #f)) ; no tests included
3713 (propagated-inputs
3714 `(("python-numpy" ,python-numpy)))
3715 (home-page "https://github.com/pydata/numexpr")
3716 (synopsis "Fast numerical expression evaluator for NumPy")
3717 (description
3718 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3719 expressions that operate on arrays are accelerated and use less memory than
3720 doing the same calculation in Python. In addition, its multi-threaded
3721 capabilities can make use of all your cores, which may accelerate
3722 computations, most specially if they are not memory-bounded (e.g. those using
3723 transcendental functions).")
3724 (license license:expat)))
3725
3726 (define-public python2-numexpr
3727 (package-with-python2 python-numexpr))
3728
3729 (define-public python-cycler
3730 (package
3731 (name "python-cycler")
3732 (version "0.10.0")
3733 (source (origin
3734 (method url-fetch)
3735 (uri (pypi-uri "cycler" version))
3736 (sha256
3737 (base32
3738 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3739 (build-system python-build-system)
3740 (arguments
3741 ;; XXX: The current version requires 'coveralls' which we don't have.
3742 ;; Enable this for the next release which uses 'python-pytest'.
3743 '(#:tests? #f))
3744 (propagated-inputs
3745 `(("python-six" ,python-six)))
3746 (home-page "http://matplotlib.org/cycler/")
3747 (synopsis "Composable keyword argument iterator")
3748 (description
3749 "When using @code{matplotlib} and plotting more than one line, it is
3750 common to want to be able to want to be able to cycle over one or more artist
3751 styles; but the plotting logic can quickly become involved.
3752 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3753 @code{Cycler} class was developed.")
3754 (license license:bsd-3)))
3755
3756 (define-public python2-cycler
3757 (package-with-python2 python-cycler))
3758
3759 (define-public python-colorspacious
3760 (package
3761 (name "python-colorspacious")
3762 (version "1.1.0")
3763 (source
3764 (origin
3765 (method git-fetch)
3766 (uri (git-reference
3767 (url "https://github.com/njsmith/colorspacious.git")
3768 (commit (string-append "v" version))))
3769 (file-name (git-file-name name version))
3770 (sha256
3771 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3772 (build-system python-build-system)
3773 (propagated-inputs
3774 `(("python-numpy" ,python-numpy)))
3775 (native-inputs
3776 `(("python-nose" ,python-nose)))
3777 (arguments
3778 `(#:phases
3779 (modify-phases %standard-phases
3780 (replace 'check
3781 (lambda _
3782 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3783 (home-page "https://github.com/njsmith/colorspacious")
3784 (synopsis "Python library for colorspace conversions")
3785 (description "@code{colorspacious} is a Python library that lets you
3786 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3787 (license license:expat)))
3788
3789 (define-public python2-colorspacious
3790 (package-with-python2 python-colorspacious))
3791
3792 (define-public python-matplotlib
3793 (package
3794 (name "python-matplotlib")
3795 (version "2.2.3")
3796 (source
3797 (origin
3798 (method url-fetch)
3799 (uri (pypi-uri "matplotlib" version))
3800 (sha256
3801 (base32
3802 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3803 (build-system python-build-system)
3804 (propagated-inputs ; the following packages are all needed at run time
3805 `(("python-cycler" ,python-cycler)
3806 ("python-kiwisolver" ,python-kiwisolver)
3807 ("python-pyparsing" ,python-pyparsing)
3808 ("python-pygobject" ,python-pygobject)
3809 ("gobject-introspection" ,gobject-introspection)
3810 ("python-tkinter" ,python "tk")
3811 ("python-dateutil" ,python-dateutil)
3812 ("python-numpy" ,python-numpy)
3813 ("python-pillow" ,python-pillow)
3814 ("python-pytz" ,python-pytz)
3815 ("python-six" ,python-six)
3816 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3817 ;; from 'gtk+') provides the required 'typelib' files used by
3818 ;; 'gobject-introspection'. The location of these files is set with the
3819 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3820 ;; is done automatically by a 'native-search-path' procedure. However,
3821 ;; at run-time the user must set this variable as follows:
3822 ;;
3823 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3824 ("gtk+" ,gtk+)
3825 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3826 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3827 ;; object. For this reason we need to import both libraries.
3828 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3829 ("python-pycairo" ,python-pycairo)
3830 ;; XXX: qtwebkit cannot be built reliably.
3831 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3832 ("python-cairocffi" ,python-cairocffi)))
3833 (inputs
3834 `(("libpng" ,libpng)
3835 ("imagemagick" ,imagemagick)
3836 ("freetype" ,freetype)
3837 ("cairo" ,cairo)
3838 ("glib" ,glib)
3839 ;; FIXME: Add backends when available.
3840 ;("python-wxpython" ,python-wxpython)
3841 ("tcl" ,tcl)
3842 ("tk" ,tk)))
3843 (native-inputs
3844 `(("pkg-config" ,pkg-config)
3845 ("python-nose" ,python-nose)
3846 ("python-mock" ,python-mock)))
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (add-before 'build 'configure-environment
3851 (lambda* (#:key outputs inputs #:allow-other-keys)
3852 (let ((cairo (assoc-ref inputs "cairo"))
3853 (gtk+ (assoc-ref inputs "gtk+")))
3854 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3855 ;; has not effect.
3856 (setenv "LD_LIBRARY_PATH"
3857 (string-append cairo "/lib:" gtk+ "/lib"))
3858 (setenv "HOME" (getcwd))
3859 (call-with-output-file "setup.cfg"
3860 (lambda (port)
3861 (format port "[directories]~%
3862 basedirlist = ~a,~a~%
3863 [rc_options]~%
3864 backend = TkAgg~%"
3865 (assoc-ref inputs "tcl")
3866 (assoc-ref inputs "tk")))))
3867 #t)))))
3868 (home-page "http://matplotlib.org")
3869 (synopsis "2D plotting library for Python")
3870 (description
3871 "Matplotlib is a Python 2D plotting library which produces publication
3872 quality figures in a variety of hardcopy formats and interactive environments
3873 across platforms. Matplotlib can be used in Python scripts, the python and
3874 ipython shell, web application servers, and six graphical user interface
3875 toolkits.")
3876 (license license:psfl)
3877 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3878
3879 (define-public python2-matplotlib
3880 (let ((matplotlib (package-with-python2
3881 (strip-python2-variant python-matplotlib))))
3882 (package (inherit matplotlib)
3883 ;; Make sure to use special packages for Python 2 instead
3884 ;; of those automatically rewritten by package-with-python2.
3885 (propagated-inputs
3886 `(("python2-pycairo" ,python2-pycairo)
3887 ("python2-backports-functools-lru-cache"
3888 ,python2-backports-functools-lru-cache)
3889 ("python2-functools32" ,python2-functools32)
3890 ("python2-pygobject-2" ,python2-pygobject-2)
3891 ("python2-subprocess32" ,python2-subprocess32)
3892 ("python2-tkinter" ,python-2 "tk")
3893 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3894 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3895
3896 (define-public python-matplotlib-documentation
3897 (package
3898 (name "python-matplotlib-documentation")
3899 (version (package-version python-matplotlib))
3900 (source (package-source python-matplotlib))
3901 (build-system python-build-system)
3902 (native-inputs
3903 `(("python-matplotlib" ,python-matplotlib)
3904 ("python-colorspacious" ,python-colorspacious)
3905 ("python-sphinx" ,python-sphinx)
3906 ("python-sphinx-gallery" ,python-sphinx-gallery)
3907 ("python-numpydoc" ,python-numpydoc)
3908 ("python-ipython" ,python-ipython)
3909 ("python-ipykernel" ,python-ipykernel)
3910 ("python-mock" ,python-mock)
3911 ("graphviz" ,graphviz)
3912 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3913 texlive-latex-amsmath
3914 texlive-latex-enumitem
3915 texlive-latex-expdlist
3916 texlive-latex-geometry
3917 texlive-latex-preview
3918 texlive-latex-type1cm
3919 texlive-latex-ucs
3920
3921 texlive-generic-pdftex
3922
3923 texlive-fonts-amsfonts
3924 texlive-fonts-ec
3925 texlive-fonts-adobe-times
3926 texlive-fonts-txfonts)))
3927 ("texinfo" ,texinfo)
3928 ,@(package-native-inputs python-matplotlib)))
3929 (arguments
3930 `(#:tests? #f ; we're only generating documentation
3931 #:phases
3932 (modify-phases %standard-phases
3933 (replace 'build
3934 (lambda _
3935 (chdir "doc")
3936 (setenv "PYTHONPATH"
3937 (string-append (getenv "PYTHONPATH")
3938 ":" (getcwd) "/../examples/units"))
3939 (substitute* "conf.py"
3940 ;; Don't use git.
3941 (("^SHA = check_output.*")
3942 (string-append "SHA = \"" ,version "\"\n"))
3943 ;; Don't fetch intersphinx files from the Internet
3944 (("^explicit_order_folders" m)
3945 (string-append "intersphinx_mapping = {}\n" m))
3946 (("'sphinx.ext.intersphinx',") "")
3947 ;; Disable URL embedding which requires internet access.
3948 (("'https://docs.scipy.org/doc/numpy'") "None")
3949 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3950 (invoke "make"
3951 "SPHINXBUILD=sphinx-build"
3952 "SPHINXOPTS=" ; don't abort on warnings
3953 "html" "texinfo")))
3954 (replace 'install
3955 (lambda* (#:key inputs outputs #:allow-other-keys)
3956 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3957 (doc (string-append data "/doc/python-matplotlib-" ,version))
3958 (info (string-append data "/info"))
3959 (html (string-append doc "/html")))
3960 (mkdir-p html)
3961 (mkdir-p info)
3962 (copy-recursively "build/html" html)
3963 (symlink (string-append html "/_images")
3964 (string-append info "/matplotlib-figures"))
3965 (with-directory-excursion "build/texinfo"
3966 (substitute* "matplotlib.texi"
3967 (("@image\\{([^,]*)" all file)
3968 (string-append "@image{matplotlib-figures/" file)))
3969 (symlink (string-append html "/_images")
3970 "./matplotlib-figures")
3971 (invoke "makeinfo" "--no-split"
3972 "-o" "matplotlib.info" "matplotlib.texi"))
3973 (install-file "build/texinfo/matplotlib.info" info))
3974 #t)))))
3975 (home-page (package-home-page python-matplotlib))
3976 (synopsis "Documentation for the python-matplotlib package")
3977 (description (package-description python-matplotlib))
3978 (license (package-license python-matplotlib))))
3979
3980 (define-public python2-matplotlib-documentation
3981 (package-with-python2 python-matplotlib-documentation))
3982
3983 (define-public python-matplotlib-venn
3984 (package
3985 (name "python-matplotlib-venn")
3986 (version "0.11.5")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3991 (sha256
3992 (base32
3993 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3994 (build-system python-build-system)
3995 (arguments '(#:tests? #f)) ; tests are not included
3996 (propagated-inputs
3997 `(("python-matplotlib" ,python-matplotlib)
3998 ("python-numpy" ,python-numpy)
3999 ("python-scipy" ,python-scipy)))
4000 (native-inputs
4001 `(("unzip" ,unzip)))
4002 (home-page "https://github.com/konstantint/matplotlib-venn")
4003 (synopsis "Plot area-proportional Venn diagrams")
4004 (description
4005 "This package provides tools for plotting area-proportional two- and
4006 three-way Venn diagrams in @code{matplotlib}.")
4007 (license license:expat)))
4008
4009 (define-public python2-pysnptools
4010 (package
4011 (name "python2-pysnptools")
4012 (version "0.3.13")
4013 (source
4014 (origin
4015 (method url-fetch)
4016 (uri (pypi-uri "pysnptools" version))
4017 (sha256
4018 (base32
4019 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4020 (build-system python-build-system)
4021 (arguments
4022 `(#:python ,python-2 ; only Python 2.7 is supported
4023 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4024 (propagated-inputs
4025 `(("python2-numpy" ,python2-numpy)
4026 ("python2-scipy" ,python2-scipy)
4027 ("python2-pandas" ,python2-pandas)))
4028 (native-inputs
4029 `(("python2-cython" ,python2-cython)))
4030 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4031 (synopsis "Library for reading and manipulating genetic data")
4032 (description
4033 "PySnpTools is a library for reading and manipulating genetic data. It
4034 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4035 those files. It can also efficiently manipulate ranges of integers using set
4036 operators such as union, intersection, and difference.")
4037 (license license:asl2.0)))
4038
4039 (define-public python-scipy
4040 (package
4041 (name "python-scipy")
4042 (version "1.2.2")
4043 (source
4044 (origin
4045 (method url-fetch)
4046 (uri (pypi-uri "scipy" version))
4047 (sha256
4048 (base32
4049 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4050 (build-system python-build-system)
4051 (propagated-inputs
4052 `(("python-numpy" ,python-numpy)
4053 ("python-matplotlib" ,python-matplotlib)
4054 ("python-pyparsing" ,python-pyparsing)))
4055 (inputs
4056 `(("lapack" ,lapack)
4057 ("openblas" ,openblas)))
4058 (native-inputs
4059 `(("python-cython" ,python-cython)
4060 ("python-pytest" ,python-pytest)
4061 ("python-sphinx" ,python-sphinx)
4062 ("python-numpydoc" ,python-numpydoc)
4063 ("gfortran" ,gfortran)
4064 ("perl" ,perl)
4065 ("which" ,which)))
4066 (outputs '("out" "doc"))
4067 (arguments
4068 `(#:phases
4069 (modify-phases %standard-phases
4070 (add-after 'unpack 'disable-broken-tests
4071 (lambda _
4072 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4073 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4074 (string-append indent
4075 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4076 m)))
4077 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4078 (("^def test_parallel_threads\\(\\):" m)
4079 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4080 m)))
4081 #t))
4082 (add-before 'build 'configure-openblas
4083 (lambda* (#:key inputs #:allow-other-keys)
4084 (call-with-output-file "site.cfg"
4085 (lambda (port)
4086 (format port
4087 "[blas]
4088 libraries = openblas
4089 library_dirs = ~a/lib
4090 include_dirs = ~a/include
4091
4092 # backslash-n to make emacs happy
4093 \n[atlas]
4094 library_dirs = ~a/lib
4095 atlas_libs = openblas
4096 "
4097 (assoc-ref inputs "openblas")
4098 (assoc-ref inputs "openblas")
4099 (assoc-ref inputs "openblas"))))
4100 #t))
4101 (add-after 'install 'install-doc
4102 (lambda* (#:key inputs outputs #:allow-other-keys)
4103 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4104 (doc (string-append data "/doc/" ,name "-" ,version))
4105 (html (string-append doc "/html"))
4106 (pyver ,(string-append "PYVER=" (version-major+minor
4107 (package-version python))))
4108 ;; By default it tries to run sphinx-build through the Python
4109 ;; interpreter which won't work with our shell wrapper.
4110 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4111 ;; Make installed package available for building the
4112 ;; documentation
4113 (add-installed-pythonpath inputs outputs)
4114 (with-directory-excursion "doc"
4115 ;; Fix generation of images for mathematical expressions.
4116 (substitute* (find-files "source" "conf\\.py")
4117 (("pngmath_use_preview = True")
4118 "pngmath_use_preview = False"))
4119 (mkdir-p html)
4120 (invoke "make" "html" pyver sphinxbuild)
4121 (with-directory-excursion "build/html"
4122 (for-each (lambda (file)
4123 (let* ((dir (dirname file))
4124 (tgt-dir (string-append html "/" dir)))
4125 (install-file file html)))
4126 (find-files "." ".*")))))
4127 #t))
4128 ;; Tests can only be run after the library has been installed and not
4129 ;; within the source directory.
4130 (delete 'check)
4131 (add-after 'install 'check
4132 (lambda* (#:key inputs outputs #:allow-other-keys)
4133 (add-installed-pythonpath inputs outputs)
4134 (with-directory-excursion "/tmp"
4135 (invoke "python" "-c"
4136 "import scipy; scipy.test(verbose=2)")))))))
4137 (home-page "https://www.scipy.org/")
4138 (synopsis "The Scipy library provides efficient numerical routines")
4139 (description "The SciPy library is one of the core packages that make up
4140 the SciPy stack. It provides many user-friendly and efficient numerical
4141 routines such as routines for numerical integration and optimization.")
4142 (properties `((python2-variant . ,(delay python2-scipy))))
4143 (license license:bsd-3)))
4144
4145 (define-public python2-scipy
4146 (package-with-python2
4147 (strip-python2-variant python-scipy)))
4148
4149 (define-public python-socksipy-branch
4150 (package
4151 (name "python-socksipy-branch")
4152 (version "1.01")
4153 (source
4154 (origin
4155 (method url-fetch)
4156 (uri (pypi-uri "SocksiPy-branch" version))
4157 (sha256
4158 (base32
4159 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4160 (build-system python-build-system)
4161 (arguments
4162 `(#:tests? #f)) ; There are no tests
4163 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4164 (synopsis "Python SOCKS module")
4165 (description
4166 "SocksiPy - A Python SOCKS client module. It provides a
4167 socket-like interface that supports connections to any TCP
4168 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4169 The original version was developed by Dan Haim, this is a
4170 branch created by Mario Vilas to address some open issues,
4171 as the original project seems to have been abandoned circa 2007.")
4172 (license license:bsd-3)))
4173
4174 (define-public python2-socksipy-branch
4175 (package-with-python2 python-socksipy-branch))
4176
4177 (define-public python-pycodestyle
4178 (package
4179 (name "python-pycodestyle")
4180 (version "2.5.0")
4181 (source
4182 (origin
4183 (method url-fetch)
4184 (uri (pypi-uri "pycodestyle" version))
4185 (sha256
4186 (base32
4187 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4188 (build-system python-build-system)
4189 (home-page "https://pycodestyle.readthedocs.io/")
4190 (synopsis "Python style guide checker")
4191 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4192 Python code against some of the style conventions in
4193 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4194 (license license:expat)))
4195
4196 (define-public python2-pycodestyle
4197 (package-with-python2 python-pycodestyle))
4198
4199 (define-public python-multidict
4200 (package
4201 (name "python-multidict")
4202 (version "4.2.0")
4203 (source
4204 (origin
4205 (method url-fetch)
4206 (uri (pypi-uri "multidict" version))
4207 (sha256
4208 (base32
4209 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4210 (build-system python-build-system)
4211 (native-inputs
4212 `(("python-pytest" ,python-pytest)
4213 ("python-pytest-runner" ,python-pytest-runner)))
4214 (home-page "https://github.com/aio-libs/multidict/")
4215 (synopsis "Multidict implementation")
4216 (description "Multidict is dict-like collection of key-value pairs
4217 where key might be occurred more than once in the container.")
4218 (license license:asl2.0)))
4219
4220 (define-public python-orderedmultidict
4221 (package
4222 (name "python-orderedmultidict")
4223 (version "0.7.11")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (pypi-uri "orderedmultidict" version))
4228 (sha256
4229 (base32
4230 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4231 (build-system python-build-system)
4232 (arguments
4233 `(#:phases
4234 (modify-phases %standard-phases
4235 (add-after 'unpack 'fix-tests
4236 (lambda _
4237 ;; The package uses nosetest for running the tests.
4238 ;; Adding this initfile allows to run the test suite
4239 ;; without requiring nosetest.
4240 (with-output-to-file "tests/__init__.py" newline)
4241 #t)))))
4242 (propagated-inputs
4243 `(("python-six" ,python-six)))
4244 (native-inputs
4245 `(("python-pycodestyle" ,python-pycodestyle)))
4246 (home-page "https://github.com/gruns/orderedmultidict")
4247 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4248 (description "This package contains a library for ordered multivalue
4249 dictionaries. A multivalue dictionary is a dictionary that can store
4250 multiple values for the same key. An ordered multivalue dictionary is a
4251 multivalue dictionary that retains the order of insertions and deletions.")
4252 (license license:unlicense)))
4253
4254 (define-public python2-orderedmultidict
4255 (package-with-python2 python-orderedmultidict))
4256
4257 (define-public python-autopep8
4258 (package
4259 (name "python-autopep8")
4260 (version "1.3.5")
4261 (source
4262 (origin
4263 (method url-fetch)
4264 (uri (pypi-uri "autopep8" version))
4265 (sha256
4266 (base32
4267 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4268 (build-system python-build-system)
4269 (propagated-inputs
4270 `(("python-pycodestyle" ,python-pycodestyle)))
4271 (home-page "https://github.com/hhatto/autopep8")
4272 (synopsis "Format Python code according to the PEP 8 style guide")
4273 (description
4274 "@code{autopep8} automatically formats Python code to conform to
4275 the PEP 8 style guide. It uses the pycodestyle utility to determine
4276 what parts of the code needs to be formatted. @code{autopep8} is
4277 capable of fixing most of the formatting issues that can be reported
4278 by pycodestyle.")
4279 (license (license:non-copyleft
4280 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4281
4282 (define-public python2-autopep8
4283 (package-with-python2 python-autopep8))
4284
4285 (define-public python-distutils-extra
4286 (package
4287 (name "python-distutils-extra")
4288 (version "2.38")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4293 version "/+download/python-distutils-extra-"
4294 version ".tar.gz"))
4295 (sha256
4296 (base32
4297 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4298 (build-system python-build-system)
4299 (home-page "https://launchpad.net/python-distutils-extra/")
4300 (synopsis "Enhancements to Python's distutils")
4301 (description
4302 "The python-distutils-extra module enables you to easily integrate
4303 gettext support, themed icons, and scrollkeeper-based documentation into
4304 Python's distutils.")
4305 (license license:gpl2)))
4306
4307 (define-public python2-distutils-extra
4308 (package-with-python2 python-distutils-extra))
4309
4310 (define-public python2-elib.intl
4311 (package
4312 (name "python2-elib.intl")
4313 (version "0.0.3")
4314 (source
4315 (origin
4316 ;; This project doesn't tag releases or publish tarballs, so we take
4317 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4318 (method git-fetch)
4319 (uri (git-reference
4320 (url "https://github.com/dieterv/elib.intl.git")
4321 (commit "d09997cfef")))
4322 (file-name (string-append name "-" version "-checkout"))
4323 (sha256
4324 (base32
4325 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4326 (build-system python-build-system)
4327 (arguments
4328 ;; incompatible with Python 3 (exception syntax)
4329 `(#:python ,python-2
4330 #:tests? #f))
4331 (home-page "https://github.com/dieterv/elib.intl")
4332 (synopsis "Enhanced internationalization for Python")
4333 (description
4334 "The elib.intl module provides enhanced internationalization (I18N)
4335 services for your Python modules and applications.")
4336 (license license:lgpl3+)))
4337
4338 (define-public python-olefile
4339 (package
4340 (name "python-olefile")
4341 (version "0.45.1")
4342 (source
4343 (origin
4344 (method url-fetch)
4345 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4346 version ".tar.gz"))
4347 (file-name (string-append name "-" version ".tar.gz"))
4348 (sha256
4349 (base32
4350 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4351 (build-system python-build-system)
4352 (home-page
4353 "https://www.decalage.info/python/olefileio")
4354 (synopsis "Read and write Microsoft OLE2 files.")
4355 (description
4356 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4357 Storage or Compound Document, Microsoft Office). It is an improved version of
4358 the OleFileIO module from PIL, the Python Image Library.")
4359 (license license:bsd-3)))
4360
4361 (define-public python2-olefile
4362 (package-with-python2 python-olefile))
4363
4364 (define-public python-pillow
4365 (package
4366 (name "python-pillow")
4367 (version "6.1.0")
4368 (source
4369 (origin
4370 (method url-fetch)
4371 (uri (pypi-uri "Pillow" version))
4372 (sha256
4373 (base32
4374 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4375 (build-system python-build-system)
4376 (native-inputs
4377 `(("python-pytest" ,python-pytest)))
4378 (inputs
4379 `(("freetype" ,freetype)
4380 ("lcms" ,lcms)
4381 ("zlib" ,zlib)
4382 ("libjpeg" ,libjpeg)
4383 ("openjpeg" ,openjpeg)
4384 ("libtiff" ,libtiff)
4385 ("libwebp" ,libwebp)))
4386 (propagated-inputs
4387 `(("python-olefile" ,python-olefile)))
4388 (arguments
4389 `(#:phases
4390 (modify-phases %standard-phases
4391 (add-after 'unpack 'patch-ldconfig
4392 (lambda _
4393 (substitute* "setup.py"
4394 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4395 (delete 'check) ; We must run checks after python-pillow is installed.
4396 (add-after 'install 'check-installed
4397 (lambda* (#:key outputs inputs #:allow-other-keys)
4398 (begin
4399 (setenv "HOME" (getcwd))
4400 ;; Make installed package available for running the tests.
4401 (add-installed-pythonpath inputs outputs)
4402 (invoke "python" "selftest.py" "--installed")
4403 (invoke "python" "-m" "pytest" "-vv")))))))
4404 (home-page "https://python-pillow.org")
4405 (synopsis "Fork of the Python Imaging Library")
4406 (description
4407 "The Python Imaging Library adds image processing capabilities to your
4408 Python interpreter. This library provides extensive file format support, an
4409 efficient internal representation, and fairly powerful image processing
4410 capabilities. The core image library is designed for fast access to data
4411 stored in a few basic pixel formats. It should provide a solid foundation for
4412 a general image processing tool.")
4413 (license (license:x11-style
4414 "http://www.pythonware.com/products/pil/license.htm"
4415 "The PIL Software License"))))
4416
4417 (define-public python2-pillow
4418 (package-with-python2 python-pillow))
4419
4420 (define-public python-pycparser
4421 (package
4422 (name "python-pycparser")
4423 (version "2.19")
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (pypi-uri "pycparser" version))
4428 (sha256
4429 (base32
4430 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4431 (outputs '("out" "doc"))
4432 (build-system python-build-system)
4433 (native-inputs
4434 `(("pkg-config" ,pkg-config)))
4435 (arguments
4436 `(#:phases
4437 (modify-phases %standard-phases
4438 (replace 'check
4439 (lambda _
4440 (with-directory-excursion "tests"
4441 (invoke "python" "all_tests.py"))
4442 #t))
4443 (add-after 'install 'install-doc
4444 (lambda* (#:key outputs #:allow-other-keys)
4445 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4446 (doc (string-append data "/doc/" ,name "-" ,version))
4447 (examples (string-append doc "/examples")))
4448 (mkdir-p examples)
4449 (for-each (lambda (file)
4450 (copy-file (string-append "." file)
4451 (string-append doc file)))
4452 '("/README.rst" "/CHANGES" "/LICENSE"))
4453 (copy-recursively "examples" examples)
4454 #t))))))
4455 (home-page "https://github.com/eliben/pycparser")
4456 (synopsis "C parser in Python")
4457 (description
4458 "Pycparser is a complete parser of the C language, written in pure Python
4459 using the PLY parsing library. It parses C code into an AST and can serve as
4460 a front-end for C compilers or analysis tools.")
4461 (license license:bsd-3)))
4462
4463 (define-public python2-pycparser
4464 (package-with-python2 python-pycparser))
4465
4466 (define-public python-pywavelets
4467 (package
4468 (name "python-pywavelets")
4469 (version "1.0.1")
4470 (home-page "https://github.com/PyWavelets/pywt")
4471 (source (origin
4472 (method url-fetch)
4473 (uri (pypi-uri "PyWavelets" version))
4474 (sha256
4475 (base32
4476 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4477 (build-system python-build-system)
4478 (arguments
4479 '(#:modules ((ice-9 ftw)
4480 (srfi srfi-1)
4481 (srfi srfi-26)
4482 (guix build utils)
4483 (guix build python-build-system))
4484 #:phases (modify-phases %standard-phases
4485 (replace 'check
4486 (lambda _
4487 (let ((cwd (getcwd))
4488 (libdir (find (cut string-prefix? "lib." <>)
4489 (scandir "build"))))
4490 (with-directory-excursion (string-append cwd "/build/" libdir)
4491 (invoke "nosetests" "-v" "."))))))))
4492 (native-inputs
4493 `(("python-matplotlib" ,python-matplotlib) ;for tests
4494 ("python-nose" ,python-nose)))
4495 (propagated-inputs
4496 `(("python-numpy" ,python-numpy)))
4497 (synopsis "Wavelet transforms in Python")
4498 (description
4499 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4500 mathematical basis functions that are localized in both time and frequency.
4501 Wavelet transforms are time-frequency transforms employing wavelets. They are
4502 similar to Fourier transforms, the difference being that Fourier transforms are
4503 localized only in frequency instead of in time and frequency.")
4504 (license license:expat)))
4505
4506 (define-public python2-pywavelets
4507 (package-with-python2 python-pywavelets))
4508
4509 (define-public python-xcffib
4510 (package
4511 (name "python-xcffib")
4512 (version "0.6.0")
4513 (source
4514 (origin
4515 (method url-fetch)
4516 (uri (pypi-uri "xcffib" version))
4517 (sha256
4518 (base32
4519 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4520 (build-system python-build-system)
4521 (inputs
4522 `(("libxcb" ,libxcb)))
4523 (propagated-inputs
4524 `(("python-cffi" ,python-cffi) ; used at run time
4525 ("python-six" ,python-six)))
4526 (arguments
4527 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4528 #:tests? #f
4529 #:phases
4530 (modify-phases %standard-phases
4531 (add-after 'unpack 'fix-libxcb-path
4532 (lambda* (#:key inputs #:allow-other-keys)
4533 (let ((libxcb (assoc-ref inputs "libxcb")))
4534 (substitute* '("xcffib/__init__.py")
4535 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4536 #t)))
4537 (add-after 'install 'install-doc
4538 (lambda* (#:key outputs #:allow-other-keys)
4539 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4540 "/doc/" ,name "-" ,version)))
4541 (mkdir-p doc)
4542 (copy-file "README.md"
4543 (string-append doc "/README.md"))
4544 #t))))))
4545 (home-page "https://github.com/tych0/xcffib")
4546 (synopsis "XCB Python bindings")
4547 (description
4548 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4549 support for Python 3 and PyPy. It is based on cffi.")
4550 (license license:expat)))
4551
4552 (define-public python2-xcffib
4553 (package-with-python2 python-xcffib))
4554
4555 (define-public python-cairocffi
4556 (package
4557 (name "python-cairocffi")
4558 (version "0.9.0")
4559 (source
4560 (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "cairocffi" version))
4563 (sha256
4564 (base32
4565 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4566 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4567 (build-system python-build-system)
4568 (outputs '("out" "doc"))
4569 (inputs
4570 `(("glib" ,glib)
4571 ("gtk+" ,gtk+)
4572 ("gdk-pixbuf" ,gdk-pixbuf)
4573 ("cairo" ,cairo)
4574 ("pango" ,pango)))
4575 (native-inputs
4576 `(("pkg-config" ,pkg-config)
4577 ("python-pytest" ,python-pytest)
4578 ("python-pytest-cov" ,python-pytest-cov)
4579 ("python-pytest-runner" ,python-pytest-runner)
4580 ("python-sphinx" ,python-sphinx)
4581 ("python-docutils" ,python-docutils)))
4582 (propagated-inputs
4583 `(("python-xcffib" ,python-xcffib))) ; used at run time
4584 (arguments
4585 `(#:phases
4586 (modify-phases %standard-phases
4587 (add-after 'unpack 'patch-paths
4588 (lambda* (#:key inputs outputs #:allow-other-keys)
4589 (substitute* (find-files "." "\\.py$")
4590 (("dlopen\\(ffi, 'cairo'")
4591 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4592 "/lib/libcairo.so.2'"))
4593 (("dlopen\\(ffi, 'gdk-3'")
4594 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4595 "/lib/libgtk-3.so.0'"))
4596 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4597 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4598 "/lib/libgdk_pixbuf-2.0.so.0'"))
4599 (("dlopen\\(ffi, 'glib-2.0'")
4600 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4601 "/lib/libglib-2.0.so.0'"))
4602 (("dlopen\\(ffi, 'gobject-2.0'")
4603 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4604 "/lib/libgobject-2.0.so.0'"))
4605 (("dlopen\\(ffi, 'pangocairo-1.0'")
4606 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4607 "/lib/libpangocairo-1.0.so.0'"))
4608 (("dlopen\\(ffi, 'pango-1.0'")
4609 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4610 "/lib/libpango-1.0.so.0'")))
4611 #t))
4612 (add-after 'install 'install-doc
4613 (lambda* (#:key inputs outputs #:allow-other-keys)
4614 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4615 (doc (string-append data "/doc/" ,name "-" ,version))
4616 (html (string-append doc "/html")))
4617 (setenv "LD_LIBRARY_PATH"
4618 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4619 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4620 (setenv "LANG" "en_US.UTF-8")
4621 (mkdir-p html)
4622 (for-each (lambda (file)
4623 (copy-file (string-append "." file)
4624 (string-append doc file)))
4625 '("/README.rst" "/CHANGES" "/LICENSE"))
4626 (system* "python" "setup.py" "build_sphinx")
4627 (copy-recursively "docs/_build/html" html)
4628 #t))))))
4629 (home-page "https://github.com/Kozea/cairocffi")
4630 (synopsis "Python bindings and object-oriented API for Cairo")
4631 (description
4632 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4633 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4634 graphics library with support for multiple backends including image buffers,
4635 PNG, PostScript, PDF, and SVG file output.")
4636 (license license:bsd-3)))
4637
4638 (define-public python2-cairocffi
4639 (package-with-python2 python-cairocffi))
4640
4641 (define-public python-decorator
4642 (package
4643 (name "python-decorator")
4644 (version "4.3.0")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (pypi-uri "decorator" version))
4649 (sha256
4650 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4651 (build-system python-build-system)
4652 (home-page "https://pypi.python.org/pypi/decorator/")
4653 (synopsis "Python module to simplify usage of decorators")
4654 (description
4655 "The aim of the decorator module is to simplify the usage of decorators
4656 for the average programmer, and to popularize decorators usage giving examples
4657 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4658 etc. The core of this module is a decorator factory.")
4659 (license license:expat)))
4660
4661 (define-public python2-decorator
4662 (package-with-python2 python-decorator))
4663
4664 (define-public python-drmaa
4665 (package
4666 (name "python-drmaa")
4667 (version "0.7.7")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (pypi-uri "drmaa" version))
4672 (sha256
4673 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4674 (build-system python-build-system)
4675 ;; The test suite requires libdrmaa which is provided by the cluster
4676 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4677 ;; should be set to the path of the libdrmaa library.
4678 (arguments '(#:tests? #f))
4679 (native-inputs
4680 `(("python-nose" ,python-nose)))
4681 (home-page "https://pypi.python.org/pypi/drmaa")
4682 (synopsis "Python bindings for the DRMAA library")
4683 (description
4684 "A Python package for Distributed Resource Management (DRM) job
4685 submission and control. This package is an implementation of the DRMAA 1.0
4686 Python language binding specification.")
4687 (license license:bsd-3)))
4688
4689 (define-public python2-drmaa
4690 (package-with-python2 python-drmaa))
4691
4692 (define-public python-grako
4693 (package
4694 (name "python-grako")
4695 (version "3.99.9")
4696 (source
4697 (origin
4698 (method url-fetch)
4699 (uri
4700 (pypi-uri "grako" version ".zip"))
4701 (sha256
4702 (base32
4703 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4704 (build-system python-build-system)
4705 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4706 (native-inputs
4707 `(("unzip" ,unzip)
4708 ("python-pytest" ,python-pytest)
4709 ("python-pytest-runner" ,python-pytest-runner)))
4710 (home-page "https://bitbucket.org/neogeny/grako")
4711 (synopsis "EBNF parser generator")
4712 (description
4713 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4714 memoizing PEG/Packrat parser in Python.")
4715 (license license:bsd-3)))
4716
4717 (define-public python2-grako
4718 (package-with-python2 python-grako))
4719
4720 (define-public python-gridmap
4721 (package
4722 (name "python-gridmap")
4723 (version "0.13.0")
4724 (source
4725 (origin
4726 (method git-fetch)
4727 (uri (git-reference
4728 (url "https://github.com/pygridtools/gridmap.git")
4729 (commit (string-append "v" version))))
4730 (file-name (git-file-name name version))
4731 (sha256
4732 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4733 (build-system python-build-system)
4734 (arguments
4735 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4736 (propagated-inputs
4737 `(("python-psutil" ,python-psutil)
4738 ("python-drmaa" ,python-drmaa)
4739 ("python-pyzmq" ,python-pyzmq)))
4740 (home-page "https://github.com/pygridtools/gridmap")
4741 (synopsis "Create jobs on a cluster directly from Python")
4742 (description
4743 "Gridmap is a Python package to allow you to easily create jobs on the
4744 cluster directly from Python. You can directly map Python functions onto the
4745 cluster without needing to write any wrapper code yourself.")
4746 (license license:gpl3+)))
4747
4748 (define-public python2-gridmap
4749 (package-with-python2 python-gridmap))
4750
4751 (define-public python-honcho
4752 (package
4753 (name "python-honcho")
4754 (version "1.0.1")
4755 (source
4756 (origin
4757 (method git-fetch)
4758 (uri (git-reference
4759 (url "https://github.com/nickstenning/honcho.git")
4760 (commit (string-append "v" version))))
4761 (file-name (git-file-name name version))
4762 (sha256
4763 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4764 (build-system python-build-system)
4765 (native-inputs
4766 `(("python-pytest" ,python-pytest)
4767 ("python-mock" ,python-mock)
4768 ("python-tox" ,python-tox)
4769 ("which" ,which))) ;for tests
4770 (propagated-inputs
4771 `(("python-jinja2" ,python-jinja2)))
4772 (arguments
4773 `(#:phases
4774 (modify-phases %standard-phases
4775 (delete 'check)
4776 (add-after 'install 'check
4777 (lambda* (#:key outputs inputs #:allow-other-keys)
4778 ;; fix honcho path in testsuite
4779 (substitute* "tests/conftest.py"
4780 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4781 "/bin/honcho" "'")))
4782 ;; It's easier to run tests after install.
4783 ;; Make installed package available for running the tests
4784 (add-installed-pythonpath inputs outputs)
4785 (invoke "py.test" "-v"))))))
4786 (home-page "https://github.com/nickstenning/honcho")
4787 (synopsis "Manage Procfile-based applications")
4788 (description
4789 "A Procfile is a file which describes how to run an application
4790 consisting of several processes. honcho starts all listed processes.
4791 The output of all running processes is collected by honcho and
4792 displayed.")
4793 (license license:expat)))
4794
4795 (define-public python2-honcho
4796 (package-with-python2 python-honcho))
4797
4798 (define-public python-pexpect
4799 (package
4800 (name "python-pexpect")
4801 (version "4.6.0")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (pypi-uri "pexpect" version))
4806 (sha256
4807 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4808 (build-system python-build-system)
4809 (arguments
4810 `(#:phases
4811 (modify-phases %standard-phases
4812 (add-before 'check 'prepare-tests
4813 (lambda _
4814 (substitute* (find-files "tests")
4815 (("/bin/ls") (which "ls"))
4816 (("/bin/echo") (which "echo"))
4817 (("/bin/which") (which "which"))
4818 ;; Many tests try to use the /bin directory which
4819 ;; is not present in the build environment.
4820 ;; Use one that's non-empty and unlikely to change.
4821 (("/bin'") "/dev'"))
4822 ;; XXX: Socket connection test gets "Connection reset by peer".
4823 ;; Why does it not work? Delete for now.
4824 (delete-file "tests/test_socket.py")
4825 #t))
4826 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4827 (native-inputs
4828 `(("python-nose" ,python-nose)
4829 ("python-pytest" ,python-pytest)
4830 ("man-db" ,man-db)
4831 ("which" ,which)
4832 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4833 (propagated-inputs
4834 `(("python-ptyprocess" ,python-ptyprocess)))
4835 (home-page "http://pexpect.readthedocs.org/")
4836 (synopsis "Controlling interactive console applications")
4837 (description
4838 "Pexpect is a pure Python module for spawning child applications;
4839 controlling them; and responding to expected patterns in their output.
4840 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4841 child application and control it as if a human were typing commands.")
4842 (license license:isc)))
4843
4844 (define-public python2-pexpect
4845 (package-with-python2 python-pexpect))
4846
4847 (define-public python-setuptools-scm
4848 (package
4849 (name "python-setuptools-scm")
4850 (version "3.2.0")
4851 (source (origin
4852 (method url-fetch)
4853 (uri (pypi-uri "setuptools_scm" version))
4854 (sha256
4855 (base32
4856 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4857 (build-system python-build-system)
4858 (home-page "https://github.com/pypa/setuptools_scm/")
4859 (synopsis "Manage Python package versions in SCM metadata")
4860 (description
4861 "Setuptools_scm handles managing your Python package versions in
4862 @dfn{software configuration management} (SCM) metadata instead of declaring
4863 them as the version argument or in a SCM managed file.")
4864 (license license:expat)))
4865
4866 (define-public python2-setuptools-scm
4867 (package-with-python2 python-setuptools-scm))
4868
4869 (define-public python-pathlib2
4870 (package
4871 (name "python-pathlib2")
4872 (version "2.3.3")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (pypi-uri "pathlib2" version))
4877 (sha256
4878 (base32
4879 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4880 (build-system python-build-system)
4881 (propagated-inputs
4882 `(("python-scandir" ,python-scandir)
4883 ("python-six" ,python-six)))
4884 (home-page "https://pypi.python.org/pypi/pathlib2/")
4885 (synopsis "Object-oriented filesystem paths")
4886 (description "The goal of pathlib2 is to provide a backport of the
4887 standard @code{pathlib} module which tracks the standard library module, so
4888 all the newest features of the standard @code{pathlib} can be used also on
4889 older Python versions.")
4890 (license license:expat)))
4891
4892 (define-public python-importlib-metadata
4893 (package
4894 (name "python-importlib-metadata")
4895 (version "0.18")
4896 (source
4897 (origin
4898 (method url-fetch)
4899 (uri (pypi-uri "importlib_metadata" version))
4900 (sha256
4901 (base32
4902 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4903 (build-system python-build-system)
4904 (propagated-inputs
4905 `(("python-configparser" ,python-configparser)
4906 ("python-contextlib2" ,python-contextlib2)
4907 ("python-docutils" ,python-docutils)
4908 ("python-pathlib2" ,python-pathlib2)
4909 ("python-rst.linker" ,python-rst.linker)
4910 ("python-zipp" ,python-zipp)))
4911 (native-inputs
4912 `(("python-setuptools-scm" ,python-setuptools-scm)
4913 ("python-sphinx" ,python-sphinx)))
4914 (home-page "https://importlib-metadata.readthedocs.io/")
4915 (synopsis "Read metadata from Python packages")
4916 (description
4917 "@code{importlib_metadata} is a library which provides an API for
4918 accessing an installed Python package's metadata, such as its entry points or
4919 its top-level name. This functionality intends to replace most uses of
4920 @code{pkg_resources} entry point API and metadata API. Along with
4921 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4922 need to use the older and less efficient @code{pkg_resources} package.")
4923 (license license:asl2.0)))
4924
4925 (define-public python-jaraco-packaging
4926 (package
4927 (name "python-jaraco-packaging")
4928 (version "6.1")
4929 (source
4930 (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "jaraco.packaging" version))
4933 (sha256
4934 (base32
4935 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4936 (build-system python-build-system)
4937 (propagated-inputs
4938 `(("python-pytest" ,python-pytest)
4939 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4940 ("python-pytest-flake8" ,python-pytest-flake8)
4941 ("python-rst.linker" ,python-rst.linker)
4942 ("python-setuptools" ,python-setuptools)
4943 ("python-setuptools-scm" ,python-setuptools-scm)
4944 ("python-six" ,python-six)
4945 ("python-sphinx" ,python-sphinx)))
4946 (home-page "https://github.com/jaraco/jaraco.packaging")
4947 (synopsis "Tools to supplement packaging Python releases")
4948 (description
4949 "This package provides various tools to supplement packaging Python
4950 releases.")
4951 (license license:expat)))
4952
4953 (define-public python-pathpy
4954 (package
4955 (name "python-pathpy")
4956 (version "11.5.0")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (pypi-uri "path.py" version))
4961 (sha256
4962 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4963 (outputs '("out" "doc"))
4964 (build-system python-build-system)
4965 (propagated-inputs
4966 `(("python-appdirs" ,python-appdirs)))
4967 (native-inputs
4968 `(("python-setuptools-scm" ,python-setuptools-scm)
4969 ("python-sphinx" ,python-sphinx)
4970 ("python-rst.linker" ,python-rst.linker)
4971 ("python-pytest" ,python-pytest)
4972 ("python-pytest-runner" ,python-pytest-runner)
4973 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4974 (arguments
4975 `(#:phases
4976 (modify-phases %standard-phases
4977 (add-after 'build 'build-doc
4978 (lambda _
4979 (setenv "LANG" "en_US.UTF-8")
4980 (invoke "python" "setup.py" "build_sphinx")))
4981 (add-after 'install 'install-doc
4982 (lambda* (#:key outputs #:allow-other-keys)
4983 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4984 (doc (string-append data "/doc/" ,name "-" ,version))
4985 (html (string-append doc "/html")))
4986 (mkdir-p html)
4987 (for-each (lambda (file)
4988 (copy-file file (string-append doc "/" file)))
4989 '("README.rst" "CHANGES.rst"))
4990 (copy-recursively "build/sphinx/html" html)
4991 #t)))
4992 (replace 'check
4993 (lambda _
4994 ;; The import time test aborts if an import takes longer than
4995 ;; 100ms. It may very well take a little longer than that.
4996 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
4997 (home-page "https://github.com/jaraco/path.py")
4998 (synopsis "Python module wrapper for built-in os.path")
4999 (description
5000 "@code{path.py} implements path objects as first-class entities, allowing
5001 common operations on files to be invoked on those path objects directly.")
5002 (license license:expat)))
5003
5004 (define-public python2-pathpy
5005 (package-with-python2 python-pathpy))
5006
5007 (define-public python-simplegeneric
5008 (package
5009 (name "python-simplegeneric")
5010 (version "0.8.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "simplegeneric" version ".zip"))
5015 (sha256
5016 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5017 (build-system python-build-system)
5018 (native-inputs
5019 `(("unzip" ,unzip)))
5020 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5021 (synopsis "Python module for simple generic functions")
5022 (description
5023 "The simplegeneric module lets you define simple single-dispatch generic
5024 functions, akin to Python’s built-in generic functions like @code{len()},
5025 @code{iter()} and so on. However, instead of using specially-named methods,
5026 these generic functions use simple lookup tables, akin to those used by
5027 e.g. @code{pickle.dump()} and other generic functions found in the Python
5028 standard library.")
5029 (license license:zpl2.1)))
5030
5031 (define-public python2-simplegeneric
5032 (package-with-python2 python-simplegeneric))
5033
5034 (define-public python-ipython-genutils
5035 ;; TODO: This package is retired, check if can be removed, see description.
5036 (package
5037 (name "python-ipython-genutils")
5038 (version "0.1.0")
5039 (source
5040 (origin
5041 (method url-fetch)
5042 (uri (pypi-uri "ipython_genutils" version))
5043 (sha256
5044 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5045 (build-system python-build-system)
5046 (arguments `(#:tests? #f)) ; no tests
5047 (home-page "https://ipython.org")
5048 (synopsis "Vestigial utilities from IPython")
5049 (description
5050 "This package provides retired utilities from IPython. No packages
5051 outside IPython/Jupyter should depend on it.
5052
5053 This package shouldn't exist. It contains some common utilities shared by
5054 Jupyter and IPython projects during The Big Split. As soon as possible, those
5055 packages will remove their dependency on this, and this package will go
5056 away.")
5057 (license license:bsd-3)))
5058
5059 (define-public python2-ipython-genutils
5060 (package-with-python2 python-ipython-genutils))
5061
5062 (define-public python-traitlets
5063 (package
5064 (name "python-traitlets")
5065 (version "4.3.2")
5066 (source
5067 (origin
5068 (method url-fetch)
5069 (uri (pypi-uri "traitlets" version))
5070 (sha256
5071 (base32
5072 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5073 (build-system python-build-system)
5074 (arguments
5075 `(#:phases
5076 (modify-phases %standard-phases
5077 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5078 (propagated-inputs
5079 `(("python-ipython-genutils" ,python-ipython-genutils)
5080 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5081 (native-inputs
5082 `(("python-pytest" ,python-pytest)))
5083 (properties `((python2-variant . ,(delay python2-traitlets))))
5084 (home-page "https://ipython.org")
5085 (synopsis "Configuration system for Python applications")
5086 (description
5087 "Traitlets is a framework that lets Python classes have attributes with
5088 type checking, dynamically calculated default values, and ‘on change’
5089 callbacks. The package also includes a mechanism to use traitlets for
5090 configuration, loading values from files or from command line arguments. This
5091 is a distinct layer on top of traitlets, so you can use traitlets in your code
5092 without using the configuration machinery.")
5093 (license license:bsd-3)))
5094
5095 (define-public python2-traitlets
5096 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5097 (package
5098 (inherit traitlets)
5099 (propagated-inputs
5100 `(("python2-enum34" ,python2-enum34)
5101 ,@(package-propagated-inputs traitlets))))))
5102
5103 (define-public python-jupyter-core
5104 (package
5105 (name "python-jupyter-core")
5106 (version "4.4.0")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (string-append (pypi-uri "jupyter_core" version)))
5111 (sha256
5112 (base32
5113 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5114 (build-system python-build-system)
5115 ;; FIXME: not sure how to run the tests
5116 (arguments `(#:tests? #f))
5117 (propagated-inputs
5118 `(("python-traitlets" ,python-traitlets)))
5119 (home-page "http://jupyter.org/")
5120 (synopsis "Jupyter base package")
5121 (description
5122 "Jupyter core is the base package on which Jupyter projects rely.")
5123 (license license:bsd-3)))
5124
5125 (define-public python2-jupyter-core
5126 (package-with-python2 python-jupyter-core))
5127
5128 (define-public python-jupyter-client
5129 (package
5130 (name "python-jupyter-client")
5131 (version "5.2.4")
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (pypi-uri "jupyter_client" version))
5136 (sha256
5137 (base32
5138 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5139 (build-system python-build-system)
5140 ;; Tests fail because of missing native python kernel which I assume is
5141 ;; provided by the ipython package, which we cannot use because it would
5142 ;; cause a dependency cycle.
5143 (arguments `(#:tests? #f))
5144 (propagated-inputs
5145 `(("python-pyzmq" ,python-pyzmq)
5146 ("python-traitlets" ,python-traitlets)
5147 ("python-jupyter-core" ,python-jupyter-core)))
5148 (home-page "http://jupyter.org/")
5149 (synopsis "Jupyter protocol implementation and client libraries")
5150 (description
5151 "The @code{jupyter_client} package contains the reference implementation
5152 of the Jupyter protocol. It also provides client and kernel management APIs
5153 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5154 installing @code{kernelspec}s for use with Jupyter frontends.")
5155 (license license:bsd-3)))
5156
5157 (define-public python2-jupyter-client
5158 (package-with-python2 python-jupyter-client))
5159
5160 (define-public python-ipykernel
5161 (package
5162 (name "python-ipykernel")
5163 (version "5.1.1")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "ipykernel" version))
5168 (sha256
5169 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5170 (build-system python-build-system)
5171 (arguments
5172 `(#:phases
5173 (modify-phases %standard-phases
5174 (replace 'check
5175 (lambda _
5176 (setenv "HOME" "/tmp")
5177 (invoke "pytest" "-v")
5178 #t)))))
5179 (propagated-inputs
5180 `(("python-ipython" ,python-ipython)
5181 ;; imported at runtime during connect
5182 ("python-jupyter-client" ,python-jupyter-client)))
5183 (native-inputs
5184 `(("python-pytest" ,python-pytest)
5185 ("python-nose" ,python-nose)))
5186 (home-page "https://ipython.org")
5187 (synopsis "IPython Kernel for Jupyter")
5188 (description
5189 "This package provides the IPython kernel for Jupyter.")
5190 (license license:bsd-3)))
5191
5192 ;; Version 5.1.1 and above no longer support Python 2.
5193 (define-public python2-ipykernel
5194 (package
5195 (name "python2-ipykernel")
5196 (version "5.1.0")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (pypi-uri "ipykernel" version))
5201 (sha256
5202 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5203 (build-system python-build-system)
5204 (arguments
5205 `(#:python ,python-2
5206 #:phases
5207 (modify-phases %standard-phases
5208 (replace 'check
5209 (lambda _
5210 (setenv "HOME" "/tmp")
5211 (invoke "pytest" "-v")
5212 #t)))))
5213 (propagated-inputs
5214 `(("python2-ipython" ,python2-ipython)
5215 ;; imported at runtime during connect
5216 ("python2-jupyter-client" ,python2-jupyter-client)))
5217 (native-inputs
5218 `(("python2-pytest" ,python2-pytest)
5219 ("python2-nose" ,python2-nose)))
5220 (home-page "https://ipython.org")
5221 (synopsis "IPython Kernel for Jupyter")
5222 (description
5223 "This package provides the IPython kernel for Jupyter.")
5224 (license license:bsd-3)))
5225
5226 (define-public python-pari-jupyter
5227 (package
5228 (name "python-pari-jupyter")
5229 (version "1.3.2")
5230 (source
5231 (origin
5232 (method url-fetch)
5233 (uri (pypi-uri "pari_jupyter" version))
5234 (sha256
5235 (base32
5236 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5237 (build-system python-build-system)
5238 (propagated-inputs
5239 `(("python-ipykernel" ,python-ipykernel)))
5240 (inputs
5241 `(("pari-gp" ,pari-gp)
5242 ("readline" ,readline)))
5243 (arguments
5244 `(#:tests? #f)) ; no test suite
5245 (home-page
5246 "https://github.com/jdemeyer/pari_jupyter")
5247 (synopsis "A Jupyter kernel for PARI/GP")
5248 (description "The package provides a PARI/GP kernel for Jupyter.")
5249 (license license:gpl3+)))
5250
5251 (define-public python-backcall
5252 (package
5253 (name "python-backcall")
5254 (version "0.1.0")
5255 (source
5256 (origin
5257 (method url-fetch)
5258 (uri (pypi-uri "backcall" version))
5259 (sha256
5260 (base32
5261 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5262 (build-system python-build-system)
5263 (home-page "https://github.com/takluyver/backcall/")
5264 (synopsis "Specifications for callback functions passed in to an API")
5265 (description
5266 "If your code lets other people supply callback functions, it's important
5267 to specify the function signature you expect, and check that functions support
5268 that. Adding extra parameters later would break other peoples code unless
5269 you're careful. The @code{backcall} package provides a way of specifying the
5270 callback signature using a prototype function.")
5271 (license license:bsd-3)))
5272
5273 ;; This is the latest release of the LTS version of ipython with support for
5274 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5275 ;; dropped support for Python 2.7.
5276 (define-public python2-ipython
5277 (package
5278 (name "python2-ipython")
5279 (version "5.8.0")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (pypi-uri "ipython" version ".tar.gz"))
5284 (sha256
5285 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5286 (build-system python-build-system)
5287 (propagated-inputs
5288 `(("python2-backports-shutil-get-terminal-size"
5289 ,python2-backports-shutil-get-terminal-size)
5290 ("python2-pathlib2" ,python2-pathlib2)
5291 ("python2-pyzmq" ,python2-pyzmq)
5292 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5293 ("python2-terminado" ,python2-terminado)
5294 ("python2-matplotlib" ,python2-matplotlib)
5295 ("python2-numpy" ,python2-numpy)
5296 ("python2-numpydoc" ,python2-numpydoc)
5297 ("python2-jinja2" ,python2-jinja2)
5298 ("python2-mistune" ,python2-mistune)
5299 ("python2-pexpect" ,python2-pexpect)
5300 ("python2-pickleshare" ,python2-pickleshare)
5301 ("python2-simplegeneric" ,python2-simplegeneric)
5302 ("python2-jsonschema" ,python2-jsonschema)
5303 ("python2-traitlets" ,python2-traitlets)
5304 ("python2-nbformat" ,python2-nbformat)
5305 ("python2-pygments" ,python2-pygments)))
5306 (inputs
5307 `(("readline" ,readline)
5308 ("which" ,which)))
5309 (native-inputs
5310 `(("graphviz" ,graphviz)
5311 ("pkg-config" ,pkg-config)
5312 ("python2-requests" ,python2-requests) ;; for tests
5313 ("python2-testpath" ,python2-testpath)
5314 ("python2-mock" ,python2-mock)
5315 ("python2-nose" ,python2-nose)))
5316 (arguments
5317 `(#:python ,python-2
5318 #:phases
5319 (modify-phases %standard-phases
5320 (add-before 'check 'delete-broken-tests
5321 (lambda* (#:key inputs #:allow-other-keys)
5322 ;; These tests throw errors for unknown reasons.
5323 (delete-file "IPython/core/tests/test_profile.py")
5324 (delete-file "IPython/core/tests/test_interactiveshell.py")
5325 (delete-file "IPython/core/tests/test_magic.py")
5326 #t)))))
5327 (home-page "https://ipython.org")
5328 (synopsis "IPython is a tool for interactive computing in Python")
5329 (description
5330 "IPython provides a rich architecture for interactive computing with:
5331 Powerful interactive shells, a browser-based notebook, support for interactive
5332 data visualization, embeddable interpreters and tools for parallel
5333 computing.")
5334 (license license:bsd-3)))
5335
5336 (define-public python-ipython
5337 (package
5338 (name "python-ipython")
5339 (version "7.5.0")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "ipython" version ".tar.gz"))
5344 (sha256
5345 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5346 (build-system python-build-system)
5347 (propagated-inputs
5348 `(("python-backcall" ,python-backcall)
5349 ("python-pyzmq" ,python-pyzmq)
5350 ("python-prompt-toolkit" ,python-prompt-toolkit)
5351 ("python-terminado" ,python-terminado)
5352 ("python-matplotlib" ,python-matplotlib)
5353 ("python-numpy" ,python-numpy)
5354 ("python-numpydoc" ,python-numpydoc)
5355 ("python-jedi" ,python-jedi)
5356 ("python-jinja2" ,python-jinja2)
5357 ("python-mistune" ,python-mistune)
5358 ("python-pexpect" ,python-pexpect)
5359 ("python-pickleshare" ,python-pickleshare)
5360 ("python-simplegeneric" ,python-simplegeneric)
5361 ("python-jsonschema" ,python-jsonschema)
5362 ("python-traitlets" ,python-traitlets)
5363 ("python-nbformat" ,python-nbformat)
5364 ("python-pygments" ,python-pygments)))
5365 (inputs
5366 `(("readline" ,readline)
5367 ("which" ,which)))
5368 (native-inputs
5369 `(("graphviz" ,graphviz)
5370 ("pkg-config" ,pkg-config)
5371 ("python-requests" ,python-requests) ;; for tests
5372 ("python-testpath" ,python-testpath)
5373 ("python-nose" ,python-nose)))
5374 (arguments
5375 `(#:phases
5376 (modify-phases %standard-phases
5377 ;; Tests can only be run after the library has been installed and not
5378 ;; within the source directory.
5379 (delete 'check)
5380 (add-after 'install 'check
5381 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5382 (if tests?
5383 (begin
5384 ;; Make installed package available for running the tests
5385 (add-installed-pythonpath inputs outputs)
5386 (setenv "HOME" "/tmp/") ;; required by a test
5387 ;; We only test the core because one of the other tests
5388 ;; tries to import ipykernel.
5389 (invoke "python" "IPython/testing/iptest.py"
5390 "-v" "IPython/core/tests"))
5391 #t)))
5392 (add-before 'check 'fix-tests
5393 (lambda* (#:key inputs #:allow-other-keys)
5394 (substitute* "./IPython/utils/_process_posix.py"
5395 (("/usr/bin/env', 'which") (which "which")))
5396 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5397 (("#!/usr/bin/env python")
5398 (string-append "#!" (which "python"))))
5399 ;; This test introduces a circular dependency on ipykernel
5400 ;; (which depends on ipython).
5401 (delete-file "IPython/core/tests/test_display.py")
5402 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5403 (delete-file "IPython/core/tests/test_interactiveshell.py")
5404 #t)))))
5405 (home-page "https://ipython.org")
5406 (synopsis "IPython is a tool for interactive computing in Python")
5407 (description
5408 "IPython provides a rich architecture for interactive computing with:
5409 Powerful interactive shells, a browser-based notebook, support for interactive
5410 data visualization, embeddable interpreters and tools for parallel
5411 computing.")
5412 (license license:bsd-3)))
5413
5414 (define-public python-ipython-documentation
5415 (package
5416 (inherit python-ipython)
5417 (name "python-ipython-documentation")
5418 (version (package-version python-ipython))
5419 (arguments
5420 `(#:phases
5421 (modify-phases %standard-phases
5422 (delete 'build)
5423 (delete 'check)
5424 (replace 'install
5425 (lambda* (#:key outputs #:allow-other-keys)
5426 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5427 (doc (string-append data "/doc/" ,name "-" ,version))
5428 (html (string-append doc "/html"))
5429 (man1 (string-append data "/man/man1"))
5430 (info (string-append data "/info"))
5431 (examples (string-append doc "/examples"))
5432 (python-arg (string-append "PYTHON=" (which "python"))))
5433 (setenv "LANG" "en_US.utf8")
5434 (with-directory-excursion "docs"
5435 ;; FIXME: pdf fails to build
5436 ;;(system* "make" "pdf" "PAPER=a4")
5437 (system* "make" python-arg "html")
5438 ;; FIXME: the generated texi file contains ^@^@, which trips
5439 ;; up the parser.
5440 ;; (system* "make" python-arg "info")
5441 )
5442 (copy-recursively "docs/man" man1)
5443 (copy-recursively "examples" examples)
5444 (copy-recursively "docs/build/html" html)
5445 ;; (copy-file "docs/build/latex/ipython.pdf"
5446 ;; (string-append doc "/ipython.pdf"))
5447 (mkdir-p info)
5448 ;; (copy-file "docs/build/texinfo/ipython.info"
5449 ;; (string-append info "/ipython.info"))
5450 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5451 #t)))))
5452 (inputs
5453 `(("python-ipython" ,python-ipython)
5454 ("python-ipykernel" ,python-ipykernel)))
5455 (native-inputs
5456 `(("python-sphinx" ,python-sphinx)
5457 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5458 ;; FIXME: It's possible that a smaller union would work just as well.
5459 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5460 texlive-fonts-ec
5461 texlive-generic-ifxetex
5462 texlive-generic-pdftex
5463 texlive-latex-amsfonts
5464 texlive-latex-capt-of
5465 texlive-latex-cmap
5466 texlive-latex-environ
5467 texlive-latex-eqparbox
5468 texlive-latex-etoolbox
5469 texlive-latex-expdlist
5470 texlive-latex-fancyhdr
5471 texlive-latex-fancyvrb
5472 texlive-latex-fncychap
5473 texlive-latex-float
5474 texlive-latex-framed
5475 texlive-latex-geometry
5476 texlive-latex-graphics
5477 texlive-latex-hyperref
5478 texlive-latex-mdwtools
5479 texlive-latex-multirow
5480 texlive-latex-needspace
5481 texlive-latex-oberdiek
5482 texlive-latex-parskip
5483 texlive-latex-preview
5484 texlive-latex-tabulary
5485 texlive-latex-threeparttable
5486 texlive-latex-titlesec
5487 texlive-latex-trimspaces
5488 texlive-latex-ucs
5489 texlive-latex-upquote
5490 texlive-latex-url
5491 texlive-latex-varwidth
5492 texlive-latex-wrapfig)))
5493 ("texinfo" ,texinfo)))))
5494
5495 (define-public python-urwid
5496 (package
5497 (name "python-urwid")
5498 (version "2.0.1")
5499 (source
5500 (origin
5501 (method url-fetch)
5502 (uri (pypi-uri "urwid" version))
5503 (sha256
5504 (base32
5505 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5506 (build-system python-build-system)
5507 (home-page "http://urwid.org")
5508 (synopsis "Console user interface library for Python")
5509 (description
5510 "Urwid is a curses-based UI/widget library for Python. It includes many
5511 features useful for text console applications.")
5512 (license license:lgpl2.1+)))
5513
5514 (define-public python2-urwid
5515 (package-with-python2 python-urwid))
5516
5517 (define-public python-urwidtrees
5518 (package
5519 (name "python-urwidtrees")
5520 (version "1.0.2")
5521 (source
5522 (origin
5523 (method url-fetch)
5524 ;; package author intends on distributing via github rather than pypi:
5525 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5526 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5527 version ".tar.gz"))
5528 (file-name (string-append name "-" version ".tar.gz"))
5529 (sha256
5530 (base32
5531 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5532 (build-system python-build-system)
5533 (arguments
5534 '(#:tests? #f)) ; no tests
5535 (propagated-inputs `(("python-urwid" ,python-urwid)))
5536 (home-page "https://github.com/pazz/urwidtrees")
5537 (synopsis "Tree widgets for urwid")
5538 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5539 toolkit. Use it to build trees of widgets.")
5540 (license license:gpl3+)))
5541
5542 (define-public python2-urwidtrees
5543 (package-with-python2 python-urwidtrees))
5544
5545 (define-public python-ua-parser
5546 (package
5547 (name "python-ua-parser")
5548 (version "0.8.0")
5549 (source
5550 (origin
5551 (method url-fetch)
5552 (uri (pypi-uri "ua-parser" version))
5553 (sha256
5554 (base32
5555 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5556 (build-system python-build-system)
5557 (arguments
5558 `(#:tests? #f)) ;no test suite in release
5559 (native-inputs
5560 `(("python-pyyaml" ,python-pyyaml)))
5561 (home-page "https://github.com/ua-parser/uap-python")
5562 (synopsis "User agent parser")
5563 (description
5564 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5565 (license license:asl2.0)))
5566
5567 (define-public python2-ua-parser
5568 (package-with-python2 python-ua-parser))
5569
5570 (define-public python-user-agents
5571 (package
5572 (name "python-user-agents")
5573 (version "1.1.0")
5574 (source
5575 (origin
5576 (method url-fetch)
5577 (uri (pypi-uri "user-agents" version))
5578 (sha256
5579 (base32
5580 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5581 (build-system python-build-system)
5582 (arguments
5583 `(#:tests? #f)) ;missing devices.json test file in release
5584 (propagated-inputs
5585 `(("python-ua-parser" ,python-ua-parser)))
5586 (home-page "https://github.com/selwin/python-user-agents")
5587 (synopsis "User Agent strings parsing library")
5588 (description
5589 "A library to identify devices (phones, tablets) and their capabilities by
5590 parsing (browser/HTTP) user agent strings.")
5591 (license license:expat)))
5592
5593 (define-public python2-user-agents
5594 (package-with-python2 python-user-agents))
5595
5596 (define-public python-dbus
5597 (package
5598 (name "python-dbus")
5599 (version "1.2.8")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5604 "dbus-python-" version ".tar.gz"))
5605 (sha256
5606 (base32
5607 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5608 (build-system gnu-build-system)
5609 (arguments
5610 '(#:phases
5611 (modify-phases %standard-phases
5612 (add-before
5613 'check 'pre-check
5614 (lambda _
5615 ;; XXX: For the missing '/etc/machine-id'.
5616 (substitute* "test/run-test.sh"
5617 (("DBUS_FATAL_WARNINGS=1")
5618 "DBUS_FATAL_WARNINGS=0"))
5619 #t)))))
5620 (native-inputs
5621 `(("pkg-config" ,pkg-config)))
5622 (inputs
5623 `(("python" ,python-wrapper)
5624 ("dbus-glib" ,dbus-glib)))
5625 (synopsis "Python bindings for D-bus")
5626 (description "python-dbus provides bindings for libdbus, the reference
5627 implementation of D-Bus.")
5628 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5629 (license license:expat)))
5630
5631 (define-public python2-dbus
5632 (package (inherit python-dbus)
5633 (name "python2-dbus")
5634 (inputs `(("python" ,python-2)
5635 ,@(alist-delete "python"
5636 (package-inputs python-dbus)
5637 equal?)))
5638 ;; FIXME: on Python 2, the test_utf8 fails with:
5639 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5640 (arguments `(#:tests? #f))))
5641
5642 (define-public python-lxml
5643 (package
5644 (name "python-lxml")
5645 (version "4.2.5")
5646 (source
5647 (origin
5648 (method url-fetch)
5649 (uri (pypi-uri "lxml" version))
5650 (sha256
5651 (base32
5652 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5653 (build-system python-build-system)
5654 (inputs
5655 `(("libxml2" ,libxml2)
5656 ("libxslt" ,libxslt)))
5657 (home-page "http://lxml.de/")
5658 (synopsis
5659 "Python XML processing library")
5660 (description
5661 "The lxml XML toolkit is a Pythonic binding for the C libraries
5662 libxml2 and libxslt.")
5663 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5664
5665 (define-public python2-lxml
5666 (package-with-python2 python-lxml))
5667
5668 ;; beautifulsoup4 has a totally different namespace than 3.x,
5669 ;; and pypi seems to put it under its own name, so I guess we should too
5670 (define-public python-beautifulsoup4
5671 (package
5672 (name "python-beautifulsoup4")
5673 (version "4.7.1")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "beautifulsoup4" version))
5678 (sha256
5679 (base32
5680 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5681 (build-system python-build-system)
5682 (arguments
5683 `(#:phases
5684 (modify-phases %standard-phases
5685 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5686 ;; must use this conversion script when building with Python 3. The
5687 ;; conversion script also runs the tests.
5688 ;; For more information, see the file 'convert-py3k' in the source
5689 ;; distribution.
5690 (replace 'check
5691 (lambda _ (invoke "./convert-py3k"))))))
5692 (propagated-inputs
5693 `(("python-soupsieve" ,python-soupsieve)))
5694 (home-page
5695 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5696 (synopsis
5697 "Python screen-scraping library")
5698 (description
5699 "Beautiful Soup is a Python library designed for rapidly setting up
5700 screen-scraping projects. It offers Pythonic idioms for navigating,
5701 searching, and modifying a parse tree, providing a toolkit for
5702 dissecting a document and extracting what you need. It automatically
5703 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5704 (license license:expat)
5705 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5706
5707 (define-public python2-beautifulsoup4
5708 (package
5709 (inherit (package-with-python2
5710 (strip-python2-variant python-beautifulsoup4)))
5711 (arguments `(#:python ,python-2))))
5712
5713 (define-public python-soupsieve
5714 (package
5715 (name "python-soupsieve")
5716 (version "1.9.1")
5717 (source
5718 (origin
5719 (method url-fetch)
5720 (uri (pypi-uri "soupsieve" version))
5721 (sha256
5722 (base32
5723 "1jnzkiwmjl6yvqckc9mf689g87b6yz07sv868hap2aa5arggy3mj"))))
5724 (build-system python-build-system)
5725 (arguments `(#:tests? #f))
5726 ;;XXX: 2 tests fail currently despite claming they were to be
5727 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5728 ;;don't want to create a circular dependency.
5729 (home-page "https://github.com/facelessuser/soupsieve")
5730 (synopsis "CSS selector library")
5731 (description
5732 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5733 Soup 4. It aims to provide selecting, matching, and filtering using modern
5734 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5735 specifications up through the latest CSS level 4 drafts and beyond (though
5736 some are not yet implemented).")
5737 (properties `((python2-variant . ,(delay python2-soupsieve))))
5738 (license license:expat)))
5739
5740 (define-public python2-soupsieve
5741 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5742 (package
5743 (inherit base)
5744 (propagated-inputs
5745 `(("python2-backports-functools-lru-cache"
5746 ,python2-backports-functools-lru-cache)
5747 ,@(package-propagated-inputs base))))))
5748
5749 (define-public python-netifaces
5750 (package
5751 (name "python-netifaces")
5752 (version "0.10.7")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "netifaces" version))
5757 (sha256
5758 (base32
5759 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5760 (build-system python-build-system)
5761 (home-page "https://github.com/al45tair/netifaces")
5762 (synopsis
5763 "Python module for portable network interface information")
5764 (description
5765 "Netifaces is a Python module providing information on network
5766 interfaces in an easy and portable manner.")
5767 (license license:expat)))
5768
5769 (define-public python2-netifaces
5770 (package-with-python2 python-netifaces))
5771
5772 (define-public python-networkx
5773 (package
5774 (name "python-networkx")
5775 (version "2.2")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "networkx" version ".zip"))
5780 (sha256
5781 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5782 (build-system python-build-system)
5783 ;; python-decorator is needed at runtime.
5784 (propagated-inputs
5785 `(("python-decorator" ,python-decorator)))
5786 (native-inputs
5787 `(("python-nose" ,python-nose)
5788 ("unzip" ,unzip)))
5789 (home-page "https://networkx.github.io/")
5790 (synopsis "Python module for creating and manipulating graphs and networks")
5791 (description
5792 "NetworkX is a Python package for the creation, manipulation, and study
5793 of the structure, dynamics, and functions of complex networks.")
5794 (license license:bsd-3)))
5795
5796 (define-public python2-networkx
5797 (package-with-python2 python-networkx))
5798
5799 (define-public python-datrie
5800 (package
5801 (name "python-datrie")
5802 (version "0.7.1")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (pypi-uri "datrie" version))
5807 (sha256
5808 (base32
5809 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5810 (build-system python-build-system)
5811 (arguments
5812 `(#:phases (modify-phases %standard-phases
5813 (add-before 'build 'cythonize
5814 (lambda _
5815 ;; Regenerate Cython classes to solve ABI issues with Python
5816 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5817 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5818 "src/stdio_ext.pxd" "-a"))))))
5819 (native-inputs
5820 `(("python-cython" ,python-cython)
5821 ("python-hypothesis" ,python-hypothesis)
5822 ("python-pytest" ,python-pytest)
5823 ("python-pytest-runner" ,python-pytest-runner)))
5824 (home-page "https://github.com/kmike/datrie")
5825 (synopsis "Fast, efficiently stored trie for Python")
5826 (description
5827 "This package provides a fast, efficiently stored trie implementation for
5828 Python.")
5829 (license license:lgpl2.1+)))
5830
5831 (define-public snakemake
5832 (package
5833 (name "snakemake")
5834 (version "5.2.4")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "snakemake" version))
5839 (sha256
5840 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5841 (build-system python-build-system)
5842 (arguments
5843 ;; TODO: Package missing test dependencies.
5844 '(#:tests? #f
5845 #:phases
5846 (modify-phases %standard-phases
5847 ;; For cluster execution Snakemake will call Python. Since there is
5848 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5849 ;; this by calling the snakemake wrapper instead.
5850 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5851 (lambda* (#:key outputs #:allow-other-keys)
5852 (substitute* "snakemake/executors.py"
5853 (("\\{sys.executable\\} -m snakemake")
5854 (string-append (assoc-ref outputs "out")
5855 "/bin/snakemake")))
5856 #t)))))
5857 (propagated-inputs
5858 `(("python-gitpython" ,python-gitpython)
5859 ("python-wrapt" ,python-wrapt)
5860 ("python-requests" ,python-requests)
5861 ("python-appdirs" ,python-appdirs)
5862 ("python-configargparse" ,python-configargparse)
5863 ("python-datrie" ,python-datrie)
5864 ("python-docutils" ,python-docutils)
5865 ("python-jinja2" ,python-jinja2)
5866 ("python-jsonschema" ,python-jsonschema)
5867 ("python-networkx" ,python-networkx)
5868 ("python-pyyaml" ,python-pyyaml)
5869 ("python-ratelimiter" ,python-ratelimiter)))
5870 (home-page "https://snakemake.readthedocs.io")
5871 (synopsis "Python-based execution environment for make-like workflows")
5872 (description
5873 "Snakemake aims to reduce the complexity of creating workflows by
5874 providing a clean and modern domain specific specification language (DSL) in
5875 Python style, together with a fast and comfortable execution environment.")
5876 (license license:expat)))
5877
5878 ;; This is currently needed for the pigx-* packages.
5879 (define-public snakemake-4
5880 (package (inherit snakemake)
5881 (version "4.4.0")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (pypi-uri "snakemake" version))
5886 (sha256
5887 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5888 (propagated-inputs
5889 `(("python-wrapt" ,python-wrapt)
5890 ("python-requests" ,python-requests)
5891 ("python-appdirs" ,python-appdirs)
5892 ("python-configargparse" ,python-configargparse)
5893 ("python-pyyaml" ,python-pyyaml)
5894 ("python-ratelimiter" ,python-ratelimiter)))))
5895
5896 (define-public python-pyqrcode
5897 (package
5898 (name "python-pyqrcode")
5899 (version "1.2.1")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri "PyQRCode" version))
5904 (sha256
5905 (base32
5906 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5907 (build-system python-build-system)
5908 (home-page
5909 "https://github.com/mnooner256/pyqrcode")
5910 (synopsis "QR code generator")
5911 (description
5912 "Pyqrcode is a QR code generator written purely in Python with
5913 SVG, EPS, PNG and terminal output.")
5914 (license license:bsd-3)))
5915
5916 (define-public python-seaborn
5917 (package
5918 (name "python-seaborn")
5919 (version "0.9.0")
5920 (source
5921 (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "seaborn" version))
5924 (sha256
5925 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5926 (build-system python-build-system)
5927 (arguments
5928 `(#:phases
5929 (modify-phases %standard-phases
5930 (add-before 'check 'start-xserver
5931 (lambda* (#:key inputs #:allow-other-keys)
5932 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5933 ;; There must be a running X server and make check doesn't
5934 ;; start one. Therefore we must do it.
5935 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5936 (setenv "DISPLAY" ":1")
5937 #t)))
5938 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5939 (propagated-inputs
5940 `(("python-pandas" ,python-pandas)
5941 ("python-matplotlib" ,python-matplotlib)
5942 ("python-numpy" ,python-numpy)
5943 ("python-scipy" ,python-scipy)))
5944 (native-inputs
5945 `(("python-pytest" ,python-pytest)
5946 ("xorg-server" ,xorg-server)))
5947 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5948 (synopsis "Statistical data visualization")
5949 (description
5950 "Seaborn is a library for making attractive and informative statistical
5951 graphics in Python. It is built on top of matplotlib and tightly integrated
5952 with the PyData stack, including support for numpy and pandas data structures
5953 and statistical routines from scipy and statsmodels.")
5954 (license license:bsd-3)))
5955
5956 (define-public python2-seaborn
5957 (package-with-python2 python-seaborn))
5958
5959 (define-public python-mpmath
5960 (package
5961 (name "python-mpmath")
5962 (version "0.19")
5963 (source (origin
5964 (method url-fetch)
5965 (uri (string-append "http://mpmath.org/files/mpmath-"
5966 version ".tar.gz"))
5967 (sha256
5968 (base32
5969 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5970 (build-system python-build-system)
5971 (arguments
5972 '(#:phases
5973 (modify-phases %standard-phases
5974 (replace 'check
5975 (lambda _
5976 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
5977 (home-page "http://mpmath.org")
5978 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5979 (description
5980 "@code{mpmath} can be used as an arbitrary-precision substitute for
5981 Python's float/complex types and math/cmath modules, but also does much
5982 more advanced mathematics.")
5983 (license license:bsd-3)))
5984
5985 (define-public python2-mpmath
5986 (package-with-python2 python-mpmath))
5987
5988 (define-public python-bigfloat
5989 (package
5990 (name "python-bigfloat")
5991 (version "0.3.0")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "bigfloat" version))
5996 (sha256
5997 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5998 (build-system python-build-system)
5999 (inputs
6000 `(("mpfr" ,mpfr)))
6001 (home-page "https://github.com/mdickinson/bigfloat")
6002 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6003 (description
6004 "This package provides a Python interface to the MPFR library for
6005 multiprecision arithmetic.")
6006 (license license:lgpl3+)))
6007
6008 (define-public python2-bigfloat
6009 (package-with-python2 python-bigfloat))
6010
6011 (define-public python-sympy
6012 (package
6013 (name "python-sympy")
6014 (version "1.1.1")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (string-append
6019 "https://github.com/sympy/sympy/releases/download/sympy-"
6020 version "/sympy-" version ".tar.gz"))
6021 (sha256
6022 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6023 (build-system python-build-system)
6024 (arguments
6025 `(#:phases
6026 (modify-phases %standard-phases
6027 ;; Run the core tests after installation. By default it would run
6028 ;; *all* tests, which take a very long time to complete and are known
6029 ;; to be flaky.
6030 (delete 'check)
6031 (add-after 'install 'check
6032 (lambda* (#:key outputs #:allow-other-keys)
6033 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6034 #t)))))
6035 (propagated-inputs
6036 `(("python-mpmath" ,python-mpmath)))
6037 (home-page "http://www.sympy.org/")
6038 (synopsis "Python library for symbolic mathematics")
6039 (description
6040 "SymPy is a Python library for symbolic mathematics. It aims to become a
6041 full-featured computer algebra system (CAS) while keeping the code as simple
6042 as possible in order to be comprehensible and easily extensible.")
6043 (license license:bsd-3)))
6044
6045 (define-public python2-sympy
6046 (package
6047 (inherit (package-with-python2 python-sympy))
6048 (arguments
6049 `(#:phases
6050 (modify-phases %standard-phases
6051 ;; Run the core tests after installation. By default it would run
6052 ;; *all* tests, which take a very long time to complete and are known
6053 ;; to be flaky.
6054 (delete 'check)
6055 (add-after 'install 'check
6056 (lambda* (#:key outputs #:allow-other-keys)
6057 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6058 #t)))))))
6059
6060 (define-public python-q
6061 (package
6062 (name "python-q")
6063 (version "2.6")
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (pypi-uri "q" version))
6068 (sha256
6069 (base32
6070 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6071 (build-system python-build-system)
6072 (home-page "https://github.com/zestyping/q")
6073 (synopsis "Quick-and-dirty debugging output for tired programmers")
6074 (description
6075 "q is a Python module for \"print\" style of debugging Python code. It
6076 provides convenient short API for print out of values, tracebacks, and
6077 falling into the Python interpreter.")
6078 (license license:asl2.0)))
6079
6080 (define-public python2-q
6081 (package-with-python2 python-q))
6082
6083 (define-public python2-xlib
6084 (package
6085 (name "python2-xlib")
6086 (version "0.14")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6090 "/" version "/"
6091 "python-xlib-" version ".tar.gz"))
6092 (sha256
6093 (base32
6094 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6095 (build-system python-build-system)
6096 (arguments
6097 `(#:python ,python-2 ;Python 2 only
6098 #:tests? #f)) ;no tests
6099 (home-page "http://python-xlib.sourceforge.net/")
6100 (synopsis "Python X11 client library")
6101 (description
6102 "The Python X Library is intended to be a fully functional X client
6103 library for Python programs. It is useful to implement low-level X clients.
6104 It is written entirely in Python.")
6105 (license license:gpl2+)))
6106
6107 (define-public python-singledispatch
6108 (package
6109 (name "python-singledispatch")
6110 (version "3.4.0.3")
6111 (source
6112 (origin
6113 (method url-fetch)
6114 (uri (pypi-uri "singledispatch" version))
6115 (sha256
6116 (base32
6117 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6118 (build-system python-build-system)
6119 (native-inputs
6120 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6121 (home-page
6122 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6123 (synopsis "Backport of singledispatch feature from Python 3.4")
6124 (description
6125 "This library brings functools.singledispatch from Python 3.4 to Python
6126 2.6-3.3.")
6127 (license license:expat)))
6128
6129 (define-public python2-singledispatch
6130 (package-with-python2 python-singledispatch))
6131
6132 ;; the python- version can be removed with python-3.5
6133 (define-public python-backports-abc
6134 (package
6135 (name "python-backports-abc")
6136 (version "0.5")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "backports_abc" version))
6141 (sha256
6142 (base32
6143 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6144 (build-system python-build-system)
6145 (home-page "https://github.com/cython/backports_abc")
6146 (synopsis "Backport of additions to the 'collections.abc' module")
6147 (description
6148 "Python-backports-abc provides a backport of additions to the
6149 @code{collections.abc} module in Python-3.5.")
6150 (license license:psfl)))
6151
6152 (define-public python2-backports-abc
6153 (package-with-python2 python-backports-abc))
6154
6155 (define-public python-backports-csv
6156 (package
6157 (name "python-backports-csv")
6158 (version "1.0.5")
6159 (source
6160 (origin
6161 (method url-fetch)
6162 (uri (pypi-uri "backports.csv" version))
6163 (sha256
6164 (base32
6165 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6166 (build-system python-build-system)
6167 (home-page "https://github.com/ryanhiebert/backports.csv")
6168 (synopsis "Backport of Python 3's csv module for Python 2")
6169 (description
6170 "Provides a backport of Python 3's @code{csv} module for parsing
6171 comma separated values. The API of the @code{csv} module in Python 2
6172 is drastically different from the @code{csv} module in Python 3.
6173 This is due, for the most part, to the difference between str in
6174 Python 2 and Python 3.")
6175 (license license:psfl)))
6176
6177 (define-public python2-backports-csv
6178 (package-with-python2 python-backports-csv))
6179
6180 (define-public python2-backports-shutil-get-terminal-size
6181 (package
6182 (name "python2-backports-shutil-get-terminal-size")
6183 (version "1.0.0")
6184 (source
6185 (origin
6186 (method url-fetch)
6187 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6188 (sha256
6189 (base32
6190 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6191 (build-system python-build-system)
6192 (arguments
6193 `(#:python ,python-2
6194 #:phases
6195 (modify-phases %standard-phases
6196 (replace 'check
6197 (lambda _
6198 (invoke "py.test" "-v"))))))
6199 (native-inputs
6200 `(("python2-pytest" ,python2-pytest)))
6201 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6202 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6203 (description
6204 "This package provides a backport of the @code{get_terminal_size
6205 function} from Python 3.3's @code{shutil}.
6206 Unlike the original version it is written in pure Python rather than C,
6207 so it might be a tiny bit slower.")
6208 (license license:expat)))
6209
6210 (define-public python-waf
6211 (package
6212 (name "python-waf")
6213 (version "2.0.11")
6214 (source (origin
6215 (method url-fetch)
6216 (uri (string-append "https://waf.io/"
6217 "waf-" version ".tar.bz2"))
6218 (sha256
6219 (base32
6220 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6221 (build-system python-build-system)
6222 (arguments
6223 '(#:phases
6224 (modify-phases %standard-phases
6225 (replace 'build
6226 (lambda _
6227 (invoke "python" "waf-light" "configure" "build")))
6228 (replace 'check
6229 (lambda _
6230 (invoke "python" "waf" "--version")))
6231 (replace 'install
6232 (lambda* (#:key outputs #:allow-other-keys)
6233 (let ((out (assoc-ref outputs "out")))
6234 (install-file "waf" (string-append out "/bin")))
6235 #t))
6236 ;; waf breaks when it is wrapped.
6237 (delete 'wrap))))
6238 (home-page "https://waf.io/")
6239 (synopsis "Python-based build system")
6240 (description
6241 "Waf is a Python-based framework for configuring, compiling and installing
6242 applications.")
6243 (license license:bsd-3)))
6244
6245 (define-public python2-waf
6246 (package-with-python2 python-waf))
6247
6248 (define-public python-pyzmq
6249 (package
6250 (name "python-pyzmq")
6251 (version "17.1.2")
6252 (source
6253 (origin
6254 (method url-fetch)
6255 (uri (pypi-uri "pyzmq" version))
6256 (sha256
6257 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6258 (build-system python-build-system)
6259 (arguments
6260 `(#:configure-flags
6261 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6262 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6263 ;; --inplace' for 'python setup.py test' to work.
6264 #:tests? #f))
6265 (inputs
6266 `(("zeromq" ,zeromq)))
6267 (native-inputs
6268 `(("pkg-config" ,pkg-config)
6269 ("python-nose" ,python-nose)))
6270 (home-page "https://github.com/zeromq/pyzmq")
6271 (synopsis "Python bindings for 0MQ")
6272 (description
6273 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6274 (license license:bsd-4)))
6275
6276 (define-public python2-pyzmq
6277 (package-with-python2 python-pyzmq))
6278
6279 (define-public python-pep8
6280 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6281 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6282 ;; some dependents' test suites, and nothing more.
6283 (package
6284 (name "python-pep8")
6285 (version "1.7.0")
6286 (source
6287 (origin
6288 (method url-fetch)
6289 (uri (pypi-uri "pep8" version))
6290 (sha256
6291 (base32
6292 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6293 (build-system python-build-system)
6294 (home-page "https://pep8.readthedocs.org/")
6295 (synopsis "Python style guide checker")
6296 (description
6297 "This tools checks Python code against some of the style conventions in
6298 PEP 8.")
6299 (license license:expat)))
6300
6301 (define-public python2-pep8
6302 (package-with-python2 python-pep8))
6303
6304 (define-public python-pyflakes
6305 (package
6306 (name "python-pyflakes")
6307 (version "2.1.1")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "pyflakes" version))
6312 (sha256
6313 (base32
6314 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6315 (build-system python-build-system)
6316 (home-page
6317 "https://github.com/pyflakes/pyflakes")
6318 (synopsis "Passive checker of Python programs")
6319 (description
6320 "Pyflakes statically checks Python source code for common errors.")
6321 (license license:expat)))
6322
6323 (define-public python2-pyflakes
6324 (package-with-python2 python-pyflakes))
6325
6326 (define-public python-mccabe
6327 (package
6328 (name "python-mccabe")
6329 (version "0.6.1")
6330 (source
6331 (origin
6332 (method url-fetch)
6333 (uri (pypi-uri "mccabe" version))
6334 (sha256
6335 (base32
6336 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6337 (build-system python-build-system)
6338 (native-inputs
6339 `(("python-pytest" ,python-pytest-bootstrap)
6340 ("python-pytest-runner" ,python-pytest-runner)))
6341 (home-page "https://github.com/flintwork/mccabe")
6342 (synopsis "McCabe checker, plugin for flake8")
6343 (description
6344 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6345 complexity of Python source code.")
6346 (license license:expat)))
6347
6348 (define-public python2-mccabe
6349 (package-with-python2 python-mccabe))
6350
6351 (define-public python-mccabe-0.2.1
6352 (package (inherit python-mccabe)
6353 (version "0.2.1")
6354 (source
6355 (origin
6356 (method url-fetch)
6357 (uri (pypi-uri "mccabe" version))
6358 (sha256
6359 (base32
6360 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6361
6362 (define-public python2-mccabe-0.2.1
6363 (package-with-python2 python-mccabe-0.2.1))
6364
6365 ;; Flake8 2.4.1 requires an older version of pep8.
6366 ;; This should be removed ASAP.
6367 (define-public python-pep8-1.5.7
6368 (package (inherit python-pep8)
6369 (version "1.5.7")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "pep8" version))
6374 (sha256
6375 (base32
6376 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6377 (arguments
6378 ;; XXX Tests not compatible with Python 3.5.
6379 '(#:tests? #f))))
6380
6381 (define-public python2-pep8-1.5.7
6382 (package-with-python2 python-pep8-1.5.7))
6383
6384 ;; Flake8 2.4.1 requires an older version of pyflakes.
6385 ;; This should be removed ASAP.
6386 (define-public python-pyflakes-0.8.1
6387 (package (inherit python-pyflakes)
6388 (version "0.8.1")
6389 (source
6390 (origin
6391 (method url-fetch)
6392 (uri (pypi-uri "pyflakes" version))
6393 (sha256
6394 (base32
6395 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6396 (arguments
6397 ;; XXX Tests not compatible with Python 3.5.
6398 '(#:tests? #f))))
6399
6400 (define-public python2-pyflakes-0.8.1
6401 (package-with-python2 python-pyflakes-0.8.1))
6402
6403 (define-public python-flake8
6404 (package
6405 (name "python-flake8")
6406 (version "3.7.7")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "flake8" version))
6410 (sha256
6411 (base32
6412 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6413 (build-system python-build-system)
6414 (arguments
6415 `(#:phases
6416 (modify-phases %standard-phases
6417 (delete 'check)
6418 (add-after 'install 'check
6419 (lambda* (#:key inputs outputs #:allow-other-keys)
6420 (add-installed-pythonpath inputs outputs)
6421 (invoke "pytest" "-v")
6422 #t)))))
6423 (propagated-inputs
6424 `(("python-pycodestyle" ,python-pycodestyle)
6425 ("python-entrypoints" ,python-entrypoints)
6426 ("python-pyflakes" ,python-pyflakes)
6427 ("python-mccabe" ,python-mccabe)))
6428 (native-inputs
6429 `(("python-mock" ,python-mock)
6430 ("python-pytest" ,python-pytest-bootstrap)
6431 ("python-pytest-runner" ,python-pytest-runner)))
6432 (home-page "https://gitlab.com/pycqa/flake8")
6433 (synopsis
6434 "The modular source code checker: pep8, pyflakes and co")
6435 (description
6436 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6437 (properties `((python2-variant . ,(delay python2-flake8))))
6438 (license license:expat)))
6439
6440 (define-public python2-flake8
6441 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6442 (package (inherit base)
6443 (propagated-inputs
6444 `(("python2-configparser" ,python2-configparser)
6445 ("python2-enum34" ,python2-enum34)
6446 ("python2-typing" ,python2-typing)
6447 ,@(package-propagated-inputs base))))))
6448
6449 ;; python-hacking requires flake8 <2.6.0.
6450 (define-public python-flake8-2.5
6451 (package
6452 (inherit python-flake8)
6453 (version "2.5.5")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "flake8" version))
6457 (sha256
6458 (base32
6459 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6460 (propagated-inputs
6461 `(("python-pep8" ,python-pep8)
6462 ,@(package-propagated-inputs python-flake8)))
6463 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6464
6465 (define-public python2-flake8-2.5
6466 (package
6467 (inherit python2-flake8)
6468 (version (package-version python-flake8-2.5))
6469 (source (origin
6470 (inherit (package-source python-flake8-2.5))))
6471 (propagated-inputs
6472 `(("python2-pep8" ,python2-pep8)
6473 ,@(package-propagated-inputs python2-flake8)))))
6474
6475 (define-public python-flake8-polyfill
6476 (package
6477 (name "python-flake8-polyfill")
6478 (version "1.0.2")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "flake8-polyfill" version))
6483 (sha256
6484 (base32
6485 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6486 (build-system python-build-system)
6487 (arguments
6488 '(#:phases
6489 (modify-phases %standard-phases
6490 (replace 'check
6491 (lambda _
6492 (setenv "PYTHONPATH"
6493 (string-append (getcwd) "/build/lib:"
6494 (getenv "PYTHONPATH")))
6495 (invoke "py.test" "-v"))))))
6496 (native-inputs
6497 `(("python-flake8" ,python-flake8)
6498 ("python-mock" ,python-mock)
6499 ("python-pep8" ,python-pep8)
6500 ("python-pycodestyle" ,python-pycodestyle)
6501 ("python-pytest" ,python-pytest)))
6502 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6503 (synopsis "Polyfill package for Flake8 plugins")
6504 (description
6505 "This package that provides some compatibility helpers for Flake8
6506 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6507 (license license:expat)))
6508
6509 (define-public python2-flake8-polyfill
6510 (package-with-python2 python-flake8-polyfill))
6511
6512 (define-public python-mistune
6513 (package
6514 (name "python-mistune")
6515 (version "0.8.4")
6516 (source
6517 (origin
6518 (method url-fetch)
6519 (uri (pypi-uri "mistune" version))
6520 (sha256
6521 (base32
6522 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6523 (build-system python-build-system)
6524 (native-inputs
6525 `(("python-nose" ,python-nose)
6526 ("python-cython" ,python-cython)))
6527 (home-page "https://github.com/lepture/mistune")
6528 (synopsis "Markdown parser in pure Python")
6529 (description "This package provides a fast markdown parser in pure
6530 Python.")
6531 (license license:bsd-3)))
6532
6533 (define-public python2-mistune
6534 (package-with-python2 python-mistune))
6535
6536 (define-public python-markdown
6537 (package
6538 (name "python-markdown")
6539 (version "3.1.1")
6540 (source
6541 (origin
6542 (method url-fetch)
6543 (uri (pypi-uri "Markdown" version))
6544 (sha256
6545 (base32
6546 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6547 (build-system python-build-system)
6548 (native-inputs
6549 `(("python-nose" ,python-nose)
6550 ("python-pyyaml" ,python-pyyaml)))
6551 (home-page "https://python-markdown.github.io/")
6552 (synopsis "Python implementation of Markdown")
6553 (description
6554 "This package provides a Python implementation of John Gruber's
6555 Markdown. The library features international input, various Markdown
6556 extensions, and several HTML output formats. A command line wrapper
6557 markdown_py is also provided to convert Markdown files to HTML.")
6558 (license license:bsd-3)))
6559
6560 (define-public python2-markdown
6561 (package-with-python2 python-markdown))
6562
6563 (define-public python-ptyprocess
6564 (package
6565 (name "python-ptyprocess")
6566 (version "0.5.2")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 (uri (pypi-uri "ptyprocess" version))
6571 (sha256
6572 (base32
6573 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6574 (build-system python-build-system)
6575 (native-inputs
6576 `(("python-nose" ,python-nose)))
6577 (arguments
6578 `(#:phases
6579 (modify-phases %standard-phases
6580 (replace 'check
6581 (lambda _ (invoke "nosetests"))))))
6582 (home-page "https://github.com/pexpect/ptyprocess")
6583 (synopsis "Run a subprocess in a pseudo terminal")
6584 (description
6585 "This package provides a Python library used to launch a subprocess in a
6586 pseudo terminal (pty), and interact with both the process and its pty.")
6587 (license license:isc)))
6588
6589 (define-public python2-ptyprocess
6590 (package-with-python2 python-ptyprocess))
6591
6592 (define-public python-cram
6593 (package
6594 (name "python-cram")
6595 (version "0.7")
6596 (home-page "https://bitheap.org/cram/")
6597 (source (origin
6598 (method url-fetch)
6599 (uri (list (string-append home-page "cram-"
6600 version ".tar.gz")
6601 (pypi-uri "cram" version)))
6602 (sha256
6603 (base32
6604 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6605 (arguments
6606 '(#:phases
6607 (modify-phases %standard-phases
6608 (add-after 'unpack 'patch-source
6609 (lambda _
6610 (substitute* (find-files "cram" ".*\\.py$")
6611 ;; Replace default shell path.
6612 (("/bin/sh") (which "sh")))
6613 (substitute* (find-files "tests" ".*\\.t$")
6614 (("md5") "md5sum")
6615 (("/bin/bash") (which "bash"))
6616 (("/bin/sh") (which "sh")))
6617 (substitute* "cram/_test.py"
6618 ;; This hack works around a bug triggered by substituting
6619 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6620 ;; "cram -h", which breaks the output at 80 characters. This
6621 ;; causes the line showing the default shell to break into two
6622 ;; lines, but the test expects a single line...
6623 (("env\\['COLUMNS'\\] = '80'")
6624 "env['COLUMNS'] = '160'"))
6625
6626 (substitute* "Makefile"
6627 ;; Recent versions of python-coverage have caused the test
6628 ;; coverage to decrease (as of version 0.7). Allow that.
6629 (("--fail-under=100")
6630 "--fail-under=90"))
6631
6632 #t))
6633 (replace 'check
6634 ;; The test phase uses the built library and executable.
6635 (lambda* (#:key inputs outputs #:allow-other-keys)
6636 (add-installed-pythonpath inputs outputs)
6637 (setenv "PATH" (string-append (getenv "PATH") ":"
6638 (assoc-ref outputs "out") "/bin"))
6639 (invoke "make" "test"))))))
6640 (build-system python-build-system)
6641 (native-inputs
6642 `(("python-coverage" ,python-coverage)
6643 ("which" ,which)))
6644 (synopsis "Simple testing framework for command line applications")
6645 (description
6646 "Cram is a functional testing framework for command line applications.
6647 Cram tests look like snippets of interactive shell sessions. Cram runs each
6648 command and compares the command output in the test with the command’s actual
6649 output.")
6650 (license license:gpl2+)))
6651
6652 (define-public python2-cram
6653 (package-with-python2 python-cram))
6654
6655 (define-public python-straight-plugin
6656 (package
6657 (name "python-straight-plugin")
6658 (version "1.4.1")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (pypi-uri "straight.plugin" version))
6663 (sha256
6664 (base32
6665 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6666 (build-system python-build-system)
6667 (home-page "https://github.com/ironfroggy/straight.plugin")
6668 (synopsis "Simple namespaced plugin facility")
6669 (description "Straight Plugin provides a type of plugin you can create from
6670 almost any existing Python modules, and an easy way for outside developers to
6671 add functionality and customization to your projects with their own plugins.")
6672 (license license:expat)))
6673
6674 (define-public python2-straight-plugin
6675 (package-with-python2 python-straight-plugin))
6676
6677 (define-public python-fonttools
6678 (package
6679 (name "python-fonttools")
6680 (version "3.38.0")
6681 (source (origin
6682 (method url-fetch)
6683 (uri (pypi-uri "fonttools" version ".zip"))
6684 (sha256
6685 (base32
6686 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6687 (build-system python-build-system)
6688 (native-inputs
6689 `(("unzip" ,unzip)
6690 ("python-pytest" ,python-pytest)
6691 ("python-pytest-runner" ,python-pytest-runner)))
6692 (home-page "https://github.com/behdad/fonttools")
6693 (synopsis "Tools to manipulate font files")
6694 (description
6695 "FontTools/TTX is a library to manipulate font files from Python. It
6696 supports reading and writing of TrueType/OpenType fonts, reading and writing
6697 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6698 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6699 from an XML-based format.")
6700 (license license:expat)))
6701
6702 (define-public python2-fonttools
6703 (package-with-python2 python-fonttools))
6704
6705 (define-public python-ly
6706 (package
6707 (name "python-ly")
6708 (version "0.9.5")
6709 (source
6710 (origin
6711 (method url-fetch)
6712 (uri (pypi-uri name version))
6713 (sha256
6714 (base32
6715 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6716 (build-system python-build-system)
6717 (arguments
6718 ;; FIXME: Some tests need network access.
6719 '(#:tests? #f))
6720 (synopsis "Tool and library for manipulating LilyPond files")
6721 (description "This package provides a Python library to parse, manipulate
6722 or create documents in LilyPond format. A command line program ly is also
6723 provided that can be used to do various manipulations with LilyPond files.")
6724 (home-page "https://pypi.python.org/pypi/python-ly")
6725 (license license:gpl2+)))
6726
6727 (define-public python-appdirs
6728 (package
6729 (name "python-appdirs")
6730 (version "1.4.3")
6731 (source
6732 (origin
6733 (method url-fetch)
6734 (uri (pypi-uri "appdirs" version))
6735 (sha256
6736 (base32
6737 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6738 (build-system python-build-system)
6739 (home-page "https://github.com/ActiveState/appdirs")
6740 (synopsis
6741 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6742 (description
6743 "This module provides a portable way of finding out where user data
6744 should be stored on various operating systems.")
6745 (license license:expat)))
6746
6747 (define-public python2-appdirs
6748 (package-with-python2 python-appdirs))
6749
6750 (define-public python-llfuse
6751 (package
6752 (name "python-llfuse")
6753 (version "1.3.5")
6754 (source (origin
6755 (method url-fetch)
6756 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6757 (sha256
6758 (base32
6759 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6760 (build-system python-build-system)
6761 (inputs
6762 `(("fuse" ,fuse)
6763 ("attr" ,attr)))
6764 (native-inputs
6765 `(("pkg-config" ,pkg-config)))
6766 (synopsis "Python bindings for FUSE")
6767 (description
6768 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6769 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6770 (license license:lgpl2.0+)
6771 (properties `((python2-variant . ,(delay python2-llfuse))))))
6772
6773 (define-public python2-llfuse
6774 (package (inherit (package-with-python2
6775 (strip-python2-variant python-llfuse)))
6776 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6777
6778 ;; For attic-0.16
6779 (define-public python-llfuse-0.41
6780 (package (inherit python-llfuse)
6781 (version "0.41.1")
6782 (source (origin
6783 (method url-fetch)
6784 (uri (string-append
6785 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6786 "llfuse-" version ".tar.bz2"))
6787 (sha256
6788 (base32
6789 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6790 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6791 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6792 (license (list license:expat license:lgpl2.0+))))
6793
6794 (define-public python-msgpack
6795 (package
6796 (name "python-msgpack")
6797 (version "0.5.6")
6798 (source (origin
6799 (method url-fetch)
6800 (uri (pypi-uri "msgpack" version))
6801 (sha256
6802 (base32
6803 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6804 (build-system python-build-system)
6805 (arguments
6806 `(#:modules ((guix build utils)
6807 (guix build python-build-system)
6808 (ice-9 ftw)
6809 (srfi srfi-1)
6810 (srfi srfi-26))
6811 #:phases
6812 (modify-phases %standard-phases
6813 (replace 'check
6814 (lambda _
6815 (let ((cwd (getcwd)))
6816 (setenv "PYTHONPATH"
6817 (string-append cwd "/build/"
6818 (find (cut string-prefix? "lib" <>)
6819 (scandir (string-append cwd "/build")))
6820 ":"
6821 (getenv "PYTHONPATH")))
6822 (invoke "pytest" "-v" "test")))))))
6823 (native-inputs
6824 `(("python-pytest" ,python-pytest)))
6825 (synopsis "MessagePack (de)serializer")
6826 (description "MessagePack is a fast, compact binary serialization format,
6827 suitable for similar data to JSON. This package provides CPython bindings for
6828 reading and writing MessagePack data.")
6829 (home-page "https://pypi.python.org/pypi/msgpack/")
6830 (license license:asl2.0)))
6831
6832 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6833 ;; release 0.5. Some packages like borg still call it by the old name for now.
6834 ;; <https://bugs.gnu.org/30662>
6835 (define-public python-msgpack-transitional
6836 (package
6837 (inherit python-msgpack)
6838 (name "python-msgpack-transitional")
6839 (arguments
6840 (substitute-keyword-arguments (package-arguments python-msgpack)
6841 ((#:phases phases)
6842 `(modify-phases ,phases
6843 (add-after 'unpack 'configure-transitional
6844 (lambda _
6845 ;; Keep using the old name.
6846 (substitute* "setup.py"
6847 (("TRANSITIONAL = False")
6848 "TRANSITIONAL = 1"))
6849 #t))))))))
6850
6851 (define-public python2-msgpack
6852 (package-with-python2 python-msgpack))
6853
6854 (define-public python-netaddr
6855 (package
6856 (name "python-netaddr")
6857 (version "0.7.19")
6858 (source
6859 (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "netaddr" version))
6862 (sha256
6863 (base32
6864 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6865 (build-system python-build-system)
6866 (arguments `(#:tests? #f)) ;; No tests.
6867 (home-page "https://github.com/drkjam/netaddr/")
6868 (synopsis "Pythonic manipulation of network addresses")
6869 (description
6870 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6871 and MAC network addresses.")
6872 (license license:bsd-3)))
6873
6874 (define-public python2-netaddr
6875 (package-with-python2 python-netaddr))
6876
6877 (define-public python-wrapt
6878 (package
6879 (name "python-wrapt")
6880 (version "1.11.1")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "wrapt" version))
6885 (sha256
6886 (base32
6887 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6888 (build-system python-build-system)
6889 (arguments
6890 ;; Tests are not included in the tarball, they are only available in the
6891 ;; git repository.
6892 `(#:tests? #f))
6893 (home-page "https://github.com/GrahamDumpleton/wrapt")
6894 (synopsis "Module for decorators, wrappers and monkey patching")
6895 (description
6896 "The aim of the wrapt module is to provide a transparent object proxy for
6897 Python, which can be used as the basis for the construction of function
6898 wrappers and decorator functions.")
6899 (license license:bsd-2)))
6900
6901 (define-public python2-wrapt
6902 (package-with-python2 python-wrapt))
6903
6904 (define-public python-xlrd
6905 (package
6906 (name "python-xlrd")
6907 (version "1.0.0")
6908 (source (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "xlrd" version))
6911 (sha256
6912 (base32
6913 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6914 (build-system python-build-system)
6915 (arguments
6916 `(#:phases
6917 (modify-phases %standard-phases
6918 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6919 ;; run tests instead for now.
6920 (replace 'check (lambda _ (invoke "nosetests"))))))
6921 (native-inputs `(("python-nose" ,python-nose)))
6922 (home-page "http://www.python-excel.org/")
6923 (synopsis "Library for extracting data from Excel files")
6924 (description "This package provides a library to extract data from
6925 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6926 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6927 Unicode-aware. It is not intended as an end-user tool.")
6928 (license license:bsd-3)))
6929
6930 (define-public python2-xlrd
6931 (package-with-python2 python-xlrd))
6932
6933 (define-public python-prettytable
6934 (package
6935 (name "python-prettytable")
6936 (version "0.7.2")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (pypi-uri "prettytable" version ".tar.bz2"))
6941 (sha256
6942 (base32
6943 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6944 (build-system python-build-system)
6945 (home-page "http://code.google.com/p/prettytable/")
6946 (synopsis "Display tabular data in an ASCII table format")
6947 (description
6948 "A library designed to represent tabular data in visually appealing ASCII
6949 tables. PrettyTable allows for selection of which columns are to be printed,
6950 independent alignment of columns (left or right justified or centred) and
6951 printing of sub-tables by specifying a row range.")
6952 (license license:bsd-3)))
6953
6954 (define-public python2-prettytable
6955 (package-with-python2 python-prettytable))
6956
6957 (define-public python-tables
6958 (package
6959 (name "python-tables")
6960 (version "3.4.4")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "tables" version))
6965 (sha256
6966 (base32
6967 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6968 (modules '((guix build utils)))
6969 (snippet
6970 '(begin
6971 ;; Remove pre-compiled .pyc files from source.
6972 (for-each delete-file-recursively
6973 (find-files "." "__pycache__" #:directories? #t))
6974 (for-each delete-file (find-files "." "\\.pyc$"))
6975 #t))))
6976 (build-system python-build-system)
6977 (arguments
6978 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6979 ;; or "check", so we must override the build and check phases.
6980 #:phases
6981 (modify-phases %standard-phases
6982 (add-after 'unpack 'use-gcc
6983 (lambda _
6984 (substitute* "setup.py"
6985 (("compiler = new_compiler\\(\\)" line)
6986 (string-append line
6987 "\ncompiler.set_executables(compiler='gcc',"
6988 "compiler_so='gcc',"
6989 "linker_exe='gcc',"
6990 "linker_so='gcc -shared')")))
6991 #t))
6992 (replace 'build
6993 (lambda* (#:key inputs #:allow-other-keys)
6994 (invoke "python" "setup.py" "build"
6995 (string-append "--hdf5="
6996 (assoc-ref inputs "hdf5")))))
6997 (replace 'check
6998 (lambda* (#:key inputs #:allow-other-keys)
6999 (invoke "python" "setup.py" "check"
7000 (string-append "--hdf5="
7001 (assoc-ref inputs "hdf5"))))))))
7002 (propagated-inputs
7003 `(("python-numexpr" ,python-numexpr)
7004 ("python-numpy" ,python-numpy)))
7005 (native-inputs
7006 `(("python-cython" ,python-cython)
7007 ("pkg-config" ,pkg-config)))
7008 (inputs
7009 `(("hdf5" ,hdf5)
7010 ("bzip2" ,bzip2)
7011 ("zlib" ,zlib)))
7012 (home-page "http://www.pytables.org/")
7013 (synopsis "Hierarchical datasets for Python")
7014 (description "PyTables is a package for managing hierarchical datasets and
7015 designed to efficiently cope with extremely large amounts of data.")
7016 (license license:bsd-3)))
7017
7018 (define-public python2-tables
7019 (package-with-python2 python-tables))
7020
7021 (define-public python-pyasn1
7022 (package
7023 (name "python-pyasn1")
7024 (version "0.4.3")
7025 (source
7026 (origin
7027 (method url-fetch)
7028 (uri (pypi-uri "pyasn1" version))
7029 (sha256
7030 (base32
7031 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7032 (build-system python-build-system)
7033 (home-page "http://pyasn1.sourceforge.net/")
7034 (synopsis "ASN.1 types and codecs")
7035 (description
7036 "This is an implementation of ASN.1 types and codecs in Python. It is
7037 suitable for a wide range of protocols based on the ASN.1 specification.")
7038 (license license:bsd-2)))
7039
7040 (define-public python2-pyasn1
7041 (package-with-python2 python-pyasn1))
7042
7043 (define-public python-pyasn1-modules
7044 (package
7045 (name "python-pyasn1-modules")
7046 (version "0.2.2")
7047 (source
7048 (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "pyasn1-modules" version))
7051 (sha256
7052 (base32
7053 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7054 (build-system python-build-system)
7055 (propagated-inputs
7056 `(("python-pyasn1" ,python-pyasn1)))
7057 (home-page "https://sourceforge.net/projects/pyasn1/")
7058 (synopsis "ASN.1 codec implementations")
7059 (description
7060 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7061 implementations of ASN.1-based codecs and protocols.")
7062 (license license:bsd-3)))
7063
7064 (define-public python2-pyasn1-modules
7065 (package-with-python2 python-pyasn1-modules))
7066
7067 (define-public python-ipaddress
7068 (package
7069 (name "python-ipaddress")
7070 (version "1.0.22")
7071 (source (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "ipaddress" version))
7074 (sha256
7075 (base32
7076 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7077 (build-system python-build-system)
7078 (home-page "https://github.com/phihag/ipaddress")
7079 (synopsis "IP address manipulation library")
7080 (description
7081 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7082 in Python. This library is used to create, poke at, and manipulate IPv4 and
7083 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7084 module to older versions of Python.")
7085 (license license:psfl)))
7086
7087 (define-public python2-ipaddress
7088 (package-with-python2 python-ipaddress))
7089
7090 (define-public python2-ipaddr
7091 (package
7092 (name "python2-ipaddr")
7093 (version "2.1.11")
7094 (source
7095 (origin
7096 (method url-fetch)
7097 (uri (pypi-uri "ipaddr" version))
7098 (sha256
7099 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7100 (build-system python-build-system)
7101 (arguments
7102 `(#:python ,python-2 ;version 2 only
7103 #:phases
7104 (modify-phases %standard-phases
7105 (replace 'check
7106 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7107 (home-page "https://github.com/google/ipaddr-py")
7108 (synopsis "IP address manipulation library")
7109 (description
7110 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7111 IPv6 addresses and networks.
7112
7113 For new implementations you may prefer to use the standard module
7114 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7115 versions of Python.")
7116 (license license:asl2.0)))
7117
7118 (define-public python-idna
7119 (package
7120 (name "python-idna")
7121 (version "2.8")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "idna" version))
7126 (sha256
7127 (base32
7128 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7129 (build-system python-build-system)
7130 (home-page "https://github.com/kjd/idna")
7131 (synopsis "Internationalized domain names in applications")
7132 (description
7133 "This is a library to support the Internationalised Domain Names in
7134 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7135 protocol is often referred to as “IDNA2008” and can produce different results
7136 from the earlier standard from 2003. The library is also intended to act as a
7137 suitable drop-in replacement for the “encodings.idna” module that comes with
7138 the Python standard library but currently only supports the older 2003
7139 specification.")
7140 (license license:bsd-4)))
7141
7142 (define-public python2-idna
7143 (package-with-python2 python-idna))
7144
7145 (define-public python-idna-ssl
7146 (package
7147 (name "python-idna-ssl")
7148 (version "1.0.1")
7149 (source
7150 (origin
7151 (method url-fetch)
7152 (uri (pypi-uri "idna-ssl" version))
7153 (sha256
7154 (base32
7155 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7156 (build-system python-build-system)
7157 (arguments
7158 `(#:tests? #f)) ;circular dependency with python-aiohttp
7159 (home-page "https://github.com/aio-libs/idna-ssl")
7160 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7161 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7162 domains support.")
7163 (license license:expat)))
7164
7165 (define-public python-pretend
7166 (package
7167 (name "python-pretend")
7168 (version "1.0.9")
7169 (source
7170 (origin
7171 (method url-fetch)
7172 (uri (pypi-uri "pretend" version))
7173 (sha256
7174 (base32
7175 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7176 (build-system python-build-system)
7177 (home-page "https://github.com/alex/pretend")
7178 (synopsis "Library for stubbing in Python")
7179 (description
7180 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7181 technique for writing tests. You may hear the term mixed up with mocks,
7182 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7183 responses, rather than doing any computation.")
7184 (license license:bsd-3)))
7185
7186 (define-public python2-pretend
7187 (package-with-python2 python-pretend))
7188
7189 (define-public python-pip
7190 (package
7191 (name "python-pip")
7192 (version "18.1")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "pip" version))
7197 (sha256
7198 (base32
7199 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7200 (build-system python-build-system)
7201 (arguments
7202 '(#:tests? #f)) ; there are no tests in the pypi archive.
7203 (home-page "https://pip.pypa.io/")
7204 (synopsis "Package manager for Python software")
7205 (description
7206 "Pip is a package manager for Python software, that finds packages on the
7207 Python Package Index (PyPI).")
7208 (license license:expat)))
7209
7210 (define-public python2-pip
7211 (package-with-python2 python-pip))
7212
7213 (define-public python-tlsh
7214 (package
7215 (name "python-tlsh")
7216 (version "3.4.5")
7217 (home-page "https://github.com/trendmicro/tlsh")
7218 (source
7219 (origin
7220 (method git-fetch)
7221 (uri (git-reference
7222 (url "https://github.com/trendmicro/tlsh.git")
7223 (commit (string-append "v" version))))
7224 (file-name (git-file-name name version))
7225 (sha256
7226 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7227 (build-system cmake-build-system)
7228 (arguments
7229 '(#:out-of-source? #f
7230 #:phases (modify-phases %standard-phases
7231 (replace
7232 'install
7233 (lambda* (#:key outputs #:allow-other-keys)
7234 ;; Build and install the Python bindings. The underlying
7235 ;; C++ library is apparently not meant to be installed.
7236 (let ((out (assoc-ref outputs "out")))
7237 (with-directory-excursion "py_ext"
7238 (and (system* "python" "setup.py" "build")
7239 (system* "python" "setup.py" "install"
7240 (string-append "--prefix=" out))))))))))
7241 (inputs `(("python" ,python-wrapper))) ;for the bindings
7242 (synopsis "Fuzzy matching library for Python")
7243 (description
7244 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7245 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7246 value which can be used for similarity comparisons. Similar objects have
7247 similar hash values, which allows for the detection of similar objects by
7248 comparing their hash values. The byte stream should have a sufficient amount
7249 of complexity; for example, a byte stream of identical bytes will not generate
7250 a hash value.")
7251 (license license:asl2.0)))
7252
7253 (define-public python2-tlsh
7254 (package
7255 (inherit python-tlsh)
7256 (name "python2-tlsh")
7257 (inputs `(("python" ,python-2)))))
7258
7259 (define-public python-termcolor
7260 (package
7261 (name "python-termcolor")
7262 (version "1.1.0")
7263 (source
7264 (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "termcolor" version))
7267 (sha256
7268 (base32
7269 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7270 (build-system python-build-system)
7271 (arguments
7272 ;; There are no tests.
7273 `(#:tests? #f))
7274 (home-page "https://pypi.python.org/pypi/termcolor")
7275 (synopsis "ANSII Color formatting for terminal output")
7276 (description
7277 "This package provides ANSII Color formatting for output in terminals.")
7278 (license license:expat)))
7279
7280 (define-public python2-termcolor
7281 (package-with-python2 python-termcolor))
7282
7283 (define-public python-libarchive-c
7284 (package
7285 (name "python-libarchive-c")
7286 (version "2.8")
7287 (source (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "libarchive-c" version))
7290 (sha256
7291 (base32
7292 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7293 (build-system python-build-system)
7294 (arguments
7295 '(#:phases (modify-phases %standard-phases
7296 (add-before
7297 'build 'reference-libarchive
7298 (lambda* (#:key inputs #:allow-other-keys)
7299 ;; Retain the absolute file name of libarchive.so.
7300 (let ((libarchive (assoc-ref inputs "libarchive")))
7301 (substitute* "libarchive/ffi.py"
7302 (("find_library\\('archive'\\)")
7303 (string-append "'" libarchive
7304 "/lib/libarchive.so'"))))))
7305 (replace 'check
7306 (lambda _ (invoke "pytest" "-vv"))))))
7307 (native-inputs
7308 `(("python-mock" ,python-mock)
7309 ("python-pytest" ,python-pytest)))
7310 (inputs
7311 `(("libarchive" ,libarchive)))
7312 (home-page "https://github.com/Changaco/python-libarchive-c")
7313 (synopsis "Python interface to libarchive")
7314 (description
7315 "This package provides Python bindings to libarchive, a C library to
7316 access possibly compressed archives in many different formats. It uses
7317 Python's @code{ctypes} foreign function interface (FFI).")
7318 (license license:lgpl2.0+)))
7319
7320 (define-public python2-libarchive-c
7321 (package-with-python2 python-libarchive-c))
7322
7323 (define-public python-file
7324 (package
7325 (inherit file)
7326 (name "python-file")
7327 (build-system python-build-system)
7328 (arguments
7329 '(#:tests? #f ;no tests
7330 #:configure-flags '("--single-version-externally-managed" "--root=/")
7331 #:phases (modify-phases %standard-phases
7332 (add-before 'build 'change-directory
7333 (lambda _
7334 (chdir "python")
7335 #t))
7336 (add-before 'build 'set-library-file-name
7337 (lambda* (#:key inputs #:allow-other-keys)
7338 (let ((file (assoc-ref inputs "file")))
7339 (substitute* "magic.py"
7340 (("find_library\\('magic'\\)")
7341 (string-append "'" file "/lib/libmagic.so'")))
7342 #t))))))
7343 (inputs `(("file" ,file)))
7344 (native-inputs (if (%current-target-system)
7345 `(("self" ,this-package))
7346 '()))
7347 (synopsis "Python bindings to the libmagic file type guesser. Note that
7348 this module and the python-magic module both provide a \"magic.py\" file;
7349 these two modules, which are different and were developed separately, both
7350 serve the same purpose: provide Python bindings for libmagic.")))
7351
7352 (define-public python2-file
7353 (package-with-python2 python-file))
7354
7355 (define-public python-debian
7356 (package
7357 (name "python-debian")
7358 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7359 (version "0.1.28")
7360 (source
7361 (origin
7362 (method url-fetch)
7363 (uri (pypi-uri name version))
7364 (sha256
7365 (base32
7366 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7367 (build-system python-build-system)
7368 (propagated-inputs
7369 `(("python-six" ,python-six)))
7370 (synopsis "Debian package related modules")
7371 (description
7372 ;; XXX: Use @enumerate instead of @itemize to work around
7373 ;; <http://bugs.gnu.org/21772>.
7374 "This package provides Python modules that abstract many formats of
7375 Debian-related files, such as:
7376
7377 @enumerate
7378 @item Debtags information;
7379 @item @file{debian/changelog} files;
7380 @item packages files, pdiffs;
7381 @item control files of single or multiple RFC822-style paragraphs---e.g.
7382 @file{debian/control}, @file{.changes}, @file{.dsc};
7383 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7384 contained files and meta-information.
7385 @end enumerate\n")
7386
7387 ;; Modules are either GPLv2+ or GPLv3+.
7388 (license license:gpl3+)))
7389
7390 (define-public python2-debian
7391 (package-with-python2 python-debian))
7392
7393 (define-public python-nbformat
7394 (package
7395 (name "python-nbformat")
7396 (version "4.4.0")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "nbformat" version))
7401 (sha256
7402 (base32
7403 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7404 (build-system python-build-system)
7405 (arguments `(#:tests? #f)) ; no test target
7406 (propagated-inputs
7407 `(("python-ipython-genutils" ,python-ipython-genutils)
7408 ("python-jsonschema" ,python-jsonschema)
7409 ("python-jupyter-core" ,python-jupyter-core)
7410 ("python-traitlets" ,python-traitlets)))
7411 (home-page "http://jupyter.org")
7412 (synopsis "Jupyter Notebook format")
7413 (description "This package provides the reference implementation of the
7414 Jupyter Notebook format and Python APIs for working with notebooks.")
7415 (license license:bsd-3)))
7416
7417 (define-public python2-nbformat
7418 (package-with-python2 python-nbformat))
7419
7420 (define-public python-bleach
7421 (package
7422 (name "python-bleach")
7423 (version "1.4.3")
7424 (source
7425 (origin
7426 (method url-fetch)
7427 (uri (pypi-uri "bleach" version))
7428 (sha256
7429 (base32
7430 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7431 (build-system python-build-system)
7432 (propagated-inputs
7433 `(("python-html5lib" ,python-html5lib-0.9)
7434 ("python-six" ,python-six)))
7435 (native-inputs
7436 `(("python-nose" ,python-nose)))
7437 (home-page "https://github.com/jsocol/bleach")
7438 (synopsis "Whitelist-based HTML-sanitizing tool")
7439 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7440 (license license:asl2.0)))
7441
7442 (define-public python2-bleach
7443 (package-with-python2 python-bleach))
7444
7445 (define-public python-entrypoints
7446 (package
7447 (name "python-entrypoints")
7448 (version "0.3")
7449 (source
7450 (origin
7451 (method url-fetch)
7452 (uri (pypi-uri "entrypoints" version))
7453 (sha256
7454 (base32
7455 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7456 (build-system python-build-system)
7457 ;; The package does not come with a setup.py file, so we have to generate
7458 ;; one ourselves.
7459 (arguments
7460 `(#:tests? #f
7461 #:phases
7462 (modify-phases %standard-phases
7463 (add-after 'unpack 'create-setup.py
7464 (lambda _
7465 (call-with-output-file "setup.py"
7466 (lambda (port)
7467 (format port "\
7468 from setuptools import setup
7469 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7470 " ,version))))))))
7471 (home-page "https://github.com/takluyver/entrypoints")
7472 (synopsis "Discover and load entry points from installed Python packages")
7473 (description "Entry points are a way for Python packages to advertise
7474 objects with some common interface. The most common examples are
7475 @code{console_scripts} entry points, which define shell commands by
7476 identifying a Python function to run. The @code{entrypoints} module contains
7477 functions to find and load entry points.")
7478 (license license:expat)))
7479
7480 (define-public python2-entrypoints
7481 (package-with-python2 python-entrypoints))
7482
7483 (define-public python-nbconvert
7484 (package
7485 (name "python-nbconvert")
7486 (version "5.0.0b1")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "nbconvert" version))
7491 (sha256
7492 (base32
7493 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7494 (build-system python-build-system)
7495 (arguments
7496 `(;; The "bdist_egg" target is disabled by default, causing the installation
7497 ;; to fail.
7498 #:configure-flags (list "bdist_egg")
7499 ;; FIXME: 5 failures, 40 errors.
7500 #:tests? #f))
7501 ;; #:phases
7502 ;; (modify-phases %standard-phases
7503 ;; (replace 'check
7504 ;; (lambda _
7505 ;; (zero? (system* "py.test" "-v")))))
7506 (native-inputs
7507 `(("python-pytest" ,python-pytest)))
7508 (propagated-inputs
7509 `(("python-bleach" ,python-bleach)
7510 ("python-entrypoints" ,python-entrypoints)
7511 ("python-jinja2" ,python-jinja2)
7512 ("python-jupyter-core" ,python-jupyter-core)
7513 ("python-mistune" ,python-mistune)
7514 ("python-nbformat" ,python-nbformat)
7515 ("python-pygments" ,python-pygments)
7516 ("python-traitlets" ,python-traitlets)))
7517 (home-page "http://jupyter.org")
7518 (synopsis "Converting Jupyter Notebooks")
7519 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7520 notebooks to various other formats via Jinja templates. It allows you to
7521 convert an @code{.ipynb} notebook file into various static formats including:
7522
7523 @enumerate
7524 @item HTML
7525 @item LaTeX
7526 @item PDF
7527 @item Reveal JS
7528 @item Markdown (md)
7529 @item ReStructured Text (rst)
7530 @item executable script
7531 @end enumerate\n")
7532 (license license:bsd-3)))
7533
7534 (define-public python2-nbconvert
7535 (package-with-python2 python-nbconvert))
7536
7537 (define-public python-notebook
7538 (package
7539 (name "python-notebook")
7540 (version "5.7.4")
7541 (source (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "notebook" version))
7544 (sha256
7545 (base32
7546 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7547 (build-system python-build-system)
7548 (arguments
7549 `(#:phases
7550 (modify-phases %standard-phases
7551 (replace 'check
7552 (lambda _
7553 ;; These tests require a browser
7554 (delete-file-recursively "notebook/tests/selenium")
7555 ;; Some tests need HOME
7556 (setenv "HOME" "/tmp")
7557 ;; This file contains "warningfilters", which are not supported
7558 ;; by this version of nose.
7559 (delete-file "setup.cfg")
7560 (with-directory-excursion "/tmp"
7561 (invoke "nosetests" "-v"))
7562 #t)))))
7563 (propagated-inputs
7564 `(("python-jupyter-core" ,python-jupyter-core)
7565 ("python-nbformat" ,python-nbformat)
7566 ("python-nbconvert" ,python-nbconvert)
7567 ("python-prometheus-client" ,python-prometheus-client)
7568 ("python-send2trash" ,python-send2trash)
7569 ("python-terminado" ,python-terminado)))
7570 (native-inputs
7571 `(("python-nose" ,python-nose)
7572 ("python-sphinx" ,python-sphinx)
7573 ("python-requests" ,python-requests)))
7574 (home-page "http://jupyter.org/")
7575 (synopsis "Web-based notebook environment for interactive computing")
7576 (description
7577 "The Jupyter HTML notebook is a web-based notebook environment for
7578 interactive computing.")
7579 (properties `((python2-variant . ,(delay python2-notebook))))
7580 (license license:bsd-3)))
7581
7582 (define-public python2-notebook
7583 (let ((base (package-with-python2
7584 (strip-python2-variant python-notebook))))
7585 (package (inherit base)
7586 (native-inputs
7587 `(("python2-mock" ,python2-mock)
7588 ,@(package-native-inputs base)))
7589 (arguments
7590 (substitute-keyword-arguments (package-arguments base)
7591 ((#:phases phases)
7592 `(modify-phases ,phases
7593 (add-before 'check 'disable-test-case
7594 ;; The test requires network access to localhost. Curiously it
7595 ;; fails with Python 2 only. Simply make the test-case return
7596 ;; immediately.
7597 (lambda _
7598 (substitute*
7599 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7600 (("formats = self.nbconvert_api") "return #")))))))))))
7601
7602 (define-public python-widgetsnbextension
7603 (package
7604 (name "python-widgetsnbextension")
7605 (version "3.4.2")
7606 (source
7607 (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "widgetsnbextension" version))
7610 (sha256
7611 (base32
7612 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7613 (build-system python-build-system)
7614 (propagated-inputs
7615 `(("python-ipykernel" ,python-ipykernel)
7616 ("python-notebook" ,python-notebook)))
7617 (native-inputs
7618 `(("python-certifi" ,python-certifi)
7619 ("python-nose" ,python-nose)))
7620 (home-page "https://ipython.org")
7621 (synopsis "IPython HTML widgets for Jupyter")
7622 (description "This package provides interactive HTML widgets for Jupyter
7623 notebooks.")
7624 (license license:bsd-3)))
7625
7626 (define-public python2-widgetsnbextension
7627 (package-with-python2 python-widgetsnbextension))
7628
7629 (define-public python-ipywidgets
7630 (package
7631 (name "python-ipywidgets")
7632 (version "5.2.2")
7633 (source
7634 (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "ipywidgets" version))
7637 (sha256
7638 (base32
7639 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7640 (build-system python-build-system)
7641 (propagated-inputs
7642 `(("python-ipython" ,python-ipython)
7643 ("python-traitlets" ,python-traitlets)
7644 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7645 (native-inputs
7646 `(("python-nose" ,python-nose)
7647 ("python-pytest" ,python-pytest)))
7648 (home-page "https://ipython.org")
7649 (synopsis "IPython HTML widgets for Jupyter")
7650 (description "Ipywidgets are interactive HTML widgets for Jupyter
7651 notebooks and the IPython kernel. Notebooks come alive when interactive
7652 widgets are used. Users gain control of their data and can visualize changes
7653 in the data.")
7654 (license license:bsd-3)))
7655
7656 (define-public python2-ipywidgets
7657 (package-with-python2 python-ipywidgets))
7658
7659 (define-public python-jupyter-console
7660 (package
7661 (name "python-jupyter-console")
7662 (version "6.0.0")
7663 (source
7664 (origin
7665 (method url-fetch)
7666 (uri (pypi-uri "jupyter_console" version))
7667 (sha256
7668 (base32
7669 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7670 (build-system python-build-system)
7671 (propagated-inputs
7672 `(("python-ipykernel" ,python-ipykernel)
7673 ("python-jupyter-client" ,python-jupyter-client)
7674 ("python-prompt-toolkit" ,python-prompt-toolkit)
7675 ("python-pygments" ,python-pygments)))
7676 (native-inputs
7677 `(("python-nose" ,python-nose)))
7678 (home-page "https://jupyter.org")
7679 (synopsis "Jupyter terminal console")
7680 (description "This package provides a terminal-based console frontend for
7681 Jupyter kernels. It also allows for console-based interaction with non-Python
7682 Jupyter kernels such as IJulia and IRKernel.")
7683 (license license:bsd-3)))
7684
7685 (define-public python2-jupyter-console
7686 (package
7687 (name "python2-jupyter-console")
7688 (version "5.2.0")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "jupyter_console" version))
7693 (sha256
7694 (base32
7695 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7696 (build-system python-build-system)
7697 ;; Tests only run in an TTY.
7698 (arguments `(#:tests? #f))
7699 (propagated-inputs
7700 `(("python2-ipykernel" ,python2-ipykernel)
7701 ("python2-jupyter-client" ,python2-jupyter-client)
7702 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7703 ("python2-pygments" ,python2-pygments)))
7704 (native-inputs
7705 `(("python2-nose" ,python2-nose)))
7706 (home-page "https://jupyter.org")
7707 (synopsis "Jupyter terminal console")
7708 (description "This package provides a terminal-based console frontend for
7709 Jupyter kernels. It also allows for console-based interaction with non-Python
7710 Jupyter kernels such as IJulia and IRKernel.")
7711 (license license:bsd-3)))
7712
7713 ;; The python-ipython and python-jupyter-console require each other. To get
7714 ;; the functionality in both packages working, strip down the
7715 ;; python-jupyter-console package when using it as an input to python-ipython.
7716 (define python-jupyter-console-minimal
7717 (package
7718 (inherit python-jupyter-console)
7719 (name "python-jupyter-console-minimal")
7720 (arguments
7721 (substitute-keyword-arguments
7722 (package-arguments python-jupyter-console)
7723 ((#:phases phases)
7724 `(modify-phases ,phases
7725 (add-after 'install 'delete-bin
7726 (lambda* (#:key outputs #:allow-other-keys)
7727 ;; Delete the bin files, to avoid conflicts in profiles
7728 ;; where python-ipython and python-jupyter-console are
7729 ;; both present.
7730 (delete-file-recursively
7731 (string-append
7732 (assoc-ref outputs "out") "/bin"))))))))
7733 ;; Remove the python-ipython propagated input, to avoid the cycle
7734 (propagated-inputs
7735 (alist-delete
7736 "python-ipython"
7737 (package-propagated-inputs python-jupyter-console)))))
7738
7739 (define-public python-qtconsole
7740 (package
7741 (name "python-qtconsole")
7742 (version "4.4.3")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "qtconsole" version))
7747 (sha256
7748 (base32
7749 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7750 (build-system python-build-system)
7751 (arguments
7752 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7753 ;; but we only have the LTS version 5.x. This means that there might be
7754 ;; runtime errors, but since this is a dependency of the Jupyter package,
7755 ;; and Jupyter can be used without the qtconsole we can overlook this for
7756 ;; now.
7757 `(#:tests? #f
7758 #:phases
7759 (modify-phases %standard-phases
7760 (add-before 'check 'pre-check
7761 (lambda _
7762 (setenv "QT_QPA_PLATFORM" "offscreen")
7763 #t)))))
7764 (propagated-inputs
7765 `(("python-ipykernel" ,python-ipykernel)
7766 ("python-ipython" ,python-ipython)))
7767 (native-inputs
7768 `(("python-pytest" ,python-pytest)))
7769 (home-page "http://jupyter.org")
7770 (synopsis "Jupyter Qt console")
7771 (description "This package provides a Qt-based console for Jupyter with
7772 support for rich media output.")
7773 (license license:bsd-3)))
7774
7775 (define-public jupyter
7776 (package
7777 (name "jupyter")
7778 (version "1.0.0")
7779 (source
7780 (origin
7781 (method url-fetch)
7782 (uri (pypi-uri "jupyter" version))
7783 (sha256
7784 (base32
7785 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7786 (build-system python-build-system)
7787 (arguments '(#:tests? #f)) ; there are none.
7788 (propagated-inputs
7789 `(("python-ipykernel" ,python-ipykernel)
7790 ("python-ipywidgets" ,python-ipywidgets)
7791 ("python-jupyter-console" ,python-jupyter-console)
7792 ("python-nbconvert" ,python-nbconvert)
7793 ("python-notebook" ,python-notebook)
7794 ("python-qtconsole" ,python-qtconsole)))
7795 (native-search-paths
7796 (list (search-path-specification
7797 (variable "JUPYTER_PATH")
7798 (files '("share/jupyter")))))
7799 (home-page "https://jupyter.org")
7800 (synopsis "Web application for interactive documents")
7801 (description
7802 "The Jupyter Notebook is a web application that allows you to create and
7803 share documents that contain live code, equations, visualizations and
7804 explanatory text. Uses include: data cleaning and transformation, numerical
7805 simulation, statistical modeling, machine learning and much more.")
7806 (license license:bsd-3)))
7807
7808 (define-public python-chardet
7809 (package
7810 (name "python-chardet")
7811 (version "3.0.4")
7812 (source
7813 (origin
7814 (method url-fetch)
7815 (uri (pypi-uri "chardet" version))
7816 (sha256
7817 (base32
7818 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7819 (native-inputs
7820 `(("python-hypothesis" ,python-hypothesis)
7821 ("python-pytest" ,python-pytest)
7822 ("python-pytest-runner" ,python-pytest-runner)))
7823 (build-system python-build-system)
7824 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7825 (arguments `(#:tests? #f))
7826 (home-page "https://github.com/chardet/chardet")
7827 (synopsis "Universal encoding detector for Python 2 and 3")
7828 (description
7829 "This package provides @code{chardet}, a Python module that can
7830 automatically detect a wide range of file encodings.")
7831 (license license:lgpl2.1+)))
7832
7833 (define-public python2-chardet
7834 (package-with-python2 python-chardet))
7835
7836 (define-public python-docopt
7837 (package
7838 (name "python-docopt")
7839 (version "0.6.2")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 ;; The release on PyPI does not include tests.
7844 (uri (string-append
7845 "https://github.com/docopt/docopt/archive/"
7846 version ".tar.gz"))
7847 (file-name (string-append name "-" version ".tar.gz"))
7848 (sha256
7849 (base32
7850 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7851 (build-system python-build-system)
7852 (native-inputs
7853 `(("python-pytest" ,python-pytest)))
7854 (arguments
7855 `(#:phases
7856 (modify-phases %standard-phases
7857 (replace 'check
7858 (lambda _ (invoke "py.test"))))))
7859 (home-page "http://docopt.org")
7860 (synopsis "Command-line interface description language for Python")
7861 (description "This library allows the user to define a command-line
7862 interface from a program's help message rather than specifying it
7863 programmatically with command-line parsers like @code{getopt} and
7864 @code{argparse}.")
7865 (license license:expat)))
7866
7867 (define-public python2-docopt
7868 (package-with-python2 python-docopt))
7869
7870 (define-public python-pythondialog
7871 (package
7872 (name "python-pythondialog")
7873 (version "3.4.0")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "pythondialog" version))
7878 (sha256
7879 (base32
7880 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7881 (build-system python-build-system)
7882 (arguments
7883 `(#:phases
7884 (modify-phases %standard-phases
7885 (add-after 'unpack 'patch-path
7886 (lambda* (#:key inputs #:allow-other-keys)
7887 (let* ((dialog (assoc-ref inputs "dialog")))
7888 ;; Since this library really wants to grovel the search path, we
7889 ;; must hardcode dialog's store path into it.
7890 (substitute* "dialog.py"
7891 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7892 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7893 #t))))
7894 #:tests? #f)) ; no test suite
7895 (propagated-inputs
7896 `(("dialog" ,dialog)))
7897 (home-page "http://pythondialog.sourceforge.net/")
7898 (synopsis "Python interface to the UNIX dialog utility")
7899 (description "A Python wrapper for the dialog utility. Its purpose is to
7900 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7901 This allows one to make simple text-mode user interfaces on Unix-like systems")
7902 (license license:lgpl2.1)
7903 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7904
7905 (define-public python2-pythondialog
7906 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7907 (package
7908 (inherit base)
7909 (version (package-version python-pythondialog))
7910 (source (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "python2-pythondialog" version))
7913 (sha256
7914 (base32
7915 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7916
7917 (define-public python-configobj
7918 (package
7919 (name "python-configobj")
7920 (version "5.0.6")
7921 (source (origin
7922 (method url-fetch)
7923 (uri (pypi-uri "configobj" version))
7924 (sha256
7925 (base32
7926 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7927 ;; Patch setup.py so it looks for python-setuptools, which is
7928 ;; required to parse the keyword 'install_requires' in setup.py.
7929 (patches (search-patches "python-configobj-setuptools.patch"))))
7930 (build-system python-build-system)
7931 (propagated-inputs
7932 `(("python-six" ,python-six)))
7933 (synopsis "Config file reading, writing and validation")
7934 (description "ConfigObj is a simple but powerful config file reader and
7935 writer: an ini file round tripper. Its main feature is that it is very easy to
7936 use, with a straightforward programmer’s interface and a simple syntax for
7937 config files.")
7938 (home-page "https://github.com/DiffSK/configobj")
7939 (license license:bsd-3)))
7940
7941 (define-public python2-configobj
7942 (package-with-python2 python-configobj))
7943
7944 (define-public python-configargparse
7945 (package
7946 (name "python-configargparse")
7947 (version "0.14.0")
7948 (source (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "ConfigArgParse" version))
7951 (sha256
7952 (base32
7953 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
7954 (build-system python-build-system)
7955 (native-inputs
7956 `(("python-pyyaml" ,python-pyyaml)))
7957 (arguments
7958 `(#:phases
7959 (modify-phases %standard-phases
7960 (replace 'check
7961 (lambda _
7962 ;; Bypass setuptools-shim because one test relies on "setup.py"
7963 ;; being the first argument passed to the python call.
7964 ;;
7965 ;; NOTE: Many tests do not run because they rely on Python's
7966 ;; built-in test.test_argparse, but we remove the unit tests from
7967 ;; our Python installation.
7968 (invoke "python" "setup.py" "test"))))))
7969 (synopsis "Replacement for argparse")
7970 (description "A drop-in replacement for argparse that allows options to also
7971 be set via config files and/or environment variables.")
7972 (home-page "https://github.com/bw2/ConfigArgParse")
7973 (license license:expat)))
7974
7975 (define-public python2-configargparse
7976 (package-with-python2 python-configargparse))
7977
7978 (define-public python-argparse-manpage
7979 (package
7980 (name "python-argparse-manpage")
7981 (version "1.1")
7982 (source
7983 (origin
7984 (method url-fetch)
7985 (uri (pypi-uri "argparse-manpage" version))
7986 (sha256
7987 (base32
7988 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7989 (build-system python-build-system)
7990 (home-page "https://github.com/praiskup/argparse-manpage")
7991 (synopsis "Build manual page from Python's ArgumentParser object")
7992 (description
7993 "This package provides tools to build manual pages from Python's
7994 @code{ArgumentParser} object.")
7995 (license license:asl2.0)))
7996
7997 (define-public python-contextlib2
7998 (package
7999 (name "python-contextlib2")
8000 (version "0.5.5")
8001 (source
8002 (origin
8003 (method url-fetch)
8004 (uri (pypi-uri "contextlib2" version))
8005 (sha256
8006 (base32
8007 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8008 (build-system python-build-system)
8009 (home-page "http://contextlib2.readthedocs.org/")
8010 (synopsis "Tools for decorators and context managers")
8011 (description "This module is primarily a backport of the Python
8012 3.2 contextlib to earlier Python versions. Like contextlib, it
8013 provides utilities for common tasks involving decorators and context
8014 managers. It also contains additional features that are not part of
8015 the standard library.")
8016 (license license:psfl)))
8017
8018 (define-public python2-contextlib2
8019 (package
8020 (name "python2-contextlib2")
8021 (version "0.5.5")
8022 (source
8023 (origin
8024 (method url-fetch)
8025 (uri (pypi-uri "contextlib2" version))
8026 (sha256
8027 (base32
8028 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8029 (build-system python-build-system)
8030 (arguments
8031 `(#:python ,python-2
8032 #:phases
8033 (modify-phases %standard-phases
8034 (replace 'check
8035 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8036 (native-inputs
8037 `(("python2-unittest2" ,python2-unittest2)))
8038 (home-page "http://contextlib2.readthedocs.org/")
8039 (synopsis "Tools for decorators and context managers")
8040 (description "This module is primarily a backport of the Python
8041 3.2 contextlib to earlier Python versions. Like contextlib, it
8042 provides utilities for common tasks involving decorators and context
8043 managers. It also contains additional features that are not part of
8044 the standard library.")
8045 (license license:psfl)))
8046
8047 (define-public python-texttable
8048 (package
8049 (name "python-texttable")
8050 (version "0.8.7")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 (uri (pypi-uri "texttable" version))
8055 (sha256
8056 (base32
8057 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8058 (build-system python-build-system)
8059 (arguments '(#:tests? #f)) ; no tests
8060 (home-page "https://github.com/foutaise/texttable/")
8061 (synopsis "Python module for creating simple ASCII tables")
8062 (description "Texttable is a Python module for creating simple ASCII
8063 tables.")
8064 (license license:lgpl2.1+)))
8065
8066 (define-public python2-texttable
8067 (package-with-python2 python-texttable))
8068
8069 (define-public python-atomicwrites
8070 (package
8071 (name "python-atomicwrites")
8072 (version "1.3.0")
8073 (source (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "atomicwrites" version))
8076 (sha256
8077 (base32
8078 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8079 (build-system python-build-system)
8080 (synopsis "Atomic file writes in Python")
8081 (description "Library for atomic file writes using platform dependent tools
8082 for atomic file system operations.")
8083 (home-page "https://github.com/untitaker/python-atomicwrites")
8084 (license license:expat)))
8085
8086 (define-public python2-atomicwrites
8087 (package-with-python2 python-atomicwrites))
8088
8089 (define-public python-click-threading
8090 (package
8091 (name "python-click-threading")
8092 (version "0.4.4")
8093 (source (origin
8094 (method url-fetch)
8095 (uri (pypi-uri "click-threading" version))
8096 (sha256
8097 (base32
8098 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8099 (build-system python-build-system)
8100 (propagated-inputs
8101 `(("python-click" ,python-click)))
8102 (synopsis "Utilities for multithreading in Click")
8103 (description "This package provides utilities for multithreading in Click
8104 applications.")
8105 (home-page "https://github.com/click-contrib/click-threading")
8106 (license license:expat)))
8107
8108 (define-public python-click-log
8109 (package
8110 (name "python-click-log")
8111 (version "0.3.2")
8112 (source (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "click-log" version))
8115 (sha256
8116 (base32
8117 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8118 (build-system python-build-system)
8119 (propagated-inputs
8120 `(("python-click" ,python-click)))
8121 (synopsis "Logging for click applications")
8122 (description "This package provides a Python library for logging Click
8123 applications.")
8124 (home-page "https://github.com/click-contrib/click-log")
8125 (license license:expat)))
8126
8127 (define-public python-apipkg
8128 (package
8129 (name "python-apipkg")
8130 (version "1.4")
8131 (source (origin
8132 (method url-fetch)
8133 (uri (pypi-uri "apipkg" version))
8134 (sha256
8135 (base32
8136 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8137 (build-system python-build-system)
8138 (native-inputs
8139 `(("python-pytest" ,python-pytest)))
8140 (synopsis "Namespace control and lazy-import mechanism")
8141 (description "With apipkg you can control the exported namespace of a Python
8142 package and greatly reduce the number of imports for your users. It is a small
8143 pure Python module that works on virtually all Python versions.")
8144 (home-page "https://github.com/pytest-dev/apipkg")
8145 (license license:expat)))
8146
8147 (define-public python2-apipkg
8148 (package-with-python2 python-apipkg))
8149
8150 (define-public python-execnet
8151 (package
8152 (name "python-execnet")
8153 (version "1.4.1")
8154 (source (origin
8155 (method url-fetch)
8156 (uri (pypi-uri "execnet" version))
8157 (sha256
8158 (base32
8159 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8160 (build-system python-build-system)
8161 (arguments
8162 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8163 ;; The two test failures are caused by the lack of an `ssh` executable.
8164 ;; The test suite can be run with pytest after the 'install' phase.
8165 #:tests? #f))
8166 (native-inputs
8167 `(("python-pytest" ,python-pytest)
8168 ("python-setuptools-scm" ,python-setuptools-scm)))
8169 (propagated-inputs
8170 `(("python-apipkg" ,python-apipkg)))
8171 (synopsis "Rapid multi-Python deployment")
8172 (description "Execnet provides a share-nothing model with
8173 channel-send/receive communication for distributing execution across many
8174 Python interpreters across version, platform and network barriers. It has a
8175 minimal and fast API targeting the following uses:
8176 @enumerate
8177 @item distribute tasks to (many) local or remote CPUs
8178 @item write and deploy hybrid multi-process applications
8179 @item write scripts to administer multiple environments
8180 @end enumerate")
8181 (home-page "http://codespeak.net/execnet/")
8182 (license license:expat)))
8183
8184 (define-public python2-execnet
8185 (package-with-python2 python-execnet))
8186
8187 (define-public python-icalendar
8188 (package
8189 (name "python-icalendar")
8190 (version "4.0.3")
8191 (source (origin
8192 (method url-fetch)
8193 (uri (pypi-uri "icalendar" version))
8194 (sha256
8195 (base32
8196 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8197 (build-system python-build-system)
8198 (propagated-inputs
8199 `(("python-dateutil" ,python-dateutil)
8200 ("python-pytz" ,python-pytz)))
8201 (synopsis "Python library for parsing iCalendar files")
8202 (description "The icalendar package is a parser/generator of iCalendar
8203 files for use with Python.")
8204 (home-page "https://github.com/collective/icalendar")
8205 (license license:bsd-2)))
8206
8207 (define-public python-args
8208 (package
8209 (name "python-args")
8210 (version "0.1.0")
8211 (source (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "args" version))
8214 (sha256
8215 (base32
8216 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8217 (build-system python-build-system)
8218 (home-page "https://github.com/kennethreitz/args")
8219 (synopsis "Command-line argument parser")
8220 (description
8221 "This library provides a Python module to parse command-line arguments.")
8222 (license license:bsd-3)))
8223
8224 (define-public python2-args
8225 (package-with-python2 python-args))
8226
8227 (define-public python-clint
8228 (package
8229 (name "python-clint")
8230 (version "0.5.1")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "clint" version))
8234 (sha256
8235 (base32
8236 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8237 (build-system python-build-system)
8238 (arguments
8239 '(#:phases
8240 (modify-phases %standard-phases
8241 (replace 'check
8242 (lambda _ (invoke "py.test" "-v"))))))
8243 (native-inputs
8244 `(("python-pytest" ,python-pytest)))
8245 (propagated-inputs
8246 `(("python-args" ,python-args)))
8247 (home-page "https://github.com/kennethreitz/clint")
8248 (synopsis "Command-line interface tools")
8249 (description
8250 "Clint is a Python module filled with a set of tools for developing
8251 command-line applications, including tools for colored and indented
8252 output, progress bar display, and pipes.")
8253 (license license:isc)))
8254
8255 (define-public python2-clint
8256 (package-with-python2 python-clint))
8257
8258 (define-public python-rply
8259 (package
8260 (name "python-rply")
8261 (version "0.7.5")
8262 (source (origin
8263 (method url-fetch)
8264 (uri (pypi-uri "rply" version))
8265 (sha256
8266 (base32
8267 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8268 (build-system python-build-system)
8269 (propagated-inputs
8270 `(("python-appdirs" ,python-appdirs)))
8271 (home-page "https://github.com/alex/rply")
8272 (synopsis "Parser generator for Python")
8273 (description
8274 "This package provides a pure Python based parser generator, that also
8275 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8276 with a new public API, and RPython support.")
8277 (license license:bsd-3)))
8278
8279 (define-public python2-rply
8280 (package-with-python2 python-rply))
8281
8282 (define-public python-hy
8283 (package
8284 (name "python-hy")
8285 (version "0.13.0")
8286 (source (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "hy" version))
8289 (sha256
8290 (base32
8291 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8292 (build-system python-build-system)
8293 (arguments
8294 '(#:phases
8295 (modify-phases %standard-phases
8296 (replace 'check
8297 (lambda _
8298 ;; Tests require write access to HOME.
8299 (setenv "HOME" "/tmp")
8300 (invoke "nosetests"))))))
8301 (native-inputs
8302 `(("python-coverage" ,python-coverage)
8303 ("python-nose" ,python-nose)))
8304 (propagated-inputs
8305 `(("python-astor" ,python-astor)
8306 ("python-clint" ,python-clint)
8307 ("python-rply" ,python-rply)))
8308 (home-page "http://hylang.org/")
8309 (synopsis "Lisp frontend to Python")
8310 (description
8311 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8312 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8313 Python at your fingertips, in Lisp form.")
8314 (license license:expat)))
8315
8316 (define-public python2-hy
8317 (package-with-python2 python-hy))
8318
8319 (define-public python2-functools32
8320 (package
8321 (name "python2-functools32")
8322 (version "3.2.3-2")
8323 (source
8324 (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "functools32" version))
8327 (sha256
8328 (base32
8329 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8330 (build-system python-build-system)
8331 (arguments
8332 `(#:python ,python-2
8333 #:tests? #f)) ; no test target
8334 (home-page "https://github.com/MiCHiLU/python-functools32")
8335 (synopsis
8336 "Backport of the functools module from Python 3.2.3")
8337 (description
8338 "This package is a backport of the @code{functools} module from Python
8339 3.2.3 for use with older versions of Python and PyPy.")
8340 (license license:expat)))
8341
8342 (define-public python2-subprocess32
8343 (package
8344 (name "python2-subprocess32")
8345 (version "3.2.7")
8346 (source (origin
8347 (method url-fetch)
8348 (uri (pypi-uri "subprocess32" version))
8349 (sha256
8350 (base32
8351 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8352 (patches
8353 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8354 (build-system python-build-system)
8355 (arguments
8356 `(#:python ,python-2
8357 ;; The test suite fails with Python > 2.7.13:
8358 ;; import test.support
8359 ;; ImportError: No module named support
8360 #:tests? #f
8361 #:phases
8362 (modify-phases %standard-phases
8363 (add-after 'unpack 'patch-/bin/sh
8364 (lambda _
8365 (substitute* '("subprocess32.py"
8366 "test_subprocess32.py")
8367 (("/bin/sh") (which "sh")))
8368 #t)))))
8369 (home-page "https://github.com/google/python-subprocess32")
8370 (synopsis "Backport of the subprocess module from Python 3.2")
8371 (description
8372 "This is a backport of the @code{subprocess} standard library module
8373 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8374 new features. On POSIX systems it is guaranteed to be reliable when used
8375 in threaded applications. It includes timeout support from Python 3.3 but
8376 otherwise matches 3.2’s API.")
8377 (license license:psfl)))
8378
8379 (define-public python2-futures
8380 (package
8381 (name "python2-futures")
8382 (version "3.2.0")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "futures" version))
8387 (sha256
8388 (base32
8389 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8390 (build-system python-build-system)
8391 (arguments
8392 `(#:python ,python-2
8393 #:phases
8394 (modify-phases %standard-phases
8395 (replace 'check
8396 (lambda _
8397 (invoke "python" "test_futures.py")
8398 #t)))))
8399 (home-page "https://github.com/agronholm/pythonfutures")
8400 (synopsis
8401 "Backport of the concurrent.futures package from Python 3.2")
8402 (description
8403 "The concurrent.futures module provides a high-level interface for
8404 asynchronously executing callables. This package backports the
8405 concurrent.futures package from Python 3.2")
8406 (license license:bsd-3)))
8407
8408 (define-public python-promise
8409 (package
8410 (name "python-promise")
8411 (version "0.4.2")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "promise" version))
8416 (sha256
8417 (base32
8418 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8419 (build-system python-build-system)
8420 ;; Tests wants python-futures, which is a python2 only program, and
8421 ;; can't be found by python-promise at test time.
8422 (arguments `(#:tests? #f))
8423 (home-page "https://github.com/syrusakbary/promise")
8424 (synopsis "Promises/A+ implementation for Python")
8425 (description
8426 "Promises/A+ implementation for Python")
8427 (properties `((python2-variant . ,(delay python2-promise))))
8428 (license license:expat)))
8429
8430 (define-public python2-promise
8431 (let ((promise (package-with-python2
8432 (strip-python2-variant python-promise))))
8433 (package (inherit promise)
8434 (arguments (substitute-keyword-arguments (package-arguments promise)
8435 ((#:tests? _) #t)))
8436 (native-inputs
8437 `(("python2-futures" ,python2-futures)
8438 ("python2-pytest" ,python2-pytest)
8439 ,@(package-native-inputs promise))))))
8440
8441 (define-public python-colorama
8442 (package
8443 (name "python-colorama")
8444 (version "0.3.9")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (pypi-uri "colorama" version))
8449 (sha256
8450 (base32
8451 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8452 (build-system python-build-system)
8453 (synopsis "Colored terminal text rendering for Python")
8454 (description "Colorama is a Python library for rendering colored terminal
8455 text.")
8456 (home-page "https://pypi.python.org/pypi/colorama")
8457 (license license:bsd-3)))
8458
8459 (define-public python2-colorama
8460 (package-with-python2 python-colorama))
8461
8462 (define-public python-rsa
8463 (package
8464 (name "python-rsa")
8465 (version "3.4.2")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "rsa" version))
8470 (sha256
8471 (base32
8472 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8473 (build-system python-build-system)
8474 (propagated-inputs
8475 `(("python-pyasn1" ,python-pyasn1)))
8476 (synopsis "Pure-Python RSA implementation")
8477 (description "Python-RSA is a pure-Python RSA implementation. It supports
8478 encryption and decryption, signing and verifying signatures, and key
8479 generation according to PKCS#1 version 1.5. It can be used as a Python
8480 library as well as on the command line.")
8481 (home-page "https://stuvel.eu/rsa")
8482 (license license:asl2.0)))
8483
8484 (define-public python2-rsa
8485 (package-with-python2 python-rsa))
8486
8487 (define-public python-pluggy
8488 (package
8489 (name "python-pluggy")
8490 (version "0.11.0")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "pluggy" version))
8495 (sha256
8496 (base32
8497 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8498 (build-system python-build-system)
8499 (native-inputs
8500 `(("python-setuptools-scm" ,python-setuptools-scm)))
8501 (synopsis "Plugin and hook calling mechanism for Python")
8502 (description "Pluggy is an extraction of the plugin manager as used by
8503 Pytest but stripped of Pytest specific details.")
8504 (home-page "https://pypi.python.org/pypi/pluggy")
8505 (license license:expat)))
8506
8507 (define-public python2-pluggy
8508 (package-with-python2 python-pluggy))
8509
8510 (define-public python-tox
8511 (package
8512 (name "python-tox")
8513 (version "2.8.1")
8514 (source
8515 (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "tox" version))
8518 (sha256
8519 (base32
8520 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8521 (build-system python-build-system)
8522 (arguments
8523 ;; FIXME: Tests require pytest-timeout, which itself requires
8524 ;; pytest>=2.8.0 for installation.
8525 '(#:tests? #f))
8526 (propagated-inputs
8527 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8528 ("python-py" ,python-py)
8529 ("python-virtualenv" ,python-virtualenv)))
8530 (native-inputs
8531 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8532 ("python-pytest" ,python-pytest) ; >= 2.3.5
8533 ("python-setuptools-scm" ,python-setuptools-scm)))
8534 (home-page "http://tox.testrun.org/")
8535 (synopsis "Virtualenv-based automation of test activities")
8536 (description "Tox is a generic virtualenv management and test command line
8537 tool. It can be used to check that a package installs correctly with
8538 different Python versions and interpreters, or run tests in each type of
8539 supported environment, or act as a frontend to continuous integration
8540 servers.")
8541 (license license:expat)))
8542
8543 (define-public python2-tox
8544 (package-with-python2 python-tox))
8545
8546 (define-public python-jmespath
8547 (package
8548 (name "python-jmespath")
8549 (version "0.9.3")
8550 (source
8551 (origin
8552 (method url-fetch)
8553 (uri (pypi-uri "jmespath" version))
8554 (sha256
8555 (base32
8556 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8557 (build-system python-build-system)
8558 (native-inputs
8559 `(("python-nose" ,python-nose)))
8560 (synopsis "JSON Matching Expressions")
8561 (description "JMESPath (pronounced “james path”) is a Python library that
8562 allows one to declaratively specify how to extract elements from a JSON
8563 document.")
8564 (home-page "https://github.com/jmespath/jmespath.py")
8565 (license license:expat)))
8566
8567 (define-public python2-jmespath
8568 (package-with-python2 python-jmespath))
8569
8570 (define-public python-botocore
8571 (package
8572 (name "python-botocore")
8573 (version "1.12.149")
8574 (source
8575 (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "botocore" version))
8578 (sha256
8579 (base32
8580 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8581 (build-system python-build-system)
8582 (arguments
8583 ;; FIXME: Many tests are failing.
8584 '(#:tests? #f))
8585 (propagated-inputs
8586 `(("python-dateutil" ,python-dateutil)
8587 ("python-docutils" ,python-docutils)
8588 ("python-jmespath" ,python-jmespath)))
8589 (native-inputs
8590 `(("python-mock" ,python-mock)
8591 ("python-nose" ,python-nose)
8592 ("behave" ,behave)
8593 ("python-tox" ,python-tox)
8594 ("python-urllib3" ,python-urllib3)
8595 ("python-wheel" ,python-wheel)))
8596 (home-page "https://github.com/boto/botocore")
8597 (synopsis "Low-level interface to AWS")
8598 (description "Botocore is a Python library that provides a low-level
8599 interface to the Amazon Web Services (AWS) API.")
8600 (license license:asl2.0)))
8601
8602 (define-public python2-botocore
8603 (package-with-python2 python-botocore))
8604
8605 (define-public python-xdo
8606 (package
8607 (name "python-xdo")
8608 (version "0.3")
8609 (source (origin
8610 (method url-fetch)
8611 (uri (string-append
8612 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8613 "python-xdo_" version ".orig.tar.gz"))
8614 (sha256
8615 (base32
8616 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8617 (build-system python-build-system)
8618 (arguments
8619 '(#:phases
8620 (modify-phases %standard-phases
8621 (add-before 'install 'patch-libxdo-path
8622 ;; Hardcode the path of dynamically loaded libxdo library.
8623 (lambda* (#:key inputs #:allow-other-keys)
8624 (let ((libxdo (string-append
8625 (assoc-ref inputs "xdotool")
8626 "/lib/libxdo.so")))
8627 (substitute* "xdo/_xdo.py"
8628 (("find_library\\(\"xdo\"\\)")
8629 (simple-format #f "\"~a\"" libxdo)))
8630 #t))))
8631 #:tests? #f)) ; no tests provided
8632 (propagated-inputs
8633 `(("python-six" ,python-six)))
8634 (inputs
8635 `(("xdotool" ,xdotool)
8636 ("libX11" ,libx11)))
8637 (home-page "https://tracker.debian.org/pkg/python-xdo")
8638 (synopsis "Python library for simulating X11 keyboard/mouse input")
8639 (description "Provides bindings to libxdo for manipulating X11 via simulated
8640 input. (Note that this is mostly a legacy library; you may wish to look at
8641 python-xdo for newer bindings.)")
8642 (license license:bsd-3)))
8643
8644 (define-public python2-xdo
8645 (package-with-python2 python-xdo))
8646
8647 (define-public python-mako
8648 (package
8649 (name "python-mako")
8650 (version "1.0.13")
8651 (source
8652 (origin
8653 (method url-fetch)
8654 (uri (pypi-uri "Mako" version))
8655 (sha256
8656 (base32
8657 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8658 (build-system python-build-system)
8659 (propagated-inputs
8660 `(("python-markupsafe" ,python-markupsafe)))
8661 (native-inputs
8662 `(("python-mock" ,python-mock)
8663 ("python-nose" ,python-nose)
8664 ("python-pytest" ,python-pytest)))
8665 (home-page "https://www.makotemplates.org/")
8666 (synopsis "Templating language for Python")
8667 (description "Mako is a templating language for Python that compiles
8668 templates into Python modules.")
8669 (license license:expat)))
8670
8671 (define-public python2-mako
8672 (package-with-python2 python-mako))
8673
8674 (define-public python-waitress
8675 (package
8676 (name "python-waitress")
8677 (version "1.1.0")
8678 (source
8679 (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "waitress" version))
8682 (patches (search-patches "python-waitress-fix-tests.patch"))
8683 (sha256
8684 (base32
8685 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8686 (build-system python-build-system)
8687 (home-page "https://github.com/Pylons/waitress")
8688 (synopsis "Waitress WSGI server")
8689 (description "Waitress is meant to be a production-quality pure-Python WSGI
8690 server with very acceptable performance.")
8691 (license license:zpl2.1)))
8692
8693 (define-public python2-waitress
8694 (package-with-python2 python-waitress))
8695
8696 (define-public python-pyquery
8697 (package
8698 (name "python-pyquery")
8699 (version "1.2.17")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "pyquery" version))
8704 (sha256
8705 (base32
8706 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8707 (build-system python-build-system)
8708 (native-inputs
8709 `(("python-webob" ,python-webob)
8710 ("python-webtest" ,python-webtest)))
8711 (propagated-inputs
8712 `(("python-lxml" ,python-lxml)
8713 ("python-cssselect" ,python-cssselect)))
8714 (home-page "https://github.com/gawel/pyquery")
8715 (synopsis "Make jQuery-like queries on xml documents")
8716 (description "pyquery allows you to make jQuery queries on xml documents.
8717 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8718 fast xml and html manipulation.")
8719 (license license:bsd-3)))
8720
8721 (define-public python-anyjson
8722 (package
8723 (name "python-anyjson")
8724 (version "0.3.3")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "anyjson" version))
8729 (sha256
8730 (base32
8731 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8732 (build-system python-build-system)
8733 (arguments
8734 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8735 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8736 ;; whatever) so this transformation needs to be done before the tests
8737 ;; can be run. Maybe we could add a build step to transform beforehand
8738 ;; but it could be annoying/difficult.
8739 ;; We can enable tests for the Python 2 version, though, and do below.
8740 #:tests? #f))
8741 (home-page "https://bitbucket.org/runeh/anyjson/")
8742 (synopsis
8743 "Wraps best available JSON implementation in a common interface")
8744 (description
8745 "Anyjson loads whichever is the fastest JSON module installed
8746 and provides a uniform API regardless of which JSON implementation is used.")
8747 (license license:bsd-3)
8748 (properties `((python2-variant . ,(delay python2-anyjson))))))
8749
8750 (define-public python2-anyjson
8751 (let ((anyjson (package-with-python2
8752 (strip-python2-variant python-anyjson))))
8753 (package
8754 (inherit anyjson)
8755 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8756 #:tests? #t
8757 ,@(package-arguments anyjson)))
8758 (native-inputs `(("python2-nose" ,python2-nose))))))
8759
8760 (define-public python-amqp
8761 (package
8762 (name "python-amqp")
8763 (version "2.3.2")
8764 (source
8765 (origin
8766 (method url-fetch)
8767 (uri (pypi-uri "amqp" version))
8768 (sha256
8769 (base32
8770 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8771 (build-system python-build-system)
8772 (native-inputs
8773 `(("python-case" ,python-case)
8774 ("python-pytest-sugar" ,python-pytest-sugar)
8775 ("python-mock" ,python-mock)))
8776 (propagated-inputs
8777 `(("python-vine" ,python-vine)))
8778 (home-page "https://github.com/celery/py-amqp")
8779 (synopsis
8780 "Low-level AMQP client for Python (fork of amqplib)")
8781 (description
8782 "This is a fork of amqplib which was originally written by Barry Pederson.
8783 It is maintained by the Celery project, and used by kombu as a pure python
8784 alternative when librabbitmq is not available.")
8785 (license license:lgpl2.1+)
8786 (properties `((python2-variant . ,(delay python2-amqp))))))
8787
8788 (define-public python2-amqp
8789 (let ((amqp (package-with-python2
8790 (strip-python2-variant python-amqp))))
8791 (package
8792 (inherit amqp)
8793 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8794 ;; unmaintained. Weirdly, does not do this on the python 3
8795 ;; version?
8796 #:tests? #f
8797 ,@(package-arguments amqp))))))
8798
8799 (define-public python-txamqp
8800 (package
8801 (name "python-txamqp")
8802 (version "0.8.2")
8803 (source
8804 (origin
8805 (method url-fetch)
8806 (uri (pypi-uri "txAMQP" version))
8807 (sha256
8808 (base32
8809 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8810 (build-system python-build-system)
8811 (propagated-inputs
8812 `(("python-six" ,python-six)
8813 ("python-twisted" ,python-twisted)))
8814 (home-page "https://github.com/txamqp/txamqp")
8815 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8816 (description
8817 "This package provides a Python library for communicating with AMQP peers
8818 and brokers using the asynchronous networking framework Twisted. It contains
8819 all the necessary code to connect, send and receive messages to/from an
8820 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8821 also includes support for using Thrift RPC over AMQP in Twisted
8822 applications.")
8823 (license license:asl2.0)))
8824
8825 (define-public python2-txamqp
8826 (package-with-python2 python-txamqp))
8827
8828 (define-public python-kombu
8829 (package
8830 (name "python-kombu")
8831 (version "4.2.2")
8832 (source
8833 (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "kombu" version))
8836 (sha256
8837 (base32
8838 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8839 (build-system python-build-system)
8840 (native-inputs
8841 `(("python-mock" ,python-mock)
8842 ("python-case" ,python-case)
8843 ("python-pyro4" ,python-pyro4)
8844 ("python-pytest-sugar" ,python-pytest-sugar)
8845 ("python-pytz" ,python-pytz)))
8846 (propagated-inputs
8847 `(("python-anyjson" ,python-anyjson)
8848 ("python-amqp" ,python-amqp)
8849 ("python-redis" ,python-redis)))
8850 (home-page "https://kombu.readthedocs.io")
8851 (synopsis "Message passing library for Python")
8852 (description "The aim of Kombu is to make messaging in Python as easy as
8853 possible by providing an idiomatic high-level interface for the AMQ protocol,
8854 and also provide proven and tested solutions to common messaging problems.
8855 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8856 message orientation, queuing, routing, reliability and security, for which the
8857 RabbitMQ messaging server is the most popular implementation.")
8858 (license license:bsd-3)
8859 (properties `((python2-variant . ,(delay python2-kombu))))))
8860
8861 (define-public python2-kombu
8862 (let ((kombu (package-with-python2
8863 (strip-python2-variant python-kombu))))
8864 (package
8865 (inherit kombu)
8866 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8867 ;; It works fine on the python3 variant.
8868 #:tests? #f
8869 ,@(package-arguments kombu)))
8870 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8871 ,@(package-native-inputs kombu))))))
8872
8873 (define-public python-billiard
8874 (package
8875 (name "python-billiard")
8876 (version "3.5.0.5")
8877 (source
8878 (origin
8879 (method url-fetch)
8880 (uri (pypi-uri "billiard" version))
8881 (sha256
8882 (base32
8883 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8884 (build-system python-build-system)
8885 (native-inputs
8886 `(("python-case" ,python-case)
8887 ("python-pytest" ,python-pytest)))
8888 (home-page "https://github.com/celery/billiard")
8889 (synopsis
8890 "Python multiprocessing fork with improvements and bugfixes")
8891 (description
8892 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8893 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8894 pyprocessing package. This standalone variant is intended to be compatible with
8895 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8896 (license license:bsd-3)
8897 (properties `((python2-variant . ,(delay python2-billiard))))))
8898
8899 (define-public python2-billiard
8900 (let ((billiard (package-with-python2
8901 (strip-python2-variant python-billiard))))
8902 (package
8903 (inherit billiard)
8904 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8905 ("python2-mock" ,python2-mock)
8906 ,@(package-native-inputs billiard))))))
8907
8908 (define-public python-celery
8909 (package
8910 (name "python-celery")
8911 (version "4.2.1")
8912 (source
8913 (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "celery" version))
8916 (sha256
8917 (base32
8918 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8919 (build-system python-build-system)
8920 (arguments
8921 '(;; TODO The tests fail with Python 3.7
8922 ;; https://github.com/celery/celery/issues/4849
8923 #:tests? #f
8924 #:phases
8925 (modify-phases %standard-phases
8926 (add-after 'unpack 'patch-requirements
8927 (lambda _
8928 (substitute* "requirements/test.txt"
8929 (("pytest>=3\\.0,<3\\.3")
8930 "pytest>=3.0"))
8931 #t)))))
8932 (native-inputs
8933 `(("python-case" ,python-case)
8934 ("python-pytest" ,python-pytest)))
8935 (propagated-inputs
8936 `(("python-pytz" ,python-pytz)
8937 ("python-billiard" ,python-billiard)
8938 ("python-kombu" ,python-kombu)))
8939 (home-page "https://celeryproject.org")
8940 (synopsis "Distributed Task Queue")
8941 (description "Celery is an asynchronous task queue/job queue based on
8942 distributed message passing. It is focused on real-time operation, but
8943 supports scheduling as well. The execution units, called tasks, are executed
8944 concurrently on a single or more worker servers using multiprocessing,
8945 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8946 synchronously (wait until ready).")
8947 (license license:bsd-3)
8948 (properties `((python2-variant . ,(delay python2-celery))))))
8949
8950 (define-public python2-celery
8951 (let ((celery (package-with-python2
8952 (strip-python2-variant python-celery))))
8953 (package
8954 (inherit celery)
8955 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8956 ("python2-mock" ,python2-mock)
8957 ,@(package-native-inputs celery))))))
8958
8959 (define-public python-translitcodec
8960 (package
8961 (name "python-translitcodec")
8962 (version "0.4.0")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "translitcodec" version))
8967 (sha256
8968 (base32
8969 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8970 (build-system python-build-system)
8971 (arguments
8972 `(#:tests? #f)) ; no tests provided
8973 (home-page
8974 "https://github.com/claudep/translitcodec")
8975 (synopsis
8976 "Unicode to 8-bit charset transliteration codec")
8977 (description
8978 "This package contains codecs for transliterating ISO 10646 texts into
8979 best-effort representations using smaller coded character sets (ASCII,
8980 ISO 8859, etc.).")
8981 (license license:expat)))
8982
8983 (define-public python2-translitcodec
8984 (package-with-python2 python-translitcodec))
8985
8986 (define-public python-editor
8987 (package
8988 (name "python-editor")
8989 (version "0.5")
8990 (source
8991 (origin
8992 (method url-fetch)
8993 (uri (pypi-uri "python-editor" version))
8994 (sha256
8995 (base32
8996 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8997 (build-system python-build-system)
8998 (home-page
8999 "https://github.com/fmoo/python-editor")
9000 (synopsis
9001 "Programmatically open an editor, capture the result")
9002 (description
9003 "python-editor is a library that provides the editor module for
9004 programmatically interfacing with your system's $EDITOR.")
9005 (license license:asl2.0)))
9006
9007 (define-public python2-editor
9008 (package-with-python2 python-editor))
9009
9010 (define-public python-vobject
9011 (package
9012 (name "python-vobject")
9013 (version "0.9.5")
9014 (source (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "vobject" version))
9017 (sha256
9018 (base32
9019 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9020 (build-system python-build-system)
9021 (arguments
9022 '(;; The test suite relies on some non-portable Windows interfaces.
9023 #:tests? #f))
9024 (propagated-inputs
9025 `(("python-dateutil" ,python-dateutil)
9026 ("python-pyicu" ,python-pyicu)))
9027 (synopsis "Parse and generate vCard and vCalendar files")
9028 (description "Vobject is intended to be a full featured Python package for
9029 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9030 are supported and well tested. vCard 3.0 files are supported, and all data
9031 should be imported, but only a few components are understood in a sophisticated
9032 way.")
9033 (home-page "http://eventable.github.io/vobject/")
9034 (license license:asl2.0)))
9035
9036 (define-public python2-vobject
9037 (package-with-python2 python-vobject))
9038
9039 (define-public python-munkres
9040 (package
9041 (name "python-munkres")
9042 (version "1.0.8")
9043 (source (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "munkres" version))
9046 (sha256
9047 (base32
9048 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9049 (build-system python-build-system)
9050 (arguments
9051 '(#:tests? #f)) ; no test suite
9052 (home-page "http://software.clapper.org/munkres/")
9053 (synopsis "Implementation of the Munkres algorithm")
9054 (description "The Munkres module provides an implementation of the Munkres
9055 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9056 useful for solving the Assignment Problem.")
9057 (license license:bsd-3)))
9058
9059 (define-public python2-munkres
9060 (package-with-python2 python-munkres))
9061
9062 (define-public python-whoosh
9063 (package
9064 (name "python-whoosh")
9065 (version "2.7.4")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (pypi-uri "Whoosh" version))
9070 (sha256
9071 (base32
9072 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9073 (build-system python-build-system)
9074 (native-inputs
9075 `(("python-pytest" ,python-pytest)))
9076 (home-page "https://bitbucket.org/mchaput/whoosh")
9077 (synopsis "Full text indexing, search, and spell checking library")
9078 (description
9079 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9080 checking library.")
9081 (license license:bsd-2)))
9082
9083 (define-public python2-whoosh
9084 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9085 (package (inherit whoosh)
9086 (propagated-inputs
9087 `(("python2-backport-ssl-match-hostname"
9088 ,python2-backport-ssl-match-hostname)
9089 ,@(package-propagated-inputs whoosh))))))
9090
9091 (define-public python-pathlib
9092 (package
9093 (name "python-pathlib")
9094 (version "1.0.1")
9095 (source (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "pathlib" version))
9098 (sha256
9099 (base32
9100 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9101 (build-system python-build-system)
9102 ;; The tests depend on the internal "test" module, which does not provide
9103 ;; a stable interface.
9104 (arguments `(#:tests? #f))
9105 (home-page "https://pathlib.readthedocs.org/")
9106 (synopsis "Object-oriented file system paths")
9107 (description "Pathlib offers a set of classes to handle file system paths.
9108 It offers the following advantages over using string objects:
9109
9110 @enumerate
9111 @item No more cumbersome use of os and os.path functions. Everything can
9112 be done easily through operators, attribute accesses, and method calls.
9113 @item Embodies the semantics of different path types. For example,
9114 comparing Windows paths ignores casing.
9115 @item Well-defined semantics, eliminating any inconsistencies or
9116 ambiguities (forward vs. backward slashes, etc.).
9117 @end enumerate
9118
9119 Note: In Python 3.4, pathlib is now part of the standard library. For other
9120 Python versions please consider python-pathlib2 instead, which tracks the
9121 standard library module. This module (python-pathlib) isn't maintained
9122 anymore.")
9123 (license license:expat)))
9124
9125 (define-public python2-pathlib
9126 (package-with-python2 python-pathlib))
9127
9128 (define-public python2-pathlib2
9129 (package
9130 (name "python2-pathlib2")
9131 (version "2.3.3")
9132 (source (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "pathlib2" version))
9135 (sha256
9136 (base32
9137 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9138 (build-system python-build-system)
9139 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9140 ;; version is 3.4 which already includes this package as part of the
9141 ;; standard library.
9142 (arguments
9143 `(#:python ,python-2))
9144 (propagated-inputs
9145 `(("python2-scandir" ,python2-scandir)
9146 ("python2-six" ,python2-six)))
9147 (home-page "https://pypi.python.org/pypi/pathlib2/")
9148 (synopsis "Object-oriented file system paths - backport of standard
9149 pathlib module")
9150 (description "The goal of pathlib2 is to provide a backport of standard
9151 pathlib module which tracks the standard library module, so all the newest
9152 features of the standard pathlib can be used also on older Python versions.
9153
9154 Pathlib offers a set of classes to handle file system paths. It offers the
9155 following advantages over using string objects:
9156
9157 @enumerate
9158 @item No more cumbersome use of os and os.path functions. Everything can
9159 be done easily through operators, attribute accesses, and method calls.
9160 @item Embodies the semantics of different path types. For example,
9161 comparing Windows paths ignores casing.
9162 @item Well-defined semantics, eliminating any inconsistencies or
9163 ambiguities (forward vs. backward slashes, etc.).
9164 @end enumerate")
9165 (license license:expat)))
9166
9167 (define-public python2-pathlib2-bootstrap
9168 (hidden-package
9169 (package
9170 (inherit python2-pathlib2)
9171 (name "python2-pathlib2-bootstrap")
9172 (propagated-inputs
9173 `(("python2-scandir" ,python2-scandir)
9174 ("python2-six" ,python2-six-bootstrap))))))
9175
9176 (define-public python-jellyfish
9177 (package
9178 (name "python-jellyfish")
9179 (version "0.5.6")
9180 (source (origin
9181 (method url-fetch)
9182 (uri (pypi-uri "jellyfish" version))
9183 (sha256
9184 (base32
9185 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9186 (build-system python-build-system)
9187 (native-inputs
9188 `(("python-pytest" ,python-pytest)))
9189 (home-page "https://github.com/jamesturk/jellyfish")
9190 (synopsis "Approximate and phonetic matching of strings")
9191 (description "Jellyfish uses a variety of string comparison and phonetic
9192 encoding algorithms to do fuzzy string matching.")
9193 (license license:bsd-2)
9194 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9195
9196 (define-public python2-jellyfish
9197 (let ((jellyfish (package-with-python2
9198 (strip-python2-variant python-jellyfish))))
9199 (package (inherit jellyfish)
9200 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9201 ,@(package-native-inputs jellyfish))))))
9202
9203 (define-public python2-unicodecsv
9204 (package
9205 (name "python2-unicodecsv")
9206 (version "0.14.1")
9207 (source (origin
9208 (method url-fetch)
9209 ;; The test suite is not included in the PyPi release.
9210 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9211 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9212 "archive/" version ".tar.gz"))
9213 (file-name (string-append name "-" version ".tar.gz"))
9214 (sha256
9215 (base32
9216 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9217 (build-system python-build-system)
9218 (arguments
9219 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9220 #:python ,python-2))
9221 (native-inputs
9222 `(("python2-unittest2" ,python2-unittest2)))
9223 (home-page "https://github.com/jdunck/python-unicodecsv")
9224 (synopsis "Unicode CSV module for Python 2")
9225 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9226 module, adding support for Unicode strings.")
9227 (license license:bsd-2)))
9228
9229 (define-public python-rarfile
9230 (package
9231 (name "python-rarfile")
9232 (version "2.8")
9233 (source (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "rarfile" version))
9236 (sha256
9237 (base32
9238 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9239 (build-system python-build-system)
9240 (arguments
9241 '(#:phases
9242 (modify-phases %standard-phases
9243 (replace 'check
9244 ;; Many tests fail, but the installation proceeds.
9245 (lambda _ (invoke "make" "-C" "test" "test"))))))
9246 (native-inputs
9247 `(("which" ,which))) ; required for tests
9248 (propagated-inputs
9249 `(("libarchive" ,libarchive)))
9250 (home-page "https://github.com/markokr/rarfile")
9251 (synopsis "RAR archive reader for Python")
9252 (description "This is Python module for RAR archive reading. The interface
9253 is made as zipfile like as possible.")
9254 (license license:isc)))
9255
9256 (define-public python2-rarfile
9257 (package-with-python2 python-rarfile))
9258
9259 (define-public python-magic
9260 (package
9261 (name "python-magic")
9262 (version "0.4.15")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "python-magic" version))
9267 (sha256
9268 (base32
9269 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9270 (file-name (string-append name "-" version "-checkout"))))
9271 (build-system python-build-system)
9272 (arguments
9273 ;; The tests are unreliable, so don't run them. The tests fail
9274 ;; under Python3 because they were written for Python2 and
9275 ;; contain import statements that do not work in Python3. One of
9276 ;; the tests fails under Python2 because its assertions are
9277 ;; overly stringent; it relies on comparing output strings which
9278 ;; are brittle and can change depending on the version of
9279 ;; libmagic being used and the system on which the test is
9280 ;; running. In my case, under GuixSD 0.10.0, only one test
9281 ;; failed, and it seems to have failed only because the version
9282 ;; of libmagic that is packaged in Guix outputs a slightly
9283 ;; different (but not wrong) string than the one that the test
9284 ;; expected.
9285 '(#:tests? #f
9286 #:phases (modify-phases %standard-phases
9287 ;; Replace a specific method call with a hard-coded
9288 ;; path to the necessary libmagic.so file in the
9289 ;; store. If we don't do this, then the method call
9290 ;; will fail to find the libmagic.so file, which in
9291 ;; turn will cause any application using
9292 ;; python-magic to fail.
9293 (add-before 'build 'hard-code-path-to-libmagic
9294 (lambda* (#:key inputs #:allow-other-keys)
9295 (let ((file (assoc-ref inputs "file")))
9296 (substitute* "magic.py"
9297 (("ctypes.util.find_library\\('magic'\\)")
9298 (string-append "'" file "/lib/libmagic.so'")))
9299 #t)))
9300 (add-before 'install 'disable-egg-compression
9301 (lambda _
9302 (let ((port (open-file "setup.cfg" "a")))
9303 (display "\n[easy_install]\nzip_ok = 0\n"
9304 port)
9305 (close-port port)
9306 #t))))))
9307 (inputs
9308 ;; python-magic needs to be able to find libmagic.so.
9309 `(("file" ,file)))
9310 (home-page
9311 "https://github.com/ahupp/python-magic")
9312 (synopsis
9313 "File type identification using libmagic")
9314 (description
9315 "This module uses ctypes to access the libmagic file type
9316 identification library. It makes use of the local magic database and
9317 supports both textual and MIME-type output. Note that this module and
9318 the python-file module both provide a \"magic.py\" file; these two
9319 modules, which are different and were developed separately, both serve
9320 the same purpose: to provide Python bindings for libmagic.")
9321 (license license:expat)))
9322
9323 (define-public python2-magic
9324 (package-with-python2 python-magic))
9325
9326 (define-public python2-s3cmd
9327 (package
9328 (name "python2-s3cmd")
9329 (version "1.6.1")
9330 (source
9331 (origin
9332 (method url-fetch)
9333 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9334 "s3cmd-" version ".tar.gz"))
9335 (sha256
9336 (base32
9337 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9338 (build-system python-build-system)
9339 (arguments
9340 ;; s3cmd is written for python2 only and contains no tests.
9341 `(#:python ,python-2
9342 #:tests? #f))
9343 (propagated-inputs
9344 `(("python2-dateutil" ,python2-dateutil)
9345 ;; The python-file package also provides a magic.py module.
9346 ;; This is an unfortunate state of affairs; however, s3cmd
9347 ;; fails to install if it cannot find specifically the
9348 ;; python-magic package. Thus we include it, instead of using
9349 ;; python-file. Ironically, s3cmd sometimes works better
9350 ;; without libmagic bindings at all:
9351 ;; https://github.com/s3tools/s3cmd/issues/198
9352 ("python2-magic" ,python2-magic)))
9353 (home-page "http://s3tools.org/s3cmd")
9354 (synopsis "Command line tool for S3-compatible storage services")
9355 (description
9356 "S3cmd is a command line tool for uploading, retrieving and managing data
9357 in storage services that are compatible with the Amazon Simple Storage
9358 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9359 GnuPG encryption, and more. It also supports management of Amazon's
9360 CloudFront content delivery network.")
9361 (license license:gpl2+)))
9362
9363 (define-public python-pkgconfig
9364 (package
9365 (name "python-pkgconfig")
9366 (version "1.3.1")
9367 (source
9368 (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "pkgconfig" version))
9371 (sha256
9372 (base32
9373 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9374 (build-system python-build-system)
9375 (native-inputs
9376 `(("python-nose" ,python-nose)))
9377 (inputs
9378 `(("pkg-config" ,pkg-config)))
9379 (arguments
9380 `(#:phases
9381 (modify-phases %standard-phases
9382 (add-before 'build 'patch
9383 ;; Hard-code the path to pkg-config.
9384 (lambda _
9385 (substitute* "pkgconfig/pkgconfig.py"
9386 (("cmd = 'pkg-config")
9387 (string-append "cmd = '" (which "pkg-config"))))
9388 #t))
9389 (replace 'check
9390 (lambda _
9391 (invoke "nosetests" "test.py"))))))
9392 (home-page "https://github.com/matze/pkgconfig")
9393 (synopsis "Python interface for pkg-config")
9394 (description "This module provides a Python interface to pkg-config. It
9395 can be used to find all pkg-config packages, check if a package exists,
9396 check if a package meets certain version requirements, query CFLAGS and
9397 LDFLAGS and parse the output to build extensions with setup.py.")
9398 (license license:expat)))
9399
9400 (define-public python2-pkgconfig
9401 (package-with-python2 python-pkgconfig))
9402
9403 (define-public python-bz2file
9404 (package
9405 (name "python-bz2file")
9406 (version "0.98")
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (pypi-uri "bz2file" version))
9411 (sha256
9412 (base32
9413 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9414 (build-system python-build-system)
9415 (arguments
9416 `(#:tests? #f)) ; Tests use deprecated python modules.
9417 (home-page "https://github.com/nvawda/bz2file")
9418 (synopsis "Read and write bzip2-compressed files")
9419 (description
9420 "Bz2file is a Python library for reading and writing bzip2-compressed
9421 files. It contains a drop-in replacement for the I/O interface in the
9422 standard library's @code{bz2} module, including features from the latest
9423 development version of CPython that are not available in older releases.")
9424 (license license:asl2.0)))
9425
9426 (define-public python2-bz2file
9427 (package-with-python2 python-bz2file))
9428
9429 (define-public python-future
9430 (package
9431 (name "python-future")
9432 (version "0.17.1")
9433 (source
9434 (origin
9435 (method url-fetch)
9436 (uri (pypi-uri "future" version))
9437 (sha256
9438 (base32
9439 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9440 (build-system python-build-system)
9441 ;; Many tests connect to the network or are otherwise flawed.
9442 ;; https://github.com/PythonCharmers/python-future/issues/210
9443 (arguments
9444 `(#:tests? #f))
9445 (home-page "http://python-future.org")
9446 (synopsis "Single-source support for Python 3 and 2")
9447 (description
9448 "@code{python-future} is the missing compatibility layer between Python 2 and
9449 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9450 to support both Python 2 and Python 3 with minimal overhead.")
9451 (license license:expat)))
9452
9453 (define-public python2-future
9454 (package-with-python2 python-future))
9455
9456 (define-public python-cysignals
9457 (package
9458 (name "python-cysignals")
9459 (version "1.9.0")
9460 (source
9461 (origin
9462 (method url-fetch)
9463 (uri (pypi-uri "cysignals" version))
9464 (sha256
9465 (base32
9466 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9467 (build-system python-build-system)
9468 (native-inputs
9469 `(("python-cython" ,python-cython)
9470 ("python-sphinx" ,python-sphinx)))
9471 (inputs
9472 `(("pari-gp" ,pari-gp)))
9473 (arguments
9474 `(#:modules ((guix build python-build-system)
9475 ((guix build gnu-build-system) #:prefix gnu:)
9476 (guix build utils))
9477 ;; FIXME: Tests are executed after installation and currently fail
9478 ;; when not installing into standard locations; the author is working
9479 ;; on a fix.
9480 #:tests? #f
9481 #:phases
9482 (modify-phases %standard-phases
9483 (add-before
9484 'build 'configure
9485 (assoc-ref gnu:%standard-phases 'configure)))))
9486 (home-page
9487 "https://github.com/sagemath/cysignals")
9488 (synopsis
9489 "Handling of interrupts and signals for Cython")
9490 (description
9491 "The cysignals package provides mechanisms to handle interrupts (and
9492 other signals and errors) in Cython code, using two related approaches,
9493 for mixed Cython/Python code or external C libraries and pure Cython code,
9494 respectively.")
9495 (license license:lgpl3+)))
9496
9497 (define-public python2-cysignals
9498 (package-with-python2 python-cysignals))
9499
9500 (define-public python2-shedskin
9501 (package
9502 (name "python2-shedskin")
9503 (version "0.9.4")
9504 (source
9505 (origin
9506 (method url-fetch)
9507 (uri (string-append "https://github.com/shedskin/shedskin/"
9508 "releases/download/v" version
9509 "/shedskin-" version ".tgz"))
9510 (sha256
9511 (base32
9512 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9513 (build-system python-build-system)
9514 (arguments
9515 `(#:python ,python-2
9516 #:phases (modify-phases %standard-phases
9517 (add-after 'unpack 'fix-resulting-include-libs
9518 (lambda* (#:key inputs #:allow-other-keys)
9519 (let ((libgc (assoc-ref inputs "libgc"))
9520 (pcre (assoc-ref inputs "pcre")))
9521 (substitute* "shedskin/makefile.py"
9522 (("variable == 'CCFLAGS':[ ]*")
9523 (string-append "variable == 'CCFLAGS':\n"
9524 " line += ' -I " pcre "/include"
9525 " -I " libgc "/include'"))
9526 (("variable == 'LFLAGS':[ ]*")
9527 (string-append "variable == 'LFLAGS':\n"
9528 " line += ' -L" pcre "/lib"
9529 " -L " libgc "/lib'")))
9530 #t))))))
9531 (inputs `(("pcre" ,pcre)
9532 ("libgc" ,libgc)))
9533 (home-page "https://shedskin.github.io/")
9534 (synopsis "Experimental Python-2 to C++ Compiler")
9535 (description (string-append "This is an experimental compiler for a subset of
9536 Python. It generates C++ code and a Makefile."))
9537 (license (list license:gpl3 license:bsd-3 license:expat))))
9538
9539 (define-public python2-rope
9540 (package
9541 (name "python2-rope")
9542 (version "0.11.0")
9543 (source
9544 (origin
9545 (method url-fetch)
9546 (uri (pypi-uri "rope" version))
9547 (sha256
9548 (base32
9549 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9550 (arguments
9551 ;; Rope has only partial python3 support, see `python-rope'
9552 `(#:python ,python-2))
9553 (build-system python-build-system)
9554 (native-inputs
9555 `(("python2-unittest2" ,python2-unittest2)))
9556 (home-page "https://github.com/python-rope/rope")
9557 (synopsis "Refactoring library for Python")
9558 (description "Rope is a refactoring library for Python. It facilitates
9559 the renaming, moving and extracting of attributes, functions, modules, fields
9560 and parameters in Python 2 source code. These refactorings can also be applied
9561 to occurrences in strings and comments.")
9562 (license license:gpl2)))
9563
9564 (define-public python-rope
9565 (package
9566 (inherit python2-rope)
9567 (name "python-rope")
9568 (arguments `(#:python ,python-wrapper
9569 ;; XXX: Only partial python3 support, results in some failing
9570 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9571 #:tests? #f))
9572 (properties `((python2-variant . ,(delay python2-rope))))))
9573
9574 (define-public python-py3status
9575 (package
9576 (name "python-py3status")
9577 (version "3.16")
9578 (source
9579 (origin
9580 (method url-fetch)
9581 (uri (pypi-uri "py3status" version))
9582 (sha256
9583 (base32
9584 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9585 (build-system python-build-system)
9586 (inputs
9587 `(("file" ,file)))
9588 (arguments
9589 '(#:phases
9590 (modify-phases %standard-phases
9591 ;; 'file' is used for detection of configuration file encoding
9592 ;; let's make link the dependency to particular input
9593 (add-before 'build 'patch-file-path
9594 (lambda* (#:key inputs #:allow-other-keys)
9595 (let ((file-path (assoc-ref inputs "file")))
9596 (substitute* "py3status/parse_config.py"
9597 (("\\['file', '-b'")
9598 (string-append "['" file-path "/bin/file', '-b'")))
9599 #t))))
9600 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9601 (home-page "https://github.com/ultrabug/py3status")
9602 (synopsis "Extensible i3status wrapper written in Python")
9603 (description "py3status is an i3status wrapper which extends i3status
9604 functionality in a modular way, allowing you to extend your panel with your
9605 own code, responding to click events and updating clock every second.")
9606 (license license:bsd-3)))
9607
9608 (define-public python-tblib
9609 (package
9610 (name "python-tblib")
9611 (version "1.3.2")
9612 (source (origin
9613 (method url-fetch)
9614 (uri (pypi-uri "tblib" version))
9615 (sha256 (base32
9616 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9617 (build-system python-build-system)
9618 (arguments
9619 `(#:phases
9620 (modify-phases %standard-phases
9621 (add-before 'check 'adjust-tests
9622 (lambda _
9623 (when (which "python3")
9624 ;; Adjust the example output to match that of Python 3.7:
9625 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9626 (substitute* "README.rst"
9627 (("Exception\\('fail',") "Exception('fail'"))
9628 #t)))
9629 (replace 'check
9630 (lambda _
9631 ;; Upstream runs tests after installation and the package itself
9632 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9633 ;; found.
9634 (setenv "PYTHONPATH"
9635 (string-append (getcwd) "/build/lib:"
9636 (getenv "PYTHONPATH")))
9637 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9638 (native-inputs
9639 `(("python-pytest" ,python-pytest)
9640 ("python-six" ,python-six)))
9641 (home-page "https://github.com/ionelmc/python-tblib")
9642 (synopsis "Traceback serialization library")
9643 (description
9644 "Traceback serialization allows you to:
9645
9646 @enumerate
9647 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9648 different processes. This allows better error handling when running code over
9649 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9650
9651 @item Parse traceback strings and raise with the parsed tracebacks.
9652 @end enumerate\n")
9653 (license license:bsd-3)))
9654
9655 (define-public python2-tblib
9656 (package-with-python2 python-tblib))
9657
9658 (define-public python-greenlet
9659 (package
9660 (name "python-greenlet")
9661 (version "0.4.15")
9662 (source (origin
9663 (method url-fetch)
9664 (uri (pypi-uri "greenlet" version))
9665 (sha256
9666 (base32
9667 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9668 (build-system python-build-system)
9669 (home-page "https://greenlet.readthedocs.io/")
9670 (synopsis "Lightweight in-process concurrent programming")
9671 (description
9672 "Greenlet package is a spin-off of Stackless, a version of CPython
9673 that supports micro-threads called \"tasklets\". Tasklets run
9674 pseudo-concurrently (typically in a single or a few OS-level threads) and
9675 are synchronized with data exchanges on \"channels\".")
9676 (license (list license:psfl license:expat))))
9677
9678 (define-public python2-greenlet
9679 (package-with-python2 python-greenlet))
9680
9681 (define-public python-objgraph
9682 (package
9683 (name "python-objgraph")
9684 (version "3.4.0")
9685 (source
9686 (origin
9687 (method url-fetch)
9688 (uri (pypi-uri "objgraph" version))
9689 (sha256
9690 (base32
9691 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9692 (build-system python-build-system)
9693 (propagated-inputs
9694 `(("python-graphviz" ,python-graphviz)))
9695 (native-inputs
9696 `(("python-mock" ,python-mock)
9697 ("graphviz" ,graphviz)))
9698 (home-page "https://mg.pov.lt/objgraph/")
9699 (synopsis "Draw Python object reference graphs with graphviz")
9700 (description
9701 "This package provides tools to draw Python object reference graphs with
9702 graphviz.")
9703 (license license:expat)))
9704
9705 (define-public python-gevent
9706 (package
9707 (name "python-gevent")
9708 (version "1.3.7")
9709 (source (origin
9710 (method url-fetch)
9711 (uri (pypi-uri "gevent" version))
9712 (sha256
9713 (base32
9714 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9715 (modules '((guix build utils)))
9716 (snippet
9717 '(begin
9718 ;; unbunding libev and c-ares
9719 (delete-file-recursively "deps")
9720 #t))))
9721 (build-system python-build-system)
9722 (arguments
9723 `(#:modules ((ice-9 ftw)
9724 (ice-9 match)
9725 (srfi srfi-26)
9726 (guix build utils)
9727 (guix build python-build-system))
9728 #:phases (modify-phases %standard-phases
9729 (add-after 'unpack 'unpack-libev
9730 (lambda* (#:key inputs #:allow-other-keys)
9731 (mkdir-p "deps/libev")
9732 ;; FIXME: gevent requires building libev, even though
9733 ;; it only links against the proper one.
9734 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9735 "--strip-components=1" "-C" "deps/libev")))
9736 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9737 (lambda _
9738 (substitute* "src/gevent/subprocess.py"
9739 (("/bin/sh") (which "sh")))
9740 (for-each (lambda (file)
9741 (substitute* file
9742 (("/bin/sh") (which "sh"))
9743 (("/bin/true") (which "true"))))
9744 (find-files "src/greentest" "\\.py$"))
9745 #t))
9746 (add-before 'build 'do-not-use-bundled-sources
9747 (lambda* (#:key inputs #:allow-other-keys)
9748 (setenv "CONFIG_SHELL" (which "bash"))
9749 (setenv "LIBEV_EMBED" "false")
9750 (setenv "CARES_EMBED" "false")
9751 (setenv "EMBED" "false")
9752
9753 (let ((greenlet (string-append
9754 (assoc-ref inputs "python-greenlet")
9755 "/include")))
9756 (match (scandir greenlet
9757 (lambda (item)
9758 (string-prefix? "python" item)))
9759 ((python)
9760 (setenv "CPATH"
9761 (string-append greenlet "/" python)))))
9762 #t))
9763 (add-before 'check 'skip-timer-test
9764 (lambda _
9765 ;; XXX: Skip 'TestTimerResolution', which appears to be
9766 ;; unreliable.
9767 (substitute* "src/greentest/test__core_timer.py"
9768 (("not greentest.RUNNING_ON_CI") "False"))
9769 #t))
9770 (replace 'check
9771 (lambda _
9772 ;; Make sure the build directory is on PYTHONPATH.
9773 (setenv "PYTHONPATH"
9774 (string-append
9775 (getenv "PYTHONPATH") ":"
9776 (getcwd) "/build/"
9777 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9778 (with-directory-excursion "src/greentest"
9779 ;; XXX: Many tests require network access. Instead we only
9780 ;; run known-good tests. Unfortunately we cannot use
9781 ;; recursion here since this directory also contains
9782 ;; Python-version-specific subfolders.
9783 (apply invoke "python" "testrunner.py" "--config"
9784 "known_failures.py"
9785 (scandir "." (cut regexp-exec
9786 (make-regexp "test_+(subprocess|core)")
9787 <>)))))))))
9788 (propagated-inputs
9789 `(("python-greenlet" ,python-greenlet)
9790 ("python-objgraph" ,python-objgraph)))
9791 (native-inputs
9792 `(("libev-source" ,(package-source libev))
9793 ("python-six" ,python-six)))
9794 (inputs
9795 `(("c-ares" ,c-ares)
9796 ("libev" ,libev)))
9797 (home-page "http://www.gevent.org/")
9798 (synopsis "Coroutine-based network library")
9799 (description
9800 "gevent is a coroutine-based Python networking library that uses greenlet
9801 to provide a high-level synchronous API on top of the libev event loop.")
9802 (license license:expat)
9803 (properties `((python2-variant . ,(delay python2-gevent))))))
9804
9805 (define-public python2-gevent
9806 (let ((base (package-with-python2
9807 (strip-python2-variant python-gevent))))
9808 (package
9809 (inherit base)
9810 (native-inputs `(,@(package-native-inputs python-gevent)
9811 ("python-mock" ,python2-mock))))))
9812
9813 (define-public python-fastimport
9814 (package
9815 (name "python-fastimport")
9816 (version "0.9.6")
9817 (source
9818 (origin
9819 (method url-fetch)
9820 (uri (pypi-uri "fastimport" version))
9821 (sha256
9822 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9823 (build-system python-build-system)
9824 (home-page "https://github.com/jelmer/python-fastimport")
9825 (synopsis "VCS fastimport parser and generator in Python")
9826 (description "This package provides a parser for and generator of the Git
9827 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9828 format.")
9829 (license license:gpl2+)))
9830
9831 (define-public python2-fastimport
9832 (package-with-python2 python-fastimport))
9833
9834 (define-public python-twisted
9835 (package
9836 (name "python-twisted")
9837 (version "19.2.1")
9838 (source (origin
9839 (method url-fetch)
9840 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9841 (sha256
9842 (base32
9843 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9844 (build-system python-build-system)
9845 (arguments
9846 '(#:tests? #f)) ; FIXME: some tests fail
9847 (propagated-inputs
9848 `(("python-zope-interface" ,python-zope-interface)
9849 ("python-pyhamcrest" ,python-pyhamcrest)
9850 ("python-incremental" ,python-incremental)
9851 ("python-hyperlink" ,python-hyperlink)
9852 ("python-constantly" ,python-constantly)
9853 ("python-automat" ,python-automat)))
9854 (home-page "https://twistedmatrix.com/")
9855 (synopsis "Asynchronous networking framework written in Python")
9856 (description
9857 "Twisted is an extensible framework for Python programming, with special
9858 focus on event-based network programming and multiprotocol integration.")
9859 (license license:expat)))
9860
9861 (define-public python2-twisted
9862 (package-with-python2 python-twisted))
9863
9864 (define-public python-pika
9865 (package
9866 (name "python-pika")
9867 (version "0.12.0")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "pika" version))
9872 (sha256
9873 (base32
9874 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9875 (build-system python-build-system)
9876 (native-inputs
9877 `(("python-pyev" ,python-pyev)
9878 ("python-tornado" ,python-tornado)
9879 ("python-twisted" ,python-twisted)))
9880 (home-page "https://pika.readthedocs.org")
9881 (synopsis "Pure Python AMQP Client Library")
9882 (description
9883 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9884 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9885 network support library.")
9886 (license license:bsd-3)))
9887
9888 (define-public python2-pika
9889 (package-with-python2 python-pika))
9890
9891 (define-public python-ply
9892 (package
9893 (name "python-ply")
9894 (version "3.10")
9895 (source
9896 (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "ply" version))
9899 (sha256
9900 (base32
9901 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9902 (build-system python-build-system)
9903 (home-page "http://www.dabeaz.com/ply/")
9904 (synopsis "Python Lex & Yacc")
9905 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9906 It uses LR parsing and does extensive error checking.")
9907 (license license:bsd-3)))
9908
9909 (define-public python2-ply
9910 (package-with-python2 python-ply))
9911
9912 (define-public python-tabulate
9913 (package
9914 (name "python-tabulate")
9915 (version "0.7.7")
9916 (source (origin
9917 (method url-fetch)
9918 (uri (pypi-uri "tabulate" version))
9919 (sha256
9920 (base32
9921 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9922 (build-system python-build-system)
9923 (arguments
9924 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9925 ;; and the latest release is not tagged in the upstream repository.
9926 '(#:tests? #f))
9927 (home-page "https://bitbucket.org/astanin/python-tabulate")
9928 (synopsis "Pretty-print tabular data")
9929 (description
9930 "Tabulate is a library and command-line utility to pretty-print tabular
9931 data in Python.")
9932 (license license:expat)))
9933
9934 (define-public python2-tabulate
9935 (package-with-python2 python-tabulate))
9936
9937 (define-public python-kazoo
9938 (package
9939 (name "python-kazoo")
9940 (version "2.4.0")
9941 (source
9942 (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "kazoo" version))
9945 (sha256
9946 (base32
9947 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9948 (build-system python-build-system)
9949 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9950 (propagated-inputs
9951 `(("python-six" ,python-six)))
9952 (home-page "https://kazoo.readthedocs.org")
9953 (synopsis "High-level Zookeeper client library")
9954 (description
9955 "Kazoo is a Python client library for the Apache Zookeeper distributed
9956 application service. It is designed to be easy to use and to avoid common
9957 programming errors.")
9958 (license license:asl2.0)))
9959
9960 (define-public python2-kazoo
9961 (package-with-python2 python-kazoo))
9962
9963 (define-public python-pykafka
9964 (package
9965 (name "python-pykafka")
9966 (version "2.4.0")
9967 (source (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "pykafka" version))
9970 (sha256
9971 (base32
9972 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9973 (build-system python-build-system)
9974 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9975 (propagated-inputs
9976 `(("python-gevent" ,python-gevent)
9977 ("python-kazoo" ,python-kazoo)
9978 ("python-tabulate" ,python-tabulate)))
9979 (inputs
9980 `(("librdkafka" ,librdkafka)))
9981 (home-page "https://pykafka.readthedocs.io/")
9982 (synopsis "Apache Kafka client for Python")
9983 (description
9984 "PyKafka is a client for the Apache Kafka distributed messaging system.
9985 It includes Python implementations of Kafka producers and consumers, which
9986 are optionally backed by a C extension built on librdkafka.")
9987 (license license:asl2.0)))
9988
9989 (define-public python2-pykafka
9990 (package-with-python2 python-pykafka))
9991
9992 (define-public python-wcwidth
9993 (package
9994 (name "python-wcwidth")
9995 (version "0.1.7")
9996 (source
9997 (origin
9998 (method url-fetch)
9999 (uri (pypi-uri "wcwidth" version))
10000 (sha256
10001 (base32
10002 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10003 (build-system python-build-system)
10004 (home-page "https://github.com/jquast/wcwidth")
10005 (synopsis "Measure number of terminal column cells of wide-character codes")
10006 (description "Wcwidth measures the number of terminal column cells of
10007 wide-character codes. It is useful for those implementing a terminal emulator,
10008 or programs that carefully produce output to be interpreted by one. It is a
10009 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10010 specified in POSIX.1-2001 and POSIX.1-2008.")
10011 (license license:expat)))
10012
10013 (define-public python2-wcwidth
10014 (package-with-python2 python-wcwidth))
10015
10016 (define-public python2-jsonrpclib
10017 (package
10018 (name "python2-jsonrpclib")
10019 (version "0.1.7")
10020 (source (origin
10021 (method url-fetch)
10022 (uri (pypi-uri "jsonrpclib" version))
10023 (sha256
10024 (base32
10025 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10026 (build-system python-build-system)
10027 (arguments
10028 `(#:tests? #f
10029 #:python ,python-2))
10030 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10031 (synopsis "Implementation of JSON-RPC specification for Python")
10032 (description
10033 "This library is an implementation of the JSON-RPC specification.
10034 It supports both the original 1.0 specification, as well as the
10035 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10036 etc.")
10037 (license license:asl2.0)))
10038
10039 (define-public python-chai
10040 (package
10041 (name "python-chai")
10042 (version "1.1.2")
10043 (source (origin
10044 (method url-fetch)
10045 (uri (pypi-uri "chai" version))
10046 (sha256
10047 (base32
10048 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10049 (build-system python-build-system)
10050 (home-page "https://github.com/agoragames/chai")
10051 (synopsis "Mocking framework for Python")
10052 (description
10053 "Chai provides an api for mocking, stubbing and spying your python
10054 objects, patterned after the Mocha library for Ruby.")
10055 (license license:bsd-3)))
10056
10057 (define-public python2-chai
10058 (package-with-python2 python-chai))
10059
10060 (define-public python-inflection
10061 (package
10062 (name "python-inflection")
10063 (version "0.3.1")
10064 (source
10065 (origin (method url-fetch)
10066 (uri (pypi-uri "inflection" version))
10067 (sha256
10068 (base32
10069 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10070 (build-system python-build-system)
10071 (native-inputs
10072 `(("python-pytest" ,python-pytest)))
10073 (home-page "https://github.com/jpvanhal/inflection")
10074 (synopsis "Python string transformation library")
10075 (description
10076 "Inflection is a string transformation library. It singularizes
10077 and pluralizes English words, and transforms strings from CamelCase to
10078 underscored string.")
10079 (license license:expat)))
10080
10081 (define-public python2-inflection
10082 (package-with-python2 python-inflection))
10083
10084 (define-public python-pylev
10085 (package
10086 (name "python-pylev")
10087 (version "1.3.0")
10088 (source (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "pylev" version))
10091 (sha256
10092 (base32
10093 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10094 (build-system python-build-system)
10095 (home-page "https://github.com/toastdriven/pylev")
10096 (synopsis "Levenshtein distance implementation in Python")
10097 (description "Pure Python Levenshtein implementation, based off the
10098 Wikipedia code samples at
10099 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10100 (license license:bsd-3)))
10101
10102 (define-public python2-pylev
10103 (package-with-python2 python-pylev))
10104
10105 (define-public python-cleo
10106 (package
10107 (name "python-cleo")
10108 (version "0.6.1")
10109 (source (origin
10110 (method url-fetch)
10111 (uri (pypi-uri "cleo" version))
10112 (sha256
10113 (base32
10114 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10115 (build-system python-build-system)
10116 (native-inputs
10117 `(;; For testing
10118 ("python-mock" ,python-mock)
10119 ("python-pytest-mock" ,python-pytest-mock)
10120 ("python-pytest" ,python-pytest)))
10121 (propagated-inputs
10122 `(("python-backpack" ,python-backpack)
10123 ("python-pastel" ,python-pastel)
10124 ("python-pylev" ,python-pylev)))
10125 (home-page "https://github.com/sdispater/cleo")
10126 (synopsis "Command-line arguments library for Python")
10127 (description
10128 "Cleo allows you to create command-line commands with signature in
10129 docstring and colored output.")
10130 (license license:expat)))
10131
10132 (define-public python2-cleo
10133 (package-with-python2 python-cleo))
10134
10135 (define-public python-lazy-object-proxy
10136 (package
10137 (name "python-lazy-object-proxy")
10138 (version "1.3.1")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "lazy-object-proxy" version))
10142 (sha256
10143 (base32
10144 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10145 (build-system python-build-system)
10146 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10147 (synopsis "Lazy object proxy for python")
10148 (description
10149 "Lazy object proxy is an object that wraps a callable but defers the call
10150 until the object is actually required, and caches the result of said call.")
10151 (license license:bsd-2)))
10152
10153 (define-public python2-lazy-object-proxy
10154 (package-with-python2 python-lazy-object-proxy))
10155
10156 (define-public python-dnspython
10157 (package
10158 (name "python-dnspython")
10159 (version "1.15.0")
10160 (source (origin
10161 (method url-fetch)
10162 (uri (string-append "http://www.dnspython.org/kits/"
10163 version "/dnspython-" version ".tar.gz"))
10164 (sha256
10165 (base32
10166 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10167 (build-system python-build-system)
10168 (arguments '(#:tests? #f)) ; XXX: requires internet access
10169 (home-page "http://www.dnspython.org")
10170 (synopsis "DNS toolkit for Python")
10171 (description
10172 "dnspython is a DNS toolkit for Python. It supports almost all record
10173 types. It can be used for queries, zone transfers, and dynamic updates.
10174 It supports TSIG authenticated messages and EDNS0.")
10175 (license license:expat)))
10176
10177 (define-public python2-dnspython
10178 (package-with-python2 python-dnspython))
10179
10180 (define-public python-email-validator
10181 (package
10182 (name "python-email-validator")
10183 (version "1.0.2")
10184 (source
10185 (origin (method url-fetch)
10186 (uri (pypi-uri "email_validator" version))
10187 (sha256
10188 (base32
10189 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10190 (build-system python-build-system)
10191 (arguments
10192 '(#:phases
10193 (modify-phases %standard-phases
10194 (add-before 'build 'use-dnspython
10195 (lambda _
10196 (substitute* "setup.py"
10197 (("dnspython3") "dnspython"))
10198 #t)))))
10199 (propagated-inputs
10200 `(("python-dnspython" ,python-dnspython)
10201 ("python-idna" ,python-idna)))
10202 (home-page "https://github.com/JoshData/python-email-validator")
10203 (synopsis "Email address validation library for Python")
10204 (description
10205 "This library validates email address syntax and deliverability.")
10206 (license license:cc0)))
10207
10208 (define-public python2-email-validator
10209 (package-with-python2 python-email-validator))
10210
10211 (define-public python-ukpostcodeparser
10212 (package
10213 (name "python-ukpostcodeparser")
10214 (version "1.0.3")
10215 (source (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "UkPostcodeParser" version))
10218 (sha256
10219 (base32
10220 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10221 (build-system python-build-system)
10222 (home-page "https://github.com/hamstah/ukpostcodeparser")
10223 (synopsis "UK Postcode parser for Python")
10224 (description
10225 "This library provides the @code{parse_uk_postcode} function for
10226 parsing UK postcodes.")
10227 (license license:expat)))
10228
10229 (define-public python2-ukpostcodeparser
10230 (package-with-python2 python-ukpostcodeparser))
10231
10232 (define-public python-faker
10233 (package
10234 (name "python-faker")
10235 (version "0.7.9")
10236 (source (origin
10237 (method url-fetch)
10238 (uri (pypi-uri "Faker" version))
10239 (sha256
10240 (base32
10241 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10242 (patches
10243 (search-patches "python-faker-fix-build-32bit.patch"))
10244 (modules '((guix build utils)))
10245 (snippet
10246 '(begin
10247 (for-each delete-file (find-files "." "\\.pyc$"))
10248 #t))))
10249 (build-system python-build-system)
10250 (arguments
10251 '(#:phases
10252 (modify-phases %standard-phases
10253 (replace 'check
10254 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10255 (native-inputs
10256 `(;; For testing
10257 ("python-email-validator" ,python-email-validator)
10258 ("python-mock" ,python-mock)
10259 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10260 (propagated-inputs
10261 `(("python-dateutil" ,python-dateutil)
10262 ("python-six" ,python-six)))
10263 (home-page "https://github.com/joke2k/faker")
10264 (synopsis "Python package that generates fake data")
10265 (description
10266 "Faker is a Python package that generates fake data such as names,
10267 addresses, and phone numbers.")
10268 (license license:expat)
10269 (properties `((python2-variant . ,(delay python2-faker))))))
10270
10271 (define-public python2-faker
10272 (let ((base (package-with-python2 (strip-python2-variant
10273 python-faker))))
10274 (package
10275 (inherit base)
10276 (propagated-inputs
10277 `(("python2-ipaddress" ,python2-ipaddress)
10278 ,@(package-propagated-inputs base))))))
10279
10280 (define-public python-pyaml
10281 (package
10282 (name "python-pyaml")
10283 (version "18.11.0")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "pyaml" version))
10287 (sha256
10288 (base32
10289 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10290 (build-system python-build-system)
10291 (native-inputs
10292 `(("python-unidecode" ,python-unidecode)))
10293 (propagated-inputs
10294 `(("python-pyyaml" ,python-pyyaml)))
10295 (home-page "https://github.com/mk-fg/pretty-yaml")
10296 (synopsis "YAML pretty-print library for Python")
10297 (description
10298 "pyaml is a PyYAML based python module to produce pretty and readable
10299 YAML-serialized data.")
10300 (license license:wtfpl2)))
10301
10302 (define-public python2-pyaml
10303 (package-with-python2 python-pyaml))
10304
10305 (define-public python-backpack
10306 (package
10307 (name "python-backpack")
10308 (version "0.1")
10309 (source
10310 (origin
10311 (method url-fetch)
10312 (uri (pypi-uri "backpack" version))
10313 (sha256
10314 (base32
10315 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10316 (build-system python-build-system)
10317 (native-inputs
10318 `(("python-pytest" ,python-pytest)
10319 ("python-nose" ,python-nose)))
10320 (propagated-inputs
10321 `(("python-simplejson" ,python-simplejson)))
10322 (home-page "https://github.com/sdispater/backpack")
10323 (synopsis "Utilities for working with Python collections")
10324 (description "Backpack provides some useful utilities for working with
10325 collections of data.")
10326 (license license:expat)))
10327
10328 (define-public python2-backpack
10329 (package-with-python2 python-backpack))
10330
10331 (define-public python-prompt-toolkit
10332 (package
10333 (name "python-prompt-toolkit")
10334 (version "2.0.7")
10335 (source
10336 (origin
10337 (method url-fetch)
10338 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10339 (sha256
10340 (base32
10341 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10342 (build-system python-build-system)
10343 (arguments
10344 `(#:phases
10345 (modify-phases %standard-phases
10346 (delete 'check)
10347 (add-after 'install 'post-install-check
10348 (lambda* (#:key inputs outputs #:allow-other-keys)
10349 ;; HOME is needed for the test
10350 ;; "test_pathcompleter_can_expanduser".
10351 (setenv "HOME" "/tmp")
10352 (add-installed-pythonpath inputs outputs)
10353 (invoke "py.test"))))))
10354 (propagated-inputs
10355 `(("python-wcwidth" ,python-wcwidth)
10356 ("python-six" ,python-six)
10357 ("python-pygments" ,python-pygments)))
10358 (native-inputs
10359 `(("python-pytest" ,python-pytest)))
10360 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10361 (synopsis "Library for building command line interfaces in Python")
10362 (description
10363 "Prompt-Toolkit is a library for building interactive command line
10364 interfaces in Python. It's like GNU Readline but it also features syntax
10365 highlighting while typing, out-of-the-box multi-line input editing, advanced
10366 code completion, incremental search, support for Chinese double-width
10367 characters, mouse support, and auto suggestions.")
10368 (license license:bsd-3)))
10369
10370 (define-public python2-prompt-toolkit
10371 (package-with-python2 python-prompt-toolkit))
10372
10373 (define-public python-prompt-toolkit-1
10374 (package (inherit python-prompt-toolkit)
10375 (version "1.0.15")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10380 (sha256
10381 (base32
10382 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10383
10384 (define-public python2-prompt-toolkit-1
10385 (package-with-python2 python-prompt-toolkit-1))
10386
10387 (define-public python-jedi
10388 (package
10389 (name "python-jedi")
10390 (version "0.13.3")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "jedi" version))
10395 (sha256
10396 (base32
10397 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10398 (build-system python-build-system)
10399 (arguments
10400 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10401 ;; https://github.com/davidhalter/jedi/issues/1263)
10402 #:tests? #f
10403 #:phases
10404 (modify-phases %standard-phases
10405 (replace 'check
10406 (lambda* (#:key tests? #:allow-other-keys)
10407 (when tests?
10408 (invoke "py.test" "-vv")))))))
10409 (native-inputs
10410 `(("python-pytest" ,python-pytest)
10411 ("python-docopt" ,python-docopt)))
10412 (propagated-inputs
10413 `(("python-parso" ,python-parso)))
10414 (home-page "https://github.com/davidhalter/jedi")
10415 (synopsis "Autocompletion and static analysis library for Python")
10416 (description
10417 "Jedi is a static analysis tool for Python that can be used in Integrated
10418 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10419 on a deeper level than many other static analysis frameworks for Python.
10420
10421 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10422 well.")
10423 (license license:expat)))
10424
10425 (define-public python2-jedi
10426 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10427 (package
10428 (inherit base)
10429 (arguments (substitute-keyword-arguments (package-arguments base)
10430 ((#:tests? _) #t))))))
10431
10432 (define-public ptpython
10433 (package
10434 (name "ptpython")
10435 (version "0.34")
10436 (source (origin
10437 (method url-fetch)
10438 (uri (pypi-uri "ptpython" version))
10439 (sha256
10440 (base32
10441 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10442 (build-system python-build-system)
10443 (arguments
10444 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10445 (propagated-inputs
10446 `(("python-docopt" ,python-docopt)
10447 ("python-jedi" ,python-jedi)
10448 ("python-prompt-toolkit" ,python-prompt-toolkit)
10449 ("python-pygments" ,python-pygments)))
10450 (home-page "https://github.com/jonathanslenders/ptpython")
10451 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10452 (description
10453 "ptpython is a Python read-eval-print loop with IDE-like features.
10454 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10455 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10456 etc.")
10457 (license license:bsd-3)
10458 (properties `((python2-variant . ,(delay ptpython-2))))))
10459
10460 (define-public ptpython-2
10461 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10462 (package
10463 (inherit base)
10464 (name "ptpython2"))))
10465
10466 (define-public python-stem
10467 (package
10468 (name "python-stem")
10469 (version "1.7.1")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "stem" version))
10474 (sha256
10475 (base32
10476 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10477 (build-system python-build-system)
10478 (arguments
10479 `(#:phases
10480 (modify-phases %standard-phases
10481 (replace 'check
10482 (lambda _
10483 (invoke "./run_tests.py" "--unit")
10484 #t)))))
10485 (native-inputs
10486 `(("python-mock" ,python-mock)
10487 ("python-pycodestyle" ,python-pycodestyle)
10488 ("python-pyflakes" ,python-pyflakes)))
10489 (home-page "https://stem.torproject.org/")
10490 (synopsis
10491 "Python controller library that allows applications to interact with Tor")
10492 (description
10493 "Stem is a Python controller library for Tor. With it you can use Tor's
10494 control protocol to script against the Tor process and read descriptor data
10495 relays publish about themselves.")
10496 (license license:lgpl3)))
10497
10498 (define-public python2-stem
10499 (package-with-python2 python-stem))
10500
10501 (define-public python-pyserial
10502 (package
10503 (name "python-pyserial")
10504 (version "3.1.1")
10505 (source
10506 (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "pyserial" version))
10509 (sha256
10510 (base32
10511 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10512 (build-system python-build-system)
10513 (arguments
10514 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10515 ;; #:phases
10516 ;; (modify-phases %standard-phases
10517 ;; (replace 'check
10518 ;; (lambda _
10519 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10520 (home-page
10521 "https://github.com/pyserial/pyserial")
10522 (synopsis "Python Serial Port Bindings")
10523 (description "@code{pyserial} provide serial port bindings for Python. It
10524 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10525 and/or Xon/Xoff. The port is accessed in RAW mode.")
10526 (license license:bsd-3)))
10527
10528 (define-public python2-pyserial
10529 (package-with-python2 python-pyserial))
10530
10531 (define-public python-kivy
10532 (package
10533 (name "python-kivy")
10534 (version "1.10.1")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "Kivy" version))
10539 (file-name (string-append name "-" version ".tar.gz"))
10540 (sha256
10541 (base32
10542 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10543 (build-system python-build-system)
10544 (arguments
10545 `(#:tests? #f ; Tests require many optional packages
10546 #:phases
10547 (modify-phases %standard-phases
10548 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10549 (lambda* (#:key inputs #:allow-other-keys)
10550 (setenv "KIVY_SDL2_PATH"
10551 (string-append (assoc-ref inputs "sdl-union")
10552 "/include/SDL2"))
10553 #t)))))
10554 (native-inputs
10555 `(("git" ,git)
10556 ("pkg-config" ,pkg-config)
10557 ("python-cython" ,python-cython)))
10558 (inputs
10559 `(("gstreamer" ,gstreamer)
10560 ("mesa" ,mesa)
10561 ("sdl-union"
10562 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10563 (home-page "http://kivy.org")
10564 (synopsis
10565 "Multitouch application framework")
10566 (description
10567 "A software library for rapid development of
10568 hardware-accelerated multitouch applications.")
10569 (license license:expat)))
10570
10571 (define-public python2-kivy
10572 (package-with-python2 python-kivy))
10573
10574 (define-public python-kivy-next
10575 (deprecated-package "python-kivy-next" python-kivy))
10576
10577 (define-public python2-kivy-next
10578 (deprecated-package "python2-kivy-next" python2-kivy))
10579
10580 (define-public python-binaryornot
10581 (package
10582 (name "python-binaryornot")
10583 (version "0.4.4")
10584 (source (origin
10585 (method url-fetch)
10586 (uri (pypi-uri "binaryornot" version))
10587 (sha256
10588 (base32
10589 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10590 (build-system python-build-system)
10591 (propagated-inputs
10592 `(("python-chardet" ,python-chardet)
10593 ("python-hypothesis" ,python-hypothesis)))
10594 (home-page "https://github.com/audreyr/binaryornot")
10595 (synopsis "Package to check if a file is binary or text")
10596 (description "Ultra-lightweight pure Python package to check if a file is
10597 binary or text.")
10598 (license license:bsd-3)
10599 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10600
10601 (define-public python2-binaryornot
10602 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10603 (package (inherit base)
10604 (propagated-inputs
10605 `(("python2-enum34" ,python2-enum34)
10606 ,@(package-propagated-inputs base))))))
10607
10608 (define-public python-nltk
10609 (package
10610 (name "python-nltk")
10611 (version "3.2.1")
10612 (source (origin
10613 (method url-fetch)
10614 (uri (pypi-uri "nltk" version))
10615 (sha256
10616 (base32
10617 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10618 (build-system python-build-system)
10619 (arguments
10620 '(;; The tests require some extra resources to be downloaded.
10621 ;; TODO Try packaging these resources.
10622 #:tests? #f))
10623 (home-page "http://nltk.org/")
10624 (synopsis "Natural Language Toolkit")
10625 (description "It provides interfaces to over 50 corpora and lexical
10626 resources such as WordNet, along with a suite of text processing libraries
10627 for classification, tokenization, stemming, tagging, parsing, and semantic
10628 reasoning, wrappers for natural language processing libraries.")
10629 (license license:asl2.0)))
10630
10631 (define-public python2-nltk
10632 (package-with-python2 python-nltk))
10633
10634 (define-public python-pymongo
10635 (package
10636 (name "python-pymongo")
10637 (version "3.7.2")
10638 (source (origin
10639 (method url-fetch)
10640 (uri (pypi-uri "pymongo" version))
10641 (sha256
10642 (base32
10643 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10644 (build-system python-build-system)
10645 (propagated-inputs
10646 `(("python-certifi" ,python-certifi)))
10647 (home-page "https://github.com/mongodb/mongo-python-driver")
10648 (synopsis "Python driver for MongoDB")
10649 (description "Python driver for MongoDB.")
10650 (license license:asl2.0)))
10651
10652 (define-public python2-pymongo
10653 (package-with-python2 python-pymongo))
10654
10655 (define-public python-consul
10656 (package
10657 (name "python-consul")
10658 (version "0.6.1")
10659 (source
10660 (origin
10661 (method url-fetch)
10662 (uri (pypi-uri "python-consul" version))
10663 (sha256
10664 (base32
10665 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10666 (build-system python-build-system)
10667 (arguments
10668 '(#:tests? #f)) ; The tests are not distributed
10669 (propagated-inputs
10670 `(("python-requests" ,python-requests)
10671 ("python-six" ,python-six)))
10672 (home-page "https://github.com/cablehead/python-consul")
10673 (synopsis "Python client for Consul")
10674 (description
10675 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10676 discovery, monitoring and configuration.")
10677 (license license:expat)))
10678
10679 (define-public python2-consul
10680 (package-with-python2 python-consul))
10681
10682 (define-public python-schematics
10683 (package
10684 (name "python-schematics")
10685 (version "1.1.1")
10686 (source
10687 (origin
10688 (method git-fetch)
10689 (uri (git-reference
10690 (url "https://github.com/schematics/schematics.git")
10691 (commit (string-append "v" version))))
10692 (file-name (git-file-name name version))
10693 (sha256
10694 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10695 (build-system python-build-system)
10696 (propagated-inputs
10697 `(("python-six" ,python-six)))
10698 (arguments
10699 ;; The tests require a bunch of not very nice packages with fixed
10700 ;; version requirements (e.g. python-coveralls).
10701 `(#:tests? #f))
10702 (home-page "https://github.com/schematics/schematics")
10703 (synopsis "Python Data Structures for Humans")
10704 (description "Python Data Structures for Humans.")
10705 (license license:bsd-3)))
10706
10707 (define-public python2-schematics
10708 (package-with-python2 python-schematics))
10709
10710 (define-public python-odfpy
10711 (package
10712 (name "python-odfpy")
10713 (version "1.3.3")
10714 (source (origin
10715 (method url-fetch)
10716 (uri (pypi-uri "odfpy" version))
10717 (sha256
10718 (base32
10719 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10720 (arguments
10721 `(#:modules ((srfi srfi-1)
10722 (guix build python-build-system)
10723 (guix build utils))
10724 #:phases
10725 (modify-phases %standard-phases
10726 (replace 'check
10727 ;; The test runner invokes python2 and python3 for test*.py.
10728 ;; To avoid having both in inputs, we replicate it here.
10729 (lambda _
10730 (for-each (lambda (test-file) (invoke "python" test-file))
10731 (find-files "tests" "^test.*\\.py$"))
10732 #t)))))
10733 (build-system python-build-system)
10734 (home-page "https://github.com/eea/odfpy")
10735 (synopsis "Python API and tools to manipulate OpenDocument files")
10736 (description "Collection of libraries and utility programs written in
10737 Python to manipulate OpenDocument 1.2 files.")
10738 (license
10739 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10740 ;; number of files with other licenses.
10741 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10742
10743 (define-public python2-odfpy
10744 (package-with-python2 python-odfpy))
10745
10746 (define-public python-natsort
10747 (package
10748 (name "python-natsort")
10749 (version "5.4.1")
10750 (source (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "natsort" version))
10753 (sha256
10754 (base32
10755 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10756 (build-system python-build-system)
10757 (arguments
10758 `(#:modules ((guix build utils)
10759 (guix build python-build-system)
10760 (srfi srfi-1)
10761 (srfi srfi-26)
10762 (ice-9 ftw))
10763 #:phases
10764 (modify-phases %standard-phases
10765 (add-before 'check 'set-cachedir
10766 ;; Tests require write access to $HOME by default
10767 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10768 (replace 'check
10769 (lambda _
10770 (let ((cwd (getcwd)))
10771 (setenv "PYTHONPATH"
10772 (string-append
10773 cwd "/build/"
10774 (find (cut string-prefix? "lib" <>)
10775 (scandir (string-append cwd "/build")))
10776 ":"
10777 (getenv "PYTHONPATH")))
10778 (invoke "pytest" "-v")))))))
10779 (native-inputs
10780 `(("python-hypothesis" ,python-hypothesis)
10781 ("python-pytest-cov" ,python-pytest-cov)
10782 ("python-pytest-mock" ,python-pytest-mock)
10783 ("python-pytest" ,python-pytest)))
10784 (propagated-inputs ; TODO: Add python-fastnumbers.
10785 `(("python-pyicu" ,python-pyicu)))
10786 (home-page "https://github.com/SethMMorton/natsort")
10787 (synopsis "Natural sorting for python and shell")
10788 (description
10789 "Natsort lets you apply natural sorting on lists instead of
10790 lexicographical. If you use the built-in @code{sorted} method in python
10791 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10792 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10793 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10794 identifies numbers and sorts them separately from strings. It can also sort
10795 version numbers, real numbers, mixed types and more, and comes with a shell
10796 command @command{natsort} that exposes this functionality in the command line.")
10797 (license license:expat)
10798 (properties `((python2-variant . ,(delay python2-natsort))))))
10799
10800 (define-public python2-natsort
10801 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10802 (package (inherit base)
10803 (native-inputs
10804 `(("python2-pathlib" ,python2-pathlib)
10805 ,@(package-native-inputs base))))))
10806
10807 (define-public python-glances
10808 (package
10809 (name "python-glances")
10810 (version "3.0.2")
10811 (source
10812 (origin
10813 (method url-fetch)
10814 (uri (pypi-uri "Glances" version))
10815 (sha256
10816 (base32
10817 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10818 (build-system python-build-system)
10819 (propagated-inputs
10820 `(("python-psutil" ,python-psutil)))
10821 (home-page
10822 "https://github.com/nicolargo/glances")
10823 (synopsis
10824 "A cross-platform curses-based monitoring tool")
10825 (description
10826 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10827 Glances uses the PsUtil library to get information from your system. It monitors
10828 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10829 (license license:lgpl3+)))
10830
10831 (define-public python2-glances
10832 (package-with-python2 python-glances))
10833
10834 (define-public python-graphql-core
10835 (package
10836 (name "python-graphql-core")
10837 (version "0.5.3")
10838 (source
10839 (origin
10840 (method url-fetch)
10841 (uri (pypi-uri "graphql-core" version))
10842 (sha256
10843 (base32
10844 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10845 (build-system python-build-system)
10846 (arguments
10847 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10848 #:phases
10849 (modify-phases %standard-phases
10850 (add-after 'unpack 'patch-hardcoded-version
10851 (lambda _ (substitute*
10852 "setup.py"
10853 (("'gevent==1.1rc1'") "'gevent'"))
10854 #t)))))
10855 (native-inputs
10856 `(("python-gevent" ,python-gevent)
10857 ("python-mock" ,python-mock)
10858 ("python-pytest-mock" ,python-pytest-mock)))
10859 (propagated-inputs
10860 `(("python-promise" ,python-promise)
10861 ("python-six" ,python-six)))
10862 (home-page "https://github.com/graphql-python/graphql-core")
10863 (synopsis "GraphQL implementation for Python")
10864 (description
10865 "GraphQL implementation for Python. GraphQL is a data query language and
10866 runtime designed and used to request and deliver data to mobile and web apps.
10867 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10868 to Python.")
10869 (license license:expat)))
10870
10871 (define-public python2-graphql-core
10872 (package-with-python2 python-graphql-core))
10873
10874 (define-public python-graphql-relay
10875 (package
10876 (name "python-graphql-relay")
10877 (version "0.4.5")
10878 (source
10879 (origin
10880 (method url-fetch)
10881 (uri (pypi-uri "graphql-relay" version))
10882 (sha256
10883 (base32
10884 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10885 (build-system python-build-system)
10886 (arguments
10887 '(#:tests? #f)) ; The tests are not distributed
10888 (propagated-inputs
10889 `(("python-graphql-core" ,python-graphql-core)
10890 ("python-promise" ,python-promise)
10891 ("python-six" ,python-six)))
10892 (home-page "https://github.com/graphql-python/graphql-relay-py")
10893 (synopsis "Relay implementation for Python")
10894 (description
10895 "This is a library to allow the easy creation of Relay-compliant servers
10896 using the GraphQL Python reference implementation of a GraphQL server. It
10897 should be noted that the code is a exact port of the original
10898 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10899 from Facebook.")
10900 (license license:expat)))
10901
10902 (define-public python2-graphql-relay
10903 (package-with-python2 python-graphql-relay))
10904
10905 (define-public python-graphene
10906 (package
10907 (name "python-graphene")
10908 (version "0.10.2")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "graphene" version))
10913 (sha256
10914 (base32
10915 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10916 (build-system python-build-system)
10917 (propagated-inputs
10918 `(("python-graphql-core" ,python-graphql-core)
10919 ("python-graphql-relay" ,python-graphql-relay)
10920 ("python-iso8601" ,python-iso8601)
10921 ("python-promise" ,python-promise)
10922 ("python-six" ,python-six)))
10923 (arguments
10924 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10925 (home-page "http://graphene-python.org/")
10926 (synopsis "GraphQL Framework for Python")
10927 (description
10928 "Graphene is a Python library for building GraphQL schemas/types.
10929 A GraphQL schema describes your data model, and provides a GraphQL server
10930 with an associated set of resolve methods that know how to fetch data.")
10931 (properties `((python2-variant . ,(delay python2-graphene))))
10932 (license license:expat)))
10933
10934 (define-public python2-graphene
10935 (let ((base (package-with-python2
10936 (strip-python2-variant python-graphene))))
10937 (package (inherit base)
10938 (native-inputs
10939 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10940 ,@(package-native-inputs base))))))
10941
10942 (define-public python-nautilus
10943 (package
10944 (name "python-nautilus")
10945 (version "0.4.9")
10946 (source
10947 (origin
10948 (method url-fetch)
10949 (uri (pypi-uri "nautilus" version))
10950 (sha256
10951 (base32
10952 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10953 (build-system python-build-system)
10954 (arguments `(#:tests? #f)) ; fails to import test modules
10955 (propagated-inputs
10956 `(("python-bcrypt" ,python-bcrypt)
10957 ("python-click" ,python-click)
10958 ("python-consul" ,python-consul)
10959 ("python-graphene" ,python-graphene)
10960 ("python-jinja2" ,python-jinja2)
10961 ("python-peewee" ,python-peewee)
10962 ("python-pika" ,python-pika)
10963 ("python-tornado" ,python-tornado)
10964 ("python-wtforms" ,python-wtforms)))
10965 (native-inputs
10966 `(("python-nose2" ,python-nose2)))
10967 (home-page "https://github.com/AlecAivazis/nautilus")
10968 (synopsis "Library for creating microservice applications")
10969 (description
10970 "Nautilus is a framework for flux based microservices that looks to
10971 provide extendible implementations of common aspects of a cloud so that you can
10972 focus on building massively scalable web applications.")
10973 (license license:expat)))
10974
10975 (define-public python-snowballstemmer
10976 (package
10977 (name "python-snowballstemmer")
10978 (version "1.2.1")
10979 (source (origin
10980 (method url-fetch)
10981 (uri (pypi-uri "snowballstemmer" version))
10982 (sha256
10983 (base32
10984 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10985 (build-system python-build-system)
10986 (arguments
10987 `(;; No tests exist
10988 #:tests? #f))
10989 (home-page "https://github.com/shibukawa/snowball_py")
10990 (synopsis "Snowball stemming library collection for Python")
10991 (description "This package provides 16 word stemmer algorithms generated
10992 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10993 English stemmer.")
10994 (license license:bsd-3)))
10995
10996 (define-public python2-snowballstemmer
10997 (package-with-python2 python-snowballstemmer))
10998
10999 (define-public python-setproctitle
11000 (package
11001 (name "python-setproctitle")
11002 (version "1.1.10")
11003 (source
11004 (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "setproctitle" version))
11007 (sha256
11008 (base32
11009 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11010 (build-system python-build-system)
11011 (arguments
11012 '(#:phases
11013 (modify-phases %standard-phases
11014 (add-before 'check 'patch-Makefile
11015 ;; Stricly this is only required for the python2 variant.
11016 ;; But adding a phase in an inherited package seems to be
11017 ;; cumbersum. So we patch even for python3.
11018 (lambda _
11019 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11020 (when nose
11021 (substitute* "Makefile"
11022 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11023 (string-append nose "/bin/nosetests "))))
11024 #t)))
11025 (replace 'check
11026 (lambda _
11027 (setenv "PYTHON" (or (which "python3") (which "python")))
11028 (setenv "PYCONFIG" (or (which "python3-config")
11029 (which "python-config")))
11030 (setenv "CC" "gcc")
11031 ;; No need to extend PYTHONPATH to find the built package, since
11032 ;; the Makefile will build anyway
11033 (invoke "make" "check"))))))
11034 (native-inputs
11035 `(("procps" ,procps))) ; required for tests
11036 (home-page
11037 "https://github.com/dvarrazzo/py-setproctitle")
11038 (synopsis
11039 "Setproctitle implementation for Python to customize the process title")
11040 (description "The library allows a process to change its title (as displayed
11041 by system tools such as ps and top).
11042
11043 Changing the title is mostly useful in multi-process systems, for
11044 example when a master process is forked: changing the children's title
11045 allows to identify the task each process is busy with. The technique
11046 is used by PostgreSQL and the OpenSSH Server for example.")
11047 (license license:bsd-3)
11048 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11049
11050 (define-public python2-setproctitle
11051 (let ((base (package-with-python2
11052 (strip-python2-variant python-setproctitle))))
11053 (package
11054 (inherit base)
11055 (native-inputs `(("python2-nose" ,python2-nose)
11056 ,@(package-native-inputs base))))))
11057
11058 (define-public python-validictory
11059 (package
11060 (name "python-validictory")
11061 (version "1.0.1")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "validictory" version))
11066 (sha256
11067 (base32
11068 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11069 (build-system python-build-system)
11070 (arguments
11071 '(#:phases
11072 (modify-phases %standard-phases
11073 (add-after 'unpack 'bootstrap
11074 ;; Move the tests out of the package directory to avoid
11075 ;; packaging them.
11076 (lambda* _
11077 (rename-file "validictory/tests" "tests")
11078 (delete-file "tests/__init__.py")))
11079 (replace 'check
11080 (lambda _
11081 ;; Extend PYTHONPATH so the built package will be found.
11082 (setenv "PYTHONPATH"
11083 (string-append (getcwd) "/build/lib:"
11084 (getenv "PYTHONPATH")))
11085 (invoke "py.test" "-vv" ))))))
11086 (native-inputs
11087 `(("python-pytest" ,python-pytest)))
11088 (home-page
11089 "https://github.com/jamesturk/validictory")
11090 (synopsis "General purpose Python data validator")
11091 (description "It allows validation of arbitrary Python data structures.
11092
11093 The schema format is based on the JSON Schema
11094 proposal (http://json-schema.org), so combined with json the library is also
11095 useful as a validator for JSON data.")
11096 (license license:expat)))
11097
11098 (define-public python2-validictory
11099 (package-with-python2 python-validictory))
11100
11101 (define-public python-pyelftools
11102 (package
11103 (name "python-pyelftools")
11104 (version "0.25")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "pyelftools" version))
11109 (sha256
11110 (base32
11111 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11112 (build-system python-build-system)
11113 (arguments
11114 `(#:phases
11115 (modify-phases %standard-phases
11116 (add-before 'check 'set-pythonpath
11117 (lambda _
11118 (setenv "PYTHONPATH"
11119 (string-append
11120 (getcwd) "/test/"
11121 ":" (getenv "PYTHONPATH")))
11122 #t)))))
11123 (home-page
11124 "https://github.com/eliben/pyelftools")
11125 (synopsis
11126 "Analyze binary and library file information")
11127 (description "This Python library provides interfaces for parsing and
11128 analyzing two binary and library file formats; the Executable and Linking
11129 Format (ELF), and debugging information in the Debugging With Attributed
11130 Record Format (DWARF).")
11131 (license license:public-domain)))
11132
11133 (define-public python-pyev
11134 (package
11135 (name "python-pyev")
11136 (version "0.9.0")
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "pyev" version))
11141 (sha256
11142 (base32
11143 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11144 (build-system python-build-system)
11145 (arguments
11146 `(#:tests? #f ; no test suite
11147 #:phases
11148 (modify-phases %standard-phases
11149 (add-after 'unpack 'patch
11150 (lambda* (#:key inputs #:allow-other-keys)
11151 (let ((libev (string-append (assoc-ref inputs "libev")
11152 "/lib/libev.so.4")))
11153 (substitute* "setup.py"
11154 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11155 (string-append "libev_dll_name = \"" libev "\"")))))))))
11156 (inputs
11157 `(("libev" ,libev)))
11158 (home-page "http://pythonhosted.org/pyev/")
11159 (synopsis "Python libev interface")
11160 (description "Pyev provides a Python interface to libev.")
11161 (license license:gpl3)))
11162
11163 (define-public python2-pyev
11164 (package-with-python2 python-pyev))
11165
11166 (define-public python-imagesize
11167 (package
11168 (name "python-imagesize")
11169 (version "1.1.0")
11170 (source
11171 (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "imagesize" version))
11174 (sha256
11175 (base32
11176 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11177 (build-system python-build-system)
11178 (home-page "https://github.com/shibukawa/imagesize_py")
11179 (synopsis "Gets image size of files in various formats in Python")
11180 (description
11181 "This package allows determination of image size from
11182 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11183 (license license:expat)))
11184
11185 (define-public python2-imagesize
11186 (package-with-python2 python-imagesize))
11187
11188 (define-public python-termstyle
11189 (package
11190 (name "python-termstyle")
11191 (version "0.1.11")
11192 (source
11193 (origin
11194 (method url-fetch)
11195 (uri (pypi-uri "termstyle" version))
11196 (sha256
11197 (base32
11198 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11199 (build-system python-build-system)
11200 (arguments
11201 '(#:phases
11202 (modify-phases %standard-phases
11203 (replace 'check
11204 (lambda _
11205 (invoke "python" "test3.py"))))))
11206 (home-page "https://github.com/gfxmonk/termstyle")
11207 (synopsis "Console text coloring for Python")
11208 (description "This package provides console text coloring for Python.")
11209 (license license:bsd-3)))
11210
11211 (define-public python-argcomplete
11212 (package
11213 (name "python-argcomplete")
11214 (version "1.7.0")
11215 (source
11216 (origin
11217 (method url-fetch)
11218 (uri (pypi-uri "argcomplete" version))
11219 (sha256
11220 (base32
11221 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11222 (build-system python-build-system)
11223 (native-inputs
11224 `(("python-pexpect" ,python-pexpect)
11225 ("tcsh" ,tcsh)
11226 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11227 (home-page "https://github.com/kislyuk/argcomplete")
11228 (synopsis "Shell tab completion for Python argparse")
11229 (description "argcomplete provides extensible command line tab completion
11230 of arguments and options for Python scripts using @code{argparse}. It's
11231 particularly useful for programs with many options or sub-parsers that can
11232 dynamically suggest completions; for example, when browsing resources over the
11233 network.")
11234 (license license:asl2.0)))
11235
11236 (define-public python2-argcomplete
11237 (package-with-python2 python-argcomplete))
11238
11239 (define-public python-xopen
11240 (package
11241 (name "python-xopen")
11242 (version "0.5.0")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (pypi-uri "xopen" version))
11247 (sha256
11248 (base32
11249 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11250 (build-system python-build-system)
11251 (propagated-inputs
11252 `(("python-setuptools-scm" ,python-setuptools-scm)))
11253 (home-page "https://github.com/marcelm/xopen/")
11254 (synopsis "Open compressed files transparently")
11255 (description "This module provides an @code{xopen} function that works like
11256 Python's built-in @code{open} function, but can also deal with compressed files.
11257 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11258 recognized by their file extensions. The focus is on being as efficient as
11259 possible on all supported Python versions.")
11260 (license license:expat)))
11261
11262 (define-public python2-xopen
11263 (let ((base (package-with-python2
11264 (strip-python2-variant python-xopen))))
11265 (package
11266 (inherit base)
11267 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11268 ,@(package-propagated-inputs base))))))
11269
11270 (define-public python-cheetah
11271 (package
11272 (name "python-cheetah")
11273 (version "3.1.0")
11274 (source
11275 (origin
11276 (method url-fetch)
11277 (uri (pypi-uri "Cheetah3" version))
11278 (sha256
11279 (base32
11280 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11281 (build-system python-build-system)
11282 (arguments
11283 `(#:modules ((guix build utils)
11284 (guix build python-build-system)
11285 (ice-9 ftw)
11286 (srfi srfi-1)
11287 (srfi srfi-26))
11288 #:phases (modify-phases %standard-phases
11289 (add-after 'unpack 'use-absolute-python
11290 (lambda _
11291 (substitute* "Cheetah/CheetahWrapper.py"
11292 (("#!/usr/bin/env python")
11293 (string-append "#!" (which "python"))))
11294 #t))
11295 (replace 'check
11296 (lambda _
11297 (let ((cwd (getcwd)))
11298 (setenv "PYTHONPATH"
11299 (string-append
11300 cwd "/build/"
11301 (find (cut string-prefix? "lib" <>)
11302 (scandir (string-append cwd "/build")))
11303 ":" (getenv "PYTHONPATH")))
11304 (setenv "PATH"
11305 (string-append (getenv "PATH")
11306 ":" cwd "/bin"))
11307 (setenv "TMPDIR" "/tmp")
11308
11309 (substitute* "Cheetah/Tests/Test.py"
11310 (("unittest.TextTestRunner\\(\\)")
11311 "unittest.TextTestRunner(verbosity=2)"))
11312
11313 (invoke "python" "Cheetah/Tests/Test.py")))))))
11314 (propagated-inputs
11315 `(("python-markdown" ,python-markdown))) ;optional
11316 (home-page "http://cheetahtemplate.org/")
11317 (synopsis "Template engine")
11318 (description "Cheetah is a text-based template engine and Python code
11319 generator.
11320
11321 Cheetah can be used as a standalone templating utility or referenced as
11322 a library from other Python applications. It has many potential uses,
11323 but web developers looking for a viable alternative to ASP, JSP, PHP and
11324 PSP are expected to be its principle user group.
11325
11326 Features:
11327 @enumerate
11328 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11329 text-based format.
11330 @item Cleanly separates content, graphic design, and program code.
11331 @item Blends the power and flexibility of Python with a simple template language
11332 that non-programmers can understand.
11333 @item Gives template writers full access to any Python data structure, module,
11334 function, object, or method in their templates.
11335 @item Makes code reuse easy by providing an object-orientated interface to
11336 templates that is accessible from Python code or other Cheetah templates.
11337 One template can subclass another and selectively reimplement sections of it.
11338 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11339 improve the performance of a dynamic website.
11340 @item Compiles templates into optimized, yet readable, Python code.
11341 @end enumerate")
11342 (license (license:x11-style "file://LICENSE"))))
11343
11344 (define-public python2-cheetah
11345 (package-with-python2 python-cheetah))
11346
11347 (define-public python-dulwich
11348 (package
11349 (name "python-dulwich")
11350 (version "0.18.6")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (list (string-append "https://www.dulwich.io/releases/"
11355 "dulwich-" version ".tar.gz")
11356 (pypi-uri "dulwich" version)))
11357 (sha256
11358 (base32
11359 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11360 (build-system python-build-system)
11361 (arguments
11362 `(#:phases
11363 (modify-phases %standard-phases
11364 (add-before 'check 'fix-tests
11365 (lambda* (#:key inputs #:allow-other-keys)
11366 ;; The tests use Popen with a custom environment which doesn't
11367 ;; include PATH.
11368 (substitute* "dulwich/tests/compat/utils.py"
11369 (("'git'") (string-append "'"
11370 (which "git")
11371 "'")))
11372 (substitute* '("dulwich/tests/test_repository.py"
11373 "dulwich/tests/test_hooks.py")
11374 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11375 (setenv "TEST_RUNNER" "unittest")
11376 (setenv "PYTHONHASHSEED" "random")
11377 #t)))))
11378 (propagated-inputs
11379 `(("python-fastimport" ,python-fastimport)))
11380 (native-inputs
11381 `(("python-mock" ,python-mock)
11382 ("python-geventhttpclient" ,python-geventhttpclient)
11383 ("git" ,git)))
11384 (home-page "https://www.dulwich.io/")
11385 (synopsis "Git implementation in Python")
11386 (description "Dulwich is an implementation of the Git file formats and
11387 protocols written in pure Python.")
11388 ;; Can be used with either license.
11389 (license (list license:asl2.0 license:gpl2+))))
11390
11391 (define-public python2-dulwich
11392 (package-with-python2 python-dulwich))
11393
11394 (define-public python-pbkdf2
11395 (package
11396 (name "python-pbkdf2")
11397 (version "1.3")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "pbkdf2" version))
11402 (sha256
11403 (base32
11404 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11405 (build-system python-build-system)
11406 (arguments
11407 '(#:phases
11408 (modify-phases %standard-phases
11409 (replace 'check
11410 (lambda _
11411 (setenv "PYTHONPATH"
11412 (string-append (getcwd) "/build/lib:"
11413 (getenv "PYTHONPATH")))
11414 (invoke "python" "test/test_pbkdf2.py"))))))
11415 (propagated-inputs
11416 `(("python-pycrypto" ,python-pycrypto))) ; optional
11417 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11418 (synopsis "Password-based key derivation")
11419 (description "This module implements the password-based key derivation
11420 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11421
11422 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11423 is part of the RSA Public Key Cryptography Standards series. The provided
11424 implementation takes a password or a passphrase and a salt value (and
11425 optionally a iteration count, a digest module, and a MAC module) and provides
11426 a file-like object from which an arbitrarly-sized key can be read.")
11427 (license license:expat)))
11428
11429 (define-public python2-pbkdf2
11430 (package-with-python2 python-pbkdf2))
11431
11432 (define-public python-qrcode
11433 (package
11434 (name "python-qrcode")
11435 (version "6.1")
11436 (source
11437 (origin
11438 (method url-fetch)
11439 (uri (pypi-uri "qrcode" version))
11440 (sha256
11441 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11442 (build-system python-build-system)
11443 (arguments
11444 ;; FIXME: Tests require packaging 'pymaging'.
11445 '(#:tests? #f))
11446 (propagated-inputs
11447 `(("python-lxml" ,python-lxml) ; for SVG output
11448 ("python-pillow" ,python-pillow) ; for PNG output
11449 ("python-six" ,python-six)))
11450 (home-page "https://github.com/lincolnloop/python-qrcode")
11451 (synopsis "QR Code image generator")
11452 (description "This package provides a pure Python QR Code generator
11453 module. It uses the Python Imaging Library (PIL) to allow for the generation
11454 of QR Codes.
11455
11456 In addition this package provides a command line tool to generate QR codes and
11457 either write these QR codes to a file or do the output as ascii art at the
11458 console.")
11459 (license license:bsd-3)))
11460
11461 (define-public python2-qrcode
11462 (package-with-python2 python-qrcode))
11463
11464 (define-public python-rst2ansi
11465 (package
11466 (name "python-rst2ansi")
11467 (version "0.1.5")
11468 (source
11469 (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "rst2ansi" version))
11472 (sha256
11473 (base32
11474 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11475 (build-system python-build-system)
11476 (propagated-inputs
11477 `(("python-docutils" ,python-docutils)))
11478 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11479 (synopsis "Convert RST to ANSI-decorated console output")
11480 (description
11481 "Python module dedicated to rendering RST (reStructuredText) documents
11482 to ansi-escaped strings suitable for display in a terminal.")
11483 (license license:expat)))
11484
11485 (define-public python-ansi2html
11486 (package
11487 (name "python-ansi2html")
11488 (version "1.2.0")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "ansi2html" version))
11493 (sha256
11494 (base32
11495 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11496 (build-system python-build-system)
11497 (native-inputs
11498 `(("python-mock" ,python-mock)
11499 ("python-nose" ,python-nose)))
11500 (propagated-inputs
11501 `(("python-six" ,python-six)))
11502 (home-page "https://github.com/ralphbean/ansi2html")
11503 (synopsis "Convert ANSI-decorated console output to HTML")
11504 (description
11505 "@command{ansi2html} is a Python library and command line utility for
11506 convering text with ANSI color codes to HTML or LaTeX.")
11507 (license license:gpl3+)))
11508
11509 (define-public python2-ansi2html
11510 (package-with-python2 python-ansi2html))
11511
11512 (define-public python-ddt
11513 (package
11514 (name "python-ddt")
11515 (version "1.1.3")
11516 (source
11517 (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "ddt" version))
11520 (sha256
11521 (base32
11522 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11523 (build-system python-build-system)
11524 (native-inputs
11525 `(("python-mock" ,python-mock)
11526 ("python-nose" ,python-nose)))
11527 (propagated-inputs
11528 `(("python-six" ,python-six)
11529 ("python-pyyaml" ,python-pyyaml)))
11530 (home-page "https://github.com/txels/ddt")
11531 (synopsis "Data-Driven Tests")
11532 (description
11533 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11534 running it with different test data, and make it appear as multiple test
11535 cases.")
11536 (license license:expat)))
11537
11538 (define-public python2-ddt
11539 (package-with-python2 python-ddt))
11540
11541 (define-public python-pycountry
11542 (package
11543 (name "python-pycountry")
11544 (version "18.5.26")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "pycountry" version))
11549 (sha256
11550 (base32
11551 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11552 (build-system python-build-system)
11553 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11554 (synopsis "ISO databases for languages, countries, currencies, etc.")
11555 (description
11556 "@code{pycountry} provides the ISO databases for the standards:
11557 @enumerate
11558 @item 639-3 (Languages)
11559 @item 3166 (Countries)
11560 @item 3166-3 (Deleted Countries)
11561 @item 3166-2 (Subdivisions of countries)
11562 @item 4217 (Currencies)
11563 @item 15924 (Scripts)
11564 @end enumerate
11565 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11566 through a Python API.")
11567 (license license:lgpl2.1+)))
11568
11569 (define-public python2-pycountry
11570 (package-with-python2 python-pycountry))
11571
11572 (define-public python-pycosat
11573 (package
11574 (name "python-pycosat")
11575 (version "0.6.1")
11576 (source
11577 (origin
11578 (method url-fetch)
11579 (uri (pypi-uri "pycosat" version))
11580 (sha256
11581 (base32
11582 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11583 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11584 (build-system python-build-system)
11585 (home-page "https://github.com/ContinuumIO/pycosat")
11586 (synopsis "Bindings to picosat (a SAT solver)")
11587 (description
11588 "This package provides efficient Python bindings to @code{picosat} on
11589 the C level. When importing pycosat, the @code{picosat} solver becomes part
11590 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11591 Problem} (SAT) solver.")
11592 (license license:expat)))
11593
11594 (define-public python2-pycosat
11595 (package-with-python2 python-pycosat))
11596
11597 (define-public python2-ruamel.ordereddict
11598 (package
11599 (name "python2-ruamel.ordereddict")
11600 (version "0.4.9")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "ruamel.ordereddict" version))
11605 (sha256
11606 (base32
11607 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11608 (build-system python-build-system)
11609 (arguments
11610 `(#:python ,python-2
11611 #:phases
11612 (modify-phases %standard-phases
11613 (delete 'check)
11614 (add-after 'install 'check
11615 (lambda* (#:key inputs outputs #:allow-other-keys)
11616 (add-installed-pythonpath inputs outputs)
11617 (invoke "python" "test/testordereddict.py"))))))
11618 (home-page "https://bitbucket.org/ruamel/ordereddict")
11619 (synopsis "Version of dict that keeps keys in insertion order")
11620 (description
11621 "This is an implementation of an ordered dictionary with @dfn{Key
11622 Insertion Order} (KIO: updates of values do not affect the position of the
11623 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11624 removed and put at the back). The standard library module @code{OrderedDict},
11625 implemented later, implements a subset of @code{ordereddict} functionality.
11626 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11627 Order} (KSO, no sorting function can be specified, but a transform can be
11628 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11629 (license license:expat)))
11630
11631 (define-public python-pypeg2
11632 (package
11633 (name "python-pypeg2")
11634 (version "2.15.2")
11635 (source
11636 (origin
11637 (method url-fetch)
11638 (uri (pypi-uri "pyPEG2" version))
11639 (sha256
11640 (base32
11641 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11642 (build-system python-build-system)
11643 (propagated-inputs `(("python-lxml" ,python-lxml)))
11644 (arguments
11645 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11646 '(#:tests? #f))
11647 (home-page "https://fdik.org/pyPEG/")
11648 (synopsis "Parsering Expression Grammars in Python")
11649 (description "PyPEG is an intrinsic parser interpreter framework for
11650 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11651 parse many formal languages.")
11652 (license license:gpl2)))
11653
11654 (define-public python-incremental
11655 (package
11656 (name "python-incremental")
11657 (version "17.5.0")
11658 (source
11659 (origin
11660 (method url-fetch)
11661 (uri (pypi-uri "incremental" version))
11662 (sha256
11663 (base32
11664 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11665 (build-system python-build-system)
11666 (home-page "https://github.com/hawkowl/incremental")
11667 (synopsis "Library for versioning Python projects")
11668 (description "Incremental is a small library that versions your Python
11669 projects.")
11670 (license license:expat)))
11671
11672 (define-public python2-incremental
11673 (package-with-python2 python-incremental))
11674
11675 (define-public python-invoke
11676 (package
11677 (name "python-invoke")
11678 (home-page "http://www.pyinvoke.org/")
11679 (version "1.1.0")
11680 (source (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "invoke" version))
11683 (sha256
11684 (base32
11685 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11686 (build-system python-build-system)
11687 (arguments
11688 ;; XXX: Requires many dependencies that are not yet in Guix.
11689 `(#:tests? #f))
11690 (synopsis "Pythonic task execution")
11691 (description
11692 "Invoke is a Python task execution tool and library, drawing inspiration
11693 from various sources to arrive at a powerful and clean feature set. It is
11694 evolved from the Fabric project, but focuses on local and abstract concerns
11695 instead of servers and network commands.")
11696 (license license:bsd-3)))
11697
11698 (define-public python2-invoke
11699 (package-with-python2 python-invoke))
11700
11701 (define-public python-automat
11702 (package
11703 (name "python-automat")
11704 (version "0.7.0")
11705 (source (origin
11706 (method url-fetch)
11707 (uri (pypi-uri "Automat" version))
11708 (sha256
11709 (base32
11710 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11711 (build-system python-build-system)
11712 ;; We disable the tests because they require python-twisted, while
11713 ;; python-twisted depends on python-automat. Twisted is optional, but the
11714 ;; tests fail if it is not available. Also see
11715 ;; <https://github.com/glyph/automat/issues/71>.
11716 (arguments '(#:tests? #f))
11717 (native-inputs
11718 `(("python-m2r" ,python-m2r)
11719 ("python-setuptools-scm" ,python-setuptools-scm)
11720 ("python-graphviz" ,python-graphviz)))
11721 (propagated-inputs
11722 `(("python-six" ,python-six)
11723 ("python-attrs" ,python-attrs)))
11724 (home-page "https://github.com/glyph/Automat")
11725 (synopsis "Self-service finite-state machines")
11726 (description "Automat is a library for concise, idiomatic Python
11727 expression of finite-state automata (particularly deterministic finite-state
11728 transducers).")
11729 (license license:expat)))
11730
11731 (define-public python2-automat
11732 (package-with-python2 python-automat))
11733
11734 (define-public python-m2r
11735 (package
11736 (name "python-m2r")
11737 (version "0.2.1")
11738 (source (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "m2r" version))
11741 (sha256
11742 (base32
11743 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11744 (build-system python-build-system)
11745 (propagated-inputs
11746 `(("python-docutils" ,python-docutils)
11747 ("python-mistune" ,python-mistune)))
11748 (native-inputs
11749 `(("python-pygments" ,python-pygments)
11750 ("python-mock" ,python-mock)))
11751 (home-page "https://github.com/miyakogi/m2r")
11752 (synopsis "Markdown to reStructuredText converter")
11753 (description "M2R converts a markdown file including reST markups to valid
11754 reST format.")
11755 (license license:expat)))
11756
11757 (define-public python2-m2r
11758 (package-with-python2 python-m2r))
11759
11760 (define-public python-constantly
11761 (package
11762 (name "python-constantly")
11763 (version "15.1.0")
11764 (source (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "constantly" version))
11767 (sha256
11768 (base32
11769 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11770 (build-system python-build-system)
11771 (home-page "https://github.com/twisted/constantly")
11772 (synopsis "Symbolic constants in Python")
11773 (description "Constantly is a Python library that provides symbolic
11774 constant support. It includes collections and constants with text, numeric,
11775 and bit flag values.")
11776 (license license:expat)))
11777
11778 (define-public python2-constantly
11779 (package-with-python2 python-constantly))
11780
11781 (define-public python-attrs
11782 (package
11783 (name "python-attrs")
11784 (version "19.1.0")
11785 (source (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "attrs" version))
11788 (sha256
11789 (base32
11790 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11791 (build-system python-build-system)
11792 (arguments
11793 `(#:modules ((guix build utils)
11794 (guix build python-build-system)
11795 (ice-9 ftw)
11796 (srfi srfi-1)
11797 (srfi srfi-26))
11798 #:phases (modify-phases %standard-phases
11799 (replace 'check
11800 (lambda _
11801 (let ((cwd (getcwd)))
11802 (setenv "PYTHONPATH"
11803 (string-append
11804 cwd "/build/"
11805 (find (cut string-prefix? "lib" <>)
11806 (scandir (string-append cwd "/build")))
11807 ":"
11808 (getenv "PYTHONPATH")))
11809 (invoke "python" "-m" "pytest")))))))
11810 (native-inputs
11811 `(("python-coverage" ,python-coverage)
11812 ("python-hypothesis" ,python-hypothesis)
11813 ("python-pympler" ,python-pympler)
11814 ("python-pytest" ,python-pytest)
11815 ("python-six" ,python-six)
11816 ("python-sphinx" ,python-sphinx)
11817 ("python-zope-interface" ,python-zope-interface)))
11818 (home-page "https://github.com/python-attrs/attrs/")
11819 (synopsis "Attributes without boilerplate")
11820 (description "@code{attrs} is a Python package with class decorators that
11821 ease the chores of implementing the most common attribute-related object
11822 protocols.")
11823 (license license:expat)))
11824
11825 (define-public python2-attrs
11826 (package-with-python2 python-attrs))
11827
11828 (define-public python-attrs-bootstrap
11829 (package
11830 (inherit python-attrs)
11831 (name "python-attrs-bootstrap")
11832 (native-inputs `())
11833 (arguments `(#:tests? #f))))
11834
11835 (define-public python2-attrs-bootstrap
11836 (package-with-python2 python-attrs-bootstrap))
11837
11838 (define-public python2-cliapp
11839 (package
11840 (name "python2-cliapp")
11841 (version "1.20180812.1")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (string-append
11846 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11847 version ".tar.gz"))
11848 (sha256
11849 (base32
11850 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11851 (build-system python-build-system)
11852 (arguments
11853 `(#:python ,python-2
11854 #:phases
11855 (modify-phases %standard-phases
11856 ;; check phase needs to be run before the build phase. If not,
11857 ;; coverage-test-runner looks for tests for the built source files,
11858 ;; and fails.
11859 (delete 'check)
11860 (add-before 'build 'check
11861 (lambda _
11862 ;; Disable python3 tests
11863 (substitute* "check"
11864 (("python3") "# python3"))
11865 (invoke "./check"))))))
11866 (native-inputs
11867 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11868 ("python2-pep8" ,python2-pep8)))
11869 (propagated-inputs
11870 `(("python2-pyaml" ,python2-pyaml)))
11871 (home-page "https://liw.fi/cliapp/")
11872 (synopsis "Python framework for command line programs")
11873 (description "@code{python2-cliapp} is a python framework for
11874 command line programs. It contains the typical stuff such programs
11875 need to do, such as parsing the command line for options, and
11876 iterating over input files.")
11877 (license license:gpl2+)))
11878
11879 (define-public python2-ttystatus
11880 (package
11881 (name "python2-ttystatus")
11882 (version "0.36")
11883 (source
11884 (origin
11885 (method url-fetch)
11886 (uri (string-append
11887 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11888 version ".tar.gz"))
11889 (sha256
11890 (base32
11891 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11892 (build-system python-build-system)
11893 (native-inputs
11894 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11895 ("python2-pep8" ,python2-pep8)))
11896 (arguments
11897 `(#:python ,python-2
11898 #:phases
11899 (modify-phases %standard-phases
11900 ;; check phase needs to be run before the build phase. If not,
11901 ;; coverage-test-runner looks for tests for the built source files,
11902 ;; and fails.
11903 (delete 'check)
11904 (add-before 'build 'check
11905 (lambda _ (invoke "make" "check"))))))
11906 (home-page "https://liw.fi/ttystatus/")
11907 (synopsis "Python library for showing progress reporting and
11908 status updates on terminals")
11909 (description "@code{python2-ttystatus} is a python library for
11910 showing progress reporting and status updates on terminals, for
11911 command line programs. Output is automatically adapted to the width
11912 of the terminal: truncated if it does not fit, and resized if the
11913 terminal size changes.")
11914 (license license:gpl3+)))
11915
11916 (define-public python2-tracing
11917 (package
11918 (name "python2-tracing")
11919 (version "0.10")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (string-append
11924 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11925 version ".tar.gz"))
11926 (sha256
11927 (base32
11928 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11929 (build-system python-build-system)
11930 (arguments
11931 `(#:python ,python-2))
11932 (home-page "https://liw.fi/tracing/")
11933 (synopsis "Python debug logging helper")
11934 (description "@code{python2-tracing} is a python library for
11935 logging debug messages. It provides a way to turn debugging messages
11936 on and off, based on the filename they occur in. It is much faster
11937 than using @code{logging.Filter} to accomplish the same thing, which
11938 matters when code is run in production mode. The actual logging still
11939 happens using the @code{logging} library.")
11940 (license license:gpl3+)))
11941
11942 (define-public python2-larch
11943 (package
11944 (name "python2-larch")
11945 (version "1.20151025")
11946 (source
11947 (origin
11948 (method url-fetch)
11949 (uri (string-append
11950 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11951 version ".tar.gz"))
11952 (patches (search-patches
11953 "python2-larch-coverage-4.0a6-compatibility.patch"))
11954 (sha256
11955 (base32
11956 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11957 (build-system python-build-system)
11958 (arguments
11959 `(#:python ,python-2
11960 #:phases
11961 (modify-phases %standard-phases
11962 ;; check phase needs to be run before the build phase. If not,
11963 ;; coverage-test-runner looks for tests for the built source files,
11964 ;; and fails.
11965 (delete 'check)
11966 (add-before 'build 'check
11967 (lambda _ (invoke "make" "check"))))))
11968 (native-inputs
11969 `(("cmdtest" ,cmdtest)
11970 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11971 (propagated-inputs
11972 `(("python2-tracing" ,python2-tracing)))
11973 (home-page "https://liw.fi/larch/")
11974 (synopsis "Python copy-on-write B-tree library")
11975 (description "@code{python2-larch} is an implementation of
11976 particular kind of B-tree, based on research by Ohad Rodeh. See
11977 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11978 on the data structure.
11979
11980 The distinctive feature of this B-tree is that a node is never
11981 (conceptually) modified. Instead, all updates are done by
11982 copy-on-write. This makes it easy to clone a tree, and modify only the
11983 clone, while other processes access the original tree.")
11984 (license license:gpl3+)))
11985
11986 (define-public python-astroid
11987 (package
11988 (name "python-astroid")
11989 (version "2.1.0")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "astroid" version))
11994 (sha256
11995 (base32
11996 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11997 (build-system python-build-system)
11998 (propagated-inputs
11999 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12000 ("python-six" ,python-six)
12001 ("python-wrapt" ,python-wrapt)))
12002 (native-inputs
12003 `(("python-dateutil" ,python-dateutil)
12004 ("python-nose" ,python-nose)
12005 ("python-pytest" ,python-pytest)
12006 ("python-pytest-runner" ,python-pytest-runner)))
12007 (arguments
12008 `(#:phases
12009 (modify-phases %standard-phases
12010 (add-after 'unpack 'remove-spurious-test
12011 (lambda _
12012 ;; This can be removed after upgrading from python-3.7
12013 ;; https://github.com/PyCQA/astroid/issues/593
12014 ;; https://bugs.python.org/issue34056
12015 (delete-file "astroid/tests/unittest_modutils.py")
12016 #t))
12017 (replace 'check
12018 (lambda _
12019 (invoke "pytest" "astroid"))))))
12020 (home-page "https://github.com/PyCQA/astroid")
12021 (synopsis "Common base representation of python source code for pylint and
12022 other projects")
12023 (description "@code{python-astroid} provides a common base representation
12024 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12025
12026 It provides a compatible representation which comes from the _ast module. It
12027 rebuilds the tree generated by the builtin _ast module by recursively walking
12028 down the AST and building an extended ast. The new node classes have
12029 additional methods and attributes for different usages. They include some
12030 support for static inference and local name scopes. Furthermore, astroid
12031 builds partial trees by inspecting living objects.")
12032 (license license:lgpl2.1+)
12033 (properties `((python2-variant . ,(delay python2-astroid))))))
12034
12035 (define-public python2-astroid
12036 (let ((base (package-with-python2
12037 (strip-python2-variant python-astroid))))
12038 (package (inherit base)
12039 ;; Version 2.x removes python2 support.
12040 (version "1.6.5")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "astroid" version))
12045 (sha256
12046 (base32
12047 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12048 (arguments
12049 (substitute-keyword-arguments (package-arguments base)
12050 ((#:phases phases)
12051 `(modify-phases ,phases
12052 (add-after 'unpack 'remove-spurious-test
12053 (lambda _
12054 ;; https://github.com/PyCQA/astroid/issues/276
12055 (delete-file "astroid/tests/unittest_brain.py")
12056 #t))
12057 (replace 'check
12058 (lambda _
12059 (invoke"python" "-m" "unittest" "discover"
12060 "-p" "unittest*.py")))))))
12061 (native-inputs `())
12062 (propagated-inputs
12063 `(("python2-backports-functools-lru-cache"
12064 ,python2-backports-functools-lru-cache)
12065 ("python2-enum34" ,python2-enum34)
12066 ("python2-singledispatch" ,python2-singledispatch)
12067 ,@(package-propagated-inputs base))))))
12068
12069 (define-public python-isort
12070 (package
12071 (name "python-isort")
12072 (version "4.3.4")
12073 (source
12074 (origin
12075 (method git-fetch)
12076 (uri (git-reference
12077 ;; Tests pass only from the Github sources
12078 (url "https://github.com/timothycrosley/isort")
12079 (commit version)))
12080 (file-name (git-file-name name version))
12081 (sha256
12082 (base32
12083 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12084 (build-system python-build-system)
12085 (native-inputs
12086 `(("python-mock" ,python-mock)
12087 ("python-pytest" ,python-pytest)))
12088 (home-page "https://github.com/timothycrosley/isort")
12089 (synopsis "Python utility/library to sort python imports")
12090 (description "@code{python-isort} is a python utility/library to sort
12091 imports alphabetically, and automatically separated into sections. It
12092 provides a command line utility, a python library and plugins for various
12093 editors.")
12094 (license license:expat)
12095 (properties `((python2-variant . ,(delay python2-isort))))))
12096
12097 (define-public python2-isort
12098 (let ((base (package-with-python2
12099 (strip-python2-variant python-isort))))
12100 (package (inherit base)
12101 (native-inputs
12102 `(("python2-futures" ,python2-futures)
12103 ,@(package-native-inputs base))))))
12104
12105 (define-public python2-backports-functools-lru-cache
12106 (package
12107 (name "python2-backports-functools-lru-cache")
12108 (version "1.5")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 ;; only the pypi tarballs contain the necessary metadata
12113 (uri (pypi-uri "backports.functools_lru_cache" version))
12114 (sha256
12115 (base32
12116 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12117 (build-system python-build-system)
12118 (native-inputs
12119 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12120 (arguments
12121 `(#:python ,python-2))
12122 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12123 (synopsis "Backport of functools.lru_cache from Python 3.3")
12124 (description "@code{python2-backports-functools-lru-cache} is a backport
12125 of @code{functools.lru_cache} from python 3.3.")
12126 (license license:expat)))
12127
12128 (define-public python-configparser
12129 (package
12130 (name "python-configparser")
12131 (version "3.7.1")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "configparser" version))
12136 (sha256
12137 (base32
12138 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12139 (build-system python-build-system)
12140 (home-page "https://github.com/jaraco/configparser/")
12141 (synopsis "Backport of configparser from python 3.5")
12142 (description "@code{python-configparser} is a backport of
12143 @code{configparser} from Python 3.5 so that it can be used directly
12144 in other versions.")
12145 (license license:expat)))
12146
12147 (define-public python2-configparser
12148 (package-with-python2 python-configparser))
12149
12150 (define-public python-mando
12151 (package
12152 (name "python-mando")
12153 (version "0.6.4")
12154 (source (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "mando" version))
12157 (sha256
12158 (base32
12159 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12160 (build-system python-build-system)
12161 (propagated-inputs
12162 `(("python-rst2ansi" ,python-rst2ansi)
12163 ("python-six" ,python-six)))
12164 (native-inputs
12165 `(("python-pytest" ,python-pytest)))
12166 (home-page "https://mando.readthedocs.org/")
12167 (synopsis
12168 "Wrapper around argparse, allowing creation of complete CLI applications")
12169 (description
12170 "This package is a wrapper around argparse, allowing you to write complete CLI
12171 applications in seconds while maintaining all the flexibility.")
12172 (license license:expat)))
12173
12174 (define-public python2-mando
12175 (package-with-python2 python-mando))
12176
12177 (define-public python2-argparse
12178 (package
12179 (name "python2-argparse")
12180 (version "1.4.0")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "argparse" version))
12185 (sha256
12186 (base32
12187 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12188 (build-system python-build-system)
12189 (arguments
12190 `(#:python ,python-2))
12191 (home-page "https://github.com/ThomasWaldmann/argparse/")
12192 (synopsis "Python command-line parsing library")
12193 (description
12194 "This package is mostly for people who want to have @code{argparse} on
12195 older Pythons because it was not part of the standard library back then.")
12196 (license license:psfl)))
12197
12198 (define-public python-fudge
12199 (package
12200 (name "python-fudge")
12201 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12202 ;; package, which is currently the only use of this package.
12203 (version "0.9.6")
12204 (source
12205 (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "fudge" version))
12208 (sha256
12209 (base32
12210 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12211 (build-system python-build-system)
12212 (arguments
12213 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12214 (home-page "https://github.com/fudge-py/fudge")
12215 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12216 (description
12217 "Fudge is a Python module for using fake objects (mocks and stubs) to
12218 test real ones.
12219
12220 In readable Python code, you declare the methods available on your fake object
12221 and how they should be called. Then you inject that into your application and
12222 start testing. This declarative approach means you don’t have to record and
12223 playback actions and you don’t have to inspect your fakes after running code.
12224 If the fake object was used incorrectly then you’ll see an informative
12225 exception message with a traceback that points to the culprit.")
12226 (license license:expat)))
12227
12228 (define-public python2-fudge
12229 (package-with-python2 python-fudge))
12230
12231 (define-public python-mwclient
12232 (package
12233 (name "python-mwclient")
12234 (version "0.8.4")
12235 (source
12236 (origin
12237 (method url-fetch)
12238 ;; The PyPI version wouldn't contain tests.
12239 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12240 "v" version ".tar.gz"))
12241 (file-name (string-append name "-" version ".tar.gz"))
12242 (sha256
12243 (base32
12244 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12245 (build-system python-build-system)
12246 (propagated-inputs
12247 `(("python-requests" ,python-requests)
12248 ("python-requests-oauthlib"
12249 ,python-requests-oauthlib)
12250 ("python-six" ,python-six)))
12251 (native-inputs
12252 `(("python-mock" ,python-mock)
12253 ("python-pytest" ,python-pytest)
12254 ("python-pytest-pep8" ,python-pytest-pep8)
12255 ("python-pytest-cache" ,python-pytest-cache)
12256 ("python-pytest-cov" ,python-pytest-cov)
12257 ("python-responses" ,python-responses)))
12258 (home-page "https://github.com/btongminh/mwclient")
12259 (synopsis "MediaWiki API client")
12260 (description "This package provides a MediaWiki API client.")
12261 (license license:expat)))
12262
12263 (define-public python2-mwclient
12264 (package-with-python2 python-mwclient))
12265
12266 (define-public python-utils
12267 (package
12268 (name "python-utils")
12269 (version "2.1.0")
12270 (source (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "python-utils" version))
12273 (sha256
12274 (base32
12275 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12276 (build-system python-build-system)
12277 (native-inputs
12278 `(("pytest-runner" ,python-pytest-runner)
12279 ("pytest" ,python-pytest)
12280 ("six" ,python-six)))
12281 (home-page "https://github.com/WoLpH/python-utils")
12282 (synopsis "Convenient utilities not included with the standard Python install")
12283 (description
12284 "Python Utils is a collection of small Python functions and classes which
12285 make common patterns shorter and easier.")
12286 (license license:bsd-2)))
12287
12288 (define-public python2-utils
12289 (package-with-python2 python-utils))
12290
12291 (define-public python-diff-match-patch
12292 (package
12293 (name "python-diff-match-patch")
12294 (version "20121119")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "diff-match-patch" version))
12299 (sha256
12300 (base32
12301 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12302 (build-system python-build-system)
12303 (home-page "https://code.google.com/p/google-diff-match-patch")
12304 (synopsis "Synchronize plain text")
12305 (description "Diff Match and Patch libraries offer robust algorithms to
12306 perform the operations required for synchronizing plain text.")
12307 (license license:asl2.0)))
12308
12309 (define-public python2-diff-match-patch
12310 (package-with-python2 python-diff-match-patch))
12311
12312 (define-public python-dirsync
12313 (package
12314 (name "python-dirsync")
12315 (version "2.2.3")
12316 (source
12317 (origin
12318 (method url-fetch)
12319 (uri (pypi-uri "dirsync" version))
12320 (sha256
12321 (base32
12322 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12323 (build-system python-build-system)
12324 (propagated-inputs
12325 `(("six" ,python-six)))
12326 (home-page "https://bitbucket.org/tkhyn/dirsync")
12327 (synopsis "Advanced directory tree synchronisation tool")
12328 (description "Advanced directory tree synchronisation tool.")
12329 (license license:expat)))
12330
12331 (define-public python2-dirsync
12332 (package-with-python2 python-dirsync))
12333
12334 (define-public python-levenshtein
12335 (package
12336 (name "python-levenshtein")
12337 (version "0.12.0")
12338 (source
12339 (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "python-Levenshtein" version))
12342 (sha256
12343 (base32
12344 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12345 (build-system python-build-system)
12346 (home-page "https://github.com/ztane/python-Levenshtein")
12347 (synopsis "Fast computation of Levenshtein distance and string similarity")
12348 (description
12349 "The Levenshtein Python C extension module contains functions for fast computation of
12350 @enumerate
12351 @item Levenshtein (edit) distance, and edit operations
12352 @item string similarity
12353 @item approximate median strings, and generally string averaging
12354 @item string sequence and set similarity
12355 @end enumerate
12356 It supports both normal and Unicode strings.")
12357 (license license:gpl2+)))
12358
12359 (define-public python2-levenshtein
12360 (package-with-python2 python-levenshtein))
12361
12362 (define-public python-scandir
12363 (package
12364 (name "python-scandir")
12365 (version "1.9.0")
12366 (source
12367 (origin
12368 (method url-fetch)
12369 (uri (pypi-uri "scandir" version))
12370 (sha256
12371 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12372 (build-system python-build-system)
12373 (arguments
12374 `(#:phases (modify-phases %standard-phases
12375 (replace 'check
12376 (lambda _
12377 (invoke "python" "test/run_tests.py"))))))
12378 (home-page "https://github.com/benhoyt/scandir")
12379 (synopsis "Directory iteration function")
12380 (description
12381 "Directory iteration function like os.listdir(), except that instead of
12382 returning a list of bare filenames, it yields DirEntry objects that include
12383 file type and stat information along with the name. Using scandir() increases
12384 the speed of os.walk() by 2-20 times (depending on the platform and file
12385 system) by avoiding unnecessary calls to os.stat() in most cases.
12386
12387 This package is part of the Python standard library since version 3.5.")
12388 (license license:bsd-3)))
12389
12390 (define-public python2-scandir
12391 (package-with-python2 python-scandir))
12392
12393 (define-public python2-stemming
12394 (package
12395 (name "python2-stemming")
12396 (version "1.0.1")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "stemming" version))
12401 (sha256
12402 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:python ,python-2))
12406 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12407 (synopsis "Python implementations of various stemming algorithms")
12408 (description
12409 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12410 stemming algorithms for English. These implementations are straightforward and
12411 efficient, unlike some Python versions of the same algorithms available on the
12412 Web. This package is an extraction of the stemming code included in the Whoosh
12413 search engine.")
12414 (license license:public-domain)))
12415
12416 (define-public python-factory-boy
12417 (package
12418 (name "python-factory-boy")
12419 (version "2.8.1")
12420 (source
12421 (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "factory_boy" version))
12424 (sha256
12425 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12426 (build-system python-build-system)
12427 (arguments
12428 ;; Tests are not included in the tarball.
12429 `(#:tests? #f))
12430 (propagated-inputs
12431 `(("faker" ,python-faker)))
12432 (home-page "https://github.com/benhoyt/scandir")
12433 (synopsis "Versatile test fixtures replacement")
12434 (description
12435 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12436
12437 As a fixtures replacement tool, it aims to replace static, hard to maintain
12438 fixtures with easy-to-use factories for complex object.
12439
12440 Instead of building an exhaustive test setup with every possible combination
12441 of corner cases, factory_boy allows you to use objects customized for the
12442 current test, while only declaring the test-specific fields")
12443 (license license:expat)))
12444
12445 (define-public python2-factory-boy
12446 (package-with-python2 python-factory-boy))
12447
12448 (define-public python-translate-toolkit
12449 (package
12450 (name "python-translate-toolkit")
12451 (version "2.1.0")
12452 (source
12453 (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12456 (sha256
12457 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12458 (build-system python-build-system)
12459 (native-inputs
12460 `(("python-pytest" ,python-pytest)
12461 ("python-sphinx" ,python-sphinx)))
12462 (propagated-inputs
12463 `(("python-babel" ,python-babel)
12464 ("python-beautifulsoup4" ,python-beautifulsoup4)
12465 ("python-chardet" ,python-chardet)
12466 ("python-diff-match-patch" ,python-diff-match-patch)
12467 ("python-levenshtein" ,python-levenshtein)
12468 ("python-lxml" ,python-lxml)
12469 ("python-six" ,python-six)
12470 ("python-vobject" ,python-vobject)
12471 ("python-pyyaml" ,python-pyyaml)))
12472 (arguments
12473 ;; TODO: tests are not run, because they end with
12474 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12475 ;; 'parse_funcs'
12476 ;; during test setup.
12477 `(#:tests? #f))
12478 (home-page "https://toolkit.translatehouse.org")
12479 (synopsis "Tools and API for translation and localization engineering")
12480 (description
12481 "Tools and API for translation and localization engineering. It contains
12482 several utilities, as well as an API for building localization tools.")
12483 (license license:gpl2+)))
12484
12485 (define-public python2-translate-toolkit
12486 (package-with-python2 python-translate-toolkit))
12487
12488 (define-public python-packaging
12489 (package
12490 (name "python-packaging")
12491 (version "19.0")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (pypi-uri "packaging" version))
12496 (sha256
12497 (base32
12498 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12499 (build-system python-build-system)
12500 (arguments
12501 `(#:phases (modify-phases %standard-phases
12502 (replace 'check
12503 (lambda _ (invoke "py.test" "-vv"))))))
12504 (native-inputs
12505 `(("python-pretend" ,python-pretend)
12506 ("python-pytest" ,python-pytest)))
12507 (propagated-inputs
12508 `(("python-pyparsing" ,python-pyparsing)
12509 ("python-six" ,python-six)))
12510 (home-page "https://github.com/pypa/packaging")
12511 (synopsis "Core utilities for Python packages")
12512 (description "Packaging is a Python module for dealing with Python packages.
12513 It offers an interface for working with package versions, names, and dependency
12514 information.")
12515 ;; From 'LICENSE': This software is made available under the terms of
12516 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12517 ;; Contributions to this software is made under the terms of *both* these
12518 ;; licenses.
12519 (license (list license:asl2.0 license:bsd-2))))
12520
12521 (define-public python2-packaging
12522 (package-with-python2 python-packaging))
12523
12524 (define-public python-relatorio
12525 (package
12526 (name "python-relatorio")
12527 (version "0.8.0")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "relatorio" version))
12532 (sha256
12533 (base32
12534 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12535 (build-system python-build-system)
12536 (propagated-inputs
12537 `(("python-lxml" ,python-lxml)
12538 ("python-genshi" ,python-genshi)))
12539 (native-inputs
12540 `(("python-magic" ,python-magic)))
12541 (home-page "https://relatorio.tryton.org/")
12542 (synopsis "Templating library able to output ODT and PDF files")
12543 (description "Relatorio is a templating library which provides a way to
12544 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12545 for more filetypes can be easily added by creating plugins for them.")
12546 (license license:gpl3+)))
12547
12548 (define-public python2-relatorio
12549 (package-with-python2 python-relatorio))
12550
12551 (define-public python-radon
12552 (package
12553 (name "python-radon")
12554 (version "2.2.0")
12555 (source
12556 (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "radon" version))
12559 (sha256
12560 (base32
12561 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12562 (build-system python-build-system)
12563 (arguments
12564 `(#:phases (modify-phases %standard-phases
12565 (replace 'check
12566 (lambda _
12567 (invoke "python" "radon/tests/run.py"))))))
12568 (propagated-inputs
12569 `(("python-colorama" ,python-colorama)
12570 ("python-flake8-polyfill" ,python-flake8-polyfill)
12571 ("python-mando" ,python-mando)))
12572 (native-inputs
12573 `(("python-pytest" ,python-pytest)
12574 ("python-pytest-mock" ,python-pytest-mock)))
12575 (home-page "https://radon.readthedocs.org/")
12576 (synopsis "Code Metrics in Python")
12577 (description "Radon is a Python tool which computes various code metrics.
12578 Supported metrics are:
12579 @itemize @bullet
12580 @item raw metrics: SLOC, comment lines, blank lines, &c.
12581 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12582 @item Halstead metrics (all of them)
12583 @item the Maintainability Index (a Visual Studio metric)
12584 @end itemize")
12585 (license license:expat)))
12586
12587 (define-public python2-radon
12588 (package-with-python2 python-radon))
12589
12590 (define-public python-sure
12591 (package
12592 (name "python-sure")
12593 (version "1.4.11")
12594 (source
12595 (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "sure" version))
12598 (sha256
12599 (base32
12600 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12601 (build-system python-build-system)
12602 (propagated-inputs
12603 `(("python-mock" ,python-mock)
12604 ("python-six" ,python-six)))
12605 (native-inputs
12606 `(("python-nose" ,python-nose)))
12607 (home-page "https://github.com/gabrielfalcao/sure")
12608 (synopsis "Automated testing library in python for python")
12609 (description
12610 "Sure is a python library that leverages a DSL for writing assertions.
12611 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12612 (license license:gpl3+)))
12613
12614 (define-public python2-sure
12615 (package-with-python2 python-sure))
12616
12617 (define-public python2-couleur
12618 ;; This package does not seem to support python3 at all, hence,
12619 ;; only the python2 variant definition is provided.
12620 (package
12621 (name "python2-couleur")
12622 (version "0.6.2")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "couleur" version))
12627 (sha256
12628 (base32
12629 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12630 (build-system python-build-system)
12631 (arguments
12632 `(#:python ,python-2))
12633 (home-page "https://github.com/gabrielfalcao/couleur")
12634 (synopsis
12635 "ANSI terminal tool for python, colored shell and other handy fancy features")
12636 (description
12637 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12638 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12639 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12640 ;; https://github.com/gabrielfalcao/couleur/issues/11
12641 (license license:lgpl3+)))
12642
12643 (define-public python-misaka
12644 (package
12645 (name "python-misaka")
12646 (version "2.1.1")
12647 (source
12648 (origin
12649 (method url-fetch)
12650 (uri (pypi-uri "misaka" version))
12651 (sha256
12652 (base32
12653 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12654 (build-system python-build-system)
12655 (arguments
12656 `(;; Line 37 of setup.py calls self.run_command('develop')
12657 ;; in the 'check' phase. This command seems to be trying
12658 ;; to write to
12659 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12660 ;; for which it does not have the permission to write.
12661 #:tests? #f))
12662 (propagated-inputs
12663 `(("python-cffi" ,python-cffi)))
12664 (home-page "https://github.com/FSX/misaka")
12665 (synopsis "Python binding for Hoedown")
12666 (description
12667 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12668 library written in C. It features a fast HTML renderer and functionality to make custom
12669 renderers (e.g. man pages or LaTeX).")
12670 (license license:expat)))
12671
12672 (define-public python2-misaka
12673 (package-with-python2 python-misaka))
12674
12675 (define-public python2-steadymark
12676 ;; This is forced into being a python2 only variant
12677 ;; due to its dependence on couleur that has no support
12678 ;; for python3
12679 (package
12680 (name "python2-steadymark")
12681 (version "0.7.3")
12682 (source
12683 (origin
12684 (method url-fetch)
12685 (uri (pypi-uri "steadymark" version))
12686 (sha256
12687 (base32
12688 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12689 (build-system python-build-system)
12690 (native-inputs
12691 `(("python-couleur" ,python2-couleur)
12692 ("python-sure" ,python2-sure)
12693 ("python-misaka" ,python2-misaka)))
12694 (arguments
12695 `(#:python ,python-2
12696 #:phases
12697 (modify-phases %standard-phases
12698 (add-before 'build 'patch-setup-py
12699 (lambda _
12700 ;; Update requirements from dependency==version
12701 ;; to dependency>=version
12702 (substitute* "setup.py"
12703 (("==") ">="))
12704 #t)))))
12705 (home-page "https://github.com/gabrielfalcao/steadymark")
12706 (synopsis "Markdown-based test runner for python")
12707 (description
12708 "@code{Steadymark} allows documentation to be written in github-flavoured
12709 markdown. The documentation may contain snippets of code surrounded by python
12710 code blocks and @code{Steadymark} will find these snippets and run them, making
12711 sure that there are no old malfunctional examples in the documentation examples.")
12712 (license license:expat)))
12713
12714 (define-public python-jsonpointer
12715 (package
12716 (name "python-jsonpointer")
12717 (version "1.10")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 (uri (pypi-uri "jsonpointer" version))
12722 (sha256
12723 (base32
12724 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12725 (build-system python-build-system)
12726 (home-page "https://github.com/stefankoegl/python-json-pointer")
12727 (synopsis "Identify specific nodes in a JSON document")
12728 (description "@code{jsonpointer} allows you to access specific nodes
12729 by path in a JSON document (see RFC 6901).")
12730 (license license:bsd-3)))
12731
12732 (define-public python2-jsonpointer
12733 (package-with-python2 python-jsonpointer))
12734
12735 (define-public python-jsonpatch
12736 (package
12737 (name "python-jsonpatch")
12738 (version "1.16")
12739 (source
12740 (origin
12741 (method url-fetch)
12742 ;; pypi version lacks tests.js
12743 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12744 "archive/v" version ".tar.gz"))
12745 (file-name (string-append name "-" version ".tar.gz"))
12746 (sha256
12747 (base32
12748 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12749 (build-system python-build-system)
12750 (native-inputs
12751 `(("python-jsonpointer" ,python-jsonpointer)))
12752 (home-page "https://github.com/stefankoegl/python-json-patch")
12753 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12754 (description "@code{jsonpatch} is a library and program that allows
12755 applying JSON Patches according to RFC 6902.")
12756 (license license:bsd-3)))
12757
12758 (define-public python2-jsonpatch
12759 (package-with-python2 python-jsonpatch))
12760
12761 (define-public python-jsonpatch-0.4
12762 (package (inherit python-jsonpatch)
12763 (name "python-jsonpatch")
12764 (version "0.4")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12769 "archive/v" version ".tar.gz"))
12770 (file-name (string-append name "-" version ".tar.gz"))
12771 (sha256
12772 (base32
12773 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12774
12775 (define-public python2-jsonpatch-0.4
12776 (package-with-python2 python-jsonpatch-0.4))
12777
12778 (define-public python-rfc3986
12779 (package
12780 (name "python-rfc3986")
12781 (version "1.1.0")
12782 (source (origin
12783 (method url-fetch)
12784 (uri (pypi-uri "rfc3986" version))
12785 (sha256
12786 (base32
12787 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12788 (build-system python-build-system)
12789 (arguments
12790 `(#:modules ((guix build utils)
12791 (guix build python-build-system)
12792 (ice-9 ftw)
12793 (srfi srfi-1)
12794 (srfi srfi-26))
12795 #:phases
12796 (modify-phases %standard-phases
12797 (replace 'check
12798 (lambda _
12799 (let ((cwd (getcwd)))
12800 (setenv "PYTHONPATH"
12801 (string-append cwd "/build/"
12802 (find (cut string-prefix? "lib" <>)
12803 (scandir (string-append cwd "/build")))
12804 ":"
12805 (getenv "PYTHONPATH")))
12806 (invoke "pytest" "-v")))))))
12807 (native-inputs
12808 `(("python-pytest" ,python-pytest)))
12809 (home-page "https://rfc3986.readthedocs.io/")
12810 (synopsis "Parse and validate URI references")
12811 (description
12812 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12813 validation and authority parsing. This module also supports RFC@tie{}6874
12814 which adds support for zone identifiers to IPv6 addresses.")
12815 (license license:asl2.0)))
12816
12817 (define-public python2-rfc3986
12818 (package-with-python2 python-rfc3986))
12819
12820 (define-public python-rfc3987
12821 (package
12822 (name "python-rfc3987")
12823 (version "1.3.7")
12824 (source
12825 (origin
12826 (method url-fetch)
12827 (uri (pypi-uri "rfc3987" version))
12828 (sha256
12829 (base32
12830 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12831 (build-system python-build-system)
12832 (home-page "https://pypi.python.org/pypi/rfc3987")
12833 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12834 (description "@code{rfc3987} provides routines for parsing and
12835 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12836 (license license:gpl3+)))
12837
12838 (define-public python2-rfc3987
12839 (package-with-python2 python-rfc3987))
12840
12841 (define-public python-validate-email
12842 (package
12843 (name "python-validate-email")
12844 (version "1.3")
12845 (source
12846 (origin
12847 (method url-fetch)
12848 (uri (pypi-uri "validate_email" version))
12849 (sha256
12850 (base32
12851 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12852 (build-system python-build-system)
12853 (home-page "https://github.com/syrusakbary/validate_email")
12854 (synopsis "Verifies if an email address is valid and really exists")
12855 (description "@code{validate_email} can be used to verify if an email
12856 address is valid and really exists.")
12857 (license license:lgpl3+)))
12858
12859 (define-public python2-validate-email
12860 (package-with-python2 python-validate-email))
12861
12862 (define-public python-flex
12863 (package
12864 (name "python-flex")
12865 (version "6.10.0")
12866 (source
12867 (origin
12868 (method url-fetch)
12869 (uri (pypi-uri "flex" version))
12870 (sha256
12871 (base32
12872 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12873 (build-system python-build-system)
12874 (propagated-inputs
12875 `(("python-click" ,python-click)
12876 ("python-iso8601" ,python-iso8601)
12877 ("python-jsonpointer" ,python-jsonpointer)
12878 ("python-pyyaml" ,python-pyyaml)
12879 ("python-requests" ,python-requests)
12880 ("python-rfc3987" ,python-rfc3987)
12881 ("python-six" ,python-six)
12882 ("python-validate-email" ,python-validate-email)))
12883 (home-page "https://github.com/pipermerriam/flex")
12884 (synopsis "Validates Swagger schemata")
12885 (description "@code{flex} can be used to validate Swagger schemata.")
12886 (license license:bsd-3)))
12887
12888 (define-public python2-flex
12889 (package-with-python2 python-flex))
12890
12891 (define-public python-marshmallow
12892 (package
12893 (name "python-marshmallow")
12894 (version "3.0.0b14")
12895 (source
12896 (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "marshmallow" version))
12899 (sha256
12900 (base32
12901 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12902 (build-system python-build-system)
12903 (propagated-inputs
12904 `(("python-dateutil" ,python-dateutil)
12905 ("python-simplejson" ,python-simplejson)))
12906 (native-inputs
12907 `(("python-pytest" ,python-pytest)
12908 ("python-pytz" ,python-pytz)))
12909 (home-page "https://github.com/marshmallow-code/marshmallow")
12910 (synopsis "Convert complex datatypes to and from native
12911 Python datatypes.")
12912 (description "@code{marshmallow} provides a library for converting
12913 complex datatypes to and from native Python datatypes.")
12914 (license license:expat)))
12915
12916 (define-public python2-marshmallow
12917 (package-with-python2 python-marshmallow))
12918
12919 (define-public python-apispec
12920 (package
12921 (name "python-apispec")
12922 (version "0.25.3")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "apispec" version))
12927 (sha256
12928 (base32
12929 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12930 (build-system python-build-system)
12931 (propagated-inputs
12932 `(("python-pyyaml" ,python-pyyaml)))
12933 (native-inputs
12934 `(("python-pytest" ,python-pytest)
12935 ("python-flask" ,python-flask)
12936 ("python-marshmallow" ,python-marshmallow)
12937 ("python-tornado" ,python-tornado)
12938 ("python-bottle" ,python-bottle)
12939 ("python-mock" ,python-mock)))
12940 (home-page "https://github.com/marshmallow-code/apispec")
12941 (synopsis "Swagger 2.0 API specification generator")
12942 (description "@code{python-apispec} is a pluggable API specification
12943 generator. Currently supports the OpenAPI specification (f.k.a.
12944 Swagger 2.0).")
12945 (license license:expat)))
12946
12947 (define-public python2-apispec
12948 (package-with-python2 python-apispec))
12949
12950 (define-public python-flasgger
12951 (package
12952 (name "python-flasgger")
12953 (version "0.6.3")
12954 (source
12955 (origin
12956 (method git-fetch)
12957 (uri (git-reference
12958 (url "https://github.com/rochacbruno/flasgger.git")
12959 (commit version)))
12960 (file-name (git-file-name name version))
12961 (sha256
12962 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:phases
12966 (modify-phases %standard-phases
12967 (replace 'check
12968 (lambda* (#:key inputs outputs #:allow-other-keys)
12969 (substitute* "Makefile"
12970 (("flake8 flasgger --ignore=F403")
12971 "flake8 flasgger --ignore=E731,F403"))
12972 (setenv "PYTHONPATH" (string-append (getcwd)
12973 ":"
12974 (getenv "PYTHONPATH")))
12975 (invoke "py.test"))))))
12976 (propagated-inputs
12977 `(("python-flask" ,python-flask)
12978 ("python-pyyaml" ,python-pyyaml)
12979 ("python-jsonschema" ,python-jsonschema)
12980 ("python-mistune" ,python-mistune)
12981 ("python-six" ,python-six)))
12982 (native-inputs
12983 `(("python-decorator" ,python-decorator)
12984 ("python-flake8" ,python-flake8)
12985 ("python-flask-restful" ,python-flask-restful)
12986 ("python-flex" ,python-flex)
12987 ("python-pytest" ,python-pytest)
12988 ("python-pytest-cov" ,python-pytest-cov)
12989 ("python-marshmallow" ,python-marshmallow)
12990 ("python-apispec" ,python-apispec)))
12991 (home-page "https://github.com/rochacbruno/flasgger/")
12992 (synopsis "Extract Swagger specs from your Flask project")
12993 (description "@code{python-flasgger} allows extracting Swagger specs
12994 from your Flask project. It is a fork of Flask-Swagger.")
12995 (license license:expat)))
12996
12997 (define-public python2-flasgger
12998 (package-with-python2 python-flasgger))
12999
13000 (define-public python-swagger-spec-validator
13001 (package
13002 (name "python-swagger-spec-validator")
13003 (version "2.1.0")
13004 (source
13005 (origin
13006 (method url-fetch)
13007 (uri (pypi-uri "swagger-spec-validator" version))
13008 (sha256
13009 (base32
13010 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13011 (build-system python-build-system)
13012 (propagated-inputs
13013 `(("python-jsonschema" ,python-jsonschema)
13014 ("python-six" ,python-six)))
13015 (home-page
13016 "https://github.com/Yelp/swagger_spec_validator")
13017 (synopsis "Validation of Swagger specifications")
13018 (description "@code{swagger_spec_validator} provides a library for
13019 validating Swagger API specifications.")
13020 (license license:asl2.0)))
13021
13022 (define-public python2-swagger-spec-validator
13023 (package-with-python2 python-swagger-spec-validator))
13024
13025 (define-public python-apache-libcloud
13026 (package
13027 (name "python-apache-libcloud")
13028 (version "2.4.0")
13029 (source
13030 (origin
13031 (method url-fetch)
13032 (uri (pypi-uri "apache-libcloud" version))
13033 (sha256
13034 (base32
13035 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13036 (build-system python-build-system)
13037 (arguments
13038 `(#:phases
13039 (modify-phases %standard-phases
13040 (add-after 'unpack 'patch-ssh
13041 (lambda* (#:key inputs #:allow-other-keys)
13042 (substitute* "libcloud/compute/ssh.py"
13043 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13044 "/bin/ssh" "'")))
13045 #t))
13046 (add-after 'unpack 'patch-tests
13047 (lambda _
13048 (substitute* "./libcloud/test/test_file_fixtures.py"
13049 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13050 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13051 return (httplib.OK,
13052 \"1234abcd\",
13053 {\"test\": \"value\"},
13054 httplib.responses[httplib.OK])
13055 def _ascii"))
13056 (substitute* "libcloud/test/compute/test_ssh_client.py"
13057 (("class ShellOutSSHClientTests")
13058 "@unittest.skip(\"Guix container doesn't have ssh service\")
13059 class ShellOutSSHClientTests")
13060 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13061 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13062 (("'.xF0', '.x90', '.x8D', '.x88'")
13063 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13064 #t))
13065 (add-before 'check 'copy-secret
13066 (lambda _
13067 (copy-file "libcloud/test/secrets.py-dist"
13068 "libcloud/test/secrets.py")
13069 #t)))))
13070 (inputs
13071 `(("openssh" ,openssh)))
13072 (propagated-inputs
13073 `(("python-paramiko" ,python-paramiko)
13074 ("python-requests" ,python-requests)))
13075 (native-inputs
13076 `(("python-lockfile" ,python-lockfile)
13077 ("python-mock" ,python-mock)
13078 ("python-pytest" ,python-pytest)
13079 ("python-pytest-runner" ,python-pytest-runner)
13080 ("python-requests-mock" ,python-requests-mock)))
13081 (home-page "https://libcloud.apache.org/")
13082 (synopsis "Unified Cloud API")
13083 (description "@code{libcloud} is a Python library for interacting with
13084 many of the popular cloud service providers using a unified API.")
13085 (license license:asl2.0)))
13086
13087 (define-public python2-apache-libcloud
13088 (package-with-python2 python-apache-libcloud))
13089
13090 (define-public python-smmap2
13091 (package
13092 (name "python-smmap2")
13093 (version "2.0.3")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "smmap2" version))
13098 (sha256
13099 (base32
13100 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13101 (build-system python-build-system)
13102 (native-inputs
13103 `(("python-nosexcover" ,python-nosexcover)))
13104 (home-page "https://github.com/Byron/smmap")
13105 (synopsis "Python sliding window memory map manager")
13106 (description "@code{smmap2} is a pure Python implementation of a sliding
13107 window memory map manager.")
13108 (license license:bsd-3)))
13109
13110 (define-public python2-smmap2
13111 (package-with-python2 python-smmap2))
13112
13113 (define-public python-regex
13114 (package
13115 (name "python-regex")
13116 (version "2019.04.14")
13117 (source (origin
13118 (method url-fetch)
13119 (uri (pypi-uri "regex" version))
13120 (sha256
13121 (base32
13122 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13123 ;; TODO: Fix and enable regex_test.py tests that complain about the
13124 ;; test.support module not existing.
13125 (build-system python-build-system)
13126 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13127 (synopsis "Alternative regular expression module")
13128 (description "This regular expression implementation is backwards-
13129 compatible with the standard @code{re} module, but offers additional
13130 functionality like full case-folding for case-insensitive matches in Unicode.")
13131 (license license:psfl)))
13132
13133 (define-public python2-regex
13134 (package-with-python2 python-regex))
13135
13136 (define-public python2-pyopengl
13137 (package
13138 (name "python2-pyopengl")
13139 (version "3.1.0")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "PyOpenGL" version))
13144 (sha256
13145 (base32
13146 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13147 (arguments
13148 `(#:python ,python-2))
13149 (build-system python-build-system)
13150 (home-page "http://pyopengl.sourceforge.net")
13151 (synopsis "Standard OpenGL bindings for Python")
13152 (description
13153 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13154 related APIs. The binding is created using the standard @code{ctypes}
13155 library.")
13156 (license license:bsd-3)))
13157
13158 (define-public python2-pyopengl-accelerate
13159 (package
13160 (inherit python2-pyopengl)
13161 (name "python2-pyopengl-accelerate")
13162 (version "3.1.0")
13163 (source
13164 (origin
13165 (method url-fetch)
13166 (uri (pypi-uri "PyOpenGL-accelerate" version))
13167 (sha256
13168 (base32
13169 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13170 (synopsis "Acceleration code for PyOpenGL")
13171 (description
13172 "This is the Cython-coded accelerator module for PyOpenGL.")))
13173
13174 (define-public python-rencode
13175 (package
13176 (name "python-rencode")
13177 (version "1.0.5")
13178 (source
13179 (origin
13180 (method url-fetch)
13181 (uri (pypi-uri "rencode" version))
13182 (sha256
13183 (base32
13184 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13185 (build-system python-build-system)
13186 (arguments
13187 `(#:phases
13188 (modify-phases %standard-phases
13189 (add-before 'check 'delete-bogus-test
13190 ;; This test requires /home/aresch/Downloads, which is not provided by
13191 ;; the build environment.
13192 (lambda _
13193 (delete-file "rencode/t.py")
13194 #t)))))
13195 (native-inputs `(("pkg-config" ,pkg-config)
13196 ("python-cython" ,python-cython)))
13197 (home-page "https://github.com/aresch/rencode")
13198 (synopsis "Serialization of heterogeneous data structures")
13199 (description
13200 "The @code{rencode} module is a data structure serialization library,
13201 similar to @code{bencode} from the BitTorrent project. For complex,
13202 heterogeneous data structures with many small elements, r-encoding stake up
13203 significantly less space than b-encodings. This version of rencode is a
13204 complete rewrite in Cython to attempt to increase the performance over the
13205 pure Python module.")
13206 (license license:bsd-3)))
13207
13208 (define-public python2-rencode
13209 (package-with-python2 python-rencode))
13210
13211 (define-public python-xenon
13212 (package
13213 (name "python-xenon")
13214 (version "0.5.4")
13215 (source
13216 (origin
13217 (method url-fetch)
13218 (uri (pypi-uri "xenon" version))
13219 (sha256
13220 (base32
13221 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13222 (build-system python-build-system)
13223 (native-inputs
13224 `(("python-pyyaml" ,python-pyyaml)
13225 ("python-radon" ,python-radon)
13226 ("python-requests" ,python-requests)
13227 ("python-flake8" ,python-flake8)
13228 ("python-tox" ,python-tox)))
13229 (arguments
13230 `(#:phases
13231 (modify-phases %standard-phases
13232 (add-before 'build 'patch-test-requirements
13233 (lambda _
13234 ;; Remove httpretty dependency for tests.
13235 (substitute* "setup.py"
13236 (("httpretty") ""))
13237 #t)))))
13238 (home-page "https://xenon.readthedocs.org/")
13239 (synopsis "Monitor code metrics for Python on your CI server")
13240 (description
13241 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13242 Ideally, @code{xenon} is run every time code is committed. Through command
13243 line options, various thresholds can be set for the complexity of code. It
13244 will fail (i.e. it will exit with a non-zero exit code) when any of these
13245 requirements is not met.")
13246 (license license:expat)))
13247
13248 (define-public python2-xenon
13249 (package-with-python2 python-xenon))
13250
13251 (define-public python-pysocks
13252 (package
13253 (name "python-pysocks")
13254 (version "1.7.0")
13255 (source
13256 (origin
13257 (method url-fetch)
13258 (uri (pypi-uri "PySocks" version))
13259 (sha256
13260 (base32
13261 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13262 (build-system python-build-system)
13263 (arguments `(#:tests? #f))
13264 (home-page "https://github.com/Anorov/PySocks")
13265 (synopsis "SOCKS client module")
13266 (description "@code{pysocks} is an updated and semi-actively maintained
13267 version of @code{SocksiPy} with bug fixes and extra features.")
13268 (license license:bsd-3)))
13269
13270 (define-public python2-pysocks
13271 (package-with-python2 python-pysocks))
13272
13273 (define-public python-pydiff
13274 (package
13275 (name "python-pydiff")
13276 (version "0.2")
13277 (source
13278 (origin
13279 (method url-fetch)
13280 (uri (pypi-uri "pydiff" version))
13281 (sha256
13282 (base32
13283 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13284 (build-system python-build-system)
13285 (home-page "https://github.com/myint/pydiff")
13286 (synopsis "Library to diff two Python files at the bytecode level")
13287 (description
13288 "@code{pydiff} makes it easy to look for actual code changes while
13289 ignoring formatting changes.")
13290 (license license:expat)))
13291
13292 (define-public python2-pydiff
13293 (package-with-python2 python-pydiff))
13294
13295 (define-public python-tqdm
13296 (package
13297 (name "python-tqdm")
13298 (version "4.19.6")
13299 (source
13300 (origin
13301 (method url-fetch)
13302 (uri (pypi-uri "tqdm" version))
13303 (sha256
13304 (base32
13305 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13306 (build-system python-build-system)
13307 (native-inputs
13308 `(("python-flake8" ,python-flake8)
13309 ("python-nose" ,python-nose)
13310 ("python-coverage" ,python-coverage)))
13311 (home-page "https://github.com/tqdm/tqdm")
13312 (synopsis "Fast, extensible progress meter")
13313 (description
13314 "Make loops show a progress bar on the console by just wrapping any
13315 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13316 design and layout.")
13317 (license (list license:mpl2.0 license:expat))))
13318
13319 (define-public python2-tqdm
13320 (package-with-python2 python-tqdm))
13321
13322 (define-public python-pkginfo
13323 (package
13324 (name "python-pkginfo")
13325 (version "1.4.2")
13326 (source
13327 (origin
13328 (method url-fetch)
13329 (uri (pypi-uri "pkginfo" version))
13330 (sha256
13331 (base32
13332 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13333 (build-system python-build-system)
13334 (arguments
13335 ;; The tests are broken upstream.
13336 '(#:tests? #f))
13337 (home-page
13338 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13339 (synopsis
13340 "Query metadatdata from sdists, bdists, and installed packages")
13341 (description
13342 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13343 source distriubtion (an sdist) or a binary distribution (e.g., created by
13344 running bdist_egg). It can also query the EGG-INFO directory of an installed
13345 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13346 created by running @code{python setup.py develop}).")
13347 (license license:expat)))
13348
13349 (define-public python2-pkginfo
13350 (package-with-python2 python-pkginfo))
13351
13352 (define-public python-twine
13353 (package
13354 (name "python-twine")
13355 (version "1.9.1")
13356 (source
13357 (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "twine" version))
13360 (sha256
13361 (base32
13362 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13363 (build-system python-build-system)
13364 (propagated-inputs
13365 `(("python-tqdm" ,python-tqdm)
13366 ("python-pkginfo" ,python-pkginfo)
13367 ("python-requests" ,python-requests)
13368 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13369 (home-page "https://github.com/pypa/twine")
13370 (synopsis "Collection of utilities for interacting with PyPI")
13371 (description
13372 "@code{twine} currently supports registering projects and uploading
13373 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13374 their files and supports any packaging format (including wheels).")
13375 (license license:asl2.0)))
13376
13377 (define-public python2-twine
13378 (package-with-python2 python-twine))
13379
13380 (define-public python-linecache2
13381 (package
13382 (name "python-linecache2")
13383 (version "1.0.0")
13384 (source
13385 (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "linecache2" version))
13388 (sha256
13389 (base32
13390 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13391 (build-system python-build-system)
13392 (arguments
13393 `(;; The tests depend on unittest2, and our version is a bit too old.
13394 #:tests? #f))
13395 (native-inputs
13396 `(("python-pbr" ,python-pbr-minimal)))
13397 (home-page
13398 "https://github.com/testing-cabal/linecache2")
13399 (synopsis "Backports of the linecache module")
13400 (description
13401 "The linecache module allows one to get any line from any file, while
13402 attempting to optimize internally, using a cache, the common case where many
13403 lines are read from a single file.")
13404 (license license:psfl)))
13405
13406 (define-public python2-linecache2
13407 (package-with-python2 python-linecache2))
13408
13409 (define-public python-traceback2
13410 (package
13411 (name "python-traceback2")
13412 (version "1.4.0")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "traceback2" version))
13417 (sha256
13418 (base32
13419 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13420 (build-system python-build-system)
13421 (arguments
13422 `(;; python-traceback2 and python-unittest2 depend on one another.
13423 #:tests? #f))
13424 (native-inputs
13425 `(("python-pbr" ,python-pbr-minimal)))
13426 (propagated-inputs
13427 `(("python-linecache2" ,python-linecache2)))
13428 (home-page
13429 "https://github.com/testing-cabal/traceback2")
13430 (synopsis "Backports of the traceback module")
13431 (description
13432 "This module provides a standard interface to extract, format and print
13433 stack traces of Python programs. It exactly mimics the behavior of the Python
13434 interpreter when it prints a stack trace.")
13435 (license license:psfl)))
13436
13437 (define-public python2-traceback2
13438 (package-with-python2 python-traceback2))
13439
13440 (define-public python-ratelimiter
13441 (package
13442 (name "python-ratelimiter")
13443 (version "1.2.0")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "ratelimiter" version))
13448 (sha256
13449 (base32
13450 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13451 (build-system python-build-system)
13452 (arguments
13453 '(#:tests? #f)) ; There are no tests in the pypi archive.
13454 (home-page "https://github.com/RazerM/ratelimiter")
13455 (synopsis "Simple rate limiting object")
13456 (description
13457 "The @code{ratelimiter} module ensures that an operation will not be
13458 executed more than a given number of times during a given period.")
13459 (license license:asl2.0)))
13460
13461 (define-public python2-ratelimiter
13462 (package-with-python2 python-ratelimiter))
13463
13464 (define-public python-dukpy
13465 (package
13466 (name "python-dukpy")
13467 (version "0.3")
13468 (source
13469 (origin
13470 (method git-fetch)
13471 (uri (git-reference
13472 (url "https://github.com/kovidgoyal/dukpy.git")
13473 (commit (string-append "v" version))))
13474 (file-name (git-file-name name version))
13475 (sha256
13476 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13477 (build-system python-build-system)
13478 (home-page "https://github.com/kovidgoyal/dukpy")
13479 (synopsis "Run JavaScript in python")
13480 (description
13481 "dukpy is a JavaScript runtime environment for Python using the duktape
13482 embeddable JavaScript engine.")
13483 ;; Dukpy is licensed under MIT like the embedded duktape library,
13484 ;; with 'errors.c' as GPL3.
13485 (license (list license:expat license:gpl3))))
13486
13487 (define-public python2-dukpy
13488 (package-with-python2 python-dukpy))
13489
13490 (define-public python-jsonrpclib-pelix
13491 (package
13492 (name "python-jsonrpclib-pelix")
13493 (version "0.3.2")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "jsonrpclib-pelix" version))
13498 (sha256
13499 (base32
13500 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13501 (build-system python-build-system)
13502 (arguments
13503 `(#:tests? #f)) ; no tests in PyPI tarball
13504 (home-page "https://github.com/tcalmant/jsonrpclib/")
13505 (synopsis "JSON-RPC 2.0 client library for Python")
13506 (description
13507 "This library implements the JSON-RPC v2.0
13508 specification (backwards-compatible) as a client library for Python. This
13509 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13510 services.")
13511 (license license:asl2.0)))
13512
13513 (define-public python2-jsonrpclib-pelix
13514 (package-with-python2 python-jsonrpclib-pelix))
13515
13516 (define-public python-setuptools-scm-git-archive
13517 (package
13518 (name "python-setuptools-scm-git-archive")
13519 (version "1.0")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "setuptools_scm_git_archive" version))
13524 (sha256
13525 (base32
13526 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13527 (build-system python-build-system)
13528 (native-inputs
13529 `(("python-pytest" ,python-pytest)))
13530 (propagated-inputs
13531 `(("python-setuptools-scm" ,python-setuptools-scm)))
13532 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13533 (synopsis "Setuptools_scm plugin for git archives")
13534 (description
13535 "The setuptools_scm_git_archive package is a plugin to
13536 setuptools_scm, which supports obtaining versions from git archives that
13537 belong to tagged versions.")
13538 (license license:expat)))
13539
13540 (define-public python2-setuptools-scm-git-archive
13541 (package-with-python2 python-setuptools-scm-git-archive))
13542
13543 (define-public python-setuptools-git
13544 (package
13545 (name "python-setuptools-git")
13546 (version "1.2")
13547 (source
13548 (origin
13549 (method url-fetch)
13550 (uri (pypi-uri "setuptools-git" version))
13551 (sha256
13552 (base32
13553 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13554 (build-system python-build-system)
13555 (arguments
13556 `(#:phases
13557 (modify-phases %standard-phases
13558 ;; This is needed for tests.
13559 (add-after 'unpack 'configure-git
13560 (lambda _
13561 (setenv "HOME" "/tmp")
13562 (invoke "git" "config" "--global" "user.email" "guix")
13563 (invoke "git" "config" "--global" "user.name" "guix")
13564 #t)))))
13565 (native-inputs
13566 `(("git" ,git-minimal)))
13567 (home-page "https://github.com/msabramo/setuptools-git")
13568 (synopsis "Setuptools revision control system plugin for Git")
13569 (description
13570 "This package provides a plugin for Setuptools for revision control with
13571 Git.")
13572 (license license:bsd-3)))
13573
13574 (define-public python-pyclipper
13575 (package
13576 (name "python-pyclipper")
13577 (version "1.1.0.post1")
13578 (source
13579 (origin
13580 (method url-fetch)
13581 (uri (pypi-uri "pyclipper" version ".zip"))
13582 (sha256
13583 (base32
13584 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13585 (modules '((guix build utils)))
13586 (snippet
13587 '(begin
13588 ;; This file is generated by Cython.
13589 (delete-file "pyclipper/pyclipper.cpp") #t))))
13590 (build-system python-build-system)
13591 (arguments
13592 `(#:phases
13593 (modify-phases %standard-phases
13594 (add-before 'build 'cythonize-sources
13595 (lambda _
13596 (with-directory-excursion "pyclipper"
13597 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13598 (propagated-inputs
13599 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13600 (native-inputs
13601 `(("python-cython" ,python-cython)
13602 ("python-pytest" ,python-pytest)
13603 ("python-pytest-runner" ,python-pytest-runner)
13604 ("python-unittest2" ,python-unittest2)
13605 ("unzip" ,unzip)))
13606 (home-page "https://github.com/greginvm/pyclipper")
13607 (synopsis "Wrapper for Angus Johnson's Clipper library")
13608 (description
13609 "Pyclipper is a Cython wrapper for the C++ translation of the
13610 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13611 (license license:expat)))
13612
13613 (define-public python2-pyclipper
13614 (package-with-python2 python-pyclipper))
13615
13616 (define-public python2-booleanoperations
13617 (package
13618 (name "python2-booleanoperations")
13619 (version "0.7.1")
13620 (source
13621 (origin
13622 (method url-fetch)
13623 (uri (pypi-uri "booleanOperations" version ".zip"))
13624 (sha256
13625 (base32
13626 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13627 (build-system python-build-system)
13628 (arguments
13629 `(#:python ,python-2))
13630 (native-inputs
13631 `(("unzip" ,unzip)
13632 ("python2-pytest" ,python2-pytest)
13633 ("python2-pytest-runner" ,python2-pytest-runner)))
13634 (propagated-inputs
13635 `(("python-fonttools" ,python2-fonttools)
13636 ("python-pyclipper" ,python2-pyclipper)
13637 ("python-ufolib" ,python2-ufolib)))
13638 (home-page "https://github.com/typemytype/booleanOperations")
13639 (synopsis "Boolean operations on paths")
13640 (description
13641 "BooleanOperations provides a Python library that enables
13642 boolean operations on paths.")
13643 (license license:expat)))
13644
13645 (define-public python-tempdir
13646 (package
13647 (name "python-tempdir")
13648 (version "0.7.1")
13649 (source
13650 (origin
13651 (method url-fetch)
13652 (uri (pypi-uri "tempdir" version))
13653 (sha256
13654 (base32
13655 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13656 (build-system python-build-system)
13657 (home-page "https://pypi.org/project/tempdir/")
13658 (arguments
13659 ;; the package has no tests
13660 '(#:tests? #f))
13661 (synopsis "Python library for managing temporary directories")
13662 (description
13663 "This library manages temporary directories that are automatically
13664 deleted with all their contents when they are no longer needed. It is
13665 particularly convenient for use in tests.")
13666 (license license:expat)))
13667
13668 (define-public python2-tempdir
13669 (package-with-python2 python-tempdir))
13670
13671 (define-public python-activepapers
13672 (package
13673 (name "python-activepapers")
13674 (version "0.2.2")
13675 (source
13676 (origin
13677 (method url-fetch)
13678 (uri (pypi-uri "ActivePapers.Py" version))
13679 (sha256
13680 (base32
13681 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13682 (build-system python-build-system)
13683 (arguments
13684 `(#:modules ((ice-9 ftw)
13685 (srfi srfi-1)
13686 (guix build utils)
13687 (guix build python-build-system))
13688
13689 #:phases
13690 (modify-phases %standard-phases
13691 (add-after 'unpack 'delete-python2-code
13692 (lambda _
13693 (for-each delete-file
13694 '("lib/activepapers/builtins2.py"
13695 "lib/activepapers/standardlib2.py"
13696 "lib/activepapers/utility2.py"))))
13697 (replace 'check
13698 (lambda _
13699 ;; Deactivate the test cases that download files
13700 (setenv "NO_NETWORK_ACCESS" "1")
13701 ;; For some strange reason, some tests fail if nosetests runs all
13702 ;; test modules in a single execution. They pass if each test
13703 ;; module is run individually.
13704 (for-each (lambda (filename)
13705 (invoke "nosetests"
13706 (string-append "tests/" filename)))
13707 (scandir "tests"
13708 (lambda (filename)
13709 (string-suffix? ".py" filename)))))))))
13710 (native-inputs
13711 `(("python-tempdir" ,python-tempdir)
13712 ("python-nose" ,python-nose)))
13713 (propagated-inputs
13714 `(("python-h5py" ,python-h5py)))
13715 (home-page "http://www.activepapers.org/")
13716 (synopsis "Executable papers for scientific computing")
13717 (description
13718 "ActivePapers is a tool for working with executable papers, which
13719 combine data, code, and documentation in single-file packages,
13720 suitable for publication as supplementary material or on repositories
13721 such as figshare or Zenodo.")
13722 (properties `((python2-variant . ,(delay python2-activepapers))))
13723 (license license:bsd-3)))
13724
13725 (define-public python2-activepapers
13726 (let ((base (package-with-python2
13727 (strip-python2-variant python-activepapers))))
13728 (package
13729 (inherit base)
13730 (arguments
13731 (substitute-keyword-arguments (package-arguments base)
13732 ((#:phases phases)
13733 `(modify-phases ,phases
13734 (delete 'delete-python2-code)
13735 (add-after 'unpack 'delete-python3-code
13736 (lambda _
13737 (for-each delete-file
13738 '("lib/activepapers/builtins3.py"
13739 "lib/activepapers/standardlib3.py"
13740 "lib/activepapers/utility3.py")))))))))))
13741
13742 (define-public python-semver
13743 (package
13744 (name "python-semver")
13745 (version "2.7.9")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "semver" version))
13750 (sha256
13751 (base32
13752 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13753 (build-system python-build-system)
13754 (arguments
13755 `(#:phases
13756 (modify-phases %standard-phases
13757 (add-after 'unpack 'patch-test-requirements
13758 (lambda _
13759 (substitute* "setup.py"
13760 ;; Our Python is new enough.
13761 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13762 #t)))))
13763 (native-inputs
13764 `(("python-tox" ,python-tox)
13765 ("python-virtualenv" ,python-virtualenv)))
13766 (home-page "https://github.com/k-bx/python-semver")
13767 (synopsis "Python helper for Semantic Versioning")
13768 (description "This package provides a Python library for
13769 @url{Semantic Versioning, http://semver.org/}.")
13770 (license license:bsd-3)))
13771
13772 (define-public python2-semver
13773 (package-with-python2 python-semver))
13774
13775 (define-public python-pyro4
13776 (package
13777 (name "python-pyro4")
13778 (version "4.75")
13779 (source
13780 (origin
13781 (method url-fetch)
13782 (uri (pypi-uri "Pyro4" version))
13783 (sha256
13784 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13785 (build-system python-build-system)
13786 (propagated-inputs
13787 `(("python-serpent" ,python-serpent)))
13788 (home-page "https://pyro4.readthedocs.io")
13789 (synopsis "Distributed object middleware for Python")
13790 (description
13791 "Pyro enables you to build applications in which objects can talk to each
13792 other over the network. You can just use normal Python method calls to call
13793 objects on other machines, also known as remote procedure calls (RPC).")
13794 (license license:expat)))
13795
13796 (define-public python2-pyro
13797 (package
13798 (name "python2-pyro")
13799 (version "3.16")
13800 (source
13801 (origin
13802 (method url-fetch)
13803 (uri (pypi-uri "Pyro" version))
13804 (file-name (string-append "Pyro-" version ".tar.gz"))
13805 (sha256
13806 (base32
13807 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13808 (build-system python-build-system)
13809 (arguments
13810 ;; Pyro is not compatible with Python 3
13811 `(#:python ,python-2
13812 ;; Pyro has no test cases for automatic execution
13813 #:tests? #f))
13814 (home-page "http://pythonhosted.org/Pyro/")
13815 (synopsis "Distributed object manager for Python")
13816 (description "Pyro is a Distributed Object Technology system
13817 written in Python that is designed to be easy to use. It resembles
13818 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13819 which is a system and language independent Distributed Object Technology
13820 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13821 longer maintained. New projects should use Pyro4 instead, which
13822 is the new Pyro version that is actively developed.")
13823 (license license:expat)))
13824
13825 (define-public python2-scientific
13826 (package
13827 (name "python2-scientific")
13828 (version "2.9.4")
13829 (source
13830 (origin
13831 (method url-fetch)
13832 (uri (string-append "https://bitbucket.org/khinsen/"
13833 "scientificpython/downloads/ScientificPython-"
13834 version ".tar.gz"))
13835 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13836 (sha256
13837 (base32
13838 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13839 (build-system python-build-system)
13840 (inputs
13841 `(("netcdf" ,netcdf)))
13842 (propagated-inputs
13843 `(("python-numpy" ,python2-numpy-1.8)
13844 ("python-pyro" ,python2-pyro)))
13845 (arguments
13846 ;; ScientificPython is not compatible with Python 3
13847 `(#:python ,python-2
13848 #:tests? #f ; No test suite
13849 #:phases
13850 (modify-phases %standard-phases
13851 (replace 'build
13852 (lambda* (#:key inputs #:allow-other-keys)
13853 (invoke "python" "setup.py" "build"
13854 (string-append "--netcdf_prefix="
13855 (assoc-ref inputs "netcdf"))))))))
13856 (home-page "https://bitbucket.org/khinsen/scientificpython")
13857 (synopsis "Python modules for scientific computing")
13858 (description "ScientificPython is a collection of Python modules that are
13859 useful for scientific computing. Most modules are rather general (Geometry,
13860 physical units, automatic derivatives, ...) whereas others are more
13861 domain-specific (e.g. netCDF and PDB support). The library is currently
13862 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13863 (license license:cecill-c)))
13864
13865 (define-public python2-mmtk
13866 (package
13867 (name "python2-mmtk")
13868 (version "2.7.11")
13869 (source
13870 (origin
13871 (method url-fetch)
13872 (uri (string-append "https://bitbucket.org/khinsen/"
13873 "mmtk/downloads/MMTK-" version ".tar.gz"))
13874 (file-name (string-append "MMTK-" version ".tar.gz"))
13875 (sha256
13876 (base32
13877 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13878 (build-system python-build-system)
13879 (native-inputs
13880 `(("netcdf" ,netcdf)))
13881 (propagated-inputs
13882 `(("python-scientific" ,python2-scientific)
13883 ("python-tkinter" ,python-2 "tk")))
13884 (arguments
13885 `(#:python ,python-2
13886 #:tests? #f
13887 #:phases
13888 (modify-phases %standard-phases
13889 (add-before 'build 'includes-from-scientific
13890 (lambda* (#:key inputs #:allow-other-keys)
13891 (mkdir-p "Include/Scientific")
13892 (copy-recursively
13893 (string-append
13894 (assoc-ref inputs "python-scientific")
13895 "/include/python2.7/Scientific")
13896 "Include/Scientific"))))))
13897 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13898 (synopsis "Python library for molecular simulation")
13899 (description "MMTK is a library for molecular simulations with an emphasis
13900 on biomolecules. It provides widely used methods such as Molecular Dynamics
13901 and normal mode analysis, but also basic routines for implementing new methods
13902 for simulation and analysis. The library is currently not actively maintained
13903 and works only with Python 2 and NumPy < 1.9.")
13904 (license license:cecill-c)))
13905
13906 (define-public python-phonenumbers
13907 (package
13908 (name "python-phonenumbers")
13909 (version "8.9.1")
13910 (source
13911 (origin
13912 (method url-fetch)
13913 (uri (pypi-uri "phonenumbers" version))
13914 (sha256
13915 (base32
13916 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13917 (build-system python-build-system)
13918 (home-page
13919 "https://github.com/daviddrysdale/python-phonenumbers")
13920 (synopsis
13921 "Python library for dealing with international phone numbers")
13922 (description
13923 "This package provides a Python port of Google's libphonenumber library.")
13924 (license license:asl2.0)))
13925
13926 (define-public python2-phonenumbers
13927 (package-with-python2 python-phonenumbers))
13928
13929 (define-public python-send2trash
13930 (package
13931 (name "python-send2trash")
13932 (version "1.5.0")
13933 (source
13934 (origin (method git-fetch)
13935 ;; Source tarball on PyPI doesn't include tests.
13936 (uri (git-reference
13937 (url "https://github.com/hsoft/send2trash.git")
13938 (commit version)))
13939 (file-name (git-file-name name version))
13940 (sha256
13941 (base32
13942 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
13943 (build-system python-build-system)
13944 (arguments
13945 '(#:phases
13946 (modify-phases %standard-phases
13947 (add-before 'check 'pre-check
13948 (lambda _
13949 (mkdir-p "/tmp/foo")
13950 (setenv "HOME" "/tmp/foo")
13951 #t)))))
13952 (home-page "https://github.com/hsoft/send2trash")
13953 (synopsis "Send files to the user's @file{~/Trash} directory")
13954 (description "This package provides a Python library to send files to the
13955 user's @file{~/Trash} directory.")
13956 (properties `((python2-variant . ,(delay python2-send2trash))))
13957 (license license:bsd-3)))
13958
13959 (define-public python2-send2trash
13960 (package
13961 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
13962 (arguments
13963 (substitute-keyword-arguments (package-arguments python-send2trash)
13964 ((#:phases phases)
13965 `(modify-phases ,phases
13966 (add-before 'check 'setenv
13967 (lambda _
13968 (setenv "PYTHONPATH"
13969 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13970 #t))))))))
13971
13972 (define-public python-yapf
13973 (package
13974 (name "python-yapf")
13975 (version "0.24.0")
13976 (source
13977 (origin
13978 (method url-fetch)
13979 (uri (pypi-uri "yapf" version))
13980 (sha256
13981 (base32
13982 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13983 (build-system python-build-system)
13984 (home-page "https://github.com/google/yapf")
13985 (synopsis "Formatter for Python code")
13986 (description "YAPF is a formatter for Python code. It's based off of
13987 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13988 takes the code and reformats it to the best formatting that conforms to the
13989 style guide, even if the original code didn't violate the style guide.")
13990 (license license:asl2.0)))
13991
13992 (define-public python2-yapf
13993 (package-with-python2 python-yapf))
13994
13995 (define-public python-gyp
13996 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13997 (revision "0"))
13998 (package
13999 (name "python-gyp")
14000 ;; Google does not release versions,
14001 ;; based on second most recent commit date.
14002 (version (git-version "0.0.0" revision commit))
14003 (source
14004 (origin
14005 ;; Google does not release tarballs,
14006 ;; git checkout is needed.
14007 (method git-fetch)
14008 (uri (git-reference
14009 (url "https://chromium.googlesource.com/external/gyp")
14010 (commit commit)))
14011 (file-name (git-file-name name version))
14012 (sha256
14013 (base32
14014 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14015 (build-system python-build-system)
14016 (home-page "https://gyp.gsrc.io/")
14017 (synopsis "GYP is a Meta-Build system")
14018 (description
14019 "GYP builds build systems for large, cross platform applications.
14020 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14021 files, and Makefiles.")
14022 (license license:bsd-3))))
14023
14024 (define-public python2-gyp
14025 (package-with-python2 python-gyp))
14026
14027 (define-public python-whatever
14028 (package
14029 (name "python-whatever")
14030 (version "0.5")
14031 (source
14032 (origin
14033 (method url-fetch)
14034 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14035 ".tar.gz"))
14036 (sha256
14037 (base32
14038 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14039 (file-name (string-append name "-" version ".tar.gz"))))
14040 (build-system python-build-system)
14041 (arguments
14042 `(#:phases
14043 (modify-phases %standard-phases
14044 (replace 'check
14045 (lambda _
14046 (invoke "py.test"))))))
14047 (native-inputs
14048 `(("python-pytest" ,python-pytest)))
14049 (home-page "http://github.com/Suor/whatever")
14050 (synopsis "Make anonymous functions by partial application of operators")
14051 (description "@code{whatever} provides an easy way to make anonymous
14052 functions by partial application of operators.")
14053 (license license:bsd-3)))
14054
14055 (define-public python2-whatever
14056 (package-with-python2 python-whatever))
14057
14058 (define-public python-funcy
14059 (package
14060 (name "python-funcy")
14061 (version "1.11")
14062 (source
14063 (origin
14064 (method git-fetch)
14065 (uri (git-reference
14066 (url "https://github.com/Suor/funcy.git")
14067 (commit version)))
14068 (sha256
14069 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14070 (file-name (git-file-name name version))))
14071 (build-system python-build-system)
14072 (arguments
14073 `(#:phases
14074 (modify-phases %standard-phases
14075 (replace 'check
14076 (lambda _
14077 (invoke "py.test"))))))
14078 (native-inputs
14079 `(("python-pytest" ,python-pytest)
14080 ("python-whatever" ,python-whatever)))
14081 (home-page "http://github.com/Suor/funcy")
14082 (synopsis "Functional tools")
14083 (description "@code{funcy} is a library that provides functional tools.
14084 Examples are:
14085 @enumerate
14086 @item merge - Merges collections of the same type
14087 @item walk - Type-preserving map
14088 @item select - Selects a part of a collection
14089 @item take - Takes the first n items of a collection
14090 @item first - Takes the first item of a collection
14091 @item remove - Predicated-removes items of a collection
14092 @item concat - Concatenates two collections
14093 @item flatten - Flattens a collection with subcollections
14094 @item distinct - Returns only distinct items
14095 @item split - Predicated-splits a collection
14096 @item split_at - Splits a collection at a given item
14097 @item group_by - Groups items by group
14098 @item pairwise - Pairs off adjacent items
14099 @item partial - Partially-applies a function
14100 @item curry - Curries a function
14101 @item compose - Composes functions
14102 @item complement - Complements a predicate
14103 @item all_fn - \"all\" with predicate
14104 @end enumerate")
14105 (license license:bsd-3)))
14106
14107 (define-public python2-funcy
14108 (package-with-python2 python-funcy))
14109
14110 (define-public python-isoweek
14111 (package
14112 (name "python-isoweek")
14113 (version "1.3.3")
14114 (source
14115 (origin
14116 (method url-fetch)
14117 (uri (pypi-uri "isoweek" version))
14118 (sha256
14119 (base32
14120 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14121 (build-system python-build-system)
14122 (home-page "https://github.com/gisle/isoweek")
14123 (synopsis "Objects representing a week")
14124 (description "The @code{isoweek} module provide the class Week that
14125 implements the week definition of ISO 8601. This standard also defines
14126 a notation for identifying weeks; yyyyWww (where the W is a literal).
14127 Week instances stringify to this form.")
14128 (license license:bsd-3)))
14129
14130 (define-public python2-isoweek
14131 (package-with-python2 python-isoweek))
14132
14133 (define-public python-tokenize-rt
14134 (package
14135 (name "python-tokenize-rt")
14136 (version "2.0.1")
14137 (source
14138 (origin
14139 (method url-fetch)
14140 (uri (pypi-uri "tokenize-rt" version))
14141 (sha256
14142 (base32
14143 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14144 (build-system python-build-system)
14145 (home-page "https://github.com/asottile/tokenize-rt")
14146 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14147 (description
14148 "This Python library is a wrapper around @code{tokenize} from the Python
14149 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14150 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14151 and @code{tokens_to_src} to roundtrip.")
14152 (license license:expat)))
14153
14154 (define-public python-future-fstrings
14155 (package
14156 (name "python-future-fstrings")
14157 (version "0.4.1")
14158 (source
14159 (origin
14160 (method url-fetch)
14161 (uri (pypi-uri "future_fstrings" version))
14162 (sha256
14163 (base32
14164 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14165 (build-system python-build-system)
14166 (propagated-inputs
14167 `(("python-tokenize-rt" ,python-tokenize-rt)))
14168 (home-page "https://github.com/asottile/future-fstrings")
14169 (synopsis "Backport of fstrings to Python < 3.6")
14170 (description
14171 "This package provides a UTF-8 compatible encoding
14172 @code{future_fstrings}, which performs source manipulation. It decodes the
14173 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14174 @code{f} strings.")
14175 (license license:expat)))
14176
14177 (define-public python-typed-ast
14178 (package
14179 (name "python-typed-ast")
14180 (version "1.3.5")
14181 (source
14182 (origin
14183 (method url-fetch)
14184 (uri (pypi-uri "typed-ast" version))
14185 (sha256
14186 (base32
14187 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14188 (build-system python-build-system)
14189 (arguments
14190 `(#:modules ((guix build utils)
14191 (guix build python-build-system)
14192 (ice-9 ftw)
14193 (srfi srfi-1)
14194 (srfi srfi-26))
14195 #:phases
14196 (modify-phases %standard-phases
14197 (replace 'check
14198 (lambda _
14199 (let ((cwd (getcwd)))
14200 (setenv "PYTHONPATH"
14201 (string-append cwd "/build/"
14202 (find (cut string-prefix? "lib" <>)
14203 (scandir (string-append cwd "/build")))
14204 ":"
14205 (getenv "PYTHONPATH"))))
14206 (invoke "pytest")
14207 #t)))))
14208 (native-inputs `(("python-pytest" ,python-pytest)))
14209 (home-page "https://github.com/python/typed_ast")
14210 (synopsis "Fork of Python @code{ast} modules with type comment support")
14211 (description "This package provides a parser similar to the standard
14212 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14213 include PEP 484 type comments and are independent of the version of Python
14214 under which they are run. The @code{typed_ast} parsers produce the standard
14215 Python AST (plus type comments), and are both fast and correct, as they are
14216 based on the CPython 2.7 and 3.7 parsers.")
14217 ;; See the file "LICENSE" for the details.
14218 (license (list license:psfl
14219 license:asl2.0
14220 license:expat)))) ;ast27/Parser/spark.py
14221
14222 (define-public python-typing
14223 (package
14224 (name "python-typing")
14225 (version "3.6.6")
14226 (source
14227 (origin
14228 (method url-fetch)
14229 (uri (pypi-uri "typing" version))
14230 (sha256
14231 (base32
14232 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14233 (build-system python-build-system)
14234 (home-page "https://docs.python.org/3/library/typing.html")
14235 (synopsis "Type hints for Python")
14236 (description "This is a backport of the standard library @code{typing}
14237 module to Python versions older than 3.5. Typing defines a standard notation
14238 for Python function and variable type annotations. The notation can be used
14239 for documenting code in a concise, standard format, and it has been designed
14240 to also be used by static and runtime type checkers, static analyzers, IDEs
14241 and other tools.")
14242 (license license:psfl)))
14243
14244 (define-public python2-typing
14245 (package-with-python2 python-typing))
14246
14247 (define-public python-typing-extensions
14248 (package
14249 (name "python-typing-extensions")
14250 (version "3.7.2")
14251 (source
14252 (origin
14253 (method url-fetch)
14254 (uri (pypi-uri "typing_extensions" version))
14255 (sha256
14256 (base32
14257 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14258 (build-system python-build-system)
14259 (home-page
14260 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14261 (synopsis "Experimental type hints for Python")
14262 (description
14263 "The typing_extensions module contains additional @code{typing} hints not
14264 yet present in the of the @code{typing} standard library.
14265 Included are implementations of:
14266 @enumerate
14267 @item ClassVar
14268 @item ContextManager
14269 @item Counter
14270 @item DefaultDict
14271 @item Deque
14272 @item NewType
14273 @item NoReturn
14274 @item overload
14275 @item Protocol
14276 @item runtime
14277 @item Text
14278 @item Type
14279 @item TYPE_CHECKING
14280 @item AsyncGenerator
14281 @end enumerate\n")
14282 (license license:psfl)))
14283
14284 (define-public bpython
14285 (package
14286 (name "bpython")
14287 (version "0.17.1")
14288 (source
14289 (origin
14290 (method url-fetch)
14291 (uri (pypi-uri "bpython" version))
14292 (sha256
14293 (base32
14294 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14295 (build-system python-build-system)
14296 (arguments
14297 `(#:phases
14298 (modify-phases %standard-phases
14299 (add-after 'unpack 'remove-failing-test
14300 (lambda _
14301 ;; Remove failing test. FIXME: make it pass
14302 (delete-file "bpython/test/test_args.py")
14303 #t))
14304 (add-after 'wrap 'add-aliases
14305 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14306 (lambda* (#:key outputs #:allow-other-keys)
14307 (let ((out (assoc-ref outputs "out")))
14308 (for-each
14309 (lambda (old new)
14310 (symlink old (string-append out "/bin/" new)))
14311 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14312 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14313 #t)))))
14314 (propagated-inputs
14315 `(("python-pygments" ,python-pygments)
14316 ("python-requests" ,python-requests)
14317 ("python-babel" ,python-babel) ; optional, for internationalization
14318 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14319 ("python-greenlet" ,python-greenlet)
14320 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14321 ("python-six" ,python-six)))
14322 (native-inputs
14323 `(("python-sphinx" ,python-sphinx)
14324 ("python-mock" ,python-mock)))
14325 (home-page "https://bpython-interpreter.org/")
14326 (synopsis "Fancy interface to the Python interpreter")
14327 (description "Bpython is a fancy interface to the Python
14328 interpreter. bpython's main features are
14329
14330 @enumerate
14331 @item in-line syntax highlighting,
14332 @item readline-like autocomplete with suggestions displayed as you type,
14333 @item expected parameter list for any Python function,
14334 @item \"rewind\" function to pop the last line of code from memory and
14335 re-evaluate,
14336 @item send the code you've entered off to a pastebin,
14337 @item save the code you've entered to a file, and
14338 @item auto-indentation.
14339 @end enumerate")
14340 (license license:expat)))
14341
14342 (define-public bpython2
14343 (let ((base (package-with-python2
14344 (strip-python2-variant bpython))))
14345 (package (inherit base)
14346 (name "bpython2")
14347 (arguments
14348 `(#:python ,python-2
14349 #:phases
14350 (modify-phases %standard-phases
14351 (add-after 'unpack 'remove-failing-test
14352 (lambda _
14353 ;; Remove failing test. FIXME: make it pass
14354 (delete-file "bpython/test/test_args.py")
14355 ;; Disable failing test-cases (renaming inhibits they are
14356 ;; discovered)
14357 (substitute* "bpython/test/test_curtsies_repl.py"
14358 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14359 (string-append a "xxx_off_" b))
14360 (("^(\\s*def )(test_complex\\W)" _ a b)
14361 (string-append a "xxx_off_" b)))
14362 #t))
14363 (add-before 'build 'rename-scripts
14364 ;; rename the scripts to bypthon2, bpdb2, etc.
14365 (lambda _
14366 (substitute* "setup.py"
14367 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14368 (string-append name "2" rest "\n"))
14369 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14370 (string-append name "2" (or sub "") rest "\n")))
14371 #t))))))))
14372
14373 (define-public python-pyinotify
14374 (package
14375 (name "python-pyinotify")
14376 (version "0.9.6")
14377 (source (origin
14378 (method url-fetch)
14379 (uri (pypi-uri "pyinotify" version))
14380 (sha256
14381 (base32
14382 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14383 (build-system python-build-system)
14384 (arguments `(#:tests? #f)) ;no tests
14385 (home-page "https://github.com/seb-m/pyinotify")
14386 (synopsis "Python library for monitoring inotify events")
14387 (description
14388 "@code{pyinotify} provides a Python interface for monitoring
14389 file system events on Linux.")
14390 (license license:expat)))
14391
14392 (define-public python2-pyinotify
14393 (package-with-python2 python-pyinotify))
14394
14395 ;; Ada parser uses this version.
14396 (define-public python2-quex-0.67.3
14397 (package
14398 (name "python2-quex")
14399 (version "0.67.3")
14400 (source
14401 (origin
14402 (method url-fetch)
14403 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14404 (version-major+minor version)
14405 "/quex-" version ".zip"))
14406 (sha256
14407 (base32
14408 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14409 (build-system python-build-system)
14410 (native-inputs
14411 `(("unzip" ,unzip)))
14412 (arguments
14413 `(#:python ,python-2
14414 #:tests? #f
14415 #:phases
14416 (modify-phases %standard-phases
14417 (delete 'configure)
14418 (delete 'build)
14419 (replace 'install
14420 (lambda* (#:key outputs #:allow-other-keys)
14421 (let* ((out (assoc-ref outputs "out"))
14422 (share/quex (string-append out "/share/quex"))
14423 (bin (string-append out "/bin")))
14424 (copy-recursively "." share/quex)
14425 (mkdir-p bin)
14426 (symlink (string-append share/quex "/quex-exe.py")
14427 (string-append bin "/quex"))
14428 #t))))))
14429 (native-search-paths
14430 (list (search-path-specification
14431 (variable "QUEX_PATH")
14432 (files '("share/quex")))))
14433 (home-page "http://quex.sourceforge.net/")
14434 (synopsis "Lexical analyzer generator in Python")
14435 (description "@code{quex} is a lexical analyzer generator in Python.")
14436 (license license:lgpl2.1+))) ; Non-military
14437
14438 (define-public python2-quex
14439 (package (inherit python2-quex-0.67.3)
14440 (name "python2-quex")
14441 (version "0.68.1")
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14446 (sha256
14447 (base32
14448 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14449 (file-name (string-append name "-" version ".tar.gz"))))))
14450
14451 (define-public python-more-itertools
14452 (package
14453 (name "python-more-itertools")
14454 (version "7.1.0")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "more-itertools" version))
14459 (sha256
14460 (base32
14461 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14462 (build-system python-build-system)
14463 (home-page "https://github.com/erikrose/more-itertools")
14464 (synopsis "More routines for operating on iterables, beyond itertools")
14465 (description "Python's built-in @code{itertools} module implements a
14466 number of iterator building blocks inspired by constructs from APL, Haskell,
14467 and SML. @code{more-itertools} includes additional building blocks for
14468 working with iterables.")
14469 (properties `((python2-variant . ,(delay python2-more-itertools))))
14470 (license license:expat)))
14471
14472 ;; The 5.x series are the last versions supporting Python 2.7.
14473 (define-public python2-more-itertools
14474 (package
14475 (inherit python-more-itertools)
14476 (name "python2-more-itertools")
14477 (version "5.0.0")
14478 (source (origin
14479 (method url-fetch)
14480 (uri (pypi-uri "more-itertools" version))
14481 (sha256
14482 (base32
14483 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14484 (arguments
14485 `(#:python ,python2-minimal))
14486 (propagated-inputs
14487 `(("python2-six" ,python2-six-bootstrap)))))
14488
14489 (define-public python-latexcodec
14490 (package
14491 (name "python-latexcodec")
14492 (version "1.0.6")
14493 (source
14494 (origin
14495 (method url-fetch)
14496 (uri (pypi-uri "latexcodec" version))
14497 (sha256
14498 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14499 (build-system python-build-system)
14500 (inputs
14501 `(("python-six" ,python-six)))
14502 (home-page "https://readthedocs.org/projects/latexcodec/")
14503 (synopsis "Work with LaTeX code in Python")
14504 (description "Lexer and codec to work with LaTeX code in Python.")
14505 (license license:expat)))
14506
14507 (define-public python-pybtex
14508 (package
14509 (name "python-pybtex")
14510 (version "0.21")
14511 (source
14512 (origin
14513 (method url-fetch)
14514 (uri (pypi-uri "pybtex" version))
14515 (sha256
14516 (base32
14517 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14518 (build-system python-build-system)
14519 (native-inputs
14520 `(("python-nose" ,python-nose)))
14521 (inputs
14522 `(("python-latexcodec" ,python-latexcodec)
14523 ("python-pyyaml" ,python-pyyaml)
14524 ("python-six" ,python-six)))
14525 (arguments
14526 `(#:test-target "nosetests"))
14527 (home-page "https://pybtex.org/")
14528 (synopsis "BibTeX-compatible bibliography processor")
14529 (description "Pybtex is a BibTeX-compatible bibliography processor written
14530 in Python. You can simply type pybtex instead of bibtex.")
14531 (license license:expat)))
14532
14533 (define-public python-onetimepass
14534 (package
14535 (name "python-onetimepass")
14536 (version "1.0.1")
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (pypi-uri "onetimepass" version))
14541 (sha256
14542 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14543 (build-system python-build-system)
14544 (propagated-inputs `(("python-six" ,python-six)))
14545 (home-page "https://github.com/tadeck/onetimepass/")
14546 (synopsis "One-time password library")
14547 (description "Python one-time password library for HMAC-based (HOTP) and
14548 time-based (TOTP) passwords.")
14549 (license license:expat)))
14550
14551 (define-public python-parso
14552 (package
14553 (name "python-parso")
14554 (version "0.3.1")
14555 (source
14556 (origin
14557 (method url-fetch)
14558 (uri (pypi-uri "parso" version))
14559 (sha256
14560 (base32
14561 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14562 (native-inputs
14563 `(("python-pytest" ,python-pytest)))
14564 (build-system python-build-system)
14565 (home-page "https://github.com/davidhalter/parso")
14566 (synopsis "Python Parser")
14567 (description "Parso is a Python parser that supports error recovery and
14568 round-trip parsing for different Python versions (in multiple Python versions).
14569 Parso is also able to list multiple syntax errors in your Python file.")
14570 (license license:expat)))
14571
14572 (define-public python2-parso
14573 (package-with-python2 python-parso))
14574
14575 (define-public python-async-generator
14576 (package
14577 (name "python-async-generator")
14578 (version "1.10")
14579 (source
14580 (origin
14581 (method url-fetch)
14582 (uri (pypi-uri "async_generator" version))
14583 (sha256
14584 (base32
14585 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14586 (build-system python-build-system)
14587 (native-inputs
14588 `(("python-pytest" ,python-pytest)))
14589 (home-page "https://github.com/python-trio/async_generator")
14590 (synopsis "Async generators and context managers for Python 3.5+")
14591 (description "@code{async_generator} back-ports Python 3.6's native async
14592 generators and Python 3.7's context managers into Python 3.5.")
14593 ;; Dual licensed.
14594 (license (list license:expat license:asl2.0))))
14595
14596 (define-public python-async-timeout
14597 (package
14598 (name "python-async-timeout")
14599 (version "3.0.1")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "async-timeout" version))
14604 (sha256
14605 (base32
14606 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14607 (build-system python-build-system)
14608 (home-page "https://github.com/aio-libs/async_timeout/")
14609 (synopsis "Timeout context manager for asyncio programs")
14610 (description "@code{async-timeout} provides a timeout timeout context
14611 manager compatible with @code{asyncio}.")
14612 (license license:asl2.0)))
14613
14614 (define-public python-glob2
14615 (package
14616 (name "python-glob2")
14617 (version "0.6")
14618 (source
14619 (origin
14620 (method git-fetch)
14621 (uri (git-reference
14622 (url "https://github.com/miracle2k/python-glob2.git")
14623 (commit version)))
14624 (file-name (git-file-name name version))
14625 (sha256
14626 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14627 (build-system python-build-system)
14628 (home-page "https://github.com/miracle2k/python-glob2/")
14629 (synopsis "Extended Version of the python buildin glob module")
14630 (description "This is an extended version of the Python
14631 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14632 adds:
14633
14634 @itemize
14635 @item The ability to capture the text matched by glob patterns, and return
14636 those matches alongside the file names.
14637 @item A recursive @code{**} globbing syntax, akin for example to the
14638 @code{globstar} option of Bash.
14639 @item The ability to replace the file system functions used, in order to glob
14640 on virtual file systems.
14641 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14642 @end itemize
14643
14644 Glob2 currently based on the glob code from Python 3.3.1.")
14645 (license license:bsd-2)))
14646
14647 (define-public python2-glob2
14648 (package-with-python2 python-glob2))
14649
14650 (define-public python-gipc
14651 (package
14652 (name "python-gipc")
14653 (version "0.6.0")
14654 (source
14655 (origin
14656 (method url-fetch)
14657 (uri (pypi-uri "gipc" version ".zip"))
14658 (sha256
14659 (base32
14660 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14661 (build-system python-build-system)
14662 (native-inputs
14663 `(("unzip" ,unzip)))
14664 (propagated-inputs
14665 `(("python-gevent" ,python-gevent)))
14666 (home-page "http://gehrcke.de/gipc")
14667 (synopsis "Child process management in the context of gevent")
14668 (description "Usage of Python's multiprocessing package in a
14669 gevent-powered application may raise problems. With @code{gipc},
14670 process-based child processes can safely be created anywhere within a
14671 gevent-powered application.")
14672 (license license:expat)))
14673
14674 (define-public python2-gipc
14675 (package-with-python2 python-gipc))
14676
14677 (define-public python-fusepy
14678 (package
14679 (name "python-fusepy")
14680 (version "2.0.4")
14681 (source
14682 (origin
14683 (method url-fetch)
14684 (uri (pypi-uri "fusepy" version))
14685 (sha256
14686 (base32
14687 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14688 (build-system python-build-system)
14689 (arguments
14690 `(#:phases
14691 (modify-phases %standard-phases
14692 (add-before 'build 'set-library-file-name
14693 (lambda* (#:key inputs #:allow-other-keys)
14694 (let ((fuse (assoc-ref inputs "fuse")))
14695 (substitute* "fuse.py"
14696 (("find_library\\('fuse'\\)")
14697 (string-append "'" fuse "/lib/libfuse.so'")))
14698 #t))))))
14699 (propagated-inputs
14700 `(("fuse" ,fuse)))
14701 (home-page "https://github.com/fusepy/fusepy")
14702 (synopsis "Simple ctypes bindings for FUSE")
14703 (description "Python module that provides a simple interface to FUSE and
14704 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14705 (license license:isc)))
14706
14707 (define-public python2-fusepy
14708 (package-with-python2 python-fusepy))
14709
14710 (define-public python2-gdrivefs
14711 (package
14712 (name "python2-gdrivefs")
14713 (version "0.14.9")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (pypi-uri "gdrivefs" version))
14718 (sha256
14719 (base32
14720 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14721 (build-system python-build-system)
14722 (arguments
14723 `(#:python ,python-2
14724 #:phases
14725 (modify-phases %standard-phases
14726 (add-before 'build 'patch-setup-py
14727 (lambda _
14728 ;; Update requirements from dependency==version
14729 ;; to dependency>=version
14730 (substitute* "gdrivefs/resources/requirements.txt"
14731 (("==") ">="))
14732 #t)))))
14733 (native-inputs
14734 `(("python2-gipc" ,python2-gipc)
14735 ("python2-gevent" ,python2-gevent)
14736 ("python2-greenlet" ,python2-greenlet)
14737 ("python2-httplib2" ,python2-httplib2)
14738 ("python2-uritemplate" ,python2-uritemplate)
14739 ("python2-oauth2client" ,python2-oauth2client)
14740 ("python2-six" ,python2-six)))
14741 (propagated-inputs
14742 `(("python2-dateutil" ,python2-dateutil)
14743 ("python2-fusepy" ,python2-fusepy)
14744 ("python2-google-api-client" ,python2-google-api-client)))
14745 (home-page "https://github.com/dsoprea/GDriveFS")
14746 (synopsis "Mount Google Drive as a local file system")
14747 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14748 under Python 2.7.")
14749 (license license:gpl2)))
14750
14751 (define-public pybind11
14752 (package
14753 (name "pybind11")
14754 (version "2.2.4")
14755 (source (origin
14756 (method git-fetch)
14757 (uri (git-reference
14758 (url "https://github.com/pybind/pybind11.git")
14759 (commit (string-append "v" version))))
14760 (sha256
14761 (base32
14762 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14763 (file-name (git-file-name name version))))
14764 (build-system cmake-build-system)
14765 (native-inputs
14766 `(("python" ,python)
14767 ("python-pytest" ,python-pytest)))
14768 (arguments
14769 `(#:test-target "check"))
14770 (home-page "https://github.com/pybind/pybind11/")
14771 (synopsis "Seamless operability between C++11 and Python")
14772 (description "pybind11 is a lightweight header-only library that exposes
14773 C++ types in Python and vice versa, mainly to create Python bindings of
14774 existing C++ code. Its goals and syntax are similar to the excellent
14775 Boost.Python library by David Abrahams: to minimize boilerplate code in
14776 traditional extension modules by inferring type information using compile-time
14777 introspection.")
14778 (license license:expat)))
14779
14780 (define-public python-fasteners
14781 (package
14782 (name "python-fasteners")
14783 (version "0.14.1")
14784 (source
14785 (origin
14786 (method url-fetch)
14787 (uri (pypi-uri "fasteners" version))
14788 (sha256
14789 (base32
14790 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14791 (build-system python-build-system)
14792 (propagated-inputs
14793 `(("python-monotonic" ,python-monotonic)
14794 ("python-six" ,python-six)
14795 ("python-testtools" ,python-testtools)))
14796 (home-page "https://github.com/harlowja/fasteners")
14797 (synopsis "Python package that provides useful locks")
14798 (description
14799 "This package provides a Python program that provides following locks:
14800
14801 @itemize
14802 @item Locking decorator
14803 @item Reader-writer locks
14804 @item Inter-process locks
14805 @item Generic helpers
14806 @end itemize\n")
14807 (properties `((python2-variant . ,(delay python2-fasteners))))
14808 (license license:asl2.0)))
14809
14810 (define-public python2-fasteners
14811 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14812 (package
14813 (inherit base)
14814 (propagated-inputs
14815 `(("python2-futures" ,python2-futures)
14816 ,@(package-propagated-inputs base))))))
14817
14818 (define-public python-requests-file
14819 (package
14820 (name "python-requests-file")
14821 (version "1.4.3")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "requests-file" version))
14826 (sha256
14827 (base32
14828 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14829 (build-system python-build-system)
14830 (propagated-inputs
14831 `(("python-requests" ,python-requests)
14832 ("python-six" ,python-six)))
14833 (home-page
14834 "https://github.com/dashea/requests-file")
14835 (synopsis "File transport adapter for Requests")
14836 (description
14837 "Requests-File is a transport adapter for use with the Requests Python
14838 library to allow local file system access via @code{file://} URLs.")
14839 (license license:asl2.0)))
14840
14841 (define-public python2-requests-file
14842 (package-with-python2 python-requests-file))
14843
14844 (define-public python-tldextract
14845 (package
14846 (name "python-tldextract")
14847 (version "2.2.0")
14848 (source
14849 (origin
14850 (method url-fetch)
14851 (uri (pypi-uri "tldextract" version))
14852 (sha256
14853 (base32
14854 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14855 (build-system python-build-system)
14856 (native-inputs
14857 `(("python-pytest" ,python-pytest)
14858 ("python-responses" ,python-responses)))
14859 (propagated-inputs
14860 `(("python-idna" ,python-idna)
14861 ("python-requests" ,python-requests)
14862 ("python-requests-file" ,python-requests-file)))
14863 (home-page
14864 "https://github.com/john-kurkowski/tldextract")
14865 (synopsis
14866 "Separate the TLD from the registered domain and subdomains of a URL")
14867 (description
14868 "TLDExtract accurately separates the TLD from the registered domain and
14869 subdomains of a URL, using the Public Suffix List. By default, this includes
14870 the public ICANN TLDs and their exceptions. It can optionally support the
14871 Public Suffix List's private domains as well.")
14872 (license license:bsd-3)))
14873
14874 (define-public python2-tldextract
14875 (package-with-python2 python-tldextract))
14876
14877 (define-public python-pynamecheap
14878 (package
14879 (name "python-pynamecheap")
14880 (version "0.0.3")
14881 (source
14882 (origin
14883 (method url-fetch)
14884 (uri (pypi-uri "PyNamecheap" version))
14885 (sha256
14886 (base32
14887 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14888 (build-system python-build-system)
14889 (propagated-inputs
14890 `(("python-requests" ,python-requests)))
14891 (home-page
14892 "https://github.com/Bemmu/PyNamecheap")
14893 (synopsis
14894 "Namecheap API client in Python")
14895 (description
14896 "PyNamecheap is a Namecheap API client in Python.")
14897 (license license:expat)))
14898
14899 (define-public python2-pynamecheap
14900 (package-with-python2 python-pynamecheap))
14901
14902 (define-public python-dns-lexicon
14903 (package
14904 (name "python-dns-lexicon")
14905 (version "2.4.0")
14906 (source
14907 (origin
14908 (method url-fetch)
14909 (uri (pypi-uri "dns-lexicon" version))
14910 (sha256
14911 (base32
14912 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14913 (build-system python-build-system)
14914 (arguments
14915 `(#:tests? #f)) ;requires internet access
14916 (propagated-inputs
14917 `(("python-future" ,python-future)
14918 ("python-pynamecheap" ,python-pynamecheap)
14919 ("python-requests" ,python-requests)
14920 ("python-tldextract" ,python-tldextract)
14921 ("python-urllib3" ,python-urllib3)))
14922 (home-page "https://github.com/AnalogJ/lexicon")
14923 (synopsis
14924 "Manipulate DNS records on various DNS providers")
14925 (description
14926 "Lexicon provides a way to manipulate DNS records on multiple DNS
14927 providers in a standardized way. It has a CLI but it can also be used as a
14928 Python library. It was designed to be used in automation, specifically with
14929 Let's Encrypt.")
14930 (license license:expat)))
14931
14932 (define-public python2-dns-lexicon
14933 (package-with-python2 python-dns-lexicon))
14934
14935 (define-public python-commandlines
14936 (package
14937 (name "python-commandlines")
14938 (version "0.4.1")
14939 (source
14940 (origin
14941 (method url-fetch)
14942 (uri (pypi-uri "commandlines" version))
14943 (sha256
14944 (base32
14945 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14946 (build-system python-build-system)
14947 (home-page "https://github.com/chrissimpkins/commandlines")
14948 (synopsis "Command line argument to object parsing library")
14949 (description
14950 "@code{Commandlines} is a Python library for command line application
14951 development that supports command line argument parsing, command string
14952 validation testing and application logic.")
14953 (license license:expat)))
14954
14955 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14956 ;; python-numba. They have a very unflexible relationship.
14957 (define-public python-numba
14958 (package
14959 (name "python-numba")
14960 (version "0.42.0")
14961 (source
14962 (origin
14963 (method url-fetch)
14964 (uri (pypi-uri "numba" version))
14965 (sha256
14966 (base32
14967 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
14968 (build-system python-build-system)
14969 (arguments
14970 `(#:modules ((guix build utils)
14971 (guix build python-build-system)
14972 (ice-9 ftw)
14973 (srfi srfi-1)
14974 (srfi srfi-26))
14975 #:phases
14976 (modify-phases %standard-phases
14977 (add-after 'unpack 'disable-proprietary-features
14978 (lambda _
14979 (setenv "NUMBA_DISABLE_HSA" "1")
14980 (setenv "NUMBA_DISABLE_CUDA" "1")
14981 #t))
14982 (add-after 'unpack 'remove-failing-tests
14983 (lambda _
14984 ;; FIXME: these tests fail for unknown reasons:
14985 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14986 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14987 (substitute* "numba/tests/test_dispatcher.py"
14988 (("def test(_non_writable_pycache)" _ m)
14989 (string-append "def guix_skip" m))
14990 (("def test(_non_creatable_pycache)" _ m)
14991 (string-append "def guix_skip" m))
14992 (("def test(_frozen)" _ m)
14993 (string-append "def guix_skip" m)))
14994
14995 ;; These tests fail because we don't run the tests from the build
14996 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14997 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14998 (substitute* "numba/tests/test_pycc.py"
14999 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15000 (string-append "def guix_skip" m)))
15001 #t))
15002 (replace 'check
15003 (lambda _
15004 (let ((cwd (getcwd)))
15005 (setenv "PYTHONPATH"
15006 (string-append cwd "/build/"
15007 (find (cut string-prefix? "lib" <>)
15008 (scandir (string-append cwd "/build")))
15009 ":"
15010 (getenv "PYTHONPATH")))
15011 ;; Something is wrong with the PYTHONPATH when running the
15012 ;; tests from the build directory, as it complains about not being
15013 ;; able to import certain modules.
15014 (with-directory-excursion "/tmp"
15015 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15016 #t)))))
15017 (propagated-inputs
15018 `(("python-llvmlite" ,python-llvmlite)
15019 ("python-numpy" ,python-numpy)
15020 ("python-singledispatch" ,python-singledispatch)))
15021 ;; Needed for tests.
15022 (inputs
15023 `(("python-jinja2" ,python-jinja2)
15024 ("python-pygments" ,python-pygments)))
15025 (home-page "https://numba.pydata.org")
15026 (synopsis "Compile Python code using LLVM")
15027 (description "Numba gives you the power to speed up your applications with
15028 high performance functions written directly in Python. With a few
15029 annotations, array-oriented and math-heavy Python code can be just-in-time
15030 compiled to native machine instructions, similar in performance to C, C++ and
15031 Fortran, without having to switch languages or Python interpreters.
15032
15033 Numba works by generating optimized machine code using the LLVM compiler
15034 infrastructure at import time, runtime, or statically (using the included pycc
15035 tool).")
15036 (license license:bsd-3)))
15037
15038 (define-public python-anndata
15039 (package
15040 (name "python-anndata")
15041 (version "0.6.18")
15042 (source
15043 (origin
15044 (method url-fetch)
15045 (uri (pypi-uri "anndata" version))
15046 (sha256
15047 (base32
15048 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15049 (build-system python-build-system)
15050 (propagated-inputs
15051 `(("python-h5py" ,python-h5py)
15052 ("python-natsort" ,python-natsort)
15053 ("python-pandas" ,python-pandas)
15054 ("python-scipy" ,python-scipy)))
15055 (home-page "https://github.com/theislab/anndata")
15056 (synopsis "Annotated data for data analysis pipelines")
15057 (description "Anndata is a package for simple (functional) high-level APIs
15058 for data analysis pipelines. In this context, it provides an efficient,
15059 scalable way of keeping track of data together with learned annotations and
15060 reduces the code overhead typically encountered when using a mostly
15061 object-oriented library such as @code{scikit-learn}.")
15062 (license license:bsd-3)))
15063
15064 (define-public python-dill
15065 (package
15066 (name "python-dill")
15067 (version "0.2.9")
15068 (source
15069 (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "dill" version))
15072 (sha256
15073 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15074 (build-system python-build-system)
15075 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15076 (arguments '(#:tests? #f))
15077 (home-page "https://pypi.org/project/dill")
15078 (synopsis "Serialize all of Python")
15079 (description "Dill extends Python's @code{pickle} module for serializing
15080 and de-serializing Python objects to the majority of the built-in Python
15081 types. Dill provides the user the same interface as the @code{pickle} module,
15082 and also includes some additional features. In addition to pickling Python
15083 objects, @code{dill} provides the ability to save the state of an interpreter
15084 session in a single command. Hence, it would be feasible to save a
15085 interpreter session, close the interpreter, ship the pickled file to another
15086 computer, open a new interpreter, unpickle the session and thus continue from
15087 the saved state of the original interpreter session.")
15088 (license license:bsd-3)))
15089
15090 (define-public python-multiprocess
15091 (package
15092 (name "python-multiprocess")
15093 (version "0.70.6.1")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (pypi-uri "multiprocess" version))
15098 (sha256
15099 (base32
15100 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15101 (build-system python-build-system)
15102 (propagated-inputs
15103 `(("python-dill" ,python-dill)))
15104 (home-page "https://pypi.org/project/multiprocess")
15105 (synopsis "Multiprocessing and multithreading in Python")
15106 (description
15107 "This package is a fork of the multiprocessing Python package, a package
15108 which supports the spawning of processes using the API of the standard
15109 library's @code{threading} module.")
15110 (license license:bsd-3)))
15111
15112 (define-public python-toolz
15113 (package
15114 (name "python-toolz")
15115 (version "0.9.0")
15116 (source
15117 (origin
15118 (method url-fetch)
15119 (uri (pypi-uri "toolz" version))
15120 (sha256
15121 (base32
15122 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15123 (build-system python-build-system)
15124 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15125 ;; unregistered loader type"
15126 (arguments '(#:tests? #f))
15127 (home-page "https://github.com/pytoolz/toolz/")
15128 (synopsis "List processing tools and functional utilities")
15129 (description
15130 "This package provides a set of utility functions for iterators,
15131 functions, and dictionaries.")
15132 (license license:bsd-3)))
15133
15134 (define-public python2-toolz
15135 (package-with-python2 python-toolz))
15136
15137 (define-public python-cytoolz
15138 (package
15139 (name "python-cytoolz")
15140 (version "0.9.0.1")
15141 (source
15142 (origin
15143 (method url-fetch)
15144 (uri (pypi-uri "cytoolz" version))
15145 (sha256
15146 (base32
15147 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15148 (build-system python-build-system)
15149 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15150 ;; 'exceptions'"
15151 (arguments '(#:tests? #f))
15152 (propagated-inputs
15153 `(("python-toolz" ,python-toolz)))
15154 (native-inputs
15155 `(("python-cython" ,python-cython)))
15156 (home-page "https://github.com/pytoolz/cytoolz")
15157 (synopsis "High performance functional utilities")
15158 (description
15159 "The cytoolz package implements the same API as provided by toolz. The
15160 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15161 that is accessible to other projects developed in Cython.")
15162 (license license:bsd-3)))
15163
15164 (define-public python-sortedcontainers
15165 (package
15166 (name "python-sortedcontainers")
15167 (version "2.0.4")
15168 (source
15169 (origin
15170 (method url-fetch)
15171 (uri (pypi-uri "sortedcontainers" version))
15172 (sha256
15173 (base32
15174 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15175 (build-system python-build-system)
15176 (native-inputs
15177 `(("python-tox" ,python-tox)))
15178 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15179 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15180 (description
15181 "This package provides a sorted collections library, written in
15182 pure-Python.")
15183 (license license:asl2.0)))
15184
15185 (define-public python-cloudpickle
15186 (package
15187 (name "python-cloudpickle")
15188 (version "0.6.1")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "cloudpickle" version))
15193 (sha256
15194 (base32
15195 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15196 (build-system python-build-system)
15197 ;; FIXME: there are 5 errors in 122 tests:
15198 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15199 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15200 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15201 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15202 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15203 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15204 (arguments '(#:tests? #f))
15205 (native-inputs
15206 `(("python-pytest" ,python-pytest)
15207 ("python-mock" ,python-mock)
15208 ("python-tornado" ,python-tornado)))
15209 (home-page "https://github.com/cloudpipe/cloudpickle")
15210 (synopsis "Extended pickling support for Python objects")
15211 (description
15212 "Cloudpickle makes it possible to serialize Python constructs not
15213 supported by the default pickle module from the Python standard library. It
15214 is especially useful for cluster computing where Python expressions are
15215 shipped over the network to execute on remote hosts, possibly close to the
15216 data.")
15217 (license license:bsd-3)))
15218
15219 (define-public python2-cloudpickle
15220 (package-with-python2 python-cloudpickle))
15221
15222 (define-public python-locket
15223 (package
15224 (name "python-locket")
15225 (version "0.2.0")
15226 (source
15227 (origin
15228 (method url-fetch)
15229 (uri (pypi-uri "locket" version))
15230 (sha256
15231 (base32
15232 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15233 (build-system python-build-system)
15234 (home-page "https://github.com/mwilliamson/locket.py")
15235 (synopsis "File-based locks for Python")
15236 (description
15237 "Locket implements a lock that can be used by multiple processes provided
15238 they use the same path.")
15239 (license license:bsd-2)))
15240
15241 (define-public python2-locket
15242 (package-with-python2 python-locket))
15243
15244 (define-public python-blosc
15245 (package
15246 (name "python-blosc")
15247 (version "1.5.1")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (pypi-uri "blosc" version))
15252 (sha256
15253 (base32
15254 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15255 (build-system python-build-system)
15256 ;; FIXME: all tests pass, but then this error is printed:
15257 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15258 (arguments '(#:tests? #f))
15259 (propagated-inputs
15260 `(("python-numpy" ,python-numpy)))
15261 (home-page "https://github.com/blosc/python-blosc")
15262 (synopsis "Python wrapper for the Blosc data compressor library")
15263 (description "Blosc is a high performance compressor optimized for binary
15264 data. It has been designed to transmit data to the processor cache faster
15265 than the traditional, non-compressed, direct memory fetch approach via a
15266 @code{memcpy()} system call.
15267
15268 Blosc works well for compressing numerical arrays that contains data with
15269 relatively low entropy, like sparse data, time series, grids with
15270 regular-spaced values, etc.
15271
15272 This Python package wraps the Blosc library.")
15273 (license license:bsd-3)))
15274
15275 (define-public python2-blosc
15276 (package-with-python2 python-blosc))
15277
15278 (define-public python-partd
15279 (package
15280 (name "python-partd")
15281 (version "0.3.9")
15282 (source
15283 (origin
15284 (method url-fetch)
15285 (uri (pypi-uri "partd" version))
15286 (sha256
15287 (base32
15288 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15289 (build-system python-build-system)
15290 (propagated-inputs
15291 `(("python-blosc" ,python-blosc)
15292 ("python-locket" ,python-locket)
15293 ("python-numpy" ,python-numpy)
15294 ("python-pandas" ,python-pandas)
15295 ("python-pyzmq" ,python-pyzmq)
15296 ("python-toolz" ,python-toolz)))
15297 (home-page "https://github.com/dask/partd/")
15298 (synopsis "Appendable key-value storage")
15299 (description "Partd stores key-value pairs. Values are raw bytes. We
15300 append on old values. Partd excels at shuffling operations.")
15301 (license license:bsd-3)))
15302
15303 (define-public python2-partd
15304 (package-with-python2 python-partd))
15305
15306 (define-public python-dask
15307 (package
15308 (name "python-dask")
15309 (version "1.2.2")
15310 (source
15311 (origin
15312 (method url-fetch)
15313 (uri (pypi-uri "dask" version))
15314 (sha256
15315 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15316 (build-system python-build-system)
15317 ;; A single test out of 5000+ fails. This test is marked as xfail when
15318 ;; pytest-xdist is used.
15319 (arguments
15320 `(#:phases
15321 (modify-phases %standard-phases
15322 (add-after 'unpack 'disable-broken-test
15323 (lambda _
15324 (substitute* "dask/tests/test_threaded.py"
15325 (("def test_interrupt\\(\\)" m)
15326 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15327 m)))
15328 (when (which "python2")
15329 ;; This test fails with recent Pandas:
15330 ;; <https://github.com/dask/dask/issues/3794>.
15331 (substitute* "dask/dataframe/tests/test_dataframe.py"
15332 (("def test_info\\(\\)" m)
15333 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15334 m))))
15335 #t))
15336 (replace 'check
15337 (lambda _ (invoke "pytest" "-vv"))))))
15338 (propagated-inputs
15339 `(("python-cloudpickle" ,python-cloudpickle)
15340 ("python-numpy" ,python-numpy)
15341 ("python-pandas" ,python-pandas)
15342 ("python-partd" ,python-partd)
15343 ("python-toolz" ,python-toolz)
15344 ("python-pyyaml" ,python-pyyaml)))
15345 (native-inputs
15346 `(("python-pytest" ,python-pytest)
15347 ("python-pytest-runner" ,python-pytest-runner)))
15348 (home-page "https://github.com/dask/dask/")
15349 (synopsis "Parallel computing with task scheduling")
15350 (description
15351 "Dask is a flexible parallel computing library for analytics. It
15352 consists of two components: dynamic task scheduling optimized for computation,
15353 and large data collections like parallel arrays, dataframes, and lists that
15354 extend common interfaces like NumPy, Pandas, or Python iterators to
15355 larger-than-memory or distributed environments. These parallel collections
15356 run on top of the dynamic task schedulers. ")
15357 (license license:bsd-3)))
15358
15359 (define-public python2-dask
15360 (package-with-python2 python-dask))
15361
15362 (define-public python-ilinkedlist
15363 (package
15364 (name "python-ilinkedlist")
15365 (version "0.4.0")
15366 (source
15367 (origin
15368 (method url-fetch)
15369 (uri (pypi-uri "ilinkedlist" version))
15370 (sha256
15371 (base32
15372 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15373 (build-system python-build-system)
15374 (native-inputs `(("python-pytest" ,python-pytest)))
15375 (inputs `(("python" ,python)))
15376 (home-page "https://github.com/luther9/ilinkedlist-py")
15377 (synopsis "Immutable linked list library")
15378 (description
15379 "This is a implementation of immutable linked lists for Python. It
15380 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15381 Since a linked list is treated as immutable, it is hashable, and its length
15382 can be retrieved in constant time. Some of the terminology is inspired by
15383 LISP. It is possible to create an improper list by creating a @code{Pair}
15384 with a non-list @code{cdr}.")
15385 (license license:gpl3+)))
15386
15387 (define-public python-readlike
15388 (package
15389 (name "python-readlike")
15390 (version "0.1.3")
15391 (source
15392 (origin
15393 (method url-fetch)
15394 (uri (pypi-uri "readlike" version))
15395 (sha256
15396 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15397 (build-system python-build-system)
15398 (home-page "https://github.com/jangler/readlike")
15399 (synopsis "GNU Readline-like line editing module")
15400 (description
15401 "This Python module provides line editing functions similar to the default
15402 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15403 @code{readline} package, this one allows access to those capabilties in settings
15404 outside of a standard command-line interface. It is especially well-suited to
15405 interfacing with Urwid, due to a shared syntax for describing key inputs.
15406
15407 Currently, all stateless Readline commands are implemented. Yanking and history
15408 are not supported.")
15409 (license license:expat)))
15410
15411 (define-public python2-readlike
15412 (package-with-python2 python-readlike))
15413
15414 (define-public python-reparser
15415 (package
15416 (name "python-reparser")
15417 (version "1.4.3")
15418 (source
15419 (origin
15420 (method url-fetch)
15421 (uri (pypi-uri "ReParser" version))
15422 (sha256
15423 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15424 (build-system python-build-system)
15425 (home-page "https://github.com/xmikos/reparser")
15426 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15427 (description
15428 "This Python library provides a simple lexer/parser for inline markup based
15429 on regular expressions.")
15430 (license license:expat)))
15431
15432 (define-public python2-reparser
15433 (let ((reparser (package-with-python2
15434 (strip-python2-variant python-reparser))))
15435 (package (inherit reparser)
15436 (propagated-inputs
15437 `(("python2-enum34" ,python2-enum34)
15438 ,@(package-propagated-inputs reparser))))))
15439
15440 (define-public python-precis-i18n
15441 (package
15442 (name "python-precis-i18n")
15443 (version "1.0.0")
15444 (source
15445 (origin
15446 (method url-fetch)
15447 (uri (pypi-uri "precis_i18n" version))
15448 (sha256
15449 (base32
15450 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15451 (build-system python-build-system)
15452 (home-page "https://github.com/byllyfish/precis_i18n")
15453 (synopsis "Implementation of the PRECIS framework")
15454 (description
15455 "This module implements the PRECIS Framework as described in RFC 8264,
15456 RFC 8265 and RFC 8266.")
15457 (license license:expat)))
15458
15459 (define-public python-absl-py
15460 (package
15461 (name "python-absl-py")
15462 (version "0.6.1")
15463 (source
15464 (origin
15465 (method url-fetch)
15466 (uri (pypi-uri "absl-py" version))
15467 (sha256
15468 (base32
15469 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15470 (build-system python-build-system)
15471 (propagated-inputs
15472 `(("python-six" ,python-six)))
15473 (home-page "https://github.com/abseil/abseil-py")
15474 (synopsis "Abseil Python common libraries")
15475 (description
15476 "This package provides the Abseil Python Common Libraries, a collection
15477 of Python libraries for building Python applications.")
15478 (license license:asl2.0)))
15479
15480 (define-public python-astor
15481 (package
15482 (name "python-astor")
15483 (version "0.7.1")
15484 (source
15485 (origin
15486 (method url-fetch)
15487 (uri (pypi-uri "astor" version))
15488 (sha256
15489 (base32
15490 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15491 (build-system python-build-system)
15492 ;; FIXME: There are two errors and two test failures.
15493 (arguments `(#:tests? #f))
15494 (home-page "https://github.com/berkerpeksag/astor")
15495 (synopsis "Read and write Python ASTs")
15496 (description "Astor is designed to allow easy manipulation of Python
15497 source via the Abstract Syntax Tree.")
15498 (license license:bsd-3)))
15499
15500 (define-public python2-astor
15501 (package-with-python2 python-astor))
15502
15503 (define-public python-grpcio
15504 (package
15505 (name "python-grpcio")
15506 (version "1.17.1")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "grpcio" version))
15511 (sha256
15512 (base32
15513 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15514 (build-system python-build-system)
15515 (propagated-inputs
15516 `(("python-six" ,python-six)))
15517 (home-page "https://grpc.io")
15518 (synopsis "HTTP/2-based RPC framework")
15519 (description "This package provides a Python library for communicating
15520 with the HTTP/2-based RPC framework gRPC.")
15521 (license license:asl2.0)))
15522
15523 (define-public python-astunparse
15524 (package
15525 (name "python-astunparse")
15526 (version "1.6.2")
15527 (source
15528 (origin
15529 (method url-fetch)
15530 (uri (pypi-uri "astunparse" version))
15531 (sha256
15532 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15533 (build-system python-build-system)
15534 (arguments '(#:tests? #f)) ; there are none
15535 (propagated-inputs
15536 `(("python-six" ,python-six)
15537 ("python-wheel" ,python-wheel)))
15538 (home-page "https://github.com/simonpercivall/astunparse")
15539 (synopsis "AST unparser for Python")
15540 (description "This package provides an AST unparser for Python. It is a
15541 factored out version of @code{unparse} found in the Python source
15542 distribution.")
15543 (license license:bsd-3)))
15544
15545 (define-public python-gast
15546 (package
15547 (name "python-gast")
15548 (version "0.2.2")
15549 (source
15550 (origin
15551 (method url-fetch)
15552 (uri (pypi-uri "gast" version))
15553 (sha256
15554 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15555 (build-system python-build-system)
15556 (propagated-inputs
15557 `(("python-astunparse" ,python-astunparse)))
15558 (home-page "https://pypi.org/project/gast/")
15559 (synopsis "Generic Python AST that abstracts the underlying Python version")
15560 (description
15561 "GAST provides a compatibility layer between the AST of various Python
15562 versions, as produced by @code{ast.parse} from the standard @code{ast}
15563 module.")
15564 (license license:bsd-3)))
15565
15566 (define-public python-wikidata
15567 (package
15568 (name "python-wikidata")
15569 (version "0.6.1")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "Wikidata" version))
15574 (sha256
15575 (base32
15576 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15577 (build-system python-build-system)
15578 (propagated-inputs
15579 `(("python-babel" ,python-babel)))
15580 (home-page "https://github.com/dahlia/wikidata")
15581 (synopsis "Wikidata client library")
15582 (description
15583 "This package provides a Python interface to
15584 @url{https://www.wikidata.org/, Wikidata}.")
15585 (properties '((upstream-name . "Wikidata")))
15586 (license license:gpl3+)))
15587
15588 (define-public python-doctest-ignore-unicode
15589 (package
15590 (name "python-doctest-ignore-unicode")
15591 (version "0.1.2")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "doctest-ignore-unicode" version))
15596 (sha256
15597 (base32
15598 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15599 (build-system python-build-system)
15600 (native-inputs
15601 `(("python-nose" ,python-nose)))
15602 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15603 (synopsis "Ignore Unicode literal prefixes in doctests")
15604 (description
15605 "This package adds support for a flag to ignore Unicode literal prefixes
15606 in doctests.")
15607 (license license:asl2.0)))
15608
15609 (define-public python-attr
15610 (package
15611 (name "python-attr")
15612 (version "0.3.1")
15613 (source
15614 (origin
15615 (method url-fetch)
15616 (uri (pypi-uri "attr" version))
15617 (sha256
15618 (base32
15619 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15620 (build-system python-build-system)
15621 (home-page "https://github.com/denis-ryzhkov/attr")
15622 (synopsis "Decorator for attributes of target function or class")
15623 (description "Simple decorator to set attributes of target function or
15624 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15625 (license license:expat)))
15626
15627 (define-public python-construct
15628 (package
15629 (name "python-construct")
15630 (version "2.9.45")
15631 (source
15632 (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "construct" version))
15635 (sha256
15636 (base32
15637 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15638 (build-system python-build-system)
15639 (arguments
15640 `(#:tests? #f)) ; No tests exist.
15641 (propagated-inputs
15642 `(("python-extras" ,python-extras)
15643 ("python-arrow" ,python-arrow)
15644 ("python-numpy" ,python-numpy)
15645 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15646 (home-page "http://construct.readthedocs.io")
15647 (synopsis "Declarative and symmetrical parser and builder for binary data")
15648 (description
15649 "This package provides both simple, atomic constructs (such as
15650 integers of various sizes), as well as composite ones which allow you
15651 form hierarchical and sequential structures of increasing complexity.
15652 It features bit and byte granularity, easy debugging and testing, an
15653 easy-to-extend subclass system, and lots of primitive constructs to
15654 make your work easier.")
15655 (license license:expat)))
15656
15657 (define-public python-humanize
15658 (package
15659 (name "python-humanize")
15660 (version "0.5.1")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "humanize" version))
15665 (sha256
15666 (base32
15667 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15668 (arguments
15669 '(#:tests? #f)) ; tests not in pypi archive
15670 (build-system python-build-system)
15671 (home-page "https://github.com/jmoiron/humanize")
15672 (synopsis "Print numerical information in a human-readable form")
15673 (description "This package provides a Python module that displays numbers
15674 and dates in \"human readable\" forms. For example, it would display
15675 \"12345591313\" as \"12.3 billion\".")
15676 (license license:expat)))
15677
15678 (define-public python-txaio
15679 (package
15680 (name "python-txaio")
15681 (version "18.8.1")
15682 (source
15683 (origin
15684 (method url-fetch)
15685 (uri (pypi-uri "txaio" version))
15686 (sha256
15687 (base32
15688 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15689 (build-system python-build-system)
15690 (propagated-inputs
15691 `(("python-twisted" ,python-twisted)
15692 ("python-six" ,python-six)))
15693 (home-page "https://github.com/crossbario/txaio")
15694 (synopsis "Compatibility layer between Python asyncio and Twisted")
15695 (description "Txaio provides a compatibility layer between the Python
15696 @code{asyncio} module and @code{Twisted}.")
15697 (license license:expat)))
15698
15699 (define-public python-toolshed
15700 (package
15701 (name "python-toolshed")
15702 (version "0.4.6")
15703 (source
15704 (origin
15705 (method url-fetch)
15706 (uri (pypi-uri "toolshed" version))
15707 (sha256
15708 (base32
15709 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15710 (build-system python-build-system)
15711 (native-inputs
15712 `(("python-nose" ,python-nose)))
15713 (home-page "https://github.com/brentp/toolshed/")
15714 (synopsis "Collection of modules and functions for working with data")
15715 (description "This is a collection of well-tested, simple modules and
15716 functions that aim to reduce boilerplate when working with data.")
15717 (license license:bsd-2)))
15718
15719 (define-public python-annoy
15720 (package
15721 (name "python-annoy")
15722 (version "1.15.1")
15723 (source
15724 (origin
15725 (method url-fetch)
15726 (uri (pypi-uri "annoy" version))
15727 (sha256
15728 (base32
15729 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15730 (build-system python-build-system)
15731 (native-inputs
15732 `(("python-nose" ,python-nose)))
15733 (home-page "https://github.com/spotify/annoy/")
15734 (synopsis "Approximate nearest neighbors library")
15735 (description
15736 "Annoy is a C++ library with Python bindings to search for points in
15737 space that are close to a given query point. It also creates large read-only
15738 file-based data structures that are @code{mmap}ped into memory so that many
15739 processes may share the same data.")
15740 (license license:asl2.0)))
15741
15742 (define-public python-pylzma
15743 (package
15744 (name "python-pylzma")
15745 (version "0.5.0")
15746 (source
15747 (origin
15748 (method url-fetch)
15749 (uri (pypi-uri "pylzma" version))
15750 (sha256
15751 (base32
15752 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15753 (build-system python-build-system)
15754 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15755 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15756 (description "This package provides Python bindings for the LZMA library
15757 by Igor Pavlov.")
15758 (license license:lgpl2.1+)))
15759
15760 (define-public python2-pylzma
15761 (package-with-python2 python-pylzma))
15762
15763 (define-public python-bsddb3
15764 (package
15765 (name "python-bsddb3")
15766 (version "6.2.6")
15767 (source
15768 (origin
15769 (method url-fetch)
15770 (uri (pypi-uri "bsddb3" version))
15771 (sha256
15772 (base32
15773 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15774 (build-system python-build-system)
15775 (inputs
15776 `(("bdb" ,bdb)))
15777 (arguments
15778 '(#:phases
15779 (modify-phases %standard-phases
15780 (add-after 'unpack 'configure-locations
15781 (lambda* (#:key inputs #:allow-other-keys)
15782 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15783 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15784 #t))
15785 (replace 'check
15786 (lambda _
15787 (invoke "python3" "test3.py" "-v"))))))
15788 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15789 (synopsis "Python bindings for Oracle Berkeley DB")
15790 (description
15791 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15792 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15793 Transaction objects, and each of these is exposed as a Python type in the
15794 bsddb3.db module. The database objects can use various access methods: btree,
15795 hash, recno, and queue. Complete support of Berkeley DB distributed
15796 transactions. Complete support for Berkeley DB Replication Manager.
15797 Complete support for Berkeley DB Base Replication. Support for RPC.")
15798 (license license:bsd-3)))