Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;;
67 ;;; This file is part of GNU Guix.
68 ;;;
69 ;;; GNU Guix is free software; you can redistribute it and/or modify it
70 ;;; under the terms of the GNU General Public License as published by
71 ;;; the Free Software Foundation; either version 3 of the License, or (at
72 ;;; your option) any later version.
73 ;;;
74 ;;; GNU Guix is distributed in the hope that it will be useful, but
75 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
76 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77 ;;; GNU General Public License for more details.
78 ;;;
79 ;;; You should have received a copy of the GNU General Public License
80 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
81
82 (define-module (gnu packages python-xyz)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (gnu packages)
85 #:use-module (gnu packages algebra)
86 #:use-module (gnu packages adns)
87 #:use-module (gnu packages attr)
88 #:use-module (gnu packages backup)
89 #:use-module (gnu packages bash)
90 #:use-module (gnu packages check)
91 #:use-module (gnu packages compression)
92 #:use-module (gnu packages crypto)
93 #:use-module (gnu packages databases)
94 #:use-module (gnu packages dbm)
95 #:use-module (gnu packages file)
96 #:use-module (gnu packages fontutils)
97 #:use-module (gnu packages gcc)
98 #:use-module (gnu packages geo)
99 #:use-module (gnu packages ghostscript)
100 #:use-module (gnu packages gl)
101 #:use-module (gnu packages glib)
102 #:use-module (gnu packages graphviz)
103 #:use-module (gnu packages graphics)
104 #:use-module (gnu packages gstreamer)
105 #:use-module (gnu packages gtk)
106 #:use-module (gnu packages icu4c)
107 #:use-module (gnu packages image)
108 #:use-module (gnu packages imagemagick)
109 #:use-module (gnu packages libevent)
110 #:use-module (gnu packages libffi)
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages llvm)
113 #:use-module (gnu packages man)
114 #:use-module (gnu packages maths)
115 #:use-module (gnu packages monitoring)
116 #:use-module (gnu packages multiprecision)
117 #:use-module (gnu packages networking)
118 #:use-module (gnu packages ncurses)
119 #:use-module (gnu packages openstack)
120 #:use-module (gnu packages pcre)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages pkg-config)
123 #:use-module (gnu packages python)
124 #:use-module (gnu packages python-check)
125 #:use-module (gnu packages python-compression)
126 #:use-module (gnu packages python-crypto)
127 #:use-module (gnu packages python-web)
128 #:use-module (gnu packages qt)
129 #:use-module (gnu packages readline)
130 #:use-module (gnu packages sdl)
131 #:use-module (gnu packages search)
132 #:use-module (gnu packages shells)
133 #:use-module (gnu packages sphinx)
134 #:use-module (gnu packages ssh)
135 #:use-module (gnu packages terminals)
136 #:use-module (gnu packages tex)
137 #:use-module (gnu packages texinfo)
138 #:use-module (gnu packages time)
139 #:use-module (gnu packages tls)
140 #:use-module (gnu packages version-control)
141 #:use-module (gnu packages video)
142 #:use-module (gnu packages web)
143 #:use-module (gnu packages base)
144 #:use-module (gnu packages xml)
145 #:use-module (gnu packages xorg)
146 #:use-module (gnu packages xdisorg)
147 #:use-module (gnu packages tcl)
148 #:use-module (gnu packages bdw-gc)
149 #:use-module (gnu packages serialization)
150 #:use-module (guix packages)
151 #:use-module (guix download)
152 #:use-module (guix git-download)
153 #:use-module (guix hg-download)
154 #:use-module (guix utils)
155 #:use-module (guix build-system gnu)
156 #:use-module (guix build-system cmake)
157 #:use-module (guix build-system python)
158 #:use-module (guix build-system trivial)
159 #:use-module (srfi srfi-1)
160 #:use-module (srfi srfi-26))
161
162 (define-public python-psutil
163 (package
164 (name "python-psutil")
165 (version "5.6.2")
166 (source
167 (origin
168 (method url-fetch)
169 (uri (pypi-uri "psutil" version))
170 (sha256
171 (base32
172 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
173 (build-system python-build-system)
174 (arguments
175 ;; FIXME: some tests does not return and times out.
176 '(#:tests? #f))
177 (home-page "https://www.github.com/giampaolo/psutil")
178 (synopsis "Library for retrieving information on running processes")
179 (description
180 "psutil (Python system and process utilities) is a library for retrieving
181 information on running processes and system utilization (CPU, memory, disks,
182 network) in Python. It is useful mainly for system monitoring, profiling and
183 limiting process resources and management of running processes. It implements
184 many functionalities offered by command line tools such as: ps, top, lsof,
185 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
186 pidof, tty, taskset, pmap.")
187 (properties `((python2-variant . ,(delay python2-psutil))))
188 (license license:bsd-3)))
189
190 (define-public python2-psutil
191 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
192 (package
193 (inherit base)
194 (propagated-inputs
195 `(("python2-enum34" ,python2-enum34) ;optional
196 ,@(package-propagated-inputs base))))))
197
198 (define-public python-shapely
199 (package
200 (name "python-shapely")
201 (version "1.6.4.post2")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (pypi-uri "Shapely" version))
206 (sha256
207 (base32
208 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
209 (build-system python-build-system)
210 (native-inputs
211 `(("python-cython" ,python-cython)
212 ("python-matplotlib" ,python-matplotlib)
213 ("python-pytest" ,python-pytest)
214 ("python-pytest-cov" ,python-pytest-cov)))
215 (inputs
216 `(("geos" ,geos)))
217 (propagated-inputs
218 `(("python-numpy" ,python-numpy)))
219 (arguments
220 `(#:phases
221 (modify-phases %standard-phases
222 (add-after 'unpack 'patch-geos-path
223 (lambda* (#:key inputs #:allow-other-keys)
224 (let ((geos (assoc-ref inputs "geos"))
225 (glibc (assoc-ref inputs ,(if (%current-target-system)
226 "cross-libc" "libc"))))
227 (substitute* "shapely/geos.py"
228 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
229 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
230 geos "/lib/libgeos_c.so'])"))
231 (("free = load_dll\\('c'\\)\\.free")
232 (string-append "free = load_dll('c', fallbacks=['"
233 glibc "/lib/libc.so.6']).free"))))
234 #t)))))
235 (home-page "https://github.com/Toblerity/Shapely")
236 (synopsis "Library for the manipulation and analysis of geometric objects")
237 (description "Shapely is a Python package for manipulation and analysis of
238 planar geometric objects. It is based on the @code{GEOS} library.")
239 (license license:bsd-3)))
240
241 (define-public python-shortuuid
242 (package
243 (name "python-shortuuid")
244 (version "0.5.0")
245 (source
246 (origin
247 (method url-fetch)
248 (uri (pypi-uri "shortuuid" version))
249 (sha256
250 (base32
251 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
252 (build-system python-build-system)
253 (native-inputs
254 `(("python-pep8" ,python-pep8)))
255 (home-page "https://github.com/skorokithakis/shortuuid")
256 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
257 (description
258 "@code{shortuuid} is a Python library for generating concise, unambiguous
259 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
260 module and then similar looking characters are removed.")
261 (license license:bsd-3)))
262
263 (define-public python-logwrap
264 (package
265 (name "python-logwrap")
266 (version "3.2.1")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (pypi-uri "logwrap" version ".zip"))
271 (sha256
272 (base32
273 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
274 (build-system python-build-system)
275 (propagated-inputs
276 `(("python-six" ,python-six)
277 ("python-typing" ,python-typing)))
278 (native-inputs
279 `(("unzip" ,unzip)
280 ("python-cython" ,python-cython)
281 ("python-pytest" ,python-pytest)
282 ("python-pytest-cov" ,python-pytest-cov)
283 ("python-pytest-runner" ,python-pytest-runner)))
284 (home-page "https://github.com/penguinolog/logwrap")
285 (synopsis "Decorator for logging function arguments")
286 (description "This package provides a decorator to log function arguments
287 and function call return values in a human-readable way.")
288 (license license:asl2.0)))
289
290 (define-public python2-shapely
291 (package-with-python2 python-shapely))
292
293 (define-public python-clyent
294 (package
295 (name "python-clyent")
296 (version "1.2.1")
297 (source
298 (origin
299 (method url-fetch)
300 (uri (pypi-uri "clyent" version))
301 (sha256
302 (base32
303 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-mock" ,python-mock)))
307 (home-page "https://github.com/binstar/clyent")
308 (synopsis "Command line client library")
309 (description "Clyent is a Python command line utiliy library. It is used
310 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
311 (license license:bsd-3)))
312
313 (define-public python2-clyent
314 (package-with-python2 python-clyent))
315
316 (define-public python-babel
317 (package
318 (name "python-babel")
319 (version "2.7.0")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (pypi-uri "Babel" version))
324 (sha256
325 (base32
326 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
327 (build-system python-build-system)
328 (native-inputs
329 `(("python-freezegun" ,python-freezegun)
330 ("python-pytest" ,python-pytest)))
331 (propagated-inputs
332 `(("python-pytz" ,python-pytz)))
333 (arguments
334 `(#:phases (modify-phases %standard-phases
335 (replace 'check
336 (lambda _
337 (invoke "pytest" "-vv" "-k"
338 (string-append
339 ;; XXX: These tests fail when using Pytest 4.x and
340 ;; Babel 2.6.0. Try removing this for later versions.
341 "not test_no_inherit_metazone_marker_never_in_output"
342 " and not test_smoke_dates"
343 " and not test_smoke_numbers")))))))
344 (home-page "http://babel.pocoo.org/")
345 (synopsis
346 "Tools for internationalizing Python applications")
347 (description
348 "Babel is composed of two major parts:
349 - tools to build and work with gettext message catalogs
350 - a Python interface to the CLDR (Common Locale Data Repository), providing
351 access to various locale display names, localized number and date formatting,
352 etc. ")
353 (license license:bsd-3)))
354
355 (define-public python2-babel
356 (package-with-python2 python-babel))
357
358 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
359 (define-public python2-babel-2.6
360 (package
361 (inherit python2-babel)
362 (version "2.6.0")
363 (source (origin
364 (method url-fetch)
365 (uri (pypi-uri "Babel" version))
366 (sha256
367 (base32
368 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
369
370 (define-public python2-backport-ssl-match-hostname
371 (package
372 (name "python2-backport-ssl-match-hostname")
373 (version "3.5.0.1")
374 (source
375 (origin
376 (method url-fetch)
377 (uri (pypi-uri "backports.ssl_match_hostname" version))
378 (sha256
379 (base32
380 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
381 (build-system python-build-system)
382 (arguments
383 `(#:python ,python-2
384 #:tests? #f)) ; no test target
385 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
386 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
387 (description
388 "This backport brings the ssl.match_hostname() function to users of
389 earlier versions of Python. The function checks the hostname in the
390 certificate returned by the server to which a connection has been established,
391 and verifies that it matches the intended target hostname.")
392 (license license:psfl)))
393
394 (define-public python-hdf4
395 (package
396 (name "python-hdf4")
397 (version "0.9")
398 (source
399 (origin
400 (method url-fetch)
401 (uri (pypi-uri name version))
402 (sha256
403 (base32
404 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
405 (build-system python-build-system)
406 (native-inputs `(("nose" ,python-nose)))
407 (propagated-inputs `(("numpy" ,python-numpy)))
408 (inputs
409 `(("hdf4" ,hdf4)
410 ("libjpeg" ,libjpeg)
411 ("zlib" ,zlib)))
412 (arguments
413 `(#:phases
414 (modify-phases %standard-phases
415 (replace 'check
416 (lambda _
417 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
418 ;; on to import numpy. Somehow this works on their CI system.
419 ;; Let's just manage PYTHONPATH here instead.
420 (substitute* "runexamples.sh"
421 (("export PYTHONPATH=.*") ""))
422 (setenv "PYTHONPATH"
423 (string-append (getcwd) ":"
424 (getenv "PYTHONPATH")))
425 (invoke "./runexamples.sh")
426 (invoke "nosetests" "-v"))))))
427 (home-page "https://github.com/fhs/python-hdf4")
428 (synopsis "Python interface to the NCSA HDF4 library")
429 (description
430 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
431 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
432 NetCDF files can also be read and modified. Python-HDF4 is a fork of
433 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
434 (license license:expat)))
435
436 (define-public python2-hdf4
437 (package-with-python2 python-hdf4))
438
439 (define-public python-h5py
440 (package
441 (name "python-h5py")
442 (version "2.8.0")
443 (source
444 (origin
445 (method url-fetch)
446 (uri (pypi-uri "h5py" version))
447 (sha256
448 (base32
449 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
450 (build-system python-build-system)
451 (arguments
452 `(#:tests? #f ; no test target
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'unpack 'fix-hdf5-paths
456 (lambda* (#:key inputs #:allow-other-keys)
457 (let ((prefix (assoc-ref inputs "hdf5")))
458 (substitute* "setup_build.py"
459 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']"))
461 (("'/opt/local/include', '/usr/local/include'")
462 (string-append "'" prefix "/include" "'")))
463 (substitute* "setup_configure.py"
464 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
465 (string-append "['" prefix "/lib" "']")))
466 #t))))))
467 (propagated-inputs
468 `(("python-six" ,python-six)
469 ("python-numpy" ,python-numpy)))
470 (inputs
471 `(("hdf5" ,hdf5)))
472 (native-inputs
473 `(("python-cython" ,python-cython)
474 ("python-pkgconfig" ,python-pkgconfig)))
475 (home-page "http://www.h5py.org/")
476 (synopsis "Read and write HDF5 files from Python")
477 (description
478 "The h5py package provides both a high- and low-level interface to the
479 HDF5 library from Python. The low-level interface is intended to be a
480 complete wrapping of the HDF5 API, while the high-level component supports
481 access to HDF5 files, datasets and groups using established Python and NumPy
482 concepts.")
483 (license license:bsd-3)))
484
485 (define-public python2-h5py
486 (package-with-python2 python-h5py))
487
488 (define-public python-sh
489 (package
490 (name "python-sh")
491 (version "1.12.14")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (pypi-uri "sh" version))
496 (sha256
497 (base32
498 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
499 (build-system python-build-system)
500 (arguments
501 '(#:phases
502 (modify-phases %standard-phases
503 (replace 'check
504 (lambda _
505 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
506 (setenv "HOME" "/tmp")
507 (invoke "python" "sh.py" "test"))))))
508 (native-inputs
509 `(("python-coverage" ,python-coverage)))
510 (home-page "https://github.com/amoffat/sh")
511 (synopsis "Python subprocess replacement")
512 (description "This package provides a replacement for Python's
513 @code{subprocess} feature.")
514 (license license:expat)))
515
516 (define-public python2-sh
517 (package-with-python2 python-sh))
518
519 (define-public python-cftime
520 (package
521 (name "python-cftime")
522 (version "1.0.3.4")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "cftime" version))
527 (sha256
528 (base32
529 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
530 (build-system python-build-system)
531 (propagated-inputs
532 `(("python-numpy" ,python-numpy)))
533 (native-inputs
534 `(("python-coveralls" ,python-coveralls)
535 ("python-cython" ,python-cython)
536 ("python-pytest-cov" ,python-pytest-cov)))
537 (home-page "https://github.com/Unidata/cftime")
538 (synopsis "Library for time handling")
539 (description
540 "This package provides time-handling functionality that used to be part
541 of the netcdf4 package before.")
542 ;; This package claims to include code under the GPLv3 but is released
543 ;; under ISC.
544 (license (list license:isc license:gpl3+))))
545
546 (define-public python-netcdf4
547 (package
548 (name "python-netcdf4")
549 (version "1.4.2")
550 (source
551 (origin
552 (method url-fetch)
553 (uri (pypi-uri "netCDF4" version))
554 (sha256
555 (base32
556 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
557 (build-system python-build-system)
558 (arguments
559 '(#:phases
560 (modify-phases %standard-phases
561 (add-after 'unpack 'configure-locations
562 (lambda* (#:key inputs #:allow-other-keys)
563 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
564 #t)))))
565 (native-inputs
566 `(("python-cython" ,python-cython)))
567 (propagated-inputs
568 `(("python-numpy" ,python-numpy)
569 ("python-cftime" ,python-cftime)))
570 (inputs
571 `(("netcdf" ,netcdf)
572 ("hdf4" ,hdf4)
573 ("hdf5" ,hdf5)))
574 (home-page "https://github.com/Unidata/netcdf4-python")
575 (synopsis "Python/numpy interface to the netCDF library")
576 (description "Netcdf4-python is a Python interface to the netCDF C
577 library. netCDF version 4 has many features not found in earlier
578 versions of the library and is implemented on top of HDF5. This module
579 can read and write files in both the new netCDF 4 and the old netCDF 3
580 format, and can create files that are readable by HDF5 clients. The
581 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
582 to users of that module.")
583 ;; The software is mainly ISC, but includes some files covered
584 ;; by the Expat license.
585 (license (list license:isc license:expat))))
586
587 (define-public python2-netcdf4
588 (package-with-python2 python-netcdf4))
589
590 (define-public python-lockfile
591 (package
592 (name "python-lockfile")
593 (version "0.12.2")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (pypi-uri "lockfile" version))
598 (sha256
599 (base32
600 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
601 (build-system python-build-system)
602 (arguments '(#:test-target "check"))
603 (native-inputs
604 `(("python-pbr" ,python-pbr)))
605 (home-page "https://launchpad.net/pylockfile")
606 (synopsis "Platform-independent file locking module")
607 (description
608 "The lockfile package exports a LockFile class which provides a simple
609 API for locking files.")
610 (license license:expat)))
611
612 (define-public python2-lockfile
613 (package-with-python2 python-lockfile))
614
615 (define-public python-semantic-version
616 (package
617 (name "python-semantic-version")
618 (version "2.6.0")
619 (source
620 (origin
621 (method url-fetch)
622 (uri (pypi-uri "semantic_version" version))
623 (sha256
624 (base32
625 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
626 (build-system python-build-system)
627 (arguments
628 `(#:tests? #f)) ; PyPI tarball lacks tests
629 (home-page "https://github.com/rbarrois/python-semanticversion")
630 (synopsis "Semantic versioning module for Python")
631 (description
632 "The @code{semantic_version} class is a small library for handling
633 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
634
635 It can compare versions, generate a new version that represents a bump in one of
636 the version levels, and check whether any given string is a proper semantic
637 version identifier.")
638 (license license:bsd-3)))
639
640 (define-public python2-semantic-version
641 (package-with-python2 python-semantic-version))
642
643 (define-public python-serpent
644 (package
645 (name "python-serpent")
646 (version "1.28")
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "serpent" version))
651 (sha256
652 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
653 (build-system python-build-system)
654 (native-inputs
655 `(("python-attrs" ,python-attrs)
656 ("python-pytz" ,python-pytz)))
657 (home-page "https://github.com/irmen/Serpent")
658 (synopsis "Serializer for literal Python expressions")
659 (description
660 "Serpent provides @code{ast.literal_eval()}-compatible object tree
661 serialization. It serializes an object tree into bytes (an utf-8 encoded
662 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
663 to rebuild the original object tree.
664
665 Because only safe literals are encoded, it is safe to send serpent data to
666 other machines, such as over the network.")
667 (license license:expat)))
668
669 (define-public python-setuptools
670 (package
671 (name "python-setuptools")
672 (version "41.0.1")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "setuptools" version ".zip"))
677 (sha256
678 (base32
679 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
680 (modules '((guix build utils)))
681 (snippet
682 '(begin
683 ;; Remove included binaries which are used to build self-extracting
684 ;; installers for Windows.
685 ;; TODO: Find some way to build them ourself so we can include them.
686 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
687 #t))))
688 (build-system python-build-system)
689 ;; FIXME: Tests require pytest, which itself relies on setuptools.
690 ;; One could bootstrap with an internal untested setuptools.
691 (arguments
692 `(#:tests? #f))
693 (home-page "https://pypi.python.org/pypi/setuptools")
694 (synopsis
695 "Library designed to facilitate packaging Python projects")
696 (description
697 "Setuptools is a fully-featured, stable library designed to facilitate
698 packaging Python projects, where packaging includes:
699 Python package and module definitions,
700 distribution package metadata,
701 test hooks,
702 project installation,
703 platform-specific details,
704 Python 3 support.")
705 ;; TODO: setuptools now bundles the following libraries:
706 ;; packaging, pyparsing, six and appdirs. How to unbundle?
707 (license (list license:psfl ; setuptools itself
708 license:expat ; six, appdirs, pyparsing
709 license:asl2.0 ; packaging is dual ASL2/BSD-2
710 license:bsd-2))))
711
712 (define-public python2-setuptools
713 (package-with-python2 python-setuptools))
714
715 (define-public python-uniseg
716 (package
717 (name "python-uniseg")
718 (version "0.7.1")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (pypi-uri "uniseg" version ".zip"))
723 (sha256
724 (base32
725 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
726 (build-system python-build-system)
727 (arguments
728 '(#:tests? #f)) ; The test suite requires network access.
729 (native-inputs
730 `(("unzip" ,unzip)))
731 (home-page
732 "https://bitbucket.org/emptypage/uniseg-python")
733 (synopsis
734 "Python library to determine Unicode text segmentations")
735 (description
736 "Uniseg is a Python package used to determine Unicode text segmentations.
737 Supported segmentations include:
738 @enumerate
739 @item @dfn{Code point} (any value in the Unicode codespace)
740 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
741 multiple Unicode code points, e.g. \"G\" + acute-accent)
742 @item Word break
743 @item Sentence break
744 @item Line break
745 @end enumerate")
746 (license license:expat)))
747
748 (define-public python2-uniseg
749 (package-with-python2 python-uniseg))
750
751 (define-public python-humanfriendly
752 (package
753 (name "python-humanfriendly")
754 (version "4.4.1")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (pypi-uri "humanfriendly" version))
759 (sha256
760 (base32
761 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
762 (build-system python-build-system)
763 (arguments
764 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
765 #:tests? #f))
766 (propagated-inputs
767 `(("python-monotonic" ,python-monotonic)))
768 (home-page "https://humanfriendly.readthedocs.io")
769 (synopsis "Human-friendly input and output in Python")
770 (description
771 "The functions and classes in @code{humanfriendly} can be used to make
772 text interfaces more user-friendly. It includes tools to parse and format
773 numbers, file sizes, and timespans, timers for long-running operations, menus
774 to allow the user to choose from a list of options, and terminal interaction
775 helpers.")
776 (license license:expat)))
777
778 (define-public python2-humanfriendly
779 (package-with-python2 python-humanfriendly))
780
781 (define-public python-capturer
782 (package
783 (name "python-capturer")
784 (version "2.4")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "capturer" version))
789 (sha256
790 (base32
791 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
792 (build-system python-build-system)
793 (arguments
794 `(#:tests? #f))
795 (propagated-inputs
796 `(("python-humanfriendly" ,python-humanfriendly)))
797 (home-page "https://capturer.readthedocs.io")
798 (synopsis "Capture stdout and stderr streams of the current process")
799 (description
800 "The capturer package makes it easy to capture the stdout and stderr
801 streams of the current process and subprocesses. Output can be relayed
802 to the terminal in real time but is also available to the Python program
803 for additional processing.")
804 (license license:expat)))
805
806 (define-public python2-capturer
807 (package-with-python2 python-capturer))
808
809 (define-public python-case
810 (package
811 (name "python-case")
812 (version "1.5.3")
813 (source
814 (origin
815 (method url-fetch)
816 (uri (pypi-uri "case" version))
817 (sha256
818 (base32
819 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
820 (build-system python-build-system)
821 (propagated-inputs
822 `(("python-mock" ,python-mock)
823 ("python-nose" ,python-nose)
824 ("python-six" ,python-six)
825 ("python-unittest2" ,python-unittest2)))
826 (native-inputs
827 `(("python-coverage" ,python-coverage)))
828 (home-page "https://github.com/celery/case")
829 (synopsis "Unittest utilities and convenience methods")
830 (description
831 "The @code{case} package provides utilities on top of unittest, including
832 some helpful Python 2 compatibility convenience methods.")
833 (license license:bsd-3)))
834
835 (define-public python-verboselogs
836 (package
837 (name "python-verboselogs")
838 (version "1.7")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "verboselogs" version))
843 (sha256
844 (base32
845 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
846 (build-system python-build-system)
847 (native-inputs
848 `(("python-mock" ,python-mock)
849 ("python-astroid" ,python-astroid)
850 ("python-pylint" ,python-pylint)))
851 (home-page "https://verboselogs.readthedocs.io")
852 (synopsis "Verbose logging level for Python's logging module")
853 (description
854 "The @code{verboselogs} package extends Python's @code{logging} module to
855 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
856 (license license:expat)))
857
858 (define-public python2-verboselogs
859 (package-with-python2 python-verboselogs))
860
861 (define-public python-coloredlogs
862 (package
863 (name "python-coloredlogs")
864 (version "7.3")
865 (source
866 (origin
867 (method url-fetch)
868 (uri (pypi-uri "coloredlogs" version))
869 (sha256
870 (base32
871 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
872 (build-system python-build-system)
873 (arguments
874 `(;Tests require some updated modules
875 #:tests? #f))
876 (propagated-inputs
877 `(("python-capturer" ,python-capturer)))
878 (home-page "https://coloredlogs.readthedocs.io")
879 (synopsis "Colored stream handler for Python's logging module")
880 (description
881 "The @code{coloredlogs} package enables colored terminal output for
882 Python's logging module. The @code{ColoredFormatter} class inherits from
883 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
884 messages in color.")
885 (license license:expat)))
886
887 (define-public python2-coloredlogs
888 (package-with-python2 python-coloredlogs))
889
890 (define-public python-et-xmlfile
891 (package
892 (name "python-et-xmlfile")
893 (version "1.0.1")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (pypi-uri "et_xmlfile" version))
898 (sha256
899 (base32
900 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
901 (build-system python-build-system)
902 (arguments
903 `(#:phases (modify-phases %standard-phases
904 (replace 'check
905 (lambda _
906 (invoke "pytest"))))))
907 (native-inputs
908 `(("python-pytest" ,python-pytest)
909 ("python-lxml" ,python-lxml))) ;used for the tests
910 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
911 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
912 (description "This Python library is based upon the @code{xmlfile} module
913 from @code{lxml}. It aims to provide a low memory, compatible implementation
914 of @code{xmlfile}.")
915 (license license:expat)))
916
917 (define-public python2-et-xmlfile
918 (package-with-python2 python-et-xmlfile))
919
920 (define-public python-openpyxl
921 (package
922 (name "python-openpyxl")
923 (version "2.6.2")
924 (source
925 (origin
926 ;; We use the upstream repository, as the tests are not included in the
927 ;; PyPI releases.
928 (method hg-fetch)
929 (uri (hg-reference
930 (url "https://bitbucket.org/openpyxl/openpyxl")
931 (changeset version)))
932 (file-name (string-append name "-" version "-checkout"))
933 (sha256
934 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
935 (build-system python-build-system)
936 (arguments
937 `(#:phases (modify-phases %standard-phases
938 (replace 'check
939 (lambda _
940 (invoke "pytest"))))))
941 (native-inputs
942 ;; For the test suite.
943 `(("python-lxml" ,python-lxml)
944 ("python-pillow" ,python-pillow)
945 ("python-pytest" ,python-pytest)))
946 (propagated-inputs
947 `(("python-et-xmlfile" ,python-et-xmlfile)
948 ("python-jdcal" ,python-jdcal)))
949 (home-page "https://openpyxl.readthedocs.io")
950 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
951 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
952 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
953 standard.")
954 (license license:expat)))
955
956 (define-public python-eventlet
957 (package
958 (name "python-eventlet")
959 (version "0.20.1")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "eventlet" version))
964 (sha256
965 (base32
966 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
967 (build-system python-build-system)
968 (propagated-inputs
969 `(("python-greenlet" ,python-greenlet)))
970 (arguments
971 ;; TODO: Requires unpackaged 'enum-compat'.
972 '(#:tests? #f))
973 (home-page "http://eventlet.net")
974 (synopsis "Concurrent networking library for Python")
975 (description
976 "Eventlet is a concurrent networking library for Python that
977 allows you to change how you run your code, not how you write it.
978 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
979 Coroutines ensure that the developer uses a blocking style of programming
980 that is similar to threading, but provide the benefits of non-blocking I/O.
981 The event dispatch is implicit, which means you can easily use @code{Eventlet}
982 from the Python interpreter, or as a small part of a larger application.")
983 (license license:expat)))
984
985 (define-public python2-eventlet
986 (let ((base (package-with-python2
987 (strip-python2-variant python-eventlet))))
988 (package (inherit base)
989 (propagated-inputs
990 `(("python2-enum34" ,python2-enum34)
991 ,@(package-propagated-inputs base))))))
992
993 (define-public python-six
994 (package
995 (name "python-six")
996 (version "1.12.0")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "six" version))
1001 (sha256
1002 (base32
1003 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1004 (build-system python-build-system)
1005 (arguments
1006 `(#:phases
1007 (modify-phases %standard-phases
1008 (replace 'check
1009 (lambda _
1010 (invoke "py.test" "-v"))))))
1011 (native-inputs
1012 `(("python-py" ,python-py)
1013 ("python-pytest" ,python-pytest-bootstrap)))
1014 (home-page "https://pypi.python.org/pypi/six/")
1015 (synopsis "Python 2 and 3 compatibility utilities")
1016 (description
1017 "Six is a Python 2 and 3 compatibility library. It provides utility
1018 functions for smoothing over the differences between the Python versions with
1019 the goal of writing Python code that is compatible on both Python versions.
1020 Six supports every Python version since 2.5. It is contained in only one
1021 Python file, so it can be easily copied into your project.")
1022 (license license:x11)))
1023
1024 (define-public python2-six
1025 (package-with-python2 python-six))
1026
1027 (define-public python-six-bootstrap
1028 (package
1029 (inherit python-six)
1030 (name "python-six-bootstrap")
1031 (native-inputs `())
1032 (arguments `(#:tests? #f))))
1033
1034 (define-public python2-six-bootstrap
1035 (package-with-python2 python-six-bootstrap))
1036
1037 (define-public python-schedule
1038 (package
1039 (name "python-schedule")
1040 (version "0.4.3")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "schedule" version))
1045 (sha256
1046 (base32
1047 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1048 (build-system python-build-system)
1049 (native-inputs
1050 `(("python-pytest" ,python-pytest)
1051 ("python-mock" ,python-mock)))
1052 (home-page "https://github.com/dbader/schedule")
1053 (synopsis "Schedule periodic function calls in Python")
1054 (description
1055 "Schedule is an in-process scheduler for periodic jobs that uses the
1056 builder pattern for configuration. Schedule lets you run Python functions (or
1057 any other callable) periodically at pre-determined intervals using a simple,
1058 human-friendly syntax.")
1059 (license license:expat)))
1060
1061 (define-public python2-schedule
1062 (package-with-python2 python-schedule))
1063
1064 (define-public python-pandas
1065 (package
1066 (name "python-pandas")
1067 (version "0.24.2")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "pandas" version))
1072 (sha256
1073 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1074 (build-system python-build-system)
1075 (arguments
1076 `(#:modules ((guix build utils)
1077 (guix build python-build-system)
1078 (ice-9 ftw)
1079 (srfi srfi-26))
1080 #:phases (modify-phases %standard-phases
1081 (add-after 'unpack 'patch-which
1082 (lambda* (#:key inputs #:allow-other-keys)
1083 (let ((which (assoc-ref inputs "which")))
1084 (substitute* "pandas/io/clipboard/__init__.py"
1085 (("^CHECK_CMD = .*")
1086 (string-append "CHECK_CMD = \"" which "\"\n"))))
1087 #t))
1088 (replace 'check
1089 (lambda _
1090 (let ((build-directory
1091 (string-append
1092 (getcwd) "/build/"
1093 (car (scandir "build"
1094 (cut string-prefix? "lib." <>))))))
1095 ;; Disable the "strict data files" option which causes
1096 ;; the build to error out if required data files are
1097 ;; not available (as is the case with PyPI archives).
1098 (substitute* "setup.cfg"
1099 (("addopts = --strict-data-files") "addopts = "))
1100 (with-directory-excursion build-directory
1101 ;; Delete tests that require "moto" which is not yet
1102 ;; in Guix.
1103 (for-each delete-file
1104 '("pandas/tests/io/conftest.py"
1105 "pandas/tests/io/json/test_compression.py"
1106 "pandas/tests/io/parser/test_network.py"
1107 "pandas/tests/io/test_parquet.py"))
1108 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1109 "--skip-network" "-k"
1110 ;; XXX: Due to the deleted tests above.
1111 "not test_read_s3_jsonl"))))))))
1112 (propagated-inputs
1113 `(("python-numpy" ,python-numpy)
1114 ("python-openpyxl" ,python-openpyxl)
1115 ("python-pytz" ,python-pytz)
1116 ("python-dateutil" ,python-dateutil)
1117 ("python-xlrd" ,python-xlrd)))
1118 (inputs
1119 `(("which" ,which)))
1120 (native-inputs
1121 `(("python-cython" ,python-cython)
1122 ("python-beautifulsoup4" ,python-beautifulsoup4)
1123 ("python-lxml" ,python-lxml)
1124 ("python-html5lib" ,python-html5lib)
1125 ("python-nose" ,python-nose)
1126 ("python-pytest" ,python-pytest)
1127 ("python-pytest-mock" ,python-pytest-mock)))
1128 (home-page "https://pandas.pydata.org")
1129 (synopsis "Data structures for data analysis, time series, and statistics")
1130 (description
1131 "Pandas is a Python package providing fast, flexible, and expressive data
1132 structures designed to make working with structured (tabular,
1133 multidimensional, potentially heterogeneous) and time series data both easy
1134 and intuitive. It aims to be the fundamental high-level building block for
1135 doing practical, real world data analysis in Python.")
1136 (license license:bsd-3)))
1137
1138 (define-public python2-pandas
1139 (package-with-python2 python-pandas))
1140
1141 (define-public python2-mechanize
1142 (package
1143 (name "python2-mechanize")
1144 (version "0.2.5")
1145 (source
1146 (origin
1147 (method url-fetch)
1148 (uri (pypi-uri "mechanize" version))
1149 (sha256
1150 (base32
1151 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1152 (build-system python-build-system)
1153 (arguments
1154 `(#:python ,python-2 ; apparently incompatible with Python 3
1155 #:tests? #f))
1156 ;; test fails with message
1157 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1158 ;; (python-3.3.2) or
1159 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1160 ;; (python-2.7.5).
1161 ;; The source code is from March 2011 and probably not up-to-date
1162 ;; with respect to python unit tests.
1163 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1164 (synopsis
1165 "Stateful programmatic web browsing in Python")
1166 (description
1167 "Mechanize implements stateful programmatic web browsing in Python,
1168 after Andy Lester’s Perl module WWW::Mechanize.")
1169 (license (license:non-copyleft
1170 "file://COPYING"
1171 "See COPYING in the distribution."))))
1172
1173
1174 (define-public python-simplejson
1175 (package
1176 (name "python-simplejson")
1177 (version "3.14.0")
1178 (source
1179 (origin
1180 (method url-fetch)
1181 (uri (pypi-uri "simplejson" version))
1182 (sha256
1183 (base32
1184 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1185 (build-system python-build-system)
1186 (home-page "http://simplejson.readthedocs.org/en/latest/")
1187 (synopsis
1188 "Json library for Python")
1189 (description
1190 "JSON (JavaScript Object Notation) is a subset of JavaScript
1191 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1192 format.
1193
1194 Simplejson exposes an API familiar to users of the standard library marshal
1195 and pickle modules. It is the externally maintained version of the json
1196 library contained in Python 2.6, but maintains compatibility with Python 2.5
1197 and (currently) has significant performance advantages, even without using
1198 the optional C extension for speedups. Simplejson is also supported on
1199 Python 3.3+.")
1200 (license license:x11)))
1201
1202 (define-public python2-simplejson
1203 (package-with-python2 python-simplejson))
1204
1205
1206 (define-public python-pyicu
1207 (package
1208 (name "python-pyicu")
1209 (version "2.3.1")
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri (pypi-uri "PyICU" version))
1214 (sha256
1215 (base32
1216 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1217 (build-system python-build-system)
1218 (inputs
1219 `(("icu4c" ,icu4c)))
1220 (native-inputs
1221 `(("python-pytest" ,python-pytest)
1222 ("python-six" ,python-six)))
1223 (home-page "https://github.com/ovalhub/pyicu")
1224 (synopsis "Python extension wrapping the ICU C++ API")
1225 (description
1226 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (properties `((python2-variant . ,(delay python2-pyicu))))
1228 (license license:x11)))
1229
1230 (define-public python2-pyicu
1231 (let ((base (package-with-python2
1232 (strip-python2-variant python-pyicu))))
1233 (package
1234 (inherit base)
1235 (arguments
1236 `(,@(package-arguments base)
1237 #:phases
1238 (modify-phases %standard-phases
1239 (add-before 'check 'delete-failing-test
1240 (λ _
1241 ;; XXX: This fails due to Unicode issues unique to Python 2,
1242 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1243 (delete-file "test/test_Script.py")
1244 #t))))))))
1245
1246 (define-public python2-dogtail
1247 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1248 ;; spaces in indentation" with Python 3.
1249 (package
1250 (name "python2-dogtail")
1251 (version "0.9.9")
1252 (source (origin
1253 (method url-fetch)
1254 (uri (pypi-uri "dogtail" version))
1255 (sha256
1256 (base32
1257 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1258 (build-system python-build-system)
1259 (arguments `(#:python ,python-2
1260 #:tests? #f)) ; invalid command "test"
1261 ;; Currently no offical homepage.
1262 (home-page "https://pypi.python.org/pypi/dogtail/")
1263 (synopsis "GUI test tool and automation framework written in Python")
1264 (description
1265 "Dogtail is a GUI test tool and automation framework written in Python.
1266 It uses Accessibility (a11y) technologies to communicate with desktop
1267 applications. dogtail scripts are written in Python and executed like any
1268 other Python program.")
1269 (license license:gpl2+)))
1270
1271 (define-public python-empy
1272 (package
1273 (name "python-empy")
1274 (version "3.3.3")
1275 (source (origin
1276 (method url-fetch)
1277 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1278 version ".tar.gz"))
1279 (sha256
1280 (base32
1281 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1282 (build-system python-build-system)
1283 (arguments
1284 `(#:tests? #f)) ; python2 only
1285 (home-page "http://www.alcyone.com/software/empy/")
1286 (synopsis "Templating system for Python")
1287 (description
1288 "EmPy is a system for embedding Python expressions and statements in
1289 template text; it takes an EmPy source file, processes it, and produces
1290 output. This is accomplished via expansions, which are special signals to the
1291 EmPy system and are set off by a special prefix (by default the at sign, @@).
1292 EmPy can expand arbitrary Python expressions and statements in this way, as
1293 well as a variety of special forms. Textual data not explicitly delimited in
1294 this way is sent unaffected to the output, allowing Python to be used in
1295 effect as a markup language. Also supported are callbacks via hooks,
1296 recording and playback via diversions, and dynamic, chainable filters. The
1297 system is highly configurable via command line options and embedded
1298 commands.")
1299 (license license:lgpl2.1+)))
1300
1301 (define-public python2-empy
1302 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1303 (package
1304 (inherit base)
1305 (arguments `(,@(package-arguments base)
1306 #:tests? #t)))))
1307
1308 (define-public python2-element-tree
1309 (package
1310 (name "python2-element-tree")
1311 (version "1.2.6")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "http://effbot.org/media/downloads/elementtree-"
1316 version "-20050316.tar.gz"))
1317 (sha256
1318 (base32
1319 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1320 (build-system python-build-system)
1321 (arguments
1322 `(#:python ,python-2 ; seems to be part of Python 3
1323 #:tests? #f)) ; no 'test' sub-command
1324 (synopsis "Toolkit for XML processing in Python")
1325 (description
1326 "ElementTree is a Python library supporting lightweight XML processing.")
1327 (home-page "http://effbot.org/zone/element-index.htm")
1328 (license (license:x11-style
1329 "http://docs.python.org/2/license.html"
1330 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1331
1332 (define-public python2-pybugz
1333 (package
1334 (name "python2-pybugz")
1335 (version "0.6.11")
1336 (source (origin
1337 (method url-fetch)
1338 (uri (string-append
1339 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1340 version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1344 (patches (search-patches "pybugz-stty.patch"
1345 "pybugz-encode-error.patch"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2 ; SyntaxError with Python 3
1349 #:tests? #f)) ; no 'test' sub-command
1350 (propagated-inputs
1351 `(("element-tree" ,python2-element-tree)))
1352 (synopsis "Python and command-line interface to Bugzilla")
1353 (description
1354 "PyBugz is a Python library and command-line tool to query the Bugzilla
1355 bug tracking system. It is meant as an aid to speed up interaction with the
1356 bug tracker.")
1357 (home-page "http://www.liquidx.net/pybugz/")
1358 (license license:gpl2)))
1359
1360 (define-public python2-enum
1361 (package
1362 (name "python2-enum")
1363 (version "0.4.6")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (pypi-uri "enum" version))
1367 (sha256
1368 (base32
1369 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1370 (build-system python-build-system)
1371 (arguments
1372 `(#:python ,python-2))
1373 (home-page "http://pypi.python.org/pypi/enum/")
1374 (synopsis "Robust enumerated type support in Python")
1375 (description
1376 "This provides a module for robust enumerations in Python. It has
1377 been superseded by the Python standard library and is provided only for
1378 compatibility.")
1379 ;; Choice of either license.
1380 (license (list license:gpl3+ license:psfl))))
1381
1382 (define-public python-enum34
1383 (package
1384 (name "python-enum34")
1385 (version "1.1.6")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (pypi-uri "enum34" version))
1390 (sha256
1391 (base32
1392 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1393 (build-system python-build-system)
1394 (home-page "https://pypi.python.org/pypi/enum34")
1395 (synopsis "Backported Python 3.4 Enum")
1396 (description
1397 "Enum34 is the new Python stdlib enum module available in Python 3.4
1398 backported for previous versions of Python from 2.4 to 3.3.")
1399 (license license:bsd-3)))
1400
1401 (define-public python2-enum34
1402 (package-with-python2 python-enum34))
1403
1404 (define-public python-parse-type
1405 (package
1406 (name "python-parse-type")
1407 (version "0.4.2")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "parse_type" version))
1412 (sha256
1413 (base32
1414 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1415 (build-system python-build-system)
1416 (propagated-inputs
1417 `(("python-six" ,python-six)
1418 ("python-parse" ,python-parse)))
1419 (native-inputs
1420 `(("python-pytest" ,python-pytest)
1421 ("python-pytest-runner" ,python-pytest-runner)))
1422 (home-page "https://github.com/jenisys/parse_type")
1423 (synopsis "Extended parse module")
1424 (description
1425 "Parse_type extends the python parse module.")
1426 (properties
1427 `((python2-variant . ,(delay python2-parse-type))))
1428 (license license:bsd-3)))
1429
1430 (define-public python2-parse-type
1431 (let ((base (package-with-python2
1432 (strip-python2-variant python-parse-type))))
1433 (package (inherit base)
1434 (propagated-inputs
1435 `(("python2-enum34" ,python2-enum34)
1436 ,@(package-propagated-inputs base))))))
1437
1438 (define-public python-parse
1439 (package
1440 (name "python-parse")
1441 (version "1.8.4")
1442 (source
1443 (origin
1444 (method url-fetch)
1445 (uri (pypi-uri "parse" version))
1446 (sha256
1447 (base32
1448 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1449 (build-system python-build-system)
1450 (arguments
1451 `(#:phases
1452 (modify-phases %standard-phases
1453 (replace 'check
1454 (lambda _ (invoke "python" "test_parse.py"))))))
1455 (home-page "https://github.com/r1chardj0n3s/parse")
1456 (synopsis "Parse strings")
1457 (description
1458 "Parse strings using a specification based on the Python @code{format()}
1459 syntax.")
1460 (license license:x11)))
1461
1462 (define-public python-polib
1463 (package
1464 (name "python-polib")
1465 (version "1.0.8")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (pypi-uri "polib" version))
1469 (sha256
1470 (base32
1471 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1472 (build-system python-build-system)
1473 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1474 (synopsis "Manipulate, create and modify gettext files")
1475 (description "Polib can manipulate any gettext format (po, pot and mo)
1476 files. It can be used to create po files from scratch or to modify
1477 existing ones.")
1478 (license license:expat)))
1479
1480 (define-public python2-polib
1481 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1482 (package
1483 (inherit base)
1484 (arguments `(,@(package-arguments base)
1485 ;; Tests don't work with python2.
1486 #:tests? #f)))))
1487
1488 (define-public scons
1489 (package
1490 (name "scons")
1491 (version "3.0.4")
1492 (source (origin
1493 (method git-fetch)
1494 (uri (git-reference
1495 (url "https://github.com/SCons/scons.git")
1496 (commit version)))
1497 (file-name (git-file-name name version))
1498 (sha256
1499 (base32
1500 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1501 (build-system python-build-system)
1502 (arguments
1503 `(#:use-setuptools? #f ; still relies on distutils
1504 #:tests? #f ; no 'python setup.py test' command
1505 #:phases
1506 (modify-phases %standard-phases
1507 (add-before 'build 'bootstrap
1508 (lambda _
1509 (substitute* "src/engine/SCons/compat/__init__.py"
1510 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1511 "sys.modules[new] = __import__(old)"))
1512 (substitute* "src/engine/SCons/Platform/__init__.py"
1513 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1514 "mod = __import__(full_name)"))
1515 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1516 (chdir "build/scons")
1517 #t)))))
1518 (home-page "http://scons.org/")
1519 (synopsis "Software construction tool written in Python")
1520 (description
1521 "SCons is a software construction tool. Think of SCons as an improved,
1522 cross-platform substitute for the classic Make utility with integrated
1523 functionality similar to autoconf/automake and compiler caches such as ccache.
1524 In short, SCons is an easier, more reliable and faster way to build
1525 software.")
1526 (license license:x11)))
1527
1528 (define-public scons-python2
1529 (package
1530 (inherit (package-with-python2 scons))
1531 (name "scons-python2")))
1532
1533 (define-public python-extras
1534 (package
1535 (name "python-extras")
1536 (version "1.0.0")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "extras" version))
1541 (sha256
1542 (base32
1543 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1544 (build-system python-build-system)
1545 (arguments
1546 ;; FIXME: Circular dependency on testtools.
1547 '(#:tests? #f))
1548 (home-page "https://github.com/testing-cabal/extras")
1549 (synopsis "Useful extensions to the Python standard library")
1550 (description
1551 "Extras is a set of extensions to the Python standard library.")
1552 (license license:expat)))
1553
1554 (define-public python2-extras
1555 (package-with-python2 python-extras))
1556
1557 (define-public python-mimeparse
1558 (package
1559 (name "python-mimeparse")
1560 (version "1.6.0")
1561 (source
1562 (origin
1563 (method url-fetch)
1564 (uri (pypi-uri "python-mimeparse" version))
1565 (sha256
1566 (base32
1567 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1568 (build-system python-build-system)
1569 (arguments
1570 '(#:phases
1571 (modify-phases %standard-phases
1572 (replace 'check
1573 (lambda _
1574 (invoke "./mimeparse_test.py"))))))
1575 (home-page
1576 "https://github.com/dbtsai/python-mimeparse")
1577 (synopsis "Python library for parsing MIME types")
1578 (description
1579 "Mimeparse provides basic functions for parsing MIME type names and
1580 matching them against a list of media-ranges.")
1581 (license license:expat)))
1582
1583 (define-public python2-mimeparse
1584 (package-with-python2 python-mimeparse))
1585
1586 (define-public python-miniboa
1587 (package
1588 (name "python-miniboa")
1589 (version "1.0.7")
1590 (source
1591 (origin
1592 (method url-fetch)
1593 (uri (pypi-uri "miniboa" version))
1594 (sha256
1595 (base32
1596 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1597 (build-system python-build-system)
1598 (home-page "https://github.com/shmup/miniboa")
1599 (synopsis "Simple, single-threaded Telnet server")
1600 (description
1601 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1602 server.")
1603 (license license:asl2.0)))
1604
1605 (define-public python2-miniboa
1606 (package-with-python2 python-miniboa))
1607
1608 (define-public python-pafy
1609 (package
1610 (name "python-pafy")
1611 (version "0.5.3.1")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "pafy" version))
1616 (sha256
1617 (base32
1618 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1619 (build-system python-build-system)
1620 (arguments
1621 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1622 (propagated-inputs
1623 ;; Youtube-dl is a python package which is imported in the file
1624 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1625 `(("youtube-dl" ,youtube-dl)))
1626 (home-page "https://np1.github.io/pafy/")
1627 (synopsis "Retrieve YouTube content and metadata")
1628 (description
1629 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1630 (license license:lgpl3+)))
1631
1632 (define-public python2-funcsigs
1633 (package
1634 (name "python2-funcsigs")
1635 (version "1.0.2")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "funcsigs" version))
1639 (sha256
1640 (base32
1641 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1642 (build-system python-build-system)
1643 (arguments
1644 `(#:python ,python-2))
1645 (native-inputs
1646 `(("python2-unittest2" ,python2-unittest2)))
1647 (home-page "http://funcsigs.readthedocs.org")
1648 (synopsis "Python function signatures from PEP362")
1649 (description
1650 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1651 (license license:asl2.0)))
1652
1653 (define-public python2-funcsigs-bootstrap
1654 (package
1655 (inherit python2-funcsigs)
1656 (name "python2-funcsigs-bootstrap")
1657 (native-inputs `())
1658 (arguments
1659 `(#:tests? #f
1660 ,@(package-arguments python2-funcsigs)))))
1661
1662 (define-public python-py
1663 (package
1664 (name "python-py")
1665 (version "1.8.0")
1666 (source
1667 (origin
1668 (method url-fetch)
1669 (uri (pypi-uri "py" version))
1670 (sha256
1671 (base32
1672 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1673 (build-system python-build-system)
1674 (arguments
1675 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1676 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1677 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1678 ;; Is this module globally installed?"
1679 '(#:tests? #f))
1680 (native-inputs
1681 `(("python-setuptools-scm" ,python-setuptools-scm)))
1682 (home-page "https://github.com/pytest-dev/py")
1683 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1684 (description
1685 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1686 code introspection, and logging.")
1687 (license license:expat)))
1688
1689 (define-public python2-py
1690 (package-with-python2 python-py))
1691
1692 ;; Recent versions of python-fixtures and python-testrepository need
1693 ;; python-pbr for packaging, which itself needs these two packages for
1694 ;; testing.
1695 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1696 ;; same source, just without any test dependencies and with tests disabled.
1697 ;; python-pbr-minmal is then used to package python-fixtures and
1698 ;; python-testrepository.
1699 ;; Strictly speaking we currently could remove the test-requirements from the
1700 ;; normal python-pbr package (and save this package) since test are disabled
1701 ;; there anyway. But this may change in future.
1702 (define-public python-pbr-minimal
1703 (package
1704 (name "python-pbr-minimal")
1705 (version "3.0.1")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "pbr" version))
1710 (sha256
1711 (base32
1712 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1713 (build-system python-build-system)
1714 (arguments
1715 `(#:tests? #f))
1716 (home-page "http://docs.openstack.org/developer/pbr/")
1717 (synopsis "Minimal build of python-pbr used for bootstrapping")
1718 (description
1719 "Used only for bootstrapping python2-pbr, you should not need this.")
1720 (license license:asl2.0)))
1721
1722 (define-public python2-pbr-minimal
1723 (package-with-python2 python-pbr-minimal))
1724
1725 (define-public python-pbr
1726 (package
1727 (inherit python-pbr-minimal)
1728 (name "python-pbr")
1729 (arguments
1730 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1731 (propagated-inputs
1732 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1733 (native-inputs
1734 `(("python-fixtures" ,python-fixtures-bootstrap)
1735 ;; discover, coverage, hacking, subunit
1736 ("python-mock" ,python-mock)
1737 ("python-six" ,python-six)
1738 ("python-sphinx" ,python-sphinx)
1739 ("python-testrepository" ,python-testrepository-bootstrap)
1740 ("python-testresources" ,python-testresources-bootstrap)
1741 ("python-testscenarios" ,python-testscenarios-bootstrap)
1742 ("python-testtools" ,python-testtools-bootstrap)
1743 ("python-virtualenv" ,python-virtualenv)))
1744 (synopsis "Enhance the default behavior of Python’s setuptools")
1745 (description
1746 "Python Build Reasonableness (PBR) is a library that injects some useful
1747 and sensible default behaviors into your setuptools run. It will set
1748 versions, process requirements files and generate AUTHORS and ChangeLog file
1749 from git information.
1750 ")))
1751
1752 (define-public python2-pbr
1753 (package-with-python2 python-pbr))
1754
1755 (define-public python-pyrsistent
1756 (package
1757 (name "python-pyrsistent")
1758 (version "0.14.11")
1759 (home-page "https://github.com/tobgu/pyrsistent")
1760 (source (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "pyrsistent" version))
1763 (sha256
1764 (base32
1765 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1766 (build-system python-build-system)
1767 (native-inputs
1768 `(("python-hypothesis" ,python-hypothesis)
1769 ("python-pytest" ,python-pytest)
1770 ("python-pytest-runner" ,python-pytest-runner)))
1771 (propagated-inputs
1772 `(("python-six" ,python-six)))
1773 (synopsis "Persistent data structures for Python")
1774 (description
1775 "Pyrsistent is a number of persistent collections (by some referred to as
1776 functional data structures). Persistent in the sense that they are immutable.
1777
1778 All methods on a data structure that would normally mutate it instead return a
1779 new copy of the structure containing the requested updates. The original
1780 structure is left untouched.")
1781 (license license:expat)))
1782
1783 (define-public python2-pyrsistent
1784 (package-with-python2 python-pyrsistent))
1785
1786 (define-public python-exif-read
1787 (package
1788 (name "python-exif-read")
1789 (version "2.1.2")
1790 (source (origin
1791 (method url-fetch)
1792 (uri (pypi-uri "ExifRead" version))
1793 (sha256
1794 (base32
1795 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1796 (build-system python-build-system)
1797 (arguments `(#:tests? #f)) ; no tests
1798 (home-page "https://github.com/ianare/exif-py")
1799 (synopsis "Python library to extract EXIF data from image files")
1800 (description
1801 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1802 files.")
1803 (license license:bsd-3)))
1804
1805 (define-public python2-exif-read
1806 (package-with-python2 python-exif-read))
1807
1808 (define-public python-pyld
1809 (package
1810 (name "python-pyld")
1811 (version "1.0.3")
1812 (source (origin
1813 (method url-fetch)
1814 (uri (pypi-uri "PyLD" version))
1815 (sha256
1816 (base32
1817 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1818 (build-system python-build-system)
1819 (home-page "https://github.com/digitalbazaar/pyld")
1820 (synopsis "Python implementation of the JSON-LD specification")
1821 (description
1822 "PyLD is an implementation of the JSON-LD specification.")
1823 (license license:bsd-3)))
1824
1825 (define-public python2-pyld
1826 (package-with-python2 python-pyld))
1827
1828 (define-public python-click
1829 (package
1830 (name "python-click")
1831 (version "7.0")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "click" version))
1836 (sha256
1837 (base32
1838 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1839 (build-system python-build-system)
1840 (arguments
1841 `(#:phases
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'fix-paths
1844 (lambda* (#:key inputs #:allow-other-keys)
1845 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1846 "cross-libc" "libc"))))
1847 (substitute* "click/_unicodefun.py"
1848 (("'locale'")
1849 (string-append "'" glibc "/bin/locale'"))))
1850 #t))
1851 (replace 'check
1852 (lambda _
1853 (invoke "python" "-m" "pytest"))))))
1854 (native-inputs
1855 `(("python-pytest" ,python-pytest)))
1856 (home-page "https://palletsprojects.com/p/click/")
1857 (synopsis "Command line library for Python")
1858 (description
1859 "Click is a Python package for creating command line interfaces in a
1860 composable way with as little code as necessary. Its name stands for
1861 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1862 with sensible defaults out of the box.")
1863 (license license:bsd-3)))
1864
1865 (define-public python2-click
1866 (package-with-python2 python-click))
1867
1868 (define-public python-wheel
1869 (package
1870 (name "python-wheel")
1871 (version "0.32.3")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "wheel" version))
1876 (sha256
1877 (base32
1878 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1879 (build-system python-build-system)
1880 (native-inputs
1881 `(("python-jsonschema" ,python-jsonschema)
1882 ("python-pytest-cov" ,python-pytest-cov)))
1883 (home-page "https://bitbucket.org/pypa/wheel/")
1884 (synopsis "Format for built Python packages")
1885 (description
1886 "A wheel is a ZIP-format archive with a specially formatted filename and
1887 the @code{.whl} extension. It is designed to contain all the files for a PEP
1888 376 compatible install in a way that is very close to the on-disk format. Many
1889 packages will be properly installed with only the @code{Unpack} step and the
1890 unpacked archive preserves enough information to @code{Spread} (copy data and
1891 scripts to their final locations) at any later time. Wheel files can be
1892 installed with a newer @code{pip} or with wheel's own command line utility.")
1893 (license license:expat)
1894 (properties `((python2-variant . ,(delay python2-wheel))))))
1895
1896 (define-public python2-wheel
1897 (let ((wheel (package-with-python2
1898 (strip-python2-variant python-wheel))))
1899 (package (inherit wheel)
1900 (native-inputs `(("python2-functools32" ,python2-functools32)
1901 ,@(package-native-inputs wheel))))))
1902
1903 (define-public python-vcversioner
1904 (package
1905 (name "python-vcversioner")
1906 (version "2.16.0.0")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "vcversioner" version))
1911 (sha256
1912 (base32
1913 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1914 (build-system python-build-system)
1915 (synopsis "Python library for version number discovery")
1916 (description "Vcversioner is a Python library that inspects tagging
1917 information in a variety of version control systems in order to discover
1918 version numbers.")
1919 (home-page "https://github.com/habnabit/vcversioner")
1920 (license license:isc)))
1921
1922 (define-public python2-vcversioner
1923 (package-with-python2 python-vcversioner))
1924
1925 (define-public python-jdcal
1926 (package
1927 (name "python-jdcal")
1928 (version "1.4")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (pypi-uri "jdcal" version))
1933 (sha256
1934 (base32
1935 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1936 (build-system python-build-system)
1937 (arguments
1938 `(#:phases (modify-phases %standard-phases
1939 (replace 'check
1940 (lambda _
1941 (invoke "pytest"))))))
1942 (native-inputs
1943 `(("python-pytest" ,python-pytest)))
1944 (home-page "https://github.com/phn/jdcal")
1945 (synopsis "Functions to convert between Julian dates Gregorian dates")
1946 (description "This Python library provides functions for converting
1947 between Julian dates and Gregorian dates.")
1948 (license license:bsd-2)))
1949
1950 (define-public python2-jdcal
1951 (package-with-python2 python-jdcal))
1952
1953 (define-public python-jsonschema
1954 (package
1955 (name "python-jsonschema")
1956 (version "3.0.1")
1957 (source (origin
1958 (method url-fetch)
1959 (uri (pypi-uri "jsonschema" version))
1960 (sha256
1961 (base32
1962 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
1963 (build-system python-build-system)
1964 (arguments
1965 '(#:phases
1966 (modify-phases %standard-phases
1967 (replace 'check
1968 (lambda _
1969 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1970 (invoke "trial" "jsonschema"))))))
1971 (native-inputs
1972 `(("python-setuptools_scm" ,python-setuptools-scm)
1973 ("python-twisted" ,python-twisted)))
1974 (propagated-inputs
1975 `(("python-attrs" ,python-attrs)
1976 ("python-pyrsistent" ,python-pyrsistent)
1977 ("python-six" ,python-six)))
1978 (home-page "https://github.com/Julian/jsonschema")
1979 (synopsis "Implementation of JSON Schema for Python")
1980 (description
1981 "Jsonschema is an implementation of JSON Schema for Python.")
1982 (license license:expat)
1983 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1984
1985 (define-public python2-jsonschema
1986 (let ((jsonschema (package-with-python2
1987 (strip-python2-variant python-jsonschema))))
1988 (package (inherit jsonschema)
1989 (propagated-inputs
1990 `(("python2-functools32" ,python2-functools32)
1991 ,@(package-propagated-inputs jsonschema))))))
1992
1993 ;; This old version is still required by docker-compose as of 1.24.0.
1994 (define-public python-jsonschema-2.6
1995 (package
1996 (name "python-jsonschema")
1997 (version "2.6.0")
1998 (source (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "jsonschema" version))
2001 (sha256
2002 (base32
2003 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2004 (build-system python-build-system)
2005 (arguments
2006 '(#:phases
2007 (modify-phases %standard-phases
2008 (replace 'check (lambda _ (invoke "nosetests"))))))
2009 (native-inputs
2010 `(("python-nose" ,python-nose)
2011 ("python-vcversioner" ,python-vcversioner)))
2012 (home-page "https://github.com/Julian/jsonschema")
2013 (synopsis "Implementation of JSON Schema for Python")
2014 (description
2015 "Jsonschema is an implementation of JSON Schema for Python.")
2016 (license license:expat)
2017 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2018
2019 (define-public python-schema
2020 (package
2021 (name "python-schema")
2022 (version "0.6.6")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "schema" version))
2027 (sha256
2028 (base32
2029 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2030 (build-system python-build-system)
2031 (native-inputs
2032 `(("python-pytest" ,python-pytest)))
2033 (home-page "https://github.com/keleshev/schema")
2034 (synopsis "Simple data validation library")
2035 (description
2036 "@code{python-schema} is a library for validating Python data
2037 structures, such as those obtained from config-files, forms, external
2038 services or command-line parsing, converted from JSON/YAML (or
2039 something else) to Python data-types.")
2040 (license license:psfl)))
2041
2042 (define-public python2-schema
2043 (package-with-python2 python-schema))
2044
2045 (define-public python-schema-0.5
2046 (package (inherit python-schema)
2047 (version "0.5.0")
2048 (source
2049 (origin
2050 (method url-fetch)
2051 (uri (pypi-uri "schema" version))
2052 (sha256
2053 (base32
2054 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2055
2056 (define-public python2-schema-0.5
2057 (package-with-python2 python-schema-0.5))
2058
2059 (define-public python-kitchen
2060 (package
2061 (name "python-kitchen")
2062 (version "1.2.5")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "kitchen" version))
2067 (sha256
2068 (base32
2069 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2070 (build-system python-build-system)
2071 (propagated-inputs
2072 `(("python-chardet" ,python-chardet)))
2073 (home-page "https://github.com/fedora-infra/kitchen")
2074 (synopsis "Python API for snippets")
2075 (description "@code{kitchen} module provides a python API for all sorts of
2076 little useful snippets of code that everybody ends up writing for their projects
2077 but never seem big enough to build an independent release. Use kitchen and stop
2078 cutting and pasting that code over and over.")
2079 (license (list license:lgpl2.1+
2080 ;; subprocess.py, test_subprocess.py,
2081 ;; kitchen/pycompat25/defaultdict.py:
2082 license:psfl))))
2083
2084 (define-public python2-kitchen
2085 (package-with-python2 python-kitchen))
2086
2087 (define-public python-unidecode
2088 (package
2089 (name "python-unidecode")
2090 (version "1.1.0")
2091 (source (origin
2092 (method url-fetch)
2093 (uri (pypi-uri "Unidecode" version))
2094 (sha256
2095 (base32
2096 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2097 (build-system python-build-system)
2098 (home-page "https://pypi.python.org/pypi/Unidecode")
2099 (synopsis "ASCII transliterations of Unicode text")
2100 (description
2101 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2102 useful when integrating with legacy code that doesn't support Unicode, or for
2103 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2104 machine identifiers from human-readable Unicode strings that should still be
2105 somewhat intelligible.")
2106 (license license:gpl2+)))
2107
2108 (define-public python2-unidecode
2109 (package-with-python2 python-unidecode))
2110
2111 (define-public python-pyjwt
2112 (package
2113 (name "python-pyjwt")
2114 (version "1.5.3")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (pypi-uri "PyJWT" version))
2119 (sha256
2120 (base32
2121 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2122 (modules '((guix build utils)))
2123 (snippet
2124 '(begin
2125 (for-each delete-file-recursively
2126 (find-files "." "\\.pyc$"))
2127 #t))))
2128 (build-system python-build-system)
2129 (native-inputs
2130 `(("python-pytest" ,python-pytest)
2131 ("python-pytest-cov" ,python-pytest-cov)
2132 ("python-pytest-runner" ,python-pytest-runner)))
2133 (home-page "https://github.com/progrium/pyjwt")
2134 (synopsis "JSON Web Token implementation in Python")
2135 (description
2136 "PyJWT is a JSON Web Token implementation written in Python.")
2137 (license license:expat)))
2138
2139 (define-public python2-pyjwt
2140 (package-with-python2 python-pyjwt))
2141
2142 (define-public python-pykka
2143 (package
2144 (name "python-pykka")
2145 (version "1.2.1")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "Pykka" version))
2150 (sha256
2151 (base32
2152 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2153 (build-system python-build-system)
2154 (native-inputs
2155 `(("python-mock" ,python-mock)
2156 ("python-nose" ,python-nose)
2157 ("python-gevent" ,python-gevent)
2158 ("python-eventlet" ,python-eventlet)))
2159 (home-page "https://www.pykka.org/")
2160 (synopsis "Pykka is a Python implementation of the actor model")
2161 (description
2162 "Pykka is a Python implementation of the actor model.
2163 The actor model introduces some simple rules to control the sharing
2164 of state and cooperation between execution units, which makes it
2165 easier to build concurrent applications.")
2166 (license license:asl2.0)))
2167
2168 (define-public python2-pykka
2169 (package-with-python2 python-pykka))
2170
2171 (define-public python-pymsgbox
2172 (package
2173 (name "python-pymsgbox")
2174 (version "1.0.6")
2175 (source
2176 (origin
2177 (method git-fetch)
2178 (uri (git-reference
2179 ;; LICENSE.txt is not present on pypi
2180 (url "https://github.com/asweigart/PyMsgBox")
2181 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2182 (file-name (git-file-name name version))
2183 (sha256
2184 (base32
2185 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2186 (arguments
2187 ;; Circular dependency to run tests:
2188 ;; Tests need pyautogui, which depends on pymsgbox.
2189 '(#:tests? #f))
2190 (build-system python-build-system)
2191 (home-page "https://github.com/asweigart/PyMsgBox")
2192 (synopsis "Python module for JavaScript-like message boxes")
2193 (description
2194 "PyMsgBox is a simple, cross-platform, pure Python module for
2195 JavaScript-like message boxes. Types of dialog boxes include:
2196 @enumerate
2197 @item alert
2198 @item confirm
2199 @item prompt
2200 @item password
2201 @end enumerate
2202 ")
2203 (license license:bsd-3)))
2204
2205 (define-public python-pympler
2206 (package
2207 (name "python-pympler")
2208 (home-page "https://pythonhosted.org/Pympler/")
2209 (version "0.6")
2210 (source (origin
2211 (method url-fetch)
2212 (uri (pypi-uri "Pympler" version))
2213 (sha256
2214 (base32
2215 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
2216 (build-system python-build-system)
2217 (arguments
2218 `(#:phases (modify-phases %standard-phases
2219 (delete 'check)
2220 (add-after 'install 'check
2221 (lambda* (#:key inputs outputs #:allow-other-keys)
2222 (add-installed-pythonpath inputs outputs)
2223 (invoke "python" "setup.py" "test"))))))
2224 (synopsis "Measure, monitor and analyze memory behavior")
2225 (description
2226 "Pympler is a development tool to measure, monitor and analyze
2227 the memory behavior of Python objects in a running Python application.
2228
2229 By pympling a Python application, detailed insight in the size and the
2230 lifetime of Python objects can be obtained. Undesirable or unexpected
2231 runtime behavior like memory bloat and other @samp{pymples} can easily
2232 be identified.
2233
2234 A web profiling frontend exposes process statistics, garbage
2235 visualisation and class tracker statistics.")
2236 (license license:asl2.0)))
2237
2238 (define-public python2-pympler
2239 (package-with-python2 python-pympler))
2240
2241 (define-public python-itsdangerous
2242 (package
2243 (name "python-itsdangerous")
2244 (version "1.1.0")
2245 (source
2246 (origin
2247 (method url-fetch)
2248 (uri (pypi-uri "itsdangerous" version))
2249 (sha256
2250 (base32
2251 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2252 (build-system python-build-system)
2253 (home-page "https://palletsprojects.com/p/itsdangerous/")
2254 (synopsis "Python library for passing data to/from untrusted environments")
2255 (description
2256 "Itsdangerous provides various helpers to pass trusted data to untrusted
2257 environments and back.")
2258 (license license:bsd-3)))
2259
2260 (define-public python2-itsdangerous
2261 (package-with-python2 python-itsdangerous))
2262
2263 (define-public python-pyyaml
2264 (package
2265 (name "python-pyyaml")
2266 (version "3.13")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "PyYAML" version))
2271 (sha256
2272 (base32
2273 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2274 (build-system python-build-system)
2275 (inputs
2276 `(("libyaml" ,libyaml)))
2277 (home-page "http://pyyaml.org/wiki/PyYAML")
2278 (synopsis "YAML parser and emitter for Python")
2279 (description
2280 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2281 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2282 API, and sensible error messages. PyYAML supports standard YAML tags and
2283 provides Python-specific tags that allow to represent an arbitrary Python
2284 object.")
2285 (license license:expat)))
2286
2287 (define-public python2-pyyaml
2288 (package-with-python2 python-pyyaml))
2289
2290 (define-public python-vine
2291 (package
2292 (name "python-vine")
2293 (version "1.1.4")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "vine" version))
2298 (sha256
2299 (base32
2300 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2301 (build-system python-build-system)
2302 (native-inputs
2303 `(("python-pytest" ,python-pytest)
2304 ("python-case" ,python-case)))
2305 (home-page "https://github.com/celery/vine")
2306 (synopsis "Promises for Python")
2307 (description
2308 "@code{vine} provides a special implementation of promises in that it can
2309 be used both for \"promise of a value\" and lazy evaluation. The biggest
2310 upside for this is that everything in a promise can also be a promise,
2311 e.g. filters, callbacks and errbacks can all be promises.")
2312 (license license:bsd-3)))
2313
2314 (define-public python-virtualenv
2315 (package
2316 (name "python-virtualenv")
2317 (version "16.1.0")
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (pypi-uri "virtualenv" version))
2322 (sha256
2323 (base32
2324 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2325 (build-system python-build-system)
2326 (arguments
2327 `(#:phases
2328 (modify-phases %standard-phases
2329 (add-before 'check 'disable-failing-test
2330 (lambda _
2331 ;; Disable failing test. See upstream bug report
2332 ;; https://github.com/pypa/virtualenv/issues/957
2333 (substitute* "tests/test_virtualenv.py"
2334 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2335 #t)))))
2336 (native-inputs
2337 `(("python-mock" ,python-mock)
2338 ("python-pytest" ,python-pytest)))
2339 (home-page "https://virtualenv.pypa.io/")
2340 (synopsis "Virtual Python environment builder")
2341 (description
2342 "Virtualenv is a tool to create isolated Python environments.")
2343 (license license:expat)))
2344
2345 (define-public python2-virtualenv
2346 (package-with-python2 python-virtualenv))
2347
2348 (define-public python-markupsafe
2349 (package
2350 (name "python-markupsafe")
2351 (version "1.1.1")
2352 (source
2353 (origin
2354 (method url-fetch)
2355 (uri (pypi-uri "MarkupSafe" version))
2356 (sha256
2357 (base32
2358 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2359 (build-system python-build-system)
2360 (arguments
2361 `(#:modules ((ice-9 ftw)
2362 (srfi srfi-1)
2363 (srfi srfi-26)
2364 (guix build utils)
2365 (guix build python-build-system))
2366 #:phases (modify-phases %standard-phases
2367 (replace 'check
2368 (lambda _
2369 (let ((cwd (getcwd))
2370 (libdir (find (cut string-prefix? "lib." <>)
2371 (scandir "build"))))
2372 (setenv "PYTHONPATH"
2373 (string-append cwd "/build/" libdir ":"
2374 (getenv "PYTHONPATH")))
2375 (invoke "pytest" "-vv")))))))
2376 (native-inputs
2377 `(("python-pytest" ,python-pytest)))
2378 (home-page "https://github.com/mitsuhiko/markupsafe")
2379 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2380 (description
2381 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2382 for Python.")
2383 (license license:bsd-3)))
2384
2385 (define-public python2-markupsafe
2386 (package-with-python2 python-markupsafe))
2387
2388 (define-public python-jinja2
2389 (package
2390 (name "python-jinja2")
2391 (version "2.10.1")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "Jinja2" version))
2396 (sha256
2397 (base32
2398 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2399 (build-system python-build-system)
2400 (propagated-inputs
2401 `(("python-markupsafe" ,python-markupsafe)))
2402 (home-page "http://jinja.pocoo.org/")
2403 (synopsis "Python template engine")
2404 (description
2405 "Jinja2 is a small but fast and easy to use stand-alone template engine
2406 written in pure Python.")
2407 (license license:bsd-3)))
2408
2409 (define-public python2-jinja2
2410 (package-with-python2 python-jinja2))
2411
2412 (define-public python-pystache
2413 (package
2414 (name "python-pystache")
2415 (version "0.5.4")
2416 (source (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "pystache" version))
2419 (sha256
2420 (base32
2421 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2422 (build-system python-build-system)
2423 (arguments
2424 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2425 (home-page "http://defunkt.io/pystache/")
2426 (synopsis "Python logic-less template engine")
2427 (description
2428 "Pystache is a Python implementation of the framework agnostic,
2429 logic-free templating system Mustache.")
2430 (license license:expat)
2431 (properties `((python2-variant . ,(delay python2-pystache))))))
2432
2433 (define-public python2-pystache
2434 (package (inherit (package-with-python2
2435 (strip-python2-variant python-pystache)))
2436 (arguments
2437 `(#:python ,python-2
2438 #:phases
2439 (modify-phases %standard-phases
2440 (replace 'check
2441 (lambda _
2442 (invoke "python" "test_pystache.py"))))))))
2443
2444 (define-public python-joblib
2445 (package
2446 (name "python-joblib")
2447 (version "0.13.0")
2448 (source (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "joblib" version))
2451 (sha256
2452 (base32
2453 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2454 (build-system python-build-system)
2455 (arguments
2456 `(#:phases
2457 (modify-phases %standard-phases
2458 (replace 'check
2459 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2460 (native-inputs
2461 `(("python-pytest" ,python-pytest)))
2462 (home-page "https://joblib.readthedocs.io/")
2463 (synopsis "Using Python functions as pipeline jobs")
2464 (description
2465 "Joblib is a set of tools to provide lightweight pipelining in Python.
2466 In particular, joblib offers: transparent disk-caching of the output values
2467 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2468 logging and tracing of the execution.")
2469 (license license:bsd-3)))
2470
2471 (define-public python2-joblib
2472 (package-with-python2 python-joblib))
2473
2474 (define-public python-daemon
2475 (package
2476 (name "python-daemon")
2477 (version "2.2.3")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "python-daemon" version))
2482 (sha256
2483 (base32
2484 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2485 (build-system python-build-system)
2486 (arguments
2487 `(#:phases
2488 (modify-phases %standard-phases
2489 (add-before 'check 'disable-tests
2490 (lambda _
2491 ;; FIXME: Determine why test fails
2492 (substitute* "test/test_daemon.py"
2493 (("test_detaches_process_context")
2494 "skip_test_detaches_process_context"))
2495 #t)))))
2496 (propagated-inputs
2497 `(("python-lockfile" ,python-lockfile)))
2498 (native-inputs
2499 `(("python-unittest2" ,python-unittest2)
2500 ("python-testtools" ,python-testtools)
2501 ("python-testscenarios" ,python-testscenarios)
2502 ("python-mock" ,python-mock)
2503 ("python-docutils" ,python-docutils)))
2504 (home-page "https://pagure.io/python-daemon/")
2505 (synopsis "Python library for making a Unix daemon process")
2506 (description "Python-daemon is a library that assists a Python program to
2507 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2508
2509 This library provides a @code{DaemonContext} class that manages the following
2510 important tasks for becoming a daemon process:
2511 @enumerate
2512 @item Detach the process into its own process group.
2513 @item Set process environment appropriate for running inside a chroot.
2514 @item Renounce suid and sgid privileges.
2515 @item Close all open file descriptors.
2516 @item Change the working directory, uid, gid, and umask.
2517 @item Set appropriate signal handlers.
2518 @item Open new file descriptors for stdin, stdout, and stderr.
2519 @item Manage a specified PID lock file.
2520 @item Register cleanup functions for at-exit processing.
2521 @end enumerate")
2522 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2523 (license (list license:asl2.0 license:gpl3+))))
2524
2525 (define-public python-docutils
2526 (package
2527 (name "python-docutils")
2528 (version "0.14")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "docutils" version))
2533 (sha256
2534 (base32
2535 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2536 (build-system python-build-system)
2537 (arguments
2538 '(#:tests? #f)) ; no setup.py test command
2539 (home-page "http://docutils.sourceforge.net/")
2540 (synopsis "Python Documentation Utilities")
2541 (description
2542 "Docutils is a modular system for processing documentation into useful
2543 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2544 reStructuredText.")
2545 ;; Most of the source code is public domain, but some source files are
2546 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2547 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2548
2549 (define-public python2-docutils
2550 (package-with-python2 python-docutils))
2551
2552 (define-public python-pygments
2553 (package
2554 (name "python-pygments")
2555 (version "2.4.2")
2556 (source
2557 (origin
2558 (method url-fetch)
2559 (uri (pypi-uri "Pygments" version))
2560 (sha256
2561 (base32
2562 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2563 (build-system python-build-system)
2564 (arguments
2565 ;; FIXME: Tests require sphinx, which depends on this.
2566 '(#:tests? #f))
2567 (home-page "http://pygments.org/")
2568 (synopsis "Syntax highlighting")
2569 (description
2570 "Pygments is a syntax highlighting package written in Python.")
2571 (license license:bsd-2)))
2572
2573 (define-public python2-pygments
2574 (package-with-python2 python-pygments))
2575
2576 (define-public python-bumpversion
2577 (package
2578 (name "python-bumpversion")
2579 (version "0.5.3")
2580 (source
2581 (origin
2582 (method url-fetch)
2583 (uri (pypi-uri "bumpversion" version))
2584 (sha256
2585 (base32
2586 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2587 (build-system python-build-system)
2588 (home-page "https://github.com/peritus/bumpversion")
2589 (synopsis "Tool to bump software version")
2590 (description "This tool provides a command-line interface (CLI) to bump a
2591 software version simply.")
2592 (license license:expat)))
2593
2594 (define-public python-deprecated
2595 (package
2596 (name "python-deprecated")
2597 (version "1.2.5")
2598 (source
2599 (origin
2600 (method git-fetch)
2601 (uri (git-reference
2602 (url "https://github.com/tantale/deprecated.git")
2603 (commit (string-append "v" version))))
2604 (file-name (git-file-name name version))
2605 (sha256
2606 (base32
2607 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2608 (build-system python-build-system)
2609 (arguments
2610 `(#:phases (modify-phases %standard-phases
2611 (replace 'check
2612 (lambda _
2613 (invoke "pytest"))))))
2614 (propagated-inputs
2615 `(("python-wrapt" ,python-wrapt)))
2616 (native-inputs
2617 `(("python-bumpversion" ,python-bumpversion)
2618 ("python-pytest" ,python-pytest)
2619 ("python-pytest-cov" ,python-pytest-cov)
2620 ("python-sphinx" ,python-sphinx)
2621 ("python-tox" ,python-tox)))
2622 (home-page "https://github.com/tantale/deprecated")
2623 (synopsis "Python decorator to deprecate classes, functions or methods")
2624 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2625 to deprecate classes, functions or methods.")
2626 (license license:expat)))
2627
2628 (define-public python-pygithub
2629 (package
2630 (name "python-pygithub")
2631 (version "1.43.7")
2632 (source
2633 ;; We fetch from the Git repo because there are no tests in the PyPI
2634 ;; archive.
2635 (origin
2636 (method git-fetch)
2637 (uri (git-reference
2638 (url "https://github.com/PyGithub/PyGithub.git")
2639 (commit (string-append "v" version))))
2640 (file-name (git-file-name name version))
2641 (sha256
2642 (base32
2643 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2644 (build-system python-build-system)
2645 (arguments
2646 `(#:phases (modify-phases %standard-phases
2647 ;; Some tests rely on the network.
2648 (add-after 'unpack 'disable-failing-tests
2649 (lambda _
2650 (substitute* "tests/Issue142.py"
2651 (("testDecodeJson") "disabled_testDecodeJson"))
2652 #t))
2653 (add-before 'check 'prepare-for-tests
2654 (lambda _
2655 (for-each (lambda (f)
2656 (chmod f #o666))
2657 (find-files "./tests"))
2658 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2659 (setenv "PYTHONPATH"
2660 (string-append "./tests:" (getenv "PYTHONPATH")))
2661 #t)))))
2662 (propagated-inputs
2663 `(("python-deprecated" ,python-deprecated)
2664 ("python-pyjwt" ,python-pyjwt)
2665 ("python-requests" ,python-requests)))
2666 (native-inputs `(("python-httpretty" ,python-httpretty)))
2667 (home-page "https://pygithub.readthedocs.io/en/latest/")
2668 (synopsis "Python library for the GitHub API")
2669 (description "This library allows managing GitHub resources such as
2670 repositories, user profiles, and organizations in your Python applications,
2671 using version 3 of the GitHub application programming interface (API).")
2672 (license license:lgpl3+)))
2673
2674 (define-public python-rellu
2675 (package
2676 (name "python-rellu")
2677 (version "0.7")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "rellu" version))
2682 (sha256
2683 (base32
2684 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2685 (build-system python-build-system)
2686 (propagated-inputs
2687 `(("python-invoke" ,python-invoke)
2688 ("python-pygithub" ,python-pygithub)))
2689 (home-page "https://github.com/robotframework/rellu")
2690 (synopsis "Utilities to create PyPI releases")
2691 (description "This collection of utilities contains tooling and templates
2692 to assist in creating releases on GitHub and publishing them on PyPI. It is
2693 designed to be used by Robot Framework and tools and libraries in its
2694 ecosystem, but can naturally be used also by other projects.")
2695 (license license:asl2.0)))
2696
2697 (define-public python-robotframework
2698 (package
2699 (name "python-robotframework")
2700 (version "3.1.2")
2701 ;; There are no tests in the PyPI archive.
2702 (source
2703 (origin
2704 (method git-fetch)
2705 (uri (git-reference
2706 (url "https://github.com/robotframework/robotframework.git")
2707 (commit (string-append "v" version))))
2708 (file-name (git-file-name name version))
2709 (sha256
2710 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2711 (patches (search-patches
2712 "python-robotframework-honor-source-date-epoch.patch"))))
2713 (build-system python-build-system)
2714 (arguments
2715 `(#:phases (modify-phases %standard-phases
2716 (add-before 'build 'build-and-install-doc
2717 (lambda* (#:key outputs #:allow-other-keys)
2718 (let* ((doc-output (assoc-ref outputs "doc"))
2719 (doc (string-append doc-output "/share/"
2720 ,name "-" ,version "/")))
2721 (invoke "invoke" "library-docs" "all")
2722 (mkdir-p doc)
2723 (copy-recursively "doc/libraries"
2724 (string-append doc "/libraries"))
2725 #t)))
2726 (replace 'check
2727 (lambda _
2728 (invoke "python" "utest/run.py"))))))
2729 (native-inputs
2730 `(("python-invoke" ,python-invoke)
2731 ("python-rellu" ,python-rellu)
2732 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2733 (outputs '("out" "doc"))
2734 (home-page "https://robotframework.org")
2735 (synopsis "Generic automation framework")
2736 (description "Robot Framework is a generic automation framework for
2737 acceptance testing, acceptance test driven development (ATDD), and robotic
2738 process automation (RPA).")
2739 (license license:asl2.0)))
2740
2741 (define-public python-robotframework-lint
2742 ;; There is no properly tagged release; the commit below seems to correspond
2743 ;; to the 0.9 stable release available from PyPI. The tests are not
2744 ;; included in the PyPI archive, so we fetch the sources from the upstream
2745 ;; Git repo.
2746 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2747 (revision "1"))
2748 (package
2749 (name "python-robotframework-lint")
2750 (version (git-version "0.9.0" revision commit))
2751 (source
2752 (origin
2753 (method git-fetch)
2754 (uri (git-reference
2755 (url "https://github.com/boakley/robotframework-lint.git")
2756 (commit commit)))
2757 (file-name (git-file-name name version))
2758 (sha256
2759 (base32
2760 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2761 (build-system python-build-system)
2762 (arguments
2763 `(#:phases
2764 (modify-phases %standard-phases
2765 (replace 'check
2766 (lambda _
2767 (invoke "python" "-m" "robot" "-A"
2768 "tests/conf/default.args" "tests"))))))
2769 (propagated-inputs
2770 `(("python-robotframework" ,python-robotframework)))
2771 (home-page "https://github.com/boakley/robotframework-lint/")
2772 (synopsis "Static analysis tool (linter) for Robot Framework")
2773 (description "This package provides the @code{rflint} command-line
2774 utility, a static analysis tool (linter) for Robot Framework source files.")
2775 (license license:asl2.0))))
2776
2777 (define-public python-robotframework-sshlibrary
2778 (package
2779 (name "python-robotframework-sshlibrary")
2780 (version "3.3.0")
2781 ;; There are no tests in the PyPI archive.
2782 (source
2783 (origin
2784 (method git-fetch)
2785 (uri (git-reference
2786 (url "https://github.com/robotframework/SSHLibrary.git")
2787 (commit (string-append "v" version))))
2788 (file-name (git-file-name name version))
2789 (sha256
2790 (base32
2791 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2792 (build-system python-build-system)
2793 (arguments
2794 `(#:phases
2795 (modify-phases %standard-phases
2796 (add-before 'build 'build-and-install-doc
2797 (lambda* (#:key outputs #:allow-other-keys)
2798 (let* ((doc-output (assoc-ref outputs "doc"))
2799 (doc (string-append doc-output "/share/"
2800 ,name "-" ,version "/")))
2801 (invoke "chmod" "-R" "+w" "docs")
2802 (invoke "invoke" "kw-docs" "project-docs")
2803 (mkdir-p doc)
2804 (for-each delete-file (find-files "docs" "\\.rst"))
2805 (copy-recursively "docs" doc)
2806 #t)))
2807 (replace 'check
2808 (lambda _
2809 ;; Some tests require an SSH server; we remove them.
2810 (delete-file "utest/test_client_api.py")
2811 (delete-file "utest/test_scp.py")
2812 (invoke "python" "utest/run.py"))))))
2813 (propagated-inputs
2814 `(("python-robotframework" ,python-robotframework)
2815 ("python-paramiko" ,python-paramiko)
2816 ("python-scp" ,python-scp)))
2817 (native-inputs
2818 `(("openssh" ,openssh)
2819 ("which" ,which)
2820 ;; To generate the documentation
2821 ("python-docutils" ,python-docutils)
2822 ("python-invoke" ,python-invoke)
2823 ("python-pygments" ,python-pygments)
2824 ("python-rellu" ,python-rellu)))
2825 (outputs '("out" "doc"))
2826 (home-page "https://github.com/robotframework/SSHLibrary")
2827 (synopsis "Robot Framework library for SSH and SFTP")
2828 (description "SSHLibrary is a Robot Framework library providing support
2829 for SSH and SFTP. It has the following main usages:
2830 @itemize @bullet
2831 @item Executing commands on the remote machine, either blocking or non-blocking.
2832 @item Writing and reading in an interactive shell.
2833 @item Transferring files and directories over SFTP.
2834 @item Ensuring that files and directories exist on the remote machine.
2835 @end itemize")
2836 (license license:asl2.0)))
2837
2838 (define-public python-scp
2839 (package
2840 (name "python-scp")
2841 (version "0.13.2")
2842 (source
2843 (origin
2844 (method url-fetch)
2845 (uri (pypi-uri "scp" version))
2846 (sha256
2847 (base32
2848 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2849 (build-system python-build-system)
2850 (arguments
2851 '(#:tests? #f)) ;tests require an SSH server
2852 (propagated-inputs
2853 `(("python-paramiko" ,python-paramiko)))
2854 (home-page "https://github.com/jbardin/scp.py")
2855 (synopsis "SCP protocol module for Python and Paramiko")
2856 (description "The scp module extends the Paramiko library to send and
2857 receive files via the SCP1 protocol, as implemented by the OpenSSH
2858 @command{scp} program.")
2859 (license license:gpl2+)))
2860
2861 (define-public python-rst.linker
2862 (package
2863 (name "python-rst.linker")
2864 (version "1.10")
2865 (source
2866 (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "rst.linker" version))
2869 (sha256
2870 (base32
2871 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2872 (build-system python-build-system)
2873 (propagated-inputs
2874 `(("python-dateutil" ,python-dateutil)
2875 ("python-six" ,python-six)))
2876 (native-inputs
2877 `(("python-setuptools-scm" ,python-setuptools-scm)))
2878 ;; Test would require path.py, which would introduce a cyclic dependence.
2879 (arguments `(#:tests? #f))
2880 ;; Note: As of version 1.7 the documentation is not worth building.
2881 (home-page "https://github.com/jaraco/rst.linker")
2882 (synopsis "Sphinx plugin to add links and timestamps")
2883 (description "rst.linker allows to automatically replace text by a
2884 reStructuredText external reference or timestamps. It's primary purpose is to
2885 augment the changelog, but it can be used for other documents, too.")
2886 (license license:expat)))
2887
2888 (define-public python2-rst.linker
2889 (package-with-python2 python-rst.linker))
2890
2891 (define-public python-feedgenerator
2892 (package
2893 (name "python-feedgenerator")
2894 (version "1.9")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "feedgenerator" version))
2899 (sha256
2900 (base32
2901 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2902 (modules '((guix build utils)))
2903 (snippet
2904 '(begin
2905 ;; Remove pre-compiled .pyc files from source.
2906 (for-each delete-file-recursively
2907 (find-files "." "__pycache__" #:directories? #t))
2908 (for-each delete-file (find-files "." "\\.pyc$"))
2909 #t))))
2910 (build-system python-build-system)
2911 (propagated-inputs
2912 `(("python-pytz" ,python-pytz)
2913 ("python-six" ,python-six)))
2914 (home-page "https://github.com/getpelican/feedgenerator")
2915 (synopsis
2916 "Standalone version of Django's Atom/RSS feed generator")
2917 (description
2918 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2919 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2920 (license license:bsd-3)))
2921
2922 (define-public python2-feedgenerator
2923 (package-with-python2 python-feedgenerator))
2924
2925 (define-public python-toml
2926 (package
2927 (name "python-toml")
2928 (version "0.9.4")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "toml" version))
2933 (sha256
2934 (base32
2935 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2936 (build-system python-build-system)
2937 (arguments
2938 `(#:tests? #f)) ;no tests suite in release
2939 (home-page "https://github.com/uiri/toml")
2940 (synopsis "Library for TOML")
2941 (description
2942 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2943 Language (TOML) configuration files.")
2944 (license license:expat)))
2945
2946 (define-public python-jsonrpc-server
2947 (package
2948 (name "python-jsonrpc-server")
2949 (version "0.1.2")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "python-jsonrpc-server" version))
2954 (sha256
2955 (base32
2956 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2957 (build-system python-build-system)
2958 (propagated-inputs
2959 `(("python-future" ,python-future)
2960 ("python-mock" ,python-mock)
2961 ("python-pytest" ,python-pytest)))
2962 (home-page
2963 "https://github.com/palantir/python-jsonrpc-server")
2964 (synopsis "JSON RPC 2.0 server library")
2965 (description
2966 "This package provides a JSON RPC 2.0 server library for Python.")
2967 (license license:expat)))
2968
2969 (define-public python-pydocstyle
2970 (package
2971 (name "python-pydocstyle")
2972 (version "3.0.0")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "pydocstyle" version))
2977 (sha256
2978 (base32
2979 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2980 (build-system python-build-system)
2981 (propagated-inputs
2982 `(("python-six" ,python-six)
2983 ("python-snowballstemmer" ,python-snowballstemmer)))
2984 (home-page
2985 "https://github.com/PyCQA/pydocstyle/")
2986 (synopsis "Python docstring style checker")
2987 (description
2988 "This package provides a style checker for the Python Language
2989 Server (PLS).")
2990 (license license:expat)))
2991
2992 (define-public python-language-server
2993 (package
2994 (name "python-language-server")
2995 (version "0.26.1")
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "python-language-server" version))
3000 (sha256
3001 (base32
3002 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-pluggy" ,python-pluggy)
3006 ("python-jsonrpc-server" ,python-jsonrpc-server)
3007 ("python-jedi" ,python-jedi)
3008 ("python-yapf" ,python-yapf)
3009 ("python-pyflakes" ,python-pyflakes)
3010 ("python-pydocstyle" ,python-pydocstyle)
3011 ("python-pycodestyle" ,python-pycodestyle)
3012 ("python-mccabe" ,python-mccabe)
3013 ("python-rope" ,python-rope)
3014 ("python-autopep8" ,python-autopep8)
3015 ("python-pylint" ,python-pylint)))
3016 (home-page "https://github.com/palantir/python-language-server")
3017 (synopsis "Python implementation of the Language Server Protocol")
3018 (description
3019 "The Python Language Server (pyls) is an implementation of the Python 3
3020 language specification for the Language Server Protocol (LSP). This tool is
3021 used in text editing environments to provide a complete and integrated
3022 feature-set for programming Python effectively.")
3023 (license license:expat)))
3024
3025 (define-public python-black
3026 (package
3027 (name "python-black")
3028 (version "18.6b4")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "black" version))
3033 (sha256
3034 (base32
3035 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3036 (build-system python-build-system)
3037 (arguments
3038 `(#:phases
3039 (modify-phases %standard-phases
3040 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3041 (lambda _
3042 (let ((python3 (which "python3")))
3043 (substitute* '("tests/data/fmtonoff.py"
3044 "tests/data/string_prefixes.py"
3045 "tests/data/function.py")
3046 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3047 (string-append "#!" python3 (if (string? minor-version)
3048 minor-version
3049 ""))))))))))
3050 (propagated-inputs
3051 `(("python-click" ,python-click)
3052 ("python-attrs" ,python-attrs)
3053 ("python-appdirs" ,python-appdirs)
3054 ("python-toml" ,python-toml)))
3055 (home-page "https://github.com/ambv/black")
3056 (synopsis "The uncompromising code formatter")
3057 (description "Black is the uncompromising Python code formatter.")
3058 (license license:expat)))
3059
3060 (define-public python-blinker
3061 (package
3062 (name "python-blinker")
3063 (version "1.4")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "blinker" version))
3068 (sha256
3069 (base32
3070 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3071 (build-system python-build-system)
3072 (home-page "http://pythonhosted.org/blinker/")
3073 (synopsis "Fast, simple object-to-object and broadcast signaling")
3074 (description
3075 "Blinker provides a fast dispatching system that allows any number of
3076 interested parties to subscribe to events, or \"signals\".")
3077 (license license:expat)))
3078
3079 (define-public python2-blinker
3080 (package-with-python2 python-blinker))
3081
3082 (define-public pelican
3083 (package
3084 (name "pelican")
3085 (version "4.0.1")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "pelican" version))
3090 (sha256
3091 (base32
3092 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3093 (build-system python-build-system)
3094 (propagated-inputs
3095 `(("python-feedgenerator" ,python-feedgenerator)
3096 ("python-jinja2" ,python-jinja2)
3097 ("python-pygments" ,python-pygments)
3098 ("python-docutils" ,python-docutils)
3099 ("python-pytz" ,python-pytz)
3100 ("python-blinker" ,python-blinker)
3101 ("python-unidecode" ,python-unidecode)
3102 ("python-six" ,python-six)
3103 ("python-dateutil" ,python-dateutil)
3104 ("python-markdown" ,python-markdown)))
3105 (home-page "https://getpelican.com/")
3106 (arguments
3107 `(;; XXX Requires a lot more packages to do unit tests :P
3108 #:tests? #f
3109 #:phases (modify-phases %standard-phases
3110 (add-before
3111 'install 'adjust-requires
3112 ;; Since feedgenerator is installed from git, it doesn't
3113 ;; conform to the version requirements.
3114 ;;
3115 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3116 ;; version requirement so setuptools doesn't get confused.
3117 (lambda _
3118 (substitute* "setup.py"
3119 (("['\"]feedgenerator.*?['\"]")
3120 "'feedgenerator'")))))))
3121 (synopsis "Python-based static site publishing system")
3122 (description
3123 "Pelican is a tool to generate a static blog from reStructuredText,
3124 Markdown input files, and more. Pelican uses Jinja2 for templating
3125 and is very extensible.")
3126 (license license:agpl3+)))
3127
3128 (define-public mallard-ducktype
3129 (package
3130 (name "mallard-ducktype")
3131 (version "1.0.1")
3132 (source
3133 (origin
3134 (method git-fetch)
3135 ;; git-reference because a proper source tarball is not available
3136 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3137 (uri (git-reference
3138 (url "https://github.com/projectmallard/mallard-ducktype.git")
3139 (commit version)))
3140 (file-name (git-file-name name version))
3141 (sha256
3142 (base32
3143 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3144 (build-system python-build-system)
3145 (home-page "http://projectmallard.org")
3146 (synopsis "Convert Ducktype to Mallard documentation markup")
3147 (description
3148 "Ducktype is a lightweight syntax that can represent all the semantics
3149 of the Mallard XML documentation system. Ducktype files can be converted to
3150 Mallard using the @command{ducktype} tool. The yelp-tools package
3151 provides additional functionality on the produced Mallard documents.")
3152 (license license:expat)))
3153
3154 (define-public python-scikit-image
3155 (package
3156 (name "python-scikit-image")
3157 (version "0.14.2")
3158 (source
3159 (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "scikit-image" version))
3162 (sha256
3163 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3164 (build-system python-build-system)
3165 (arguments
3166 ;; TODO: Some tests require running X11 server. Disable them?
3167 '(#:tests? #f))
3168 ;; See DEPENDS.txt for the list of build and run time requiremnts
3169 (propagated-inputs
3170 `(("python-cloudpickle" ,python-cloudpickle)
3171 ("python-dask" ,python-dask)
3172 ("python-matplotlib" ,python-matplotlib)
3173 ("python-networkx" ,python-networkx)
3174 ("python-numpy" ,python-numpy)
3175 ("python-pillow" ,python-pillow)
3176 ("python-pywavelets" ,python-pywavelets)
3177 ("python-scipy" ,python-scipy)
3178 ("python-six" ,python-six)))
3179 (native-inputs
3180 `(("python-cython" ,python-cython)))
3181 (home-page "http://scikit-image.org/")
3182 (synopsis "Image processing in Python")
3183 (description
3184 "Scikit-image is a collection of algorithms for image processing.")
3185 (license license:bsd-3)))
3186
3187 (define-public python2-scikit-image
3188 (package-with-python2 python-scikit-image))
3189
3190 (define-public python-cython
3191 (package
3192 (name "python-cython")
3193 (version "0.29.11")
3194 (source
3195 (origin
3196 (method url-fetch)
3197 (uri (pypi-uri "Cython" version))
3198 (sha256
3199 (base32
3200 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
3201 (build-system python-build-system)
3202 ;; we need the full python package and not just the python-wrapper
3203 ;; because we need libpython3.3m.so
3204 (inputs
3205 `(("python" ,python)))
3206 (arguments
3207 `(#:phases
3208 (modify-phases %standard-phases
3209 (add-before 'check 'set-HOME
3210 ;; some tests require access to "$HOME/.cython"
3211 (lambda _ (setenv "HOME" "/tmp") #t))
3212
3213 ;; FIXME: These tests started failing on armhf after the 0.28 update
3214 ;; (commit c69d11c5930), both with an error such as this:
3215 ;; compiling (cpp) and running dictcomp ...
3216 ;; === C/C++ compiler error output: ===
3217 ;; ‘
3218 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3219 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3220 ,@(if (target-arm32?)
3221 `((add-before 'check 'disable-failing-tests
3222 (lambda _
3223 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3224 (for-each (lambda (test)
3225 (format disabled-tests "~a\n" test))
3226 '("memslice" "dictcomp"))
3227 (close-port disabled-tests)))))
3228 '())
3229
3230 (replace 'check
3231 (lambda _
3232 (invoke "python" "runtests.py" "-vv"))))))
3233 (home-page "https://cython.org/")
3234 (synopsis "C extensions for Python")
3235 (description "Cython is an optimising static compiler for both the Python
3236 programming language and the extended Cython programming language. It makes
3237 writing C extensions for Python as easy as Python itself.")
3238 (license license:asl2.0)
3239 (properties `((python2-variant . ,(delay python2-cython))))))
3240
3241 (define-public python2-cython
3242 (package (inherit (package-with-python2
3243 (strip-python2-variant python-cython)))
3244 (name "python2-cython")
3245 (inputs
3246 `(("python-2" ,python-2))))) ; this is not automatically changed
3247
3248 ;; The RPython toolchain currently does not support Python 3.
3249 (define-public python2-rpython
3250 (package
3251 (name "python2-rpython")
3252 (version "0.2.1")
3253 (source
3254 (origin
3255 (method url-fetch)
3256 (uri (pypi-uri "rpython" version))
3257 (sha256
3258 (base32
3259 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3260 (build-system python-build-system)
3261 (arguments `(#:python ,python-2))
3262 (native-inputs
3263 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3264 (home-page "https://rpython.readthedocs.org")
3265 (synopsis "Framework for implementing interpreters and virtual machines")
3266 (description "RPython is a translation and support framework for
3267 producing implementations of dynamic languages, emphasizing a clean separation
3268 between language specification and implementation aspects.")
3269 (license license:expat)))
3270
3271 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3272 ;; python-scipy still build, as these three packages are often used together.
3273 (define-public python-numpy
3274 (package
3275 (name "python-numpy")
3276 (version "1.15.4")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (string-append
3281 "https://github.com/numpy/numpy/releases/download/v"
3282 version "/numpy-" version ".tar.gz"))
3283 (sha256
3284 (base32
3285 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3286 (build-system python-build-system)
3287 (inputs
3288 `(("openblas" ,openblas)
3289 ("lapack" ,lapack)))
3290 (native-inputs
3291 `(("python-cython" ,python-cython)
3292 ("python-pytest" ,python-pytest)
3293 ("gfortran" ,gfortran)))
3294 (arguments
3295 `(#:phases
3296 (modify-phases %standard-phases
3297 (add-before 'build 'configure-blas-lapack
3298 (lambda* (#:key inputs #:allow-other-keys)
3299 (call-with-output-file "site.cfg"
3300 (lambda (port)
3301 (format port
3302 "[openblas]
3303 libraries = openblas
3304 library_dirs = ~a/lib
3305 include_dirs = ~a/include
3306
3307 # backslash-n to make emacs happy
3308 \n[lapack]
3309 lapack_libs = lapack
3310 library_dirs = ~a/lib
3311 include_dirs = ~a/include
3312 "
3313 (assoc-ref inputs "openblas")
3314 (assoc-ref inputs "openblas")
3315 (assoc-ref inputs "lapack")
3316 (assoc-ref inputs "lapack"))))
3317 #t))
3318 (add-before 'build 'fix-executable-paths
3319 (lambda* (#:key inputs #:allow-other-keys)
3320 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3321 ;; instead of /bin/sh.
3322 (substitute* "numpy/distutils/exec_command.py"
3323 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3324 (string-append match-start (assoc-ref inputs "bash") match-end)))
3325 ;; Use "gcc" executable, not "cc".
3326 (substitute* "numpy/distutils/system_info.py"
3327 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3328 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3329 #t))
3330 ;; Tests can only be run after the library has been installed and not
3331 ;; within the source directory.
3332 (delete 'check)
3333 (add-after 'install 'check
3334 (lambda* (#:key outputs inputs #:allow-other-keys)
3335 ;; Make installed package available for running the tests
3336 (add-installed-pythonpath inputs outputs)
3337 ;; Make sure "f2py" etc is found.
3338 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3339 ":" (getenv "PATH")))
3340 (with-directory-excursion "/tmp"
3341 (invoke "python" "-c"
3342 "import numpy; numpy.test(verbose=2)")))))))
3343 (home-page "http://www.numpy.org/")
3344 (synopsis "Fundamental package for scientific computing with Python")
3345 (description "NumPy is the fundamental package for scientific computing
3346 with Python. It contains among other things: a powerful N-dimensional array
3347 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3348 and Fortran code, useful linear algebra, Fourier transform, and random number
3349 capabilities.")
3350 (license license:bsd-3)))
3351
3352 (define-public python2-numpy
3353 (package-with-python2 python-numpy))
3354
3355 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3356 ;; interest only for legacy code going back to NumPy's predecessor
3357 ;; Numeric.
3358 (define-public python2-numpy-1.8
3359 (package (inherit python2-numpy)
3360 (version "1.8.2")
3361 (source
3362 (origin
3363 (method url-fetch)
3364 (uri (string-append
3365 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3366 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3367 (sha256
3368 (base32
3369 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3370 (arguments
3371 (substitute-keyword-arguments (package-arguments python2-numpy)
3372 ((#:phases phases)
3373 `(modify-phases ,phases
3374 (replace 'configure-blas-lapack
3375 (lambda* (#:key inputs #:allow-other-keys)
3376 (call-with-output-file "site.cfg"
3377 (lambda (port)
3378 (format port
3379 "[openblas]
3380 libraries = openblas,lapack
3381 library_dirs = ~a/lib:~a/lib
3382 include_dirs = ~a/include:~a/include
3383 "
3384 (assoc-ref inputs "openblas")
3385 (assoc-ref inputs "lapack")
3386 (assoc-ref inputs "openblas")
3387 (assoc-ref inputs "lapack"))))
3388 #t))))))
3389 (native-inputs
3390 `(("python2-nose" ,python2-nose)))
3391 (description "NumPy is the fundamental package for scientific computing
3392 with Python. It contains among other things: a powerful N-dimensional array
3393 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3394 and Fortran code, useful linear algebra, Fourier transform, and random number
3395 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3396 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3397 Numeric.")
3398 (license license:bsd-3)))
3399
3400 (define-public python-munch
3401 (package
3402 (name "python-munch")
3403 (version "2.0.4")
3404 (source
3405 (origin
3406 (method url-fetch)
3407 (uri (pypi-uri "munch" version))
3408 (sha256
3409 (base32
3410 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3411 (build-system python-build-system)
3412 (home-page "https://github.com/Infinidat/munch")
3413 (synopsis "Dot-accessible dictionary")
3414 (description "Munch is a dot-accessible dictionary similar to JavaScript
3415 objects.")
3416 (license license:expat)))
3417
3418 (define-public python2-munch
3419 (package-with-python2 python-munch))
3420
3421 (define-public python-colormath
3422 (package
3423 (name "python-colormath")
3424 (version "3.0.0")
3425 (source
3426 (origin
3427 (method url-fetch)
3428 (uri (pypi-uri "colormath" version))
3429 (sha256
3430 (base32
3431 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3432 (build-system python-build-system)
3433 (propagated-inputs
3434 `(("python-networkx" ,python-networkx)
3435 ("python-numpy" ,python-numpy)))
3436 (home-page "https://github.com/gtaylor/python-colormath")
3437 (synopsis "Color math and conversion library")
3438 (description
3439 "This is a Python library for color math and conversions.")
3440 (license license:bsd-3)))
3441
3442 (define-public python2-colormath
3443 (package-with-python2 python-colormath))
3444
3445 (define-public python-spectra
3446 (package
3447 (name "python-spectra")
3448 (version "0.0.11")
3449 (source
3450 (origin
3451 (method url-fetch)
3452 (uri (pypi-uri "spectra" version))
3453 (sha256
3454 (base32
3455 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3456 (build-system python-build-system)
3457 (arguments
3458 `(#:phases
3459 (modify-phases %standard-phases
3460 (replace 'check
3461 (lambda _ (invoke "nosetests" "-v"))))))
3462 (propagated-inputs
3463 `(("python-colormath" ,python-colormath)))
3464 (native-inputs
3465 `(("python-nose" ,python-nose)))
3466 (home-page "https://github.com/jsvine/spectra")
3467 (synopsis "Color scales and color conversion")
3468 (description
3469 "This package provides a Python library intended to make color math,
3470 color scales, and color space conversion easy. It has support for:
3471
3472 @enumerate
3473 @item Color scales
3474 @item Color ranges
3475 @item Color blending
3476 @item Brightening/darkening colors
3477 @item Saturating/desaturating colors
3478 @item Conversion to/from multiple color spaces.
3479 @end enumerate\n")
3480 (license license:expat)))
3481
3482 (define-public python2-spectra
3483 (package-with-python2 python-spectra))
3484
3485 (define-public python-numpy-documentation
3486 (package
3487 (name "python-numpy-documentation")
3488 (version (package-version python-numpy))
3489 (source (package-source python-numpy))
3490 (build-system python-build-system)
3491 (native-inputs
3492 `(("python-matplotlib" ,python-matplotlib)
3493 ("python-numpy" ,python-numpy)
3494 ("pkg-config" ,pkg-config)
3495 ("python-sphinx" ,python-sphinx)
3496 ("python-numpydoc" ,python-numpydoc)
3497 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3498 texlive-fonts-cm-super
3499 texlive-fonts-ec
3500 texlive-generic-ifxetex
3501 texlive-generic-pdftex
3502 texlive-latex-amsfonts
3503 texlive-latex-capt-of
3504 texlive-latex-cmap
3505 texlive-latex-environ
3506 texlive-latex-eqparbox
3507 texlive-latex-etoolbox
3508 texlive-latex-expdlist
3509 texlive-latex-fancyhdr
3510 texlive-latex-fancyvrb
3511 texlive-latex-fncychap
3512 texlive-latex-float
3513 texlive-latex-framed
3514 texlive-latex-geometry
3515 texlive-latex-graphics
3516 texlive-latex-hyperref
3517 texlive-latex-mdwtools
3518 texlive-latex-multirow
3519 texlive-latex-needspace
3520 texlive-latex-oberdiek
3521 texlive-latex-parskip
3522 texlive-latex-preview
3523 texlive-latex-tabulary
3524 texlive-latex-threeparttable
3525 texlive-latex-titlesec
3526 texlive-latex-trimspaces
3527 texlive-latex-ucs
3528 texlive-latex-upquote
3529 texlive-latex-url
3530 texlive-latex-varwidth
3531 texlive-latex-wrapfig)))
3532 ("texinfo" ,texinfo)
3533 ("perl" ,perl)
3534 ("scipy-sphinx-theme"
3535 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3536 (method git-fetch)
3537 (uri (git-reference
3538 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3539 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3540 (sha256
3541 (base32
3542 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3543 ,@(package-native-inputs python-numpy)))
3544 (arguments
3545 `(#:tests? #f ; we're only generating the documentation
3546 #:phases
3547 (modify-phases %standard-phases
3548 (delete 'build)
3549 (replace 'install
3550 (lambda* (#:key inputs outputs #:allow-other-keys)
3551 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3552 (doc (string-append
3553 data "/doc/" ,name "-"
3554 ,(package-version python-numpy)))
3555 (info-reader (string-append data "/info"))
3556 (html (string-append doc "/html"))
3557 (scipy-sphinx-theme "scipy-sphinx-theme")
3558 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3559 (pyver ,(string-append "PYVER=")))
3560
3561 ;; FIXME: this is needed to for texlive-union to generate
3562 ;; fonts, which are not found.
3563 (setenv "HOME" "/tmp")
3564
3565 (with-directory-excursion "doc"
3566 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3567 (mkdir-p html)
3568 (invoke "make" "html" pyver)
3569 (invoke "make" "latex" "PAPER=a4" pyver)
3570 (invoke "make" "-C" "build/latex"
3571 "all-pdf" "PAPER=a4" pyver)
3572 ;; FIXME: Generation of the info file fails.
3573 ;; (invoke "make" "info" pyver)
3574 ;; (mkdir-p info)
3575 ;; (copy-file "build/texinfo/numpy.info"
3576 ;; (string-append info "/numpy.info"))
3577 (for-each (lambda (file)
3578 (copy-file (string-append "build/latex" file)
3579 (string-append doc file)))
3580 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3581 (with-directory-excursion "build/html"
3582 (for-each (lambda (file)
3583 (let* ((dir (dirname file))
3584 (tgt-dir (string-append html "/" dir)))
3585 (unless (equal? "." dir)
3586 (mkdir-p tgt-dir))
3587 (install-file file html)))
3588 (find-files "." ".*")))))
3589 #t)))))
3590 (home-page (package-home-page python-numpy))
3591 (synopsis "Documentation for the python-numpy package")
3592 (description (package-description python-numpy))
3593 (license (package-license python-numpy))))
3594
3595 (define-public python2-numpy-documentation
3596 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3597 (package
3598 (inherit numpy-documentation)
3599 (native-inputs `(("python2-functools32" ,python2-functools32)
3600 ,@(package-native-inputs numpy-documentation))))))
3601
3602 (define-public python-pygit2
3603 (package
3604 (name "python-pygit2")
3605 (version "0.28.2")
3606 (source
3607 (origin
3608 (method url-fetch)
3609 (uri (pypi-uri "pygit2" version))
3610 (sha256
3611 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3612 (build-system python-build-system)
3613 (arguments
3614 '(#:tests? #f)) ; tests don't run correctly in our environment
3615 (propagated-inputs
3616 `(("python-six" ,python-six)
3617 ("python-cffi" ,python-cffi)
3618 ("libgit2" ,libgit2)
3619 ("python-tox" ,python-tox)))
3620 (native-inputs
3621 `(("python-pytest" ,python-pytest)))
3622 (home-page "https://github.com/libgit2/pygit2")
3623 (synopsis "Python bindings for libgit2")
3624 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3625 library, libgit2 implements Git plumbing.")
3626 ;; GPL2.0 only, with linking exception.
3627 (license license:gpl2)))
3628
3629 (define-public python2-pygit2
3630 (package-with-python2 python-pygit2))
3631
3632 (define-public python-pyparsing
3633 (package
3634 (name "python-pyparsing")
3635 (version "2.3.1")
3636 (source
3637 (origin
3638 (method url-fetch)
3639 (uri (pypi-uri "pyparsing" version))
3640 (sha256
3641 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3642 (build-system python-build-system)
3643 (outputs '("out" "doc"))
3644 (arguments
3645 `(#:tests? #f ; no test target
3646 #:phases
3647 (modify-phases %standard-phases
3648 (add-after 'install 'install-doc
3649 (lambda* (#:key outputs #:allow-other-keys)
3650 (let* ((doc (string-append (assoc-ref outputs "doc")
3651 "/share/doc/" ,name "-" ,version))
3652 (html-doc (string-append doc "/html"))
3653 (examples (string-append doc "/examples")))
3654 (mkdir-p html-doc)
3655 (mkdir-p examples)
3656 (for-each
3657 (lambda (dir tgt)
3658 (map (lambda (file)
3659 (install-file file tgt))
3660 (find-files dir ".*")))
3661 (list "docs" "htmldoc" "examples")
3662 (list doc html-doc examples))
3663 #t))))))
3664 (home-page "https://github.com/pyparsing/pyparsing")
3665 (synopsis "Python parsing class library")
3666 (description
3667 "The pyparsing module is an alternative approach to creating and
3668 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3669 of regular expressions. The pyparsing module provides a library of classes
3670 that client code uses to construct the grammar directly in Python code.")
3671 (license license:expat)))
3672
3673 (define-public python2-pyparsing
3674 (package-with-python2 python-pyparsing))
3675
3676 (define-public python-numpydoc
3677 (package
3678 (name "python-numpydoc")
3679 (version "0.8.0")
3680 (source
3681 (origin
3682 (method url-fetch)
3683 (uri (pypi-uri "numpydoc" version))
3684 (sha256
3685 (base32
3686 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3687 (build-system python-build-system)
3688 (propagated-inputs
3689 `(("python-sphinx" ,python-sphinx)))
3690 (native-inputs
3691 `(("python-nose" ,python-nose)))
3692 (home-page "https://pypi.python.org/pypi/numpydoc")
3693 (synopsis
3694 "Numpy's Sphinx extensions")
3695 (description
3696 "Sphinx extension to support docstrings in Numpy format.")
3697 (license license:bsd-2)))
3698
3699 (define-public python2-numpydoc
3700 (package-with-python2 python-numpydoc))
3701
3702 (define-public python-numexpr
3703 (package
3704 (name "python-numexpr")
3705 (version "2.6.5")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (pypi-uri "numexpr" version))
3710 (sha256
3711 (base32
3712 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3713 (build-system python-build-system)
3714 (arguments `(#:tests? #f)) ; no tests included
3715 (propagated-inputs
3716 `(("python-numpy" ,python-numpy)))
3717 (home-page "https://github.com/pydata/numexpr")
3718 (synopsis "Fast numerical expression evaluator for NumPy")
3719 (description
3720 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3721 expressions that operate on arrays are accelerated and use less memory than
3722 doing the same calculation in Python. In addition, its multi-threaded
3723 capabilities can make use of all your cores, which may accelerate
3724 computations, most specially if they are not memory-bounded (e.g. those using
3725 transcendental functions).")
3726 (license license:expat)))
3727
3728 (define-public python2-numexpr
3729 (package-with-python2 python-numexpr))
3730
3731 (define-public python-cycler
3732 (package
3733 (name "python-cycler")
3734 (version "0.10.0")
3735 (source (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "cycler" version))
3738 (sha256
3739 (base32
3740 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3741 (build-system python-build-system)
3742 (arguments
3743 ;; XXX: The current version requires 'coveralls' which we don't have.
3744 ;; Enable this for the next release which uses 'python-pytest'.
3745 '(#:tests? #f))
3746 (propagated-inputs
3747 `(("python-six" ,python-six)))
3748 (home-page "http://matplotlib.org/cycler/")
3749 (synopsis "Composable keyword argument iterator")
3750 (description
3751 "When using @code{matplotlib} and plotting more than one line, it is
3752 common to want to be able to want to be able to cycle over one or more artist
3753 styles; but the plotting logic can quickly become involved.
3754 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3755 @code{Cycler} class was developed.")
3756 (license license:bsd-3)))
3757
3758 (define-public python2-cycler
3759 (package-with-python2 python-cycler))
3760
3761 (define-public python-colorspacious
3762 (package
3763 (name "python-colorspacious")
3764 (version "1.1.0")
3765 (source
3766 (origin
3767 (method git-fetch)
3768 (uri (git-reference
3769 (url "https://github.com/njsmith/colorspacious.git")
3770 (commit (string-append "v" version))))
3771 (file-name (git-file-name name version))
3772 (sha256
3773 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3774 (build-system python-build-system)
3775 (propagated-inputs
3776 `(("python-numpy" ,python-numpy)))
3777 (native-inputs
3778 `(("python-nose" ,python-nose)))
3779 (arguments
3780 `(#:phases
3781 (modify-phases %standard-phases
3782 (replace 'check
3783 (lambda _
3784 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3785 (home-page "https://github.com/njsmith/colorspacious")
3786 (synopsis "Python library for colorspace conversions")
3787 (description "@code{colorspacious} is a Python library that lets you
3788 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3789 (license license:expat)))
3790
3791 (define-public python2-colorspacious
3792 (package-with-python2 python-colorspacious))
3793
3794 (define-public python-matplotlib
3795 (package
3796 (name "python-matplotlib")
3797 (version "2.2.3")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "matplotlib" version))
3802 (sha256
3803 (base32
3804 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3805 (build-system python-build-system)
3806 (propagated-inputs ; the following packages are all needed at run time
3807 `(("python-cycler" ,python-cycler)
3808 ("python-kiwisolver" ,python-kiwisolver)
3809 ("python-pyparsing" ,python-pyparsing)
3810 ("python-pygobject" ,python-pygobject)
3811 ("gobject-introspection" ,gobject-introspection)
3812 ("python-tkinter" ,python "tk")
3813 ("python-dateutil" ,python-dateutil)
3814 ("python-numpy" ,python-numpy)
3815 ("python-pillow" ,python-pillow)
3816 ("python-pytz" ,python-pytz)
3817 ("python-six" ,python-six)
3818 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3819 ;; from 'gtk+') provides the required 'typelib' files used by
3820 ;; 'gobject-introspection'. The location of these files is set with the
3821 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3822 ;; is done automatically by a 'native-search-path' procedure. However,
3823 ;; at run-time the user must set this variable as follows:
3824 ;;
3825 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3826 ("gtk+" ,gtk+)
3827 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3828 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3829 ;; object. For this reason we need to import both libraries.
3830 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3831 ("python-pycairo" ,python-pycairo)
3832 ;; XXX: qtwebkit cannot be built reliably.
3833 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3834 ("python-cairocffi" ,python-cairocffi)))
3835 (inputs
3836 `(("libpng" ,libpng)
3837 ("imagemagick" ,imagemagick)
3838 ("freetype" ,freetype)
3839 ("cairo" ,cairo)
3840 ("glib" ,glib)
3841 ;; FIXME: Add backends when available.
3842 ;("python-wxpython" ,python-wxpython)
3843 ("tcl" ,tcl)
3844 ("tk" ,tk)))
3845 (native-inputs
3846 `(("pkg-config" ,pkg-config)
3847 ("python-nose" ,python-nose)
3848 ("python-mock" ,python-mock)))
3849 (arguments
3850 `(#:phases
3851 (modify-phases %standard-phases
3852 (add-before 'build 'configure-environment
3853 (lambda* (#:key outputs inputs #:allow-other-keys)
3854 (let ((cairo (assoc-ref inputs "cairo"))
3855 (gtk+ (assoc-ref inputs "gtk+")))
3856 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3857 ;; has not effect.
3858 (setenv "LD_LIBRARY_PATH"
3859 (string-append cairo "/lib:" gtk+ "/lib"))
3860 (setenv "HOME" (getcwd))
3861 (call-with-output-file "setup.cfg"
3862 (lambda (port)
3863 (format port "[directories]~%
3864 basedirlist = ~a,~a~%
3865 [rc_options]~%
3866 backend = TkAgg~%"
3867 (assoc-ref inputs "tcl")
3868 (assoc-ref inputs "tk")))))
3869 #t)))))
3870 (home-page "http://matplotlib.org")
3871 (synopsis "2D plotting library for Python")
3872 (description
3873 "Matplotlib is a Python 2D plotting library which produces publication
3874 quality figures in a variety of hardcopy formats and interactive environments
3875 across platforms. Matplotlib can be used in Python scripts, the python and
3876 ipython shell, web application servers, and six graphical user interface
3877 toolkits.")
3878 (license license:psfl)
3879 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3880
3881 (define-public python2-matplotlib
3882 (let ((matplotlib (package-with-python2
3883 (strip-python2-variant python-matplotlib))))
3884 (package (inherit matplotlib)
3885 ;; Make sure to use special packages for Python 2 instead
3886 ;; of those automatically rewritten by package-with-python2.
3887 (propagated-inputs
3888 `(("python2-pycairo" ,python2-pycairo)
3889 ("python2-backports-functools-lru-cache"
3890 ,python2-backports-functools-lru-cache)
3891 ("python2-functools32" ,python2-functools32)
3892 ("python2-pygobject-2" ,python2-pygobject-2)
3893 ("python2-subprocess32" ,python2-subprocess32)
3894 ("python2-tkinter" ,python-2 "tk")
3895 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3896 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3897
3898 (define-public python-matplotlib-documentation
3899 (package
3900 (name "python-matplotlib-documentation")
3901 (version (package-version python-matplotlib))
3902 (source (package-source python-matplotlib))
3903 (build-system python-build-system)
3904 (native-inputs
3905 `(("python-matplotlib" ,python-matplotlib)
3906 ("python-colorspacious" ,python-colorspacious)
3907 ("python-sphinx" ,python-sphinx)
3908 ("python-sphinx-gallery" ,python-sphinx-gallery)
3909 ("python-numpydoc" ,python-numpydoc)
3910 ("python-ipython" ,python-ipython)
3911 ("python-ipykernel" ,python-ipykernel)
3912 ("python-mock" ,python-mock)
3913 ("graphviz" ,graphviz)
3914 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3915 texlive-latex-amsmath
3916 texlive-latex-enumitem
3917 texlive-latex-expdlist
3918 texlive-latex-geometry
3919 texlive-latex-preview
3920 texlive-latex-type1cm
3921 texlive-latex-ucs
3922
3923 texlive-generic-pdftex
3924
3925 texlive-fonts-amsfonts
3926 texlive-fonts-ec
3927 texlive-fonts-adobe-times
3928 texlive-fonts-txfonts)))
3929 ("texinfo" ,texinfo)
3930 ,@(package-native-inputs python-matplotlib)))
3931 (arguments
3932 `(#:tests? #f ; we're only generating documentation
3933 #:phases
3934 (modify-phases %standard-phases
3935 (replace 'build
3936 (lambda _
3937 (chdir "doc")
3938 (setenv "PYTHONPATH"
3939 (string-append (getenv "PYTHONPATH")
3940 ":" (getcwd) "/../examples/units"))
3941 (substitute* "conf.py"
3942 ;; Don't use git.
3943 (("^SHA = check_output.*")
3944 (string-append "SHA = \"" ,version "\"\n"))
3945 ;; Don't fetch intersphinx files from the Internet
3946 (("^explicit_order_folders" m)
3947 (string-append "intersphinx_mapping = {}\n" m))
3948 (("'sphinx.ext.intersphinx',") "")
3949 ;; Disable URL embedding which requires internet access.
3950 (("'https://docs.scipy.org/doc/numpy'") "None")
3951 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3952 (invoke "make"
3953 "SPHINXBUILD=sphinx-build"
3954 "SPHINXOPTS=" ; don't abort on warnings
3955 "html" "texinfo")))
3956 (replace 'install
3957 (lambda* (#:key inputs outputs #:allow-other-keys)
3958 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3959 (doc (string-append data "/doc/python-matplotlib-" ,version))
3960 (info (string-append data "/info"))
3961 (html (string-append doc "/html")))
3962 (mkdir-p html)
3963 (mkdir-p info)
3964 (copy-recursively "build/html" html)
3965 (symlink (string-append html "/_images")
3966 (string-append info "/matplotlib-figures"))
3967 (with-directory-excursion "build/texinfo"
3968 (substitute* "matplotlib.texi"
3969 (("@image\\{([^,]*)" all file)
3970 (string-append "@image{matplotlib-figures/" file)))
3971 (symlink (string-append html "/_images")
3972 "./matplotlib-figures")
3973 (invoke "makeinfo" "--no-split"
3974 "-o" "matplotlib.info" "matplotlib.texi"))
3975 (install-file "build/texinfo/matplotlib.info" info))
3976 #t)))))
3977 (home-page (package-home-page python-matplotlib))
3978 (synopsis "Documentation for the python-matplotlib package")
3979 (description (package-description python-matplotlib))
3980 (license (package-license python-matplotlib))))
3981
3982 (define-public python2-matplotlib-documentation
3983 (package-with-python2 python-matplotlib-documentation))
3984
3985 (define-public python-matplotlib-venn
3986 (package
3987 (name "python-matplotlib-venn")
3988 (version "0.11.5")
3989 (source
3990 (origin
3991 (method url-fetch)
3992 (uri (pypi-uri "matplotlib-venn" version ".zip"))
3993 (sha256
3994 (base32
3995 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
3996 (build-system python-build-system)
3997 (arguments '(#:tests? #f)) ; tests are not included
3998 (propagated-inputs
3999 `(("python-matplotlib" ,python-matplotlib)
4000 ("python-numpy" ,python-numpy)
4001 ("python-scipy" ,python-scipy)))
4002 (native-inputs
4003 `(("unzip" ,unzip)))
4004 (home-page "https://github.com/konstantint/matplotlib-venn")
4005 (synopsis "Plot area-proportional Venn diagrams")
4006 (description
4007 "This package provides tools for plotting area-proportional two- and
4008 three-way Venn diagrams in @code{matplotlib}.")
4009 (license license:expat)))
4010
4011 (define-public python2-pysnptools
4012 (package
4013 (name "python2-pysnptools")
4014 (version "0.3.13")
4015 (source
4016 (origin
4017 (method url-fetch)
4018 (uri (pypi-uri "pysnptools" version))
4019 (sha256
4020 (base32
4021 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4022 (build-system python-build-system)
4023 (arguments
4024 `(#:python ,python-2 ; only Python 2.7 is supported
4025 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4026 (propagated-inputs
4027 `(("python2-numpy" ,python2-numpy)
4028 ("python2-scipy" ,python2-scipy)
4029 ("python2-pandas" ,python2-pandas)))
4030 (native-inputs
4031 `(("python2-cython" ,python2-cython)))
4032 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4033 (synopsis "Library for reading and manipulating genetic data")
4034 (description
4035 "PySnpTools is a library for reading and manipulating genetic data. It
4036 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4037 those files. It can also efficiently manipulate ranges of integers using set
4038 operators such as union, intersection, and difference.")
4039 (license license:asl2.0)))
4040
4041 (define-public python-scipy
4042 (package
4043 (name "python-scipy")
4044 (version "1.2.2")
4045 (source
4046 (origin
4047 (method url-fetch)
4048 (uri (pypi-uri "scipy" version))
4049 (sha256
4050 (base32
4051 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4052 (build-system python-build-system)
4053 (propagated-inputs
4054 `(("python-numpy" ,python-numpy)
4055 ("python-matplotlib" ,python-matplotlib)
4056 ("python-pyparsing" ,python-pyparsing)))
4057 (inputs
4058 `(("lapack" ,lapack)
4059 ("openblas" ,openblas)))
4060 (native-inputs
4061 `(("python-cython" ,python-cython)
4062 ("python-pytest" ,python-pytest)
4063 ("python-sphinx" ,python-sphinx)
4064 ("python-numpydoc" ,python-numpydoc)
4065 ("gfortran" ,gfortran)
4066 ("perl" ,perl)
4067 ("which" ,which)))
4068 (outputs '("out" "doc"))
4069 (arguments
4070 `(#:phases
4071 (modify-phases %standard-phases
4072 (add-after 'unpack 'disable-broken-tests
4073 (lambda _
4074 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4075 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4076 (string-append indent
4077 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4078 m)))
4079 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4080 (("^def test_parallel_threads\\(\\):" m)
4081 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4082 m)))
4083 #t))
4084 (add-before 'build 'configure-openblas
4085 (lambda* (#:key inputs #:allow-other-keys)
4086 (call-with-output-file "site.cfg"
4087 (lambda (port)
4088 (format port
4089 "[blas]
4090 libraries = openblas
4091 library_dirs = ~a/lib
4092 include_dirs = ~a/include
4093
4094 # backslash-n to make emacs happy
4095 \n[atlas]
4096 library_dirs = ~a/lib
4097 atlas_libs = openblas
4098 "
4099 (assoc-ref inputs "openblas")
4100 (assoc-ref inputs "openblas")
4101 (assoc-ref inputs "openblas"))))
4102 #t))
4103 (add-after 'install 'install-doc
4104 (lambda* (#:key inputs outputs #:allow-other-keys)
4105 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4106 (doc (string-append data "/doc/" ,name "-" ,version))
4107 (html (string-append doc "/html"))
4108 (pyver ,(string-append "PYVER=" (version-major+minor
4109 (package-version python))))
4110 ;; By default it tries to run sphinx-build through the Python
4111 ;; interpreter which won't work with our shell wrapper.
4112 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4113 ;; Make installed package available for building the
4114 ;; documentation
4115 (add-installed-pythonpath inputs outputs)
4116 (with-directory-excursion "doc"
4117 ;; Fix generation of images for mathematical expressions.
4118 (substitute* (find-files "source" "conf\\.py")
4119 (("pngmath_use_preview = True")
4120 "pngmath_use_preview = False"))
4121 (mkdir-p html)
4122 (invoke "make" "html" pyver sphinxbuild)
4123 (with-directory-excursion "build/html"
4124 (for-each (lambda (file)
4125 (let* ((dir (dirname file))
4126 (tgt-dir (string-append html "/" dir)))
4127 (install-file file html)))
4128 (find-files "." ".*")))))
4129 #t))
4130 ;; Tests can only be run after the library has been installed and not
4131 ;; within the source directory.
4132 (delete 'check)
4133 (add-after 'install 'check
4134 (lambda* (#:key inputs outputs #:allow-other-keys)
4135 (add-installed-pythonpath inputs outputs)
4136 (with-directory-excursion "/tmp"
4137 (invoke "python" "-c"
4138 "import scipy; scipy.test(verbose=2)")))))))
4139 (home-page "https://www.scipy.org/")
4140 (synopsis "The Scipy library provides efficient numerical routines")
4141 (description "The SciPy library is one of the core packages that make up
4142 the SciPy stack. It provides many user-friendly and efficient numerical
4143 routines such as routines for numerical integration and optimization.")
4144 (properties `((python2-variant . ,(delay python2-scipy))))
4145 (license license:bsd-3)))
4146
4147 (define-public python2-scipy
4148 (package-with-python2
4149 (strip-python2-variant python-scipy)))
4150
4151 (define-public python-socksipy-branch
4152 (package
4153 (name "python-socksipy-branch")
4154 (version "1.01")
4155 (source
4156 (origin
4157 (method url-fetch)
4158 (uri (pypi-uri "SocksiPy-branch" version))
4159 (sha256
4160 (base32
4161 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4162 (build-system python-build-system)
4163 (arguments
4164 `(#:tests? #f)) ; There are no tests
4165 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4166 (synopsis "Python SOCKS module")
4167 (description
4168 "SocksiPy - A Python SOCKS client module. It provides a
4169 socket-like interface that supports connections to any TCP
4170 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4171 The original version was developed by Dan Haim, this is a
4172 branch created by Mario Vilas to address some open issues,
4173 as the original project seems to have been abandoned circa 2007.")
4174 (license license:bsd-3)))
4175
4176 (define-public python2-socksipy-branch
4177 (package-with-python2 python-socksipy-branch))
4178
4179 (define-public python-pycodestyle
4180 (package
4181 (name "python-pycodestyle")
4182 (version "2.5.0")
4183 (source
4184 (origin
4185 (method url-fetch)
4186 (uri (pypi-uri "pycodestyle" version))
4187 (sha256
4188 (base32
4189 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4190 (build-system python-build-system)
4191 (home-page "https://pycodestyle.readthedocs.io/")
4192 (synopsis "Python style guide checker")
4193 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4194 Python code against some of the style conventions in
4195 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4196 (license license:expat)))
4197
4198 (define-public python2-pycodestyle
4199 (package-with-python2 python-pycodestyle))
4200
4201 (define-public python-multidict
4202 (package
4203 (name "python-multidict")
4204 (version "4.2.0")
4205 (source
4206 (origin
4207 (method url-fetch)
4208 (uri (pypi-uri "multidict" version))
4209 (sha256
4210 (base32
4211 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4212 (build-system python-build-system)
4213 (native-inputs
4214 `(("python-pytest" ,python-pytest)
4215 ("python-pytest-runner" ,python-pytest-runner)))
4216 (home-page "https://github.com/aio-libs/multidict/")
4217 (synopsis "Multidict implementation")
4218 (description "Multidict is dict-like collection of key-value pairs
4219 where key might be occurred more than once in the container.")
4220 (license license:asl2.0)))
4221
4222 (define-public python-orderedmultidict
4223 (package
4224 (name "python-orderedmultidict")
4225 (version "0.7.11")
4226 (source
4227 (origin
4228 (method url-fetch)
4229 (uri (pypi-uri "orderedmultidict" version))
4230 (sha256
4231 (base32
4232 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4233 (build-system python-build-system)
4234 (arguments
4235 `(#:phases
4236 (modify-phases %standard-phases
4237 (add-after 'unpack 'fix-tests
4238 (lambda _
4239 ;; The package uses nosetest for running the tests.
4240 ;; Adding this initfile allows to run the test suite
4241 ;; without requiring nosetest.
4242 (with-output-to-file "tests/__init__.py" newline)
4243 #t)))))
4244 (propagated-inputs
4245 `(("python-six" ,python-six)))
4246 (native-inputs
4247 `(("python-pycodestyle" ,python-pycodestyle)))
4248 (home-page "https://github.com/gruns/orderedmultidict")
4249 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4250 (description "This package contains a library for ordered multivalue
4251 dictionaries. A multivalue dictionary is a dictionary that can store
4252 multiple values for the same key. An ordered multivalue dictionary is a
4253 multivalue dictionary that retains the order of insertions and deletions.")
4254 (license license:unlicense)))
4255
4256 (define-public python2-orderedmultidict
4257 (package-with-python2 python-orderedmultidict))
4258
4259 (define-public python-autopep8
4260 (package
4261 (name "python-autopep8")
4262 (version "1.3.5")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "autopep8" version))
4267 (sha256
4268 (base32
4269 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4270 (build-system python-build-system)
4271 (propagated-inputs
4272 `(("python-pycodestyle" ,python-pycodestyle)))
4273 (home-page "https://github.com/hhatto/autopep8")
4274 (synopsis "Format Python code according to the PEP 8 style guide")
4275 (description
4276 "@code{autopep8} automatically formats Python code to conform to
4277 the PEP 8 style guide. It uses the pycodestyle utility to determine
4278 what parts of the code needs to be formatted. @code{autopep8} is
4279 capable of fixing most of the formatting issues that can be reported
4280 by pycodestyle.")
4281 (license (license:non-copyleft
4282 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4283
4284 (define-public python2-autopep8
4285 (package-with-python2 python-autopep8))
4286
4287 (define-public python-distutils-extra
4288 (package
4289 (name "python-distutils-extra")
4290 (version "2.38")
4291 (source
4292 (origin
4293 (method url-fetch)
4294 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4295 version "/+download/python-distutils-extra-"
4296 version ".tar.gz"))
4297 (sha256
4298 (base32
4299 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4300 (build-system python-build-system)
4301 (home-page "https://launchpad.net/python-distutils-extra/")
4302 (synopsis "Enhancements to Python's distutils")
4303 (description
4304 "The python-distutils-extra module enables you to easily integrate
4305 gettext support, themed icons, and scrollkeeper-based documentation into
4306 Python's distutils.")
4307 (license license:gpl2)))
4308
4309 (define-public python2-distutils-extra
4310 (package-with-python2 python-distutils-extra))
4311
4312 (define-public python2-elib.intl
4313 (package
4314 (name "python2-elib.intl")
4315 (version "0.0.3")
4316 (source
4317 (origin
4318 ;; This project doesn't tag releases or publish tarballs, so we take
4319 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4320 (method git-fetch)
4321 (uri (git-reference
4322 (url "https://github.com/dieterv/elib.intl.git")
4323 (commit "d09997cfef")))
4324 (file-name (string-append name "-" version "-checkout"))
4325 (sha256
4326 (base32
4327 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4328 (build-system python-build-system)
4329 (arguments
4330 ;; incompatible with Python 3 (exception syntax)
4331 `(#:python ,python-2
4332 #:tests? #f))
4333 (home-page "https://github.com/dieterv/elib.intl")
4334 (synopsis "Enhanced internationalization for Python")
4335 (description
4336 "The elib.intl module provides enhanced internationalization (I18N)
4337 services for your Python modules and applications.")
4338 (license license:lgpl3+)))
4339
4340 (define-public python-olefile
4341 (package
4342 (name "python-olefile")
4343 (version "0.46")
4344 (source
4345 (origin
4346 (method url-fetch)
4347 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4348 "download/v" version "/olefile-" version ".tar.gz"))
4349 (file-name (string-append name "-" version ".tar.gz"))
4350 (sha256
4351 (base32
4352 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4353 (build-system python-build-system)
4354 (home-page "https://www.decalage.info/python/olefileio")
4355 (synopsis "Read and write Microsoft OLE2 files.")
4356 (description
4357 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4358 Storage or Compound Document, Microsoft Office). It is an improved version of
4359 the OleFileIO module from PIL, the Python Image Library.")
4360 (license license:bsd-3)))
4361
4362 (define-public python2-olefile
4363 (package-with-python2 python-olefile))
4364
4365 (define-public python-pillow
4366 (package
4367 (name "python-pillow")
4368 (version "6.1.0")
4369 (source
4370 (origin
4371 (method url-fetch)
4372 (uri (pypi-uri "Pillow" version))
4373 (sha256
4374 (base32
4375 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4376 (build-system python-build-system)
4377 (native-inputs
4378 `(("python-pytest" ,python-pytest)))
4379 (inputs
4380 `(("freetype" ,freetype)
4381 ("lcms" ,lcms)
4382 ("zlib" ,zlib)
4383 ("libjpeg" ,libjpeg)
4384 ("openjpeg" ,openjpeg)
4385 ("libtiff" ,libtiff)
4386 ("libwebp" ,libwebp)))
4387 (propagated-inputs
4388 `(("python-olefile" ,python-olefile)))
4389 (arguments
4390 `(#:phases
4391 (modify-phases %standard-phases
4392 (add-after 'unpack 'patch-ldconfig
4393 (lambda _
4394 (substitute* "setup.py"
4395 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4396 (delete 'check) ; We must run checks after python-pillow is installed.
4397 (add-after 'install 'check-installed
4398 (lambda* (#:key outputs inputs #:allow-other-keys)
4399 (begin
4400 (setenv "HOME" (getcwd))
4401 ;; Make installed package available for running the tests.
4402 (add-installed-pythonpath inputs outputs)
4403 (invoke "python" "selftest.py" "--installed")
4404 (invoke "python" "-m" "pytest" "-vv")))))))
4405 (home-page "https://python-pillow.org")
4406 (synopsis "Fork of the Python Imaging Library")
4407 (description
4408 "The Python Imaging Library adds image processing capabilities to your
4409 Python interpreter. This library provides extensive file format support, an
4410 efficient internal representation, and fairly powerful image processing
4411 capabilities. The core image library is designed for fast access to data
4412 stored in a few basic pixel formats. It should provide a solid foundation for
4413 a general image processing tool.")
4414 (license (license:x11-style
4415 "http://www.pythonware.com/products/pil/license.htm"
4416 "The PIL Software License"))))
4417
4418 (define-public python2-pillow
4419 (package-with-python2 python-pillow))
4420
4421 (define-public python-pycparser
4422 (package
4423 (name "python-pycparser")
4424 (version "2.19")
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (pypi-uri "pycparser" version))
4429 (sha256
4430 (base32
4431 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4432 (outputs '("out" "doc"))
4433 (build-system python-build-system)
4434 (native-inputs
4435 `(("pkg-config" ,pkg-config)))
4436 (arguments
4437 `(#:phases
4438 (modify-phases %standard-phases
4439 (replace 'check
4440 (lambda _
4441 (with-directory-excursion "tests"
4442 (invoke "python" "all_tests.py"))
4443 #t))
4444 (add-after 'install 'install-doc
4445 (lambda* (#:key outputs #:allow-other-keys)
4446 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4447 (doc (string-append data "/doc/" ,name "-" ,version))
4448 (examples (string-append doc "/examples")))
4449 (mkdir-p examples)
4450 (for-each (lambda (file)
4451 (copy-file (string-append "." file)
4452 (string-append doc file)))
4453 '("/README.rst" "/CHANGES" "/LICENSE"))
4454 (copy-recursively "examples" examples)
4455 #t))))))
4456 (home-page "https://github.com/eliben/pycparser")
4457 (synopsis "C parser in Python")
4458 (description
4459 "Pycparser is a complete parser of the C language, written in pure Python
4460 using the PLY parsing library. It parses C code into an AST and can serve as
4461 a front-end for C compilers or analysis tools.")
4462 (license license:bsd-3)))
4463
4464 (define-public python2-pycparser
4465 (package-with-python2 python-pycparser))
4466
4467 (define-public python-pywavelets
4468 (package
4469 (name "python-pywavelets")
4470 (version "1.0.1")
4471 (home-page "https://github.com/PyWavelets/pywt")
4472 (source (origin
4473 (method url-fetch)
4474 (uri (pypi-uri "PyWavelets" version))
4475 (sha256
4476 (base32
4477 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4478 (build-system python-build-system)
4479 (arguments
4480 '(#:modules ((ice-9 ftw)
4481 (srfi srfi-1)
4482 (srfi srfi-26)
4483 (guix build utils)
4484 (guix build python-build-system))
4485 #:phases (modify-phases %standard-phases
4486 (replace 'check
4487 (lambda _
4488 (let ((cwd (getcwd))
4489 (libdir (find (cut string-prefix? "lib." <>)
4490 (scandir "build"))))
4491 (with-directory-excursion (string-append cwd "/build/" libdir)
4492 (invoke "nosetests" "-v" "."))))))))
4493 (native-inputs
4494 `(("python-matplotlib" ,python-matplotlib) ;for tests
4495 ("python-nose" ,python-nose)))
4496 (propagated-inputs
4497 `(("python-numpy" ,python-numpy)))
4498 (synopsis "Wavelet transforms in Python")
4499 (description
4500 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4501 mathematical basis functions that are localized in both time and frequency.
4502 Wavelet transforms are time-frequency transforms employing wavelets. They are
4503 similar to Fourier transforms, the difference being that Fourier transforms are
4504 localized only in frequency instead of in time and frequency.")
4505 (license license:expat)))
4506
4507 (define-public python2-pywavelets
4508 (package-with-python2 python-pywavelets))
4509
4510 (define-public python-xcffib
4511 (package
4512 (name "python-xcffib")
4513 (version "0.6.0")
4514 (source
4515 (origin
4516 (method url-fetch)
4517 (uri (pypi-uri "xcffib" version))
4518 (sha256
4519 (base32
4520 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4521 (build-system python-build-system)
4522 (inputs
4523 `(("libxcb" ,libxcb)))
4524 (propagated-inputs
4525 `(("python-cffi" ,python-cffi) ; used at run time
4526 ("python-six" ,python-six)))
4527 (arguments
4528 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4529 #:tests? #f
4530 #:phases
4531 (modify-phases %standard-phases
4532 (add-after 'unpack 'fix-libxcb-path
4533 (lambda* (#:key inputs #:allow-other-keys)
4534 (let ((libxcb (assoc-ref inputs "libxcb")))
4535 (substitute* '("xcffib/__init__.py")
4536 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4537 #t)))
4538 (add-after 'install 'install-doc
4539 (lambda* (#:key outputs #:allow-other-keys)
4540 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4541 "/doc/" ,name "-" ,version)))
4542 (mkdir-p doc)
4543 (copy-file "README.md"
4544 (string-append doc "/README.md"))
4545 #t))))))
4546 (home-page "https://github.com/tych0/xcffib")
4547 (synopsis "XCB Python bindings")
4548 (description
4549 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4550 support for Python 3 and PyPy. It is based on cffi.")
4551 (license license:expat)))
4552
4553 (define-public python2-xcffib
4554 (package-with-python2 python-xcffib))
4555
4556 (define-public python-cairocffi
4557 (package
4558 (name "python-cairocffi")
4559 (version "0.9.0")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (pypi-uri "cairocffi" version))
4564 (sha256
4565 (base32
4566 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4567 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4568 (build-system python-build-system)
4569 (outputs '("out" "doc"))
4570 (inputs
4571 `(("glib" ,glib)
4572 ("gtk+" ,gtk+)
4573 ("gdk-pixbuf" ,gdk-pixbuf)
4574 ("cairo" ,cairo)
4575 ("pango" ,pango)))
4576 (native-inputs
4577 `(("pkg-config" ,pkg-config)
4578 ("python-pytest" ,python-pytest)
4579 ("python-pytest-cov" ,python-pytest-cov)
4580 ("python-pytest-runner" ,python-pytest-runner)
4581 ("python-sphinx" ,python-sphinx)
4582 ("python-docutils" ,python-docutils)))
4583 (propagated-inputs
4584 `(("python-xcffib" ,python-xcffib))) ; used at run time
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (add-after 'unpack 'patch-paths
4589 (lambda* (#:key inputs outputs #:allow-other-keys)
4590 (substitute* (find-files "." "\\.py$")
4591 (("dlopen\\(ffi, 'cairo'")
4592 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4593 "/lib/libcairo.so.2'"))
4594 (("dlopen\\(ffi, 'gdk-3'")
4595 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4596 "/lib/libgtk-3.so.0'"))
4597 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4598 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4599 "/lib/libgdk_pixbuf-2.0.so.0'"))
4600 (("dlopen\\(ffi, 'glib-2.0'")
4601 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4602 "/lib/libglib-2.0.so.0'"))
4603 (("dlopen\\(ffi, 'gobject-2.0'")
4604 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4605 "/lib/libgobject-2.0.so.0'"))
4606 (("dlopen\\(ffi, 'pangocairo-1.0'")
4607 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4608 "/lib/libpangocairo-1.0.so.0'"))
4609 (("dlopen\\(ffi, 'pango-1.0'")
4610 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4611 "/lib/libpango-1.0.so.0'")))
4612 #t))
4613 (add-after 'install 'install-doc
4614 (lambda* (#:key inputs outputs #:allow-other-keys)
4615 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4616 (doc (string-append data "/doc/" ,name "-" ,version))
4617 (html (string-append doc "/html")))
4618 (setenv "LD_LIBRARY_PATH"
4619 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4620 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4621 (setenv "LANG" "en_US.UTF-8")
4622 (mkdir-p html)
4623 (for-each (lambda (file)
4624 (copy-file (string-append "." file)
4625 (string-append doc file)))
4626 '("/README.rst" "/CHANGES" "/LICENSE"))
4627 (system* "python" "setup.py" "build_sphinx")
4628 (copy-recursively "docs/_build/html" html)
4629 #t))))))
4630 (home-page "https://github.com/Kozea/cairocffi")
4631 (synopsis "Python bindings and object-oriented API for Cairo")
4632 (description
4633 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4634 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4635 graphics library with support for multiple backends including image buffers,
4636 PNG, PostScript, PDF, and SVG file output.")
4637 (license license:bsd-3)))
4638
4639 (define-public python2-cairocffi
4640 (package-with-python2 python-cairocffi))
4641
4642 (define-public python-decorator
4643 (package
4644 (name "python-decorator")
4645 (version "4.3.0")
4646 (source
4647 (origin
4648 (method url-fetch)
4649 (uri (pypi-uri "decorator" version))
4650 (sha256
4651 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4652 (build-system python-build-system)
4653 (home-page "https://pypi.python.org/pypi/decorator/")
4654 (synopsis "Python module to simplify usage of decorators")
4655 (description
4656 "The aim of the decorator module is to simplify the usage of decorators
4657 for the average programmer, and to popularize decorators usage giving examples
4658 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4659 etc. The core of this module is a decorator factory.")
4660 (license license:expat)))
4661
4662 (define-public python2-decorator
4663 (package-with-python2 python-decorator))
4664
4665 (define-public python-drmaa
4666 (package
4667 (name "python-drmaa")
4668 (version "0.7.7")
4669 (source
4670 (origin
4671 (method url-fetch)
4672 (uri (pypi-uri "drmaa" version))
4673 (sha256
4674 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4675 (build-system python-build-system)
4676 ;; The test suite requires libdrmaa which is provided by the cluster
4677 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4678 ;; should be set to the path of the libdrmaa library.
4679 (arguments '(#:tests? #f))
4680 (native-inputs
4681 `(("python-nose" ,python-nose)))
4682 (home-page "https://pypi.python.org/pypi/drmaa")
4683 (synopsis "Python bindings for the DRMAA library")
4684 (description
4685 "A Python package for Distributed Resource Management (DRM) job
4686 submission and control. This package is an implementation of the DRMAA 1.0
4687 Python language binding specification.")
4688 (license license:bsd-3)))
4689
4690 (define-public python2-drmaa
4691 (package-with-python2 python-drmaa))
4692
4693 (define-public python-grako
4694 (package
4695 (name "python-grako")
4696 (version "3.99.9")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri
4701 (pypi-uri "grako" version ".zip"))
4702 (sha256
4703 (base32
4704 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4705 (build-system python-build-system)
4706 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4707 (native-inputs
4708 `(("unzip" ,unzip)
4709 ("python-pytest" ,python-pytest)
4710 ("python-pytest-runner" ,python-pytest-runner)))
4711 (home-page "https://bitbucket.org/neogeny/grako")
4712 (synopsis "EBNF parser generator")
4713 (description
4714 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4715 memoizing PEG/Packrat parser in Python.")
4716 (license license:bsd-3)))
4717
4718 (define-public python2-grako
4719 (package-with-python2 python-grako))
4720
4721 (define-public python-gridmap
4722 (package
4723 (name "python-gridmap")
4724 (version "0.13.0")
4725 (source
4726 (origin
4727 (method git-fetch)
4728 (uri (git-reference
4729 (url "https://github.com/pygridtools/gridmap.git")
4730 (commit (string-append "v" version))))
4731 (file-name (git-file-name name version))
4732 (sha256
4733 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4734 (build-system python-build-system)
4735 (arguments
4736 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4737 (propagated-inputs
4738 `(("python-psutil" ,python-psutil)
4739 ("python-drmaa" ,python-drmaa)
4740 ("python-pyzmq" ,python-pyzmq)))
4741 (home-page "https://github.com/pygridtools/gridmap")
4742 (synopsis "Create jobs on a cluster directly from Python")
4743 (description
4744 "Gridmap is a Python package to allow you to easily create jobs on the
4745 cluster directly from Python. You can directly map Python functions onto the
4746 cluster without needing to write any wrapper code yourself.")
4747 (license license:gpl3+)))
4748
4749 (define-public python2-gridmap
4750 (package-with-python2 python-gridmap))
4751
4752 (define-public python-honcho
4753 (package
4754 (name "python-honcho")
4755 (version "1.0.1")
4756 (source
4757 (origin
4758 (method git-fetch)
4759 (uri (git-reference
4760 (url "https://github.com/nickstenning/honcho.git")
4761 (commit (string-append "v" version))))
4762 (file-name (git-file-name name version))
4763 (sha256
4764 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4765 (build-system python-build-system)
4766 (native-inputs
4767 `(("python-pytest" ,python-pytest)
4768 ("python-mock" ,python-mock)
4769 ("python-tox" ,python-tox)
4770 ("which" ,which))) ;for tests
4771 (propagated-inputs
4772 `(("python-jinja2" ,python-jinja2)))
4773 (arguments
4774 `(#:phases
4775 (modify-phases %standard-phases
4776 (delete 'check)
4777 (add-after 'install 'check
4778 (lambda* (#:key outputs inputs #:allow-other-keys)
4779 ;; fix honcho path in testsuite
4780 (substitute* "tests/conftest.py"
4781 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4782 "/bin/honcho" "'")))
4783 ;; It's easier to run tests after install.
4784 ;; Make installed package available for running the tests
4785 (add-installed-pythonpath inputs outputs)
4786 (invoke "py.test" "-v"))))))
4787 (home-page "https://github.com/nickstenning/honcho")
4788 (synopsis "Manage Procfile-based applications")
4789 (description
4790 "A Procfile is a file which describes how to run an application
4791 consisting of several processes. honcho starts all listed processes.
4792 The output of all running processes is collected by honcho and
4793 displayed.")
4794 (license license:expat)))
4795
4796 (define-public python2-honcho
4797 (package-with-python2 python-honcho))
4798
4799 (define-public python-pexpect
4800 (package
4801 (name "python-pexpect")
4802 (version "4.6.0")
4803 (source
4804 (origin
4805 (method url-fetch)
4806 (uri (pypi-uri "pexpect" version))
4807 (sha256
4808 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4809 (build-system python-build-system)
4810 (arguments
4811 `(#:phases
4812 (modify-phases %standard-phases
4813 (add-before 'check 'prepare-tests
4814 (lambda _
4815 (substitute* (find-files "tests")
4816 (("/bin/ls") (which "ls"))
4817 (("/bin/echo") (which "echo"))
4818 (("/bin/which") (which "which"))
4819 ;; Many tests try to use the /bin directory which
4820 ;; is not present in the build environment.
4821 ;; Use one that's non-empty and unlikely to change.
4822 (("/bin'") "/dev'"))
4823 ;; XXX: Socket connection test gets "Connection reset by peer".
4824 ;; Why does it not work? Delete for now.
4825 (delete-file "tests/test_socket.py")
4826 #t))
4827 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4828 (native-inputs
4829 `(("python-nose" ,python-nose)
4830 ("python-pytest" ,python-pytest)
4831 ("man-db" ,man-db)
4832 ("which" ,which)
4833 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4834 (propagated-inputs
4835 `(("python-ptyprocess" ,python-ptyprocess)))
4836 (home-page "http://pexpect.readthedocs.org/")
4837 (synopsis "Controlling interactive console applications")
4838 (description
4839 "Pexpect is a pure Python module for spawning child applications;
4840 controlling them; and responding to expected patterns in their output.
4841 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4842 child application and control it as if a human were typing commands.")
4843 (license license:isc)))
4844
4845 (define-public python2-pexpect
4846 (package-with-python2 python-pexpect))
4847
4848 (define-public python-setuptools-scm
4849 (package
4850 (name "python-setuptools-scm")
4851 (version "3.2.0")
4852 (source (origin
4853 (method url-fetch)
4854 (uri (pypi-uri "setuptools_scm" version))
4855 (sha256
4856 (base32
4857 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4858 (build-system python-build-system)
4859 (home-page "https://github.com/pypa/setuptools_scm/")
4860 (synopsis "Manage Python package versions in SCM metadata")
4861 (description
4862 "Setuptools_scm handles managing your Python package versions in
4863 @dfn{software configuration management} (SCM) metadata instead of declaring
4864 them as the version argument or in a SCM managed file.")
4865 (license license:expat)))
4866
4867 (define-public python2-setuptools-scm
4868 (package-with-python2 python-setuptools-scm))
4869
4870 (define-public python-pathlib2
4871 (package
4872 (name "python-pathlib2")
4873 (version "2.3.3")
4874 (source
4875 (origin
4876 (method url-fetch)
4877 (uri (pypi-uri "pathlib2" version))
4878 (sha256
4879 (base32
4880 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4881 (build-system python-build-system)
4882 (propagated-inputs
4883 `(("python-scandir" ,python-scandir)
4884 ("python-six" ,python-six)))
4885 (home-page "https://pypi.python.org/pypi/pathlib2/")
4886 (synopsis "Object-oriented filesystem paths")
4887 (description "The goal of pathlib2 is to provide a backport of the
4888 standard @code{pathlib} module which tracks the standard library module, so
4889 all the newest features of the standard @code{pathlib} can be used also on
4890 older Python versions.")
4891 (license license:expat)))
4892
4893 (define-public python-importlib-metadata
4894 (package
4895 (name "python-importlib-metadata")
4896 (version "0.18")
4897 (source
4898 (origin
4899 (method url-fetch)
4900 (uri (pypi-uri "importlib_metadata" version))
4901 (sha256
4902 (base32
4903 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4904 (build-system python-build-system)
4905 (propagated-inputs
4906 `(("python-configparser" ,python-configparser)
4907 ("python-contextlib2" ,python-contextlib2)
4908 ("python-docutils" ,python-docutils)
4909 ("python-pathlib2" ,python-pathlib2)
4910 ("python-rst.linker" ,python-rst.linker)
4911 ("python-zipp" ,python-zipp)))
4912 (native-inputs
4913 `(("python-setuptools-scm" ,python-setuptools-scm)
4914 ("python-sphinx" ,python-sphinx)))
4915 (home-page "https://importlib-metadata.readthedocs.io/")
4916 (synopsis "Read metadata from Python packages")
4917 (description
4918 "@code{importlib_metadata} is a library which provides an API for
4919 accessing an installed Python package's metadata, such as its entry points or
4920 its top-level name. This functionality intends to replace most uses of
4921 @code{pkg_resources} entry point API and metadata API. Along with
4922 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4923 need to use the older and less efficient @code{pkg_resources} package.")
4924 (license license:asl2.0)))
4925
4926 (define-public python-jaraco-packaging
4927 (package
4928 (name "python-jaraco-packaging")
4929 (version "6.1")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "jaraco.packaging" version))
4934 (sha256
4935 (base32
4936 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4937 (build-system python-build-system)
4938 (propagated-inputs
4939 `(("python-pytest" ,python-pytest)
4940 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4941 ("python-pytest-flake8" ,python-pytest-flake8)
4942 ("python-rst.linker" ,python-rst.linker)
4943 ("python-setuptools" ,python-setuptools)
4944 ("python-setuptools-scm" ,python-setuptools-scm)
4945 ("python-six" ,python-six)
4946 ("python-sphinx" ,python-sphinx)))
4947 (home-page "https://github.com/jaraco/jaraco.packaging")
4948 (synopsis "Tools to supplement packaging Python releases")
4949 (description
4950 "This package provides various tools to supplement packaging Python
4951 releases.")
4952 (license license:expat)))
4953
4954 (define-public python-pathpy
4955 (package
4956 (name "python-pathpy")
4957 (version "11.5.0")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "path.py" version))
4962 (sha256
4963 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4964 (outputs '("out" "doc"))
4965 (build-system python-build-system)
4966 (propagated-inputs
4967 `(("python-appdirs" ,python-appdirs)))
4968 (native-inputs
4969 `(("python-setuptools-scm" ,python-setuptools-scm)
4970 ("python-sphinx" ,python-sphinx)
4971 ("python-rst.linker" ,python-rst.linker)
4972 ("python-pytest" ,python-pytest)
4973 ("python-pytest-runner" ,python-pytest-runner)
4974 ("python-jaraco-packaging" ,python-jaraco-packaging)))
4975 (arguments
4976 `(#:phases
4977 (modify-phases %standard-phases
4978 (add-after 'build 'build-doc
4979 (lambda _
4980 (setenv "LANG" "en_US.UTF-8")
4981 (invoke "python" "setup.py" "build_sphinx")))
4982 (add-after 'install 'install-doc
4983 (lambda* (#:key outputs #:allow-other-keys)
4984 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4985 (doc (string-append data "/doc/" ,name "-" ,version))
4986 (html (string-append doc "/html")))
4987 (mkdir-p html)
4988 (for-each (lambda (file)
4989 (copy-file file (string-append doc "/" file)))
4990 '("README.rst" "CHANGES.rst"))
4991 (copy-recursively "build/sphinx/html" html)
4992 #t)))
4993 (replace 'check
4994 (lambda _
4995 ;; The import time test aborts if an import takes longer than
4996 ;; 100ms. It may very well take a little longer than that.
4997 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
4998 (home-page "https://github.com/jaraco/path.py")
4999 (synopsis "Python module wrapper for built-in os.path")
5000 (description
5001 "@code{path.py} implements path objects as first-class entities, allowing
5002 common operations on files to be invoked on those path objects directly.")
5003 (license license:expat)))
5004
5005 (define-public python2-pathpy
5006 (package-with-python2 python-pathpy))
5007
5008 (define-public python-simplegeneric
5009 (package
5010 (name "python-simplegeneric")
5011 (version "0.8.1")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "simplegeneric" version ".zip"))
5016 (sha256
5017 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5018 (build-system python-build-system)
5019 (native-inputs
5020 `(("unzip" ,unzip)))
5021 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5022 (synopsis "Python module for simple generic functions")
5023 (description
5024 "The simplegeneric module lets you define simple single-dispatch generic
5025 functions, akin to Python’s built-in generic functions like @code{len()},
5026 @code{iter()} and so on. However, instead of using specially-named methods,
5027 these generic functions use simple lookup tables, akin to those used by
5028 e.g. @code{pickle.dump()} and other generic functions found in the Python
5029 standard library.")
5030 (license license:zpl2.1)))
5031
5032 (define-public python2-simplegeneric
5033 (package-with-python2 python-simplegeneric))
5034
5035 (define-public python-ipython-genutils
5036 ;; TODO: This package is retired, check if can be removed, see description.
5037 (package
5038 (name "python-ipython-genutils")
5039 (version "0.1.0")
5040 (source
5041 (origin
5042 (method url-fetch)
5043 (uri (pypi-uri "ipython_genutils" version))
5044 (sha256
5045 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5046 (build-system python-build-system)
5047 (arguments `(#:tests? #f)) ; no tests
5048 (home-page "https://ipython.org")
5049 (synopsis "Vestigial utilities from IPython")
5050 (description
5051 "This package provides retired utilities from IPython. No packages
5052 outside IPython/Jupyter should depend on it.
5053
5054 This package shouldn't exist. It contains some common utilities shared by
5055 Jupyter and IPython projects during The Big Split. As soon as possible, those
5056 packages will remove their dependency on this, and this package will go
5057 away.")
5058 (license license:bsd-3)))
5059
5060 (define-public python2-ipython-genutils
5061 (package-with-python2 python-ipython-genutils))
5062
5063 (define-public python-traitlets
5064 (package
5065 (name "python-traitlets")
5066 (version "4.3.2")
5067 (source
5068 (origin
5069 (method url-fetch)
5070 (uri (pypi-uri "traitlets" version))
5071 (sha256
5072 (base32
5073 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5074 (build-system python-build-system)
5075 (arguments
5076 `(#:phases
5077 (modify-phases %standard-phases
5078 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5079 (propagated-inputs
5080 `(("python-ipython-genutils" ,python-ipython-genutils)
5081 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5082 (native-inputs
5083 `(("python-pytest" ,python-pytest)))
5084 (properties `((python2-variant . ,(delay python2-traitlets))))
5085 (home-page "https://ipython.org")
5086 (synopsis "Configuration system for Python applications")
5087 (description
5088 "Traitlets is a framework that lets Python classes have attributes with
5089 type checking, dynamically calculated default values, and ‘on change’
5090 callbacks. The package also includes a mechanism to use traitlets for
5091 configuration, loading values from files or from command line arguments. This
5092 is a distinct layer on top of traitlets, so you can use traitlets in your code
5093 without using the configuration machinery.")
5094 (license license:bsd-3)))
5095
5096 (define-public python2-traitlets
5097 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5098 (package
5099 (inherit traitlets)
5100 (propagated-inputs
5101 `(("python2-enum34" ,python2-enum34)
5102 ,@(package-propagated-inputs traitlets))))))
5103
5104 (define-public python-jupyter-core
5105 (package
5106 (name "python-jupyter-core")
5107 (version "4.4.0")
5108 (source
5109 (origin
5110 (method url-fetch)
5111 (uri (string-append (pypi-uri "jupyter_core" version)))
5112 (sha256
5113 (base32
5114 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5115 (build-system python-build-system)
5116 ;; FIXME: not sure how to run the tests
5117 (arguments `(#:tests? #f))
5118 (propagated-inputs
5119 `(("python-traitlets" ,python-traitlets)))
5120 (home-page "http://jupyter.org/")
5121 (synopsis "Jupyter base package")
5122 (description
5123 "Jupyter core is the base package on which Jupyter projects rely.")
5124 (license license:bsd-3)))
5125
5126 (define-public python2-jupyter-core
5127 (package-with-python2 python-jupyter-core))
5128
5129 (define-public python-jupyter-client
5130 (package
5131 (name "python-jupyter-client")
5132 (version "5.2.4")
5133 (source
5134 (origin
5135 (method url-fetch)
5136 (uri (pypi-uri "jupyter_client" version))
5137 (sha256
5138 (base32
5139 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5140 (build-system python-build-system)
5141 ;; Tests fail because of missing native python kernel which I assume is
5142 ;; provided by the ipython package, which we cannot use because it would
5143 ;; cause a dependency cycle.
5144 (arguments `(#:tests? #f))
5145 (propagated-inputs
5146 `(("python-pyzmq" ,python-pyzmq)
5147 ("python-traitlets" ,python-traitlets)
5148 ("python-jupyter-core" ,python-jupyter-core)))
5149 (home-page "http://jupyter.org/")
5150 (synopsis "Jupyter protocol implementation and client libraries")
5151 (description
5152 "The @code{jupyter_client} package contains the reference implementation
5153 of the Jupyter protocol. It also provides client and kernel management APIs
5154 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5155 installing @code{kernelspec}s for use with Jupyter frontends.")
5156 (license license:bsd-3)))
5157
5158 (define-public python2-jupyter-client
5159 (package-with-python2 python-jupyter-client))
5160
5161 (define-public python-ipykernel
5162 (package
5163 (name "python-ipykernel")
5164 (version "5.1.1")
5165 (source
5166 (origin
5167 (method url-fetch)
5168 (uri (pypi-uri "ipykernel" version))
5169 (sha256
5170 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5171 (build-system python-build-system)
5172 (arguments
5173 `(#:phases
5174 (modify-phases %standard-phases
5175 (replace 'check
5176 (lambda _
5177 (setenv "HOME" "/tmp")
5178 (invoke "pytest" "-v")
5179 #t)))))
5180 (propagated-inputs
5181 `(("python-ipython" ,python-ipython)
5182 ;; imported at runtime during connect
5183 ("python-jupyter-client" ,python-jupyter-client)))
5184 (native-inputs
5185 `(("python-pytest" ,python-pytest)
5186 ("python-nose" ,python-nose)))
5187 (home-page "https://ipython.org")
5188 (synopsis "IPython Kernel for Jupyter")
5189 (description
5190 "This package provides the IPython kernel for Jupyter.")
5191 (license license:bsd-3)))
5192
5193 ;; Version 5.1.1 and above no longer support Python 2.
5194 (define-public python2-ipykernel
5195 (package
5196 (name "python2-ipykernel")
5197 (version "5.1.0")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (pypi-uri "ipykernel" version))
5202 (sha256
5203 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5204 (build-system python-build-system)
5205 (arguments
5206 `(#:python ,python-2
5207 #:phases
5208 (modify-phases %standard-phases
5209 (replace 'check
5210 (lambda _
5211 (setenv "HOME" "/tmp")
5212 (invoke "pytest" "-v")
5213 #t)))))
5214 (propagated-inputs
5215 `(("python2-ipython" ,python2-ipython)
5216 ;; imported at runtime during connect
5217 ("python2-jupyter-client" ,python2-jupyter-client)))
5218 (native-inputs
5219 `(("python2-pytest" ,python2-pytest)
5220 ("python2-nose" ,python2-nose)))
5221 (home-page "https://ipython.org")
5222 (synopsis "IPython Kernel for Jupyter")
5223 (description
5224 "This package provides the IPython kernel for Jupyter.")
5225 (license license:bsd-3)))
5226
5227 (define-public python-pari-jupyter
5228 (package
5229 (name "python-pari-jupyter")
5230 (version "1.3.2")
5231 (source
5232 (origin
5233 (method url-fetch)
5234 (uri (pypi-uri "pari_jupyter" version))
5235 (sha256
5236 (base32
5237 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5238 (build-system python-build-system)
5239 (propagated-inputs
5240 `(("python-ipykernel" ,python-ipykernel)))
5241 (inputs
5242 `(("pari-gp" ,pari-gp)
5243 ("readline" ,readline)))
5244 (arguments
5245 `(#:tests? #f)) ; no test suite
5246 (home-page
5247 "https://github.com/jdemeyer/pari_jupyter")
5248 (synopsis "A Jupyter kernel for PARI/GP")
5249 (description "The package provides a PARI/GP kernel for Jupyter.")
5250 (license license:gpl3+)))
5251
5252 (define-public python-backcall
5253 (package
5254 (name "python-backcall")
5255 (version "0.1.0")
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "backcall" version))
5260 (sha256
5261 (base32
5262 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5263 (build-system python-build-system)
5264 (home-page "https://github.com/takluyver/backcall/")
5265 (synopsis "Specifications for callback functions passed in to an API")
5266 (description
5267 "If your code lets other people supply callback functions, it's important
5268 to specify the function signature you expect, and check that functions support
5269 that. Adding extra parameters later would break other peoples code unless
5270 you're careful. The @code{backcall} package provides a way of specifying the
5271 callback signature using a prototype function.")
5272 (license license:bsd-3)))
5273
5274 ;; This is the latest release of the LTS version of ipython with support for
5275 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5276 ;; dropped support for Python 2.7.
5277 (define-public python2-ipython
5278 (package
5279 (name "python2-ipython")
5280 (version "5.8.0")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "ipython" version ".tar.gz"))
5285 (sha256
5286 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5287 (build-system python-build-system)
5288 (propagated-inputs
5289 `(("python2-backports-shutil-get-terminal-size"
5290 ,python2-backports-shutil-get-terminal-size)
5291 ("python2-pathlib2" ,python2-pathlib2)
5292 ("python2-pyzmq" ,python2-pyzmq)
5293 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5294 ("python2-terminado" ,python2-terminado)
5295 ("python2-matplotlib" ,python2-matplotlib)
5296 ("python2-numpy" ,python2-numpy)
5297 ("python2-numpydoc" ,python2-numpydoc)
5298 ("python2-jinja2" ,python2-jinja2)
5299 ("python2-mistune" ,python2-mistune)
5300 ("python2-pexpect" ,python2-pexpect)
5301 ("python2-pickleshare" ,python2-pickleshare)
5302 ("python2-simplegeneric" ,python2-simplegeneric)
5303 ("python2-jsonschema" ,python2-jsonschema)
5304 ("python2-traitlets" ,python2-traitlets)
5305 ("python2-nbformat" ,python2-nbformat)
5306 ("python2-pygments" ,python2-pygments)))
5307 (inputs
5308 `(("readline" ,readline)
5309 ("which" ,which)))
5310 (native-inputs
5311 `(("graphviz" ,graphviz)
5312 ("pkg-config" ,pkg-config)
5313 ("python2-requests" ,python2-requests) ;; for tests
5314 ("python2-testpath" ,python2-testpath)
5315 ("python2-mock" ,python2-mock)
5316 ("python2-nose" ,python2-nose)))
5317 (arguments
5318 `(#:python ,python-2
5319 #:phases
5320 (modify-phases %standard-phases
5321 (add-before 'check 'delete-broken-tests
5322 (lambda* (#:key inputs #:allow-other-keys)
5323 ;; These tests throw errors for unknown reasons.
5324 (delete-file "IPython/core/tests/test_profile.py")
5325 (delete-file "IPython/core/tests/test_interactiveshell.py")
5326 (delete-file "IPython/core/tests/test_magic.py")
5327 #t)))))
5328 (home-page "https://ipython.org")
5329 (synopsis "IPython is a tool for interactive computing in Python")
5330 (description
5331 "IPython provides a rich architecture for interactive computing with:
5332 Powerful interactive shells, a browser-based notebook, support for interactive
5333 data visualization, embeddable interpreters and tools for parallel
5334 computing.")
5335 (license license:bsd-3)))
5336
5337 (define-public python-ipython
5338 (package
5339 (name "python-ipython")
5340 (version "7.5.0")
5341 (source
5342 (origin
5343 (method url-fetch)
5344 (uri (pypi-uri "ipython" version ".tar.gz"))
5345 (sha256
5346 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5347 (build-system python-build-system)
5348 (propagated-inputs
5349 `(("python-backcall" ,python-backcall)
5350 ("python-pyzmq" ,python-pyzmq)
5351 ("python-prompt-toolkit" ,python-prompt-toolkit)
5352 ("python-terminado" ,python-terminado)
5353 ("python-matplotlib" ,python-matplotlib)
5354 ("python-numpy" ,python-numpy)
5355 ("python-numpydoc" ,python-numpydoc)
5356 ("python-jedi" ,python-jedi)
5357 ("python-jinja2" ,python-jinja2)
5358 ("python-mistune" ,python-mistune)
5359 ("python-pexpect" ,python-pexpect)
5360 ("python-pickleshare" ,python-pickleshare)
5361 ("python-simplegeneric" ,python-simplegeneric)
5362 ("python-jsonschema" ,python-jsonschema)
5363 ("python-traitlets" ,python-traitlets)
5364 ("python-nbformat" ,python-nbformat)
5365 ("python-pygments" ,python-pygments)))
5366 (inputs
5367 `(("readline" ,readline)
5368 ("which" ,which)))
5369 (native-inputs
5370 `(("graphviz" ,graphviz)
5371 ("pkg-config" ,pkg-config)
5372 ("python-requests" ,python-requests) ;; for tests
5373 ("python-testpath" ,python-testpath)
5374 ("python-nose" ,python-nose)))
5375 (arguments
5376 `(#:phases
5377 (modify-phases %standard-phases
5378 ;; Tests can only be run after the library has been installed and not
5379 ;; within the source directory.
5380 (delete 'check)
5381 (add-after 'install 'check
5382 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5383 (if tests?
5384 (begin
5385 ;; Make installed package available for running the tests
5386 (add-installed-pythonpath inputs outputs)
5387 (setenv "HOME" "/tmp/") ;; required by a test
5388 ;; We only test the core because one of the other tests
5389 ;; tries to import ipykernel.
5390 (invoke "python" "IPython/testing/iptest.py"
5391 "-v" "IPython/core/tests"))
5392 #t)))
5393 (add-before 'check 'fix-tests
5394 (lambda* (#:key inputs #:allow-other-keys)
5395 (substitute* "./IPython/utils/_process_posix.py"
5396 (("/usr/bin/env', 'which") (which "which")))
5397 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5398 (("#!/usr/bin/env python")
5399 (string-append "#!" (which "python"))))
5400 ;; This test introduces a circular dependency on ipykernel
5401 ;; (which depends on ipython).
5402 (delete-file "IPython/core/tests/test_display.py")
5403 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5404 (delete-file "IPython/core/tests/test_interactiveshell.py")
5405 #t)))))
5406 (home-page "https://ipython.org")
5407 (synopsis "IPython is a tool for interactive computing in Python")
5408 (description
5409 "IPython provides a rich architecture for interactive computing with:
5410 Powerful interactive shells, a browser-based notebook, support for interactive
5411 data visualization, embeddable interpreters and tools for parallel
5412 computing.")
5413 (license license:bsd-3)))
5414
5415 (define-public python-ipython-documentation
5416 (package
5417 (inherit python-ipython)
5418 (name "python-ipython-documentation")
5419 (version (package-version python-ipython))
5420 (arguments
5421 `(#:phases
5422 (modify-phases %standard-phases
5423 (delete 'build)
5424 (delete 'check)
5425 (replace 'install
5426 (lambda* (#:key outputs #:allow-other-keys)
5427 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5428 (doc (string-append data "/doc/" ,name "-" ,version))
5429 (html (string-append doc "/html"))
5430 (man1 (string-append data "/man/man1"))
5431 (info (string-append data "/info"))
5432 (examples (string-append doc "/examples"))
5433 (python-arg (string-append "PYTHON=" (which "python"))))
5434 (setenv "LANG" "en_US.utf8")
5435 (with-directory-excursion "docs"
5436 ;; FIXME: pdf fails to build
5437 ;;(system* "make" "pdf" "PAPER=a4")
5438 (system* "make" python-arg "html")
5439 ;; FIXME: the generated texi file contains ^@^@, which trips
5440 ;; up the parser.
5441 ;; (system* "make" python-arg "info")
5442 )
5443 (copy-recursively "docs/man" man1)
5444 (copy-recursively "examples" examples)
5445 (copy-recursively "docs/build/html" html)
5446 ;; (copy-file "docs/build/latex/ipython.pdf"
5447 ;; (string-append doc "/ipython.pdf"))
5448 (mkdir-p info)
5449 ;; (copy-file "docs/build/texinfo/ipython.info"
5450 ;; (string-append info "/ipython.info"))
5451 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5452 #t)))))
5453 (inputs
5454 `(("python-ipython" ,python-ipython)
5455 ("python-ipykernel" ,python-ipykernel)))
5456 (native-inputs
5457 `(("python-sphinx" ,python-sphinx)
5458 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5459 ;; FIXME: It's possible that a smaller union would work just as well.
5460 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5461 texlive-fonts-ec
5462 texlive-generic-ifxetex
5463 texlive-generic-pdftex
5464 texlive-latex-amsfonts
5465 texlive-latex-capt-of
5466 texlive-latex-cmap
5467 texlive-latex-environ
5468 texlive-latex-eqparbox
5469 texlive-latex-etoolbox
5470 texlive-latex-expdlist
5471 texlive-latex-fancyhdr
5472 texlive-latex-fancyvrb
5473 texlive-latex-fncychap
5474 texlive-latex-float
5475 texlive-latex-framed
5476 texlive-latex-geometry
5477 texlive-latex-graphics
5478 texlive-latex-hyperref
5479 texlive-latex-mdwtools
5480 texlive-latex-multirow
5481 texlive-latex-needspace
5482 texlive-latex-oberdiek
5483 texlive-latex-parskip
5484 texlive-latex-preview
5485 texlive-latex-tabulary
5486 texlive-latex-threeparttable
5487 texlive-latex-titlesec
5488 texlive-latex-trimspaces
5489 texlive-latex-ucs
5490 texlive-latex-upquote
5491 texlive-latex-url
5492 texlive-latex-varwidth
5493 texlive-latex-wrapfig)))
5494 ("texinfo" ,texinfo)))))
5495
5496 (define-public python-urwid
5497 (package
5498 (name "python-urwid")
5499 (version "2.0.1")
5500 (source
5501 (origin
5502 (method url-fetch)
5503 (uri (pypi-uri "urwid" version))
5504 (sha256
5505 (base32
5506 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5507 (build-system python-build-system)
5508 (home-page "http://urwid.org")
5509 (synopsis "Console user interface library for Python")
5510 (description
5511 "Urwid is a curses-based UI/widget library for Python. It includes many
5512 features useful for text console applications.")
5513 (license license:lgpl2.1+)))
5514
5515 (define-public python2-urwid
5516 (package-with-python2 python-urwid))
5517
5518 (define-public python-urwidtrees
5519 (package
5520 (name "python-urwidtrees")
5521 (version "1.0.2")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 ;; package author intends on distributing via github rather than pypi:
5526 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5527 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5528 version ".tar.gz"))
5529 (file-name (string-append name "-" version ".tar.gz"))
5530 (sha256
5531 (base32
5532 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5533 (build-system python-build-system)
5534 (arguments
5535 '(#:tests? #f)) ; no tests
5536 (propagated-inputs `(("python-urwid" ,python-urwid)))
5537 (home-page "https://github.com/pazz/urwidtrees")
5538 (synopsis "Tree widgets for urwid")
5539 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5540 toolkit. Use it to build trees of widgets.")
5541 (license license:gpl3+)))
5542
5543 (define-public python2-urwidtrees
5544 (package-with-python2 python-urwidtrees))
5545
5546 (define-public python-ua-parser
5547 (package
5548 (name "python-ua-parser")
5549 (version "0.8.0")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 (uri (pypi-uri "ua-parser" version))
5554 (sha256
5555 (base32
5556 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5557 (build-system python-build-system)
5558 (arguments
5559 `(#:tests? #f)) ;no test suite in release
5560 (native-inputs
5561 `(("python-pyyaml" ,python-pyyaml)))
5562 (home-page "https://github.com/ua-parser/uap-python")
5563 (synopsis "User agent parser")
5564 (description
5565 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5566 (license license:asl2.0)))
5567
5568 (define-public python2-ua-parser
5569 (package-with-python2 python-ua-parser))
5570
5571 (define-public python-user-agents
5572 (package
5573 (name "python-user-agents")
5574 (version "1.1.0")
5575 (source
5576 (origin
5577 (method url-fetch)
5578 (uri (pypi-uri "user-agents" version))
5579 (sha256
5580 (base32
5581 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5582 (build-system python-build-system)
5583 (arguments
5584 `(#:tests? #f)) ;missing devices.json test file in release
5585 (propagated-inputs
5586 `(("python-ua-parser" ,python-ua-parser)))
5587 (home-page "https://github.com/selwin/python-user-agents")
5588 (synopsis "User Agent strings parsing library")
5589 (description
5590 "A library to identify devices (phones, tablets) and their capabilities by
5591 parsing (browser/HTTP) user agent strings.")
5592 (license license:expat)))
5593
5594 (define-public python2-user-agents
5595 (package-with-python2 python-user-agents))
5596
5597 (define-public python-dbus
5598 (package
5599 (name "python-dbus")
5600 (version "1.2.8")
5601 (source
5602 (origin
5603 (method url-fetch)
5604 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5605 "dbus-python-" version ".tar.gz"))
5606 (sha256
5607 (base32
5608 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5609 (build-system gnu-build-system)
5610 (arguments
5611 '(#:phases
5612 (modify-phases %standard-phases
5613 (add-before
5614 'check 'pre-check
5615 (lambda _
5616 ;; XXX: For the missing '/etc/machine-id'.
5617 (substitute* "test/run-test.sh"
5618 (("DBUS_FATAL_WARNINGS=1")
5619 "DBUS_FATAL_WARNINGS=0"))
5620 #t)))))
5621 (native-inputs
5622 `(("pkg-config" ,pkg-config)))
5623 (inputs
5624 `(("python" ,python-wrapper)
5625 ("dbus-glib" ,dbus-glib)))
5626 (synopsis "Python bindings for D-bus")
5627 (description "python-dbus provides bindings for libdbus, the reference
5628 implementation of D-Bus.")
5629 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5630 (license license:expat)))
5631
5632 (define-public python2-dbus
5633 (package (inherit python-dbus)
5634 (name "python2-dbus")
5635 (inputs `(("python" ,python-2)
5636 ,@(alist-delete "python"
5637 (package-inputs python-dbus)
5638 equal?)))
5639 ;; FIXME: on Python 2, the test_utf8 fails with:
5640 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5641 (arguments `(#:tests? #f))))
5642
5643 (define-public python-notify2
5644 (package
5645 (name "python-notify2")
5646 (version "0.3.1")
5647 (source
5648 (origin
5649 (method url-fetch)
5650 (uri (pypi-uri "notify2" version))
5651 (sha256
5652 (base32
5653 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5654 (build-system python-build-system)
5655 (arguments `(#:tests? #f)) ; tests depend on system state
5656 (native-inputs
5657 `(("python-dbus" ,python-dbus)))
5658 (home-page "https://bitbucket.org/takluyver/pynotify2")
5659 (synopsis "Python interface to D-Bus notifications")
5660 (description
5661 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5662 It is a reimplementation of pynotify in pure Python, and an alternative to
5663 the GObject Introspection bindings to libnotify for non-GTK applications.")
5664 (license (list license:bsd-2
5665 license:lgpl2.1+))))
5666
5667 (define-public python2-notify2
5668 (package-with-python2 python-notify2))
5669
5670 (define-public python-lxml
5671 (package
5672 (name "python-lxml")
5673 (version "4.2.5")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "lxml" version))
5678 (sha256
5679 (base32
5680 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5681 (build-system python-build-system)
5682 (inputs
5683 `(("libxml2" ,libxml2)
5684 ("libxslt" ,libxslt)))
5685 (home-page "http://lxml.de/")
5686 (synopsis
5687 "Python XML processing library")
5688 (description
5689 "The lxml XML toolkit is a Pythonic binding for the C libraries
5690 libxml2 and libxslt.")
5691 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5692
5693 (define-public python2-lxml
5694 (package-with-python2 python-lxml))
5695
5696 ;; beautifulsoup4 has a totally different namespace than 3.x,
5697 ;; and pypi seems to put it under its own name, so I guess we should too
5698 (define-public python-beautifulsoup4
5699 (package
5700 (name "python-beautifulsoup4")
5701 (version "4.7.1")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "beautifulsoup4" version))
5706 (sha256
5707 (base32
5708 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5709 (build-system python-build-system)
5710 (arguments
5711 `(#:phases
5712 (modify-phases %standard-phases
5713 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5714 ;; must use this conversion script when building with Python 3. The
5715 ;; conversion script also runs the tests.
5716 ;; For more information, see the file 'convert-py3k' in the source
5717 ;; distribution.
5718 (replace 'check
5719 (lambda _ (invoke "./convert-py3k"))))))
5720 (propagated-inputs
5721 `(("python-soupsieve" ,python-soupsieve)))
5722 (home-page
5723 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5724 (synopsis
5725 "Python screen-scraping library")
5726 (description
5727 "Beautiful Soup is a Python library designed for rapidly setting up
5728 screen-scraping projects. It offers Pythonic idioms for navigating,
5729 searching, and modifying a parse tree, providing a toolkit for
5730 dissecting a document and extracting what you need. It automatically
5731 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5732 (license license:expat)
5733 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5734
5735 (define-public python2-beautifulsoup4
5736 (package
5737 (inherit (package-with-python2
5738 (strip-python2-variant python-beautifulsoup4)))
5739 (arguments `(#:python ,python-2))))
5740
5741 (define-public python-soupsieve
5742 (package
5743 (name "python-soupsieve")
5744 (version "1.9.2")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "soupsieve" version))
5749 (sha256
5750 (base32
5751 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5752 (build-system python-build-system)
5753 (arguments `(#:tests? #f))
5754 ;;XXX: 2 tests fail currently despite claming they were to be
5755 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5756 ;;don't want to create a circular dependency.
5757 (home-page "https://github.com/facelessuser/soupsieve")
5758 (synopsis "CSS selector library")
5759 (description
5760 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5761 Soup 4. It aims to provide selecting, matching, and filtering using modern
5762 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5763 specifications up through the latest CSS level 4 drafts and beyond (though
5764 some are not yet implemented).")
5765 (properties `((python2-variant . ,(delay python2-soupsieve))))
5766 (license license:expat)))
5767
5768 (define-public python2-soupsieve
5769 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5770 (package
5771 (inherit base)
5772 (propagated-inputs
5773 `(("python2-backports-functools-lru-cache"
5774 ,python2-backports-functools-lru-cache)
5775 ,@(package-propagated-inputs base))))))
5776
5777 (define-public python-netifaces
5778 (package
5779 (name "python-netifaces")
5780 (version "0.10.7")
5781 (source
5782 (origin
5783 (method url-fetch)
5784 (uri (pypi-uri "netifaces" version))
5785 (sha256
5786 (base32
5787 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5788 (build-system python-build-system)
5789 (home-page "https://github.com/al45tair/netifaces")
5790 (synopsis
5791 "Python module for portable network interface information")
5792 (description
5793 "Netifaces is a Python module providing information on network
5794 interfaces in an easy and portable manner.")
5795 (license license:expat)))
5796
5797 (define-public python2-netifaces
5798 (package-with-python2 python-netifaces))
5799
5800 (define-public python-networkx
5801 (package
5802 (name "python-networkx")
5803 (version "2.2")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "networkx" version ".zip"))
5808 (sha256
5809 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5810 (build-system python-build-system)
5811 ;; python-decorator is needed at runtime.
5812 (propagated-inputs
5813 `(("python-decorator" ,python-decorator)))
5814 (native-inputs
5815 `(("python-nose" ,python-nose)
5816 ("unzip" ,unzip)))
5817 (home-page "https://networkx.github.io/")
5818 (synopsis "Python module for creating and manipulating graphs and networks")
5819 (description
5820 "NetworkX is a Python package for the creation, manipulation, and study
5821 of the structure, dynamics, and functions of complex networks.")
5822 (license license:bsd-3)))
5823
5824 (define-public python2-networkx
5825 (package-with-python2 python-networkx))
5826
5827 (define-public python-datrie
5828 (package
5829 (name "python-datrie")
5830 (version "0.7.1")
5831 (source
5832 (origin
5833 (method url-fetch)
5834 (uri (pypi-uri "datrie" version))
5835 (sha256
5836 (base32
5837 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5838 (build-system python-build-system)
5839 (arguments
5840 `(#:phases (modify-phases %standard-phases
5841 (add-before 'build 'cythonize
5842 (lambda _
5843 ;; Regenerate Cython classes to solve ABI issues with Python
5844 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5845 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5846 "src/stdio_ext.pxd" "-a"))))))
5847 (native-inputs
5848 `(("python-cython" ,python-cython)
5849 ("python-hypothesis" ,python-hypothesis)
5850 ("python-pytest" ,python-pytest)
5851 ("python-pytest-runner" ,python-pytest-runner)))
5852 (home-page "https://github.com/kmike/datrie")
5853 (synopsis "Fast, efficiently stored trie for Python")
5854 (description
5855 "This package provides a fast, efficiently stored trie implementation for
5856 Python.")
5857 (license license:lgpl2.1+)))
5858
5859 (define-public snakemake
5860 (package
5861 (name "snakemake")
5862 (version "5.2.4")
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "snakemake" version))
5867 (sha256
5868 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5869 (build-system python-build-system)
5870 (arguments
5871 ;; TODO: Package missing test dependencies.
5872 '(#:tests? #f
5873 #:phases
5874 (modify-phases %standard-phases
5875 ;; For cluster execution Snakemake will call Python. Since there is
5876 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5877 ;; this by calling the snakemake wrapper instead.
5878 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5879 (lambda* (#:key outputs #:allow-other-keys)
5880 (substitute* "snakemake/executors.py"
5881 (("\\{sys.executable\\} -m snakemake")
5882 (string-append (assoc-ref outputs "out")
5883 "/bin/snakemake")))
5884 #t)))))
5885 (propagated-inputs
5886 `(("python-gitpython" ,python-gitpython)
5887 ("python-wrapt" ,python-wrapt)
5888 ("python-requests" ,python-requests)
5889 ("python-appdirs" ,python-appdirs)
5890 ("python-configargparse" ,python-configargparse)
5891 ("python-datrie" ,python-datrie)
5892 ("python-docutils" ,python-docutils)
5893 ("python-jinja2" ,python-jinja2)
5894 ("python-jsonschema" ,python-jsonschema)
5895 ("python-networkx" ,python-networkx)
5896 ("python-pyyaml" ,python-pyyaml)
5897 ("python-ratelimiter" ,python-ratelimiter)))
5898 (home-page "https://snakemake.readthedocs.io")
5899 (synopsis "Python-based execution environment for make-like workflows")
5900 (description
5901 "Snakemake aims to reduce the complexity of creating workflows by
5902 providing a clean and modern domain specific specification language (DSL) in
5903 Python style, together with a fast and comfortable execution environment.")
5904 (license license:expat)))
5905
5906 ;; This is currently needed for the pigx-* packages.
5907 (define-public snakemake-4
5908 (package (inherit snakemake)
5909 (version "4.4.0")
5910 (source
5911 (origin
5912 (method url-fetch)
5913 (uri (pypi-uri "snakemake" version))
5914 (sha256
5915 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5916 (propagated-inputs
5917 `(("python-wrapt" ,python-wrapt)
5918 ("python-requests" ,python-requests)
5919 ("python-appdirs" ,python-appdirs)
5920 ("python-configargparse" ,python-configargparse)
5921 ("python-pyyaml" ,python-pyyaml)
5922 ("python-ratelimiter" ,python-ratelimiter)))))
5923
5924 (define-public python-pyqrcode
5925 (package
5926 (name "python-pyqrcode")
5927 (version "1.2.1")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (pypi-uri "PyQRCode" version))
5932 (sha256
5933 (base32
5934 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5935 (build-system python-build-system)
5936 (home-page
5937 "https://github.com/mnooner256/pyqrcode")
5938 (synopsis "QR code generator")
5939 (description
5940 "Pyqrcode is a QR code generator written purely in Python with
5941 SVG, EPS, PNG and terminal output.")
5942 (license license:bsd-3)))
5943
5944 (define-public python-seaborn
5945 (package
5946 (name "python-seaborn")
5947 (version "0.9.0")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "seaborn" version))
5952 (sha256
5953 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5954 (build-system python-build-system)
5955 (arguments
5956 `(#:phases
5957 (modify-phases %standard-phases
5958 (add-before 'check 'start-xserver
5959 (lambda* (#:key inputs #:allow-other-keys)
5960 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5961 ;; There must be a running X server and make check doesn't
5962 ;; start one. Therefore we must do it.
5963 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5964 (setenv "DISPLAY" ":1")
5965 #t)))
5966 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5967 (propagated-inputs
5968 `(("python-pandas" ,python-pandas)
5969 ("python-matplotlib" ,python-matplotlib)
5970 ("python-numpy" ,python-numpy)
5971 ("python-scipy" ,python-scipy)))
5972 (native-inputs
5973 `(("python-pytest" ,python-pytest)
5974 ("xorg-server" ,xorg-server)))
5975 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5976 (synopsis "Statistical data visualization")
5977 (description
5978 "Seaborn is a library for making attractive and informative statistical
5979 graphics in Python. It is built on top of matplotlib and tightly integrated
5980 with the PyData stack, including support for numpy and pandas data structures
5981 and statistical routines from scipy and statsmodels.")
5982 (license license:bsd-3)))
5983
5984 (define-public python2-seaborn
5985 (package-with-python2 python-seaborn))
5986
5987 (define-public python-mpmath
5988 (package
5989 (name "python-mpmath")
5990 (version "0.19")
5991 (source (origin
5992 (method url-fetch)
5993 (uri (string-append "http://mpmath.org/files/mpmath-"
5994 version ".tar.gz"))
5995 (sha256
5996 (base32
5997 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5998 (build-system python-build-system)
5999 (arguments
6000 '(#:phases
6001 (modify-phases %standard-phases
6002 (replace 'check
6003 (lambda _
6004 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6005 (home-page "http://mpmath.org")
6006 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6007 (description
6008 "@code{mpmath} can be used as an arbitrary-precision substitute for
6009 Python's float/complex types and math/cmath modules, but also does much
6010 more advanced mathematics.")
6011 (license license:bsd-3)))
6012
6013 (define-public python2-mpmath
6014 (package-with-python2 python-mpmath))
6015
6016 (define-public python-bigfloat
6017 (package
6018 (name "python-bigfloat")
6019 (version "0.3.0")
6020 (source
6021 (origin
6022 (method url-fetch)
6023 (uri (pypi-uri "bigfloat" version))
6024 (sha256
6025 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6026 (build-system python-build-system)
6027 (inputs
6028 `(("mpfr" ,mpfr)))
6029 (home-page "https://github.com/mdickinson/bigfloat")
6030 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6031 (description
6032 "This package provides a Python interface to the MPFR library for
6033 multiprecision arithmetic.")
6034 (license license:lgpl3+)))
6035
6036 (define-public python2-bigfloat
6037 (package-with-python2 python-bigfloat))
6038
6039 (define-public python-sympy
6040 (package
6041 (name "python-sympy")
6042 (version "1.1.1")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (string-append
6047 "https://github.com/sympy/sympy/releases/download/sympy-"
6048 version "/sympy-" version ".tar.gz"))
6049 (sha256
6050 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6051 (build-system python-build-system)
6052 (arguments
6053 `(#:phases
6054 (modify-phases %standard-phases
6055 ;; Run the core tests after installation. By default it would run
6056 ;; *all* tests, which take a very long time to complete and are known
6057 ;; to be flaky.
6058 (delete 'check)
6059 (add-after 'install 'check
6060 (lambda* (#:key outputs #:allow-other-keys)
6061 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6062 #t)))))
6063 (propagated-inputs
6064 `(("python-mpmath" ,python-mpmath)))
6065 (home-page "http://www.sympy.org/")
6066 (synopsis "Python library for symbolic mathematics")
6067 (description
6068 "SymPy is a Python library for symbolic mathematics. It aims to become a
6069 full-featured computer algebra system (CAS) while keeping the code as simple
6070 as possible in order to be comprehensible and easily extensible.")
6071 (license license:bsd-3)))
6072
6073 (define-public python2-sympy
6074 (package
6075 (inherit (package-with-python2 python-sympy))
6076 (arguments
6077 `(#:phases
6078 (modify-phases %standard-phases
6079 ;; Run the core tests after installation. By default it would run
6080 ;; *all* tests, which take a very long time to complete and are known
6081 ;; to be flaky.
6082 (delete 'check)
6083 (add-after 'install 'check
6084 (lambda* (#:key outputs #:allow-other-keys)
6085 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6086 #t)))))))
6087
6088 (define-public python-q
6089 (package
6090 (name "python-q")
6091 (version "2.6")
6092 (source
6093 (origin
6094 (method url-fetch)
6095 (uri (pypi-uri "q" version))
6096 (sha256
6097 (base32
6098 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6099 (build-system python-build-system)
6100 (home-page "https://github.com/zestyping/q")
6101 (synopsis "Quick-and-dirty debugging output for tired programmers")
6102 (description
6103 "q is a Python module for \"print\" style of debugging Python code. It
6104 provides convenient short API for print out of values, tracebacks, and
6105 falling into the Python interpreter.")
6106 (license license:asl2.0)))
6107
6108 (define-public python2-q
6109 (package-with-python2 python-q))
6110
6111 (define-public python2-xlib
6112 (package
6113 (name "python2-xlib")
6114 (version "0.14")
6115 (source (origin
6116 (method url-fetch)
6117 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6118 "/" version "/"
6119 "python-xlib-" version ".tar.gz"))
6120 (sha256
6121 (base32
6122 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6123 (build-system python-build-system)
6124 (arguments
6125 `(#:python ,python-2 ;Python 2 only
6126 #:tests? #f)) ;no tests
6127 (home-page "http://python-xlib.sourceforge.net/")
6128 (synopsis "Python X11 client library")
6129 (description
6130 "The Python X Library is intended to be a fully functional X client
6131 library for Python programs. It is useful to implement low-level X clients.
6132 It is written entirely in Python.")
6133 (license license:gpl2+)))
6134
6135 (define-public python-singledispatch
6136 (package
6137 (name "python-singledispatch")
6138 (version "3.4.0.3")
6139 (source
6140 (origin
6141 (method url-fetch)
6142 (uri (pypi-uri "singledispatch" version))
6143 (sha256
6144 (base32
6145 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6146 (build-system python-build-system)
6147 (native-inputs
6148 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6149 (home-page
6150 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6151 (synopsis "Backport of singledispatch feature from Python 3.4")
6152 (description
6153 "This library brings functools.singledispatch from Python 3.4 to Python
6154 2.6-3.3.")
6155 (license license:expat)))
6156
6157 (define-public python2-singledispatch
6158 (package-with-python2 python-singledispatch))
6159
6160 ;; the python- version can be removed with python-3.5
6161 (define-public python-backports-abc
6162 (package
6163 (name "python-backports-abc")
6164 (version "0.5")
6165 (source
6166 (origin
6167 (method url-fetch)
6168 (uri (pypi-uri "backports_abc" version))
6169 (sha256
6170 (base32
6171 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6172 (build-system python-build-system)
6173 (home-page "https://github.com/cython/backports_abc")
6174 (synopsis "Backport of additions to the 'collections.abc' module")
6175 (description
6176 "Python-backports-abc provides a backport of additions to the
6177 @code{collections.abc} module in Python-3.5.")
6178 (license license:psfl)))
6179
6180 (define-public python2-backports-abc
6181 (package-with-python2 python-backports-abc))
6182
6183 (define-public python-backports-csv
6184 (package
6185 (name "python-backports-csv")
6186 (version "1.0.5")
6187 (source
6188 (origin
6189 (method url-fetch)
6190 (uri (pypi-uri "backports.csv" version))
6191 (sha256
6192 (base32
6193 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6194 (build-system python-build-system)
6195 (home-page "https://github.com/ryanhiebert/backports.csv")
6196 (synopsis "Backport of Python 3's csv module for Python 2")
6197 (description
6198 "Provides a backport of Python 3's @code{csv} module for parsing
6199 comma separated values. The API of the @code{csv} module in Python 2
6200 is drastically different from the @code{csv} module in Python 3.
6201 This is due, for the most part, to the difference between str in
6202 Python 2 and Python 3.")
6203 (license license:psfl)))
6204
6205 (define-public python2-backports-csv
6206 (package-with-python2 python-backports-csv))
6207
6208 (define-public python2-backports-shutil-get-terminal-size
6209 (package
6210 (name "python2-backports-shutil-get-terminal-size")
6211 (version "1.0.0")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6216 (sha256
6217 (base32
6218 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6219 (build-system python-build-system)
6220 (arguments
6221 `(#:python ,python-2
6222 #:phases
6223 (modify-phases %standard-phases
6224 (replace 'check
6225 (lambda _
6226 (invoke "py.test" "-v"))))))
6227 (native-inputs
6228 `(("python2-pytest" ,python2-pytest)))
6229 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6230 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6231 (description
6232 "This package provides a backport of the @code{get_terminal_size
6233 function} from Python 3.3's @code{shutil}.
6234 Unlike the original version it is written in pure Python rather than C,
6235 so it might be a tiny bit slower.")
6236 (license license:expat)))
6237
6238 (define-public python-waf
6239 (package
6240 (name "python-waf")
6241 (version "2.0.11")
6242 (source (origin
6243 (method url-fetch)
6244 (uri (string-append "https://waf.io/"
6245 "waf-" version ".tar.bz2"))
6246 (sha256
6247 (base32
6248 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6249 (build-system python-build-system)
6250 (arguments
6251 '(#:phases
6252 (modify-phases %standard-phases
6253 (replace 'build
6254 (lambda _
6255 (invoke "python" "waf-light" "configure" "build")))
6256 (replace 'check
6257 (lambda _
6258 (invoke "python" "waf" "--version")))
6259 (replace 'install
6260 (lambda* (#:key outputs #:allow-other-keys)
6261 (let ((out (assoc-ref outputs "out")))
6262 (install-file "waf" (string-append out "/bin")))
6263 #t))
6264 ;; waf breaks when it is wrapped.
6265 (delete 'wrap))))
6266 (home-page "https://waf.io/")
6267 (synopsis "Python-based build system")
6268 (description
6269 "Waf is a Python-based framework for configuring, compiling and installing
6270 applications.")
6271 (license license:bsd-3)))
6272
6273 (define-public python2-waf
6274 (package-with-python2 python-waf))
6275
6276 (define-public python-pyzmq
6277 (package
6278 (name "python-pyzmq")
6279 (version "17.1.2")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (pypi-uri "pyzmq" version))
6284 (sha256
6285 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6286 (build-system python-build-system)
6287 (arguments
6288 `(#:configure-flags
6289 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6290 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6291 ;; --inplace' for 'python setup.py test' to work.
6292 #:tests? #f))
6293 (inputs
6294 `(("zeromq" ,zeromq)))
6295 (native-inputs
6296 `(("pkg-config" ,pkg-config)
6297 ("python-nose" ,python-nose)))
6298 (home-page "https://github.com/zeromq/pyzmq")
6299 (synopsis "Python bindings for 0MQ")
6300 (description
6301 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6302 (license license:bsd-4)))
6303
6304 (define-public python2-pyzmq
6305 (package-with-python2 python-pyzmq))
6306
6307 (define-public python-pep8
6308 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6309 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6310 ;; some dependents' test suites, and nothing more.
6311 (package
6312 (name "python-pep8")
6313 (version "1.7.0")
6314 (source
6315 (origin
6316 (method url-fetch)
6317 (uri (pypi-uri "pep8" version))
6318 (sha256
6319 (base32
6320 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6321 (build-system python-build-system)
6322 (home-page "https://pep8.readthedocs.org/")
6323 (synopsis "Python style guide checker")
6324 (description
6325 "This tools checks Python code against some of the style conventions in
6326 PEP 8.")
6327 (license license:expat)))
6328
6329 (define-public python2-pep8
6330 (package-with-python2 python-pep8))
6331
6332 (define-public python-pyflakes
6333 (package
6334 (name "python-pyflakes")
6335 (version "2.1.1")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "pyflakes" version))
6340 (sha256
6341 (base32
6342 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6343 (build-system python-build-system)
6344 (home-page
6345 "https://github.com/pyflakes/pyflakes")
6346 (synopsis "Passive checker of Python programs")
6347 (description
6348 "Pyflakes statically checks Python source code for common errors.")
6349 (license license:expat)))
6350
6351 (define-public python2-pyflakes
6352 (package-with-python2 python-pyflakes))
6353
6354 (define-public python-mccabe
6355 (package
6356 (name "python-mccabe")
6357 (version "0.6.1")
6358 (source
6359 (origin
6360 (method url-fetch)
6361 (uri (pypi-uri "mccabe" version))
6362 (sha256
6363 (base32
6364 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6365 (build-system python-build-system)
6366 (native-inputs
6367 `(("python-pytest" ,python-pytest-bootstrap)
6368 ("python-pytest-runner" ,python-pytest-runner)))
6369 (home-page "https://github.com/flintwork/mccabe")
6370 (synopsis "McCabe checker, plugin for flake8")
6371 (description
6372 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6373 complexity of Python source code.")
6374 (license license:expat)))
6375
6376 (define-public python2-mccabe
6377 (package-with-python2 python-mccabe))
6378
6379 (define-public python-mccabe-0.2.1
6380 (package (inherit python-mccabe)
6381 (version "0.2.1")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (pypi-uri "mccabe" version))
6386 (sha256
6387 (base32
6388 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6389
6390 (define-public python2-mccabe-0.2.1
6391 (package-with-python2 python-mccabe-0.2.1))
6392
6393 ;; Flake8 2.4.1 requires an older version of pep8.
6394 ;; This should be removed ASAP.
6395 (define-public python-pep8-1.5.7
6396 (package (inherit python-pep8)
6397 (version "1.5.7")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (pypi-uri "pep8" version))
6402 (sha256
6403 (base32
6404 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6405 (arguments
6406 ;; XXX Tests not compatible with Python 3.5.
6407 '(#:tests? #f))))
6408
6409 (define-public python2-pep8-1.5.7
6410 (package-with-python2 python-pep8-1.5.7))
6411
6412 ;; Flake8 2.4.1 requires an older version of pyflakes.
6413 ;; This should be removed ASAP.
6414 (define-public python-pyflakes-0.8.1
6415 (package (inherit python-pyflakes)
6416 (version "0.8.1")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "pyflakes" version))
6421 (sha256
6422 (base32
6423 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6424 (arguments
6425 ;; XXX Tests not compatible with Python 3.5.
6426 '(#:tests? #f))))
6427
6428 (define-public python2-pyflakes-0.8.1
6429 (package-with-python2 python-pyflakes-0.8.1))
6430
6431 (define-public python-flake8
6432 (package
6433 (name "python-flake8")
6434 (version "3.7.7")
6435 (source (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "flake8" version))
6438 (sha256
6439 (base32
6440 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6441 (build-system python-build-system)
6442 (arguments
6443 `(#:phases
6444 (modify-phases %standard-phases
6445 (delete 'check)
6446 (add-after 'install 'check
6447 (lambda* (#:key inputs outputs #:allow-other-keys)
6448 (add-installed-pythonpath inputs outputs)
6449 (invoke "pytest" "-v")
6450 #t)))))
6451 (propagated-inputs
6452 `(("python-pycodestyle" ,python-pycodestyle)
6453 ("python-entrypoints" ,python-entrypoints)
6454 ("python-pyflakes" ,python-pyflakes)
6455 ("python-mccabe" ,python-mccabe)))
6456 (native-inputs
6457 `(("python-mock" ,python-mock)
6458 ("python-pytest" ,python-pytest-bootstrap)
6459 ("python-pytest-runner" ,python-pytest-runner)))
6460 (home-page "https://gitlab.com/pycqa/flake8")
6461 (synopsis
6462 "The modular source code checker: pep8, pyflakes and co")
6463 (description
6464 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6465 (properties `((python2-variant . ,(delay python2-flake8))))
6466 (license license:expat)))
6467
6468 (define-public python2-flake8
6469 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6470 (package (inherit base)
6471 (propagated-inputs
6472 `(("python2-configparser" ,python2-configparser)
6473 ("python2-enum34" ,python2-enum34)
6474 ("python2-typing" ,python2-typing)
6475 ,@(package-propagated-inputs base))))))
6476
6477 ;; python-hacking requires flake8 <2.6.0.
6478 (define-public python-flake8-2.5
6479 (package
6480 (inherit python-flake8)
6481 (version "2.5.5")
6482 (source (origin
6483 (method url-fetch)
6484 (uri (pypi-uri "flake8" version))
6485 (sha256
6486 (base32
6487 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6488 (propagated-inputs
6489 `(("python-pep8" ,python-pep8)
6490 ,@(package-propagated-inputs python-flake8)))
6491 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6492
6493 (define-public python2-flake8-2.5
6494 (package
6495 (inherit python2-flake8)
6496 (version (package-version python-flake8-2.5))
6497 (source (origin
6498 (inherit (package-source python-flake8-2.5))))
6499 (propagated-inputs
6500 `(("python2-pep8" ,python2-pep8)
6501 ,@(package-propagated-inputs python2-flake8)))))
6502
6503 (define-public python-flake8-polyfill
6504 (package
6505 (name "python-flake8-polyfill")
6506 (version "1.0.2")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "flake8-polyfill" version))
6511 (sha256
6512 (base32
6513 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6514 (build-system python-build-system)
6515 (arguments
6516 '(#:phases
6517 (modify-phases %standard-phases
6518 (replace 'check
6519 (lambda _
6520 (setenv "PYTHONPATH"
6521 (string-append (getcwd) "/build/lib:"
6522 (getenv "PYTHONPATH")))
6523 (invoke "py.test" "-v"))))))
6524 (native-inputs
6525 `(("python-flake8" ,python-flake8)
6526 ("python-mock" ,python-mock)
6527 ("python-pep8" ,python-pep8)
6528 ("python-pycodestyle" ,python-pycodestyle)
6529 ("python-pytest" ,python-pytest)))
6530 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6531 (synopsis "Polyfill package for Flake8 plugins")
6532 (description
6533 "This package that provides some compatibility helpers for Flake8
6534 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6535 (license license:expat)))
6536
6537 (define-public python2-flake8-polyfill
6538 (package-with-python2 python-flake8-polyfill))
6539
6540 (define-public python-mistune
6541 (package
6542 (name "python-mistune")
6543 (version "0.8.4")
6544 (source
6545 (origin
6546 (method url-fetch)
6547 (uri (pypi-uri "mistune" version))
6548 (sha256
6549 (base32
6550 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6551 (build-system python-build-system)
6552 (native-inputs
6553 `(("python-nose" ,python-nose)
6554 ("python-cython" ,python-cython)))
6555 (home-page "https://github.com/lepture/mistune")
6556 (synopsis "Markdown parser in pure Python")
6557 (description "This package provides a fast markdown parser in pure
6558 Python.")
6559 (license license:bsd-3)))
6560
6561 (define-public python2-mistune
6562 (package-with-python2 python-mistune))
6563
6564 (define-public python-markdown
6565 (package
6566 (name "python-markdown")
6567 (version "3.1.1")
6568 (source
6569 (origin
6570 (method url-fetch)
6571 (uri (pypi-uri "Markdown" version))
6572 (sha256
6573 (base32
6574 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6575 (build-system python-build-system)
6576 (native-inputs
6577 `(("python-nose" ,python-nose)
6578 ("python-pyyaml" ,python-pyyaml)))
6579 (home-page "https://python-markdown.github.io/")
6580 (synopsis "Python implementation of Markdown")
6581 (description
6582 "This package provides a Python implementation of John Gruber's
6583 Markdown. The library features international input, various Markdown
6584 extensions, and several HTML output formats. A command line wrapper
6585 markdown_py is also provided to convert Markdown files to HTML.")
6586 (license license:bsd-3)))
6587
6588 (define-public python2-markdown
6589 (package-with-python2 python-markdown))
6590
6591 (define-public python-ptyprocess
6592 (package
6593 (name "python-ptyprocess")
6594 (version "0.5.2")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "ptyprocess" version))
6599 (sha256
6600 (base32
6601 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6602 (build-system python-build-system)
6603 (native-inputs
6604 `(("python-nose" ,python-nose)))
6605 (arguments
6606 `(#:phases
6607 (modify-phases %standard-phases
6608 (replace 'check
6609 (lambda _ (invoke "nosetests"))))))
6610 (home-page "https://github.com/pexpect/ptyprocess")
6611 (synopsis "Run a subprocess in a pseudo terminal")
6612 (description
6613 "This package provides a Python library used to launch a subprocess in a
6614 pseudo terminal (pty), and interact with both the process and its pty.")
6615 (license license:isc)))
6616
6617 (define-public python2-ptyprocess
6618 (package-with-python2 python-ptyprocess))
6619
6620 (define-public python-cram
6621 (package
6622 (name "python-cram")
6623 (version "0.7")
6624 (home-page "https://bitheap.org/cram/")
6625 (source (origin
6626 (method url-fetch)
6627 (uri (list (string-append home-page "cram-"
6628 version ".tar.gz")
6629 (pypi-uri "cram" version)))
6630 (sha256
6631 (base32
6632 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6633 (arguments
6634 '(#:phases
6635 (modify-phases %standard-phases
6636 (add-after 'unpack 'patch-source
6637 (lambda _
6638 (substitute* (find-files "cram" ".*\\.py$")
6639 ;; Replace default shell path.
6640 (("/bin/sh") (which "sh")))
6641 (substitute* (find-files "tests" ".*\\.t$")
6642 (("md5") "md5sum")
6643 (("/bin/bash") (which "bash"))
6644 (("/bin/sh") (which "sh")))
6645 (substitute* "cram/_test.py"
6646 ;; This hack works around a bug triggered by substituting
6647 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6648 ;; "cram -h", which breaks the output at 80 characters. This
6649 ;; causes the line showing the default shell to break into two
6650 ;; lines, but the test expects a single line...
6651 (("env\\['COLUMNS'\\] = '80'")
6652 "env['COLUMNS'] = '160'"))
6653
6654 (substitute* "Makefile"
6655 ;; Recent versions of python-coverage have caused the test
6656 ;; coverage to decrease (as of version 0.7). Allow that.
6657 (("--fail-under=100")
6658 "--fail-under=90"))
6659
6660 #t))
6661 (replace 'check
6662 ;; The test phase uses the built library and executable.
6663 (lambda* (#:key inputs outputs #:allow-other-keys)
6664 (add-installed-pythonpath inputs outputs)
6665 (setenv "PATH" (string-append (getenv "PATH") ":"
6666 (assoc-ref outputs "out") "/bin"))
6667 (invoke "make" "test"))))))
6668 (build-system python-build-system)
6669 (native-inputs
6670 `(("python-coverage" ,python-coverage)
6671 ("which" ,which)))
6672 (synopsis "Simple testing framework for command line applications")
6673 (description
6674 "Cram is a functional testing framework for command line applications.
6675 Cram tests look like snippets of interactive shell sessions. Cram runs each
6676 command and compares the command output in the test with the command’s actual
6677 output.")
6678 (license license:gpl2+)))
6679
6680 (define-public python2-cram
6681 (package-with-python2 python-cram))
6682
6683 (define-public python-straight-plugin
6684 (package
6685 (name "python-straight-plugin")
6686 (version "1.4.1")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (pypi-uri "straight.plugin" version))
6691 (sha256
6692 (base32
6693 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6694 (build-system python-build-system)
6695 (home-page "https://github.com/ironfroggy/straight.plugin")
6696 (synopsis "Simple namespaced plugin facility")
6697 (description "Straight Plugin provides a type of plugin you can create from
6698 almost any existing Python modules, and an easy way for outside developers to
6699 add functionality and customization to your projects with their own plugins.")
6700 (license license:expat)))
6701
6702 (define-public python2-straight-plugin
6703 (package-with-python2 python-straight-plugin))
6704
6705 (define-public python-fonttools
6706 (package
6707 (name "python-fonttools")
6708 (version "3.38.0")
6709 (source (origin
6710 (method url-fetch)
6711 (uri (pypi-uri "fonttools" version ".zip"))
6712 (sha256
6713 (base32
6714 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6715 (build-system python-build-system)
6716 (native-inputs
6717 `(("unzip" ,unzip)
6718 ("python-pytest" ,python-pytest)
6719 ("python-pytest-runner" ,python-pytest-runner)))
6720 (home-page "https://github.com/behdad/fonttools")
6721 (synopsis "Tools to manipulate font files")
6722 (description
6723 "FontTools/TTX is a library to manipulate font files from Python. It
6724 supports reading and writing of TrueType/OpenType fonts, reading and writing
6725 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6726 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6727 from an XML-based format.")
6728 (license license:expat)))
6729
6730 (define-public python2-fonttools
6731 (package-with-python2 python-fonttools))
6732
6733 (define-public python-ly
6734 (package
6735 (name "python-ly")
6736 (version "0.9.5")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (pypi-uri name version))
6741 (sha256
6742 (base32
6743 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6744 (build-system python-build-system)
6745 (arguments
6746 ;; FIXME: Some tests need network access.
6747 '(#:tests? #f))
6748 (synopsis "Tool and library for manipulating LilyPond files")
6749 (description "This package provides a Python library to parse, manipulate
6750 or create documents in LilyPond format. A command line program ly is also
6751 provided that can be used to do various manipulations with LilyPond files.")
6752 (home-page "https://pypi.python.org/pypi/python-ly")
6753 (license license:gpl2+)))
6754
6755 (define-public python-appdirs
6756 (package
6757 (name "python-appdirs")
6758 (version "1.4.3")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "appdirs" version))
6763 (sha256
6764 (base32
6765 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6766 (build-system python-build-system)
6767 (home-page "https://github.com/ActiveState/appdirs")
6768 (synopsis
6769 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6770 (description
6771 "This module provides a portable way of finding out where user data
6772 should be stored on various operating systems.")
6773 (license license:expat)))
6774
6775 (define-public python2-appdirs
6776 (package-with-python2 python-appdirs))
6777
6778 (define-public python-llfuse
6779 (package
6780 (name "python-llfuse")
6781 (version "1.3.5")
6782 (source (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6785 (sha256
6786 (base32
6787 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6788 (build-system python-build-system)
6789 (inputs
6790 `(("fuse" ,fuse)
6791 ("attr" ,attr)))
6792 (native-inputs
6793 `(("pkg-config" ,pkg-config)))
6794 (synopsis "Python bindings for FUSE")
6795 (description
6796 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6797 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6798 (license license:lgpl2.0+)
6799 (properties `((python2-variant . ,(delay python2-llfuse))))))
6800
6801 (define-public python2-llfuse
6802 (package (inherit (package-with-python2
6803 (strip-python2-variant python-llfuse)))
6804 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6805
6806 ;; For attic-0.16
6807 (define-public python-llfuse-0.41
6808 (package (inherit python-llfuse)
6809 (version "0.41.1")
6810 (source (origin
6811 (method url-fetch)
6812 (uri (string-append
6813 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6814 "llfuse-" version ".tar.bz2"))
6815 (sha256
6816 (base32
6817 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6818 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6819 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6820 (license (list license:expat license:lgpl2.0+))))
6821
6822 (define-public python-msgpack
6823 (package
6824 (name "python-msgpack")
6825 (version "0.5.6")
6826 (source (origin
6827 (method url-fetch)
6828 (uri (pypi-uri "msgpack" version))
6829 (sha256
6830 (base32
6831 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6832 (build-system python-build-system)
6833 (arguments
6834 `(#:modules ((guix build utils)
6835 (guix build python-build-system)
6836 (ice-9 ftw)
6837 (srfi srfi-1)
6838 (srfi srfi-26))
6839 #:phases
6840 (modify-phases %standard-phases
6841 (replace 'check
6842 (lambda _
6843 (let ((cwd (getcwd)))
6844 (setenv "PYTHONPATH"
6845 (string-append cwd "/build/"
6846 (find (cut string-prefix? "lib" <>)
6847 (scandir (string-append cwd "/build")))
6848 ":"
6849 (getenv "PYTHONPATH")))
6850 (invoke "pytest" "-v" "test")))))))
6851 (native-inputs
6852 `(("python-pytest" ,python-pytest)))
6853 (synopsis "MessagePack (de)serializer")
6854 (description "MessagePack is a fast, compact binary serialization format,
6855 suitable for similar data to JSON. This package provides CPython bindings for
6856 reading and writing MessagePack data.")
6857 (home-page "https://pypi.python.org/pypi/msgpack/")
6858 (license license:asl2.0)))
6859
6860 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6861 ;; release 0.5. Some packages like borg still call it by the old name for now.
6862 ;; <https://bugs.gnu.org/30662>
6863 (define-public python-msgpack-transitional
6864 (package
6865 (inherit python-msgpack)
6866 (name "python-msgpack-transitional")
6867 (arguments
6868 (substitute-keyword-arguments (package-arguments python-msgpack)
6869 ((#:phases phases)
6870 `(modify-phases ,phases
6871 (add-after 'unpack 'configure-transitional
6872 (lambda _
6873 ;; Keep using the old name.
6874 (substitute* "setup.py"
6875 (("TRANSITIONAL = False")
6876 "TRANSITIONAL = 1"))
6877 #t))))))))
6878
6879 (define-public python2-msgpack
6880 (package-with-python2 python-msgpack))
6881
6882 (define-public python-netaddr
6883 (package
6884 (name "python-netaddr")
6885 (version "0.7.19")
6886 (source
6887 (origin
6888 (method url-fetch)
6889 (uri (pypi-uri "netaddr" version))
6890 (sha256
6891 (base32
6892 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6893 (build-system python-build-system)
6894 (arguments `(#:tests? #f)) ;; No tests.
6895 (home-page "https://github.com/drkjam/netaddr/")
6896 (synopsis "Pythonic manipulation of network addresses")
6897 (description
6898 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6899 and MAC network addresses.")
6900 (license license:bsd-3)))
6901
6902 (define-public python2-netaddr
6903 (package-with-python2 python-netaddr))
6904
6905 (define-public python2-pyroute2
6906 (package
6907 (name "python2-pyroute2")
6908 (version "0.5.6")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "pyroute2" version))
6913 (sha256
6914 (base32
6915 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6916 (build-system python-build-system)
6917 (arguments
6918 `(#:python ,python-2)) ;Python 3.x is not supported
6919 (home-page "https://github.com/svinota/pyroute2")
6920 (synopsis "Python netlink library")
6921 (description
6922 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6923 Supported netlink families and protocols include:
6924 @itemize
6925 @item rtnl, network settings - addresses, routes, traffic controls
6926 @item nfnetlink - netfilter API: ipset, nftables, ...
6927 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6928 @item devlink - manage and monitor devlink-enabled hardware
6929 @item generic - generic netlink families
6930 @itemize
6931 @item nl80211 - wireless functions API (basic support)
6932 @item taskstats - extended process statistics
6933 @item acpi_events - ACPI events monitoring
6934 @item thermal_events - thermal events monitoring
6935 @item VFS_DQUOT - disk quota events monitoring
6936 @end itemize
6937 @end itemize")
6938 (license license:gpl2+)))
6939
6940 (define-public python-wrapt
6941 (package
6942 (name "python-wrapt")
6943 (version "1.11.1")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "wrapt" version))
6948 (sha256
6949 (base32
6950 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6951 (build-system python-build-system)
6952 (arguments
6953 ;; Tests are not included in the tarball, they are only available in the
6954 ;; git repository.
6955 `(#:tests? #f))
6956 (home-page "https://github.com/GrahamDumpleton/wrapt")
6957 (synopsis "Module for decorators, wrappers and monkey patching")
6958 (description
6959 "The aim of the wrapt module is to provide a transparent object proxy for
6960 Python, which can be used as the basis for the construction of function
6961 wrappers and decorator functions.")
6962 (license license:bsd-2)))
6963
6964 (define-public python2-wrapt
6965 (package-with-python2 python-wrapt))
6966
6967 (define-public python-xlrd
6968 (package
6969 (name "python-xlrd")
6970 (version "1.0.0")
6971 (source (origin
6972 (method url-fetch)
6973 (uri (pypi-uri "xlrd" version))
6974 (sha256
6975 (base32
6976 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6977 (build-system python-build-system)
6978 (arguments
6979 `(#:phases
6980 (modify-phases %standard-phases
6981 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6982 ;; run tests instead for now.
6983 (replace 'check (lambda _ (invoke "nosetests"))))))
6984 (native-inputs `(("python-nose" ,python-nose)))
6985 (home-page "http://www.python-excel.org/")
6986 (synopsis "Library for extracting data from Excel files")
6987 (description "This package provides a library to extract data from
6988 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6989 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6990 Unicode-aware. It is not intended as an end-user tool.")
6991 (license license:bsd-3)))
6992
6993 (define-public python2-xlrd
6994 (package-with-python2 python-xlrd))
6995
6996 (define-public python-prettytable
6997 (package
6998 (name "python-prettytable")
6999 (version "0.7.2")
7000 (source
7001 (origin
7002 (method url-fetch)
7003 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7004 (sha256
7005 (base32
7006 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7007 (build-system python-build-system)
7008 (home-page "http://code.google.com/p/prettytable/")
7009 (synopsis "Display tabular data in an ASCII table format")
7010 (description
7011 "A library designed to represent tabular data in visually appealing ASCII
7012 tables. PrettyTable allows for selection of which columns are to be printed,
7013 independent alignment of columns (left or right justified or centred) and
7014 printing of sub-tables by specifying a row range.")
7015 (license license:bsd-3)))
7016
7017 (define-public python2-prettytable
7018 (package-with-python2 python-prettytable))
7019
7020 (define-public python-tables
7021 (package
7022 (name "python-tables")
7023 (version "3.4.4")
7024 (source
7025 (origin
7026 (method url-fetch)
7027 (uri (pypi-uri "tables" version))
7028 (sha256
7029 (base32
7030 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7031 (modules '((guix build utils)))
7032 (snippet
7033 '(begin
7034 ;; Remove pre-compiled .pyc files from source.
7035 (for-each delete-file-recursively
7036 (find-files "." "__pycache__" #:directories? #t))
7037 (for-each delete-file (find-files "." "\\.pyc$"))
7038 #t))))
7039 (build-system python-build-system)
7040 (arguments
7041 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7042 ;; or "check", so we must override the build and check phases.
7043 #:phases
7044 (modify-phases %standard-phases
7045 (add-after 'unpack 'use-gcc
7046 (lambda _
7047 (substitute* "setup.py"
7048 (("compiler = new_compiler\\(\\)" line)
7049 (string-append line
7050 "\ncompiler.set_executables(compiler='gcc',"
7051 "compiler_so='gcc',"
7052 "linker_exe='gcc',"
7053 "linker_so='gcc -shared')")))
7054 #t))
7055 (replace 'build
7056 (lambda* (#:key inputs #:allow-other-keys)
7057 (invoke "python" "setup.py" "build"
7058 (string-append "--hdf5="
7059 (assoc-ref inputs "hdf5")))))
7060 (replace 'check
7061 (lambda* (#:key inputs #:allow-other-keys)
7062 (invoke "python" "setup.py" "check"
7063 (string-append "--hdf5="
7064 (assoc-ref inputs "hdf5"))))))))
7065 (propagated-inputs
7066 `(("python-numexpr" ,python-numexpr)
7067 ("python-numpy" ,python-numpy)))
7068 (native-inputs
7069 `(("python-cython" ,python-cython)
7070 ("pkg-config" ,pkg-config)))
7071 (inputs
7072 `(("hdf5" ,hdf5)
7073 ("bzip2" ,bzip2)
7074 ("zlib" ,zlib)))
7075 (home-page "http://www.pytables.org/")
7076 (synopsis "Hierarchical datasets for Python")
7077 (description "PyTables is a package for managing hierarchical datasets and
7078 designed to efficiently cope with extremely large amounts of data.")
7079 (license license:bsd-3)))
7080
7081 (define-public python2-tables
7082 (package-with-python2 python-tables))
7083
7084 (define-public python-pyasn1
7085 (package
7086 (name "python-pyasn1")
7087 (version "0.4.3")
7088 (source
7089 (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "pyasn1" version))
7092 (sha256
7093 (base32
7094 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7095 (build-system python-build-system)
7096 (home-page "http://pyasn1.sourceforge.net/")
7097 (synopsis "ASN.1 types and codecs")
7098 (description
7099 "This is an implementation of ASN.1 types and codecs in Python. It is
7100 suitable for a wide range of protocols based on the ASN.1 specification.")
7101 (license license:bsd-2)))
7102
7103 (define-public python2-pyasn1
7104 (package-with-python2 python-pyasn1))
7105
7106 (define-public python-pyasn1-modules
7107 (package
7108 (name "python-pyasn1-modules")
7109 (version "0.2.2")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "pyasn1-modules" version))
7114 (sha256
7115 (base32
7116 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7117 (build-system python-build-system)
7118 (propagated-inputs
7119 `(("python-pyasn1" ,python-pyasn1)))
7120 (home-page "https://sourceforge.net/projects/pyasn1/")
7121 (synopsis "ASN.1 codec implementations")
7122 (description
7123 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7124 implementations of ASN.1-based codecs and protocols.")
7125 (license license:bsd-3)))
7126
7127 (define-public python2-pyasn1-modules
7128 (package-with-python2 python-pyasn1-modules))
7129
7130 (define-public python-ipaddress
7131 (package
7132 (name "python-ipaddress")
7133 (version "1.0.22")
7134 (source (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "ipaddress" version))
7137 (sha256
7138 (base32
7139 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7140 (build-system python-build-system)
7141 (home-page "https://github.com/phihag/ipaddress")
7142 (synopsis "IP address manipulation library")
7143 (description
7144 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7145 in Python. This library is used to create, poke at, and manipulate IPv4 and
7146 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7147 module to older versions of Python.")
7148 (license license:psfl)))
7149
7150 (define-public python2-ipaddress
7151 (package-with-python2 python-ipaddress))
7152
7153 (define-public python2-ipaddr
7154 (package
7155 (name "python2-ipaddr")
7156 (version "2.1.11")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (pypi-uri "ipaddr" version))
7161 (sha256
7162 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7163 (build-system python-build-system)
7164 (arguments
7165 `(#:python ,python-2 ;version 2 only
7166 #:phases
7167 (modify-phases %standard-phases
7168 (replace 'check
7169 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7170 (home-page "https://github.com/google/ipaddr-py")
7171 (synopsis "IP address manipulation library")
7172 (description
7173 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7174 IPv6 addresses and networks.
7175
7176 For new implementations you may prefer to use the standard module
7177 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7178 versions of Python.")
7179 (license license:asl2.0)))
7180
7181 (define-public python-idna
7182 (package
7183 (name "python-idna")
7184 (version "2.8")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "idna" version))
7189 (sha256
7190 (base32
7191 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7192 (build-system python-build-system)
7193 (home-page "https://github.com/kjd/idna")
7194 (synopsis "Internationalized domain names in applications")
7195 (description
7196 "This is a library to support the Internationalised Domain Names in
7197 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7198 protocol is often referred to as “IDNA2008” and can produce different results
7199 from the earlier standard from 2003. The library is also intended to act as a
7200 suitable drop-in replacement for the “encodings.idna” module that comes with
7201 the Python standard library but currently only supports the older 2003
7202 specification.")
7203 (license license:bsd-4)))
7204
7205 (define-public python2-idna
7206 (package-with-python2 python-idna))
7207
7208 (define-public python-idna-ssl
7209 (package
7210 (name "python-idna-ssl")
7211 (version "1.0.1")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (pypi-uri "idna-ssl" version))
7216 (sha256
7217 (base32
7218 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7219 (build-system python-build-system)
7220 (arguments
7221 `(#:tests? #f)) ;circular dependency with python-aiohttp
7222 (home-page "https://github.com/aio-libs/idna-ssl")
7223 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7224 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7225 domains support.")
7226 (license license:expat)))
7227
7228 (define-public python-pretend
7229 (package
7230 (name "python-pretend")
7231 (version "1.0.9")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "pretend" version))
7236 (sha256
7237 (base32
7238 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/alex/pretend")
7241 (synopsis "Library for stubbing in Python")
7242 (description
7243 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7244 technique for writing tests. You may hear the term mixed up with mocks,
7245 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7246 responses, rather than doing any computation.")
7247 (license license:bsd-3)))
7248
7249 (define-public python2-pretend
7250 (package-with-python2 python-pretend))
7251
7252 (define-public python-pip
7253 (package
7254 (name "python-pip")
7255 (version "18.1")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "pip" version))
7260 (sha256
7261 (base32
7262 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7263 (build-system python-build-system)
7264 (arguments
7265 '(#:tests? #f)) ; there are no tests in the pypi archive.
7266 (home-page "https://pip.pypa.io/")
7267 (synopsis "Package manager for Python software")
7268 (description
7269 "Pip is a package manager for Python software, that finds packages on the
7270 Python Package Index (PyPI).")
7271 (license license:expat)))
7272
7273 (define-public python2-pip
7274 (package-with-python2 python-pip))
7275
7276 (define-public python-tlsh
7277 (package
7278 (name "python-tlsh")
7279 (version "3.4.5")
7280 (home-page "https://github.com/trendmicro/tlsh")
7281 (source
7282 (origin
7283 (method git-fetch)
7284 (uri (git-reference
7285 (url "https://github.com/trendmicro/tlsh.git")
7286 (commit (string-append "v" version))))
7287 (file-name (git-file-name name version))
7288 (sha256
7289 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7290 (build-system cmake-build-system)
7291 (arguments
7292 '(#:out-of-source? #f
7293 #:phases (modify-phases %standard-phases
7294 (replace
7295 'install
7296 (lambda* (#:key outputs #:allow-other-keys)
7297 ;; Build and install the Python bindings. The underlying
7298 ;; C++ library is apparently not meant to be installed.
7299 (let ((out (assoc-ref outputs "out")))
7300 (with-directory-excursion "py_ext"
7301 (and (system* "python" "setup.py" "build")
7302 (system* "python" "setup.py" "install"
7303 (string-append "--prefix=" out))))))))))
7304 (inputs `(("python" ,python-wrapper))) ;for the bindings
7305 (synopsis "Fuzzy matching library for Python")
7306 (description
7307 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7308 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7309 value which can be used for similarity comparisons. Similar objects have
7310 similar hash values, which allows for the detection of similar objects by
7311 comparing their hash values. The byte stream should have a sufficient amount
7312 of complexity; for example, a byte stream of identical bytes will not generate
7313 a hash value.")
7314 (license license:asl2.0)))
7315
7316 (define-public python2-tlsh
7317 (package
7318 (inherit python-tlsh)
7319 (name "python2-tlsh")
7320 (inputs `(("python" ,python-2)))))
7321
7322 (define-public python-termcolor
7323 (package
7324 (name "python-termcolor")
7325 (version "1.1.0")
7326 (source
7327 (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "termcolor" version))
7330 (sha256
7331 (base32
7332 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7333 (build-system python-build-system)
7334 (arguments
7335 ;; There are no tests.
7336 `(#:tests? #f))
7337 (home-page "https://pypi.python.org/pypi/termcolor")
7338 (synopsis "ANSII Color formatting for terminal output")
7339 (description
7340 "This package provides ANSII Color formatting for output in terminals.")
7341 (license license:expat)))
7342
7343 (define-public python2-termcolor
7344 (package-with-python2 python-termcolor))
7345
7346 (define-public python-libarchive-c
7347 (package
7348 (name "python-libarchive-c")
7349 (version "2.8")
7350 (source (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "libarchive-c" version))
7353 (sha256
7354 (base32
7355 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7356 (build-system python-build-system)
7357 (arguments
7358 '(#:phases (modify-phases %standard-phases
7359 (add-before
7360 'build 'reference-libarchive
7361 (lambda* (#:key inputs #:allow-other-keys)
7362 ;; Retain the absolute file name of libarchive.so.
7363 (let ((libarchive (assoc-ref inputs "libarchive")))
7364 (substitute* "libarchive/ffi.py"
7365 (("find_library\\('archive'\\)")
7366 (string-append "'" libarchive
7367 "/lib/libarchive.so'"))))))
7368 (replace 'check
7369 (lambda _ (invoke "pytest" "-vv"))))))
7370 (native-inputs
7371 `(("python-mock" ,python-mock)
7372 ("python-pytest" ,python-pytest)))
7373 (inputs
7374 `(("libarchive" ,libarchive)))
7375 (home-page "https://github.com/Changaco/python-libarchive-c")
7376 (synopsis "Python interface to libarchive")
7377 (description
7378 "This package provides Python bindings to libarchive, a C library to
7379 access possibly compressed archives in many different formats. It uses
7380 Python's @code{ctypes} foreign function interface (FFI).")
7381 (license license:lgpl2.0+)))
7382
7383 (define-public python2-libarchive-c
7384 (package-with-python2 python-libarchive-c))
7385
7386 (define-public python-file
7387 (package
7388 (inherit file)
7389 (name "python-file")
7390 (build-system python-build-system)
7391 (arguments
7392 '(#:tests? #f ;no tests
7393 #:configure-flags '("--single-version-externally-managed" "--root=/")
7394 #:phases (modify-phases %standard-phases
7395 (add-before 'build 'change-directory
7396 (lambda _
7397 (chdir "python")
7398 #t))
7399 (add-before 'build 'set-library-file-name
7400 (lambda* (#:key inputs #:allow-other-keys)
7401 (let ((file (assoc-ref inputs "file")))
7402 (substitute* "magic.py"
7403 (("find_library\\('magic'\\)")
7404 (string-append "'" file "/lib/libmagic.so'")))
7405 #t))))))
7406 (inputs `(("file" ,file)))
7407 (native-inputs (if (%current-target-system)
7408 `(("self" ,this-package))
7409 '()))
7410 (synopsis "Python bindings to the libmagic file type guesser. Note that
7411 this module and the python-magic module both provide a \"magic.py\" file;
7412 these two modules, which are different and were developed separately, both
7413 serve the same purpose: provide Python bindings for libmagic.")))
7414
7415 (define-public python2-file
7416 (package-with-python2 python-file))
7417
7418 (define-public python-debian
7419 (package
7420 (name "python-debian")
7421 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7422 (version "0.1.28")
7423 (source
7424 (origin
7425 (method url-fetch)
7426 (uri (pypi-uri name version))
7427 (sha256
7428 (base32
7429 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7430 (build-system python-build-system)
7431 (propagated-inputs
7432 `(("python-six" ,python-six)))
7433 (synopsis "Debian package related modules")
7434 (description
7435 ;; XXX: Use @enumerate instead of @itemize to work around
7436 ;; <http://bugs.gnu.org/21772>.
7437 "This package provides Python modules that abstract many formats of
7438 Debian-related files, such as:
7439
7440 @enumerate
7441 @item Debtags information;
7442 @item @file{debian/changelog} files;
7443 @item packages files, pdiffs;
7444 @item control files of single or multiple RFC822-style paragraphs---e.g.
7445 @file{debian/control}, @file{.changes}, @file{.dsc};
7446 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7447 contained files and meta-information.
7448 @end enumerate\n")
7449
7450 ;; Modules are either GPLv2+ or GPLv3+.
7451 (license license:gpl3+)))
7452
7453 (define-public python2-debian
7454 (package-with-python2 python-debian))
7455
7456 (define-public python-nbformat
7457 (package
7458 (name "python-nbformat")
7459 (version "4.4.0")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "nbformat" version))
7464 (sha256
7465 (base32
7466 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7467 (build-system python-build-system)
7468 (arguments `(#:tests? #f)) ; no test target
7469 (propagated-inputs
7470 `(("python-ipython-genutils" ,python-ipython-genutils)
7471 ("python-jsonschema" ,python-jsonschema)
7472 ("python-jupyter-core" ,python-jupyter-core)
7473 ("python-traitlets" ,python-traitlets)))
7474 (home-page "http://jupyter.org")
7475 (synopsis "Jupyter Notebook format")
7476 (description "This package provides the reference implementation of the
7477 Jupyter Notebook format and Python APIs for working with notebooks.")
7478 (license license:bsd-3)))
7479
7480 (define-public python2-nbformat
7481 (package-with-python2 python-nbformat))
7482
7483 (define-public python-bleach
7484 (package
7485 (name "python-bleach")
7486 (version "1.4.3")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "bleach" version))
7491 (sha256
7492 (base32
7493 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7494 (build-system python-build-system)
7495 (propagated-inputs
7496 `(("python-html5lib" ,python-html5lib-0.9)
7497 ("python-six" ,python-six)))
7498 (native-inputs
7499 `(("python-nose" ,python-nose)))
7500 (home-page "https://github.com/jsocol/bleach")
7501 (synopsis "Whitelist-based HTML-sanitizing tool")
7502 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7503 (license license:asl2.0)))
7504
7505 (define-public python2-bleach
7506 (package-with-python2 python-bleach))
7507
7508 (define-public python-entrypoints
7509 (package
7510 (name "python-entrypoints")
7511 (version "0.3")
7512 (source
7513 (origin
7514 (method url-fetch)
7515 (uri (pypi-uri "entrypoints" version))
7516 (sha256
7517 (base32
7518 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7519 (build-system python-build-system)
7520 ;; The package does not come with a setup.py file, so we have to generate
7521 ;; one ourselves.
7522 (arguments
7523 `(#:tests? #f
7524 #:phases
7525 (modify-phases %standard-phases
7526 (add-after 'unpack 'create-setup.py
7527 (lambda _
7528 (call-with-output-file "setup.py"
7529 (lambda (port)
7530 (format port "\
7531 from setuptools import setup
7532 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7533 " ,version))))))))
7534 (home-page "https://github.com/takluyver/entrypoints")
7535 (synopsis "Discover and load entry points from installed Python packages")
7536 (description "Entry points are a way for Python packages to advertise
7537 objects with some common interface. The most common examples are
7538 @code{console_scripts} entry points, which define shell commands by
7539 identifying a Python function to run. The @code{entrypoints} module contains
7540 functions to find and load entry points.")
7541 (license license:expat)))
7542
7543 (define-public python2-entrypoints
7544 (package-with-python2 python-entrypoints))
7545
7546 (define-public python-nbconvert
7547 (package
7548 (name "python-nbconvert")
7549 (version "5.0.0b1")
7550 (source
7551 (origin
7552 (method url-fetch)
7553 (uri (pypi-uri "nbconvert" version))
7554 (sha256
7555 (base32
7556 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7557 (build-system python-build-system)
7558 (arguments
7559 `(;; The "bdist_egg" target is disabled by default, causing the installation
7560 ;; to fail.
7561 #:configure-flags (list "bdist_egg")
7562 ;; FIXME: 5 failures, 40 errors.
7563 #:tests? #f))
7564 ;; #:phases
7565 ;; (modify-phases %standard-phases
7566 ;; (replace 'check
7567 ;; (lambda _
7568 ;; (zero? (system* "py.test" "-v")))))
7569 (native-inputs
7570 `(("python-pytest" ,python-pytest)))
7571 (propagated-inputs
7572 `(("python-bleach" ,python-bleach)
7573 ("python-entrypoints" ,python-entrypoints)
7574 ("python-jinja2" ,python-jinja2)
7575 ("python-jupyter-core" ,python-jupyter-core)
7576 ("python-mistune" ,python-mistune)
7577 ("python-nbformat" ,python-nbformat)
7578 ("python-pygments" ,python-pygments)
7579 ("python-traitlets" ,python-traitlets)))
7580 (home-page "http://jupyter.org")
7581 (synopsis "Converting Jupyter Notebooks")
7582 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7583 notebooks to various other formats via Jinja templates. It allows you to
7584 convert an @code{.ipynb} notebook file into various static formats including:
7585
7586 @enumerate
7587 @item HTML
7588 @item LaTeX
7589 @item PDF
7590 @item Reveal JS
7591 @item Markdown (md)
7592 @item ReStructured Text (rst)
7593 @item executable script
7594 @end enumerate\n")
7595 (license license:bsd-3)))
7596
7597 (define-public python2-nbconvert
7598 (package-with-python2 python-nbconvert))
7599
7600 (define-public python-notebook
7601 (package
7602 (name "python-notebook")
7603 (version "5.7.4")
7604 (source (origin
7605 (method url-fetch)
7606 (uri (pypi-uri "notebook" version))
7607 (sha256
7608 (base32
7609 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7610 (build-system python-build-system)
7611 (arguments
7612 `(#:phases
7613 (modify-phases %standard-phases
7614 (replace 'check
7615 (lambda _
7616 ;; These tests require a browser
7617 (delete-file-recursively "notebook/tests/selenium")
7618 ;; Some tests need HOME
7619 (setenv "HOME" "/tmp")
7620 ;; This file contains "warningfilters", which are not supported
7621 ;; by this version of nose.
7622 (delete-file "setup.cfg")
7623 (with-directory-excursion "/tmp"
7624 (invoke "nosetests" "-v"))
7625 #t)))))
7626 (propagated-inputs
7627 `(("python-jupyter-core" ,python-jupyter-core)
7628 ("python-nbformat" ,python-nbformat)
7629 ("python-nbconvert" ,python-nbconvert)
7630 ("python-prometheus-client" ,python-prometheus-client)
7631 ("python-send2trash" ,python-send2trash)
7632 ("python-terminado" ,python-terminado)))
7633 (native-inputs
7634 `(("python-nose" ,python-nose)
7635 ("python-sphinx" ,python-sphinx)
7636 ("python-requests" ,python-requests)))
7637 (home-page "http://jupyter.org/")
7638 (synopsis "Web-based notebook environment for interactive computing")
7639 (description
7640 "The Jupyter HTML notebook is a web-based notebook environment for
7641 interactive computing.")
7642 (properties `((python2-variant . ,(delay python2-notebook))))
7643 (license license:bsd-3)))
7644
7645 (define-public python2-notebook
7646 (let ((base (package-with-python2
7647 (strip-python2-variant python-notebook))))
7648 (package (inherit base)
7649 (native-inputs
7650 `(("python2-mock" ,python2-mock)
7651 ,@(package-native-inputs base)))
7652 (arguments
7653 (substitute-keyword-arguments (package-arguments base)
7654 ((#:phases phases)
7655 `(modify-phases ,phases
7656 (add-before 'check 'disable-test-case
7657 ;; The test requires network access to localhost. Curiously it
7658 ;; fails with Python 2 only. Simply make the test-case return
7659 ;; immediately.
7660 (lambda _
7661 (substitute*
7662 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7663 (("formats = self.nbconvert_api") "return #")))))))))))
7664
7665 (define-public python-widgetsnbextension
7666 (package
7667 (name "python-widgetsnbextension")
7668 (version "3.4.2")
7669 (source
7670 (origin
7671 (method url-fetch)
7672 (uri (pypi-uri "widgetsnbextension" version))
7673 (sha256
7674 (base32
7675 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7676 (build-system python-build-system)
7677 (propagated-inputs
7678 `(("python-ipykernel" ,python-ipykernel)
7679 ("python-notebook" ,python-notebook)))
7680 (native-inputs
7681 `(("python-certifi" ,python-certifi)
7682 ("python-nose" ,python-nose)))
7683 (home-page "https://ipython.org")
7684 (synopsis "IPython HTML widgets for Jupyter")
7685 (description "This package provides interactive HTML widgets for Jupyter
7686 notebooks.")
7687 (license license:bsd-3)))
7688
7689 (define-public python2-widgetsnbextension
7690 (package-with-python2 python-widgetsnbextension))
7691
7692 (define-public python-ipywidgets
7693 (package
7694 (name "python-ipywidgets")
7695 (version "5.2.2")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "ipywidgets" version))
7700 (sha256
7701 (base32
7702 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7703 (build-system python-build-system)
7704 (propagated-inputs
7705 `(("python-ipython" ,python-ipython)
7706 ("python-traitlets" ,python-traitlets)
7707 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7708 (native-inputs
7709 `(("python-nose" ,python-nose)
7710 ("python-pytest" ,python-pytest)))
7711 (home-page "https://ipython.org")
7712 (synopsis "IPython HTML widgets for Jupyter")
7713 (description "Ipywidgets are interactive HTML widgets for Jupyter
7714 notebooks and the IPython kernel. Notebooks come alive when interactive
7715 widgets are used. Users gain control of their data and can visualize changes
7716 in the data.")
7717 (license license:bsd-3)))
7718
7719 (define-public python2-ipywidgets
7720 (package-with-python2 python-ipywidgets))
7721
7722 (define-public python-jupyter-console
7723 (package
7724 (name "python-jupyter-console")
7725 (version "6.0.0")
7726 (source
7727 (origin
7728 (method url-fetch)
7729 (uri (pypi-uri "jupyter_console" version))
7730 (sha256
7731 (base32
7732 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7733 (build-system python-build-system)
7734 (propagated-inputs
7735 `(("python-ipykernel" ,python-ipykernel)
7736 ("python-jupyter-client" ,python-jupyter-client)
7737 ("python-prompt-toolkit" ,python-prompt-toolkit)
7738 ("python-pygments" ,python-pygments)))
7739 (native-inputs
7740 `(("python-nose" ,python-nose)))
7741 (home-page "https://jupyter.org")
7742 (synopsis "Jupyter terminal console")
7743 (description "This package provides a terminal-based console frontend for
7744 Jupyter kernels. It also allows for console-based interaction with non-Python
7745 Jupyter kernels such as IJulia and IRKernel.")
7746 (license license:bsd-3)))
7747
7748 (define-public python2-jupyter-console
7749 (package
7750 (name "python2-jupyter-console")
7751 (version "5.2.0")
7752 (source
7753 (origin
7754 (method url-fetch)
7755 (uri (pypi-uri "jupyter_console" version))
7756 (sha256
7757 (base32
7758 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7759 (build-system python-build-system)
7760 ;; Tests only run in an TTY.
7761 (arguments `(#:tests? #f))
7762 (propagated-inputs
7763 `(("python2-ipykernel" ,python2-ipykernel)
7764 ("python2-jupyter-client" ,python2-jupyter-client)
7765 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7766 ("python2-pygments" ,python2-pygments)))
7767 (native-inputs
7768 `(("python2-nose" ,python2-nose)))
7769 (home-page "https://jupyter.org")
7770 (synopsis "Jupyter terminal console")
7771 (description "This package provides a terminal-based console frontend for
7772 Jupyter kernels. It also allows for console-based interaction with non-Python
7773 Jupyter kernels such as IJulia and IRKernel.")
7774 (license license:bsd-3)))
7775
7776 ;; The python-ipython and python-jupyter-console require each other. To get
7777 ;; the functionality in both packages working, strip down the
7778 ;; python-jupyter-console package when using it as an input to python-ipython.
7779 (define python-jupyter-console-minimal
7780 (package
7781 (inherit python-jupyter-console)
7782 (name "python-jupyter-console-minimal")
7783 (arguments
7784 (substitute-keyword-arguments
7785 (package-arguments python-jupyter-console)
7786 ((#:phases phases)
7787 `(modify-phases ,phases
7788 (add-after 'install 'delete-bin
7789 (lambda* (#:key outputs #:allow-other-keys)
7790 ;; Delete the bin files, to avoid conflicts in profiles
7791 ;; where python-ipython and python-jupyter-console are
7792 ;; both present.
7793 (delete-file-recursively
7794 (string-append
7795 (assoc-ref outputs "out") "/bin"))))))))
7796 ;; Remove the python-ipython propagated input, to avoid the cycle
7797 (propagated-inputs
7798 (alist-delete
7799 "python-ipython"
7800 (package-propagated-inputs python-jupyter-console)))))
7801
7802 (define-public python-qtconsole
7803 (package
7804 (name "python-qtconsole")
7805 (version "4.4.3")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "qtconsole" version))
7810 (sha256
7811 (base32
7812 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7813 (build-system python-build-system)
7814 (arguments
7815 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7816 ;; but we only have the LTS version 5.x. This means that there might be
7817 ;; runtime errors, but since this is a dependency of the Jupyter package,
7818 ;; and Jupyter can be used without the qtconsole we can overlook this for
7819 ;; now.
7820 `(#:tests? #f
7821 #:phases
7822 (modify-phases %standard-phases
7823 (add-before 'check 'pre-check
7824 (lambda _
7825 (setenv "QT_QPA_PLATFORM" "offscreen")
7826 #t)))))
7827 (propagated-inputs
7828 `(("python-ipykernel" ,python-ipykernel)
7829 ("python-ipython" ,python-ipython)))
7830 (native-inputs
7831 `(("python-pytest" ,python-pytest)))
7832 (home-page "http://jupyter.org")
7833 (synopsis "Jupyter Qt console")
7834 (description "This package provides a Qt-based console for Jupyter with
7835 support for rich media output.")
7836 (license license:bsd-3)))
7837
7838 (define-public jupyter
7839 (package
7840 (name "jupyter")
7841 (version "1.0.0")
7842 (source
7843 (origin
7844 (method url-fetch)
7845 (uri (pypi-uri "jupyter" version))
7846 (sha256
7847 (base32
7848 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7849 (build-system python-build-system)
7850 (arguments '(#:tests? #f)) ; there are none.
7851 (propagated-inputs
7852 `(("python-ipykernel" ,python-ipykernel)
7853 ("python-ipywidgets" ,python-ipywidgets)
7854 ("python-jupyter-console" ,python-jupyter-console)
7855 ("python-nbconvert" ,python-nbconvert)
7856 ("python-notebook" ,python-notebook)
7857 ("python-qtconsole" ,python-qtconsole)))
7858 (native-search-paths
7859 (list (search-path-specification
7860 (variable "JUPYTER_PATH")
7861 (files '("share/jupyter")))))
7862 (home-page "https://jupyter.org")
7863 (synopsis "Web application for interactive documents")
7864 (description
7865 "The Jupyter Notebook is a web application that allows you to create and
7866 share documents that contain live code, equations, visualizations and
7867 explanatory text. Uses include: data cleaning and transformation, numerical
7868 simulation, statistical modeling, machine learning and much more.")
7869 (license license:bsd-3)))
7870
7871 (define-public python-chardet
7872 (package
7873 (name "python-chardet")
7874 (version "3.0.4")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "chardet" version))
7879 (sha256
7880 (base32
7881 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7882 (native-inputs
7883 `(("python-hypothesis" ,python-hypothesis)
7884 ("python-pytest" ,python-pytest)
7885 ("python-pytest-runner" ,python-pytest-runner)))
7886 (build-system python-build-system)
7887 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7888 (arguments `(#:tests? #f))
7889 (home-page "https://github.com/chardet/chardet")
7890 (synopsis "Universal encoding detector for Python 2 and 3")
7891 (description
7892 "This package provides @code{chardet}, a Python module that can
7893 automatically detect a wide range of file encodings.")
7894 (license license:lgpl2.1+)))
7895
7896 (define-public python2-chardet
7897 (package-with-python2 python-chardet))
7898
7899 (define-public python-docopt
7900 (package
7901 (name "python-docopt")
7902 (version "0.6.2")
7903 (source
7904 (origin
7905 (method url-fetch)
7906 ;; The release on PyPI does not include tests.
7907 (uri (string-append
7908 "https://github.com/docopt/docopt/archive/"
7909 version ".tar.gz"))
7910 (file-name (string-append name "-" version ".tar.gz"))
7911 (sha256
7912 (base32
7913 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7914 (build-system python-build-system)
7915 (native-inputs
7916 `(("python-pytest" ,python-pytest)))
7917 (arguments
7918 `(#:phases
7919 (modify-phases %standard-phases
7920 (replace 'check
7921 (lambda _ (invoke "py.test"))))))
7922 (home-page "http://docopt.org")
7923 (synopsis "Command-line interface description language for Python")
7924 (description "This library allows the user to define a command-line
7925 interface from a program's help message rather than specifying it
7926 programmatically with command-line parsers like @code{getopt} and
7927 @code{argparse}.")
7928 (license license:expat)))
7929
7930 (define-public python2-docopt
7931 (package-with-python2 python-docopt))
7932
7933 (define-public python-pythondialog
7934 (package
7935 (name "python-pythondialog")
7936 (version "3.4.0")
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "pythondialog" version))
7941 (sha256
7942 (base32
7943 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7944 (build-system python-build-system)
7945 (arguments
7946 `(#:phases
7947 (modify-phases %standard-phases
7948 (add-after 'unpack 'patch-path
7949 (lambda* (#:key inputs #:allow-other-keys)
7950 (let* ((dialog (assoc-ref inputs "dialog")))
7951 ;; Since this library really wants to grovel the search path, we
7952 ;; must hardcode dialog's store path into it.
7953 (substitute* "dialog.py"
7954 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7955 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7956 #t))))
7957 #:tests? #f)) ; no test suite
7958 (propagated-inputs
7959 `(("dialog" ,dialog)))
7960 (home-page "http://pythondialog.sourceforge.net/")
7961 (synopsis "Python interface to the UNIX dialog utility")
7962 (description "A Python wrapper for the dialog utility. Its purpose is to
7963 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7964 This allows one to make simple text-mode user interfaces on Unix-like systems")
7965 (license license:lgpl2.1)
7966 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7967
7968 (define-public python2-pythondialog
7969 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7970 (package
7971 (inherit base)
7972 (version (package-version python-pythondialog))
7973 (source (origin
7974 (method url-fetch)
7975 (uri (pypi-uri "python2-pythondialog" version))
7976 (sha256
7977 (base32
7978 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7979
7980 (define-public python-configobj
7981 (package
7982 (name "python-configobj")
7983 (version "5.0.6")
7984 (source (origin
7985 (method url-fetch)
7986 (uri (pypi-uri "configobj" version))
7987 (sha256
7988 (base32
7989 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7990 ;; Patch setup.py so it looks for python-setuptools, which is
7991 ;; required to parse the keyword 'install_requires' in setup.py.
7992 (patches (search-patches "python-configobj-setuptools.patch"))))
7993 (build-system python-build-system)
7994 (propagated-inputs
7995 `(("python-six" ,python-six)))
7996 (synopsis "Config file reading, writing and validation")
7997 (description "ConfigObj is a simple but powerful config file reader and
7998 writer: an ini file round tripper. Its main feature is that it is very easy to
7999 use, with a straightforward programmer’s interface and a simple syntax for
8000 config files.")
8001 (home-page "https://github.com/DiffSK/configobj")
8002 (license license:bsd-3)))
8003
8004 (define-public python2-configobj
8005 (package-with-python2 python-configobj))
8006
8007 (define-public python-configargparse
8008 (package
8009 (name "python-configargparse")
8010 (version "0.14.0")
8011 (source (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "ConfigArgParse" version))
8014 (sha256
8015 (base32
8016 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8017 (build-system python-build-system)
8018 (native-inputs
8019 `(("python-pyyaml" ,python-pyyaml)))
8020 (arguments
8021 `(#:phases
8022 (modify-phases %standard-phases
8023 (replace 'check
8024 (lambda _
8025 ;; Bypass setuptools-shim because one test relies on "setup.py"
8026 ;; being the first argument passed to the python call.
8027 ;;
8028 ;; NOTE: Many tests do not run because they rely on Python's
8029 ;; built-in test.test_argparse, but we remove the unit tests from
8030 ;; our Python installation.
8031 (invoke "python" "setup.py" "test"))))))
8032 (synopsis "Replacement for argparse")
8033 (description "A drop-in replacement for argparse that allows options to also
8034 be set via config files and/or environment variables.")
8035 (home-page "https://github.com/bw2/ConfigArgParse")
8036 (license license:expat)))
8037
8038 (define-public python2-configargparse
8039 (package-with-python2 python-configargparse))
8040
8041 (define-public python-argparse-manpage
8042 (package
8043 (name "python-argparse-manpage")
8044 (version "1.1")
8045 (source
8046 (origin
8047 (method url-fetch)
8048 (uri (pypi-uri "argparse-manpage" version))
8049 (sha256
8050 (base32
8051 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8052 (build-system python-build-system)
8053 (home-page "https://github.com/praiskup/argparse-manpage")
8054 (synopsis "Build manual page from Python's ArgumentParser object")
8055 (description
8056 "This package provides tools to build manual pages from Python's
8057 @code{ArgumentParser} object.")
8058 (license license:asl2.0)))
8059
8060 (define-public python-contextlib2
8061 (package
8062 (name "python-contextlib2")
8063 (version "0.5.5")
8064 (source
8065 (origin
8066 (method url-fetch)
8067 (uri (pypi-uri "contextlib2" version))
8068 (sha256
8069 (base32
8070 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8071 (build-system python-build-system)
8072 (home-page "http://contextlib2.readthedocs.org/")
8073 (synopsis "Tools for decorators and context managers")
8074 (description "This module is primarily a backport of the Python
8075 3.2 contextlib to earlier Python versions. Like contextlib, it
8076 provides utilities for common tasks involving decorators and context
8077 managers. It also contains additional features that are not part of
8078 the standard library.")
8079 (license license:psfl)))
8080
8081 (define-public python2-contextlib2
8082 (package
8083 (name "python2-contextlib2")
8084 (version "0.5.5")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "contextlib2" version))
8089 (sha256
8090 (base32
8091 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8092 (build-system python-build-system)
8093 (arguments
8094 `(#:python ,python-2
8095 #:phases
8096 (modify-phases %standard-phases
8097 (replace 'check
8098 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8099 (native-inputs
8100 `(("python2-unittest2" ,python2-unittest2)))
8101 (home-page "http://contextlib2.readthedocs.org/")
8102 (synopsis "Tools for decorators and context managers")
8103 (description "This module is primarily a backport of the Python
8104 3.2 contextlib to earlier Python versions. Like contextlib, it
8105 provides utilities for common tasks involving decorators and context
8106 managers. It also contains additional features that are not part of
8107 the standard library.")
8108 (license license:psfl)))
8109
8110 (define-public python-texttable
8111 (package
8112 (name "python-texttable")
8113 (version "0.8.7")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "texttable" version))
8118 (sha256
8119 (base32
8120 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8121 (build-system python-build-system)
8122 (arguments '(#:tests? #f)) ; no tests
8123 (home-page "https://github.com/foutaise/texttable/")
8124 (synopsis "Python module for creating simple ASCII tables")
8125 (description "Texttable is a Python module for creating simple ASCII
8126 tables.")
8127 (license license:lgpl2.1+)))
8128
8129 (define-public python2-texttable
8130 (package-with-python2 python-texttable))
8131
8132 (define-public python-atomicwrites
8133 (package
8134 (name "python-atomicwrites")
8135 (version "1.3.0")
8136 (source (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "atomicwrites" version))
8139 (sha256
8140 (base32
8141 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8142 (build-system python-build-system)
8143 (synopsis "Atomic file writes in Python")
8144 (description "Library for atomic file writes using platform dependent tools
8145 for atomic file system operations.")
8146 (home-page "https://github.com/untitaker/python-atomicwrites")
8147 (license license:expat)))
8148
8149 (define-public python2-atomicwrites
8150 (package-with-python2 python-atomicwrites))
8151
8152 (define-public python-click-threading
8153 (package
8154 (name "python-click-threading")
8155 (version "0.4.4")
8156 (source (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "click-threading" version))
8159 (sha256
8160 (base32
8161 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8162 (build-system python-build-system)
8163 (propagated-inputs
8164 `(("python-click" ,python-click)))
8165 (synopsis "Utilities for multithreading in Click")
8166 (description "This package provides utilities for multithreading in Click
8167 applications.")
8168 (home-page "https://github.com/click-contrib/click-threading")
8169 (license license:expat)))
8170
8171 (define-public python-click-log
8172 (package
8173 (name "python-click-log")
8174 (version "0.3.2")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "click-log" version))
8178 (sha256
8179 (base32
8180 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8181 (build-system python-build-system)
8182 (propagated-inputs
8183 `(("python-click" ,python-click)))
8184 (synopsis "Logging for click applications")
8185 (description "This package provides a Python library for logging Click
8186 applications.")
8187 (home-page "https://github.com/click-contrib/click-log")
8188 (license license:expat)))
8189
8190 (define-public python-apipkg
8191 (package
8192 (name "python-apipkg")
8193 (version "1.4")
8194 (source (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "apipkg" version))
8197 (sha256
8198 (base32
8199 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8200 (build-system python-build-system)
8201 (native-inputs
8202 `(("python-pytest" ,python-pytest)))
8203 (synopsis "Namespace control and lazy-import mechanism")
8204 (description "With apipkg you can control the exported namespace of a Python
8205 package and greatly reduce the number of imports for your users. It is a small
8206 pure Python module that works on virtually all Python versions.")
8207 (home-page "https://github.com/pytest-dev/apipkg")
8208 (license license:expat)))
8209
8210 (define-public python2-apipkg
8211 (package-with-python2 python-apipkg))
8212
8213 (define-public python-execnet
8214 (package
8215 (name "python-execnet")
8216 (version "1.4.1")
8217 (source (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "execnet" version))
8220 (sha256
8221 (base32
8222 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8223 (build-system python-build-system)
8224 (arguments
8225 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8226 ;; The two test failures are caused by the lack of an `ssh` executable.
8227 ;; The test suite can be run with pytest after the 'install' phase.
8228 #:tests? #f))
8229 (native-inputs
8230 `(("python-pytest" ,python-pytest)
8231 ("python-setuptools-scm" ,python-setuptools-scm)))
8232 (propagated-inputs
8233 `(("python-apipkg" ,python-apipkg)))
8234 (synopsis "Rapid multi-Python deployment")
8235 (description "Execnet provides a share-nothing model with
8236 channel-send/receive communication for distributing execution across many
8237 Python interpreters across version, platform and network barriers. It has a
8238 minimal and fast API targeting the following uses:
8239 @enumerate
8240 @item distribute tasks to (many) local or remote CPUs
8241 @item write and deploy hybrid multi-process applications
8242 @item write scripts to administer multiple environments
8243 @end enumerate")
8244 (home-page "http://codespeak.net/execnet/")
8245 (license license:expat)))
8246
8247 (define-public python2-execnet
8248 (package-with-python2 python-execnet))
8249
8250 (define-public python-icalendar
8251 (package
8252 (name "python-icalendar")
8253 (version "4.0.3")
8254 (source (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "icalendar" version))
8257 (sha256
8258 (base32
8259 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8260 (build-system python-build-system)
8261 (propagated-inputs
8262 `(("python-dateutil" ,python-dateutil)
8263 ("python-pytz" ,python-pytz)))
8264 (synopsis "Python library for parsing iCalendar files")
8265 (description "The icalendar package is a parser/generator of iCalendar
8266 files for use with Python.")
8267 (home-page "https://github.com/collective/icalendar")
8268 (license license:bsd-2)))
8269
8270 (define-public python-args
8271 (package
8272 (name "python-args")
8273 (version "0.1.0")
8274 (source (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "args" version))
8277 (sha256
8278 (base32
8279 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8280 (build-system python-build-system)
8281 (home-page "https://github.com/kennethreitz/args")
8282 (synopsis "Command-line argument parser")
8283 (description
8284 "This library provides a Python module to parse command-line arguments.")
8285 (license license:bsd-3)))
8286
8287 (define-public python2-args
8288 (package-with-python2 python-args))
8289
8290 (define-public python-clint
8291 (package
8292 (name "python-clint")
8293 (version "0.5.1")
8294 (source (origin
8295 (method url-fetch)
8296 (uri (pypi-uri "clint" version))
8297 (sha256
8298 (base32
8299 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8300 (build-system python-build-system)
8301 (arguments
8302 '(#:phases
8303 (modify-phases %standard-phases
8304 (replace 'check
8305 (lambda _ (invoke "py.test" "-v"))))))
8306 (native-inputs
8307 `(("python-pytest" ,python-pytest)))
8308 (propagated-inputs
8309 `(("python-args" ,python-args)))
8310 (home-page "https://github.com/kennethreitz/clint")
8311 (synopsis "Command-line interface tools")
8312 (description
8313 "Clint is a Python module filled with a set of tools for developing
8314 command-line applications, including tools for colored and indented
8315 output, progress bar display, and pipes.")
8316 (license license:isc)))
8317
8318 (define-public python2-clint
8319 (package-with-python2 python-clint))
8320
8321 (define-public python-rply
8322 (package
8323 (name "python-rply")
8324 (version "0.7.5")
8325 (source (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "rply" version))
8328 (sha256
8329 (base32
8330 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8331 (build-system python-build-system)
8332 (propagated-inputs
8333 `(("python-appdirs" ,python-appdirs)))
8334 (home-page "https://github.com/alex/rply")
8335 (synopsis "Parser generator for Python")
8336 (description
8337 "This package provides a pure Python based parser generator, that also
8338 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8339 with a new public API, and RPython support.")
8340 (license license:bsd-3)))
8341
8342 (define-public python2-rply
8343 (package-with-python2 python-rply))
8344
8345 (define-public python-hy
8346 (package
8347 (name "python-hy")
8348 (version "0.13.0")
8349 (source (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "hy" version))
8352 (sha256
8353 (base32
8354 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8355 (build-system python-build-system)
8356 (arguments
8357 '(#:phases
8358 (modify-phases %standard-phases
8359 (replace 'check
8360 (lambda _
8361 ;; Tests require write access to HOME.
8362 (setenv "HOME" "/tmp")
8363 (invoke "nosetests"))))))
8364 (native-inputs
8365 `(("python-coverage" ,python-coverage)
8366 ("python-nose" ,python-nose)))
8367 (propagated-inputs
8368 `(("python-astor" ,python-astor)
8369 ("python-clint" ,python-clint)
8370 ("python-rply" ,python-rply)))
8371 (home-page "http://hylang.org/")
8372 (synopsis "Lisp frontend to Python")
8373 (description
8374 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8375 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8376 Python at your fingertips, in Lisp form.")
8377 (license license:expat)))
8378
8379 (define-public python2-hy
8380 (package-with-python2 python-hy))
8381
8382 (define-public python2-functools32
8383 (package
8384 (name "python2-functools32")
8385 (version "3.2.3-2")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "functools32" version))
8390 (sha256
8391 (base32
8392 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8393 (build-system python-build-system)
8394 (arguments
8395 `(#:python ,python-2
8396 #:tests? #f)) ; no test target
8397 (home-page "https://github.com/MiCHiLU/python-functools32")
8398 (synopsis
8399 "Backport of the functools module from Python 3.2.3")
8400 (description
8401 "This package is a backport of the @code{functools} module from Python
8402 3.2.3 for use with older versions of Python and PyPy.")
8403 (license license:expat)))
8404
8405 (define-public python2-subprocess32
8406 (package
8407 (name "python2-subprocess32")
8408 (version "3.2.7")
8409 (source (origin
8410 (method url-fetch)
8411 (uri (pypi-uri "subprocess32" version))
8412 (sha256
8413 (base32
8414 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8415 (patches
8416 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8417 (build-system python-build-system)
8418 (arguments
8419 `(#:python ,python-2
8420 ;; The test suite fails with Python > 2.7.13:
8421 ;; import test.support
8422 ;; ImportError: No module named support
8423 #:tests? #f
8424 #:phases
8425 (modify-phases %standard-phases
8426 (add-after 'unpack 'patch-/bin/sh
8427 (lambda _
8428 (substitute* '("subprocess32.py"
8429 "test_subprocess32.py")
8430 (("/bin/sh") (which "sh")))
8431 #t)))))
8432 (home-page "https://github.com/google/python-subprocess32")
8433 (synopsis "Backport of the subprocess module from Python 3.2")
8434 (description
8435 "This is a backport of the @code{subprocess} standard library module
8436 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8437 new features. On POSIX systems it is guaranteed to be reliable when used
8438 in threaded applications. It includes timeout support from Python 3.3 but
8439 otherwise matches 3.2’s API.")
8440 (license license:psfl)))
8441
8442 (define-public python2-futures
8443 (package
8444 (name "python2-futures")
8445 (version "3.2.0")
8446 (source
8447 (origin
8448 (method url-fetch)
8449 (uri (pypi-uri "futures" version))
8450 (sha256
8451 (base32
8452 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8453 (build-system python-build-system)
8454 (arguments
8455 `(#:python ,python-2
8456 #:phases
8457 (modify-phases %standard-phases
8458 (replace 'check
8459 (lambda _
8460 (invoke "python" "test_futures.py")
8461 #t)))))
8462 (home-page "https://github.com/agronholm/pythonfutures")
8463 (synopsis
8464 "Backport of the concurrent.futures package from Python 3.2")
8465 (description
8466 "The concurrent.futures module provides a high-level interface for
8467 asynchronously executing callables. This package backports the
8468 concurrent.futures package from Python 3.2")
8469 (license license:bsd-3)))
8470
8471 (define-public python-promise
8472 (package
8473 (name "python-promise")
8474 (version "0.4.2")
8475 (source
8476 (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "promise" version))
8479 (sha256
8480 (base32
8481 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8482 (build-system python-build-system)
8483 ;; Tests wants python-futures, which is a python2 only program, and
8484 ;; can't be found by python-promise at test time.
8485 (arguments `(#:tests? #f))
8486 (home-page "https://github.com/syrusakbary/promise")
8487 (synopsis "Promises/A+ implementation for Python")
8488 (description
8489 "Promises/A+ implementation for Python")
8490 (properties `((python2-variant . ,(delay python2-promise))))
8491 (license license:expat)))
8492
8493 (define-public python2-promise
8494 (let ((promise (package-with-python2
8495 (strip-python2-variant python-promise))))
8496 (package (inherit promise)
8497 (arguments (substitute-keyword-arguments (package-arguments promise)
8498 ((#:tests? _) #t)))
8499 (native-inputs
8500 `(("python2-futures" ,python2-futures)
8501 ("python2-pytest" ,python2-pytest)
8502 ,@(package-native-inputs promise))))))
8503
8504 (define-public python-colorama
8505 (package
8506 (name "python-colorama")
8507 (version "0.3.9")
8508 (source
8509 (origin
8510 (method url-fetch)
8511 (uri (pypi-uri "colorama" version))
8512 (sha256
8513 (base32
8514 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8515 (build-system python-build-system)
8516 (synopsis "Colored terminal text rendering for Python")
8517 (description "Colorama is a Python library for rendering colored terminal
8518 text.")
8519 (home-page "https://pypi.python.org/pypi/colorama")
8520 (license license:bsd-3)))
8521
8522 (define-public python2-colorama
8523 (package-with-python2 python-colorama))
8524
8525 (define-public python-rsa
8526 (package
8527 (name "python-rsa")
8528 (version "3.4.2")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "rsa" version))
8533 (sha256
8534 (base32
8535 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8536 (build-system python-build-system)
8537 (propagated-inputs
8538 `(("python-pyasn1" ,python-pyasn1)))
8539 (synopsis "Pure-Python RSA implementation")
8540 (description "Python-RSA is a pure-Python RSA implementation. It supports
8541 encryption and decryption, signing and verifying signatures, and key
8542 generation according to PKCS#1 version 1.5. It can be used as a Python
8543 library as well as on the command line.")
8544 (home-page "https://stuvel.eu/rsa")
8545 (license license:asl2.0)))
8546
8547 (define-public python2-rsa
8548 (package-with-python2 python-rsa))
8549
8550 (define-public python-pluggy
8551 (package
8552 (name "python-pluggy")
8553 (version "0.11.0")
8554 (source
8555 (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "pluggy" version))
8558 (sha256
8559 (base32
8560 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8561 (build-system python-build-system)
8562 (native-inputs
8563 `(("python-setuptools-scm" ,python-setuptools-scm)))
8564 (synopsis "Plugin and hook calling mechanism for Python")
8565 (description "Pluggy is an extraction of the plugin manager as used by
8566 Pytest but stripped of Pytest specific details.")
8567 (home-page "https://pypi.python.org/pypi/pluggy")
8568 (license license:expat)))
8569
8570 (define-public python2-pluggy
8571 (package-with-python2 python-pluggy))
8572
8573 (define-public python-tox
8574 (package
8575 (name "python-tox")
8576 (version "2.8.1")
8577 (source
8578 (origin
8579 (method url-fetch)
8580 (uri (pypi-uri "tox" version))
8581 (sha256
8582 (base32
8583 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8584 (build-system python-build-system)
8585 (arguments
8586 ;; FIXME: Tests require pytest-timeout, which itself requires
8587 ;; pytest>=2.8.0 for installation.
8588 '(#:tests? #f))
8589 (propagated-inputs
8590 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8591 ("python-py" ,python-py)
8592 ("python-virtualenv" ,python-virtualenv)))
8593 (native-inputs
8594 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8595 ("python-pytest" ,python-pytest) ; >= 2.3.5
8596 ("python-setuptools-scm" ,python-setuptools-scm)))
8597 (home-page "http://tox.testrun.org/")
8598 (synopsis "Virtualenv-based automation of test activities")
8599 (description "Tox is a generic virtualenv management and test command line
8600 tool. It can be used to check that a package installs correctly with
8601 different Python versions and interpreters, or run tests in each type of
8602 supported environment, or act as a frontend to continuous integration
8603 servers.")
8604 (license license:expat)))
8605
8606 (define-public python2-tox
8607 (package-with-python2 python-tox))
8608
8609 (define-public python-jmespath
8610 (package
8611 (name "python-jmespath")
8612 (version "0.9.3")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "jmespath" version))
8617 (sha256
8618 (base32
8619 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8620 (build-system python-build-system)
8621 (native-inputs
8622 `(("python-nose" ,python-nose)))
8623 (synopsis "JSON Matching Expressions")
8624 (description "JMESPath (pronounced “james path”) is a Python library that
8625 allows one to declaratively specify how to extract elements from a JSON
8626 document.")
8627 (home-page "https://github.com/jmespath/jmespath.py")
8628 (license license:expat)))
8629
8630 (define-public python2-jmespath
8631 (package-with-python2 python-jmespath))
8632
8633 (define-public python-botocore
8634 (package
8635 (name "python-botocore")
8636 (version "1.12.149")
8637 (source
8638 (origin
8639 (method url-fetch)
8640 (uri (pypi-uri "botocore" version))
8641 (sha256
8642 (base32
8643 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8644 (build-system python-build-system)
8645 (arguments
8646 ;; FIXME: Many tests are failing.
8647 '(#:tests? #f))
8648 (propagated-inputs
8649 `(("python-dateutil" ,python-dateutil)
8650 ("python-docutils" ,python-docutils)
8651 ("python-jmespath" ,python-jmespath)))
8652 (native-inputs
8653 `(("python-mock" ,python-mock)
8654 ("python-nose" ,python-nose)
8655 ("behave" ,behave)
8656 ("python-tox" ,python-tox)
8657 ("python-urllib3" ,python-urllib3)
8658 ("python-wheel" ,python-wheel)))
8659 (home-page "https://github.com/boto/botocore")
8660 (synopsis "Low-level interface to AWS")
8661 (description "Botocore is a Python library that provides a low-level
8662 interface to the Amazon Web Services (AWS) API.")
8663 (license license:asl2.0)))
8664
8665 (define-public python2-botocore
8666 (package-with-python2 python-botocore))
8667
8668 (define-public python-xdo
8669 (package
8670 (name "python-xdo")
8671 (version "0.3")
8672 (source (origin
8673 (method url-fetch)
8674 (uri (string-append
8675 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8676 "python-xdo_" version ".orig.tar.gz"))
8677 (sha256
8678 (base32
8679 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8680 (build-system python-build-system)
8681 (arguments
8682 '(#:phases
8683 (modify-phases %standard-phases
8684 (add-before 'install 'patch-libxdo-path
8685 ;; Hardcode the path of dynamically loaded libxdo library.
8686 (lambda* (#:key inputs #:allow-other-keys)
8687 (let ((libxdo (string-append
8688 (assoc-ref inputs "xdotool")
8689 "/lib/libxdo.so")))
8690 (substitute* "xdo/_xdo.py"
8691 (("find_library\\(\"xdo\"\\)")
8692 (simple-format #f "\"~a\"" libxdo)))
8693 #t))))
8694 #:tests? #f)) ; no tests provided
8695 (propagated-inputs
8696 `(("python-six" ,python-six)))
8697 (inputs
8698 `(("xdotool" ,xdotool)
8699 ("libX11" ,libx11)))
8700 (home-page "https://tracker.debian.org/pkg/python-xdo")
8701 (synopsis "Python library for simulating X11 keyboard/mouse input")
8702 (description "Provides bindings to libxdo for manipulating X11 via simulated
8703 input. (Note that this is mostly a legacy library; you may wish to look at
8704 python-xdo for newer bindings.)")
8705 (license license:bsd-3)))
8706
8707 (define-public python2-xdo
8708 (package-with-python2 python-xdo))
8709
8710 (define-public python-mako
8711 (package
8712 (name "python-mako")
8713 (version "1.0.13")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "Mako" version))
8718 (sha256
8719 (base32
8720 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8721 (build-system python-build-system)
8722 (propagated-inputs
8723 `(("python-markupsafe" ,python-markupsafe)))
8724 (native-inputs
8725 `(("python-mock" ,python-mock)
8726 ("python-nose" ,python-nose)
8727 ("python-pytest" ,python-pytest)))
8728 (home-page "https://www.makotemplates.org/")
8729 (synopsis "Templating language for Python")
8730 (description "Mako is a templating language for Python that compiles
8731 templates into Python modules.")
8732 (license license:expat)))
8733
8734 (define-public python2-mako
8735 (package-with-python2 python-mako))
8736
8737 (define-public python-waitress
8738 (package
8739 (name "python-waitress")
8740 (version "1.1.0")
8741 (source
8742 (origin
8743 (method url-fetch)
8744 (uri (pypi-uri "waitress" version))
8745 (patches (search-patches "python-waitress-fix-tests.patch"))
8746 (sha256
8747 (base32
8748 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8749 (build-system python-build-system)
8750 (home-page "https://github.com/Pylons/waitress")
8751 (synopsis "Waitress WSGI server")
8752 (description "Waitress is meant to be a production-quality pure-Python WSGI
8753 server with very acceptable performance.")
8754 (license license:zpl2.1)))
8755
8756 (define-public python2-waitress
8757 (package-with-python2 python-waitress))
8758
8759 (define-public python-pyquery
8760 (package
8761 (name "python-pyquery")
8762 (version "1.2.17")
8763 (source
8764 (origin
8765 (method url-fetch)
8766 (uri (pypi-uri "pyquery" version))
8767 (sha256
8768 (base32
8769 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8770 (build-system python-build-system)
8771 (native-inputs
8772 `(("python-webob" ,python-webob)
8773 ("python-webtest" ,python-webtest)))
8774 (propagated-inputs
8775 `(("python-lxml" ,python-lxml)
8776 ("python-cssselect" ,python-cssselect)))
8777 (home-page "https://github.com/gawel/pyquery")
8778 (synopsis "Make jQuery-like queries on xml documents")
8779 (description "pyquery allows you to make jQuery queries on xml documents.
8780 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8781 fast xml and html manipulation.")
8782 (license license:bsd-3)))
8783
8784 (define-public python-anyjson
8785 (package
8786 (name "python-anyjson")
8787 (version "0.3.3")
8788 (source
8789 (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "anyjson" version))
8792 (sha256
8793 (base32
8794 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8795 (build-system python-build-system)
8796 (arguments
8797 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8798 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8799 ;; whatever) so this transformation needs to be done before the tests
8800 ;; can be run. Maybe we could add a build step to transform beforehand
8801 ;; but it could be annoying/difficult.
8802 ;; We can enable tests for the Python 2 version, though, and do below.
8803 #:tests? #f))
8804 (home-page "https://bitbucket.org/runeh/anyjson/")
8805 (synopsis
8806 "Wraps best available JSON implementation in a common interface")
8807 (description
8808 "Anyjson loads whichever is the fastest JSON module installed
8809 and provides a uniform API regardless of which JSON implementation is used.")
8810 (license license:bsd-3)
8811 (properties `((python2-variant . ,(delay python2-anyjson))))))
8812
8813 (define-public python2-anyjson
8814 (let ((anyjson (package-with-python2
8815 (strip-python2-variant python-anyjson))))
8816 (package
8817 (inherit anyjson)
8818 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8819 #:tests? #t
8820 ,@(package-arguments anyjson)))
8821 (native-inputs `(("python2-nose" ,python2-nose))))))
8822
8823 (define-public python-amqp
8824 (package
8825 (name "python-amqp")
8826 (version "2.3.2")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "amqp" version))
8831 (sha256
8832 (base32
8833 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8834 (build-system python-build-system)
8835 (native-inputs
8836 `(("python-case" ,python-case)
8837 ("python-pytest-sugar" ,python-pytest-sugar)
8838 ("python-mock" ,python-mock)))
8839 (propagated-inputs
8840 `(("python-vine" ,python-vine)))
8841 (home-page "https://github.com/celery/py-amqp")
8842 (synopsis
8843 "Low-level AMQP client for Python (fork of amqplib)")
8844 (description
8845 "This is a fork of amqplib which was originally written by Barry Pederson.
8846 It is maintained by the Celery project, and used by kombu as a pure python
8847 alternative when librabbitmq is not available.")
8848 (license license:lgpl2.1+)
8849 (properties `((python2-variant . ,(delay python2-amqp))))))
8850
8851 (define-public python2-amqp
8852 (let ((amqp (package-with-python2
8853 (strip-python2-variant python-amqp))))
8854 (package
8855 (inherit amqp)
8856 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8857 ;; unmaintained. Weirdly, does not do this on the python 3
8858 ;; version?
8859 #:tests? #f
8860 ,@(package-arguments amqp))))))
8861
8862 (define-public python-txamqp
8863 (package
8864 (name "python-txamqp")
8865 (version "0.8.2")
8866 (source
8867 (origin
8868 (method url-fetch)
8869 (uri (pypi-uri "txAMQP" version))
8870 (sha256
8871 (base32
8872 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8873 (build-system python-build-system)
8874 (propagated-inputs
8875 `(("python-six" ,python-six)
8876 ("python-twisted" ,python-twisted)))
8877 (home-page "https://github.com/txamqp/txamqp")
8878 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8879 (description
8880 "This package provides a Python library for communicating with AMQP peers
8881 and brokers using the asynchronous networking framework Twisted. It contains
8882 all the necessary code to connect, send and receive messages to/from an
8883 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8884 also includes support for using Thrift RPC over AMQP in Twisted
8885 applications.")
8886 (license license:asl2.0)))
8887
8888 (define-public python2-txamqp
8889 (package-with-python2 python-txamqp))
8890
8891 (define-public python-kombu
8892 (package
8893 (name "python-kombu")
8894 (version "4.2.2")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "kombu" version))
8899 (sha256
8900 (base32
8901 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-mock" ,python-mock)
8905 ("python-case" ,python-case)
8906 ("python-pyro4" ,python-pyro4)
8907 ("python-pytest-sugar" ,python-pytest-sugar)
8908 ("python-pytz" ,python-pytz)))
8909 (propagated-inputs
8910 `(("python-anyjson" ,python-anyjson)
8911 ("python-amqp" ,python-amqp)
8912 ("python-redis" ,python-redis)))
8913 (home-page "https://kombu.readthedocs.io")
8914 (synopsis "Message passing library for Python")
8915 (description "The aim of Kombu is to make messaging in Python as easy as
8916 possible by providing an idiomatic high-level interface for the AMQ protocol,
8917 and also provide proven and tested solutions to common messaging problems.
8918 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8919 message orientation, queuing, routing, reliability and security, for which the
8920 RabbitMQ messaging server is the most popular implementation.")
8921 (license license:bsd-3)
8922 (properties `((python2-variant . ,(delay python2-kombu))))))
8923
8924 (define-public python2-kombu
8925 (let ((kombu (package-with-python2
8926 (strip-python2-variant python-kombu))))
8927 (package
8928 (inherit kombu)
8929 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8930 ;; It works fine on the python3 variant.
8931 #:tests? #f
8932 ,@(package-arguments kombu)))
8933 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8934 ,@(package-native-inputs kombu))))))
8935
8936 (define-public python-billiard
8937 (package
8938 (name "python-billiard")
8939 (version "3.5.0.5")
8940 (source
8941 (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "billiard" version))
8944 (sha256
8945 (base32
8946 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8947 (build-system python-build-system)
8948 (native-inputs
8949 `(("python-case" ,python-case)
8950 ("python-pytest" ,python-pytest)))
8951 (home-page "https://github.com/celery/billiard")
8952 (synopsis
8953 "Python multiprocessing fork with improvements and bugfixes")
8954 (description
8955 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8956 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8957 pyprocessing package. This standalone variant is intended to be compatible with
8958 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8959 (license license:bsd-3)
8960 (properties `((python2-variant . ,(delay python2-billiard))))))
8961
8962 (define-public python2-billiard
8963 (let ((billiard (package-with-python2
8964 (strip-python2-variant python-billiard))))
8965 (package
8966 (inherit billiard)
8967 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8968 ("python2-mock" ,python2-mock)
8969 ,@(package-native-inputs billiard))))))
8970
8971 (define-public python-celery
8972 (package
8973 (name "python-celery")
8974 (version "4.2.1")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "celery" version))
8979 (sha256
8980 (base32
8981 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8982 (build-system python-build-system)
8983 (arguments
8984 '(;; TODO The tests fail with Python 3.7
8985 ;; https://github.com/celery/celery/issues/4849
8986 #:tests? #f
8987 #:phases
8988 (modify-phases %standard-phases
8989 (add-after 'unpack 'patch-requirements
8990 (lambda _
8991 (substitute* "requirements/test.txt"
8992 (("pytest>=3\\.0,<3\\.3")
8993 "pytest>=3.0"))
8994 #t)))))
8995 (native-inputs
8996 `(("python-case" ,python-case)
8997 ("python-pytest" ,python-pytest)))
8998 (propagated-inputs
8999 `(("python-pytz" ,python-pytz)
9000 ("python-billiard" ,python-billiard)
9001 ("python-kombu" ,python-kombu)))
9002 (home-page "https://celeryproject.org")
9003 (synopsis "Distributed Task Queue")
9004 (description "Celery is an asynchronous task queue/job queue based on
9005 distributed message passing. It is focused on real-time operation, but
9006 supports scheduling as well. The execution units, called tasks, are executed
9007 concurrently on a single or more worker servers using multiprocessing,
9008 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9009 synchronously (wait until ready).")
9010 (license license:bsd-3)
9011 (properties `((python2-variant . ,(delay python2-celery))))))
9012
9013 (define-public python2-celery
9014 (let ((celery (package-with-python2
9015 (strip-python2-variant python-celery))))
9016 (package
9017 (inherit celery)
9018 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9019 ("python2-mock" ,python2-mock)
9020 ,@(package-native-inputs celery))))))
9021
9022 (define-public python-translitcodec
9023 (package
9024 (name "python-translitcodec")
9025 (version "0.4.0")
9026 (source
9027 (origin
9028 (method url-fetch)
9029 (uri (pypi-uri "translitcodec" version))
9030 (sha256
9031 (base32
9032 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9033 (build-system python-build-system)
9034 (arguments
9035 `(#:tests? #f)) ; no tests provided
9036 (home-page
9037 "https://github.com/claudep/translitcodec")
9038 (synopsis
9039 "Unicode to 8-bit charset transliteration codec")
9040 (description
9041 "This package contains codecs for transliterating ISO 10646 texts into
9042 best-effort representations using smaller coded character sets (ASCII,
9043 ISO 8859, etc.).")
9044 (license license:expat)))
9045
9046 (define-public python2-translitcodec
9047 (package-with-python2 python-translitcodec))
9048
9049 (define-public python-editor
9050 (package
9051 (name "python-editor")
9052 (version "0.5")
9053 (source
9054 (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "python-editor" version))
9057 (sha256
9058 (base32
9059 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9060 (build-system python-build-system)
9061 (home-page
9062 "https://github.com/fmoo/python-editor")
9063 (synopsis
9064 "Programmatically open an editor, capture the result")
9065 (description
9066 "python-editor is a library that provides the editor module for
9067 programmatically interfacing with your system's $EDITOR.")
9068 (license license:asl2.0)))
9069
9070 (define-public python2-editor
9071 (package-with-python2 python-editor))
9072
9073 (define-public python-vobject
9074 (package
9075 (name "python-vobject")
9076 (version "0.9.5")
9077 (source (origin
9078 (method url-fetch)
9079 (uri (pypi-uri "vobject" version))
9080 (sha256
9081 (base32
9082 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9083 (build-system python-build-system)
9084 (arguments
9085 '(;; The test suite relies on some non-portable Windows interfaces.
9086 #:tests? #f))
9087 (propagated-inputs
9088 `(("python-dateutil" ,python-dateutil)
9089 ("python-pyicu" ,python-pyicu)))
9090 (synopsis "Parse and generate vCard and vCalendar files")
9091 (description "Vobject is intended to be a full featured Python package for
9092 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9093 are supported and well tested. vCard 3.0 files are supported, and all data
9094 should be imported, but only a few components are understood in a sophisticated
9095 way.")
9096 (home-page "http://eventable.github.io/vobject/")
9097 (license license:asl2.0)))
9098
9099 (define-public python2-vobject
9100 (package-with-python2 python-vobject))
9101
9102 (define-public python-munkres
9103 (package
9104 (name "python-munkres")
9105 (version "1.0.8")
9106 (source (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "munkres" version))
9109 (sha256
9110 (base32
9111 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9112 (build-system python-build-system)
9113 (arguments
9114 '(#:tests? #f)) ; no test suite
9115 (home-page "http://software.clapper.org/munkres/")
9116 (synopsis "Implementation of the Munkres algorithm")
9117 (description "The Munkres module provides an implementation of the Munkres
9118 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9119 useful for solving the Assignment Problem.")
9120 (license license:bsd-3)))
9121
9122 (define-public python2-munkres
9123 (package-with-python2 python-munkres))
9124
9125 (define-public python-whoosh
9126 (package
9127 (name "python-whoosh")
9128 (version "2.7.4")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "Whoosh" version))
9133 (sha256
9134 (base32
9135 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9136 (build-system python-build-system)
9137 (native-inputs
9138 `(("python-pytest" ,python-pytest)))
9139 (home-page "https://bitbucket.org/mchaput/whoosh")
9140 (synopsis "Full text indexing, search, and spell checking library")
9141 (description
9142 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9143 checking library.")
9144 (license license:bsd-2)))
9145
9146 (define-public python2-whoosh
9147 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9148 (package (inherit whoosh)
9149 (propagated-inputs
9150 `(("python2-backport-ssl-match-hostname"
9151 ,python2-backport-ssl-match-hostname)
9152 ,@(package-propagated-inputs whoosh))))))
9153
9154 (define-public python-pathlib
9155 (package
9156 (name "python-pathlib")
9157 (version "1.0.1")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "pathlib" version))
9161 (sha256
9162 (base32
9163 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9164 (build-system python-build-system)
9165 ;; The tests depend on the internal "test" module, which does not provide
9166 ;; a stable interface.
9167 (arguments `(#:tests? #f))
9168 (home-page "https://pathlib.readthedocs.org/")
9169 (synopsis "Object-oriented file system paths")
9170 (description "Pathlib offers a set of classes to handle file system paths.
9171 It offers the following advantages over using string objects:
9172
9173 @enumerate
9174 @item No more cumbersome use of os and os.path functions. Everything can
9175 be done easily through operators, attribute accesses, and method calls.
9176 @item Embodies the semantics of different path types. For example,
9177 comparing Windows paths ignores casing.
9178 @item Well-defined semantics, eliminating any inconsistencies or
9179 ambiguities (forward vs. backward slashes, etc.).
9180 @end enumerate
9181
9182 Note: In Python 3.4, pathlib is now part of the standard library. For other
9183 Python versions please consider python-pathlib2 instead, which tracks the
9184 standard library module. This module (python-pathlib) isn't maintained
9185 anymore.")
9186 (license license:expat)))
9187
9188 (define-public python2-pathlib
9189 (package-with-python2 python-pathlib))
9190
9191 (define-public python2-pathlib2
9192 (package
9193 (name "python2-pathlib2")
9194 (version "2.3.3")
9195 (source (origin
9196 (method url-fetch)
9197 (uri (pypi-uri "pathlib2" version))
9198 (sha256
9199 (base32
9200 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9201 (build-system python-build-system)
9202 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9203 ;; version is 3.4 which already includes this package as part of the
9204 ;; standard library.
9205 (arguments
9206 `(#:python ,python-2))
9207 (propagated-inputs
9208 `(("python2-scandir" ,python2-scandir)
9209 ("python2-six" ,python2-six)))
9210 (home-page "https://pypi.python.org/pypi/pathlib2/")
9211 (synopsis "Object-oriented file system paths - backport of standard
9212 pathlib module")
9213 (description "The goal of pathlib2 is to provide a backport of standard
9214 pathlib module which tracks the standard library module, so all the newest
9215 features of the standard pathlib can be used also on older Python versions.
9216
9217 Pathlib offers a set of classes to handle file system paths. It offers the
9218 following advantages over using string objects:
9219
9220 @enumerate
9221 @item No more cumbersome use of os and os.path functions. Everything can
9222 be done easily through operators, attribute accesses, and method calls.
9223 @item Embodies the semantics of different path types. For example,
9224 comparing Windows paths ignores casing.
9225 @item Well-defined semantics, eliminating any inconsistencies or
9226 ambiguities (forward vs. backward slashes, etc.).
9227 @end enumerate")
9228 (license license:expat)))
9229
9230 (define-public python2-pathlib2-bootstrap
9231 (hidden-package
9232 (package
9233 (inherit python2-pathlib2)
9234 (name "python2-pathlib2-bootstrap")
9235 (propagated-inputs
9236 `(("python2-scandir" ,python2-scandir)
9237 ("python2-six" ,python2-six-bootstrap))))))
9238
9239 (define-public python-jellyfish
9240 (package
9241 (name "python-jellyfish")
9242 (version "0.5.6")
9243 (source (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "jellyfish" version))
9246 (sha256
9247 (base32
9248 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9249 (build-system python-build-system)
9250 (native-inputs
9251 `(("python-pytest" ,python-pytest)))
9252 (home-page "https://github.com/jamesturk/jellyfish")
9253 (synopsis "Approximate and phonetic matching of strings")
9254 (description "Jellyfish uses a variety of string comparison and phonetic
9255 encoding algorithms to do fuzzy string matching.")
9256 (license license:bsd-2)
9257 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9258
9259 (define-public python2-jellyfish
9260 (let ((jellyfish (package-with-python2
9261 (strip-python2-variant python-jellyfish))))
9262 (package (inherit jellyfish)
9263 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9264 ,@(package-native-inputs jellyfish))))))
9265
9266 (define-public python2-unicodecsv
9267 (package
9268 (name "python2-unicodecsv")
9269 (version "0.14.1")
9270 (source (origin
9271 (method url-fetch)
9272 ;; The test suite is not included in the PyPi release.
9273 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9274 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9275 "archive/" version ".tar.gz"))
9276 (file-name (string-append name "-" version ".tar.gz"))
9277 (sha256
9278 (base32
9279 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9280 (build-system python-build-system)
9281 (arguments
9282 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9283 #:python ,python-2))
9284 (native-inputs
9285 `(("python2-unittest2" ,python2-unittest2)))
9286 (home-page "https://github.com/jdunck/python-unicodecsv")
9287 (synopsis "Unicode CSV module for Python 2")
9288 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9289 module, adding support for Unicode strings.")
9290 (license license:bsd-2)))
9291
9292 (define-public python-rarfile
9293 (package
9294 (name "python-rarfile")
9295 (version "2.8")
9296 (source (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "rarfile" version))
9299 (sha256
9300 (base32
9301 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9302 (build-system python-build-system)
9303 (arguments
9304 '(#:phases
9305 (modify-phases %standard-phases
9306 (replace 'check
9307 ;; Many tests fail, but the installation proceeds.
9308 (lambda _ (invoke "make" "-C" "test" "test"))))))
9309 (native-inputs
9310 `(("which" ,which))) ; required for tests
9311 (propagated-inputs
9312 `(("libarchive" ,libarchive)))
9313 (home-page "https://github.com/markokr/rarfile")
9314 (synopsis "RAR archive reader for Python")
9315 (description "This is Python module for RAR archive reading. The interface
9316 is made as zipfile like as possible.")
9317 (license license:isc)))
9318
9319 (define-public python2-rarfile
9320 (package-with-python2 python-rarfile))
9321
9322 (define-public python-magic
9323 (package
9324 (name "python-magic")
9325 (version "0.4.15")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "python-magic" version))
9330 (sha256
9331 (base32
9332 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9333 (file-name (string-append name "-" version "-checkout"))))
9334 (build-system python-build-system)
9335 (arguments
9336 ;; The tests are unreliable, so don't run them. The tests fail
9337 ;; under Python3 because they were written for Python2 and
9338 ;; contain import statements that do not work in Python3. One of
9339 ;; the tests fails under Python2 because its assertions are
9340 ;; overly stringent; it relies on comparing output strings which
9341 ;; are brittle and can change depending on the version of
9342 ;; libmagic being used and the system on which the test is
9343 ;; running. In my case, under GuixSD 0.10.0, only one test
9344 ;; failed, and it seems to have failed only because the version
9345 ;; of libmagic that is packaged in Guix outputs a slightly
9346 ;; different (but not wrong) string than the one that the test
9347 ;; expected.
9348 '(#:tests? #f
9349 #:phases (modify-phases %standard-phases
9350 ;; Replace a specific method call with a hard-coded
9351 ;; path to the necessary libmagic.so file in the
9352 ;; store. If we don't do this, then the method call
9353 ;; will fail to find the libmagic.so file, which in
9354 ;; turn will cause any application using
9355 ;; python-magic to fail.
9356 (add-before 'build 'hard-code-path-to-libmagic
9357 (lambda* (#:key inputs #:allow-other-keys)
9358 (let ((file (assoc-ref inputs "file")))
9359 (substitute* "magic.py"
9360 (("ctypes.util.find_library\\('magic'\\)")
9361 (string-append "'" file "/lib/libmagic.so'")))
9362 #t)))
9363 (add-before 'install 'disable-egg-compression
9364 (lambda _
9365 (let ((port (open-file "setup.cfg" "a")))
9366 (display "\n[easy_install]\nzip_ok = 0\n"
9367 port)
9368 (close-port port)
9369 #t))))))
9370 (inputs
9371 ;; python-magic needs to be able to find libmagic.so.
9372 `(("file" ,file)))
9373 (home-page
9374 "https://github.com/ahupp/python-magic")
9375 (synopsis
9376 "File type identification using libmagic")
9377 (description
9378 "This module uses ctypes to access the libmagic file type
9379 identification library. It makes use of the local magic database and
9380 supports both textual and MIME-type output. Note that this module and
9381 the python-file module both provide a \"magic.py\" file; these two
9382 modules, which are different and were developed separately, both serve
9383 the same purpose: to provide Python bindings for libmagic.")
9384 (license license:expat)))
9385
9386 (define-public python2-magic
9387 (package-with-python2 python-magic))
9388
9389 (define-public python2-s3cmd
9390 (package
9391 (name "python2-s3cmd")
9392 (version "1.6.1")
9393 (source
9394 (origin
9395 (method url-fetch)
9396 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9397 "s3cmd-" version ".tar.gz"))
9398 (sha256
9399 (base32
9400 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9401 (build-system python-build-system)
9402 (arguments
9403 ;; s3cmd is written for python2 only and contains no tests.
9404 `(#:python ,python-2
9405 #:tests? #f))
9406 (propagated-inputs
9407 `(("python2-dateutil" ,python2-dateutil)
9408 ;; The python-file package also provides a magic.py module.
9409 ;; This is an unfortunate state of affairs; however, s3cmd
9410 ;; fails to install if it cannot find specifically the
9411 ;; python-magic package. Thus we include it, instead of using
9412 ;; python-file. Ironically, s3cmd sometimes works better
9413 ;; without libmagic bindings at all:
9414 ;; https://github.com/s3tools/s3cmd/issues/198
9415 ("python2-magic" ,python2-magic)))
9416 (home-page "http://s3tools.org/s3cmd")
9417 (synopsis "Command line tool for S3-compatible storage services")
9418 (description
9419 "S3cmd is a command line tool for uploading, retrieving and managing data
9420 in storage services that are compatible with the Amazon Simple Storage
9421 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9422 GnuPG encryption, and more. It also supports management of Amazon's
9423 CloudFront content delivery network.")
9424 (license license:gpl2+)))
9425
9426 (define-public python-pkgconfig
9427 (package
9428 (name "python-pkgconfig")
9429 (version "1.3.1")
9430 (source
9431 (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "pkgconfig" version))
9434 (sha256
9435 (base32
9436 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9437 (build-system python-build-system)
9438 (native-inputs
9439 `(("python-nose" ,python-nose)))
9440 (inputs
9441 `(("pkg-config" ,pkg-config)))
9442 (arguments
9443 `(#:phases
9444 (modify-phases %standard-phases
9445 (add-before 'build 'patch
9446 ;; Hard-code the path to pkg-config.
9447 (lambda _
9448 (substitute* "pkgconfig/pkgconfig.py"
9449 (("cmd = 'pkg-config")
9450 (string-append "cmd = '" (which "pkg-config"))))
9451 #t))
9452 (replace 'check
9453 (lambda _
9454 (invoke "nosetests" "test.py"))))))
9455 (home-page "https://github.com/matze/pkgconfig")
9456 (synopsis "Python interface for pkg-config")
9457 (description "This module provides a Python interface to pkg-config. It
9458 can be used to find all pkg-config packages, check if a package exists,
9459 check if a package meets certain version requirements, query CFLAGS and
9460 LDFLAGS and parse the output to build extensions with setup.py.")
9461 (license license:expat)))
9462
9463 (define-public python2-pkgconfig
9464 (package-with-python2 python-pkgconfig))
9465
9466 (define-public python-bz2file
9467 (package
9468 (name "python-bz2file")
9469 (version "0.98")
9470 (source
9471 (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "bz2file" version))
9474 (sha256
9475 (base32
9476 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9477 (build-system python-build-system)
9478 (arguments
9479 `(#:tests? #f)) ; Tests use deprecated python modules.
9480 (home-page "https://github.com/nvawda/bz2file")
9481 (synopsis "Read and write bzip2-compressed files")
9482 (description
9483 "Bz2file is a Python library for reading and writing bzip2-compressed
9484 files. It contains a drop-in replacement for the I/O interface in the
9485 standard library's @code{bz2} module, including features from the latest
9486 development version of CPython that are not available in older releases.")
9487 (license license:asl2.0)))
9488
9489 (define-public python2-bz2file
9490 (package-with-python2 python-bz2file))
9491
9492 (define-public python-future
9493 (package
9494 (name "python-future")
9495 (version "0.17.1")
9496 (source
9497 (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "future" version))
9500 (sha256
9501 (base32
9502 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9503 (build-system python-build-system)
9504 ;; Many tests connect to the network or are otherwise flawed.
9505 ;; https://github.com/PythonCharmers/python-future/issues/210
9506 (arguments
9507 `(#:tests? #f))
9508 (home-page "http://python-future.org")
9509 (synopsis "Single-source support for Python 3 and 2")
9510 (description
9511 "@code{python-future} is the missing compatibility layer between Python 2 and
9512 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9513 to support both Python 2 and Python 3 with minimal overhead.")
9514 (license license:expat)))
9515
9516 (define-public python2-future
9517 (package-with-python2 python-future))
9518
9519 (define-public python-cysignals
9520 (package
9521 (name "python-cysignals")
9522 (version "1.9.0")
9523 (source
9524 (origin
9525 (method url-fetch)
9526 (uri (pypi-uri "cysignals" version))
9527 (sha256
9528 (base32
9529 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9530 (build-system python-build-system)
9531 (native-inputs
9532 `(("python-cython" ,python-cython)
9533 ("python-sphinx" ,python-sphinx)))
9534 (inputs
9535 `(("pari-gp" ,pari-gp)))
9536 (arguments
9537 `(#:modules ((guix build python-build-system)
9538 ((guix build gnu-build-system) #:prefix gnu:)
9539 (guix build utils))
9540 ;; FIXME: Tests are executed after installation and currently fail
9541 ;; when not installing into standard locations; the author is working
9542 ;; on a fix.
9543 #:tests? #f
9544 #:phases
9545 (modify-phases %standard-phases
9546 (add-before
9547 'build 'configure
9548 (assoc-ref gnu:%standard-phases 'configure)))))
9549 (home-page
9550 "https://github.com/sagemath/cysignals")
9551 (synopsis
9552 "Handling of interrupts and signals for Cython")
9553 (description
9554 "The cysignals package provides mechanisms to handle interrupts (and
9555 other signals and errors) in Cython code, using two related approaches,
9556 for mixed Cython/Python code or external C libraries and pure Cython code,
9557 respectively.")
9558 (license license:lgpl3+)))
9559
9560 (define-public python2-cysignals
9561 (package-with-python2 python-cysignals))
9562
9563 (define-public python2-shedskin
9564 (package
9565 (name "python2-shedskin")
9566 (version "0.9.4")
9567 (source
9568 (origin
9569 (method url-fetch)
9570 (uri (string-append "https://github.com/shedskin/shedskin/"
9571 "releases/download/v" version
9572 "/shedskin-" version ".tgz"))
9573 (sha256
9574 (base32
9575 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9576 (build-system python-build-system)
9577 (arguments
9578 `(#:python ,python-2
9579 #:phases (modify-phases %standard-phases
9580 (add-after 'unpack 'fix-resulting-include-libs
9581 (lambda* (#:key inputs #:allow-other-keys)
9582 (let ((libgc (assoc-ref inputs "libgc"))
9583 (pcre (assoc-ref inputs "pcre")))
9584 (substitute* "shedskin/makefile.py"
9585 (("variable == 'CCFLAGS':[ ]*")
9586 (string-append "variable == 'CCFLAGS':\n"
9587 " line += ' -I " pcre "/include"
9588 " -I " libgc "/include'"))
9589 (("variable == 'LFLAGS':[ ]*")
9590 (string-append "variable == 'LFLAGS':\n"
9591 " line += ' -L" pcre "/lib"
9592 " -L " libgc "/lib'")))
9593 #t))))))
9594 (inputs `(("pcre" ,pcre)
9595 ("libgc" ,libgc)))
9596 (home-page "https://shedskin.github.io/")
9597 (synopsis "Experimental Python-2 to C++ Compiler")
9598 (description (string-append "This is an experimental compiler for a subset of
9599 Python. It generates C++ code and a Makefile."))
9600 (license (list license:gpl3 license:bsd-3 license:expat))))
9601
9602 (define-public python2-rope
9603 (package
9604 (name "python2-rope")
9605 (version "0.11.0")
9606 (source
9607 (origin
9608 (method url-fetch)
9609 (uri (pypi-uri "rope" version))
9610 (sha256
9611 (base32
9612 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9613 (arguments
9614 ;; Rope has only partial python3 support, see `python-rope'
9615 `(#:python ,python-2))
9616 (build-system python-build-system)
9617 (native-inputs
9618 `(("python2-unittest2" ,python2-unittest2)))
9619 (home-page "https://github.com/python-rope/rope")
9620 (synopsis "Refactoring library for Python")
9621 (description "Rope is a refactoring library for Python. It facilitates
9622 the renaming, moving and extracting of attributes, functions, modules, fields
9623 and parameters in Python 2 source code. These refactorings can also be applied
9624 to occurrences in strings and comments.")
9625 (license license:gpl2)))
9626
9627 (define-public python-rope
9628 (package
9629 (inherit python2-rope)
9630 (name "python-rope")
9631 (arguments `(#:python ,python-wrapper
9632 ;; XXX: Only partial python3 support, results in some failing
9633 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9634 #:tests? #f))
9635 (properties `((python2-variant . ,(delay python2-rope))))))
9636
9637 (define-public python-py3status
9638 (package
9639 (name "python-py3status")
9640 (version "3.16")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "py3status" version))
9645 (sha256
9646 (base32
9647 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9648 (build-system python-build-system)
9649 (inputs
9650 `(("file" ,file)))
9651 (arguments
9652 '(#:phases
9653 (modify-phases %standard-phases
9654 ;; 'file' is used for detection of configuration file encoding
9655 ;; let's make link the dependency to particular input
9656 (add-before 'build 'patch-file-path
9657 (lambda* (#:key inputs #:allow-other-keys)
9658 (let ((file-path (assoc-ref inputs "file")))
9659 (substitute* "py3status/parse_config.py"
9660 (("\\['file', '-b'")
9661 (string-append "['" file-path "/bin/file', '-b'")))
9662 #t))))
9663 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9664 (home-page "https://github.com/ultrabug/py3status")
9665 (synopsis "Extensible i3status wrapper written in Python")
9666 (description "py3status is an i3status wrapper which extends i3status
9667 functionality in a modular way, allowing you to extend your panel with your
9668 own code, responding to click events and updating clock every second.")
9669 (license license:bsd-3)))
9670
9671 (define-public python-tblib
9672 (package
9673 (name "python-tblib")
9674 (version "1.3.2")
9675 (source (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "tblib" version))
9678 (sha256 (base32
9679 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9680 (build-system python-build-system)
9681 (arguments
9682 `(#:phases
9683 (modify-phases %standard-phases
9684 (add-before 'check 'adjust-tests
9685 (lambda _
9686 (when (which "python3")
9687 ;; Adjust the example output to match that of Python 3.7:
9688 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9689 (substitute* "README.rst"
9690 (("Exception\\('fail',") "Exception('fail'"))
9691 #t)))
9692 (replace 'check
9693 (lambda _
9694 ;; Upstream runs tests after installation and the package itself
9695 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9696 ;; found.
9697 (setenv "PYTHONPATH"
9698 (string-append (getcwd) "/build/lib:"
9699 (getenv "PYTHONPATH")))
9700 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9701 (native-inputs
9702 `(("python-pytest" ,python-pytest)
9703 ("python-six" ,python-six)))
9704 (home-page "https://github.com/ionelmc/python-tblib")
9705 (synopsis "Traceback serialization library")
9706 (description
9707 "Traceback serialization allows you to:
9708
9709 @enumerate
9710 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9711 different processes. This allows better error handling when running code over
9712 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9713
9714 @item Parse traceback strings and raise with the parsed tracebacks.
9715 @end enumerate\n")
9716 (license license:bsd-3)))
9717
9718 (define-public python2-tblib
9719 (package-with-python2 python-tblib))
9720
9721 (define-public python-greenlet
9722 (package
9723 (name "python-greenlet")
9724 (version "0.4.15")
9725 (source (origin
9726 (method url-fetch)
9727 (uri (pypi-uri "greenlet" version))
9728 (sha256
9729 (base32
9730 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9731 (build-system python-build-system)
9732 (home-page "https://greenlet.readthedocs.io/")
9733 (synopsis "Lightweight in-process concurrent programming")
9734 (description
9735 "Greenlet package is a spin-off of Stackless, a version of CPython
9736 that supports micro-threads called \"tasklets\". Tasklets run
9737 pseudo-concurrently (typically in a single or a few OS-level threads) and
9738 are synchronized with data exchanges on \"channels\".")
9739 (license (list license:psfl license:expat))))
9740
9741 (define-public python2-greenlet
9742 (package-with-python2 python-greenlet))
9743
9744 (define-public python-objgraph
9745 (package
9746 (name "python-objgraph")
9747 (version "3.4.0")
9748 (source
9749 (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "objgraph" version))
9752 (sha256
9753 (base32
9754 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9755 (build-system python-build-system)
9756 (propagated-inputs
9757 `(("python-graphviz" ,python-graphviz)))
9758 (native-inputs
9759 `(("python-mock" ,python-mock)
9760 ("graphviz" ,graphviz)))
9761 (home-page "https://mg.pov.lt/objgraph/")
9762 (synopsis "Draw Python object reference graphs with graphviz")
9763 (description
9764 "This package provides tools to draw Python object reference graphs with
9765 graphviz.")
9766 (license license:expat)))
9767
9768 (define-public python-gevent
9769 (package
9770 (name "python-gevent")
9771 (version "1.3.7")
9772 (source (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "gevent" version))
9775 (sha256
9776 (base32
9777 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9778 (modules '((guix build utils)))
9779 (snippet
9780 '(begin
9781 ;; unbunding libev and c-ares
9782 (delete-file-recursively "deps")
9783 #t))))
9784 (build-system python-build-system)
9785 (arguments
9786 `(#:modules ((ice-9 ftw)
9787 (ice-9 match)
9788 (srfi srfi-26)
9789 (guix build utils)
9790 (guix build python-build-system))
9791 #:phases (modify-phases %standard-phases
9792 (add-after 'unpack 'unpack-libev
9793 (lambda* (#:key inputs #:allow-other-keys)
9794 (mkdir-p "deps/libev")
9795 ;; FIXME: gevent requires building libev, even though
9796 ;; it only links against the proper one.
9797 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9798 "--strip-components=1" "-C" "deps/libev")))
9799 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9800 (lambda _
9801 (substitute* "src/gevent/subprocess.py"
9802 (("/bin/sh") (which "sh")))
9803 (for-each (lambda (file)
9804 (substitute* file
9805 (("/bin/sh") (which "sh"))
9806 (("/bin/true") (which "true"))))
9807 (find-files "src/greentest" "\\.py$"))
9808 #t))
9809 (add-before 'build 'do-not-use-bundled-sources
9810 (lambda* (#:key inputs #:allow-other-keys)
9811 (setenv "CONFIG_SHELL" (which "bash"))
9812 (setenv "LIBEV_EMBED" "false")
9813 (setenv "CARES_EMBED" "false")
9814 (setenv "EMBED" "false")
9815
9816 (let ((greenlet (string-append
9817 (assoc-ref inputs "python-greenlet")
9818 "/include")))
9819 (match (scandir greenlet
9820 (lambda (item)
9821 (string-prefix? "python" item)))
9822 ((python)
9823 (setenv "CPATH"
9824 (string-append greenlet "/" python)))))
9825 #t))
9826 (add-before 'check 'skip-timer-test
9827 (lambda _
9828 ;; XXX: Skip 'TestTimerResolution', which appears to be
9829 ;; unreliable.
9830 (substitute* "src/greentest/test__core_timer.py"
9831 (("not greentest.RUNNING_ON_CI") "False"))
9832 #t))
9833 (replace 'check
9834 (lambda _
9835 ;; Make sure the build directory is on PYTHONPATH.
9836 (setenv "PYTHONPATH"
9837 (string-append
9838 (getenv "PYTHONPATH") ":"
9839 (getcwd) "/build/"
9840 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9841 (with-directory-excursion "src/greentest"
9842 ;; XXX: Many tests require network access. Instead we only
9843 ;; run known-good tests. Unfortunately we cannot use
9844 ;; recursion here since this directory also contains
9845 ;; Python-version-specific subfolders.
9846 (apply invoke "python" "testrunner.py" "--config"
9847 "known_failures.py"
9848 (scandir "." (cut regexp-exec
9849 (make-regexp "test_+(subprocess|core)")
9850 <>)))))))))
9851 (propagated-inputs
9852 `(("python-greenlet" ,python-greenlet)
9853 ("python-objgraph" ,python-objgraph)))
9854 (native-inputs
9855 `(("libev-source" ,(package-source libev))
9856 ("python-six" ,python-six)))
9857 (inputs
9858 `(("c-ares" ,c-ares)
9859 ("libev" ,libev)))
9860 (home-page "http://www.gevent.org/")
9861 (synopsis "Coroutine-based network library")
9862 (description
9863 "gevent is a coroutine-based Python networking library that uses greenlet
9864 to provide a high-level synchronous API on top of the libev event loop.")
9865 (license license:expat)
9866 (properties `((python2-variant . ,(delay python2-gevent))))))
9867
9868 (define-public python2-gevent
9869 (let ((base (package-with-python2
9870 (strip-python2-variant python-gevent))))
9871 (package
9872 (inherit base)
9873 (native-inputs `(,@(package-native-inputs python-gevent)
9874 ("python-mock" ,python2-mock))))))
9875
9876 (define-public python-fastimport
9877 (package
9878 (name "python-fastimport")
9879 (version "0.9.6")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "fastimport" version))
9884 (sha256
9885 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9886 (build-system python-build-system)
9887 (home-page "https://github.com/jelmer/python-fastimport")
9888 (synopsis "VCS fastimport parser and generator in Python")
9889 (description "This package provides a parser for and generator of the Git
9890 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9891 format.")
9892 (license license:gpl2+)))
9893
9894 (define-public python2-fastimport
9895 (package-with-python2 python-fastimport))
9896
9897 (define-public python-twisted
9898 (package
9899 (name "python-twisted")
9900 (version "19.2.1")
9901 (source (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9904 (sha256
9905 (base32
9906 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9907 (build-system python-build-system)
9908 (arguments
9909 '(#:tests? #f)) ; FIXME: some tests fail
9910 (propagated-inputs
9911 `(("python-zope-interface" ,python-zope-interface)
9912 ("python-pyhamcrest" ,python-pyhamcrest)
9913 ("python-incremental" ,python-incremental)
9914 ("python-hyperlink" ,python-hyperlink)
9915 ("python-constantly" ,python-constantly)
9916 ("python-automat" ,python-automat)))
9917 (home-page "https://twistedmatrix.com/")
9918 (synopsis "Asynchronous networking framework written in Python")
9919 (description
9920 "Twisted is an extensible framework for Python programming, with special
9921 focus on event-based network programming and multiprotocol integration.")
9922 (license license:expat)))
9923
9924 (define-public python2-twisted
9925 (package-with-python2 python-twisted))
9926
9927 (define-public python-pika
9928 (package
9929 (name "python-pika")
9930 (version "0.12.0")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "pika" version))
9935 (sha256
9936 (base32
9937 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9938 (build-system python-build-system)
9939 (native-inputs
9940 `(("python-pyev" ,python-pyev)
9941 ("python-tornado" ,python-tornado)
9942 ("python-twisted" ,python-twisted)))
9943 (home-page "https://pika.readthedocs.org")
9944 (synopsis "Pure Python AMQP Client Library")
9945 (description
9946 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9947 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9948 network support library.")
9949 (license license:bsd-3)))
9950
9951 (define-public python2-pika
9952 (package-with-python2 python-pika))
9953
9954 (define-public python-ply
9955 (package
9956 (name "python-ply")
9957 (version "3.10")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "ply" version))
9962 (sha256
9963 (base32
9964 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9965 (build-system python-build-system)
9966 (home-page "http://www.dabeaz.com/ply/")
9967 (synopsis "Python Lex & Yacc")
9968 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9969 It uses LR parsing and does extensive error checking.")
9970 (license license:bsd-3)))
9971
9972 (define-public python2-ply
9973 (package-with-python2 python-ply))
9974
9975 (define-public python-tabulate
9976 (package
9977 (name "python-tabulate")
9978 (version "0.7.7")
9979 (source (origin
9980 (method url-fetch)
9981 (uri (pypi-uri "tabulate" version))
9982 (sha256
9983 (base32
9984 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9985 (build-system python-build-system)
9986 (arguments
9987 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9988 ;; and the latest release is not tagged in the upstream repository.
9989 '(#:tests? #f))
9990 (home-page "https://bitbucket.org/astanin/python-tabulate")
9991 (synopsis "Pretty-print tabular data")
9992 (description
9993 "Tabulate is a library and command-line utility to pretty-print tabular
9994 data in Python.")
9995 (license license:expat)))
9996
9997 (define-public python2-tabulate
9998 (package-with-python2 python-tabulate))
9999
10000 (define-public python-kazoo
10001 (package
10002 (name "python-kazoo")
10003 (version "2.4.0")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (pypi-uri "kazoo" version))
10008 (sha256
10009 (base32
10010 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10011 (build-system python-build-system)
10012 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10013 (propagated-inputs
10014 `(("python-six" ,python-six)))
10015 (home-page "https://kazoo.readthedocs.org")
10016 (synopsis "High-level Zookeeper client library")
10017 (description
10018 "Kazoo is a Python client library for the Apache Zookeeper distributed
10019 application service. It is designed to be easy to use and to avoid common
10020 programming errors.")
10021 (license license:asl2.0)))
10022
10023 (define-public python2-kazoo
10024 (package-with-python2 python-kazoo))
10025
10026 (define-public python-pykafka
10027 (package
10028 (name "python-pykafka")
10029 (version "2.4.0")
10030 (source (origin
10031 (method url-fetch)
10032 (uri (pypi-uri "pykafka" version))
10033 (sha256
10034 (base32
10035 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10036 (build-system python-build-system)
10037 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10038 (propagated-inputs
10039 `(("python-gevent" ,python-gevent)
10040 ("python-kazoo" ,python-kazoo)
10041 ("python-tabulate" ,python-tabulate)))
10042 (inputs
10043 `(("librdkafka" ,librdkafka)))
10044 (home-page "https://pykafka.readthedocs.io/")
10045 (synopsis "Apache Kafka client for Python")
10046 (description
10047 "PyKafka is a client for the Apache Kafka distributed messaging system.
10048 It includes Python implementations of Kafka producers and consumers, which
10049 are optionally backed by a C extension built on librdkafka.")
10050 (license license:asl2.0)))
10051
10052 (define-public python2-pykafka
10053 (package-with-python2 python-pykafka))
10054
10055 (define-public python-wcwidth
10056 (package
10057 (name "python-wcwidth")
10058 (version "0.1.7")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "wcwidth" version))
10063 (sha256
10064 (base32
10065 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10066 (build-system python-build-system)
10067 (home-page "https://github.com/jquast/wcwidth")
10068 (synopsis "Measure number of terminal column cells of wide-character codes")
10069 (description "Wcwidth measures the number of terminal column cells of
10070 wide-character codes. It is useful for those implementing a terminal emulator,
10071 or programs that carefully produce output to be interpreted by one. It is a
10072 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10073 specified in POSIX.1-2001 and POSIX.1-2008.")
10074 (license license:expat)))
10075
10076 (define-public python2-wcwidth
10077 (package-with-python2 python-wcwidth))
10078
10079 (define-public python2-jsonrpclib
10080 (package
10081 (name "python2-jsonrpclib")
10082 (version "0.1.7")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "jsonrpclib" version))
10086 (sha256
10087 (base32
10088 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10089 (build-system python-build-system)
10090 (arguments
10091 `(#:tests? #f
10092 #:python ,python-2))
10093 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10094 (synopsis "Implementation of JSON-RPC specification for Python")
10095 (description
10096 "This library is an implementation of the JSON-RPC specification.
10097 It supports both the original 1.0 specification, as well as the
10098 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10099 etc.")
10100 (license license:asl2.0)))
10101
10102 (define-public python-chai
10103 (package
10104 (name "python-chai")
10105 (version "1.1.2")
10106 (source (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "chai" version))
10109 (sha256
10110 (base32
10111 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10112 (build-system python-build-system)
10113 (home-page "https://github.com/agoragames/chai")
10114 (synopsis "Mocking framework for Python")
10115 (description
10116 "Chai provides an api for mocking, stubbing and spying your python
10117 objects, patterned after the Mocha library for Ruby.")
10118 (license license:bsd-3)))
10119
10120 (define-public python2-chai
10121 (package-with-python2 python-chai))
10122
10123 (define-public python-inflection
10124 (package
10125 (name "python-inflection")
10126 (version "0.3.1")
10127 (source
10128 (origin (method url-fetch)
10129 (uri (pypi-uri "inflection" version))
10130 (sha256
10131 (base32
10132 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10133 (build-system python-build-system)
10134 (native-inputs
10135 `(("python-pytest" ,python-pytest)))
10136 (home-page "https://github.com/jpvanhal/inflection")
10137 (synopsis "Python string transformation library")
10138 (description
10139 "Inflection is a string transformation library. It singularizes
10140 and pluralizes English words, and transforms strings from CamelCase to
10141 underscored string.")
10142 (license license:expat)))
10143
10144 (define-public python2-inflection
10145 (package-with-python2 python-inflection))
10146
10147 (define-public python-pylev
10148 (package
10149 (name "python-pylev")
10150 (version "1.3.0")
10151 (source (origin
10152 (method url-fetch)
10153 (uri (pypi-uri "pylev" version))
10154 (sha256
10155 (base32
10156 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10157 (build-system python-build-system)
10158 (home-page "https://github.com/toastdriven/pylev")
10159 (synopsis "Levenshtein distance implementation in Python")
10160 (description "Pure Python Levenshtein implementation, based off the
10161 Wikipedia code samples at
10162 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10163 (license license:bsd-3)))
10164
10165 (define-public python2-pylev
10166 (package-with-python2 python-pylev))
10167
10168 (define-public python-cleo
10169 (package
10170 (name "python-cleo")
10171 (version "0.6.1")
10172 (source (origin
10173 (method url-fetch)
10174 (uri (pypi-uri "cleo" version))
10175 (sha256
10176 (base32
10177 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10178 (build-system python-build-system)
10179 (native-inputs
10180 `(;; For testing
10181 ("python-mock" ,python-mock)
10182 ("python-pytest-mock" ,python-pytest-mock)
10183 ("python-pytest" ,python-pytest)))
10184 (propagated-inputs
10185 `(("python-backpack" ,python-backpack)
10186 ("python-pastel" ,python-pastel)
10187 ("python-pylev" ,python-pylev)))
10188 (home-page "https://github.com/sdispater/cleo")
10189 (synopsis "Command-line arguments library for Python")
10190 (description
10191 "Cleo allows you to create command-line commands with signature in
10192 docstring and colored output.")
10193 (license license:expat)))
10194
10195 (define-public python2-cleo
10196 (package-with-python2 python-cleo))
10197
10198 (define-public python-lazy-object-proxy
10199 (package
10200 (name "python-lazy-object-proxy")
10201 (version "1.3.1")
10202 (source (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "lazy-object-proxy" version))
10205 (sha256
10206 (base32
10207 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10208 (build-system python-build-system)
10209 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10210 (synopsis "Lazy object proxy for python")
10211 (description
10212 "Lazy object proxy is an object that wraps a callable but defers the call
10213 until the object is actually required, and caches the result of said call.")
10214 (license license:bsd-2)))
10215
10216 (define-public python2-lazy-object-proxy
10217 (package-with-python2 python-lazy-object-proxy))
10218
10219 (define-public python-dnspython
10220 (package
10221 (name "python-dnspython")
10222 (version "1.15.0")
10223 (source (origin
10224 (method url-fetch)
10225 (uri (string-append "http://www.dnspython.org/kits/"
10226 version "/dnspython-" version ".tar.gz"))
10227 (sha256
10228 (base32
10229 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10230 (build-system python-build-system)
10231 (arguments '(#:tests? #f)) ; XXX: requires internet access
10232 (home-page "http://www.dnspython.org")
10233 (synopsis "DNS toolkit for Python")
10234 (description
10235 "dnspython is a DNS toolkit for Python. It supports almost all record
10236 types. It can be used for queries, zone transfers, and dynamic updates.
10237 It supports TSIG authenticated messages and EDNS0.")
10238 (license license:expat)))
10239
10240 (define-public python2-dnspython
10241 (package-with-python2 python-dnspython))
10242
10243 (define-public python-email-validator
10244 (package
10245 (name "python-email-validator")
10246 (version "1.0.2")
10247 (source
10248 (origin (method url-fetch)
10249 (uri (pypi-uri "email_validator" version))
10250 (sha256
10251 (base32
10252 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10253 (build-system python-build-system)
10254 (arguments
10255 '(#:phases
10256 (modify-phases %standard-phases
10257 (add-before 'build 'use-dnspython
10258 (lambda _
10259 (substitute* "setup.py"
10260 (("dnspython3") "dnspython"))
10261 #t)))))
10262 (propagated-inputs
10263 `(("python-dnspython" ,python-dnspython)
10264 ("python-idna" ,python-idna)))
10265 (home-page "https://github.com/JoshData/python-email-validator")
10266 (synopsis "Email address validation library for Python")
10267 (description
10268 "This library validates email address syntax and deliverability.")
10269 (license license:cc0)))
10270
10271 (define-public python2-email-validator
10272 (package-with-python2 python-email-validator))
10273
10274 (define-public python-ukpostcodeparser
10275 (package
10276 (name "python-ukpostcodeparser")
10277 (version "1.0.3")
10278 (source (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "UkPostcodeParser" version))
10281 (sha256
10282 (base32
10283 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10284 (build-system python-build-system)
10285 (home-page "https://github.com/hamstah/ukpostcodeparser")
10286 (synopsis "UK Postcode parser for Python")
10287 (description
10288 "This library provides the @code{parse_uk_postcode} function for
10289 parsing UK postcodes.")
10290 (license license:expat)))
10291
10292 (define-public python2-ukpostcodeparser
10293 (package-with-python2 python-ukpostcodeparser))
10294
10295 (define-public python-faker
10296 (package
10297 (name "python-faker")
10298 (version "0.7.9")
10299 (source (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "Faker" version))
10302 (sha256
10303 (base32
10304 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10305 (patches
10306 (search-patches "python-faker-fix-build-32bit.patch"))
10307 (modules '((guix build utils)))
10308 (snippet
10309 '(begin
10310 (for-each delete-file (find-files "." "\\.pyc$"))
10311 #t))))
10312 (build-system python-build-system)
10313 (arguments
10314 '(#:phases
10315 (modify-phases %standard-phases
10316 (replace 'check
10317 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10318 (native-inputs
10319 `(;; For testing
10320 ("python-email-validator" ,python-email-validator)
10321 ("python-mock" ,python-mock)
10322 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10323 (propagated-inputs
10324 `(("python-dateutil" ,python-dateutil)
10325 ("python-six" ,python-six)))
10326 (home-page "https://github.com/joke2k/faker")
10327 (synopsis "Python package that generates fake data")
10328 (description
10329 "Faker is a Python package that generates fake data such as names,
10330 addresses, and phone numbers.")
10331 (license license:expat)
10332 (properties `((python2-variant . ,(delay python2-faker))))))
10333
10334 (define-public python2-faker
10335 (let ((base (package-with-python2 (strip-python2-variant
10336 python-faker))))
10337 (package
10338 (inherit base)
10339 (propagated-inputs
10340 `(("python2-ipaddress" ,python2-ipaddress)
10341 ,@(package-propagated-inputs base))))))
10342
10343 (define-public python-pyaml
10344 (package
10345 (name "python-pyaml")
10346 (version "18.11.0")
10347 (source (origin
10348 (method url-fetch)
10349 (uri (pypi-uri "pyaml" version))
10350 (sha256
10351 (base32
10352 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10353 (build-system python-build-system)
10354 (native-inputs
10355 `(("python-unidecode" ,python-unidecode)))
10356 (propagated-inputs
10357 `(("python-pyyaml" ,python-pyyaml)))
10358 (home-page "https://github.com/mk-fg/pretty-yaml")
10359 (synopsis "YAML pretty-print library for Python")
10360 (description
10361 "pyaml is a PyYAML based python module to produce pretty and readable
10362 YAML-serialized data.")
10363 (license license:wtfpl2)))
10364
10365 (define-public python2-pyaml
10366 (package-with-python2 python-pyaml))
10367
10368 (define-public python-backpack
10369 (package
10370 (name "python-backpack")
10371 (version "0.1")
10372 (source
10373 (origin
10374 (method url-fetch)
10375 (uri (pypi-uri "backpack" version))
10376 (sha256
10377 (base32
10378 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10379 (build-system python-build-system)
10380 (native-inputs
10381 `(("python-pytest" ,python-pytest)
10382 ("python-nose" ,python-nose)))
10383 (propagated-inputs
10384 `(("python-simplejson" ,python-simplejson)))
10385 (home-page "https://github.com/sdispater/backpack")
10386 (synopsis "Utilities for working with Python collections")
10387 (description "Backpack provides some useful utilities for working with
10388 collections of data.")
10389 (license license:expat)))
10390
10391 (define-public python2-backpack
10392 (package-with-python2 python-backpack))
10393
10394 (define-public python-prompt-toolkit
10395 (package
10396 (name "python-prompt-toolkit")
10397 (version "2.0.7")
10398 (source
10399 (origin
10400 (method url-fetch)
10401 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10402 (sha256
10403 (base32
10404 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10405 (build-system python-build-system)
10406 (arguments
10407 `(#:phases
10408 (modify-phases %standard-phases
10409 (delete 'check)
10410 (add-after 'install 'post-install-check
10411 (lambda* (#:key inputs outputs #:allow-other-keys)
10412 ;; HOME is needed for the test
10413 ;; "test_pathcompleter_can_expanduser".
10414 (setenv "HOME" "/tmp")
10415 (add-installed-pythonpath inputs outputs)
10416 (invoke "py.test"))))))
10417 (propagated-inputs
10418 `(("python-wcwidth" ,python-wcwidth)
10419 ("python-six" ,python-six)
10420 ("python-pygments" ,python-pygments)))
10421 (native-inputs
10422 `(("python-pytest" ,python-pytest)))
10423 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10424 (synopsis "Library for building command line interfaces in Python")
10425 (description
10426 "Prompt-Toolkit is a library for building interactive command line
10427 interfaces in Python. It's like GNU Readline but it also features syntax
10428 highlighting while typing, out-of-the-box multi-line input editing, advanced
10429 code completion, incremental search, support for Chinese double-width
10430 characters, mouse support, and auto suggestions.")
10431 (license license:bsd-3)))
10432
10433 (define-public python2-prompt-toolkit
10434 (package-with-python2 python-prompt-toolkit))
10435
10436 (define-public python-prompt-toolkit-1
10437 (package (inherit python-prompt-toolkit)
10438 (version "1.0.15")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10443 (sha256
10444 (base32
10445 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10446
10447 (define-public python2-prompt-toolkit-1
10448 (package-with-python2 python-prompt-toolkit-1))
10449
10450 (define-public python-jedi
10451 (package
10452 (name "python-jedi")
10453 (version "0.13.3")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "jedi" version))
10458 (sha256
10459 (base32
10460 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10461 (build-system python-build-system)
10462 (arguments
10463 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10464 ;; https://github.com/davidhalter/jedi/issues/1263)
10465 #:tests? #f
10466 #:phases
10467 (modify-phases %standard-phases
10468 (replace 'check
10469 (lambda* (#:key tests? #:allow-other-keys)
10470 (when tests?
10471 (invoke "py.test" "-vv")))))))
10472 (native-inputs
10473 `(("python-pytest" ,python-pytest)
10474 ("python-docopt" ,python-docopt)))
10475 (propagated-inputs
10476 `(("python-parso" ,python-parso)))
10477 (home-page "https://github.com/davidhalter/jedi")
10478 (synopsis "Autocompletion and static analysis library for Python")
10479 (description
10480 "Jedi is a static analysis tool for Python that can be used in Integrated
10481 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10482 on a deeper level than many other static analysis frameworks for Python.
10483
10484 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10485 well.")
10486 (license license:expat)))
10487
10488 (define-public python2-jedi
10489 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10490 (package
10491 (inherit base)
10492 (arguments (substitute-keyword-arguments (package-arguments base)
10493 ((#:tests? _) #t))))))
10494
10495 (define-public ptpython
10496 (package
10497 (name "ptpython")
10498 (version "0.34")
10499 (source (origin
10500 (method url-fetch)
10501 (uri (pypi-uri "ptpython" version))
10502 (sha256
10503 (base32
10504 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10505 (build-system python-build-system)
10506 (arguments
10507 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10508 (propagated-inputs
10509 `(("python-docopt" ,python-docopt)
10510 ("python-jedi" ,python-jedi)
10511 ("python-prompt-toolkit" ,python-prompt-toolkit)
10512 ("python-pygments" ,python-pygments)))
10513 (home-page "https://github.com/jonathanslenders/ptpython")
10514 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10515 (description
10516 "ptpython is a Python read-eval-print loop with IDE-like features.
10517 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10518 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10519 etc.")
10520 (license license:bsd-3)
10521 (properties `((python2-variant . ,(delay ptpython-2))))))
10522
10523 (define-public ptpython-2
10524 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10525 (package
10526 (inherit base)
10527 (name "ptpython2"))))
10528
10529 (define-public python-stem
10530 (package
10531 (name "python-stem")
10532 (version "1.7.1")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "stem" version))
10537 (sha256
10538 (base32
10539 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10540 (build-system python-build-system)
10541 (arguments
10542 `(#:phases
10543 (modify-phases %standard-phases
10544 (replace 'check
10545 (lambda _
10546 (invoke "./run_tests.py" "--unit")
10547 #t)))))
10548 (native-inputs
10549 `(("python-mock" ,python-mock)
10550 ("python-pycodestyle" ,python-pycodestyle)
10551 ("python-pyflakes" ,python-pyflakes)))
10552 (home-page "https://stem.torproject.org/")
10553 (synopsis
10554 "Python controller library that allows applications to interact with Tor")
10555 (description
10556 "Stem is a Python controller library for Tor. With it you can use Tor's
10557 control protocol to script against the Tor process and read descriptor data
10558 relays publish about themselves.")
10559 (license license:lgpl3)))
10560
10561 (define-public python2-stem
10562 (package-with-python2 python-stem))
10563
10564 (define-public python-pyserial
10565 (package
10566 (name "python-pyserial")
10567 (version "3.1.1")
10568 (source
10569 (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "pyserial" version))
10572 (sha256
10573 (base32
10574 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10575 (build-system python-build-system)
10576 (arguments
10577 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10578 ;; #:phases
10579 ;; (modify-phases %standard-phases
10580 ;; (replace 'check
10581 ;; (lambda _
10582 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10583 (home-page
10584 "https://github.com/pyserial/pyserial")
10585 (synopsis "Python Serial Port Bindings")
10586 (description "@code{pyserial} provide serial port bindings for Python. It
10587 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10588 and/or Xon/Xoff. The port is accessed in RAW mode.")
10589 (license license:bsd-3)))
10590
10591 (define-public python2-pyserial
10592 (package-with-python2 python-pyserial))
10593
10594 (define-public python-kivy
10595 (package
10596 (name "python-kivy")
10597 (version "1.10.1")
10598 (source
10599 (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "Kivy" version))
10602 (file-name (string-append name "-" version ".tar.gz"))
10603 (sha256
10604 (base32
10605 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10606 (build-system python-build-system)
10607 (arguments
10608 `(#:tests? #f ; Tests require many optional packages
10609 #:phases
10610 (modify-phases %standard-phases
10611 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10612 (lambda* (#:key inputs #:allow-other-keys)
10613 (setenv "KIVY_SDL2_PATH"
10614 (string-append (assoc-ref inputs "sdl-union")
10615 "/include/SDL2"))
10616 #t)))))
10617 (native-inputs
10618 `(("git" ,git)
10619 ("pkg-config" ,pkg-config)
10620 ("python-cython" ,python-cython)))
10621 (inputs
10622 `(("gstreamer" ,gstreamer)
10623 ("mesa" ,mesa)
10624 ("sdl-union"
10625 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10626 (home-page "http://kivy.org")
10627 (synopsis
10628 "Multitouch application framework")
10629 (description
10630 "A software library for rapid development of
10631 hardware-accelerated multitouch applications.")
10632 (license license:expat)))
10633
10634 (define-public python2-kivy
10635 (package-with-python2 python-kivy))
10636
10637 (define-public python-kivy-next
10638 (deprecated-package "python-kivy-next" python-kivy))
10639
10640 (define-public python2-kivy-next
10641 (deprecated-package "python2-kivy-next" python2-kivy))
10642
10643 (define-public python-binaryornot
10644 (package
10645 (name "python-binaryornot")
10646 (version "0.4.4")
10647 (source (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "binaryornot" version))
10650 (sha256
10651 (base32
10652 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10653 (build-system python-build-system)
10654 (propagated-inputs
10655 `(("python-chardet" ,python-chardet)
10656 ("python-hypothesis" ,python-hypothesis)))
10657 (home-page "https://github.com/audreyr/binaryornot")
10658 (synopsis "Package to check if a file is binary or text")
10659 (description "Ultra-lightweight pure Python package to check if a file is
10660 binary or text.")
10661 (license license:bsd-3)
10662 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10663
10664 (define-public python2-binaryornot
10665 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10666 (package (inherit base)
10667 (propagated-inputs
10668 `(("python2-enum34" ,python2-enum34)
10669 ,@(package-propagated-inputs base))))))
10670
10671 (define-public python-nltk
10672 (package
10673 (name "python-nltk")
10674 (version "3.2.1")
10675 (source (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "nltk" version))
10678 (sha256
10679 (base32
10680 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10681 (build-system python-build-system)
10682 (arguments
10683 '(;; The tests require some extra resources to be downloaded.
10684 ;; TODO Try packaging these resources.
10685 #:tests? #f))
10686 (home-page "http://nltk.org/")
10687 (synopsis "Natural Language Toolkit")
10688 (description "It provides interfaces to over 50 corpora and lexical
10689 resources such as WordNet, along with a suite of text processing libraries
10690 for classification, tokenization, stemming, tagging, parsing, and semantic
10691 reasoning, wrappers for natural language processing libraries.")
10692 (license license:asl2.0)))
10693
10694 (define-public python2-nltk
10695 (package-with-python2 python-nltk))
10696
10697 (define-public python-pymongo
10698 (package
10699 (name "python-pymongo")
10700 (version "3.7.2")
10701 (source (origin
10702 (method url-fetch)
10703 (uri (pypi-uri "pymongo" version))
10704 (sha256
10705 (base32
10706 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10707 (build-system python-build-system)
10708 (propagated-inputs
10709 `(("python-certifi" ,python-certifi)))
10710 (home-page "https://github.com/mongodb/mongo-python-driver")
10711 (synopsis "Python driver for MongoDB")
10712 (description "Python driver for MongoDB.")
10713 (license license:asl2.0)))
10714
10715 (define-public python2-pymongo
10716 (package-with-python2 python-pymongo))
10717
10718 (define-public python-consul
10719 (package
10720 (name "python-consul")
10721 (version "0.6.1")
10722 (source
10723 (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "python-consul" version))
10726 (sha256
10727 (base32
10728 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10729 (build-system python-build-system)
10730 (arguments
10731 '(#:tests? #f)) ; The tests are not distributed
10732 (propagated-inputs
10733 `(("python-requests" ,python-requests)
10734 ("python-six" ,python-six)))
10735 (home-page "https://github.com/cablehead/python-consul")
10736 (synopsis "Python client for Consul")
10737 (description
10738 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10739 discovery, monitoring and configuration.")
10740 (license license:expat)))
10741
10742 (define-public python2-consul
10743 (package-with-python2 python-consul))
10744
10745 (define-public python-schematics
10746 (package
10747 (name "python-schematics")
10748 (version "1.1.1")
10749 (source
10750 (origin
10751 (method git-fetch)
10752 (uri (git-reference
10753 (url "https://github.com/schematics/schematics.git")
10754 (commit (string-append "v" version))))
10755 (file-name (git-file-name name version))
10756 (sha256
10757 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10758 (build-system python-build-system)
10759 (propagated-inputs
10760 `(("python-six" ,python-six)))
10761 (arguments
10762 ;; The tests require a bunch of not very nice packages with fixed
10763 ;; version requirements (e.g. python-coveralls).
10764 `(#:tests? #f))
10765 (home-page "https://github.com/schematics/schematics")
10766 (synopsis "Python Data Structures for Humans")
10767 (description "Python Data Structures for Humans.")
10768 (license license:bsd-3)))
10769
10770 (define-public python2-schematics
10771 (package-with-python2 python-schematics))
10772
10773 (define-public python-odfpy
10774 (package
10775 (name "python-odfpy")
10776 (version "1.3.3")
10777 (source (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "odfpy" version))
10780 (sha256
10781 (base32
10782 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10783 (arguments
10784 `(#:modules ((srfi srfi-1)
10785 (guix build python-build-system)
10786 (guix build utils))
10787 #:phases
10788 (modify-phases %standard-phases
10789 (replace 'check
10790 ;; The test runner invokes python2 and python3 for test*.py.
10791 ;; To avoid having both in inputs, we replicate it here.
10792 (lambda _
10793 (for-each (lambda (test-file) (invoke "python" test-file))
10794 (find-files "tests" "^test.*\\.py$"))
10795 #t)))))
10796 (build-system python-build-system)
10797 (home-page "https://github.com/eea/odfpy")
10798 (synopsis "Python API and tools to manipulate OpenDocument files")
10799 (description "Collection of libraries and utility programs written in
10800 Python to manipulate OpenDocument 1.2 files.")
10801 (license
10802 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10803 ;; number of files with other licenses.
10804 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10805
10806 (define-public python2-odfpy
10807 (package-with-python2 python-odfpy))
10808
10809 (define-public python-natsort
10810 (package
10811 (name "python-natsort")
10812 (version "5.4.1")
10813 (source (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "natsort" version))
10816 (sha256
10817 (base32
10818 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10819 (build-system python-build-system)
10820 (arguments
10821 `(#:modules ((guix build utils)
10822 (guix build python-build-system)
10823 (srfi srfi-1)
10824 (srfi srfi-26)
10825 (ice-9 ftw))
10826 #:phases
10827 (modify-phases %standard-phases
10828 (add-before 'check 'set-cachedir
10829 ;; Tests require write access to $HOME by default
10830 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10831 (replace 'check
10832 (lambda _
10833 (let ((cwd (getcwd)))
10834 (setenv "PYTHONPATH"
10835 (string-append
10836 cwd "/build/"
10837 (find (cut string-prefix? "lib" <>)
10838 (scandir (string-append cwd "/build")))
10839 ":"
10840 (getenv "PYTHONPATH")))
10841 (invoke "pytest" "-v")))))))
10842 (native-inputs
10843 `(("python-hypothesis" ,python-hypothesis)
10844 ("python-pytest-cov" ,python-pytest-cov)
10845 ("python-pytest-mock" ,python-pytest-mock)
10846 ("python-pytest" ,python-pytest)))
10847 (propagated-inputs ; TODO: Add python-fastnumbers.
10848 `(("python-pyicu" ,python-pyicu)))
10849 (home-page "https://github.com/SethMMorton/natsort")
10850 (synopsis "Natural sorting for python and shell")
10851 (description
10852 "Natsort lets you apply natural sorting on lists instead of
10853 lexicographical. If you use the built-in @code{sorted} method in python
10854 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10855 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10856 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10857 identifies numbers and sorts them separately from strings. It can also sort
10858 version numbers, real numbers, mixed types and more, and comes with a shell
10859 command @command{natsort} that exposes this functionality in the command line.")
10860 (license license:expat)
10861 (properties `((python2-variant . ,(delay python2-natsort))))))
10862
10863 (define-public python2-natsort
10864 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10865 (package (inherit base)
10866 (native-inputs
10867 `(("python2-pathlib" ,python2-pathlib)
10868 ,@(package-native-inputs base))))))
10869
10870 (define-public python-glances
10871 (package
10872 (name "python-glances")
10873 (version "3.0.2")
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "Glances" version))
10878 (sha256
10879 (base32
10880 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10881 (build-system python-build-system)
10882 (propagated-inputs
10883 `(("python-psutil" ,python-psutil)))
10884 (home-page
10885 "https://github.com/nicolargo/glances")
10886 (synopsis
10887 "A cross-platform curses-based monitoring tool")
10888 (description
10889 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10890 Glances uses the PsUtil library to get information from your system. It monitors
10891 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10892 (license license:lgpl3+)))
10893
10894 (define-public python2-glances
10895 (package-with-python2 python-glances))
10896
10897 (define-public python-graphql-core
10898 (package
10899 (name "python-graphql-core")
10900 (version "0.5.3")
10901 (source
10902 (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "graphql-core" version))
10905 (sha256
10906 (base32
10907 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10908 (build-system python-build-system)
10909 (arguments
10910 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10911 #:phases
10912 (modify-phases %standard-phases
10913 (add-after 'unpack 'patch-hardcoded-version
10914 (lambda _ (substitute*
10915 "setup.py"
10916 (("'gevent==1.1rc1'") "'gevent'"))
10917 #t)))))
10918 (native-inputs
10919 `(("python-gevent" ,python-gevent)
10920 ("python-mock" ,python-mock)
10921 ("python-pytest-mock" ,python-pytest-mock)))
10922 (propagated-inputs
10923 `(("python-promise" ,python-promise)
10924 ("python-six" ,python-six)))
10925 (home-page "https://github.com/graphql-python/graphql-core")
10926 (synopsis "GraphQL implementation for Python")
10927 (description
10928 "GraphQL implementation for Python. GraphQL is a data query language and
10929 runtime designed and used to request and deliver data to mobile and web apps.
10930 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10931 to Python.")
10932 (license license:expat)))
10933
10934 (define-public python2-graphql-core
10935 (package-with-python2 python-graphql-core))
10936
10937 (define-public python-graphql-relay
10938 (package
10939 (name "python-graphql-relay")
10940 (version "0.4.5")
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "graphql-relay" version))
10945 (sha256
10946 (base32
10947 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10948 (build-system python-build-system)
10949 (arguments
10950 '(#:tests? #f)) ; The tests are not distributed
10951 (propagated-inputs
10952 `(("python-graphql-core" ,python-graphql-core)
10953 ("python-promise" ,python-promise)
10954 ("python-six" ,python-six)))
10955 (home-page "https://github.com/graphql-python/graphql-relay-py")
10956 (synopsis "Relay implementation for Python")
10957 (description
10958 "This is a library to allow the easy creation of Relay-compliant servers
10959 using the GraphQL Python reference implementation of a GraphQL server. It
10960 should be noted that the code is a exact port of the original
10961 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10962 from Facebook.")
10963 (license license:expat)))
10964
10965 (define-public python2-graphql-relay
10966 (package-with-python2 python-graphql-relay))
10967
10968 (define-public python-graphene
10969 (package
10970 (name "python-graphene")
10971 (version "0.10.2")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "graphene" version))
10976 (sha256
10977 (base32
10978 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10979 (build-system python-build-system)
10980 (propagated-inputs
10981 `(("python-graphql-core" ,python-graphql-core)
10982 ("python-graphql-relay" ,python-graphql-relay)
10983 ("python-iso8601" ,python-iso8601)
10984 ("python-promise" ,python-promise)
10985 ("python-six" ,python-six)))
10986 (arguments
10987 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10988 (home-page "http://graphene-python.org/")
10989 (synopsis "GraphQL Framework for Python")
10990 (description
10991 "Graphene is a Python library for building GraphQL schemas/types.
10992 A GraphQL schema describes your data model, and provides a GraphQL server
10993 with an associated set of resolve methods that know how to fetch data.")
10994 (properties `((python2-variant . ,(delay python2-graphene))))
10995 (license license:expat)))
10996
10997 (define-public python2-graphene
10998 (let ((base (package-with-python2
10999 (strip-python2-variant python-graphene))))
11000 (package (inherit base)
11001 (native-inputs
11002 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11003 ,@(package-native-inputs base))))))
11004
11005 (define-public python-nautilus
11006 (package
11007 (name "python-nautilus")
11008 (version "0.4.9")
11009 (source
11010 (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "nautilus" version))
11013 (sha256
11014 (base32
11015 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11016 (build-system python-build-system)
11017 (arguments `(#:tests? #f)) ; fails to import test modules
11018 (propagated-inputs
11019 `(("python-bcrypt" ,python-bcrypt)
11020 ("python-click" ,python-click)
11021 ("python-consul" ,python-consul)
11022 ("python-graphene" ,python-graphene)
11023 ("python-jinja2" ,python-jinja2)
11024 ("python-peewee" ,python-peewee)
11025 ("python-pika" ,python-pika)
11026 ("python-tornado" ,python-tornado)
11027 ("python-wtforms" ,python-wtforms)))
11028 (native-inputs
11029 `(("python-nose2" ,python-nose2)))
11030 (home-page "https://github.com/AlecAivazis/nautilus")
11031 (synopsis "Library for creating microservice applications")
11032 (description
11033 "Nautilus is a framework for flux based microservices that looks to
11034 provide extendible implementations of common aspects of a cloud so that you can
11035 focus on building massively scalable web applications.")
11036 (license license:expat)))
11037
11038 (define-public python-snowballstemmer
11039 (package
11040 (name "python-snowballstemmer")
11041 (version "1.2.1")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "snowballstemmer" version))
11045 (sha256
11046 (base32
11047 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11048 (build-system python-build-system)
11049 (arguments
11050 `(;; No tests exist
11051 #:tests? #f))
11052 (home-page "https://github.com/shibukawa/snowball_py")
11053 (synopsis "Snowball stemming library collection for Python")
11054 (description "This package provides 16 word stemmer algorithms generated
11055 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11056 English stemmer.")
11057 (license license:bsd-3)))
11058
11059 (define-public python2-snowballstemmer
11060 (package-with-python2 python-snowballstemmer))
11061
11062 (define-public python-setproctitle
11063 (package
11064 (name "python-setproctitle")
11065 (version "1.1.10")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "setproctitle" version))
11070 (sha256
11071 (base32
11072 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11073 (build-system python-build-system)
11074 (arguments
11075 '(#:phases
11076 (modify-phases %standard-phases
11077 (add-before 'check 'patch-Makefile
11078 ;; Stricly this is only required for the python2 variant.
11079 ;; But adding a phase in an inherited package seems to be
11080 ;; cumbersum. So we patch even for python3.
11081 (lambda _
11082 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11083 (when nose
11084 (substitute* "Makefile"
11085 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11086 (string-append nose "/bin/nosetests "))))
11087 #t)))
11088 (replace 'check
11089 (lambda _
11090 (setenv "PYTHON" (or (which "python3") (which "python")))
11091 (setenv "PYCONFIG" (or (which "python3-config")
11092 (which "python-config")))
11093 (setenv "CC" "gcc")
11094 ;; No need to extend PYTHONPATH to find the built package, since
11095 ;; the Makefile will build anyway
11096 (invoke "make" "check"))))))
11097 (native-inputs
11098 `(("procps" ,procps))) ; required for tests
11099 (home-page
11100 "https://github.com/dvarrazzo/py-setproctitle")
11101 (synopsis
11102 "Setproctitle implementation for Python to customize the process title")
11103 (description "The library allows a process to change its title (as displayed
11104 by system tools such as ps and top).
11105
11106 Changing the title is mostly useful in multi-process systems, for
11107 example when a master process is forked: changing the children's title
11108 allows to identify the task each process is busy with. The technique
11109 is used by PostgreSQL and the OpenSSH Server for example.")
11110 (license license:bsd-3)
11111 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11112
11113 (define-public python2-setproctitle
11114 (let ((base (package-with-python2
11115 (strip-python2-variant python-setproctitle))))
11116 (package
11117 (inherit base)
11118 (native-inputs `(("python2-nose" ,python2-nose)
11119 ,@(package-native-inputs base))))))
11120
11121 (define-public python-validictory
11122 (package
11123 (name "python-validictory")
11124 (version "1.0.1")
11125 (source
11126 (origin
11127 (method url-fetch)
11128 (uri (pypi-uri "validictory" version))
11129 (sha256
11130 (base32
11131 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11132 (build-system python-build-system)
11133 (arguments
11134 '(#:phases
11135 (modify-phases %standard-phases
11136 (add-after 'unpack 'bootstrap
11137 ;; Move the tests out of the package directory to avoid
11138 ;; packaging them.
11139 (lambda* _
11140 (rename-file "validictory/tests" "tests")
11141 (delete-file "tests/__init__.py")))
11142 (replace 'check
11143 (lambda _
11144 ;; Extend PYTHONPATH so the built package will be found.
11145 (setenv "PYTHONPATH"
11146 (string-append (getcwd) "/build/lib:"
11147 (getenv "PYTHONPATH")))
11148 (invoke "py.test" "-vv" ))))))
11149 (native-inputs
11150 `(("python-pytest" ,python-pytest)))
11151 (home-page
11152 "https://github.com/jamesturk/validictory")
11153 (synopsis "General purpose Python data validator")
11154 (description "It allows validation of arbitrary Python data structures.
11155
11156 The schema format is based on the JSON Schema
11157 proposal (http://json-schema.org), so combined with json the library is also
11158 useful as a validator for JSON data.")
11159 (license license:expat)))
11160
11161 (define-public python2-validictory
11162 (package-with-python2 python-validictory))
11163
11164 (define-public python-pyelftools
11165 (package
11166 (name "python-pyelftools")
11167 (version "0.25")
11168 (source
11169 (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "pyelftools" version))
11172 (sha256
11173 (base32
11174 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11175 (build-system python-build-system)
11176 (arguments
11177 `(#:phases
11178 (modify-phases %standard-phases
11179 (add-before 'check 'set-pythonpath
11180 (lambda _
11181 (setenv "PYTHONPATH"
11182 (string-append
11183 (getcwd) "/test/"
11184 ":" (getenv "PYTHONPATH")))
11185 #t)))))
11186 (home-page
11187 "https://github.com/eliben/pyelftools")
11188 (synopsis
11189 "Analyze binary and library file information")
11190 (description "This Python library provides interfaces for parsing and
11191 analyzing two binary and library file formats; the Executable and Linking
11192 Format (ELF), and debugging information in the Debugging With Attributed
11193 Record Format (DWARF).")
11194 (license license:public-domain)))
11195
11196 (define-public python-pyev
11197 (package
11198 (name "python-pyev")
11199 (version "0.9.0")
11200 (source
11201 (origin
11202 (method url-fetch)
11203 (uri (pypi-uri "pyev" version))
11204 (sha256
11205 (base32
11206 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11207 (build-system python-build-system)
11208 (arguments
11209 `(#:tests? #f ; no test suite
11210 #:phases
11211 (modify-phases %standard-phases
11212 (add-after 'unpack 'patch
11213 (lambda* (#:key inputs #:allow-other-keys)
11214 (let ((libev (string-append (assoc-ref inputs "libev")
11215 "/lib/libev.so.4")))
11216 (substitute* "setup.py"
11217 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11218 (string-append "libev_dll_name = \"" libev "\"")))))))))
11219 (inputs
11220 `(("libev" ,libev)))
11221 (home-page "http://pythonhosted.org/pyev/")
11222 (synopsis "Python libev interface")
11223 (description "Pyev provides a Python interface to libev.")
11224 (license license:gpl3)))
11225
11226 (define-public python2-pyev
11227 (package-with-python2 python-pyev))
11228
11229 (define-public python-imagesize
11230 (package
11231 (name "python-imagesize")
11232 (version "1.1.0")
11233 (source
11234 (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "imagesize" version))
11237 (sha256
11238 (base32
11239 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11240 (build-system python-build-system)
11241 (home-page "https://github.com/shibukawa/imagesize_py")
11242 (synopsis "Gets image size of files in various formats in Python")
11243 (description
11244 "This package allows determination of image size from
11245 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11246 (license license:expat)))
11247
11248 (define-public python2-imagesize
11249 (package-with-python2 python-imagesize))
11250
11251 (define-public python-termstyle
11252 (package
11253 (name "python-termstyle")
11254 (version "0.1.11")
11255 (source
11256 (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "termstyle" version))
11259 (sha256
11260 (base32
11261 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11262 (build-system python-build-system)
11263 (arguments
11264 '(#:phases
11265 (modify-phases %standard-phases
11266 (replace 'check
11267 (lambda _
11268 (invoke "python" "test3.py"))))))
11269 (home-page "https://github.com/gfxmonk/termstyle")
11270 (synopsis "Console text coloring for Python")
11271 (description "This package provides console text coloring for Python.")
11272 (license license:bsd-3)))
11273
11274 (define-public python-argcomplete
11275 (package
11276 (name "python-argcomplete")
11277 (version "1.7.0")
11278 (source
11279 (origin
11280 (method url-fetch)
11281 (uri (pypi-uri "argcomplete" version))
11282 (sha256
11283 (base32
11284 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11285 (build-system python-build-system)
11286 (native-inputs
11287 `(("python-pexpect" ,python-pexpect)
11288 ("tcsh" ,tcsh)
11289 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11290 (home-page "https://github.com/kislyuk/argcomplete")
11291 (synopsis "Shell tab completion for Python argparse")
11292 (description "argcomplete provides extensible command line tab completion
11293 of arguments and options for Python scripts using @code{argparse}. It's
11294 particularly useful for programs with many options or sub-parsers that can
11295 dynamically suggest completions; for example, when browsing resources over the
11296 network.")
11297 (license license:asl2.0)))
11298
11299 (define-public python2-argcomplete
11300 (package-with-python2 python-argcomplete))
11301
11302 (define-public python-xopen
11303 (package
11304 (name "python-xopen")
11305 (version "0.5.0")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "xopen" version))
11310 (sha256
11311 (base32
11312 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11313 (build-system python-build-system)
11314 (propagated-inputs
11315 `(("python-setuptools-scm" ,python-setuptools-scm)))
11316 (home-page "https://github.com/marcelm/xopen/")
11317 (synopsis "Open compressed files transparently")
11318 (description "This module provides an @code{xopen} function that works like
11319 Python's built-in @code{open} function, but can also deal with compressed files.
11320 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11321 recognized by their file extensions. The focus is on being as efficient as
11322 possible on all supported Python versions.")
11323 (license license:expat)))
11324
11325 (define-public python2-xopen
11326 (let ((base (package-with-python2
11327 (strip-python2-variant python-xopen))))
11328 (package
11329 (inherit base)
11330 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11331 ,@(package-propagated-inputs base))))))
11332
11333 (define-public python-cheetah
11334 (package
11335 (name "python-cheetah")
11336 (version "3.1.0")
11337 (source
11338 (origin
11339 (method url-fetch)
11340 (uri (pypi-uri "Cheetah3" version))
11341 (sha256
11342 (base32
11343 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11344 (build-system python-build-system)
11345 (arguments
11346 `(#:modules ((guix build utils)
11347 (guix build python-build-system)
11348 (ice-9 ftw)
11349 (srfi srfi-1)
11350 (srfi srfi-26))
11351 #:phases (modify-phases %standard-phases
11352 (add-after 'unpack 'use-absolute-python
11353 (lambda _
11354 (substitute* "Cheetah/CheetahWrapper.py"
11355 (("#!/usr/bin/env python")
11356 (string-append "#!" (which "python"))))
11357 #t))
11358 (replace 'check
11359 (lambda _
11360 (let ((cwd (getcwd)))
11361 (setenv "PYTHONPATH"
11362 (string-append
11363 cwd "/build/"
11364 (find (cut string-prefix? "lib" <>)
11365 (scandir (string-append cwd "/build")))
11366 ":" (getenv "PYTHONPATH")))
11367 (setenv "PATH"
11368 (string-append (getenv "PATH")
11369 ":" cwd "/bin"))
11370 (setenv "TMPDIR" "/tmp")
11371
11372 (substitute* "Cheetah/Tests/Test.py"
11373 (("unittest.TextTestRunner\\(\\)")
11374 "unittest.TextTestRunner(verbosity=2)"))
11375
11376 (invoke "python" "Cheetah/Tests/Test.py")))))))
11377 (propagated-inputs
11378 `(("python-markdown" ,python-markdown))) ;optional
11379 (home-page "http://cheetahtemplate.org/")
11380 (synopsis "Template engine")
11381 (description "Cheetah is a text-based template engine and Python code
11382 generator.
11383
11384 Cheetah can be used as a standalone templating utility or referenced as
11385 a library from other Python applications. It has many potential uses,
11386 but web developers looking for a viable alternative to ASP, JSP, PHP and
11387 PSP are expected to be its principle user group.
11388
11389 Features:
11390 @enumerate
11391 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11392 text-based format.
11393 @item Cleanly separates content, graphic design, and program code.
11394 @item Blends the power and flexibility of Python with a simple template language
11395 that non-programmers can understand.
11396 @item Gives template writers full access to any Python data structure, module,
11397 function, object, or method in their templates.
11398 @item Makes code reuse easy by providing an object-orientated interface to
11399 templates that is accessible from Python code or other Cheetah templates.
11400 One template can subclass another and selectively reimplement sections of it.
11401 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11402 improve the performance of a dynamic website.
11403 @item Compiles templates into optimized, yet readable, Python code.
11404 @end enumerate")
11405 (license (license:x11-style "file://LICENSE"))))
11406
11407 (define-public python2-cheetah
11408 (package-with-python2 python-cheetah))
11409
11410 (define-public python-dulwich
11411 (package
11412 (name "python-dulwich")
11413 (version "0.18.6")
11414 (source
11415 (origin
11416 (method url-fetch)
11417 (uri (list (string-append "https://www.dulwich.io/releases/"
11418 "dulwich-" version ".tar.gz")
11419 (pypi-uri "dulwich" version)))
11420 (sha256
11421 (base32
11422 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11423 (build-system python-build-system)
11424 (arguments
11425 `(#:phases
11426 (modify-phases %standard-phases
11427 (add-before 'check 'fix-tests
11428 (lambda* (#:key inputs #:allow-other-keys)
11429 ;; The tests use Popen with a custom environment which doesn't
11430 ;; include PATH.
11431 (substitute* "dulwich/tests/compat/utils.py"
11432 (("'git'") (string-append "'"
11433 (which "git")
11434 "'")))
11435 (substitute* '("dulwich/tests/test_repository.py"
11436 "dulwich/tests/test_hooks.py")
11437 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11438 (setenv "TEST_RUNNER" "unittest")
11439 (setenv "PYTHONHASHSEED" "random")
11440 #t)))))
11441 (propagated-inputs
11442 `(("python-fastimport" ,python-fastimport)))
11443 (native-inputs
11444 `(("python-mock" ,python-mock)
11445 ("python-geventhttpclient" ,python-geventhttpclient)
11446 ("git" ,git)))
11447 (home-page "https://www.dulwich.io/")
11448 (synopsis "Git implementation in Python")
11449 (description "Dulwich is an implementation of the Git file formats and
11450 protocols written in pure Python.")
11451 ;; Can be used with either license.
11452 (license (list license:asl2.0 license:gpl2+))))
11453
11454 (define-public python2-dulwich
11455 (package-with-python2 python-dulwich))
11456
11457 (define-public python-pbkdf2
11458 (package
11459 (name "python-pbkdf2")
11460 (version "1.3")
11461 (source
11462 (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "pbkdf2" version))
11465 (sha256
11466 (base32
11467 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11468 (build-system python-build-system)
11469 (arguments
11470 '(#:phases
11471 (modify-phases %standard-phases
11472 (replace 'check
11473 (lambda _
11474 (setenv "PYTHONPATH"
11475 (string-append (getcwd) "/build/lib:"
11476 (getenv "PYTHONPATH")))
11477 (invoke "python" "test/test_pbkdf2.py"))))))
11478 (propagated-inputs
11479 `(("python-pycrypto" ,python-pycrypto))) ; optional
11480 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11481 (synopsis "Password-based key derivation")
11482 (description "This module implements the password-based key derivation
11483 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11484
11485 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11486 is part of the RSA Public Key Cryptography Standards series. The provided
11487 implementation takes a password or a passphrase and a salt value (and
11488 optionally a iteration count, a digest module, and a MAC module) and provides
11489 a file-like object from which an arbitrarly-sized key can be read.")
11490 (license license:expat)))
11491
11492 (define-public python2-pbkdf2
11493 (package-with-python2 python-pbkdf2))
11494
11495 (define-public python-qrcode
11496 (package
11497 (name "python-qrcode")
11498 (version "6.1")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "qrcode" version))
11503 (sha256
11504 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11505 (build-system python-build-system)
11506 (arguments
11507 ;; FIXME: Tests require packaging 'pymaging'.
11508 '(#:tests? #f))
11509 (propagated-inputs
11510 `(("python-lxml" ,python-lxml) ; for SVG output
11511 ("python-pillow" ,python-pillow) ; for PNG output
11512 ("python-six" ,python-six)))
11513 (home-page "https://github.com/lincolnloop/python-qrcode")
11514 (synopsis "QR Code image generator")
11515 (description "This package provides a pure Python QR Code generator
11516 module. It uses the Python Imaging Library (PIL) to allow for the generation
11517 of QR Codes.
11518
11519 In addition this package provides a command line tool to generate QR codes and
11520 either write these QR codes to a file or do the output as ascii art at the
11521 console.")
11522 (license license:bsd-3)))
11523
11524 (define-public python2-qrcode
11525 (package-with-python2 python-qrcode))
11526
11527 (define-public python-rst2ansi
11528 (package
11529 (name "python-rst2ansi")
11530 (version "0.1.5")
11531 (source
11532 (origin
11533 (method url-fetch)
11534 (uri (pypi-uri "rst2ansi" version))
11535 (sha256
11536 (base32
11537 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11538 (build-system python-build-system)
11539 (propagated-inputs
11540 `(("python-docutils" ,python-docutils)))
11541 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11542 (synopsis "Convert RST to ANSI-decorated console output")
11543 (description
11544 "Python module dedicated to rendering RST (reStructuredText) documents
11545 to ansi-escaped strings suitable for display in a terminal.")
11546 (license license:expat)))
11547
11548 (define-public python-ansi2html
11549 (package
11550 (name "python-ansi2html")
11551 (version "1.2.0")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "ansi2html" version))
11556 (sha256
11557 (base32
11558 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11559 (build-system python-build-system)
11560 (native-inputs
11561 `(("python-mock" ,python-mock)
11562 ("python-nose" ,python-nose)))
11563 (propagated-inputs
11564 `(("python-six" ,python-six)))
11565 (home-page "https://github.com/ralphbean/ansi2html")
11566 (synopsis "Convert ANSI-decorated console output to HTML")
11567 (description
11568 "@command{ansi2html} is a Python library and command line utility for
11569 convering text with ANSI color codes to HTML or LaTeX.")
11570 (license license:gpl3+)))
11571
11572 (define-public python2-ansi2html
11573 (package-with-python2 python-ansi2html))
11574
11575 (define-public python-ddt
11576 (package
11577 (name "python-ddt")
11578 (version "1.1.3")
11579 (source
11580 (origin
11581 (method url-fetch)
11582 (uri (pypi-uri "ddt" version))
11583 (sha256
11584 (base32
11585 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11586 (build-system python-build-system)
11587 (native-inputs
11588 `(("python-mock" ,python-mock)
11589 ("python-nose" ,python-nose)))
11590 (propagated-inputs
11591 `(("python-six" ,python-six)
11592 ("python-pyyaml" ,python-pyyaml)))
11593 (home-page "https://github.com/txels/ddt")
11594 (synopsis "Data-Driven Tests")
11595 (description
11596 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11597 running it with different test data, and make it appear as multiple test
11598 cases.")
11599 (license license:expat)))
11600
11601 (define-public python2-ddt
11602 (package-with-python2 python-ddt))
11603
11604 (define-public python-pycountry
11605 (package
11606 (name "python-pycountry")
11607 (version "18.5.26")
11608 (source
11609 (origin
11610 (method url-fetch)
11611 (uri (pypi-uri "pycountry" version))
11612 (sha256
11613 (base32
11614 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11615 (build-system python-build-system)
11616 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11617 (synopsis "ISO databases for languages, countries, currencies, etc.")
11618 (description
11619 "@code{pycountry} provides the ISO databases for the standards:
11620 @enumerate
11621 @item 639-3 (Languages)
11622 @item 3166 (Countries)
11623 @item 3166-3 (Deleted Countries)
11624 @item 3166-2 (Subdivisions of countries)
11625 @item 4217 (Currencies)
11626 @item 15924 (Scripts)
11627 @end enumerate
11628 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11629 through a Python API.")
11630 (license license:lgpl2.1+)))
11631
11632 (define-public python2-pycountry
11633 (package-with-python2 python-pycountry))
11634
11635 (define-public python-pycosat
11636 (package
11637 (name "python-pycosat")
11638 (version "0.6.1")
11639 (source
11640 (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "pycosat" version))
11643 (sha256
11644 (base32
11645 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11646 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11647 (build-system python-build-system)
11648 (home-page "https://github.com/ContinuumIO/pycosat")
11649 (synopsis "Bindings to picosat (a SAT solver)")
11650 (description
11651 "This package provides efficient Python bindings to @code{picosat} on
11652 the C level. When importing pycosat, the @code{picosat} solver becomes part
11653 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11654 Problem} (SAT) solver.")
11655 (license license:expat)))
11656
11657 (define-public python2-pycosat
11658 (package-with-python2 python-pycosat))
11659
11660 (define-public python2-ruamel.ordereddict
11661 (package
11662 (name "python2-ruamel.ordereddict")
11663 (version "0.4.9")
11664 (source
11665 (origin
11666 (method url-fetch)
11667 (uri (pypi-uri "ruamel.ordereddict" version))
11668 (sha256
11669 (base32
11670 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11671 (build-system python-build-system)
11672 (arguments
11673 `(#:python ,python-2
11674 #:phases
11675 (modify-phases %standard-phases
11676 (delete 'check)
11677 (add-after 'install 'check
11678 (lambda* (#:key inputs outputs #:allow-other-keys)
11679 (add-installed-pythonpath inputs outputs)
11680 (invoke "python" "test/testordereddict.py"))))))
11681 (home-page "https://bitbucket.org/ruamel/ordereddict")
11682 (synopsis "Version of dict that keeps keys in insertion order")
11683 (description
11684 "This is an implementation of an ordered dictionary with @dfn{Key
11685 Insertion Order} (KIO: updates of values do not affect the position of the
11686 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11687 removed and put at the back). The standard library module @code{OrderedDict},
11688 implemented later, implements a subset of @code{ordereddict} functionality.
11689 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11690 Order} (KSO, no sorting function can be specified, but a transform can be
11691 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11692 (license license:expat)))
11693
11694 (define-public python-pypeg2
11695 (package
11696 (name "python-pypeg2")
11697 (version "2.15.2")
11698 (source
11699 (origin
11700 (method url-fetch)
11701 (uri (pypi-uri "pyPEG2" version))
11702 (sha256
11703 (base32
11704 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11705 (build-system python-build-system)
11706 (propagated-inputs `(("python-lxml" ,python-lxml)))
11707 (arguments
11708 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11709 '(#:tests? #f))
11710 (home-page "https://fdik.org/pyPEG/")
11711 (synopsis "Parsering Expression Grammars in Python")
11712 (description "PyPEG is an intrinsic parser interpreter framework for
11713 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11714 parse many formal languages.")
11715 (license license:gpl2)))
11716
11717 (define-public python-incremental
11718 (package
11719 (name "python-incremental")
11720 (version "17.5.0")
11721 (source
11722 (origin
11723 (method url-fetch)
11724 (uri (pypi-uri "incremental" version))
11725 (sha256
11726 (base32
11727 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11728 (build-system python-build-system)
11729 (home-page "https://github.com/hawkowl/incremental")
11730 (synopsis "Library for versioning Python projects")
11731 (description "Incremental is a small library that versions your Python
11732 projects.")
11733 (license license:expat)))
11734
11735 (define-public python2-incremental
11736 (package-with-python2 python-incremental))
11737
11738 (define-public python-invoke
11739 (package
11740 (name "python-invoke")
11741 (home-page "http://www.pyinvoke.org/")
11742 (version "1.1.0")
11743 (source (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "invoke" version))
11746 (sha256
11747 (base32
11748 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11749 (build-system python-build-system)
11750 (arguments
11751 ;; XXX: Requires many dependencies that are not yet in Guix.
11752 `(#:tests? #f))
11753 (synopsis "Pythonic task execution")
11754 (description
11755 "Invoke is a Python task execution tool and library, drawing inspiration
11756 from various sources to arrive at a powerful and clean feature set. It is
11757 evolved from the Fabric project, but focuses on local and abstract concerns
11758 instead of servers and network commands.")
11759 (license license:bsd-3)))
11760
11761 (define-public python2-invoke
11762 (package-with-python2 python-invoke))
11763
11764 (define-public python-automat
11765 (package
11766 (name "python-automat")
11767 (version "0.7.0")
11768 (source (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "Automat" version))
11771 (sha256
11772 (base32
11773 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11774 (build-system python-build-system)
11775 ;; We disable the tests because they require python-twisted, while
11776 ;; python-twisted depends on python-automat. Twisted is optional, but the
11777 ;; tests fail if it is not available. Also see
11778 ;; <https://github.com/glyph/automat/issues/71>.
11779 (arguments '(#:tests? #f))
11780 (native-inputs
11781 `(("python-m2r" ,python-m2r)
11782 ("python-setuptools-scm" ,python-setuptools-scm)
11783 ("python-graphviz" ,python-graphviz)))
11784 (propagated-inputs
11785 `(("python-six" ,python-six)
11786 ("python-attrs" ,python-attrs)))
11787 (home-page "https://github.com/glyph/Automat")
11788 (synopsis "Self-service finite-state machines")
11789 (description "Automat is a library for concise, idiomatic Python
11790 expression of finite-state automata (particularly deterministic finite-state
11791 transducers).")
11792 (license license:expat)))
11793
11794 (define-public python2-automat
11795 (package-with-python2 python-automat))
11796
11797 (define-public python-m2r
11798 (package
11799 (name "python-m2r")
11800 (version "0.2.1")
11801 (source (origin
11802 (method url-fetch)
11803 (uri (pypi-uri "m2r" version))
11804 (sha256
11805 (base32
11806 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11807 (build-system python-build-system)
11808 (propagated-inputs
11809 `(("python-docutils" ,python-docutils)
11810 ("python-mistune" ,python-mistune)))
11811 (native-inputs
11812 `(("python-pygments" ,python-pygments)
11813 ("python-mock" ,python-mock)))
11814 (home-page "https://github.com/miyakogi/m2r")
11815 (synopsis "Markdown to reStructuredText converter")
11816 (description "M2R converts a markdown file including reST markups to valid
11817 reST format.")
11818 (license license:expat)))
11819
11820 (define-public python2-m2r
11821 (package-with-python2 python-m2r))
11822
11823 (define-public python-constantly
11824 (package
11825 (name "python-constantly")
11826 (version "15.1.0")
11827 (source (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "constantly" version))
11830 (sha256
11831 (base32
11832 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11833 (build-system python-build-system)
11834 (home-page "https://github.com/twisted/constantly")
11835 (synopsis "Symbolic constants in Python")
11836 (description "Constantly is a Python library that provides symbolic
11837 constant support. It includes collections and constants with text, numeric,
11838 and bit flag values.")
11839 (license license:expat)))
11840
11841 (define-public python2-constantly
11842 (package-with-python2 python-constantly))
11843
11844 (define-public python-attrs
11845 (package
11846 (name "python-attrs")
11847 (version "19.1.0")
11848 (source (origin
11849 (method url-fetch)
11850 (uri (pypi-uri "attrs" version))
11851 (sha256
11852 (base32
11853 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11854 (build-system python-build-system)
11855 (arguments
11856 `(#:modules ((guix build utils)
11857 (guix build python-build-system)
11858 (ice-9 ftw)
11859 (srfi srfi-1)
11860 (srfi srfi-26))
11861 #:phases (modify-phases %standard-phases
11862 (replace 'check
11863 (lambda _
11864 (let ((cwd (getcwd)))
11865 (setenv "PYTHONPATH"
11866 (string-append
11867 cwd "/build/"
11868 (find (cut string-prefix? "lib" <>)
11869 (scandir (string-append cwd "/build")))
11870 ":"
11871 (getenv "PYTHONPATH")))
11872 (invoke "python" "-m" "pytest")))))))
11873 (native-inputs
11874 `(("python-coverage" ,python-coverage)
11875 ("python-hypothesis" ,python-hypothesis)
11876 ("python-pympler" ,python-pympler)
11877 ("python-pytest" ,python-pytest)
11878 ("python-six" ,python-six)
11879 ("python-sphinx" ,python-sphinx)
11880 ("python-zope-interface" ,python-zope-interface)))
11881 (home-page "https://github.com/python-attrs/attrs/")
11882 (synopsis "Attributes without boilerplate")
11883 (description "@code{attrs} is a Python package with class decorators that
11884 ease the chores of implementing the most common attribute-related object
11885 protocols.")
11886 (license license:expat)))
11887
11888 (define-public python2-attrs
11889 (package-with-python2 python-attrs))
11890
11891 (define-public python-attrs-bootstrap
11892 (package
11893 (inherit python-attrs)
11894 (name "python-attrs-bootstrap")
11895 (native-inputs `())
11896 (arguments `(#:tests? #f))))
11897
11898 (define-public python2-attrs-bootstrap
11899 (package-with-python2 python-attrs-bootstrap))
11900
11901 (define-public python2-cliapp
11902 (package
11903 (name "python2-cliapp")
11904 (version "1.20180812.1")
11905 (source
11906 (origin
11907 (method url-fetch)
11908 (uri (string-append
11909 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11910 version ".tar.gz"))
11911 (sha256
11912 (base32
11913 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11914 (build-system python-build-system)
11915 (arguments
11916 `(#:python ,python-2
11917 #:phases
11918 (modify-phases %standard-phases
11919 ;; check phase needs to be run before the build phase. If not,
11920 ;; coverage-test-runner looks for tests for the built source files,
11921 ;; and fails.
11922 (delete 'check)
11923 (add-before 'build 'check
11924 (lambda _
11925 ;; Disable python3 tests
11926 (substitute* "check"
11927 (("python3") "# python3"))
11928 (invoke "./check"))))))
11929 (native-inputs
11930 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11931 ("python2-pep8" ,python2-pep8)))
11932 (propagated-inputs
11933 `(("python2-pyaml" ,python2-pyaml)))
11934 (home-page "https://liw.fi/cliapp/")
11935 (synopsis "Python framework for command line programs")
11936 (description "@code{python2-cliapp} is a python framework for
11937 command line programs. It contains the typical stuff such programs
11938 need to do, such as parsing the command line for options, and
11939 iterating over input files.")
11940 (license license:gpl2+)))
11941
11942 (define-public python2-ttystatus
11943 (package
11944 (name "python2-ttystatus")
11945 (version "0.36")
11946 (source
11947 (origin
11948 (method url-fetch)
11949 (uri (string-append
11950 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11951 version ".tar.gz"))
11952 (sha256
11953 (base32
11954 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11955 (build-system python-build-system)
11956 (native-inputs
11957 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11958 ("python2-pep8" ,python2-pep8)))
11959 (arguments
11960 `(#:python ,python-2
11961 #:phases
11962 (modify-phases %standard-phases
11963 ;; check phase needs to be run before the build phase. If not,
11964 ;; coverage-test-runner looks for tests for the built source files,
11965 ;; and fails.
11966 (delete 'check)
11967 (add-before 'build 'check
11968 (lambda _ (invoke "make" "check"))))))
11969 (home-page "https://liw.fi/ttystatus/")
11970 (synopsis "Python library for showing progress reporting and
11971 status updates on terminals")
11972 (description "@code{python2-ttystatus} is a python library for
11973 showing progress reporting and status updates on terminals, for
11974 command line programs. Output is automatically adapted to the width
11975 of the terminal: truncated if it does not fit, and resized if the
11976 terminal size changes.")
11977 (license license:gpl3+)))
11978
11979 (define-public python2-tracing
11980 (package
11981 (name "python2-tracing")
11982 (version "0.10")
11983 (source
11984 (origin
11985 (method url-fetch)
11986 (uri (string-append
11987 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11988 version ".tar.gz"))
11989 (sha256
11990 (base32
11991 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11992 (build-system python-build-system)
11993 (arguments
11994 `(#:python ,python-2))
11995 (home-page "https://liw.fi/tracing/")
11996 (synopsis "Python debug logging helper")
11997 (description "@code{python2-tracing} is a python library for
11998 logging debug messages. It provides a way to turn debugging messages
11999 on and off, based on the filename they occur in. It is much faster
12000 than using @code{logging.Filter} to accomplish the same thing, which
12001 matters when code is run in production mode. The actual logging still
12002 happens using the @code{logging} library.")
12003 (license license:gpl3+)))
12004
12005 (define-public python2-larch
12006 (package
12007 (name "python2-larch")
12008 (version "1.20151025")
12009 (source
12010 (origin
12011 (method url-fetch)
12012 (uri (string-append
12013 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12014 version ".tar.gz"))
12015 (patches (search-patches
12016 "python2-larch-coverage-4.0a6-compatibility.patch"))
12017 (sha256
12018 (base32
12019 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12020 (build-system python-build-system)
12021 (arguments
12022 `(#:python ,python-2
12023 #:phases
12024 (modify-phases %standard-phases
12025 ;; check phase needs to be run before the build phase. If not,
12026 ;; coverage-test-runner looks for tests for the built source files,
12027 ;; and fails.
12028 (delete 'check)
12029 (add-before 'build 'check
12030 (lambda _ (invoke "make" "check"))))))
12031 (native-inputs
12032 `(("cmdtest" ,cmdtest)
12033 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12034 (propagated-inputs
12035 `(("python2-tracing" ,python2-tracing)))
12036 (home-page "https://liw.fi/larch/")
12037 (synopsis "Python copy-on-write B-tree library")
12038 (description "@code{python2-larch} is an implementation of
12039 particular kind of B-tree, based on research by Ohad Rodeh. See
12040 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12041 on the data structure.
12042
12043 The distinctive feature of this B-tree is that a node is never
12044 (conceptually) modified. Instead, all updates are done by
12045 copy-on-write. This makes it easy to clone a tree, and modify only the
12046 clone, while other processes access the original tree.")
12047 (license license:gpl3+)))
12048
12049 (define-public python-astroid
12050 (package
12051 (name "python-astroid")
12052 (version "2.1.0")
12053 (source
12054 (origin
12055 (method url-fetch)
12056 (uri (pypi-uri "astroid" version))
12057 (sha256
12058 (base32
12059 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12060 (build-system python-build-system)
12061 (propagated-inputs
12062 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12063 ("python-six" ,python-six)
12064 ("python-wrapt" ,python-wrapt)))
12065 (native-inputs
12066 `(("python-dateutil" ,python-dateutil)
12067 ("python-nose" ,python-nose)
12068 ("python-pytest" ,python-pytest)
12069 ("python-pytest-runner" ,python-pytest-runner)))
12070 (arguments
12071 `(#:phases
12072 (modify-phases %standard-phases
12073 (add-after 'unpack 'remove-spurious-test
12074 (lambda _
12075 ;; This can be removed after upgrading from python-3.7
12076 ;; https://github.com/PyCQA/astroid/issues/593
12077 ;; https://bugs.python.org/issue34056
12078 (delete-file "astroid/tests/unittest_modutils.py")
12079 #t))
12080 (replace 'check
12081 (lambda _
12082 (invoke "pytest" "astroid"))))))
12083 (home-page "https://github.com/PyCQA/astroid")
12084 (synopsis "Common base representation of python source code for pylint and
12085 other projects")
12086 (description "@code{python-astroid} provides a common base representation
12087 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12088
12089 It provides a compatible representation which comes from the _ast module. It
12090 rebuilds the tree generated by the builtin _ast module by recursively walking
12091 down the AST and building an extended ast. The new node classes have
12092 additional methods and attributes for different usages. They include some
12093 support for static inference and local name scopes. Furthermore, astroid
12094 builds partial trees by inspecting living objects.")
12095 (license license:lgpl2.1+)
12096 (properties `((python2-variant . ,(delay python2-astroid))))))
12097
12098 (define-public python2-astroid
12099 (let ((base (package-with-python2
12100 (strip-python2-variant python-astroid))))
12101 (package (inherit base)
12102 ;; Version 2.x removes python2 support.
12103 (version "1.6.5")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (pypi-uri "astroid" version))
12108 (sha256
12109 (base32
12110 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12111 (arguments
12112 (substitute-keyword-arguments (package-arguments base)
12113 ((#:phases phases)
12114 `(modify-phases ,phases
12115 (add-after 'unpack 'remove-spurious-test
12116 (lambda _
12117 ;; https://github.com/PyCQA/astroid/issues/276
12118 (delete-file "astroid/tests/unittest_brain.py")
12119 #t))
12120 (replace 'check
12121 (lambda _
12122 (invoke"python" "-m" "unittest" "discover"
12123 "-p" "unittest*.py")))))))
12124 (native-inputs `())
12125 (propagated-inputs
12126 `(("python2-backports-functools-lru-cache"
12127 ,python2-backports-functools-lru-cache)
12128 ("python2-enum34" ,python2-enum34)
12129 ("python2-singledispatch" ,python2-singledispatch)
12130 ,@(package-propagated-inputs base))))))
12131
12132 (define-public python-isort
12133 (package
12134 (name "python-isort")
12135 (version "4.3.4")
12136 (source
12137 (origin
12138 (method git-fetch)
12139 (uri (git-reference
12140 ;; Tests pass only from the Github sources
12141 (url "https://github.com/timothycrosley/isort")
12142 (commit version)))
12143 (file-name (git-file-name name version))
12144 (sha256
12145 (base32
12146 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12147 (build-system python-build-system)
12148 (native-inputs
12149 `(("python-mock" ,python-mock)
12150 ("python-pytest" ,python-pytest)))
12151 (home-page "https://github.com/timothycrosley/isort")
12152 (synopsis "Python utility/library to sort python imports")
12153 (description "@code{python-isort} is a python utility/library to sort
12154 imports alphabetically, and automatically separated into sections. It
12155 provides a command line utility, a python library and plugins for various
12156 editors.")
12157 (license license:expat)
12158 (properties `((python2-variant . ,(delay python2-isort))))))
12159
12160 (define-public python2-isort
12161 (let ((base (package-with-python2
12162 (strip-python2-variant python-isort))))
12163 (package (inherit base)
12164 (native-inputs
12165 `(("python2-futures" ,python2-futures)
12166 ,@(package-native-inputs base))))))
12167
12168 (define-public python2-backports-functools-lru-cache
12169 (package
12170 (name "python2-backports-functools-lru-cache")
12171 (version "1.5")
12172 (source
12173 (origin
12174 (method url-fetch)
12175 ;; only the pypi tarballs contain the necessary metadata
12176 (uri (pypi-uri "backports.functools_lru_cache" version))
12177 (sha256
12178 (base32
12179 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12180 (build-system python-build-system)
12181 (native-inputs
12182 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12183 (arguments
12184 `(#:python ,python-2))
12185 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12186 (synopsis "Backport of functools.lru_cache from Python 3.3")
12187 (description "@code{python2-backports-functools-lru-cache} is a backport
12188 of @code{functools.lru_cache} from python 3.3.")
12189 (license license:expat)))
12190
12191 (define-public python-configparser
12192 (package
12193 (name "python-configparser")
12194 (version "3.7.1")
12195 (source
12196 (origin
12197 (method url-fetch)
12198 (uri (pypi-uri "configparser" version))
12199 (sha256
12200 (base32
12201 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12202 (build-system python-build-system)
12203 (home-page "https://github.com/jaraco/configparser/")
12204 (synopsis "Backport of configparser from python 3.5")
12205 (description "@code{python-configparser} is a backport of
12206 @code{configparser} from Python 3.5 so that it can be used directly
12207 in other versions.")
12208 (license license:expat)))
12209
12210 (define-public python2-configparser
12211 (package-with-python2 python-configparser))
12212
12213 (define-public python-mando
12214 (package
12215 (name "python-mando")
12216 (version "0.6.4")
12217 (source (origin
12218 (method url-fetch)
12219 (uri (pypi-uri "mando" version))
12220 (sha256
12221 (base32
12222 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12223 (build-system python-build-system)
12224 (propagated-inputs
12225 `(("python-rst2ansi" ,python-rst2ansi)
12226 ("python-six" ,python-six)))
12227 (native-inputs
12228 `(("python-pytest" ,python-pytest)))
12229 (home-page "https://mando.readthedocs.org/")
12230 (synopsis
12231 "Wrapper around argparse, allowing creation of complete CLI applications")
12232 (description
12233 "This package is a wrapper around argparse, allowing you to write complete CLI
12234 applications in seconds while maintaining all the flexibility.")
12235 (license license:expat)))
12236
12237 (define-public python2-mando
12238 (package-with-python2 python-mando))
12239
12240 (define-public python2-argparse
12241 (package
12242 (name "python2-argparse")
12243 (version "1.4.0")
12244 (source
12245 (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "argparse" version))
12248 (sha256
12249 (base32
12250 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12251 (build-system python-build-system)
12252 (arguments
12253 `(#:python ,python-2))
12254 (home-page "https://github.com/ThomasWaldmann/argparse/")
12255 (synopsis "Python command-line parsing library")
12256 (description
12257 "This package is mostly for people who want to have @code{argparse} on
12258 older Pythons because it was not part of the standard library back then.")
12259 (license license:psfl)))
12260
12261 (define-public python-fudge
12262 (package
12263 (name "python-fudge")
12264 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12265 ;; package, which is currently the only use of this package.
12266 (version "0.9.6")
12267 (source
12268 (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "fudge" version))
12271 (sha256
12272 (base32
12273 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12274 (build-system python-build-system)
12275 (arguments
12276 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12277 (home-page "https://github.com/fudge-py/fudge")
12278 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12279 (description
12280 "Fudge is a Python module for using fake objects (mocks and stubs) to
12281 test real ones.
12282
12283 In readable Python code, you declare the methods available on your fake object
12284 and how they should be called. Then you inject that into your application and
12285 start testing. This declarative approach means you don’t have to record and
12286 playback actions and you don’t have to inspect your fakes after running code.
12287 If the fake object was used incorrectly then you’ll see an informative
12288 exception message with a traceback that points to the culprit.")
12289 (license license:expat)))
12290
12291 (define-public python2-fudge
12292 (package-with-python2 python-fudge))
12293
12294 (define-public python-mwclient
12295 (package
12296 (name "python-mwclient")
12297 (version "0.8.4")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 ;; The PyPI version wouldn't contain tests.
12302 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12303 "v" version ".tar.gz"))
12304 (file-name (string-append name "-" version ".tar.gz"))
12305 (sha256
12306 (base32
12307 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12308 (build-system python-build-system)
12309 (propagated-inputs
12310 `(("python-requests" ,python-requests)
12311 ("python-requests-oauthlib"
12312 ,python-requests-oauthlib)
12313 ("python-six" ,python-six)))
12314 (native-inputs
12315 `(("python-mock" ,python-mock)
12316 ("python-pytest" ,python-pytest)
12317 ("python-pytest-pep8" ,python-pytest-pep8)
12318 ("python-pytest-cache" ,python-pytest-cache)
12319 ("python-pytest-cov" ,python-pytest-cov)
12320 ("python-responses" ,python-responses)))
12321 (home-page "https://github.com/btongminh/mwclient")
12322 (synopsis "MediaWiki API client")
12323 (description "This package provides a MediaWiki API client.")
12324 (license license:expat)))
12325
12326 (define-public python2-mwclient
12327 (package-with-python2 python-mwclient))
12328
12329 (define-public python-utils
12330 (package
12331 (name "python-utils")
12332 (version "2.1.0")
12333 (source (origin
12334 (method url-fetch)
12335 (uri (pypi-uri "python-utils" version))
12336 (sha256
12337 (base32
12338 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12339 (build-system python-build-system)
12340 (native-inputs
12341 `(("pytest-runner" ,python-pytest-runner)
12342 ("pytest" ,python-pytest)
12343 ("six" ,python-six)))
12344 (home-page "https://github.com/WoLpH/python-utils")
12345 (synopsis "Convenient utilities not included with the standard Python install")
12346 (description
12347 "Python Utils is a collection of small Python functions and classes which
12348 make common patterns shorter and easier.")
12349 (license license:bsd-2)))
12350
12351 (define-public python2-utils
12352 (package-with-python2 python-utils))
12353
12354 (define-public python-diff-match-patch
12355 (package
12356 (name "python-diff-match-patch")
12357 (version "20121119")
12358 (source
12359 (origin
12360 (method url-fetch)
12361 (uri (pypi-uri "diff-match-patch" version))
12362 (sha256
12363 (base32
12364 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12365 (build-system python-build-system)
12366 (home-page "https://code.google.com/p/google-diff-match-patch")
12367 (synopsis "Synchronize plain text")
12368 (description "Diff Match and Patch libraries offer robust algorithms to
12369 perform the operations required for synchronizing plain text.")
12370 (license license:asl2.0)))
12371
12372 (define-public python2-diff-match-patch
12373 (package-with-python2 python-diff-match-patch))
12374
12375 (define-public python-dirsync
12376 (package
12377 (name "python-dirsync")
12378 (version "2.2.3")
12379 (source
12380 (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "dirsync" version))
12383 (sha256
12384 (base32
12385 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12386 (build-system python-build-system)
12387 (propagated-inputs
12388 `(("six" ,python-six)))
12389 (home-page "https://bitbucket.org/tkhyn/dirsync")
12390 (synopsis "Advanced directory tree synchronisation tool")
12391 (description "Advanced directory tree synchronisation tool.")
12392 (license license:expat)))
12393
12394 (define-public python2-dirsync
12395 (package-with-python2 python-dirsync))
12396
12397 (define-public python-levenshtein
12398 (package
12399 (name "python-levenshtein")
12400 (version "0.12.0")
12401 (source
12402 (origin
12403 (method url-fetch)
12404 (uri (pypi-uri "python-Levenshtein" version))
12405 (sha256
12406 (base32
12407 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12408 (build-system python-build-system)
12409 (home-page "https://github.com/ztane/python-Levenshtein")
12410 (synopsis "Fast computation of Levenshtein distance and string similarity")
12411 (description
12412 "The Levenshtein Python C extension module contains functions for fast computation of
12413 @enumerate
12414 @item Levenshtein (edit) distance, and edit operations
12415 @item string similarity
12416 @item approximate median strings, and generally string averaging
12417 @item string sequence and set similarity
12418 @end enumerate
12419 It supports both normal and Unicode strings.")
12420 (license license:gpl2+)))
12421
12422 (define-public python2-levenshtein
12423 (package-with-python2 python-levenshtein))
12424
12425 (define-public python-scandir
12426 (package
12427 (name "python-scandir")
12428 (version "1.9.0")
12429 (source
12430 (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "scandir" version))
12433 (sha256
12434 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12435 (build-system python-build-system)
12436 (arguments
12437 `(#:phases (modify-phases %standard-phases
12438 (replace 'check
12439 (lambda _
12440 (invoke "python" "test/run_tests.py"))))))
12441 (home-page "https://github.com/benhoyt/scandir")
12442 (synopsis "Directory iteration function")
12443 (description
12444 "Directory iteration function like os.listdir(), except that instead of
12445 returning a list of bare filenames, it yields DirEntry objects that include
12446 file type and stat information along with the name. Using scandir() increases
12447 the speed of os.walk() by 2-20 times (depending on the platform and file
12448 system) by avoiding unnecessary calls to os.stat() in most cases.
12449
12450 This package is part of the Python standard library since version 3.5.")
12451 (license license:bsd-3)))
12452
12453 (define-public python2-scandir
12454 (package-with-python2 python-scandir))
12455
12456 (define-public python2-stemming
12457 (package
12458 (name "python2-stemming")
12459 (version "1.0.1")
12460 (source
12461 (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "stemming" version))
12464 (sha256
12465 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12466 (build-system python-build-system)
12467 (arguments
12468 `(#:python ,python-2))
12469 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12470 (synopsis "Python implementations of various stemming algorithms")
12471 (description
12472 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12473 stemming algorithms for English. These implementations are straightforward and
12474 efficient, unlike some Python versions of the same algorithms available on the
12475 Web. This package is an extraction of the stemming code included in the Whoosh
12476 search engine.")
12477 (license license:public-domain)))
12478
12479 (define-public python-factory-boy
12480 (package
12481 (name "python-factory-boy")
12482 (version "2.8.1")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "factory_boy" version))
12487 (sha256
12488 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12489 (build-system python-build-system)
12490 (arguments
12491 ;; Tests are not included in the tarball.
12492 `(#:tests? #f))
12493 (propagated-inputs
12494 `(("faker" ,python-faker)))
12495 (home-page "https://github.com/benhoyt/scandir")
12496 (synopsis "Versatile test fixtures replacement")
12497 (description
12498 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12499
12500 As a fixtures replacement tool, it aims to replace static, hard to maintain
12501 fixtures with easy-to-use factories for complex object.
12502
12503 Instead of building an exhaustive test setup with every possible combination
12504 of corner cases, factory_boy allows you to use objects customized for the
12505 current test, while only declaring the test-specific fields")
12506 (license license:expat)))
12507
12508 (define-public python2-factory-boy
12509 (package-with-python2 python-factory-boy))
12510
12511 (define-public python-translate-toolkit
12512 (package
12513 (name "python-translate-toolkit")
12514 (version "2.1.0")
12515 (source
12516 (origin
12517 (method url-fetch)
12518 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12519 (sha256
12520 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12521 (build-system python-build-system)
12522 (native-inputs
12523 `(("python-pytest" ,python-pytest)
12524 ("python-sphinx" ,python-sphinx)))
12525 (propagated-inputs
12526 `(("python-babel" ,python-babel)
12527 ("python-beautifulsoup4" ,python-beautifulsoup4)
12528 ("python-chardet" ,python-chardet)
12529 ("python-diff-match-patch" ,python-diff-match-patch)
12530 ("python-levenshtein" ,python-levenshtein)
12531 ("python-lxml" ,python-lxml)
12532 ("python-six" ,python-six)
12533 ("python-vobject" ,python-vobject)
12534 ("python-pyyaml" ,python-pyyaml)))
12535 (arguments
12536 ;; TODO: tests are not run, because they end with
12537 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12538 ;; 'parse_funcs'
12539 ;; during test setup.
12540 `(#:tests? #f))
12541 (home-page "https://toolkit.translatehouse.org")
12542 (synopsis "Tools and API for translation and localization engineering")
12543 (description
12544 "Tools and API for translation and localization engineering. It contains
12545 several utilities, as well as an API for building localization tools.")
12546 (license license:gpl2+)))
12547
12548 (define-public python2-translate-toolkit
12549 (package-with-python2 python-translate-toolkit))
12550
12551 (define-public python-packaging
12552 (package
12553 (name "python-packaging")
12554 (version "19.0")
12555 (source
12556 (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "packaging" version))
12559 (sha256
12560 (base32
12561 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12562 (build-system python-build-system)
12563 (arguments
12564 `(#:phases (modify-phases %standard-phases
12565 (replace 'check
12566 (lambda _ (invoke "py.test" "-vv"))))))
12567 (native-inputs
12568 `(("python-pretend" ,python-pretend)
12569 ("python-pytest" ,python-pytest)))
12570 (propagated-inputs
12571 `(("python-pyparsing" ,python-pyparsing)
12572 ("python-six" ,python-six)))
12573 (home-page "https://github.com/pypa/packaging")
12574 (synopsis "Core utilities for Python packages")
12575 (description "Packaging is a Python module for dealing with Python packages.
12576 It offers an interface for working with package versions, names, and dependency
12577 information.")
12578 ;; From 'LICENSE': This software is made available under the terms of
12579 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12580 ;; Contributions to this software is made under the terms of *both* these
12581 ;; licenses.
12582 (license (list license:asl2.0 license:bsd-2))))
12583
12584 (define-public python2-packaging
12585 (package-with-python2 python-packaging))
12586
12587 (define-public python-relatorio
12588 (package
12589 (name "python-relatorio")
12590 (version "0.8.0")
12591 (source
12592 (origin
12593 (method url-fetch)
12594 (uri (pypi-uri "relatorio" version))
12595 (sha256
12596 (base32
12597 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12598 (build-system python-build-system)
12599 (propagated-inputs
12600 `(("python-lxml" ,python-lxml)
12601 ("python-genshi" ,python-genshi)))
12602 (native-inputs
12603 `(("python-magic" ,python-magic)))
12604 (home-page "https://relatorio.tryton.org/")
12605 (synopsis "Templating library able to output ODT and PDF files")
12606 (description "Relatorio is a templating library which provides a way to
12607 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12608 for more filetypes can be easily added by creating plugins for them.")
12609 (license license:gpl3+)))
12610
12611 (define-public python2-relatorio
12612 (package-with-python2 python-relatorio))
12613
12614 (define-public python-radon
12615 (package
12616 (name "python-radon")
12617 (version "2.2.0")
12618 (source
12619 (origin
12620 (method url-fetch)
12621 (uri (pypi-uri "radon" version))
12622 (sha256
12623 (base32
12624 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12625 (build-system python-build-system)
12626 (arguments
12627 `(#:phases (modify-phases %standard-phases
12628 (replace 'check
12629 (lambda _
12630 (invoke "python" "radon/tests/run.py"))))))
12631 (propagated-inputs
12632 `(("python-colorama" ,python-colorama)
12633 ("python-flake8-polyfill" ,python-flake8-polyfill)
12634 ("python-mando" ,python-mando)))
12635 (native-inputs
12636 `(("python-pytest" ,python-pytest)
12637 ("python-pytest-mock" ,python-pytest-mock)))
12638 (home-page "https://radon.readthedocs.org/")
12639 (synopsis "Code Metrics in Python")
12640 (description "Radon is a Python tool which computes various code metrics.
12641 Supported metrics are:
12642 @itemize @bullet
12643 @item raw metrics: SLOC, comment lines, blank lines, &c.
12644 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12645 @item Halstead metrics (all of them)
12646 @item the Maintainability Index (a Visual Studio metric)
12647 @end itemize")
12648 (license license:expat)))
12649
12650 (define-public python2-radon
12651 (package-with-python2 python-radon))
12652
12653 (define-public python-sure
12654 (package
12655 (name "python-sure")
12656 (version "1.4.11")
12657 (source
12658 (origin
12659 (method url-fetch)
12660 (uri (pypi-uri "sure" version))
12661 (sha256
12662 (base32
12663 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12664 (build-system python-build-system)
12665 (propagated-inputs
12666 `(("python-mock" ,python-mock)
12667 ("python-six" ,python-six)))
12668 (native-inputs
12669 `(("python-nose" ,python-nose)))
12670 (home-page "https://github.com/gabrielfalcao/sure")
12671 (synopsis "Automated testing library in python for python")
12672 (description
12673 "Sure is a python library that leverages a DSL for writing assertions.
12674 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12675 (license license:gpl3+)))
12676
12677 (define-public python2-sure
12678 (package-with-python2 python-sure))
12679
12680 (define-public python2-couleur
12681 ;; This package does not seem to support python3 at all, hence,
12682 ;; only the python2 variant definition is provided.
12683 (package
12684 (name "python2-couleur")
12685 (version "0.6.2")
12686 (source
12687 (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "couleur" version))
12690 (sha256
12691 (base32
12692 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12693 (build-system python-build-system)
12694 (arguments
12695 `(#:python ,python-2))
12696 (home-page "https://github.com/gabrielfalcao/couleur")
12697 (synopsis
12698 "ANSI terminal tool for python, colored shell and other handy fancy features")
12699 (description
12700 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12701 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12702 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12703 ;; https://github.com/gabrielfalcao/couleur/issues/11
12704 (license license:lgpl3+)))
12705
12706 (define-public python-misaka
12707 (package
12708 (name "python-misaka")
12709 (version "2.1.1")
12710 (source
12711 (origin
12712 (method url-fetch)
12713 (uri (pypi-uri "misaka" version))
12714 (sha256
12715 (base32
12716 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12717 (build-system python-build-system)
12718 (arguments
12719 `(;; Line 37 of setup.py calls self.run_command('develop')
12720 ;; in the 'check' phase. This command seems to be trying
12721 ;; to write to
12722 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12723 ;; for which it does not have the permission to write.
12724 #:tests? #f))
12725 (propagated-inputs
12726 `(("python-cffi" ,python-cffi)))
12727 (home-page "https://github.com/FSX/misaka")
12728 (synopsis "Python binding for Hoedown")
12729 (description
12730 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12731 library written in C. It features a fast HTML renderer and functionality to make custom
12732 renderers (e.g. man pages or LaTeX).")
12733 (license license:expat)))
12734
12735 (define-public python2-misaka
12736 (package-with-python2 python-misaka))
12737
12738 (define-public python2-steadymark
12739 ;; This is forced into being a python2 only variant
12740 ;; due to its dependence on couleur that has no support
12741 ;; for python3
12742 (package
12743 (name "python2-steadymark")
12744 (version "0.7.3")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "steadymark" version))
12749 (sha256
12750 (base32
12751 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12752 (build-system python-build-system)
12753 (native-inputs
12754 `(("python-couleur" ,python2-couleur)
12755 ("python-sure" ,python2-sure)
12756 ("python-misaka" ,python2-misaka)))
12757 (arguments
12758 `(#:python ,python-2
12759 #:phases
12760 (modify-phases %standard-phases
12761 (add-before 'build 'patch-setup-py
12762 (lambda _
12763 ;; Update requirements from dependency==version
12764 ;; to dependency>=version
12765 (substitute* "setup.py"
12766 (("==") ">="))
12767 #t)))))
12768 (home-page "https://github.com/gabrielfalcao/steadymark")
12769 (synopsis "Markdown-based test runner for python")
12770 (description
12771 "@code{Steadymark} allows documentation to be written in github-flavoured
12772 markdown. The documentation may contain snippets of code surrounded by python
12773 code blocks and @code{Steadymark} will find these snippets and run them, making
12774 sure that there are no old malfunctional examples in the documentation examples.")
12775 (license license:expat)))
12776
12777 (define-public python-jsonpointer
12778 (package
12779 (name "python-jsonpointer")
12780 (version "1.10")
12781 (source
12782 (origin
12783 (method url-fetch)
12784 (uri (pypi-uri "jsonpointer" version))
12785 (sha256
12786 (base32
12787 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12788 (build-system python-build-system)
12789 (home-page "https://github.com/stefankoegl/python-json-pointer")
12790 (synopsis "Identify specific nodes in a JSON document")
12791 (description "@code{jsonpointer} allows you to access specific nodes
12792 by path in a JSON document (see RFC 6901).")
12793 (license license:bsd-3)))
12794
12795 (define-public python2-jsonpointer
12796 (package-with-python2 python-jsonpointer))
12797
12798 (define-public python-jsonpatch
12799 (package
12800 (name "python-jsonpatch")
12801 (version "1.16")
12802 (source
12803 (origin
12804 (method url-fetch)
12805 ;; pypi version lacks tests.js
12806 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12807 "archive/v" version ".tar.gz"))
12808 (file-name (string-append name "-" version ".tar.gz"))
12809 (sha256
12810 (base32
12811 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12812 (build-system python-build-system)
12813 (native-inputs
12814 `(("python-jsonpointer" ,python-jsonpointer)))
12815 (home-page "https://github.com/stefankoegl/python-json-patch")
12816 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12817 (description "@code{jsonpatch} is a library and program that allows
12818 applying JSON Patches according to RFC 6902.")
12819 (license license:bsd-3)))
12820
12821 (define-public python2-jsonpatch
12822 (package-with-python2 python-jsonpatch))
12823
12824 (define-public python-jsonpatch-0.4
12825 (package (inherit python-jsonpatch)
12826 (name "python-jsonpatch")
12827 (version "0.4")
12828 (source
12829 (origin
12830 (method url-fetch)
12831 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12832 "archive/v" version ".tar.gz"))
12833 (file-name (string-append name "-" version ".tar.gz"))
12834 (sha256
12835 (base32
12836 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12837
12838 (define-public python2-jsonpatch-0.4
12839 (package-with-python2 python-jsonpatch-0.4))
12840
12841 (define-public python-rfc3986
12842 (package
12843 (name "python-rfc3986")
12844 (version "1.1.0")
12845 (source (origin
12846 (method url-fetch)
12847 (uri (pypi-uri "rfc3986" version))
12848 (sha256
12849 (base32
12850 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12851 (build-system python-build-system)
12852 (arguments
12853 `(#:modules ((guix build utils)
12854 (guix build python-build-system)
12855 (ice-9 ftw)
12856 (srfi srfi-1)
12857 (srfi srfi-26))
12858 #:phases
12859 (modify-phases %standard-phases
12860 (replace 'check
12861 (lambda _
12862 (let ((cwd (getcwd)))
12863 (setenv "PYTHONPATH"
12864 (string-append cwd "/build/"
12865 (find (cut string-prefix? "lib" <>)
12866 (scandir (string-append cwd "/build")))
12867 ":"
12868 (getenv "PYTHONPATH")))
12869 (invoke "pytest" "-v")))))))
12870 (native-inputs
12871 `(("python-pytest" ,python-pytest)))
12872 (home-page "https://rfc3986.readthedocs.io/")
12873 (synopsis "Parse and validate URI references")
12874 (description
12875 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12876 validation and authority parsing. This module also supports RFC@tie{}6874
12877 which adds support for zone identifiers to IPv6 addresses.")
12878 (license license:asl2.0)))
12879
12880 (define-public python2-rfc3986
12881 (package-with-python2 python-rfc3986))
12882
12883 (define-public python-rfc3987
12884 (package
12885 (name "python-rfc3987")
12886 (version "1.3.7")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "rfc3987" version))
12891 (sha256
12892 (base32
12893 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12894 (build-system python-build-system)
12895 (home-page "https://pypi.python.org/pypi/rfc3987")
12896 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12897 (description "@code{rfc3987} provides routines for parsing and
12898 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12899 (license license:gpl3+)))
12900
12901 (define-public python2-rfc3987
12902 (package-with-python2 python-rfc3987))
12903
12904 (define-public python-validate-email
12905 (package
12906 (name "python-validate-email")
12907 (version "1.3")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "validate_email" version))
12912 (sha256
12913 (base32
12914 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12915 (build-system python-build-system)
12916 (home-page "https://github.com/syrusakbary/validate_email")
12917 (synopsis "Verifies if an email address is valid and really exists")
12918 (description "@code{validate_email} can be used to verify if an email
12919 address is valid and really exists.")
12920 (license license:lgpl3+)))
12921
12922 (define-public python2-validate-email
12923 (package-with-python2 python-validate-email))
12924
12925 (define-public python-flex
12926 (package
12927 (name "python-flex")
12928 (version "6.10.0")
12929 (source
12930 (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "flex" version))
12933 (sha256
12934 (base32
12935 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12936 (build-system python-build-system)
12937 (propagated-inputs
12938 `(("python-click" ,python-click)
12939 ("python-iso8601" ,python-iso8601)
12940 ("python-jsonpointer" ,python-jsonpointer)
12941 ("python-pyyaml" ,python-pyyaml)
12942 ("python-requests" ,python-requests)
12943 ("python-rfc3987" ,python-rfc3987)
12944 ("python-six" ,python-six)
12945 ("python-validate-email" ,python-validate-email)))
12946 (home-page "https://github.com/pipermerriam/flex")
12947 (synopsis "Validates Swagger schemata")
12948 (description "@code{flex} can be used to validate Swagger schemata.")
12949 (license license:bsd-3)))
12950
12951 (define-public python2-flex
12952 (package-with-python2 python-flex))
12953
12954 (define-public python-marshmallow
12955 (package
12956 (name "python-marshmallow")
12957 (version "3.0.0b14")
12958 (source
12959 (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "marshmallow" version))
12962 (sha256
12963 (base32
12964 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12965 (build-system python-build-system)
12966 (propagated-inputs
12967 `(("python-dateutil" ,python-dateutil)
12968 ("python-simplejson" ,python-simplejson)))
12969 (native-inputs
12970 `(("python-pytest" ,python-pytest)
12971 ("python-pytz" ,python-pytz)))
12972 (home-page "https://github.com/marshmallow-code/marshmallow")
12973 (synopsis "Convert complex datatypes to and from native
12974 Python datatypes.")
12975 (description "@code{marshmallow} provides a library for converting
12976 complex datatypes to and from native Python datatypes.")
12977 (license license:expat)))
12978
12979 (define-public python2-marshmallow
12980 (package-with-python2 python-marshmallow))
12981
12982 (define-public python-apispec
12983 (package
12984 (name "python-apispec")
12985 (version "0.25.3")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "apispec" version))
12990 (sha256
12991 (base32
12992 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12993 (build-system python-build-system)
12994 (propagated-inputs
12995 `(("python-pyyaml" ,python-pyyaml)))
12996 (native-inputs
12997 `(("python-pytest" ,python-pytest)
12998 ("python-flask" ,python-flask)
12999 ("python-marshmallow" ,python-marshmallow)
13000 ("python-tornado" ,python-tornado)
13001 ("python-bottle" ,python-bottle)
13002 ("python-mock" ,python-mock)))
13003 (home-page "https://github.com/marshmallow-code/apispec")
13004 (synopsis "Swagger 2.0 API specification generator")
13005 (description "@code{python-apispec} is a pluggable API specification
13006 generator. Currently supports the OpenAPI specification (f.k.a.
13007 Swagger 2.0).")
13008 (license license:expat)))
13009
13010 (define-public python2-apispec
13011 (package-with-python2 python-apispec))
13012
13013 (define-public python-flasgger
13014 (package
13015 (name "python-flasgger")
13016 (version "0.6.3")
13017 (source
13018 (origin
13019 (method git-fetch)
13020 (uri (git-reference
13021 (url "https://github.com/rochacbruno/flasgger.git")
13022 (commit version)))
13023 (file-name (git-file-name name version))
13024 (sha256
13025 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13026 (build-system python-build-system)
13027 (arguments
13028 `(#:phases
13029 (modify-phases %standard-phases
13030 (replace 'check
13031 (lambda* (#:key inputs outputs #:allow-other-keys)
13032 (substitute* "Makefile"
13033 (("flake8 flasgger --ignore=F403")
13034 "flake8 flasgger --ignore=E731,F403"))
13035 (setenv "PYTHONPATH" (string-append (getcwd)
13036 ":"
13037 (getenv "PYTHONPATH")))
13038 (invoke "py.test"))))))
13039 (propagated-inputs
13040 `(("python-flask" ,python-flask)
13041 ("python-pyyaml" ,python-pyyaml)
13042 ("python-jsonschema" ,python-jsonschema)
13043 ("python-mistune" ,python-mistune)
13044 ("python-six" ,python-six)))
13045 (native-inputs
13046 `(("python-decorator" ,python-decorator)
13047 ("python-flake8" ,python-flake8)
13048 ("python-flask-restful" ,python-flask-restful)
13049 ("python-flex" ,python-flex)
13050 ("python-pytest" ,python-pytest)
13051 ("python-pytest-cov" ,python-pytest-cov)
13052 ("python-marshmallow" ,python-marshmallow)
13053 ("python-apispec" ,python-apispec)))
13054 (home-page "https://github.com/rochacbruno/flasgger/")
13055 (synopsis "Extract Swagger specs from your Flask project")
13056 (description "@code{python-flasgger} allows extracting Swagger specs
13057 from your Flask project. It is a fork of Flask-Swagger.")
13058 (license license:expat)))
13059
13060 (define-public python2-flasgger
13061 (package-with-python2 python-flasgger))
13062
13063 (define-public python-swagger-spec-validator
13064 (package
13065 (name "python-swagger-spec-validator")
13066 (version "2.1.0")
13067 (source
13068 (origin
13069 (method url-fetch)
13070 (uri (pypi-uri "swagger-spec-validator" version))
13071 (sha256
13072 (base32
13073 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13074 (build-system python-build-system)
13075 (propagated-inputs
13076 `(("python-jsonschema" ,python-jsonschema)
13077 ("python-six" ,python-six)))
13078 (home-page
13079 "https://github.com/Yelp/swagger_spec_validator")
13080 (synopsis "Validation of Swagger specifications")
13081 (description "@code{swagger_spec_validator} provides a library for
13082 validating Swagger API specifications.")
13083 (license license:asl2.0)))
13084
13085 (define-public python2-swagger-spec-validator
13086 (package-with-python2 python-swagger-spec-validator))
13087
13088 (define-public python-apache-libcloud
13089 (package
13090 (name "python-apache-libcloud")
13091 (version "2.4.0")
13092 (source
13093 (origin
13094 (method url-fetch)
13095 (uri (pypi-uri "apache-libcloud" version))
13096 (sha256
13097 (base32
13098 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13099 (build-system python-build-system)
13100 (arguments
13101 `(#:phases
13102 (modify-phases %standard-phases
13103 (add-after 'unpack 'patch-ssh
13104 (lambda* (#:key inputs #:allow-other-keys)
13105 (substitute* "libcloud/compute/ssh.py"
13106 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13107 "/bin/ssh" "'")))
13108 #t))
13109 (add-after 'unpack 'patch-tests
13110 (lambda _
13111 (substitute* "./libcloud/test/test_file_fixtures.py"
13112 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13113 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13114 return (httplib.OK,
13115 \"1234abcd\",
13116 {\"test\": \"value\"},
13117 httplib.responses[httplib.OK])
13118 def _ascii"))
13119 (substitute* "libcloud/test/compute/test_ssh_client.py"
13120 (("class ShellOutSSHClientTests")
13121 "@unittest.skip(\"Guix container doesn't have ssh service\")
13122 class ShellOutSSHClientTests")
13123 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13124 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13125 (("'.xF0', '.x90', '.x8D', '.x88'")
13126 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13127 #t))
13128 (add-before 'check 'copy-secret
13129 (lambda _
13130 (copy-file "libcloud/test/secrets.py-dist"
13131 "libcloud/test/secrets.py")
13132 #t)))))
13133 (inputs
13134 `(("openssh" ,openssh)))
13135 (propagated-inputs
13136 `(("python-paramiko" ,python-paramiko)
13137 ("python-requests" ,python-requests)))
13138 (native-inputs
13139 `(("python-lockfile" ,python-lockfile)
13140 ("python-mock" ,python-mock)
13141 ("python-pytest" ,python-pytest)
13142 ("python-pytest-runner" ,python-pytest-runner)
13143 ("python-requests-mock" ,python-requests-mock)))
13144 (home-page "https://libcloud.apache.org/")
13145 (synopsis "Unified Cloud API")
13146 (description "@code{libcloud} is a Python library for interacting with
13147 many of the popular cloud service providers using a unified API.")
13148 (license license:asl2.0)))
13149
13150 (define-public python2-apache-libcloud
13151 (package-with-python2 python-apache-libcloud))
13152
13153 (define-public python-smmap2
13154 (package
13155 (name "python-smmap2")
13156 (version "2.0.3")
13157 (source
13158 (origin
13159 (method url-fetch)
13160 (uri (pypi-uri "smmap2" version))
13161 (sha256
13162 (base32
13163 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13164 (build-system python-build-system)
13165 (native-inputs
13166 `(("python-nosexcover" ,python-nosexcover)))
13167 (home-page "https://github.com/Byron/smmap")
13168 (synopsis "Python sliding window memory map manager")
13169 (description "@code{smmap2} is a pure Python implementation of a sliding
13170 window memory map manager.")
13171 (license license:bsd-3)))
13172
13173 (define-public python2-smmap2
13174 (package-with-python2 python-smmap2))
13175
13176 (define-public python-regex
13177 (package
13178 (name "python-regex")
13179 (version "2019.04.14")
13180 (source (origin
13181 (method url-fetch)
13182 (uri (pypi-uri "regex" version))
13183 (sha256
13184 (base32
13185 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13186 ;; TODO: Fix and enable regex_test.py tests that complain about the
13187 ;; test.support module not existing.
13188 (build-system python-build-system)
13189 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13190 (synopsis "Alternative regular expression module")
13191 (description "This regular expression implementation is backwards-
13192 compatible with the standard @code{re} module, but offers additional
13193 functionality like full case-folding for case-insensitive matches in Unicode.")
13194 (license license:psfl)))
13195
13196 (define-public python2-regex
13197 (package-with-python2 python-regex))
13198
13199 (define-public python2-pyopengl
13200 (package
13201 (name "python2-pyopengl")
13202 (version "3.1.0")
13203 (source
13204 (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "PyOpenGL" version))
13207 (sha256
13208 (base32
13209 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13210 (arguments
13211 `(#:python ,python-2))
13212 (build-system python-build-system)
13213 (home-page "http://pyopengl.sourceforge.net")
13214 (synopsis "Standard OpenGL bindings for Python")
13215 (description
13216 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13217 related APIs. The binding is created using the standard @code{ctypes}
13218 library.")
13219 (license license:bsd-3)))
13220
13221 (define-public python2-pyopengl-accelerate
13222 (package
13223 (inherit python2-pyopengl)
13224 (name "python2-pyopengl-accelerate")
13225 (version "3.1.0")
13226 (source
13227 (origin
13228 (method url-fetch)
13229 (uri (pypi-uri "PyOpenGL-accelerate" version))
13230 (sha256
13231 (base32
13232 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13233 (synopsis "Acceleration code for PyOpenGL")
13234 (description
13235 "This is the Cython-coded accelerator module for PyOpenGL.")))
13236
13237 (define-public python-rencode
13238 (package
13239 (name "python-rencode")
13240 (version "1.0.5")
13241 (source
13242 (origin
13243 (method url-fetch)
13244 (uri (pypi-uri "rencode" version))
13245 (sha256
13246 (base32
13247 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13248 (build-system python-build-system)
13249 (arguments
13250 `(#:phases
13251 (modify-phases %standard-phases
13252 (add-before 'check 'delete-bogus-test
13253 ;; This test requires /home/aresch/Downloads, which is not provided by
13254 ;; the build environment.
13255 (lambda _
13256 (delete-file "rencode/t.py")
13257 #t)))))
13258 (native-inputs `(("pkg-config" ,pkg-config)
13259 ("python-cython" ,python-cython)))
13260 (home-page "https://github.com/aresch/rencode")
13261 (synopsis "Serialization of heterogeneous data structures")
13262 (description
13263 "The @code{rencode} module is a data structure serialization library,
13264 similar to @code{bencode} from the BitTorrent project. For complex,
13265 heterogeneous data structures with many small elements, r-encoding stake up
13266 significantly less space than b-encodings. This version of rencode is a
13267 complete rewrite in Cython to attempt to increase the performance over the
13268 pure Python module.")
13269 (license license:bsd-3)))
13270
13271 (define-public python2-rencode
13272 (package-with-python2 python-rencode))
13273
13274 (define-public python-xenon
13275 (package
13276 (name "python-xenon")
13277 (version "0.5.4")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 (uri (pypi-uri "xenon" version))
13282 (sha256
13283 (base32
13284 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13285 (build-system python-build-system)
13286 (native-inputs
13287 `(("python-pyyaml" ,python-pyyaml)
13288 ("python-radon" ,python-radon)
13289 ("python-requests" ,python-requests)
13290 ("python-flake8" ,python-flake8)
13291 ("python-tox" ,python-tox)))
13292 (arguments
13293 `(#:phases
13294 (modify-phases %standard-phases
13295 (add-before 'build 'patch-test-requirements
13296 (lambda _
13297 ;; Remove httpretty dependency for tests.
13298 (substitute* "setup.py"
13299 (("httpretty") ""))
13300 #t)))))
13301 (home-page "https://xenon.readthedocs.org/")
13302 (synopsis "Monitor code metrics for Python on your CI server")
13303 (description
13304 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13305 Ideally, @code{xenon} is run every time code is committed. Through command
13306 line options, various thresholds can be set for the complexity of code. It
13307 will fail (i.e. it will exit with a non-zero exit code) when any of these
13308 requirements is not met.")
13309 (license license:expat)))
13310
13311 (define-public python2-xenon
13312 (package-with-python2 python-xenon))
13313
13314 (define-public python-pysocks
13315 (package
13316 (name "python-pysocks")
13317 (version "1.7.0")
13318 (source
13319 (origin
13320 (method url-fetch)
13321 (uri (pypi-uri "PySocks" version))
13322 (sha256
13323 (base32
13324 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13325 (build-system python-build-system)
13326 (arguments `(#:tests? #f))
13327 (home-page "https://github.com/Anorov/PySocks")
13328 (synopsis "SOCKS client module")
13329 (description "@code{pysocks} is an updated and semi-actively maintained
13330 version of @code{SocksiPy} with bug fixes and extra features.")
13331 (license license:bsd-3)))
13332
13333 (define-public python2-pysocks
13334 (package-with-python2 python-pysocks))
13335
13336 (define-public python-pydiff
13337 (package
13338 (name "python-pydiff")
13339 (version "0.2")
13340 (source
13341 (origin
13342 (method url-fetch)
13343 (uri (pypi-uri "pydiff" version))
13344 (sha256
13345 (base32
13346 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13347 (build-system python-build-system)
13348 (home-page "https://github.com/myint/pydiff")
13349 (synopsis "Library to diff two Python files at the bytecode level")
13350 (description
13351 "@code{pydiff} makes it easy to look for actual code changes while
13352 ignoring formatting changes.")
13353 (license license:expat)))
13354
13355 (define-public python2-pydiff
13356 (package-with-python2 python-pydiff))
13357
13358 (define-public python-tqdm
13359 (package
13360 (name "python-tqdm")
13361 (version "4.19.6")
13362 (source
13363 (origin
13364 (method url-fetch)
13365 (uri (pypi-uri "tqdm" version))
13366 (sha256
13367 (base32
13368 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13369 (build-system python-build-system)
13370 (native-inputs
13371 `(("python-flake8" ,python-flake8)
13372 ("python-nose" ,python-nose)
13373 ("python-coverage" ,python-coverage)))
13374 (home-page "https://github.com/tqdm/tqdm")
13375 (synopsis "Fast, extensible progress meter")
13376 (description
13377 "Make loops show a progress bar on the console by just wrapping any
13378 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13379 design and layout.")
13380 (license (list license:mpl2.0 license:expat))))
13381
13382 (define-public python2-tqdm
13383 (package-with-python2 python-tqdm))
13384
13385 (define-public python-pkginfo
13386 (package
13387 (name "python-pkginfo")
13388 (version "1.4.2")
13389 (source
13390 (origin
13391 (method url-fetch)
13392 (uri (pypi-uri "pkginfo" version))
13393 (sha256
13394 (base32
13395 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13396 (build-system python-build-system)
13397 (arguments
13398 ;; The tests are broken upstream.
13399 '(#:tests? #f))
13400 (home-page
13401 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13402 (synopsis
13403 "Query metadatdata from sdists, bdists, and installed packages")
13404 (description
13405 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13406 source distriubtion (an sdist) or a binary distribution (e.g., created by
13407 running bdist_egg). It can also query the EGG-INFO directory of an installed
13408 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13409 created by running @code{python setup.py develop}).")
13410 (license license:expat)))
13411
13412 (define-public python2-pkginfo
13413 (package-with-python2 python-pkginfo))
13414
13415 (define-public python-twine
13416 (package
13417 (name "python-twine")
13418 (version "1.9.1")
13419 (source
13420 (origin
13421 (method url-fetch)
13422 (uri (pypi-uri "twine" version))
13423 (sha256
13424 (base32
13425 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13426 (build-system python-build-system)
13427 (propagated-inputs
13428 `(("python-tqdm" ,python-tqdm)
13429 ("python-pkginfo" ,python-pkginfo)
13430 ("python-requests" ,python-requests)
13431 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13432 (home-page "https://github.com/pypa/twine")
13433 (synopsis "Collection of utilities for interacting with PyPI")
13434 (description
13435 "@code{twine} currently supports registering projects and uploading
13436 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13437 their files and supports any packaging format (including wheels).")
13438 (license license:asl2.0)))
13439
13440 (define-public python2-twine
13441 (package-with-python2 python-twine))
13442
13443 (define-public python-linecache2
13444 (package
13445 (name "python-linecache2")
13446 (version "1.0.0")
13447 (source
13448 (origin
13449 (method url-fetch)
13450 (uri (pypi-uri "linecache2" version))
13451 (sha256
13452 (base32
13453 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13454 (build-system python-build-system)
13455 (arguments
13456 `(;; The tests depend on unittest2, and our version is a bit too old.
13457 #:tests? #f))
13458 (native-inputs
13459 `(("python-pbr" ,python-pbr-minimal)))
13460 (home-page
13461 "https://github.com/testing-cabal/linecache2")
13462 (synopsis "Backports of the linecache module")
13463 (description
13464 "The linecache module allows one to get any line from any file, while
13465 attempting to optimize internally, using a cache, the common case where many
13466 lines are read from a single file.")
13467 (license license:psfl)))
13468
13469 (define-public python2-linecache2
13470 (package-with-python2 python-linecache2))
13471
13472 (define-public python-traceback2
13473 (package
13474 (name "python-traceback2")
13475 (version "1.4.0")
13476 (source
13477 (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "traceback2" version))
13480 (sha256
13481 (base32
13482 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13483 (build-system python-build-system)
13484 (arguments
13485 `(;; python-traceback2 and python-unittest2 depend on one another.
13486 #:tests? #f))
13487 (native-inputs
13488 `(("python-pbr" ,python-pbr-minimal)))
13489 (propagated-inputs
13490 `(("python-linecache2" ,python-linecache2)))
13491 (home-page
13492 "https://github.com/testing-cabal/traceback2")
13493 (synopsis "Backports of the traceback module")
13494 (description
13495 "This module provides a standard interface to extract, format and print
13496 stack traces of Python programs. It exactly mimics the behavior of the Python
13497 interpreter when it prints a stack trace.")
13498 (license license:psfl)))
13499
13500 (define-public python2-traceback2
13501 (package-with-python2 python-traceback2))
13502
13503 (define-public python-ratelimiter
13504 (package
13505 (name "python-ratelimiter")
13506 (version "1.2.0")
13507 (source
13508 (origin
13509 (method url-fetch)
13510 (uri (pypi-uri "ratelimiter" version))
13511 (sha256
13512 (base32
13513 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13514 (build-system python-build-system)
13515 (arguments
13516 '(#:tests? #f)) ; There are no tests in the pypi archive.
13517 (home-page "https://github.com/RazerM/ratelimiter")
13518 (synopsis "Simple rate limiting object")
13519 (description
13520 "The @code{ratelimiter} module ensures that an operation will not be
13521 executed more than a given number of times during a given period.")
13522 (license license:asl2.0)))
13523
13524 (define-public python2-ratelimiter
13525 (package-with-python2 python-ratelimiter))
13526
13527 (define-public python-dukpy
13528 (package
13529 (name "python-dukpy")
13530 (version "0.3")
13531 (source
13532 (origin
13533 (method git-fetch)
13534 (uri (git-reference
13535 (url "https://github.com/kovidgoyal/dukpy.git")
13536 (commit (string-append "v" version))))
13537 (file-name (git-file-name name version))
13538 (sha256
13539 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13540 (build-system python-build-system)
13541 (home-page "https://github.com/kovidgoyal/dukpy")
13542 (synopsis "Run JavaScript in python")
13543 (description
13544 "dukpy is a JavaScript runtime environment for Python using the duktape
13545 embeddable JavaScript engine.")
13546 ;; Dukpy is licensed under MIT like the embedded duktape library,
13547 ;; with 'errors.c' as GPL3.
13548 (license (list license:expat license:gpl3))))
13549
13550 (define-public python2-dukpy
13551 (package-with-python2 python-dukpy))
13552
13553 (define-public python-jsonrpclib-pelix
13554 (package
13555 (name "python-jsonrpclib-pelix")
13556 (version "0.3.2")
13557 (source
13558 (origin
13559 (method url-fetch)
13560 (uri (pypi-uri "jsonrpclib-pelix" version))
13561 (sha256
13562 (base32
13563 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13564 (build-system python-build-system)
13565 (arguments
13566 `(#:tests? #f)) ; no tests in PyPI tarball
13567 (home-page "https://github.com/tcalmant/jsonrpclib/")
13568 (synopsis "JSON-RPC 2.0 client library for Python")
13569 (description
13570 "This library implements the JSON-RPC v2.0
13571 specification (backwards-compatible) as a client library for Python. This
13572 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13573 services.")
13574 (license license:asl2.0)))
13575
13576 (define-public python2-jsonrpclib-pelix
13577 (package-with-python2 python-jsonrpclib-pelix))
13578
13579 (define-public python-setuptools-scm-git-archive
13580 (package
13581 (name "python-setuptools-scm-git-archive")
13582 (version "1.0")
13583 (source
13584 (origin
13585 (method url-fetch)
13586 (uri (pypi-uri "setuptools_scm_git_archive" version))
13587 (sha256
13588 (base32
13589 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13590 (build-system python-build-system)
13591 (native-inputs
13592 `(("python-pytest" ,python-pytest)))
13593 (propagated-inputs
13594 `(("python-setuptools-scm" ,python-setuptools-scm)))
13595 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13596 (synopsis "Setuptools_scm plugin for git archives")
13597 (description
13598 "The setuptools_scm_git_archive package is a plugin to
13599 setuptools_scm, which supports obtaining versions from git archives that
13600 belong to tagged versions.")
13601 (license license:expat)))
13602
13603 (define-public python2-setuptools-scm-git-archive
13604 (package-with-python2 python-setuptools-scm-git-archive))
13605
13606 (define-public python-setuptools-git
13607 (package
13608 (name "python-setuptools-git")
13609 (version "1.2")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "setuptools-git" version))
13614 (sha256
13615 (base32
13616 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13617 (build-system python-build-system)
13618 (arguments
13619 `(#:phases
13620 (modify-phases %standard-phases
13621 ;; This is needed for tests.
13622 (add-after 'unpack 'configure-git
13623 (lambda _
13624 (setenv "HOME" "/tmp")
13625 (invoke "git" "config" "--global" "user.email" "guix")
13626 (invoke "git" "config" "--global" "user.name" "guix")
13627 #t)))))
13628 (native-inputs
13629 `(("git" ,git-minimal)))
13630 (home-page "https://github.com/msabramo/setuptools-git")
13631 (synopsis "Setuptools revision control system plugin for Git")
13632 (description
13633 "This package provides a plugin for Setuptools for revision control with
13634 Git.")
13635 (license license:bsd-3)))
13636
13637 (define-public python-pyclipper
13638 (package
13639 (name "python-pyclipper")
13640 (version "1.1.0.post1")
13641 (source
13642 (origin
13643 (method url-fetch)
13644 (uri (pypi-uri "pyclipper" version ".zip"))
13645 (sha256
13646 (base32
13647 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13648 (modules '((guix build utils)))
13649 (snippet
13650 '(begin
13651 ;; This file is generated by Cython.
13652 (delete-file "pyclipper/pyclipper.cpp") #t))))
13653 (build-system python-build-system)
13654 (arguments
13655 `(#:phases
13656 (modify-phases %standard-phases
13657 (add-before 'build 'cythonize-sources
13658 (lambda _
13659 (with-directory-excursion "pyclipper"
13660 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13661 (propagated-inputs
13662 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13663 (native-inputs
13664 `(("python-cython" ,python-cython)
13665 ("python-pytest" ,python-pytest)
13666 ("python-pytest-runner" ,python-pytest-runner)
13667 ("python-unittest2" ,python-unittest2)
13668 ("unzip" ,unzip)))
13669 (home-page "https://github.com/greginvm/pyclipper")
13670 (synopsis "Wrapper for Angus Johnson's Clipper library")
13671 (description
13672 "Pyclipper is a Cython wrapper for the C++ translation of the
13673 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13674 (license license:expat)))
13675
13676 (define-public python2-pyclipper
13677 (package-with-python2 python-pyclipper))
13678
13679 (define-public python2-booleanoperations
13680 (package
13681 (name "python2-booleanoperations")
13682 (version "0.7.1")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "booleanOperations" version ".zip"))
13687 (sha256
13688 (base32
13689 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13690 (build-system python-build-system)
13691 (arguments
13692 `(#:python ,python-2))
13693 (native-inputs
13694 `(("unzip" ,unzip)
13695 ("python2-pytest" ,python2-pytest)
13696 ("python2-pytest-runner" ,python2-pytest-runner)))
13697 (propagated-inputs
13698 `(("python-fonttools" ,python2-fonttools)
13699 ("python-pyclipper" ,python2-pyclipper)
13700 ("python-ufolib" ,python2-ufolib)))
13701 (home-page "https://github.com/typemytype/booleanOperations")
13702 (synopsis "Boolean operations on paths")
13703 (description
13704 "BooleanOperations provides a Python library that enables
13705 boolean operations on paths.")
13706 (license license:expat)))
13707
13708 (define-public python-tempdir
13709 (package
13710 (name "python-tempdir")
13711 (version "0.7.1")
13712 (source
13713 (origin
13714 (method url-fetch)
13715 (uri (pypi-uri "tempdir" version))
13716 (sha256
13717 (base32
13718 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13719 (build-system python-build-system)
13720 (home-page "https://pypi.org/project/tempdir/")
13721 (arguments
13722 ;; the package has no tests
13723 '(#:tests? #f))
13724 (synopsis "Python library for managing temporary directories")
13725 (description
13726 "This library manages temporary directories that are automatically
13727 deleted with all their contents when they are no longer needed. It is
13728 particularly convenient for use in tests.")
13729 (license license:expat)))
13730
13731 (define-public python2-tempdir
13732 (package-with-python2 python-tempdir))
13733
13734 (define-public python-activepapers
13735 (package
13736 (name "python-activepapers")
13737 (version "0.2.2")
13738 (source
13739 (origin
13740 (method url-fetch)
13741 (uri (pypi-uri "ActivePapers.Py" version))
13742 (sha256
13743 (base32
13744 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13745 (build-system python-build-system)
13746 (arguments
13747 `(#:modules ((ice-9 ftw)
13748 (srfi srfi-1)
13749 (guix build utils)
13750 (guix build python-build-system))
13751
13752 #:phases
13753 (modify-phases %standard-phases
13754 (add-after 'unpack 'delete-python2-code
13755 (lambda _
13756 (for-each delete-file
13757 '("lib/activepapers/builtins2.py"
13758 "lib/activepapers/standardlib2.py"
13759 "lib/activepapers/utility2.py"))))
13760 (replace 'check
13761 (lambda _
13762 ;; Deactivate the test cases that download files
13763 (setenv "NO_NETWORK_ACCESS" "1")
13764 ;; For some strange reason, some tests fail if nosetests runs all
13765 ;; test modules in a single execution. They pass if each test
13766 ;; module is run individually.
13767 (for-each (lambda (filename)
13768 (invoke "nosetests"
13769 (string-append "tests/" filename)))
13770 (scandir "tests"
13771 (lambda (filename)
13772 (string-suffix? ".py" filename)))))))))
13773 (native-inputs
13774 `(("python-tempdir" ,python-tempdir)
13775 ("python-nose" ,python-nose)))
13776 (propagated-inputs
13777 `(("python-h5py" ,python-h5py)))
13778 (home-page "http://www.activepapers.org/")
13779 (synopsis "Executable papers for scientific computing")
13780 (description
13781 "ActivePapers is a tool for working with executable papers, which
13782 combine data, code, and documentation in single-file packages,
13783 suitable for publication as supplementary material or on repositories
13784 such as figshare or Zenodo.")
13785 (properties `((python2-variant . ,(delay python2-activepapers))))
13786 (license license:bsd-3)))
13787
13788 (define-public python2-activepapers
13789 (let ((base (package-with-python2
13790 (strip-python2-variant python-activepapers))))
13791 (package
13792 (inherit base)
13793 (arguments
13794 (substitute-keyword-arguments (package-arguments base)
13795 ((#:phases phases)
13796 `(modify-phases ,phases
13797 (delete 'delete-python2-code)
13798 (add-after 'unpack 'delete-python3-code
13799 (lambda _
13800 (for-each delete-file
13801 '("lib/activepapers/builtins3.py"
13802 "lib/activepapers/standardlib3.py"
13803 "lib/activepapers/utility3.py")))))))))))
13804
13805 (define-public python-semver
13806 (package
13807 (name "python-semver")
13808 (version "2.7.9")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "semver" version))
13813 (sha256
13814 (base32
13815 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13816 (build-system python-build-system)
13817 (arguments
13818 `(#:phases
13819 (modify-phases %standard-phases
13820 (add-after 'unpack 'patch-test-requirements
13821 (lambda _
13822 (substitute* "setup.py"
13823 ;; Our Python is new enough.
13824 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13825 #t)))))
13826 (native-inputs
13827 `(("python-tox" ,python-tox)
13828 ("python-virtualenv" ,python-virtualenv)))
13829 (home-page "https://github.com/k-bx/python-semver")
13830 (synopsis "Python helper for Semantic Versioning")
13831 (description "This package provides a Python library for
13832 @url{Semantic Versioning, http://semver.org/}.")
13833 (license license:bsd-3)))
13834
13835 (define-public python2-semver
13836 (package-with-python2 python-semver))
13837
13838 (define-public python-pyro4
13839 (package
13840 (name "python-pyro4")
13841 (version "4.75")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "Pyro4" version))
13846 (sha256
13847 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13848 (build-system python-build-system)
13849 (propagated-inputs
13850 `(("python-serpent" ,python-serpent)))
13851 (home-page "https://pyro4.readthedocs.io")
13852 (synopsis "Distributed object middleware for Python")
13853 (description
13854 "Pyro enables you to build applications in which objects can talk to each
13855 other over the network. You can just use normal Python method calls to call
13856 objects on other machines, also known as remote procedure calls (RPC).")
13857 (license license:expat)))
13858
13859 (define-public python2-pyro
13860 (package
13861 (name "python2-pyro")
13862 (version "3.16")
13863 (source
13864 (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "Pyro" version))
13867 (file-name (string-append "Pyro-" version ".tar.gz"))
13868 (sha256
13869 (base32
13870 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13871 (build-system python-build-system)
13872 (arguments
13873 ;; Pyro is not compatible with Python 3
13874 `(#:python ,python-2
13875 ;; Pyro has no test cases for automatic execution
13876 #:tests? #f))
13877 (home-page "http://pythonhosted.org/Pyro/")
13878 (synopsis "Distributed object manager for Python")
13879 (description "Pyro is a Distributed Object Technology system
13880 written in Python that is designed to be easy to use. It resembles
13881 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13882 which is a system and language independent Distributed Object Technology
13883 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13884 longer maintained. New projects should use Pyro4 instead, which
13885 is the new Pyro version that is actively developed.")
13886 (license license:expat)))
13887
13888 (define-public python2-scientific
13889 (package
13890 (name "python2-scientific")
13891 (version "2.9.4")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (string-append "https://bitbucket.org/khinsen/"
13896 "scientificpython/downloads/ScientificPython-"
13897 version ".tar.gz"))
13898 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13899 (sha256
13900 (base32
13901 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13902 (build-system python-build-system)
13903 (inputs
13904 `(("netcdf" ,netcdf)))
13905 (propagated-inputs
13906 `(("python-numpy" ,python2-numpy-1.8)
13907 ("python-pyro" ,python2-pyro)))
13908 (arguments
13909 ;; ScientificPython is not compatible with Python 3
13910 `(#:python ,python-2
13911 #:tests? #f ; No test suite
13912 #:phases
13913 (modify-phases %standard-phases
13914 (replace 'build
13915 (lambda* (#:key inputs #:allow-other-keys)
13916 (invoke "python" "setup.py" "build"
13917 (string-append "--netcdf_prefix="
13918 (assoc-ref inputs "netcdf"))))))))
13919 (home-page "https://bitbucket.org/khinsen/scientificpython")
13920 (synopsis "Python modules for scientific computing")
13921 (description "ScientificPython is a collection of Python modules that are
13922 useful for scientific computing. Most modules are rather general (Geometry,
13923 physical units, automatic derivatives, ...) whereas others are more
13924 domain-specific (e.g. netCDF and PDB support). The library is currently
13925 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13926 (license license:cecill-c)))
13927
13928 (define-public python2-mmtk
13929 (package
13930 (name "python2-mmtk")
13931 (version "2.7.11")
13932 (source
13933 (origin
13934 (method url-fetch)
13935 (uri (string-append "https://bitbucket.org/khinsen/"
13936 "mmtk/downloads/MMTK-" version ".tar.gz"))
13937 (file-name (string-append "MMTK-" version ".tar.gz"))
13938 (sha256
13939 (base32
13940 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13941 (build-system python-build-system)
13942 (native-inputs
13943 `(("netcdf" ,netcdf)))
13944 (propagated-inputs
13945 `(("python-scientific" ,python2-scientific)
13946 ("python-tkinter" ,python-2 "tk")))
13947 (arguments
13948 `(#:python ,python-2
13949 #:tests? #f
13950 #:phases
13951 (modify-phases %standard-phases
13952 (add-before 'build 'includes-from-scientific
13953 (lambda* (#:key inputs #:allow-other-keys)
13954 (mkdir-p "Include/Scientific")
13955 (copy-recursively
13956 (string-append
13957 (assoc-ref inputs "python-scientific")
13958 "/include/python2.7/Scientific")
13959 "Include/Scientific"))))))
13960 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13961 (synopsis "Python library for molecular simulation")
13962 (description "MMTK is a library for molecular simulations with an emphasis
13963 on biomolecules. It provides widely used methods such as Molecular Dynamics
13964 and normal mode analysis, but also basic routines for implementing new methods
13965 for simulation and analysis. The library is currently not actively maintained
13966 and works only with Python 2 and NumPy < 1.9.")
13967 (license license:cecill-c)))
13968
13969 (define-public python-phonenumbers
13970 (package
13971 (name "python-phonenumbers")
13972 (version "8.9.1")
13973 (source
13974 (origin
13975 (method url-fetch)
13976 (uri (pypi-uri "phonenumbers" version))
13977 (sha256
13978 (base32
13979 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13980 (build-system python-build-system)
13981 (home-page
13982 "https://github.com/daviddrysdale/python-phonenumbers")
13983 (synopsis
13984 "Python library for dealing with international phone numbers")
13985 (description
13986 "This package provides a Python port of Google's libphonenumber library.")
13987 (license license:asl2.0)))
13988
13989 (define-public python2-phonenumbers
13990 (package-with-python2 python-phonenumbers))
13991
13992 (define-public python-send2trash
13993 (package
13994 (name "python-send2trash")
13995 (version "1.5.0")
13996 (source
13997 (origin (method git-fetch)
13998 ;; Source tarball on PyPI doesn't include tests.
13999 (uri (git-reference
14000 (url "https://github.com/hsoft/send2trash.git")
14001 (commit version)))
14002 (file-name (git-file-name name version))
14003 (sha256
14004 (base32
14005 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14006 (build-system python-build-system)
14007 (arguments
14008 '(#:phases
14009 (modify-phases %standard-phases
14010 (add-before 'check 'pre-check
14011 (lambda _
14012 (mkdir-p "/tmp/foo")
14013 (setenv "HOME" "/tmp/foo")
14014 #t)))))
14015 (home-page "https://github.com/hsoft/send2trash")
14016 (synopsis "Send files to the user's @file{~/Trash} directory")
14017 (description "This package provides a Python library to send files to the
14018 user's @file{~/Trash} directory.")
14019 (properties `((python2-variant . ,(delay python2-send2trash))))
14020 (license license:bsd-3)))
14021
14022 (define-public python2-send2trash
14023 (package
14024 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14025 (arguments
14026 (substitute-keyword-arguments (package-arguments python-send2trash)
14027 ((#:phases phases)
14028 `(modify-phases ,phases
14029 (add-before 'check 'setenv
14030 (lambda _
14031 (setenv "PYTHONPATH"
14032 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14033 #t))))))))
14034
14035 (define-public python-yapf
14036 (package
14037 (name "python-yapf")
14038 (version "0.24.0")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "yapf" version))
14043 (sha256
14044 (base32
14045 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14046 (build-system python-build-system)
14047 (home-page "https://github.com/google/yapf")
14048 (synopsis "Formatter for Python code")
14049 (description "YAPF is a formatter for Python code. It's based off of
14050 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14051 takes the code and reformats it to the best formatting that conforms to the
14052 style guide, even if the original code didn't violate the style guide.")
14053 (license license:asl2.0)))
14054
14055 (define-public python2-yapf
14056 (package-with-python2 python-yapf))
14057
14058 (define-public python-gyp
14059 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14060 (revision "0"))
14061 (package
14062 (name "python-gyp")
14063 ;; Google does not release versions,
14064 ;; based on second most recent commit date.
14065 (version (git-version "0.0.0" revision commit))
14066 (source
14067 (origin
14068 ;; Google does not release tarballs,
14069 ;; git checkout is needed.
14070 (method git-fetch)
14071 (uri (git-reference
14072 (url "https://chromium.googlesource.com/external/gyp")
14073 (commit commit)))
14074 (file-name (git-file-name name version))
14075 (sha256
14076 (base32
14077 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14078 (build-system python-build-system)
14079 (home-page "https://gyp.gsrc.io/")
14080 (synopsis "GYP is a Meta-Build system")
14081 (description
14082 "GYP builds build systems for large, cross platform applications.
14083 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14084 files, and Makefiles.")
14085 (license license:bsd-3))))
14086
14087 (define-public python2-gyp
14088 (package-with-python2 python-gyp))
14089
14090 (define-public python-whatever
14091 (package
14092 (name "python-whatever")
14093 (version "0.5")
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14098 ".tar.gz"))
14099 (sha256
14100 (base32
14101 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14102 (file-name (string-append name "-" version ".tar.gz"))))
14103 (build-system python-build-system)
14104 (arguments
14105 `(#:phases
14106 (modify-phases %standard-phases
14107 (replace 'check
14108 (lambda _
14109 (invoke "py.test"))))))
14110 (native-inputs
14111 `(("python-pytest" ,python-pytest)))
14112 (home-page "http://github.com/Suor/whatever")
14113 (synopsis "Make anonymous functions by partial application of operators")
14114 (description "@code{whatever} provides an easy way to make anonymous
14115 functions by partial application of operators.")
14116 (license license:bsd-3)))
14117
14118 (define-public python2-whatever
14119 (package-with-python2 python-whatever))
14120
14121 (define-public python-funcy
14122 (package
14123 (name "python-funcy")
14124 (version "1.11")
14125 (source
14126 (origin
14127 (method git-fetch)
14128 (uri (git-reference
14129 (url "https://github.com/Suor/funcy.git")
14130 (commit version)))
14131 (sha256
14132 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14133 (file-name (git-file-name name version))))
14134 (build-system python-build-system)
14135 (arguments
14136 `(#:phases
14137 (modify-phases %standard-phases
14138 (replace 'check
14139 (lambda _
14140 (invoke "py.test"))))))
14141 (native-inputs
14142 `(("python-pytest" ,python-pytest)
14143 ("python-whatever" ,python-whatever)))
14144 (home-page "http://github.com/Suor/funcy")
14145 (synopsis "Functional tools")
14146 (description "@code{funcy} is a library that provides functional tools.
14147 Examples are:
14148 @enumerate
14149 @item merge - Merges collections of the same type
14150 @item walk - Type-preserving map
14151 @item select - Selects a part of a collection
14152 @item take - Takes the first n items of a collection
14153 @item first - Takes the first item of a collection
14154 @item remove - Predicated-removes items of a collection
14155 @item concat - Concatenates two collections
14156 @item flatten - Flattens a collection with subcollections
14157 @item distinct - Returns only distinct items
14158 @item split - Predicated-splits a collection
14159 @item split_at - Splits a collection at a given item
14160 @item group_by - Groups items by group
14161 @item pairwise - Pairs off adjacent items
14162 @item partial - Partially-applies a function
14163 @item curry - Curries a function
14164 @item compose - Composes functions
14165 @item complement - Complements a predicate
14166 @item all_fn - \"all\" with predicate
14167 @end enumerate")
14168 (license license:bsd-3)))
14169
14170 (define-public python2-funcy
14171 (package-with-python2 python-funcy))
14172
14173 (define-public python-isoweek
14174 (package
14175 (name "python-isoweek")
14176 (version "1.3.3")
14177 (source
14178 (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "isoweek" version))
14181 (sha256
14182 (base32
14183 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14184 (build-system python-build-system)
14185 (home-page "https://github.com/gisle/isoweek")
14186 (synopsis "Objects representing a week")
14187 (description "The @code{isoweek} module provide the class Week that
14188 implements the week definition of ISO 8601. This standard also defines
14189 a notation for identifying weeks; yyyyWww (where the W is a literal).
14190 Week instances stringify to this form.")
14191 (license license:bsd-3)))
14192
14193 (define-public python2-isoweek
14194 (package-with-python2 python-isoweek))
14195
14196 (define-public python-tokenize-rt
14197 (package
14198 (name "python-tokenize-rt")
14199 (version "2.0.1")
14200 (source
14201 (origin
14202 (method url-fetch)
14203 (uri (pypi-uri "tokenize-rt" version))
14204 (sha256
14205 (base32
14206 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14207 (build-system python-build-system)
14208 (home-page "https://github.com/asottile/tokenize-rt")
14209 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14210 (description
14211 "This Python library is a wrapper around @code{tokenize} from the Python
14212 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14213 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14214 and @code{tokens_to_src} to roundtrip.")
14215 (license license:expat)))
14216
14217 (define-public python-future-fstrings
14218 (package
14219 (name "python-future-fstrings")
14220 (version "0.4.1")
14221 (source
14222 (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "future_fstrings" version))
14225 (sha256
14226 (base32
14227 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14228 (build-system python-build-system)
14229 (propagated-inputs
14230 `(("python-tokenize-rt" ,python-tokenize-rt)))
14231 (home-page "https://github.com/asottile/future-fstrings")
14232 (synopsis "Backport of fstrings to Python < 3.6")
14233 (description
14234 "This package provides a UTF-8 compatible encoding
14235 @code{future_fstrings}, which performs source manipulation. It decodes the
14236 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14237 @code{f} strings.")
14238 (license license:expat)))
14239
14240 (define-public python-typed-ast
14241 (package
14242 (name "python-typed-ast")
14243 (version "1.3.5")
14244 (source
14245 (origin
14246 (method url-fetch)
14247 (uri (pypi-uri "typed-ast" version))
14248 (sha256
14249 (base32
14250 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14251 (build-system python-build-system)
14252 (arguments
14253 `(#:modules ((guix build utils)
14254 (guix build python-build-system)
14255 (ice-9 ftw)
14256 (srfi srfi-1)
14257 (srfi srfi-26))
14258 #:phases
14259 (modify-phases %standard-phases
14260 (replace 'check
14261 (lambda _
14262 (let ((cwd (getcwd)))
14263 (setenv "PYTHONPATH"
14264 (string-append cwd "/build/"
14265 (find (cut string-prefix? "lib" <>)
14266 (scandir (string-append cwd "/build")))
14267 ":"
14268 (getenv "PYTHONPATH"))))
14269 (invoke "pytest")
14270 #t)))))
14271 (native-inputs `(("python-pytest" ,python-pytest)))
14272 (home-page "https://github.com/python/typed_ast")
14273 (synopsis "Fork of Python @code{ast} modules with type comment support")
14274 (description "This package provides a parser similar to the standard
14275 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14276 include PEP 484 type comments and are independent of the version of Python
14277 under which they are run. The @code{typed_ast} parsers produce the standard
14278 Python AST (plus type comments), and are both fast and correct, as they are
14279 based on the CPython 2.7 and 3.7 parsers.")
14280 ;; See the file "LICENSE" for the details.
14281 (license (list license:psfl
14282 license:asl2.0
14283 license:expat)))) ;ast27/Parser/spark.py
14284
14285 (define-public python-typing
14286 (package
14287 (name "python-typing")
14288 (version "3.6.6")
14289 (source
14290 (origin
14291 (method url-fetch)
14292 (uri (pypi-uri "typing" version))
14293 (sha256
14294 (base32
14295 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14296 (build-system python-build-system)
14297 (home-page "https://docs.python.org/3/library/typing.html")
14298 (synopsis "Type hints for Python")
14299 (description "This is a backport of the standard library @code{typing}
14300 module to Python versions older than 3.5. Typing defines a standard notation
14301 for Python function and variable type annotations. The notation can be used
14302 for documenting code in a concise, standard format, and it has been designed
14303 to also be used by static and runtime type checkers, static analyzers, IDEs
14304 and other tools.")
14305 (license license:psfl)))
14306
14307 (define-public python2-typing
14308 (package-with-python2 python-typing))
14309
14310 (define-public python-typing-extensions
14311 (package
14312 (name "python-typing-extensions")
14313 (version "3.7.2")
14314 (source
14315 (origin
14316 (method url-fetch)
14317 (uri (pypi-uri "typing_extensions" version))
14318 (sha256
14319 (base32
14320 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14321 (build-system python-build-system)
14322 (home-page
14323 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14324 (synopsis "Experimental type hints for Python")
14325 (description
14326 "The typing_extensions module contains additional @code{typing} hints not
14327 yet present in the of the @code{typing} standard library.
14328 Included are implementations of:
14329 @enumerate
14330 @item ClassVar
14331 @item ContextManager
14332 @item Counter
14333 @item DefaultDict
14334 @item Deque
14335 @item NewType
14336 @item NoReturn
14337 @item overload
14338 @item Protocol
14339 @item runtime
14340 @item Text
14341 @item Type
14342 @item TYPE_CHECKING
14343 @item AsyncGenerator
14344 @end enumerate\n")
14345 (license license:psfl)))
14346
14347 (define-public bpython
14348 (package
14349 (name "bpython")
14350 (version "0.17.1")
14351 (source
14352 (origin
14353 (method url-fetch)
14354 (uri (pypi-uri "bpython" version))
14355 (sha256
14356 (base32
14357 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14358 (build-system python-build-system)
14359 (arguments
14360 `(#:phases
14361 (modify-phases %standard-phases
14362 (add-after 'unpack 'remove-failing-test
14363 (lambda _
14364 ;; Remove failing test. FIXME: make it pass
14365 (delete-file "bpython/test/test_args.py")
14366 #t))
14367 (add-after 'wrap 'add-aliases
14368 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14369 (lambda* (#:key outputs #:allow-other-keys)
14370 (let ((out (assoc-ref outputs "out")))
14371 (for-each
14372 (lambda (old new)
14373 (symlink old (string-append out "/bin/" new)))
14374 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14375 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14376 #t)))))
14377 (propagated-inputs
14378 `(("python-pygments" ,python-pygments)
14379 ("python-requests" ,python-requests)
14380 ("python-babel" ,python-babel) ; optional, for internationalization
14381 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14382 ("python-greenlet" ,python-greenlet)
14383 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14384 ("python-six" ,python-six)))
14385 (native-inputs
14386 `(("python-sphinx" ,python-sphinx)
14387 ("python-mock" ,python-mock)))
14388 (home-page "https://bpython-interpreter.org/")
14389 (synopsis "Fancy interface to the Python interpreter")
14390 (description "Bpython is a fancy interface to the Python
14391 interpreter. bpython's main features are
14392
14393 @enumerate
14394 @item in-line syntax highlighting,
14395 @item readline-like autocomplete with suggestions displayed as you type,
14396 @item expected parameter list for any Python function,
14397 @item \"rewind\" function to pop the last line of code from memory and
14398 re-evaluate,
14399 @item send the code you've entered off to a pastebin,
14400 @item save the code you've entered to a file, and
14401 @item auto-indentation.
14402 @end enumerate")
14403 (license license:expat)))
14404
14405 (define-public bpython2
14406 (let ((base (package-with-python2
14407 (strip-python2-variant bpython))))
14408 (package (inherit base)
14409 (name "bpython2")
14410 (arguments
14411 `(#:python ,python-2
14412 #:phases
14413 (modify-phases %standard-phases
14414 (add-after 'unpack 'remove-failing-test
14415 (lambda _
14416 ;; Remove failing test. FIXME: make it pass
14417 (delete-file "bpython/test/test_args.py")
14418 ;; Disable failing test-cases (renaming inhibits they are
14419 ;; discovered)
14420 (substitute* "bpython/test/test_curtsies_repl.py"
14421 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14422 (string-append a "xxx_off_" b))
14423 (("^(\\s*def )(test_complex\\W)" _ a b)
14424 (string-append a "xxx_off_" b)))
14425 #t))
14426 (add-before 'build 'rename-scripts
14427 ;; rename the scripts to bypthon2, bpdb2, etc.
14428 (lambda _
14429 (substitute* "setup.py"
14430 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14431 (string-append name "2" rest "\n"))
14432 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14433 (string-append name "2" (or sub "") rest "\n")))
14434 #t))))))))
14435
14436 (define-public python-pyinotify
14437 (package
14438 (name "python-pyinotify")
14439 (version "0.9.6")
14440 (source (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "pyinotify" version))
14443 (sha256
14444 (base32
14445 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14446 (build-system python-build-system)
14447 (arguments `(#:tests? #f)) ;no tests
14448 (home-page "https://github.com/seb-m/pyinotify")
14449 (synopsis "Python library for monitoring inotify events")
14450 (description
14451 "@code{pyinotify} provides a Python interface for monitoring
14452 file system events on Linux.")
14453 (license license:expat)))
14454
14455 (define-public python2-pyinotify
14456 (package-with-python2 python-pyinotify))
14457
14458 ;; Ada parser uses this version.
14459 (define-public python2-quex-0.67.3
14460 (package
14461 (name "python2-quex")
14462 (version "0.67.3")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14467 (version-major+minor version)
14468 "/quex-" version ".zip"))
14469 (sha256
14470 (base32
14471 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14472 (build-system python-build-system)
14473 (native-inputs
14474 `(("unzip" ,unzip)))
14475 (arguments
14476 `(#:python ,python-2
14477 #:tests? #f
14478 #:phases
14479 (modify-phases %standard-phases
14480 (delete 'configure)
14481 (delete 'build)
14482 (replace 'install
14483 (lambda* (#:key outputs #:allow-other-keys)
14484 (let* ((out (assoc-ref outputs "out"))
14485 (share/quex (string-append out "/share/quex"))
14486 (bin (string-append out "/bin")))
14487 (copy-recursively "." share/quex)
14488 (mkdir-p bin)
14489 (symlink (string-append share/quex "/quex-exe.py")
14490 (string-append bin "/quex"))
14491 #t))))))
14492 (native-search-paths
14493 (list (search-path-specification
14494 (variable "QUEX_PATH")
14495 (files '("share/quex")))))
14496 (home-page "http://quex.sourceforge.net/")
14497 (synopsis "Lexical analyzer generator in Python")
14498 (description "@code{quex} is a lexical analyzer generator in Python.")
14499 (license license:lgpl2.1+))) ; Non-military
14500
14501 (define-public python2-quex
14502 (package (inherit python2-quex-0.67.3)
14503 (name "python2-quex")
14504 (version "0.68.1")
14505 (source
14506 (origin
14507 (method url-fetch)
14508 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14509 (sha256
14510 (base32
14511 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14512 (file-name (string-append name "-" version ".tar.gz"))))))
14513
14514 (define-public python-more-itertools
14515 (package
14516 (name "python-more-itertools")
14517 (version "7.1.0")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (pypi-uri "more-itertools" version))
14522 (sha256
14523 (base32
14524 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14525 (build-system python-build-system)
14526 (home-page "https://github.com/erikrose/more-itertools")
14527 (synopsis "More routines for operating on iterables, beyond itertools")
14528 (description "Python's built-in @code{itertools} module implements a
14529 number of iterator building blocks inspired by constructs from APL, Haskell,
14530 and SML. @code{more-itertools} includes additional building blocks for
14531 working with iterables.")
14532 (properties `((python2-variant . ,(delay python2-more-itertools))))
14533 (license license:expat)))
14534
14535 ;; The 5.x series are the last versions supporting Python 2.7.
14536 (define-public python2-more-itertools
14537 (package
14538 (inherit python-more-itertools)
14539 (name "python2-more-itertools")
14540 (version "5.0.0")
14541 (source (origin
14542 (method url-fetch)
14543 (uri (pypi-uri "more-itertools" version))
14544 (sha256
14545 (base32
14546 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14547 (arguments
14548 `(#:python ,python2-minimal))
14549 (propagated-inputs
14550 `(("python2-six" ,python2-six-bootstrap)))))
14551
14552 (define-public python-latexcodec
14553 (package
14554 (name "python-latexcodec")
14555 (version "1.0.6")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "latexcodec" version))
14560 (sha256
14561 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14562 (build-system python-build-system)
14563 (inputs
14564 `(("python-six" ,python-six)))
14565 (home-page "https://readthedocs.org/projects/latexcodec/")
14566 (synopsis "Work with LaTeX code in Python")
14567 (description "Lexer and codec to work with LaTeX code in Python.")
14568 (license license:expat)))
14569
14570 (define-public python-pybtex
14571 (package
14572 (name "python-pybtex")
14573 (version "0.21")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "pybtex" version))
14578 (sha256
14579 (base32
14580 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14581 (build-system python-build-system)
14582 (native-inputs
14583 `(("python-nose" ,python-nose)))
14584 (inputs
14585 `(("python-latexcodec" ,python-latexcodec)
14586 ("python-pyyaml" ,python-pyyaml)
14587 ("python-six" ,python-six)))
14588 (arguments
14589 `(#:test-target "nosetests"))
14590 (home-page "https://pybtex.org/")
14591 (synopsis "BibTeX-compatible bibliography processor")
14592 (description "Pybtex is a BibTeX-compatible bibliography processor written
14593 in Python. You can simply type pybtex instead of bibtex.")
14594 (license license:expat)))
14595
14596 (define-public python-onetimepass
14597 (package
14598 (name "python-onetimepass")
14599 (version "1.0.1")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "onetimepass" version))
14604 (sha256
14605 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14606 (build-system python-build-system)
14607 (propagated-inputs `(("python-six" ,python-six)))
14608 (home-page "https://github.com/tadeck/onetimepass/")
14609 (synopsis "One-time password library")
14610 (description "Python one-time password library for HMAC-based (HOTP) and
14611 time-based (TOTP) passwords.")
14612 (license license:expat)))
14613
14614 (define-public python-parso
14615 (package
14616 (name "python-parso")
14617 (version "0.3.1")
14618 (source
14619 (origin
14620 (method url-fetch)
14621 (uri (pypi-uri "parso" version))
14622 (sha256
14623 (base32
14624 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14625 (native-inputs
14626 `(("python-pytest" ,python-pytest)))
14627 (build-system python-build-system)
14628 (home-page "https://github.com/davidhalter/parso")
14629 (synopsis "Python Parser")
14630 (description "Parso is a Python parser that supports error recovery and
14631 round-trip parsing for different Python versions (in multiple Python versions).
14632 Parso is also able to list multiple syntax errors in your Python file.")
14633 (license license:expat)))
14634
14635 (define-public python2-parso
14636 (package-with-python2 python-parso))
14637
14638 (define-public python-async-generator
14639 (package
14640 (name "python-async-generator")
14641 (version "1.10")
14642 (source
14643 (origin
14644 (method url-fetch)
14645 (uri (pypi-uri "async_generator" version))
14646 (sha256
14647 (base32
14648 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14649 (build-system python-build-system)
14650 (native-inputs
14651 `(("python-pytest" ,python-pytest)))
14652 (home-page "https://github.com/python-trio/async_generator")
14653 (synopsis "Async generators and context managers for Python 3.5+")
14654 (description "@code{async_generator} back-ports Python 3.6's native async
14655 generators and Python 3.7's context managers into Python 3.5.")
14656 ;; Dual licensed.
14657 (license (list license:expat license:asl2.0))))
14658
14659 (define-public python-async-timeout
14660 (package
14661 (name "python-async-timeout")
14662 (version "3.0.1")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "async-timeout" version))
14667 (sha256
14668 (base32
14669 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14670 (build-system python-build-system)
14671 (home-page "https://github.com/aio-libs/async_timeout/")
14672 (synopsis "Timeout context manager for asyncio programs")
14673 (description "@code{async-timeout} provides a timeout timeout context
14674 manager compatible with @code{asyncio}.")
14675 (license license:asl2.0)))
14676
14677 (define-public python-glob2
14678 (package
14679 (name "python-glob2")
14680 (version "0.6")
14681 (source
14682 (origin
14683 (method git-fetch)
14684 (uri (git-reference
14685 (url "https://github.com/miracle2k/python-glob2.git")
14686 (commit version)))
14687 (file-name (git-file-name name version))
14688 (sha256
14689 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14690 (build-system python-build-system)
14691 (home-page "https://github.com/miracle2k/python-glob2/")
14692 (synopsis "Extended Version of the python buildin glob module")
14693 (description "This is an extended version of the Python
14694 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14695 adds:
14696
14697 @itemize
14698 @item The ability to capture the text matched by glob patterns, and return
14699 those matches alongside the file names.
14700 @item A recursive @code{**} globbing syntax, akin for example to the
14701 @code{globstar} option of Bash.
14702 @item The ability to replace the file system functions used, in order to glob
14703 on virtual file systems.
14704 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14705 @end itemize
14706
14707 Glob2 currently based on the glob code from Python 3.3.1.")
14708 (license license:bsd-2)))
14709
14710 (define-public python2-glob2
14711 (package-with-python2 python-glob2))
14712
14713 (define-public python-gipc
14714 (package
14715 (name "python-gipc")
14716 (version "0.6.0")
14717 (source
14718 (origin
14719 (method url-fetch)
14720 (uri (pypi-uri "gipc" version ".zip"))
14721 (sha256
14722 (base32
14723 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14724 (build-system python-build-system)
14725 (native-inputs
14726 `(("unzip" ,unzip)))
14727 (propagated-inputs
14728 `(("python-gevent" ,python-gevent)))
14729 (home-page "http://gehrcke.de/gipc")
14730 (synopsis "Child process management in the context of gevent")
14731 (description "Usage of Python's multiprocessing package in a
14732 gevent-powered application may raise problems. With @code{gipc},
14733 process-based child processes can safely be created anywhere within a
14734 gevent-powered application.")
14735 (license license:expat)))
14736
14737 (define-public python2-gipc
14738 (package-with-python2 python-gipc))
14739
14740 (define-public python-fusepy
14741 (package
14742 (name "python-fusepy")
14743 (version "2.0.4")
14744 (source
14745 (origin
14746 (method url-fetch)
14747 (uri (pypi-uri "fusepy" version))
14748 (sha256
14749 (base32
14750 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14751 (build-system python-build-system)
14752 (arguments
14753 `(#:phases
14754 (modify-phases %standard-phases
14755 (add-before 'build 'set-library-file-name
14756 (lambda* (#:key inputs #:allow-other-keys)
14757 (let ((fuse (assoc-ref inputs "fuse")))
14758 (substitute* "fuse.py"
14759 (("find_library\\('fuse'\\)")
14760 (string-append "'" fuse "/lib/libfuse.so'")))
14761 #t))))))
14762 (propagated-inputs
14763 `(("fuse" ,fuse)))
14764 (home-page "https://github.com/fusepy/fusepy")
14765 (synopsis "Simple ctypes bindings for FUSE")
14766 (description "Python module that provides a simple interface to FUSE and
14767 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14768 (license license:isc)))
14769
14770 (define-public python2-fusepy
14771 (package-with-python2 python-fusepy))
14772
14773 (define-public python2-gdrivefs
14774 (package
14775 (name "python2-gdrivefs")
14776 (version "0.14.9")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "gdrivefs" version))
14781 (sha256
14782 (base32
14783 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14784 (build-system python-build-system)
14785 (arguments
14786 `(#:python ,python-2
14787 #:phases
14788 (modify-phases %standard-phases
14789 (add-before 'build 'patch-setup-py
14790 (lambda _
14791 ;; Update requirements from dependency==version
14792 ;; to dependency>=version
14793 (substitute* "gdrivefs/resources/requirements.txt"
14794 (("==") ">="))
14795 #t)))))
14796 (native-inputs
14797 `(("python2-gipc" ,python2-gipc)
14798 ("python2-gevent" ,python2-gevent)
14799 ("python2-greenlet" ,python2-greenlet)
14800 ("python2-httplib2" ,python2-httplib2)
14801 ("python2-uritemplate" ,python2-uritemplate)
14802 ("python2-oauth2client" ,python2-oauth2client)
14803 ("python2-six" ,python2-six)))
14804 (propagated-inputs
14805 `(("python2-dateutil" ,python2-dateutil)
14806 ("python2-fusepy" ,python2-fusepy)
14807 ("python2-google-api-client" ,python2-google-api-client)))
14808 (home-page "https://github.com/dsoprea/GDriveFS")
14809 (synopsis "Mount Google Drive as a local file system")
14810 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14811 under Python 2.7.")
14812 (license license:gpl2)))
14813
14814 (define-public pybind11
14815 (package
14816 (name "pybind11")
14817 (version "2.2.4")
14818 (source (origin
14819 (method git-fetch)
14820 (uri (git-reference
14821 (url "https://github.com/pybind/pybind11.git")
14822 (commit (string-append "v" version))))
14823 (sha256
14824 (base32
14825 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14826 (file-name (git-file-name name version))))
14827 (build-system cmake-build-system)
14828 (native-inputs
14829 `(("python" ,python)
14830 ("python-pytest" ,python-pytest)))
14831 (arguments
14832 `(#:test-target "check"))
14833 (home-page "https://github.com/pybind/pybind11/")
14834 (synopsis "Seamless operability between C++11 and Python")
14835 (description "pybind11 is a lightweight header-only library that exposes
14836 C++ types in Python and vice versa, mainly to create Python bindings of
14837 existing C++ code. Its goals and syntax are similar to the excellent
14838 Boost.Python library by David Abrahams: to minimize boilerplate code in
14839 traditional extension modules by inferring type information using compile-time
14840 introspection.")
14841 (license license:expat)))
14842
14843 (define-public python-fasteners
14844 (package
14845 (name "python-fasteners")
14846 (version "0.14.1")
14847 (source
14848 (origin
14849 (method url-fetch)
14850 (uri (pypi-uri "fasteners" version))
14851 (sha256
14852 (base32
14853 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14854 (build-system python-build-system)
14855 (propagated-inputs
14856 `(("python-monotonic" ,python-monotonic)
14857 ("python-six" ,python-six)
14858 ("python-testtools" ,python-testtools)))
14859 (home-page "https://github.com/harlowja/fasteners")
14860 (synopsis "Python package that provides useful locks")
14861 (description
14862 "This package provides a Python program that provides following locks:
14863
14864 @itemize
14865 @item Locking decorator
14866 @item Reader-writer locks
14867 @item Inter-process locks
14868 @item Generic helpers
14869 @end itemize\n")
14870 (properties `((python2-variant . ,(delay python2-fasteners))))
14871 (license license:asl2.0)))
14872
14873 (define-public python2-fasteners
14874 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14875 (package
14876 (inherit base)
14877 (propagated-inputs
14878 `(("python2-futures" ,python2-futures)
14879 ,@(package-propagated-inputs base))))))
14880
14881 (define-public python-requests-file
14882 (package
14883 (name "python-requests-file")
14884 (version "1.4.3")
14885 (source
14886 (origin
14887 (method url-fetch)
14888 (uri (pypi-uri "requests-file" version))
14889 (sha256
14890 (base32
14891 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14892 (build-system python-build-system)
14893 (propagated-inputs
14894 `(("python-requests" ,python-requests)
14895 ("python-six" ,python-six)))
14896 (home-page
14897 "https://github.com/dashea/requests-file")
14898 (synopsis "File transport adapter for Requests")
14899 (description
14900 "Requests-File is a transport adapter for use with the Requests Python
14901 library to allow local file system access via @code{file://} URLs.")
14902 (license license:asl2.0)))
14903
14904 (define-public python2-requests-file
14905 (package-with-python2 python-requests-file))
14906
14907 (define-public python-tldextract
14908 (package
14909 (name "python-tldextract")
14910 (version "2.2.0")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "tldextract" version))
14915 (sha256
14916 (base32
14917 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14918 (build-system python-build-system)
14919 (native-inputs
14920 `(("python-pytest" ,python-pytest)
14921 ("python-responses" ,python-responses)))
14922 (propagated-inputs
14923 `(("python-idna" ,python-idna)
14924 ("python-requests" ,python-requests)
14925 ("python-requests-file" ,python-requests-file)))
14926 (home-page
14927 "https://github.com/john-kurkowski/tldextract")
14928 (synopsis
14929 "Separate the TLD from the registered domain and subdomains of a URL")
14930 (description
14931 "TLDExtract accurately separates the TLD from the registered domain and
14932 subdomains of a URL, using the Public Suffix List. By default, this includes
14933 the public ICANN TLDs and their exceptions. It can optionally support the
14934 Public Suffix List's private domains as well.")
14935 (license license:bsd-3)))
14936
14937 (define-public python2-tldextract
14938 (package-with-python2 python-tldextract))
14939
14940 (define-public python-pynamecheap
14941 (package
14942 (name "python-pynamecheap")
14943 (version "0.0.3")
14944 (source
14945 (origin
14946 (method url-fetch)
14947 (uri (pypi-uri "PyNamecheap" version))
14948 (sha256
14949 (base32
14950 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14951 (build-system python-build-system)
14952 (propagated-inputs
14953 `(("python-requests" ,python-requests)))
14954 (home-page
14955 "https://github.com/Bemmu/PyNamecheap")
14956 (synopsis
14957 "Namecheap API client in Python")
14958 (description
14959 "PyNamecheap is a Namecheap API client in Python.")
14960 (license license:expat)))
14961
14962 (define-public python2-pynamecheap
14963 (package-with-python2 python-pynamecheap))
14964
14965 (define-public python-dns-lexicon
14966 (package
14967 (name "python-dns-lexicon")
14968 (version "2.4.0")
14969 (source
14970 (origin
14971 (method url-fetch)
14972 (uri (pypi-uri "dns-lexicon" version))
14973 (sha256
14974 (base32
14975 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14976 (build-system python-build-system)
14977 (arguments
14978 `(#:tests? #f)) ;requires internet access
14979 (propagated-inputs
14980 `(("python-future" ,python-future)
14981 ("python-pynamecheap" ,python-pynamecheap)
14982 ("python-requests" ,python-requests)
14983 ("python-tldextract" ,python-tldextract)
14984 ("python-urllib3" ,python-urllib3)))
14985 (home-page "https://github.com/AnalogJ/lexicon")
14986 (synopsis
14987 "Manipulate DNS records on various DNS providers")
14988 (description
14989 "Lexicon provides a way to manipulate DNS records on multiple DNS
14990 providers in a standardized way. It has a CLI but it can also be used as a
14991 Python library. It was designed to be used in automation, specifically with
14992 Let's Encrypt.")
14993 (license license:expat)))
14994
14995 (define-public python2-dns-lexicon
14996 (package-with-python2 python-dns-lexicon))
14997
14998 (define-public python-commandlines
14999 (package
15000 (name "python-commandlines")
15001 (version "0.4.1")
15002 (source
15003 (origin
15004 (method url-fetch)
15005 (uri (pypi-uri "commandlines" version))
15006 (sha256
15007 (base32
15008 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15009 (build-system python-build-system)
15010 (home-page "https://github.com/chrissimpkins/commandlines")
15011 (synopsis "Command line argument to object parsing library")
15012 (description
15013 "@code{Commandlines} is a Python library for command line application
15014 development that supports command line argument parsing, command string
15015 validation testing and application logic.")
15016 (license license:expat)))
15017
15018 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15019 ;; python-numba. They have a very unflexible relationship.
15020 (define-public python-numba
15021 (package
15022 (name "python-numba")
15023 (version "0.42.0")
15024 (source
15025 (origin
15026 (method url-fetch)
15027 (uri (pypi-uri "numba" version))
15028 (sha256
15029 (base32
15030 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15031 (build-system python-build-system)
15032 (arguments
15033 `(#:modules ((guix build utils)
15034 (guix build python-build-system)
15035 (ice-9 ftw)
15036 (srfi srfi-1)
15037 (srfi srfi-26))
15038 #:phases
15039 (modify-phases %standard-phases
15040 (add-after 'unpack 'disable-proprietary-features
15041 (lambda _
15042 (setenv "NUMBA_DISABLE_HSA" "1")
15043 (setenv "NUMBA_DISABLE_CUDA" "1")
15044 #t))
15045 (add-after 'unpack 'remove-failing-tests
15046 (lambda _
15047 ;; FIXME: these tests fail for unknown reasons:
15048 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15049 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15050 (substitute* "numba/tests/test_dispatcher.py"
15051 (("def test(_non_writable_pycache)" _ m)
15052 (string-append "def guix_skip" m))
15053 (("def test(_non_creatable_pycache)" _ m)
15054 (string-append "def guix_skip" m))
15055 (("def test(_frozen)" _ m)
15056 (string-append "def guix_skip" m)))
15057
15058 ;; These tests fail because we don't run the tests from the build
15059 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15060 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15061 (substitute* "numba/tests/test_pycc.py"
15062 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15063 (string-append "def guix_skip" m)))
15064 #t))
15065 (replace 'check
15066 (lambda _
15067 (let ((cwd (getcwd)))
15068 (setenv "PYTHONPATH"
15069 (string-append cwd "/build/"
15070 (find (cut string-prefix? "lib" <>)
15071 (scandir (string-append cwd "/build")))
15072 ":"
15073 (getenv "PYTHONPATH")))
15074 ;; Something is wrong with the PYTHONPATH when running the
15075 ;; tests from the build directory, as it complains about not being
15076 ;; able to import certain modules.
15077 (with-directory-excursion "/tmp"
15078 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15079 #t)))))
15080 (propagated-inputs
15081 `(("python-llvmlite" ,python-llvmlite)
15082 ("python-numpy" ,python-numpy)
15083 ("python-singledispatch" ,python-singledispatch)))
15084 ;; Needed for tests.
15085 (inputs
15086 `(("python-jinja2" ,python-jinja2)
15087 ("python-pygments" ,python-pygments)))
15088 (home-page "https://numba.pydata.org")
15089 (synopsis "Compile Python code using LLVM")
15090 (description "Numba gives you the power to speed up your applications with
15091 high performance functions written directly in Python. With a few
15092 annotations, array-oriented and math-heavy Python code can be just-in-time
15093 compiled to native machine instructions, similar in performance to C, C++ and
15094 Fortran, without having to switch languages or Python interpreters.
15095
15096 Numba works by generating optimized machine code using the LLVM compiler
15097 infrastructure at import time, runtime, or statically (using the included pycc
15098 tool).")
15099 (license license:bsd-3)))
15100
15101 (define-public python-anndata
15102 (package
15103 (name "python-anndata")
15104 (version "0.6.18")
15105 (source
15106 (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "anndata" version))
15109 (sha256
15110 (base32
15111 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15112 (build-system python-build-system)
15113 (propagated-inputs
15114 `(("python-h5py" ,python-h5py)
15115 ("python-natsort" ,python-natsort)
15116 ("python-pandas" ,python-pandas)
15117 ("python-scipy" ,python-scipy)))
15118 (home-page "https://github.com/theislab/anndata")
15119 (synopsis "Annotated data for data analysis pipelines")
15120 (description "Anndata is a package for simple (functional) high-level APIs
15121 for data analysis pipelines. In this context, it provides an efficient,
15122 scalable way of keeping track of data together with learned annotations and
15123 reduces the code overhead typically encountered when using a mostly
15124 object-oriented library such as @code{scikit-learn}.")
15125 (license license:bsd-3)))
15126
15127 (define-public python-dill
15128 (package
15129 (name "python-dill")
15130 (version "0.2.9")
15131 (source
15132 (origin
15133 (method url-fetch)
15134 (uri (pypi-uri "dill" version))
15135 (sha256
15136 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15137 (build-system python-build-system)
15138 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15139 (arguments '(#:tests? #f))
15140 (home-page "https://pypi.org/project/dill")
15141 (synopsis "Serialize all of Python")
15142 (description "Dill extends Python's @code{pickle} module for serializing
15143 and de-serializing Python objects to the majority of the built-in Python
15144 types. Dill provides the user the same interface as the @code{pickle} module,
15145 and also includes some additional features. In addition to pickling Python
15146 objects, @code{dill} provides the ability to save the state of an interpreter
15147 session in a single command. Hence, it would be feasible to save a
15148 interpreter session, close the interpreter, ship the pickled file to another
15149 computer, open a new interpreter, unpickle the session and thus continue from
15150 the saved state of the original interpreter session.")
15151 (license license:bsd-3)))
15152
15153 (define-public python-multiprocess
15154 (package
15155 (name "python-multiprocess")
15156 (version "0.70.6.1")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "multiprocess" version))
15161 (sha256
15162 (base32
15163 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15164 (build-system python-build-system)
15165 (propagated-inputs
15166 `(("python-dill" ,python-dill)))
15167 (home-page "https://pypi.org/project/multiprocess")
15168 (synopsis "Multiprocessing and multithreading in Python")
15169 (description
15170 "This package is a fork of the multiprocessing Python package, a package
15171 which supports the spawning of processes using the API of the standard
15172 library's @code{threading} module.")
15173 (license license:bsd-3)))
15174
15175 (define-public python-toolz
15176 (package
15177 (name "python-toolz")
15178 (version "0.9.0")
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "toolz" version))
15183 (sha256
15184 (base32
15185 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15186 (build-system python-build-system)
15187 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15188 ;; unregistered loader type"
15189 (arguments '(#:tests? #f))
15190 (home-page "https://github.com/pytoolz/toolz/")
15191 (synopsis "List processing tools and functional utilities")
15192 (description
15193 "This package provides a set of utility functions for iterators,
15194 functions, and dictionaries.")
15195 (license license:bsd-3)))
15196
15197 (define-public python2-toolz
15198 (package-with-python2 python-toolz))
15199
15200 (define-public python-cytoolz
15201 (package
15202 (name "python-cytoolz")
15203 (version "0.9.0.1")
15204 (source
15205 (origin
15206 (method url-fetch)
15207 (uri (pypi-uri "cytoolz" version))
15208 (sha256
15209 (base32
15210 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15211 (build-system python-build-system)
15212 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15213 ;; 'exceptions'"
15214 (arguments '(#:tests? #f))
15215 (propagated-inputs
15216 `(("python-toolz" ,python-toolz)))
15217 (native-inputs
15218 `(("python-cython" ,python-cython)))
15219 (home-page "https://github.com/pytoolz/cytoolz")
15220 (synopsis "High performance functional utilities")
15221 (description
15222 "The cytoolz package implements the same API as provided by toolz. The
15223 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15224 that is accessible to other projects developed in Cython.")
15225 (license license:bsd-3)))
15226
15227 (define-public python-sortedcontainers
15228 (package
15229 (name "python-sortedcontainers")
15230 (version "2.0.4")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "sortedcontainers" version))
15235 (sha256
15236 (base32
15237 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15238 (build-system python-build-system)
15239 (native-inputs
15240 `(("python-tox" ,python-tox)))
15241 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15242 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15243 (description
15244 "This package provides a sorted collections library, written in
15245 pure-Python.")
15246 (license license:asl2.0)))
15247
15248 (define-public python-cloudpickle
15249 (package
15250 (name "python-cloudpickle")
15251 (version "0.6.1")
15252 (source
15253 (origin
15254 (method url-fetch)
15255 (uri (pypi-uri "cloudpickle" version))
15256 (sha256
15257 (base32
15258 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15259 (build-system python-build-system)
15260 ;; FIXME: there are 5 errors in 122 tests:
15261 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15262 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15263 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15264 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15265 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15266 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15267 (arguments '(#:tests? #f))
15268 (native-inputs
15269 `(("python-pytest" ,python-pytest)
15270 ("python-mock" ,python-mock)
15271 ("python-tornado" ,python-tornado)))
15272 (home-page "https://github.com/cloudpipe/cloudpickle")
15273 (synopsis "Extended pickling support for Python objects")
15274 (description
15275 "Cloudpickle makes it possible to serialize Python constructs not
15276 supported by the default pickle module from the Python standard library. It
15277 is especially useful for cluster computing where Python expressions are
15278 shipped over the network to execute on remote hosts, possibly close to the
15279 data.")
15280 (license license:bsd-3)))
15281
15282 (define-public python2-cloudpickle
15283 (package-with-python2 python-cloudpickle))
15284
15285 (define-public python-locket
15286 (package
15287 (name "python-locket")
15288 (version "0.2.0")
15289 (source
15290 (origin
15291 (method url-fetch)
15292 (uri (pypi-uri "locket" version))
15293 (sha256
15294 (base32
15295 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15296 (build-system python-build-system)
15297 (home-page "https://github.com/mwilliamson/locket.py")
15298 (synopsis "File-based locks for Python")
15299 (description
15300 "Locket implements a lock that can be used by multiple processes provided
15301 they use the same path.")
15302 (license license:bsd-2)))
15303
15304 (define-public python2-locket
15305 (package-with-python2 python-locket))
15306
15307 (define-public python-blosc
15308 (package
15309 (name "python-blosc")
15310 (version "1.5.1")
15311 (source
15312 (origin
15313 (method url-fetch)
15314 (uri (pypi-uri "blosc" version))
15315 (sha256
15316 (base32
15317 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15318 (build-system python-build-system)
15319 ;; FIXME: all tests pass, but then this error is printed:
15320 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15321 (arguments '(#:tests? #f))
15322 (propagated-inputs
15323 `(("python-numpy" ,python-numpy)))
15324 (home-page "https://github.com/blosc/python-blosc")
15325 (synopsis "Python wrapper for the Blosc data compressor library")
15326 (description "Blosc is a high performance compressor optimized for binary
15327 data. It has been designed to transmit data to the processor cache faster
15328 than the traditional, non-compressed, direct memory fetch approach via a
15329 @code{memcpy()} system call.
15330
15331 Blosc works well for compressing numerical arrays that contains data with
15332 relatively low entropy, like sparse data, time series, grids with
15333 regular-spaced values, etc.
15334
15335 This Python package wraps the Blosc library.")
15336 (license license:bsd-3)))
15337
15338 (define-public python2-blosc
15339 (package-with-python2 python-blosc))
15340
15341 (define-public python-partd
15342 (package
15343 (name "python-partd")
15344 (version "0.3.9")
15345 (source
15346 (origin
15347 (method url-fetch)
15348 (uri (pypi-uri "partd" version))
15349 (sha256
15350 (base32
15351 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15352 (build-system python-build-system)
15353 (propagated-inputs
15354 `(("python-blosc" ,python-blosc)
15355 ("python-locket" ,python-locket)
15356 ("python-numpy" ,python-numpy)
15357 ("python-pandas" ,python-pandas)
15358 ("python-pyzmq" ,python-pyzmq)
15359 ("python-toolz" ,python-toolz)))
15360 (home-page "https://github.com/dask/partd/")
15361 (synopsis "Appendable key-value storage")
15362 (description "Partd stores key-value pairs. Values are raw bytes. We
15363 append on old values. Partd excels at shuffling operations.")
15364 (license license:bsd-3)))
15365
15366 (define-public python2-partd
15367 (package-with-python2 python-partd))
15368
15369 (define-public python-dask
15370 (package
15371 (name "python-dask")
15372 (version "1.2.2")
15373 (source
15374 (origin
15375 (method url-fetch)
15376 (uri (pypi-uri "dask" version))
15377 (sha256
15378 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15379 (build-system python-build-system)
15380 ;; A single test out of 5000+ fails. This test is marked as xfail when
15381 ;; pytest-xdist is used.
15382 (arguments
15383 `(#:phases
15384 (modify-phases %standard-phases
15385 (add-after 'unpack 'disable-broken-test
15386 (lambda _
15387 (substitute* "dask/tests/test_threaded.py"
15388 (("def test_interrupt\\(\\)" m)
15389 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15390 m)))
15391 (when (which "python2")
15392 ;; This test fails with recent Pandas:
15393 ;; <https://github.com/dask/dask/issues/3794>.
15394 (substitute* "dask/dataframe/tests/test_dataframe.py"
15395 (("def test_info\\(\\)" m)
15396 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15397 m))))
15398 #t))
15399 (replace 'check
15400 (lambda _ (invoke "pytest" "-vv"))))))
15401 (propagated-inputs
15402 `(("python-cloudpickle" ,python-cloudpickle)
15403 ("python-numpy" ,python-numpy)
15404 ("python-pandas" ,python-pandas)
15405 ("python-partd" ,python-partd)
15406 ("python-toolz" ,python-toolz)
15407 ("python-pyyaml" ,python-pyyaml)))
15408 (native-inputs
15409 `(("python-pytest" ,python-pytest)
15410 ("python-pytest-runner" ,python-pytest-runner)))
15411 (home-page "https://github.com/dask/dask/")
15412 (synopsis "Parallel computing with task scheduling")
15413 (description
15414 "Dask is a flexible parallel computing library for analytics. It
15415 consists of two components: dynamic task scheduling optimized for computation,
15416 and large data collections like parallel arrays, dataframes, and lists that
15417 extend common interfaces like NumPy, Pandas, or Python iterators to
15418 larger-than-memory or distributed environments. These parallel collections
15419 run on top of the dynamic task schedulers. ")
15420 (license license:bsd-3)))
15421
15422 (define-public python2-dask
15423 (package-with-python2 python-dask))
15424
15425 (define-public python-ilinkedlist
15426 (package
15427 (name "python-ilinkedlist")
15428 (version "0.4.0")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "ilinkedlist" version))
15433 (sha256
15434 (base32
15435 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15436 (build-system python-build-system)
15437 (native-inputs `(("python-pytest" ,python-pytest)))
15438 (inputs `(("python" ,python)))
15439 (home-page "https://github.com/luther9/ilinkedlist-py")
15440 (synopsis "Immutable linked list library")
15441 (description
15442 "This is a implementation of immutable linked lists for Python. It
15443 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15444 Since a linked list is treated as immutable, it is hashable, and its length
15445 can be retrieved in constant time. Some of the terminology is inspired by
15446 LISP. It is possible to create an improper list by creating a @code{Pair}
15447 with a non-list @code{cdr}.")
15448 (license license:gpl3+)))
15449
15450 (define-public python-readlike
15451 (package
15452 (name "python-readlike")
15453 (version "0.1.3")
15454 (source
15455 (origin
15456 (method url-fetch)
15457 (uri (pypi-uri "readlike" version))
15458 (sha256
15459 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15460 (build-system python-build-system)
15461 (home-page "https://github.com/jangler/readlike")
15462 (synopsis "GNU Readline-like line editing module")
15463 (description
15464 "This Python module provides line editing functions similar to the default
15465 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15466 @code{readline} package, this one allows access to those capabilties in settings
15467 outside of a standard command-line interface. It is especially well-suited to
15468 interfacing with Urwid, due to a shared syntax for describing key inputs.
15469
15470 Currently, all stateless Readline commands are implemented. Yanking and history
15471 are not supported.")
15472 (license license:expat)))
15473
15474 (define-public python2-readlike
15475 (package-with-python2 python-readlike))
15476
15477 (define-public python-reparser
15478 (package
15479 (name "python-reparser")
15480 (version "1.4.3")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (pypi-uri "ReParser" version))
15485 (sha256
15486 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15487 (build-system python-build-system)
15488 (home-page "https://github.com/xmikos/reparser")
15489 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15490 (description
15491 "This Python library provides a simple lexer/parser for inline markup based
15492 on regular expressions.")
15493 (license license:expat)))
15494
15495 (define-public python2-reparser
15496 (let ((reparser (package-with-python2
15497 (strip-python2-variant python-reparser))))
15498 (package (inherit reparser)
15499 (propagated-inputs
15500 `(("python2-enum34" ,python2-enum34)
15501 ,@(package-propagated-inputs reparser))))))
15502
15503 (define-public python-precis-i18n
15504 (package
15505 (name "python-precis-i18n")
15506 (version "1.0.0")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "precis_i18n" version))
15511 (sha256
15512 (base32
15513 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15514 (build-system python-build-system)
15515 (home-page "https://github.com/byllyfish/precis_i18n")
15516 (synopsis "Implementation of the PRECIS framework")
15517 (description
15518 "This module implements the PRECIS Framework as described in RFC 8264,
15519 RFC 8265 and RFC 8266.")
15520 (license license:expat)))
15521
15522 (define-public python-absl-py
15523 (package
15524 (name "python-absl-py")
15525 (version "0.6.1")
15526 (source
15527 (origin
15528 (method url-fetch)
15529 (uri (pypi-uri "absl-py" version))
15530 (sha256
15531 (base32
15532 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15533 (build-system python-build-system)
15534 (propagated-inputs
15535 `(("python-six" ,python-six)))
15536 (home-page "https://github.com/abseil/abseil-py")
15537 (synopsis "Abseil Python common libraries")
15538 (description
15539 "This package provides the Abseil Python Common Libraries, a collection
15540 of Python libraries for building Python applications.")
15541 (license license:asl2.0)))
15542
15543 (define-public python-astor
15544 (package
15545 (name "python-astor")
15546 (version "0.7.1")
15547 (source
15548 (origin
15549 (method url-fetch)
15550 (uri (pypi-uri "astor" version))
15551 (sha256
15552 (base32
15553 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15554 (build-system python-build-system)
15555 ;; FIXME: There are two errors and two test failures.
15556 (arguments `(#:tests? #f))
15557 (home-page "https://github.com/berkerpeksag/astor")
15558 (synopsis "Read and write Python ASTs")
15559 (description "Astor is designed to allow easy manipulation of Python
15560 source via the Abstract Syntax Tree.")
15561 (license license:bsd-3)))
15562
15563 (define-public python2-astor
15564 (package-with-python2 python-astor))
15565
15566 (define-public python-grpcio
15567 (package
15568 (name "python-grpcio")
15569 (version "1.17.1")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "grpcio" version))
15574 (sha256
15575 (base32
15576 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15577 (build-system python-build-system)
15578 (propagated-inputs
15579 `(("python-six" ,python-six)))
15580 (home-page "https://grpc.io")
15581 (synopsis "HTTP/2-based RPC framework")
15582 (description "This package provides a Python library for communicating
15583 with the HTTP/2-based RPC framework gRPC.")
15584 (license license:asl2.0)))
15585
15586 (define-public python-astunparse
15587 (package
15588 (name "python-astunparse")
15589 (version "1.6.2")
15590 (source
15591 (origin
15592 (method url-fetch)
15593 (uri (pypi-uri "astunparse" version))
15594 (sha256
15595 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15596 (build-system python-build-system)
15597 (arguments '(#:tests? #f)) ; there are none
15598 (propagated-inputs
15599 `(("python-six" ,python-six)
15600 ("python-wheel" ,python-wheel)))
15601 (home-page "https://github.com/simonpercivall/astunparse")
15602 (synopsis "AST unparser for Python")
15603 (description "This package provides an AST unparser for Python. It is a
15604 factored out version of @code{unparse} found in the Python source
15605 distribution.")
15606 (license license:bsd-3)))
15607
15608 (define-public python-gast
15609 (package
15610 (name "python-gast")
15611 (version "0.2.2")
15612 (source
15613 (origin
15614 (method url-fetch)
15615 (uri (pypi-uri "gast" version))
15616 (sha256
15617 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15618 (build-system python-build-system)
15619 (propagated-inputs
15620 `(("python-astunparse" ,python-astunparse)))
15621 (home-page "https://pypi.org/project/gast/")
15622 (synopsis "Generic Python AST that abstracts the underlying Python version")
15623 (description
15624 "GAST provides a compatibility layer between the AST of various Python
15625 versions, as produced by @code{ast.parse} from the standard @code{ast}
15626 module.")
15627 (license license:bsd-3)))
15628
15629 (define-public python-wikidata
15630 (package
15631 (name "python-wikidata")
15632 (version "0.6.1")
15633 (source
15634 (origin
15635 (method url-fetch)
15636 (uri (pypi-uri "Wikidata" version))
15637 (sha256
15638 (base32
15639 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15640 (build-system python-build-system)
15641 (propagated-inputs
15642 `(("python-babel" ,python-babel)))
15643 (home-page "https://github.com/dahlia/wikidata")
15644 (synopsis "Wikidata client library")
15645 (description
15646 "This package provides a Python interface to
15647 @url{https://www.wikidata.org/, Wikidata}.")
15648 (properties '((upstream-name . "Wikidata")))
15649 (license license:gpl3+)))
15650
15651 (define-public python-doctest-ignore-unicode
15652 (package
15653 (name "python-doctest-ignore-unicode")
15654 (version "0.1.2")
15655 (source
15656 (origin
15657 (method url-fetch)
15658 (uri (pypi-uri "doctest-ignore-unicode" version))
15659 (sha256
15660 (base32
15661 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15662 (build-system python-build-system)
15663 (native-inputs
15664 `(("python-nose" ,python-nose)))
15665 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15666 (synopsis "Ignore Unicode literal prefixes in doctests")
15667 (description
15668 "This package adds support for a flag to ignore Unicode literal prefixes
15669 in doctests.")
15670 (license license:asl2.0)))
15671
15672 (define-public python-attr
15673 (package
15674 (name "python-attr")
15675 (version "0.3.1")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "attr" version))
15680 (sha256
15681 (base32
15682 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15683 (build-system python-build-system)
15684 (home-page "https://github.com/denis-ryzhkov/attr")
15685 (synopsis "Decorator for attributes of target function or class")
15686 (description "Simple decorator to set attributes of target function or
15687 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15688 (license license:expat)))
15689
15690 (define-public python-construct
15691 (package
15692 (name "python-construct")
15693 (version "2.9.45")
15694 (source
15695 (origin
15696 (method url-fetch)
15697 (uri (pypi-uri "construct" version))
15698 (sha256
15699 (base32
15700 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15701 (build-system python-build-system)
15702 (arguments
15703 `(#:tests? #f)) ; No tests exist.
15704 (propagated-inputs
15705 `(("python-extras" ,python-extras)
15706 ("python-arrow" ,python-arrow)
15707 ("python-numpy" ,python-numpy)
15708 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15709 (home-page "http://construct.readthedocs.io")
15710 (synopsis "Declarative and symmetrical parser and builder for binary data")
15711 (description
15712 "This package provides both simple, atomic constructs (such as
15713 integers of various sizes), as well as composite ones which allow you
15714 form hierarchical and sequential structures of increasing complexity.
15715 It features bit and byte granularity, easy debugging and testing, an
15716 easy-to-extend subclass system, and lots of primitive constructs to
15717 make your work easier.")
15718 (license license:expat)))
15719
15720 (define-public python-humanize
15721 (package
15722 (name "python-humanize")
15723 (version "0.5.1")
15724 (source
15725 (origin
15726 (method url-fetch)
15727 (uri (pypi-uri "humanize" version))
15728 (sha256
15729 (base32
15730 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15731 (arguments
15732 '(#:tests? #f)) ; tests not in pypi archive
15733 (build-system python-build-system)
15734 (home-page "https://github.com/jmoiron/humanize")
15735 (synopsis "Print numerical information in a human-readable form")
15736 (description "This package provides a Python module that displays numbers
15737 and dates in \"human readable\" forms. For example, it would display
15738 \"12345591313\" as \"12.3 billion\".")
15739 (license license:expat)))
15740
15741 (define-public python-txaio
15742 (package
15743 (name "python-txaio")
15744 (version "18.8.1")
15745 (source
15746 (origin
15747 (method url-fetch)
15748 (uri (pypi-uri "txaio" version))
15749 (sha256
15750 (base32
15751 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15752 (build-system python-build-system)
15753 (propagated-inputs
15754 `(("python-twisted" ,python-twisted)
15755 ("python-six" ,python-six)))
15756 (home-page "https://github.com/crossbario/txaio")
15757 (synopsis "Compatibility layer between Python asyncio and Twisted")
15758 (description "Txaio provides a compatibility layer between the Python
15759 @code{asyncio} module and @code{Twisted}.")
15760 (license license:expat)))
15761
15762 (define-public python-toolshed
15763 (package
15764 (name "python-toolshed")
15765 (version "0.4.6")
15766 (source
15767 (origin
15768 (method url-fetch)
15769 (uri (pypi-uri "toolshed" version))
15770 (sha256
15771 (base32
15772 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15773 (build-system python-build-system)
15774 (native-inputs
15775 `(("python-nose" ,python-nose)))
15776 (home-page "https://github.com/brentp/toolshed/")
15777 (synopsis "Collection of modules and functions for working with data")
15778 (description "This is a collection of well-tested, simple modules and
15779 functions that aim to reduce boilerplate when working with data.")
15780 (license license:bsd-2)))
15781
15782 (define-public python-annoy
15783 (package
15784 (name "python-annoy")
15785 (version "1.15.1")
15786 (source
15787 (origin
15788 (method url-fetch)
15789 (uri (pypi-uri "annoy" version))
15790 (sha256
15791 (base32
15792 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15793 (build-system python-build-system)
15794 (native-inputs
15795 `(("python-nose" ,python-nose)))
15796 (home-page "https://github.com/spotify/annoy/")
15797 (synopsis "Approximate nearest neighbors library")
15798 (description
15799 "Annoy is a C++ library with Python bindings to search for points in
15800 space that are close to a given query point. It also creates large read-only
15801 file-based data structures that are @code{mmap}ped into memory so that many
15802 processes may share the same data.")
15803 (license license:asl2.0)))
15804
15805 (define-public python-pylzma
15806 (package
15807 (name "python-pylzma")
15808 (version "0.5.0")
15809 (source
15810 (origin
15811 (method url-fetch)
15812 (uri (pypi-uri "pylzma" version))
15813 (sha256
15814 (base32
15815 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15816 (build-system python-build-system)
15817 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15818 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15819 (description "This package provides Python bindings for the LZMA library
15820 by Igor Pavlov.")
15821 (license license:lgpl2.1+)))
15822
15823 (define-public python2-pylzma
15824 (package-with-python2 python-pylzma))
15825
15826 (define-public python2-zeroconf
15827 (package
15828 (name "python2-zeroconf")
15829
15830 ;; This is the last version that supports Python 2.x.
15831 (version "0.19.1")
15832 (source
15833 (origin
15834 (method url-fetch)
15835 (uri (pypi-uri "zeroconf" version))
15836 (sha256
15837 (base32
15838 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15839 (build-system python-build-system)
15840 (arguments
15841 `(#:python ,python-2
15842 #:phases
15843 (modify-phases %standard-phases
15844 (add-after 'unpack 'patch-requires
15845 (lambda* (#:key inputs #:allow-other-keys)
15846 (substitute* "setup.py"
15847 (("enum-compat")
15848 "enum34"))
15849 #t)))))
15850 (native-inputs
15851 `(("python2-six" ,python2-six)
15852 ("python2-enum32" ,python2-enum34)
15853 ("python2-netifaces" ,python2-netifaces)
15854 ("python2-typing" ,python2-typing)))
15855 (home-page "https://github.com/jstasiak/python-zeroconf")
15856 (synopsis "Pure Python mDNS service discovery")
15857 (description
15858 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15859 compatible).")
15860 (license license:lgpl2.1+)))
15861
15862 (define-public python-bsddb3
15863 (package
15864 (name "python-bsddb3")
15865 (version "6.2.6")
15866 (source
15867 (origin
15868 (method url-fetch)
15869 (uri (pypi-uri "bsddb3" version))
15870 (sha256
15871 (base32
15872 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15873 (build-system python-build-system)
15874 (inputs
15875 `(("bdb" ,bdb)))
15876 (arguments
15877 '(#:phases
15878 (modify-phases %standard-phases
15879 (add-after 'unpack 'configure-locations
15880 (lambda* (#:key inputs #:allow-other-keys)
15881 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15882 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15883 #t))
15884 (replace 'check
15885 (lambda _
15886 (invoke "python3" "test3.py" "-v"))))))
15887 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15888 (synopsis "Python bindings for Oracle Berkeley DB")
15889 (description
15890 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15891 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15892 Transaction objects, and each of these is exposed as a Python type in the
15893 bsddb3.db module. The database objects can use various access methods: btree,
15894 hash, recno, and queue. Complete support of Berkeley DB distributed
15895 transactions. Complete support for Berkeley DB Replication Manager.
15896 Complete support for Berkeley DB Base Replication. Support for RPC.")
15897 (license license:bsd-3)))
15898
15899 (define-public python-dbfread
15900 (package
15901 (name "python-dbfread")
15902 (version "2.0.7")
15903 (source (origin
15904 (method url-fetch)
15905 (uri (pypi-uri "dbfread" version))
15906 (sha256
15907 (base32
15908 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15909 (build-system python-build-system)
15910 (native-inputs
15911 `(("python-pytest" ,python-pytest)))
15912 (home-page "https://dbfread.readthedocs.io")
15913 (synopsis "Read DBF Files with Python")
15914 (description
15915 "This library reads DBF files and returns the data as native Python data
15916 types for further processing. It is primarily intended for batch jobs and
15917 one-off scripts.")
15918 (license license:expat)))