gnu: python-matplotlib: Update to 3.1.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 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;;
69 ;;; This file is part of GNU Guix.
70 ;;;
71 ;;; GNU Guix is free software; you can redistribute it and/or modify it
72 ;;; under the terms of the GNU General Public License as published by
73 ;;; the Free Software Foundation; either version 3 of the License, or (at
74 ;;; your option) any later version.
75 ;;;
76 ;;; GNU Guix is distributed in the hope that it will be useful, but
77 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 ;;; GNU General Public License for more details.
80 ;;;
81 ;;; You should have received a copy of the GNU General Public License
82 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
83
84 (define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
96 #:use-module (gnu packages dbm)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
117 #:use-module (gnu packages monitoring)
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
126 #:use-module (gnu packages python-check)
127 #:use-module (gnu packages python-compression)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sphinx)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
151 #:use-module (gnu packages serialization)
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
155 #:use-module (guix hg-download)
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
163
164 (define-public python-psutil
165 (package
166 (name "python-psutil")
167 (version "5.6.2")
168 (source
169 (origin
170 (method url-fetch)
171 (uri (pypi-uri "psutil" version))
172 (sha256
173 (base32
174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
175 (build-system python-build-system)
176 (arguments
177 ;; FIXME: some tests does not return and times out.
178 '(#:tests? #f))
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
181 (description
182 "psutil (Python system and process utilities) is a library for retrieving
183 information on running processes and system utilization (CPU, memory, disks,
184 network) in Python. It is useful mainly for system monitoring, profiling and
185 limiting process resources and management of running processes. It implements
186 many functionalities offered by command line tools such as: ps, top, lsof,
187 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188 pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
191
192 (define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
194 (package
195 (inherit base)
196 (propagated-inputs
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
199
200 (define-public python-shapely
201 (package
202 (name "python-shapely")
203 (version "1.6.4.post2")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (pypi-uri "Shapely" version))
208 (sha256
209 (base32
210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
211 (build-system python-build-system)
212 (native-inputs
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
217 (inputs
218 `(("geos" ,geos)))
219 (propagated-inputs
220 `(("python-numpy" ,python-numpy)))
221 (arguments
222 `(#:phases
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
236 #t)))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240 planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
242
243 (define-public python-shortuuid
244 (package
245 (name "python-shortuuid")
246 (version "0.5.0")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (pypi-uri "shortuuid" version))
251 (sha256
252 (base32
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
255 (native-inputs
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
259 (description
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262 module and then similar looking characters are removed.")
263 (license license:bsd-3)))
264
265 (define-public python-logwrap
266 (package
267 (name "python-logwrap")
268 (version "3.2.1")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (pypi-uri "logwrap" version ".zip"))
273 (sha256
274 (base32
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
277 (propagated-inputs
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
280 (native-inputs
281 `(("unzip" ,unzip)
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289 and function call return values in a human-readable way.")
290 (license license:asl2.0)))
291
292 (define-public python2-shapely
293 (package-with-python2 python-shapely))
294
295 (define-public python-clyent
296 (package
297 (name "python-clyent")
298 (version "1.2.1")
299 (source
300 (origin
301 (method url-fetch)
302 (uri (pypi-uri "clyent" version))
303 (sha256
304 (base32
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
307 (native-inputs
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
314
315 (define-public python2-clyent
316 (package-with-python2 python-clyent))
317
318 (define-public python-babel
319 (package
320 (name "python-babel")
321 (version "2.7.0")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "Babel" version))
326 (sha256
327 (base32
328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
329 (build-system python-build-system)
330 (native-inputs
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
333 (propagated-inputs
334 `(("python-pytz" ,python-pytz)))
335 (arguments
336 `(#:phases (modify-phases %standard-phases
337 (replace 'check
338 (lambda _ (invoke "pytest" "-vv"))))))
339 (home-page "http://babel.pocoo.org/")
340 (synopsis
341 "Tools for internationalizing Python applications")
342 (description
343 "Babel is composed of two major parts:
344 - tools to build and work with gettext message catalogs
345 - a Python interface to the CLDR (Common Locale Data Repository), providing
346 access to various locale display names, localized number and date formatting,
347 etc. ")
348 (license license:bsd-3)))
349
350 (define-public python2-babel
351 (package-with-python2 python-babel))
352
353 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
354 (define-public python2-babel-2.6
355 (package
356 (inherit python2-babel)
357 (version "2.6.0")
358 (source (origin
359 (method url-fetch)
360 (uri (pypi-uri "Babel" version))
361 (sha256
362 (base32
363 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
364
365 (define-public python2-backport-ssl-match-hostname
366 (package
367 (name "python2-backport-ssl-match-hostname")
368 (version "3.5.0.1")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (pypi-uri "backports.ssl_match_hostname" version))
373 (sha256
374 (base32
375 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
376 (build-system python-build-system)
377 (arguments
378 `(#:python ,python-2
379 #:tests? #f)) ; no test target
380 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
381 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
382 (description
383 "This backport brings the ssl.match_hostname() function to users of
384 earlier versions of Python. The function checks the hostname in the
385 certificate returned by the server to which a connection has been established,
386 and verifies that it matches the intended target hostname.")
387 (license license:psfl)))
388
389 (define-public python-hdf4
390 (package
391 (name "python-hdf4")
392 (version "0.9")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri name version))
397 (sha256
398 (base32
399 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
400 (build-system python-build-system)
401 (native-inputs `(("nose" ,python-nose)))
402 (propagated-inputs `(("numpy" ,python-numpy)))
403 (inputs
404 `(("hdf4" ,hdf4)
405 ("libjpeg" ,libjpeg)
406 ("zlib" ,zlib)))
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (replace 'check
411 (lambda _
412 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
413 ;; on to import numpy. Somehow this works on their CI system.
414 ;; Let's just manage PYTHONPATH here instead.
415 (substitute* "runexamples.sh"
416 (("export PYTHONPATH=.*") ""))
417 (setenv "PYTHONPATH"
418 (string-append (getcwd) ":"
419 (getenv "PYTHONPATH")))
420 (invoke "./runexamples.sh")
421 (invoke "nosetests" "-v"))))))
422 (home-page "https://github.com/fhs/python-hdf4")
423 (synopsis "Python interface to the NCSA HDF4 library")
424 (description
425 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
426 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
427 NetCDF files can also be read and modified. Python-HDF4 is a fork of
428 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
429 (license license:expat)))
430
431 (define-public python2-hdf4
432 (package-with-python2 python-hdf4))
433
434 (define-public python-h5py
435 (package
436 (name "python-h5py")
437 (version "2.8.0")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (pypi-uri "h5py" version))
442 (sha256
443 (base32
444 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
445 (build-system python-build-system)
446 (arguments
447 `(#:tests? #f ; no test target
448 #:phases
449 (modify-phases %standard-phases
450 (add-after 'unpack 'fix-hdf5-paths
451 (lambda* (#:key inputs #:allow-other-keys)
452 (let ((prefix (assoc-ref inputs "hdf5")))
453 (substitute* "setup_build.py"
454 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
455 (string-append "['" prefix "/lib" "']"))
456 (("'/opt/local/include', '/usr/local/include'")
457 (string-append "'" prefix "/include" "'")))
458 (substitute* "setup_configure.py"
459 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']")))
461 #t))))))
462 (propagated-inputs
463 `(("python-six" ,python-six)
464 ("python-numpy" ,python-numpy)))
465 (inputs
466 `(("hdf5" ,hdf5)))
467 (native-inputs
468 `(("python-cython" ,python-cython)
469 ("python-pkgconfig" ,python-pkgconfig)))
470 (home-page "http://www.h5py.org/")
471 (synopsis "Read and write HDF5 files from Python")
472 (description
473 "The h5py package provides both a high- and low-level interface to the
474 HDF5 library from Python. The low-level interface is intended to be a
475 complete wrapping of the HDF5 API, while the high-level component supports
476 access to HDF5 files, datasets and groups using established Python and NumPy
477 concepts.")
478 (license license:bsd-3)))
479
480 (define-public python2-h5py
481 (package-with-python2 python-h5py))
482
483 (define-public python-sh
484 (package
485 (name "python-sh")
486 (version "1.12.14")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "sh" version))
491 (sha256
492 (base32
493 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
494 (build-system python-build-system)
495 (arguments
496 '(#:phases
497 (modify-phases %standard-phases
498 (replace 'check
499 (lambda _
500 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
501 (setenv "HOME" "/tmp")
502 (invoke "python" "sh.py" "test"))))))
503 (native-inputs
504 `(("python-coverage" ,python-coverage)))
505 (home-page "https://github.com/amoffat/sh")
506 (synopsis "Python subprocess replacement")
507 (description "This package provides a replacement for Python's
508 @code{subprocess} feature.")
509 (license license:expat)))
510
511 (define-public python2-sh
512 (package-with-python2 python-sh))
513
514 (define-public python-cftime
515 (package
516 (name "python-cftime")
517 (version "1.0.3.4")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "cftime" version))
522 (sha256
523 (base32
524 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
525 (build-system python-build-system)
526 (propagated-inputs
527 `(("python-numpy" ,python-numpy)))
528 (native-inputs
529 `(("python-coveralls" ,python-coveralls)
530 ("python-cython" ,python-cython)
531 ("python-pytest-cov" ,python-pytest-cov)))
532 (home-page "https://github.com/Unidata/cftime")
533 (synopsis "Library for time handling")
534 (description
535 "This package provides time-handling functionality that used to be part
536 of the netcdf4 package before.")
537 ;; This package claims to include code under the GPLv3 but is released
538 ;; under ISC.
539 (license (list license:isc license:gpl3+))))
540
541 (define-public python-netcdf4
542 (package
543 (name "python-netcdf4")
544 (version "1.4.2")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "netCDF4" version))
549 (sha256
550 (base32
551 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
552 (build-system python-build-system)
553 (arguments
554 '(#:phases
555 (modify-phases %standard-phases
556 (add-after 'unpack 'configure-locations
557 (lambda* (#:key inputs #:allow-other-keys)
558 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
559 #t)))))
560 (native-inputs
561 `(("python-cython" ,python-cython)))
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)
564 ("python-cftime" ,python-cftime)))
565 (inputs
566 `(("netcdf" ,netcdf)
567 ("hdf4" ,hdf4)
568 ("hdf5" ,hdf5)))
569 (home-page "https://github.com/Unidata/netcdf4-python")
570 (synopsis "Python/numpy interface to the netCDF library")
571 (description "Netcdf4-python is a Python interface to the netCDF C
572 library. netCDF version 4 has many features not found in earlier
573 versions of the library and is implemented on top of HDF5. This module
574 can read and write files in both the new netCDF 4 and the old netCDF 3
575 format, and can create files that are readable by HDF5 clients. The
576 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
577 to users of that module.")
578 ;; The software is mainly ISC, but includes some files covered
579 ;; by the Expat license.
580 (license (list license:isc license:expat))))
581
582 (define-public python2-netcdf4
583 (package-with-python2 python-netcdf4))
584
585 (define-public python-lockfile
586 (package
587 (name "python-lockfile")
588 (version "0.12.2")
589 (source
590 (origin
591 (method url-fetch)
592 (uri (pypi-uri "lockfile" version))
593 (sha256
594 (base32
595 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
596 (build-system python-build-system)
597 (arguments '(#:test-target "check"))
598 (native-inputs
599 `(("python-pbr" ,python-pbr)))
600 (home-page "https://launchpad.net/pylockfile")
601 (synopsis "Platform-independent file locking module")
602 (description
603 "The lockfile package exports a LockFile class which provides a simple
604 API for locking files.")
605 (license license:expat)))
606
607 (define-public python2-lockfile
608 (package-with-python2 python-lockfile))
609
610 (define-public python-semantic-version
611 (package
612 (name "python-semantic-version")
613 (version "2.6.0")
614 (source
615 (origin
616 (method url-fetch)
617 (uri (pypi-uri "semantic_version" version))
618 (sha256
619 (base32
620 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
621 (build-system python-build-system)
622 (arguments
623 `(#:tests? #f)) ; PyPI tarball lacks tests
624 (home-page "https://github.com/rbarrois/python-semanticversion")
625 (synopsis "Semantic versioning module for Python")
626 (description
627 "The @code{semantic_version} class is a small library for handling
628 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
629
630 It can compare versions, generate a new version that represents a bump in one of
631 the version levels, and check whether any given string is a proper semantic
632 version identifier.")
633 (license license:bsd-3)))
634
635 (define-public python2-semantic-version
636 (package-with-python2 python-semantic-version))
637
638 (define-public python-serpent
639 (package
640 (name "python-serpent")
641 (version "1.28")
642 (source
643 (origin
644 (method url-fetch)
645 (uri (pypi-uri "serpent" version))
646 (sha256
647 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
648 (build-system python-build-system)
649 (native-inputs
650 `(("python-attrs" ,python-attrs)
651 ("python-pytz" ,python-pytz)))
652 (home-page "https://github.com/irmen/Serpent")
653 (synopsis "Serializer for literal Python expressions")
654 (description
655 "Serpent provides @code{ast.literal_eval()}-compatible object tree
656 serialization. It serializes an object tree into bytes (an utf-8 encoded
657 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
658 to rebuild the original object tree.
659
660 Because only safe literals are encoded, it is safe to send serpent data to
661 other machines, such as over the network.")
662 (license license:expat)))
663
664 (define-public python-setuptools
665 (package
666 (name "python-setuptools")
667 (version "41.0.1")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (pypi-uri "setuptools" version ".zip"))
672 (sha256
673 (base32
674 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
675 (modules '((guix build utils)))
676 (snippet
677 '(begin
678 ;; Remove included binaries which are used to build self-extracting
679 ;; installers for Windows.
680 ;; TODO: Find some way to build them ourself so we can include them.
681 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
682 #t))))
683 (build-system python-build-system)
684 ;; FIXME: Tests require pytest, which itself relies on setuptools.
685 ;; One could bootstrap with an internal untested setuptools.
686 (arguments
687 `(#:tests? #f))
688 (home-page "https://pypi.python.org/pypi/setuptools")
689 (synopsis
690 "Library designed to facilitate packaging Python projects")
691 (description
692 "Setuptools is a fully-featured, stable library designed to facilitate
693 packaging Python projects, where packaging includes:
694 Python package and module definitions,
695 distribution package metadata,
696 test hooks,
697 project installation,
698 platform-specific details,
699 Python 3 support.")
700 ;; TODO: setuptools now bundles the following libraries:
701 ;; packaging, pyparsing, six and appdirs. How to unbundle?
702 (license (list license:psfl ; setuptools itself
703 license:expat ; six, appdirs, pyparsing
704 license:asl2.0 ; packaging is dual ASL2/BSD-2
705 license:bsd-2))))
706
707 (define-public python2-setuptools
708 (package-with-python2 python-setuptools))
709
710 (define-public python-uniseg
711 (package
712 (name "python-uniseg")
713 (version "0.7.1")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (pypi-uri "uniseg" version ".zip"))
718 (sha256
719 (base32
720 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
721 (build-system python-build-system)
722 (arguments
723 '(#:tests? #f)) ; The test suite requires network access.
724 (native-inputs
725 `(("unzip" ,unzip)))
726 (home-page
727 "https://bitbucket.org/emptypage/uniseg-python")
728 (synopsis
729 "Python library to determine Unicode text segmentations")
730 (description
731 "Uniseg is a Python package used to determine Unicode text segmentations.
732 Supported segmentations include:
733 @enumerate
734 @item @dfn{Code point} (any value in the Unicode codespace)
735 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
736 multiple Unicode code points, e.g. \"G\" + acute-accent)
737 @item Word break
738 @item Sentence break
739 @item Line break
740 @end enumerate")
741 (license license:expat)))
742
743 (define-public python2-uniseg
744 (package-with-python2 python-uniseg))
745
746 (define-public python-humanfriendly
747 (package
748 (name "python-humanfriendly")
749 (version "4.4.1")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (pypi-uri "humanfriendly" version))
754 (sha256
755 (base32
756 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
757 (build-system python-build-system)
758 (arguments
759 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
760 #:tests? #f))
761 (propagated-inputs
762 `(("python-monotonic" ,python-monotonic)))
763 (home-page "https://humanfriendly.readthedocs.io")
764 (synopsis "Human-friendly input and output in Python")
765 (description
766 "The functions and classes in @code{humanfriendly} can be used to make
767 text interfaces more user-friendly. It includes tools to parse and format
768 numbers, file sizes, and timespans, timers for long-running operations, menus
769 to allow the user to choose from a list of options, and terminal interaction
770 helpers.")
771 (license license:expat)))
772
773 (define-public python2-humanfriendly
774 (package-with-python2 python-humanfriendly))
775
776 (define-public python-capturer
777 (package
778 (name "python-capturer")
779 (version "2.4")
780 (source
781 (origin
782 (method url-fetch)
783 (uri (pypi-uri "capturer" version))
784 (sha256
785 (base32
786 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
787 (build-system python-build-system)
788 (arguments
789 `(#:tests? #f))
790 (propagated-inputs
791 `(("python-humanfriendly" ,python-humanfriendly)))
792 (home-page "https://capturer.readthedocs.io")
793 (synopsis "Capture stdout and stderr streams of the current process")
794 (description
795 "The capturer package makes it easy to capture the stdout and stderr
796 streams of the current process and subprocesses. Output can be relayed
797 to the terminal in real time but is also available to the Python program
798 for additional processing.")
799 (license license:expat)))
800
801 (define-public python2-capturer
802 (package-with-python2 python-capturer))
803
804 (define-public python-case
805 (package
806 (name "python-case")
807 (version "1.5.3")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "case" version))
812 (sha256
813 (base32
814 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
815 (build-system python-build-system)
816 (propagated-inputs
817 `(("python-mock" ,python-mock)
818 ("python-nose" ,python-nose)
819 ("python-six" ,python-six)
820 ("python-unittest2" ,python-unittest2)))
821 (native-inputs
822 `(("python-coverage" ,python-coverage)))
823 (home-page "https://github.com/celery/case")
824 (synopsis "Unittest utilities and convenience methods")
825 (description
826 "The @code{case} package provides utilities on top of unittest, including
827 some helpful Python 2 compatibility convenience methods.")
828 (license license:bsd-3)))
829
830 (define-public python-verboselogs
831 (package
832 (name "python-verboselogs")
833 (version "1.7")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "verboselogs" version))
838 (sha256
839 (base32
840 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
841 (build-system python-build-system)
842 (native-inputs
843 `(("python-mock" ,python-mock)
844 ("python-astroid" ,python-astroid)
845 ("python-pylint" ,python-pylint)))
846 (home-page "https://verboselogs.readthedocs.io")
847 (synopsis "Verbose logging level for Python's logging module")
848 (description
849 "The @code{verboselogs} package extends Python's @code{logging} module to
850 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
851 (license license:expat)))
852
853 (define-public python2-verboselogs
854 (package-with-python2 python-verboselogs))
855
856 (define-public python-coloredlogs
857 (package
858 (name "python-coloredlogs")
859 (version "7.3")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "coloredlogs" version))
864 (sha256
865 (base32
866 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
867 (build-system python-build-system)
868 (arguments
869 `(;Tests require some updated modules
870 #:tests? #f))
871 (propagated-inputs
872 `(("python-capturer" ,python-capturer)))
873 (home-page "https://coloredlogs.readthedocs.io")
874 (synopsis "Colored stream handler for Python's logging module")
875 (description
876 "The @code{coloredlogs} package enables colored terminal output for
877 Python's logging module. The @code{ColoredFormatter} class inherits from
878 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
879 messages in color.")
880 (license license:expat)))
881
882 (define-public python2-coloredlogs
883 (package-with-python2 python-coloredlogs))
884
885 (define-public python-et-xmlfile
886 (package
887 (name "python-et-xmlfile")
888 (version "1.0.1")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (pypi-uri "et_xmlfile" version))
893 (sha256
894 (base32
895 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
896 (build-system python-build-system)
897 (arguments
898 `(#:phases (modify-phases %standard-phases
899 (replace 'check
900 (lambda _
901 (invoke "pytest"))))))
902 (native-inputs
903 `(("python-pytest" ,python-pytest)
904 ("python-lxml" ,python-lxml))) ;used for the tests
905 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
906 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
907 (description "This Python library is based upon the @code{xmlfile} module
908 from @code{lxml}. It aims to provide a low memory, compatible implementation
909 of @code{xmlfile}.")
910 (license license:expat)))
911
912 (define-public python2-et-xmlfile
913 (package-with-python2 python-et-xmlfile))
914
915 (define-public python-openpyxl
916 (package
917 (name "python-openpyxl")
918 (version "2.6.2")
919 (source
920 (origin
921 ;; We use the upstream repository, as the tests are not included in the
922 ;; PyPI releases.
923 (method hg-fetch)
924 (uri (hg-reference
925 (url "https://bitbucket.org/openpyxl/openpyxl")
926 (changeset version)))
927 (file-name (string-append name "-" version "-checkout"))
928 (sha256
929 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
930 (build-system python-build-system)
931 (arguments
932 `(#:phases (modify-phases %standard-phases
933 (replace 'check
934 (lambda _
935 (invoke "pytest"))))))
936 (native-inputs
937 ;; For the test suite.
938 `(("python-lxml" ,python-lxml)
939 ("python-pillow" ,python-pillow)
940 ("python-pytest" ,python-pytest)))
941 (propagated-inputs
942 `(("python-et-xmlfile" ,python-et-xmlfile)
943 ("python-jdcal" ,python-jdcal)))
944 (home-page "https://openpyxl.readthedocs.io")
945 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
946 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
947 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
948 standard.")
949 (license license:expat)))
950
951 (define-public python-eventlet
952 (package
953 (name "python-eventlet")
954 (version "0.20.1")
955 (source
956 (origin
957 (method url-fetch)
958 (uri (pypi-uri "eventlet" version))
959 (sha256
960 (base32
961 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
962 (build-system python-build-system)
963 (propagated-inputs
964 `(("python-greenlet" ,python-greenlet)))
965 (arguments
966 ;; TODO: Requires unpackaged 'enum-compat'.
967 '(#:tests? #f))
968 (home-page "http://eventlet.net")
969 (synopsis "Concurrent networking library for Python")
970 (description
971 "Eventlet is a concurrent networking library for Python that
972 allows you to change how you run your code, not how you write it.
973 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
974 Coroutines ensure that the developer uses a blocking style of programming
975 that is similar to threading, but provide the benefits of non-blocking I/O.
976 The event dispatch is implicit, which means you can easily use @code{Eventlet}
977 from the Python interpreter, or as a small part of a larger application.")
978 (license license:expat)))
979
980 (define-public python2-eventlet
981 (let ((base (package-with-python2
982 (strip-python2-variant python-eventlet))))
983 (package (inherit base)
984 (propagated-inputs
985 `(("python2-enum34" ,python2-enum34)
986 ,@(package-propagated-inputs base))))))
987
988 (define-public python-six
989 (package
990 (name "python-six")
991 (version "1.11.0")
992 (source
993 (origin
994 (method url-fetch)
995 (uri (pypi-uri "six" version))
996 (sha256
997 (base32
998 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
999 (build-system python-build-system)
1000 (arguments
1001 `(#:phases
1002 (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "py.test" "-v"))))))
1006 (native-inputs
1007 `(("python-py" ,python-py)
1008 ("python-pytest" ,python-pytest-bootstrap)))
1009 (home-page "https://pypi.python.org/pypi/six/")
1010 (synopsis "Python 2 and 3 compatibility utilities")
1011 (description
1012 "Six is a Python 2 and 3 compatibility library. It provides utility
1013 functions for smoothing over the differences between the Python versions with
1014 the goal of writing Python code that is compatible on both Python versions.
1015 Six supports every Python version since 2.5. It is contained in only one
1016 Python file, so it can be easily copied into your project.")
1017 (license license:x11)))
1018
1019 (define-public python2-six
1020 (package-with-python2 python-six))
1021
1022 (define-public python-six-bootstrap
1023 (package
1024 (inherit python-six)
1025 (name "python-six-bootstrap")
1026 (native-inputs `())
1027 (arguments `(#:tests? #f))))
1028
1029 (define-public python2-six-bootstrap
1030 (package-with-python2 python-six-bootstrap))
1031
1032 (define-public python-schedule
1033 (package
1034 (name "python-schedule")
1035 (version "0.4.3")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (pypi-uri "schedule" version))
1040 (sha256
1041 (base32
1042 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1043 (build-system python-build-system)
1044 (native-inputs
1045 `(("python-pytest" ,python-pytest)
1046 ("python-mock" ,python-mock)))
1047 (home-page "https://github.com/dbader/schedule")
1048 (synopsis "Schedule periodic function calls in Python")
1049 (description
1050 "Schedule is an in-process scheduler for periodic jobs that uses the
1051 builder pattern for configuration. Schedule lets you run Python functions (or
1052 any other callable) periodically at pre-determined intervals using a simple,
1053 human-friendly syntax.")
1054 (license license:expat)))
1055
1056 (define-public python2-schedule
1057 (package-with-python2 python-schedule))
1058
1059 (define-public python-pandas
1060 (package
1061 (name "python-pandas")
1062 (version "0.24.2")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pandas" version))
1067 (sha256
1068 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1069 (build-system python-build-system)
1070 (arguments
1071 `(#:modules ((guix build utils)
1072 (guix build python-build-system)
1073 (ice-9 ftw)
1074 (srfi srfi-26))
1075 #:phases (modify-phases %standard-phases
1076 (add-after 'unpack 'patch-which
1077 (lambda* (#:key inputs #:allow-other-keys)
1078 (let ((which (assoc-ref inputs "which")))
1079 (substitute* "pandas/io/clipboard/__init__.py"
1080 (("^CHECK_CMD = .*")
1081 (string-append "CHECK_CMD = \"" which "\"\n"))))
1082 #t))
1083 (replace 'check
1084 (lambda _
1085 (let ((build-directory
1086 (string-append
1087 (getcwd) "/build/"
1088 (car (scandir "build"
1089 (cut string-prefix? "lib." <>))))))
1090 ;; Disable the "strict data files" option which causes
1091 ;; the build to error out if required data files are
1092 ;; not available (as is the case with PyPI archives).
1093 (substitute* "setup.cfg"
1094 (("addopts = --strict-data-files") "addopts = "))
1095 (with-directory-excursion build-directory
1096 ;; Delete tests that require "moto" which is not yet
1097 ;; in Guix.
1098 (for-each delete-file
1099 '("pandas/tests/io/conftest.py"
1100 "pandas/tests/io/json/test_compression.py"
1101 "pandas/tests/io/parser/test_network.py"
1102 "pandas/tests/io/test_parquet.py"))
1103 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1104 "--skip-network" "-k"
1105 ;; XXX: Due to the deleted tests above.
1106 "not test_read_s3_jsonl"))))))))
1107 (propagated-inputs
1108 `(("python-numpy" ,python-numpy)
1109 ("python-openpyxl" ,python-openpyxl)
1110 ("python-pytz" ,python-pytz)
1111 ("python-dateutil" ,python-dateutil)
1112 ("python-xlrd" ,python-xlrd)))
1113 (inputs
1114 `(("which" ,which)))
1115 (native-inputs
1116 `(("python-cython" ,python-cython)
1117 ("python-beautifulsoup4" ,python-beautifulsoup4)
1118 ("python-lxml" ,python-lxml)
1119 ("python-html5lib" ,python-html5lib)
1120 ("python-nose" ,python-nose)
1121 ("python-pytest" ,python-pytest)
1122 ("python-pytest-mock" ,python-pytest-mock)))
1123 (home-page "https://pandas.pydata.org")
1124 (synopsis "Data structures for data analysis, time series, and statistics")
1125 (description
1126 "Pandas is a Python package providing fast, flexible, and expressive data
1127 structures designed to make working with structured (tabular,
1128 multidimensional, potentially heterogeneous) and time series data both easy
1129 and intuitive. It aims to be the fundamental high-level building block for
1130 doing practical, real world data analysis in Python.")
1131 (license license:bsd-3)))
1132
1133 (define-public python2-pandas
1134 (package-with-python2 python-pandas))
1135
1136 (define-public python2-mechanize
1137 (package
1138 (name "python2-mechanize")
1139 (version "0.2.5")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "mechanize" version))
1144 (sha256
1145 (base32
1146 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(#:python ,python-2 ; apparently incompatible with Python 3
1150 #:tests? #f))
1151 ;; test fails with message
1152 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1153 ;; (python-3.3.2) or
1154 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1155 ;; (python-2.7.5).
1156 ;; The source code is from March 2011 and probably not up-to-date
1157 ;; with respect to python unit tests.
1158 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1159 (synopsis
1160 "Stateful programmatic web browsing in Python")
1161 (description
1162 "Mechanize implements stateful programmatic web browsing in Python,
1163 after Andy Lester’s Perl module WWW::Mechanize.")
1164 (license (license:non-copyleft
1165 "file://COPYING"
1166 "See COPYING in the distribution."))))
1167
1168
1169 (define-public python-simplejson
1170 (package
1171 (name "python-simplejson")
1172 (version "3.14.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "simplejson" version))
1177 (sha256
1178 (base32
1179 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1180 (build-system python-build-system)
1181 (home-page "http://simplejson.readthedocs.org/en/latest/")
1182 (synopsis
1183 "Json library for Python")
1184 (description
1185 "JSON (JavaScript Object Notation) is a subset of JavaScript
1186 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1187 format.
1188
1189 Simplejson exposes an API familiar to users of the standard library marshal
1190 and pickle modules. It is the externally maintained version of the json
1191 library contained in Python 2.6, but maintains compatibility with Python 2.5
1192 and (currently) has significant performance advantages, even without using
1193 the optional C extension for speedups. Simplejson is also supported on
1194 Python 3.3+.")
1195 (license license:x11)))
1196
1197 (define-public python2-simplejson
1198 (package-with-python2 python-simplejson))
1199
1200
1201 (define-public python-pyicu
1202 (package
1203 (name "python-pyicu")
1204 (version "2.2")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (pypi-uri "PyICU" version))
1209 (sha256
1210 (base32
1211 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1212 (build-system python-build-system)
1213 (inputs
1214 `(("icu4c" ,icu4c)))
1215 (native-inputs
1216 `(("python-pytest" ,python-pytest)
1217 ("python-six" ,python-six)))
1218 (home-page "https://github.com/ovalhub/pyicu")
1219 (synopsis "Python extension wrapping the ICU C++ API")
1220 (description
1221 "PyICU is a python extension wrapping the ICU C++ API.")
1222 (properties `((python2-variant . ,(delay python2-pyicu))))
1223 (license license:x11)))
1224
1225 (define-public python2-pyicu
1226 (let ((base (package-with-python2
1227 (strip-python2-variant python-pyicu))))
1228 (package
1229 (inherit base)
1230 (arguments
1231 `(,@(package-arguments base)
1232 #:phases
1233 (modify-phases %standard-phases
1234 (add-before 'check 'delete-failing-test
1235 (λ _
1236 ;; XXX: This fails due to Unicode issues unique to Python 2,
1237 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1238 (delete-file "test/test_Script.py")
1239 #t))))))))
1240
1241 (define-public python2-dogtail
1242 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1243 ;; spaces in indentation" with Python 3.
1244 (package
1245 (name "python2-dogtail")
1246 (version "0.9.9")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (pypi-uri "dogtail" version))
1250 (sha256
1251 (base32
1252 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1253 (build-system python-build-system)
1254 (arguments `(#:python ,python-2
1255 #:tests? #f)) ; invalid command "test"
1256 ;; Currently no offical homepage.
1257 (home-page "https://pypi.python.org/pypi/dogtail/")
1258 (synopsis "GUI test tool and automation framework written in Python")
1259 (description
1260 "Dogtail is a GUI test tool and automation framework written in Python.
1261 It uses Accessibility (a11y) technologies to communicate with desktop
1262 applications. dogtail scripts are written in Python and executed like any
1263 other Python program.")
1264 (license license:gpl2+)))
1265
1266 (define-public python-empy
1267 (package
1268 (name "python-empy")
1269 (version "3.3.3")
1270 (source (origin
1271 (method url-fetch)
1272 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1273 version ".tar.gz"))
1274 (sha256
1275 (base32
1276 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1277 (build-system python-build-system)
1278 (arguments
1279 `(#:tests? #f)) ; python2 only
1280 (home-page "http://www.alcyone.com/software/empy/")
1281 (synopsis "Templating system for Python")
1282 (description
1283 "EmPy is a system for embedding Python expressions and statements in
1284 template text; it takes an EmPy source file, processes it, and produces
1285 output. This is accomplished via expansions, which are special signals to the
1286 EmPy system and are set off by a special prefix (by default the at sign, @@).
1287 EmPy can expand arbitrary Python expressions and statements in this way, as
1288 well as a variety of special forms. Textual data not explicitly delimited in
1289 this way is sent unaffected to the output, allowing Python to be used in
1290 effect as a markup language. Also supported are callbacks via hooks,
1291 recording and playback via diversions, and dynamic, chainable filters. The
1292 system is highly configurable via command line options and embedded
1293 commands.")
1294 (license license:lgpl2.1+)))
1295
1296 (define-public python2-empy
1297 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1298 (package
1299 (inherit base)
1300 (arguments `(,@(package-arguments base)
1301 #:tests? #t)))))
1302
1303 (define-public python2-element-tree
1304 (package
1305 (name "python2-element-tree")
1306 (version "1.2.6")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "http://effbot.org/media/downloads/elementtree-"
1311 version "-20050316.tar.gz"))
1312 (sha256
1313 (base32
1314 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:python ,python-2 ; seems to be part of Python 3
1318 #:tests? #f)) ; no 'test' sub-command
1319 (synopsis "Toolkit for XML processing in Python")
1320 (description
1321 "ElementTree is a Python library supporting lightweight XML processing.")
1322 (home-page "http://effbot.org/zone/element-index.htm")
1323 (license (license:x11-style
1324 "http://docs.python.org/2/license.html"
1325 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1326
1327 (define-public python2-pybugz
1328 (package
1329 (name "python2-pybugz")
1330 (version "0.6.11")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1335 version ".tar.gz"))
1336 (sha256
1337 (base32
1338 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1339 (patches (search-patches "pybugz-stty.patch"
1340 "pybugz-encode-error.patch"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:python ,python-2 ; SyntaxError with Python 3
1344 #:tests? #f)) ; no 'test' sub-command
1345 (propagated-inputs
1346 `(("element-tree" ,python2-element-tree)))
1347 (synopsis "Python and command-line interface to Bugzilla")
1348 (description
1349 "PyBugz is a Python library and command-line tool to query the Bugzilla
1350 bug tracking system. It is meant as an aid to speed up interaction with the
1351 bug tracker.")
1352 (home-page "http://www.liquidx.net/pybugz/")
1353 (license license:gpl2)))
1354
1355 (define-public python2-enum
1356 (package
1357 (name "python2-enum")
1358 (version "0.4.6")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "enum" version))
1362 (sha256
1363 (base32
1364 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2))
1368 (home-page "http://pypi.python.org/pypi/enum/")
1369 (synopsis "Robust enumerated type support in Python")
1370 (description
1371 "This provides a module for robust enumerations in Python. It has
1372 been superseded by the Python standard library and is provided only for
1373 compatibility.")
1374 ;; Choice of either license.
1375 (license (list license:gpl3+ license:psfl))))
1376
1377 (define-public python-enum34
1378 (package
1379 (name "python-enum34")
1380 (version "1.1.6")
1381 (source
1382 (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "enum34" version))
1385 (sha256
1386 (base32
1387 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1388 (build-system python-build-system)
1389 (home-page "https://pypi.python.org/pypi/enum34")
1390 (synopsis "Backported Python 3.4 Enum")
1391 (description
1392 "Enum34 is the new Python stdlib enum module available in Python 3.4
1393 backported for previous versions of Python from 2.4 to 3.3.")
1394 (license license:bsd-3)))
1395
1396 (define-public python2-enum34
1397 (package-with-python2 python-enum34))
1398
1399 (define-public python-parse-type
1400 (package
1401 (name "python-parse-type")
1402 (version "0.4.2")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "parse_type" version))
1407 (sha256
1408 (base32
1409 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1410 (build-system python-build-system)
1411 (propagated-inputs
1412 `(("python-six" ,python-six)
1413 ("python-parse" ,python-parse)))
1414 (native-inputs
1415 `(("python-pytest" ,python-pytest)
1416 ("python-pytest-runner" ,python-pytest-runner)))
1417 (home-page "https://github.com/jenisys/parse_type")
1418 (synopsis "Extended parse module")
1419 (description
1420 "Parse_type extends the python parse module.")
1421 (properties
1422 `((python2-variant . ,(delay python2-parse-type))))
1423 (license license:bsd-3)))
1424
1425 (define-public python2-parse-type
1426 (let ((base (package-with-python2
1427 (strip-python2-variant python-parse-type))))
1428 (package (inherit base)
1429 (propagated-inputs
1430 `(("python2-enum34" ,python2-enum34)
1431 ,@(package-propagated-inputs base))))))
1432
1433 (define-public python-parse
1434 (package
1435 (name "python-parse")
1436 (version "1.8.4")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (pypi-uri "parse" version))
1441 (sha256
1442 (base32
1443 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:phases
1447 (modify-phases %standard-phases
1448 (replace 'check
1449 (lambda _ (invoke "python" "test_parse.py"))))))
1450 (home-page "https://github.com/r1chardj0n3s/parse")
1451 (synopsis "Parse strings")
1452 (description
1453 "Parse strings using a specification based on the Python @code{format()}
1454 syntax.")
1455 (license license:x11)))
1456
1457 (define-public python-polib
1458 (package
1459 (name "python-polib")
1460 (version "1.0.8")
1461 (source (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "polib" version))
1464 (sha256
1465 (base32
1466 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1467 (build-system python-build-system)
1468 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1469 (synopsis "Manipulate, create and modify gettext files")
1470 (description "Polib can manipulate any gettext format (po, pot and mo)
1471 files. It can be used to create po files from scratch or to modify
1472 existing ones.")
1473 (license license:expat)))
1474
1475 (define-public python2-polib
1476 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1477 (package
1478 (inherit base)
1479 (arguments `(,@(package-arguments base)
1480 ;; Tests don't work with python2.
1481 #:tests? #f)))))
1482
1483 (define-public scons
1484 (package
1485 (name "scons")
1486 (version "3.0.4")
1487 (source (origin
1488 (method git-fetch)
1489 (uri (git-reference
1490 (url "https://github.com/SCons/scons.git")
1491 (commit version)))
1492 (file-name (git-file-name name version))
1493 (sha256
1494 (base32
1495 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1496 (build-system python-build-system)
1497 (arguments
1498 `(#:use-setuptools? #f ; still relies on distutils
1499 #:tests? #f ; no 'python setup.py test' command
1500 #:phases
1501 (modify-phases %standard-phases
1502 (add-before 'build 'bootstrap
1503 (lambda _
1504 (substitute* "src/engine/SCons/compat/__init__.py"
1505 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1506 "sys.modules[new] = __import__(old)"))
1507 (substitute* "src/engine/SCons/Platform/__init__.py"
1508 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1509 "mod = __import__(full_name)"))
1510 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1511 (chdir "build/scons")
1512 #t)))))
1513 (home-page "http://scons.org/")
1514 (synopsis "Software construction tool written in Python")
1515 (description
1516 "SCons is a software construction tool. Think of SCons as an improved,
1517 cross-platform substitute for the classic Make utility with integrated
1518 functionality similar to autoconf/automake and compiler caches such as ccache.
1519 In short, SCons is an easier, more reliable and faster way to build
1520 software.")
1521 (license license:x11)))
1522
1523 (define-public scons-python2
1524 (package
1525 (inherit (package-with-python2 scons))
1526 (name "scons-python2")))
1527
1528 (define-public python-extras
1529 (package
1530 (name "python-extras")
1531 (version "1.0.0")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "extras" version))
1536 (sha256
1537 (base32
1538 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1539 (build-system python-build-system)
1540 (arguments
1541 ;; FIXME: Circular dependency on testtools.
1542 '(#:tests? #f))
1543 (home-page "https://github.com/testing-cabal/extras")
1544 (synopsis "Useful extensions to the Python standard library")
1545 (description
1546 "Extras is a set of extensions to the Python standard library.")
1547 (license license:expat)))
1548
1549 (define-public python2-extras
1550 (package-with-python2 python-extras))
1551
1552 (define-public python-mimeparse
1553 (package
1554 (name "python-mimeparse")
1555 (version "1.6.0")
1556 (source
1557 (origin
1558 (method url-fetch)
1559 (uri (pypi-uri "python-mimeparse" version))
1560 (sha256
1561 (base32
1562 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1563 (build-system python-build-system)
1564 (arguments
1565 '(#:phases
1566 (modify-phases %standard-phases
1567 (replace 'check
1568 (lambda _
1569 (invoke "./mimeparse_test.py"))))))
1570 (home-page
1571 "https://github.com/dbtsai/python-mimeparse")
1572 (synopsis "Python library for parsing MIME types")
1573 (description
1574 "Mimeparse provides basic functions for parsing MIME type names and
1575 matching them against a list of media-ranges.")
1576 (license license:expat)))
1577
1578 (define-public python2-mimeparse
1579 (package-with-python2 python-mimeparse))
1580
1581 (define-public python-miniboa
1582 (package
1583 (name "python-miniboa")
1584 (version "1.0.7")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "miniboa" version))
1589 (sha256
1590 (base32
1591 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1592 (build-system python-build-system)
1593 (home-page "https://github.com/shmup/miniboa")
1594 (synopsis "Simple, single-threaded Telnet server")
1595 (description
1596 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1597 server.")
1598 (license license:asl2.0)))
1599
1600 (define-public python2-miniboa
1601 (package-with-python2 python-miniboa))
1602
1603 (define-public python-pafy
1604 (package
1605 (name "python-pafy")
1606 (version "0.5.3.1")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "pafy" version))
1611 (sha256
1612 (base32
1613 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1614 (build-system python-build-system)
1615 (arguments
1616 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1617 (propagated-inputs
1618 ;; Youtube-dl is a python package which is imported in the file
1619 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1620 `(("youtube-dl" ,youtube-dl)))
1621 (home-page "https://np1.github.io/pafy/")
1622 (synopsis "Retrieve YouTube content and metadata")
1623 (description
1624 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1625 (license license:lgpl3+)))
1626
1627 (define-public python2-funcsigs
1628 (package
1629 (name "python2-funcsigs")
1630 (version "1.0.2")
1631 (source (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "funcsigs" version))
1634 (sha256
1635 (base32
1636 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1637 (build-system python-build-system)
1638 (arguments
1639 `(#:python ,python-2))
1640 (native-inputs
1641 `(("python2-unittest2" ,python2-unittest2)))
1642 (home-page "http://funcsigs.readthedocs.org")
1643 (synopsis "Python function signatures from PEP362")
1644 (description
1645 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1646 (license license:asl2.0)))
1647
1648 (define-public python2-funcsigs-bootstrap
1649 (package
1650 (inherit python2-funcsigs)
1651 (name "python2-funcsigs-bootstrap")
1652 (native-inputs `())
1653 (arguments
1654 `(#:tests? #f
1655 ,@(package-arguments python2-funcsigs)))))
1656
1657 (define-public python-py
1658 (package
1659 (name "python-py")
1660 (version "1.5.4")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "py" version))
1665 (sha256
1666 (base32
1667 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1668 (build-system python-build-system)
1669 (arguments
1670 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1671 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1672 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1673 ;; Is this module globally installed?"
1674 '(#:tests? #f))
1675 (native-inputs
1676 `(("python-setuptools-scm" ,python-setuptools-scm)))
1677 (home-page "https://github.com/pytest-dev/py")
1678 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1679 (description
1680 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1681 code introspection, and logging.")
1682 (license license:expat)))
1683
1684 (define-public python2-py
1685 (package-with-python2 python-py))
1686
1687 ;; Recent versions of python-fixtures and python-testrepository need
1688 ;; python-pbr for packaging, which itself needs these two packages for
1689 ;; testing.
1690 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1691 ;; same source, just without any test dependencies and with tests disabled.
1692 ;; python-pbr-minmal is then used to package python-fixtures and
1693 ;; python-testrepository.
1694 ;; Strictly speaking we currently could remove the test-requirements from the
1695 ;; normal python-pbr package (and save this package) since test are disabled
1696 ;; there anyway. But this may change in future.
1697 (define-public python-pbr-minimal
1698 (package
1699 (name "python-pbr-minimal")
1700 (version "3.0.1")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "pbr" version))
1705 (sha256
1706 (base32
1707 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1708 (build-system python-build-system)
1709 (arguments
1710 `(#:tests? #f))
1711 (home-page "http://docs.openstack.org/developer/pbr/")
1712 (synopsis "Minimal build of python-pbr used for bootstrapping")
1713 (description
1714 "Used only for bootstrapping python2-pbr, you should not need this.")
1715 (license license:asl2.0)))
1716
1717 (define-public python2-pbr-minimal
1718 (package-with-python2 python-pbr-minimal))
1719
1720 (define-public python-pbr
1721 (package
1722 (inherit python-pbr-minimal)
1723 (name "python-pbr")
1724 (arguments
1725 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1726 (propagated-inputs
1727 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1728 (native-inputs
1729 `(("python-fixtures" ,python-fixtures-bootstrap)
1730 ;; discover, coverage, hacking, subunit
1731 ("python-mock" ,python-mock)
1732 ("python-six" ,python-six)
1733 ("python-sphinx" ,python-sphinx)
1734 ("python-testrepository" ,python-testrepository-bootstrap)
1735 ("python-testresources" ,python-testresources-bootstrap)
1736 ("python-testscenarios" ,python-testscenarios-bootstrap)
1737 ("python-testtools" ,python-testtools-bootstrap)
1738 ("python-virtualenv" ,python-virtualenv)))
1739 (synopsis "Enhance the default behavior of Python’s setuptools")
1740 (description
1741 "Python Build Reasonableness (PBR) is a library that injects some useful
1742 and sensible default behaviors into your setuptools run. It will set
1743 versions, process requirements files and generate AUTHORS and ChangeLog file
1744 from git information.
1745 ")))
1746
1747 (define-public python2-pbr
1748 (package-with-python2 python-pbr))
1749
1750 (define-public python-pyrsistent
1751 (package
1752 (name "python-pyrsistent")
1753 (version "0.14.11")
1754 (home-page "https://github.com/tobgu/pyrsistent")
1755 (source (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pyrsistent" version))
1758 (sha256
1759 (base32
1760 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1761 (build-system python-build-system)
1762 (native-inputs
1763 `(("python-hypothesis" ,python-hypothesis)
1764 ("python-pytest" ,python-pytest)
1765 ("python-pytest-runner" ,python-pytest-runner)))
1766 (propagated-inputs
1767 `(("python-six" ,python-six)))
1768 (synopsis "Persistent data structures for Python")
1769 (description
1770 "Pyrsistent is a number of persistent collections (by some referred to as
1771 functional data structures). Persistent in the sense that they are immutable.
1772
1773 All methods on a data structure that would normally mutate it instead return a
1774 new copy of the structure containing the requested updates. The original
1775 structure is left untouched.")
1776 (license license:expat)))
1777
1778 (define-public python2-pyrsistent
1779 (package-with-python2 python-pyrsistent))
1780
1781 (define-public python-exif-read
1782 (package
1783 (name "python-exif-read")
1784 (version "2.1.2")
1785 (source (origin
1786 (method url-fetch)
1787 (uri (pypi-uri "ExifRead" version))
1788 (sha256
1789 (base32
1790 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1791 (build-system python-build-system)
1792 (arguments `(#:tests? #f)) ; no tests
1793 (home-page "https://github.com/ianare/exif-py")
1794 (synopsis "Python library to extract EXIF data from image files")
1795 (description
1796 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1797 files.")
1798 (license license:bsd-3)))
1799
1800 (define-public python2-exif-read
1801 (package-with-python2 python-exif-read))
1802
1803 (define-public python-pyld
1804 (package
1805 (name "python-pyld")
1806 (version "1.0.3")
1807 (source (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "PyLD" version))
1810 (sha256
1811 (base32
1812 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1813 (build-system python-build-system)
1814 (home-page "https://github.com/digitalbazaar/pyld")
1815 (synopsis "Python implementation of the JSON-LD specification")
1816 (description
1817 "PyLD is an implementation of the JSON-LD specification.")
1818 (license license:bsd-3)))
1819
1820 (define-public python2-pyld
1821 (package-with-python2 python-pyld))
1822
1823 (define-public python-click
1824 (package
1825 (name "python-click")
1826 (version "7.0")
1827 (source
1828 (origin
1829 (method url-fetch)
1830 (uri (pypi-uri "click" version))
1831 (sha256
1832 (base32
1833 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1834 (build-system python-build-system)
1835 (arguments
1836 `(#:phases
1837 (modify-phases %standard-phases
1838 (add-after 'unpack 'fix-paths
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1841 "cross-libc" "libc"))))
1842 (substitute* "click/_unicodefun.py"
1843 (("'locale'")
1844 (string-append "'" glibc "/bin/locale'"))))
1845 #t))
1846 (replace 'check
1847 (lambda _
1848 (invoke "python" "-m" "pytest"))))))
1849 (native-inputs
1850 `(("python-pytest" ,python-pytest)))
1851 (home-page "https://palletsprojects.com/p/click/")
1852 (synopsis "Command line library for Python")
1853 (description
1854 "Click is a Python package for creating command line interfaces in a
1855 composable way with as little code as necessary. Its name stands for
1856 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1857 with sensible defaults out of the box.")
1858 (license license:bsd-3)))
1859
1860 (define-public python2-click
1861 (package-with-python2 python-click))
1862
1863 (define-public python-wheel
1864 (package
1865 (name "python-wheel")
1866 (version "0.32.3")
1867 (source
1868 (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "wheel" version))
1871 (sha256
1872 (base32
1873 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1874 (build-system python-build-system)
1875 (native-inputs
1876 `(("python-jsonschema" ,python-jsonschema)
1877 ("python-pytest-cov" ,python-pytest-cov)))
1878 (home-page "https://bitbucket.org/pypa/wheel/")
1879 (synopsis "Format for built Python packages")
1880 (description
1881 "A wheel is a ZIP-format archive with a specially formatted filename and
1882 the @code{.whl} extension. It is designed to contain all the files for a PEP
1883 376 compatible install in a way that is very close to the on-disk format. Many
1884 packages will be properly installed with only the @code{Unpack} step and the
1885 unpacked archive preserves enough information to @code{Spread} (copy data and
1886 scripts to their final locations) at any later time. Wheel files can be
1887 installed with a newer @code{pip} or with wheel's own command line utility.")
1888 (license license:expat)
1889 (properties `((python2-variant . ,(delay python2-wheel))))))
1890
1891 (define-public python2-wheel
1892 (let ((wheel (package-with-python2
1893 (strip-python2-variant python-wheel))))
1894 (package (inherit wheel)
1895 (native-inputs `(("python2-functools32" ,python2-functools32)
1896 ,@(package-native-inputs wheel))))))
1897
1898 (define-public python-vcversioner
1899 (package
1900 (name "python-vcversioner")
1901 (version "2.16.0.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "vcversioner" version))
1906 (sha256
1907 (base32
1908 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1909 (build-system python-build-system)
1910 (synopsis "Python library for version number discovery")
1911 (description "Vcversioner is a Python library that inspects tagging
1912 information in a variety of version control systems in order to discover
1913 version numbers.")
1914 (home-page "https://github.com/habnabit/vcversioner")
1915 (license license:isc)))
1916
1917 (define-public python2-vcversioner
1918 (package-with-python2 python-vcversioner))
1919
1920 (define-public python-jdcal
1921 (package
1922 (name "python-jdcal")
1923 (version "1.4")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (pypi-uri "jdcal" version))
1928 (sha256
1929 (base32
1930 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1931 (build-system python-build-system)
1932 (arguments
1933 `(#:phases (modify-phases %standard-phases
1934 (replace 'check
1935 (lambda _
1936 (invoke "pytest"))))))
1937 (native-inputs
1938 `(("python-pytest" ,python-pytest)))
1939 (home-page "https://github.com/phn/jdcal")
1940 (synopsis "Functions to convert between Julian dates Gregorian dates")
1941 (description "This Python library provides functions for converting
1942 between Julian dates and Gregorian dates.")
1943 (license license:bsd-2)))
1944
1945 (define-public python2-jdcal
1946 (package-with-python2 python-jdcal))
1947
1948 (define-public python-jsonschema
1949 (package
1950 (name "python-jsonschema")
1951 (version "3.0.1")
1952 (source (origin
1953 (method url-fetch)
1954 (uri (pypi-uri "jsonschema" version))
1955 (sha256
1956 (base32
1957 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1958 (build-system python-build-system)
1959 (arguments
1960 '(#:phases
1961 (modify-phases %standard-phases
1962 (replace 'check
1963 (lambda _
1964 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1965 (invoke "trial" "jsonschema"))))))
1966 (native-inputs
1967 `(("python-setuptools_scm" ,python-setuptools-scm)
1968 ("python-twisted" ,python-twisted)))
1969 (propagated-inputs
1970 `(("python-attrs" ,python-attrs)
1971 ("python-pyrsistent" ,python-pyrsistent)
1972 ("python-six" ,python-six)))
1973 (home-page "https://github.com/Julian/jsonschema")
1974 (synopsis "Implementation of JSON Schema for Python")
1975 (description
1976 "Jsonschema is an implementation of JSON Schema for Python.")
1977 (license license:expat)
1978 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1979
1980 (define-public python2-jsonschema
1981 (let ((jsonschema (package-with-python2
1982 (strip-python2-variant python-jsonschema))))
1983 (package (inherit jsonschema)
1984 (propagated-inputs
1985 `(("python2-functools32" ,python2-functools32)
1986 ,@(package-propagated-inputs jsonschema))))))
1987
1988 ;; This old version is still required by docker-compose as of 1.24.0.
1989 (define-public python-jsonschema-2.6
1990 (package
1991 (name "python-jsonschema")
1992 (version "2.6.0")
1993 (source (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "jsonschema" version))
1996 (sha256
1997 (base32
1998 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1999 (build-system python-build-system)
2000 (arguments
2001 '(#:phases
2002 (modify-phases %standard-phases
2003 (replace 'check (lambda _ (invoke "nosetests"))))))
2004 (native-inputs
2005 `(("python-nose" ,python-nose)
2006 ("python-vcversioner" ,python-vcversioner)))
2007 (home-page "https://github.com/Julian/jsonschema")
2008 (synopsis "Implementation of JSON Schema for Python")
2009 (description
2010 "Jsonschema is an implementation of JSON Schema for Python.")
2011 (license license:expat)
2012 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2013
2014 (define-public python-schema
2015 (package
2016 (name "python-schema")
2017 (version "0.6.6")
2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "schema" version))
2022 (sha256
2023 (base32
2024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2025 (build-system python-build-system)
2026 (native-inputs
2027 `(("python-pytest" ,python-pytest)))
2028 (home-page "https://github.com/keleshev/schema")
2029 (synopsis "Simple data validation library")
2030 (description
2031 "@code{python-schema} is a library for validating Python data
2032 structures, such as those obtained from config-files, forms, external
2033 services or command-line parsing, converted from JSON/YAML (or
2034 something else) to Python data-types.")
2035 (license license:psfl)))
2036
2037 (define-public python2-schema
2038 (package-with-python2 python-schema))
2039
2040 (define-public python-schema-0.5
2041 (package (inherit python-schema)
2042 (version "0.5.0")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "schema" version))
2047 (sha256
2048 (base32
2049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2050
2051 (define-public python2-schema-0.5
2052 (package-with-python2 python-schema-0.5))
2053
2054 (define-public python-kitchen
2055 (package
2056 (name "python-kitchen")
2057 (version "1.2.5")
2058 (source
2059 (origin
2060 (method url-fetch)
2061 (uri (pypi-uri "kitchen" version))
2062 (sha256
2063 (base32
2064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2065 (build-system python-build-system)
2066 (propagated-inputs
2067 `(("python-chardet" ,python-chardet)))
2068 (home-page "https://github.com/fedora-infra/kitchen")
2069 (synopsis "Python API for snippets")
2070 (description "@code{kitchen} module provides a python API for all sorts of
2071 little useful snippets of code that everybody ends up writing for their projects
2072 but never seem big enough to build an independent release. Use kitchen and stop
2073 cutting and pasting that code over and over.")
2074 (license (list license:lgpl2.1+
2075 ;; subprocess.py, test_subprocess.py,
2076 ;; kitchen/pycompat25/defaultdict.py:
2077 license:psfl))))
2078
2079 (define-public python2-kitchen
2080 (package-with-python2 python-kitchen))
2081
2082 (define-public python-unidecode
2083 (package
2084 (name "python-unidecode")
2085 (version "1.1.0")
2086 (source (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "Unidecode" version))
2089 (sha256
2090 (base32
2091 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2092 (build-system python-build-system)
2093 (home-page "https://pypi.python.org/pypi/Unidecode")
2094 (synopsis "ASCII transliterations of Unicode text")
2095 (description
2096 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2097 useful when integrating with legacy code that doesn't support Unicode, or for
2098 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2099 machine identifiers from human-readable Unicode strings that should still be
2100 somewhat intelligible.")
2101 (license license:gpl2+)))
2102
2103 (define-public python2-unidecode
2104 (package-with-python2 python-unidecode))
2105
2106 (define-public python-pyjwt
2107 (package
2108 (name "python-pyjwt")
2109 (version "1.5.3")
2110 (source
2111 (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "PyJWT" version))
2114 (sha256
2115 (base32
2116 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2117 (modules '((guix build utils)))
2118 (snippet
2119 '(begin
2120 (for-each delete-file-recursively
2121 (find-files "." "\\.pyc$"))
2122 #t))))
2123 (build-system python-build-system)
2124 (native-inputs
2125 `(("python-pytest" ,python-pytest)
2126 ("python-pytest-cov" ,python-pytest-cov)
2127 ("python-pytest-runner" ,python-pytest-runner)))
2128 (home-page "https://github.com/progrium/pyjwt")
2129 (synopsis "JSON Web Token implementation in Python")
2130 (description
2131 "PyJWT is a JSON Web Token implementation written in Python.")
2132 (license license:expat)))
2133
2134 (define-public python2-pyjwt
2135 (package-with-python2 python-pyjwt))
2136
2137 (define-public python-pykka
2138 (package
2139 (name "python-pykka")
2140 (version "1.2.1")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (pypi-uri "Pykka" version))
2145 (sha256
2146 (base32
2147 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2148 (build-system python-build-system)
2149 (native-inputs
2150 `(("python-mock" ,python-mock)
2151 ("python-nose" ,python-nose)
2152 ("python-gevent" ,python-gevent)
2153 ("python-eventlet" ,python-eventlet)))
2154 (home-page "https://www.pykka.org/")
2155 (synopsis "Pykka is a Python implementation of the actor model")
2156 (description
2157 "Pykka is a Python implementation of the actor model.
2158 The actor model introduces some simple rules to control the sharing
2159 of state and cooperation between execution units, which makes it
2160 easier to build concurrent applications.")
2161 (license license:asl2.0)))
2162
2163 (define-public python2-pykka
2164 (package-with-python2 python-pykka))
2165
2166 (define-public python-pymsgbox
2167 (package
2168 (name "python-pymsgbox")
2169 (version "1.0.6")
2170 (source
2171 (origin
2172 (method git-fetch)
2173 (uri (git-reference
2174 ;; LICENSE.txt is not present on pypi
2175 (url "https://github.com/asweigart/PyMsgBox")
2176 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2177 (file-name (git-file-name name version))
2178 (sha256
2179 (base32
2180 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2181 (arguments
2182 ;; Circular dependency to run tests:
2183 ;; Tests need pyautogui, which depends on pymsgbox.
2184 '(#:tests? #f))
2185 (build-system python-build-system)
2186 (home-page "https://github.com/asweigart/PyMsgBox")
2187 (synopsis "Python module for JavaScript-like message boxes")
2188 (description
2189 "PyMsgBox is a simple, cross-platform, pure Python module for
2190 JavaScript-like message boxes. Types of dialog boxes include:
2191 @enumerate
2192 @item alert
2193 @item confirm
2194 @item prompt
2195 @item password
2196 @end enumerate
2197 ")
2198 (license license:bsd-3)))
2199
2200 (define-public python-pympler
2201 (package
2202 (name "python-pympler")
2203 (home-page "https://pythonhosted.org/Pympler/")
2204 (version "0.5")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "Pympler" version))
2208 (sha256
2209 (base32
2210 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2211 (build-system python-build-system)
2212 (arguments
2213 `(#:phases (modify-phases %standard-phases
2214 (delete 'check)
2215 (add-after 'install 'check
2216 (lambda* (#:key inputs outputs #:allow-other-keys)
2217 (add-installed-pythonpath inputs outputs)
2218 (invoke "python" "setup.py" "test"))))))
2219 (synopsis "Measure, monitor and analyze memory behavior")
2220 (description
2221 "Pympler is a development tool to measure, monitor and analyze
2222 the memory behavior of Python objects in a running Python application.
2223
2224 By pympling a Python application, detailed insight in the size and the
2225 lifetime of Python objects can be obtained. Undesirable or unexpected
2226 runtime behavior like memory bloat and other @samp{pymples} can easily
2227 be identified.
2228
2229 A web profiling frontend exposes process statistics, garbage
2230 visualisation and class tracker statistics.")
2231 (license license:asl2.0)))
2232
2233 (define-public python2-pympler
2234 (package-with-python2 python-pympler))
2235
2236 (define-public python-itsdangerous
2237 (package
2238 (name "python-itsdangerous")
2239 (version "1.1.0")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (pypi-uri "itsdangerous" version))
2244 (sha256
2245 (base32
2246 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2247 (build-system python-build-system)
2248 (home-page "https://palletsprojects.com/p/itsdangerous/")
2249 (synopsis "Python library for passing data to/from untrusted environments")
2250 (description
2251 "Itsdangerous provides various helpers to pass trusted data to untrusted
2252 environments and back.")
2253 (license license:bsd-3)))
2254
2255 (define-public python2-itsdangerous
2256 (package-with-python2 python-itsdangerous))
2257
2258 (define-public python-pyyaml
2259 (package
2260 (name "python-pyyaml")
2261 (version "3.13")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "PyYAML" version))
2266 (sha256
2267 (base32
2268 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2269 (build-system python-build-system)
2270 (inputs
2271 `(("libyaml" ,libyaml)))
2272 (home-page "http://pyyaml.org/wiki/PyYAML")
2273 (synopsis "YAML parser and emitter for Python")
2274 (description
2275 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2276 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2277 API, and sensible error messages. PyYAML supports standard YAML tags and
2278 provides Python-specific tags that allow to represent an arbitrary Python
2279 object.")
2280 (license license:expat)))
2281
2282 (define-public python2-pyyaml
2283 (package-with-python2 python-pyyaml))
2284
2285 (define-public python-vine
2286 (package
2287 (name "python-vine")
2288 (version "1.1.4")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "vine" version))
2293 (sha256
2294 (base32
2295 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2296 (build-system python-build-system)
2297 (native-inputs
2298 `(("python-pytest" ,python-pytest)
2299 ("python-case" ,python-case)))
2300 (home-page "https://github.com/celery/vine")
2301 (synopsis "Promises for Python")
2302 (description
2303 "@code{vine} provides a special implementation of promises in that it can
2304 be used both for \"promise of a value\" and lazy evaluation. The biggest
2305 upside for this is that everything in a promise can also be a promise,
2306 e.g. filters, callbacks and errbacks can all be promises.")
2307 (license license:bsd-3)))
2308
2309 (define-public python-virtualenv
2310 (package
2311 (name "python-virtualenv")
2312 (version "16.1.0")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "virtualenv" version))
2317 (sha256
2318 (base32
2319 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2320 (build-system python-build-system)
2321 (arguments
2322 `(#:phases
2323 (modify-phases %standard-phases
2324 (add-before 'check 'disable-failing-test
2325 (lambda _
2326 ;; Disable failing test. See upstream bug report
2327 ;; https://github.com/pypa/virtualenv/issues/957
2328 (substitute* "tests/test_virtualenv.py"
2329 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2330 #t)))))
2331 (native-inputs
2332 `(("python-mock" ,python-mock)
2333 ("python-pytest" ,python-pytest)))
2334 (home-page "https://virtualenv.pypa.io/")
2335 (synopsis "Virtual Python environment builder")
2336 (description
2337 "Virtualenv is a tool to create isolated Python environments.")
2338 (license license:expat)))
2339
2340 (define-public python2-virtualenv
2341 (package-with-python2 python-virtualenv))
2342
2343 (define-public python-markupsafe
2344 (package
2345 (name "python-markupsafe")
2346 (version "1.1.1")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (pypi-uri "MarkupSafe" version))
2351 (sha256
2352 (base32
2353 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2354 (build-system python-build-system)
2355 (arguments
2356 `(#:modules ((ice-9 ftw)
2357 (srfi srfi-1)
2358 (srfi srfi-26)
2359 (guix build utils)
2360 (guix build python-build-system))
2361 #:phases (modify-phases %standard-phases
2362 (replace 'check
2363 (lambda _
2364 (let ((cwd (getcwd))
2365 (libdir (find (cut string-prefix? "lib." <>)
2366 (scandir "build"))))
2367 (setenv "PYTHONPATH"
2368 (string-append cwd "/build/" libdir ":"
2369 (getenv "PYTHONPATH")))
2370 (invoke "pytest" "-vv")))))))
2371 (native-inputs
2372 `(("python-pytest" ,python-pytest)))
2373 (home-page "https://github.com/mitsuhiko/markupsafe")
2374 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2375 (description
2376 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2377 for Python.")
2378 (license license:bsd-3)))
2379
2380 (define-public python2-markupsafe
2381 (package-with-python2 python-markupsafe))
2382
2383 (define-public python-jinja2
2384 (package
2385 (name "python-jinja2")
2386 (version "2.10.1")
2387 (source
2388 (origin
2389 (method url-fetch)
2390 (uri (pypi-uri "Jinja2" version))
2391 (sha256
2392 (base32
2393 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2394 (build-system python-build-system)
2395 (propagated-inputs
2396 `(("python-markupsafe" ,python-markupsafe)))
2397 (home-page "http://jinja.pocoo.org/")
2398 (synopsis "Python template engine")
2399 (description
2400 "Jinja2 is a small but fast and easy to use stand-alone template engine
2401 written in pure Python.")
2402 (license license:bsd-3)))
2403
2404 (define-public python2-jinja2
2405 (package-with-python2 python-jinja2))
2406
2407 (define-public python-pystache
2408 (package
2409 (name "python-pystache")
2410 (version "0.5.4")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "pystache" version))
2414 (sha256
2415 (base32
2416 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2417 (build-system python-build-system)
2418 (arguments
2419 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2420 (home-page "http://defunkt.io/pystache/")
2421 (synopsis "Python logic-less template engine")
2422 (description
2423 "Pystache is a Python implementation of the framework agnostic,
2424 logic-free templating system Mustache.")
2425 (license license:expat)
2426 (properties `((python2-variant . ,(delay python2-pystache))))))
2427
2428 (define-public python2-pystache
2429 (package (inherit (package-with-python2
2430 (strip-python2-variant python-pystache)))
2431 (arguments
2432 `(#:python ,python-2
2433 #:phases
2434 (modify-phases %standard-phases
2435 (replace 'check
2436 (lambda _
2437 (invoke "python" "test_pystache.py"))))))))
2438
2439 (define-public python-joblib
2440 (package
2441 (name "python-joblib")
2442 (version "0.13.0")
2443 (source (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "joblib" version))
2446 (sha256
2447 (base32
2448 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2449 (build-system python-build-system)
2450 (arguments
2451 `(#:phases
2452 (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2455 (native-inputs
2456 `(("python-pytest" ,python-pytest)))
2457 (home-page "https://joblib.readthedocs.io/")
2458 (synopsis "Using Python functions as pipeline jobs")
2459 (description
2460 "Joblib is a set of tools to provide lightweight pipelining in Python.
2461 In particular, joblib offers: transparent disk-caching of the output values
2462 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2463 logging and tracing of the execution.")
2464 (license license:bsd-3)))
2465
2466 (define-public python2-joblib
2467 (package-with-python2 python-joblib))
2468
2469 (define-public python-daemon
2470 (package
2471 (name "python-daemon")
2472 (version "2.2.3")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "python-daemon" version))
2477 (sha256
2478 (base32
2479 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2480 (build-system python-build-system)
2481 (arguments
2482 `(#:phases
2483 (modify-phases %standard-phases
2484 (add-before 'check 'disable-tests
2485 (lambda _
2486 ;; FIXME: Determine why test fails
2487 (substitute* "test/test_daemon.py"
2488 (("test_detaches_process_context")
2489 "skip_test_detaches_process_context"))
2490 #t)))))
2491 (propagated-inputs
2492 `(("python-lockfile" ,python-lockfile)))
2493 (native-inputs
2494 `(("python-unittest2" ,python-unittest2)
2495 ("python-testtools" ,python-testtools)
2496 ("python-testscenarios" ,python-testscenarios)
2497 ("python-mock" ,python-mock)
2498 ("python-docutils" ,python-docutils)))
2499 (home-page "https://pagure.io/python-daemon/")
2500 (synopsis "Python library for making a Unix daemon process")
2501 (description "Python-daemon is a library that assists a Python program to
2502 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2503
2504 This library provides a @code{DaemonContext} class that manages the following
2505 important tasks for becoming a daemon process:
2506 @enumerate
2507 @item Detach the process into its own process group.
2508 @item Set process environment appropriate for running inside a chroot.
2509 @item Renounce suid and sgid privileges.
2510 @item Close all open file descriptors.
2511 @item Change the working directory, uid, gid, and umask.
2512 @item Set appropriate signal handlers.
2513 @item Open new file descriptors for stdin, stdout, and stderr.
2514 @item Manage a specified PID lock file.
2515 @item Register cleanup functions for at-exit processing.
2516 @end enumerate")
2517 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2518 (license (list license:asl2.0 license:gpl3+))))
2519
2520 (define-public python-docutils
2521 (package
2522 (name "python-docutils")
2523 (version "0.14")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "docutils" version))
2528 (sha256
2529 (base32
2530 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2531 (build-system python-build-system)
2532 (arguments
2533 '(#:tests? #f)) ; no setup.py test command
2534 (home-page "http://docutils.sourceforge.net/")
2535 (synopsis "Python Documentation Utilities")
2536 (description
2537 "Docutils is a modular system for processing documentation into useful
2538 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2539 reStructuredText.")
2540 ;; Most of the source code is public domain, but some source files are
2541 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2542 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2543
2544 (define-public python2-docutils
2545 (package-with-python2 python-docutils))
2546
2547 (define-public python-pygments
2548 (package
2549 (name "python-pygments")
2550 (version "2.4.2")
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "Pygments" version))
2555 (sha256
2556 (base32
2557 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2558 (build-system python-build-system)
2559 (arguments
2560 ;; FIXME: Tests require sphinx, which depends on this.
2561 '(#:tests? #f))
2562 (home-page "http://pygments.org/")
2563 (synopsis "Syntax highlighting")
2564 (description
2565 "Pygments is a syntax highlighting package written in Python.")
2566 (license license:bsd-2)))
2567
2568 (define-public python2-pygments
2569 (package-with-python2 python-pygments))
2570
2571 (define-public python-bumpversion
2572 (package
2573 (name "python-bumpversion")
2574 (version "0.5.3")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "bumpversion" version))
2579 (sha256
2580 (base32
2581 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2582 (build-system python-build-system)
2583 (home-page "https://github.com/peritus/bumpversion")
2584 (synopsis "Tool to bump software version")
2585 (description "This tool provides a command-line interface (CLI) to bump a
2586 software version simply.")
2587 (license license:expat)))
2588
2589 (define-public python-deprecated
2590 (package
2591 (name "python-deprecated")
2592 (version "1.2.5")
2593 (source
2594 (origin
2595 (method git-fetch)
2596 (uri (git-reference
2597 (url "https://github.com/tantale/deprecated.git")
2598 (commit (string-append "v" version))))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2603 (build-system python-build-system)
2604 (arguments
2605 `(#:phases (modify-phases %standard-phases
2606 (replace 'check
2607 (lambda _
2608 (invoke "pytest"))))))
2609 (propagated-inputs
2610 `(("python-wrapt" ,python-wrapt)))
2611 (native-inputs
2612 `(("python-bumpversion" ,python-bumpversion)
2613 ("python-pytest" ,python-pytest)
2614 ("python-pytest-cov" ,python-pytest-cov)
2615 ("python-sphinx" ,python-sphinx)
2616 ("python-tox" ,python-tox)))
2617 (home-page "https://github.com/tantale/deprecated")
2618 (synopsis "Python decorator to deprecate classes, functions or methods")
2619 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2620 to deprecate classes, functions or methods.")
2621 (license license:expat)))
2622
2623 (define-public python-pygithub
2624 (package
2625 (name "python-pygithub")
2626 (version "1.43.7")
2627 (source
2628 ;; We fetch from the Git repo because there are no tests in the PyPI
2629 ;; archive.
2630 (origin
2631 (method git-fetch)
2632 (uri (git-reference
2633 (url "https://github.com/PyGithub/PyGithub.git")
2634 (commit (string-append "v" version))))
2635 (file-name (git-file-name name version))
2636 (sha256
2637 (base32
2638 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2639 (build-system python-build-system)
2640 (arguments
2641 `(#:phases (modify-phases %standard-phases
2642 ;; Some tests rely on the network.
2643 (add-after 'unpack 'disable-failing-tests
2644 (lambda _
2645 (substitute* "tests/Issue142.py"
2646 (("testDecodeJson") "disabled_testDecodeJson"))
2647 #t))
2648 (add-before 'check 'prepare-for-tests
2649 (lambda _
2650 (for-each (lambda (f)
2651 (chmod f #o666))
2652 (find-files "./tests"))
2653 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2654 (setenv "PYTHONPATH"
2655 (string-append "./tests:" (getenv "PYTHONPATH")))
2656 #t)))))
2657 (propagated-inputs
2658 `(("python-deprecated" ,python-deprecated)
2659 ("python-pyjwt" ,python-pyjwt)
2660 ("python-requests" ,python-requests)))
2661 (native-inputs `(("python-httpretty" ,python-httpretty)))
2662 (home-page "https://pygithub.readthedocs.io/en/latest/")
2663 (synopsis "Python library for the GitHub API")
2664 (description "This library allows managing GitHub resources such as
2665 repositories, user profiles, and organizations in your Python applications,
2666 using version 3 of the GitHub application programming interface (API).")
2667 (license license:lgpl3+)))
2668
2669 (define-public python-rellu
2670 (package
2671 (name "python-rellu")
2672 (version "0.7")
2673 (source
2674 (origin
2675 (method url-fetch)
2676 (uri (pypi-uri "rellu" version))
2677 (sha256
2678 (base32
2679 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2680 (build-system python-build-system)
2681 (propagated-inputs
2682 `(("python-invoke" ,python-invoke)
2683 ("python-pygithub" ,python-pygithub)))
2684 (home-page "https://github.com/robotframework/rellu")
2685 (synopsis "Utilities to create PyPI releases")
2686 (description "This collection of utilities contains tooling and templates
2687 to assist in creating releases on GitHub and publishing them on PyPI. It is
2688 designed to be used by Robot Framework and tools and libraries in its
2689 ecosystem, but can naturally be used also by other projects.")
2690 (license license:asl2.0)))
2691
2692 (define-public python-robotframework
2693 (package
2694 (name "python-robotframework")
2695 (version "3.1.2")
2696 ;; There are no tests in the PyPI archive.
2697 (source
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/robotframework/robotframework.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2704 (sha256
2705 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2706 (patches (search-patches
2707 "python-robotframework-honor-source-date-epoch.patch"))))
2708 (build-system python-build-system)
2709 (arguments
2710 `(#:phases (modify-phases %standard-phases
2711 (add-before 'build 'build-and-install-doc
2712 (lambda* (#:key outputs #:allow-other-keys)
2713 (let* ((doc-output (assoc-ref outputs "doc"))
2714 (doc (string-append doc-output "/share/"
2715 ,name "-" ,version "/")))
2716 (invoke "invoke" "library-docs" "all")
2717 (mkdir-p doc)
2718 (copy-recursively "doc/libraries"
2719 (string-append doc "/libraries"))
2720 #t)))
2721 (replace 'check
2722 (lambda _
2723 (invoke "python" "utest/run.py"))))))
2724 (native-inputs
2725 `(("python-invoke" ,python-invoke)
2726 ("python-rellu" ,python-rellu)
2727 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2728 (outputs '("out" "doc"))
2729 (home-page "https://robotframework.org")
2730 (synopsis "Generic automation framework")
2731 (description "Robot Framework is a generic automation framework for
2732 acceptance testing, acceptance test driven development (ATDD), and robotic
2733 process automation (RPA).")
2734 (license license:asl2.0)))
2735
2736 (define-public python-robotframework-lint
2737 ;; There is no properly tagged release; the commit below seems to correspond
2738 ;; to the 0.9 stable release available from PyPI. The tests are not
2739 ;; included in the PyPI archive, so we fetch the sources from the upstream
2740 ;; Git repo.
2741 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2742 (revision "1"))
2743 (package
2744 (name "python-robotframework-lint")
2745 (version (git-version "0.9.0" revision commit))
2746 (source
2747 (origin
2748 (method git-fetch)
2749 (uri (git-reference
2750 (url "https://github.com/boakley/robotframework-lint.git")
2751 (commit commit)))
2752 (file-name (git-file-name name version))
2753 (sha256
2754 (base32
2755 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2756 (build-system python-build-system)
2757 (arguments
2758 `(#:phases
2759 (modify-phases %standard-phases
2760 (replace 'check
2761 (lambda _
2762 (invoke "python" "-m" "robot" "-A"
2763 "tests/conf/default.args" "tests"))))))
2764 (propagated-inputs
2765 `(("python-robotframework" ,python-robotframework)))
2766 (home-page "https://github.com/boakley/robotframework-lint/")
2767 (synopsis "Static analysis tool (linter) for Robot Framework")
2768 (description "This package provides the @code{rflint} command-line
2769 utility, a static analysis tool (linter) for Robot Framework source files.")
2770 (license license:asl2.0))))
2771
2772 (define-public python-robotframework-sshlibrary
2773 (package
2774 (name "python-robotframework-sshlibrary")
2775 (version "3.3.0")
2776 ;; There are no tests in the PyPI archive.
2777 (source
2778 (origin
2779 (method git-fetch)
2780 (uri (git-reference
2781 (url "https://github.com/robotframework/SSHLibrary.git")
2782 (commit (string-append "v" version))))
2783 (file-name (git-file-name name version))
2784 (sha256
2785 (base32
2786 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2787 (build-system python-build-system)
2788 (arguments
2789 `(#:phases
2790 (modify-phases %standard-phases
2791 (add-before 'build 'build-and-install-doc
2792 (lambda* (#:key outputs #:allow-other-keys)
2793 (let* ((doc-output (assoc-ref outputs "doc"))
2794 (doc (string-append doc-output "/share/"
2795 ,name "-" ,version "/")))
2796 (invoke "chmod" "-R" "+w" "docs")
2797 (invoke "invoke" "kw-docs" "project-docs")
2798 (mkdir-p doc)
2799 (for-each delete-file (find-files "docs" "\\.rst"))
2800 (copy-recursively "docs" doc)
2801 #t)))
2802 (replace 'check
2803 (lambda _
2804 ;; Some tests require an SSH server; we remove them.
2805 (delete-file "utest/test_client_api.py")
2806 (delete-file "utest/test_scp.py")
2807 (invoke "python" "utest/run.py"))))))
2808 (propagated-inputs
2809 `(("python-robotframework" ,python-robotframework)
2810 ("python-paramiko" ,python-paramiko)
2811 ("python-scp" ,python-scp)))
2812 (native-inputs
2813 `(("openssh" ,openssh)
2814 ("which" ,which)
2815 ;; To generate the documentation
2816 ("python-docutils" ,python-docutils)
2817 ("python-invoke" ,python-invoke)
2818 ("python-pygments" ,python-pygments)
2819 ("python-rellu" ,python-rellu)))
2820 (outputs '("out" "doc"))
2821 (home-page "https://github.com/robotframework/SSHLibrary")
2822 (synopsis "Robot Framework library for SSH and SFTP")
2823 (description "SSHLibrary is a Robot Framework library providing support
2824 for SSH and SFTP. It has the following main usages:
2825 @itemize @bullet
2826 @item Executing commands on the remote machine, either blocking or non-blocking.
2827 @item Writing and reading in an interactive shell.
2828 @item Transferring files and directories over SFTP.
2829 @item Ensuring that files and directories exist on the remote machine.
2830 @end itemize")
2831 (license license:asl2.0)))
2832
2833 (define-public python-scp
2834 (package
2835 (name "python-scp")
2836 (version "0.13.2")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "scp" version))
2841 (sha256
2842 (base32
2843 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2844 (build-system python-build-system)
2845 (arguments
2846 '(#:tests? #f)) ;tests require an SSH server
2847 (propagated-inputs
2848 `(("python-paramiko" ,python-paramiko)))
2849 (home-page "https://github.com/jbardin/scp.py")
2850 (synopsis "SCP protocol module for Python and Paramiko")
2851 (description "The scp module extends the Paramiko library to send and
2852 receive files via the SCP1 protocol, as implemented by the OpenSSH
2853 @command{scp} program.")
2854 (license license:gpl2+)))
2855
2856 (define-public python-rst.linker
2857 (package
2858 (name "python-rst.linker")
2859 (version "1.10")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "rst.linker" version))
2864 (sha256
2865 (base32
2866 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2867 (build-system python-build-system)
2868 (propagated-inputs
2869 `(("python-dateutil" ,python-dateutil)
2870 ("python-six" ,python-six)))
2871 (native-inputs
2872 `(("python-setuptools-scm" ,python-setuptools-scm)))
2873 ;; Test would require path.py, which would introduce a cyclic dependence.
2874 (arguments `(#:tests? #f))
2875 ;; Note: As of version 1.7 the documentation is not worth building.
2876 (home-page "https://github.com/jaraco/rst.linker")
2877 (synopsis "Sphinx plugin to add links and timestamps")
2878 (description "rst.linker allows to automatically replace text by a
2879 reStructuredText external reference or timestamps. It's primary purpose is to
2880 augment the changelog, but it can be used for other documents, too.")
2881 (license license:expat)))
2882
2883 (define-public python2-rst.linker
2884 (package-with-python2 python-rst.linker))
2885
2886 (define-public python-feedgenerator
2887 (package
2888 (name "python-feedgenerator")
2889 (version "1.9")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "feedgenerator" version))
2894 (sha256
2895 (base32
2896 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2897 (modules '((guix build utils)))
2898 (snippet
2899 '(begin
2900 ;; Remove pre-compiled .pyc files from source.
2901 (for-each delete-file-recursively
2902 (find-files "." "__pycache__" #:directories? #t))
2903 (for-each delete-file (find-files "." "\\.pyc$"))
2904 #t))))
2905 (build-system python-build-system)
2906 (propagated-inputs
2907 `(("python-pytz" ,python-pytz)
2908 ("python-six" ,python-six)))
2909 (home-page "https://github.com/getpelican/feedgenerator")
2910 (synopsis
2911 "Standalone version of Django's Atom/RSS feed generator")
2912 (description
2913 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2914 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2915 (license license:bsd-3)))
2916
2917 (define-public python2-feedgenerator
2918 (package-with-python2 python-feedgenerator))
2919
2920 (define-public python-toml
2921 (package
2922 (name "python-toml")
2923 (version "0.9.4")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "toml" version))
2928 (sha256
2929 (base32
2930 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2931 (build-system python-build-system)
2932 (arguments
2933 `(#:tests? #f)) ;no tests suite in release
2934 (home-page "https://github.com/uiri/toml")
2935 (synopsis "Library for TOML")
2936 (description
2937 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2938 Language (TOML) configuration files.")
2939 (license license:expat)))
2940
2941 (define-public python-jsonrpc-server
2942 (package
2943 (name "python-jsonrpc-server")
2944 (version "0.1.2")
2945 (source
2946 (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "python-jsonrpc-server" version))
2949 (sha256
2950 (base32
2951 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2952 (build-system python-build-system)
2953 (propagated-inputs
2954 `(("python-future" ,python-future)
2955 ("python-mock" ,python-mock)
2956 ("python-pytest" ,python-pytest)))
2957 (home-page
2958 "https://github.com/palantir/python-jsonrpc-server")
2959 (synopsis "JSON RPC 2.0 server library")
2960 (description
2961 "This package provides a JSON RPC 2.0 server library for Python.")
2962 (license license:expat)))
2963
2964 (define-public python-pydocstyle
2965 (package
2966 (name "python-pydocstyle")
2967 (version "3.0.0")
2968 (source
2969 (origin
2970 (method url-fetch)
2971 (uri (pypi-uri "pydocstyle" version))
2972 (sha256
2973 (base32
2974 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2975 (build-system python-build-system)
2976 (propagated-inputs
2977 `(("python-six" ,python-six)
2978 ("python-snowballstemmer" ,python-snowballstemmer)))
2979 (home-page
2980 "https://github.com/PyCQA/pydocstyle/")
2981 (synopsis "Python docstring style checker")
2982 (description
2983 "This package provides a style checker for the Python Language
2984 Server (PLS).")
2985 (license license:expat)))
2986
2987 ;; XXX: We must use a non-release version since the latest release version
2988 ;; requires python-jedi version < 0.15.
2989 (define-public python-language-server
2990 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
2991 (revision "1"))
2992 (package
2993 (name "python-language-server")
2994 (version (git-version "0.28.3" revision commit))
2995 (source
2996 (origin
2997 (method git-fetch)
2998 (uri (git-reference
2999 (url "https://github.com/palantir/python-language-server.git")
3000 (commit commit)))
3001 (sha256
3002 (base32
3003 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3004 (build-system python-build-system)
3005 (propagated-inputs
3006 `(("python-pluggy" ,python-pluggy)
3007 ("python-jsonrpc-server" ,python-jsonrpc-server)
3008 ("python-jedi" ,python-jedi)
3009 ("python-yapf" ,python-yapf)
3010 ("python-pyflakes" ,python-pyflakes)
3011 ("python-pydocstyle" ,python-pydocstyle)
3012 ("python-pycodestyle" ,python-pycodestyle)
3013 ("python-mccabe" ,python-mccabe)
3014 ("python-rope" ,python-rope)
3015 ("python-autopep8" ,python-autopep8)
3016 ("python-pylint" ,python-pylint)))
3017 (home-page "https://github.com/palantir/python-language-server")
3018 (synopsis "Python implementation of the Language Server Protocol")
3019 (description
3020 "The Python Language Server (pyls) is an implementation of the Python 3
3021 language specification for the Language Server Protocol (LSP). This tool is
3022 used in text editing environments to provide a complete and integrated
3023 feature-set for programming Python effectively.")
3024 (license license:expat))))
3025
3026 (define-public python-black
3027 (package
3028 (name "python-black")
3029 (version "18.6b4")
3030 (source
3031 (origin
3032 (method url-fetch)
3033 (uri (pypi-uri "black" version))
3034 (sha256
3035 (base32
3036 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3037 (build-system python-build-system)
3038 (arguments
3039 `(#:phases
3040 (modify-phases %standard-phases
3041 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3042 (lambda _
3043 (let ((python3 (which "python3")))
3044 (substitute* '("tests/data/fmtonoff.py"
3045 "tests/data/string_prefixes.py"
3046 "tests/data/function.py")
3047 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3048 (string-append "#!" python3 (if (string? minor-version)
3049 minor-version
3050 ""))))))))))
3051 (propagated-inputs
3052 `(("python-click" ,python-click)
3053 ("python-attrs" ,python-attrs)
3054 ("python-appdirs" ,python-appdirs)
3055 ("python-toml" ,python-toml)))
3056 (home-page "https://github.com/ambv/black")
3057 (synopsis "The uncompromising code formatter")
3058 (description "Black is the uncompromising Python code formatter.")
3059 (license license:expat)))
3060
3061 (define-public python-blinker
3062 (package
3063 (name "python-blinker")
3064 (version "1.4")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "blinker" version))
3069 (sha256
3070 (base32
3071 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3072 (build-system python-build-system)
3073 (home-page "http://pythonhosted.org/blinker/")
3074 (synopsis "Fast, simple object-to-object and broadcast signaling")
3075 (description
3076 "Blinker provides a fast dispatching system that allows any number of
3077 interested parties to subscribe to events, or \"signals\".")
3078 (license license:expat)))
3079
3080 (define-public python2-blinker
3081 (package-with-python2 python-blinker))
3082
3083 (define-public pelican
3084 (package
3085 (name "pelican")
3086 (version "4.0.1")
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "pelican" version))
3091 (sha256
3092 (base32
3093 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3094 (build-system python-build-system)
3095 (propagated-inputs
3096 `(("python-feedgenerator" ,python-feedgenerator)
3097 ("python-jinja2" ,python-jinja2)
3098 ("python-pygments" ,python-pygments)
3099 ("python-docutils" ,python-docutils)
3100 ("python-pytz" ,python-pytz)
3101 ("python-blinker" ,python-blinker)
3102 ("python-unidecode" ,python-unidecode)
3103 ("python-six" ,python-six)
3104 ("python-dateutil" ,python-dateutil)
3105 ("python-markdown" ,python-markdown)))
3106 (home-page "https://getpelican.com/")
3107 (arguments
3108 `(;; XXX Requires a lot more packages to do unit tests :P
3109 #:tests? #f
3110 #:phases (modify-phases %standard-phases
3111 (add-before
3112 'install 'adjust-requires
3113 ;; Since feedgenerator is installed from git, it doesn't
3114 ;; conform to the version requirements.
3115 ;;
3116 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3117 ;; version requirement so setuptools doesn't get confused.
3118 (lambda _
3119 (substitute* "setup.py"
3120 (("['\"]feedgenerator.*?['\"]")
3121 "'feedgenerator'")))))))
3122 (synopsis "Python-based static site publishing system")
3123 (description
3124 "Pelican is a tool to generate a static blog from reStructuredText,
3125 Markdown input files, and more. Pelican uses Jinja2 for templating
3126 and is very extensible.")
3127 (license license:agpl3+)))
3128
3129 (define-public mallard-ducktype
3130 (package
3131 (name "mallard-ducktype")
3132 (version "1.0.2")
3133 (source
3134 (origin
3135 (method git-fetch)
3136 ;; git-reference because tests are not included in pypi source tarball
3137 ;; https://issues.guix.gnu.org/issue/36755#2
3138 (uri (git-reference
3139 (url "https://github.com/projectmallard/mallard-ducktype.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
3144 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3145 (build-system python-build-system)
3146 (arguments
3147 '(#:phases
3148 (modify-phases %standard-phases
3149 (replace 'check
3150 (lambda _
3151 (with-directory-excursion "tests"
3152 (invoke "sh" "runtests")))))))
3153 (home-page "http://projectmallard.org")
3154 (synopsis "Convert Ducktype to Mallard documentation markup")
3155 (description
3156 "Ducktype is a lightweight syntax that can represent all the semantics
3157 of the Mallard XML documentation system. Ducktype files can be converted to
3158 Mallard using the @command{ducktype} tool. The yelp-tools package
3159 provides additional functionality on the produced Mallard documents.")
3160 (license license:expat)))
3161
3162 (define-public python-scikit-image
3163 (package
3164 (name "python-scikit-image")
3165 (version "0.14.2")
3166 (source
3167 (origin
3168 (method url-fetch)
3169 (uri (pypi-uri "scikit-image" version))
3170 (sha256
3171 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3172 (build-system python-build-system)
3173 (arguments
3174 ;; TODO: Some tests require running X11 server. Disable them?
3175 '(#:tests? #f))
3176 ;; See DEPENDS.txt for the list of build and run time requiremnts
3177 (propagated-inputs
3178 `(("python-cloudpickle" ,python-cloudpickle)
3179 ("python-dask" ,python-dask)
3180 ("python-matplotlib" ,python-matplotlib)
3181 ("python-networkx" ,python-networkx)
3182 ("python-numpy" ,python-numpy)
3183 ("python-pillow" ,python-pillow)
3184 ("python-pywavelets" ,python-pywavelets)
3185 ("python-scipy" ,python-scipy)
3186 ("python-six" ,python-six)))
3187 (native-inputs
3188 `(("python-cython" ,python-cython)))
3189 (home-page "http://scikit-image.org/")
3190 (synopsis "Image processing in Python")
3191 (description
3192 "Scikit-image is a collection of algorithms for image processing.")
3193 (license license:bsd-3)))
3194
3195 (define-public python2-scikit-image
3196 (package-with-python2 python-scikit-image))
3197
3198 (define-public python-cython
3199 (package
3200 (name "python-cython")
3201 (version "0.29.13")
3202 (source
3203 (origin
3204 (method url-fetch)
3205 (uri (pypi-uri "Cython" version))
3206 (sha256
3207 (base32
3208 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3209 (build-system python-build-system)
3210 ;; we need the full python package and not just the python-wrapper
3211 ;; because we need libpython3.3m.so
3212 (inputs
3213 `(("python" ,python)))
3214 (arguments
3215 `(#:phases
3216 (modify-phases %standard-phases
3217 (add-before 'check 'set-HOME
3218 ;; some tests require access to "$HOME/.cython"
3219 (lambda _ (setenv "HOME" "/tmp") #t))
3220
3221 ;; FIXME: These tests started failing on armhf after the 0.28 update
3222 ;; (commit c69d11c5930), both with an error such as this:
3223 ;; compiling (cpp) and running dictcomp ...
3224 ;; === C/C++ compiler error output: ===
3225 ;; ‘
3226 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3227 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3228 ,@(if (target-arm32?)
3229 `((add-before 'check 'disable-failing-tests
3230 (lambda _
3231 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3232 (for-each (lambda (test)
3233 (format disabled-tests "~a\n" test))
3234 '("memslice" "dictcomp"))
3235 (close-port disabled-tests)))))
3236 '())
3237
3238 (replace 'check
3239 (lambda _
3240 ;; Disable compiler optimizations to greatly reduce the running
3241 ;; time of the test suite.
3242 (setenv "CFLAGS" "-O0")
3243
3244 (invoke "python" "runtests.py" "-vv"
3245 "-j" (number->string (parallel-job-count))))))))
3246 (home-page "https://cython.org/")
3247 (synopsis "C extensions for Python")
3248 (description "Cython is an optimising static compiler for both the Python
3249 programming language and the extended Cython programming language. It makes
3250 writing C extensions for Python as easy as Python itself.")
3251 (license license:asl2.0)
3252 (properties `((python2-variant . ,(delay python2-cython))))))
3253
3254 (define-public python2-cython
3255 (package (inherit (package-with-python2
3256 (strip-python2-variant python-cython)))
3257 (name "python2-cython")
3258 (inputs
3259 `(("python-2" ,python-2))))) ; this is not automatically changed
3260
3261 ;; The RPython toolchain currently does not support Python 3.
3262 (define-public python2-rpython
3263 (package
3264 (name "python2-rpython")
3265 (version "0.2.1")
3266 (source
3267 (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "rpython" version))
3270 (sha256
3271 (base32
3272 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3273 (build-system python-build-system)
3274 (arguments `(#:python ,python-2))
3275 (native-inputs
3276 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3277 (home-page "https://rpython.readthedocs.org")
3278 (synopsis "Framework for implementing interpreters and virtual machines")
3279 (description "RPython is a translation and support framework for
3280 producing implementations of dynamic languages, emphasizing a clean separation
3281 between language specification and implementation aspects.")
3282 (license license:expat)))
3283
3284 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3285 ;; python-scipy still build, as these three packages are often used together.
3286 (define-public python-numpy
3287 (package
3288 (name "python-numpy")
3289 (version "1.15.4")
3290 (source
3291 (origin
3292 (method url-fetch)
3293 (uri (string-append
3294 "https://github.com/numpy/numpy/releases/download/v"
3295 version "/numpy-" version ".tar.gz"))
3296 (sha256
3297 (base32
3298 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3299 (build-system python-build-system)
3300 (inputs
3301 `(("openblas" ,openblas)
3302 ("lapack" ,lapack)))
3303 (native-inputs
3304 `(("python-cython" ,python-cython)
3305 ("python-pytest" ,python-pytest)
3306 ("gfortran" ,gfortran)))
3307 (arguments
3308 `(#:phases
3309 (modify-phases %standard-phases
3310 (add-before 'build 'configure-blas-lapack
3311 (lambda* (#:key inputs #:allow-other-keys)
3312 (call-with-output-file "site.cfg"
3313 (lambda (port)
3314 (format port
3315 "[openblas]
3316 libraries = openblas
3317 library_dirs = ~a/lib
3318 include_dirs = ~a/include
3319
3320 # backslash-n to make emacs happy
3321 \n[lapack]
3322 lapack_libs = lapack
3323 library_dirs = ~a/lib
3324 include_dirs = ~a/include
3325 "
3326 (assoc-ref inputs "openblas")
3327 (assoc-ref inputs "openblas")
3328 (assoc-ref inputs "lapack")
3329 (assoc-ref inputs "lapack"))))
3330 #t))
3331 (add-before 'build 'fix-executable-paths
3332 (lambda* (#:key inputs #:allow-other-keys)
3333 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3334 ;; instead of /bin/sh.
3335 (substitute* "numpy/distutils/exec_command.py"
3336 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3337 (string-append match-start (assoc-ref inputs "bash") match-end)))
3338 ;; Use "gcc" executable, not "cc".
3339 (substitute* "numpy/distutils/system_info.py"
3340 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3341 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3342 #t))
3343 ;; Tests can only be run after the library has been installed and not
3344 ;; within the source directory.
3345 (delete 'check)
3346 (add-after 'install 'check
3347 (lambda* (#:key outputs inputs #:allow-other-keys)
3348 ;; Make installed package available for running the tests
3349 (add-installed-pythonpath inputs outputs)
3350 ;; Make sure "f2py" etc is found.
3351 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3352 ":" (getenv "PATH")))
3353 (with-directory-excursion "/tmp"
3354 (invoke "python" "-c"
3355 "import numpy; numpy.test(verbose=2)")))))))
3356 (home-page "http://www.numpy.org/")
3357 (synopsis "Fundamental package for scientific computing with Python")
3358 (description "NumPy is the fundamental package for scientific computing
3359 with Python. It contains among other things: a powerful N-dimensional array
3360 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3361 and Fortran code, useful linear algebra, Fourier transform, and random number
3362 capabilities.")
3363 (license license:bsd-3)))
3364
3365 (define-public python2-numpy
3366 (package-with-python2 python-numpy))
3367
3368 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3369 ;; interest only for legacy code going back to NumPy's predecessor
3370 ;; Numeric.
3371 (define-public python2-numpy-1.8
3372 (package (inherit python2-numpy)
3373 (version "1.8.2")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (string-append
3378 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3379 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3380 (sha256
3381 (base32
3382 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3383 (arguments
3384 (substitute-keyword-arguments (package-arguments python2-numpy)
3385 ((#:phases phases)
3386 `(modify-phases ,phases
3387 (replace 'configure-blas-lapack
3388 (lambda* (#:key inputs #:allow-other-keys)
3389 (call-with-output-file "site.cfg"
3390 (lambda (port)
3391 (format port
3392 "[openblas]
3393 libraries = openblas,lapack
3394 library_dirs = ~a/lib:~a/lib
3395 include_dirs = ~a/include:~a/include
3396 "
3397 (assoc-ref inputs "openblas")
3398 (assoc-ref inputs "lapack")
3399 (assoc-ref inputs "openblas")
3400 (assoc-ref inputs "lapack"))))
3401 #t))))))
3402 (native-inputs
3403 `(("python2-nose" ,python2-nose)))
3404 (description "NumPy is the fundamental package for scientific computing
3405 with Python. It contains among other things: a powerful N-dimensional array
3406 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3407 and Fortran code, useful linear algebra, Fourier transform, and random number
3408 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3409 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3410 Numeric.")
3411 (license license:bsd-3)))
3412
3413 (define-public python-munch
3414 (package
3415 (name "python-munch")
3416 (version "2.0.4")
3417 (source
3418 (origin
3419 (method url-fetch)
3420 (uri (pypi-uri "munch" version))
3421 (sha256
3422 (base32
3423 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3424 (build-system python-build-system)
3425 (home-page "https://github.com/Infinidat/munch")
3426 (synopsis "Dot-accessible dictionary")
3427 (description "Munch is a dot-accessible dictionary similar to JavaScript
3428 objects.")
3429 (license license:expat)))
3430
3431 (define-public python2-munch
3432 (package-with-python2 python-munch))
3433
3434 (define-public python-colormath
3435 (package
3436 (name "python-colormath")
3437 (version "3.0.0")
3438 (source
3439 (origin
3440 (method url-fetch)
3441 (uri (pypi-uri "colormath" version))
3442 (sha256
3443 (base32
3444 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3445 (build-system python-build-system)
3446 (propagated-inputs
3447 `(("python-networkx" ,python-networkx)
3448 ("python-numpy" ,python-numpy)))
3449 (home-page "https://github.com/gtaylor/python-colormath")
3450 (synopsis "Color math and conversion library")
3451 (description
3452 "This is a Python library for color math and conversions.")
3453 (license license:bsd-3)))
3454
3455 (define-public python2-colormath
3456 (package-with-python2 python-colormath))
3457
3458 (define-public python-spectra
3459 (package
3460 (name "python-spectra")
3461 (version "0.0.11")
3462 (source
3463 (origin
3464 (method url-fetch)
3465 (uri (pypi-uri "spectra" version))
3466 (sha256
3467 (base32
3468 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3469 (build-system python-build-system)
3470 (arguments
3471 `(#:phases
3472 (modify-phases %standard-phases
3473 (replace 'check
3474 (lambda _ (invoke "nosetests" "-v"))))))
3475 (propagated-inputs
3476 `(("python-colormath" ,python-colormath)))
3477 (native-inputs
3478 `(("python-nose" ,python-nose)))
3479 (home-page "https://github.com/jsvine/spectra")
3480 (synopsis "Color scales and color conversion")
3481 (description
3482 "This package provides a Python library intended to make color math,
3483 color scales, and color space conversion easy. It has support for:
3484
3485 @enumerate
3486 @item Color scales
3487 @item Color ranges
3488 @item Color blending
3489 @item Brightening/darkening colors
3490 @item Saturating/desaturating colors
3491 @item Conversion to/from multiple color spaces.
3492 @end enumerate\n")
3493 (license license:expat)))
3494
3495 (define-public python2-spectra
3496 (package-with-python2 python-spectra))
3497
3498 (define-public python-numpy-documentation
3499 (package
3500 (name "python-numpy-documentation")
3501 (version (package-version python-numpy))
3502 (source (package-source python-numpy))
3503 (build-system python-build-system)
3504 (native-inputs
3505 `(("python-matplotlib" ,python-matplotlib)
3506 ("python-numpy" ,python-numpy)
3507 ("pkg-config" ,pkg-config)
3508 ("python-sphinx" ,python-sphinx)
3509 ("python-numpydoc" ,python-numpydoc)
3510 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3511 texlive-fonts-ec
3512 texlive-generic-ifxetex
3513 texlive-generic-pdftex
3514 texlive-amsfonts
3515 texlive-latex-capt-of
3516 texlive-latex-cmap
3517 texlive-latex-environ
3518 texlive-latex-eqparbox
3519 texlive-latex-etoolbox
3520 texlive-latex-expdlist
3521 texlive-latex-fancyhdr
3522 texlive-latex-fancyvrb
3523 texlive-latex-fncychap
3524 texlive-latex-float
3525 texlive-latex-framed
3526 texlive-latex-geometry
3527 texlive-latex-graphics
3528 texlive-latex-hyperref
3529 texlive-latex-mdwtools
3530 texlive-latex-multirow
3531 texlive-latex-needspace
3532 texlive-latex-oberdiek
3533 texlive-latex-parskip
3534 texlive-latex-preview
3535 texlive-latex-tabulary
3536 texlive-latex-threeparttable
3537 texlive-latex-titlesec
3538 texlive-latex-trimspaces
3539 texlive-latex-ucs
3540 texlive-latex-upquote
3541 texlive-latex-url
3542 texlive-latex-varwidth
3543 texlive-latex-wrapfig)))
3544 ("texinfo" ,texinfo)
3545 ("perl" ,perl)
3546 ("scipy-sphinx-theme"
3547 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3548 (method git-fetch)
3549 (uri (git-reference
3550 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3551 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3552 (sha256
3553 (base32
3554 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3555 ,@(package-native-inputs python-numpy)))
3556 (arguments
3557 `(#:tests? #f ; we're only generating the documentation
3558 #:phases
3559 (modify-phases %standard-phases
3560 (delete 'build)
3561 (replace 'install
3562 (lambda* (#:key inputs outputs #:allow-other-keys)
3563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3564 (doc (string-append
3565 data "/doc/" ,name "-"
3566 ,(package-version python-numpy)))
3567 (info-reader (string-append data "/info"))
3568 (html (string-append doc "/html"))
3569 (scipy-sphinx-theme "scipy-sphinx-theme")
3570 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3571 (pyver ,(string-append "PYVER=")))
3572
3573 ;; FIXME: this is needed to for texlive-union to generate
3574 ;; fonts, which are not found.
3575 (setenv "HOME" "/tmp")
3576
3577 (with-directory-excursion "doc"
3578 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3579 (mkdir-p html)
3580 (invoke "make" "html" pyver)
3581 (invoke "make" "latex" "PAPER=a4" pyver)
3582 (invoke "make" "-C" "build/latex"
3583 "all-pdf" "PAPER=a4" pyver)
3584 ;; FIXME: Generation of the info file fails.
3585 ;; (invoke "make" "info" pyver)
3586 ;; (mkdir-p info)
3587 ;; (copy-file "build/texinfo/numpy.info"
3588 ;; (string-append info "/numpy.info"))
3589 (for-each (lambda (file)
3590 (copy-file (string-append "build/latex" file)
3591 (string-append doc file)))
3592 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3593 (with-directory-excursion "build/html"
3594 (for-each (lambda (file)
3595 (let* ((dir (dirname file))
3596 (tgt-dir (string-append html "/" dir)))
3597 (unless (equal? "." dir)
3598 (mkdir-p tgt-dir))
3599 (install-file file html)))
3600 (find-files "." ".*")))))
3601 #t)))))
3602 (home-page (package-home-page python-numpy))
3603 (synopsis "Documentation for the python-numpy package")
3604 (description (package-description python-numpy))
3605 (license (package-license python-numpy))))
3606
3607 (define-public python2-numpy-documentation
3608 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3609 (package
3610 (inherit numpy-documentation)
3611 (native-inputs `(("python2-functools32" ,python2-functools32)
3612 ,@(package-native-inputs numpy-documentation))))))
3613
3614 (define-public python-pygit2
3615 (package
3616 (name "python-pygit2")
3617 (version "0.28.2")
3618 (source
3619 (origin
3620 (method url-fetch)
3621 (uri (pypi-uri "pygit2" version))
3622 (sha256
3623 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3624 (build-system python-build-system)
3625 (arguments
3626 '(#:tests? #f)) ; tests don't run correctly in our environment
3627 (propagated-inputs
3628 `(("python-six" ,python-six)
3629 ("python-cffi" ,python-cffi)
3630 ("libgit2" ,libgit2)
3631 ("python-tox" ,python-tox)))
3632 (native-inputs
3633 `(("python-pytest" ,python-pytest)))
3634 (home-page "https://github.com/libgit2/pygit2")
3635 (synopsis "Python bindings for libgit2")
3636 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3637 library, libgit2 implements Git plumbing.")
3638 ;; GPL2.0 only, with linking exception.
3639 (license license:gpl2)))
3640
3641 (define-public python2-pygit2
3642 (package-with-python2 python-pygit2))
3643
3644 (define-public python-pyparsing
3645 (package
3646 (name "python-pyparsing")
3647 (version "2.3.1")
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "pyparsing" version))
3652 (sha256
3653 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3654 (build-system python-build-system)
3655 (outputs '("out" "doc"))
3656 (arguments
3657 `(#:tests? #f ; no test target
3658 #:phases
3659 (modify-phases %standard-phases
3660 (add-after 'install 'install-doc
3661 (lambda* (#:key outputs #:allow-other-keys)
3662 (let* ((doc (string-append (assoc-ref outputs "doc")
3663 "/share/doc/" ,name "-" ,version))
3664 (html-doc (string-append doc "/html"))
3665 (examples (string-append doc "/examples")))
3666 (mkdir-p html-doc)
3667 (mkdir-p examples)
3668 (for-each
3669 (lambda (dir tgt)
3670 (map (lambda (file)
3671 (install-file file tgt))
3672 (find-files dir ".*")))
3673 (list "docs" "htmldoc" "examples")
3674 (list doc html-doc examples))
3675 #t))))))
3676 (home-page "https://github.com/pyparsing/pyparsing")
3677 (synopsis "Python parsing class library")
3678 (description
3679 "The pyparsing module is an alternative approach to creating and
3680 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3681 of regular expressions. The pyparsing module provides a library of classes
3682 that client code uses to construct the grammar directly in Python code.")
3683 (license license:expat)))
3684
3685 (define-public python2-pyparsing
3686 (package-with-python2 python-pyparsing))
3687
3688 (define-public python-numpydoc
3689 (package
3690 (name "python-numpydoc")
3691 (version "0.8.0")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (pypi-uri "numpydoc" version))
3696 (sha256
3697 (base32
3698 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3699 (build-system python-build-system)
3700 (propagated-inputs
3701 `(("python-sphinx" ,python-sphinx)))
3702 (native-inputs
3703 `(("python-nose" ,python-nose)))
3704 (home-page "https://pypi.python.org/pypi/numpydoc")
3705 (synopsis
3706 "Numpy's Sphinx extensions")
3707 (description
3708 "Sphinx extension to support docstrings in Numpy format.")
3709 (license license:bsd-2)))
3710
3711 (define-public python2-numpydoc
3712 (package-with-python2 python-numpydoc))
3713
3714 (define-public python-numexpr
3715 (package
3716 (name "python-numexpr")
3717 (version "2.6.5")
3718 (source
3719 (origin
3720 (method url-fetch)
3721 (uri (pypi-uri "numexpr" version))
3722 (sha256
3723 (base32
3724 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3725 (build-system python-build-system)
3726 (arguments `(#:tests? #f)) ; no tests included
3727 (propagated-inputs
3728 `(("python-numpy" ,python-numpy)))
3729 (home-page "https://github.com/pydata/numexpr")
3730 (synopsis "Fast numerical expression evaluator for NumPy")
3731 (description
3732 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3733 expressions that operate on arrays are accelerated and use less memory than
3734 doing the same calculation in Python. In addition, its multi-threaded
3735 capabilities can make use of all your cores, which may accelerate
3736 computations, most specially if they are not memory-bounded (e.g. those using
3737 transcendental functions).")
3738 (license license:expat)))
3739
3740 (define-public python2-numexpr
3741 (package-with-python2 python-numexpr))
3742
3743 (define-public python-cycler
3744 (package
3745 (name "python-cycler")
3746 (version "0.10.0")
3747 (source (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "cycler" version))
3750 (sha256
3751 (base32
3752 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3753 (build-system python-build-system)
3754 (arguments
3755 ;; XXX: The current version requires 'coveralls' which we don't have.
3756 ;; Enable this for the next release which uses 'python-pytest'.
3757 '(#:tests? #f))
3758 (propagated-inputs
3759 `(("python-six" ,python-six)))
3760 (home-page "http://matplotlib.org/cycler/")
3761 (synopsis "Composable keyword argument iterator")
3762 (description
3763 "When using @code{matplotlib} and plotting more than one line, it is
3764 common to want to be able to want to be able to cycle over one or more artist
3765 styles; but the plotting logic can quickly become involved.
3766 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3767 @code{Cycler} class was developed.")
3768 (license license:bsd-3)))
3769
3770 (define-public python2-cycler
3771 (package-with-python2 python-cycler))
3772
3773 (define-public python-colorspacious
3774 (package
3775 (name "python-colorspacious")
3776 (version "1.1.0")
3777 (source
3778 (origin
3779 (method git-fetch)
3780 (uri (git-reference
3781 (url "https://github.com/njsmith/colorspacious.git")
3782 (commit (string-append "v" version))))
3783 (file-name (git-file-name name version))
3784 (sha256
3785 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3786 (build-system python-build-system)
3787 (propagated-inputs
3788 `(("python-numpy" ,python-numpy)))
3789 (native-inputs
3790 `(("python-nose" ,python-nose)))
3791 (arguments
3792 `(#:phases
3793 (modify-phases %standard-phases
3794 (replace 'check
3795 (lambda _
3796 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3797 (home-page "https://github.com/njsmith/colorspacious")
3798 (synopsis "Python library for colorspace conversions")
3799 (description "@code{colorspacious} is a Python library that lets you
3800 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3801 (license license:expat)))
3802
3803 (define-public python2-colorspacious
3804 (package-with-python2 python-colorspacious))
3805
3806 (define-public python-matplotlib
3807 (package
3808 (name "python-matplotlib")
3809 (version "3.1.1")
3810 (source
3811 (origin
3812 (method url-fetch)
3813 (uri (pypi-uri "matplotlib" version))
3814 (sha256
3815 (base32
3816 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3817 (build-system python-build-system)
3818 (propagated-inputs ; the following packages are all needed at run time
3819 `(("python-cycler" ,python-cycler)
3820 ("python-kiwisolver" ,python-kiwisolver)
3821 ("python-pyparsing" ,python-pyparsing)
3822 ("python-pygobject" ,python-pygobject)
3823 ("gobject-introspection" ,gobject-introspection)
3824 ("python-tkinter" ,python "tk")
3825 ("python-dateutil" ,python-dateutil)
3826 ("python-numpy" ,python-numpy)
3827 ("python-pillow" ,python-pillow)
3828 ("python-pytz" ,python-pytz)
3829 ("python-six" ,python-six)
3830 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3831 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3832 ;; object. For this reason we need to import both libraries.
3833 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3834 ("python-pycairo" ,python-pycairo)
3835 ("python-cairocffi" ,python-cairocffi)))
3836 (inputs
3837 `(("libpng" ,libpng)
3838 ("imagemagick" ,imagemagick)
3839 ("freetype" ,freetype)
3840 ("cairo" ,cairo)
3841 ("glib" ,glib)
3842 ;; FIXME: Add backends when available.
3843 ;("python-wxpython" ,python-wxpython)
3844 ("tcl" ,tcl)
3845 ("tk" ,tk)))
3846 (native-inputs
3847 `(("pkg-config" ,pkg-config)
3848 ("python-pytest" ,python-pytest)
3849 ("python-mock" ,python-mock)
3850 ("unzip" ,unzip)
3851 ("jquery-ui"
3852 ,(origin
3853 (method url-fetch)
3854 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3855 (sha256
3856 (base32
3857 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3858 (arguments
3859 `(#:phases
3860 (modify-phases %standard-phases
3861 ;; XXX We disable all image comparison tests because we're using a
3862 ;; newer version of FreeType than matplotlib expects. This leads to
3863 ;; minor differences throughout the tests.
3864 (add-after 'unpack 'fix-and-disable-failing-tests
3865 (lambda _
3866 (substitute* (append (find-files "lib/matplotlib/tests/"
3867 "test_.*\\.py$")
3868 (find-files "lib/mpl_toolkits/tests"
3869 "test_.*\\.py$"))
3870 (("^from matplotlib" match)
3871 (string-append "import pytest\n" match))
3872 (("( *)@image_comparison" match indent)
3873 (string-append indent
3874 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3875 match)))
3876 (substitute* "lib/matplotlib/tests/test_animation.py"
3877 (("/bin/sh") (which "sh")))
3878 (for-each delete-file
3879 ;; test_normal_axes, test_get_tightbbox_polar
3880 '("lib/matplotlib/tests/test_axes.py"
3881 ;; test_outward_ticks
3882 "lib/matplotlib/tests/test_tightlayout.py"
3883 ;; Fontconfig returns no fonts.
3884 "lib/matplotlib/tests/test_font_manager.py"))
3885 #t))
3886 (add-before 'install 'install-jquery-ui
3887 (lambda* (#:key outputs inputs #:allow-other-keys)
3888 (let ((dir (string-append (assoc-ref outputs "out")
3889 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3890 (mkdir-p dir)
3891 (invoke "unzip"
3892 (assoc-ref inputs "jquery-ui")
3893 "-d" dir))
3894 #t))
3895 (delete 'check)
3896 (add-after 'install 'check
3897 (lambda* (#:key outputs inputs #:allow-other-keys)
3898 (add-installed-pythonpath inputs outputs)
3899 (invoke "python" "tests.py" "-v"
3900 "-m" "not network")))
3901 (add-before 'build 'configure-environment
3902 (lambda* (#:key outputs inputs #:allow-other-keys)
3903 (let ((cairo (assoc-ref inputs "cairo")))
3904 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3905 ;; has not effect.
3906 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3907 (setenv "HOME" (getcwd))
3908 (call-with-output-file "setup.cfg"
3909 (lambda (port)
3910 (format port "[directories]~%
3911 basedirlist = ~a,~a~%
3912 [packages]~%
3913 tests = True~%"
3914 (assoc-ref inputs "tcl")
3915 (assoc-ref inputs "tk")))))
3916 #t)))))
3917 (home-page "http://matplotlib.org")
3918 (synopsis "2D plotting library for Python")
3919 (description
3920 "Matplotlib is a Python 2D plotting library which produces publication
3921 quality figures in a variety of hardcopy formats and interactive environments
3922 across platforms. Matplotlib can be used in Python scripts, the python and
3923 ipython shell, web application servers, and six graphical user interface
3924 toolkits.")
3925 (license license:psfl)
3926 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3927
3928 (define-public python2-matplotlib
3929 (let ((matplotlib (package-with-python2
3930 (strip-python2-variant python-matplotlib))))
3931 (package (inherit matplotlib)
3932 (version "2.2.3")
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "matplotlib" version))
3937 (sha256
3938 (base32
3939 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3940 ;; Make sure to use special packages for Python 2 instead
3941 ;; of those automatically rewritten by package-with-python2.
3942 (propagated-inputs
3943 `(("python2-pycairo" ,python2-pycairo)
3944 ("python2-backports-functools-lru-cache"
3945 ,python2-backports-functools-lru-cache)
3946 ("python2-functools32" ,python2-functools32)
3947 ("python2-pygobject-2" ,python2-pygobject-2)
3948 ("python2-subprocess32" ,python2-subprocess32)
3949 ("python2-tkinter" ,python-2 "tk")
3950 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3951 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3952
3953 (define-public python-matplotlib-documentation
3954 (package
3955 (name "python-matplotlib-documentation")
3956 (version (package-version python-matplotlib))
3957 (source (package-source python-matplotlib))
3958 (build-system python-build-system)
3959 (native-inputs
3960 `(("python-matplotlib" ,python-matplotlib)
3961 ("python-colorspacious" ,python-colorspacious)
3962 ("python-sphinx" ,python-sphinx)
3963 ("python-sphinx-gallery" ,python-sphinx-gallery)
3964 ("python-numpydoc" ,python-numpydoc)
3965 ("python-ipython" ,python-ipython)
3966 ("python-ipykernel" ,python-ipykernel)
3967 ("python-mock" ,python-mock)
3968 ("graphviz" ,graphviz)
3969 ("texlive" ,(texlive-union (list texlive-amsfonts
3970 texlive-latex-amsmath
3971 texlive-latex-enumitem
3972 texlive-latex-expdlist
3973 texlive-latex-geometry
3974 texlive-latex-preview
3975 texlive-latex-type1cm
3976 texlive-latex-ucs
3977
3978 texlive-generic-pdftex
3979
3980 texlive-fonts-ec
3981 texlive-fonts-adobe-times
3982 texlive-fonts-txfonts)))
3983 ("texinfo" ,texinfo)
3984 ,@(package-native-inputs python-matplotlib)))
3985 (arguments
3986 `(#:tests? #f ; we're only generating documentation
3987 #:phases
3988 (modify-phases %standard-phases
3989 ;; The tests in python-matplotlib are run after the install phase, so
3990 ;; we need to delete the extra phase here.
3991 (delete 'check)
3992 (replace 'build
3993 (lambda _
3994 (chdir "doc")
3995 (setenv "PYTHONPATH"
3996 (string-append (getenv "PYTHONPATH")
3997 ":" (getcwd) "/../examples/units"))
3998 (substitute* "conf.py"
3999 ;; Don't use git.
4000 (("^SHA = check_output.*")
4001 (string-append "SHA = \"" ,version "\"\n"))
4002 ;; Don't fetch intersphinx files from the Internet
4003 (("^explicit_order_folders" m)
4004 (string-append "intersphinx_mapping = {}\n" m))
4005 (("'sphinx.ext.intersphinx',") "")
4006 ;; Disable URL embedding which requires internet access.
4007 (("'https://docs.scipy.org/doc/numpy'") "None")
4008 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4009 (invoke "make"
4010 "SPHINXBUILD=sphinx-build"
4011 "SPHINXOPTS=" ; don't abort on warnings
4012 "html" "texinfo")))
4013 (replace 'install
4014 (lambda* (#:key inputs outputs #:allow-other-keys)
4015 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4016 (doc (string-append data "/doc/python-matplotlib-" ,version))
4017 (info (string-append data "/info"))
4018 (html (string-append doc "/html")))
4019 (mkdir-p html)
4020 (mkdir-p info)
4021 (copy-recursively "build/html" html)
4022 (symlink (string-append html "/_images")
4023 (string-append info "/matplotlib-figures"))
4024 (with-directory-excursion "build/texinfo"
4025 (substitute* "matplotlib.texi"
4026 (("@image\\{([^,]*)" all file)
4027 (string-append "@image{matplotlib-figures/" file)))
4028 (symlink (string-append html "/_images")
4029 "./matplotlib-figures")
4030 (invoke "makeinfo" "--no-split"
4031 "-o" "matplotlib.info" "matplotlib.texi"))
4032 (install-file "build/texinfo/matplotlib.info" info))
4033 #t)))))
4034 (home-page (package-home-page python-matplotlib))
4035 (synopsis "Documentation for the python-matplotlib package")
4036 (description (package-description python-matplotlib))
4037 (license (package-license python-matplotlib))))
4038
4039 (define-public python2-matplotlib-documentation
4040 (package-with-python2 python-matplotlib-documentation))
4041
4042 (define-public python-matplotlib-venn
4043 (package
4044 (name "python-matplotlib-venn")
4045 (version "0.11.5")
4046 (source
4047 (origin
4048 (method url-fetch)
4049 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4050 (sha256
4051 (base32
4052 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4053 (build-system python-build-system)
4054 (arguments '(#:tests? #f)) ; tests are not included
4055 (propagated-inputs
4056 `(("python-matplotlib" ,python-matplotlib)
4057 ("python-numpy" ,python-numpy)
4058 ("python-scipy" ,python-scipy)))
4059 (native-inputs
4060 `(("unzip" ,unzip)))
4061 (home-page "https://github.com/konstantint/matplotlib-venn")
4062 (synopsis "Plot area-proportional Venn diagrams")
4063 (description
4064 "This package provides tools for plotting area-proportional two- and
4065 three-way Venn diagrams in @code{matplotlib}.")
4066 (license license:expat)))
4067
4068 (define-public python2-pysnptools
4069 (package
4070 (name "python2-pysnptools")
4071 (version "0.3.13")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (pypi-uri "pysnptools" version))
4076 (sha256
4077 (base32
4078 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4079 (build-system python-build-system)
4080 (arguments
4081 `(#:python ,python-2 ; only Python 2.7 is supported
4082 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4083 (propagated-inputs
4084 `(("python2-numpy" ,python2-numpy)
4085 ("python2-scipy" ,python2-scipy)
4086 ("python2-pandas" ,python2-pandas)))
4087 (native-inputs
4088 `(("python2-cython" ,python2-cython)))
4089 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4090 (synopsis "Library for reading and manipulating genetic data")
4091 (description
4092 "PySnpTools is a library for reading and manipulating genetic data. It
4093 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4094 those files. It can also efficiently manipulate ranges of integers using set
4095 operators such as union, intersection, and difference.")
4096 (license license:asl2.0)))
4097
4098 (define-public python-scipy
4099 (package
4100 (name "python-scipy")
4101 (version "1.3.1")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (pypi-uri "scipy" version))
4106 (sha256
4107 (base32
4108 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4109 (build-system python-build-system)
4110 (propagated-inputs
4111 `(("python-numpy" ,python-numpy)
4112 ("python-matplotlib" ,python-matplotlib)
4113 ("python-pyparsing" ,python-pyparsing)))
4114 (inputs
4115 `(("lapack" ,lapack)
4116 ("openblas" ,openblas)))
4117 (native-inputs
4118 `(("python-cython" ,python-cython)
4119 ("python-pytest" ,python-pytest)
4120 ("python-sphinx" ,python-sphinx)
4121 ("python-numpydoc" ,python-numpydoc)
4122 ("gfortran" ,gfortran)
4123 ("perl" ,perl)
4124 ("which" ,which)))
4125 (outputs '("out" "doc"))
4126 (arguments
4127 `(#:phases
4128 (modify-phases %standard-phases
4129 (add-after 'unpack 'disable-broken-tests
4130 (lambda _
4131 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4132 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4133 (string-append indent
4134 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4135 m)))
4136 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4137 (("^def test_parallel_threads\\(\\):" m)
4138 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4139 m)))
4140 #t))
4141 (add-before 'build 'configure-openblas
4142 (lambda* (#:key inputs #:allow-other-keys)
4143 (call-with-output-file "site.cfg"
4144 (lambda (port)
4145 (format port
4146 "[blas]
4147 libraries = openblas
4148 library_dirs = ~a/lib
4149 include_dirs = ~a/include
4150
4151 # backslash-n to make emacs happy
4152 \n[atlas]
4153 library_dirs = ~a/lib
4154 atlas_libs = openblas
4155 "
4156 (assoc-ref inputs "openblas")
4157 (assoc-ref inputs "openblas")
4158 (assoc-ref inputs "openblas"))))
4159 #t))
4160 (add-after 'install 'install-doc
4161 (lambda* (#:key inputs outputs #:allow-other-keys)
4162 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4163 (doc (string-append data "/doc/" ,name "-" ,version))
4164 (html (string-append doc "/html"))
4165 (pyver ,(string-append "PYVER=" (version-major+minor
4166 (package-version python))))
4167 ;; By default it tries to run sphinx-build through the Python
4168 ;; interpreter which won't work with our shell wrapper.
4169 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4170 ;; Make installed package available for building the
4171 ;; documentation
4172 (add-installed-pythonpath inputs outputs)
4173 (with-directory-excursion "doc"
4174 ;; Fix generation of images for mathematical expressions.
4175 (substitute* (find-files "source" "conf\\.py")
4176 (("pngmath_use_preview = True")
4177 "pngmath_use_preview = False"))
4178 (mkdir-p html)
4179 (invoke "make" "html" pyver sphinxbuild)
4180 (with-directory-excursion "build/html"
4181 (for-each (lambda (file)
4182 (let* ((dir (dirname file))
4183 (tgt-dir (string-append html "/" dir)))
4184 (install-file file html)))
4185 (find-files "." ".*")))))
4186 #t))
4187 ;; Tests can only be run after the library has been installed and not
4188 ;; within the source directory.
4189 (delete 'check)
4190 (add-after 'install 'check
4191 (lambda* (#:key inputs outputs #:allow-other-keys)
4192 (add-installed-pythonpath inputs outputs)
4193 (with-directory-excursion "/tmp"
4194 (invoke "python" "-c"
4195 "import scipy; scipy.test(verbose=2)")))))))
4196 (home-page "https://www.scipy.org/")
4197 (synopsis "The Scipy library provides efficient numerical routines")
4198 (description "The SciPy library is one of the core packages that make up
4199 the SciPy stack. It provides many user-friendly and efficient numerical
4200 routines such as routines for numerical integration and optimization.")
4201 (properties `((python2-variant . ,(delay python2-scipy))))
4202 (license license:bsd-3)))
4203
4204 ;; Version 1.2.2 is the last version to support Python 2
4205 (define-public python2-scipy
4206 (package
4207 (inherit (package-with-python2
4208 (strip-python2-variant python-scipy)))
4209 (version "1.2.2")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (pypi-uri "scipy" version))
4214 (sha256
4215 (base32
4216 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4217
4218 (define-public python-socksipy-branch
4219 (package
4220 (name "python-socksipy-branch")
4221 (version "1.01")
4222 (source
4223 (origin
4224 (method url-fetch)
4225 (uri (pypi-uri "SocksiPy-branch" version))
4226 (sha256
4227 (base32
4228 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4229 (build-system python-build-system)
4230 (arguments
4231 `(#:tests? #f)) ; There are no tests
4232 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4233 (synopsis "Python SOCKS module")
4234 (description
4235 "SocksiPy - A Python SOCKS client module. It provides a
4236 socket-like interface that supports connections to any TCP
4237 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4238 The original version was developed by Dan Haim, this is a
4239 branch created by Mario Vilas to address some open issues,
4240 as the original project seems to have been abandoned circa 2007.")
4241 (license license:bsd-3)))
4242
4243 (define-public python2-socksipy-branch
4244 (package-with-python2 python-socksipy-branch))
4245
4246 (define-public python-pycodestyle
4247 (package
4248 (name "python-pycodestyle")
4249 (version "2.4.0")
4250 (source
4251 (origin
4252 (method url-fetch)
4253 (uri (pypi-uri "pycodestyle" version))
4254 (sha256
4255 (base32
4256 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4257 (build-system python-build-system)
4258 (home-page "https://pycodestyle.readthedocs.io/")
4259 (synopsis "Python style guide checker")
4260 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4261 Python code against some of the style conventions in
4262 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4263 (license license:expat)))
4264
4265 (define-public python2-pycodestyle
4266 (package-with-python2 python-pycodestyle))
4267
4268 (define-public python-multidict
4269 (package
4270 (name "python-multidict")
4271 (version "4.2.0")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (pypi-uri "multidict" version))
4276 (sha256
4277 (base32
4278 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4279 (build-system python-build-system)
4280 (native-inputs
4281 `(("python-pytest" ,python-pytest)
4282 ("python-pytest-runner" ,python-pytest-runner)))
4283 (home-page "https://github.com/aio-libs/multidict/")
4284 (synopsis "Multidict implementation")
4285 (description "Multidict is dict-like collection of key-value pairs
4286 where key might be occurred more than once in the container.")
4287 (license license:asl2.0)))
4288
4289 (define-public python-orderedmultidict
4290 (package
4291 (name "python-orderedmultidict")
4292 (version "0.7.11")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "orderedmultidict" version))
4297 (sha256
4298 (base32
4299 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4300 (build-system python-build-system)
4301 (arguments
4302 `(#:phases
4303 (modify-phases %standard-phases
4304 (add-after 'unpack 'fix-tests
4305 (lambda _
4306 ;; The package uses nosetest for running the tests.
4307 ;; Adding this initfile allows to run the test suite
4308 ;; without requiring nosetest.
4309 (with-output-to-file "tests/__init__.py" newline)
4310 #t)))))
4311 (propagated-inputs
4312 `(("python-six" ,python-six)))
4313 (native-inputs
4314 `(("python-pycodestyle" ,python-pycodestyle)))
4315 (home-page "https://github.com/gruns/orderedmultidict")
4316 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4317 (description "This package contains a library for ordered multivalue
4318 dictionaries. A multivalue dictionary is a dictionary that can store
4319 multiple values for the same key. An ordered multivalue dictionary is a
4320 multivalue dictionary that retains the order of insertions and deletions.")
4321 (license license:unlicense)))
4322
4323 (define-public python2-orderedmultidict
4324 (package-with-python2 python-orderedmultidict))
4325
4326 (define-public python-autopep8
4327 (package
4328 (name "python-autopep8")
4329 (version "1.3.5")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "autopep8" version))
4334 (sha256
4335 (base32
4336 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4337 (build-system python-build-system)
4338 (propagated-inputs
4339 `(("python-pycodestyle" ,python-pycodestyle)))
4340 (home-page "https://github.com/hhatto/autopep8")
4341 (synopsis "Format Python code according to the PEP 8 style guide")
4342 (description
4343 "@code{autopep8} automatically formats Python code to conform to
4344 the PEP 8 style guide. It uses the pycodestyle utility to determine
4345 what parts of the code needs to be formatted. @code{autopep8} is
4346 capable of fixing most of the formatting issues that can be reported
4347 by pycodestyle.")
4348 (license (license:non-copyleft
4349 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4350
4351 (define-public python2-autopep8
4352 (package-with-python2 python-autopep8))
4353
4354 (define-public python-distutils-extra
4355 (package
4356 (name "python-distutils-extra")
4357 (version "2.38")
4358 (source
4359 (origin
4360 (method url-fetch)
4361 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4362 version "/+download/python-distutils-extra-"
4363 version ".tar.gz"))
4364 (sha256
4365 (base32
4366 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4367 (build-system python-build-system)
4368 (home-page "https://launchpad.net/python-distutils-extra/")
4369 (synopsis "Enhancements to Python's distutils")
4370 (description
4371 "The python-distutils-extra module enables you to easily integrate
4372 gettext support, themed icons, and scrollkeeper-based documentation into
4373 Python's distutils.")
4374 (license license:gpl2)))
4375
4376 (define-public python2-distutils-extra
4377 (package-with-python2 python-distutils-extra))
4378
4379 (define-public python2-elib.intl
4380 (package
4381 (name "python2-elib.intl")
4382 (version "0.0.3")
4383 (source
4384 (origin
4385 ;; This project doesn't tag releases or publish tarballs, so we take
4386 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4387 (method git-fetch)
4388 (uri (git-reference
4389 (url "https://github.com/dieterv/elib.intl.git")
4390 (commit "d09997cfef")))
4391 (file-name (string-append name "-" version "-checkout"))
4392 (sha256
4393 (base32
4394 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4395 (build-system python-build-system)
4396 (arguments
4397 ;; incompatible with Python 3 (exception syntax)
4398 `(#:python ,python-2
4399 #:tests? #f))
4400 (home-page "https://github.com/dieterv/elib.intl")
4401 (synopsis "Enhanced internationalization for Python")
4402 (description
4403 "The elib.intl module provides enhanced internationalization (I18N)
4404 services for your Python modules and applications.")
4405 (license license:lgpl3+)))
4406
4407 (define-public python-olefile
4408 (package
4409 (name "python-olefile")
4410 (version "0.46")
4411 (source
4412 (origin
4413 (method url-fetch)
4414 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4415 "download/v" version "/olefile-" version ".tar.gz"))
4416 (file-name (string-append name "-" version ".tar.gz"))
4417 (sha256
4418 (base32
4419 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4420 (build-system python-build-system)
4421 (home-page "https://www.decalage.info/python/olefileio")
4422 (synopsis "Read and write Microsoft OLE2 files.")
4423 (description
4424 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4425 Storage or Compound Document, Microsoft Office). It is an improved version of
4426 the OleFileIO module from PIL, the Python Image Library.")
4427 (license license:bsd-3)))
4428
4429 (define-public python2-olefile
4430 (package-with-python2 python-olefile))
4431
4432 (define-public python-pillow
4433 (package
4434 (name "python-pillow")
4435 (version "6.1.0")
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (pypi-uri "Pillow" version))
4440 (sha256
4441 (base32
4442 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4443 (build-system python-build-system)
4444 (native-inputs
4445 `(("python-pytest" ,python-pytest)))
4446 (inputs
4447 `(("freetype" ,freetype)
4448 ("lcms" ,lcms)
4449 ("zlib" ,zlib)
4450 ("libjpeg" ,libjpeg)
4451 ("openjpeg" ,openjpeg)
4452 ("libtiff" ,libtiff)
4453 ("libwebp" ,libwebp)))
4454 (propagated-inputs
4455 `(("python-olefile" ,python-olefile)))
4456 (arguments
4457 `(#:phases
4458 (modify-phases %standard-phases
4459 (add-after 'unpack 'patch-ldconfig
4460 (lambda _
4461 (substitute* "setup.py"
4462 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4463 (delete 'check) ; We must run checks after python-pillow is installed.
4464 (add-after 'install 'check-installed
4465 (lambda* (#:key outputs inputs #:allow-other-keys)
4466 (begin
4467 (setenv "HOME" (getcwd))
4468 ;; Make installed package available for running the tests.
4469 (add-installed-pythonpath inputs outputs)
4470 (invoke "python" "selftest.py" "--installed")
4471 (invoke "python" "-m" "pytest" "-vv")))))))
4472 (home-page "https://python-pillow.org")
4473 (synopsis "Fork of the Python Imaging Library")
4474 (description
4475 "The Python Imaging Library adds image processing capabilities to your
4476 Python interpreter. This library provides extensive file format support, an
4477 efficient internal representation, and fairly powerful image processing
4478 capabilities. The core image library is designed for fast access to data
4479 stored in a few basic pixel formats. It should provide a solid foundation for
4480 a general image processing tool.")
4481 (license (license:x11-style
4482 "http://www.pythonware.com/products/pil/license.htm"
4483 "The PIL Software License"))))
4484
4485 (define-public python2-pillow
4486 (package-with-python2 python-pillow))
4487
4488 (define-public python-pycparser
4489 (package
4490 (name "python-pycparser")
4491 (version "2.19")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "pycparser" version))
4496 (sha256
4497 (base32
4498 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4499 (outputs '("out" "doc"))
4500 (build-system python-build-system)
4501 (native-inputs
4502 `(("pkg-config" ,pkg-config)))
4503 (arguments
4504 `(#:phases
4505 (modify-phases %standard-phases
4506 (replace 'check
4507 (lambda _
4508 (with-directory-excursion "tests"
4509 (invoke "python" "all_tests.py"))
4510 #t))
4511 (add-after 'install 'install-doc
4512 (lambda* (#:key outputs #:allow-other-keys)
4513 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4514 (doc (string-append data "/doc/" ,name "-" ,version))
4515 (examples (string-append doc "/examples")))
4516 (mkdir-p examples)
4517 (for-each (lambda (file)
4518 (copy-file (string-append "." file)
4519 (string-append doc file)))
4520 '("/README.rst" "/CHANGES" "/LICENSE"))
4521 (copy-recursively "examples" examples)
4522 #t))))))
4523 (home-page "https://github.com/eliben/pycparser")
4524 (synopsis "C parser in Python")
4525 (description
4526 "Pycparser is a complete parser of the C language, written in pure Python
4527 using the PLY parsing library. It parses C code into an AST and can serve as
4528 a front-end for C compilers or analysis tools.")
4529 (license license:bsd-3)))
4530
4531 (define-public python2-pycparser
4532 (package-with-python2 python-pycparser))
4533
4534 (define-public python-pywavelets
4535 (package
4536 (name "python-pywavelets")
4537 (version "1.0.1")
4538 (home-page "https://github.com/PyWavelets/pywt")
4539 (source (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "PyWavelets" version))
4542 (sha256
4543 (base32
4544 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4545 (build-system python-build-system)
4546 (arguments
4547 '(#:modules ((ice-9 ftw)
4548 (srfi srfi-1)
4549 (srfi srfi-26)
4550 (guix build utils)
4551 (guix build python-build-system))
4552 #:phases (modify-phases %standard-phases
4553 (replace 'check
4554 (lambda _
4555 (let ((cwd (getcwd))
4556 (libdir (find (cut string-prefix? "lib." <>)
4557 (scandir "build"))))
4558 (with-directory-excursion (string-append cwd "/build/" libdir)
4559 (invoke "nosetests" "-v" "."))))))))
4560 (native-inputs
4561 `(("python-matplotlib" ,python-matplotlib) ;for tests
4562 ("python-nose" ,python-nose)))
4563 (propagated-inputs
4564 `(("python-numpy" ,python-numpy)))
4565 (synopsis "Wavelet transforms in Python")
4566 (description
4567 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4568 mathematical basis functions that are localized in both time and frequency.
4569 Wavelet transforms are time-frequency transforms employing wavelets. They are
4570 similar to Fourier transforms, the difference being that Fourier transforms are
4571 localized only in frequency instead of in time and frequency.")
4572 (license license:expat)))
4573
4574 (define-public python2-pywavelets
4575 (package-with-python2 python-pywavelets))
4576
4577 (define-public python-xcffib
4578 (package
4579 (name "python-xcffib")
4580 (version "0.6.0")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "xcffib" version))
4585 (sha256
4586 (base32
4587 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4588 (build-system python-build-system)
4589 (inputs
4590 `(("libxcb" ,libxcb)))
4591 (propagated-inputs
4592 `(("python-cffi" ,python-cffi) ; used at run time
4593 ("python-six" ,python-six)))
4594 (arguments
4595 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4596 #:tests? #f
4597 #:phases
4598 (modify-phases %standard-phases
4599 (add-after 'unpack 'fix-libxcb-path
4600 (lambda* (#:key inputs #:allow-other-keys)
4601 (let ((libxcb (assoc-ref inputs "libxcb")))
4602 (substitute* '("xcffib/__init__.py")
4603 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4604 #t)))
4605 (add-after 'install 'install-doc
4606 (lambda* (#:key outputs #:allow-other-keys)
4607 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4608 "/doc/" ,name "-" ,version)))
4609 (mkdir-p doc)
4610 (copy-file "README.md"
4611 (string-append doc "/README.md"))
4612 #t))))))
4613 (home-page "https://github.com/tych0/xcffib")
4614 (synopsis "XCB Python bindings")
4615 (description
4616 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4617 support for Python 3 and PyPy. It is based on cffi.")
4618 (license license:expat)))
4619
4620 (define-public python2-xcffib
4621 (package-with-python2 python-xcffib))
4622
4623 (define-public python-cairocffi
4624 (package
4625 (name "python-cairocffi")
4626 (version "0.9.0")
4627 (source
4628 (origin
4629 (method url-fetch)
4630 (uri (pypi-uri "cairocffi" version))
4631 (sha256
4632 (base32
4633 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4634 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4635 (build-system python-build-system)
4636 (outputs '("out" "doc"))
4637 (inputs
4638 `(("glib" ,glib)
4639 ("gtk+" ,gtk+)
4640 ("gdk-pixbuf" ,gdk-pixbuf)
4641 ("cairo" ,cairo)
4642 ("pango" ,pango)))
4643 (native-inputs
4644 `(("pkg-config" ,pkg-config)
4645 ("python-pytest" ,python-pytest)
4646 ("python-pytest-cov" ,python-pytest-cov)
4647 ("python-pytest-runner" ,python-pytest-runner)
4648 ("python-sphinx" ,python-sphinx)
4649 ("python-docutils" ,python-docutils)))
4650 (propagated-inputs
4651 `(("python-xcffib" ,python-xcffib))) ; used at run time
4652 (arguments
4653 `(#:phases
4654 (modify-phases %standard-phases
4655 (add-after 'unpack 'patch-paths
4656 (lambda* (#:key inputs outputs #:allow-other-keys)
4657 (substitute* (find-files "." "\\.py$")
4658 (("dlopen\\(ffi, 'cairo'")
4659 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4660 "/lib/libcairo.so.2'"))
4661 (("dlopen\\(ffi, 'gdk-3'")
4662 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4663 "/lib/libgtk-3.so.0'"))
4664 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4665 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4666 "/lib/libgdk_pixbuf-2.0.so.0'"))
4667 (("dlopen\\(ffi, 'glib-2.0'")
4668 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4669 "/lib/libglib-2.0.so.0'"))
4670 (("dlopen\\(ffi, 'gobject-2.0'")
4671 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4672 "/lib/libgobject-2.0.so.0'"))
4673 (("dlopen\\(ffi, 'pangocairo-1.0'")
4674 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4675 "/lib/libpangocairo-1.0.so.0'"))
4676 (("dlopen\\(ffi, 'pango-1.0'")
4677 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4678 "/lib/libpango-1.0.so.0'")))
4679 #t))
4680 (add-after 'install 'install-doc
4681 (lambda* (#:key inputs outputs #:allow-other-keys)
4682 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4683 (doc (string-append data "/doc/" ,name "-" ,version))
4684 (html (string-append doc "/html")))
4685 (setenv "LD_LIBRARY_PATH"
4686 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4687 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4688 (setenv "LANG" "en_US.UTF-8")
4689 (mkdir-p html)
4690 (for-each (lambda (file)
4691 (copy-file (string-append "." file)
4692 (string-append doc file)))
4693 '("/README.rst" "/CHANGES" "/LICENSE"))
4694 (system* "python" "setup.py" "build_sphinx")
4695 (copy-recursively "docs/_build/html" html)
4696 #t))))))
4697 (home-page "https://github.com/Kozea/cairocffi")
4698 (synopsis "Python bindings and object-oriented API for Cairo")
4699 (description
4700 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4701 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4702 graphics library with support for multiple backends including image buffers,
4703 PNG, PostScript, PDF, and SVG file output.")
4704 (license license:bsd-3)))
4705
4706 (define-public python2-cairocffi
4707 (package-with-python2 python-cairocffi))
4708
4709 (define-public python-decorator
4710 (package
4711 (name "python-decorator")
4712 (version "4.3.0")
4713 (source
4714 (origin
4715 (method url-fetch)
4716 (uri (pypi-uri "decorator" version))
4717 (sha256
4718 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4719 (build-system python-build-system)
4720 (home-page "https://pypi.python.org/pypi/decorator/")
4721 (synopsis "Python module to simplify usage of decorators")
4722 (description
4723 "The aim of the decorator module is to simplify the usage of decorators
4724 for the average programmer, and to popularize decorators usage giving examples
4725 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4726 etc. The core of this module is a decorator factory.")
4727 (license license:expat)))
4728
4729 (define-public python2-decorator
4730 (package-with-python2 python-decorator))
4731
4732 (define-public python-drmaa
4733 (package
4734 (name "python-drmaa")
4735 (version "0.7.7")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "drmaa" version))
4740 (sha256
4741 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4742 (build-system python-build-system)
4743 ;; The test suite requires libdrmaa which is provided by the cluster
4744 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4745 ;; should be set to the path of the libdrmaa library.
4746 (arguments '(#:tests? #f))
4747 (native-inputs
4748 `(("python-nose" ,python-nose)))
4749 (home-page "https://pypi.python.org/pypi/drmaa")
4750 (synopsis "Python bindings for the DRMAA library")
4751 (description
4752 "A Python package for Distributed Resource Management (DRM) job
4753 submission and control. This package is an implementation of the DRMAA 1.0
4754 Python language binding specification.")
4755 (license license:bsd-3)))
4756
4757 (define-public python2-drmaa
4758 (package-with-python2 python-drmaa))
4759
4760 (define-public python-grako
4761 (package
4762 (name "python-grako")
4763 (version "3.99.9")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri
4768 (pypi-uri "grako" version ".zip"))
4769 (sha256
4770 (base32
4771 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4772 (build-system python-build-system)
4773 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4774 (native-inputs
4775 `(("unzip" ,unzip)
4776 ("python-pytest" ,python-pytest)
4777 ("python-pytest-runner" ,python-pytest-runner)))
4778 (home-page "https://bitbucket.org/neogeny/grako")
4779 (synopsis "EBNF parser generator")
4780 (description
4781 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4782 memoizing PEG/Packrat parser in Python.")
4783 (license license:bsd-3)))
4784
4785 (define-public python2-grako
4786 (package-with-python2 python-grako))
4787
4788 (define-public python-gridmap
4789 (package
4790 (name "python-gridmap")
4791 (version "0.13.0")
4792 (source
4793 (origin
4794 (method git-fetch)
4795 (uri (git-reference
4796 (url "https://github.com/pygridtools/gridmap.git")
4797 (commit (string-append "v" version))))
4798 (file-name (git-file-name name version))
4799 (sha256
4800 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4801 (build-system python-build-system)
4802 (arguments
4803 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4804 (propagated-inputs
4805 `(("python-psutil" ,python-psutil)
4806 ("python-drmaa" ,python-drmaa)
4807 ("python-pyzmq" ,python-pyzmq)))
4808 (home-page "https://github.com/pygridtools/gridmap")
4809 (synopsis "Create jobs on a cluster directly from Python")
4810 (description
4811 "Gridmap is a Python package to allow you to easily create jobs on the
4812 cluster directly from Python. You can directly map Python functions onto the
4813 cluster without needing to write any wrapper code yourself.")
4814 (license license:gpl3+)))
4815
4816 (define-public python2-gridmap
4817 (package-with-python2 python-gridmap))
4818
4819 (define-public python-honcho
4820 (package
4821 (name "python-honcho")
4822 (version "1.0.1")
4823 (source
4824 (origin
4825 (method git-fetch)
4826 (uri (git-reference
4827 (url "https://github.com/nickstenning/honcho.git")
4828 (commit (string-append "v" version))))
4829 (file-name (git-file-name name version))
4830 (sha256
4831 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4832 (build-system python-build-system)
4833 (native-inputs
4834 `(("python-pytest" ,python-pytest)
4835 ("python-mock" ,python-mock)
4836 ("python-tox" ,python-tox)
4837 ("which" ,which))) ;for tests
4838 (propagated-inputs
4839 `(("python-jinja2" ,python-jinja2)))
4840 (arguments
4841 `(#:phases
4842 (modify-phases %standard-phases
4843 (delete 'check)
4844 (add-after 'install 'check
4845 (lambda* (#:key outputs inputs #:allow-other-keys)
4846 ;; fix honcho path in testsuite
4847 (substitute* "tests/conftest.py"
4848 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4849 "/bin/honcho" "'")))
4850 ;; It's easier to run tests after install.
4851 ;; Make installed package available for running the tests
4852 (add-installed-pythonpath inputs outputs)
4853 (invoke "py.test" "-v"))))))
4854 (home-page "https://github.com/nickstenning/honcho")
4855 (synopsis "Manage Procfile-based applications")
4856 (description
4857 "A Procfile is a file which describes how to run an application
4858 consisting of several processes. honcho starts all listed processes.
4859 The output of all running processes is collected by honcho and
4860 displayed.")
4861 (license license:expat)))
4862
4863 (define-public python2-honcho
4864 (package-with-python2 python-honcho))
4865
4866 (define-public python-pexpect
4867 (package
4868 (name "python-pexpect")
4869 (version "4.6.0")
4870 (source
4871 (origin
4872 (method url-fetch)
4873 (uri (pypi-uri "pexpect" version))
4874 (sha256
4875 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4876 (build-system python-build-system)
4877 (arguments
4878 `(#:phases
4879 (modify-phases %standard-phases
4880 (add-before 'check 'prepare-tests
4881 (lambda _
4882 (substitute* (find-files "tests")
4883 (("/bin/ls") (which "ls"))
4884 (("/bin/echo") (which "echo"))
4885 (("/bin/which") (which "which"))
4886 ;; Many tests try to use the /bin directory which
4887 ;; is not present in the build environment.
4888 ;; Use one that's non-empty and unlikely to change.
4889 (("/bin'") "/dev'"))
4890 ;; XXX: Socket connection test gets "Connection reset by peer".
4891 ;; Why does it not work? Delete for now.
4892 (delete-file "tests/test_socket.py")
4893 #t))
4894 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4895 (native-inputs
4896 `(("python-nose" ,python-nose)
4897 ("python-pytest" ,python-pytest)
4898 ("man-db" ,man-db)
4899 ("which" ,which)
4900 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4901 (propagated-inputs
4902 `(("python-ptyprocess" ,python-ptyprocess)))
4903 (home-page "http://pexpect.readthedocs.org/")
4904 (synopsis "Controlling interactive console applications")
4905 (description
4906 "Pexpect is a pure Python module for spawning child applications;
4907 controlling them; and responding to expected patterns in their output.
4908 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4909 child application and control it as if a human were typing commands.")
4910 (license license:isc)))
4911
4912 (define-public python2-pexpect
4913 (package-with-python2 python-pexpect))
4914
4915 (define-public python-setuptools-scm
4916 (package
4917 (name "python-setuptools-scm")
4918 (version "3.1.0")
4919 (source (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "setuptools_scm" version))
4922 (sha256
4923 (base32
4924 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4925 (build-system python-build-system)
4926 (home-page "https://github.com/pypa/setuptools_scm/")
4927 (synopsis "Manage Python package versions in SCM metadata")
4928 (description
4929 "Setuptools_scm handles managing your Python package versions in
4930 @dfn{software configuration management} (SCM) metadata instead of declaring
4931 them as the version argument or in a SCM managed file.")
4932 (license license:expat)))
4933
4934 (define-public python2-setuptools-scm
4935 (package-with-python2 python-setuptools-scm))
4936
4937 (define-public python-pathlib2
4938 (package
4939 (name "python-pathlib2")
4940 (version "2.3.3")
4941 (source
4942 (origin
4943 (method url-fetch)
4944 (uri (pypi-uri "pathlib2" version))
4945 (sha256
4946 (base32
4947 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4948 (build-system python-build-system)
4949 (propagated-inputs
4950 `(("python-scandir" ,python-scandir)
4951 ("python-six" ,python-six)))
4952 (home-page "https://pypi.python.org/pypi/pathlib2/")
4953 (synopsis "Object-oriented file system paths")
4954 (description "The goal of pathlib2 is to provide a backport of the
4955 standard @code{pathlib} module which tracks the standard library module, so
4956 all the newest features of the standard @code{pathlib} can be used also on
4957 older Python versions.")
4958 (license license:expat)))
4959
4960 (define-public python-importlib-metadata
4961 (package
4962 (name "python-importlib-metadata")
4963 (version "0.18")
4964 (source
4965 (origin
4966 (method url-fetch)
4967 (uri (pypi-uri "importlib_metadata" version))
4968 (sha256
4969 (base32
4970 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4971 (build-system python-build-system)
4972 (propagated-inputs
4973 `(("python-configparser" ,python-configparser)
4974 ("python-contextlib2" ,python-contextlib2)
4975 ("python-docutils" ,python-docutils)
4976 ("python-pathlib2" ,python-pathlib2)
4977 ("python-rst.linker" ,python-rst.linker)
4978 ("python-zipp" ,python-zipp)))
4979 (native-inputs
4980 `(("python-setuptools-scm" ,python-setuptools-scm)
4981 ("python-sphinx" ,python-sphinx)))
4982 (home-page "https://importlib-metadata.readthedocs.io/")
4983 (synopsis "Read metadata from Python packages")
4984 (description
4985 "@code{importlib_metadata} is a library which provides an API for
4986 accessing an installed Python package's metadata, such as its entry points or
4987 its top-level name. This functionality intends to replace most uses of
4988 @code{pkg_resources} entry point API and metadata API. Along with
4989 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4990 need to use the older and less efficient @code{pkg_resources} package.")
4991 (license license:asl2.0)))
4992
4993 (define-public python-jaraco-packaging
4994 (package
4995 (name "python-jaraco-packaging")
4996 (version "6.1")
4997 (source
4998 (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "jaraco.packaging" version))
5001 (sha256
5002 (base32
5003 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5004 (build-system python-build-system)
5005 (propagated-inputs
5006 `(("python-pytest" ,python-pytest)
5007 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5008 ("python-pytest-flake8" ,python-pytest-flake8)
5009 ("python-rst.linker" ,python-rst.linker)
5010 ("python-setuptools" ,python-setuptools)
5011 ("python-setuptools-scm" ,python-setuptools-scm)
5012 ("python-six" ,python-six)
5013 ("python-sphinx" ,python-sphinx)))
5014 (home-page "https://github.com/jaraco/jaraco.packaging")
5015 (synopsis "Tools to supplement packaging Python releases")
5016 (description
5017 "This package provides various tools to supplement packaging Python
5018 releases.")
5019 (license license:expat)))
5020
5021 (define-public python-pathpy
5022 (package
5023 (name "python-pathpy")
5024 (version "11.5.0")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "path.py" version))
5029 (sha256
5030 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5031 (outputs '("out" "doc"))
5032 (build-system python-build-system)
5033 (propagated-inputs
5034 `(("python-appdirs" ,python-appdirs)
5035 ("python-importlib-metadata" ,python-importlib-metadata)))
5036 (native-inputs
5037 `(("python-setuptools-scm" ,python-setuptools-scm)
5038 ("python-sphinx" ,python-sphinx)
5039 ("python-rst.linker" ,python-rst.linker)
5040 ("python-pytest" ,python-pytest)
5041 ("python-pytest-runner" ,python-pytest-runner)
5042 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5043 (arguments
5044 `(#:phases
5045 (modify-phases %standard-phases
5046 (add-after 'build 'build-doc
5047 (lambda _
5048 (setenv "LANG" "en_US.UTF-8")
5049 (invoke "python" "setup.py" "build_sphinx")))
5050 (add-after 'install 'install-doc
5051 (lambda* (#:key outputs #:allow-other-keys)
5052 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5053 (doc (string-append data "/doc/" ,name "-" ,version))
5054 (html (string-append doc "/html")))
5055 (mkdir-p html)
5056 (for-each (lambda (file)
5057 (copy-file file (string-append doc "/" file)))
5058 '("README.rst" "CHANGES.rst"))
5059 (copy-recursively "build/sphinx/html" html)
5060 #t)))
5061 (replace 'check
5062 (lambda _
5063 ;; The import time test aborts if an import takes longer than
5064 ;; 100ms. It may very well take a little longer than that.
5065 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5066 (home-page "https://github.com/jaraco/path.py")
5067 (synopsis "Python module wrapper for built-in os.path")
5068 (description
5069 "@code{path.py} implements path objects as first-class entities, allowing
5070 common operations on files to be invoked on those path objects directly.")
5071 (license license:expat)))
5072
5073 (define-public python2-pathpy
5074 (package-with-python2 python-pathpy))
5075
5076 (define-public python-simplegeneric
5077 (package
5078 (name "python-simplegeneric")
5079 (version "0.8.1")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (pypi-uri "simplegeneric" version ".zip"))
5084 (sha256
5085 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5086 (build-system python-build-system)
5087 (native-inputs
5088 `(("unzip" ,unzip)))
5089 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5090 (synopsis "Python module for simple generic functions")
5091 (description
5092 "The simplegeneric module lets you define simple single-dispatch generic
5093 functions, akin to Python’s built-in generic functions like @code{len()},
5094 @code{iter()} and so on. However, instead of using specially-named methods,
5095 these generic functions use simple lookup tables, akin to those used by
5096 e.g. @code{pickle.dump()} and other generic functions found in the Python
5097 standard library.")
5098 (license license:zpl2.1)))
5099
5100 (define-public python2-simplegeneric
5101 (package-with-python2 python-simplegeneric))
5102
5103 (define-public python-ipython-genutils
5104 ;; TODO: This package is retired, check if can be removed, see description.
5105 (package
5106 (name "python-ipython-genutils")
5107 (version "0.1.0")
5108 (source
5109 (origin
5110 (method url-fetch)
5111 (uri (pypi-uri "ipython_genutils" version))
5112 (sha256
5113 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5114 (build-system python-build-system)
5115 (arguments `(#:tests? #f)) ; no tests
5116 (home-page "https://ipython.org")
5117 (synopsis "Vestigial utilities from IPython")
5118 (description
5119 "This package provides retired utilities from IPython. No packages
5120 outside IPython/Jupyter should depend on it.
5121
5122 This package shouldn't exist. It contains some common utilities shared by
5123 Jupyter and IPython projects during The Big Split. As soon as possible, those
5124 packages will remove their dependency on this, and this package will go
5125 away.")
5126 (license license:bsd-3)))
5127
5128 (define-public python2-ipython-genutils
5129 (package-with-python2 python-ipython-genutils))
5130
5131 (define-public python-traitlets
5132 (package
5133 (name "python-traitlets")
5134 (version "4.3.2")
5135 (source
5136 (origin
5137 (method url-fetch)
5138 (uri (pypi-uri "traitlets" version))
5139 (sha256
5140 (base32
5141 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5142 (build-system python-build-system)
5143 (arguments
5144 `(#:phases
5145 (modify-phases %standard-phases
5146 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5147 (propagated-inputs
5148 `(("python-ipython-genutils" ,python-ipython-genutils)
5149 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5150 (native-inputs
5151 `(("python-pytest" ,python-pytest)))
5152 (properties `((python2-variant . ,(delay python2-traitlets))))
5153 (home-page "https://ipython.org")
5154 (synopsis "Configuration system for Python applications")
5155 (description
5156 "Traitlets is a framework that lets Python classes have attributes with
5157 type checking, dynamically calculated default values, and ‘on change’
5158 callbacks. The package also includes a mechanism to use traitlets for
5159 configuration, loading values from files or from command line arguments. This
5160 is a distinct layer on top of traitlets, so you can use traitlets in your code
5161 without using the configuration machinery.")
5162 (license license:bsd-3)))
5163
5164 (define-public python2-traitlets
5165 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5166 (package
5167 (inherit traitlets)
5168 (propagated-inputs
5169 `(("python2-enum34" ,python2-enum34)
5170 ,@(package-propagated-inputs traitlets))))))
5171
5172 (define-public python-jupyter-core
5173 (package
5174 (name "python-jupyter-core")
5175 (version "4.4.0")
5176 (source
5177 (origin
5178 (method url-fetch)
5179 (uri (string-append (pypi-uri "jupyter_core" version)))
5180 (sha256
5181 (base32
5182 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5183 (build-system python-build-system)
5184 ;; FIXME: not sure how to run the tests
5185 (arguments `(#:tests? #f))
5186 (propagated-inputs
5187 `(("python-traitlets" ,python-traitlets)))
5188 (home-page "http://jupyter.org/")
5189 (synopsis "Jupyter base package")
5190 (description
5191 "Jupyter core is the base package on which Jupyter projects rely.")
5192 (license license:bsd-3)))
5193
5194 (define-public python2-jupyter-core
5195 (package-with-python2 python-jupyter-core))
5196
5197 (define-public python-jupyter-client
5198 (package
5199 (name "python-jupyter-client")
5200 (version "5.2.4")
5201 (source
5202 (origin
5203 (method url-fetch)
5204 (uri (pypi-uri "jupyter_client" version))
5205 (sha256
5206 (base32
5207 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5208 (build-system python-build-system)
5209 ;; Tests fail because of missing native python kernel which I assume is
5210 ;; provided by the ipython package, which we cannot use because it would
5211 ;; cause a dependency cycle.
5212 (arguments
5213 `(#:tests? #f
5214
5215 #:phases (modify-phases %standard-phases
5216 (add-after 'unpack 'set-tool-file-names
5217 (lambda* (#:key inputs #:allow-other-keys)
5218 (let ((iproute (assoc-ref inputs "iproute")))
5219 (substitute* "jupyter_client/localinterfaces.py"
5220 (("'ip'")
5221 (string-append "'" iproute "/sbin/ip'")))
5222 #t))))))
5223 (inputs
5224 `(("iproute" ,iproute)))
5225 (propagated-inputs
5226 `(("python-pyzmq" ,python-pyzmq)
5227 ("python-traitlets" ,python-traitlets)
5228 ("python-jupyter-core" ,python-jupyter-core)))
5229 (home-page "http://jupyter.org/")
5230 (synopsis "Jupyter protocol implementation and client libraries")
5231 (description
5232 "The @code{jupyter_client} package contains the reference implementation
5233 of the Jupyter protocol. It also provides client and kernel management APIs
5234 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5235 installing @code{kernelspec}s for use with Jupyter frontends.")
5236 (license license:bsd-3)))
5237
5238 (define-public python2-jupyter-client
5239 (package-with-python2 python-jupyter-client))
5240
5241 (define-public python-ipykernel
5242 (package
5243 (name "python-ipykernel")
5244 (version "5.1.1")
5245 (source
5246 (origin
5247 (method url-fetch)
5248 (uri (pypi-uri "ipykernel" version))
5249 (sha256
5250 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5251 (build-system python-build-system)
5252 (arguments
5253 `(#:phases
5254 (modify-phases %standard-phases
5255 (replace 'check
5256 (lambda _
5257 (setenv "HOME" "/tmp")
5258 (invoke "pytest" "-v")
5259 #t))
5260 (add-after 'install 'set-python-file-name
5261 (lambda* (#:key outputs #:allow-other-keys)
5262 ;; Record the absolute file name of the 'python' executable in
5263 ;; 'kernel.json'.
5264 (let ((out (assoc-ref outputs "out")))
5265 (substitute* (string-append out "/share/jupyter"
5266 "/kernels/python3/kernel.json")
5267 (("\"python\"")
5268 (string-append "\"" (which "python") "\"")))
5269 #t))))))
5270 (propagated-inputs
5271 `(("python-ipython" ,python-ipython)
5272 ;; imported at runtime during connect
5273 ("python-jupyter-client" ,python-jupyter-client)))
5274 (native-inputs
5275 `(("python-pytest" ,python-pytest)
5276 ("python-nose" ,python-nose)))
5277 (home-page "https://ipython.org")
5278 (synopsis "IPython Kernel for Jupyter")
5279 (description
5280 "This package provides the IPython kernel for Jupyter.")
5281 (license license:bsd-3)))
5282
5283 ;; Version 5.1.1 and above no longer support Python 2.
5284 (define-public python2-ipykernel
5285 (package
5286 (name "python2-ipykernel")
5287 (version "5.1.0")
5288 (source
5289 (origin
5290 (method url-fetch)
5291 (uri (pypi-uri "ipykernel" version))
5292 (sha256
5293 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5294 (build-system python-build-system)
5295 (arguments
5296 `(#:python ,python-2
5297 #:phases
5298 (modify-phases %standard-phases
5299 (replace 'check
5300 (lambda _
5301 (setenv "HOME" "/tmp")
5302 (invoke "pytest" "-v")
5303 #t)))))
5304 (propagated-inputs
5305 `(("python2-ipython" ,python2-ipython)
5306 ;; imported at runtime during connect
5307 ("python2-jupyter-client" ,python2-jupyter-client)))
5308 (native-inputs
5309 `(("python2-pytest" ,python2-pytest)
5310 ("python2-nose" ,python2-nose)))
5311 (home-page "https://ipython.org")
5312 (synopsis "IPython Kernel for Jupyter")
5313 (description
5314 "This package provides the IPython kernel for Jupyter.")
5315 (license license:bsd-3)))
5316
5317 (define-public python-pari-jupyter
5318 (package
5319 (name "python-pari-jupyter")
5320 (version "1.3.2")
5321 (source
5322 (origin
5323 (method url-fetch)
5324 (uri (pypi-uri "pari_jupyter" version))
5325 (sha256
5326 (base32
5327 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5328 (build-system python-build-system)
5329 (propagated-inputs
5330 `(("python-ipykernel" ,python-ipykernel)))
5331 (inputs
5332 `(("pari-gp" ,pari-gp)
5333 ("readline" ,readline)))
5334 (arguments
5335 `(#:tests? #f)) ; no test suite
5336 (home-page
5337 "https://github.com/jdemeyer/pari_jupyter")
5338 (synopsis "A Jupyter kernel for PARI/GP")
5339 (description "The package provides a PARI/GP kernel for Jupyter.")
5340 (license license:gpl3+)))
5341
5342 (define-public python-backcall
5343 (package
5344 (name "python-backcall")
5345 (version "0.1.0")
5346 (source
5347 (origin
5348 (method url-fetch)
5349 (uri (pypi-uri "backcall" version))
5350 (sha256
5351 (base32
5352 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5353 (build-system python-build-system)
5354 (home-page "https://github.com/takluyver/backcall/")
5355 (synopsis "Specifications for callback functions passed in to an API")
5356 (description
5357 "If your code lets other people supply callback functions, it's important
5358 to specify the function signature you expect, and check that functions support
5359 that. Adding extra parameters later would break other peoples code unless
5360 you're careful. The @code{backcall} package provides a way of specifying the
5361 callback signature using a prototype function.")
5362 (license license:bsd-3)))
5363
5364 ;; This is the latest release of the LTS version of ipython with support for
5365 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5366 ;; dropped support for Python 2.7.
5367 (define-public python2-ipython
5368 (package
5369 (name "python2-ipython")
5370 (version "5.8.0")
5371 (source
5372 (origin
5373 (method url-fetch)
5374 (uri (pypi-uri "ipython" version ".tar.gz"))
5375 (sha256
5376 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5377 (build-system python-build-system)
5378 (propagated-inputs
5379 `(("python2-backports-shutil-get-terminal-size"
5380 ,python2-backports-shutil-get-terminal-size)
5381 ("python2-pathlib2" ,python2-pathlib2)
5382 ("python2-pyzmq" ,python2-pyzmq)
5383 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5384 ("python2-terminado" ,python2-terminado)
5385 ("python2-matplotlib" ,python2-matplotlib)
5386 ("python2-numpy" ,python2-numpy)
5387 ("python2-numpydoc" ,python2-numpydoc)
5388 ("python2-jinja2" ,python2-jinja2)
5389 ("python2-mistune" ,python2-mistune)
5390 ("python2-pexpect" ,python2-pexpect)
5391 ("python2-pickleshare" ,python2-pickleshare)
5392 ("python2-simplegeneric" ,python2-simplegeneric)
5393 ("python2-jsonschema" ,python2-jsonschema)
5394 ("python2-traitlets" ,python2-traitlets)
5395 ("python2-nbformat" ,python2-nbformat)
5396 ("python2-pygments" ,python2-pygments)))
5397 (inputs
5398 `(("readline" ,readline)
5399 ("which" ,which)))
5400 (native-inputs
5401 `(("graphviz" ,graphviz)
5402 ("pkg-config" ,pkg-config)
5403 ("python2-requests" ,python2-requests) ;; for tests
5404 ("python2-testpath" ,python2-testpath)
5405 ("python2-mock" ,python2-mock)
5406 ("python2-nose" ,python2-nose)))
5407 (arguments
5408 `(#:python ,python-2
5409 #:phases
5410 (modify-phases %standard-phases
5411 (add-before 'check 'delete-broken-tests
5412 (lambda* (#:key inputs #:allow-other-keys)
5413 ;; These tests throw errors for unknown reasons.
5414 (delete-file "IPython/core/tests/test_profile.py")
5415 (delete-file "IPython/core/tests/test_interactiveshell.py")
5416 (delete-file "IPython/core/tests/test_magic.py")
5417 #t)))))
5418 (home-page "https://ipython.org")
5419 (synopsis "IPython is a tool for interactive computing in Python")
5420 (description
5421 "IPython provides a rich architecture for interactive computing with:
5422 Powerful interactive shells, a browser-based notebook, support for interactive
5423 data visualization, embeddable interpreters and tools for parallel
5424 computing.")
5425 (license license:bsd-3)))
5426
5427 (define-public python-ipython
5428 (package
5429 (name "python-ipython")
5430 (version "7.5.0")
5431 (source
5432 (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "ipython" version ".tar.gz"))
5435 (sha256
5436 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5437 (build-system python-build-system)
5438 (propagated-inputs
5439 `(("python-backcall" ,python-backcall)
5440 ("python-pyzmq" ,python-pyzmq)
5441 ("python-prompt-toolkit" ,python-prompt-toolkit)
5442 ("python-terminado" ,python-terminado)
5443 ("python-matplotlib" ,python-matplotlib)
5444 ("python-numpy" ,python-numpy)
5445 ("python-numpydoc" ,python-numpydoc)
5446 ("python-jedi" ,python-jedi)
5447 ("python-jinja2" ,python-jinja2)
5448 ("python-mistune" ,python-mistune)
5449 ("python-pexpect" ,python-pexpect)
5450 ("python-pickleshare" ,python-pickleshare)
5451 ("python-simplegeneric" ,python-simplegeneric)
5452 ("python-jsonschema" ,python-jsonschema)
5453 ("python-traitlets" ,python-traitlets)
5454 ("python-nbformat" ,python-nbformat)
5455 ("python-pygments" ,python-pygments)))
5456 (inputs
5457 `(("readline" ,readline)
5458 ("which" ,which)))
5459 (native-inputs
5460 `(("graphviz" ,graphviz)
5461 ("pkg-config" ,pkg-config)
5462 ("python-requests" ,python-requests) ;; for tests
5463 ("python-testpath" ,python-testpath)
5464 ("python-nose" ,python-nose)))
5465 (arguments
5466 `(#:phases
5467 (modify-phases %standard-phases
5468 (add-after 'unpack 'make-docs-reproducible
5469 (lambda _
5470 (substitute* "IPython/sphinxext/ipython_directive.py"
5471 ((".*import datetime") "")
5472 ((".*datetime.datetime.now\\(\\)") "")
5473 (("%timeit") "# %timeit"))
5474 #t))
5475 ;; Tests can only be run after the library has been installed and not
5476 ;; within the source directory.
5477 (delete 'check)
5478 (add-after 'install 'check
5479 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5480 (if tests?
5481 (begin
5482 ;; Make installed package available for running the tests
5483 (add-installed-pythonpath inputs outputs)
5484 (setenv "HOME" "/tmp/") ;; required by a test
5485 ;; We only test the core because one of the other tests
5486 ;; tries to import ipykernel.
5487 (invoke "python" "IPython/testing/iptest.py"
5488 "-v" "IPython/core/tests"))
5489 #t)))
5490 (add-before 'check 'fix-tests
5491 (lambda* (#:key inputs #:allow-other-keys)
5492 (substitute* "./IPython/utils/_process_posix.py"
5493 (("/usr/bin/env', 'which") (which "which")))
5494 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5495 (("#!/usr/bin/env python")
5496 (string-append "#!" (which "python"))))
5497 ;; This test introduces a circular dependency on ipykernel
5498 ;; (which depends on ipython).
5499 (delete-file "IPython/core/tests/test_display.py")
5500 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5501 (delete-file "IPython/core/tests/test_interactiveshell.py")
5502 #t)))))
5503 (home-page "https://ipython.org")
5504 (synopsis "IPython is a tool for interactive computing in Python")
5505 (description
5506 "IPython provides a rich architecture for interactive computing with:
5507 Powerful interactive shells, a browser-based notebook, support for interactive
5508 data visualization, embeddable interpreters and tools for parallel
5509 computing.")
5510 (license license:bsd-3)))
5511
5512 (define-public python-ipython-documentation
5513 (package
5514 (inherit python-ipython)
5515 (name "python-ipython-documentation")
5516 (version (package-version python-ipython))
5517 (arguments
5518 `(#:phases
5519 (modify-phases %standard-phases
5520 (delete 'build)
5521 (delete 'check)
5522 (replace 'install
5523 (lambda* (#:key outputs #:allow-other-keys)
5524 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5525 (doc (string-append data "/doc/" ,name "-" ,version))
5526 (html (string-append doc "/html"))
5527 (man1 (string-append data "/man/man1"))
5528 (info (string-append data "/info"))
5529 (examples (string-append doc "/examples"))
5530 (python-arg (string-append "PYTHON=" (which "python"))))
5531 (setenv "LANG" "en_US.utf8")
5532 (with-directory-excursion "docs"
5533 ;; FIXME: pdf fails to build
5534 ;;(system* "make" "pdf" "PAPER=a4")
5535 (system* "make" python-arg "html")
5536 ;; FIXME: the generated texi file contains ^@^@, which trips
5537 ;; up the parser.
5538 ;; (system* "make" python-arg "info")
5539 )
5540 (copy-recursively "docs/man" man1)
5541 (copy-recursively "examples" examples)
5542 (copy-recursively "docs/build/html" html)
5543 ;; (copy-file "docs/build/latex/ipython.pdf"
5544 ;; (string-append doc "/ipython.pdf"))
5545 (mkdir-p info)
5546 ;; (copy-file "docs/build/texinfo/ipython.info"
5547 ;; (string-append info "/ipython.info"))
5548 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5549 #t)))))
5550 (inputs
5551 `(("python-ipython" ,python-ipython)
5552 ("python-ipykernel" ,python-ipykernel)))
5553 (native-inputs
5554 `(("python-sphinx" ,python-sphinx)
5555 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5556 ;; FIXME: It's possible that a smaller union would work just as well.
5557 ("texlive" ,(texlive-union (list texlive-amsfonts
5558 texlive-fonts-ec
5559 texlive-generic-ifxetex
5560 texlive-generic-pdftex
5561 texlive-latex-capt-of
5562 texlive-latex-cmap
5563 texlive-latex-environ
5564 texlive-latex-eqparbox
5565 texlive-latex-etoolbox
5566 texlive-latex-expdlist
5567 texlive-latex-fancyhdr
5568 texlive-latex-fancyvrb
5569 texlive-latex-fncychap
5570 texlive-latex-float
5571 texlive-latex-framed
5572 texlive-latex-geometry
5573 texlive-latex-graphics
5574 texlive-latex-hyperref
5575 texlive-latex-mdwtools
5576 texlive-latex-multirow
5577 texlive-latex-needspace
5578 texlive-latex-oberdiek
5579 texlive-latex-parskip
5580 texlive-latex-preview
5581 texlive-latex-tabulary
5582 texlive-latex-threeparttable
5583 texlive-latex-titlesec
5584 texlive-latex-trimspaces
5585 texlive-latex-ucs
5586 texlive-latex-upquote
5587 texlive-latex-url
5588 texlive-latex-varwidth
5589 texlive-latex-wrapfig)))
5590 ("texinfo" ,texinfo)))))
5591
5592 (define-public python-urwid
5593 (package
5594 (name "python-urwid")
5595 (version "2.0.1")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (pypi-uri "urwid" version))
5600 (sha256
5601 (base32
5602 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5603 (build-system python-build-system)
5604 (home-page "http://urwid.org")
5605 (synopsis "Console user interface library for Python")
5606 (description
5607 "Urwid is a curses-based UI/widget library for Python. It includes many
5608 features useful for text console applications.")
5609 (license license:lgpl2.1+)))
5610
5611 (define-public python2-urwid
5612 (package-with-python2 python-urwid))
5613
5614 (define-public python-urwidtrees
5615 (package
5616 (name "python-urwidtrees")
5617 (version "1.0.2")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 ;; package author intends on distributing via github rather than pypi:
5622 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5623 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5624 version ".tar.gz"))
5625 (file-name (string-append name "-" version ".tar.gz"))
5626 (sha256
5627 (base32
5628 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5629 (build-system python-build-system)
5630 (arguments
5631 '(#:tests? #f)) ; no tests
5632 (propagated-inputs `(("python-urwid" ,python-urwid)))
5633 (home-page "https://github.com/pazz/urwidtrees")
5634 (synopsis "Tree widgets for urwid")
5635 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5636 toolkit. Use it to build trees of widgets.")
5637 (license license:gpl3+)))
5638
5639 (define-public python2-urwidtrees
5640 (package-with-python2 python-urwidtrees))
5641
5642 (define-public python-ua-parser
5643 (package
5644 (name "python-ua-parser")
5645 (version "0.8.0")
5646 (source
5647 (origin
5648 (method url-fetch)
5649 (uri (pypi-uri "ua-parser" version))
5650 (sha256
5651 (base32
5652 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5653 (build-system python-build-system)
5654 (arguments
5655 `(#:tests? #f)) ;no test suite in release
5656 (native-inputs
5657 `(("python-pyyaml" ,python-pyyaml)))
5658 (home-page "https://github.com/ua-parser/uap-python")
5659 (synopsis "User agent parser")
5660 (description
5661 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5662 (license license:asl2.0)))
5663
5664 (define-public python2-ua-parser
5665 (package-with-python2 python-ua-parser))
5666
5667 (define-public python-user-agents
5668 (package
5669 (name "python-user-agents")
5670 (version "1.1.0")
5671 (source
5672 (origin
5673 (method url-fetch)
5674 (uri (pypi-uri "user-agents" version))
5675 (sha256
5676 (base32
5677 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5678 (build-system python-build-system)
5679 (arguments
5680 `(#:tests? #f)) ;missing devices.json test file in release
5681 (propagated-inputs
5682 `(("python-ua-parser" ,python-ua-parser)))
5683 (home-page "https://github.com/selwin/python-user-agents")
5684 (synopsis "User Agent strings parsing library")
5685 (description
5686 "A library to identify devices (phones, tablets) and their capabilities by
5687 parsing (browser/HTTP) user agent strings.")
5688 (license license:expat)))
5689
5690 (define-public python2-user-agents
5691 (package-with-python2 python-user-agents))
5692
5693 (define-public python-dbus
5694 (package
5695 (name "python-dbus")
5696 (version "1.2.8")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5701 "dbus-python-" version ".tar.gz"))
5702 (sha256
5703 (base32
5704 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5705 (build-system gnu-build-system)
5706 (arguments
5707 '(#:phases
5708 (modify-phases %standard-phases
5709 (add-before
5710 'check 'pre-check
5711 (lambda _
5712 ;; XXX: For the missing '/etc/machine-id'.
5713 (substitute* "test/run-test.sh"
5714 (("DBUS_FATAL_WARNINGS=1")
5715 "DBUS_FATAL_WARNINGS=0"))
5716 #t)))))
5717 (native-inputs
5718 `(("pkg-config" ,pkg-config)))
5719 (inputs
5720 `(("python" ,python-wrapper)
5721 ("dbus-glib" ,dbus-glib)))
5722 (synopsis "Python bindings for D-bus")
5723 (description "python-dbus provides bindings for libdbus, the reference
5724 implementation of D-Bus.")
5725 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5726 (license license:expat)))
5727
5728 (define-public python2-dbus
5729 (package (inherit python-dbus)
5730 (name "python2-dbus")
5731 (inputs `(("python" ,python-2)
5732 ,@(alist-delete "python"
5733 (package-inputs python-dbus)
5734 equal?)))
5735 ;; FIXME: on Python 2, the test_utf8 fails with:
5736 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5737 (arguments `(#:tests? #f))))
5738
5739 (define-public python-notify2
5740 (package
5741 (name "python-notify2")
5742 (version "0.3.1")
5743 (source
5744 (origin
5745 (method url-fetch)
5746 (uri (pypi-uri "notify2" version))
5747 (sha256
5748 (base32
5749 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5750 (build-system python-build-system)
5751 (arguments `(#:tests? #f)) ; tests depend on system state
5752 (native-inputs
5753 `(("python-dbus" ,python-dbus)))
5754 (home-page "https://bitbucket.org/takluyver/pynotify2")
5755 (synopsis "Python interface to D-Bus notifications")
5756 (description
5757 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5758 It is a reimplementation of pynotify in pure Python, and an alternative to
5759 the GObject Introspection bindings to libnotify for non-GTK applications.")
5760 (license (list license:bsd-2
5761 license:lgpl2.1+))))
5762
5763 (define-public python2-notify2
5764 (package-with-python2 python-notify2))
5765
5766 (define-public python-lxml
5767 (package
5768 (name "python-lxml")
5769 (version "4.2.5")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "lxml" version))
5774 (sha256
5775 (base32
5776 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5777 (build-system python-build-system)
5778 (inputs
5779 `(("libxml2" ,libxml2)
5780 ("libxslt" ,libxslt)))
5781 (home-page "http://lxml.de/")
5782 (synopsis
5783 "Python XML processing library")
5784 (description
5785 "The lxml XML toolkit is a Pythonic binding for the C libraries
5786 libxml2 and libxslt.")
5787 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5788
5789 (define-public python2-lxml
5790 (package-with-python2 python-lxml))
5791
5792 ;; beautifulsoup4 has a totally different namespace than 3.x,
5793 ;; and pypi seems to put it under its own name, so I guess we should too
5794 (define-public python-beautifulsoup4
5795 (package
5796 (name "python-beautifulsoup4")
5797 (version "4.7.1")
5798 (source
5799 (origin
5800 (method url-fetch)
5801 (uri (pypi-uri "beautifulsoup4" version))
5802 (sha256
5803 (base32
5804 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5805 (build-system python-build-system)
5806 (arguments
5807 `(#:phases
5808 (modify-phases %standard-phases
5809 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5810 ;; must use this conversion script when building with Python 3. The
5811 ;; conversion script also runs the tests.
5812 ;; For more information, see the file 'convert-py3k' in the source
5813 ;; distribution.
5814 (replace 'check
5815 (lambda _ (invoke "./convert-py3k"))))))
5816 (propagated-inputs
5817 `(("python-soupsieve" ,python-soupsieve)))
5818 (home-page
5819 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5820 (synopsis
5821 "Python screen-scraping library")
5822 (description
5823 "Beautiful Soup is a Python library designed for rapidly setting up
5824 screen-scraping projects. It offers Pythonic idioms for navigating,
5825 searching, and modifying a parse tree, providing a toolkit for
5826 dissecting a document and extracting what you need. It automatically
5827 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5828 (license license:expat)
5829 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5830
5831 (define-public python2-beautifulsoup4
5832 (package
5833 (inherit (package-with-python2
5834 (strip-python2-variant python-beautifulsoup4)))
5835 (arguments `(#:python ,python-2))))
5836
5837 (define-public python-soupsieve
5838 (package
5839 (name "python-soupsieve")
5840 (version "1.9.2")
5841 (source
5842 (origin
5843 (method url-fetch)
5844 (uri (pypi-uri "soupsieve" version))
5845 (sha256
5846 (base32
5847 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5848 (build-system python-build-system)
5849 (arguments `(#:tests? #f))
5850 ;;XXX: 2 tests fail currently despite claming they were to be
5851 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5852 ;;don't want to create a circular dependency.
5853 (home-page "https://github.com/facelessuser/soupsieve")
5854 (synopsis "CSS selector library")
5855 (description
5856 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5857 Soup 4. It aims to provide selecting, matching, and filtering using modern
5858 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5859 specifications up through the latest CSS level 4 drafts and beyond (though
5860 some are not yet implemented).")
5861 (properties `((python2-variant . ,(delay python2-soupsieve))))
5862 (license license:expat)))
5863
5864 (define-public python2-soupsieve
5865 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5866 (package
5867 (inherit base)
5868 (propagated-inputs
5869 `(("python2-backports-functools-lru-cache"
5870 ,python2-backports-functools-lru-cache)
5871 ,@(package-propagated-inputs base))))))
5872
5873 (define-public python-netifaces
5874 (package
5875 (name "python-netifaces")
5876 (version "0.10.7")
5877 (source
5878 (origin
5879 (method url-fetch)
5880 (uri (pypi-uri "netifaces" version))
5881 (sha256
5882 (base32
5883 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5884 (build-system python-build-system)
5885 (home-page "https://github.com/al45tair/netifaces")
5886 (synopsis
5887 "Python module for portable network interface information")
5888 (description
5889 "Netifaces is a Python module providing information on network
5890 interfaces in an easy and portable manner.")
5891 (license license:expat)))
5892
5893 (define-public python2-netifaces
5894 (package-with-python2 python-netifaces))
5895
5896 (define-public python-networkx
5897 (package
5898 (name "python-networkx")
5899 (version "2.2")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri "networkx" version ".zip"))
5904 (sha256
5905 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5906 (build-system python-build-system)
5907 ;; python-decorator is needed at runtime.
5908 (propagated-inputs
5909 `(("python-decorator" ,python-decorator)))
5910 (native-inputs
5911 `(("python-nose" ,python-nose)
5912 ("unzip" ,unzip)))
5913 (home-page "https://networkx.github.io/")
5914 (synopsis "Python module for creating and manipulating graphs and networks")
5915 (description
5916 "NetworkX is a Python package for the creation, manipulation, and study
5917 of the structure, dynamics, and functions of complex networks.")
5918 (license license:bsd-3)))
5919
5920 (define-public python2-networkx
5921 (package-with-python2 python-networkx))
5922
5923 (define-public python-datrie
5924 (package
5925 (name "python-datrie")
5926 (version "0.7.1")
5927 (source
5928 (origin
5929 (method url-fetch)
5930 (uri (pypi-uri "datrie" version))
5931 (sha256
5932 (base32
5933 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5934 (build-system python-build-system)
5935 (arguments
5936 `(#:phases (modify-phases %standard-phases
5937 (add-before 'build 'cythonize
5938 (lambda _
5939 ;; Regenerate Cython classes to solve ABI issues with Python
5940 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5941 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5942 "src/stdio_ext.pxd" "-a"))))))
5943 (native-inputs
5944 `(("python-cython" ,python-cython)
5945 ("python-hypothesis" ,python-hypothesis)
5946 ("python-pytest" ,python-pytest)
5947 ("python-pytest-runner" ,python-pytest-runner)))
5948 (home-page "https://github.com/kmike/datrie")
5949 (synopsis "Fast, efficiently stored trie for Python")
5950 (description
5951 "This package provides a fast, efficiently stored trie implementation for
5952 Python.")
5953 (license license:lgpl2.1+)))
5954
5955 (define-public snakemake
5956 (package
5957 (name "snakemake")
5958 (version "5.2.4")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (pypi-uri "snakemake" version))
5963 (sha256
5964 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5965 (build-system python-build-system)
5966 (arguments
5967 ;; TODO: Package missing test dependencies.
5968 '(#:tests? #f
5969 #:phases
5970 (modify-phases %standard-phases
5971 ;; For cluster execution Snakemake will call Python. Since there is
5972 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5973 ;; this by calling the snakemake wrapper instead.
5974 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5975 (lambda* (#:key outputs #:allow-other-keys)
5976 (substitute* "snakemake/executors.py"
5977 (("\\{sys.executable\\} -m snakemake")
5978 (string-append (assoc-ref outputs "out")
5979 "/bin/snakemake")))
5980 #t)))))
5981 (propagated-inputs
5982 `(("python-gitpython" ,python-gitpython)
5983 ("python-wrapt" ,python-wrapt)
5984 ("python-requests" ,python-requests)
5985 ("python-appdirs" ,python-appdirs)
5986 ("python-configargparse" ,python-configargparse)
5987 ("python-datrie" ,python-datrie)
5988 ("python-docutils" ,python-docutils)
5989 ("python-jinja2" ,python-jinja2)
5990 ("python-jsonschema" ,python-jsonschema)
5991 ("python-networkx" ,python-networkx)
5992 ("python-pyyaml" ,python-pyyaml)
5993 ("python-ratelimiter" ,python-ratelimiter)))
5994 (home-page "https://snakemake.readthedocs.io")
5995 (synopsis "Python-based execution environment for make-like workflows")
5996 (description
5997 "Snakemake aims to reduce the complexity of creating workflows by
5998 providing a clean and modern domain specific specification language (DSL) in
5999 Python style, together with a fast and comfortable execution environment.")
6000 (license license:expat)))
6001
6002 ;; This is currently needed for the pigx-* packages.
6003 (define-public snakemake-4
6004 (package (inherit snakemake)
6005 (version "4.4.0")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (pypi-uri "snakemake" version))
6010 (sha256
6011 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6012 (propagated-inputs
6013 `(("python-wrapt" ,python-wrapt)
6014 ("python-requests" ,python-requests)
6015 ("python-appdirs" ,python-appdirs)
6016 ("python-configargparse" ,python-configargparse)
6017 ("python-pyyaml" ,python-pyyaml)
6018 ("python-ratelimiter" ,python-ratelimiter)))))
6019
6020 (define-public python-pyqrcode
6021 (package
6022 (name "python-pyqrcode")
6023 (version "1.2.1")
6024 (source
6025 (origin
6026 (method url-fetch)
6027 (uri (pypi-uri "PyQRCode" version))
6028 (sha256
6029 (base32
6030 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6031 (build-system python-build-system)
6032 (home-page
6033 "https://github.com/mnooner256/pyqrcode")
6034 (synopsis "QR code generator")
6035 (description
6036 "Pyqrcode is a QR code generator written purely in Python with
6037 SVG, EPS, PNG and terminal output.")
6038 (license license:bsd-3)))
6039
6040 (define-public python-seaborn
6041 (package
6042 (name "python-seaborn")
6043 (version "0.9.0")
6044 (source
6045 (origin
6046 (method url-fetch)
6047 (uri (pypi-uri "seaborn" version))
6048 (sha256
6049 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6050 (build-system python-build-system)
6051 (arguments
6052 `(#:phases
6053 (modify-phases %standard-phases
6054 (add-before 'check 'start-xserver
6055 (lambda* (#:key inputs #:allow-other-keys)
6056 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6057 ;; There must be a running X server and make check doesn't
6058 ;; start one. Therefore we must do it.
6059 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6060 (setenv "DISPLAY" ":1")
6061 #t)))
6062 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6063 (propagated-inputs
6064 `(("python-pandas" ,python-pandas)
6065 ("python-matplotlib" ,python-matplotlib)
6066 ("python-numpy" ,python-numpy)
6067 ("python-scipy" ,python-scipy)))
6068 (native-inputs
6069 `(("python-pytest" ,python-pytest)
6070 ("xorg-server" ,xorg-server)))
6071 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6072 (synopsis "Statistical data visualization")
6073 (description
6074 "Seaborn is a library for making attractive and informative statistical
6075 graphics in Python. It is built on top of matplotlib and tightly integrated
6076 with the PyData stack, including support for numpy and pandas data structures
6077 and statistical routines from scipy and statsmodels.")
6078 (license license:bsd-3)))
6079
6080 (define-public python2-seaborn
6081 (package-with-python2 python-seaborn))
6082
6083 (define-public python-mpmath
6084 (package
6085 (name "python-mpmath")
6086 (version "0.19")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (string-append "http://mpmath.org/files/mpmath-"
6090 version ".tar.gz"))
6091 (sha256
6092 (base32
6093 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6094 (build-system python-build-system)
6095 (arguments
6096 '(#:phases
6097 (modify-phases %standard-phases
6098 (replace 'check
6099 (lambda _
6100 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6101 (home-page "http://mpmath.org")
6102 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6103 (description
6104 "@code{mpmath} can be used as an arbitrary-precision substitute for
6105 Python's float/complex types and math/cmath modules, but also does much
6106 more advanced mathematics.")
6107 (license license:bsd-3)))
6108
6109 (define-public python2-mpmath
6110 (package-with-python2 python-mpmath))
6111
6112 (define-public python-bigfloat
6113 (package
6114 (name "python-bigfloat")
6115 (version "0.3.0")
6116 (source
6117 (origin
6118 (method url-fetch)
6119 (uri (pypi-uri "bigfloat" version))
6120 (sha256
6121 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6122 (build-system python-build-system)
6123 (inputs
6124 `(("mpfr" ,mpfr)))
6125 (home-page "https://github.com/mdickinson/bigfloat")
6126 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6127 (description
6128 "This package provides a Python interface to the MPFR library for
6129 multiprecision arithmetic.")
6130 (license license:lgpl3+)))
6131
6132 (define-public python2-bigfloat
6133 (package-with-python2 python-bigfloat))
6134
6135 (define-public python-sympy
6136 (package
6137 (name "python-sympy")
6138 (version "1.1.1")
6139 (source
6140 (origin
6141 (method url-fetch)
6142 (uri (string-append
6143 "https://github.com/sympy/sympy/releases/download/sympy-"
6144 version "/sympy-" version ".tar.gz"))
6145 (sha256
6146 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6147 (build-system python-build-system)
6148 (arguments
6149 `(#:phases
6150 (modify-phases %standard-phases
6151 ;; Run the core tests after installation. By default it would run
6152 ;; *all* tests, which take a very long time to complete and are known
6153 ;; to be flaky.
6154 (delete 'check)
6155 (add-after 'install 'check
6156 (lambda* (#:key outputs #:allow-other-keys)
6157 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6158 #t)))))
6159 (propagated-inputs
6160 `(("python-mpmath" ,python-mpmath)))
6161 (home-page "http://www.sympy.org/")
6162 (synopsis "Python library for symbolic mathematics")
6163 (description
6164 "SymPy is a Python library for symbolic mathematics. It aims to become a
6165 full-featured computer algebra system (CAS) while keeping the code as simple
6166 as possible in order to be comprehensible and easily extensible.")
6167 (license license:bsd-3)))
6168
6169 (define-public python2-sympy
6170 (package
6171 (inherit (package-with-python2 python-sympy))
6172 (arguments
6173 `(#:phases
6174 (modify-phases %standard-phases
6175 ;; Run the core tests after installation. By default it would run
6176 ;; *all* tests, which take a very long time to complete and are known
6177 ;; to be flaky.
6178 (delete 'check)
6179 (add-after 'install 'check
6180 (lambda* (#:key outputs #:allow-other-keys)
6181 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6182 #t)))))))
6183
6184 (define-public python-q
6185 (package
6186 (name "python-q")
6187 (version "2.6")
6188 (source
6189 (origin
6190 (method url-fetch)
6191 (uri (pypi-uri "q" version))
6192 (sha256
6193 (base32
6194 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6195 (build-system python-build-system)
6196 (home-page "https://github.com/zestyping/q")
6197 (synopsis "Quick-and-dirty debugging output for tired programmers")
6198 (description
6199 "q is a Python module for \"print\" style of debugging Python code. It
6200 provides convenient short API for print out of values, tracebacks, and
6201 falling into the Python interpreter.")
6202 (license license:asl2.0)))
6203
6204 (define-public python2-q
6205 (package-with-python2 python-q))
6206
6207 (define-public python2-xlib
6208 (package
6209 (name "python2-xlib")
6210 (version "0.14")
6211 (source (origin
6212 (method url-fetch)
6213 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6214 "/" version "/"
6215 "python-xlib-" version ".tar.gz"))
6216 (sha256
6217 (base32
6218 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6219 (build-system python-build-system)
6220 (arguments
6221 `(#:python ,python-2 ;Python 2 only
6222 #:tests? #f)) ;no tests
6223 (home-page "http://python-xlib.sourceforge.net/")
6224 (synopsis "Python X11 client library")
6225 (description
6226 "The Python X Library is intended to be a fully functional X client
6227 library for Python programs. It is useful to implement low-level X clients.
6228 It is written entirely in Python.")
6229 (license license:gpl2+)))
6230
6231 (define-public python-singledispatch
6232 (package
6233 (name "python-singledispatch")
6234 (version "3.4.0.3")
6235 (source
6236 (origin
6237 (method url-fetch)
6238 (uri (pypi-uri "singledispatch" version))
6239 (sha256
6240 (base32
6241 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6242 (build-system python-build-system)
6243 (native-inputs
6244 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6245 (home-page
6246 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6247 (synopsis "Backport of singledispatch feature from Python 3.4")
6248 (description
6249 "This library brings functools.singledispatch from Python 3.4 to Python
6250 2.6-3.3.")
6251 (license license:expat)))
6252
6253 (define-public python2-singledispatch
6254 (package-with-python2 python-singledispatch))
6255
6256 ;; the python- version can be removed with python-3.5
6257 (define-public python-backports-abc
6258 (package
6259 (name "python-backports-abc")
6260 (version "0.5")
6261 (source
6262 (origin
6263 (method url-fetch)
6264 (uri (pypi-uri "backports_abc" version))
6265 (sha256
6266 (base32
6267 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6268 (build-system python-build-system)
6269 (home-page "https://github.com/cython/backports_abc")
6270 (synopsis "Backport of additions to the 'collections.abc' module")
6271 (description
6272 "Python-backports-abc provides a backport of additions to the
6273 @code{collections.abc} module in Python-3.5.")
6274 (license license:psfl)))
6275
6276 (define-public python2-backports-abc
6277 (package-with-python2 python-backports-abc))
6278
6279 (define-public python-backports-csv
6280 (package
6281 (name "python-backports-csv")
6282 (version "1.0.5")
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (pypi-uri "backports.csv" version))
6287 (sha256
6288 (base32
6289 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6290 (build-system python-build-system)
6291 (home-page "https://github.com/ryanhiebert/backports.csv")
6292 (synopsis "Backport of Python 3's csv module for Python 2")
6293 (description
6294 "Provides a backport of Python 3's @code{csv} module for parsing
6295 comma separated values. The API of the @code{csv} module in Python 2
6296 is drastically different from the @code{csv} module in Python 3.
6297 This is due, for the most part, to the difference between str in
6298 Python 2 and Python 3.")
6299 (license license:psfl)))
6300
6301 (define-public python2-backports-csv
6302 (package-with-python2 python-backports-csv))
6303
6304 (define-public python2-backports-shutil-get-terminal-size
6305 (package
6306 (name "python2-backports-shutil-get-terminal-size")
6307 (version "1.0.0")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6312 (sha256
6313 (base32
6314 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6315 (build-system python-build-system)
6316 (arguments
6317 `(#:python ,python-2
6318 #:phases
6319 (modify-phases %standard-phases
6320 (replace 'check
6321 (lambda _
6322 (invoke "py.test" "-v"))))))
6323 (native-inputs
6324 `(("python2-pytest" ,python2-pytest)))
6325 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6326 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6327 (description
6328 "This package provides a backport of the @code{get_terminal_size
6329 function} from Python 3.3's @code{shutil}.
6330 Unlike the original version it is written in pure Python rather than C,
6331 so it might be a tiny bit slower.")
6332 (license license:expat)))
6333
6334 (define-public python-waf
6335 (package
6336 (name "python-waf")
6337 (version "2.0.11")
6338 (source (origin
6339 (method url-fetch)
6340 (uri (string-append "https://waf.io/"
6341 "waf-" version ".tar.bz2"))
6342 (sha256
6343 (base32
6344 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6345 (build-system python-build-system)
6346 (arguments
6347 '(#:phases
6348 (modify-phases %standard-phases
6349 (replace 'build
6350 (lambda _
6351 (invoke "python" "waf-light" "configure" "build")))
6352 (replace 'check
6353 (lambda _
6354 (invoke "python" "waf" "--version")))
6355 (replace 'install
6356 (lambda* (#:key outputs #:allow-other-keys)
6357 (let ((out (assoc-ref outputs "out")))
6358 (install-file "waf" (string-append out "/bin")))
6359 #t))
6360 ;; waf breaks when it is wrapped.
6361 (delete 'wrap))))
6362 (home-page "https://waf.io/")
6363 (synopsis "Python-based build system")
6364 (description
6365 "Waf is a Python-based framework for configuring, compiling and installing
6366 applications.")
6367 (license license:bsd-3)))
6368
6369 (define-public python2-waf
6370 (package-with-python2 python-waf))
6371
6372 (define-public python-pyzmq
6373 (package
6374 (name "python-pyzmq")
6375 (version "17.1.2")
6376 (source
6377 (origin
6378 (method url-fetch)
6379 (uri (pypi-uri "pyzmq" version))
6380 (sha256
6381 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6382 (build-system python-build-system)
6383 (arguments
6384 `(#:configure-flags
6385 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6386 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6387 ;; --inplace' for 'python setup.py test' to work.
6388 #:tests? #f))
6389 (inputs
6390 `(("zeromq" ,zeromq)))
6391 (native-inputs
6392 `(("pkg-config" ,pkg-config)
6393 ("python-nose" ,python-nose)))
6394 (home-page "https://github.com/zeromq/pyzmq")
6395 (synopsis "Python bindings for 0MQ")
6396 (description
6397 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6398 (license license:bsd-4)))
6399
6400 (define-public python2-pyzmq
6401 (package-with-python2 python-pyzmq))
6402
6403 (define-public python-pep8
6404 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6405 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6406 ;; some dependents' test suites, and nothing more.
6407 (package
6408 (name "python-pep8")
6409 (version "1.7.0")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (pypi-uri "pep8" version))
6414 (sha256
6415 (base32
6416 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6417 (build-system python-build-system)
6418 (home-page "https://pep8.readthedocs.org/")
6419 (synopsis "Python style guide checker")
6420 (description
6421 "This tools checks Python code against some of the style conventions in
6422 PEP 8.")
6423 (license license:expat)))
6424
6425 (define-public python2-pep8
6426 (package-with-python2 python-pep8))
6427
6428 (define-public python-pyflakes
6429 (package
6430 (name "python-pyflakes")
6431 (version "2.0.0")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "pyflakes" version))
6436 (sha256
6437 (base32
6438 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6439 (build-system python-build-system)
6440 (home-page
6441 "https://github.com/pyflakes/pyflakes")
6442 (synopsis "Passive checker of Python programs")
6443 (description
6444 "Pyflakes statically checks Python source code for common errors.")
6445 (license license:expat)))
6446
6447 (define-public python2-pyflakes
6448 (package-with-python2 python-pyflakes))
6449
6450 (define-public python-mccabe
6451 (package
6452 (name "python-mccabe")
6453 (version "0.6.1")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "mccabe" version))
6458 (sha256
6459 (base32
6460 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6461 (build-system python-build-system)
6462 (native-inputs
6463 `(("python-pytest" ,python-pytest-bootstrap)
6464 ("python-pytest-runner" ,python-pytest-runner)))
6465 (home-page "https://github.com/flintwork/mccabe")
6466 (synopsis "McCabe checker, plugin for flake8")
6467 (description
6468 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6469 complexity of Python source code.")
6470 (license license:expat)))
6471
6472 (define-public python2-mccabe
6473 (package-with-python2 python-mccabe))
6474
6475 (define-public python-mccabe-0.2.1
6476 (package (inherit python-mccabe)
6477 (version "0.2.1")
6478 (source
6479 (origin
6480 (method url-fetch)
6481 (uri (pypi-uri "mccabe" version))
6482 (sha256
6483 (base32
6484 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6485
6486 (define-public python2-mccabe-0.2.1
6487 (package-with-python2 python-mccabe-0.2.1))
6488
6489 ;; Flake8 2.4.1 requires an older version of pep8.
6490 ;; This should be removed ASAP.
6491 (define-public python-pep8-1.5.7
6492 (package (inherit python-pep8)
6493 (version "1.5.7")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (pypi-uri "pep8" version))
6498 (sha256
6499 (base32
6500 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6501 (arguments
6502 ;; XXX Tests not compatible with Python 3.5.
6503 '(#:tests? #f))))
6504
6505 (define-public python2-pep8-1.5.7
6506 (package-with-python2 python-pep8-1.5.7))
6507
6508 ;; Flake8 2.4.1 requires an older version of pyflakes.
6509 ;; This should be removed ASAP.
6510 (define-public python-pyflakes-0.8.1
6511 (package (inherit python-pyflakes)
6512 (version "0.8.1")
6513 (source
6514 (origin
6515 (method url-fetch)
6516 (uri (pypi-uri "pyflakes" version))
6517 (sha256
6518 (base32
6519 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6520 (arguments
6521 ;; XXX Tests not compatible with Python 3.5.
6522 '(#:tests? #f))))
6523
6524 (define-public python2-pyflakes-0.8.1
6525 (package-with-python2 python-pyflakes-0.8.1))
6526
6527 ;; This package is used by hypothesis which has thousands of dependent packages.
6528 ;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6529 (define-public python-flake8-3.5
6530 (package
6531 (name "python-flake8")
6532 (version "3.5.0")
6533 (source
6534 (origin
6535 (method url-fetch)
6536 (uri (pypi-uri "flake8" version))
6537 (sha256
6538 (base32
6539 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6540 (build-system python-build-system)
6541 (arguments
6542 `(#:phases
6543 (modify-phases %standard-phases
6544 ;; Two errors don't seem to have assigned codes.
6545 (add-after 'unpack 'delete-broken-test
6546 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6547 (add-after 'unpack 'fix-problem-with-pycodestyle
6548 (lambda _
6549 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6550 ;; This should no longer be needed with the next release.
6551 (substitute* "setup.py"
6552 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6553 "PEP8_PLUGIN('break_after_binary_operator'),\
6554 PEP8_PLUGIN('break_before_binary_operator'),"))
6555 #t))
6556 (delete 'check)
6557 (add-after 'install 'check
6558 (lambda* (#:key inputs outputs #:allow-other-keys)
6559 (add-installed-pythonpath inputs outputs)
6560 (invoke "pytest" "-v")
6561 #t)))))
6562 (propagated-inputs
6563 `(("python-pycodestyle" ,python-pycodestyle)
6564 ("python-pyflakes" ,python-pyflakes)
6565 ("python-mccabe" ,python-mccabe)))
6566 (native-inputs
6567 `(("python-mock" ,python-mock)
6568 ("python-pytest" ,python-pytest-bootstrap)
6569 ("python-pytest-runner" ,python-pytest-runner)))
6570 (home-page "https://gitlab.com/pycqa/flake8")
6571 (synopsis
6572 "The modular source code checker: pep8, pyflakes and co")
6573 (description
6574 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6575 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6576 (license license:expat)))
6577
6578 (define-public python2-flake8-3.5
6579 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6580 (package (inherit base)
6581 (propagated-inputs
6582 `(("python2-configparser" ,python2-configparser)
6583 ("python2-enum34" ,python2-enum34)
6584 ,@(package-propagated-inputs base))))))
6585
6586 ;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6587 ;; this newer version. Keep it as a separate variable for now to avoid
6588 ;; rebuilding "python-hypothesis"; this should be removed in the next
6589 ;; rebuild cycle.
6590 (define-public python-flake8
6591 (package
6592 (inherit python-flake8-3.5)
6593 (version "3.6.0")
6594 (source (origin
6595 (method url-fetch)
6596 (uri (pypi-uri "flake8" version))
6597 (sha256
6598 (base32
6599 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6600 (arguments
6601 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6602 ((#:phases phases)
6603 `(modify-phases ,phases
6604 (delete 'delete-broken-test)
6605 (delete 'fix-problem-with-pycodestyle)))))
6606 (properties `((python2-variant . ,(delay python2-flake8))))))
6607
6608 (define-public python2-flake8
6609 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6610 (package (inherit base)
6611 (propagated-inputs
6612 (package-propagated-inputs python2-flake8-3.5)))))
6613
6614 ;; python-hacking requires flake8 <2.6.0.
6615 (define-public python-flake8-2.5
6616 (package
6617 (inherit python-flake8)
6618 (version "2.5.5")
6619 (source (origin
6620 (method url-fetch)
6621 (uri (pypi-uri "flake8" version))
6622 (sha256
6623 (base32
6624 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6625 (propagated-inputs
6626 `(("python-pep8" ,python-pep8)
6627 ,@(package-propagated-inputs python-flake8)))
6628 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6629
6630 (define-public python2-flake8-2.5
6631 (package
6632 (inherit python2-flake8)
6633 (version (package-version python-flake8-2.5))
6634 (source (origin
6635 (inherit (package-source python-flake8-2.5))))
6636 (propagated-inputs
6637 `(("python2-pep8" ,python2-pep8)
6638 ,@(package-propagated-inputs python2-flake8)))))
6639
6640 (define-public python-flake8-polyfill
6641 (package
6642 (name "python-flake8-polyfill")
6643 (version "1.0.2")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (pypi-uri "flake8-polyfill" version))
6648 (sha256
6649 (base32
6650 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6651 (build-system python-build-system)
6652 (arguments
6653 '(#:phases
6654 (modify-phases %standard-phases
6655 (replace 'check
6656 (lambda _
6657 (setenv "PYTHONPATH"
6658 (string-append (getcwd) "/build/lib:"
6659 (getenv "PYTHONPATH")))
6660 (invoke "py.test" "-v"))))))
6661 (native-inputs
6662 `(("python-flake8" ,python-flake8)
6663 ("python-mock" ,python-mock)
6664 ("python-pep8" ,python-pep8)
6665 ("python-pycodestyle" ,python-pycodestyle)
6666 ("python-pytest" ,python-pytest)))
6667 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6668 (synopsis "Polyfill package for Flake8 plugins")
6669 (description
6670 "This package that provides some compatibility helpers for Flake8
6671 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6672 (license license:expat)))
6673
6674 (define-public python2-flake8-polyfill
6675 (package-with-python2 python-flake8-polyfill))
6676
6677 (define-public python-mistune
6678 (package
6679 (name "python-mistune")
6680 (version "0.8.4")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (pypi-uri "mistune" version))
6685 (sha256
6686 (base32
6687 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6688 (build-system python-build-system)
6689 (native-inputs
6690 `(("python-nose" ,python-nose)
6691 ("python-cython" ,python-cython)))
6692 (home-page "https://github.com/lepture/mistune")
6693 (synopsis "Markdown parser in pure Python")
6694 (description "This package provides a fast markdown parser in pure
6695 Python.")
6696 (license license:bsd-3)))
6697
6698 (define-public python2-mistune
6699 (package-with-python2 python-mistune))
6700
6701 (define-public python-markdown
6702 (package
6703 (name "python-markdown")
6704 (version "3.1.1")
6705 (source
6706 (origin
6707 (method url-fetch)
6708 (uri (pypi-uri "Markdown" version))
6709 (sha256
6710 (base32
6711 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6712 (build-system python-build-system)
6713 (native-inputs
6714 `(("python-nose" ,python-nose)
6715 ("python-pyyaml" ,python-pyyaml)))
6716 (home-page "https://python-markdown.github.io/")
6717 (synopsis "Python implementation of Markdown")
6718 (description
6719 "This package provides a Python implementation of John Gruber's
6720 Markdown. The library features international input, various Markdown
6721 extensions, and several HTML output formats. A command line wrapper
6722 markdown_py is also provided to convert Markdown files to HTML.")
6723 (license license:bsd-3)))
6724
6725 (define-public python2-markdown
6726 (package-with-python2 python-markdown))
6727
6728 (define-public python-ptyprocess
6729 (package
6730 (name "python-ptyprocess")
6731 (version "0.5.2")
6732 (source
6733 (origin
6734 (method url-fetch)
6735 (uri (pypi-uri "ptyprocess" version))
6736 (sha256
6737 (base32
6738 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6739 (build-system python-build-system)
6740 (native-inputs
6741 `(("python-nose" ,python-nose)))
6742 (arguments
6743 `(#:phases
6744 (modify-phases %standard-phases
6745 (replace 'check
6746 (lambda _ (invoke "nosetests"))))))
6747 (home-page "https://github.com/pexpect/ptyprocess")
6748 (synopsis "Run a subprocess in a pseudo terminal")
6749 (description
6750 "This package provides a Python library used to launch a subprocess in a
6751 pseudo terminal (pty), and interact with both the process and its pty.")
6752 (license license:isc)))
6753
6754 (define-public python2-ptyprocess
6755 (package-with-python2 python-ptyprocess))
6756
6757 (define-public python-cram
6758 (package
6759 (name "python-cram")
6760 (version "0.7")
6761 (home-page "https://bitheap.org/cram/")
6762 (source (origin
6763 (method url-fetch)
6764 (uri (list (string-append home-page "cram-"
6765 version ".tar.gz")
6766 (pypi-uri "cram" version)))
6767 (sha256
6768 (base32
6769 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6770 (arguments
6771 '(#:phases
6772 (modify-phases %standard-phases
6773 (add-after 'unpack 'patch-source
6774 (lambda _
6775 (substitute* (find-files "cram" ".*\\.py$")
6776 ;; Replace default shell path.
6777 (("/bin/sh") (which "sh")))
6778 (substitute* (find-files "tests" ".*\\.t$")
6779 (("md5") "md5sum")
6780 (("/bin/bash") (which "bash"))
6781 (("/bin/sh") (which "sh")))
6782 (substitute* "cram/_test.py"
6783 ;; This hack works around a bug triggered by substituting
6784 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6785 ;; "cram -h", which breaks the output at 80 characters. This
6786 ;; causes the line showing the default shell to break into two
6787 ;; lines, but the test expects a single line...
6788 (("env\\['COLUMNS'\\] = '80'")
6789 "env['COLUMNS'] = '160'"))
6790 #t))
6791 (delete 'check)
6792 (add-after 'install 'check
6793 ;; The test phase uses the built library and executable.
6794 ;; It's easier to run it after install since the build
6795 ;; directory contains version-specific PATH.
6796 (lambda* (#:key inputs outputs #:allow-other-keys)
6797 (add-installed-pythonpath inputs outputs)
6798 (setenv "PATH" (string-append (getenv "PATH") ":"
6799 (assoc-ref outputs "out") "/bin"))
6800 (invoke "make" "test"))))))
6801 (build-system python-build-system)
6802 (native-inputs
6803 `(("python-coverage" ,python-coverage)
6804 ("which" ,which)))
6805 (synopsis "Simple testing framework for command line applications")
6806 (description
6807 "Cram is a functional testing framework for command line applications.
6808 Cram tests look like snippets of interactive shell sessions. Cram runs each
6809 command and compares the command output in the test with the command’s actual
6810 output.")
6811 (license license:gpl2+)))
6812
6813 (define-public python2-cram
6814 (package-with-python2 python-cram))
6815
6816 (define-public python-straight-plugin
6817 (package
6818 (name "python-straight-plugin")
6819 (version "1.4.1")
6820 (source
6821 (origin
6822 (method url-fetch)
6823 (uri (pypi-uri "straight.plugin" version))
6824 (sha256
6825 (base32
6826 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6827 (build-system python-build-system)
6828 (home-page "https://github.com/ironfroggy/straight.plugin")
6829 (synopsis "Simple namespaced plugin facility")
6830 (description "Straight Plugin provides a type of plugin you can create from
6831 almost any existing Python modules, and an easy way for outside developers to
6832 add functionality and customization to your projects with their own plugins.")
6833 (license license:expat)))
6834
6835 (define-public python2-straight-plugin
6836 (package-with-python2 python-straight-plugin))
6837
6838 (define-public python-fonttools
6839 (package
6840 (name "python-fonttools")
6841 (version "3.28.0")
6842 (source (origin
6843 (method url-fetch)
6844 (uri (pypi-uri "fonttools" version ".zip"))
6845 (sha256
6846 (base32
6847 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6848 (build-system python-build-system)
6849 (native-inputs
6850 `(("unzip" ,unzip)
6851 ("python-pytest" ,python-pytest)
6852 ("python-pytest-runner" ,python-pytest-runner)))
6853 (home-page "https://github.com/behdad/fonttools")
6854 (synopsis "Tools to manipulate font files")
6855 (description
6856 "FontTools/TTX is a library to manipulate font files from Python. It
6857 supports reading and writing of TrueType/OpenType fonts, reading and writing
6858 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6859 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6860 from an XML-based format.")
6861 (license license:expat)))
6862
6863 (define-public python2-fonttools
6864 (package-with-python2 python-fonttools))
6865
6866 (define-public python-ly
6867 (package
6868 (name "python-ly")
6869 (version "0.9.5")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri name version))
6874 (sha256
6875 (base32
6876 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6877 (build-system python-build-system)
6878 (arguments
6879 ;; FIXME: Some tests need network access.
6880 '(#:tests? #f))
6881 (synopsis "Tool and library for manipulating LilyPond files")
6882 (description "This package provides a Python library to parse, manipulate
6883 or create documents in LilyPond format. A command line program ly is also
6884 provided that can be used to do various manipulations with LilyPond files.")
6885 (home-page "https://pypi.python.org/pypi/python-ly")
6886 (license license:gpl2+)))
6887
6888 (define-public python-appdirs
6889 (package
6890 (name "python-appdirs")
6891 (version "1.4.3")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri "appdirs" version))
6896 (sha256
6897 (base32
6898 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6899 (build-system python-build-system)
6900 (home-page "https://github.com/ActiveState/appdirs")
6901 (synopsis
6902 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6903 (description
6904 "This module provides a portable way of finding out where user data
6905 should be stored on various operating systems.")
6906 (license license:expat)))
6907
6908 (define-public python2-appdirs
6909 (package-with-python2 python-appdirs))
6910
6911 (define-public python-llfuse
6912 (package
6913 (name "python-llfuse")
6914 (version "1.3.5")
6915 (source (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6918 (sha256
6919 (base32
6920 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6921 (build-system python-build-system)
6922 (inputs
6923 `(("fuse" ,fuse)
6924 ("attr" ,attr)))
6925 (native-inputs
6926 `(("pkg-config" ,pkg-config)))
6927 (synopsis "Python bindings for FUSE")
6928 (description
6929 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6930 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6931 (license license:lgpl2.0+)
6932 (properties `((python2-variant . ,(delay python2-llfuse))))))
6933
6934 (define-public python2-llfuse
6935 (package (inherit (package-with-python2
6936 (strip-python2-variant python-llfuse)))
6937 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6938
6939 ;; For attic-0.16
6940 (define-public python-llfuse-0.41
6941 (package (inherit python-llfuse)
6942 (version "0.41.1")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (string-append
6946 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6947 "llfuse-" version ".tar.bz2"))
6948 (sha256
6949 (base32
6950 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6951 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6952 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6953 (license (list license:expat license:lgpl2.0+))))
6954
6955 (define-public python-msgpack
6956 (package
6957 (name "python-msgpack")
6958 (version "0.5.6")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "msgpack" version))
6962 (sha256
6963 (base32
6964 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6965 (build-system python-build-system)
6966 (arguments
6967 `(#:modules ((guix build utils)
6968 (guix build python-build-system)
6969 (ice-9 ftw)
6970 (srfi srfi-1)
6971 (srfi srfi-26))
6972 #:phases
6973 (modify-phases %standard-phases
6974 (replace 'check
6975 (lambda _
6976 (let ((cwd (getcwd)))
6977 (setenv "PYTHONPATH"
6978 (string-append cwd "/build/"
6979 (find (cut string-prefix? "lib" <>)
6980 (scandir (string-append cwd "/build")))
6981 ":"
6982 (getenv "PYTHONPATH")))
6983 (invoke "pytest" "-v" "test")))))))
6984 (native-inputs
6985 `(("python-pytest" ,python-pytest)))
6986 (synopsis "MessagePack (de)serializer")
6987 (description "MessagePack is a fast, compact binary serialization format,
6988 suitable for similar data to JSON. This package provides CPython bindings for
6989 reading and writing MessagePack data.")
6990 (home-page "https://pypi.python.org/pypi/msgpack/")
6991 (license license:asl2.0)))
6992
6993 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6994 ;; release 0.5. Some packages like borg still call it by the old name for now.
6995 ;; <https://bugs.gnu.org/30662>
6996 (define-public python-msgpack-transitional
6997 (package
6998 (inherit python-msgpack)
6999 (name "python-msgpack-transitional")
7000 (arguments
7001 (substitute-keyword-arguments (package-arguments python-msgpack)
7002 ((#:phases phases)
7003 `(modify-phases ,phases
7004 (add-after 'unpack 'configure-transitional
7005 (lambda _
7006 ;; Keep using the old name.
7007 (substitute* "setup.py"
7008 (("TRANSITIONAL = False")
7009 "TRANSITIONAL = 1"))
7010 #t))))))))
7011
7012 (define-public python2-msgpack
7013 (package-with-python2 python-msgpack))
7014
7015 (define-public python-netaddr
7016 (package
7017 (name "python-netaddr")
7018 (version "0.7.19")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "netaddr" version))
7023 (sha256
7024 (base32
7025 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7026 (build-system python-build-system)
7027 (arguments `(#:tests? #f)) ;; No tests.
7028 (home-page "https://github.com/drkjam/netaddr/")
7029 (synopsis "Pythonic manipulation of network addresses")
7030 (description
7031 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7032 and MAC network addresses.")
7033 (license license:bsd-3)))
7034
7035 (define-public python2-netaddr
7036 (package-with-python2 python-netaddr))
7037
7038 (define-public python2-pyroute2
7039 (package
7040 (name "python2-pyroute2")
7041 (version "0.5.6")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "pyroute2" version))
7046 (sha256
7047 (base32
7048 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7049 (build-system python-build-system)
7050 (arguments
7051 `(#:python ,python-2)) ;Python 3.x is not supported
7052 (home-page "https://github.com/svinota/pyroute2")
7053 (synopsis "Python netlink library")
7054 (description
7055 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7056 Supported netlink families and protocols include:
7057 @itemize
7058 @item rtnl, network settings - addresses, routes, traffic controls
7059 @item nfnetlink - netfilter API: ipset, nftables, ...
7060 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7061 @item devlink - manage and monitor devlink-enabled hardware
7062 @item generic - generic netlink families
7063 @itemize
7064 @item nl80211 - wireless functions API (basic support)
7065 @item taskstats - extended process statistics
7066 @item acpi_events - ACPI events monitoring
7067 @item thermal_events - thermal events monitoring
7068 @item VFS_DQUOT - disk quota events monitoring
7069 @end itemize
7070 @end itemize")
7071 (license license:gpl2+)))
7072
7073 (define-public python-wrapt
7074 (package
7075 (name "python-wrapt")
7076 (version "1.11.2")
7077 (source
7078 (origin
7079 (method url-fetch)
7080 (uri (pypi-uri "wrapt" version))
7081 (sha256
7082 (base32
7083 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7084 (build-system python-build-system)
7085 (arguments
7086 ;; Tests are not included in the tarball, they are only available in the
7087 ;; git repository.
7088 `(#:tests? #f))
7089 (home-page "https://github.com/GrahamDumpleton/wrapt")
7090 (synopsis "Module for decorators, wrappers and monkey patching")
7091 (description
7092 "The aim of the wrapt module is to provide a transparent object proxy for
7093 Python, which can be used as the basis for the construction of function
7094 wrappers and decorator functions.")
7095 (license license:bsd-2)))
7096
7097 (define-public python2-wrapt
7098 (package-with-python2 python-wrapt))
7099
7100 (define-public python-xlrd
7101 (package
7102 (name "python-xlrd")
7103 (version "1.0.0")
7104 (source (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "xlrd" version))
7107 (sha256
7108 (base32
7109 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7110 (build-system python-build-system)
7111 (arguments
7112 `(#:phases
7113 (modify-phases %standard-phases
7114 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7115 ;; run tests instead for now.
7116 (replace 'check (lambda _ (invoke "nosetests"))))))
7117 (native-inputs `(("python-nose" ,python-nose)))
7118 (home-page "http://www.python-excel.org/")
7119 (synopsis "Library for extracting data from Excel files")
7120 (description "This package provides a library to extract data from
7121 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7122 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7123 Unicode-aware. It is not intended as an end-user tool.")
7124 (license license:bsd-3)))
7125
7126 (define-public python2-xlrd
7127 (package-with-python2 python-xlrd))
7128
7129 (define-public python-prettytable
7130 (package
7131 (name "python-prettytable")
7132 (version "0.7.2")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7137 (sha256
7138 (base32
7139 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7140 (build-system python-build-system)
7141 (home-page "http://code.google.com/p/prettytable/")
7142 (synopsis "Display tabular data in an ASCII table format")
7143 (description
7144 "A library designed to represent tabular data in visually appealing ASCII
7145 tables. PrettyTable allows for selection of which columns are to be printed,
7146 independent alignment of columns (left or right justified or centred) and
7147 printing of sub-tables by specifying a row range.")
7148 (license license:bsd-3)))
7149
7150 (define-public python2-prettytable
7151 (package-with-python2 python-prettytable))
7152
7153 (define-public python-tables
7154 (package
7155 (name "python-tables")
7156 (version "3.4.4")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (pypi-uri "tables" version))
7161 (sha256
7162 (base32
7163 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7164 (modules '((guix build utils)))
7165 (snippet
7166 '(begin
7167 ;; Remove pre-compiled .pyc files from source.
7168 (for-each delete-file-recursively
7169 (find-files "." "__pycache__" #:directories? #t))
7170 (for-each delete-file (find-files "." "\\.pyc$"))
7171 #t))))
7172 (build-system python-build-system)
7173 (arguments
7174 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7175 ;; or "check", so we must override the build and check phases.
7176 #:phases
7177 (modify-phases %standard-phases
7178 (add-after 'unpack 'use-gcc
7179 (lambda _
7180 (substitute* "setup.py"
7181 (("compiler = new_compiler\\(\\)" line)
7182 (string-append line
7183 "\ncompiler.set_executables(compiler='gcc',"
7184 "compiler_so='gcc',"
7185 "linker_exe='gcc',"
7186 "linker_so='gcc -shared')")))
7187 #t))
7188 (replace 'build
7189 (lambda* (#:key inputs #:allow-other-keys)
7190 (invoke "python" "setup.py" "build"
7191 (string-append "--hdf5="
7192 (assoc-ref inputs "hdf5")))))
7193 (replace 'check
7194 (lambda* (#:key inputs #:allow-other-keys)
7195 (invoke "python" "setup.py" "check"
7196 (string-append "--hdf5="
7197 (assoc-ref inputs "hdf5"))))))))
7198 (propagated-inputs
7199 `(("python-numexpr" ,python-numexpr)
7200 ("python-numpy" ,python-numpy)))
7201 (native-inputs
7202 `(("python-cython" ,python-cython)
7203 ("pkg-config" ,pkg-config)))
7204 (inputs
7205 `(("hdf5" ,hdf5)
7206 ("bzip2" ,bzip2)
7207 ("zlib" ,zlib)))
7208 (home-page "http://www.pytables.org/")
7209 (synopsis "Hierarchical datasets for Python")
7210 (description "PyTables is a package for managing hierarchical datasets and
7211 designed to efficiently cope with extremely large amounts of data.")
7212 (license license:bsd-3)))
7213
7214 (define-public python2-tables
7215 (package-with-python2 python-tables))
7216
7217 (define-public python-pyasn1
7218 (package
7219 (name "python-pyasn1")
7220 (version "0.4.3")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 (uri (pypi-uri "pyasn1" version))
7225 (sha256
7226 (base32
7227 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7228 (build-system python-build-system)
7229 (home-page "http://pyasn1.sourceforge.net/")
7230 (synopsis "ASN.1 types and codecs")
7231 (description
7232 "This is an implementation of ASN.1 types and codecs in Python. It is
7233 suitable for a wide range of protocols based on the ASN.1 specification.")
7234 (license license:bsd-2)))
7235
7236 (define-public python2-pyasn1
7237 (package-with-python2 python-pyasn1))
7238
7239 (define-public python-pyasn1-modules
7240 (package
7241 (name "python-pyasn1-modules")
7242 (version "0.2.2")
7243 (source
7244 (origin
7245 (method url-fetch)
7246 (uri (pypi-uri "pyasn1-modules" version))
7247 (sha256
7248 (base32
7249 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7250 (build-system python-build-system)
7251 (propagated-inputs
7252 `(("python-pyasn1" ,python-pyasn1)))
7253 (home-page "https://sourceforge.net/projects/pyasn1/")
7254 (synopsis "ASN.1 codec implementations")
7255 (description
7256 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7257 implementations of ASN.1-based codecs and protocols.")
7258 (license license:bsd-3)))
7259
7260 (define-public python2-pyasn1-modules
7261 (package-with-python2 python-pyasn1-modules))
7262
7263 (define-public python-ipaddress
7264 (package
7265 (name "python-ipaddress")
7266 (version "1.0.22")
7267 (source (origin
7268 (method url-fetch)
7269 (uri (pypi-uri "ipaddress" version))
7270 (sha256
7271 (base32
7272 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7273 (build-system python-build-system)
7274 (home-page "https://github.com/phihag/ipaddress")
7275 (synopsis "IP address manipulation library")
7276 (description
7277 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7278 in Python. This library is used to create, poke at, and manipulate IPv4 and
7279 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7280 module to older versions of Python.")
7281 (license license:psfl)))
7282
7283 (define-public python2-ipaddress
7284 (package-with-python2 python-ipaddress))
7285
7286 (define-public python2-ipaddr
7287 (package
7288 (name "python2-ipaddr")
7289 (version "2.1.11")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "ipaddr" version))
7294 (sha256
7295 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7296 (build-system python-build-system)
7297 (arguments
7298 `(#:python ,python-2 ;version 2 only
7299 #:phases
7300 (modify-phases %standard-phases
7301 (replace 'check
7302 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7303 (home-page "https://github.com/google/ipaddr-py")
7304 (synopsis "IP address manipulation library")
7305 (description
7306 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7307 IPv6 addresses and networks.
7308
7309 For new implementations you may prefer to use the standard module
7310 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7311 versions of Python.")
7312 (license license:asl2.0)))
7313
7314 (define-public python-idna
7315 (package
7316 (name "python-idna")
7317 (version "2.8")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "idna" version))
7322 (sha256
7323 (base32
7324 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7325 (build-system python-build-system)
7326 (home-page "https://github.com/kjd/idna")
7327 (synopsis "Internationalized domain names in applications")
7328 (description
7329 "This is a library to support the Internationalised Domain Names in
7330 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7331 protocol is often referred to as “IDNA2008” and can produce different results
7332 from the earlier standard from 2003. The library is also intended to act as a
7333 suitable drop-in replacement for the “encodings.idna” module that comes with
7334 the Python standard library but currently only supports the older 2003
7335 specification.")
7336 (license license:bsd-4)))
7337
7338 (define-public python-idna-2.7
7339 (package (inherit python-idna)
7340 (version "2.7")
7341 (source (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "idna" version))
7344 (sha256
7345 (base32
7346 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7347
7348
7349 (define-public python2-idna
7350 (package-with-python2 python-idna))
7351
7352 (define-public python-idna-ssl
7353 (package
7354 (name "python-idna-ssl")
7355 (version "1.0.1")
7356 (source
7357 (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "idna-ssl" version))
7360 (sha256
7361 (base32
7362 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7363 (build-system python-build-system)
7364 (arguments
7365 `(#:tests? #f)) ;circular dependency with python-aiohttp
7366 (home-page "https://github.com/aio-libs/idna-ssl")
7367 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7368 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7369 domains support.")
7370 (license license:expat)))
7371
7372 (define-public python-pretend
7373 (package
7374 (name "python-pretend")
7375 (version "1.0.9")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "pretend" version))
7380 (sha256
7381 (base32
7382 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7383 (build-system python-build-system)
7384 (home-page "https://github.com/alex/pretend")
7385 (synopsis "Library for stubbing in Python")
7386 (description
7387 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7388 technique for writing tests. You may hear the term mixed up with mocks,
7389 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7390 responses, rather than doing any computation.")
7391 (license license:bsd-3)))
7392
7393 (define-public python2-pretend
7394 (package-with-python2 python-pretend))
7395
7396 (define-public python-pip
7397 (package
7398 (name "python-pip")
7399 (version "19.2.1")
7400 (source
7401 (origin
7402 (method url-fetch)
7403 (uri (pypi-uri "pip" version))
7404 (sha256
7405 (base32
7406 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7407 (build-system python-build-system)
7408 (arguments
7409 '(#:tests? #f)) ; there are no tests in the pypi archive.
7410 (home-page "https://pip.pypa.io/")
7411 (synopsis "Package manager for Python software")
7412 (description
7413 "Pip is a package manager for Python software, that finds packages on the
7414 Python Package Index (PyPI).")
7415 (license license:expat)))
7416
7417 (define-public python2-pip
7418 (package-with-python2 python-pip))
7419
7420 (define-public python-tlsh
7421 (package
7422 (name "python-tlsh")
7423 (version "3.4.5")
7424 (home-page "https://github.com/trendmicro/tlsh")
7425 (source
7426 (origin
7427 (method git-fetch)
7428 (uri (git-reference
7429 (url "https://github.com/trendmicro/tlsh.git")
7430 (commit (string-append "v" version))))
7431 (file-name (git-file-name name version))
7432 (sha256
7433 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7434 (build-system cmake-build-system)
7435 (arguments
7436 '(#:out-of-source? #f
7437 #:phases (modify-phases %standard-phases
7438 (replace
7439 'install
7440 (lambda* (#:key outputs #:allow-other-keys)
7441 ;; Build and install the Python bindings. The underlying
7442 ;; C++ library is apparently not meant to be installed.
7443 (let ((out (assoc-ref outputs "out")))
7444 (with-directory-excursion "py_ext"
7445 (and (system* "python" "setup.py" "build")
7446 (system* "python" "setup.py" "install"
7447 (string-append "--prefix=" out))))))))))
7448 (inputs `(("python" ,python-wrapper))) ;for the bindings
7449 (synopsis "Fuzzy matching library for Python")
7450 (description
7451 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7452 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7453 value which can be used for similarity comparisons. Similar objects have
7454 similar hash values, which allows for the detection of similar objects by
7455 comparing their hash values. The byte stream should have a sufficient amount
7456 of complexity; for example, a byte stream of identical bytes will not generate
7457 a hash value.")
7458 (license license:asl2.0)))
7459
7460 (define-public python2-tlsh
7461 (package
7462 (inherit python-tlsh)
7463 (name "python2-tlsh")
7464 (inputs `(("python" ,python-2)))))
7465
7466 (define-public python-termcolor
7467 (package
7468 (name "python-termcolor")
7469 (version "1.1.0")
7470 (source
7471 (origin
7472 (method url-fetch)
7473 (uri (pypi-uri "termcolor" version))
7474 (sha256
7475 (base32
7476 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7477 (build-system python-build-system)
7478 (arguments
7479 ;; There are no tests.
7480 `(#:tests? #f))
7481 (home-page "https://pypi.python.org/pypi/termcolor")
7482 (synopsis "ANSII Color formatting for terminal output")
7483 (description
7484 "This package provides ANSII Color formatting for output in terminals.")
7485 (license license:expat)))
7486
7487 (define-public python2-termcolor
7488 (package-with-python2 python-termcolor))
7489
7490 (define-public python-libarchive-c
7491 (package
7492 (name "python-libarchive-c")
7493 (version "2.8")
7494 (source (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "libarchive-c" version))
7497 (sha256
7498 (base32
7499 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7500 (build-system python-build-system)
7501 (arguments
7502 '(#:phases (modify-phases %standard-phases
7503 (add-before
7504 'build 'reference-libarchive
7505 (lambda* (#:key inputs #:allow-other-keys)
7506 ;; Retain the absolute file name of libarchive.so.
7507 (let ((libarchive (assoc-ref inputs "libarchive")))
7508 (substitute* "libarchive/ffi.py"
7509 (("find_library\\('archive'\\)")
7510 (string-append "'" libarchive
7511 "/lib/libarchive.so'"))))))
7512 (replace 'check
7513 (lambda _ (invoke "pytest" "-vv"))))))
7514 (native-inputs
7515 `(("python-mock" ,python-mock)
7516 ("python-pytest" ,python-pytest)))
7517 (inputs
7518 `(("libarchive" ,libarchive)))
7519 (home-page "https://github.com/Changaco/python-libarchive-c")
7520 (synopsis "Python interface to libarchive")
7521 (description
7522 "This package provides Python bindings to libarchive, a C library to
7523 access possibly compressed archives in many different formats. It uses
7524 Python's @code{ctypes} foreign function interface (FFI).")
7525 (license license:lgpl2.0+)))
7526
7527 (define-public python2-libarchive-c
7528 (package-with-python2 python-libarchive-c))
7529
7530 (define-public python-file
7531 (package
7532 (inherit file)
7533 (name "python-file")
7534 (build-system python-build-system)
7535 (arguments
7536 '(#:tests? #f ;no tests
7537 #:configure-flags '("--single-version-externally-managed" "--root=/")
7538 #:phases (modify-phases %standard-phases
7539 (add-before 'build 'change-directory
7540 (lambda _
7541 (chdir "python")
7542 #t))
7543 (add-before 'build 'set-library-file-name
7544 (lambda* (#:key inputs #:allow-other-keys)
7545 (let ((file (assoc-ref inputs "file")))
7546 (substitute* "magic.py"
7547 (("find_library\\('magic'\\)")
7548 (string-append "'" file "/lib/libmagic.so'")))
7549 #t))))))
7550 (inputs `(("file" ,file)))
7551 (native-inputs (if (%current-target-system)
7552 `(("self" ,this-package))
7553 '()))
7554 (synopsis "Python bindings to the libmagic file type guesser. Note that
7555 this module and the python-magic module both provide a \"magic.py\" file;
7556 these two modules, which are different and were developed separately, both
7557 serve the same purpose: provide Python bindings for libmagic.")))
7558
7559 (define-public python2-file
7560 (package-with-python2 python-file))
7561
7562 (define-public python-debian
7563 (package
7564 (name "python-debian")
7565 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7566 (version "0.1.36")
7567 (source
7568 (origin
7569 ;; Use git-fetch, as pypi doesn't include test suite.
7570 (method git-fetch)
7571 (uri (git-reference
7572 (url home-page)
7573 (commit version)))
7574 (file-name (git-file-name name version))
7575 (sha256
7576 (base32
7577 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7578 (build-system python-build-system)
7579 (arguments
7580 `(#:phases (modify-phases %standard-phases
7581 (add-after 'unpack 'remove-debian-specific-tests
7582 ;; python-apt, apt and dpkg are not yet available in guix,
7583 ;; and these tests heavily depend on them.
7584 (lambda _
7585 (delete-file "lib/debian/tests/test_deb822.py")
7586 (delete-file "lib/debian/tests/test_debfile.py")
7587 #t)))))
7588 (propagated-inputs
7589 `(("python-six" ,python-six)
7590 ("python-chardet" ,python-chardet)))
7591 (synopsis "Debian package related modules")
7592 (description
7593 ;; XXX: Use @enumerate instead of @itemize to work around
7594 ;; <http://bugs.gnu.org/21772>.
7595 "This package provides Python modules that abstract many formats of
7596 Debian-related files, such as:
7597
7598 @enumerate
7599 @item Debtags information;
7600 @item @file{debian/changelog} files;
7601 @item packages files, pdiffs;
7602 @item control files of single or multiple RFC822-style paragraphs---e.g.
7603 @file{debian/control}, @file{.changes}, @file{.dsc};
7604 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7605 contained files and meta-information.
7606 @end enumerate\n")
7607
7608 ;; Modules are either GPLv2+ or GPLv3+.
7609 (license license:gpl3+)))
7610
7611 (define-public python2-debian
7612 (package-with-python2 python-debian))
7613
7614 (define-public python-nbformat
7615 (package
7616 (name "python-nbformat")
7617 (version "4.4.0")
7618 (source
7619 (origin
7620 (method url-fetch)
7621 (uri (pypi-uri "nbformat" version))
7622 (sha256
7623 (base32
7624 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7625 (build-system python-build-system)
7626 (arguments `(#:tests? #f)) ; no test target
7627 (propagated-inputs
7628 `(("python-ipython-genutils" ,python-ipython-genutils)
7629 ("python-jsonschema" ,python-jsonschema)
7630 ("python-jupyter-core" ,python-jupyter-core)
7631 ("python-traitlets" ,python-traitlets)))
7632 (home-page "http://jupyter.org")
7633 (synopsis "Jupyter Notebook format")
7634 (description "This package provides the reference implementation of the
7635 Jupyter Notebook format and Python APIs for working with notebooks.")
7636 (license license:bsd-3)))
7637
7638 (define-public python2-nbformat
7639 (package-with-python2 python-nbformat))
7640
7641 (define-public python-bleach
7642 (package
7643 (name "python-bleach")
7644 (version "1.4.3")
7645 (source
7646 (origin
7647 (method url-fetch)
7648 (uri (pypi-uri "bleach" version))
7649 (sha256
7650 (base32
7651 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7652 (build-system python-build-system)
7653 (propagated-inputs
7654 `(("python-html5lib" ,python-html5lib-0.9)
7655 ("python-six" ,python-six)))
7656 (native-inputs
7657 `(("python-nose" ,python-nose)))
7658 (home-page "https://github.com/jsocol/bleach")
7659 (synopsis "Whitelist-based HTML-sanitizing tool")
7660 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7661 (license license:asl2.0)))
7662
7663 (define-public python2-bleach
7664 (package-with-python2 python-bleach))
7665
7666 (define-public python-entrypoints
7667 (package
7668 (name "python-entrypoints")
7669 (version "0.3")
7670 (source
7671 (origin
7672 (method url-fetch)
7673 (uri (pypi-uri "entrypoints" version))
7674 (sha256
7675 (base32
7676 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7677 (build-system python-build-system)
7678 ;; The package does not come with a setup.py file, so we have to generate
7679 ;; one ourselves.
7680 (arguments
7681 `(#:tests? #f
7682 #:phases
7683 (modify-phases %standard-phases
7684 (add-after 'unpack 'create-setup.py
7685 (lambda _
7686 (call-with-output-file "setup.py"
7687 (lambda (port)
7688 (format port "\
7689 from setuptools import setup
7690 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7691 " ,version))))))))
7692 (home-page "https://github.com/takluyver/entrypoints")
7693 (synopsis "Discover and load entry points from installed Python packages")
7694 (description "Entry points are a way for Python packages to advertise
7695 objects with some common interface. The most common examples are
7696 @code{console_scripts} entry points, which define shell commands by
7697 identifying a Python function to run. The @code{entrypoints} module contains
7698 functions to find and load entry points.")
7699 (license license:expat)))
7700
7701 (define-public python2-entrypoints
7702 (package-with-python2 python-entrypoints))
7703
7704 (define-public python-nbconvert
7705 (package
7706 (name "python-nbconvert")
7707 (version "5.0.0b1")
7708 (source
7709 (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "nbconvert" version))
7712 (sha256
7713 (base32
7714 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7715 (build-system python-build-system)
7716 (arguments
7717 `(;; The "bdist_egg" target is disabled by default, causing the installation
7718 ;; to fail.
7719 #:configure-flags (list "bdist_egg")
7720 ;; FIXME: 5 failures, 40 errors.
7721 #:tests? #f))
7722 ;; #:phases
7723 ;; (modify-phases %standard-phases
7724 ;; (replace 'check
7725 ;; (lambda _
7726 ;; (zero? (system* "py.test" "-v")))))
7727 (native-inputs
7728 `(("python-pytest" ,python-pytest)))
7729 (propagated-inputs
7730 `(("python-bleach" ,python-bleach)
7731 ("python-entrypoints" ,python-entrypoints)
7732 ("python-jinja2" ,python-jinja2)
7733 ("python-jupyter-core" ,python-jupyter-core)
7734 ("python-mistune" ,python-mistune)
7735 ("python-nbformat" ,python-nbformat)
7736 ("python-pygments" ,python-pygments)
7737 ("python-traitlets" ,python-traitlets)))
7738 (home-page "http://jupyter.org")
7739 (synopsis "Converting Jupyter Notebooks")
7740 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7741 notebooks to various other formats via Jinja templates. It allows you to
7742 convert an @code{.ipynb} notebook file into various static formats including:
7743
7744 @enumerate
7745 @item HTML
7746 @item LaTeX
7747 @item PDF
7748 @item Reveal JS
7749 @item Markdown (md)
7750 @item ReStructured Text (rst)
7751 @item executable script
7752 @end enumerate\n")
7753 (license license:bsd-3)))
7754
7755 (define-public python2-nbconvert
7756 (package-with-python2 python-nbconvert))
7757
7758 (define-public python-notebook
7759 (package
7760 (name "python-notebook")
7761 (version "5.7.4")
7762 (source (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "notebook" version))
7765 (sha256
7766 (base32
7767 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7768 (build-system python-build-system)
7769 (arguments
7770 `(#:phases
7771 (modify-phases %standard-phases
7772 (replace 'check
7773 (lambda _
7774 ;; These tests require a browser
7775 (delete-file-recursively "notebook/tests/selenium")
7776 ;; Some tests need HOME
7777 (setenv "HOME" "/tmp")
7778 ;; This file contains "warningfilters", which are not supported
7779 ;; by this version of nose.
7780 (delete-file "setup.cfg")
7781 (with-directory-excursion "/tmp"
7782 (invoke "nosetests" "-v"))
7783 #t)))))
7784 (propagated-inputs
7785 `(("python-jupyter-core" ,python-jupyter-core)
7786 ("python-nbformat" ,python-nbformat)
7787 ("python-nbconvert" ,python-nbconvert)
7788 ("python-prometheus-client" ,python-prometheus-client)
7789 ("python-send2trash" ,python-send2trash)
7790 ("python-terminado" ,python-terminado)))
7791 (native-inputs
7792 `(("python-nose" ,python-nose)
7793 ("python-sphinx" ,python-sphinx)
7794 ("python-requests" ,python-requests)))
7795 (home-page "http://jupyter.org/")
7796 (synopsis "Web-based notebook environment for interactive computing")
7797 (description
7798 "The Jupyter HTML notebook is a web-based notebook environment for
7799 interactive computing.")
7800 (properties `((python2-variant . ,(delay python2-notebook))))
7801 (license license:bsd-3)))
7802
7803 (define-public python2-notebook
7804 (let ((base (package-with-python2
7805 (strip-python2-variant python-notebook))))
7806 (package (inherit base)
7807 (native-inputs
7808 `(("python2-mock" ,python2-mock)
7809 ,@(package-native-inputs base)))
7810 (arguments
7811 (substitute-keyword-arguments (package-arguments base)
7812 ((#:phases phases)
7813 `(modify-phases ,phases
7814 (add-before 'check 'disable-test-case
7815 ;; The test requires network access to localhost. Curiously it
7816 ;; fails with Python 2 only. Simply make the test-case return
7817 ;; immediately.
7818 (lambda _
7819 (substitute*
7820 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7821 (("formats = self.nbconvert_api") "return #")))))))))))
7822
7823 (define-public python-widgetsnbextension
7824 (package
7825 (name "python-widgetsnbextension")
7826 (version "3.4.2")
7827 (source
7828 (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "widgetsnbextension" version))
7831 (sha256
7832 (base32
7833 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7834 (build-system python-build-system)
7835 (propagated-inputs
7836 `(("python-ipykernel" ,python-ipykernel)
7837 ("python-notebook" ,python-notebook)))
7838 (native-inputs
7839 `(("python-certifi" ,python-certifi)
7840 ("python-nose" ,python-nose)))
7841 (home-page "https://ipython.org")
7842 (synopsis "IPython HTML widgets for Jupyter")
7843 (description "This package provides interactive HTML widgets for Jupyter
7844 notebooks.")
7845 (license license:bsd-3)))
7846
7847 (define-public python2-widgetsnbextension
7848 (package-with-python2 python-widgetsnbextension))
7849
7850 (define-public python-ipywidgets
7851 (package
7852 (name "python-ipywidgets")
7853 (version "5.2.2")
7854 (source
7855 (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "ipywidgets" version))
7858 (sha256
7859 (base32
7860 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7861 (build-system python-build-system)
7862 (propagated-inputs
7863 `(("python-ipython" ,python-ipython)
7864 ("python-traitlets" ,python-traitlets)
7865 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7866 (native-inputs
7867 `(("python-nose" ,python-nose)
7868 ("python-pytest" ,python-pytest)))
7869 (home-page "https://ipython.org")
7870 (synopsis "IPython HTML widgets for Jupyter")
7871 (description "Ipywidgets are interactive HTML widgets for Jupyter
7872 notebooks and the IPython kernel. Notebooks come alive when interactive
7873 widgets are used. Users gain control of their data and can visualize changes
7874 in the data.")
7875 (license license:bsd-3)))
7876
7877 (define-public python2-ipywidgets
7878 (package-with-python2 python-ipywidgets))
7879
7880 (define-public python-jupyter-console
7881 (package
7882 (name "python-jupyter-console")
7883 (version "6.0.0")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "jupyter_console" version))
7888 (sha256
7889 (base32
7890 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7891 (build-system python-build-system)
7892 (propagated-inputs
7893 `(("python-ipykernel" ,python-ipykernel)
7894 ("python-jupyter-client" ,python-jupyter-client)
7895 ("python-prompt-toolkit" ,python-prompt-toolkit)
7896 ("python-pygments" ,python-pygments)))
7897 (native-inputs
7898 `(("python-nose" ,python-nose)))
7899 (home-page "https://jupyter.org")
7900 (synopsis "Jupyter terminal console")
7901 (description "This package provides a terminal-based console frontend for
7902 Jupyter kernels. It also allows for console-based interaction with non-Python
7903 Jupyter kernels such as IJulia and IRKernel.")
7904 (license license:bsd-3)))
7905
7906 (define-public python2-jupyter-console
7907 (package
7908 (name "python2-jupyter-console")
7909 (version "5.2.0")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "jupyter_console" version))
7914 (sha256
7915 (base32
7916 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7917 (build-system python-build-system)
7918 ;; Tests only run in an TTY.
7919 (arguments `(#:tests? #f))
7920 (propagated-inputs
7921 `(("python2-ipykernel" ,python2-ipykernel)
7922 ("python2-jupyter-client" ,python2-jupyter-client)
7923 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7924 ("python2-pygments" ,python2-pygments)))
7925 (native-inputs
7926 `(("python2-nose" ,python2-nose)))
7927 (home-page "https://jupyter.org")
7928 (synopsis "Jupyter terminal console")
7929 (description "This package provides a terminal-based console frontend for
7930 Jupyter kernels. It also allows for console-based interaction with non-Python
7931 Jupyter kernels such as IJulia and IRKernel.")
7932 (license license:bsd-3)))
7933
7934 ;; The python-ipython and python-jupyter-console require each other. To get
7935 ;; the functionality in both packages working, strip down the
7936 ;; python-jupyter-console package when using it as an input to python-ipython.
7937 (define python-jupyter-console-minimal
7938 (package
7939 (inherit python-jupyter-console)
7940 (name "python-jupyter-console-minimal")
7941 (arguments
7942 (substitute-keyword-arguments
7943 (package-arguments python-jupyter-console)
7944 ((#:phases phases)
7945 `(modify-phases ,phases
7946 (add-after 'install 'delete-bin
7947 (lambda* (#:key outputs #:allow-other-keys)
7948 ;; Delete the bin files, to avoid conflicts in profiles
7949 ;; where python-ipython and python-jupyter-console are
7950 ;; both present.
7951 (delete-file-recursively
7952 (string-append
7953 (assoc-ref outputs "out") "/bin"))))))))
7954 ;; Remove the python-ipython propagated input, to avoid the cycle
7955 (propagated-inputs
7956 (alist-delete
7957 "python-ipython"
7958 (package-propagated-inputs python-jupyter-console)))))
7959
7960 (define-public python-qtconsole
7961 (package
7962 (name "python-qtconsole")
7963 (version "4.4.3")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "qtconsole" version))
7968 (sha256
7969 (base32
7970 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7971 (build-system python-build-system)
7972 (arguments
7973 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7974 ;; but we only have the LTS version 5.x. This means that there might be
7975 ;; runtime errors, but since this is a dependency of the Jupyter package,
7976 ;; and Jupyter can be used without the qtconsole we can overlook this for
7977 ;; now.
7978 `(#:tests? #f
7979 #:phases
7980 (modify-phases %standard-phases
7981 (add-before 'check 'pre-check
7982 (lambda _
7983 (setenv "QT_QPA_PLATFORM" "offscreen")
7984 #t)))))
7985 (propagated-inputs
7986 `(("python-ipykernel" ,python-ipykernel)
7987 ("python-ipython" ,python-ipython)))
7988 (native-inputs
7989 `(("python-pytest" ,python-pytest)))
7990 (home-page "http://jupyter.org")
7991 (synopsis "Jupyter Qt console")
7992 (description "This package provides a Qt-based console for Jupyter with
7993 support for rich media output.")
7994 (license license:bsd-3)))
7995
7996 (define-public jupyter
7997 (package
7998 (name "jupyter")
7999 (version "1.0.0")
8000 (source
8001 (origin
8002 (method url-fetch)
8003 (uri (pypi-uri "jupyter" version))
8004 (sha256
8005 (base32
8006 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8007 (build-system python-build-system)
8008 (arguments '(#:tests? #f)) ; there are none.
8009 (propagated-inputs
8010 `(("python-ipykernel" ,python-ipykernel)
8011 ("python-ipywidgets" ,python-ipywidgets)
8012 ("python-jupyter-console" ,python-jupyter-console)
8013 ("python-nbconvert" ,python-nbconvert)
8014 ("python-notebook" ,python-notebook)
8015 ("python-qtconsole" ,python-qtconsole)))
8016 (native-search-paths
8017 (list (search-path-specification
8018 (variable "JUPYTER_PATH")
8019 (files '("share/jupyter")))))
8020 (home-page "https://jupyter.org")
8021 (synopsis "Web application for interactive documents")
8022 (description
8023 "The Jupyter Notebook is a web application that allows you to create and
8024 share documents that contain live code, equations, visualizations and
8025 explanatory text. Uses include: data cleaning and transformation, numerical
8026 simulation, statistical modeling, machine learning and much more.")
8027 (license license:bsd-3)))
8028
8029 (define-public python-chardet
8030 (package
8031 (name "python-chardet")
8032 (version "3.0.4")
8033 (source
8034 (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "chardet" version))
8037 (sha256
8038 (base32
8039 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8040 (native-inputs
8041 `(("python-hypothesis" ,python-hypothesis)
8042 ("python-pytest" ,python-pytest)
8043 ("python-pytest-runner" ,python-pytest-runner)))
8044 (build-system python-build-system)
8045 (home-page "https://github.com/chardet/chardet")
8046 (synopsis "Universal encoding detector for Python 2 and 3")
8047 (description
8048 "This package provides @code{chardet}, a Python module that can
8049 automatically detect a wide range of file encodings.")
8050 (license license:lgpl2.1+)))
8051
8052 (define-public python2-chardet
8053 (package-with-python2 python-chardet))
8054
8055 (define-public python-docopt
8056 (package
8057 (name "python-docopt")
8058 (version "0.6.2")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 ;; The release on PyPI does not include tests.
8063 (uri (string-append
8064 "https://github.com/docopt/docopt/archive/"
8065 version ".tar.gz"))
8066 (file-name (string-append name "-" version ".tar.gz"))
8067 (sha256
8068 (base32
8069 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8070 (build-system python-build-system)
8071 (native-inputs
8072 `(("python-pytest" ,python-pytest)))
8073 (arguments
8074 `(#:phases
8075 (modify-phases %standard-phases
8076 (replace 'check
8077 (lambda _ (invoke "py.test"))))))
8078 (home-page "http://docopt.org")
8079 (synopsis "Command-line interface description language for Python")
8080 (description "This library allows the user to define a command-line
8081 interface from a program's help message rather than specifying it
8082 programmatically with command-line parsers like @code{getopt} and
8083 @code{argparse}.")
8084 (license license:expat)))
8085
8086 (define-public python2-docopt
8087 (package-with-python2 python-docopt))
8088
8089 (define-public python-pythondialog
8090 (package
8091 (name "python-pythondialog")
8092 (version "3.4.0")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "pythondialog" version))
8097 (sha256
8098 (base32
8099 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8100 (build-system python-build-system)
8101 (arguments
8102 `(#:phases
8103 (modify-phases %standard-phases
8104 (add-after 'unpack 'patch-path
8105 (lambda* (#:key inputs #:allow-other-keys)
8106 (let* ((dialog (assoc-ref inputs "dialog")))
8107 ;; Since this library really wants to grovel the search path, we
8108 ;; must hardcode dialog's store path into it.
8109 (substitute* "dialog.py"
8110 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8111 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8112 #t))))
8113 #:tests? #f)) ; no test suite
8114 (propagated-inputs
8115 `(("dialog" ,dialog)))
8116 (home-page "http://pythondialog.sourceforge.net/")
8117 (synopsis "Python interface to the UNIX dialog utility")
8118 (description "A Python wrapper for the dialog utility. Its purpose is to
8119 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8120 This allows one to make simple text-mode user interfaces on Unix-like systems")
8121 (license license:lgpl2.1)
8122 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8123
8124 (define-public python2-pythondialog
8125 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8126 (package
8127 (inherit base)
8128 (version (package-version python-pythondialog))
8129 (source (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "python2-pythondialog" version))
8132 (sha256
8133 (base32
8134 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8135
8136 (define-public python-configobj
8137 (package
8138 (name "python-configobj")
8139 (version "5.0.6")
8140 (source (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "configobj" version))
8143 (sha256
8144 (base32
8145 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8146 ;; Patch setup.py so it looks for python-setuptools, which is
8147 ;; required to parse the keyword 'install_requires' in setup.py.
8148 (patches (search-patches "python-configobj-setuptools.patch"))))
8149 (build-system python-build-system)
8150 (propagated-inputs
8151 `(("python-six" ,python-six)))
8152 (synopsis "Config file reading, writing and validation")
8153 (description "ConfigObj is a simple but powerful config file reader and
8154 writer: an ini file round tripper. Its main feature is that it is very easy to
8155 use, with a straightforward programmer’s interface and a simple syntax for
8156 config files.")
8157 (home-page "https://github.com/DiffSK/configobj")
8158 (license license:bsd-3)))
8159
8160 (define-public python2-configobj
8161 (package-with-python2 python-configobj))
8162
8163 (define-public python-configargparse
8164 (package
8165 (name "python-configargparse")
8166 (version "0.14.0")
8167 (source (origin
8168 (method url-fetch)
8169 (uri (pypi-uri "ConfigArgParse" version))
8170 (sha256
8171 (base32
8172 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8173 (build-system python-build-system)
8174 (native-inputs
8175 `(("python-pyyaml" ,python-pyyaml)))
8176 (arguments
8177 `(#:phases
8178 (modify-phases %standard-phases
8179 (replace 'check
8180 (lambda _
8181 ;; Bypass setuptools-shim because one test relies on "setup.py"
8182 ;; being the first argument passed to the python call.
8183 ;;
8184 ;; NOTE: Many tests do not run because they rely on Python's
8185 ;; built-in test.test_argparse, but we remove the unit tests from
8186 ;; our Python installation.
8187 (invoke "python" "setup.py" "test"))))))
8188 (synopsis "Replacement for argparse")
8189 (description "A drop-in replacement for argparse that allows options to also
8190 be set via config files and/or environment variables.")
8191 (home-page "https://github.com/bw2/ConfigArgParse")
8192 (license license:expat)))
8193
8194 (define-public python2-configargparse
8195 (package-with-python2 python-configargparse))
8196
8197 (define-public python-argparse-manpage
8198 (package
8199 (name "python-argparse-manpage")
8200 (version "1.1")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "argparse-manpage" version))
8205 (sha256
8206 (base32
8207 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8208 (build-system python-build-system)
8209 (home-page "https://github.com/praiskup/argparse-manpage")
8210 (synopsis "Build manual page from Python's ArgumentParser object")
8211 (description
8212 "This package provides tools to build manual pages from Python's
8213 @code{ArgumentParser} object.")
8214 (license license:asl2.0)))
8215
8216 (define-public python-contextlib2
8217 (package
8218 (name "python-contextlib2")
8219 (version "0.5.5")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "contextlib2" version))
8224 (sha256
8225 (base32
8226 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8227 (build-system python-build-system)
8228 (home-page "http://contextlib2.readthedocs.org/")
8229 (synopsis "Tools for decorators and context managers")
8230 (description "This module is primarily a backport of the Python
8231 3.2 contextlib to earlier Python versions. Like contextlib, it
8232 provides utilities for common tasks involving decorators and context
8233 managers. It also contains additional features that are not part of
8234 the standard library.")
8235 (license license:psfl)))
8236
8237 (define-public python2-contextlib2
8238 (package
8239 (name "python2-contextlib2")
8240 (version "0.5.5")
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "contextlib2" version))
8245 (sha256
8246 (base32
8247 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8248 (build-system python-build-system)
8249 (arguments
8250 `(#:python ,python-2
8251 #:phases
8252 (modify-phases %standard-phases
8253 (replace 'check
8254 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8255 (native-inputs
8256 `(("python2-unittest2" ,python2-unittest2)))
8257 (home-page "http://contextlib2.readthedocs.org/")
8258 (synopsis "Tools for decorators and context managers")
8259 (description "This module is primarily a backport of the Python
8260 3.2 contextlib to earlier Python versions. Like contextlib, it
8261 provides utilities for common tasks involving decorators and context
8262 managers. It also contains additional features that are not part of
8263 the standard library.")
8264 (license license:psfl)))
8265
8266 (define-public python-texttable
8267 (package
8268 (name "python-texttable")
8269 (version "0.9.1")
8270 (source
8271 (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "texttable" version))
8274 (sha256
8275 (base32
8276 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8277 (build-system python-build-system)
8278 (arguments '(#:tests? #f)) ; no tests
8279 (home-page "https://github.com/foutaise/texttable/")
8280 (synopsis "Python module for creating simple ASCII tables")
8281 (description "Texttable is a Python module for creating simple ASCII
8282 tables.")
8283 (license license:lgpl2.1+)))
8284
8285 (define-public python2-texttable
8286 (package-with-python2 python-texttable))
8287
8288 (define-public python-atomicwrites
8289 (package
8290 (name "python-atomicwrites")
8291 (version "1.1.5")
8292 (source (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "atomicwrites" version))
8295 (sha256
8296 (base32
8297 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8298 (build-system python-build-system)
8299 (synopsis "Atomic file writes in Python")
8300 (description "Library for atomic file writes using platform dependent tools
8301 for atomic file system operations.")
8302 (home-page "https://github.com/untitaker/python-atomicwrites")
8303 (license license:expat)))
8304
8305 (define-public python2-atomicwrites
8306 (package-with-python2 python-atomicwrites))
8307
8308 (define-public python-click-threading
8309 (package
8310 (name "python-click-threading")
8311 (version "0.4.4")
8312 (source (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "click-threading" version))
8315 (sha256
8316 (base32
8317 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8318 (build-system python-build-system)
8319 (propagated-inputs
8320 `(("python-click" ,python-click)))
8321 (synopsis "Utilities for multithreading in Click")
8322 (description "This package provides utilities for multithreading in Click
8323 applications.")
8324 (home-page "https://github.com/click-contrib/click-threading")
8325 (license license:expat)))
8326
8327 (define-public python-click-log
8328 (package
8329 (name "python-click-log")
8330 (version "0.3.2")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "click-log" version))
8334 (sha256
8335 (base32
8336 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8337 (build-system python-build-system)
8338 (propagated-inputs
8339 `(("python-click" ,python-click)))
8340 (synopsis "Logging for click applications")
8341 (description "This package provides a Python library for logging Click
8342 applications.")
8343 (home-page "https://github.com/click-contrib/click-log")
8344 (license license:expat)))
8345
8346 (define-public python-apipkg
8347 (package
8348 (name "python-apipkg")
8349 (version "1.4")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "apipkg" version))
8353 (sha256
8354 (base32
8355 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8356 (build-system python-build-system)
8357 (native-inputs
8358 `(("python-pytest" ,python-pytest)))
8359 (synopsis "Namespace control and lazy-import mechanism")
8360 (description "With apipkg you can control the exported namespace of a Python
8361 package and greatly reduce the number of imports for your users. It is a small
8362 pure Python module that works on virtually all Python versions.")
8363 (home-page "https://github.com/pytest-dev/apipkg")
8364 (license license:expat)))
8365
8366 (define-public python2-apipkg
8367 (package-with-python2 python-apipkg))
8368
8369 (define-public python-execnet
8370 (package
8371 (name "python-execnet")
8372 (version "1.4.1")
8373 (source (origin
8374 (method url-fetch)
8375 (uri (pypi-uri "execnet" version))
8376 (sha256
8377 (base32
8378 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8379 (build-system python-build-system)
8380 (arguments
8381 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8382 ;; The two test failures are caused by the lack of an `ssh` executable.
8383 ;; The test suite can be run with pytest after the 'install' phase.
8384 #:tests? #f))
8385 (native-inputs
8386 `(("python-pytest" ,python-pytest)
8387 ("python-setuptools-scm" ,python-setuptools-scm)))
8388 (propagated-inputs
8389 `(("python-apipkg" ,python-apipkg)))
8390 (synopsis "Rapid multi-Python deployment")
8391 (description "Execnet provides a share-nothing model with
8392 channel-send/receive communication for distributing execution across many
8393 Python interpreters across version, platform and network barriers. It has a
8394 minimal and fast API targeting the following uses:
8395 @enumerate
8396 @item distribute tasks to (many) local or remote CPUs
8397 @item write and deploy hybrid multi-process applications
8398 @item write scripts to administer multiple environments
8399 @end enumerate")
8400 (home-page "http://codespeak.net/execnet/")
8401 (license license:expat)))
8402
8403 (define-public python2-execnet
8404 (package-with-python2 python-execnet))
8405
8406 (define-public python-icalendar
8407 (package
8408 (name "python-icalendar")
8409 (version "4.0.3")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "icalendar" version))
8413 (sha256
8414 (base32
8415 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8416 (build-system python-build-system)
8417 (propagated-inputs
8418 `(("python-dateutil" ,python-dateutil)
8419 ("python-pytz" ,python-pytz)))
8420 (synopsis "Python library for parsing iCalendar files")
8421 (description "The icalendar package is a parser/generator of iCalendar
8422 files for use with Python.")
8423 (home-page "https://github.com/collective/icalendar")
8424 (license license:bsd-2)))
8425
8426 (define-public python-args
8427 (package
8428 (name "python-args")
8429 (version "0.1.0")
8430 (source (origin
8431 (method url-fetch)
8432 (uri (pypi-uri "args" version))
8433 (sha256
8434 (base32
8435 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8436 (build-system python-build-system)
8437 (home-page "https://github.com/kennethreitz/args")
8438 (synopsis "Command-line argument parser")
8439 (description
8440 "This library provides a Python module to parse command-line arguments.")
8441 (license license:bsd-3)))
8442
8443 (define-public python2-args
8444 (package-with-python2 python-args))
8445
8446 (define-public python-clint
8447 (package
8448 (name "python-clint")
8449 (version "0.5.1")
8450 (source (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "clint" version))
8453 (sha256
8454 (base32
8455 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8456 (build-system python-build-system)
8457 (arguments
8458 '(#:phases
8459 (modify-phases %standard-phases
8460 (replace 'check
8461 (lambda _ (invoke "py.test" "-v"))))))
8462 (native-inputs
8463 `(("python-pytest" ,python-pytest)))
8464 (propagated-inputs
8465 `(("python-args" ,python-args)))
8466 (home-page "https://github.com/kennethreitz/clint")
8467 (synopsis "Command-line interface tools")
8468 (description
8469 "Clint is a Python module filled with a set of tools for developing
8470 command-line applications, including tools for colored and indented
8471 output, progress bar display, and pipes.")
8472 (license license:isc)))
8473
8474 (define-public python2-clint
8475 (package-with-python2 python-clint))
8476
8477 (define-public python-rply
8478 (package
8479 (name "python-rply")
8480 (version "0.7.5")
8481 (source (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "rply" version))
8484 (sha256
8485 (base32
8486 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8487 (build-system python-build-system)
8488 (propagated-inputs
8489 `(("python-appdirs" ,python-appdirs)))
8490 (home-page "https://github.com/alex/rply")
8491 (synopsis "Parser generator for Python")
8492 (description
8493 "This package provides a pure Python based parser generator, that also
8494 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8495 with a new public API, and RPython support.")
8496 (license license:bsd-3)))
8497
8498 (define-public python2-rply
8499 (package-with-python2 python-rply))
8500
8501 (define-public python-hy
8502 (package
8503 (name "python-hy")
8504 (version "0.13.0")
8505 (source (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "hy" version))
8508 (sha256
8509 (base32
8510 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8511 (build-system python-build-system)
8512 (arguments
8513 '(#:phases
8514 (modify-phases %standard-phases
8515 (replace 'check
8516 (lambda _
8517 ;; Tests require write access to HOME.
8518 (setenv "HOME" "/tmp")
8519 (invoke "nosetests"))))))
8520 (native-inputs
8521 `(("python-coverage" ,python-coverage)
8522 ("python-nose" ,python-nose)))
8523 (propagated-inputs
8524 `(("python-astor" ,python-astor)
8525 ("python-clint" ,python-clint)
8526 ("python-rply" ,python-rply)))
8527 (home-page "http://hylang.org/")
8528 (synopsis "Lisp frontend to Python")
8529 (description
8530 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8531 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8532 Python at your fingertips, in Lisp form.")
8533 (license license:expat)))
8534
8535 (define-public python2-hy
8536 (package-with-python2 python-hy))
8537
8538 (define-public python2-functools32
8539 (package
8540 (name "python2-functools32")
8541 (version "3.2.3-2")
8542 (source
8543 (origin
8544 (method url-fetch)
8545 (uri (pypi-uri "functools32" version))
8546 (sha256
8547 (base32
8548 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8549 (build-system python-build-system)
8550 (arguments
8551 `(#:python ,python-2
8552 #:tests? #f)) ; no test target
8553 (home-page "https://github.com/MiCHiLU/python-functools32")
8554 (synopsis
8555 "Backport of the functools module from Python 3.2.3")
8556 (description
8557 "This package is a backport of the @code{functools} module from Python
8558 3.2.3 for use with older versions of Python and PyPy.")
8559 (license license:expat)))
8560
8561 (define-public python2-subprocess32
8562 (package
8563 (name "python2-subprocess32")
8564 (version "3.2.7")
8565 (source (origin
8566 (method url-fetch)
8567 (uri (pypi-uri "subprocess32" version))
8568 (sha256
8569 (base32
8570 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8571 (patches
8572 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8573 (build-system python-build-system)
8574 (arguments
8575 `(#:python ,python-2
8576 ;; The test suite fails with Python > 2.7.13:
8577 ;; import test.support
8578 ;; ImportError: No module named support
8579 #:tests? #f
8580 #:phases
8581 (modify-phases %standard-phases
8582 (add-after 'unpack 'patch-/bin/sh
8583 (lambda _
8584 (substitute* '("subprocess32.py"
8585 "test_subprocess32.py")
8586 (("/bin/sh") (which "sh")))
8587 #t)))))
8588 (home-page "https://github.com/google/python-subprocess32")
8589 (synopsis "Backport of the subprocess module from Python 3.2")
8590 (description
8591 "This is a backport of the @code{subprocess} standard library module
8592 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8593 new features. On POSIX systems it is guaranteed to be reliable when used
8594 in threaded applications. It includes timeout support from Python 3.3 but
8595 otherwise matches 3.2’s API.")
8596 (license license:psfl)))
8597
8598 (define-public python2-futures
8599 (package
8600 (name "python2-futures")
8601 (version "3.2.0")
8602 (source
8603 (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "futures" version))
8606 (sha256
8607 (base32
8608 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8609 (build-system python-build-system)
8610 (arguments `(#:python ,python-2
8611 ;; FIXME: Python 2.7.14 moved the test.support library,
8612 ;; but our package has not yet been adjusted. Enable
8613 ;; tests when the python2 package has been fixed.
8614 #:tests? #f))
8615 (home-page "https://github.com/agronholm/pythonfutures")
8616 (synopsis
8617 "Backport of the concurrent.futures package from Python 3.2")
8618 (description
8619 "The concurrent.futures module provides a high-level interface for
8620 asynchronously executing callables. This package backports the
8621 concurrent.futures package from Python 3.2")
8622 (license license:bsd-3)))
8623
8624 (define-public python-promise
8625 (package
8626 (name "python-promise")
8627 (version "0.4.2")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "promise" version))
8632 (sha256
8633 (base32
8634 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8635 (build-system python-build-system)
8636 ;; Tests wants python-futures, which is a python2 only program, and
8637 ;; can't be found by python-promise at test time.
8638 (arguments `(#:tests? #f))
8639 (home-page "https://github.com/syrusakbary/promise")
8640 (synopsis "Promises/A+ implementation for Python")
8641 (description
8642 "Promises/A+ implementation for Python")
8643 (properties `((python2-variant . ,(delay python2-promise))))
8644 (license license:expat)))
8645
8646 (define-public python2-promise
8647 (let ((promise (package-with-python2
8648 (strip-python2-variant python-promise))))
8649 (package (inherit promise)
8650 (arguments (substitute-keyword-arguments (package-arguments promise)
8651 ((#:tests? _) #t)))
8652 (native-inputs
8653 `(("python2-futures" ,python2-futures)
8654 ("python2-pytest" ,python2-pytest)
8655 ,@(package-native-inputs promise))))))
8656
8657 (define-public python-progressbar33
8658 (package
8659 (name "python-progressbar33")
8660 (version "2.4")
8661 (source
8662 (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "progressbar33" version))
8665 (sha256
8666 (base32
8667 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8668 (build-system python-build-system)
8669 (home-page "http://github.com/germangh/python-progressbar")
8670 (synopsis "Text progress bar library for Python")
8671 (description
8672 "This package provides a text progress bar library for Python. This
8673 version only differs from the original @code{progressbar} package in that it
8674 uses relative package imports instead of absolute imports, which is necessary
8675 for the module to work under Python 3.3.")
8676 ;; Either or both of these licenses may be selected.
8677 (license (list license:lgpl2.1+ license:bsd-3))))
8678
8679 (define-public python-colorama
8680 (package
8681 (name "python-colorama")
8682 (version "0.3.9")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "colorama" version))
8687 (sha256
8688 (base32
8689 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8690 (build-system python-build-system)
8691 (synopsis "Colored terminal text rendering for Python")
8692 (description "Colorama is a Python library for rendering colored terminal
8693 text.")
8694 (home-page "https://pypi.python.org/pypi/colorama")
8695 (license license:bsd-3)))
8696
8697 (define-public python2-colorama
8698 (package-with-python2 python-colorama))
8699
8700 (define-public python-rsa
8701 (package
8702 (name "python-rsa")
8703 (version "3.4.2")
8704 (source
8705 (origin
8706 (method url-fetch)
8707 (uri (pypi-uri "rsa" version))
8708 (sha256
8709 (base32
8710 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8711 (build-system python-build-system)
8712 (propagated-inputs
8713 `(("python-pyasn1" ,python-pyasn1)))
8714 (synopsis "Pure-Python RSA implementation")
8715 (description "Python-RSA is a pure-Python RSA implementation. It supports
8716 encryption and decryption, signing and verifying signatures, and key
8717 generation according to PKCS#1 version 1.5. It can be used as a Python
8718 library as well as on the command line.")
8719 (home-page "https://stuvel.eu/rsa")
8720 (license license:asl2.0)))
8721
8722 (define-public python2-rsa
8723 (package-with-python2 python-rsa))
8724
8725 (define-public python-pluggy
8726 (package
8727 (name "python-pluggy")
8728 (version "0.7.1")
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "pluggy" version))
8733 (sha256
8734 (base32
8735 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8736 (build-system python-build-system)
8737 (native-inputs
8738 `(("python-setuptools-scm" ,python-setuptools-scm)))
8739 (synopsis "Plugin and hook calling mechanism for Python")
8740 (description "Pluggy is an extraction of the plugin manager as used by
8741 Pytest but stripped of Pytest specific details.")
8742 (home-page "https://pypi.python.org/pypi/pluggy")
8743 (license license:expat)))
8744
8745 (define-public python2-pluggy
8746 (package-with-python2 python-pluggy))
8747
8748 (define-public python-tox
8749 (package
8750 (name "python-tox")
8751 (version "2.8.1")
8752 (source
8753 (origin
8754 (method url-fetch)
8755 (uri (pypi-uri "tox" version))
8756 (sha256
8757 (base32
8758 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8759 (build-system python-build-system)
8760 (arguments
8761 ;; FIXME: Tests require pytest-timeout, which itself requires
8762 ;; pytest>=2.8.0 for installation.
8763 '(#:tests? #f))
8764 (propagated-inputs
8765 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8766 ("python-py" ,python-py)
8767 ("python-virtualenv" ,python-virtualenv)))
8768 (native-inputs
8769 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8770 ("python-pytest" ,python-pytest) ; >= 2.3.5
8771 ("python-setuptools-scm" ,python-setuptools-scm)))
8772 (home-page "http://tox.testrun.org/")
8773 (synopsis "Virtualenv-based automation of test activities")
8774 (description "Tox is a generic virtualenv management and test command line
8775 tool. It can be used to check that a package installs correctly with
8776 different Python versions and interpreters, or run tests in each type of
8777 supported environment, or act as a frontend to continuous integration
8778 servers.")
8779 (license license:expat)))
8780
8781 (define-public python2-tox
8782 (package-with-python2 python-tox))
8783
8784 (define-public python-jmespath
8785 (package
8786 (name "python-jmespath")
8787 (version "0.9.3")
8788 (source
8789 (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "jmespath" version))
8792 (sha256
8793 (base32
8794 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8795 (build-system python-build-system)
8796 (native-inputs
8797 `(("python-nose" ,python-nose)))
8798 (synopsis "JSON Matching Expressions")
8799 (description "JMESPath (pronounced “james path”) is a Python library that
8800 allows one to declaratively specify how to extract elements from a JSON
8801 document.")
8802 (home-page "https://github.com/jmespath/jmespath.py")
8803 (license license:expat)))
8804
8805 (define-public python2-jmespath
8806 (package-with-python2 python-jmespath))
8807
8808 (define-public python-botocore
8809 (package
8810 (name "python-botocore")
8811 (version "1.12.149")
8812 (source
8813 (origin
8814 (method url-fetch)
8815 (uri (pypi-uri "botocore" version))
8816 (sha256
8817 (base32
8818 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8819 (build-system python-build-system)
8820 (arguments
8821 ;; FIXME: Many tests are failing.
8822 '(#:tests? #f))
8823 (propagated-inputs
8824 `(("python-dateutil" ,python-dateutil)
8825 ("python-docutils" ,python-docutils)
8826 ("python-jmespath" ,python-jmespath)))
8827 (native-inputs
8828 `(("python-mock" ,python-mock)
8829 ("python-nose" ,python-nose)
8830 ("behave" ,behave)
8831 ("python-tox" ,python-tox)
8832 ("python-urllib3" ,python-urllib3)
8833 ("python-wheel" ,python-wheel)))
8834 (home-page "https://github.com/boto/botocore")
8835 (synopsis "Low-level interface to AWS")
8836 (description "Botocore is a Python library that provides a low-level
8837 interface to the Amazon Web Services (AWS) API.")
8838 (license license:asl2.0)))
8839
8840 (define-public python2-botocore
8841 (package-with-python2 python-botocore))
8842
8843 (define-public python-xdo
8844 (package
8845 (name "python-xdo")
8846 (version "0.3")
8847 (source (origin
8848 (method url-fetch)
8849 (uri (string-append
8850 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8851 "python-xdo_" version ".orig.tar.gz"))
8852 (sha256
8853 (base32
8854 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8855 (build-system python-build-system)
8856 (arguments
8857 '(#:phases
8858 (modify-phases %standard-phases
8859 (add-before 'install 'patch-libxdo-path
8860 ;; Hardcode the path of dynamically loaded libxdo library.
8861 (lambda* (#:key inputs #:allow-other-keys)
8862 (let ((libxdo (string-append
8863 (assoc-ref inputs "xdotool")
8864 "/lib/libxdo.so")))
8865 (substitute* "xdo/_xdo.py"
8866 (("find_library\\(\"xdo\"\\)")
8867 (simple-format #f "\"~a\"" libxdo)))
8868 #t))))
8869 #:tests? #f)) ; no tests provided
8870 (propagated-inputs
8871 `(("python-six" ,python-six)))
8872 (inputs
8873 `(("xdotool" ,xdotool)
8874 ("libX11" ,libx11)))
8875 (home-page "https://tracker.debian.org/pkg/python-xdo")
8876 (synopsis "Python library for simulating X11 keyboard/mouse input")
8877 (description "Provides bindings to libxdo for manipulating X11 via simulated
8878 input. (Note that this is mostly a legacy library; you may wish to look at
8879 python-xdo for newer bindings.)")
8880 (license license:bsd-3)))
8881
8882 (define-public python2-xdo
8883 (package-with-python2 python-xdo))
8884
8885 (define-public python-mako
8886 (package
8887 (name "python-mako")
8888 (version "1.1.0")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "Mako" version))
8893 (sha256
8894 (base32
8895 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8896 (build-system python-build-system)
8897 (arguments
8898 `(#:phases (modify-phases %standard-phases
8899 (replace 'check
8900 (lambda _
8901 (invoke "pytest" "-vv"))))))
8902 (propagated-inputs
8903 `(("python-markupsafe" ,python-markupsafe)))
8904 (native-inputs
8905 `(("python-mock" ,python-mock)
8906 ("python-pytest" ,python-pytest)))
8907 (home-page "https://www.makotemplates.org/")
8908 (synopsis "Templating language for Python")
8909 (description "Mako is a templating language for Python that compiles
8910 templates into Python modules.")
8911 (license license:expat)))
8912
8913 (define-public python2-mako
8914 (package-with-python2 python-mako))
8915
8916 (define-public python-waitress
8917 (package
8918 (name "python-waitress")
8919 (version "1.1.0")
8920 (source
8921 (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "waitress" version))
8924 (patches (search-patches "python-waitress-fix-tests.patch"))
8925 (sha256
8926 (base32
8927 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8928 (build-system python-build-system)
8929 (home-page "https://github.com/Pylons/waitress")
8930 (synopsis "Waitress WSGI server")
8931 (description "Waitress is meant to be a production-quality pure-Python WSGI
8932 server with very acceptable performance.")
8933 (license license:zpl2.1)))
8934
8935 (define-public python2-waitress
8936 (package-with-python2 python-waitress))
8937
8938 (define-public python-pyquery
8939 (package
8940 (name "python-pyquery")
8941 (version "1.2.17")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "pyquery" version))
8946 (sha256
8947 (base32
8948 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8949 (build-system python-build-system)
8950 (native-inputs
8951 `(("python-webob" ,python-webob)
8952 ("python-webtest" ,python-webtest)))
8953 (propagated-inputs
8954 `(("python-lxml" ,python-lxml)
8955 ("python-cssselect" ,python-cssselect)))
8956 (home-page "https://github.com/gawel/pyquery")
8957 (synopsis "Make jQuery-like queries on xml documents")
8958 (description "pyquery allows you to make jQuery queries on xml documents.
8959 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8960 fast xml and html manipulation.")
8961 (license license:bsd-3)))
8962
8963 (define-public python-anyjson
8964 (package
8965 (name "python-anyjson")
8966 (version "0.3.3")
8967 (source
8968 (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "anyjson" version))
8971 (sha256
8972 (base32
8973 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8974 (build-system python-build-system)
8975 (arguments
8976 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8977 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8978 ;; whatever) so this transformation needs to be done before the tests
8979 ;; can be run. Maybe we could add a build step to transform beforehand
8980 ;; but it could be annoying/difficult.
8981 ;; We can enable tests for the Python 2 version, though, and do below.
8982 #:tests? #f))
8983 (home-page "https://bitbucket.org/runeh/anyjson/")
8984 (synopsis
8985 "Wraps best available JSON implementation in a common interface")
8986 (description
8987 "Anyjson loads whichever is the fastest JSON module installed
8988 and provides a uniform API regardless of which JSON implementation is used.")
8989 (license license:bsd-3)
8990 (properties `((python2-variant . ,(delay python2-anyjson))))))
8991
8992 (define-public python2-anyjson
8993 (let ((anyjson (package-with-python2
8994 (strip-python2-variant python-anyjson))))
8995 (package
8996 (inherit anyjson)
8997 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8998 #:tests? #t
8999 ,@(package-arguments anyjson)))
9000 (native-inputs `(("python2-nose" ,python2-nose))))))
9001
9002 (define-public python-amqp
9003 (package
9004 (name "python-amqp")
9005 (version "2.3.2")
9006 (source
9007 (origin
9008 (method url-fetch)
9009 (uri (pypi-uri "amqp" version))
9010 (sha256
9011 (base32
9012 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9013 (build-system python-build-system)
9014 (native-inputs
9015 `(("python-case" ,python-case)
9016 ("python-pytest-sugar" ,python-pytest-sugar)
9017 ("python-mock" ,python-mock)))
9018 (propagated-inputs
9019 `(("python-vine" ,python-vine)))
9020 (home-page "https://github.com/celery/py-amqp")
9021 (synopsis
9022 "Low-level AMQP client for Python (fork of amqplib)")
9023 (description
9024 "This is a fork of amqplib which was originally written by Barry Pederson.
9025 It is maintained by the Celery project, and used by kombu as a pure python
9026 alternative when librabbitmq is not available.")
9027 (license license:lgpl2.1+)
9028 (properties `((python2-variant . ,(delay python2-amqp))))))
9029
9030 (define-public python2-amqp
9031 (let ((amqp (package-with-python2
9032 (strip-python2-variant python-amqp))))
9033 (package
9034 (inherit amqp)
9035 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9036 ;; unmaintained. Weirdly, does not do this on the python 3
9037 ;; version?
9038 #:tests? #f
9039 ,@(package-arguments amqp))))))
9040
9041 (define-public python-txamqp
9042 (package
9043 (name "python-txamqp")
9044 (version "0.8.2")
9045 (source
9046 (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "txAMQP" version))
9049 (sha256
9050 (base32
9051 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9052 (build-system python-build-system)
9053 (propagated-inputs
9054 `(("python-six" ,python-six)
9055 ("python-twisted" ,python-twisted)))
9056 (home-page "https://github.com/txamqp/txamqp")
9057 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9058 (description
9059 "This package provides a Python library for communicating with AMQP peers
9060 and brokers using the asynchronous networking framework Twisted. It contains
9061 all the necessary code to connect, send and receive messages to/from an
9062 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9063 also includes support for using Thrift RPC over AMQP in Twisted
9064 applications.")
9065 (license license:asl2.0)))
9066
9067 (define-public python2-txamqp
9068 (package-with-python2 python-txamqp))
9069
9070 (define-public python-kombu
9071 (package
9072 (name "python-kombu")
9073 (version "4.2.2")
9074 (source
9075 (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "kombu" version))
9078 (sha256
9079 (base32
9080 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9081 (build-system python-build-system)
9082 (native-inputs
9083 `(("python-mock" ,python-mock)
9084 ("python-case" ,python-case)
9085 ("python-pyro4" ,python-pyro4)
9086 ("python-pytest-sugar" ,python-pytest-sugar)
9087 ("python-pytz" ,python-pytz)))
9088 (propagated-inputs
9089 `(("python-anyjson" ,python-anyjson)
9090 ("python-amqp" ,python-amqp)
9091 ("python-redis" ,python-redis)))
9092 (home-page "https://kombu.readthedocs.io")
9093 (synopsis "Message passing library for Python")
9094 (description "The aim of Kombu is to make messaging in Python as easy as
9095 possible by providing an idiomatic high-level interface for the AMQ protocol,
9096 and also provide proven and tested solutions to common messaging problems.
9097 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9098 message orientation, queuing, routing, reliability and security, for which the
9099 RabbitMQ messaging server is the most popular implementation.")
9100 (license license:bsd-3)
9101 (properties `((python2-variant . ,(delay python2-kombu))))))
9102
9103 (define-public python2-kombu
9104 (let ((kombu (package-with-python2
9105 (strip-python2-variant python-kombu))))
9106 (package
9107 (inherit kombu)
9108 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9109 ;; It works fine on the python3 variant.
9110 #:tests? #f
9111 ,@(package-arguments kombu)))
9112 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9113 ,@(package-native-inputs kombu))))))
9114
9115 (define-public python-billiard
9116 (package
9117 (name "python-billiard")
9118 (version "3.5.0.5")
9119 (source
9120 (origin
9121 (method url-fetch)
9122 (uri (pypi-uri "billiard" version))
9123 (sha256
9124 (base32
9125 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9126 (build-system python-build-system)
9127 (native-inputs
9128 `(("python-case" ,python-case)
9129 ("python-pytest" ,python-pytest)))
9130 (home-page "https://github.com/celery/billiard")
9131 (synopsis
9132 "Python multiprocessing fork with improvements and bugfixes")
9133 (description
9134 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9135 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9136 pyprocessing package. This standalone variant is intended to be compatible with
9137 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9138 (license license:bsd-3)
9139 (properties `((python2-variant . ,(delay python2-billiard))))))
9140
9141 (define-public python2-billiard
9142 (let ((billiard (package-with-python2
9143 (strip-python2-variant python-billiard))))
9144 (package
9145 (inherit billiard)
9146 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9147 ("python2-mock" ,python2-mock)
9148 ,@(package-native-inputs billiard))))))
9149
9150 (define-public python-celery
9151 (package
9152 (name "python-celery")
9153 (version "4.2.1")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "celery" version))
9158 (sha256
9159 (base32
9160 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9161 (build-system python-build-system)
9162 (arguments
9163 '(;; TODO The tests fail with Python 3.7
9164 ;; https://github.com/celery/celery/issues/4849
9165 #:tests? #f
9166 #:phases
9167 (modify-phases %standard-phases
9168 (add-after 'unpack 'patch-requirements
9169 (lambda _
9170 (substitute* "requirements/test.txt"
9171 (("pytest>=3\\.0,<3\\.3")
9172 "pytest>=3.0"))
9173 #t)))))
9174 (native-inputs
9175 `(("python-case" ,python-case)
9176 ("python-pytest" ,python-pytest)))
9177 (propagated-inputs
9178 `(("python-pytz" ,python-pytz)
9179 ("python-billiard" ,python-billiard)
9180 ("python-kombu" ,python-kombu)))
9181 (home-page "https://celeryproject.org")
9182 (synopsis "Distributed Task Queue")
9183 (description "Celery is an asynchronous task queue/job queue based on
9184 distributed message passing. It is focused on real-time operation, but
9185 supports scheduling as well. The execution units, called tasks, are executed
9186 concurrently on a single or more worker servers using multiprocessing,
9187 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9188 synchronously (wait until ready).")
9189 (license license:bsd-3)
9190 (properties `((python2-variant . ,(delay python2-celery))))))
9191
9192 (define-public python2-celery
9193 (let ((celery (package-with-python2
9194 (strip-python2-variant python-celery))))
9195 (package
9196 (inherit celery)
9197 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9198 ("python2-mock" ,python2-mock)
9199 ,@(package-native-inputs celery))))))
9200
9201 (define-public python-translitcodec
9202 (package
9203 (name "python-translitcodec")
9204 (version "0.4.0")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "translitcodec" version))
9209 (sha256
9210 (base32
9211 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9212 (build-system python-build-system)
9213 (arguments
9214 `(#:tests? #f)) ; no tests provided
9215 (home-page
9216 "https://github.com/claudep/translitcodec")
9217 (synopsis
9218 "Unicode to 8-bit charset transliteration codec")
9219 (description
9220 "This package contains codecs for transliterating ISO 10646 texts into
9221 best-effort representations using smaller coded character sets (ASCII,
9222 ISO 8859, etc.).")
9223 (license license:expat)))
9224
9225 (define-public python2-translitcodec
9226 (package-with-python2 python-translitcodec))
9227
9228 (define-public python-editor
9229 (package
9230 (name "python-editor")
9231 (version "0.5")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "python-editor" version))
9236 (sha256
9237 (base32
9238 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9239 (build-system python-build-system)
9240 (home-page
9241 "https://github.com/fmoo/python-editor")
9242 (synopsis
9243 "Programmatically open an editor, capture the result")
9244 (description
9245 "python-editor is a library that provides the editor module for
9246 programmatically interfacing with your system's $EDITOR.")
9247 (license license:asl2.0)))
9248
9249 (define-public python2-editor
9250 (package-with-python2 python-editor))
9251
9252 (define-public python-vobject
9253 (package
9254 (name "python-vobject")
9255 (version "0.9.5")
9256 (source (origin
9257 (method url-fetch)
9258 (uri (pypi-uri "vobject" version))
9259 (sha256
9260 (base32
9261 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9262 (build-system python-build-system)
9263 (arguments
9264 '(;; The test suite relies on some non-portable Windows interfaces.
9265 #:tests? #f))
9266 (propagated-inputs
9267 `(("python-dateutil" ,python-dateutil)
9268 ("python-pyicu" ,python-pyicu)))
9269 (synopsis "Parse and generate vCard and vCalendar files")
9270 (description "Vobject is intended to be a full featured Python package for
9271 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9272 are supported and well tested. vCard 3.0 files are supported, and all data
9273 should be imported, but only a few components are understood in a sophisticated
9274 way.")
9275 (home-page "http://eventable.github.io/vobject/")
9276 (license license:asl2.0)))
9277
9278 (define-public python2-vobject
9279 (package-with-python2 python-vobject))
9280
9281 (define-public python-munkres
9282 (package
9283 (name "python-munkres")
9284 (version "1.0.8")
9285 (source (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "munkres" version))
9288 (sha256
9289 (base32
9290 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9291 (build-system python-build-system)
9292 (arguments
9293 '(#:tests? #f)) ; no test suite
9294 (home-page "http://software.clapper.org/munkres/")
9295 (synopsis "Implementation of the Munkres algorithm")
9296 (description "The Munkres module provides an implementation of the Munkres
9297 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9298 useful for solving the Assignment Problem.")
9299 (license license:bsd-3)))
9300
9301 (define-public python2-munkres
9302 (package-with-python2 python-munkres))
9303
9304 (define-public python-whoosh
9305 (package
9306 (name "python-whoosh")
9307 (version "2.7.4")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "Whoosh" version))
9312 (sha256
9313 (base32
9314 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9315 (build-system python-build-system)
9316 (native-inputs
9317 `(("python-pytest" ,python-pytest)))
9318 (home-page "https://bitbucket.org/mchaput/whoosh")
9319 (synopsis "Full text indexing, search, and spell checking library")
9320 (description
9321 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9322 checking library.")
9323 (license license:bsd-2)))
9324
9325 (define-public python2-whoosh
9326 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9327 (package (inherit whoosh)
9328 (propagated-inputs
9329 `(("python2-backport-ssl-match-hostname"
9330 ,python2-backport-ssl-match-hostname)
9331 ,@(package-propagated-inputs whoosh))))))
9332
9333 (define-public python-pathlib
9334 (package
9335 (name "python-pathlib")
9336 (version "1.0.1")
9337 (source (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "pathlib" version))
9340 (sha256
9341 (base32
9342 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9343 (build-system python-build-system)
9344 ;; The tests depend on the internal "test" module, which does not provide
9345 ;; a stable interface.
9346 (arguments `(#:tests? #f))
9347 (home-page "https://pathlib.readthedocs.org/")
9348 (synopsis "Object-oriented file system paths")
9349 (description "Pathlib offers a set of classes to handle file system paths.
9350 It offers the following advantages over using string objects:
9351
9352 @enumerate
9353 @item No more cumbersome use of os and os.path functions. Everything can
9354 be done easily through operators, attribute accesses, and method calls.
9355 @item Embodies the semantics of different path types. For example,
9356 comparing Windows paths ignores casing.
9357 @item Well-defined semantics, eliminating any inconsistencies or
9358 ambiguities (forward vs. backward slashes, etc.).
9359 @end enumerate
9360
9361 Note: In Python 3.4, pathlib is now part of the standard library. For other
9362 Python versions please consider python-pathlib2 instead, which tracks the
9363 standard library module. This module (python-pathlib) isn't maintained
9364 anymore.")
9365 (license license:expat)))
9366
9367 (define-public python2-pathlib
9368 (package-with-python2 python-pathlib))
9369
9370 (define-public python2-pathlib2
9371 (package
9372 (name "python2-pathlib2")
9373 (version "2.3.2")
9374 (source (origin
9375 (method url-fetch)
9376 (uri (pypi-uri "pathlib2" version))
9377 (sha256
9378 (base32
9379 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9380 (build-system python-build-system)
9381 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9382 ;; version is 3.4 which already includes this package as part of the
9383 ;; standard library.
9384 (arguments
9385 `(#:python ,python-2))
9386 (propagated-inputs
9387 `(("python2-scandir" ,python2-scandir)
9388 ("python2-six" ,python2-six)))
9389 (home-page "https://pypi.python.org/pypi/pathlib2/")
9390 (synopsis "Object-oriented file system paths - backport of standard
9391 pathlib module")
9392 (description "The goal of pathlib2 is to provide a backport of standard
9393 pathlib module which tracks the standard library module, so all the newest
9394 features of the standard pathlib can be used also on older Python versions.
9395
9396 Pathlib offers a set of classes to handle file system paths. It offers the
9397 following advantages over using string objects:
9398
9399 @enumerate
9400 @item No more cumbersome use of os and os.path functions. Everything can
9401 be done easily through operators, attribute accesses, and method calls.
9402 @item Embodies the semantics of different path types. For example,
9403 comparing Windows paths ignores casing.
9404 @item Well-defined semantics, eliminating any inconsistencies or
9405 ambiguities (forward vs. backward slashes, etc.).
9406 @end enumerate")
9407 (license license:expat)))
9408
9409 (define-public python2-pathlib2-bootstrap
9410 (hidden-package
9411 (package
9412 (inherit python2-pathlib2)
9413 (name "python2-pathlib2-bootstrap")
9414 (propagated-inputs
9415 `(("python2-scandir" ,python2-scandir)
9416 ("python2-six" ,python2-six-bootstrap))))))
9417
9418 (define-public python-jellyfish
9419 (package
9420 (name "python-jellyfish")
9421 (version "0.5.6")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "jellyfish" version))
9425 (sha256
9426 (base32
9427 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9428 (build-system python-build-system)
9429 (native-inputs
9430 `(("python-pytest" ,python-pytest)))
9431 (home-page "https://github.com/jamesturk/jellyfish")
9432 (synopsis "Approximate and phonetic matching of strings")
9433 (description "Jellyfish uses a variety of string comparison and phonetic
9434 encoding algorithms to do fuzzy string matching.")
9435 (license license:bsd-2)
9436 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9437
9438 (define-public python2-jellyfish
9439 (let ((jellyfish (package-with-python2
9440 (strip-python2-variant python-jellyfish))))
9441 (package (inherit jellyfish)
9442 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9443 ,@(package-native-inputs jellyfish))))))
9444
9445 (define-public python2-unicodecsv
9446 (package
9447 (name "python2-unicodecsv")
9448 (version "0.14.1")
9449 (source (origin
9450 (method url-fetch)
9451 ;; The test suite is not included in the PyPi release.
9452 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9453 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9454 "archive/" version ".tar.gz"))
9455 (file-name (string-append name "-" version ".tar.gz"))
9456 (sha256
9457 (base32
9458 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9459 (build-system python-build-system)
9460 (arguments
9461 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9462 #:python ,python-2))
9463 (native-inputs
9464 `(("python2-unittest2" ,python2-unittest2)))
9465 (home-page "https://github.com/jdunck/python-unicodecsv")
9466 (synopsis "Unicode CSV module for Python 2")
9467 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9468 module, adding support for Unicode strings.")
9469 (license license:bsd-2)))
9470
9471 (define-public python-rarfile
9472 (package
9473 (name "python-rarfile")
9474 (version "2.8")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "rarfile" version))
9478 (sha256
9479 (base32
9480 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9481 (build-system python-build-system)
9482 (arguments
9483 '(#:phases
9484 (modify-phases %standard-phases
9485 (replace 'check
9486 ;; Many tests fail, but the installation proceeds.
9487 (lambda _ (invoke "make" "-C" "test" "test"))))))
9488 (native-inputs
9489 `(("which" ,which))) ; required for tests
9490 (propagated-inputs
9491 `(("libarchive" ,libarchive)))
9492 (home-page "https://github.com/markokr/rarfile")
9493 (synopsis "RAR archive reader for Python")
9494 (description "This is Python module for RAR archive reading. The interface
9495 is made as zipfile like as possible.")
9496 (license license:isc)))
9497
9498 (define-public python2-rarfile
9499 (package-with-python2 python-rarfile))
9500
9501 (define-public python-magic
9502 (package
9503 (name "python-magic")
9504 (version "0.4.15")
9505 (source
9506 (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "python-magic" version))
9509 (sha256
9510 (base32
9511 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9512 (file-name (string-append name "-" version "-checkout"))))
9513 (build-system python-build-system)
9514 (arguments
9515 ;; The tests are unreliable, so don't run them. The tests fail
9516 ;; under Python3 because they were written for Python2 and
9517 ;; contain import statements that do not work in Python3. One of
9518 ;; the tests fails under Python2 because its assertions are
9519 ;; overly stringent; it relies on comparing output strings which
9520 ;; are brittle and can change depending on the version of
9521 ;; libmagic being used and the system on which the test is
9522 ;; running. In my case, under GuixSD 0.10.0, only one test
9523 ;; failed, and it seems to have failed only because the version
9524 ;; of libmagic that is packaged in Guix outputs a slightly
9525 ;; different (but not wrong) string than the one that the test
9526 ;; expected.
9527 '(#:tests? #f
9528 #:phases (modify-phases %standard-phases
9529 ;; Replace a specific method call with a hard-coded
9530 ;; path to the necessary libmagic.so file in the
9531 ;; store. If we don't do this, then the method call
9532 ;; will fail to find the libmagic.so file, which in
9533 ;; turn will cause any application using
9534 ;; python-magic to fail.
9535 (add-before 'build 'hard-code-path-to-libmagic
9536 (lambda* (#:key inputs #:allow-other-keys)
9537 (let ((file (assoc-ref inputs "file")))
9538 (substitute* "magic.py"
9539 (("ctypes.util.find_library\\('magic'\\)")
9540 (string-append "'" file "/lib/libmagic.so'")))
9541 #t)))
9542 (add-before 'install 'disable-egg-compression
9543 (lambda _
9544 (let ((port (open-file "setup.cfg" "a")))
9545 (display "\n[easy_install]\nzip_ok = 0\n"
9546 port)
9547 (close-port port)
9548 #t))))))
9549 (inputs
9550 ;; python-magic needs to be able to find libmagic.so.
9551 `(("file" ,file)))
9552 (home-page
9553 "https://github.com/ahupp/python-magic")
9554 (synopsis
9555 "File type identification using libmagic")
9556 (description
9557 "This module uses ctypes to access the libmagic file type
9558 identification library. It makes use of the local magic database and
9559 supports both textual and MIME-type output. Note that this module and
9560 the python-file module both provide a \"magic.py\" file; these two
9561 modules, which are different and were developed separately, both serve
9562 the same purpose: to provide Python bindings for libmagic.")
9563 (license license:expat)))
9564
9565 (define-public python2-magic
9566 (package-with-python2 python-magic))
9567
9568 (define-public python2-s3cmd
9569 (package
9570 (name "python2-s3cmd")
9571 (version "1.6.1")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9576 "s3cmd-" version ".tar.gz"))
9577 (sha256
9578 (base32
9579 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9580 (build-system python-build-system)
9581 (arguments
9582 ;; s3cmd is written for python2 only and contains no tests.
9583 `(#:python ,python-2
9584 #:tests? #f))
9585 (propagated-inputs
9586 `(("python2-dateutil" ,python2-dateutil)
9587 ;; The python-file package also provides a magic.py module.
9588 ;; This is an unfortunate state of affairs; however, s3cmd
9589 ;; fails to install if it cannot find specifically the
9590 ;; python-magic package. Thus we include it, instead of using
9591 ;; python-file. Ironically, s3cmd sometimes works better
9592 ;; without libmagic bindings at all:
9593 ;; https://github.com/s3tools/s3cmd/issues/198
9594 ("python2-magic" ,python2-magic)))
9595 (home-page "http://s3tools.org/s3cmd")
9596 (synopsis "Command line tool for S3-compatible storage services")
9597 (description
9598 "S3cmd is a command line tool for uploading, retrieving and managing data
9599 in storage services that are compatible with the Amazon Simple Storage
9600 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9601 GnuPG encryption, and more. It also supports management of Amazon's
9602 CloudFront content delivery network.")
9603 (license license:gpl2+)))
9604
9605 (define-public python-pkgconfig
9606 (package
9607 (name "python-pkgconfig")
9608 (version "1.3.1")
9609 (source
9610 (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "pkgconfig" version))
9613 (sha256
9614 (base32
9615 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9616 (build-system python-build-system)
9617 (native-inputs
9618 `(("python-nose" ,python-nose)))
9619 (inputs
9620 `(("pkg-config" ,pkg-config)))
9621 (arguments
9622 `(#:phases
9623 (modify-phases %standard-phases
9624 (add-before 'build 'patch
9625 ;; Hard-code the path to pkg-config.
9626 (lambda _
9627 (substitute* "pkgconfig/pkgconfig.py"
9628 (("cmd = 'pkg-config")
9629 (string-append "cmd = '" (which "pkg-config"))))
9630 #t))
9631 (replace 'check
9632 (lambda _
9633 (invoke "nosetests" "test.py"))))))
9634 (home-page "https://github.com/matze/pkgconfig")
9635 (synopsis "Python interface for pkg-config")
9636 (description "This module provides a Python interface to pkg-config. It
9637 can be used to find all pkg-config packages, check if a package exists,
9638 check if a package meets certain version requirements, query CFLAGS and
9639 LDFLAGS and parse the output to build extensions with setup.py.")
9640 (license license:expat)))
9641
9642 (define-public python2-pkgconfig
9643 (package-with-python2 python-pkgconfig))
9644
9645 (define-public python-bz2file
9646 (package
9647 (name "python-bz2file")
9648 (version "0.98")
9649 (source
9650 (origin
9651 (method url-fetch)
9652 (uri (pypi-uri "bz2file" version))
9653 (sha256
9654 (base32
9655 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9656 (build-system python-build-system)
9657 (arguments
9658 `(#:tests? #f)) ; Tests use deprecated python modules.
9659 (home-page "https://github.com/nvawda/bz2file")
9660 (synopsis "Read and write bzip2-compressed files")
9661 (description
9662 "Bz2file is a Python library for reading and writing bzip2-compressed
9663 files. It contains a drop-in replacement for the I/O interface in the
9664 standard library's @code{bz2} module, including features from the latest
9665 development version of CPython that are not available in older releases.")
9666 (license license:asl2.0)))
9667
9668 (define-public python2-bz2file
9669 (package-with-python2 python-bz2file))
9670
9671 (define-public python-future
9672 (package
9673 (name "python-future")
9674 (version "0.17.1")
9675 (source
9676 (origin
9677 (method url-fetch)
9678 (uri (pypi-uri "future" version))
9679 (sha256
9680 (base32
9681 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9682 (build-system python-build-system)
9683 ;; Many tests connect to the network or are otherwise flawed.
9684 ;; https://github.com/PythonCharmers/python-future/issues/210
9685 (arguments
9686 `(#:tests? #f))
9687 (home-page "http://python-future.org")
9688 (synopsis "Single-source support for Python 3 and 2")
9689 (description
9690 "@code{python-future} is the missing compatibility layer between Python 2 and
9691 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9692 to support both Python 2 and Python 3 with minimal overhead.")
9693 (license license:expat)))
9694
9695 (define-public python2-future
9696 (package-with-python2 python-future))
9697
9698 (define-public python-cysignals
9699 (package
9700 (name "python-cysignals")
9701 (version "1.9.0")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "cysignals" version))
9706 (sha256
9707 (base32
9708 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9709 (build-system python-build-system)
9710 (native-inputs
9711 `(("python-cython" ,python-cython)
9712 ("python-sphinx" ,python-sphinx)))
9713 (inputs
9714 `(("pari-gp" ,pari-gp)))
9715 (arguments
9716 `(#:modules ((guix build python-build-system)
9717 ((guix build gnu-build-system) #:prefix gnu:)
9718 (guix build utils))
9719 ;; FIXME: Tests are executed after installation and currently fail
9720 ;; when not installing into standard locations; the author is working
9721 ;; on a fix.
9722 #:tests? #f
9723 #:phases
9724 (modify-phases %standard-phases
9725 (add-before
9726 'build 'configure
9727 (assoc-ref gnu:%standard-phases 'configure)))))
9728 (home-page
9729 "https://github.com/sagemath/cysignals")
9730 (synopsis
9731 "Handling of interrupts and signals for Cython")
9732 (description
9733 "The cysignals package provides mechanisms to handle interrupts (and
9734 other signals and errors) in Cython code, using two related approaches,
9735 for mixed Cython/Python code or external C libraries and pure Cython code,
9736 respectively.")
9737 (license license:lgpl3+)))
9738
9739 (define-public python2-cysignals
9740 (package-with-python2 python-cysignals))
9741
9742 (define-public python2-shedskin
9743 (package
9744 (name "python2-shedskin")
9745 (version "0.9.4")
9746 (source
9747 (origin
9748 (method url-fetch)
9749 (uri (string-append "https://github.com/shedskin/shedskin/"
9750 "releases/download/v" version
9751 "/shedskin-" version ".tgz"))
9752 (sha256
9753 (base32
9754 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9755 (build-system python-build-system)
9756 (arguments
9757 `(#:python ,python-2
9758 #:phases (modify-phases %standard-phases
9759 (add-after 'unpack 'fix-resulting-include-libs
9760 (lambda* (#:key inputs #:allow-other-keys)
9761 (let ((libgc (assoc-ref inputs "libgc"))
9762 (pcre (assoc-ref inputs "pcre")))
9763 (substitute* "shedskin/makefile.py"
9764 (("variable == 'CCFLAGS':[ ]*")
9765 (string-append "variable == 'CCFLAGS':\n"
9766 " line += ' -I " pcre "/include"
9767 " -I " libgc "/include'"))
9768 (("variable == 'LFLAGS':[ ]*")
9769 (string-append "variable == 'LFLAGS':\n"
9770 " line += ' -L" pcre "/lib"
9771 " -L " libgc "/lib'")))
9772 #t))))))
9773 (inputs `(("pcre" ,pcre)
9774 ("libgc" ,libgc)))
9775 (home-page "https://shedskin.github.io/")
9776 (synopsis "Experimental Python-2 to C++ Compiler")
9777 (description (string-append "This is an experimental compiler for a subset of
9778 Python. It generates C++ code and a Makefile."))
9779 (license (list license:gpl3 license:bsd-3 license:expat))))
9780
9781 (define-public python2-rope
9782 (package
9783 (name "python2-rope")
9784 (version "0.11.0")
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "rope" version))
9789 (sha256
9790 (base32
9791 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9792 (arguments
9793 ;; Rope has only partial python3 support, see `python-rope'
9794 `(#:python ,python-2))
9795 (build-system python-build-system)
9796 (native-inputs
9797 `(("python2-unittest2" ,python2-unittest2)))
9798 (home-page "https://github.com/python-rope/rope")
9799 (synopsis "Refactoring library for Python")
9800 (description "Rope is a refactoring library for Python. It facilitates
9801 the renaming, moving and extracting of attributes, functions, modules, fields
9802 and parameters in Python 2 source code. These refactorings can also be applied
9803 to occurrences in strings and comments.")
9804 (license license:gpl2)))
9805
9806 (define-public python-rope
9807 (package
9808 (inherit python2-rope)
9809 (name "python-rope")
9810 (arguments `(#:python ,python-wrapper
9811 ;; XXX: Only partial python3 support, results in some failing
9812 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9813 #:tests? #f))
9814 (properties `((python2-variant . ,(delay python2-rope))))))
9815
9816 (define-public python-py3status
9817 (package
9818 (name "python-py3status")
9819 (version "3.16")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "py3status" version))
9824 (sha256
9825 (base32
9826 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9827 (build-system python-build-system)
9828 (inputs
9829 `(("file" ,file)))
9830 (arguments
9831 '(#:phases
9832 (modify-phases %standard-phases
9833 ;; 'file' is used for detection of configuration file encoding
9834 ;; let's make link the dependency to particular input
9835 (add-before 'build 'patch-file-path
9836 (lambda* (#:key inputs #:allow-other-keys)
9837 (let ((file-path (assoc-ref inputs "file")))
9838 (substitute* "py3status/parse_config.py"
9839 (("\\['file', '-b'")
9840 (string-append "['" file-path "/bin/file', '-b'")))
9841 #t))))
9842 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9843 (home-page "https://github.com/ultrabug/py3status")
9844 (synopsis "Extensible i3status wrapper written in Python")
9845 (description "py3status is an i3status wrapper which extends i3status
9846 functionality in a modular way, allowing you to extend your panel with your
9847 own code, responding to click events and updating clock every second.")
9848 (license license:bsd-3)))
9849
9850 (define-public python-tblib
9851 (package
9852 (name "python-tblib")
9853 (version "1.3.2")
9854 (source (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "tblib" version))
9857 (sha256 (base32
9858 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9859 (build-system python-build-system)
9860 (arguments
9861 `(#:phases
9862 (modify-phases %standard-phases
9863 (add-before 'check 'adjust-tests
9864 (lambda _
9865 (when (which "python3")
9866 ;; Adjust the example output to match that of Python 3.7:
9867 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9868 (substitute* "README.rst"
9869 (("Exception\\('fail',") "Exception('fail'"))
9870 #t)))
9871 (replace 'check
9872 (lambda _
9873 ;; Upstream runs tests after installation and the package itself
9874 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9875 ;; found.
9876 (setenv "PYTHONPATH"
9877 (string-append (getcwd) "/build/lib:"
9878 (getenv "PYTHONPATH")))
9879 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9880 (native-inputs
9881 `(("python-pytest" ,python-pytest)
9882 ("python-six" ,python-six)))
9883 (home-page "https://github.com/ionelmc/python-tblib")
9884 (synopsis "Traceback serialization library")
9885 (description
9886 "Traceback serialization allows you to:
9887
9888 @enumerate
9889 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9890 different processes. This allows better error handling when running code over
9891 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9892
9893 @item Parse traceback strings and raise with the parsed tracebacks.
9894 @end enumerate\n")
9895 (license license:bsd-3)))
9896
9897 (define-public python2-tblib
9898 (package-with-python2 python-tblib))
9899
9900 (define-public python-greenlet
9901 (package
9902 (name "python-greenlet")
9903 (version "0.4.15")
9904 (source (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "greenlet" version))
9907 (sha256
9908 (base32
9909 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9910 (build-system python-build-system)
9911 (home-page "https://greenlet.readthedocs.io/")
9912 (synopsis "Lightweight in-process concurrent programming")
9913 (description
9914 "Greenlet package is a spin-off of Stackless, a version of CPython
9915 that supports micro-threads called \"tasklets\". Tasklets run
9916 pseudo-concurrently (typically in a single or a few OS-level threads) and
9917 are synchronized with data exchanges on \"channels\".")
9918 (license (list license:psfl license:expat))))
9919
9920 (define-public python2-greenlet
9921 (package-with-python2 python-greenlet))
9922
9923 (define-public python-objgraph
9924 (package
9925 (name "python-objgraph")
9926 (version "3.4.0")
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "objgraph" version))
9931 (sha256
9932 (base32
9933 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9934 (build-system python-build-system)
9935 (propagated-inputs
9936 `(("python-graphviz" ,python-graphviz)))
9937 (native-inputs
9938 `(("python-mock" ,python-mock)
9939 ("graphviz" ,graphviz)))
9940 (home-page "https://mg.pov.lt/objgraph/")
9941 (synopsis "Draw Python object reference graphs with graphviz")
9942 (description
9943 "This package provides tools to draw Python object reference graphs with
9944 graphviz.")
9945 (license license:expat)))
9946
9947 (define-public python-gevent
9948 (package
9949 (name "python-gevent")
9950 (version "1.3.7")
9951 (source (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "gevent" version))
9954 (sha256
9955 (base32
9956 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9957 (modules '((guix build utils)))
9958 (snippet
9959 '(begin
9960 ;; unbunding libev and c-ares
9961 (delete-file-recursively "deps")
9962 #t))))
9963 (build-system python-build-system)
9964 (arguments
9965 `(#:modules ((ice-9 ftw)
9966 (ice-9 match)
9967 (srfi srfi-26)
9968 (guix build utils)
9969 (guix build python-build-system))
9970 #:phases (modify-phases %standard-phases
9971 (add-after 'unpack 'unpack-libev
9972 (lambda* (#:key inputs #:allow-other-keys)
9973 (mkdir-p "deps/libev")
9974 ;; FIXME: gevent requires building libev, even though
9975 ;; it only links against the proper one.
9976 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9977 "--strip-components=1" "-C" "deps/libev")))
9978 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9979 (lambda _
9980 (substitute* "src/gevent/subprocess.py"
9981 (("/bin/sh") (which "sh")))
9982 (for-each (lambda (file)
9983 (substitute* file
9984 (("/bin/sh") (which "sh"))
9985 (("/bin/true") (which "true"))))
9986 (find-files "src/greentest" "\\.py$"))
9987 #t))
9988 (add-before 'build 'do-not-use-bundled-sources
9989 (lambda* (#:key inputs #:allow-other-keys)
9990 (setenv "CONFIG_SHELL" (which "bash"))
9991 (setenv "LIBEV_EMBED" "false")
9992 (setenv "CARES_EMBED" "false")
9993 (setenv "EMBED" "false")
9994
9995 (let ((greenlet (string-append
9996 (assoc-ref inputs "python-greenlet")
9997 "/include")))
9998 (match (scandir greenlet
9999 (lambda (item)
10000 (string-prefix? "python" item)))
10001 ((python)
10002 (setenv "CPATH"
10003 (string-append greenlet "/" python)))))
10004 #t))
10005 (add-before 'check 'skip-timer-test
10006 (lambda _
10007 ;; XXX: Skip 'TestTimerResolution', which appears to be
10008 ;; unreliable.
10009 (substitute* "src/greentest/test__core_timer.py"
10010 (("not greentest.RUNNING_ON_CI") "False"))
10011 #t))
10012 (replace 'check
10013 (lambda _
10014 ;; Make sure the build directory is on PYTHONPATH.
10015 (setenv "PYTHONPATH"
10016 (string-append
10017 (getenv "PYTHONPATH") ":"
10018 (getcwd) "/build/"
10019 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10020 (with-directory-excursion "src/greentest"
10021 ;; XXX: Many tests require network access. Instead we only
10022 ;; run known-good tests. Unfortunately we cannot use
10023 ;; recursion here since this directory also contains
10024 ;; Python-version-specific subfolders.
10025 (apply invoke "python" "testrunner.py" "--config"
10026 "known_failures.py"
10027 (scandir "." (cut regexp-exec
10028 (make-regexp "test_+(subprocess|core)")
10029 <>)))))))))
10030 (propagated-inputs
10031 `(("python-greenlet" ,python-greenlet)
10032 ("python-objgraph" ,python-objgraph)))
10033 (native-inputs
10034 `(("libev-source" ,(package-source libev))
10035 ("python-six" ,python-six)))
10036 (inputs
10037 `(("c-ares" ,c-ares)
10038 ("libev" ,libev)))
10039 (home-page "http://www.gevent.org/")
10040 (synopsis "Coroutine-based network library")
10041 (description
10042 "gevent is a coroutine-based Python networking library that uses greenlet
10043 to provide a high-level synchronous API on top of the libev event loop.")
10044 (license license:expat)
10045 (properties `((python2-variant . ,(delay python2-gevent))))))
10046
10047 (define-public python2-gevent
10048 (let ((base (package-with-python2
10049 (strip-python2-variant python-gevent))))
10050 (package
10051 (inherit base)
10052 (native-inputs `(,@(package-native-inputs python-gevent)
10053 ("python-mock" ,python2-mock))))))
10054
10055 (define-public python-fastimport
10056 (package
10057 (name "python-fastimport")
10058 (version "0.9.6")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "fastimport" version))
10063 (sha256
10064 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10065 (build-system python-build-system)
10066 (home-page "https://github.com/jelmer/python-fastimport")
10067 (synopsis "VCS fastimport parser and generator in Python")
10068 (description "This package provides a parser for and generator of the Git
10069 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10070 format.")
10071 (license license:gpl2+)))
10072
10073 (define-public python2-fastimport
10074 (package-with-python2 python-fastimport))
10075
10076 (define-public python-twisted
10077 (package
10078 (name "python-twisted")
10079 (version "19.7.0")
10080 (source (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10083 (sha256
10084 (base32
10085 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10086 (build-system python-build-system)
10087 (arguments
10088 '(#:tests? #f)) ; FIXME: some tests fail
10089 (propagated-inputs
10090 `(("python-zope-interface" ,python-zope-interface)
10091 ("python-pyhamcrest" ,python-pyhamcrest)
10092 ("python-incremental" ,python-incremental)
10093 ("python-hyperlink" ,python-hyperlink)
10094 ("python-constantly" ,python-constantly)
10095 ("python-automat" ,python-automat)))
10096 (home-page "https://twistedmatrix.com/")
10097 (synopsis "Asynchronous networking framework written in Python")
10098 (description
10099 "Twisted is an extensible framework for Python programming, with special
10100 focus on event-based network programming and multiprotocol integration.")
10101 (license license:expat)))
10102
10103 (define-public python2-twisted
10104 (package-with-python2 python-twisted))
10105
10106 (define-public python-pika
10107 (package
10108 (name "python-pika")
10109 (version "0.12.0")
10110 (source
10111 (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "pika" version))
10114 (sha256
10115 (base32
10116 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10117 (build-system python-build-system)
10118 (native-inputs
10119 `(("python-pyev" ,python-pyev)
10120 ("python-tornado" ,python-tornado)
10121 ("python-twisted" ,python-twisted)))
10122 (home-page "https://pika.readthedocs.org")
10123 (synopsis "Pure Python AMQP Client Library")
10124 (description
10125 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10126 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10127 network support library.")
10128 (license license:bsd-3)))
10129
10130 (define-public python2-pika
10131 (package-with-python2 python-pika))
10132
10133 (define-public python-ply
10134 (package
10135 (name "python-ply")
10136 (version "3.10")
10137 (source
10138 (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "ply" version))
10141 (sha256
10142 (base32
10143 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10144 (build-system python-build-system)
10145 (home-page "http://www.dabeaz.com/ply/")
10146 (synopsis "Python Lex & Yacc")
10147 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10148 It uses LR parsing and does extensive error checking.")
10149 (license license:bsd-3)))
10150
10151 (define-public python2-ply
10152 (package-with-python2 python-ply))
10153
10154 (define-public python-tabulate
10155 (package
10156 (name "python-tabulate")
10157 (version "0.7.7")
10158 (source (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "tabulate" version))
10161 (sha256
10162 (base32
10163 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10164 (build-system python-build-system)
10165 (arguments
10166 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10167 ;; and the latest release is not tagged in the upstream repository.
10168 '(#:tests? #f))
10169 (home-page "https://bitbucket.org/astanin/python-tabulate")
10170 (synopsis "Pretty-print tabular data")
10171 (description
10172 "Tabulate is a library and command-line utility to pretty-print tabular
10173 data in Python.")
10174 (license license:expat)))
10175
10176 (define-public python2-tabulate
10177 (package-with-python2 python-tabulate))
10178
10179 (define-public python-kazoo
10180 (package
10181 (name "python-kazoo")
10182 (version "2.4.0")
10183 (source
10184 (origin
10185 (method url-fetch)
10186 (uri (pypi-uri "kazoo" version))
10187 (sha256
10188 (base32
10189 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10190 (build-system python-build-system)
10191 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10192 (propagated-inputs
10193 `(("python-six" ,python-six)))
10194 (home-page "https://kazoo.readthedocs.org")
10195 (synopsis "High-level Zookeeper client library")
10196 (description
10197 "Kazoo is a Python client library for the Apache Zookeeper distributed
10198 application service. It is designed to be easy to use and to avoid common
10199 programming errors.")
10200 (license license:asl2.0)))
10201
10202 (define-public python2-kazoo
10203 (package-with-python2 python-kazoo))
10204
10205 (define-public python-pykafka
10206 (package
10207 (name "python-pykafka")
10208 (version "2.4.0")
10209 (source (origin
10210 (method url-fetch)
10211 (uri (pypi-uri "pykafka" version))
10212 (sha256
10213 (base32
10214 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10215 (build-system python-build-system)
10216 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10217 (propagated-inputs
10218 `(("python-gevent" ,python-gevent)
10219 ("python-kazoo" ,python-kazoo)
10220 ("python-tabulate" ,python-tabulate)))
10221 (inputs
10222 `(("librdkafka" ,librdkafka)))
10223 (home-page "https://pykafka.readthedocs.io/")
10224 (synopsis "Apache Kafka client for Python")
10225 (description
10226 "PyKafka is a client for the Apache Kafka distributed messaging system.
10227 It includes Python implementations of Kafka producers and consumers, which
10228 are optionally backed by a C extension built on librdkafka.")
10229 (license license:asl2.0)))
10230
10231 (define-public python2-pykafka
10232 (package-with-python2 python-pykafka))
10233
10234 (define-public python-wcwidth
10235 (package
10236 (name "python-wcwidth")
10237 (version "0.1.7")
10238 (source
10239 (origin
10240 (method url-fetch)
10241 (uri (pypi-uri "wcwidth" version))
10242 (sha256
10243 (base32
10244 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10245 (build-system python-build-system)
10246 (home-page "https://github.com/jquast/wcwidth")
10247 (synopsis "Measure number of terminal column cells of wide-character codes")
10248 (description "Wcwidth measures the number of terminal column cells of
10249 wide-character codes. It is useful for those implementing a terminal emulator,
10250 or programs that carefully produce output to be interpreted by one. It is a
10251 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10252 specified in POSIX.1-2001 and POSIX.1-2008.")
10253 (license license:expat)))
10254
10255 (define-public python2-wcwidth
10256 (package-with-python2 python-wcwidth))
10257
10258 (define-public python2-jsonrpclib
10259 (package
10260 (name "python2-jsonrpclib")
10261 (version "0.1.7")
10262 (source (origin
10263 (method url-fetch)
10264 (uri (pypi-uri "jsonrpclib" version))
10265 (sha256
10266 (base32
10267 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10268 (build-system python-build-system)
10269 (arguments
10270 `(#:tests? #f
10271 #:python ,python-2))
10272 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10273 (synopsis "Implementation of JSON-RPC specification for Python")
10274 (description
10275 "This library is an implementation of the JSON-RPC specification.
10276 It supports both the original 1.0 specification, as well as the
10277 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10278 etc.")
10279 (license license:asl2.0)))
10280
10281 (define-public python-chai
10282 (package
10283 (name "python-chai")
10284 (version "1.1.2")
10285 (source (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "chai" version))
10288 (sha256
10289 (base32
10290 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10291 (build-system python-build-system)
10292 (home-page "https://github.com/agoragames/chai")
10293 (synopsis "Mocking framework for Python")
10294 (description
10295 "Chai provides an api for mocking, stubbing and spying your python
10296 objects, patterned after the Mocha library for Ruby.")
10297 (license license:bsd-3)))
10298
10299 (define-public python2-chai
10300 (package-with-python2 python-chai))
10301
10302 (define-public python-inflection
10303 (package
10304 (name "python-inflection")
10305 (version "0.3.1")
10306 (source
10307 (origin (method url-fetch)
10308 (uri (pypi-uri "inflection" version))
10309 (sha256
10310 (base32
10311 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10312 (build-system python-build-system)
10313 (native-inputs
10314 `(("python-pytest" ,python-pytest)))
10315 (home-page "https://github.com/jpvanhal/inflection")
10316 (synopsis "Python string transformation library")
10317 (description
10318 "Inflection is a string transformation library. It singularizes
10319 and pluralizes English words, and transforms strings from CamelCase to
10320 underscored string.")
10321 (license license:expat)))
10322
10323 (define-public python2-inflection
10324 (package-with-python2 python-inflection))
10325
10326 (define-public python-pylev
10327 (package
10328 (name "python-pylev")
10329 (version "1.3.0")
10330 (source (origin
10331 (method url-fetch)
10332 (uri (pypi-uri "pylev" version))
10333 (sha256
10334 (base32
10335 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10336 (build-system python-build-system)
10337 (home-page "https://github.com/toastdriven/pylev")
10338 (synopsis "Levenshtein distance implementation in Python")
10339 (description "Pure Python Levenshtein implementation, based off the
10340 Wikipedia code samples at
10341 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10342 (license license:bsd-3)))
10343
10344 (define-public python2-pylev
10345 (package-with-python2 python-pylev))
10346
10347 (define-public python-cleo
10348 (package
10349 (name "python-cleo")
10350 (version "0.6.1")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "cleo" version))
10354 (sha256
10355 (base32
10356 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10357 (build-system python-build-system)
10358 (native-inputs
10359 `(;; For testing
10360 ("python-mock" ,python-mock)
10361 ("python-pytest-mock" ,python-pytest-mock)
10362 ("python-pytest" ,python-pytest)))
10363 (propagated-inputs
10364 `(("python-backpack" ,python-backpack)
10365 ("python-pastel" ,python-pastel)
10366 ("python-pylev" ,python-pylev)))
10367 (home-page "https://github.com/sdispater/cleo")
10368 (synopsis "Command-line arguments library for Python")
10369 (description
10370 "Cleo allows you to create command-line commands with signature in
10371 docstring and colored output.")
10372 (license license:expat)))
10373
10374 (define-public python2-cleo
10375 (package-with-python2 python-cleo))
10376
10377 (define-public python-lazy-object-proxy
10378 (package
10379 (name "python-lazy-object-proxy")
10380 (version "1.3.1")
10381 (source (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "lazy-object-proxy" version))
10384 (sha256
10385 (base32
10386 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10387 (build-system python-build-system)
10388 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10389 (synopsis "Lazy object proxy for python")
10390 (description
10391 "Lazy object proxy is an object that wraps a callable but defers the call
10392 until the object is actually required, and caches the result of said call.")
10393 (license license:bsd-2)))
10394
10395 (define-public python2-lazy-object-proxy
10396 (package-with-python2 python-lazy-object-proxy))
10397
10398 (define-public python-dnspython
10399 (package
10400 (name "python-dnspython")
10401 (version "1.15.0")
10402 (source (origin
10403 (method url-fetch)
10404 (uri (string-append "http://www.dnspython.org/kits/"
10405 version "/dnspython-" version ".tar.gz"))
10406 (sha256
10407 (base32
10408 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10409 (build-system python-build-system)
10410 (arguments '(#:tests? #f)) ; XXX: requires internet access
10411 (home-page "http://www.dnspython.org")
10412 (synopsis "DNS toolkit for Python")
10413 (description
10414 "dnspython is a DNS toolkit for Python. It supports almost all record
10415 types. It can be used for queries, zone transfers, and dynamic updates.
10416 It supports TSIG authenticated messages and EDNS0.")
10417 (license license:expat)))
10418
10419 (define-public python2-dnspython
10420 (package-with-python2 python-dnspython))
10421
10422 (define-public python-email-validator
10423 (package
10424 (name "python-email-validator")
10425 (version "1.0.2")
10426 (source
10427 (origin (method url-fetch)
10428 (uri (pypi-uri "email_validator" version))
10429 (sha256
10430 (base32
10431 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10432 (build-system python-build-system)
10433 (arguments
10434 '(#:phases
10435 (modify-phases %standard-phases
10436 (add-before 'build 'use-dnspython
10437 (lambda _
10438 (substitute* "setup.py"
10439 (("dnspython3") "dnspython"))
10440 #t)))))
10441 (propagated-inputs
10442 `(("python-dnspython" ,python-dnspython)
10443 ("python-idna" ,python-idna)))
10444 (home-page "https://github.com/JoshData/python-email-validator")
10445 (synopsis "Email address validation library for Python")
10446 (description
10447 "This library validates email address syntax and deliverability.")
10448 (license license:cc0)))
10449
10450 (define-public python2-email-validator
10451 (package-with-python2 python-email-validator))
10452
10453 (define-public python-ukpostcodeparser
10454 (package
10455 (name "python-ukpostcodeparser")
10456 (version "1.0.3")
10457 (source (origin
10458 (method url-fetch)
10459 (uri (pypi-uri "UkPostcodeParser" version))
10460 (sha256
10461 (base32
10462 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10463 (build-system python-build-system)
10464 (home-page "https://github.com/hamstah/ukpostcodeparser")
10465 (synopsis "UK Postcode parser for Python")
10466 (description
10467 "This library provides the @code{parse_uk_postcode} function for
10468 parsing UK postcodes.")
10469 (license license:expat)))
10470
10471 (define-public python2-ukpostcodeparser
10472 (package-with-python2 python-ukpostcodeparser))
10473
10474 (define-public python-faker
10475 (package
10476 (name "python-faker")
10477 (version "0.7.9")
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "Faker" version))
10481 (sha256
10482 (base32
10483 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10484 (patches
10485 (search-patches "python-faker-fix-build-32bit.patch"))
10486 (modules '((guix build utils)))
10487 (snippet
10488 '(begin
10489 (for-each delete-file (find-files "." "\\.pyc$"))
10490 #t))))
10491 (build-system python-build-system)
10492 (arguments
10493 '(#:phases
10494 (modify-phases %standard-phases
10495 (replace 'check
10496 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10497 (native-inputs
10498 `(;; For testing
10499 ("python-email-validator" ,python-email-validator)
10500 ("python-mock" ,python-mock)
10501 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10502 (propagated-inputs
10503 `(("python-dateutil" ,python-dateutil)
10504 ("python-six" ,python-six)))
10505 (home-page "https://github.com/joke2k/faker")
10506 (synopsis "Python package that generates fake data")
10507 (description
10508 "Faker is a Python package that generates fake data such as names,
10509 addresses, and phone numbers.")
10510 (license license:expat)
10511 (properties `((python2-variant . ,(delay python2-faker))))))
10512
10513 (define-public python2-faker
10514 (let ((base (package-with-python2 (strip-python2-variant
10515 python-faker))))
10516 (package
10517 (inherit base)
10518 (propagated-inputs
10519 `(("python2-ipaddress" ,python2-ipaddress)
10520 ,@(package-propagated-inputs base))))))
10521
10522 (define-public python-pyaml
10523 (package
10524 (name "python-pyaml")
10525 (version "18.11.0")
10526 (source (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "pyaml" version))
10529 (sha256
10530 (base32
10531 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10532 (build-system python-build-system)
10533 (native-inputs
10534 `(("python-unidecode" ,python-unidecode)))
10535 (propagated-inputs
10536 `(("python-pyyaml" ,python-pyyaml)))
10537 (home-page "https://github.com/mk-fg/pretty-yaml")
10538 (synopsis "YAML pretty-print library for Python")
10539 (description
10540 "pyaml is a PyYAML based python module to produce pretty and readable
10541 YAML-serialized data.")
10542 (license license:wtfpl2)))
10543
10544 (define-public python2-pyaml
10545 (package-with-python2 python-pyaml))
10546
10547 (define-public python-backpack
10548 (package
10549 (name "python-backpack")
10550 (version "0.1")
10551 (source
10552 (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "backpack" version))
10555 (sha256
10556 (base32
10557 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10558 (build-system python-build-system)
10559 (native-inputs
10560 `(("python-pytest" ,python-pytest)
10561 ("python-nose" ,python-nose)))
10562 (propagated-inputs
10563 `(("python-simplejson" ,python-simplejson)))
10564 (home-page "https://github.com/sdispater/backpack")
10565 (synopsis "Utilities for working with Python collections")
10566 (description "Backpack provides some useful utilities for working with
10567 collections of data.")
10568 (license license:expat)))
10569
10570 (define-public python2-backpack
10571 (package-with-python2 python-backpack))
10572
10573 (define-public python-prompt-toolkit
10574 (package
10575 (name "python-prompt-toolkit")
10576 (version "2.0.7")
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10581 (sha256
10582 (base32
10583 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10584 (build-system python-build-system)
10585 (arguments
10586 `(#:phases
10587 (modify-phases %standard-phases
10588 (delete 'check)
10589 (add-after 'install 'post-install-check
10590 (lambda* (#:key inputs outputs #:allow-other-keys)
10591 ;; HOME is needed for the test
10592 ;; "test_pathcompleter_can_expanduser".
10593 (setenv "HOME" "/tmp")
10594 (add-installed-pythonpath inputs outputs)
10595 (invoke "py.test"))))))
10596 (propagated-inputs
10597 `(("python-wcwidth" ,python-wcwidth)
10598 ("python-six" ,python-six)
10599 ("python-pygments" ,python-pygments)))
10600 (native-inputs
10601 `(("python-pytest" ,python-pytest)))
10602 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10603 (synopsis "Library for building command line interfaces in Python")
10604 (description
10605 "Prompt-Toolkit is a library for building interactive command line
10606 interfaces in Python. It's like GNU Readline but it also features syntax
10607 highlighting while typing, out-of-the-box multi-line input editing, advanced
10608 code completion, incremental search, support for Chinese double-width
10609 characters, mouse support, and auto suggestions.")
10610 (license license:bsd-3)))
10611
10612 (define-public python2-prompt-toolkit
10613 (package-with-python2 python-prompt-toolkit))
10614
10615 (define-public python-prompt-toolkit-1
10616 (package (inherit python-prompt-toolkit)
10617 (version "1.0.15")
10618 (source
10619 (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10622 (sha256
10623 (base32
10624 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10625
10626 (define-public python2-prompt-toolkit-1
10627 (package-with-python2 python-prompt-toolkit-1))
10628
10629 (define-public python-jedi
10630 (package
10631 (name "python-jedi")
10632 (version "0.15.1")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "jedi" version))
10637 (sha256
10638 (base32
10639 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10640 (build-system python-build-system)
10641 (arguments
10642 `(#:phases
10643 (modify-phases %standard-phases
10644 (add-after 'unpack 'disable-file-completion-test
10645 ;; A single parameterized test currently fail (see:
10646 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10647 (lambda _
10648 (substitute* "test/test_api/test_completion.py"
10649 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10650 #t))
10651 (replace 'check
10652 (lambda _
10653 (setenv "HOME" "/tmp")
10654 (invoke "python" "-m" "pytest"))))))
10655 (native-inputs
10656 `(("python-pytest" ,python-pytest)
10657 ("python-docopt" ,python-docopt)))
10658 (propagated-inputs
10659 `(("python-parso" ,python-parso)))
10660 (home-page "https://github.com/davidhalter/jedi")
10661 (synopsis "Autocompletion and static analysis library for Python")
10662 (description
10663 "Jedi is a static analysis tool for Python that can be used in Integrated
10664 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10665 on a deeper level than many other static analysis frameworks for Python.
10666
10667 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10668 well.")
10669 (license license:expat)))
10670
10671 (define-public python2-jedi
10672 (package-with-python2 python-jedi))
10673
10674 (define-public ptpython
10675 (package
10676 (name "ptpython")
10677 (version "0.34")
10678 (source (origin
10679 (method url-fetch)
10680 (uri (pypi-uri "ptpython" version))
10681 (sha256
10682 (base32
10683 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10684 (build-system python-build-system)
10685 (arguments
10686 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10687 (propagated-inputs
10688 `(("python-docopt" ,python-docopt)
10689 ("python-jedi" ,python-jedi)
10690 ("python-prompt-toolkit" ,python-prompt-toolkit)
10691 ("python-pygments" ,python-pygments)))
10692 (home-page "https://github.com/jonathanslenders/ptpython")
10693 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10694 (description
10695 "ptpython is a Python read-eval-print loop with IDE-like features.
10696 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10697 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10698 etc.")
10699 (license license:bsd-3)
10700 (properties `((python2-variant . ,(delay ptpython-2))))))
10701
10702 (define-public ptpython-2
10703 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10704 (package
10705 (inherit base)
10706 (name "ptpython2"))))
10707
10708 (define-public python-stem
10709 (package
10710 (name "python-stem")
10711 (version "1.7.1")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "stem" version))
10716 (sha256
10717 (base32
10718 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10719 (build-system python-build-system)
10720 (arguments
10721 `(#:phases
10722 (modify-phases %standard-phases
10723 (replace 'check
10724 (lambda _
10725 (invoke "./run_tests.py" "--unit")
10726 #t)))))
10727 (native-inputs
10728 `(("python-mock" ,python-mock)
10729 ("python-pycodestyle" ,python-pycodestyle)
10730 ("python-pyflakes" ,python-pyflakes)))
10731 (home-page "https://stem.torproject.org/")
10732 (synopsis
10733 "Python controller library that allows applications to interact with Tor")
10734 (description
10735 "Stem is a Python controller library for Tor. With it you can use Tor's
10736 control protocol to script against the Tor process and read descriptor data
10737 relays publish about themselves.")
10738 (license license:lgpl3)))
10739
10740 (define-public python2-stem
10741 (package-with-python2 python-stem))
10742
10743 (define-public python-pyserial
10744 (package
10745 (name "python-pyserial")
10746 (version "3.1.1")
10747 (source
10748 (origin
10749 (method url-fetch)
10750 (uri (pypi-uri "pyserial" version))
10751 (sha256
10752 (base32
10753 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10754 (build-system python-build-system)
10755 (arguments
10756 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10757 ;; #:phases
10758 ;; (modify-phases %standard-phases
10759 ;; (replace 'check
10760 ;; (lambda _
10761 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10762 (home-page
10763 "https://github.com/pyserial/pyserial")
10764 (synopsis "Python Serial Port Bindings")
10765 (description "@code{pyserial} provide serial port bindings for Python. It
10766 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10767 and/or Xon/Xoff. The port is accessed in RAW mode.")
10768 (license license:bsd-3)))
10769
10770 (define-public python2-pyserial
10771 (package-with-python2 python-pyserial))
10772
10773 (define-public python-kivy
10774 (package
10775 (name "python-kivy")
10776 (version "1.10.1")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "Kivy" version))
10781 (file-name (string-append name "-" version ".tar.gz"))
10782 (sha256
10783 (base32
10784 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10785 (build-system python-build-system)
10786 (arguments
10787 `(#:tests? #f ; Tests require many optional packages
10788 #:phases
10789 (modify-phases %standard-phases
10790 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10791 (lambda* (#:key inputs #:allow-other-keys)
10792 (setenv "KIVY_SDL2_PATH"
10793 (string-append (assoc-ref inputs "sdl-union")
10794 "/include/SDL2"))
10795 #t)))))
10796 (native-inputs
10797 `(("git" ,git)
10798 ("pkg-config" ,pkg-config)
10799 ("python-cython" ,python-cython)))
10800 (inputs
10801 `(("gstreamer" ,gstreamer)
10802 ("mesa" ,mesa)
10803 ("sdl-union"
10804 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10805 (home-page "http://kivy.org")
10806 (synopsis
10807 "Multitouch application framework")
10808 (description
10809 "A software library for rapid development of
10810 hardware-accelerated multitouch applications.")
10811 (license license:expat)))
10812
10813 (define-public python2-kivy
10814 (package-with-python2 python-kivy))
10815
10816 (define-public python-kivy-next
10817 (deprecated-package "python-kivy-next" python-kivy))
10818
10819 (define-public python2-kivy-next
10820 (deprecated-package "python2-kivy-next" python2-kivy))
10821
10822 (define-public python-binaryornot
10823 (package
10824 (name "python-binaryornot")
10825 (version "0.4.4")
10826 (source (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "binaryornot" version))
10829 (sha256
10830 (base32
10831 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10832 (build-system python-build-system)
10833 (propagated-inputs
10834 `(("python-chardet" ,python-chardet)
10835 ("python-hypothesis" ,python-hypothesis)))
10836 (home-page "https://github.com/audreyr/binaryornot")
10837 (synopsis "Package to check if a file is binary or text")
10838 (description "Ultra-lightweight pure Python package to check if a file is
10839 binary or text.")
10840 (license license:bsd-3)
10841 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10842
10843 (define-public python2-binaryornot
10844 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10845 (package (inherit base)
10846 (propagated-inputs
10847 `(("python2-enum34" ,python2-enum34)
10848 ,@(package-propagated-inputs base))))))
10849
10850 (define-public python-nltk
10851 (package
10852 (name "python-nltk")
10853 (version "3.2.1")
10854 (source (origin
10855 (method url-fetch)
10856 (uri (pypi-uri "nltk" version))
10857 (sha256
10858 (base32
10859 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10860 (build-system python-build-system)
10861 (arguments
10862 '(;; The tests require some extra resources to be downloaded.
10863 ;; TODO Try packaging these resources.
10864 #:tests? #f))
10865 (home-page "http://nltk.org/")
10866 (synopsis "Natural Language Toolkit")
10867 (description "It provides interfaces to over 50 corpora and lexical
10868 resources such as WordNet, along with a suite of text processing libraries
10869 for classification, tokenization, stemming, tagging, parsing, and semantic
10870 reasoning, wrappers for natural language processing libraries.")
10871 (license license:asl2.0)))
10872
10873 (define-public python2-nltk
10874 (package-with-python2 python-nltk))
10875
10876 (define-public python-pymongo
10877 (package
10878 (name "python-pymongo")
10879 (version "3.7.2")
10880 (source (origin
10881 (method url-fetch)
10882 (uri (pypi-uri "pymongo" version))
10883 (sha256
10884 (base32
10885 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10886 (build-system python-build-system)
10887 (propagated-inputs
10888 `(("python-certifi" ,python-certifi)))
10889 (home-page "https://github.com/mongodb/mongo-python-driver")
10890 (synopsis "Python driver for MongoDB")
10891 (description "Python driver for MongoDB.")
10892 (license license:asl2.0)))
10893
10894 (define-public python2-pymongo
10895 (package-with-python2 python-pymongo))
10896
10897 (define-public python-consul
10898 (package
10899 (name "python-consul")
10900 (version "0.6.1")
10901 (source
10902 (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "python-consul" version))
10905 (sha256
10906 (base32
10907 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10908 (build-system python-build-system)
10909 (arguments
10910 '(#:tests? #f)) ; The tests are not distributed
10911 (propagated-inputs
10912 `(("python-requests" ,python-requests)
10913 ("python-six" ,python-six)))
10914 (home-page "https://github.com/cablehead/python-consul")
10915 (synopsis "Python client for Consul")
10916 (description
10917 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10918 discovery, monitoring and configuration.")
10919 (license license:expat)))
10920
10921 (define-public python2-consul
10922 (package-with-python2 python-consul))
10923
10924 (define-public python-schematics
10925 (package
10926 (name "python-schematics")
10927 (version "1.1.1")
10928 (source
10929 (origin
10930 (method git-fetch)
10931 (uri (git-reference
10932 (url "https://github.com/schematics/schematics.git")
10933 (commit (string-append "v" version))))
10934 (file-name (git-file-name name version))
10935 (sha256
10936 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10937 (build-system python-build-system)
10938 (propagated-inputs
10939 `(("python-six" ,python-six)))
10940 (arguments
10941 ;; The tests require a bunch of not very nice packages with fixed
10942 ;; version requirements (e.g. python-coveralls).
10943 `(#:tests? #f))
10944 (home-page "https://github.com/schematics/schematics")
10945 (synopsis "Python Data Structures for Humans")
10946 (description "Python Data Structures for Humans.")
10947 (license license:bsd-3)))
10948
10949 (define-public python2-schematics
10950 (package-with-python2 python-schematics))
10951
10952 (define-public python-odfpy
10953 (package
10954 (name "python-odfpy")
10955 (version "1.3.3")
10956 (source (origin
10957 (method url-fetch)
10958 (uri (pypi-uri "odfpy" version))
10959 (sha256
10960 (base32
10961 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10962 (arguments
10963 `(#:modules ((srfi srfi-1)
10964 (guix build python-build-system)
10965 (guix build utils))
10966 #:phases
10967 (modify-phases %standard-phases
10968 (replace 'check
10969 ;; The test runner invokes python2 and python3 for test*.py.
10970 ;; To avoid having both in inputs, we replicate it here.
10971 (lambda _
10972 (for-each (lambda (test-file) (invoke "python" test-file))
10973 (find-files "tests" "^test.*\\.py$"))
10974 #t)))))
10975 (build-system python-build-system)
10976 (home-page "https://github.com/eea/odfpy")
10977 (synopsis "Python API and tools to manipulate OpenDocument files")
10978 (description "Collection of libraries and utility programs written in
10979 Python to manipulate OpenDocument 1.2 files.")
10980 (license
10981 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10982 ;; number of files with other licenses.
10983 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10984
10985 (define-public python2-odfpy
10986 (package-with-python2 python-odfpy))
10987
10988 (define-public python-natsort
10989 (package
10990 (name "python-natsort")
10991 (version "5.4.1")
10992 (source (origin
10993 (method url-fetch)
10994 (uri (pypi-uri "natsort" version))
10995 (sha256
10996 (base32
10997 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10998 (build-system python-build-system)
10999 (arguments
11000 `(#:modules ((guix build utils)
11001 (guix build python-build-system)
11002 (srfi srfi-1)
11003 (srfi srfi-26)
11004 (ice-9 ftw))
11005 #:phases
11006 (modify-phases %standard-phases
11007 (add-before 'check 'set-cachedir
11008 ;; Tests require write access to $HOME by default
11009 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11010 (replace 'check
11011 (lambda _
11012 (let ((cwd (getcwd)))
11013 (setenv "PYTHONPATH"
11014 (string-append
11015 cwd "/build/"
11016 (find (cut string-prefix? "lib" <>)
11017 (scandir (string-append cwd "/build")))
11018 ":"
11019 (getenv "PYTHONPATH")))
11020 (invoke "pytest" "-v")))))))
11021 (native-inputs
11022 `(("python-hypothesis" ,python-hypothesis)
11023 ("python-pytest-cov" ,python-pytest-cov)
11024 ("python-pytest-mock" ,python-pytest-mock)
11025 ("python-pytest" ,python-pytest)))
11026 (propagated-inputs ; TODO: Add python-fastnumbers.
11027 `(("python-pyicu" ,python-pyicu)))
11028 (home-page "https://github.com/SethMMorton/natsort")
11029 (synopsis "Natural sorting for python and shell")
11030 (description
11031 "Natsort lets you apply natural sorting on lists instead of
11032 lexicographical. If you use the built-in @code{sorted} method in python
11033 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11034 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11035 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11036 identifies numbers and sorts them separately from strings. It can also sort
11037 version numbers, real numbers, mixed types and more, and comes with a shell
11038 command @command{natsort} that exposes this functionality in the command line.")
11039 (license license:expat)
11040 (properties `((python2-variant . ,(delay python2-natsort))))))
11041
11042 (define-public python2-natsort
11043 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11044 (package (inherit base)
11045 (native-inputs
11046 `(("python2-pathlib" ,python2-pathlib)
11047 ,@(package-native-inputs base))))))
11048
11049 (define-public python-glances
11050 (package
11051 (name "python-glances")
11052 (version "3.1.1")
11053 (source
11054 (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "Glances" version))
11057 (sha256
11058 (base32
11059 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11060 (modules '((guix build utils)))
11061 (snippet
11062 '(begin
11063 ;; Glances phones PyPI for weekly update checks by default.
11064 ;; Disable these. The user can re-enable them if desired.
11065 (substitute* "glances/outdated.py"
11066 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11067 (string-append indentation
11068 "self.args.disable_check_update = True\n"
11069 line)))
11070 #t))))
11071 (build-system python-build-system)
11072 (propagated-inputs
11073 `(("python-future" ,python-future)
11074 ("python-psutil" ,python-psutil)))
11075 (home-page
11076 "https://github.com/nicolargo/glances")
11077 (synopsis "Cross-platform curses-based monitoring tool")
11078 (description
11079 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11080 Glances uses the PsUtil library to get information from your system. It
11081 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11082 (license license:lgpl3+)))
11083
11084 (define-public python2-glances
11085 (package-with-python2 python-glances))
11086
11087 (define-public python-graphql-core
11088 (package
11089 (name "python-graphql-core")
11090 (version "0.5.3")
11091 (source
11092 (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "graphql-core" version))
11095 (sha256
11096 (base32
11097 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11098 (build-system python-build-system)
11099 (arguments
11100 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11101 #:phases
11102 (modify-phases %standard-phases
11103 (add-after 'unpack 'patch-hardcoded-version
11104 (lambda _ (substitute*
11105 "setup.py"
11106 (("'gevent==1.1rc1'") "'gevent'"))
11107 #t)))))
11108 (native-inputs
11109 `(("python-gevent" ,python-gevent)
11110 ("python-mock" ,python-mock)
11111 ("python-pytest-mock" ,python-pytest-mock)))
11112 (propagated-inputs
11113 `(("python-promise" ,python-promise)
11114 ("python-six" ,python-six)))
11115 (home-page "https://github.com/graphql-python/graphql-core")
11116 (synopsis "GraphQL implementation for Python")
11117 (description
11118 "GraphQL implementation for Python. GraphQL is a data query language and
11119 runtime designed and used to request and deliver data to mobile and web apps.
11120 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11121 to Python.")
11122 (license license:expat)))
11123
11124 (define-public python2-graphql-core
11125 (package-with-python2 python-graphql-core))
11126
11127 (define-public python-graphql-relay
11128 (package
11129 (name "python-graphql-relay")
11130 (version "0.4.5")
11131 (source
11132 (origin
11133 (method url-fetch)
11134 (uri (pypi-uri "graphql-relay" version))
11135 (sha256
11136 (base32
11137 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11138 (build-system python-build-system)
11139 (arguments
11140 '(#:tests? #f)) ; The tests are not distributed
11141 (propagated-inputs
11142 `(("python-graphql-core" ,python-graphql-core)
11143 ("python-promise" ,python-promise)
11144 ("python-six" ,python-six)))
11145 (home-page "https://github.com/graphql-python/graphql-relay-py")
11146 (synopsis "Relay implementation for Python")
11147 (description
11148 "This is a library to allow the easy creation of Relay-compliant servers
11149 using the GraphQL Python reference implementation of a GraphQL server. It
11150 should be noted that the code is a exact port of the original
11151 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11152 from Facebook.")
11153 (license license:expat)))
11154
11155 (define-public python2-graphql-relay
11156 (package-with-python2 python-graphql-relay))
11157
11158 (define-public python-graphene
11159 (package
11160 (name "python-graphene")
11161 (version "0.10.2")
11162 (source
11163 (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "graphene" version))
11166 (sha256
11167 (base32
11168 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11169 (build-system python-build-system)
11170 (propagated-inputs
11171 `(("python-graphql-core" ,python-graphql-core)
11172 ("python-graphql-relay" ,python-graphql-relay)
11173 ("python-iso8601" ,python-iso8601)
11174 ("python-promise" ,python-promise)
11175 ("python-six" ,python-six)))
11176 (arguments
11177 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11178 (home-page "http://graphene-python.org/")
11179 (synopsis "GraphQL Framework for Python")
11180 (description
11181 "Graphene is a Python library for building GraphQL schemas/types.
11182 A GraphQL schema describes your data model, and provides a GraphQL server
11183 with an associated set of resolve methods that know how to fetch data.")
11184 (properties `((python2-variant . ,(delay python2-graphene))))
11185 (license license:expat)))
11186
11187 (define-public python2-graphene
11188 (let ((base (package-with-python2
11189 (strip-python2-variant python-graphene))))
11190 (package (inherit base)
11191 (native-inputs
11192 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11193 ,@(package-native-inputs base))))))
11194
11195 (define-public python-nautilus
11196 (package
11197 (name "python-nautilus")
11198 (version "0.4.9")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "nautilus" version))
11203 (sha256
11204 (base32
11205 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11206 (build-system python-build-system)
11207 (arguments `(#:tests? #f)) ; fails to import test modules
11208 (propagated-inputs
11209 `(("python-bcrypt" ,python-bcrypt)
11210 ("python-click" ,python-click)
11211 ("python-consul" ,python-consul)
11212 ("python-graphene" ,python-graphene)
11213 ("python-jinja2" ,python-jinja2)
11214 ("python-peewee" ,python-peewee)
11215 ("python-pika" ,python-pika)
11216 ("python-tornado" ,python-tornado)
11217 ("python-wtforms" ,python-wtforms)))
11218 (native-inputs
11219 `(("python-nose2" ,python-nose2)))
11220 (home-page "https://github.com/AlecAivazis/nautilus")
11221 (synopsis "Library for creating microservice applications")
11222 (description
11223 "Nautilus is a framework for flux based microservices that looks to
11224 provide extendible implementations of common aspects of a cloud so that you can
11225 focus on building massively scalable web applications.")
11226 (license license:expat)))
11227
11228 (define-public python-snowballstemmer
11229 (package
11230 (name "python-snowballstemmer")
11231 (version "1.2.1")
11232 (source (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "snowballstemmer" version))
11235 (sha256
11236 (base32
11237 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11238 (build-system python-build-system)
11239 (arguments
11240 `(;; No tests exist
11241 #:tests? #f))
11242 (home-page "https://github.com/shibukawa/snowball_py")
11243 (synopsis "Snowball stemming library collection for Python")
11244 (description "This package provides 16 word stemmer algorithms generated
11245 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11246 English stemmer.")
11247 (license license:bsd-3)))
11248
11249 (define-public python2-snowballstemmer
11250 (package-with-python2 python-snowballstemmer))
11251
11252 (define-public python-setproctitle
11253 (package
11254 (name "python-setproctitle")
11255 (version "1.1.10")
11256 (source
11257 (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "setproctitle" version))
11260 (sha256
11261 (base32
11262 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11263 (build-system python-build-system)
11264 (arguments
11265 '(#:phases
11266 (modify-phases %standard-phases
11267 (add-before 'check 'patch-Makefile
11268 ;; Stricly this is only required for the python2 variant.
11269 ;; But adding a phase in an inherited package seems to be
11270 ;; cumbersum. So we patch even for python3.
11271 (lambda _
11272 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11273 (when nose
11274 (substitute* "Makefile"
11275 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11276 (string-append nose "/bin/nosetests "))))
11277 #t)))
11278 (replace 'check
11279 (lambda _
11280 (setenv "PYTHON" (or (which "python3") (which "python")))
11281 (setenv "PYCONFIG" (or (which "python3-config")
11282 (which "python-config")))
11283 (setenv "CC" "gcc")
11284 ;; No need to extend PYTHONPATH to find the built package, since
11285 ;; the Makefile will build anyway
11286 (invoke "make" "check"))))))
11287 (native-inputs
11288 `(("procps" ,procps))) ; required for tests
11289 (home-page
11290 "https://github.com/dvarrazzo/py-setproctitle")
11291 (synopsis
11292 "Setproctitle implementation for Python to customize the process title")
11293 (description "The library allows a process to change its title (as displayed
11294 by system tools such as ps and top).
11295
11296 Changing the title is mostly useful in multi-process systems, for
11297 example when a master process is forked: changing the children's title
11298 allows to identify the task each process is busy with. The technique
11299 is used by PostgreSQL and the OpenSSH Server for example.")
11300 (license license:bsd-3)
11301 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11302
11303 (define-public python2-setproctitle
11304 (let ((base (package-with-python2
11305 (strip-python2-variant python-setproctitle))))
11306 (package
11307 (inherit base)
11308 (native-inputs `(("python2-nose" ,python2-nose)
11309 ,@(package-native-inputs base))))))
11310
11311 (define-public python-validictory
11312 (package
11313 (name "python-validictory")
11314 (version "1.0.1")
11315 (source
11316 (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "validictory" version))
11319 (sha256
11320 (base32
11321 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11322 (build-system python-build-system)
11323 (arguments
11324 '(#:phases
11325 (modify-phases %standard-phases
11326 (add-after 'unpack 'bootstrap
11327 ;; Move the tests out of the package directory to avoid
11328 ;; packaging them.
11329 (lambda* _
11330 (rename-file "validictory/tests" "tests")
11331 (delete-file "tests/__init__.py")))
11332 (replace 'check
11333 (lambda _
11334 ;; Extend PYTHONPATH so the built package will be found.
11335 (setenv "PYTHONPATH"
11336 (string-append (getcwd) "/build/lib:"
11337 (getenv "PYTHONPATH")))
11338 (invoke "py.test" "-vv" ))))))
11339 (native-inputs
11340 `(("python-pytest" ,python-pytest)))
11341 (home-page
11342 "https://github.com/jamesturk/validictory")
11343 (synopsis "General purpose Python data validator")
11344 (description "It allows validation of arbitrary Python data structures.
11345
11346 The schema format is based on the JSON Schema
11347 proposal (http://json-schema.org), so combined with json the library is also
11348 useful as a validator for JSON data.")
11349 (license license:expat)))
11350
11351 (define-public python2-validictory
11352 (package-with-python2 python-validictory))
11353
11354 (define-public python-pyelftools
11355 (package
11356 (name "python-pyelftools")
11357 (version "0.25")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "pyelftools" version))
11362 (sha256
11363 (base32
11364 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11365 (build-system python-build-system)
11366 (arguments
11367 `(#:phases
11368 (modify-phases %standard-phases
11369 (add-before 'check 'set-pythonpath
11370 (lambda _
11371 (setenv "PYTHONPATH"
11372 (string-append
11373 (getcwd) "/test/"
11374 ":" (getenv "PYTHONPATH")))
11375 #t)))))
11376 (home-page
11377 "https://github.com/eliben/pyelftools")
11378 (synopsis
11379 "Analyze binary and library file information")
11380 (description "This Python library provides interfaces for parsing and
11381 analyzing two binary and library file formats; the Executable and Linking
11382 Format (ELF), and debugging information in the Debugging With Attributed
11383 Record Format (DWARF).")
11384 (license license:public-domain)))
11385
11386 (define-public python-pyev
11387 (package
11388 (name "python-pyev")
11389 (version "0.9.0")
11390 (source
11391 (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "pyev" version))
11394 (sha256
11395 (base32
11396 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11397 (build-system python-build-system)
11398 (arguments
11399 `(#:tests? #f ; no test suite
11400 #:phases
11401 (modify-phases %standard-phases
11402 (add-after 'unpack 'patch
11403 (lambda* (#:key inputs #:allow-other-keys)
11404 (let ((libev (string-append (assoc-ref inputs "libev")
11405 "/lib/libev.so.4")))
11406 (substitute* "setup.py"
11407 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11408 (string-append "libev_dll_name = \"" libev "\"")))))))))
11409 (inputs
11410 `(("libev" ,libev)))
11411 (home-page "http://pythonhosted.org/pyev/")
11412 (synopsis "Python libev interface")
11413 (description "Pyev provides a Python interface to libev.")
11414 (license license:gpl3)))
11415
11416 (define-public python2-pyev
11417 (package-with-python2 python-pyev))
11418
11419 (define-public python-imagesize
11420 (package
11421 (name "python-imagesize")
11422 (version "1.1.0")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "imagesize" version))
11427 (sha256
11428 (base32
11429 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11430 (build-system python-build-system)
11431 (home-page "https://github.com/shibukawa/imagesize_py")
11432 (synopsis "Gets image size of files in various formats in Python")
11433 (description
11434 "This package allows determination of image size from
11435 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11436 (license license:expat)))
11437
11438 (define-public python2-imagesize
11439 (package-with-python2 python-imagesize))
11440
11441 (define-public python-termstyle
11442 (package
11443 (name "python-termstyle")
11444 (version "0.1.11")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (pypi-uri "termstyle" version))
11449 (sha256
11450 (base32
11451 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11452 (build-system python-build-system)
11453 (arguments
11454 '(#:phases
11455 (modify-phases %standard-phases
11456 (replace 'check
11457 (lambda _
11458 (invoke "python" "test3.py"))))))
11459 (home-page "https://github.com/gfxmonk/termstyle")
11460 (synopsis "Console text coloring for Python")
11461 (description "This package provides console text coloring for Python.")
11462 (license license:bsd-3)))
11463
11464 (define-public python-argcomplete
11465 (package
11466 (name "python-argcomplete")
11467 (version "1.7.0")
11468 (source
11469 (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "argcomplete" version))
11472 (sha256
11473 (base32
11474 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11475 (build-system python-build-system)
11476 (native-inputs
11477 `(("python-pexpect" ,python-pexpect)
11478 ("tcsh" ,tcsh)
11479 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11480 (home-page "https://github.com/kislyuk/argcomplete")
11481 (synopsis "Shell tab completion for Python argparse")
11482 (description "argcomplete provides extensible command line tab completion
11483 of arguments and options for Python scripts using @code{argparse}. It's
11484 particularly useful for programs with many options or sub-parsers that can
11485 dynamically suggest completions; for example, when browsing resources over the
11486 network.")
11487 (license license:asl2.0)))
11488
11489 (define-public python2-argcomplete
11490 (package-with-python2 python-argcomplete))
11491
11492 (define-public python-xopen
11493 (package
11494 (name "python-xopen")
11495 (version "0.5.0")
11496 (source
11497 (origin
11498 (method url-fetch)
11499 (uri (pypi-uri "xopen" version))
11500 (sha256
11501 (base32
11502 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11503 (build-system python-build-system)
11504 (propagated-inputs
11505 `(("python-setuptools-scm" ,python-setuptools-scm)))
11506 (home-page "https://github.com/marcelm/xopen/")
11507 (synopsis "Open compressed files transparently")
11508 (description "This module provides an @code{xopen} function that works like
11509 Python's built-in @code{open} function, but can also deal with compressed files.
11510 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11511 recognized by their file extensions. The focus is on being as efficient as
11512 possible on all supported Python versions.")
11513 (license license:expat)))
11514
11515 (define-public python2-xopen
11516 (let ((base (package-with-python2
11517 (strip-python2-variant python-xopen))))
11518 (package
11519 (inherit base)
11520 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11521 ,@(package-propagated-inputs base))))))
11522
11523 (define-public python-cheetah
11524 (package
11525 (name "python-cheetah")
11526 (version "3.1.0")
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "Cheetah3" version))
11531 (sha256
11532 (base32
11533 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11534 (build-system python-build-system)
11535 (arguments
11536 `(#:modules ((guix build utils)
11537 (guix build python-build-system)
11538 (ice-9 ftw)
11539 (srfi srfi-1)
11540 (srfi srfi-26))
11541 #:phases (modify-phases %standard-phases
11542 (add-after 'unpack 'use-absolute-python
11543 (lambda _
11544 (substitute* "Cheetah/CheetahWrapper.py"
11545 (("#!/usr/bin/env python")
11546 (string-append "#!" (which "python"))))
11547 #t))
11548 (replace 'check
11549 (lambda _
11550 (let ((cwd (getcwd)))
11551 (setenv "PYTHONPATH"
11552 (string-append
11553 cwd "/build/"
11554 (find (cut string-prefix? "lib" <>)
11555 (scandir (string-append cwd "/build")))
11556 ":" (getenv "PYTHONPATH")))
11557 (setenv "PATH"
11558 (string-append (getenv "PATH")
11559 ":" cwd "/bin"))
11560 (setenv "TMPDIR" "/tmp")
11561
11562 (substitute* "Cheetah/Tests/Test.py"
11563 (("unittest.TextTestRunner\\(\\)")
11564 "unittest.TextTestRunner(verbosity=2)"))
11565
11566 (invoke "python" "Cheetah/Tests/Test.py")))))))
11567 (propagated-inputs
11568 `(("python-markdown" ,python-markdown))) ;optional
11569 (home-page "http://cheetahtemplate.org/")
11570 (synopsis "Template engine")
11571 (description "Cheetah is a text-based template engine and Python code
11572 generator.
11573
11574 Cheetah can be used as a standalone templating utility or referenced as
11575 a library from other Python applications. It has many potential uses,
11576 but web developers looking for a viable alternative to ASP, JSP, PHP and
11577 PSP are expected to be its principle user group.
11578
11579 Features:
11580 @enumerate
11581 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11582 text-based format.
11583 @item Cleanly separates content, graphic design, and program code.
11584 @item Blends the power and flexibility of Python with a simple template language
11585 that non-programmers can understand.
11586 @item Gives template writers full access to any Python data structure, module,
11587 function, object, or method in their templates.
11588 @item Makes code reuse easy by providing an object-orientated interface to
11589 templates that is accessible from Python code or other Cheetah templates.
11590 One template can subclass another and selectively reimplement sections of it.
11591 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11592 improve the performance of a dynamic website.
11593 @item Compiles templates into optimized, yet readable, Python code.
11594 @end enumerate")
11595 (license (license:x11-style "file://LICENSE"))))
11596
11597 (define-public python2-cheetah
11598 (package-with-python2 python-cheetah))
11599
11600 (define-public python-dulwich
11601 (package
11602 (name "python-dulwich")
11603 (version "0.18.6")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (list (string-append "https://www.dulwich.io/releases/"
11608 "dulwich-" version ".tar.gz")
11609 (pypi-uri "dulwich" version)))
11610 (sha256
11611 (base32
11612 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11613 (build-system python-build-system)
11614 (arguments
11615 `(#:phases
11616 (modify-phases %standard-phases
11617 (add-before 'check 'fix-tests
11618 (lambda* (#:key inputs #:allow-other-keys)
11619 ;; The tests use Popen with a custom environment which doesn't
11620 ;; include PATH.
11621 (substitute* "dulwich/tests/compat/utils.py"
11622 (("'git'") (string-append "'"
11623 (which "git")
11624 "'")))
11625 (substitute* '("dulwich/tests/test_repository.py"
11626 "dulwich/tests/test_hooks.py")
11627 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11628 (setenv "TEST_RUNNER" "unittest")
11629 (setenv "PYTHONHASHSEED" "random")
11630 #t)))))
11631 (propagated-inputs
11632 `(("python-fastimport" ,python-fastimport)))
11633 (native-inputs
11634 `(("python-mock" ,python-mock)
11635 ("python-geventhttpclient" ,python-geventhttpclient)
11636 ("git" ,git)))
11637 (home-page "https://www.dulwich.io/")
11638 (synopsis "Git implementation in Python")
11639 (description "Dulwich is an implementation of the Git file formats and
11640 protocols written in pure Python.")
11641 ;; Can be used with either license.
11642 (license (list license:asl2.0 license:gpl2+))))
11643
11644 (define-public python2-dulwich
11645 (package-with-python2 python-dulwich))
11646
11647 (define-public python-pbkdf2
11648 (package
11649 (name "python-pbkdf2")
11650 (version "1.3")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "pbkdf2" version))
11655 (sha256
11656 (base32
11657 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11658 (build-system python-build-system)
11659 (arguments
11660 '(#:phases
11661 (modify-phases %standard-phases
11662 (replace 'check
11663 (lambda _
11664 (setenv "PYTHONPATH"
11665 (string-append (getcwd) "/build/lib:"
11666 (getenv "PYTHONPATH")))
11667 (invoke "python" "test/test_pbkdf2.py"))))))
11668 (propagated-inputs
11669 `(("python-pycrypto" ,python-pycrypto))) ; optional
11670 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11671 (synopsis "Password-based key derivation")
11672 (description "This module implements the password-based key derivation
11673 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11674
11675 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11676 is part of the RSA Public Key Cryptography Standards series. The provided
11677 implementation takes a password or a passphrase and a salt value (and
11678 optionally a iteration count, a digest module, and a MAC module) and provides
11679 a file-like object from which an arbitrarly-sized key can be read.")
11680 (license license:expat)))
11681
11682 (define-public python2-pbkdf2
11683 (package-with-python2 python-pbkdf2))
11684
11685 (define-public python-qrcode
11686 (package
11687 (name "python-qrcode")
11688 (version "6.1")
11689 (source
11690 (origin
11691 (method url-fetch)
11692 (uri (pypi-uri "qrcode" version))
11693 (sha256
11694 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11695 (build-system python-build-system)
11696 (arguments
11697 ;; FIXME: Tests require packaging 'pymaging'.
11698 '(#:tests? #f))
11699 (propagated-inputs
11700 `(("python-lxml" ,python-lxml) ; for SVG output
11701 ("python-pillow" ,python-pillow) ; for PNG output
11702 ("python-six" ,python-six)))
11703 (home-page "https://github.com/lincolnloop/python-qrcode")
11704 (synopsis "QR Code image generator")
11705 (description "This package provides a pure Python QR Code generator
11706 module. It uses the Python Imaging Library (PIL) to allow for the generation
11707 of QR Codes.
11708
11709 In addition this package provides a command line tool to generate QR codes and
11710 either write these QR codes to a file or do the output as ascii art at the
11711 console.")
11712 (license license:bsd-3)))
11713
11714 (define-public python2-qrcode
11715 (package-with-python2 python-qrcode))
11716
11717 (define-public python-rst2ansi
11718 (package
11719 (name "python-rst2ansi")
11720 (version "0.1.5")
11721 (source
11722 (origin
11723 (method url-fetch)
11724 (uri (pypi-uri "rst2ansi" version))
11725 (sha256
11726 (base32
11727 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11728 (build-system python-build-system)
11729 (propagated-inputs
11730 `(("python-docutils" ,python-docutils)))
11731 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11732 (synopsis "Convert RST to ANSI-decorated console output")
11733 (description
11734 "Python module dedicated to rendering RST (reStructuredText) documents
11735 to ansi-escaped strings suitable for display in a terminal.")
11736 (license license:expat)))
11737
11738 (define-public python-ansi2html
11739 (package
11740 (name "python-ansi2html")
11741 (version "1.2.0")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "ansi2html" version))
11746 (sha256
11747 (base32
11748 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11749 (build-system python-build-system)
11750 (native-inputs
11751 `(("python-mock" ,python-mock)
11752 ("python-nose" ,python-nose)))
11753 (propagated-inputs
11754 `(("python-six" ,python-six)))
11755 (home-page "https://github.com/ralphbean/ansi2html")
11756 (synopsis "Convert ANSI-decorated console output to HTML")
11757 (description
11758 "@command{ansi2html} is a Python library and command line utility for
11759 convering text with ANSI color codes to HTML or LaTeX.")
11760 (license license:gpl3+)))
11761
11762 (define-public python2-ansi2html
11763 (package-with-python2 python-ansi2html))
11764
11765 (define-public python-ddt
11766 (package
11767 (name "python-ddt")
11768 (version "1.1.3")
11769 (source
11770 (origin
11771 (method url-fetch)
11772 (uri (pypi-uri "ddt" version))
11773 (sha256
11774 (base32
11775 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11776 (build-system python-build-system)
11777 (native-inputs
11778 `(("python-mock" ,python-mock)
11779 ("python-nose" ,python-nose)))
11780 (propagated-inputs
11781 `(("python-six" ,python-six)
11782 ("python-pyyaml" ,python-pyyaml)))
11783 (home-page "https://github.com/txels/ddt")
11784 (synopsis "Data-Driven Tests")
11785 (description
11786 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11787 running it with different test data, and make it appear as multiple test
11788 cases.")
11789 (license license:expat)))
11790
11791 (define-public python2-ddt
11792 (package-with-python2 python-ddt))
11793
11794 (define-public python-pycountry
11795 (package
11796 (name "python-pycountry")
11797 (version "18.5.26")
11798 (source
11799 (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "pycountry" version))
11802 (sha256
11803 (base32
11804 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11805 (build-system python-build-system)
11806 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11807 (synopsis "ISO databases for languages, countries, currencies, etc.")
11808 (description
11809 "@code{pycountry} provides the ISO databases for the standards:
11810 @enumerate
11811 @item 639-3 (Languages)
11812 @item 3166 (Countries)
11813 @item 3166-3 (Deleted Countries)
11814 @item 3166-2 (Subdivisions of countries)
11815 @item 4217 (Currencies)
11816 @item 15924 (Scripts)
11817 @end enumerate
11818 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11819 through a Python API.")
11820 (license license:lgpl2.1+)))
11821
11822 (define-public python2-pycountry
11823 (package-with-python2 python-pycountry))
11824
11825 (define-public python-pycosat
11826 (package
11827 (name "python-pycosat")
11828 (version "0.6.1")
11829 (source
11830 (origin
11831 (method url-fetch)
11832 (uri (pypi-uri "pycosat" version))
11833 (sha256
11834 (base32
11835 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11836 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11837 (build-system python-build-system)
11838 (home-page "https://github.com/ContinuumIO/pycosat")
11839 (synopsis "Bindings to picosat (a SAT solver)")
11840 (description
11841 "This package provides efficient Python bindings to @code{picosat} on
11842 the C level. When importing pycosat, the @code{picosat} solver becomes part
11843 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11844 Problem} (SAT) solver.")
11845 (license license:expat)))
11846
11847 (define-public python2-pycosat
11848 (package-with-python2 python-pycosat))
11849
11850 (define-public python2-ruamel.ordereddict
11851 (package
11852 (name "python2-ruamel.ordereddict")
11853 (version "0.4.9")
11854 (source
11855 (origin
11856 (method url-fetch)
11857 (uri (pypi-uri "ruamel.ordereddict" version))
11858 (sha256
11859 (base32
11860 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11861 (build-system python-build-system)
11862 (arguments
11863 `(#:python ,python-2
11864 #:phases
11865 (modify-phases %standard-phases
11866 (delete 'check)
11867 (add-after 'install 'check
11868 (lambda* (#:key inputs outputs #:allow-other-keys)
11869 (add-installed-pythonpath inputs outputs)
11870 (invoke "python" "test/testordereddict.py"))))))
11871 (home-page "https://bitbucket.org/ruamel/ordereddict")
11872 (synopsis "Version of dict that keeps keys in insertion order")
11873 (description
11874 "This is an implementation of an ordered dictionary with @dfn{Key
11875 Insertion Order} (KIO: updates of values do not affect the position of the
11876 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11877 removed and put at the back). The standard library module @code{OrderedDict},
11878 implemented later, implements a subset of @code{ordereddict} functionality.
11879 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11880 Order} (KSO, no sorting function can be specified, but a transform can be
11881 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11882 (license license:expat)))
11883
11884 (define-public python-pypeg2
11885 (package
11886 (name "python-pypeg2")
11887 (version "2.15.2")
11888 (source
11889 (origin
11890 (method url-fetch)
11891 (uri (pypi-uri "pyPEG2" version))
11892 (sha256
11893 (base32
11894 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11895 (build-system python-build-system)
11896 (propagated-inputs `(("python-lxml" ,python-lxml)))
11897 (arguments
11898 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11899 '(#:tests? #f))
11900 (home-page "https://fdik.org/pyPEG/")
11901 (synopsis "Parsering Expression Grammars in Python")
11902 (description "PyPEG is an intrinsic parser interpreter framework for
11903 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11904 parse many formal languages.")
11905 (license license:gpl2)))
11906
11907 (define-public python-incremental
11908 (package
11909 (name "python-incremental")
11910 (version "17.5.0")
11911 (source
11912 (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "incremental" version))
11915 (sha256
11916 (base32
11917 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11918 (build-system python-build-system)
11919 (home-page "https://github.com/hawkowl/incremental")
11920 (synopsis "Library for versioning Python projects")
11921 (description "Incremental is a small library that versions your Python
11922 projects.")
11923 (license license:expat)))
11924
11925 (define-public python2-incremental
11926 (package-with-python2 python-incremental))
11927
11928 (define-public python-invoke
11929 (package
11930 (name "python-invoke")
11931 (home-page "http://www.pyinvoke.org/")
11932 (version "1.1.0")
11933 (source (origin
11934 (method url-fetch)
11935 (uri (pypi-uri "invoke" version))
11936 (sha256
11937 (base32
11938 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11939 (build-system python-build-system)
11940 (arguments
11941 ;; XXX: Requires many dependencies that are not yet in Guix.
11942 `(#:tests? #f))
11943 (synopsis "Pythonic task execution")
11944 (description
11945 "Invoke is a Python task execution tool and library, drawing inspiration
11946 from various sources to arrive at a powerful and clean feature set. It is
11947 evolved from the Fabric project, but focuses on local and abstract concerns
11948 instead of servers and network commands.")
11949 (license license:bsd-3)))
11950
11951 (define-public python2-invoke
11952 (package-with-python2 python-invoke))
11953
11954 (define-public python-automat
11955 (package
11956 (name "python-automat")
11957 (version "0.7.0")
11958 (source (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "Automat" version))
11961 (sha256
11962 (base32
11963 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11964 (build-system python-build-system)
11965 ;; We disable the tests because they require python-twisted, while
11966 ;; python-twisted depends on python-automat. Twisted is optional, but the
11967 ;; tests fail if it is not available. Also see
11968 ;; <https://github.com/glyph/automat/issues/71>.
11969 (arguments '(#:tests? #f))
11970 (native-inputs
11971 `(("python-m2r" ,python-m2r)
11972 ("python-setuptools-scm" ,python-setuptools-scm)
11973 ("python-graphviz" ,python-graphviz)))
11974 (propagated-inputs
11975 `(("python-six" ,python-six)
11976 ("python-attrs" ,python-attrs)))
11977 (home-page "https://github.com/glyph/Automat")
11978 (synopsis "Self-service finite-state machines")
11979 (description "Automat is a library for concise, idiomatic Python
11980 expression of finite-state automata (particularly deterministic finite-state
11981 transducers).")
11982 (license license:expat)))
11983
11984 (define-public python2-automat
11985 (package-with-python2 python-automat))
11986
11987 (define-public python-m2r
11988 (package
11989 (name "python-m2r")
11990 (version "0.2.1")
11991 (source (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "m2r" version))
11994 (sha256
11995 (base32
11996 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11997 (build-system python-build-system)
11998 (propagated-inputs
11999 `(("python-docutils" ,python-docutils)
12000 ("python-mistune" ,python-mistune)))
12001 (native-inputs
12002 `(("python-pygments" ,python-pygments)
12003 ("python-mock" ,python-mock)))
12004 (home-page "https://github.com/miyakogi/m2r")
12005 (synopsis "Markdown to reStructuredText converter")
12006 (description "M2R converts a markdown file including reST markups to valid
12007 reST format.")
12008 (license license:expat)))
12009
12010 (define-public python2-m2r
12011 (package-with-python2 python-m2r))
12012
12013 (define-public python-constantly
12014 (package
12015 (name "python-constantly")
12016 (version "15.1.0")
12017 (source (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "constantly" version))
12020 (sha256
12021 (base32
12022 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12023 (build-system python-build-system)
12024 (home-page "https://github.com/twisted/constantly")
12025 (synopsis "Symbolic constants in Python")
12026 (description "Constantly is a Python library that provides symbolic
12027 constant support. It includes collections and constants with text, numeric,
12028 and bit flag values.")
12029 (license license:expat)))
12030
12031 (define-public python2-constantly
12032 (package-with-python2 python-constantly))
12033
12034 (define-public python-attrs
12035 (package
12036 (name "python-attrs")
12037 (version "19.1.0")
12038 (source (origin
12039 (method url-fetch)
12040 (uri (pypi-uri "attrs" version))
12041 (sha256
12042 (base32
12043 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12044 (build-system python-build-system)
12045 (arguments
12046 `(#:modules ((guix build utils)
12047 (guix build python-build-system)
12048 (ice-9 ftw)
12049 (srfi srfi-1)
12050 (srfi srfi-26))
12051 #:phases (modify-phases %standard-phases
12052 (replace 'check
12053 (lambda _
12054 (let ((cwd (getcwd)))
12055 (setenv "PYTHONPATH"
12056 (string-append
12057 cwd "/build/"
12058 (find (cut string-prefix? "lib" <>)
12059 (scandir (string-append cwd "/build")))
12060 ":"
12061 (getenv "PYTHONPATH")))
12062 (invoke "python" "-m" "pytest")))))))
12063 (native-inputs
12064 `(("python-coverage" ,python-coverage)
12065 ("python-hypothesis" ,python-hypothesis)
12066 ("python-pympler" ,python-pympler)
12067 ("python-pytest" ,python-pytest)
12068 ("python-six" ,python-six)
12069 ("python-sphinx" ,python-sphinx)
12070 ("python-zope-interface" ,python-zope-interface)))
12071 (home-page "https://github.com/python-attrs/attrs/")
12072 (synopsis "Attributes without boilerplate")
12073 (description "@code{attrs} is a Python package with class decorators that
12074 ease the chores of implementing the most common attribute-related object
12075 protocols.")
12076 (license license:expat)))
12077
12078 (define-public python2-attrs
12079 (package-with-python2 python-attrs))
12080
12081 (define-public python-attrs-bootstrap
12082 (package
12083 (inherit python-attrs)
12084 (name "python-attrs-bootstrap")
12085 ;; Keep this on a fixed version so python-attrs can be updated without
12086 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
12087 (version "17.4.0")
12088 (source (origin
12089 (method url-fetch)
12090 (uri (pypi-uri "attrs" version))
12091 (sha256
12092 (base32
12093 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
12094 (native-inputs `())
12095 (arguments `(#:tests? #f))))
12096
12097 (define-public python2-attrs-bootstrap
12098 (package-with-python2 python-attrs-bootstrap))
12099
12100 (define-public python2-cliapp
12101 (package
12102 (name "python2-cliapp")
12103 (version "1.20180812.1")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (string-append
12108 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12109 version ".tar.gz"))
12110 (sha256
12111 (base32
12112 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12113 (build-system python-build-system)
12114 (arguments
12115 `(#:python ,python-2
12116 #:phases
12117 (modify-phases %standard-phases
12118 ;; check phase needs to be run before the build phase. If not,
12119 ;; coverage-test-runner looks for tests for the built source files,
12120 ;; and fails.
12121 (delete 'check)
12122 (add-before 'build 'check
12123 (lambda _
12124 ;; Disable python3 tests
12125 (substitute* "check"
12126 (("python3") "# python3"))
12127 (invoke "./check"))))))
12128 (native-inputs
12129 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12130 ("python2-pep8" ,python2-pep8)))
12131 (propagated-inputs
12132 `(("python2-pyaml" ,python2-pyaml)))
12133 (home-page "https://liw.fi/cliapp/")
12134 (synopsis "Python framework for command line programs")
12135 (description "@code{python2-cliapp} is a python framework for
12136 command line programs. It contains the typical stuff such programs
12137 need to do, such as parsing the command line for options, and
12138 iterating over input files.")
12139 (license license:gpl2+)))
12140
12141 (define-public python2-ttystatus
12142 (package
12143 (name "python2-ttystatus")
12144 (version "0.36")
12145 (source
12146 (origin
12147 (method url-fetch)
12148 (uri (string-append
12149 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12150 version ".tar.gz"))
12151 (sha256
12152 (base32
12153 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12154 (build-system python-build-system)
12155 (native-inputs
12156 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12157 ("python2-pep8" ,python2-pep8)))
12158 (arguments
12159 `(#:python ,python-2
12160 #:phases
12161 (modify-phases %standard-phases
12162 ;; check phase needs to be run before the build phase. If not,
12163 ;; coverage-test-runner looks for tests for the built source files,
12164 ;; and fails.
12165 (delete 'check)
12166 (add-before 'build 'check
12167 (lambda _ (invoke "make" "check"))))))
12168 (home-page "https://liw.fi/ttystatus/")
12169 (synopsis "Python library for showing progress reporting and
12170 status updates on terminals")
12171 (description "@code{python2-ttystatus} is a python library for
12172 showing progress reporting and status updates on terminals, for
12173 command line programs. Output is automatically adapted to the width
12174 of the terminal: truncated if it does not fit, and resized if the
12175 terminal size changes.")
12176 (license license:gpl3+)))
12177
12178 (define-public python2-tracing
12179 (package
12180 (name "python2-tracing")
12181 (version "0.10")
12182 (source
12183 (origin
12184 (method url-fetch)
12185 (uri (string-append
12186 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12187 version ".tar.gz"))
12188 (sha256
12189 (base32
12190 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12191 (build-system python-build-system)
12192 (arguments
12193 `(#:python ,python-2))
12194 (home-page "https://liw.fi/tracing/")
12195 (synopsis "Python debug logging helper")
12196 (description "@code{python2-tracing} is a python library for
12197 logging debug messages. It provides a way to turn debugging messages
12198 on and off, based on the filename they occur in. It is much faster
12199 than using @code{logging.Filter} to accomplish the same thing, which
12200 matters when code is run in production mode. The actual logging still
12201 happens using the @code{logging} library.")
12202 (license license:gpl3+)))
12203
12204 (define-public python2-larch
12205 (package
12206 (name "python2-larch")
12207 (version "1.20151025")
12208 (source
12209 (origin
12210 (method url-fetch)
12211 (uri (string-append
12212 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12213 version ".tar.gz"))
12214 (patches (search-patches
12215 "python2-larch-coverage-4.0a6-compatibility.patch"))
12216 (sha256
12217 (base32
12218 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12219 (build-system python-build-system)
12220 (arguments
12221 `(#:python ,python-2
12222 #:phases
12223 (modify-phases %standard-phases
12224 ;; check phase needs to be run before the build phase. If not,
12225 ;; coverage-test-runner looks for tests for the built source files,
12226 ;; and fails.
12227 (delete 'check)
12228 (add-before 'build 'check
12229 (lambda _ (invoke "make" "check"))))))
12230 (native-inputs
12231 `(("cmdtest" ,cmdtest)
12232 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12233 (propagated-inputs
12234 `(("python2-tracing" ,python2-tracing)))
12235 (home-page "https://liw.fi/larch/")
12236 (synopsis "Python copy-on-write B-tree library")
12237 (description "@code{python2-larch} is an implementation of
12238 particular kind of B-tree, based on research by Ohad Rodeh. See
12239 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12240 on the data structure.
12241
12242 The distinctive feature of this B-tree is that a node is never
12243 (conceptually) modified. Instead, all updates are done by
12244 copy-on-write. This makes it easy to clone a tree, and modify only the
12245 clone, while other processes access the original tree.")
12246 (license license:gpl3+)))
12247
12248 (define-public python-astroid
12249 (package
12250 (name "python-astroid")
12251 (version "2.1.0")
12252 (source
12253 (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "astroid" version))
12256 (sha256
12257 (base32
12258 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12259 (build-system python-build-system)
12260 (propagated-inputs
12261 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12262 ("python-six" ,python-six)
12263 ("python-wrapt" ,python-wrapt)))
12264 (native-inputs
12265 `(("python-dateutil" ,python-dateutil)
12266 ("python-nose" ,python-nose)
12267 ("python-pytest" ,python-pytest)
12268 ("python-pytest-runner" ,python-pytest-runner)))
12269 (arguments
12270 `(#:phases
12271 (modify-phases %standard-phases
12272 (add-after 'unpack 'remove-spurious-test
12273 (lambda _
12274 ;; This can be removed after upgrading from python-3.7
12275 ;; https://github.com/PyCQA/astroid/issues/593
12276 ;; https://bugs.python.org/issue34056
12277 (delete-file "astroid/tests/unittest_modutils.py")
12278 #t))
12279 (replace 'check
12280 (lambda _
12281 (invoke "pytest" "astroid"))))))
12282 (home-page "https://github.com/PyCQA/astroid")
12283 (synopsis "Common base representation of python source code for pylint and
12284 other projects")
12285 (description "@code{python-astroid} provides a common base representation
12286 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12287
12288 It provides a compatible representation which comes from the _ast module. It
12289 rebuilds the tree generated by the builtin _ast module by recursively walking
12290 down the AST and building an extended ast. The new node classes have
12291 additional methods and attributes for different usages. They include some
12292 support for static inference and local name scopes. Furthermore, astroid
12293 builds partial trees by inspecting living objects.")
12294 (license license:lgpl2.1+)
12295 (properties `((python2-variant . ,(delay python2-astroid))))))
12296
12297 (define-public python2-astroid
12298 (let ((base (package-with-python2
12299 (strip-python2-variant python-astroid))))
12300 (package (inherit base)
12301 ;; Version 2.x removes python2 support.
12302 (version "1.6.5")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "astroid" version))
12307 (sha256
12308 (base32
12309 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12310 (arguments
12311 (substitute-keyword-arguments (package-arguments base)
12312 ((#:phases phases)
12313 `(modify-phases ,phases
12314 (add-after 'unpack 'remove-spurious-test
12315 (lambda _
12316 ;; https://github.com/PyCQA/astroid/issues/276
12317 (delete-file "astroid/tests/unittest_brain.py")
12318 #t))
12319 (replace 'check
12320 (lambda _
12321 (invoke"python" "-m" "unittest" "discover"
12322 "-p" "unittest*.py")))))))
12323 (native-inputs `())
12324 (propagated-inputs
12325 `(("python2-backports-functools-lru-cache"
12326 ,python2-backports-functools-lru-cache)
12327 ("python2-enum34" ,python2-enum34)
12328 ("python2-singledispatch" ,python2-singledispatch)
12329 ,@(package-propagated-inputs base))))))
12330
12331 (define-public python-isort
12332 (package
12333 (name "python-isort")
12334 (version "4.3.4")
12335 (source
12336 (origin
12337 (method git-fetch)
12338 (uri (git-reference
12339 ;; Tests pass only from the Github sources
12340 (url "https://github.com/timothycrosley/isort")
12341 (commit version)))
12342 (file-name (git-file-name name version))
12343 (sha256
12344 (base32
12345 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12346 (build-system python-build-system)
12347 (native-inputs
12348 `(("python-mock" ,python-mock)
12349 ("python-pytest" ,python-pytest)))
12350 (home-page "https://github.com/timothycrosley/isort")
12351 (synopsis "Python utility/library to sort python imports")
12352 (description "@code{python-isort} is a python utility/library to sort
12353 imports alphabetically, and automatically separated into sections. It
12354 provides a command line utility, a python library and plugins for various
12355 editors.")
12356 (license license:expat)
12357 (properties `((python2-variant . ,(delay python2-isort))))))
12358
12359 (define-public python2-isort
12360 (let ((base (package-with-python2
12361 (strip-python2-variant python-isort))))
12362 (package (inherit base)
12363 (native-inputs
12364 `(("python2-futures" ,python2-futures)
12365 ,@(package-native-inputs base))))))
12366
12367 (define-public python2-backports-functools-lru-cache
12368 (package
12369 (name "python2-backports-functools-lru-cache")
12370 (version "1.5")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 ;; only the pypi tarballs contain the necessary metadata
12375 (uri (pypi-uri "backports.functools_lru_cache" version))
12376 (sha256
12377 (base32
12378 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12379 (build-system python-build-system)
12380 (native-inputs
12381 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12382 (arguments
12383 `(#:python ,python-2))
12384 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12385 (synopsis "Backport of functools.lru_cache from Python 3.3")
12386 (description "@code{python2-backports-functools-lru-cache} is a backport
12387 of @code{functools.lru_cache} from python 3.3.")
12388 (license license:expat)))
12389
12390 (define-public python-configparser
12391 (package
12392 (name "python-configparser")
12393 (version "3.5.0")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (string-append
12398 "https://bitbucket.org/ambv/configparser/get/"
12399 version ".tar.bz2"))
12400 (file-name (string-append name "-" version ".tar.gz"))
12401 (sha256
12402 (base32
12403 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12404 (build-system python-build-system)
12405 (home-page "https://github.com/jaraco/configparser/")
12406 (synopsis "Backport of configparser from python 3.5")
12407 (description "@code{python-configparser} is a backport of
12408 @code{configparser} from Python 3.5 so that it can be used directly
12409 in other versions.")
12410 (license license:expat)))
12411
12412 (define-public python2-configparser
12413 (package-with-python2 python-configparser))
12414
12415 (define-public python-mando
12416 (package
12417 (name "python-mando")
12418 (version "0.6.4")
12419 (source (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "mando" version))
12422 (sha256
12423 (base32
12424 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12425 (build-system python-build-system)
12426 (propagated-inputs
12427 `(("python-rst2ansi" ,python-rst2ansi)
12428 ("python-six" ,python-six)))
12429 (native-inputs
12430 `(("python-pytest" ,python-pytest)))
12431 (home-page "https://mando.readthedocs.org/")
12432 (synopsis
12433 "Wrapper around argparse, allowing creation of complete CLI applications")
12434 (description
12435 "This package is a wrapper around argparse, allowing you to write complete CLI
12436 applications in seconds while maintaining all the flexibility.")
12437 (license license:expat)))
12438
12439 (define-public python2-mando
12440 (package-with-python2 python-mando))
12441
12442 (define-public python2-argparse
12443 (package
12444 (name "python2-argparse")
12445 (version "1.4.0")
12446 (source
12447 (origin
12448 (method url-fetch)
12449 (uri (pypi-uri "argparse" version))
12450 (sha256
12451 (base32
12452 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12453 (build-system python-build-system)
12454 (arguments
12455 `(#:python ,python-2))
12456 (home-page "https://github.com/ThomasWaldmann/argparse/")
12457 (synopsis "Python command-line parsing library")
12458 (description
12459 "This package is mostly for people who want to have @code{argparse} on
12460 older Pythons because it was not part of the standard library back then.")
12461 (license license:psfl)))
12462
12463 (define-public python-fudge
12464 (package
12465 (name "python-fudge")
12466 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12467 ;; package, which is currently the only use of this package.
12468 (version "0.9.6")
12469 (source
12470 (origin
12471 (method url-fetch)
12472 (uri (pypi-uri "fudge" version))
12473 (sha256
12474 (base32
12475 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12476 (build-system python-build-system)
12477 (arguments
12478 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12479 (home-page "https://github.com/fudge-py/fudge")
12480 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12481 (description
12482 "Fudge is a Python module for using fake objects (mocks and stubs) to
12483 test real ones.
12484
12485 In readable Python code, you declare the methods available on your fake object
12486 and how they should be called. Then you inject that into your application and
12487 start testing. This declarative approach means you don’t have to record and
12488 playback actions and you don’t have to inspect your fakes after running code.
12489 If the fake object was used incorrectly then you’ll see an informative
12490 exception message with a traceback that points to the culprit.")
12491 (license license:expat)))
12492
12493 (define-public python2-fudge
12494 (package-with-python2 python-fudge))
12495
12496 (define-public python-mwclient
12497 (package
12498 (name "python-mwclient")
12499 (version "0.8.4")
12500 (source
12501 (origin
12502 (method url-fetch)
12503 ;; The PyPI version wouldn't contain tests.
12504 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12505 "v" version ".tar.gz"))
12506 (file-name (string-append name "-" version ".tar.gz"))
12507 (sha256
12508 (base32
12509 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12510 (build-system python-build-system)
12511 (propagated-inputs
12512 `(("python-requests" ,python-requests)
12513 ("python-requests-oauthlib"
12514 ,python-requests-oauthlib)
12515 ("python-six" ,python-six)))
12516 (native-inputs
12517 `(("python-mock" ,python-mock)
12518 ("python-pytest" ,python-pytest)
12519 ("python-pytest-pep8" ,python-pytest-pep8)
12520 ("python-pytest-cache" ,python-pytest-cache)
12521 ("python-pytest-cov" ,python-pytest-cov)
12522 ("python-responses" ,python-responses)))
12523 (home-page "https://github.com/btongminh/mwclient")
12524 (synopsis "MediaWiki API client")
12525 (description "This package provides a MediaWiki API client.")
12526 (license license:expat)))
12527
12528 (define-public python2-mwclient
12529 (package-with-python2 python-mwclient))
12530
12531 (define-public python-utils
12532 (package
12533 (name "python-utils")
12534 (version "2.1.0")
12535 (source (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "python-utils" version))
12538 (sha256
12539 (base32
12540 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12541 (build-system python-build-system)
12542 (native-inputs
12543 `(("pytest-runner" ,python-pytest-runner)
12544 ("pytest" ,python-pytest)
12545 ("six" ,python-six)))
12546 (home-page "https://github.com/WoLpH/python-utils")
12547 (synopsis "Convenient utilities not included with the standard Python install")
12548 (description
12549 "Python Utils is a collection of small Python functions and classes which
12550 make common patterns shorter and easier.")
12551 (license license:bsd-2)))
12552
12553 (define-public python2-utils
12554 (package-with-python2 python-utils))
12555
12556 (define-public python-diff-match-patch
12557 (package
12558 (name "python-diff-match-patch")
12559 (version "20121119")
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "diff-match-patch" version))
12564 (sha256
12565 (base32
12566 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12567 (build-system python-build-system)
12568 (home-page "https://code.google.com/p/google-diff-match-patch")
12569 (synopsis "Synchronize plain text")
12570 (description "Diff Match and Patch libraries offer robust algorithms to
12571 perform the operations required for synchronizing plain text.")
12572 (license license:asl2.0)))
12573
12574 (define-public python2-diff-match-patch
12575 (package-with-python2 python-diff-match-patch))
12576
12577 (define-public python-dirsync
12578 (package
12579 (name "python-dirsync")
12580 (version "2.2.3")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "dirsync" version))
12585 (sha256
12586 (base32
12587 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12588 (build-system python-build-system)
12589 (propagated-inputs
12590 `(("six" ,python-six)))
12591 (home-page "https://bitbucket.org/tkhyn/dirsync")
12592 (synopsis "Advanced directory tree synchronisation tool")
12593 (description "Advanced directory tree synchronisation tool.")
12594 (license license:expat)))
12595
12596 (define-public python2-dirsync
12597 (package-with-python2 python-dirsync))
12598
12599 (define-public python-levenshtein
12600 (package
12601 (name "python-levenshtein")
12602 (version "0.12.0")
12603 (source
12604 (origin
12605 (method url-fetch)
12606 (uri (pypi-uri "python-Levenshtein" version))
12607 (sha256
12608 (base32
12609 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12610 (build-system python-build-system)
12611 (home-page "https://github.com/ztane/python-Levenshtein")
12612 (synopsis "Fast computation of Levenshtein distance and string similarity")
12613 (description
12614 "The Levenshtein Python C extension module contains functions for fast computation of
12615 @enumerate
12616 @item Levenshtein (edit) distance, and edit operations
12617 @item string similarity
12618 @item approximate median strings, and generally string averaging
12619 @item string sequence and set similarity
12620 @end enumerate
12621 It supports both normal and Unicode strings.")
12622 (license license:gpl2+)))
12623
12624 (define-public python2-levenshtein
12625 (package-with-python2 python-levenshtein))
12626
12627 (define-public python-scandir
12628 (package
12629 (name "python-scandir")
12630 (version "1.9.0")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "scandir" version))
12635 (sha256
12636 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12637 (build-system python-build-system)
12638 (arguments
12639 `(#:phases (modify-phases %standard-phases
12640 (replace 'check
12641 (lambda _
12642 (invoke "python" "test/run_tests.py"))))))
12643 (home-page "https://github.com/benhoyt/scandir")
12644 (synopsis "Directory iteration function")
12645 (description
12646 "Directory iteration function like os.listdir(), except that instead of
12647 returning a list of bare filenames, it yields DirEntry objects that include
12648 file type and stat information along with the name. Using scandir() increases
12649 the speed of os.walk() by 2-20 times (depending on the platform and file
12650 system) by avoiding unnecessary calls to os.stat() in most cases.
12651
12652 This package is part of the Python standard library since version 3.5.")
12653 (license license:bsd-3)))
12654
12655 (define-public python2-scandir
12656 (package-with-python2 python-scandir))
12657
12658 (define-public python2-stemming
12659 (package
12660 (name "python2-stemming")
12661 (version "1.0.1")
12662 (source
12663 (origin
12664 (method url-fetch)
12665 (uri (pypi-uri "stemming" version))
12666 (sha256
12667 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12668 (build-system python-build-system)
12669 (arguments
12670 `(#:python ,python-2))
12671 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12672 (synopsis "Python implementations of various stemming algorithms")
12673 (description
12674 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12675 stemming algorithms for English. These implementations are straightforward and
12676 efficient, unlike some Python versions of the same algorithms available on the
12677 Web. This package is an extraction of the stemming code included in the Whoosh
12678 search engine.")
12679 (license license:public-domain)))
12680
12681 (define-public python-factory-boy
12682 (package
12683 (name "python-factory-boy")
12684 (version "2.8.1")
12685 (source
12686 (origin
12687 (method url-fetch)
12688 (uri (pypi-uri "factory_boy" version))
12689 (sha256
12690 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12691 (build-system python-build-system)
12692 (arguments
12693 ;; Tests are not included in the tarball.
12694 `(#:tests? #f))
12695 (propagated-inputs
12696 `(("faker" ,python-faker)))
12697 (home-page "https://github.com/benhoyt/scandir")
12698 (synopsis "Versatile test fixtures replacement")
12699 (description
12700 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12701
12702 As a fixtures replacement tool, it aims to replace static, hard to maintain
12703 fixtures with easy-to-use factories for complex object.
12704
12705 Instead of building an exhaustive test setup with every possible combination
12706 of corner cases, factory_boy allows you to use objects customized for the
12707 current test, while only declaring the test-specific fields")
12708 (license license:expat)))
12709
12710 (define-public python2-factory-boy
12711 (package-with-python2 python-factory-boy))
12712
12713 (define-public python-translate-toolkit
12714 (package
12715 (name "python-translate-toolkit")
12716 (version "2.1.0")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12721 (sha256
12722 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12723 (build-system python-build-system)
12724 (native-inputs
12725 `(("python-pytest" ,python-pytest)
12726 ("python-sphinx" ,python-sphinx)))
12727 (propagated-inputs
12728 `(("python-babel" ,python-babel)
12729 ("python-beautifulsoup4" ,python-beautifulsoup4)
12730 ("python-chardet" ,python-chardet)
12731 ("python-diff-match-patch" ,python-diff-match-patch)
12732 ("python-levenshtein" ,python-levenshtein)
12733 ("python-lxml" ,python-lxml)
12734 ("python-six" ,python-six)
12735 ("python-vobject" ,python-vobject)
12736 ("python-pyyaml" ,python-pyyaml)))
12737 (arguments
12738 ;; TODO: tests are not run, because they end with
12739 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12740 ;; 'parse_funcs'
12741 ;; during test setup.
12742 `(#:tests? #f))
12743 (home-page "https://toolkit.translatehouse.org")
12744 (synopsis "Tools and API for translation and localization engineering")
12745 (description
12746 "Tools and API for translation and localization engineering. It contains
12747 several utilities, as well as an API for building localization tools.")
12748 (license license:gpl2+)))
12749
12750 (define-public python2-translate-toolkit
12751 (package-with-python2 python-translate-toolkit))
12752
12753 (define-public python-packaging
12754 (package
12755 (name "python-packaging")
12756 (version "19.0")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "packaging" version))
12761 (sha256
12762 (base32
12763 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12764 (build-system python-build-system)
12765 (arguments
12766 `(#:phases (modify-phases %standard-phases
12767 (replace 'check
12768 (lambda _ (invoke "py.test" "-vv"))))))
12769 (native-inputs
12770 `(("python-pretend" ,python-pretend)
12771 ("python-pytest" ,python-pytest)))
12772 (propagated-inputs
12773 `(("python-pyparsing" ,python-pyparsing)
12774 ("python-six" ,python-six)))
12775 (home-page "https://github.com/pypa/packaging")
12776 (synopsis "Core utilities for Python packages")
12777 (description "Packaging is a Python module for dealing with Python packages.
12778 It offers an interface for working with package versions, names, and dependency
12779 information.")
12780 ;; From 'LICENSE': This software is made available under the terms of
12781 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12782 ;; Contributions to this software is made under the terms of *both* these
12783 ;; licenses.
12784 (license (list license:asl2.0 license:bsd-2))))
12785
12786 (define-public python2-packaging
12787 (package-with-python2 python-packaging))
12788
12789 (define-public python-relatorio
12790 (package
12791 (name "python-relatorio")
12792 (version "0.8.0")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "relatorio" version))
12797 (sha256
12798 (base32
12799 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12800 (build-system python-build-system)
12801 (propagated-inputs
12802 `(("python-lxml" ,python-lxml)
12803 ("python-genshi" ,python-genshi)))
12804 (native-inputs
12805 `(("python-magic" ,python-magic)))
12806 (home-page "https://relatorio.tryton.org/")
12807 (synopsis "Templating library able to output ODT and PDF files")
12808 (description "Relatorio is a templating library which provides a way to
12809 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12810 for more filetypes can be easily added by creating plugins for them.")
12811 (license license:gpl3+)))
12812
12813 (define-public python2-relatorio
12814 (package-with-python2 python-relatorio))
12815
12816 (define-public python-radon
12817 (package
12818 (name "python-radon")
12819 (version "2.2.0")
12820 (source
12821 (origin
12822 (method url-fetch)
12823 (uri (pypi-uri "radon" version))
12824 (sha256
12825 (base32
12826 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12827 (build-system python-build-system)
12828 (arguments
12829 `(#:phases (modify-phases %standard-phases
12830 (replace 'check
12831 (lambda _
12832 (invoke "python" "radon/tests/run.py"))))))
12833 (propagated-inputs
12834 `(("python-colorama" ,python-colorama)
12835 ("python-flake8-polyfill" ,python-flake8-polyfill)
12836 ("python-mando" ,python-mando)))
12837 (native-inputs
12838 `(("python-pytest" ,python-pytest)
12839 ("python-pytest-mock" ,python-pytest-mock)))
12840 (home-page "https://radon.readthedocs.org/")
12841 (synopsis "Code Metrics in Python")
12842 (description "Radon is a Python tool which computes various code metrics.
12843 Supported metrics are:
12844 @itemize @bullet
12845 @item raw metrics: SLOC, comment lines, blank lines, &c.
12846 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12847 @item Halstead metrics (all of them)
12848 @item the Maintainability Index (a Visual Studio metric)
12849 @end itemize")
12850 (license license:expat)))
12851
12852 (define-public python2-radon
12853 (package-with-python2 python-radon))
12854
12855 (define-public python-sure
12856 (package
12857 (name "python-sure")
12858 (version "1.4.11")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "sure" version))
12863 (sha256
12864 (base32
12865 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12866 (build-system python-build-system)
12867 (propagated-inputs
12868 `(("python-mock" ,python-mock)
12869 ("python-six" ,python-six)))
12870 (native-inputs
12871 `(("python-nose" ,python-nose)))
12872 (home-page "https://github.com/gabrielfalcao/sure")
12873 (synopsis "Automated testing library in python for python")
12874 (description
12875 "Sure is a python library that leverages a DSL for writing assertions.
12876 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12877 (license license:gpl3+)))
12878
12879 (define-public python2-sure
12880 (package-with-python2 python-sure))
12881
12882 (define-public python2-couleur
12883 ;; This package does not seem to support python3 at all, hence,
12884 ;; only the python2 variant definition is provided.
12885 (package
12886 (name "python2-couleur")
12887 (version "0.6.2")
12888 (source
12889 (origin
12890 (method url-fetch)
12891 (uri (pypi-uri "couleur" version))
12892 (sha256
12893 (base32
12894 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12895 (build-system python-build-system)
12896 (arguments
12897 `(#:python ,python-2))
12898 (home-page "https://github.com/gabrielfalcao/couleur")
12899 (synopsis
12900 "ANSI terminal tool for python, colored shell and other handy fancy features")
12901 (description
12902 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12903 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12904 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12905 ;; https://github.com/gabrielfalcao/couleur/issues/11
12906 (license license:lgpl3+)))
12907
12908 (define-public python-misaka
12909 (package
12910 (name "python-misaka")
12911 (version "2.1.1")
12912 (source
12913 (origin
12914 (method url-fetch)
12915 (uri (pypi-uri "misaka" version))
12916 (sha256
12917 (base32
12918 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12919 (build-system python-build-system)
12920 (arguments
12921 `(;; Line 37 of setup.py calls self.run_command('develop')
12922 ;; in the 'check' phase. This command seems to be trying
12923 ;; to write to
12924 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12925 ;; for which it does not have the permission to write.
12926 #:tests? #f))
12927 (propagated-inputs
12928 `(("python-cffi" ,python-cffi)))
12929 (home-page "https://github.com/FSX/misaka")
12930 (synopsis "Python binding for Hoedown")
12931 (description
12932 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12933 library written in C. It features a fast HTML renderer and functionality to make custom
12934 renderers (e.g. man pages or LaTeX).")
12935 (license license:expat)))
12936
12937 (define-public python2-misaka
12938 (package-with-python2 python-misaka))
12939
12940 (define-public python2-steadymark
12941 ;; This is forced into being a python2 only variant
12942 ;; due to its dependence on couleur that has no support
12943 ;; for python3
12944 (package
12945 (name "python2-steadymark")
12946 (version "0.7.3")
12947 (source
12948 (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "steadymark" version))
12951 (sha256
12952 (base32
12953 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12954 (build-system python-build-system)
12955 (native-inputs
12956 `(("python-couleur" ,python2-couleur)
12957 ("python-sure" ,python2-sure)
12958 ("python-misaka" ,python2-misaka)))
12959 (arguments
12960 `(#:python ,python-2
12961 #:phases
12962 (modify-phases %standard-phases
12963 (add-before 'build 'patch-setup-py
12964 (lambda _
12965 ;; Update requirements from dependency==version
12966 ;; to dependency>=version
12967 (substitute* "setup.py"
12968 (("==") ">="))
12969 #t)))))
12970 (home-page "https://github.com/gabrielfalcao/steadymark")
12971 (synopsis "Markdown-based test runner for python")
12972 (description
12973 "@code{Steadymark} allows documentation to be written in github-flavoured
12974 markdown. The documentation may contain snippets of code surrounded by python
12975 code blocks and @code{Steadymark} will find these snippets and run them, making
12976 sure that there are no old malfunctional examples in the documentation examples.")
12977 (license license:expat)))
12978
12979 (define-public python-jsonpointer
12980 (package
12981 (name "python-jsonpointer")
12982 (version "1.10")
12983 (source
12984 (origin
12985 (method url-fetch)
12986 (uri (pypi-uri "jsonpointer" version))
12987 (sha256
12988 (base32
12989 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12990 (build-system python-build-system)
12991 (home-page "https://github.com/stefankoegl/python-json-pointer")
12992 (synopsis "Identify specific nodes in a JSON document")
12993 (description "@code{jsonpointer} allows you to access specific nodes
12994 by path in a JSON document (see RFC 6901).")
12995 (license license:bsd-3)))
12996
12997 (define-public python2-jsonpointer
12998 (package-with-python2 python-jsonpointer))
12999
13000 (define-public python-jsonpatch
13001 (package
13002 (name "python-jsonpatch")
13003 (version "1.16")
13004 (source
13005 (origin
13006 (method url-fetch)
13007 ;; pypi version lacks tests.js
13008 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13009 "archive/v" version ".tar.gz"))
13010 (file-name (string-append name "-" version ".tar.gz"))
13011 (sha256
13012 (base32
13013 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13014 (build-system python-build-system)
13015 (native-inputs
13016 `(("python-jsonpointer" ,python-jsonpointer)))
13017 (home-page "https://github.com/stefankoegl/python-json-patch")
13018 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13019 (description "@code{jsonpatch} is a library and program that allows
13020 applying JSON Patches according to RFC 6902.")
13021 (license license:bsd-3)))
13022
13023 (define-public python2-jsonpatch
13024 (package-with-python2 python-jsonpatch))
13025
13026 (define-public python-jsonpatch-0.4
13027 (package (inherit python-jsonpatch)
13028 (name "python-jsonpatch")
13029 (version "0.4")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13034 "archive/v" version ".tar.gz"))
13035 (file-name (string-append name "-" version ".tar.gz"))
13036 (sha256
13037 (base32
13038 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13039
13040 (define-public python2-jsonpatch-0.4
13041 (package-with-python2 python-jsonpatch-0.4))
13042
13043 (define-public python-rfc3986
13044 (package
13045 (name "python-rfc3986")
13046 (version "1.1.0")
13047 (source (origin
13048 (method url-fetch)
13049 (uri (pypi-uri "rfc3986" version))
13050 (sha256
13051 (base32
13052 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13053 (build-system python-build-system)
13054 (arguments
13055 `(#:modules ((guix build utils)
13056 (guix build python-build-system)
13057 (ice-9 ftw)
13058 (srfi srfi-1)
13059 (srfi srfi-26))
13060 #:phases
13061 (modify-phases %standard-phases
13062 (replace 'check
13063 (lambda _
13064 (let ((cwd (getcwd)))
13065 (setenv "PYTHONPATH"
13066 (string-append cwd "/build/"
13067 (find (cut string-prefix? "lib" <>)
13068 (scandir (string-append cwd "/build")))
13069 ":"
13070 (getenv "PYTHONPATH")))
13071 (invoke "pytest" "-v")))))))
13072 (native-inputs
13073 `(("python-pytest" ,python-pytest)))
13074 (home-page "https://rfc3986.readthedocs.io/")
13075 (synopsis "Parse and validate URI references")
13076 (description
13077 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13078 validation and authority parsing. This module also supports RFC@tie{}6874
13079 which adds support for zone identifiers to IPv6 addresses.")
13080 (license license:asl2.0)))
13081
13082 (define-public python2-rfc3986
13083 (package-with-python2 python-rfc3986))
13084
13085 (define-public python-rfc3987
13086 (package
13087 (name "python-rfc3987")
13088 (version "1.3.7")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "rfc3987" version))
13093 (sha256
13094 (base32
13095 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13096 (build-system python-build-system)
13097 (home-page "https://pypi.python.org/pypi/rfc3987")
13098 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13099 (description "@code{rfc3987} provides routines for parsing and
13100 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13101 (license license:gpl3+)))
13102
13103 (define-public python2-rfc3987
13104 (package-with-python2 python-rfc3987))
13105
13106 (define-public python-validate-email
13107 (package
13108 (name "python-validate-email")
13109 (version "1.3")
13110 (source
13111 (origin
13112 (method url-fetch)
13113 (uri (pypi-uri "validate_email" version))
13114 (sha256
13115 (base32
13116 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13117 (build-system python-build-system)
13118 (home-page "https://github.com/syrusakbary/validate_email")
13119 (synopsis "Verifies if an email address is valid and really exists")
13120 (description "@code{validate_email} can be used to verify if an email
13121 address is valid and really exists.")
13122 (license license:lgpl3+)))
13123
13124 (define-public python2-validate-email
13125 (package-with-python2 python-validate-email))
13126
13127 (define-public python-flex
13128 (package
13129 (name "python-flex")
13130 (version "6.10.0")
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (pypi-uri "flex" version))
13135 (sha256
13136 (base32
13137 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13138 (build-system python-build-system)
13139 (propagated-inputs
13140 `(("python-click" ,python-click)
13141 ("python-iso8601" ,python-iso8601)
13142 ("python-jsonpointer" ,python-jsonpointer)
13143 ("python-pyyaml" ,python-pyyaml)
13144 ("python-requests" ,python-requests)
13145 ("python-rfc3987" ,python-rfc3987)
13146 ("python-six" ,python-six)
13147 ("python-validate-email" ,python-validate-email)))
13148 (home-page "https://github.com/pipermerriam/flex")
13149 (synopsis "Validates Swagger schemata")
13150 (description "@code{flex} can be used to validate Swagger schemata.")
13151 (license license:bsd-3)))
13152
13153 (define-public python2-flex
13154 (package-with-python2 python-flex))
13155
13156 (define-public python-marshmallow
13157 (package
13158 (name "python-marshmallow")
13159 (version "3.0.0b14")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "marshmallow" version))
13164 (sha256
13165 (base32
13166 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13167 (build-system python-build-system)
13168 (propagated-inputs
13169 `(("python-dateutil" ,python-dateutil)
13170 ("python-simplejson" ,python-simplejson)))
13171 (native-inputs
13172 `(("python-pytest" ,python-pytest)
13173 ("python-pytz" ,python-pytz)))
13174 (home-page "https://github.com/marshmallow-code/marshmallow")
13175 (synopsis "Convert complex datatypes to and from native
13176 Python datatypes.")
13177 (description "@code{marshmallow} provides a library for converting
13178 complex datatypes to and from native Python datatypes.")
13179 (license license:expat)))
13180
13181 (define-public python2-marshmallow
13182 (package-with-python2 python-marshmallow))
13183
13184 (define-public python-apispec
13185 (package
13186 (name "python-apispec")
13187 (version "0.25.3")
13188 (source
13189 (origin
13190 (method url-fetch)
13191 (uri (pypi-uri "apispec" version))
13192 (sha256
13193 (base32
13194 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13195 (build-system python-build-system)
13196 (propagated-inputs
13197 `(("python-pyyaml" ,python-pyyaml)))
13198 (native-inputs
13199 `(("python-pytest" ,python-pytest)
13200 ("python-flask" ,python-flask)
13201 ("python-marshmallow" ,python-marshmallow)
13202 ("python-tornado" ,python-tornado)
13203 ("python-bottle" ,python-bottle)
13204 ("python-mock" ,python-mock)))
13205 (home-page "https://github.com/marshmallow-code/apispec")
13206 (synopsis "Swagger 2.0 API specification generator")
13207 (description "@code{python-apispec} is a pluggable API specification
13208 generator. Currently supports the OpenAPI specification (f.k.a.
13209 Swagger 2.0).")
13210 (license license:expat)))
13211
13212 (define-public python2-apispec
13213 (package-with-python2 python-apispec))
13214
13215 (define-public python-flasgger
13216 (package
13217 (name "python-flasgger")
13218 (version "0.6.3")
13219 (source
13220 (origin
13221 (method git-fetch)
13222 (uri (git-reference
13223 (url "https://github.com/rochacbruno/flasgger.git")
13224 (commit version)))
13225 (file-name (git-file-name name version))
13226 (sha256
13227 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13228 (build-system python-build-system)
13229 (arguments
13230 `(#:phases
13231 (modify-phases %standard-phases
13232 (replace 'check
13233 (lambda* (#:key inputs outputs #:allow-other-keys)
13234 (substitute* "Makefile"
13235 (("flake8 flasgger --ignore=F403")
13236 "flake8 flasgger --ignore=E731,F403"))
13237 (setenv "PYTHONPATH" (string-append (getcwd)
13238 ":"
13239 (getenv "PYTHONPATH")))
13240 (invoke "py.test"))))))
13241 (propagated-inputs
13242 `(("python-flask" ,python-flask)
13243 ("python-pyyaml" ,python-pyyaml)
13244 ("python-jsonschema" ,python-jsonschema)
13245 ("python-mistune" ,python-mistune)
13246 ("python-six" ,python-six)))
13247 (native-inputs
13248 `(("python-decorator" ,python-decorator)
13249 ("python-flake8" ,python-flake8)
13250 ("python-flask-restful" ,python-flask-restful)
13251 ("python-flex" ,python-flex)
13252 ("python-pytest" ,python-pytest)
13253 ("python-pytest-cov" ,python-pytest-cov)
13254 ("python-marshmallow" ,python-marshmallow)
13255 ("python-apispec" ,python-apispec)))
13256 (home-page "https://github.com/rochacbruno/flasgger/")
13257 (synopsis "Extract Swagger specs from your Flask project")
13258 (description "@code{python-flasgger} allows extracting Swagger specs
13259 from your Flask project. It is a fork of Flask-Swagger.")
13260 (license license:expat)))
13261
13262 (define-public python2-flasgger
13263 (package-with-python2 python-flasgger))
13264
13265 (define-public python-swagger-spec-validator
13266 (package
13267 (name "python-swagger-spec-validator")
13268 (version "2.4.3")
13269 (source
13270 (origin
13271 (method url-fetch)
13272 (uri (pypi-uri "swagger-spec-validator" version))
13273 (sha256
13274 (base32
13275 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13276 (build-system python-build-system)
13277 (propagated-inputs
13278 `(("python-jsonschema" ,python-jsonschema)
13279 ("python-pyyaml" ,python-pyyaml)
13280 ("python-six" ,python-six)))
13281 (home-page
13282 "https://github.com/Yelp/swagger_spec_validator")
13283 (synopsis "Validation of Swagger specifications")
13284 (description "@code{swagger_spec_validator} provides a library for
13285 validating Swagger API specifications.")
13286 (license license:asl2.0)))
13287
13288 (define-public python2-swagger-spec-validator
13289 (package-with-python2 python-swagger-spec-validator))
13290
13291 (define-public python-apache-libcloud
13292 (package
13293 (name "python-apache-libcloud")
13294 (version "2.4.0")
13295 (source
13296 (origin
13297 (method url-fetch)
13298 (uri (pypi-uri "apache-libcloud" version))
13299 (sha256
13300 (base32
13301 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13302 (build-system python-build-system)
13303 (arguments
13304 `(#:phases
13305 (modify-phases %standard-phases
13306 (add-after 'unpack 'patch-ssh
13307 (lambda* (#:key inputs #:allow-other-keys)
13308 (substitute* "libcloud/compute/ssh.py"
13309 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13310 "/bin/ssh" "'")))
13311 #t))
13312 (add-after 'unpack 'patch-tests
13313 (lambda _
13314 (substitute* "./libcloud/test/test_file_fixtures.py"
13315 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13316 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13317 return (httplib.OK,
13318 \"1234abcd\",
13319 {\"test\": \"value\"},
13320 httplib.responses[httplib.OK])
13321 def _ascii"))
13322 (substitute* "libcloud/test/compute/test_ssh_client.py"
13323 (("class ShellOutSSHClientTests")
13324 "@unittest.skip(\"Guix container doesn't have ssh service\")
13325 class ShellOutSSHClientTests")
13326 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13327 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13328 (("'.xF0', '.x90', '.x8D', '.x88'")
13329 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13330 #t))
13331 (add-before 'check 'copy-secret
13332 (lambda _
13333 (copy-file "libcloud/test/secrets.py-dist"
13334 "libcloud/test/secrets.py")
13335 #t)))))
13336 (inputs
13337 `(("openssh" ,openssh)))
13338 (propagated-inputs
13339 `(("python-paramiko" ,python-paramiko)
13340 ("python-requests" ,python-requests)))
13341 (native-inputs
13342 `(("python-lockfile" ,python-lockfile)
13343 ("python-mock" ,python-mock)
13344 ("python-pytest" ,python-pytest)
13345 ("python-pytest-runner" ,python-pytest-runner)
13346 ("python-requests-mock" ,python-requests-mock)))
13347 (home-page "https://libcloud.apache.org/")
13348 (synopsis "Unified Cloud API")
13349 (description "@code{libcloud} is a Python library for interacting with
13350 many of the popular cloud service providers using a unified API.")
13351 (license license:asl2.0)))
13352
13353 (define-public python2-apache-libcloud
13354 (package-with-python2 python-apache-libcloud))
13355
13356 (define-public python-smmap2
13357 (package
13358 (name "python-smmap2")
13359 (version "2.0.3")
13360 (source
13361 (origin
13362 (method url-fetch)
13363 (uri (pypi-uri "smmap2" version))
13364 (sha256
13365 (base32
13366 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13367 (build-system python-build-system)
13368 (native-inputs
13369 `(("python-nosexcover" ,python-nosexcover)))
13370 (home-page "https://github.com/Byron/smmap")
13371 (synopsis "Python sliding window memory map manager")
13372 (description "@code{smmap2} is a pure Python implementation of a sliding
13373 window memory map manager.")
13374 (license license:bsd-3)))
13375
13376 (define-public python2-smmap2
13377 (package-with-python2 python-smmap2))
13378
13379 (define-public python-regex
13380 (package
13381 (name "python-regex")
13382 (version "2019.04.14")
13383 (source (origin
13384 (method url-fetch)
13385 (uri (pypi-uri "regex" version))
13386 (sha256
13387 (base32
13388 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13389 ;; TODO: Fix and enable regex_test.py tests that complain about the
13390 ;; test.support module not existing.
13391 (build-system python-build-system)
13392 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13393 (synopsis "Alternative regular expression module")
13394 (description "This regular expression implementation is backwards-
13395 compatible with the standard @code{re} module, but offers additional
13396 functionality like full case-folding for case-insensitive matches in Unicode.")
13397 (license license:psfl)))
13398
13399 (define-public python2-regex
13400 (package-with-python2 python-regex))
13401
13402 (define-public python2-pyopengl
13403 (package
13404 (name "python2-pyopengl")
13405 (version "3.1.0")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "PyOpenGL" version))
13410 (sha256
13411 (base32
13412 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13413 (arguments
13414 `(#:python ,python-2))
13415 (build-system python-build-system)
13416 (home-page "http://pyopengl.sourceforge.net")
13417 (synopsis "Standard OpenGL bindings for Python")
13418 (description
13419 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13420 related APIs. The binding is created using the standard @code{ctypes}
13421 library.")
13422 (license license:bsd-3)))
13423
13424 (define-public python2-pyopengl-accelerate
13425 (package
13426 (inherit python2-pyopengl)
13427 (name "python2-pyopengl-accelerate")
13428 (version "3.1.0")
13429 (source
13430 (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "PyOpenGL-accelerate" version))
13433 (sha256
13434 (base32
13435 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13436 (synopsis "Acceleration code for PyOpenGL")
13437 (description
13438 "This is the Cython-coded accelerator module for PyOpenGL.")))
13439
13440 (define-public python-rencode
13441 (package
13442 (name "python-rencode")
13443 (version "1.0.5")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "rencode" version))
13448 (sha256
13449 (base32
13450 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13451 (build-system python-build-system)
13452 (arguments
13453 `(#:phases
13454 (modify-phases %standard-phases
13455 (add-before 'check 'delete-bogus-test
13456 ;; This test requires /home/aresch/Downloads, which is not provided by
13457 ;; the build environment.
13458 (lambda _
13459 (delete-file "rencode/t.py")
13460 #t)))))
13461 (native-inputs `(("pkg-config" ,pkg-config)
13462 ("python-cython" ,python-cython)))
13463 (home-page "https://github.com/aresch/rencode")
13464 (synopsis "Serialization of heterogeneous data structures")
13465 (description
13466 "The @code{rencode} module is a data structure serialization library,
13467 similar to @code{bencode} from the BitTorrent project. For complex,
13468 heterogeneous data structures with many small elements, r-encoding stake up
13469 significantly less space than b-encodings. This version of rencode is a
13470 complete rewrite in Cython to attempt to increase the performance over the
13471 pure Python module.")
13472 (license license:bsd-3)))
13473
13474 (define-public python2-rencode
13475 (package-with-python2 python-rencode))
13476
13477 (define-public python-xenon
13478 (package
13479 (name "python-xenon")
13480 (version "0.5.4")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "xenon" version))
13485 (sha256
13486 (base32
13487 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13488 (build-system python-build-system)
13489 (native-inputs
13490 `(("python-pyyaml" ,python-pyyaml)
13491 ("python-radon" ,python-radon)
13492 ("python-requests" ,python-requests)
13493 ("python-flake8" ,python-flake8)
13494 ("python-tox" ,python-tox)))
13495 (arguments
13496 `(#:phases
13497 (modify-phases %standard-phases
13498 (add-before 'build 'patch-test-requirements
13499 (lambda _
13500 ;; Remove httpretty dependency for tests.
13501 (substitute* "setup.py"
13502 (("httpretty") ""))
13503 #t)))))
13504 (home-page "https://xenon.readthedocs.org/")
13505 (synopsis "Monitor code metrics for Python on your CI server")
13506 (description
13507 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13508 Ideally, @code{xenon} is run every time code is committed. Through command
13509 line options, various thresholds can be set for the complexity of code. It
13510 will fail (i.e. it will exit with a non-zero exit code) when any of these
13511 requirements is not met.")
13512 (license license:expat)))
13513
13514 (define-public python2-xenon
13515 (package-with-python2 python-xenon))
13516
13517 (define-public python-pysocks
13518 (package
13519 (name "python-pysocks")
13520 (version "1.7.0")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "PySocks" version))
13525 (sha256
13526 (base32
13527 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13528 (build-system python-build-system)
13529 (arguments `(#:tests? #f))
13530 (home-page "https://github.com/Anorov/PySocks")
13531 (synopsis "SOCKS client module")
13532 (description "@code{pysocks} is an updated and semi-actively maintained
13533 version of @code{SocksiPy} with bug fixes and extra features.")
13534 (license license:bsd-3)))
13535
13536 (define-public python2-pysocks
13537 (package-with-python2 python-pysocks))
13538
13539 (define-public python-pydiff
13540 (package
13541 (name "python-pydiff")
13542 (version "0.2")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (pypi-uri "pydiff" version))
13547 (sha256
13548 (base32
13549 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13550 (build-system python-build-system)
13551 (home-page "https://github.com/myint/pydiff")
13552 (synopsis "Library to diff two Python files at the bytecode level")
13553 (description
13554 "@code{pydiff} makes it easy to look for actual code changes while
13555 ignoring formatting changes.")
13556 (license license:expat)))
13557
13558 (define-public python2-pydiff
13559 (package-with-python2 python-pydiff))
13560
13561 (define-public python-tqdm
13562 (package
13563 (name "python-tqdm")
13564 (version "4.19.6")
13565 (source
13566 (origin
13567 (method url-fetch)
13568 (uri (pypi-uri "tqdm" version))
13569 (sha256
13570 (base32
13571 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13572 (build-system python-build-system)
13573 (native-inputs
13574 `(("python-flake8" ,python-flake8)
13575 ("python-nose" ,python-nose)
13576 ("python-coverage" ,python-coverage)))
13577 (home-page "https://github.com/tqdm/tqdm")
13578 (synopsis "Fast, extensible progress meter")
13579 (description
13580 "Make loops show a progress bar on the console by just wrapping any
13581 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13582 design and layout.")
13583 (license (list license:mpl2.0 license:expat))))
13584
13585 (define-public python2-tqdm
13586 (package-with-python2 python-tqdm))
13587
13588 (define-public python-pkginfo
13589 (package
13590 (name "python-pkginfo")
13591 (version "1.4.2")
13592 (source
13593 (origin
13594 (method url-fetch)
13595 (uri (pypi-uri "pkginfo" version))
13596 (sha256
13597 (base32
13598 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13599 (build-system python-build-system)
13600 (arguments
13601 ;; The tests are broken upstream.
13602 '(#:tests? #f))
13603 (home-page
13604 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13605 (synopsis
13606 "Query metadatdata from sdists, bdists, and installed packages")
13607 (description
13608 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13609 source distriubtion (an sdist) or a binary distribution (e.g., created by
13610 running bdist_egg). It can also query the EGG-INFO directory of an installed
13611 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13612 created by running @code{python setup.py develop}).")
13613 (license license:expat)))
13614
13615 (define-public python2-pkginfo
13616 (package-with-python2 python-pkginfo))
13617
13618 (define-public python-twine
13619 (package
13620 (name "python-twine")
13621 (version "1.9.1")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "twine" version))
13626 (sha256
13627 (base32
13628 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13629 (build-system python-build-system)
13630 (propagated-inputs
13631 `(("python-tqdm" ,python-tqdm)
13632 ("python-pkginfo" ,python-pkginfo)
13633 ("python-requests" ,python-requests)
13634 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13635 (home-page "https://github.com/pypa/twine")
13636 (synopsis "Collection of utilities for interacting with PyPI")
13637 (description
13638 "@code{twine} currently supports registering projects and uploading
13639 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13640 their files and supports any packaging format (including wheels).")
13641 (license license:asl2.0)))
13642
13643 (define-public python2-twine
13644 (package-with-python2 python-twine))
13645
13646 (define-public python-linecache2
13647 (package
13648 (name "python-linecache2")
13649 (version "1.0.0")
13650 (source
13651 (origin
13652 (method url-fetch)
13653 (uri (pypi-uri "linecache2" version))
13654 (sha256
13655 (base32
13656 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13657 (build-system python-build-system)
13658 (arguments
13659 `(;; The tests depend on unittest2, and our version is a bit too old.
13660 #:tests? #f))
13661 (native-inputs
13662 `(("python-pbr" ,python-pbr-minimal)))
13663 (home-page
13664 "https://github.com/testing-cabal/linecache2")
13665 (synopsis "Backports of the linecache module")
13666 (description
13667 "The linecache module allows one to get any line from any file, while
13668 attempting to optimize internally, using a cache, the common case where many
13669 lines are read from a single file.")
13670 (license license:psfl)))
13671
13672 (define-public python2-linecache2
13673 (package-with-python2 python-linecache2))
13674
13675 (define-public python-traceback2
13676 (package
13677 (name "python-traceback2")
13678 (version "1.4.0")
13679 (source
13680 (origin
13681 (method url-fetch)
13682 (uri (pypi-uri "traceback2" version))
13683 (sha256
13684 (base32
13685 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13686 (build-system python-build-system)
13687 (arguments
13688 `(;; python-traceback2 and python-unittest2 depend on one another.
13689 #:tests? #f))
13690 (native-inputs
13691 `(("python-pbr" ,python-pbr-minimal)))
13692 (propagated-inputs
13693 `(("python-linecache2" ,python-linecache2)))
13694 (home-page
13695 "https://github.com/testing-cabal/traceback2")
13696 (synopsis "Backports of the traceback module")
13697 (description
13698 "This module provides a standard interface to extract, format and print
13699 stack traces of Python programs. It exactly mimics the behavior of the Python
13700 interpreter when it prints a stack trace.")
13701 (license license:psfl)))
13702
13703 (define-public python2-traceback2
13704 (package-with-python2 python-traceback2))
13705
13706 (define-public python-ratelimiter
13707 (package
13708 (name "python-ratelimiter")
13709 (version "1.2.0")
13710 (source
13711 (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "ratelimiter" version))
13714 (sha256
13715 (base32
13716 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13717 (build-system python-build-system)
13718 (arguments
13719 '(#:tests? #f)) ; There are no tests in the pypi archive.
13720 (home-page "https://github.com/RazerM/ratelimiter")
13721 (synopsis "Simple rate limiting object")
13722 (description
13723 "The @code{ratelimiter} module ensures that an operation will not be
13724 executed more than a given number of times during a given period.")
13725 (license license:asl2.0)))
13726
13727 (define-public python2-ratelimiter
13728 (package-with-python2 python-ratelimiter))
13729
13730 (define-public python-dukpy
13731 (package
13732 (name "python-dukpy")
13733 (version "0.3")
13734 (source
13735 (origin
13736 (method git-fetch)
13737 (uri (git-reference
13738 (url "https://github.com/kovidgoyal/dukpy.git")
13739 (commit (string-append "v" version))))
13740 (file-name (git-file-name name version))
13741 (sha256
13742 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13743 (build-system python-build-system)
13744 (home-page "https://github.com/kovidgoyal/dukpy")
13745 (synopsis "Run JavaScript in python")
13746 (description
13747 "dukpy is a JavaScript runtime environment for Python using the duktape
13748 embeddable JavaScript engine.")
13749 ;; Dukpy is licensed under MIT like the embedded duktape library,
13750 ;; with 'errors.c' as GPL3.
13751 (license (list license:expat license:gpl3))))
13752
13753 (define-public python2-dukpy
13754 (package-with-python2 python-dukpy))
13755
13756 (define-public python-jsonrpclib-pelix
13757 (package
13758 (name "python-jsonrpclib-pelix")
13759 (version "0.3.2")
13760 (source
13761 (origin
13762 (method url-fetch)
13763 (uri (pypi-uri "jsonrpclib-pelix" version))
13764 (sha256
13765 (base32
13766 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13767 (build-system python-build-system)
13768 (arguments
13769 `(#:tests? #f)) ; no tests in PyPI tarball
13770 (home-page "https://github.com/tcalmant/jsonrpclib/")
13771 (synopsis "JSON-RPC 2.0 client library for Python")
13772 (description
13773 "This library implements the JSON-RPC v2.0
13774 specification (backwards-compatible) as a client library for Python. This
13775 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13776 services.")
13777 (license license:asl2.0)))
13778
13779 (define-public python2-jsonrpclib-pelix
13780 (package-with-python2 python-jsonrpclib-pelix))
13781
13782 (define-public python-setuptools-scm-git-archive
13783 (package
13784 (name "python-setuptools-scm-git-archive")
13785 (version "1.0")
13786 (source
13787 (origin
13788 (method url-fetch)
13789 (uri (pypi-uri "setuptools_scm_git_archive" version))
13790 (sha256
13791 (base32
13792 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13793 (build-system python-build-system)
13794 (native-inputs
13795 `(("python-pytest" ,python-pytest)))
13796 (propagated-inputs
13797 `(("python-setuptools-scm" ,python-setuptools-scm)))
13798 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13799 (synopsis "Setuptools_scm plugin for git archives")
13800 (description
13801 "The setuptools_scm_git_archive package is a plugin to
13802 setuptools_scm, which supports obtaining versions from git archives that
13803 belong to tagged versions.")
13804 (license license:expat)))
13805
13806 (define-public python2-setuptools-scm-git-archive
13807 (package-with-python2 python-setuptools-scm-git-archive))
13808
13809 (define-public python-setuptools-git
13810 (package
13811 (name "python-setuptools-git")
13812 (version "1.2")
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (pypi-uri "setuptools-git" version))
13817 (sha256
13818 (base32
13819 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13820 (build-system python-build-system)
13821 (arguments
13822 `(#:phases
13823 (modify-phases %standard-phases
13824 ;; This is needed for tests.
13825 (add-after 'unpack 'configure-git
13826 (lambda _
13827 (setenv "HOME" "/tmp")
13828 (invoke "git" "config" "--global" "user.email" "guix")
13829 (invoke "git" "config" "--global" "user.name" "guix")
13830 #t)))))
13831 (native-inputs
13832 `(("git" ,git-minimal)))
13833 (home-page "https://github.com/msabramo/setuptools-git")
13834 (synopsis "Setuptools revision control system plugin for Git")
13835 (description
13836 "This package provides a plugin for Setuptools for revision control with
13837 Git.")
13838 (license license:bsd-3)))
13839
13840 (define-public python-pyclipper
13841 (package
13842 (name "python-pyclipper")
13843 (version "1.1.0.post1")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (pypi-uri "pyclipper" version ".zip"))
13848 (sha256
13849 (base32
13850 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13851 (modules '((guix build utils)))
13852 (snippet
13853 '(begin
13854 ;; This file is generated by Cython.
13855 (delete-file "pyclipper/pyclipper.cpp") #t))))
13856 (build-system python-build-system)
13857 (arguments
13858 `(#:phases
13859 (modify-phases %standard-phases
13860 (add-before 'build 'cythonize-sources
13861 (lambda _
13862 (with-directory-excursion "pyclipper"
13863 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13864 (propagated-inputs
13865 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13866 (native-inputs
13867 `(("python-cython" ,python-cython)
13868 ("python-pytest" ,python-pytest)
13869 ("python-pytest-runner" ,python-pytest-runner)
13870 ("python-unittest2" ,python-unittest2)
13871 ("unzip" ,unzip)))
13872 (home-page "https://github.com/greginvm/pyclipper")
13873 (synopsis "Wrapper for Angus Johnson's Clipper library")
13874 (description
13875 "Pyclipper is a Cython wrapper for the C++ translation of the
13876 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13877 (license license:expat)))
13878
13879 (define-public python2-pyclipper
13880 (package-with-python2 python-pyclipper))
13881
13882 (define-public python2-booleanoperations
13883 (package
13884 (name "python2-booleanoperations")
13885 (version "0.7.1")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "booleanOperations" version ".zip"))
13890 (sha256
13891 (base32
13892 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13893 (build-system python-build-system)
13894 (arguments
13895 `(#:python ,python-2))
13896 (native-inputs
13897 `(("unzip" ,unzip)
13898 ("python2-pytest" ,python2-pytest)
13899 ("python2-pytest-runner" ,python2-pytest-runner)))
13900 (propagated-inputs
13901 `(("python-fonttools" ,python2-fonttools)
13902 ("python-pyclipper" ,python2-pyclipper)
13903 ("python-ufolib" ,python2-ufolib)))
13904 (home-page "https://github.com/typemytype/booleanOperations")
13905 (synopsis "Boolean operations on paths")
13906 (description
13907 "BooleanOperations provides a Python library that enables
13908 boolean operations on paths.")
13909 (license license:expat)))
13910
13911 (define-public python-tempdir
13912 (package
13913 (name "python-tempdir")
13914 (version "0.7.1")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 (uri (pypi-uri "tempdir" version))
13919 (sha256
13920 (base32
13921 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13922 (build-system python-build-system)
13923 (home-page "https://pypi.org/project/tempdir/")
13924 (arguments
13925 ;; the package has no tests
13926 '(#:tests? #f))
13927 (synopsis "Python library for managing temporary directories")
13928 (description
13929 "This library manages temporary directories that are automatically
13930 deleted with all their contents when they are no longer needed. It is
13931 particularly convenient for use in tests.")
13932 (license license:expat)))
13933
13934 (define-public python2-tempdir
13935 (package-with-python2 python-tempdir))
13936
13937 (define-public python-activepapers
13938 (package
13939 (name "python-activepapers")
13940 (version "0.2.2")
13941 (source
13942 (origin
13943 (method url-fetch)
13944 (uri (pypi-uri "ActivePapers.Py" version))
13945 (sha256
13946 (base32
13947 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13948 (build-system python-build-system)
13949 (arguments
13950 `(#:modules ((ice-9 ftw)
13951 (srfi srfi-1)
13952 (guix build utils)
13953 (guix build python-build-system))
13954
13955 #:phases
13956 (modify-phases %standard-phases
13957 (add-after 'unpack 'delete-python2-code
13958 (lambda _
13959 (for-each delete-file
13960 '("lib/activepapers/builtins2.py"
13961 "lib/activepapers/standardlib2.py"
13962 "lib/activepapers/utility2.py"))))
13963 (replace 'check
13964 (lambda _
13965 ;; Deactivate the test cases that download files
13966 (setenv "NO_NETWORK_ACCESS" "1")
13967 ;; For some strange reason, some tests fail if nosetests runs all
13968 ;; test modules in a single execution. They pass if each test
13969 ;; module is run individually.
13970 (for-each (lambda (filename)
13971 (invoke "nosetests"
13972 (string-append "tests/" filename)))
13973 (scandir "tests"
13974 (lambda (filename)
13975 (string-suffix? ".py" filename)))))))))
13976 (native-inputs
13977 `(("python-tempdir" ,python-tempdir)
13978 ("python-nose" ,python-nose)))
13979 (propagated-inputs
13980 `(("python-h5py" ,python-h5py)))
13981 (home-page "http://www.activepapers.org/")
13982 (synopsis "Executable papers for scientific computing")
13983 (description
13984 "ActivePapers is a tool for working with executable papers, which
13985 combine data, code, and documentation in single-file packages,
13986 suitable for publication as supplementary material or on repositories
13987 such as figshare or Zenodo.")
13988 (properties `((python2-variant . ,(delay python2-activepapers))))
13989 (license license:bsd-3)))
13990
13991 (define-public python2-activepapers
13992 (let ((base (package-with-python2
13993 (strip-python2-variant python-activepapers))))
13994 (package
13995 (inherit base)
13996 (arguments
13997 (substitute-keyword-arguments (package-arguments base)
13998 ((#:phases phases)
13999 `(modify-phases ,phases
14000 (delete 'delete-python2-code)
14001 (add-after 'unpack 'delete-python3-code
14002 (lambda _
14003 (for-each delete-file
14004 '("lib/activepapers/builtins3.py"
14005 "lib/activepapers/standardlib3.py"
14006 "lib/activepapers/utility3.py")))))))))))
14007
14008 (define-public python-semver
14009 (package
14010 (name "python-semver")
14011 (version "2.7.9")
14012 (source
14013 (origin
14014 (method url-fetch)
14015 (uri (pypi-uri "semver" version))
14016 (sha256
14017 (base32
14018 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14019 (build-system python-build-system)
14020 (arguments
14021 `(#:phases
14022 (modify-phases %standard-phases
14023 (add-after 'unpack 'patch-test-requirements
14024 (lambda _
14025 (substitute* "setup.py"
14026 ;; Our Python is new enough.
14027 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14028 #t)))))
14029 (native-inputs
14030 `(("python-tox" ,python-tox)
14031 ("python-virtualenv" ,python-virtualenv)))
14032 (home-page "https://github.com/k-bx/python-semver")
14033 (synopsis "Python helper for Semantic Versioning")
14034 (description "This package provides a Python library for
14035 @url{Semantic Versioning, http://semver.org/}.")
14036 (license license:bsd-3)))
14037
14038 (define-public python2-semver
14039 (package-with-python2 python-semver))
14040
14041 (define-public python-pyro4
14042 (package
14043 (name "python-pyro4")
14044 (version "4.75")
14045 (source
14046 (origin
14047 (method url-fetch)
14048 (uri (pypi-uri "Pyro4" version))
14049 (sha256
14050 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14051 (build-system python-build-system)
14052 (propagated-inputs
14053 `(("python-serpent" ,python-serpent)))
14054 (home-page "https://pyro4.readthedocs.io")
14055 (synopsis "Distributed object middleware for Python")
14056 (description
14057 "Pyro enables you to build applications in which objects can talk to each
14058 other over the network. You can just use normal Python method calls to call
14059 objects on other machines, also known as remote procedure calls (RPC).")
14060 (license license:expat)))
14061
14062 (define-public python2-pyro
14063 (package
14064 (name "python2-pyro")
14065 (version "3.16")
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "Pyro" version))
14070 (file-name (string-append "Pyro-" version ".tar.gz"))
14071 (sha256
14072 (base32
14073 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14074 (build-system python-build-system)
14075 (arguments
14076 ;; Pyro is not compatible with Python 3
14077 `(#:python ,python-2
14078 ;; Pyro has no test cases for automatic execution
14079 #:tests? #f))
14080 (home-page "http://pythonhosted.org/Pyro/")
14081 (synopsis "Distributed object manager for Python")
14082 (description "Pyro is a Distributed Object Technology system
14083 written in Python that is designed to be easy to use. It resembles
14084 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14085 which is a system and language independent Distributed Object Technology
14086 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14087 longer maintained. New projects should use Pyro4 instead, which
14088 is the new Pyro version that is actively developed.")
14089 (license license:expat)))
14090
14091 (define-public python2-scientific
14092 (package
14093 (name "python2-scientific")
14094 (version "2.9.4")
14095 (source
14096 (origin
14097 (method url-fetch)
14098 (uri (string-append "https://bitbucket.org/khinsen/"
14099 "scientificpython/downloads/ScientificPython-"
14100 version ".tar.gz"))
14101 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14102 (sha256
14103 (base32
14104 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14105 (build-system python-build-system)
14106 (inputs
14107 `(("netcdf" ,netcdf)))
14108 (propagated-inputs
14109 `(("python-numpy" ,python2-numpy-1.8)
14110 ("python-pyro" ,python2-pyro)))
14111 (arguments
14112 ;; ScientificPython is not compatible with Python 3
14113 `(#:python ,python-2
14114 #:tests? #f ; No test suite
14115 #:phases
14116 (modify-phases %standard-phases
14117 (replace 'build
14118 (lambda* (#:key inputs #:allow-other-keys)
14119 (invoke "python" "setup.py" "build"
14120 (string-append "--netcdf_prefix="
14121 (assoc-ref inputs "netcdf"))))))))
14122 (home-page "https://bitbucket.org/khinsen/scientificpython")
14123 (synopsis "Python modules for scientific computing")
14124 (description "ScientificPython is a collection of Python modules that are
14125 useful for scientific computing. Most modules are rather general (Geometry,
14126 physical units, automatic derivatives, ...) whereas others are more
14127 domain-specific (e.g. netCDF and PDB support). The library is currently
14128 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14129 (license license:cecill-c)))
14130
14131 (define-public python2-mmtk
14132 (package
14133 (name "python2-mmtk")
14134 (version "2.7.11")
14135 (source
14136 (origin
14137 (method url-fetch)
14138 (uri (string-append "https://bitbucket.org/khinsen/"
14139 "mmtk/downloads/MMTK-" version ".tar.gz"))
14140 (file-name (string-append "MMTK-" version ".tar.gz"))
14141 (sha256
14142 (base32
14143 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14144 (build-system python-build-system)
14145 (native-inputs
14146 `(("netcdf" ,netcdf)))
14147 (propagated-inputs
14148 `(("python-scientific" ,python2-scientific)
14149 ("python-tkinter" ,python-2 "tk")))
14150 (arguments
14151 `(#:python ,python-2
14152 #:tests? #f
14153 #:phases
14154 (modify-phases %standard-phases
14155 (add-before 'build 'includes-from-scientific
14156 (lambda* (#:key inputs #:allow-other-keys)
14157 (mkdir-p "Include/Scientific")
14158 (copy-recursively
14159 (string-append
14160 (assoc-ref inputs "python-scientific")
14161 "/include/python2.7/Scientific")
14162 "Include/Scientific"))))))
14163 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14164 (synopsis "Python library for molecular simulation")
14165 (description "MMTK is a library for molecular simulations with an emphasis
14166 on biomolecules. It provides widely used methods such as Molecular Dynamics
14167 and normal mode analysis, but also basic routines for implementing new methods
14168 for simulation and analysis. The library is currently not actively maintained
14169 and works only with Python 2 and NumPy < 1.9.")
14170 (license license:cecill-c)))
14171
14172 (define-public python-phonenumbers
14173 (package
14174 (name "python-phonenumbers")
14175 (version "8.9.1")
14176 (source
14177 (origin
14178 (method url-fetch)
14179 (uri (pypi-uri "phonenumbers" version))
14180 (sha256
14181 (base32
14182 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14183 (build-system python-build-system)
14184 (home-page
14185 "https://github.com/daviddrysdale/python-phonenumbers")
14186 (synopsis
14187 "Python library for dealing with international phone numbers")
14188 (description
14189 "This package provides a Python port of Google's libphonenumber library.")
14190 (license license:asl2.0)))
14191
14192 (define-public python2-phonenumbers
14193 (package-with-python2 python-phonenumbers))
14194
14195 (define-public python-send2trash
14196 (package
14197 (name "python-send2trash")
14198 (version "1.5.0")
14199 (source
14200 (origin (method git-fetch)
14201 ;; Source tarball on PyPI doesn't include tests.
14202 (uri (git-reference
14203 (url "https://github.com/hsoft/send2trash.git")
14204 (commit version)))
14205 (file-name (git-file-name name version))
14206 (sha256
14207 (base32
14208 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14209 (build-system python-build-system)
14210 (arguments
14211 '(#:phases
14212 (modify-phases %standard-phases
14213 (add-before 'check 'pre-check
14214 (lambda _
14215 (mkdir-p "/tmp/foo")
14216 (setenv "HOME" "/tmp/foo")
14217 #t)))))
14218 (home-page "https://github.com/hsoft/send2trash")
14219 (synopsis "Send files to the user's @file{~/Trash} directory")
14220 (description "This package provides a Python library to send files to the
14221 user's @file{~/Trash} directory.")
14222 (properties `((python2-variant . ,(delay python2-send2trash))))
14223 (license license:bsd-3)))
14224
14225 (define-public python2-send2trash
14226 (package
14227 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14228 (arguments
14229 (substitute-keyword-arguments (package-arguments python-send2trash)
14230 ((#:phases phases)
14231 `(modify-phases ,phases
14232 (add-before 'check 'setenv
14233 (lambda _
14234 (setenv "PYTHONPATH"
14235 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14236 #t))))))))
14237
14238 (define-public python-yapf
14239 (package
14240 (name "python-yapf")
14241 (version "0.24.0")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "yapf" version))
14246 (sha256
14247 (base32
14248 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14249 (build-system python-build-system)
14250 (home-page "https://github.com/google/yapf")
14251 (synopsis "Formatter for Python code")
14252 (description "YAPF is a formatter for Python code. It's based off of
14253 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14254 takes the code and reformats it to the best formatting that conforms to the
14255 style guide, even if the original code didn't violate the style guide.")
14256 (license license:asl2.0)))
14257
14258 (define-public python2-yapf
14259 (package-with-python2 python-yapf))
14260
14261 (define-public python-gyp
14262 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14263 (revision "0"))
14264 (package
14265 (name "python-gyp")
14266 ;; Google does not release versions,
14267 ;; based on second most recent commit date.
14268 (version (git-version "0.0.0" revision commit))
14269 (source
14270 (origin
14271 ;; Google does not release tarballs,
14272 ;; git checkout is needed.
14273 (method git-fetch)
14274 (uri (git-reference
14275 (url "https://chromium.googlesource.com/external/gyp")
14276 (commit commit)))
14277 (file-name (git-file-name name version))
14278 (sha256
14279 (base32
14280 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14281 (build-system python-build-system)
14282 (home-page "https://gyp.gsrc.io/")
14283 (synopsis "GYP is a Meta-Build system")
14284 (description
14285 "GYP builds build systems for large, cross platform applications.
14286 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14287 files, and Makefiles.")
14288 (license license:bsd-3))))
14289
14290 (define-public python2-gyp
14291 (package-with-python2 python-gyp))
14292
14293 (define-public python-whatever
14294 (package
14295 (name "python-whatever")
14296 (version "0.5")
14297 (source
14298 (origin
14299 (method url-fetch)
14300 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14301 ".tar.gz"))
14302 (sha256
14303 (base32
14304 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14305 (file-name (string-append name "-" version ".tar.gz"))))
14306 (build-system python-build-system)
14307 (arguments
14308 `(#:phases
14309 (modify-phases %standard-phases
14310 (replace 'check
14311 (lambda _
14312 (invoke "py.test"))))))
14313 (native-inputs
14314 `(("python-pytest" ,python-pytest)))
14315 (home-page "http://github.com/Suor/whatever")
14316 (synopsis "Make anonymous functions by partial application of operators")
14317 (description "@code{whatever} provides an easy way to make anonymous
14318 functions by partial application of operators.")
14319 (license license:bsd-3)))
14320
14321 (define-public python2-whatever
14322 (package-with-python2 python-whatever))
14323
14324 (define-public python-funcy
14325 (package
14326 (name "python-funcy")
14327 (version "1.11")
14328 (source
14329 (origin
14330 (method git-fetch)
14331 (uri (git-reference
14332 (url "https://github.com/Suor/funcy.git")
14333 (commit version)))
14334 (sha256
14335 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14336 (file-name (git-file-name name version))))
14337 (build-system python-build-system)
14338 (arguments
14339 `(#:phases
14340 (modify-phases %standard-phases
14341 (replace 'check
14342 (lambda _
14343 (invoke "py.test"))))))
14344 (native-inputs
14345 `(("python-pytest" ,python-pytest)
14346 ("python-whatever" ,python-whatever)))
14347 (home-page "http://github.com/Suor/funcy")
14348 (synopsis "Functional tools")
14349 (description "@code{funcy} is a library that provides functional tools.
14350 Examples are:
14351 @enumerate
14352 @item merge - Merges collections of the same type
14353 @item walk - Type-preserving map
14354 @item select - Selects a part of a collection
14355 @item take - Takes the first n items of a collection
14356 @item first - Takes the first item of a collection
14357 @item remove - Predicated-removes items of a collection
14358 @item concat - Concatenates two collections
14359 @item flatten - Flattens a collection with subcollections
14360 @item distinct - Returns only distinct items
14361 @item split - Predicated-splits a collection
14362 @item split_at - Splits a collection at a given item
14363 @item group_by - Groups items by group
14364 @item pairwise - Pairs off adjacent items
14365 @item partial - Partially-applies a function
14366 @item curry - Curries a function
14367 @item compose - Composes functions
14368 @item complement - Complements a predicate
14369 @item all_fn - \"all\" with predicate
14370 @end enumerate")
14371 (license license:bsd-3)))
14372
14373 (define-public python2-funcy
14374 (package-with-python2 python-funcy))
14375
14376 (define-public python-isoweek
14377 (package
14378 (name "python-isoweek")
14379 (version "1.3.3")
14380 (source
14381 (origin
14382 (method url-fetch)
14383 (uri (pypi-uri "isoweek" version))
14384 (sha256
14385 (base32
14386 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14387 (build-system python-build-system)
14388 (home-page "https://github.com/gisle/isoweek")
14389 (synopsis "Objects representing a week")
14390 (description "The @code{isoweek} module provide the class Week that
14391 implements the week definition of ISO 8601. This standard also defines
14392 a notation for identifying weeks; yyyyWww (where the W is a literal).
14393 Week instances stringify to this form.")
14394 (license license:bsd-3)))
14395
14396 (define-public python2-isoweek
14397 (package-with-python2 python-isoweek))
14398
14399 (define-public python-tokenize-rt
14400 (package
14401 (name "python-tokenize-rt")
14402 (version "2.0.1")
14403 (source
14404 (origin
14405 (method url-fetch)
14406 (uri (pypi-uri "tokenize-rt" version))
14407 (sha256
14408 (base32
14409 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14410 (build-system python-build-system)
14411 (home-page "https://github.com/asottile/tokenize-rt")
14412 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14413 (description
14414 "This Python library is a wrapper around @code{tokenize} from the Python
14415 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14416 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14417 and @code{tokens_to_src} to roundtrip.")
14418 (license license:expat)))
14419
14420 (define-public python-future-fstrings
14421 (package
14422 (name "python-future-fstrings")
14423 (version "0.4.1")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "future_fstrings" version))
14428 (sha256
14429 (base32
14430 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14431 (build-system python-build-system)
14432 (propagated-inputs
14433 `(("python-tokenize-rt" ,python-tokenize-rt)))
14434 (home-page "https://github.com/asottile/future-fstrings")
14435 (synopsis "Backport of fstrings to Python < 3.6")
14436 (description
14437 "This package provides a UTF-8 compatible encoding
14438 @code{future_fstrings}, which performs source manipulation. It decodes the
14439 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14440 @code{f} strings.")
14441 (license license:expat)))
14442
14443 (define-public python-typed-ast
14444 (package
14445 (name "python-typed-ast")
14446 (version "1.3.5")
14447 (source
14448 (origin
14449 (method url-fetch)
14450 (uri (pypi-uri "typed-ast" version))
14451 (sha256
14452 (base32
14453 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14454 (build-system python-build-system)
14455 (arguments
14456 `(#:modules ((guix build utils)
14457 (guix build python-build-system)
14458 (ice-9 ftw)
14459 (srfi srfi-1)
14460 (srfi srfi-26))
14461 #:phases
14462 (modify-phases %standard-phases
14463 (replace 'check
14464 (lambda _
14465 (let ((cwd (getcwd)))
14466 (setenv "PYTHONPATH"
14467 (string-append cwd "/build/"
14468 (find (cut string-prefix? "lib" <>)
14469 (scandir (string-append cwd "/build")))
14470 ":"
14471 (getenv "PYTHONPATH"))))
14472 (invoke "pytest")
14473 #t)))))
14474 (native-inputs `(("python-pytest" ,python-pytest)))
14475 (home-page "https://github.com/python/typed_ast")
14476 (synopsis "Fork of Python @code{ast} modules with type comment support")
14477 (description "This package provides a parser similar to the standard
14478 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14479 include PEP 484 type comments and are independent of the version of Python
14480 under which they are run. The @code{typed_ast} parsers produce the standard
14481 Python AST (plus type comments), and are both fast and correct, as they are
14482 based on the CPython 2.7 and 3.7 parsers.")
14483 ;; See the file "LICENSE" for the details.
14484 (license (list license:psfl
14485 license:asl2.0
14486 license:expat)))) ;ast27/Parser/spark.py
14487
14488 (define-public python-typing
14489 (package
14490 (name "python-typing")
14491 (version "3.6.6")
14492 (source
14493 (origin
14494 (method url-fetch)
14495 (uri (pypi-uri "typing" version))
14496 (sha256
14497 (base32
14498 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14499 (build-system python-build-system)
14500 (home-page "https://docs.python.org/3/library/typing.html")
14501 (synopsis "Type hints for Python")
14502 (description "This is a backport of the standard library @code{typing}
14503 module to Python versions older than 3.5. Typing defines a standard notation
14504 for Python function and variable type annotations. The notation can be used
14505 for documenting code in a concise, standard format, and it has been designed
14506 to also be used by static and runtime type checkers, static analyzers, IDEs
14507 and other tools.")
14508 (license license:psfl)))
14509
14510 (define-public python2-typing
14511 (package-with-python2 python-typing))
14512
14513 (define-public python-typing-extensions
14514 (package
14515 (name "python-typing-extensions")
14516 (version "3.7.2")
14517 (source
14518 (origin
14519 (method url-fetch)
14520 (uri (pypi-uri "typing_extensions" version))
14521 (sha256
14522 (base32
14523 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14524 (build-system python-build-system)
14525 (home-page
14526 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14527 (synopsis "Experimental type hints for Python")
14528 (description
14529 "The typing_extensions module contains additional @code{typing} hints not
14530 yet present in the of the @code{typing} standard library.
14531 Included are implementations of:
14532 @enumerate
14533 @item ClassVar
14534 @item ContextManager
14535 @item Counter
14536 @item DefaultDict
14537 @item Deque
14538 @item NewType
14539 @item NoReturn
14540 @item overload
14541 @item Protocol
14542 @item runtime
14543 @item Text
14544 @item Type
14545 @item TYPE_CHECKING
14546 @item AsyncGenerator
14547 @end enumerate\n")
14548 (license license:psfl)))
14549
14550 (define-public bpython
14551 (package
14552 (name "bpython")
14553 (version "0.17.1")
14554 (source
14555 (origin
14556 (method url-fetch)
14557 (uri (pypi-uri "bpython" version))
14558 (sha256
14559 (base32
14560 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14561 (build-system python-build-system)
14562 (arguments
14563 `(#:phases
14564 (modify-phases %standard-phases
14565 (add-after 'unpack 'remove-failing-test
14566 (lambda _
14567 ;; Remove failing test. FIXME: make it pass
14568 (delete-file "bpython/test/test_args.py")
14569 #t))
14570 (add-after 'wrap 'add-aliases
14571 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14572 (lambda* (#:key outputs #:allow-other-keys)
14573 (let ((out (assoc-ref outputs "out")))
14574 (for-each
14575 (lambda (old new)
14576 (symlink old (string-append out "/bin/" new)))
14577 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14578 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14579 #t)))))
14580 (propagated-inputs
14581 `(("python-pygments" ,python-pygments)
14582 ("python-requests" ,python-requests)
14583 ("python-babel" ,python-babel) ; optional, for internationalization
14584 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14585 ("python-greenlet" ,python-greenlet)
14586 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14587 ("python-six" ,python-six)))
14588 (native-inputs
14589 `(("python-sphinx" ,python-sphinx)
14590 ("python-mock" ,python-mock)))
14591 (home-page "https://bpython-interpreter.org/")
14592 (synopsis "Fancy interface to the Python interpreter")
14593 (description "Bpython is a fancy interface to the Python
14594 interpreter. bpython's main features are
14595
14596 @enumerate
14597 @item in-line syntax highlighting,
14598 @item readline-like autocomplete with suggestions displayed as you type,
14599 @item expected parameter list for any Python function,
14600 @item \"rewind\" function to pop the last line of code from memory and
14601 re-evaluate,
14602 @item send the code you've entered off to a pastebin,
14603 @item save the code you've entered to a file, and
14604 @item auto-indentation.
14605 @end enumerate")
14606 (license license:expat)))
14607
14608 (define-public bpython2
14609 (let ((base (package-with-python2
14610 (strip-python2-variant bpython))))
14611 (package (inherit base)
14612 (name "bpython2")
14613 (arguments
14614 `(#:python ,python-2
14615 #:phases
14616 (modify-phases %standard-phases
14617 (add-after 'unpack 'remove-failing-test
14618 (lambda _
14619 ;; Remove failing test. FIXME: make it pass
14620 (delete-file "bpython/test/test_args.py")
14621 ;; Disable failing test-cases (renaming inhibits they are
14622 ;; discovered)
14623 (substitute* "bpython/test/test_curtsies_repl.py"
14624 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14625 (string-append a "xxx_off_" b))
14626 (("^(\\s*def )(test_complex\\W)" _ a b)
14627 (string-append a "xxx_off_" b)))
14628 #t))
14629 (add-before 'build 'rename-scripts
14630 ;; rename the scripts to bypthon2, bpdb2, etc.
14631 (lambda _
14632 (substitute* "setup.py"
14633 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14634 (string-append name "2" rest "\n"))
14635 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14636 (string-append name "2" (or sub "") rest "\n")))
14637 #t))))))))
14638
14639 (define-public python-pyinotify
14640 (package
14641 (name "python-pyinotify")
14642 (version "0.9.6")
14643 (source (origin
14644 (method url-fetch)
14645 (uri (pypi-uri "pyinotify" version))
14646 (sha256
14647 (base32
14648 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14649 (build-system python-build-system)
14650 (arguments `(#:tests? #f)) ;no tests
14651 (home-page "https://github.com/seb-m/pyinotify")
14652 (synopsis "Python library for monitoring inotify events")
14653 (description
14654 "@code{pyinotify} provides a Python interface for monitoring
14655 file system events on Linux.")
14656 (license license:expat)))
14657
14658 (define-public python2-pyinotify
14659 (package-with-python2 python-pyinotify))
14660
14661 ;; Ada parser uses this version.
14662 (define-public python2-quex-0.67.3
14663 (package
14664 (name "python2-quex")
14665 (version "0.67.3")
14666 (source
14667 (origin
14668 (method url-fetch)
14669 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14670 (version-major+minor version)
14671 "/quex-" version ".zip"))
14672 (sha256
14673 (base32
14674 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14675 (build-system python-build-system)
14676 (native-inputs
14677 `(("unzip" ,unzip)))
14678 (arguments
14679 `(#:python ,python-2
14680 #:tests? #f
14681 #:phases
14682 (modify-phases %standard-phases
14683 (delete 'configure)
14684 (delete 'build)
14685 (replace 'install
14686 (lambda* (#:key outputs #:allow-other-keys)
14687 (let* ((out (assoc-ref outputs "out"))
14688 (share/quex (string-append out "/share/quex"))
14689 (bin (string-append out "/bin")))
14690 (copy-recursively "." share/quex)
14691 (mkdir-p bin)
14692 (symlink (string-append share/quex "/quex-exe.py")
14693 (string-append bin "/quex"))
14694 #t))))))
14695 (native-search-paths
14696 (list (search-path-specification
14697 (variable "QUEX_PATH")
14698 (files '("share/quex")))))
14699 (home-page "http://quex.sourceforge.net/")
14700 (synopsis "Lexical analyzer generator in Python")
14701 (description "@code{quex} is a lexical analyzer generator in Python.")
14702 (license license:lgpl2.1+))) ; Non-military
14703
14704 (define-public python2-quex
14705 (package (inherit python2-quex-0.67.3)
14706 (name "python2-quex")
14707 (version "0.68.1")
14708 (source
14709 (origin
14710 (method url-fetch)
14711 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14712 (sha256
14713 (base32
14714 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14715 (file-name (string-append name "-" version ".tar.gz"))))))
14716
14717 (define-public python-more-itertools
14718 (package
14719 (name "python-more-itertools")
14720 (version "4.3.0")
14721 (source
14722 (origin
14723 (method url-fetch)
14724 (uri (pypi-uri "more-itertools" version))
14725 (sha256
14726 (base32
14727 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14728 (build-system python-build-system)
14729 (arguments
14730 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14731 (%current-target-system)))
14732 '("armhf" "i686"))
14733 '(#:phases
14734 (modify-phases %standard-phases
14735 ;; This is required for 32-bit hardware.
14736 ;; TODO: Try to remove this when upgrading.
14737 (add-after 'unpack 'patch-test
14738 (lambda _
14739 (substitute* "more_itertools/tests/test_more.py"
14740 (("10 \\*\\* 10") "9 ** 9"))
14741 #t))))
14742 '())))
14743 (propagated-inputs
14744 `(("python-six" ,python-six-bootstrap)))
14745 (home-page "https://github.com/erikrose/more-itertools")
14746 (synopsis "More routines for operating on iterables, beyond itertools")
14747 (description "Python's built-in @code{itertools} module implements a
14748 number of iterator building blocks inspired by constructs from APL, Haskell,
14749 and SML. @code{more-itertools} includes additional building blocks for
14750 working with iterables.")
14751 (license license:expat)))
14752
14753 (define-public python2-more-itertools
14754 (package-with-python2 python-more-itertools))
14755
14756 (define-public python-latexcodec
14757 (package
14758 (name "python-latexcodec")
14759 (version "1.0.6")
14760 (source
14761 (origin
14762 (method url-fetch)
14763 (uri (pypi-uri "latexcodec" version))
14764 (sha256
14765 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14766 (build-system python-build-system)
14767 (inputs
14768 `(("python-six" ,python-six)))
14769 (home-page "https://readthedocs.org/projects/latexcodec/")
14770 (synopsis "Work with LaTeX code in Python")
14771 (description "Lexer and codec to work with LaTeX code in Python.")
14772 (license license:expat)))
14773
14774 (define-public python-pybtex
14775 (package
14776 (name "python-pybtex")
14777 (version "0.22.2")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "pybtex" version))
14782 (sha256
14783 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14784 (build-system python-build-system)
14785 (native-inputs
14786 `(("python-nose" ,python-nose)))
14787 (inputs
14788 `(("python-latexcodec" ,python-latexcodec)
14789 ("python-pyyaml" ,python-pyyaml)
14790 ("python-six" ,python-six)))
14791 (arguments
14792 `(#:test-target "nosetests"))
14793 (home-page "https://pybtex.org/")
14794 (synopsis "BibTeX-compatible bibliography processor")
14795 (description "Pybtex is a BibTeX-compatible bibliography processor written
14796 in Python. You can simply type pybtex instead of bibtex.")
14797 (license license:expat)))
14798
14799 (define-public python-onetimepass
14800 (package
14801 (name "python-onetimepass")
14802 (version "1.0.1")
14803 (source
14804 (origin
14805 (method url-fetch)
14806 (uri (pypi-uri "onetimepass" version))
14807 (sha256
14808 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14809 (build-system python-build-system)
14810 (propagated-inputs `(("python-six" ,python-six)))
14811 (home-page "https://github.com/tadeck/onetimepass/")
14812 (synopsis "One-time password library")
14813 (description "Python one-time password library for HMAC-based (HOTP) and
14814 time-based (TOTP) passwords.")
14815 (license license:expat)))
14816
14817 (define-public python-parso
14818 (package
14819 (name "python-parso")
14820 (version "0.5.1")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "parso" version))
14825 (sha256
14826 (base32
14827 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14828 (native-inputs
14829 `(("python-pytest" ,python-pytest)))
14830 (build-system python-build-system)
14831 (arguments
14832 `(#:phases (modify-phases %standard-phases
14833 (replace 'check
14834 (lambda _ (invoke "pytest" "-vv"))))))
14835 (home-page "https://github.com/davidhalter/parso")
14836 (synopsis "Python Parser")
14837 (description "Parso is a Python parser that supports error recovery and
14838 round-trip parsing for different Python versions (in multiple Python versions).
14839 Parso is also able to list multiple syntax errors in your Python file.")
14840 (license license:expat)))
14841
14842 (define-public python2-parso
14843 (package-with-python2 python-parso))
14844
14845 (define-public python-async-generator
14846 (package
14847 (name "python-async-generator")
14848 (version "1.10")
14849 (source
14850 (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "async_generator" version))
14853 (sha256
14854 (base32
14855 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14856 (build-system python-build-system)
14857 (native-inputs
14858 `(("python-pytest" ,python-pytest)))
14859 (home-page "https://github.com/python-trio/async_generator")
14860 (synopsis "Async generators and context managers for Python 3.5+")
14861 (description "@code{async_generator} back-ports Python 3.6's native async
14862 generators and Python 3.7's context managers into Python 3.5.")
14863 ;; Dual licensed.
14864 (license (list license:expat license:asl2.0))))
14865
14866 (define-public python-async-timeout
14867 (package
14868 (name "python-async-timeout")
14869 (version "3.0.1")
14870 (source
14871 (origin
14872 (method url-fetch)
14873 (uri (pypi-uri "async-timeout" version))
14874 (sha256
14875 (base32
14876 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14877 (build-system python-build-system)
14878 (home-page "https://github.com/aio-libs/async_timeout/")
14879 (synopsis "Timeout context manager for asyncio programs")
14880 (description "@code{async-timeout} provides a timeout timeout context
14881 manager compatible with @code{asyncio}.")
14882 (license license:asl2.0)))
14883
14884 (define-public python-glob2
14885 (package
14886 (name "python-glob2")
14887 (version "0.6")
14888 (source
14889 (origin
14890 (method git-fetch)
14891 (uri (git-reference
14892 (url "https://github.com/miracle2k/python-glob2.git")
14893 (commit version)))
14894 (file-name (git-file-name name version))
14895 (sha256
14896 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14897 (build-system python-build-system)
14898 (home-page "https://github.com/miracle2k/python-glob2/")
14899 (synopsis "Extended Version of the python buildin glob module")
14900 (description "This is an extended version of the Python
14901 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14902 adds:
14903
14904 @itemize
14905 @item The ability to capture the text matched by glob patterns, and return
14906 those matches alongside the file names.
14907 @item A recursive @code{**} globbing syntax, akin for example to the
14908 @code{globstar} option of Bash.
14909 @item The ability to replace the file system functions used, in order to glob
14910 on virtual file systems.
14911 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14912 @end itemize
14913
14914 Glob2 currently based on the glob code from Python 3.3.1.")
14915 (license license:bsd-2)))
14916
14917 (define-public python2-glob2
14918 (package-with-python2 python-glob2))
14919
14920 (define-public python-gipc
14921 (package
14922 (name "python-gipc")
14923 (version "0.6.0")
14924 (source
14925 (origin
14926 (method url-fetch)
14927 (uri (pypi-uri "gipc" version ".zip"))
14928 (sha256
14929 (base32
14930 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14931 (build-system python-build-system)
14932 (native-inputs
14933 `(("unzip" ,unzip)))
14934 (propagated-inputs
14935 `(("python-gevent" ,python-gevent)))
14936 (home-page "http://gehrcke.de/gipc")
14937 (synopsis "Child process management in the context of gevent")
14938 (description "Usage of Python's multiprocessing package in a
14939 gevent-powered application may raise problems. With @code{gipc},
14940 process-based child processes can safely be created anywhere within a
14941 gevent-powered application.")
14942 (license license:expat)))
14943
14944 (define-public python2-gipc
14945 (package-with-python2 python-gipc))
14946
14947 (define-public python-fusepy
14948 (package
14949 (name "python-fusepy")
14950 (version "2.0.4")
14951 (source
14952 (origin
14953 (method url-fetch)
14954 (uri (pypi-uri "fusepy" version))
14955 (sha256
14956 (base32
14957 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14958 (build-system python-build-system)
14959 (arguments
14960 `(#:phases
14961 (modify-phases %standard-phases
14962 (add-before 'build 'set-library-file-name
14963 (lambda* (#:key inputs #:allow-other-keys)
14964 (let ((fuse (assoc-ref inputs "fuse")))
14965 (substitute* "fuse.py"
14966 (("find_library\\('fuse'\\)")
14967 (string-append "'" fuse "/lib/libfuse.so'")))
14968 #t))))))
14969 (propagated-inputs
14970 `(("fuse" ,fuse)))
14971 (home-page "https://github.com/fusepy/fusepy")
14972 (synopsis "Simple ctypes bindings for FUSE")
14973 (description "Python module that provides a simple interface to FUSE and
14974 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14975 (license license:isc)))
14976
14977 (define-public python2-fusepy
14978 (package-with-python2 python-fusepy))
14979
14980 (define-public python2-gdrivefs
14981 (package
14982 (name "python2-gdrivefs")
14983 (version "0.14.9")
14984 (source
14985 (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "gdrivefs" version))
14988 (sha256
14989 (base32
14990 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14991 (build-system python-build-system)
14992 (arguments
14993 `(#:python ,python-2
14994 #:phases
14995 (modify-phases %standard-phases
14996 (add-before 'build 'patch-setup-py
14997 (lambda _
14998 ;; Update requirements from dependency==version
14999 ;; to dependency>=version
15000 (substitute* "gdrivefs/resources/requirements.txt"
15001 (("==") ">="))
15002 #t)))))
15003 (native-inputs
15004 `(("python2-gipc" ,python2-gipc)
15005 ("python2-gevent" ,python2-gevent)
15006 ("python2-greenlet" ,python2-greenlet)
15007 ("python2-httplib2" ,python2-httplib2)
15008 ("python2-uritemplate" ,python2-uritemplate)
15009 ("python2-oauth2client" ,python2-oauth2client)
15010 ("python2-six" ,python2-six)))
15011 (propagated-inputs
15012 `(("python2-dateutil" ,python2-dateutil)
15013 ("python2-fusepy" ,python2-fusepy)
15014 ("python2-google-api-client" ,python2-google-api-client)))
15015 (home-page "https://github.com/dsoprea/GDriveFS")
15016 (synopsis "Mount Google Drive as a local file system")
15017 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15018 under Python 2.7.")
15019 (license license:gpl2)))
15020
15021 (define-public pybind11
15022 (package
15023 (name "pybind11")
15024 (version "2.2.4")
15025 (source (origin
15026 (method git-fetch)
15027 (uri (git-reference
15028 (url "https://github.com/pybind/pybind11.git")
15029 (commit (string-append "v" version))))
15030 (sha256
15031 (base32
15032 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
15033 (file-name (git-file-name name version))))
15034 (build-system cmake-build-system)
15035 (native-inputs
15036 `(("python" ,python)
15037 ("python-pytest" ,python-pytest)))
15038 (arguments
15039 `(#:test-target "check"))
15040 (home-page "https://github.com/pybind/pybind11/")
15041 (synopsis "Seamless operability between C++11 and Python")
15042 (description "pybind11 is a lightweight header-only library that exposes
15043 C++ types in Python and vice versa, mainly to create Python bindings of
15044 existing C++ code. Its goals and syntax are similar to the excellent
15045 Boost.Python library by David Abrahams: to minimize boilerplate code in
15046 traditional extension modules by inferring type information using compile-time
15047 introspection.")
15048 (license license:expat)))
15049
15050 (define-public python-fasteners
15051 (package
15052 (name "python-fasteners")
15053 (version "0.14.1")
15054 (source
15055 (origin
15056 (method url-fetch)
15057 (uri (pypi-uri "fasteners" version))
15058 (sha256
15059 (base32
15060 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15061 (build-system python-build-system)
15062 (propagated-inputs
15063 `(("python-monotonic" ,python-monotonic)
15064 ("python-six" ,python-six)
15065 ("python-testtools" ,python-testtools)))
15066 (home-page "https://github.com/harlowja/fasteners")
15067 (synopsis "Python package that provides useful locks")
15068 (description
15069 "This package provides a Python program that provides following locks:
15070
15071 @itemize
15072 @item Locking decorator
15073 @item Reader-writer locks
15074 @item Inter-process locks
15075 @item Generic helpers
15076 @end itemize\n")
15077 (properties `((python2-variant . ,(delay python2-fasteners))))
15078 (license license:asl2.0)))
15079
15080 (define-public python2-fasteners
15081 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15082 (package
15083 (inherit base)
15084 (propagated-inputs
15085 `(("python2-futures" ,python2-futures)
15086 ,@(package-propagated-inputs base))))))
15087
15088 (define-public python-requests-file
15089 (package
15090 (name "python-requests-file")
15091 (version "1.4.3")
15092 (source
15093 (origin
15094 (method url-fetch)
15095 (uri (pypi-uri "requests-file" version))
15096 (sha256
15097 (base32
15098 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15099 (build-system python-build-system)
15100 (propagated-inputs
15101 `(("python-requests" ,python-requests)
15102 ("python-six" ,python-six)))
15103 (home-page
15104 "https://github.com/dashea/requests-file")
15105 (synopsis "File transport adapter for Requests")
15106 (description
15107 "Requests-File is a transport adapter for use with the Requests Python
15108 library to allow local file system access via @code{file://} URLs.")
15109 (license license:asl2.0)))
15110
15111 (define-public python2-requests-file
15112 (package-with-python2 python-requests-file))
15113
15114 (define-public python-tldextract
15115 (package
15116 (name "python-tldextract")
15117 (version "2.2.0")
15118 (source
15119 (origin
15120 (method url-fetch)
15121 (uri (pypi-uri "tldextract" version))
15122 (sha256
15123 (base32
15124 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15125 (build-system python-build-system)
15126 (native-inputs
15127 `(("python-pytest" ,python-pytest)
15128 ("python-responses" ,python-responses)))
15129 (propagated-inputs
15130 `(("python-idna" ,python-idna)
15131 ("python-requests" ,python-requests)
15132 ("python-requests-file" ,python-requests-file)))
15133 (home-page
15134 "https://github.com/john-kurkowski/tldextract")
15135 (synopsis
15136 "Separate the TLD from the registered domain and subdomains of a URL")
15137 (description
15138 "TLDExtract accurately separates the TLD from the registered domain and
15139 subdomains of a URL, using the Public Suffix List. By default, this includes
15140 the public ICANN TLDs and their exceptions. It can optionally support the
15141 Public Suffix List's private domains as well.")
15142 (license license:bsd-3)))
15143
15144 (define-public python2-tldextract
15145 (package-with-python2 python-tldextract))
15146
15147 (define-public python-pynamecheap
15148 (package
15149 (name "python-pynamecheap")
15150 (version "0.0.3")
15151 (source
15152 (origin
15153 (method url-fetch)
15154 (uri (pypi-uri "PyNamecheap" version))
15155 (sha256
15156 (base32
15157 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15158 (build-system python-build-system)
15159 (propagated-inputs
15160 `(("python-requests" ,python-requests)))
15161 (home-page
15162 "https://github.com/Bemmu/PyNamecheap")
15163 (synopsis
15164 "Namecheap API client in Python")
15165 (description
15166 "PyNamecheap is a Namecheap API client in Python.")
15167 (license license:expat)))
15168
15169 (define-public python2-pynamecheap
15170 (package-with-python2 python-pynamecheap))
15171
15172 (define-public python-dns-lexicon
15173 (package
15174 (name "python-dns-lexicon")
15175 (version "2.4.0")
15176 (source
15177 (origin
15178 (method url-fetch)
15179 (uri (pypi-uri "dns-lexicon" version))
15180 (sha256
15181 (base32
15182 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15183 (build-system python-build-system)
15184 (arguments
15185 `(#:tests? #f)) ;requires internet access
15186 (propagated-inputs
15187 `(("python-future" ,python-future)
15188 ("python-pynamecheap" ,python-pynamecheap)
15189 ("python-requests" ,python-requests)
15190 ("python-tldextract" ,python-tldextract)
15191 ("python-urllib3" ,python-urllib3)))
15192 (home-page "https://github.com/AnalogJ/lexicon")
15193 (synopsis
15194 "Manipulate DNS records on various DNS providers")
15195 (description
15196 "Lexicon provides a way to manipulate DNS records on multiple DNS
15197 providers in a standardized way. It has a CLI but it can also be used as a
15198 Python library. It was designed to be used in automation, specifically with
15199 Let's Encrypt.")
15200 (license license:expat)))
15201
15202 (define-public python2-dns-lexicon
15203 (package-with-python2 python-dns-lexicon))
15204
15205 (define-public python-commandlines
15206 (package
15207 (name "python-commandlines")
15208 (version "0.4.1")
15209 (source
15210 (origin
15211 (method url-fetch)
15212 (uri (pypi-uri "commandlines" version))
15213 (sha256
15214 (base32
15215 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15216 (build-system python-build-system)
15217 (home-page "https://github.com/chrissimpkins/commandlines")
15218 (synopsis "Command line argument to object parsing library")
15219 (description
15220 "@code{Commandlines} is a Python library for command line application
15221 development that supports command line argument parsing, command string
15222 validation testing and application logic.")
15223 (license license:expat)))
15224
15225 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15226 ;; python-numba. They have a very unflexible relationship.
15227 (define-public python-numba
15228 (package
15229 (name "python-numba")
15230 (version "0.42.0")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "numba" version))
15235 (sha256
15236 (base32
15237 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15238 (build-system python-build-system)
15239 (arguments
15240 `(#:modules ((guix build utils)
15241 (guix build python-build-system)
15242 (ice-9 ftw)
15243 (srfi srfi-1)
15244 (srfi srfi-26))
15245 #:phases
15246 (modify-phases %standard-phases
15247 (add-after 'unpack 'disable-proprietary-features
15248 (lambda _
15249 (setenv "NUMBA_DISABLE_HSA" "1")
15250 (setenv "NUMBA_DISABLE_CUDA" "1")
15251 #t))
15252 (add-after 'unpack 'remove-failing-tests
15253 (lambda _
15254 ;; FIXME: these tests fail for unknown reasons:
15255 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15256 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15257 (substitute* "numba/tests/test_dispatcher.py"
15258 (("def test(_non_writable_pycache)" _ m)
15259 (string-append "def guix_skip" m))
15260 (("def test(_non_creatable_pycache)" _ m)
15261 (string-append "def guix_skip" m))
15262 (("def test(_frozen)" _ m)
15263 (string-append "def guix_skip" m)))
15264
15265 ;; These tests fail because we don't run the tests from the build
15266 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15267 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15268 (substitute* "numba/tests/test_pycc.py"
15269 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15270 (string-append "def guix_skip" m)))
15271 #t))
15272 (replace 'check
15273 (lambda _
15274 (let ((cwd (getcwd)))
15275 (setenv "PYTHONPATH"
15276 (string-append cwd "/build/"
15277 (find (cut string-prefix? "lib" <>)
15278 (scandir (string-append cwd "/build")))
15279 ":"
15280 (getenv "PYTHONPATH")))
15281 ;; Something is wrong with the PYTHONPATH when running the
15282 ;; tests from the build directory, as it complains about not being
15283 ;; able to import certain modules.
15284 (with-directory-excursion "/tmp"
15285 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15286 #t)))))
15287 (propagated-inputs
15288 `(("python-llvmlite" ,python-llvmlite)
15289 ("python-numpy" ,python-numpy)
15290 ("python-singledispatch" ,python-singledispatch)))
15291 ;; Needed for tests.
15292 (inputs
15293 `(("python-jinja2" ,python-jinja2)
15294 ("python-pygments" ,python-pygments)))
15295 (home-page "https://numba.pydata.org")
15296 (synopsis "Compile Python code using LLVM")
15297 (description "Numba gives you the power to speed up your applications with
15298 high performance functions written directly in Python. With a few
15299 annotations, array-oriented and math-heavy Python code can be just-in-time
15300 compiled to native machine instructions, similar in performance to C, C++ and
15301 Fortran, without having to switch languages or Python interpreters.
15302
15303 Numba works by generating optimized machine code using the LLVM compiler
15304 infrastructure at import time, runtime, or statically (using the included pycc
15305 tool).")
15306 (license license:bsd-3)))
15307
15308 (define-public python-anndata
15309 (package
15310 (name "python-anndata")
15311 (version "0.6.18")
15312 (source
15313 (origin
15314 (method url-fetch)
15315 (uri (pypi-uri "anndata" version))
15316 (sha256
15317 (base32
15318 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15319 (build-system python-build-system)
15320 (propagated-inputs
15321 `(("python-h5py" ,python-h5py)
15322 ("python-natsort" ,python-natsort)
15323 ("python-pandas" ,python-pandas)
15324 ("python-scipy" ,python-scipy)))
15325 (home-page "https://github.com/theislab/anndata")
15326 (synopsis "Annotated data for data analysis pipelines")
15327 (description "Anndata is a package for simple (functional) high-level APIs
15328 for data analysis pipelines. In this context, it provides an efficient,
15329 scalable way of keeping track of data together with learned annotations and
15330 reduces the code overhead typically encountered when using a mostly
15331 object-oriented library such as @code{scikit-learn}.")
15332 (license license:bsd-3)))
15333
15334 (define-public python-dill
15335 (package
15336 (name "python-dill")
15337 (version "0.2.9")
15338 (source
15339 (origin
15340 (method url-fetch)
15341 (uri (pypi-uri "dill" version))
15342 (sha256
15343 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15344 (build-system python-build-system)
15345 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15346 (arguments '(#:tests? #f))
15347 (home-page "https://pypi.org/project/dill")
15348 (synopsis "Serialize all of Python")
15349 (description "Dill extends Python's @code{pickle} module for serializing
15350 and de-serializing Python objects to the majority of the built-in Python
15351 types. Dill provides the user the same interface as the @code{pickle} module,
15352 and also includes some additional features. In addition to pickling Python
15353 objects, @code{dill} provides the ability to save the state of an interpreter
15354 session in a single command. Hence, it would be feasible to save a
15355 interpreter session, close the interpreter, ship the pickled file to another
15356 computer, open a new interpreter, unpickle the session and thus continue from
15357 the saved state of the original interpreter session.")
15358 (license license:bsd-3)))
15359
15360 (define-public python-multiprocess
15361 (package
15362 (name "python-multiprocess")
15363 (version "0.70.6.1")
15364 (source
15365 (origin
15366 (method url-fetch)
15367 (uri (pypi-uri "multiprocess" version))
15368 (sha256
15369 (base32
15370 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15371 (build-system python-build-system)
15372 (propagated-inputs
15373 `(("python-dill" ,python-dill)))
15374 (home-page "https://pypi.org/project/multiprocess")
15375 (synopsis "Multiprocessing and multithreading in Python")
15376 (description
15377 "This package is a fork of the multiprocessing Python package, a package
15378 which supports the spawning of processes using the API of the standard
15379 library's @code{threading} module.")
15380 (license license:bsd-3)))
15381
15382 (define-public python-toolz
15383 (package
15384 (name "python-toolz")
15385 (version "0.9.0")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "toolz" version))
15390 (sha256
15391 (base32
15392 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15393 (build-system python-build-system)
15394 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15395 ;; unregistered loader type"
15396 (arguments '(#:tests? #f))
15397 (home-page "https://github.com/pytoolz/toolz/")
15398 (synopsis "List processing tools and functional utilities")
15399 (description
15400 "This package provides a set of utility functions for iterators,
15401 functions, and dictionaries.")
15402 (license license:bsd-3)))
15403
15404 (define-public python2-toolz
15405 (package-with-python2 python-toolz))
15406
15407 (define-public python-cytoolz
15408 (package
15409 (name "python-cytoolz")
15410 (version "0.9.0.1")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "cytoolz" version))
15415 (sha256
15416 (base32
15417 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15418 (build-system python-build-system)
15419 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15420 ;; 'exceptions'"
15421 (arguments '(#:tests? #f))
15422 (propagated-inputs
15423 `(("python-toolz" ,python-toolz)))
15424 (native-inputs
15425 `(("python-cython" ,python-cython)))
15426 (home-page "https://github.com/pytoolz/cytoolz")
15427 (synopsis "High performance functional utilities")
15428 (description
15429 "The cytoolz package implements the same API as provided by toolz. The
15430 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15431 that is accessible to other projects developed in Cython.")
15432 (license license:bsd-3)))
15433
15434 (define-public python-sortedcontainers
15435 (package
15436 (name "python-sortedcontainers")
15437 (version "2.0.4")
15438 (source
15439 (origin
15440 (method url-fetch)
15441 (uri (pypi-uri "sortedcontainers" version))
15442 (sha256
15443 (base32
15444 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15445 (build-system python-build-system)
15446 (native-inputs
15447 `(("python-tox" ,python-tox)))
15448 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15449 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15450 (description
15451 "This package provides a sorted collections library, written in
15452 pure-Python.")
15453 (license license:asl2.0)))
15454
15455 (define-public python-cloudpickle
15456 (package
15457 (name "python-cloudpickle")
15458 (version "0.6.1")
15459 (source
15460 (origin
15461 (method url-fetch)
15462 (uri (pypi-uri "cloudpickle" version))
15463 (sha256
15464 (base32
15465 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15466 (build-system python-build-system)
15467 ;; FIXME: there are 5 errors in 122 tests:
15468 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15469 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15470 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15471 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15472 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15473 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15474 (arguments '(#:tests? #f))
15475 (native-inputs
15476 `(("python-pytest" ,python-pytest)
15477 ("python-mock" ,python-mock)
15478 ("python-tornado" ,python-tornado)))
15479 (home-page "https://github.com/cloudpipe/cloudpickle")
15480 (synopsis "Extended pickling support for Python objects")
15481 (description
15482 "Cloudpickle makes it possible to serialize Python constructs not
15483 supported by the default pickle module from the Python standard library. It
15484 is especially useful for cluster computing where Python expressions are
15485 shipped over the network to execute on remote hosts, possibly close to the
15486 data.")
15487 (license license:bsd-3)))
15488
15489 (define-public python2-cloudpickle
15490 (package-with-python2 python-cloudpickle))
15491
15492 (define-public python-locket
15493 (package
15494 (name "python-locket")
15495 (version "0.2.0")
15496 (source
15497 (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "locket" version))
15500 (sha256
15501 (base32
15502 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15503 (build-system python-build-system)
15504 (home-page "https://github.com/mwilliamson/locket.py")
15505 (synopsis "File-based locks for Python")
15506 (description
15507 "Locket implements a lock that can be used by multiple processes provided
15508 they use the same path.")
15509 (license license:bsd-2)))
15510
15511 (define-public python2-locket
15512 (package-with-python2 python-locket))
15513
15514 (define-public python-blosc
15515 (package
15516 (name "python-blosc")
15517 (version "1.5.1")
15518 (source
15519 (origin
15520 (method url-fetch)
15521 (uri (pypi-uri "blosc" version))
15522 (sha256
15523 (base32
15524 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15525 (build-system python-build-system)
15526 ;; FIXME: all tests pass, but then this error is printed:
15527 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15528 (arguments '(#:tests? #f))
15529 (propagated-inputs
15530 `(("python-numpy" ,python-numpy)))
15531 (home-page "https://github.com/blosc/python-blosc")
15532 (synopsis "Python wrapper for the Blosc data compressor library")
15533 (description "Blosc is a high performance compressor optimized for binary
15534 data. It has been designed to transmit data to the processor cache faster
15535 than the traditional, non-compressed, direct memory fetch approach via a
15536 @code{memcpy()} system call.
15537
15538 Blosc works well for compressing numerical arrays that contains data with
15539 relatively low entropy, like sparse data, time series, grids with
15540 regular-spaced values, etc.
15541
15542 This Python package wraps the Blosc library.")
15543 (license license:bsd-3)))
15544
15545 (define-public python2-blosc
15546 (package-with-python2 python-blosc))
15547
15548 (define-public python-partd
15549 (package
15550 (name "python-partd")
15551 (version "0.3.9")
15552 (source
15553 (origin
15554 (method url-fetch)
15555 (uri (pypi-uri "partd" version))
15556 (sha256
15557 (base32
15558 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15559 (build-system python-build-system)
15560 (propagated-inputs
15561 `(("python-blosc" ,python-blosc)
15562 ("python-locket" ,python-locket)
15563 ("python-numpy" ,python-numpy)
15564 ("python-pandas" ,python-pandas)
15565 ("python-pyzmq" ,python-pyzmq)
15566 ("python-toolz" ,python-toolz)))
15567 (home-page "https://github.com/dask/partd/")
15568 (synopsis "Appendable key-value storage")
15569 (description "Partd stores key-value pairs. Values are raw bytes. We
15570 append on old values. Partd excels at shuffling operations.")
15571 (license license:bsd-3)))
15572
15573 (define-public python2-partd
15574 (package-with-python2 python-partd))
15575
15576 (define-public python-dask
15577 (package
15578 (name "python-dask")
15579 (version "1.2.2")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "dask" version))
15584 (sha256
15585 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15586 (build-system python-build-system)
15587 ;; A single test out of 5000+ fails. This test is marked as xfail when
15588 ;; pytest-xdist is used.
15589 (arguments
15590 `(#:phases
15591 (modify-phases %standard-phases
15592 (add-after 'unpack 'disable-broken-test
15593 (lambda _
15594 (substitute* "dask/tests/test_threaded.py"
15595 (("def test_interrupt\\(\\)" m)
15596 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15597 m)))
15598 (when (which "python2")
15599 ;; This test fails with recent Pandas:
15600 ;; <https://github.com/dask/dask/issues/3794>.
15601 (substitute* "dask/dataframe/tests/test_dataframe.py"
15602 (("def test_info\\(\\)" m)
15603 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15604 m))))
15605 #t))
15606 (replace 'check
15607 (lambda _ (invoke "pytest" "-vv"))))))
15608 (propagated-inputs
15609 `(("python-cloudpickle" ,python-cloudpickle)
15610 ("python-numpy" ,python-numpy)
15611 ("python-pandas" ,python-pandas)
15612 ("python-partd" ,python-partd)
15613 ("python-toolz" ,python-toolz)
15614 ("python-pyyaml" ,python-pyyaml)))
15615 (native-inputs
15616 `(("python-pytest" ,python-pytest)
15617 ("python-pytest-runner" ,python-pytest-runner)))
15618 (home-page "https://github.com/dask/dask/")
15619 (synopsis "Parallel computing with task scheduling")
15620 (description
15621 "Dask is a flexible parallel computing library for analytics. It
15622 consists of two components: dynamic task scheduling optimized for computation,
15623 and large data collections like parallel arrays, dataframes, and lists that
15624 extend common interfaces like NumPy, Pandas, or Python iterators to
15625 larger-than-memory or distributed environments. These parallel collections
15626 run on top of the dynamic task schedulers. ")
15627 (license license:bsd-3)))
15628
15629 (define-public python2-dask
15630 (package-with-python2 python-dask))
15631
15632 (define-public python-ilinkedlist
15633 (package
15634 (name "python-ilinkedlist")
15635 (version "0.4.0")
15636 (source
15637 (origin
15638 (method url-fetch)
15639 (uri (pypi-uri "ilinkedlist" version))
15640 (sha256
15641 (base32
15642 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15643 (build-system python-build-system)
15644 (native-inputs `(("python-pytest" ,python-pytest)))
15645 (inputs `(("python" ,python)))
15646 (home-page "https://github.com/luther9/ilinkedlist-py")
15647 (synopsis "Immutable linked list library")
15648 (description
15649 "This is a implementation of immutable linked lists for Python. It
15650 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15651 Since a linked list is treated as immutable, it is hashable, and its length
15652 can be retrieved in constant time. Some of the terminology is inspired by
15653 LISP. It is possible to create an improper list by creating a @code{Pair}
15654 with a non-list @code{cdr}.")
15655 (license license:gpl3+)))
15656
15657 (define-public python-readlike
15658 (package
15659 (name "python-readlike")
15660 (version "0.1.3")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "readlike" version))
15665 (sha256
15666 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15667 (build-system python-build-system)
15668 (home-page "https://github.com/jangler/readlike")
15669 (synopsis "GNU Readline-like line editing module")
15670 (description
15671 "This Python module provides line editing functions similar to the default
15672 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15673 @code{readline} package, this one allows access to those capabilties in settings
15674 outside of a standard command-line interface. It is especially well-suited to
15675 interfacing with Urwid, due to a shared syntax for describing key inputs.
15676
15677 Currently, all stateless Readline commands are implemented. Yanking and history
15678 are not supported.")
15679 (license license:expat)))
15680
15681 (define-public python2-readlike
15682 (package-with-python2 python-readlike))
15683
15684 (define-public python-reparser
15685 (package
15686 (name "python-reparser")
15687 (version "1.4.3")
15688 (source
15689 (origin
15690 (method url-fetch)
15691 (uri (pypi-uri "ReParser" version))
15692 (sha256
15693 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15694 (build-system python-build-system)
15695 (home-page "https://github.com/xmikos/reparser")
15696 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15697 (description
15698 "This Python library provides a simple lexer/parser for inline markup based
15699 on regular expressions.")
15700 (license license:expat)))
15701
15702 (define-public python2-reparser
15703 (let ((reparser (package-with-python2
15704 (strip-python2-variant python-reparser))))
15705 (package (inherit reparser)
15706 (propagated-inputs
15707 `(("python2-enum34" ,python2-enum34)
15708 ,@(package-propagated-inputs reparser))))))
15709
15710 (define-public python-precis-i18n
15711 (package
15712 (name "python-precis-i18n")
15713 (version "1.0.0")
15714 (source
15715 (origin
15716 (method url-fetch)
15717 (uri (pypi-uri "precis_i18n" version))
15718 (sha256
15719 (base32
15720 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15721 (build-system python-build-system)
15722 (home-page "https://github.com/byllyfish/precis_i18n")
15723 (synopsis "Implementation of the PRECIS framework")
15724 (description
15725 "This module implements the PRECIS Framework as described in RFC 8264,
15726 RFC 8265 and RFC 8266.")
15727 (license license:expat)))
15728
15729 (define-public python-absl-py
15730 (package
15731 (name "python-absl-py")
15732 (version "0.6.1")
15733 (source
15734 (origin
15735 (method url-fetch)
15736 (uri (pypi-uri "absl-py" version))
15737 (sha256
15738 (base32
15739 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15740 (build-system python-build-system)
15741 (propagated-inputs
15742 `(("python-six" ,python-six)))
15743 (home-page "https://github.com/abseil/abseil-py")
15744 (synopsis "Abseil Python common libraries")
15745 (description
15746 "This package provides the Abseil Python Common Libraries, a collection
15747 of Python libraries for building Python applications.")
15748 (license license:asl2.0)))
15749
15750 (define-public python-astor
15751 (package
15752 (name "python-astor")
15753 (version "0.7.1")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "astor" version))
15758 (sha256
15759 (base32
15760 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15761 (build-system python-build-system)
15762 ;; FIXME: There are two errors and two test failures.
15763 (arguments `(#:tests? #f))
15764 (home-page "https://github.com/berkerpeksag/astor")
15765 (synopsis "Read and write Python ASTs")
15766 (description "Astor is designed to allow easy manipulation of Python
15767 source via the Abstract Syntax Tree.")
15768 (license license:bsd-3)))
15769
15770 (define-public python2-astor
15771 (package-with-python2 python-astor))
15772
15773 (define-public python-grpcio
15774 (package
15775 (name "python-grpcio")
15776 (version "1.17.1")
15777 (source
15778 (origin
15779 (method url-fetch)
15780 (uri (pypi-uri "grpcio" version))
15781 (sha256
15782 (base32
15783 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15784 (build-system python-build-system)
15785 (propagated-inputs
15786 `(("python-six" ,python-six)))
15787 (home-page "https://grpc.io")
15788 (synopsis "HTTP/2-based RPC framework")
15789 (description "This package provides a Python library for communicating
15790 with the HTTP/2-based RPC framework gRPC.")
15791 (license license:asl2.0)))
15792
15793 (define-public python-astunparse
15794 (package
15795 (name "python-astunparse")
15796 (version "1.6.2")
15797 (source
15798 (origin
15799 (method url-fetch)
15800 (uri (pypi-uri "astunparse" version))
15801 (sha256
15802 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15803 (build-system python-build-system)
15804 (arguments '(#:tests? #f)) ; there are none
15805 (propagated-inputs
15806 `(("python-six" ,python-six)
15807 ("python-wheel" ,python-wheel)))
15808 (home-page "https://github.com/simonpercivall/astunparse")
15809 (synopsis "AST unparser for Python")
15810 (description "This package provides an AST unparser for Python. It is a
15811 factored out version of @code{unparse} found in the Python source
15812 distribution.")
15813 (license license:bsd-3)))
15814
15815 (define-public python-gast
15816 (package
15817 (name "python-gast")
15818 (version "0.2.2")
15819 (source
15820 (origin
15821 (method url-fetch)
15822 (uri (pypi-uri "gast" version))
15823 (sha256
15824 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15825 (build-system python-build-system)
15826 (propagated-inputs
15827 `(("python-astunparse" ,python-astunparse)))
15828 (home-page "https://pypi.org/project/gast/")
15829 (synopsis "Generic Python AST that abstracts the underlying Python version")
15830 (description
15831 "GAST provides a compatibility layer between the AST of various Python
15832 versions, as produced by @code{ast.parse} from the standard @code{ast}
15833 module.")
15834 (license license:bsd-3)))
15835
15836 (define-public python-wikidata
15837 (package
15838 (name "python-wikidata")
15839 (version "0.6.1")
15840 (source
15841 (origin
15842 (method url-fetch)
15843 (uri (pypi-uri "Wikidata" version))
15844 (sha256
15845 (base32
15846 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15847 (build-system python-build-system)
15848 (propagated-inputs
15849 `(("python-babel" ,python-babel)))
15850 (home-page "https://github.com/dahlia/wikidata")
15851 (synopsis "Wikidata client library")
15852 (description
15853 "This package provides a Python interface to
15854 @url{https://www.wikidata.org/, Wikidata}.")
15855 (properties '((upstream-name . "Wikidata")))
15856 (license license:gpl3+)))
15857
15858 (define-public python-doctest-ignore-unicode
15859 (package
15860 (name "python-doctest-ignore-unicode")
15861 (version "0.1.2")
15862 (source
15863 (origin
15864 (method url-fetch)
15865 (uri (pypi-uri "doctest-ignore-unicode" version))
15866 (sha256
15867 (base32
15868 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15869 (build-system python-build-system)
15870 (native-inputs
15871 `(("python-nose" ,python-nose)))
15872 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15873 (synopsis "Ignore Unicode literal prefixes in doctests")
15874 (description
15875 "This package adds support for a flag to ignore Unicode literal prefixes
15876 in doctests.")
15877 (license license:asl2.0)))
15878
15879 (define-public python-attr
15880 (package
15881 (name "python-attr")
15882 (version "0.3.1")
15883 (source
15884 (origin
15885 (method url-fetch)
15886 (uri (pypi-uri "attr" version))
15887 (sha256
15888 (base32
15889 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15890 (build-system python-build-system)
15891 (home-page "https://github.com/denis-ryzhkov/attr")
15892 (synopsis "Decorator for attributes of target function or class")
15893 (description "Simple decorator to set attributes of target function or
15894 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15895 (license license:expat)))
15896
15897 (define-public python-construct
15898 (package
15899 (name "python-construct")
15900 (version "2.9.45")
15901 (source
15902 (origin
15903 (method url-fetch)
15904 (uri (pypi-uri "construct" version))
15905 (sha256
15906 (base32
15907 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15908 (build-system python-build-system)
15909 (arguments
15910 `(#:tests? #f)) ; No tests exist.
15911 (propagated-inputs
15912 `(("python-extras" ,python-extras)
15913 ("python-arrow" ,python-arrow)
15914 ("python-numpy" ,python-numpy)
15915 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15916 (home-page "http://construct.readthedocs.io")
15917 (synopsis "Declarative and symmetrical parser and builder for binary data")
15918 (description
15919 "This package provides both simple, atomic constructs (such as
15920 integers of various sizes), as well as composite ones which allow you
15921 form hierarchical and sequential structures of increasing complexity.
15922 It features bit and byte granularity, easy debugging and testing, an
15923 easy-to-extend subclass system, and lots of primitive constructs to
15924 make your work easier.")
15925 (license license:expat)))
15926
15927 (define-public python-humanize
15928 (package
15929 (name "python-humanize")
15930 (version "0.5.1")
15931 (source
15932 (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "humanize" version))
15935 (sha256
15936 (base32
15937 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15938 (arguments
15939 '(#:tests? #f)) ; tests not in pypi archive
15940 (build-system python-build-system)
15941 (home-page "https://github.com/jmoiron/humanize")
15942 (synopsis "Print numerical information in a human-readable form")
15943 (description "This package provides a Python module that displays numbers
15944 and dates in \"human readable\" forms. For example, it would display
15945 \"12345591313\" as \"12.3 billion\".")
15946 (license license:expat)))
15947
15948 (define-public python-txaio
15949 (package
15950 (name "python-txaio")
15951 (version "18.8.1")
15952 (source
15953 (origin
15954 (method url-fetch)
15955 (uri (pypi-uri "txaio" version))
15956 (sha256
15957 (base32
15958 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15959 (build-system python-build-system)
15960 (propagated-inputs
15961 `(("python-twisted" ,python-twisted)
15962 ("python-six" ,python-six)))
15963 (home-page "https://github.com/crossbario/txaio")
15964 (synopsis "Compatibility layer between Python asyncio and Twisted")
15965 (description "Txaio provides a compatibility layer between the Python
15966 @code{asyncio} module and @code{Twisted}.")
15967 (license license:expat)))
15968
15969 (define-public python-toolshed
15970 (package
15971 (name "python-toolshed")
15972 (version "0.4.6")
15973 (source
15974 (origin
15975 (method url-fetch)
15976 (uri (pypi-uri "toolshed" version))
15977 (sha256
15978 (base32
15979 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15980 (build-system python-build-system)
15981 (native-inputs
15982 `(("python-nose" ,python-nose)))
15983 (home-page "https://github.com/brentp/toolshed/")
15984 (synopsis "Collection of modules and functions for working with data")
15985 (description "This is a collection of well-tested, simple modules and
15986 functions that aim to reduce boilerplate when working with data.")
15987 (license license:bsd-2)))
15988
15989 (define-public python-annoy
15990 (package
15991 (name "python-annoy")
15992 (version "1.15.1")
15993 (source
15994 (origin
15995 (method url-fetch)
15996 (uri (pypi-uri "annoy" version))
15997 (sha256
15998 (base32
15999 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16000 (build-system python-build-system)
16001 (native-inputs
16002 `(("python-nose" ,python-nose)))
16003 (home-page "https://github.com/spotify/annoy/")
16004 (synopsis "Approximate nearest neighbors library")
16005 (description
16006 "Annoy is a C++ library with Python bindings to search for points in
16007 space that are close to a given query point. It also creates large read-only
16008 file-based data structures that are @code{mmap}ped into memory so that many
16009 processes may share the same data.")
16010 (license license:asl2.0)))
16011
16012 (define-public python-pylzma
16013 (package
16014 (name "python-pylzma")
16015 (version "0.5.0")
16016 (source
16017 (origin
16018 (method url-fetch)
16019 (uri (pypi-uri "pylzma" version))
16020 (sha256
16021 (base32
16022 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16023 (build-system python-build-system)
16024 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16025 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16026 (description "This package provides Python bindings for the LZMA library
16027 by Igor Pavlov.")
16028 (license license:lgpl2.1+)))
16029
16030 (define-public python2-pylzma
16031 (package-with-python2 python-pylzma))
16032
16033 (define-public python2-zeroconf
16034 (package
16035 (name "python2-zeroconf")
16036
16037 ;; This is the last version that supports Python 2.x.
16038 (version "0.19.1")
16039 (source
16040 (origin
16041 (method url-fetch)
16042 (uri (pypi-uri "zeroconf" version))
16043 (sha256
16044 (base32
16045 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16046 (build-system python-build-system)
16047 (arguments
16048 `(#:python ,python-2
16049 #:phases
16050 (modify-phases %standard-phases
16051 (add-after 'unpack 'patch-requires
16052 (lambda* (#:key inputs #:allow-other-keys)
16053 (substitute* "setup.py"
16054 (("enum-compat")
16055 "enum34"))
16056 #t)))))
16057 (native-inputs
16058 `(("python2-six" ,python2-six)
16059 ("python2-enum32" ,python2-enum34)
16060 ("python2-netifaces" ,python2-netifaces)
16061 ("python2-typing" ,python2-typing)))
16062 (home-page "https://github.com/jstasiak/python-zeroconf")
16063 (synopsis "Pure Python mDNS service discovery")
16064 (description
16065 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16066 compatible).")
16067 (license license:lgpl2.1+)))
16068
16069 (define-public python-bsddb3
16070 (package
16071 (name "python-bsddb3")
16072 (version "6.2.6")
16073 (source
16074 (origin
16075 (method url-fetch)
16076 (uri (pypi-uri "bsddb3" version))
16077 (sha256
16078 (base32
16079 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16080 (build-system python-build-system)
16081 (inputs
16082 `(("bdb" ,bdb)))
16083 (arguments
16084 '(#:phases
16085 (modify-phases %standard-phases
16086 (add-after 'unpack 'configure-locations
16087 (lambda* (#:key inputs #:allow-other-keys)
16088 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16089 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16090 #t))
16091 (replace 'check
16092 (lambda _
16093 (invoke "python3" "test3.py" "-v"))))))
16094 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16095 (synopsis "Python bindings for Oracle Berkeley DB")
16096 (description
16097 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16098 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16099 Transaction objects, and each of these is exposed as a Python type in the
16100 bsddb3.db module. The database objects can use various access methods: btree,
16101 hash, recno, and queue. Complete support of Berkeley DB distributed
16102 transactions. Complete support for Berkeley DB Replication Manager.
16103 Complete support for Berkeley DB Base Replication. Support for RPC.")
16104 (license license:bsd-3)))
16105
16106 (define-public python-dbfread
16107 (package
16108 (name "python-dbfread")
16109 (version "2.0.7")
16110 (source (origin
16111 (method url-fetch)
16112 (uri (pypi-uri "dbfread" version))
16113 (sha256
16114 (base32
16115 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16116 (build-system python-build-system)
16117 (native-inputs
16118 `(("python-pytest" ,python-pytest)))
16119 (home-page "https://dbfread.readthedocs.io")
16120 (synopsis "Read DBF Files with Python")
16121 (description
16122 "This library reads DBF files and returns the data as native Python data
16123 types for further processing. It is primarily intended for batch jobs and
16124 one-off scripts.")
16125 (license license:expat)))
16126
16127 (define-public python-cached-property
16128 (package
16129 (name "python-cached-property")
16130 (version "1.5.1")
16131 (source
16132 (origin
16133 (method url-fetch)
16134 (uri (pypi-uri "cached-property" version))
16135 (sha256
16136 (base32
16137 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16138 (build-system python-build-system)
16139 (arguments
16140 `(#:phases
16141 (modify-phases %standard-phases
16142 ;; https://github.com/pydanny/cached-property/issues/131
16143 ;; recent versions of freezegun break one test
16144 (add-after 'unpack 'disable-broken-test
16145 (lambda _
16146 (substitute* "tests/test_cached_property.py"
16147 (("def test_threads_ttl_expiry\\(self\\)" m)
16148 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16149 " " m)))
16150 #t)))))
16151 (native-inputs
16152 `(("python-freezegun" ,python-freezegun)))
16153 (home-page
16154 "https://github.com/pydanny/cached-property")
16155 (synopsis
16156 "Decorator for caching properties in classes")
16157 (description
16158 "This package provides a decorator which makes caching
16159 time-or-computationally-expensive properties quick and easy and works in Python
16160 2 or 3.")
16161 (license license:bsd-3)))
16162
16163 (define-public python-folium
16164 (package
16165 (name "python-folium")
16166 (version "0.10.0")
16167 (source
16168 (origin
16169 (method url-fetch)
16170 (uri (pypi-uri "folium" version))
16171 (sha256
16172 (base32
16173 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16174 (build-system python-build-system)
16175 (propagated-inputs
16176 `(("python-branca" ,python-branca)
16177 ("python-jinja2" ,python-jinja2)
16178 ("python-numpy" ,python-numpy)
16179 ("python-requests" ,python-requests)))
16180 (native-inputs
16181 `(("python-pytest" ,python-pytest)))
16182 (home-page "https://github.com/python-visualization/folium")
16183 (synopsis "Make beautiful maps with Leaflet.js & Python")
16184 (description "@code{folium} makes it easy to visualize data that’s been
16185 manipulated in Python on an interactive leaflet map. It enables both the
16186 binding of data to a map for @code{choropleth} visualizations as well as
16187 passing rich vector/raster/HTML visualizations as markers on the map.
16188
16189 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16190 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16191 supports Image, Video, GeoJSON and TopoJSON overlays.")
16192 (license license:expat)))
16193
16194 (define-public jube
16195 (package
16196 ;; This is a command-line tool, so no "python-" prefix.
16197 (name "jube")
16198 (version "2.2.2")
16199 (source (origin
16200 (method url-fetch)
16201 (uri (string-append
16202 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16203 version))
16204 (sha256
16205 (base32
16206 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16207 (file-name (string-append "jube-" version ".tar.gz"))))
16208 (build-system python-build-system)
16209 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16210 (synopsis "Benchmarking environment")
16211 (description
16212 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16213 benchmarked application, benchmark data is stored in a format that allows JUBE
16214 to deduct the desired information. This data can be parsed by automatic pre-
16215 and post-processing scripts that draw information and store it more densely
16216 for manual interpretation.")
16217 (license license:gpl3+)))
16218
16219 (define-public python-pyroutelib3
16220 (package
16221 (name "python-pyroutelib3")
16222 (version "1.3.post1")
16223 (source
16224 (origin
16225 (method url-fetch)
16226 (uri (pypi-uri "pyroutelib3" version))
16227 (sha256
16228 (base32
16229 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16230 (build-system python-build-system)
16231 (propagated-inputs
16232 `(("python-dateutil" ,python-dateutil)))
16233 (home-page "https://github.com/MKuranowski/pyroutelib3")
16234 (synopsis "Library for simple routing on OSM data")
16235 (description "Library for simple routing on OSM data")
16236 (license license:gpl3+)))
16237
16238 (define-public python-elementpath
16239 (package
16240 (name "python-elementpath")
16241 (version "1.2.0")
16242 (source
16243 (origin
16244 (method url-fetch)
16245 (uri (pypi-uri "elementpath" version))
16246 (sha256
16247 (base32
16248 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16249 (build-system python-build-system)
16250 (home-page
16251 "https://github.com/sissaschool/elementpath")
16252 (synopsis
16253 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16254 (description
16255 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16256 for Python's ElementTree XML data structures, both for the standard
16257 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16258
16259 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16260 because lxml.etree already has it's own implementation of XPath 1.0.")
16261 (license license:expat)))