gnu: python-cython: Speed up test suite.
[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 ;; Disable compiler optimizations to greatly reduce the running
3233 ;; time of the test suite.
3234 (setenv "CFLAGS" "-O0")
3235
3236 (invoke "python" "runtests.py" "-vv"
3237 "-j" (number->string (parallel-job-count))))))))
3238 (home-page "https://cython.org/")
3239 (synopsis "C extensions for Python")
3240 (description "Cython is an optimising static compiler for both the Python
3241 programming language and the extended Cython programming language. It makes
3242 writing C extensions for Python as easy as Python itself.")
3243 (license license:asl2.0)
3244 (properties `((python2-variant . ,(delay python2-cython))))))
3245
3246 (define-public python2-cython
3247 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3248 (package
3249 (inherit base)
3250 (name "python2-cython")
3251 (inputs
3252 `(("python-2" ,python-2))) ;this is not automatically changed
3253 (arguments
3254 (substitute-keyword-arguments (package-arguments base)
3255 ((#:phases phases)
3256 `(modify-phases ,phases
3257 (add-before 'check 'adjust-test_embed
3258 (lambda _
3259 (substitute* "runtests.py"
3260 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3261 ;; so it can give the right -L flag to GCC when embedding static
3262 ;; builds of Python. It is unaware that the Python "config"
3263 ;; directory (where the static library lives) was renamed in
3264 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3265 ;; which works fine, because that is where the shared library is.
3266 ;;
3267 ;; It also appears to be unaware that the Makefile in Demos/embed
3268 ;; already unconditionally pass the static library location to GCC,
3269 ;; after checking sysconfig.get_config_var('LIBPL).
3270 ;;
3271 ;; The effect is that the linker is unable to resolve libexpat
3272 ;; symbols when building for Python 2, because neither the Python 2
3273 ;; shared library nor Expat is available. To fix it, we can either
3274 ;; add Expat as an input and make it visible to the linker, or just
3275 ;; prevent it from overriding the Python shared library location.
3276 ;; The end result is identical, so we take the easy route.
3277 ((" or libname not in os\\.listdir\\(libdir\\)")
3278 ""))
3279 #t)))))))))
3280
3281 ;; The RPython toolchain currently does not support Python 3.
3282 (define-public python2-rpython
3283 (package
3284 (name "python2-rpython")
3285 (version "0.2.1")
3286 (source
3287 (origin
3288 (method url-fetch)
3289 (uri (pypi-uri "rpython" version))
3290 (sha256
3291 (base32
3292 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3293 (build-system python-build-system)
3294 (arguments `(#:python ,python-2))
3295 (native-inputs
3296 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3297 (home-page "https://rpython.readthedocs.org")
3298 (synopsis "Framework for implementing interpreters and virtual machines")
3299 (description "RPython is a translation and support framework for
3300 producing implementations of dynamic languages, emphasizing a clean separation
3301 between language specification and implementation aspects.")
3302 (license license:expat)))
3303
3304 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3305 ;; python-scipy still build, as these three packages are often used together.
3306 (define-public python-numpy
3307 (package
3308 (name "python-numpy")
3309 (version "1.15.4")
3310 (source
3311 (origin
3312 (method url-fetch)
3313 (uri (string-append
3314 "https://github.com/numpy/numpy/releases/download/v"
3315 version "/numpy-" version ".tar.gz"))
3316 (sha256
3317 (base32
3318 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3319 (build-system python-build-system)
3320 (inputs
3321 `(("openblas" ,openblas)
3322 ("lapack" ,lapack)))
3323 (native-inputs
3324 `(("python-cython" ,python-cython)
3325 ("python-pytest" ,python-pytest)
3326 ("gfortran" ,gfortran)))
3327 (arguments
3328 `(#:phases
3329 (modify-phases %standard-phases
3330 (add-before 'build 'configure-blas-lapack
3331 (lambda* (#:key inputs #:allow-other-keys)
3332 (call-with-output-file "site.cfg"
3333 (lambda (port)
3334 (format port
3335 "[openblas]
3336 libraries = openblas
3337 library_dirs = ~a/lib
3338 include_dirs = ~a/include
3339
3340 # backslash-n to make emacs happy
3341 \n[lapack]
3342 lapack_libs = lapack
3343 library_dirs = ~a/lib
3344 include_dirs = ~a/include
3345 "
3346 (assoc-ref inputs "openblas")
3347 (assoc-ref inputs "openblas")
3348 (assoc-ref inputs "lapack")
3349 (assoc-ref inputs "lapack"))))
3350 #t))
3351 (add-before 'build 'fix-executable-paths
3352 (lambda* (#:key inputs #:allow-other-keys)
3353 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3354 ;; instead of /bin/sh.
3355 (substitute* "numpy/distutils/exec_command.py"
3356 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3357 (string-append match-start (assoc-ref inputs "bash") match-end)))
3358 ;; Use "gcc" executable, not "cc".
3359 (substitute* "numpy/distutils/system_info.py"
3360 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3361 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3362 #t))
3363 ;; Tests can only be run after the library has been installed and not
3364 ;; within the source directory.
3365 (delete 'check)
3366 (add-after 'install 'check
3367 (lambda* (#:key outputs inputs #:allow-other-keys)
3368 ;; Make installed package available for running the tests
3369 (add-installed-pythonpath inputs outputs)
3370 ;; Make sure "f2py" etc is found.
3371 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3372 ":" (getenv "PATH")))
3373 (with-directory-excursion "/tmp"
3374 (invoke "python" "-c"
3375 "import numpy; numpy.test(verbose=2)")))))))
3376 (home-page "http://www.numpy.org/")
3377 (synopsis "Fundamental package for scientific computing with Python")
3378 (description "NumPy is the fundamental package for scientific computing
3379 with Python. It contains among other things: a powerful N-dimensional array
3380 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3381 and Fortran code, useful linear algebra, Fourier transform, and random number
3382 capabilities.")
3383 (license license:bsd-3)))
3384
3385 (define-public python2-numpy
3386 (package-with-python2 python-numpy))
3387
3388 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3389 ;; interest only for legacy code going back to NumPy's predecessor
3390 ;; Numeric.
3391 (define-public python2-numpy-1.8
3392 (package (inherit python2-numpy)
3393 (version "1.8.2")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (string-append
3398 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3399 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3400 (sha256
3401 (base32
3402 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3403 (arguments
3404 (substitute-keyword-arguments (package-arguments python2-numpy)
3405 ((#:phases phases)
3406 `(modify-phases ,phases
3407 (replace 'configure-blas-lapack
3408 (lambda* (#:key inputs #:allow-other-keys)
3409 (call-with-output-file "site.cfg"
3410 (lambda (port)
3411 (format port
3412 "[openblas]
3413 libraries = openblas,lapack
3414 library_dirs = ~a/lib:~a/lib
3415 include_dirs = ~a/include:~a/include
3416 "
3417 (assoc-ref inputs "openblas")
3418 (assoc-ref inputs "lapack")
3419 (assoc-ref inputs "openblas")
3420 (assoc-ref inputs "lapack"))))
3421 #t))))))
3422 (native-inputs
3423 `(("python2-nose" ,python2-nose)))
3424 (description "NumPy is the fundamental package for scientific computing
3425 with Python. It contains among other things: a powerful N-dimensional array
3426 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3427 and Fortran code, useful linear algebra, Fourier transform, and random number
3428 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3429 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3430 Numeric.")
3431 (license license:bsd-3)))
3432
3433 (define-public python-munch
3434 (package
3435 (name "python-munch")
3436 (version "2.0.4")
3437 (source
3438 (origin
3439 (method url-fetch)
3440 (uri (pypi-uri "munch" version))
3441 (sha256
3442 (base32
3443 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3444 (build-system python-build-system)
3445 (home-page "https://github.com/Infinidat/munch")
3446 (synopsis "Dot-accessible dictionary")
3447 (description "Munch is a dot-accessible dictionary similar to JavaScript
3448 objects.")
3449 (license license:expat)))
3450
3451 (define-public python2-munch
3452 (package-with-python2 python-munch))
3453
3454 (define-public python-colormath
3455 (package
3456 (name "python-colormath")
3457 (version "3.0.0")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "colormath" version))
3462 (sha256
3463 (base32
3464 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3465 (build-system python-build-system)
3466 (propagated-inputs
3467 `(("python-networkx" ,python-networkx)
3468 ("python-numpy" ,python-numpy)))
3469 (home-page "https://github.com/gtaylor/python-colormath")
3470 (synopsis "Color math and conversion library")
3471 (description
3472 "This is a Python library for color math and conversions.")
3473 (license license:bsd-3)))
3474
3475 (define-public python2-colormath
3476 (package-with-python2 python-colormath))
3477
3478 (define-public python-spectra
3479 (package
3480 (name "python-spectra")
3481 (version "0.0.11")
3482 (source
3483 (origin
3484 (method url-fetch)
3485 (uri (pypi-uri "spectra" version))
3486 (sha256
3487 (base32
3488 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3489 (build-system python-build-system)
3490 (arguments
3491 `(#:phases
3492 (modify-phases %standard-phases
3493 (replace 'check
3494 (lambda _ (invoke "nosetests" "-v"))))))
3495 (propagated-inputs
3496 `(("python-colormath" ,python-colormath)))
3497 (native-inputs
3498 `(("python-nose" ,python-nose)))
3499 (home-page "https://github.com/jsvine/spectra")
3500 (synopsis "Color scales and color conversion")
3501 (description
3502 "This package provides a Python library intended to make color math,
3503 color scales, and color space conversion easy. It has support for:
3504
3505 @enumerate
3506 @item Color scales
3507 @item Color ranges
3508 @item Color blending
3509 @item Brightening/darkening colors
3510 @item Saturating/desaturating colors
3511 @item Conversion to/from multiple color spaces.
3512 @end enumerate\n")
3513 (license license:expat)))
3514
3515 (define-public python2-spectra
3516 (package-with-python2 python-spectra))
3517
3518 (define-public python-numpy-documentation
3519 (package
3520 (name "python-numpy-documentation")
3521 (version (package-version python-numpy))
3522 (source (package-source python-numpy))
3523 (build-system python-build-system)
3524 (native-inputs
3525 `(("python-matplotlib" ,python-matplotlib)
3526 ("python-numpy" ,python-numpy)
3527 ("pkg-config" ,pkg-config)
3528 ("python-sphinx" ,python-sphinx)
3529 ("python-numpydoc" ,python-numpydoc)
3530 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3531 texlive-fonts-cm-super
3532 texlive-fonts-ec
3533 texlive-generic-ifxetex
3534 texlive-generic-pdftex
3535 texlive-latex-amsfonts
3536 texlive-latex-capt-of
3537 texlive-latex-cmap
3538 texlive-latex-environ
3539 texlive-latex-eqparbox
3540 texlive-latex-etoolbox
3541 texlive-latex-expdlist
3542 texlive-latex-fancyhdr
3543 texlive-latex-fancyvrb
3544 texlive-latex-fncychap
3545 texlive-latex-float
3546 texlive-latex-framed
3547 texlive-latex-geometry
3548 texlive-latex-graphics
3549 texlive-latex-hyperref
3550 texlive-latex-mdwtools
3551 texlive-latex-multirow
3552 texlive-latex-needspace
3553 texlive-latex-oberdiek
3554 texlive-latex-parskip
3555 texlive-latex-preview
3556 texlive-latex-tabulary
3557 texlive-latex-threeparttable
3558 texlive-latex-titlesec
3559 texlive-latex-trimspaces
3560 texlive-latex-ucs
3561 texlive-latex-upquote
3562 texlive-latex-url
3563 texlive-latex-varwidth
3564 texlive-latex-wrapfig)))
3565 ("texinfo" ,texinfo)
3566 ("perl" ,perl)
3567 ("scipy-sphinx-theme"
3568 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3569 (method git-fetch)
3570 (uri (git-reference
3571 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3572 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3573 (sha256
3574 (base32
3575 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3576 ,@(package-native-inputs python-numpy)))
3577 (arguments
3578 `(#:tests? #f ; we're only generating the documentation
3579 #:phases
3580 (modify-phases %standard-phases
3581 (delete 'build)
3582 (replace 'install
3583 (lambda* (#:key inputs outputs #:allow-other-keys)
3584 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3585 (doc (string-append
3586 data "/doc/" ,name "-"
3587 ,(package-version python-numpy)))
3588 (info-reader (string-append data "/info"))
3589 (html (string-append doc "/html"))
3590 (scipy-sphinx-theme "scipy-sphinx-theme")
3591 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3592 (pyver ,(string-append "PYVER=")))
3593
3594 ;; FIXME: this is needed to for texlive-union to generate
3595 ;; fonts, which are not found.
3596 (setenv "HOME" "/tmp")
3597
3598 (with-directory-excursion "doc"
3599 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3600 (mkdir-p html)
3601 (invoke "make" "html" pyver)
3602 (invoke "make" "latex" "PAPER=a4" pyver)
3603 (invoke "make" "-C" "build/latex"
3604 "all-pdf" "PAPER=a4" pyver)
3605 ;; FIXME: Generation of the info file fails.
3606 ;; (invoke "make" "info" pyver)
3607 ;; (mkdir-p info)
3608 ;; (copy-file "build/texinfo/numpy.info"
3609 ;; (string-append info "/numpy.info"))
3610 (for-each (lambda (file)
3611 (copy-file (string-append "build/latex" file)
3612 (string-append doc file)))
3613 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3614 (with-directory-excursion "build/html"
3615 (for-each (lambda (file)
3616 (let* ((dir (dirname file))
3617 (tgt-dir (string-append html "/" dir)))
3618 (unless (equal? "." dir)
3619 (mkdir-p tgt-dir))
3620 (install-file file html)))
3621 (find-files "." ".*")))))
3622 #t)))))
3623 (home-page (package-home-page python-numpy))
3624 (synopsis "Documentation for the python-numpy package")
3625 (description (package-description python-numpy))
3626 (license (package-license python-numpy))))
3627
3628 (define-public python2-numpy-documentation
3629 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3630 (package
3631 (inherit numpy-documentation)
3632 (native-inputs `(("python2-functools32" ,python2-functools32)
3633 ,@(package-native-inputs numpy-documentation))))))
3634
3635 (define-public python-pygit2
3636 (package
3637 (name "python-pygit2")
3638 (version "0.28.2")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "pygit2" version))
3643 (sha256
3644 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3645 (build-system python-build-system)
3646 (arguments
3647 '(#:tests? #f)) ; tests don't run correctly in our environment
3648 (propagated-inputs
3649 `(("python-six" ,python-six)
3650 ("python-cffi" ,python-cffi)
3651 ("libgit2" ,libgit2)
3652 ("python-tox" ,python-tox)))
3653 (native-inputs
3654 `(("python-pytest" ,python-pytest)))
3655 (home-page "https://github.com/libgit2/pygit2")
3656 (synopsis "Python bindings for libgit2")
3657 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3658 library, libgit2 implements Git plumbing.")
3659 ;; GPL2.0 only, with linking exception.
3660 (license license:gpl2)))
3661
3662 (define-public python2-pygit2
3663 (package-with-python2 python-pygit2))
3664
3665 (define-public python-pyparsing
3666 (package
3667 (name "python-pyparsing")
3668 (version "2.3.1")
3669 (source
3670 (origin
3671 (method url-fetch)
3672 (uri (pypi-uri "pyparsing" version))
3673 (sha256
3674 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3675 (build-system python-build-system)
3676 (outputs '("out" "doc"))
3677 (arguments
3678 `(#:tests? #f ; no test target
3679 #:phases
3680 (modify-phases %standard-phases
3681 (add-after 'install 'install-doc
3682 (lambda* (#:key outputs #:allow-other-keys)
3683 (let* ((doc (string-append (assoc-ref outputs "doc")
3684 "/share/doc/" ,name "-" ,version))
3685 (html-doc (string-append doc "/html"))
3686 (examples (string-append doc "/examples")))
3687 (mkdir-p html-doc)
3688 (mkdir-p examples)
3689 (for-each
3690 (lambda (dir tgt)
3691 (map (lambda (file)
3692 (install-file file tgt))
3693 (find-files dir ".*")))
3694 (list "docs" "htmldoc" "examples")
3695 (list doc html-doc examples))
3696 #t))))))
3697 (home-page "https://github.com/pyparsing/pyparsing")
3698 (synopsis "Python parsing class library")
3699 (description
3700 "The pyparsing module is an alternative approach to creating and
3701 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3702 of regular expressions. The pyparsing module provides a library of classes
3703 that client code uses to construct the grammar directly in Python code.")
3704 (license license:expat)))
3705
3706 (define-public python2-pyparsing
3707 (package-with-python2 python-pyparsing))
3708
3709 (define-public python-numpydoc
3710 (package
3711 (name "python-numpydoc")
3712 (version "0.8.0")
3713 (source
3714 (origin
3715 (method url-fetch)
3716 (uri (pypi-uri "numpydoc" version))
3717 (sha256
3718 (base32
3719 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3720 (build-system python-build-system)
3721 (propagated-inputs
3722 `(("python-sphinx" ,python-sphinx)))
3723 (native-inputs
3724 `(("python-nose" ,python-nose)))
3725 (home-page "https://pypi.python.org/pypi/numpydoc")
3726 (synopsis
3727 "Numpy's Sphinx extensions")
3728 (description
3729 "Sphinx extension to support docstrings in Numpy format.")
3730 (license license:bsd-2)))
3731
3732 (define-public python2-numpydoc
3733 (package-with-python2 python-numpydoc))
3734
3735 (define-public python-numexpr
3736 (package
3737 (name "python-numexpr")
3738 (version "2.6.5")
3739 (source
3740 (origin
3741 (method url-fetch)
3742 (uri (pypi-uri "numexpr" version))
3743 (sha256
3744 (base32
3745 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3746 (build-system python-build-system)
3747 (arguments `(#:tests? #f)) ; no tests included
3748 (propagated-inputs
3749 `(("python-numpy" ,python-numpy)))
3750 (home-page "https://github.com/pydata/numexpr")
3751 (synopsis "Fast numerical expression evaluator for NumPy")
3752 (description
3753 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3754 expressions that operate on arrays are accelerated and use less memory than
3755 doing the same calculation in Python. In addition, its multi-threaded
3756 capabilities can make use of all your cores, which may accelerate
3757 computations, most specially if they are not memory-bounded (e.g. those using
3758 transcendental functions).")
3759 (license license:expat)))
3760
3761 (define-public python2-numexpr
3762 (package-with-python2 python-numexpr))
3763
3764 (define-public python-cycler
3765 (package
3766 (name "python-cycler")
3767 (version "0.10.0")
3768 (source (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "cycler" version))
3771 (sha256
3772 (base32
3773 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3774 (build-system python-build-system)
3775 (arguments
3776 ;; XXX: The current version requires 'coveralls' which we don't have.
3777 ;; Enable this for the next release which uses 'python-pytest'.
3778 '(#:tests? #f))
3779 (propagated-inputs
3780 `(("python-six" ,python-six)))
3781 (home-page "http://matplotlib.org/cycler/")
3782 (synopsis "Composable keyword argument iterator")
3783 (description
3784 "When using @code{matplotlib} and plotting more than one line, it is
3785 common to want to be able to want to be able to cycle over one or more artist
3786 styles; but the plotting logic can quickly become involved.
3787 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3788 @code{Cycler} class was developed.")
3789 (license license:bsd-3)))
3790
3791 (define-public python2-cycler
3792 (package-with-python2 python-cycler))
3793
3794 (define-public python-colorspacious
3795 (package
3796 (name "python-colorspacious")
3797 (version "1.1.0")
3798 (source
3799 (origin
3800 (method git-fetch)
3801 (uri (git-reference
3802 (url "https://github.com/njsmith/colorspacious.git")
3803 (commit (string-append "v" version))))
3804 (file-name (git-file-name name version))
3805 (sha256
3806 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3807 (build-system python-build-system)
3808 (propagated-inputs
3809 `(("python-numpy" ,python-numpy)))
3810 (native-inputs
3811 `(("python-nose" ,python-nose)))
3812 (arguments
3813 `(#:phases
3814 (modify-phases %standard-phases
3815 (replace 'check
3816 (lambda _
3817 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3818 (home-page "https://github.com/njsmith/colorspacious")
3819 (synopsis "Python library for colorspace conversions")
3820 (description "@code{colorspacious} is a Python library that lets you
3821 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3822 (license license:expat)))
3823
3824 (define-public python2-colorspacious
3825 (package-with-python2 python-colorspacious))
3826
3827 (define-public python-matplotlib
3828 (package
3829 (name "python-matplotlib")
3830 (version "2.2.3")
3831 (source
3832 (origin
3833 (method url-fetch)
3834 (uri (pypi-uri "matplotlib" version))
3835 (sha256
3836 (base32
3837 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3838 (build-system python-build-system)
3839 (propagated-inputs ; the following packages are all needed at run time
3840 `(("python-cycler" ,python-cycler)
3841 ("python-kiwisolver" ,python-kiwisolver)
3842 ("python-pyparsing" ,python-pyparsing)
3843 ("python-pygobject" ,python-pygobject)
3844 ("gobject-introspection" ,gobject-introspection)
3845 ("python-tkinter" ,python "tk")
3846 ("python-dateutil" ,python-dateutil)
3847 ("python-numpy" ,python-numpy)
3848 ("python-pillow" ,python-pillow)
3849 ("python-pytz" ,python-pytz)
3850 ("python-six" ,python-six)
3851 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3852 ;; from 'gtk+') provides the required 'typelib' files used by
3853 ;; 'gobject-introspection'. The location of these files is set with the
3854 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3855 ;; is done automatically by a 'native-search-path' procedure. However,
3856 ;; at run-time the user must set this variable as follows:
3857 ;;
3858 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3859 ("gtk+" ,gtk+)
3860 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3861 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3862 ;; object. For this reason we need to import both libraries.
3863 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3864 ("python-pycairo" ,python-pycairo)
3865 ;; XXX: qtwebkit cannot be built reliably.
3866 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3867 ("python-cairocffi" ,python-cairocffi)))
3868 (inputs
3869 `(("libpng" ,libpng)
3870 ("imagemagick" ,imagemagick)
3871 ("freetype" ,freetype)
3872 ("cairo" ,cairo)
3873 ("glib" ,glib)
3874 ;; FIXME: Add backends when available.
3875 ;("python-wxpython" ,python-wxpython)
3876 ("tcl" ,tcl)
3877 ("tk" ,tk)))
3878 (native-inputs
3879 `(("pkg-config" ,pkg-config)
3880 ("python-nose" ,python-nose)
3881 ("python-mock" ,python-mock)))
3882 (arguments
3883 `(#:phases
3884 (modify-phases %standard-phases
3885 (add-before 'build 'configure-environment
3886 (lambda* (#:key outputs inputs #:allow-other-keys)
3887 (let ((cairo (assoc-ref inputs "cairo"))
3888 (gtk+ (assoc-ref inputs "gtk+")))
3889 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3890 ;; has not effect.
3891 (setenv "LD_LIBRARY_PATH"
3892 (string-append cairo "/lib:" gtk+ "/lib"))
3893 (setenv "HOME" (getcwd))
3894 (call-with-output-file "setup.cfg"
3895 (lambda (port)
3896 (format port "[directories]~%
3897 basedirlist = ~a,~a~%
3898 [rc_options]~%
3899 backend = TkAgg~%"
3900 (assoc-ref inputs "tcl")
3901 (assoc-ref inputs "tk")))))
3902 #t)))))
3903 (home-page "http://matplotlib.org")
3904 (synopsis "2D plotting library for Python")
3905 (description
3906 "Matplotlib is a Python 2D plotting library which produces publication
3907 quality figures in a variety of hardcopy formats and interactive environments
3908 across platforms. Matplotlib can be used in Python scripts, the python and
3909 ipython shell, web application servers, and six graphical user interface
3910 toolkits.")
3911 (license license:psfl)
3912 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3913
3914 (define-public python2-matplotlib
3915 (let ((matplotlib (package-with-python2
3916 (strip-python2-variant python-matplotlib))))
3917 (package (inherit matplotlib)
3918 ;; Make sure to use special packages for Python 2 instead
3919 ;; of those automatically rewritten by package-with-python2.
3920 (propagated-inputs
3921 `(("python2-pycairo" ,python2-pycairo)
3922 ("python2-backports-functools-lru-cache"
3923 ,python2-backports-functools-lru-cache)
3924 ("python2-functools32" ,python2-functools32)
3925 ("python2-pygobject-2" ,python2-pygobject-2)
3926 ("python2-subprocess32" ,python2-subprocess32)
3927 ("python2-tkinter" ,python-2 "tk")
3928 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3929 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3930
3931 (define-public python-matplotlib-documentation
3932 (package
3933 (name "python-matplotlib-documentation")
3934 (version (package-version python-matplotlib))
3935 (source (package-source python-matplotlib))
3936 (build-system python-build-system)
3937 (native-inputs
3938 `(("python-matplotlib" ,python-matplotlib)
3939 ("python-colorspacious" ,python-colorspacious)
3940 ("python-sphinx" ,python-sphinx)
3941 ("python-sphinx-gallery" ,python-sphinx-gallery)
3942 ("python-numpydoc" ,python-numpydoc)
3943 ("python-ipython" ,python-ipython)
3944 ("python-ipykernel" ,python-ipykernel)
3945 ("python-mock" ,python-mock)
3946 ("graphviz" ,graphviz)
3947 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3948 texlive-latex-amsmath
3949 texlive-latex-enumitem
3950 texlive-latex-expdlist
3951 texlive-latex-geometry
3952 texlive-latex-preview
3953 texlive-latex-type1cm
3954 texlive-latex-ucs
3955
3956 texlive-generic-pdftex
3957
3958 texlive-fonts-amsfonts
3959 texlive-fonts-ec
3960 texlive-fonts-adobe-times
3961 texlive-fonts-txfonts)))
3962 ("texinfo" ,texinfo)
3963 ,@(package-native-inputs python-matplotlib)))
3964 (arguments
3965 `(#:tests? #f ; we're only generating documentation
3966 #:phases
3967 (modify-phases %standard-phases
3968 (replace 'build
3969 (lambda _
3970 (chdir "doc")
3971 (setenv "PYTHONPATH"
3972 (string-append (getenv "PYTHONPATH")
3973 ":" (getcwd) "/../examples/units"))
3974 (substitute* "conf.py"
3975 ;; Don't use git.
3976 (("^SHA = check_output.*")
3977 (string-append "SHA = \"" ,version "\"\n"))
3978 ;; Don't fetch intersphinx files from the Internet
3979 (("^explicit_order_folders" m)
3980 (string-append "intersphinx_mapping = {}\n" m))
3981 (("'sphinx.ext.intersphinx',") "")
3982 ;; Disable URL embedding which requires internet access.
3983 (("'https://docs.scipy.org/doc/numpy'") "None")
3984 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3985 (invoke "make"
3986 "SPHINXBUILD=sphinx-build"
3987 "SPHINXOPTS=" ; don't abort on warnings
3988 "html" "texinfo")))
3989 (replace 'install
3990 (lambda* (#:key inputs outputs #:allow-other-keys)
3991 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3992 (doc (string-append data "/doc/python-matplotlib-" ,version))
3993 (info (string-append data "/info"))
3994 (html (string-append doc "/html")))
3995 (mkdir-p html)
3996 (mkdir-p info)
3997 (copy-recursively "build/html" html)
3998 (symlink (string-append html "/_images")
3999 (string-append info "/matplotlib-figures"))
4000 (with-directory-excursion "build/texinfo"
4001 (substitute* "matplotlib.texi"
4002 (("@image\\{([^,]*)" all file)
4003 (string-append "@image{matplotlib-figures/" file)))
4004 (symlink (string-append html "/_images")
4005 "./matplotlib-figures")
4006 (invoke "makeinfo" "--no-split"
4007 "-o" "matplotlib.info" "matplotlib.texi"))
4008 (install-file "build/texinfo/matplotlib.info" info))
4009 #t)))))
4010 (home-page (package-home-page python-matplotlib))
4011 (synopsis "Documentation for the python-matplotlib package")
4012 (description (package-description python-matplotlib))
4013 (license (package-license python-matplotlib))))
4014
4015 (define-public python2-matplotlib-documentation
4016 (package-with-python2 python-matplotlib-documentation))
4017
4018 (define-public python-matplotlib-venn
4019 (package
4020 (name "python-matplotlib-venn")
4021 (version "0.11.5")
4022 (source
4023 (origin
4024 (method url-fetch)
4025 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4026 (sha256
4027 (base32
4028 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4029 (build-system python-build-system)
4030 (arguments '(#:tests? #f)) ; tests are not included
4031 (propagated-inputs
4032 `(("python-matplotlib" ,python-matplotlib)
4033 ("python-numpy" ,python-numpy)
4034 ("python-scipy" ,python-scipy)))
4035 (native-inputs
4036 `(("unzip" ,unzip)))
4037 (home-page "https://github.com/konstantint/matplotlib-venn")
4038 (synopsis "Plot area-proportional Venn diagrams")
4039 (description
4040 "This package provides tools for plotting area-proportional two- and
4041 three-way Venn diagrams in @code{matplotlib}.")
4042 (license license:expat)))
4043
4044 (define-public python2-pysnptools
4045 (package
4046 (name "python2-pysnptools")
4047 (version "0.3.13")
4048 (source
4049 (origin
4050 (method url-fetch)
4051 (uri (pypi-uri "pysnptools" version))
4052 (sha256
4053 (base32
4054 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4055 (build-system python-build-system)
4056 (arguments
4057 `(#:python ,python-2 ; only Python 2.7 is supported
4058 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4059 (propagated-inputs
4060 `(("python2-numpy" ,python2-numpy)
4061 ("python2-scipy" ,python2-scipy)
4062 ("python2-pandas" ,python2-pandas)))
4063 (native-inputs
4064 `(("python2-cython" ,python2-cython)))
4065 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4066 (synopsis "Library for reading and manipulating genetic data")
4067 (description
4068 "PySnpTools is a library for reading and manipulating genetic data. It
4069 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4070 those files. It can also efficiently manipulate ranges of integers using set
4071 operators such as union, intersection, and difference.")
4072 (license license:asl2.0)))
4073
4074 (define-public python-scipy
4075 (package
4076 (name "python-scipy")
4077 (version "1.2.2")
4078 (source
4079 (origin
4080 (method url-fetch)
4081 (uri (pypi-uri "scipy" version))
4082 (sha256
4083 (base32
4084 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
4085 (build-system python-build-system)
4086 (propagated-inputs
4087 `(("python-numpy" ,python-numpy)
4088 ("python-matplotlib" ,python-matplotlib)
4089 ("python-pyparsing" ,python-pyparsing)))
4090 (inputs
4091 `(("lapack" ,lapack)
4092 ("openblas" ,openblas)))
4093 (native-inputs
4094 `(("python-cython" ,python-cython)
4095 ("python-pytest" ,python-pytest)
4096 ("python-sphinx" ,python-sphinx)
4097 ("python-numpydoc" ,python-numpydoc)
4098 ("gfortran" ,gfortran)
4099 ("perl" ,perl)
4100 ("which" ,which)))
4101 (outputs '("out" "doc"))
4102 (arguments
4103 `(#:phases
4104 (modify-phases %standard-phases
4105 (add-after 'unpack 'disable-broken-tests
4106 (lambda _
4107 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4108 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4109 (string-append indent
4110 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4111 m)))
4112 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4113 (("^def test_parallel_threads\\(\\):" m)
4114 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4115 m)))
4116 #t))
4117 (add-before 'build 'configure-openblas
4118 (lambda* (#:key inputs #:allow-other-keys)
4119 (call-with-output-file "site.cfg"
4120 (lambda (port)
4121 (format port
4122 "[blas]
4123 libraries = openblas
4124 library_dirs = ~a/lib
4125 include_dirs = ~a/include
4126
4127 # backslash-n to make emacs happy
4128 \n[atlas]
4129 library_dirs = ~a/lib
4130 atlas_libs = openblas
4131 "
4132 (assoc-ref inputs "openblas")
4133 (assoc-ref inputs "openblas")
4134 (assoc-ref inputs "openblas"))))
4135 #t))
4136 (add-after 'install 'install-doc
4137 (lambda* (#:key inputs outputs #:allow-other-keys)
4138 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4139 (doc (string-append data "/doc/" ,name "-" ,version))
4140 (html (string-append doc "/html"))
4141 (pyver ,(string-append "PYVER=" (version-major+minor
4142 (package-version python))))
4143 ;; By default it tries to run sphinx-build through the Python
4144 ;; interpreter which won't work with our shell wrapper.
4145 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4146 ;; Make installed package available for building the
4147 ;; documentation
4148 (add-installed-pythonpath inputs outputs)
4149 (with-directory-excursion "doc"
4150 ;; Fix generation of images for mathematical expressions.
4151 (substitute* (find-files "source" "conf\\.py")
4152 (("pngmath_use_preview = True")
4153 "pngmath_use_preview = False"))
4154 (mkdir-p html)
4155 (invoke "make" "html" pyver sphinxbuild)
4156 (with-directory-excursion "build/html"
4157 (for-each (lambda (file)
4158 (let* ((dir (dirname file))
4159 (tgt-dir (string-append html "/" dir)))
4160 (install-file file html)))
4161 (find-files "." ".*")))))
4162 #t))
4163 ;; Tests can only be run after the library has been installed and not
4164 ;; within the source directory.
4165 (delete 'check)
4166 (add-after 'install 'check
4167 (lambda* (#:key inputs outputs #:allow-other-keys)
4168 (add-installed-pythonpath inputs outputs)
4169 (with-directory-excursion "/tmp"
4170 (invoke "python" "-c"
4171 "import scipy; scipy.test(verbose=2)")))))))
4172 (home-page "https://www.scipy.org/")
4173 (synopsis "The Scipy library provides efficient numerical routines")
4174 (description "The SciPy library is one of the core packages that make up
4175 the SciPy stack. It provides many user-friendly and efficient numerical
4176 routines such as routines for numerical integration and optimization.")
4177 (properties `((python2-variant . ,(delay python2-scipy))))
4178 (license license:bsd-3)))
4179
4180 (define-public python2-scipy
4181 (package-with-python2
4182 (strip-python2-variant python-scipy)))
4183
4184 (define-public python-socksipy-branch
4185 (package
4186 (name "python-socksipy-branch")
4187 (version "1.01")
4188 (source
4189 (origin
4190 (method url-fetch)
4191 (uri (pypi-uri "SocksiPy-branch" version))
4192 (sha256
4193 (base32
4194 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4195 (build-system python-build-system)
4196 (arguments
4197 `(#:tests? #f)) ; There are no tests
4198 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4199 (synopsis "Python SOCKS module")
4200 (description
4201 "SocksiPy - A Python SOCKS client module. It provides a
4202 socket-like interface that supports connections to any TCP
4203 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4204 The original version was developed by Dan Haim, this is a
4205 branch created by Mario Vilas to address some open issues,
4206 as the original project seems to have been abandoned circa 2007.")
4207 (license license:bsd-3)))
4208
4209 (define-public python2-socksipy-branch
4210 (package-with-python2 python-socksipy-branch))
4211
4212 (define-public python-pycodestyle
4213 (package
4214 (name "python-pycodestyle")
4215 (version "2.5.0")
4216 (source
4217 (origin
4218 (method url-fetch)
4219 (uri (pypi-uri "pycodestyle" version))
4220 (sha256
4221 (base32
4222 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4223 (build-system python-build-system)
4224 (home-page "https://pycodestyle.readthedocs.io/")
4225 (synopsis "Python style guide checker")
4226 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4227 Python code against some of the style conventions in
4228 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4229 (license license:expat)))
4230
4231 (define-public python2-pycodestyle
4232 (package-with-python2 python-pycodestyle))
4233
4234 (define-public python-multidict
4235 (package
4236 (name "python-multidict")
4237 (version "4.2.0")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "multidict" version))
4242 (sha256
4243 (base32
4244 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4245 (build-system python-build-system)
4246 (native-inputs
4247 `(("python-pytest" ,python-pytest)
4248 ("python-pytest-runner" ,python-pytest-runner)))
4249 (home-page "https://github.com/aio-libs/multidict/")
4250 (synopsis "Multidict implementation")
4251 (description "Multidict is dict-like collection of key-value pairs
4252 where key might be occurred more than once in the container.")
4253 (license license:asl2.0)))
4254
4255 (define-public python-orderedmultidict
4256 (package
4257 (name "python-orderedmultidict")
4258 (version "0.7.11")
4259 (source
4260 (origin
4261 (method url-fetch)
4262 (uri (pypi-uri "orderedmultidict" version))
4263 (sha256
4264 (base32
4265 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4266 (build-system python-build-system)
4267 (arguments
4268 `(#:phases
4269 (modify-phases %standard-phases
4270 (add-after 'unpack 'fix-tests
4271 (lambda _
4272 ;; The package uses nosetest for running the tests.
4273 ;; Adding this initfile allows to run the test suite
4274 ;; without requiring nosetest.
4275 (with-output-to-file "tests/__init__.py" newline)
4276 #t)))))
4277 (propagated-inputs
4278 `(("python-six" ,python-six)))
4279 (native-inputs
4280 `(("python-pycodestyle" ,python-pycodestyle)))
4281 (home-page "https://github.com/gruns/orderedmultidict")
4282 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4283 (description "This package contains a library for ordered multivalue
4284 dictionaries. A multivalue dictionary is a dictionary that can store
4285 multiple values for the same key. An ordered multivalue dictionary is a
4286 multivalue dictionary that retains the order of insertions and deletions.")
4287 (license license:unlicense)))
4288
4289 (define-public python2-orderedmultidict
4290 (package-with-python2 python-orderedmultidict))
4291
4292 (define-public python-autopep8
4293 (package
4294 (name "python-autopep8")
4295 (version "1.3.5")
4296 (source
4297 (origin
4298 (method url-fetch)
4299 (uri (pypi-uri "autopep8" version))
4300 (sha256
4301 (base32
4302 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4303 (build-system python-build-system)
4304 (propagated-inputs
4305 `(("python-pycodestyle" ,python-pycodestyle)))
4306 (home-page "https://github.com/hhatto/autopep8")
4307 (synopsis "Format Python code according to the PEP 8 style guide")
4308 (description
4309 "@code{autopep8} automatically formats Python code to conform to
4310 the PEP 8 style guide. It uses the pycodestyle utility to determine
4311 what parts of the code needs to be formatted. @code{autopep8} is
4312 capable of fixing most of the formatting issues that can be reported
4313 by pycodestyle.")
4314 (license (license:non-copyleft
4315 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4316
4317 (define-public python2-autopep8
4318 (package-with-python2 python-autopep8))
4319
4320 (define-public python-distutils-extra
4321 (package
4322 (name "python-distutils-extra")
4323 (version "2.38")
4324 (source
4325 (origin
4326 (method url-fetch)
4327 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4328 version "/+download/python-distutils-extra-"
4329 version ".tar.gz"))
4330 (sha256
4331 (base32
4332 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4333 (build-system python-build-system)
4334 (home-page "https://launchpad.net/python-distutils-extra/")
4335 (synopsis "Enhancements to Python's distutils")
4336 (description
4337 "The python-distutils-extra module enables you to easily integrate
4338 gettext support, themed icons, and scrollkeeper-based documentation into
4339 Python's distutils.")
4340 (license license:gpl2)))
4341
4342 (define-public python2-distutils-extra
4343 (package-with-python2 python-distutils-extra))
4344
4345 (define-public python2-elib.intl
4346 (package
4347 (name "python2-elib.intl")
4348 (version "0.0.3")
4349 (source
4350 (origin
4351 ;; This project doesn't tag releases or publish tarballs, so we take
4352 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4353 (method git-fetch)
4354 (uri (git-reference
4355 (url "https://github.com/dieterv/elib.intl.git")
4356 (commit "d09997cfef")))
4357 (file-name (string-append name "-" version "-checkout"))
4358 (sha256
4359 (base32
4360 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4361 (build-system python-build-system)
4362 (arguments
4363 ;; incompatible with Python 3 (exception syntax)
4364 `(#:python ,python-2
4365 #:tests? #f))
4366 (home-page "https://github.com/dieterv/elib.intl")
4367 (synopsis "Enhanced internationalization for Python")
4368 (description
4369 "The elib.intl module provides enhanced internationalization (I18N)
4370 services for your Python modules and applications.")
4371 (license license:lgpl3+)))
4372
4373 (define-public python-olefile
4374 (package
4375 (name "python-olefile")
4376 (version "0.46")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4381 "download/v" version "/olefile-" version ".tar.gz"))
4382 (file-name (string-append name "-" version ".tar.gz"))
4383 (sha256
4384 (base32
4385 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4386 (build-system python-build-system)
4387 (home-page "https://www.decalage.info/python/olefileio")
4388 (synopsis "Read and write Microsoft OLE2 files.")
4389 (description
4390 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4391 Storage or Compound Document, Microsoft Office). It is an improved version of
4392 the OleFileIO module from PIL, the Python Image Library.")
4393 (license license:bsd-3)))
4394
4395 (define-public python2-olefile
4396 (package-with-python2 python-olefile))
4397
4398 (define-public python-pillow
4399 (package
4400 (name "python-pillow")
4401 (version "6.1.0")
4402 (source
4403 (origin
4404 (method url-fetch)
4405 (uri (pypi-uri "Pillow" version))
4406 (sha256
4407 (base32
4408 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4409 (build-system python-build-system)
4410 (native-inputs
4411 `(("python-pytest" ,python-pytest)))
4412 (inputs
4413 `(("freetype" ,freetype)
4414 ("lcms" ,lcms)
4415 ("zlib" ,zlib)
4416 ("libjpeg" ,libjpeg)
4417 ("openjpeg" ,openjpeg)
4418 ("libtiff" ,libtiff)
4419 ("libwebp" ,libwebp)))
4420 (propagated-inputs
4421 `(("python-olefile" ,python-olefile)))
4422 (arguments
4423 `(#:phases
4424 (modify-phases %standard-phases
4425 (add-after 'unpack 'patch-ldconfig
4426 (lambda _
4427 (substitute* "setup.py"
4428 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4429 (delete 'check) ; We must run checks after python-pillow is installed.
4430 (add-after 'install 'check-installed
4431 (lambda* (#:key outputs inputs #:allow-other-keys)
4432 (begin
4433 (setenv "HOME" (getcwd))
4434 ;; Make installed package available for running the tests.
4435 (add-installed-pythonpath inputs outputs)
4436 (invoke "python" "selftest.py" "--installed")
4437 (invoke "python" "-m" "pytest" "-vv")))))))
4438 (home-page "https://python-pillow.org")
4439 (synopsis "Fork of the Python Imaging Library")
4440 (description
4441 "The Python Imaging Library adds image processing capabilities to your
4442 Python interpreter. This library provides extensive file format support, an
4443 efficient internal representation, and fairly powerful image processing
4444 capabilities. The core image library is designed for fast access to data
4445 stored in a few basic pixel formats. It should provide a solid foundation for
4446 a general image processing tool.")
4447 (license (license:x11-style
4448 "http://www.pythonware.com/products/pil/license.htm"
4449 "The PIL Software License"))))
4450
4451 (define-public python2-pillow
4452 (package-with-python2 python-pillow))
4453
4454 (define-public python-pycparser
4455 (package
4456 (name "python-pycparser")
4457 (version "2.19")
4458 (source
4459 (origin
4460 (method url-fetch)
4461 (uri (pypi-uri "pycparser" version))
4462 (sha256
4463 (base32
4464 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4465 (outputs '("out" "doc"))
4466 (build-system python-build-system)
4467 (native-inputs
4468 `(("pkg-config" ,pkg-config)))
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (replace 'check
4473 (lambda _
4474 (with-directory-excursion "tests"
4475 (invoke "python" "all_tests.py"))
4476 #t))
4477 (add-after 'install 'install-doc
4478 (lambda* (#:key outputs #:allow-other-keys)
4479 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4480 (doc (string-append data "/doc/" ,name "-" ,version))
4481 (examples (string-append doc "/examples")))
4482 (mkdir-p examples)
4483 (for-each (lambda (file)
4484 (copy-file (string-append "." file)
4485 (string-append doc file)))
4486 '("/README.rst" "/CHANGES" "/LICENSE"))
4487 (copy-recursively "examples" examples)
4488 #t))))))
4489 (home-page "https://github.com/eliben/pycparser")
4490 (synopsis "C parser in Python")
4491 (description
4492 "Pycparser is a complete parser of the C language, written in pure Python
4493 using the PLY parsing library. It parses C code into an AST and can serve as
4494 a front-end for C compilers or analysis tools.")
4495 (license license:bsd-3)))
4496
4497 (define-public python2-pycparser
4498 (package-with-python2 python-pycparser))
4499
4500 (define-public python-pywavelets
4501 (package
4502 (name "python-pywavelets")
4503 (version "1.0.1")
4504 (home-page "https://github.com/PyWavelets/pywt")
4505 (source (origin
4506 (method url-fetch)
4507 (uri (pypi-uri "PyWavelets" version))
4508 (sha256
4509 (base32
4510 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4511 (build-system python-build-system)
4512 (arguments
4513 '(#:modules ((ice-9 ftw)
4514 (srfi srfi-1)
4515 (srfi srfi-26)
4516 (guix build utils)
4517 (guix build python-build-system))
4518 #:phases (modify-phases %standard-phases
4519 (replace 'check
4520 (lambda _
4521 (let ((cwd (getcwd))
4522 (libdir (find (cut string-prefix? "lib." <>)
4523 (scandir "build"))))
4524 (with-directory-excursion (string-append cwd "/build/" libdir)
4525 (invoke "nosetests" "-v" "."))))))))
4526 (native-inputs
4527 `(("python-matplotlib" ,python-matplotlib) ;for tests
4528 ("python-nose" ,python-nose)))
4529 (propagated-inputs
4530 `(("python-numpy" ,python-numpy)))
4531 (synopsis "Wavelet transforms in Python")
4532 (description
4533 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4534 mathematical basis functions that are localized in both time and frequency.
4535 Wavelet transforms are time-frequency transforms employing wavelets. They are
4536 similar to Fourier transforms, the difference being that Fourier transforms are
4537 localized only in frequency instead of in time and frequency.")
4538 (license license:expat)))
4539
4540 (define-public python2-pywavelets
4541 (package-with-python2 python-pywavelets))
4542
4543 (define-public python-xcffib
4544 (package
4545 (name "python-xcffib")
4546 (version "0.6.0")
4547 (source
4548 (origin
4549 (method url-fetch)
4550 (uri (pypi-uri "xcffib" version))
4551 (sha256
4552 (base32
4553 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4554 (build-system python-build-system)
4555 (inputs
4556 `(("libxcb" ,libxcb)))
4557 (propagated-inputs
4558 `(("python-cffi" ,python-cffi) ; used at run time
4559 ("python-six" ,python-six)))
4560 (arguments
4561 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4562 #:tests? #f
4563 #:phases
4564 (modify-phases %standard-phases
4565 (add-after 'unpack 'fix-libxcb-path
4566 (lambda* (#:key inputs #:allow-other-keys)
4567 (let ((libxcb (assoc-ref inputs "libxcb")))
4568 (substitute* '("xcffib/__init__.py")
4569 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4570 #t)))
4571 (add-after 'install 'install-doc
4572 (lambda* (#:key outputs #:allow-other-keys)
4573 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4574 "/doc/" ,name "-" ,version)))
4575 (mkdir-p doc)
4576 (copy-file "README.md"
4577 (string-append doc "/README.md"))
4578 #t))))))
4579 (home-page "https://github.com/tych0/xcffib")
4580 (synopsis "XCB Python bindings")
4581 (description
4582 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4583 support for Python 3 and PyPy. It is based on cffi.")
4584 (license license:expat)))
4585
4586 (define-public python2-xcffib
4587 (package-with-python2 python-xcffib))
4588
4589 (define-public python-cairocffi
4590 (package
4591 (name "python-cairocffi")
4592 (version "0.9.0")
4593 (source
4594 (origin
4595 (method url-fetch)
4596 (uri (pypi-uri "cairocffi" version))
4597 (sha256
4598 (base32
4599 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4600 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4601 (build-system python-build-system)
4602 (outputs '("out" "doc"))
4603 (inputs
4604 `(("glib" ,glib)
4605 ("gtk+" ,gtk+)
4606 ("gdk-pixbuf" ,gdk-pixbuf)
4607 ("cairo" ,cairo)
4608 ("pango" ,pango)))
4609 (native-inputs
4610 `(("pkg-config" ,pkg-config)
4611 ("python-pytest" ,python-pytest)
4612 ("python-pytest-cov" ,python-pytest-cov)
4613 ("python-pytest-runner" ,python-pytest-runner)
4614 ("python-sphinx" ,python-sphinx)
4615 ("python-docutils" ,python-docutils)))
4616 (propagated-inputs
4617 `(("python-xcffib" ,python-xcffib))) ; used at run time
4618 (arguments
4619 `(#:phases
4620 (modify-phases %standard-phases
4621 (add-after 'unpack 'patch-paths
4622 (lambda* (#:key inputs outputs #:allow-other-keys)
4623 (substitute* (find-files "." "\\.py$")
4624 (("dlopen\\(ffi, 'cairo'")
4625 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4626 "/lib/libcairo.so.2'"))
4627 (("dlopen\\(ffi, 'gdk-3'")
4628 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4629 "/lib/libgtk-3.so.0'"))
4630 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4631 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4632 "/lib/libgdk_pixbuf-2.0.so.0'"))
4633 (("dlopen\\(ffi, 'glib-2.0'")
4634 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4635 "/lib/libglib-2.0.so.0'"))
4636 (("dlopen\\(ffi, 'gobject-2.0'")
4637 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4638 "/lib/libgobject-2.0.so.0'"))
4639 (("dlopen\\(ffi, 'pangocairo-1.0'")
4640 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4641 "/lib/libpangocairo-1.0.so.0'"))
4642 (("dlopen\\(ffi, 'pango-1.0'")
4643 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4644 "/lib/libpango-1.0.so.0'")))
4645 #t))
4646 (add-after 'install 'install-doc
4647 (lambda* (#:key inputs outputs #:allow-other-keys)
4648 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4649 (doc (string-append data "/doc/" ,name "-" ,version))
4650 (html (string-append doc "/html")))
4651 (setenv "LD_LIBRARY_PATH"
4652 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4653 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4654 (setenv "LANG" "en_US.UTF-8")
4655 (mkdir-p html)
4656 (for-each (lambda (file)
4657 (copy-file (string-append "." file)
4658 (string-append doc file)))
4659 '("/README.rst" "/CHANGES" "/LICENSE"))
4660 (system* "python" "setup.py" "build_sphinx")
4661 (copy-recursively "docs/_build/html" html)
4662 #t))))))
4663 (home-page "https://github.com/Kozea/cairocffi")
4664 (synopsis "Python bindings and object-oriented API for Cairo")
4665 (description
4666 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4667 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4668 graphics library with support for multiple backends including image buffers,
4669 PNG, PostScript, PDF, and SVG file output.")
4670 (license license:bsd-3)))
4671
4672 (define-public python2-cairocffi
4673 (package-with-python2 python-cairocffi))
4674
4675 (define-public python-decorator
4676 (package
4677 (name "python-decorator")
4678 (version "4.3.0")
4679 (source
4680 (origin
4681 (method url-fetch)
4682 (uri (pypi-uri "decorator" version))
4683 (sha256
4684 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4685 (build-system python-build-system)
4686 (home-page "https://pypi.python.org/pypi/decorator/")
4687 (synopsis "Python module to simplify usage of decorators")
4688 (description
4689 "The aim of the decorator module is to simplify the usage of decorators
4690 for the average programmer, and to popularize decorators usage giving examples
4691 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4692 etc. The core of this module is a decorator factory.")
4693 (license license:expat)))
4694
4695 (define-public python2-decorator
4696 (package-with-python2 python-decorator))
4697
4698 (define-public python-drmaa
4699 (package
4700 (name "python-drmaa")
4701 (version "0.7.7")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 (uri (pypi-uri "drmaa" version))
4706 (sha256
4707 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4708 (build-system python-build-system)
4709 ;; The test suite requires libdrmaa which is provided by the cluster
4710 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4711 ;; should be set to the path of the libdrmaa library.
4712 (arguments '(#:tests? #f))
4713 (native-inputs
4714 `(("python-nose" ,python-nose)))
4715 (home-page "https://pypi.python.org/pypi/drmaa")
4716 (synopsis "Python bindings for the DRMAA library")
4717 (description
4718 "A Python package for Distributed Resource Management (DRM) job
4719 submission and control. This package is an implementation of the DRMAA 1.0
4720 Python language binding specification.")
4721 (license license:bsd-3)))
4722
4723 (define-public python2-drmaa
4724 (package-with-python2 python-drmaa))
4725
4726 (define-public python-grako
4727 (package
4728 (name "python-grako")
4729 (version "3.99.9")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri
4734 (pypi-uri "grako" version ".zip"))
4735 (sha256
4736 (base32
4737 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4738 (build-system python-build-system)
4739 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4740 (native-inputs
4741 `(("unzip" ,unzip)
4742 ("python-pytest" ,python-pytest)
4743 ("python-pytest-runner" ,python-pytest-runner)))
4744 (home-page "https://bitbucket.org/neogeny/grako")
4745 (synopsis "EBNF parser generator")
4746 (description
4747 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4748 memoizing PEG/Packrat parser in Python.")
4749 (license license:bsd-3)))
4750
4751 (define-public python2-grako
4752 (package-with-python2 python-grako))
4753
4754 (define-public python-gridmap
4755 (package
4756 (name "python-gridmap")
4757 (version "0.13.0")
4758 (source
4759 (origin
4760 (method git-fetch)
4761 (uri (git-reference
4762 (url "https://github.com/pygridtools/gridmap.git")
4763 (commit (string-append "v" version))))
4764 (file-name (git-file-name name version))
4765 (sha256
4766 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4767 (build-system python-build-system)
4768 (arguments
4769 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4770 (propagated-inputs
4771 `(("python-psutil" ,python-psutil)
4772 ("python-drmaa" ,python-drmaa)
4773 ("python-pyzmq" ,python-pyzmq)))
4774 (home-page "https://github.com/pygridtools/gridmap")
4775 (synopsis "Create jobs on a cluster directly from Python")
4776 (description
4777 "Gridmap is a Python package to allow you to easily create jobs on the
4778 cluster directly from Python. You can directly map Python functions onto the
4779 cluster without needing to write any wrapper code yourself.")
4780 (license license:gpl3+)))
4781
4782 (define-public python2-gridmap
4783 (package-with-python2 python-gridmap))
4784
4785 (define-public python-honcho
4786 (package
4787 (name "python-honcho")
4788 (version "1.0.1")
4789 (source
4790 (origin
4791 (method git-fetch)
4792 (uri (git-reference
4793 (url "https://github.com/nickstenning/honcho.git")
4794 (commit (string-append "v" version))))
4795 (file-name (git-file-name name version))
4796 (sha256
4797 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4798 (build-system python-build-system)
4799 (native-inputs
4800 `(("python-pytest" ,python-pytest)
4801 ("python-mock" ,python-mock)
4802 ("python-tox" ,python-tox)
4803 ("which" ,which))) ;for tests
4804 (propagated-inputs
4805 `(("python-jinja2" ,python-jinja2)))
4806 (arguments
4807 `(#:phases
4808 (modify-phases %standard-phases
4809 (delete 'check)
4810 (add-after 'install 'check
4811 (lambda* (#:key outputs inputs #:allow-other-keys)
4812 ;; fix honcho path in testsuite
4813 (substitute* "tests/conftest.py"
4814 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4815 "/bin/honcho" "'")))
4816 ;; It's easier to run tests after install.
4817 ;; Make installed package available for running the tests
4818 (add-installed-pythonpath inputs outputs)
4819 (invoke "py.test" "-v"))))))
4820 (home-page "https://github.com/nickstenning/honcho")
4821 (synopsis "Manage Procfile-based applications")
4822 (description
4823 "A Procfile is a file which describes how to run an application
4824 consisting of several processes. honcho starts all listed processes.
4825 The output of all running processes is collected by honcho and
4826 displayed.")
4827 (license license:expat)))
4828
4829 (define-public python2-honcho
4830 (package-with-python2 python-honcho))
4831
4832 (define-public python-pexpect
4833 (package
4834 (name "python-pexpect")
4835 (version "4.6.0")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (pypi-uri "pexpect" version))
4840 (sha256
4841 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4842 (build-system python-build-system)
4843 (arguments
4844 `(#:phases
4845 (modify-phases %standard-phases
4846 (add-before 'check 'prepare-tests
4847 (lambda _
4848 (substitute* (find-files "tests")
4849 (("/bin/ls") (which "ls"))
4850 (("/bin/echo") (which "echo"))
4851 (("/bin/which") (which "which"))
4852 ;; Many tests try to use the /bin directory which
4853 ;; is not present in the build environment.
4854 ;; Use one that's non-empty and unlikely to change.
4855 (("/bin'") "/dev'"))
4856 ;; XXX: Socket connection test gets "Connection reset by peer".
4857 ;; Why does it not work? Delete for now.
4858 (delete-file "tests/test_socket.py")
4859 #t))
4860 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4861 (native-inputs
4862 `(("python-nose" ,python-nose)
4863 ("python-pytest" ,python-pytest)
4864 ("man-db" ,man-db)
4865 ("which" ,which)
4866 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4867 (propagated-inputs
4868 `(("python-ptyprocess" ,python-ptyprocess)))
4869 (home-page "http://pexpect.readthedocs.org/")
4870 (synopsis "Controlling interactive console applications")
4871 (description
4872 "Pexpect is a pure Python module for spawning child applications;
4873 controlling them; and responding to expected patterns in their output.
4874 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4875 child application and control it as if a human were typing commands.")
4876 (license license:isc)))
4877
4878 (define-public python2-pexpect
4879 (package-with-python2 python-pexpect))
4880
4881 (define-public python-setuptools-scm
4882 (package
4883 (name "python-setuptools-scm")
4884 (version "3.2.0")
4885 (source (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "setuptools_scm" version))
4888 (sha256
4889 (base32
4890 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4891 (build-system python-build-system)
4892 (home-page "https://github.com/pypa/setuptools_scm/")
4893 (synopsis "Manage Python package versions in SCM metadata")
4894 (description
4895 "Setuptools_scm handles managing your Python package versions in
4896 @dfn{software configuration management} (SCM) metadata instead of declaring
4897 them as the version argument or in a SCM managed file.")
4898 (license license:expat)))
4899
4900 (define-public python2-setuptools-scm
4901 (package-with-python2 python-setuptools-scm))
4902
4903 (define-public python-pathlib2
4904 (package
4905 (name "python-pathlib2")
4906 (version "2.3.3")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "pathlib2" version))
4911 (sha256
4912 (base32
4913 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4914 (build-system python-build-system)
4915 (propagated-inputs
4916 `(("python-scandir" ,python-scandir)
4917 ("python-six" ,python-six)))
4918 (home-page "https://pypi.python.org/pypi/pathlib2/")
4919 (synopsis "Object-oriented filesystem paths")
4920 (description "The goal of pathlib2 is to provide a backport of the
4921 standard @code{pathlib} module which tracks the standard library module, so
4922 all the newest features of the standard @code{pathlib} can be used also on
4923 older Python versions.")
4924 (license license:expat)))
4925
4926 (define-public python-importlib-metadata
4927 (package
4928 (name "python-importlib-metadata")
4929 (version "0.18")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "importlib_metadata" version))
4934 (sha256
4935 (base32
4936 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4937 (build-system python-build-system)
4938 (propagated-inputs
4939 `(("python-configparser" ,python-configparser)
4940 ("python-contextlib2" ,python-contextlib2)
4941 ("python-docutils" ,python-docutils)
4942 ("python-pathlib2" ,python-pathlib2)
4943 ("python-rst.linker" ,python-rst.linker)
4944 ("python-zipp" ,python-zipp)))
4945 (native-inputs
4946 `(("python-setuptools-scm" ,python-setuptools-scm)
4947 ("python-sphinx" ,python-sphinx)))
4948 (home-page "https://importlib-metadata.readthedocs.io/")
4949 (synopsis "Read metadata from Python packages")
4950 (description
4951 "@code{importlib_metadata} is a library which provides an API for
4952 accessing an installed Python package's metadata, such as its entry points or
4953 its top-level name. This functionality intends to replace most uses of
4954 @code{pkg_resources} entry point API and metadata API. Along with
4955 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4956 need to use the older and less efficient @code{pkg_resources} package.")
4957 (license license:asl2.0)))
4958
4959 (define-public python-jaraco-packaging
4960 (package
4961 (name "python-jaraco-packaging")
4962 (version "6.1")
4963 (source
4964 (origin
4965 (method url-fetch)
4966 (uri (pypi-uri "jaraco.packaging" version))
4967 (sha256
4968 (base32
4969 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4970 (build-system python-build-system)
4971 (propagated-inputs
4972 `(("python-pytest" ,python-pytest)
4973 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4974 ("python-pytest-flake8" ,python-pytest-flake8)
4975 ("python-rst.linker" ,python-rst.linker)
4976 ("python-setuptools" ,python-setuptools)
4977 ("python-setuptools-scm" ,python-setuptools-scm)
4978 ("python-six" ,python-six)
4979 ("python-sphinx" ,python-sphinx)))
4980 (home-page "https://github.com/jaraco/jaraco.packaging")
4981 (synopsis "Tools to supplement packaging Python releases")
4982 (description
4983 "This package provides various tools to supplement packaging Python
4984 releases.")
4985 (license license:expat)))
4986
4987 (define-public python-pathpy
4988 (package
4989 (name "python-pathpy")
4990 (version "11.5.0")
4991 (source
4992 (origin
4993 (method url-fetch)
4994 (uri (pypi-uri "path.py" version))
4995 (sha256
4996 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4997 (outputs '("out" "doc"))
4998 (build-system python-build-system)
4999 (propagated-inputs
5000 `(("python-appdirs" ,python-appdirs)))
5001 (native-inputs
5002 `(("python-setuptools-scm" ,python-setuptools-scm)
5003 ("python-sphinx" ,python-sphinx)
5004 ("python-rst.linker" ,python-rst.linker)
5005 ("python-pytest" ,python-pytest)
5006 ("python-pytest-runner" ,python-pytest-runner)
5007 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5008 (arguments
5009 `(#:phases
5010 (modify-phases %standard-phases
5011 (add-after 'build 'build-doc
5012 (lambda _
5013 (setenv "LANG" "en_US.UTF-8")
5014 (invoke "python" "setup.py" "build_sphinx")))
5015 (add-after 'install 'install-doc
5016 (lambda* (#:key outputs #:allow-other-keys)
5017 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5018 (doc (string-append data "/doc/" ,name "-" ,version))
5019 (html (string-append doc "/html")))
5020 (mkdir-p html)
5021 (for-each (lambda (file)
5022 (copy-file file (string-append doc "/" file)))
5023 '("README.rst" "CHANGES.rst"))
5024 (copy-recursively "build/sphinx/html" html)
5025 #t)))
5026 (replace 'check
5027 (lambda _
5028 ;; The import time test aborts if an import takes longer than
5029 ;; 100ms. It may very well take a little longer than that.
5030 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5031 (home-page "https://github.com/jaraco/path.py")
5032 (synopsis "Python module wrapper for built-in os.path")
5033 (description
5034 "@code{path.py} implements path objects as first-class entities, allowing
5035 common operations on files to be invoked on those path objects directly.")
5036 (license license:expat)))
5037
5038 (define-public python2-pathpy
5039 (package-with-python2 python-pathpy))
5040
5041 (define-public python-simplegeneric
5042 (package
5043 (name "python-simplegeneric")
5044 (version "0.8.1")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 (uri (pypi-uri "simplegeneric" version ".zip"))
5049 (sha256
5050 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5051 (build-system python-build-system)
5052 (native-inputs
5053 `(("unzip" ,unzip)))
5054 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5055 (synopsis "Python module for simple generic functions")
5056 (description
5057 "The simplegeneric module lets you define simple single-dispatch generic
5058 functions, akin to Python’s built-in generic functions like @code{len()},
5059 @code{iter()} and so on. However, instead of using specially-named methods,
5060 these generic functions use simple lookup tables, akin to those used by
5061 e.g. @code{pickle.dump()} and other generic functions found in the Python
5062 standard library.")
5063 (license license:zpl2.1)))
5064
5065 (define-public python2-simplegeneric
5066 (package-with-python2 python-simplegeneric))
5067
5068 (define-public python-ipython-genutils
5069 ;; TODO: This package is retired, check if can be removed, see description.
5070 (package
5071 (name "python-ipython-genutils")
5072 (version "0.1.0")
5073 (source
5074 (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "ipython_genutils" version))
5077 (sha256
5078 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5079 (build-system python-build-system)
5080 (arguments `(#:tests? #f)) ; no tests
5081 (home-page "https://ipython.org")
5082 (synopsis "Vestigial utilities from IPython")
5083 (description
5084 "This package provides retired utilities from IPython. No packages
5085 outside IPython/Jupyter should depend on it.
5086
5087 This package shouldn't exist. It contains some common utilities shared by
5088 Jupyter and IPython projects during The Big Split. As soon as possible, those
5089 packages will remove their dependency on this, and this package will go
5090 away.")
5091 (license license:bsd-3)))
5092
5093 (define-public python2-ipython-genutils
5094 (package-with-python2 python-ipython-genutils))
5095
5096 (define-public python-traitlets
5097 (package
5098 (name "python-traitlets")
5099 (version "4.3.2")
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (pypi-uri "traitlets" version))
5104 (sha256
5105 (base32
5106 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5107 (build-system python-build-system)
5108 (arguments
5109 `(#:phases
5110 (modify-phases %standard-phases
5111 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5112 (propagated-inputs
5113 `(("python-ipython-genutils" ,python-ipython-genutils)
5114 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5115 (native-inputs
5116 `(("python-pytest" ,python-pytest)))
5117 (properties `((python2-variant . ,(delay python2-traitlets))))
5118 (home-page "https://ipython.org")
5119 (synopsis "Configuration system for Python applications")
5120 (description
5121 "Traitlets is a framework that lets Python classes have attributes with
5122 type checking, dynamically calculated default values, and ‘on change’
5123 callbacks. The package also includes a mechanism to use traitlets for
5124 configuration, loading values from files or from command line arguments. This
5125 is a distinct layer on top of traitlets, so you can use traitlets in your code
5126 without using the configuration machinery.")
5127 (license license:bsd-3)))
5128
5129 (define-public python2-traitlets
5130 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5131 (package
5132 (inherit traitlets)
5133 (propagated-inputs
5134 `(("python2-enum34" ,python2-enum34)
5135 ,@(package-propagated-inputs traitlets))))))
5136
5137 (define-public python-jupyter-core
5138 (package
5139 (name "python-jupyter-core")
5140 (version "4.4.0")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (string-append (pypi-uri "jupyter_core" version)))
5145 (sha256
5146 (base32
5147 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5148 (build-system python-build-system)
5149 ;; FIXME: not sure how to run the tests
5150 (arguments `(#:tests? #f))
5151 (propagated-inputs
5152 `(("python-traitlets" ,python-traitlets)))
5153 (home-page "http://jupyter.org/")
5154 (synopsis "Jupyter base package")
5155 (description
5156 "Jupyter core is the base package on which Jupyter projects rely.")
5157 (license license:bsd-3)))
5158
5159 (define-public python2-jupyter-core
5160 (package-with-python2 python-jupyter-core))
5161
5162 (define-public python-jupyter-client
5163 (package
5164 (name "python-jupyter-client")
5165 (version "5.2.4")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "jupyter_client" version))
5170 (sha256
5171 (base32
5172 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5173 (build-system python-build-system)
5174 ;; Tests fail because of missing native python kernel which I assume is
5175 ;; provided by the ipython package, which we cannot use because it would
5176 ;; cause a dependency cycle.
5177 (arguments `(#:tests? #f))
5178 (propagated-inputs
5179 `(("python-pyzmq" ,python-pyzmq)
5180 ("python-traitlets" ,python-traitlets)
5181 ("python-jupyter-core" ,python-jupyter-core)))
5182 (home-page "http://jupyter.org/")
5183 (synopsis "Jupyter protocol implementation and client libraries")
5184 (description
5185 "The @code{jupyter_client} package contains the reference implementation
5186 of the Jupyter protocol. It also provides client and kernel management APIs
5187 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5188 installing @code{kernelspec}s for use with Jupyter frontends.")
5189 (license license:bsd-3)))
5190
5191 (define-public python2-jupyter-client
5192 (package-with-python2 python-jupyter-client))
5193
5194 (define-public python-ipykernel
5195 (package
5196 (name "python-ipykernel")
5197 (version "5.1.1")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (pypi-uri "ipykernel" version))
5202 (sha256
5203 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5204 (build-system python-build-system)
5205 (arguments
5206 `(#:phases
5207 (modify-phases %standard-phases
5208 (replace 'check
5209 (lambda _
5210 (setenv "HOME" "/tmp")
5211 (invoke "pytest" "-v")
5212 #t)))))
5213 (propagated-inputs
5214 `(("python-ipython" ,python-ipython)
5215 ;; imported at runtime during connect
5216 ("python-jupyter-client" ,python-jupyter-client)))
5217 (native-inputs
5218 `(("python-pytest" ,python-pytest)
5219 ("python-nose" ,python-nose)))
5220 (home-page "https://ipython.org")
5221 (synopsis "IPython Kernel for Jupyter")
5222 (description
5223 "This package provides the IPython kernel for Jupyter.")
5224 (license license:bsd-3)))
5225
5226 ;; Version 5.1.1 and above no longer support Python 2.
5227 (define-public python2-ipykernel
5228 (package
5229 (name "python2-ipykernel")
5230 (version "5.1.0")
5231 (source
5232 (origin
5233 (method url-fetch)
5234 (uri (pypi-uri "ipykernel" version))
5235 (sha256
5236 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5237 (build-system python-build-system)
5238 (arguments
5239 `(#:python ,python-2
5240 #:phases
5241 (modify-phases %standard-phases
5242 (replace 'check
5243 (lambda _
5244 (setenv "HOME" "/tmp")
5245 (invoke "pytest" "-v")
5246 #t)))))
5247 (propagated-inputs
5248 `(("python2-ipython" ,python2-ipython)
5249 ;; imported at runtime during connect
5250 ("python2-jupyter-client" ,python2-jupyter-client)))
5251 (native-inputs
5252 `(("python2-pytest" ,python2-pytest)
5253 ("python2-nose" ,python2-nose)))
5254 (home-page "https://ipython.org")
5255 (synopsis "IPython Kernel for Jupyter")
5256 (description
5257 "This package provides the IPython kernel for Jupyter.")
5258 (license license:bsd-3)))
5259
5260 (define-public python-pari-jupyter
5261 (package
5262 (name "python-pari-jupyter")
5263 (version "1.3.2")
5264 (source
5265 (origin
5266 (method url-fetch)
5267 (uri (pypi-uri "pari_jupyter" version))
5268 (sha256
5269 (base32
5270 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5271 (build-system python-build-system)
5272 (propagated-inputs
5273 `(("python-ipykernel" ,python-ipykernel)))
5274 (inputs
5275 `(("pari-gp" ,pari-gp)
5276 ("readline" ,readline)))
5277 (arguments
5278 `(#:tests? #f)) ; no test suite
5279 (home-page
5280 "https://github.com/jdemeyer/pari_jupyter")
5281 (synopsis "A Jupyter kernel for PARI/GP")
5282 (description "The package provides a PARI/GP kernel for Jupyter.")
5283 (license license:gpl3+)))
5284
5285 (define-public python-backcall
5286 (package
5287 (name "python-backcall")
5288 (version "0.1.0")
5289 (source
5290 (origin
5291 (method url-fetch)
5292 (uri (pypi-uri "backcall" version))
5293 (sha256
5294 (base32
5295 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5296 (build-system python-build-system)
5297 (home-page "https://github.com/takluyver/backcall/")
5298 (synopsis "Specifications for callback functions passed in to an API")
5299 (description
5300 "If your code lets other people supply callback functions, it's important
5301 to specify the function signature you expect, and check that functions support
5302 that. Adding extra parameters later would break other peoples code unless
5303 you're careful. The @code{backcall} package provides a way of specifying the
5304 callback signature using a prototype function.")
5305 (license license:bsd-3)))
5306
5307 ;; This is the latest release of the LTS version of ipython with support for
5308 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5309 ;; dropped support for Python 2.7.
5310 (define-public python2-ipython
5311 (package
5312 (name "python2-ipython")
5313 (version "5.8.0")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (pypi-uri "ipython" version ".tar.gz"))
5318 (sha256
5319 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5320 (build-system python-build-system)
5321 (propagated-inputs
5322 `(("python2-backports-shutil-get-terminal-size"
5323 ,python2-backports-shutil-get-terminal-size)
5324 ("python2-pathlib2" ,python2-pathlib2)
5325 ("python2-pyzmq" ,python2-pyzmq)
5326 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5327 ("python2-terminado" ,python2-terminado)
5328 ("python2-matplotlib" ,python2-matplotlib)
5329 ("python2-numpy" ,python2-numpy)
5330 ("python2-numpydoc" ,python2-numpydoc)
5331 ("python2-jinja2" ,python2-jinja2)
5332 ("python2-mistune" ,python2-mistune)
5333 ("python2-pexpect" ,python2-pexpect)
5334 ("python2-pickleshare" ,python2-pickleshare)
5335 ("python2-simplegeneric" ,python2-simplegeneric)
5336 ("python2-jsonschema" ,python2-jsonschema)
5337 ("python2-traitlets" ,python2-traitlets)
5338 ("python2-nbformat" ,python2-nbformat)
5339 ("python2-pygments" ,python2-pygments)))
5340 (inputs
5341 `(("readline" ,readline)
5342 ("which" ,which)))
5343 (native-inputs
5344 `(("graphviz" ,graphviz)
5345 ("pkg-config" ,pkg-config)
5346 ("python2-requests" ,python2-requests) ;; for tests
5347 ("python2-testpath" ,python2-testpath)
5348 ("python2-mock" ,python2-mock)
5349 ("python2-nose" ,python2-nose)))
5350 (arguments
5351 `(#:python ,python-2
5352 #:phases
5353 (modify-phases %standard-phases
5354 (add-before 'check 'delete-broken-tests
5355 (lambda* (#:key inputs #:allow-other-keys)
5356 ;; These tests throw errors for unknown reasons.
5357 (delete-file "IPython/core/tests/test_profile.py")
5358 (delete-file "IPython/core/tests/test_interactiveshell.py")
5359 (delete-file "IPython/core/tests/test_magic.py")
5360 #t)))))
5361 (home-page "https://ipython.org")
5362 (synopsis "IPython is a tool for interactive computing in Python")
5363 (description
5364 "IPython provides a rich architecture for interactive computing with:
5365 Powerful interactive shells, a browser-based notebook, support for interactive
5366 data visualization, embeddable interpreters and tools for parallel
5367 computing.")
5368 (license license:bsd-3)))
5369
5370 (define-public python-ipython
5371 (package
5372 (name "python-ipython")
5373 (version "7.5.0")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (pypi-uri "ipython" version ".tar.gz"))
5378 (sha256
5379 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5380 (build-system python-build-system)
5381 (propagated-inputs
5382 `(("python-backcall" ,python-backcall)
5383 ("python-pyzmq" ,python-pyzmq)
5384 ("python-prompt-toolkit" ,python-prompt-toolkit)
5385 ("python-terminado" ,python-terminado)
5386 ("python-matplotlib" ,python-matplotlib)
5387 ("python-numpy" ,python-numpy)
5388 ("python-numpydoc" ,python-numpydoc)
5389 ("python-jedi" ,python-jedi)
5390 ("python-jinja2" ,python-jinja2)
5391 ("python-mistune" ,python-mistune)
5392 ("python-pexpect" ,python-pexpect)
5393 ("python-pickleshare" ,python-pickleshare)
5394 ("python-simplegeneric" ,python-simplegeneric)
5395 ("python-jsonschema" ,python-jsonschema)
5396 ("python-traitlets" ,python-traitlets)
5397 ("python-nbformat" ,python-nbformat)
5398 ("python-pygments" ,python-pygments)))
5399 (inputs
5400 `(("readline" ,readline)
5401 ("which" ,which)))
5402 (native-inputs
5403 `(("graphviz" ,graphviz)
5404 ("pkg-config" ,pkg-config)
5405 ("python-requests" ,python-requests) ;; for tests
5406 ("python-testpath" ,python-testpath)
5407 ("python-nose" ,python-nose)))
5408 (arguments
5409 `(#:phases
5410 (modify-phases %standard-phases
5411 ;; Tests can only be run after the library has been installed and not
5412 ;; within the source directory.
5413 (delete 'check)
5414 (add-after 'install 'check
5415 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5416 (if tests?
5417 (begin
5418 ;; Make installed package available for running the tests
5419 (add-installed-pythonpath inputs outputs)
5420 (setenv "HOME" "/tmp/") ;; required by a test
5421 ;; We only test the core because one of the other tests
5422 ;; tries to import ipykernel.
5423 (invoke "python" "IPython/testing/iptest.py"
5424 "-v" "IPython/core/tests"))
5425 #t)))
5426 (add-before 'check 'fix-tests
5427 (lambda* (#:key inputs #:allow-other-keys)
5428 (substitute* "./IPython/utils/_process_posix.py"
5429 (("/usr/bin/env', 'which") (which "which")))
5430 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5431 (("#!/usr/bin/env python")
5432 (string-append "#!" (which "python"))))
5433 ;; This test introduces a circular dependency on ipykernel
5434 ;; (which depends on ipython).
5435 (delete-file "IPython/core/tests/test_display.py")
5436 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5437 (delete-file "IPython/core/tests/test_interactiveshell.py")
5438 #t)))))
5439 (home-page "https://ipython.org")
5440 (synopsis "IPython is a tool for interactive computing in Python")
5441 (description
5442 "IPython provides a rich architecture for interactive computing with:
5443 Powerful interactive shells, a browser-based notebook, support for interactive
5444 data visualization, embeddable interpreters and tools for parallel
5445 computing.")
5446 (license license:bsd-3)))
5447
5448 (define-public python-ipython-documentation
5449 (package
5450 (inherit python-ipython)
5451 (name "python-ipython-documentation")
5452 (version (package-version python-ipython))
5453 (arguments
5454 `(#:phases
5455 (modify-phases %standard-phases
5456 (delete 'build)
5457 (delete 'check)
5458 (replace 'install
5459 (lambda* (#:key outputs #:allow-other-keys)
5460 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5461 (doc (string-append data "/doc/" ,name "-" ,version))
5462 (html (string-append doc "/html"))
5463 (man1 (string-append data "/man/man1"))
5464 (info (string-append data "/info"))
5465 (examples (string-append doc "/examples"))
5466 (python-arg (string-append "PYTHON=" (which "python"))))
5467 (setenv "LANG" "en_US.utf8")
5468 (with-directory-excursion "docs"
5469 ;; FIXME: pdf fails to build
5470 ;;(system* "make" "pdf" "PAPER=a4")
5471 (system* "make" python-arg "html")
5472 ;; FIXME: the generated texi file contains ^@^@, which trips
5473 ;; up the parser.
5474 ;; (system* "make" python-arg "info")
5475 )
5476 (copy-recursively "docs/man" man1)
5477 (copy-recursively "examples" examples)
5478 (copy-recursively "docs/build/html" html)
5479 ;; (copy-file "docs/build/latex/ipython.pdf"
5480 ;; (string-append doc "/ipython.pdf"))
5481 (mkdir-p info)
5482 ;; (copy-file "docs/build/texinfo/ipython.info"
5483 ;; (string-append info "/ipython.info"))
5484 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5485 #t)))))
5486 (inputs
5487 `(("python-ipython" ,python-ipython)
5488 ("python-ipykernel" ,python-ipykernel)))
5489 (native-inputs
5490 `(("python-sphinx" ,python-sphinx)
5491 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5492 ;; FIXME: It's possible that a smaller union would work just as well.
5493 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5494 texlive-fonts-ec
5495 texlive-generic-ifxetex
5496 texlive-generic-pdftex
5497 texlive-latex-amsfonts
5498 texlive-latex-capt-of
5499 texlive-latex-cmap
5500 texlive-latex-environ
5501 texlive-latex-eqparbox
5502 texlive-latex-etoolbox
5503 texlive-latex-expdlist
5504 texlive-latex-fancyhdr
5505 texlive-latex-fancyvrb
5506 texlive-latex-fncychap
5507 texlive-latex-float
5508 texlive-latex-framed
5509 texlive-latex-geometry
5510 texlive-latex-graphics
5511 texlive-latex-hyperref
5512 texlive-latex-mdwtools
5513 texlive-latex-multirow
5514 texlive-latex-needspace
5515 texlive-latex-oberdiek
5516 texlive-latex-parskip
5517 texlive-latex-preview
5518 texlive-latex-tabulary
5519 texlive-latex-threeparttable
5520 texlive-latex-titlesec
5521 texlive-latex-trimspaces
5522 texlive-latex-ucs
5523 texlive-latex-upquote
5524 texlive-latex-url
5525 texlive-latex-varwidth
5526 texlive-latex-wrapfig)))
5527 ("texinfo" ,texinfo)))))
5528
5529 (define-public python-urwid
5530 (package
5531 (name "python-urwid")
5532 (version "2.0.1")
5533 (source
5534 (origin
5535 (method url-fetch)
5536 (uri (pypi-uri "urwid" version))
5537 (sha256
5538 (base32
5539 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5540 (build-system python-build-system)
5541 (home-page "http://urwid.org")
5542 (synopsis "Console user interface library for Python")
5543 (description
5544 "Urwid is a curses-based UI/widget library for Python. It includes many
5545 features useful for text console applications.")
5546 (license license:lgpl2.1+)))
5547
5548 (define-public python2-urwid
5549 (package-with-python2 python-urwid))
5550
5551 (define-public python-urwidtrees
5552 (package
5553 (name "python-urwidtrees")
5554 (version "1.0.2")
5555 (source
5556 (origin
5557 (method url-fetch)
5558 ;; package author intends on distributing via github rather than pypi:
5559 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5560 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5561 version ".tar.gz"))
5562 (file-name (string-append name "-" version ".tar.gz"))
5563 (sha256
5564 (base32
5565 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5566 (build-system python-build-system)
5567 (arguments
5568 '(#:tests? #f)) ; no tests
5569 (propagated-inputs `(("python-urwid" ,python-urwid)))
5570 (home-page "https://github.com/pazz/urwidtrees")
5571 (synopsis "Tree widgets for urwid")
5572 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5573 toolkit. Use it to build trees of widgets.")
5574 (license license:gpl3+)))
5575
5576 (define-public python2-urwidtrees
5577 (package-with-python2 python-urwidtrees))
5578
5579 (define-public python-ua-parser
5580 (package
5581 (name "python-ua-parser")
5582 (version "0.8.0")
5583 (source
5584 (origin
5585 (method url-fetch)
5586 (uri (pypi-uri "ua-parser" version))
5587 (sha256
5588 (base32
5589 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5590 (build-system python-build-system)
5591 (arguments
5592 `(#:tests? #f)) ;no test suite in release
5593 (native-inputs
5594 `(("python-pyyaml" ,python-pyyaml)))
5595 (home-page "https://github.com/ua-parser/uap-python")
5596 (synopsis "User agent parser")
5597 (description
5598 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5599 (license license:asl2.0)))
5600
5601 (define-public python2-ua-parser
5602 (package-with-python2 python-ua-parser))
5603
5604 (define-public python-user-agents
5605 (package
5606 (name "python-user-agents")
5607 (version "1.1.0")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "user-agents" version))
5612 (sha256
5613 (base32
5614 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5615 (build-system python-build-system)
5616 (arguments
5617 `(#:tests? #f)) ;missing devices.json test file in release
5618 (propagated-inputs
5619 `(("python-ua-parser" ,python-ua-parser)))
5620 (home-page "https://github.com/selwin/python-user-agents")
5621 (synopsis "User Agent strings parsing library")
5622 (description
5623 "A library to identify devices (phones, tablets) and their capabilities by
5624 parsing (browser/HTTP) user agent strings.")
5625 (license license:expat)))
5626
5627 (define-public python2-user-agents
5628 (package-with-python2 python-user-agents))
5629
5630 (define-public python-dbus
5631 (package
5632 (name "python-dbus")
5633 (version "1.2.8")
5634 (source
5635 (origin
5636 (method url-fetch)
5637 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5638 "dbus-python-" version ".tar.gz"))
5639 (sha256
5640 (base32
5641 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5642 (build-system gnu-build-system)
5643 (arguments
5644 '(#:phases
5645 (modify-phases %standard-phases
5646 (add-before
5647 'check 'pre-check
5648 (lambda _
5649 ;; XXX: For the missing '/etc/machine-id'.
5650 (substitute* "test/run-test.sh"
5651 (("DBUS_FATAL_WARNINGS=1")
5652 "DBUS_FATAL_WARNINGS=0"))
5653 #t)))))
5654 (native-inputs
5655 `(("pkg-config" ,pkg-config)))
5656 (inputs
5657 `(("python" ,python-wrapper)
5658 ("dbus-glib" ,dbus-glib)))
5659 (synopsis "Python bindings for D-bus")
5660 (description "python-dbus provides bindings for libdbus, the reference
5661 implementation of D-Bus.")
5662 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5663 (license license:expat)))
5664
5665 (define-public python2-dbus
5666 (package (inherit python-dbus)
5667 (name "python2-dbus")
5668 (inputs `(("python" ,python-2)
5669 ,@(alist-delete "python"
5670 (package-inputs python-dbus)
5671 equal?)))
5672 ;; FIXME: on Python 2, the test_utf8 fails with:
5673 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5674 (arguments `(#:tests? #f))))
5675
5676 (define-public python-notify2
5677 (package
5678 (name "python-notify2")
5679 (version "0.3.1")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (pypi-uri "notify2" version))
5684 (sha256
5685 (base32
5686 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5687 (build-system python-build-system)
5688 (arguments `(#:tests? #f)) ; tests depend on system state
5689 (native-inputs
5690 `(("python-dbus" ,python-dbus)))
5691 (home-page "https://bitbucket.org/takluyver/pynotify2")
5692 (synopsis "Python interface to D-Bus notifications")
5693 (description
5694 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5695 It is a reimplementation of pynotify in pure Python, and an alternative to
5696 the GObject Introspection bindings to libnotify for non-GTK applications.")
5697 (license (list license:bsd-2
5698 license:lgpl2.1+))))
5699
5700 (define-public python2-notify2
5701 (package-with-python2 python-notify2))
5702
5703 (define-public python-lxml
5704 (package
5705 (name "python-lxml")
5706 (version "4.2.5")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (pypi-uri "lxml" version))
5711 (sha256
5712 (base32
5713 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5714 (build-system python-build-system)
5715 (inputs
5716 `(("libxml2" ,libxml2)
5717 ("libxslt" ,libxslt)))
5718 (home-page "http://lxml.de/")
5719 (synopsis
5720 "Python XML processing library")
5721 (description
5722 "The lxml XML toolkit is a Pythonic binding for the C libraries
5723 libxml2 and libxslt.")
5724 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5725
5726 (define-public python2-lxml
5727 (package-with-python2 python-lxml))
5728
5729 ;; beautifulsoup4 has a totally different namespace than 3.x,
5730 ;; and pypi seems to put it under its own name, so I guess we should too
5731 (define-public python-beautifulsoup4
5732 (package
5733 (name "python-beautifulsoup4")
5734 (version "4.7.1")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "beautifulsoup4" version))
5739 (sha256
5740 (base32
5741 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:phases
5745 (modify-phases %standard-phases
5746 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5747 ;; must use this conversion script when building with Python 3. The
5748 ;; conversion script also runs the tests.
5749 ;; For more information, see the file 'convert-py3k' in the source
5750 ;; distribution.
5751 (replace 'check
5752 (lambda _ (invoke "./convert-py3k"))))))
5753 (propagated-inputs
5754 `(("python-soupsieve" ,python-soupsieve)))
5755 (home-page
5756 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5757 (synopsis
5758 "Python screen-scraping library")
5759 (description
5760 "Beautiful Soup is a Python library designed for rapidly setting up
5761 screen-scraping projects. It offers Pythonic idioms for navigating,
5762 searching, and modifying a parse tree, providing a toolkit for
5763 dissecting a document and extracting what you need. It automatically
5764 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5765 (license license:expat)
5766 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5767
5768 (define-public python2-beautifulsoup4
5769 (package
5770 (inherit (package-with-python2
5771 (strip-python2-variant python-beautifulsoup4)))
5772 (arguments `(#:python ,python-2))))
5773
5774 (define-public python-soupsieve
5775 (package
5776 (name "python-soupsieve")
5777 (version "1.9.2")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "soupsieve" version))
5782 (sha256
5783 (base32
5784 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5785 (build-system python-build-system)
5786 (arguments `(#:tests? #f))
5787 ;;XXX: 2 tests fail currently despite claming they were to be
5788 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5789 ;;don't want to create a circular dependency.
5790 (home-page "https://github.com/facelessuser/soupsieve")
5791 (synopsis "CSS selector library")
5792 (description
5793 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5794 Soup 4. It aims to provide selecting, matching, and filtering using modern
5795 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5796 specifications up through the latest CSS level 4 drafts and beyond (though
5797 some are not yet implemented).")
5798 (properties `((python2-variant . ,(delay python2-soupsieve))))
5799 (license license:expat)))
5800
5801 (define-public python2-soupsieve
5802 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5803 (package
5804 (inherit base)
5805 (propagated-inputs
5806 `(("python2-backports-functools-lru-cache"
5807 ,python2-backports-functools-lru-cache)
5808 ,@(package-propagated-inputs base))))))
5809
5810 (define-public python-netifaces
5811 (package
5812 (name "python-netifaces")
5813 (version "0.10.7")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (pypi-uri "netifaces" version))
5818 (sha256
5819 (base32
5820 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5821 (build-system python-build-system)
5822 (home-page "https://github.com/al45tair/netifaces")
5823 (synopsis
5824 "Python module for portable network interface information")
5825 (description
5826 "Netifaces is a Python module providing information on network
5827 interfaces in an easy and portable manner.")
5828 (license license:expat)))
5829
5830 (define-public python2-netifaces
5831 (package-with-python2 python-netifaces))
5832
5833 (define-public python-networkx
5834 (package
5835 (name "python-networkx")
5836 (version "2.2")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (pypi-uri "networkx" version ".zip"))
5841 (sha256
5842 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5843 (build-system python-build-system)
5844 ;; python-decorator is needed at runtime.
5845 (propagated-inputs
5846 `(("python-decorator" ,python-decorator)))
5847 (native-inputs
5848 `(("python-nose" ,python-nose)
5849 ("unzip" ,unzip)))
5850 (home-page "https://networkx.github.io/")
5851 (synopsis "Python module for creating and manipulating graphs and networks")
5852 (description
5853 "NetworkX is a Python package for the creation, manipulation, and study
5854 of the structure, dynamics, and functions of complex networks.")
5855 (license license:bsd-3)))
5856
5857 (define-public python2-networkx
5858 (package-with-python2 python-networkx))
5859
5860 (define-public python-datrie
5861 (package
5862 (name "python-datrie")
5863 (version "0.7.1")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "datrie" version))
5868 (sha256
5869 (base32
5870 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5871 (build-system python-build-system)
5872 (arguments
5873 `(#:phases (modify-phases %standard-phases
5874 (add-before 'build 'cythonize
5875 (lambda _
5876 ;; Regenerate Cython classes to solve ABI issues with Python
5877 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5878 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5879 "src/stdio_ext.pxd" "-a"))))))
5880 (native-inputs
5881 `(("python-cython" ,python-cython)
5882 ("python-hypothesis" ,python-hypothesis)
5883 ("python-pytest" ,python-pytest)
5884 ("python-pytest-runner" ,python-pytest-runner)))
5885 (home-page "https://github.com/kmike/datrie")
5886 (synopsis "Fast, efficiently stored trie for Python")
5887 (description
5888 "This package provides a fast, efficiently stored trie implementation for
5889 Python.")
5890 (license license:lgpl2.1+)))
5891
5892 (define-public snakemake
5893 (package
5894 (name "snakemake")
5895 (version "5.2.4")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "snakemake" version))
5900 (sha256
5901 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5902 (build-system python-build-system)
5903 (arguments
5904 ;; TODO: Package missing test dependencies.
5905 '(#:tests? #f
5906 #:phases
5907 (modify-phases %standard-phases
5908 ;; For cluster execution Snakemake will call Python. Since there is
5909 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5910 ;; this by calling the snakemake wrapper instead.
5911 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5912 (lambda* (#:key outputs #:allow-other-keys)
5913 (substitute* "snakemake/executors.py"
5914 (("\\{sys.executable\\} -m snakemake")
5915 (string-append (assoc-ref outputs "out")
5916 "/bin/snakemake")))
5917 #t)))))
5918 (propagated-inputs
5919 `(("python-gitpython" ,python-gitpython)
5920 ("python-wrapt" ,python-wrapt)
5921 ("python-requests" ,python-requests)
5922 ("python-appdirs" ,python-appdirs)
5923 ("python-configargparse" ,python-configargparse)
5924 ("python-datrie" ,python-datrie)
5925 ("python-docutils" ,python-docutils)
5926 ("python-jinja2" ,python-jinja2)
5927 ("python-jsonschema" ,python-jsonschema)
5928 ("python-networkx" ,python-networkx)
5929 ("python-pyyaml" ,python-pyyaml)
5930 ("python-ratelimiter" ,python-ratelimiter)))
5931 (home-page "https://snakemake.readthedocs.io")
5932 (synopsis "Python-based execution environment for make-like workflows")
5933 (description
5934 "Snakemake aims to reduce the complexity of creating workflows by
5935 providing a clean and modern domain specific specification language (DSL) in
5936 Python style, together with a fast and comfortable execution environment.")
5937 (license license:expat)))
5938
5939 ;; This is currently needed for the pigx-* packages.
5940 (define-public snakemake-4
5941 (package (inherit snakemake)
5942 (version "4.4.0")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "snakemake" version))
5947 (sha256
5948 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5949 (propagated-inputs
5950 `(("python-wrapt" ,python-wrapt)
5951 ("python-requests" ,python-requests)
5952 ("python-appdirs" ,python-appdirs)
5953 ("python-configargparse" ,python-configargparse)
5954 ("python-pyyaml" ,python-pyyaml)
5955 ("python-ratelimiter" ,python-ratelimiter)))))
5956
5957 (define-public python-pyqrcode
5958 (package
5959 (name "python-pyqrcode")
5960 (version "1.2.1")
5961 (source
5962 (origin
5963 (method url-fetch)
5964 (uri (pypi-uri "PyQRCode" version))
5965 (sha256
5966 (base32
5967 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5968 (build-system python-build-system)
5969 (home-page
5970 "https://github.com/mnooner256/pyqrcode")
5971 (synopsis "QR code generator")
5972 (description
5973 "Pyqrcode is a QR code generator written purely in Python with
5974 SVG, EPS, PNG and terminal output.")
5975 (license license:bsd-3)))
5976
5977 (define-public python-seaborn
5978 (package
5979 (name "python-seaborn")
5980 (version "0.9.0")
5981 (source
5982 (origin
5983 (method url-fetch)
5984 (uri (pypi-uri "seaborn" version))
5985 (sha256
5986 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5987 (build-system python-build-system)
5988 (arguments
5989 `(#:phases
5990 (modify-phases %standard-phases
5991 (add-before 'check 'start-xserver
5992 (lambda* (#:key inputs #:allow-other-keys)
5993 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5994 ;; There must be a running X server and make check doesn't
5995 ;; start one. Therefore we must do it.
5996 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5997 (setenv "DISPLAY" ":1")
5998 #t)))
5999 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6000 (propagated-inputs
6001 `(("python-pandas" ,python-pandas)
6002 ("python-matplotlib" ,python-matplotlib)
6003 ("python-numpy" ,python-numpy)
6004 ("python-scipy" ,python-scipy)))
6005 (native-inputs
6006 `(("python-pytest" ,python-pytest)
6007 ("xorg-server" ,xorg-server)))
6008 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6009 (synopsis "Statistical data visualization")
6010 (description
6011 "Seaborn is a library for making attractive and informative statistical
6012 graphics in Python. It is built on top of matplotlib and tightly integrated
6013 with the PyData stack, including support for numpy and pandas data structures
6014 and statistical routines from scipy and statsmodels.")
6015 (license license:bsd-3)))
6016
6017 (define-public python2-seaborn
6018 (package-with-python2 python-seaborn))
6019
6020 (define-public python-mpmath
6021 (package
6022 (name "python-mpmath")
6023 (version "0.19")
6024 (source (origin
6025 (method url-fetch)
6026 (uri (string-append "http://mpmath.org/files/mpmath-"
6027 version ".tar.gz"))
6028 (sha256
6029 (base32
6030 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6031 (build-system python-build-system)
6032 (arguments
6033 '(#:phases
6034 (modify-phases %standard-phases
6035 (replace 'check
6036 (lambda _
6037 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6038 (home-page "http://mpmath.org")
6039 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6040 (description
6041 "@code{mpmath} can be used as an arbitrary-precision substitute for
6042 Python's float/complex types and math/cmath modules, but also does much
6043 more advanced mathematics.")
6044 (license license:bsd-3)))
6045
6046 (define-public python2-mpmath
6047 (package-with-python2 python-mpmath))
6048
6049 (define-public python-bigfloat
6050 (package
6051 (name "python-bigfloat")
6052 (version "0.3.0")
6053 (source
6054 (origin
6055 (method url-fetch)
6056 (uri (pypi-uri "bigfloat" version))
6057 (sha256
6058 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6059 (build-system python-build-system)
6060 (inputs
6061 `(("mpfr" ,mpfr)))
6062 (home-page "https://github.com/mdickinson/bigfloat")
6063 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6064 (description
6065 "This package provides a Python interface to the MPFR library for
6066 multiprecision arithmetic.")
6067 (license license:lgpl3+)))
6068
6069 (define-public python2-bigfloat
6070 (package-with-python2 python-bigfloat))
6071
6072 (define-public python-sympy
6073 (package
6074 (name "python-sympy")
6075 (version "1.1.1")
6076 (source
6077 (origin
6078 (method url-fetch)
6079 (uri (string-append
6080 "https://github.com/sympy/sympy/releases/download/sympy-"
6081 version "/sympy-" version ".tar.gz"))
6082 (sha256
6083 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6084 (build-system python-build-system)
6085 (arguments
6086 `(#:phases
6087 (modify-phases %standard-phases
6088 ;; Run the core tests after installation. By default it would run
6089 ;; *all* tests, which take a very long time to complete and are known
6090 ;; to be flaky.
6091 (delete 'check)
6092 (add-after 'install 'check
6093 (lambda* (#:key outputs #:allow-other-keys)
6094 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6095 #t)))))
6096 (propagated-inputs
6097 `(("python-mpmath" ,python-mpmath)))
6098 (home-page "http://www.sympy.org/")
6099 (synopsis "Python library for symbolic mathematics")
6100 (description
6101 "SymPy is a Python library for symbolic mathematics. It aims to become a
6102 full-featured computer algebra system (CAS) while keeping the code as simple
6103 as possible in order to be comprehensible and easily extensible.")
6104 (license license:bsd-3)))
6105
6106 (define-public python2-sympy
6107 (package
6108 (inherit (package-with-python2 python-sympy))
6109 (arguments
6110 `(#:phases
6111 (modify-phases %standard-phases
6112 ;; Run the core tests after installation. By default it would run
6113 ;; *all* tests, which take a very long time to complete and are known
6114 ;; to be flaky.
6115 (delete 'check)
6116 (add-after 'install 'check
6117 (lambda* (#:key outputs #:allow-other-keys)
6118 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6119 #t)))))))
6120
6121 (define-public python-q
6122 (package
6123 (name "python-q")
6124 (version "2.6")
6125 (source
6126 (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "q" version))
6129 (sha256
6130 (base32
6131 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6132 (build-system python-build-system)
6133 (home-page "https://github.com/zestyping/q")
6134 (synopsis "Quick-and-dirty debugging output for tired programmers")
6135 (description
6136 "q is a Python module for \"print\" style of debugging Python code. It
6137 provides convenient short API for print out of values, tracebacks, and
6138 falling into the Python interpreter.")
6139 (license license:asl2.0)))
6140
6141 (define-public python2-q
6142 (package-with-python2 python-q))
6143
6144 (define-public python2-xlib
6145 (package
6146 (name "python2-xlib")
6147 (version "0.14")
6148 (source (origin
6149 (method url-fetch)
6150 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6151 "/" version "/"
6152 "python-xlib-" version ".tar.gz"))
6153 (sha256
6154 (base32
6155 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6156 (build-system python-build-system)
6157 (arguments
6158 `(#:python ,python-2 ;Python 2 only
6159 #:tests? #f)) ;no tests
6160 (home-page "http://python-xlib.sourceforge.net/")
6161 (synopsis "Python X11 client library")
6162 (description
6163 "The Python X Library is intended to be a fully functional X client
6164 library for Python programs. It is useful to implement low-level X clients.
6165 It is written entirely in Python.")
6166 (license license:gpl2+)))
6167
6168 (define-public python-singledispatch
6169 (package
6170 (name "python-singledispatch")
6171 (version "3.4.0.3")
6172 (source
6173 (origin
6174 (method url-fetch)
6175 (uri (pypi-uri "singledispatch" version))
6176 (sha256
6177 (base32
6178 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6179 (build-system python-build-system)
6180 (native-inputs
6181 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6182 (home-page
6183 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6184 (synopsis "Backport of singledispatch feature from Python 3.4")
6185 (description
6186 "This library brings functools.singledispatch from Python 3.4 to Python
6187 2.6-3.3.")
6188 (license license:expat)))
6189
6190 (define-public python2-singledispatch
6191 (package-with-python2 python-singledispatch))
6192
6193 ;; the python- version can be removed with python-3.5
6194 (define-public python-backports-abc
6195 (package
6196 (name "python-backports-abc")
6197 (version "0.5")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (pypi-uri "backports_abc" version))
6202 (sha256
6203 (base32
6204 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6205 (build-system python-build-system)
6206 (home-page "https://github.com/cython/backports_abc")
6207 (synopsis "Backport of additions to the 'collections.abc' module")
6208 (description
6209 "Python-backports-abc provides a backport of additions to the
6210 @code{collections.abc} module in Python-3.5.")
6211 (license license:psfl)))
6212
6213 (define-public python2-backports-abc
6214 (package-with-python2 python-backports-abc))
6215
6216 (define-public python-backports-csv
6217 (package
6218 (name "python-backports-csv")
6219 (version "1.0.5")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (pypi-uri "backports.csv" version))
6224 (sha256
6225 (base32
6226 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6227 (build-system python-build-system)
6228 (home-page "https://github.com/ryanhiebert/backports.csv")
6229 (synopsis "Backport of Python 3's csv module for Python 2")
6230 (description
6231 "Provides a backport of Python 3's @code{csv} module for parsing
6232 comma separated values. The API of the @code{csv} module in Python 2
6233 is drastically different from the @code{csv} module in Python 3.
6234 This is due, for the most part, to the difference between str in
6235 Python 2 and Python 3.")
6236 (license license:psfl)))
6237
6238 (define-public python2-backports-csv
6239 (package-with-python2 python-backports-csv))
6240
6241 (define-public python2-backports-shutil-get-terminal-size
6242 (package
6243 (name "python2-backports-shutil-get-terminal-size")
6244 (version "1.0.0")
6245 (source
6246 (origin
6247 (method url-fetch)
6248 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6249 (sha256
6250 (base32
6251 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6252 (build-system python-build-system)
6253 (arguments
6254 `(#:python ,python-2
6255 #:phases
6256 (modify-phases %standard-phases
6257 (replace 'check
6258 (lambda _
6259 (invoke "py.test" "-v"))))))
6260 (native-inputs
6261 `(("python2-pytest" ,python2-pytest)))
6262 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6263 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6264 (description
6265 "This package provides a backport of the @code{get_terminal_size
6266 function} from Python 3.3's @code{shutil}.
6267 Unlike the original version it is written in pure Python rather than C,
6268 so it might be a tiny bit slower.")
6269 (license license:expat)))
6270
6271 (define-public python-waf
6272 (package
6273 (name "python-waf")
6274 (version "2.0.11")
6275 (source (origin
6276 (method url-fetch)
6277 (uri (string-append "https://waf.io/"
6278 "waf-" version ".tar.bz2"))
6279 (sha256
6280 (base32
6281 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6282 (build-system python-build-system)
6283 (arguments
6284 '(#:phases
6285 (modify-phases %standard-phases
6286 (replace 'build
6287 (lambda _
6288 (invoke "python" "waf-light" "configure" "build")))
6289 (replace 'check
6290 (lambda _
6291 (invoke "python" "waf" "--version")))
6292 (replace 'install
6293 (lambda* (#:key outputs #:allow-other-keys)
6294 (let ((out (assoc-ref outputs "out")))
6295 (install-file "waf" (string-append out "/bin")))
6296 #t))
6297 ;; waf breaks when it is wrapped.
6298 (delete 'wrap))))
6299 (home-page "https://waf.io/")
6300 (synopsis "Python-based build system")
6301 (description
6302 "Waf is a Python-based framework for configuring, compiling and installing
6303 applications.")
6304 (license license:bsd-3)))
6305
6306 (define-public python2-waf
6307 (package-with-python2 python-waf))
6308
6309 (define-public python-pyzmq
6310 (package
6311 (name "python-pyzmq")
6312 (version "17.1.2")
6313 (source
6314 (origin
6315 (method url-fetch)
6316 (uri (pypi-uri "pyzmq" version))
6317 (sha256
6318 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6319 (build-system python-build-system)
6320 (arguments
6321 `(#:configure-flags
6322 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6323 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6324 ;; --inplace' for 'python setup.py test' to work.
6325 #:tests? #f))
6326 (inputs
6327 `(("zeromq" ,zeromq)))
6328 (native-inputs
6329 `(("pkg-config" ,pkg-config)
6330 ("python-nose" ,python-nose)))
6331 (home-page "https://github.com/zeromq/pyzmq")
6332 (synopsis "Python bindings for 0MQ")
6333 (description
6334 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6335 (license license:bsd-4)))
6336
6337 (define-public python2-pyzmq
6338 (package-with-python2 python-pyzmq))
6339
6340 (define-public python-pep8
6341 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6342 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6343 ;; some dependents' test suites, and nothing more.
6344 (package
6345 (name "python-pep8")
6346 (version "1.7.0")
6347 (source
6348 (origin
6349 (method url-fetch)
6350 (uri (pypi-uri "pep8" version))
6351 (sha256
6352 (base32
6353 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6354 (build-system python-build-system)
6355 (home-page "https://pep8.readthedocs.org/")
6356 (synopsis "Python style guide checker")
6357 (description
6358 "This tools checks Python code against some of the style conventions in
6359 PEP 8.")
6360 (license license:expat)))
6361
6362 (define-public python2-pep8
6363 (package-with-python2 python-pep8))
6364
6365 (define-public python-pyflakes
6366 (package
6367 (name "python-pyflakes")
6368 (version "2.1.1")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "pyflakes" version))
6373 (sha256
6374 (base32
6375 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6376 (build-system python-build-system)
6377 (home-page
6378 "https://github.com/pyflakes/pyflakes")
6379 (synopsis "Passive checker of Python programs")
6380 (description
6381 "Pyflakes statically checks Python source code for common errors.")
6382 (license license:expat)))
6383
6384 (define-public python2-pyflakes
6385 (package-with-python2 python-pyflakes))
6386
6387 (define-public python-mccabe
6388 (package
6389 (name "python-mccabe")
6390 (version "0.6.1")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "mccabe" version))
6395 (sha256
6396 (base32
6397 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6398 (build-system python-build-system)
6399 (native-inputs
6400 `(("python-pytest" ,python-pytest-bootstrap)
6401 ("python-pytest-runner" ,python-pytest-runner)))
6402 (home-page "https://github.com/flintwork/mccabe")
6403 (synopsis "McCabe checker, plugin for flake8")
6404 (description
6405 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6406 complexity of Python source code.")
6407 (license license:expat)))
6408
6409 (define-public python2-mccabe
6410 (package-with-python2 python-mccabe))
6411
6412 (define-public python-mccabe-0.2.1
6413 (package (inherit python-mccabe)
6414 (version "0.2.1")
6415 (source
6416 (origin
6417 (method url-fetch)
6418 (uri (pypi-uri "mccabe" version))
6419 (sha256
6420 (base32
6421 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6422
6423 (define-public python2-mccabe-0.2.1
6424 (package-with-python2 python-mccabe-0.2.1))
6425
6426 ;; Flake8 2.4.1 requires an older version of pep8.
6427 ;; This should be removed ASAP.
6428 (define-public python-pep8-1.5.7
6429 (package (inherit python-pep8)
6430 (version "1.5.7")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "pep8" version))
6435 (sha256
6436 (base32
6437 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6438 (arguments
6439 ;; XXX Tests not compatible with Python 3.5.
6440 '(#:tests? #f))))
6441
6442 (define-public python2-pep8-1.5.7
6443 (package-with-python2 python-pep8-1.5.7))
6444
6445 ;; Flake8 2.4.1 requires an older version of pyflakes.
6446 ;; This should be removed ASAP.
6447 (define-public python-pyflakes-0.8.1
6448 (package (inherit python-pyflakes)
6449 (version "0.8.1")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "pyflakes" version))
6454 (sha256
6455 (base32
6456 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6457 (arguments
6458 ;; XXX Tests not compatible with Python 3.5.
6459 '(#:tests? #f))))
6460
6461 (define-public python2-pyflakes-0.8.1
6462 (package-with-python2 python-pyflakes-0.8.1))
6463
6464 (define-public python-flake8
6465 (package
6466 (name "python-flake8")
6467 (version "3.7.7")
6468 (source (origin
6469 (method url-fetch)
6470 (uri (pypi-uri "flake8" version))
6471 (sha256
6472 (base32
6473 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6474 (build-system python-build-system)
6475 (arguments
6476 `(#:phases
6477 (modify-phases %standard-phases
6478 (delete 'check)
6479 (add-after 'install 'check
6480 (lambda* (#:key inputs outputs #:allow-other-keys)
6481 (add-installed-pythonpath inputs outputs)
6482 (invoke "pytest" "-v")
6483 #t)))))
6484 (propagated-inputs
6485 `(("python-pycodestyle" ,python-pycodestyle)
6486 ("python-entrypoints" ,python-entrypoints)
6487 ("python-pyflakes" ,python-pyflakes)
6488 ("python-mccabe" ,python-mccabe)))
6489 (native-inputs
6490 `(("python-mock" ,python-mock)
6491 ("python-pytest" ,python-pytest-bootstrap)
6492 ("python-pytest-runner" ,python-pytest-runner)))
6493 (home-page "https://gitlab.com/pycqa/flake8")
6494 (synopsis
6495 "The modular source code checker: pep8, pyflakes and co")
6496 (description
6497 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6498 (properties `((python2-variant . ,(delay python2-flake8))))
6499 (license license:expat)))
6500
6501 (define-public python2-flake8
6502 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6503 (package (inherit base)
6504 (propagated-inputs
6505 `(("python2-configparser" ,python2-configparser)
6506 ("python2-enum34" ,python2-enum34)
6507 ("python2-typing" ,python2-typing)
6508 ,@(package-propagated-inputs base))))))
6509
6510 ;; python-hacking requires flake8 <2.6.0.
6511 (define-public python-flake8-2.5
6512 (package
6513 (inherit python-flake8)
6514 (version "2.5.5")
6515 (source (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "flake8" version))
6518 (sha256
6519 (base32
6520 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6521 (propagated-inputs
6522 `(("python-pep8" ,python-pep8)
6523 ,@(package-propagated-inputs python-flake8)))
6524 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6525
6526 (define-public python2-flake8-2.5
6527 (package
6528 (inherit python2-flake8)
6529 (version (package-version python-flake8-2.5))
6530 (source (origin
6531 (inherit (package-source python-flake8-2.5))))
6532 (propagated-inputs
6533 `(("python2-pep8" ,python2-pep8)
6534 ,@(package-propagated-inputs python2-flake8)))))
6535
6536 (define-public python-flake8-polyfill
6537 (package
6538 (name "python-flake8-polyfill")
6539 (version "1.0.2")
6540 (source
6541 (origin
6542 (method url-fetch)
6543 (uri (pypi-uri "flake8-polyfill" version))
6544 (sha256
6545 (base32
6546 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6547 (build-system python-build-system)
6548 (arguments
6549 '(#:phases
6550 (modify-phases %standard-phases
6551 (replace 'check
6552 (lambda _
6553 (setenv "PYTHONPATH"
6554 (string-append (getcwd) "/build/lib:"
6555 (getenv "PYTHONPATH")))
6556 (invoke "py.test" "-v"))))))
6557 (native-inputs
6558 `(("python-flake8" ,python-flake8)
6559 ("python-mock" ,python-mock)
6560 ("python-pep8" ,python-pep8)
6561 ("python-pycodestyle" ,python-pycodestyle)
6562 ("python-pytest" ,python-pytest)))
6563 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6564 (synopsis "Polyfill package for Flake8 plugins")
6565 (description
6566 "This package that provides some compatibility helpers for Flake8
6567 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6568 (license license:expat)))
6569
6570 (define-public python2-flake8-polyfill
6571 (package-with-python2 python-flake8-polyfill))
6572
6573 (define-public python-mistune
6574 (package
6575 (name "python-mistune")
6576 (version "0.8.4")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "mistune" version))
6581 (sha256
6582 (base32
6583 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6584 (build-system python-build-system)
6585 (native-inputs
6586 `(("python-nose" ,python-nose)
6587 ("python-cython" ,python-cython)))
6588 (home-page "https://github.com/lepture/mistune")
6589 (synopsis "Markdown parser in pure Python")
6590 (description "This package provides a fast markdown parser in pure
6591 Python.")
6592 (license license:bsd-3)))
6593
6594 (define-public python2-mistune
6595 (package-with-python2 python-mistune))
6596
6597 (define-public python-markdown
6598 (package
6599 (name "python-markdown")
6600 (version "3.1.1")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "Markdown" version))
6605 (sha256
6606 (base32
6607 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6608 (build-system python-build-system)
6609 (native-inputs
6610 `(("python-nose" ,python-nose)
6611 ("python-pyyaml" ,python-pyyaml)))
6612 (home-page "https://python-markdown.github.io/")
6613 (synopsis "Python implementation of Markdown")
6614 (description
6615 "This package provides a Python implementation of John Gruber's
6616 Markdown. The library features international input, various Markdown
6617 extensions, and several HTML output formats. A command line wrapper
6618 markdown_py is also provided to convert Markdown files to HTML.")
6619 (license license:bsd-3)))
6620
6621 (define-public python2-markdown
6622 (package-with-python2 python-markdown))
6623
6624 (define-public python-ptyprocess
6625 (package
6626 (name "python-ptyprocess")
6627 (version "0.5.2")
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (pypi-uri "ptyprocess" version))
6632 (sha256
6633 (base32
6634 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6635 (build-system python-build-system)
6636 (native-inputs
6637 `(("python-nose" ,python-nose)))
6638 (arguments
6639 `(#:phases
6640 (modify-phases %standard-phases
6641 (replace 'check
6642 (lambda _ (invoke "nosetests"))))))
6643 (home-page "https://github.com/pexpect/ptyprocess")
6644 (synopsis "Run a subprocess in a pseudo terminal")
6645 (description
6646 "This package provides a Python library used to launch a subprocess in a
6647 pseudo terminal (pty), and interact with both the process and its pty.")
6648 (license license:isc)))
6649
6650 (define-public python2-ptyprocess
6651 (package-with-python2 python-ptyprocess))
6652
6653 (define-public python-cram
6654 (package
6655 (name "python-cram")
6656 (version "0.7")
6657 (home-page "https://bitheap.org/cram/")
6658 (source (origin
6659 (method url-fetch)
6660 (uri (list (string-append home-page "cram-"
6661 version ".tar.gz")
6662 (pypi-uri "cram" version)))
6663 (sha256
6664 (base32
6665 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6666 (arguments
6667 '(#:phases
6668 (modify-phases %standard-phases
6669 (add-after 'unpack 'patch-source
6670 (lambda _
6671 (substitute* (find-files "cram" ".*\\.py$")
6672 ;; Replace default shell path.
6673 (("/bin/sh") (which "sh")))
6674 (substitute* (find-files "tests" ".*\\.t$")
6675 (("md5") "md5sum")
6676 (("/bin/bash") (which "bash"))
6677 (("/bin/sh") (which "sh")))
6678 (substitute* "cram/_test.py"
6679 ;; This hack works around a bug triggered by substituting
6680 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6681 ;; "cram -h", which breaks the output at 80 characters. This
6682 ;; causes the line showing the default shell to break into two
6683 ;; lines, but the test expects a single line...
6684 (("env\\['COLUMNS'\\] = '80'")
6685 "env['COLUMNS'] = '160'"))
6686
6687 (substitute* "Makefile"
6688 ;; Recent versions of python-coverage have caused the test
6689 ;; coverage to decrease (as of version 0.7). Allow that.
6690 (("--fail-under=100")
6691 "--fail-under=90"))
6692
6693 #t))
6694 (replace 'check
6695 ;; The test phase uses the built library and executable.
6696 (lambda* (#:key inputs outputs #:allow-other-keys)
6697 (add-installed-pythonpath inputs outputs)
6698 (setenv "PATH" (string-append (getenv "PATH") ":"
6699 (assoc-ref outputs "out") "/bin"))
6700 (invoke "make" "test"))))))
6701 (build-system python-build-system)
6702 (native-inputs
6703 `(("python-coverage" ,python-coverage)
6704 ("which" ,which)))
6705 (synopsis "Simple testing framework for command line applications")
6706 (description
6707 "Cram is a functional testing framework for command line applications.
6708 Cram tests look like snippets of interactive shell sessions. Cram runs each
6709 command and compares the command output in the test with the command’s actual
6710 output.")
6711 (license license:gpl2+)))
6712
6713 (define-public python2-cram
6714 (package-with-python2 python-cram))
6715
6716 (define-public python-straight-plugin
6717 (package
6718 (name "python-straight-plugin")
6719 (version "1.4.1")
6720 (source
6721 (origin
6722 (method url-fetch)
6723 (uri (pypi-uri "straight.plugin" version))
6724 (sha256
6725 (base32
6726 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6727 (build-system python-build-system)
6728 (home-page "https://github.com/ironfroggy/straight.plugin")
6729 (synopsis "Simple namespaced plugin facility")
6730 (description "Straight Plugin provides a type of plugin you can create from
6731 almost any existing Python modules, and an easy way for outside developers to
6732 add functionality and customization to your projects with their own plugins.")
6733 (license license:expat)))
6734
6735 (define-public python2-straight-plugin
6736 (package-with-python2 python-straight-plugin))
6737
6738 (define-public python-fonttools
6739 (package
6740 (name "python-fonttools")
6741 (version "3.38.0")
6742 (source (origin
6743 (method url-fetch)
6744 (uri (pypi-uri "fonttools" version ".zip"))
6745 (sha256
6746 (base32
6747 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6748 (build-system python-build-system)
6749 (native-inputs
6750 `(("unzip" ,unzip)
6751 ("python-pytest" ,python-pytest)
6752 ("python-pytest-runner" ,python-pytest-runner)))
6753 (home-page "https://github.com/behdad/fonttools")
6754 (synopsis "Tools to manipulate font files")
6755 (description
6756 "FontTools/TTX is a library to manipulate font files from Python. It
6757 supports reading and writing of TrueType/OpenType fonts, reading and writing
6758 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6759 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6760 from an XML-based format.")
6761 (license license:expat)))
6762
6763 (define-public python2-fonttools
6764 (package-with-python2 python-fonttools))
6765
6766 (define-public python-ly
6767 (package
6768 (name "python-ly")
6769 (version "0.9.5")
6770 (source
6771 (origin
6772 (method url-fetch)
6773 (uri (pypi-uri name version))
6774 (sha256
6775 (base32
6776 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6777 (build-system python-build-system)
6778 (arguments
6779 ;; FIXME: Some tests need network access.
6780 '(#:tests? #f))
6781 (synopsis "Tool and library for manipulating LilyPond files")
6782 (description "This package provides a Python library to parse, manipulate
6783 or create documents in LilyPond format. A command line program ly is also
6784 provided that can be used to do various manipulations with LilyPond files.")
6785 (home-page "https://pypi.python.org/pypi/python-ly")
6786 (license license:gpl2+)))
6787
6788 (define-public python-appdirs
6789 (package
6790 (name "python-appdirs")
6791 (version "1.4.3")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "appdirs" version))
6796 (sha256
6797 (base32
6798 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6799 (build-system python-build-system)
6800 (home-page "https://github.com/ActiveState/appdirs")
6801 (synopsis
6802 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6803 (description
6804 "This module provides a portable way of finding out where user data
6805 should be stored on various operating systems.")
6806 (license license:expat)))
6807
6808 (define-public python2-appdirs
6809 (package-with-python2 python-appdirs))
6810
6811 (define-public python-llfuse
6812 (package
6813 (name "python-llfuse")
6814 (version "1.3.5")
6815 (source (origin
6816 (method url-fetch)
6817 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6818 (sha256
6819 (base32
6820 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6821 (build-system python-build-system)
6822 (inputs
6823 `(("fuse" ,fuse)
6824 ("attr" ,attr)))
6825 (native-inputs
6826 `(("pkg-config" ,pkg-config)))
6827 (synopsis "Python bindings for FUSE")
6828 (description
6829 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6830 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6831 (license license:lgpl2.0+)
6832 (properties `((python2-variant . ,(delay python2-llfuse))))))
6833
6834 (define-public python2-llfuse
6835 (package (inherit (package-with-python2
6836 (strip-python2-variant python-llfuse)))
6837 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6838
6839 ;; For attic-0.16
6840 (define-public python-llfuse-0.41
6841 (package (inherit python-llfuse)
6842 (version "0.41.1")
6843 (source (origin
6844 (method url-fetch)
6845 (uri (string-append
6846 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6847 "llfuse-" version ".tar.bz2"))
6848 (sha256
6849 (base32
6850 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6851 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6852 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6853 (license (list license:expat license:lgpl2.0+))))
6854
6855 (define-public python-msgpack
6856 (package
6857 (name "python-msgpack")
6858 (version "0.5.6")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "msgpack" version))
6862 (sha256
6863 (base32
6864 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6865 (build-system python-build-system)
6866 (arguments
6867 `(#:modules ((guix build utils)
6868 (guix build python-build-system)
6869 (ice-9 ftw)
6870 (srfi srfi-1)
6871 (srfi srfi-26))
6872 #:phases
6873 (modify-phases %standard-phases
6874 (replace 'check
6875 (lambda _
6876 (let ((cwd (getcwd)))
6877 (setenv "PYTHONPATH"
6878 (string-append cwd "/build/"
6879 (find (cut string-prefix? "lib" <>)
6880 (scandir (string-append cwd "/build")))
6881 ":"
6882 (getenv "PYTHONPATH")))
6883 (invoke "pytest" "-v" "test")))))))
6884 (native-inputs
6885 `(("python-pytest" ,python-pytest)))
6886 (synopsis "MessagePack (de)serializer")
6887 (description "MessagePack is a fast, compact binary serialization format,
6888 suitable for similar data to JSON. This package provides CPython bindings for
6889 reading and writing MessagePack data.")
6890 (home-page "https://pypi.python.org/pypi/msgpack/")
6891 (license license:asl2.0)))
6892
6893 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6894 ;; release 0.5. Some packages like borg still call it by the old name for now.
6895 ;; <https://bugs.gnu.org/30662>
6896 (define-public python-msgpack-transitional
6897 (package
6898 (inherit python-msgpack)
6899 (name "python-msgpack-transitional")
6900 (arguments
6901 (substitute-keyword-arguments (package-arguments python-msgpack)
6902 ((#:phases phases)
6903 `(modify-phases ,phases
6904 (add-after 'unpack 'configure-transitional
6905 (lambda _
6906 ;; Keep using the old name.
6907 (substitute* "setup.py"
6908 (("TRANSITIONAL = False")
6909 "TRANSITIONAL = 1"))
6910 #t))))))))
6911
6912 (define-public python2-msgpack
6913 (package-with-python2 python-msgpack))
6914
6915 (define-public python-netaddr
6916 (package
6917 (name "python-netaddr")
6918 (version "0.7.19")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 (uri (pypi-uri "netaddr" version))
6923 (sha256
6924 (base32
6925 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6926 (build-system python-build-system)
6927 (arguments `(#:tests? #f)) ;; No tests.
6928 (home-page "https://github.com/drkjam/netaddr/")
6929 (synopsis "Pythonic manipulation of network addresses")
6930 (description
6931 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6932 and MAC network addresses.")
6933 (license license:bsd-3)))
6934
6935 (define-public python2-netaddr
6936 (package-with-python2 python-netaddr))
6937
6938 (define-public python2-pyroute2
6939 (package
6940 (name "python2-pyroute2")
6941 (version "0.5.6")
6942 (source
6943 (origin
6944 (method url-fetch)
6945 (uri (pypi-uri "pyroute2" version))
6946 (sha256
6947 (base32
6948 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6949 (build-system python-build-system)
6950 (arguments
6951 `(#:python ,python-2)) ;Python 3.x is not supported
6952 (home-page "https://github.com/svinota/pyroute2")
6953 (synopsis "Python netlink library")
6954 (description
6955 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6956 Supported netlink families and protocols include:
6957 @itemize
6958 @item rtnl, network settings - addresses, routes, traffic controls
6959 @item nfnetlink - netfilter API: ipset, nftables, ...
6960 @item ipq - simplest userspace packet filtering, iptables QUEUE target
6961 @item devlink - manage and monitor devlink-enabled hardware
6962 @item generic - generic netlink families
6963 @itemize
6964 @item nl80211 - wireless functions API (basic support)
6965 @item taskstats - extended process statistics
6966 @item acpi_events - ACPI events monitoring
6967 @item thermal_events - thermal events monitoring
6968 @item VFS_DQUOT - disk quota events monitoring
6969 @end itemize
6970 @end itemize")
6971 (license license:gpl2+)))
6972
6973 (define-public python-wrapt
6974 (package
6975 (name "python-wrapt")
6976 (version "1.11.1")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "wrapt" version))
6981 (sha256
6982 (base32
6983 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
6984 (build-system python-build-system)
6985 (arguments
6986 ;; Tests are not included in the tarball, they are only available in the
6987 ;; git repository.
6988 `(#:tests? #f))
6989 (home-page "https://github.com/GrahamDumpleton/wrapt")
6990 (synopsis "Module for decorators, wrappers and monkey patching")
6991 (description
6992 "The aim of the wrapt module is to provide a transparent object proxy for
6993 Python, which can be used as the basis for the construction of function
6994 wrappers and decorator functions.")
6995 (license license:bsd-2)))
6996
6997 (define-public python2-wrapt
6998 (package-with-python2 python-wrapt))
6999
7000 (define-public python-xlrd
7001 (package
7002 (name "python-xlrd")
7003 (version "1.0.0")
7004 (source (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "xlrd" version))
7007 (sha256
7008 (base32
7009 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7010 (build-system python-build-system)
7011 (arguments
7012 `(#:phases
7013 (modify-phases %standard-phases
7014 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7015 ;; run tests instead for now.
7016 (replace 'check (lambda _ (invoke "nosetests"))))))
7017 (native-inputs `(("python-nose" ,python-nose)))
7018 (home-page "http://www.python-excel.org/")
7019 (synopsis "Library for extracting data from Excel files")
7020 (description "This package provides a library to extract data from
7021 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7022 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7023 Unicode-aware. It is not intended as an end-user tool.")
7024 (license license:bsd-3)))
7025
7026 (define-public python2-xlrd
7027 (package-with-python2 python-xlrd))
7028
7029 (define-public python-prettytable
7030 (package
7031 (name "python-prettytable")
7032 (version "0.7.2")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7037 (sha256
7038 (base32
7039 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7040 (build-system python-build-system)
7041 (home-page "http://code.google.com/p/prettytable/")
7042 (synopsis "Display tabular data in an ASCII table format")
7043 (description
7044 "A library designed to represent tabular data in visually appealing ASCII
7045 tables. PrettyTable allows for selection of which columns are to be printed,
7046 independent alignment of columns (left or right justified or centred) and
7047 printing of sub-tables by specifying a row range.")
7048 (license license:bsd-3)))
7049
7050 (define-public python2-prettytable
7051 (package-with-python2 python-prettytable))
7052
7053 (define-public python-tables
7054 (package
7055 (name "python-tables")
7056 (version "3.4.4")
7057 (source
7058 (origin
7059 (method url-fetch)
7060 (uri (pypi-uri "tables" version))
7061 (sha256
7062 (base32
7063 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7064 (modules '((guix build utils)))
7065 (snippet
7066 '(begin
7067 ;; Remove pre-compiled .pyc files from source.
7068 (for-each delete-file-recursively
7069 (find-files "." "__pycache__" #:directories? #t))
7070 (for-each delete-file (find-files "." "\\.pyc$"))
7071 #t))))
7072 (build-system python-build-system)
7073 (arguments
7074 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7075 ;; or "check", so we must override the build and check phases.
7076 #:phases
7077 (modify-phases %standard-phases
7078 (add-after 'unpack 'use-gcc
7079 (lambda _
7080 (substitute* "setup.py"
7081 (("compiler = new_compiler\\(\\)" line)
7082 (string-append line
7083 "\ncompiler.set_executables(compiler='gcc',"
7084 "compiler_so='gcc',"
7085 "linker_exe='gcc',"
7086 "linker_so='gcc -shared')")))
7087 #t))
7088 (replace 'build
7089 (lambda* (#:key inputs #:allow-other-keys)
7090 (invoke "python" "setup.py" "build"
7091 (string-append "--hdf5="
7092 (assoc-ref inputs "hdf5")))))
7093 (replace 'check
7094 (lambda* (#:key inputs #:allow-other-keys)
7095 (invoke "python" "setup.py" "check"
7096 (string-append "--hdf5="
7097 (assoc-ref inputs "hdf5"))))))))
7098 (propagated-inputs
7099 `(("python-numexpr" ,python-numexpr)
7100 ("python-numpy" ,python-numpy)))
7101 (native-inputs
7102 `(("python-cython" ,python-cython)
7103 ("pkg-config" ,pkg-config)))
7104 (inputs
7105 `(("hdf5" ,hdf5)
7106 ("bzip2" ,bzip2)
7107 ("zlib" ,zlib)))
7108 (home-page "http://www.pytables.org/")
7109 (synopsis "Hierarchical datasets for Python")
7110 (description "PyTables is a package for managing hierarchical datasets and
7111 designed to efficiently cope with extremely large amounts of data.")
7112 (license license:bsd-3)))
7113
7114 (define-public python2-tables
7115 (package-with-python2 python-tables))
7116
7117 (define-public python-pyasn1
7118 (package
7119 (name "python-pyasn1")
7120 (version "0.4.3")
7121 (source
7122 (origin
7123 (method url-fetch)
7124 (uri (pypi-uri "pyasn1" version))
7125 (sha256
7126 (base32
7127 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7128 (build-system python-build-system)
7129 (home-page "http://pyasn1.sourceforge.net/")
7130 (synopsis "ASN.1 types and codecs")
7131 (description
7132 "This is an implementation of ASN.1 types and codecs in Python. It is
7133 suitable for a wide range of protocols based on the ASN.1 specification.")
7134 (license license:bsd-2)))
7135
7136 (define-public python2-pyasn1
7137 (package-with-python2 python-pyasn1))
7138
7139 (define-public python-pyasn1-modules
7140 (package
7141 (name "python-pyasn1-modules")
7142 (version "0.2.2")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "pyasn1-modules" version))
7147 (sha256
7148 (base32
7149 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7150 (build-system python-build-system)
7151 (propagated-inputs
7152 `(("python-pyasn1" ,python-pyasn1)))
7153 (home-page "https://sourceforge.net/projects/pyasn1/")
7154 (synopsis "ASN.1 codec implementations")
7155 (description
7156 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7157 implementations of ASN.1-based codecs and protocols.")
7158 (license license:bsd-3)))
7159
7160 (define-public python2-pyasn1-modules
7161 (package-with-python2 python-pyasn1-modules))
7162
7163 (define-public python-ipaddress
7164 (package
7165 (name "python-ipaddress")
7166 (version "1.0.22")
7167 (source (origin
7168 (method url-fetch)
7169 (uri (pypi-uri "ipaddress" version))
7170 (sha256
7171 (base32
7172 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7173 (build-system python-build-system)
7174 (home-page "https://github.com/phihag/ipaddress")
7175 (synopsis "IP address manipulation library")
7176 (description
7177 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7178 in Python. This library is used to create, poke at, and manipulate IPv4 and
7179 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7180 module to older versions of Python.")
7181 (license license:psfl)))
7182
7183 (define-public python2-ipaddress
7184 (package-with-python2 python-ipaddress))
7185
7186 (define-public python2-ipaddr
7187 (package
7188 (name "python2-ipaddr")
7189 (version "2.1.11")
7190 (source
7191 (origin
7192 (method url-fetch)
7193 (uri (pypi-uri "ipaddr" version))
7194 (sha256
7195 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7196 (build-system python-build-system)
7197 (arguments
7198 `(#:python ,python-2 ;version 2 only
7199 #:phases
7200 (modify-phases %standard-phases
7201 (replace 'check
7202 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7203 (home-page "https://github.com/google/ipaddr-py")
7204 (synopsis "IP address manipulation library")
7205 (description
7206 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7207 IPv6 addresses and networks.
7208
7209 For new implementations you may prefer to use the standard module
7210 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7211 versions of Python.")
7212 (license license:asl2.0)))
7213
7214 (define-public python-idna
7215 (package
7216 (name "python-idna")
7217 (version "2.8")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "idna" version))
7222 (sha256
7223 (base32
7224 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7225 (build-system python-build-system)
7226 (home-page "https://github.com/kjd/idna")
7227 (synopsis "Internationalized domain names in applications")
7228 (description
7229 "This is a library to support the Internationalised Domain Names in
7230 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7231 protocol is often referred to as “IDNA2008” and can produce different results
7232 from the earlier standard from 2003. The library is also intended to act as a
7233 suitable drop-in replacement for the “encodings.idna” module that comes with
7234 the Python standard library but currently only supports the older 2003
7235 specification.")
7236 (license license:bsd-4)))
7237
7238 (define-public python2-idna
7239 (package-with-python2 python-idna))
7240
7241 (define-public python-idna-ssl
7242 (package
7243 (name "python-idna-ssl")
7244 (version "1.0.1")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "idna-ssl" version))
7249 (sha256
7250 (base32
7251 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7252 (build-system python-build-system)
7253 (arguments
7254 `(#:tests? #f)) ;circular dependency with python-aiohttp
7255 (home-page "https://github.com/aio-libs/idna-ssl")
7256 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7257 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7258 domains support.")
7259 (license license:expat)))
7260
7261 (define-public python-pretend
7262 (package
7263 (name "python-pretend")
7264 (version "1.0.9")
7265 (source
7266 (origin
7267 (method url-fetch)
7268 (uri (pypi-uri "pretend" version))
7269 (sha256
7270 (base32
7271 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7272 (build-system python-build-system)
7273 (home-page "https://github.com/alex/pretend")
7274 (synopsis "Library for stubbing in Python")
7275 (description
7276 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7277 technique for writing tests. You may hear the term mixed up with mocks,
7278 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7279 responses, rather than doing any computation.")
7280 (license license:bsd-3)))
7281
7282 (define-public python2-pretend
7283 (package-with-python2 python-pretend))
7284
7285 (define-public python-pip
7286 (package
7287 (name "python-pip")
7288 (version "18.1")
7289 (source
7290 (origin
7291 (method url-fetch)
7292 (uri (pypi-uri "pip" version))
7293 (sha256
7294 (base32
7295 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7296 (build-system python-build-system)
7297 (arguments
7298 '(#:tests? #f)) ; there are no tests in the pypi archive.
7299 (home-page "https://pip.pypa.io/")
7300 (synopsis "Package manager for Python software")
7301 (description
7302 "Pip is a package manager for Python software, that finds packages on the
7303 Python Package Index (PyPI).")
7304 (license license:expat)))
7305
7306 (define-public python2-pip
7307 (package-with-python2 python-pip))
7308
7309 (define-public python-tlsh
7310 (package
7311 (name "python-tlsh")
7312 (version "3.4.5")
7313 (home-page "https://github.com/trendmicro/tlsh")
7314 (source
7315 (origin
7316 (method git-fetch)
7317 (uri (git-reference
7318 (url "https://github.com/trendmicro/tlsh.git")
7319 (commit (string-append "v" version))))
7320 (file-name (git-file-name name version))
7321 (sha256
7322 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7323 (build-system cmake-build-system)
7324 (arguments
7325 '(#:out-of-source? #f
7326 #:phases (modify-phases %standard-phases
7327 (replace
7328 'install
7329 (lambda* (#:key outputs #:allow-other-keys)
7330 ;; Build and install the Python bindings. The underlying
7331 ;; C++ library is apparently not meant to be installed.
7332 (let ((out (assoc-ref outputs "out")))
7333 (with-directory-excursion "py_ext"
7334 (and (system* "python" "setup.py" "build")
7335 (system* "python" "setup.py" "install"
7336 (string-append "--prefix=" out))))))))))
7337 (inputs `(("python" ,python-wrapper))) ;for the bindings
7338 (synopsis "Fuzzy matching library for Python")
7339 (description
7340 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7341 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7342 value which can be used for similarity comparisons. Similar objects have
7343 similar hash values, which allows for the detection of similar objects by
7344 comparing their hash values. The byte stream should have a sufficient amount
7345 of complexity; for example, a byte stream of identical bytes will not generate
7346 a hash value.")
7347 (license license:asl2.0)))
7348
7349 (define-public python2-tlsh
7350 (package
7351 (inherit python-tlsh)
7352 (name "python2-tlsh")
7353 (inputs `(("python" ,python-2)))))
7354
7355 (define-public python-termcolor
7356 (package
7357 (name "python-termcolor")
7358 (version "1.1.0")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "termcolor" version))
7363 (sha256
7364 (base32
7365 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7366 (build-system python-build-system)
7367 (arguments
7368 ;; There are no tests.
7369 `(#:tests? #f))
7370 (home-page "https://pypi.python.org/pypi/termcolor")
7371 (synopsis "ANSII Color formatting for terminal output")
7372 (description
7373 "This package provides ANSII Color formatting for output in terminals.")
7374 (license license:expat)))
7375
7376 (define-public python2-termcolor
7377 (package-with-python2 python-termcolor))
7378
7379 (define-public python-libarchive-c
7380 (package
7381 (name "python-libarchive-c")
7382 (version "2.8")
7383 (source (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "libarchive-c" version))
7386 (sha256
7387 (base32
7388 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7389 (build-system python-build-system)
7390 (arguments
7391 '(#:phases (modify-phases %standard-phases
7392 (add-before
7393 'build 'reference-libarchive
7394 (lambda* (#:key inputs #:allow-other-keys)
7395 ;; Retain the absolute file name of libarchive.so.
7396 (let ((libarchive (assoc-ref inputs "libarchive")))
7397 (substitute* "libarchive/ffi.py"
7398 (("find_library\\('archive'\\)")
7399 (string-append "'" libarchive
7400 "/lib/libarchive.so'"))))))
7401 (replace 'check
7402 (lambda _ (invoke "pytest" "-vv"))))))
7403 (native-inputs
7404 `(("python-mock" ,python-mock)
7405 ("python-pytest" ,python-pytest)))
7406 (inputs
7407 `(("libarchive" ,libarchive)))
7408 (home-page "https://github.com/Changaco/python-libarchive-c")
7409 (synopsis "Python interface to libarchive")
7410 (description
7411 "This package provides Python bindings to libarchive, a C library to
7412 access possibly compressed archives in many different formats. It uses
7413 Python's @code{ctypes} foreign function interface (FFI).")
7414 (license license:lgpl2.0+)))
7415
7416 (define-public python2-libarchive-c
7417 (package-with-python2 python-libarchive-c))
7418
7419 (define-public python-file
7420 (package
7421 (inherit file)
7422 (name "python-file")
7423 (build-system python-build-system)
7424 (arguments
7425 '(#:tests? #f ;no tests
7426 #:configure-flags '("--single-version-externally-managed" "--root=/")
7427 #:phases (modify-phases %standard-phases
7428 (add-before 'build 'change-directory
7429 (lambda _
7430 (chdir "python")
7431 #t))
7432 (add-before 'build 'set-library-file-name
7433 (lambda* (#:key inputs #:allow-other-keys)
7434 (let ((file (assoc-ref inputs "file")))
7435 (substitute* "magic.py"
7436 (("find_library\\('magic'\\)")
7437 (string-append "'" file "/lib/libmagic.so'")))
7438 #t))))))
7439 (inputs `(("file" ,file)))
7440 (native-inputs (if (%current-target-system)
7441 `(("self" ,this-package))
7442 '()))
7443 (synopsis "Python bindings to the libmagic file type guesser. Note that
7444 this module and the python-magic module both provide a \"magic.py\" file;
7445 these two modules, which are different and were developed separately, both
7446 serve the same purpose: provide Python bindings for libmagic.")))
7447
7448 (define-public python2-file
7449 (package-with-python2 python-file))
7450
7451 (define-public python-debian
7452 (package
7453 (name "python-debian")
7454 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7455 (version "0.1.28")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (pypi-uri name version))
7460 (sha256
7461 (base32
7462 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7463 (build-system python-build-system)
7464 (propagated-inputs
7465 `(("python-six" ,python-six)))
7466 (synopsis "Debian package related modules")
7467 (description
7468 ;; XXX: Use @enumerate instead of @itemize to work around
7469 ;; <http://bugs.gnu.org/21772>.
7470 "This package provides Python modules that abstract many formats of
7471 Debian-related files, such as:
7472
7473 @enumerate
7474 @item Debtags information;
7475 @item @file{debian/changelog} files;
7476 @item packages files, pdiffs;
7477 @item control files of single or multiple RFC822-style paragraphs---e.g.
7478 @file{debian/control}, @file{.changes}, @file{.dsc};
7479 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7480 contained files and meta-information.
7481 @end enumerate\n")
7482
7483 ;; Modules are either GPLv2+ or GPLv3+.
7484 (license license:gpl3+)))
7485
7486 (define-public python2-debian
7487 (package-with-python2 python-debian))
7488
7489 (define-public python-nbformat
7490 (package
7491 (name "python-nbformat")
7492 (version "4.4.0")
7493 (source
7494 (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "nbformat" version))
7497 (sha256
7498 (base32
7499 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7500 (build-system python-build-system)
7501 (arguments `(#:tests? #f)) ; no test target
7502 (propagated-inputs
7503 `(("python-ipython-genutils" ,python-ipython-genutils)
7504 ("python-jsonschema" ,python-jsonschema)
7505 ("python-jupyter-core" ,python-jupyter-core)
7506 ("python-traitlets" ,python-traitlets)))
7507 (home-page "http://jupyter.org")
7508 (synopsis "Jupyter Notebook format")
7509 (description "This package provides the reference implementation of the
7510 Jupyter Notebook format and Python APIs for working with notebooks.")
7511 (license license:bsd-3)))
7512
7513 (define-public python2-nbformat
7514 (package-with-python2 python-nbformat))
7515
7516 (define-public python-bleach
7517 (package
7518 (name "python-bleach")
7519 (version "1.4.3")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "bleach" version))
7524 (sha256
7525 (base32
7526 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7527 (build-system python-build-system)
7528 (propagated-inputs
7529 `(("python-html5lib" ,python-html5lib-0.9)
7530 ("python-six" ,python-six)))
7531 (native-inputs
7532 `(("python-nose" ,python-nose)))
7533 (home-page "https://github.com/jsocol/bleach")
7534 (synopsis "Whitelist-based HTML-sanitizing tool")
7535 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7536 (license license:asl2.0)))
7537
7538 (define-public python2-bleach
7539 (package-with-python2 python-bleach))
7540
7541 (define-public python-entrypoints
7542 (package
7543 (name "python-entrypoints")
7544 (version "0.3")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "entrypoints" version))
7549 (sha256
7550 (base32
7551 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7552 (build-system python-build-system)
7553 ;; The package does not come with a setup.py file, so we have to generate
7554 ;; one ourselves.
7555 (arguments
7556 `(#:tests? #f
7557 #:phases
7558 (modify-phases %standard-phases
7559 (add-after 'unpack 'create-setup.py
7560 (lambda _
7561 (call-with-output-file "setup.py"
7562 (lambda (port)
7563 (format port "\
7564 from setuptools import setup
7565 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7566 " ,version))))))))
7567 (home-page "https://github.com/takluyver/entrypoints")
7568 (synopsis "Discover and load entry points from installed Python packages")
7569 (description "Entry points are a way for Python packages to advertise
7570 objects with some common interface. The most common examples are
7571 @code{console_scripts} entry points, which define shell commands by
7572 identifying a Python function to run. The @code{entrypoints} module contains
7573 functions to find and load entry points.")
7574 (license license:expat)))
7575
7576 (define-public python2-entrypoints
7577 (package-with-python2 python-entrypoints))
7578
7579 (define-public python-nbconvert
7580 (package
7581 (name "python-nbconvert")
7582 (version "5.0.0b1")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "nbconvert" version))
7587 (sha256
7588 (base32
7589 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7590 (build-system python-build-system)
7591 (arguments
7592 `(;; The "bdist_egg" target is disabled by default, causing the installation
7593 ;; to fail.
7594 #:configure-flags (list "bdist_egg")
7595 ;; FIXME: 5 failures, 40 errors.
7596 #:tests? #f))
7597 ;; #:phases
7598 ;; (modify-phases %standard-phases
7599 ;; (replace 'check
7600 ;; (lambda _
7601 ;; (zero? (system* "py.test" "-v")))))
7602 (native-inputs
7603 `(("python-pytest" ,python-pytest)))
7604 (propagated-inputs
7605 `(("python-bleach" ,python-bleach)
7606 ("python-entrypoints" ,python-entrypoints)
7607 ("python-jinja2" ,python-jinja2)
7608 ("python-jupyter-core" ,python-jupyter-core)
7609 ("python-mistune" ,python-mistune)
7610 ("python-nbformat" ,python-nbformat)
7611 ("python-pygments" ,python-pygments)
7612 ("python-traitlets" ,python-traitlets)))
7613 (home-page "http://jupyter.org")
7614 (synopsis "Converting Jupyter Notebooks")
7615 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7616 notebooks to various other formats via Jinja templates. It allows you to
7617 convert an @code{.ipynb} notebook file into various static formats including:
7618
7619 @enumerate
7620 @item HTML
7621 @item LaTeX
7622 @item PDF
7623 @item Reveal JS
7624 @item Markdown (md)
7625 @item ReStructured Text (rst)
7626 @item executable script
7627 @end enumerate\n")
7628 (license license:bsd-3)))
7629
7630 (define-public python2-nbconvert
7631 (package-with-python2 python-nbconvert))
7632
7633 (define-public python-notebook
7634 (package
7635 (name "python-notebook")
7636 (version "5.7.4")
7637 (source (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "notebook" version))
7640 (sha256
7641 (base32
7642 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7643 (build-system python-build-system)
7644 (arguments
7645 `(#:phases
7646 (modify-phases %standard-phases
7647 (replace 'check
7648 (lambda _
7649 ;; These tests require a browser
7650 (delete-file-recursively "notebook/tests/selenium")
7651 ;; Some tests need HOME
7652 (setenv "HOME" "/tmp")
7653 ;; This file contains "warningfilters", which are not supported
7654 ;; by this version of nose.
7655 (delete-file "setup.cfg")
7656 (with-directory-excursion "/tmp"
7657 (invoke "nosetests" "-v"))
7658 #t)))))
7659 (propagated-inputs
7660 `(("python-jupyter-core" ,python-jupyter-core)
7661 ("python-nbformat" ,python-nbformat)
7662 ("python-nbconvert" ,python-nbconvert)
7663 ("python-prometheus-client" ,python-prometheus-client)
7664 ("python-send2trash" ,python-send2trash)
7665 ("python-terminado" ,python-terminado)))
7666 (native-inputs
7667 `(("python-nose" ,python-nose)
7668 ("python-sphinx" ,python-sphinx)
7669 ("python-requests" ,python-requests)))
7670 (home-page "http://jupyter.org/")
7671 (synopsis "Web-based notebook environment for interactive computing")
7672 (description
7673 "The Jupyter HTML notebook is a web-based notebook environment for
7674 interactive computing.")
7675 (properties `((python2-variant . ,(delay python2-notebook))))
7676 (license license:bsd-3)))
7677
7678 (define-public python2-notebook
7679 (let ((base (package-with-python2
7680 (strip-python2-variant python-notebook))))
7681 (package (inherit base)
7682 (native-inputs
7683 `(("python2-mock" ,python2-mock)
7684 ,@(package-native-inputs base)))
7685 (arguments
7686 (substitute-keyword-arguments (package-arguments base)
7687 ((#:phases phases)
7688 `(modify-phases ,phases
7689 (add-before 'check 'disable-test-case
7690 ;; The test requires network access to localhost. Curiously it
7691 ;; fails with Python 2 only. Simply make the test-case return
7692 ;; immediately.
7693 (lambda _
7694 (substitute*
7695 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7696 (("formats = self.nbconvert_api") "return #")))))))))))
7697
7698 (define-public python-widgetsnbextension
7699 (package
7700 (name "python-widgetsnbextension")
7701 (version "3.4.2")
7702 (source
7703 (origin
7704 (method url-fetch)
7705 (uri (pypi-uri "widgetsnbextension" version))
7706 (sha256
7707 (base32
7708 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7709 (build-system python-build-system)
7710 (propagated-inputs
7711 `(("python-ipykernel" ,python-ipykernel)
7712 ("python-notebook" ,python-notebook)))
7713 (native-inputs
7714 `(("python-certifi" ,python-certifi)
7715 ("python-nose" ,python-nose)))
7716 (home-page "https://ipython.org")
7717 (synopsis "IPython HTML widgets for Jupyter")
7718 (description "This package provides interactive HTML widgets for Jupyter
7719 notebooks.")
7720 (license license:bsd-3)))
7721
7722 (define-public python2-widgetsnbextension
7723 (package-with-python2 python-widgetsnbextension))
7724
7725 (define-public python-ipywidgets
7726 (package
7727 (name "python-ipywidgets")
7728 (version "5.2.2")
7729 (source
7730 (origin
7731 (method url-fetch)
7732 (uri (pypi-uri "ipywidgets" version))
7733 (sha256
7734 (base32
7735 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7736 (build-system python-build-system)
7737 (propagated-inputs
7738 `(("python-ipython" ,python-ipython)
7739 ("python-traitlets" ,python-traitlets)
7740 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7741 (native-inputs
7742 `(("python-nose" ,python-nose)
7743 ("python-pytest" ,python-pytest)))
7744 (home-page "https://ipython.org")
7745 (synopsis "IPython HTML widgets for Jupyter")
7746 (description "Ipywidgets are interactive HTML widgets for Jupyter
7747 notebooks and the IPython kernel. Notebooks come alive when interactive
7748 widgets are used. Users gain control of their data and can visualize changes
7749 in the data.")
7750 (license license:bsd-3)))
7751
7752 (define-public python2-ipywidgets
7753 (package-with-python2 python-ipywidgets))
7754
7755 (define-public python-jupyter-console
7756 (package
7757 (name "python-jupyter-console")
7758 (version "6.0.0")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "jupyter_console" version))
7763 (sha256
7764 (base32
7765 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7766 (build-system python-build-system)
7767 (propagated-inputs
7768 `(("python-ipykernel" ,python-ipykernel)
7769 ("python-jupyter-client" ,python-jupyter-client)
7770 ("python-prompt-toolkit" ,python-prompt-toolkit)
7771 ("python-pygments" ,python-pygments)))
7772 (native-inputs
7773 `(("python-nose" ,python-nose)))
7774 (home-page "https://jupyter.org")
7775 (synopsis "Jupyter terminal console")
7776 (description "This package provides a terminal-based console frontend for
7777 Jupyter kernels. It also allows for console-based interaction with non-Python
7778 Jupyter kernels such as IJulia and IRKernel.")
7779 (license license:bsd-3)))
7780
7781 (define-public python2-jupyter-console
7782 (package
7783 (name "python2-jupyter-console")
7784 (version "5.2.0")
7785 (source
7786 (origin
7787 (method url-fetch)
7788 (uri (pypi-uri "jupyter_console" version))
7789 (sha256
7790 (base32
7791 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7792 (build-system python-build-system)
7793 ;; Tests only run in an TTY.
7794 (arguments `(#:tests? #f))
7795 (propagated-inputs
7796 `(("python2-ipykernel" ,python2-ipykernel)
7797 ("python2-jupyter-client" ,python2-jupyter-client)
7798 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7799 ("python2-pygments" ,python2-pygments)))
7800 (native-inputs
7801 `(("python2-nose" ,python2-nose)))
7802 (home-page "https://jupyter.org")
7803 (synopsis "Jupyter terminal console")
7804 (description "This package provides a terminal-based console frontend for
7805 Jupyter kernels. It also allows for console-based interaction with non-Python
7806 Jupyter kernels such as IJulia and IRKernel.")
7807 (license license:bsd-3)))
7808
7809 ;; The python-ipython and python-jupyter-console require each other. To get
7810 ;; the functionality in both packages working, strip down the
7811 ;; python-jupyter-console package when using it as an input to python-ipython.
7812 (define python-jupyter-console-minimal
7813 (package
7814 (inherit python-jupyter-console)
7815 (name "python-jupyter-console-minimal")
7816 (arguments
7817 (substitute-keyword-arguments
7818 (package-arguments python-jupyter-console)
7819 ((#:phases phases)
7820 `(modify-phases ,phases
7821 (add-after 'install 'delete-bin
7822 (lambda* (#:key outputs #:allow-other-keys)
7823 ;; Delete the bin files, to avoid conflicts in profiles
7824 ;; where python-ipython and python-jupyter-console are
7825 ;; both present.
7826 (delete-file-recursively
7827 (string-append
7828 (assoc-ref outputs "out") "/bin"))))))))
7829 ;; Remove the python-ipython propagated input, to avoid the cycle
7830 (propagated-inputs
7831 (alist-delete
7832 "python-ipython"
7833 (package-propagated-inputs python-jupyter-console)))))
7834
7835 (define-public python-qtconsole
7836 (package
7837 (name "python-qtconsole")
7838 (version "4.4.3")
7839 (source
7840 (origin
7841 (method url-fetch)
7842 (uri (pypi-uri "qtconsole" version))
7843 (sha256
7844 (base32
7845 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7846 (build-system python-build-system)
7847 (arguments
7848 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7849 ;; but we only have the LTS version 5.x. This means that there might be
7850 ;; runtime errors, but since this is a dependency of the Jupyter package,
7851 ;; and Jupyter can be used without the qtconsole we can overlook this for
7852 ;; now.
7853 `(#:tests? #f
7854 #:phases
7855 (modify-phases %standard-phases
7856 (add-before 'check 'pre-check
7857 (lambda _
7858 (setenv "QT_QPA_PLATFORM" "offscreen")
7859 #t)))))
7860 (propagated-inputs
7861 `(("python-ipykernel" ,python-ipykernel)
7862 ("python-ipython" ,python-ipython)))
7863 (native-inputs
7864 `(("python-pytest" ,python-pytest)))
7865 (home-page "http://jupyter.org")
7866 (synopsis "Jupyter Qt console")
7867 (description "This package provides a Qt-based console for Jupyter with
7868 support for rich media output.")
7869 (license license:bsd-3)))
7870
7871 (define-public jupyter
7872 (package
7873 (name "jupyter")
7874 (version "1.0.0")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "jupyter" version))
7879 (sha256
7880 (base32
7881 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7882 (build-system python-build-system)
7883 (arguments '(#:tests? #f)) ; there are none.
7884 (propagated-inputs
7885 `(("python-ipykernel" ,python-ipykernel)
7886 ("python-ipywidgets" ,python-ipywidgets)
7887 ("python-jupyter-console" ,python-jupyter-console)
7888 ("python-nbconvert" ,python-nbconvert)
7889 ("python-notebook" ,python-notebook)
7890 ("python-qtconsole" ,python-qtconsole)))
7891 (native-search-paths
7892 (list (search-path-specification
7893 (variable "JUPYTER_PATH")
7894 (files '("share/jupyter")))))
7895 (home-page "https://jupyter.org")
7896 (synopsis "Web application for interactive documents")
7897 (description
7898 "The Jupyter Notebook is a web application that allows you to create and
7899 share documents that contain live code, equations, visualizations and
7900 explanatory text. Uses include: data cleaning and transformation, numerical
7901 simulation, statistical modeling, machine learning and much more.")
7902 (license license:bsd-3)))
7903
7904 (define-public python-chardet
7905 (package
7906 (name "python-chardet")
7907 (version "3.0.4")
7908 (source
7909 (origin
7910 (method url-fetch)
7911 (uri (pypi-uri "chardet" version))
7912 (sha256
7913 (base32
7914 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7915 (native-inputs
7916 `(("python-hypothesis" ,python-hypothesis)
7917 ("python-pytest" ,python-pytest)
7918 ("python-pytest-runner" ,python-pytest-runner)))
7919 (build-system python-build-system)
7920 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7921 (arguments `(#:tests? #f))
7922 (home-page "https://github.com/chardet/chardet")
7923 (synopsis "Universal encoding detector for Python 2 and 3")
7924 (description
7925 "This package provides @code{chardet}, a Python module that can
7926 automatically detect a wide range of file encodings.")
7927 (license license:lgpl2.1+)))
7928
7929 (define-public python2-chardet
7930 (package-with-python2 python-chardet))
7931
7932 (define-public python-docopt
7933 (package
7934 (name "python-docopt")
7935 (version "0.6.2")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 ;; The release on PyPI does not include tests.
7940 (uri (string-append
7941 "https://github.com/docopt/docopt/archive/"
7942 version ".tar.gz"))
7943 (file-name (string-append name "-" version ".tar.gz"))
7944 (sha256
7945 (base32
7946 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7947 (build-system python-build-system)
7948 (native-inputs
7949 `(("python-pytest" ,python-pytest)))
7950 (arguments
7951 `(#:phases
7952 (modify-phases %standard-phases
7953 (replace 'check
7954 (lambda _ (invoke "py.test"))))))
7955 (home-page "http://docopt.org")
7956 (synopsis "Command-line interface description language for Python")
7957 (description "This library allows the user to define a command-line
7958 interface from a program's help message rather than specifying it
7959 programmatically with command-line parsers like @code{getopt} and
7960 @code{argparse}.")
7961 (license license:expat)))
7962
7963 (define-public python2-docopt
7964 (package-with-python2 python-docopt))
7965
7966 (define-public python-pythondialog
7967 (package
7968 (name "python-pythondialog")
7969 (version "3.4.0")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "pythondialog" version))
7974 (sha256
7975 (base32
7976 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7977 (build-system python-build-system)
7978 (arguments
7979 `(#:phases
7980 (modify-phases %standard-phases
7981 (add-after 'unpack 'patch-path
7982 (lambda* (#:key inputs #:allow-other-keys)
7983 (let* ((dialog (assoc-ref inputs "dialog")))
7984 ;; Since this library really wants to grovel the search path, we
7985 ;; must hardcode dialog's store path into it.
7986 (substitute* "dialog.py"
7987 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7988 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7989 #t))))
7990 #:tests? #f)) ; no test suite
7991 (propagated-inputs
7992 `(("dialog" ,dialog)))
7993 (home-page "http://pythondialog.sourceforge.net/")
7994 (synopsis "Python interface to the UNIX dialog utility")
7995 (description "A Python wrapper for the dialog utility. Its purpose is to
7996 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7997 This allows one to make simple text-mode user interfaces on Unix-like systems")
7998 (license license:lgpl2.1)
7999 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8000
8001 (define-public python2-pythondialog
8002 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8003 (package
8004 (inherit base)
8005 (version (package-version python-pythondialog))
8006 (source (origin
8007 (method url-fetch)
8008 (uri (pypi-uri "python2-pythondialog" version))
8009 (sha256
8010 (base32
8011 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8012
8013 (define-public python-configobj
8014 (package
8015 (name "python-configobj")
8016 (version "5.0.6")
8017 (source (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "configobj" version))
8020 (sha256
8021 (base32
8022 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8023 ;; Patch setup.py so it looks for python-setuptools, which is
8024 ;; required to parse the keyword 'install_requires' in setup.py.
8025 (patches (search-patches "python-configobj-setuptools.patch"))))
8026 (build-system python-build-system)
8027 (propagated-inputs
8028 `(("python-six" ,python-six)))
8029 (synopsis "Config file reading, writing and validation")
8030 (description "ConfigObj is a simple but powerful config file reader and
8031 writer: an ini file round tripper. Its main feature is that it is very easy to
8032 use, with a straightforward programmer’s interface and a simple syntax for
8033 config files.")
8034 (home-page "https://github.com/DiffSK/configobj")
8035 (license license:bsd-3)))
8036
8037 (define-public python2-configobj
8038 (package-with-python2 python-configobj))
8039
8040 (define-public python-configargparse
8041 (package
8042 (name "python-configargparse")
8043 (version "0.14.0")
8044 (source (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "ConfigArgParse" version))
8047 (sha256
8048 (base32
8049 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8050 (build-system python-build-system)
8051 (native-inputs
8052 `(("python-pyyaml" ,python-pyyaml)))
8053 (arguments
8054 `(#:phases
8055 (modify-phases %standard-phases
8056 (replace 'check
8057 (lambda _
8058 ;; Bypass setuptools-shim because one test relies on "setup.py"
8059 ;; being the first argument passed to the python call.
8060 ;;
8061 ;; NOTE: Many tests do not run because they rely on Python's
8062 ;; built-in test.test_argparse, but we remove the unit tests from
8063 ;; our Python installation.
8064 (invoke "python" "setup.py" "test"))))))
8065 (synopsis "Replacement for argparse")
8066 (description "A drop-in replacement for argparse that allows options to also
8067 be set via config files and/or environment variables.")
8068 (home-page "https://github.com/bw2/ConfigArgParse")
8069 (license license:expat)))
8070
8071 (define-public python2-configargparse
8072 (package-with-python2 python-configargparse))
8073
8074 (define-public python-argparse-manpage
8075 (package
8076 (name "python-argparse-manpage")
8077 (version "1.1")
8078 (source
8079 (origin
8080 (method url-fetch)
8081 (uri (pypi-uri "argparse-manpage" version))
8082 (sha256
8083 (base32
8084 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8085 (build-system python-build-system)
8086 (home-page "https://github.com/praiskup/argparse-manpage")
8087 (synopsis "Build manual page from Python's ArgumentParser object")
8088 (description
8089 "This package provides tools to build manual pages from Python's
8090 @code{ArgumentParser} object.")
8091 (license license:asl2.0)))
8092
8093 (define-public python-contextlib2
8094 (package
8095 (name "python-contextlib2")
8096 (version "0.5.5")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "contextlib2" version))
8101 (sha256
8102 (base32
8103 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8104 (build-system python-build-system)
8105 (home-page "http://contextlib2.readthedocs.org/")
8106 (synopsis "Tools for decorators and context managers")
8107 (description "This module is primarily a backport of the Python
8108 3.2 contextlib to earlier Python versions. Like contextlib, it
8109 provides utilities for common tasks involving decorators and context
8110 managers. It also contains additional features that are not part of
8111 the standard library.")
8112 (license license:psfl)))
8113
8114 (define-public python2-contextlib2
8115 (package
8116 (name "python2-contextlib2")
8117 (version "0.5.5")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "contextlib2" version))
8122 (sha256
8123 (base32
8124 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8125 (build-system python-build-system)
8126 (arguments
8127 `(#:python ,python-2
8128 #:phases
8129 (modify-phases %standard-phases
8130 (replace 'check
8131 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8132 (native-inputs
8133 `(("python2-unittest2" ,python2-unittest2)))
8134 (home-page "http://contextlib2.readthedocs.org/")
8135 (synopsis "Tools for decorators and context managers")
8136 (description "This module is primarily a backport of the Python
8137 3.2 contextlib to earlier Python versions. Like contextlib, it
8138 provides utilities for common tasks involving decorators and context
8139 managers. It also contains additional features that are not part of
8140 the standard library.")
8141 (license license:psfl)))
8142
8143 (define-public python-texttable
8144 (package
8145 (name "python-texttable")
8146 (version "0.8.7")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "texttable" version))
8151 (sha256
8152 (base32
8153 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8154 (build-system python-build-system)
8155 (arguments '(#:tests? #f)) ; no tests
8156 (home-page "https://github.com/foutaise/texttable/")
8157 (synopsis "Python module for creating simple ASCII tables")
8158 (description "Texttable is a Python module for creating simple ASCII
8159 tables.")
8160 (license license:lgpl2.1+)))
8161
8162 (define-public python2-texttable
8163 (package-with-python2 python-texttable))
8164
8165 (define-public python-atomicwrites
8166 (package
8167 (name "python-atomicwrites")
8168 (version "1.3.0")
8169 (source (origin
8170 (method url-fetch)
8171 (uri (pypi-uri "atomicwrites" version))
8172 (sha256
8173 (base32
8174 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8175 (build-system python-build-system)
8176 (synopsis "Atomic file writes in Python")
8177 (description "Library for atomic file writes using platform dependent tools
8178 for atomic file system operations.")
8179 (home-page "https://github.com/untitaker/python-atomicwrites")
8180 (license license:expat)))
8181
8182 (define-public python2-atomicwrites
8183 (package-with-python2 python-atomicwrites))
8184
8185 (define-public python-click-threading
8186 (package
8187 (name "python-click-threading")
8188 (version "0.4.4")
8189 (source (origin
8190 (method url-fetch)
8191 (uri (pypi-uri "click-threading" version))
8192 (sha256
8193 (base32
8194 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8195 (build-system python-build-system)
8196 (propagated-inputs
8197 `(("python-click" ,python-click)))
8198 (synopsis "Utilities for multithreading in Click")
8199 (description "This package provides utilities for multithreading in Click
8200 applications.")
8201 (home-page "https://github.com/click-contrib/click-threading")
8202 (license license:expat)))
8203
8204 (define-public python-click-log
8205 (package
8206 (name "python-click-log")
8207 (version "0.3.2")
8208 (source (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "click-log" version))
8211 (sha256
8212 (base32
8213 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8214 (build-system python-build-system)
8215 (propagated-inputs
8216 `(("python-click" ,python-click)))
8217 (synopsis "Logging for click applications")
8218 (description "This package provides a Python library for logging Click
8219 applications.")
8220 (home-page "https://github.com/click-contrib/click-log")
8221 (license license:expat)))
8222
8223 (define-public python-apipkg
8224 (package
8225 (name "python-apipkg")
8226 (version "1.4")
8227 (source (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "apipkg" version))
8230 (sha256
8231 (base32
8232 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8233 (build-system python-build-system)
8234 (native-inputs
8235 `(("python-pytest" ,python-pytest)))
8236 (synopsis "Namespace control and lazy-import mechanism")
8237 (description "With apipkg you can control the exported namespace of a Python
8238 package and greatly reduce the number of imports for your users. It is a small
8239 pure Python module that works on virtually all Python versions.")
8240 (home-page "https://github.com/pytest-dev/apipkg")
8241 (license license:expat)))
8242
8243 (define-public python2-apipkg
8244 (package-with-python2 python-apipkg))
8245
8246 (define-public python-execnet
8247 (package
8248 (name "python-execnet")
8249 (version "1.4.1")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "execnet" version))
8253 (sha256
8254 (base32
8255 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8256 (build-system python-build-system)
8257 (arguments
8258 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8259 ;; The two test failures are caused by the lack of an `ssh` executable.
8260 ;; The test suite can be run with pytest after the 'install' phase.
8261 #:tests? #f))
8262 (native-inputs
8263 `(("python-pytest" ,python-pytest)
8264 ("python-setuptools-scm" ,python-setuptools-scm)))
8265 (propagated-inputs
8266 `(("python-apipkg" ,python-apipkg)))
8267 (synopsis "Rapid multi-Python deployment")
8268 (description "Execnet provides a share-nothing model with
8269 channel-send/receive communication for distributing execution across many
8270 Python interpreters across version, platform and network barriers. It has a
8271 minimal and fast API targeting the following uses:
8272 @enumerate
8273 @item distribute tasks to (many) local or remote CPUs
8274 @item write and deploy hybrid multi-process applications
8275 @item write scripts to administer multiple environments
8276 @end enumerate")
8277 (home-page "http://codespeak.net/execnet/")
8278 (license license:expat)))
8279
8280 (define-public python2-execnet
8281 (package-with-python2 python-execnet))
8282
8283 (define-public python-icalendar
8284 (package
8285 (name "python-icalendar")
8286 (version "4.0.3")
8287 (source (origin
8288 (method url-fetch)
8289 (uri (pypi-uri "icalendar" version))
8290 (sha256
8291 (base32
8292 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8293 (build-system python-build-system)
8294 (propagated-inputs
8295 `(("python-dateutil" ,python-dateutil)
8296 ("python-pytz" ,python-pytz)))
8297 (synopsis "Python library for parsing iCalendar files")
8298 (description "The icalendar package is a parser/generator of iCalendar
8299 files for use with Python.")
8300 (home-page "https://github.com/collective/icalendar")
8301 (license license:bsd-2)))
8302
8303 (define-public python-args
8304 (package
8305 (name "python-args")
8306 (version "0.1.0")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "args" version))
8310 (sha256
8311 (base32
8312 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8313 (build-system python-build-system)
8314 (home-page "https://github.com/kennethreitz/args")
8315 (synopsis "Command-line argument parser")
8316 (description
8317 "This library provides a Python module to parse command-line arguments.")
8318 (license license:bsd-3)))
8319
8320 (define-public python2-args
8321 (package-with-python2 python-args))
8322
8323 (define-public python-clint
8324 (package
8325 (name "python-clint")
8326 (version "0.5.1")
8327 (source (origin
8328 (method url-fetch)
8329 (uri (pypi-uri "clint" version))
8330 (sha256
8331 (base32
8332 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8333 (build-system python-build-system)
8334 (arguments
8335 '(#:phases
8336 (modify-phases %standard-phases
8337 (replace 'check
8338 (lambda _ (invoke "py.test" "-v"))))))
8339 (native-inputs
8340 `(("python-pytest" ,python-pytest)))
8341 (propagated-inputs
8342 `(("python-args" ,python-args)))
8343 (home-page "https://github.com/kennethreitz/clint")
8344 (synopsis "Command-line interface tools")
8345 (description
8346 "Clint is a Python module filled with a set of tools for developing
8347 command-line applications, including tools for colored and indented
8348 output, progress bar display, and pipes.")
8349 (license license:isc)))
8350
8351 (define-public python2-clint
8352 (package-with-python2 python-clint))
8353
8354 (define-public python-rply
8355 (package
8356 (name "python-rply")
8357 (version "0.7.5")
8358 (source (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "rply" version))
8361 (sha256
8362 (base32
8363 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8364 (build-system python-build-system)
8365 (propagated-inputs
8366 `(("python-appdirs" ,python-appdirs)))
8367 (home-page "https://github.com/alex/rply")
8368 (synopsis "Parser generator for Python")
8369 (description
8370 "This package provides a pure Python based parser generator, that also
8371 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8372 with a new public API, and RPython support.")
8373 (license license:bsd-3)))
8374
8375 (define-public python2-rply
8376 (package-with-python2 python-rply))
8377
8378 (define-public python-hy
8379 (package
8380 (name "python-hy")
8381 (version "0.13.0")
8382 (source (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "hy" version))
8385 (sha256
8386 (base32
8387 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8388 (build-system python-build-system)
8389 (arguments
8390 '(#:phases
8391 (modify-phases %standard-phases
8392 (replace 'check
8393 (lambda _
8394 ;; Tests require write access to HOME.
8395 (setenv "HOME" "/tmp")
8396 (invoke "nosetests"))))))
8397 (native-inputs
8398 `(("python-coverage" ,python-coverage)
8399 ("python-nose" ,python-nose)))
8400 (propagated-inputs
8401 `(("python-astor" ,python-astor)
8402 ("python-clint" ,python-clint)
8403 ("python-rply" ,python-rply)))
8404 (home-page "http://hylang.org/")
8405 (synopsis "Lisp frontend to Python")
8406 (description
8407 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8408 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8409 Python at your fingertips, in Lisp form.")
8410 (license license:expat)))
8411
8412 (define-public python2-hy
8413 (package-with-python2 python-hy))
8414
8415 (define-public python2-functools32
8416 (package
8417 (name "python2-functools32")
8418 (version "3.2.3-2")
8419 (source
8420 (origin
8421 (method url-fetch)
8422 (uri (pypi-uri "functools32" version))
8423 (sha256
8424 (base32
8425 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8426 (build-system python-build-system)
8427 (arguments
8428 `(#:python ,python-2
8429 #:tests? #f)) ; no test target
8430 (home-page "https://github.com/MiCHiLU/python-functools32")
8431 (synopsis
8432 "Backport of the functools module from Python 3.2.3")
8433 (description
8434 "This package is a backport of the @code{functools} module from Python
8435 3.2.3 for use with older versions of Python and PyPy.")
8436 (license license:expat)))
8437
8438 (define-public python2-subprocess32
8439 (package
8440 (name "python2-subprocess32")
8441 (version "3.2.7")
8442 (source (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "subprocess32" version))
8445 (sha256
8446 (base32
8447 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8448 (patches
8449 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8450 (build-system python-build-system)
8451 (arguments
8452 `(#:python ,python-2
8453 ;; The test suite fails with Python > 2.7.13:
8454 ;; import test.support
8455 ;; ImportError: No module named support
8456 #:tests? #f
8457 #:phases
8458 (modify-phases %standard-phases
8459 (add-after 'unpack 'patch-/bin/sh
8460 (lambda _
8461 (substitute* '("subprocess32.py"
8462 "test_subprocess32.py")
8463 (("/bin/sh") (which "sh")))
8464 #t)))))
8465 (home-page "https://github.com/google/python-subprocess32")
8466 (synopsis "Backport of the subprocess module from Python 3.2")
8467 (description
8468 "This is a backport of the @code{subprocess} standard library module
8469 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8470 new features. On POSIX systems it is guaranteed to be reliable when used
8471 in threaded applications. It includes timeout support from Python 3.3 but
8472 otherwise matches 3.2’s API.")
8473 (license license:psfl)))
8474
8475 (define-public python2-futures
8476 (package
8477 (name "python2-futures")
8478 (version "3.2.0")
8479 (source
8480 (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "futures" version))
8483 (sha256
8484 (base32
8485 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8486 (build-system python-build-system)
8487 (arguments
8488 `(#:python ,python-2
8489 #:phases
8490 (modify-phases %standard-phases
8491 (replace 'check
8492 (lambda _
8493 (invoke "python" "test_futures.py")
8494 #t)))))
8495 (home-page "https://github.com/agronholm/pythonfutures")
8496 (synopsis
8497 "Backport of the concurrent.futures package from Python 3.2")
8498 (description
8499 "The concurrent.futures module provides a high-level interface for
8500 asynchronously executing callables. This package backports the
8501 concurrent.futures package from Python 3.2")
8502 (license license:bsd-3)))
8503
8504 (define-public python-promise
8505 (package
8506 (name "python-promise")
8507 (version "0.4.2")
8508 (source
8509 (origin
8510 (method url-fetch)
8511 (uri (pypi-uri "promise" version))
8512 (sha256
8513 (base32
8514 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8515 (build-system python-build-system)
8516 ;; Tests wants python-futures, which is a python2 only program, and
8517 ;; can't be found by python-promise at test time.
8518 (arguments `(#:tests? #f))
8519 (home-page "https://github.com/syrusakbary/promise")
8520 (synopsis "Promises/A+ implementation for Python")
8521 (description
8522 "Promises/A+ implementation for Python")
8523 (properties `((python2-variant . ,(delay python2-promise))))
8524 (license license:expat)))
8525
8526 (define-public python2-promise
8527 (let ((promise (package-with-python2
8528 (strip-python2-variant python-promise))))
8529 (package (inherit promise)
8530 (arguments (substitute-keyword-arguments (package-arguments promise)
8531 ((#:tests? _) #t)))
8532 (native-inputs
8533 `(("python2-futures" ,python2-futures)
8534 ("python2-pytest" ,python2-pytest)
8535 ,@(package-native-inputs promise))))))
8536
8537 (define-public python-colorama
8538 (package
8539 (name "python-colorama")
8540 (version "0.3.9")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "colorama" version))
8545 (sha256
8546 (base32
8547 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8548 (build-system python-build-system)
8549 (synopsis "Colored terminal text rendering for Python")
8550 (description "Colorama is a Python library for rendering colored terminal
8551 text.")
8552 (home-page "https://pypi.python.org/pypi/colorama")
8553 (license license:bsd-3)))
8554
8555 (define-public python2-colorama
8556 (package-with-python2 python-colorama))
8557
8558 (define-public python-rsa
8559 (package
8560 (name "python-rsa")
8561 (version "3.4.2")
8562 (source
8563 (origin
8564 (method url-fetch)
8565 (uri (pypi-uri "rsa" version))
8566 (sha256
8567 (base32
8568 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8569 (build-system python-build-system)
8570 (propagated-inputs
8571 `(("python-pyasn1" ,python-pyasn1)))
8572 (synopsis "Pure-Python RSA implementation")
8573 (description "Python-RSA is a pure-Python RSA implementation. It supports
8574 encryption and decryption, signing and verifying signatures, and key
8575 generation according to PKCS#1 version 1.5. It can be used as a Python
8576 library as well as on the command line.")
8577 (home-page "https://stuvel.eu/rsa")
8578 (license license:asl2.0)))
8579
8580 (define-public python2-rsa
8581 (package-with-python2 python-rsa))
8582
8583 (define-public python-pluggy
8584 (package
8585 (name "python-pluggy")
8586 (version "0.11.0")
8587 (source
8588 (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "pluggy" version))
8591 (sha256
8592 (base32
8593 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8594 (build-system python-build-system)
8595 (native-inputs
8596 `(("python-setuptools-scm" ,python-setuptools-scm)))
8597 (synopsis "Plugin and hook calling mechanism for Python")
8598 (description "Pluggy is an extraction of the plugin manager as used by
8599 Pytest but stripped of Pytest specific details.")
8600 (home-page "https://pypi.python.org/pypi/pluggy")
8601 (license license:expat)))
8602
8603 (define-public python2-pluggy
8604 (package-with-python2 python-pluggy))
8605
8606 (define-public python-tox
8607 (package
8608 (name "python-tox")
8609 (version "2.8.1")
8610 (source
8611 (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "tox" version))
8614 (sha256
8615 (base32
8616 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8617 (build-system python-build-system)
8618 (arguments
8619 ;; FIXME: Tests require pytest-timeout, which itself requires
8620 ;; pytest>=2.8.0 for installation.
8621 '(#:tests? #f))
8622 (propagated-inputs
8623 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8624 ("python-py" ,python-py)
8625 ("python-virtualenv" ,python-virtualenv)))
8626 (native-inputs
8627 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8628 ("python-pytest" ,python-pytest) ; >= 2.3.5
8629 ("python-setuptools-scm" ,python-setuptools-scm)))
8630 (home-page "http://tox.testrun.org/")
8631 (synopsis "Virtualenv-based automation of test activities")
8632 (description "Tox is a generic virtualenv management and test command line
8633 tool. It can be used to check that a package installs correctly with
8634 different Python versions and interpreters, or run tests in each type of
8635 supported environment, or act as a frontend to continuous integration
8636 servers.")
8637 (license license:expat)))
8638
8639 (define-public python2-tox
8640 (package-with-python2 python-tox))
8641
8642 (define-public python-jmespath
8643 (package
8644 (name "python-jmespath")
8645 (version "0.9.3")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "jmespath" version))
8650 (sha256
8651 (base32
8652 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8653 (build-system python-build-system)
8654 (native-inputs
8655 `(("python-nose" ,python-nose)))
8656 (synopsis "JSON Matching Expressions")
8657 (description "JMESPath (pronounced “james path”) is a Python library that
8658 allows one to declaratively specify how to extract elements from a JSON
8659 document.")
8660 (home-page "https://github.com/jmespath/jmespath.py")
8661 (license license:expat)))
8662
8663 (define-public python2-jmespath
8664 (package-with-python2 python-jmespath))
8665
8666 (define-public python-botocore
8667 (package
8668 (name "python-botocore")
8669 (version "1.12.149")
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "botocore" version))
8674 (sha256
8675 (base32
8676 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8677 (build-system python-build-system)
8678 (arguments
8679 ;; FIXME: Many tests are failing.
8680 '(#:tests? #f))
8681 (propagated-inputs
8682 `(("python-dateutil" ,python-dateutil)
8683 ("python-docutils" ,python-docutils)
8684 ("python-jmespath" ,python-jmespath)))
8685 (native-inputs
8686 `(("python-mock" ,python-mock)
8687 ("python-nose" ,python-nose)
8688 ("behave" ,behave)
8689 ("python-tox" ,python-tox)
8690 ("python-urllib3" ,python-urllib3)
8691 ("python-wheel" ,python-wheel)))
8692 (home-page "https://github.com/boto/botocore")
8693 (synopsis "Low-level interface to AWS")
8694 (description "Botocore is a Python library that provides a low-level
8695 interface to the Amazon Web Services (AWS) API.")
8696 (license license:asl2.0)))
8697
8698 (define-public python2-botocore
8699 (package-with-python2 python-botocore))
8700
8701 (define-public python-xdo
8702 (package
8703 (name "python-xdo")
8704 (version "0.3")
8705 (source (origin
8706 (method url-fetch)
8707 (uri (string-append
8708 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8709 "python-xdo_" version ".orig.tar.gz"))
8710 (sha256
8711 (base32
8712 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8713 (build-system python-build-system)
8714 (arguments
8715 '(#:phases
8716 (modify-phases %standard-phases
8717 (add-before 'install 'patch-libxdo-path
8718 ;; Hardcode the path of dynamically loaded libxdo library.
8719 (lambda* (#:key inputs #:allow-other-keys)
8720 (let ((libxdo (string-append
8721 (assoc-ref inputs "xdotool")
8722 "/lib/libxdo.so")))
8723 (substitute* "xdo/_xdo.py"
8724 (("find_library\\(\"xdo\"\\)")
8725 (simple-format #f "\"~a\"" libxdo)))
8726 #t))))
8727 #:tests? #f)) ; no tests provided
8728 (propagated-inputs
8729 `(("python-six" ,python-six)))
8730 (inputs
8731 `(("xdotool" ,xdotool)
8732 ("libX11" ,libx11)))
8733 (home-page "https://tracker.debian.org/pkg/python-xdo")
8734 (synopsis "Python library for simulating X11 keyboard/mouse input")
8735 (description "Provides bindings to libxdo for manipulating X11 via simulated
8736 input. (Note that this is mostly a legacy library; you may wish to look at
8737 python-xdo for newer bindings.)")
8738 (license license:bsd-3)))
8739
8740 (define-public python2-xdo
8741 (package-with-python2 python-xdo))
8742
8743 (define-public python-mako
8744 (package
8745 (name "python-mako")
8746 (version "1.0.13")
8747 (source
8748 (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "Mako" version))
8751 (sha256
8752 (base32
8753 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
8754 (build-system python-build-system)
8755 (propagated-inputs
8756 `(("python-markupsafe" ,python-markupsafe)))
8757 (native-inputs
8758 `(("python-mock" ,python-mock)
8759 ("python-nose" ,python-nose)
8760 ("python-pytest" ,python-pytest)))
8761 (home-page "https://www.makotemplates.org/")
8762 (synopsis "Templating language for Python")
8763 (description "Mako is a templating language for Python that compiles
8764 templates into Python modules.")
8765 (license license:expat)))
8766
8767 (define-public python2-mako
8768 (package-with-python2 python-mako))
8769
8770 (define-public python-waitress
8771 (package
8772 (name "python-waitress")
8773 (version "1.1.0")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "waitress" version))
8778 (patches (search-patches "python-waitress-fix-tests.patch"))
8779 (sha256
8780 (base32
8781 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8782 (build-system python-build-system)
8783 (home-page "https://github.com/Pylons/waitress")
8784 (synopsis "Waitress WSGI server")
8785 (description "Waitress is meant to be a production-quality pure-Python WSGI
8786 server with very acceptable performance.")
8787 (license license:zpl2.1)))
8788
8789 (define-public python2-waitress
8790 (package-with-python2 python-waitress))
8791
8792 (define-public python-pyquery
8793 (package
8794 (name "python-pyquery")
8795 (version "1.2.17")
8796 (source
8797 (origin
8798 (method url-fetch)
8799 (uri (pypi-uri "pyquery" version))
8800 (sha256
8801 (base32
8802 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8803 (build-system python-build-system)
8804 (native-inputs
8805 `(("python-webob" ,python-webob)
8806 ("python-webtest" ,python-webtest)))
8807 (propagated-inputs
8808 `(("python-lxml" ,python-lxml)
8809 ("python-cssselect" ,python-cssselect)))
8810 (home-page "https://github.com/gawel/pyquery")
8811 (synopsis "Make jQuery-like queries on xml documents")
8812 (description "pyquery allows you to make jQuery queries on xml documents.
8813 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8814 fast xml and html manipulation.")
8815 (license license:bsd-3)))
8816
8817 (define-public python-anyjson
8818 (package
8819 (name "python-anyjson")
8820 (version "0.3.3")
8821 (source
8822 (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "anyjson" version))
8825 (sha256
8826 (base32
8827 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8828 (build-system python-build-system)
8829 (arguments
8830 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8831 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8832 ;; whatever) so this transformation needs to be done before the tests
8833 ;; can be run. Maybe we could add a build step to transform beforehand
8834 ;; but it could be annoying/difficult.
8835 ;; We can enable tests for the Python 2 version, though, and do below.
8836 #:tests? #f))
8837 (home-page "https://bitbucket.org/runeh/anyjson/")
8838 (synopsis
8839 "Wraps best available JSON implementation in a common interface")
8840 (description
8841 "Anyjson loads whichever is the fastest JSON module installed
8842 and provides a uniform API regardless of which JSON implementation is used.")
8843 (license license:bsd-3)
8844 (properties `((python2-variant . ,(delay python2-anyjson))))))
8845
8846 (define-public python2-anyjson
8847 (let ((anyjson (package-with-python2
8848 (strip-python2-variant python-anyjson))))
8849 (package
8850 (inherit anyjson)
8851 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8852 #:tests? #t
8853 ,@(package-arguments anyjson)))
8854 (native-inputs `(("python2-nose" ,python2-nose))))))
8855
8856 (define-public python-amqp
8857 (package
8858 (name "python-amqp")
8859 (version "2.3.2")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "amqp" version))
8864 (sha256
8865 (base32
8866 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8867 (build-system python-build-system)
8868 (native-inputs
8869 `(("python-case" ,python-case)
8870 ("python-pytest-sugar" ,python-pytest-sugar)
8871 ("python-mock" ,python-mock)))
8872 (propagated-inputs
8873 `(("python-vine" ,python-vine)))
8874 (home-page "https://github.com/celery/py-amqp")
8875 (synopsis
8876 "Low-level AMQP client for Python (fork of amqplib)")
8877 (description
8878 "This is a fork of amqplib which was originally written by Barry Pederson.
8879 It is maintained by the Celery project, and used by kombu as a pure python
8880 alternative when librabbitmq is not available.")
8881 (license license:lgpl2.1+)
8882 (properties `((python2-variant . ,(delay python2-amqp))))))
8883
8884 (define-public python2-amqp
8885 (let ((amqp (package-with-python2
8886 (strip-python2-variant python-amqp))))
8887 (package
8888 (inherit amqp)
8889 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8890 ;; unmaintained. Weirdly, does not do this on the python 3
8891 ;; version?
8892 #:tests? #f
8893 ,@(package-arguments amqp))))))
8894
8895 (define-public python-txamqp
8896 (package
8897 (name "python-txamqp")
8898 (version "0.8.2")
8899 (source
8900 (origin
8901 (method url-fetch)
8902 (uri (pypi-uri "txAMQP" version))
8903 (sha256
8904 (base32
8905 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8906 (build-system python-build-system)
8907 (propagated-inputs
8908 `(("python-six" ,python-six)
8909 ("python-twisted" ,python-twisted)))
8910 (home-page "https://github.com/txamqp/txamqp")
8911 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8912 (description
8913 "This package provides a Python library for communicating with AMQP peers
8914 and brokers using the asynchronous networking framework Twisted. It contains
8915 all the necessary code to connect, send and receive messages to/from an
8916 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8917 also includes support for using Thrift RPC over AMQP in Twisted
8918 applications.")
8919 (license license:asl2.0)))
8920
8921 (define-public python2-txamqp
8922 (package-with-python2 python-txamqp))
8923
8924 (define-public python-kombu
8925 (package
8926 (name "python-kombu")
8927 (version "4.2.2")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "kombu" version))
8932 (sha256
8933 (base32
8934 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8935 (build-system python-build-system)
8936 (native-inputs
8937 `(("python-mock" ,python-mock)
8938 ("python-case" ,python-case)
8939 ("python-pyro4" ,python-pyro4)
8940 ("python-pytest-sugar" ,python-pytest-sugar)
8941 ("python-pytz" ,python-pytz)))
8942 (propagated-inputs
8943 `(("python-anyjson" ,python-anyjson)
8944 ("python-amqp" ,python-amqp)
8945 ("python-redis" ,python-redis)))
8946 (home-page "https://kombu.readthedocs.io")
8947 (synopsis "Message passing library for Python")
8948 (description "The aim of Kombu is to make messaging in Python as easy as
8949 possible by providing an idiomatic high-level interface for the AMQ protocol,
8950 and also provide proven and tested solutions to common messaging problems.
8951 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8952 message orientation, queuing, routing, reliability and security, for which the
8953 RabbitMQ messaging server is the most popular implementation.")
8954 (license license:bsd-3)
8955 (properties `((python2-variant . ,(delay python2-kombu))))))
8956
8957 (define-public python2-kombu
8958 (let ((kombu (package-with-python2
8959 (strip-python2-variant python-kombu))))
8960 (package
8961 (inherit kombu)
8962 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8963 ;; It works fine on the python3 variant.
8964 #:tests? #f
8965 ,@(package-arguments kombu)))
8966 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8967 ,@(package-native-inputs kombu))))))
8968
8969 (define-public python-billiard
8970 (package
8971 (name "python-billiard")
8972 (version "3.5.0.5")
8973 (source
8974 (origin
8975 (method url-fetch)
8976 (uri (pypi-uri "billiard" version))
8977 (sha256
8978 (base32
8979 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8980 (build-system python-build-system)
8981 (native-inputs
8982 `(("python-case" ,python-case)
8983 ("python-pytest" ,python-pytest)))
8984 (home-page "https://github.com/celery/billiard")
8985 (synopsis
8986 "Python multiprocessing fork with improvements and bugfixes")
8987 (description
8988 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8989 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8990 pyprocessing package. This standalone variant is intended to be compatible with
8991 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8992 (license license:bsd-3)
8993 (properties `((python2-variant . ,(delay python2-billiard))))))
8994
8995 (define-public python2-billiard
8996 (let ((billiard (package-with-python2
8997 (strip-python2-variant python-billiard))))
8998 (package
8999 (inherit billiard)
9000 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9001 ("python2-mock" ,python2-mock)
9002 ,@(package-native-inputs billiard))))))
9003
9004 (define-public python-celery
9005 (package
9006 (name "python-celery")
9007 (version "4.2.1")
9008 (source
9009 (origin
9010 (method url-fetch)
9011 (uri (pypi-uri "celery" version))
9012 (sha256
9013 (base32
9014 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9015 (build-system python-build-system)
9016 (arguments
9017 '(;; TODO The tests fail with Python 3.7
9018 ;; https://github.com/celery/celery/issues/4849
9019 #:tests? #f
9020 #:phases
9021 (modify-phases %standard-phases
9022 (add-after 'unpack 'patch-requirements
9023 (lambda _
9024 (substitute* "requirements/test.txt"
9025 (("pytest>=3\\.0,<3\\.3")
9026 "pytest>=3.0"))
9027 #t)))))
9028 (native-inputs
9029 `(("python-case" ,python-case)
9030 ("python-pytest" ,python-pytest)))
9031 (propagated-inputs
9032 `(("python-pytz" ,python-pytz)
9033 ("python-billiard" ,python-billiard)
9034 ("python-kombu" ,python-kombu)))
9035 (home-page "https://celeryproject.org")
9036 (synopsis "Distributed Task Queue")
9037 (description "Celery is an asynchronous task queue/job queue based on
9038 distributed message passing. It is focused on real-time operation, but
9039 supports scheduling as well. The execution units, called tasks, are executed
9040 concurrently on a single or more worker servers using multiprocessing,
9041 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9042 synchronously (wait until ready).")
9043 (license license:bsd-3)
9044 (properties `((python2-variant . ,(delay python2-celery))))))
9045
9046 (define-public python2-celery
9047 (let ((celery (package-with-python2
9048 (strip-python2-variant python-celery))))
9049 (package
9050 (inherit celery)
9051 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9052 ("python2-mock" ,python2-mock)
9053 ,@(package-native-inputs celery))))))
9054
9055 (define-public python-translitcodec
9056 (package
9057 (name "python-translitcodec")
9058 (version "0.4.0")
9059 (source
9060 (origin
9061 (method url-fetch)
9062 (uri (pypi-uri "translitcodec" version))
9063 (sha256
9064 (base32
9065 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9066 (build-system python-build-system)
9067 (arguments
9068 `(#:tests? #f)) ; no tests provided
9069 (home-page
9070 "https://github.com/claudep/translitcodec")
9071 (synopsis
9072 "Unicode to 8-bit charset transliteration codec")
9073 (description
9074 "This package contains codecs for transliterating ISO 10646 texts into
9075 best-effort representations using smaller coded character sets (ASCII,
9076 ISO 8859, etc.).")
9077 (license license:expat)))
9078
9079 (define-public python2-translitcodec
9080 (package-with-python2 python-translitcodec))
9081
9082 (define-public python-editor
9083 (package
9084 (name "python-editor")
9085 (version "0.5")
9086 (source
9087 (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "python-editor" version))
9090 (sha256
9091 (base32
9092 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9093 (build-system python-build-system)
9094 (home-page
9095 "https://github.com/fmoo/python-editor")
9096 (synopsis
9097 "Programmatically open an editor, capture the result")
9098 (description
9099 "python-editor is a library that provides the editor module for
9100 programmatically interfacing with your system's $EDITOR.")
9101 (license license:asl2.0)))
9102
9103 (define-public python2-editor
9104 (package-with-python2 python-editor))
9105
9106 (define-public python-vobject
9107 (package
9108 (name "python-vobject")
9109 (version "0.9.5")
9110 (source (origin
9111 (method url-fetch)
9112 (uri (pypi-uri "vobject" version))
9113 (sha256
9114 (base32
9115 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9116 (build-system python-build-system)
9117 (arguments
9118 '(;; The test suite relies on some non-portable Windows interfaces.
9119 #:tests? #f))
9120 (propagated-inputs
9121 `(("python-dateutil" ,python-dateutil)
9122 ("python-pyicu" ,python-pyicu)))
9123 (synopsis "Parse and generate vCard and vCalendar files")
9124 (description "Vobject is intended to be a full featured Python package for
9125 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9126 are supported and well tested. vCard 3.0 files are supported, and all data
9127 should be imported, but only a few components are understood in a sophisticated
9128 way.")
9129 (home-page "http://eventable.github.io/vobject/")
9130 (license license:asl2.0)))
9131
9132 (define-public python2-vobject
9133 (package-with-python2 python-vobject))
9134
9135 (define-public python-munkres
9136 (package
9137 (name "python-munkres")
9138 (version "1.0.8")
9139 (source (origin
9140 (method url-fetch)
9141 (uri (pypi-uri "munkres" version))
9142 (sha256
9143 (base32
9144 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9145 (build-system python-build-system)
9146 (arguments
9147 '(#:tests? #f)) ; no test suite
9148 (home-page "http://software.clapper.org/munkres/")
9149 (synopsis "Implementation of the Munkres algorithm")
9150 (description "The Munkres module provides an implementation of the Munkres
9151 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9152 useful for solving the Assignment Problem.")
9153 (license license:bsd-3)))
9154
9155 (define-public python2-munkres
9156 (package-with-python2 python-munkres))
9157
9158 (define-public python-whoosh
9159 (package
9160 (name "python-whoosh")
9161 (version "2.7.4")
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "Whoosh" version))
9166 (sha256
9167 (base32
9168 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9169 (build-system python-build-system)
9170 (native-inputs
9171 `(("python-pytest" ,python-pytest)))
9172 (home-page "https://bitbucket.org/mchaput/whoosh")
9173 (synopsis "Full text indexing, search, and spell checking library")
9174 (description
9175 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9176 checking library.")
9177 (license license:bsd-2)))
9178
9179 (define-public python2-whoosh
9180 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9181 (package (inherit whoosh)
9182 (propagated-inputs
9183 `(("python2-backport-ssl-match-hostname"
9184 ,python2-backport-ssl-match-hostname)
9185 ,@(package-propagated-inputs whoosh))))))
9186
9187 (define-public python-pathlib
9188 (package
9189 (name "python-pathlib")
9190 (version "1.0.1")
9191 (source (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "pathlib" version))
9194 (sha256
9195 (base32
9196 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9197 (build-system python-build-system)
9198 ;; The tests depend on the internal "test" module, which does not provide
9199 ;; a stable interface.
9200 (arguments `(#:tests? #f))
9201 (home-page "https://pathlib.readthedocs.org/")
9202 (synopsis "Object-oriented file system paths")
9203 (description "Pathlib offers a set of classes to handle file system paths.
9204 It offers the following advantages over using string objects:
9205
9206 @enumerate
9207 @item No more cumbersome use of os and os.path functions. Everything can
9208 be done easily through operators, attribute accesses, and method calls.
9209 @item Embodies the semantics of different path types. For example,
9210 comparing Windows paths ignores casing.
9211 @item Well-defined semantics, eliminating any inconsistencies or
9212 ambiguities (forward vs. backward slashes, etc.).
9213 @end enumerate
9214
9215 Note: In Python 3.4, pathlib is now part of the standard library. For other
9216 Python versions please consider python-pathlib2 instead, which tracks the
9217 standard library module. This module (python-pathlib) isn't maintained
9218 anymore.")
9219 (license license:expat)))
9220
9221 (define-public python2-pathlib
9222 (package-with-python2 python-pathlib))
9223
9224 (define-public python2-pathlib2
9225 (package
9226 (name "python2-pathlib2")
9227 (version "2.3.3")
9228 (source (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "pathlib2" version))
9231 (sha256
9232 (base32
9233 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9234 (build-system python-build-system)
9235 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9236 ;; version is 3.4 which already includes this package as part of the
9237 ;; standard library.
9238 (arguments
9239 `(#:python ,python-2))
9240 (propagated-inputs
9241 `(("python2-scandir" ,python2-scandir)
9242 ("python2-six" ,python2-six)))
9243 (home-page "https://pypi.python.org/pypi/pathlib2/")
9244 (synopsis "Object-oriented file system paths - backport of standard
9245 pathlib module")
9246 (description "The goal of pathlib2 is to provide a backport of standard
9247 pathlib module which tracks the standard library module, so all the newest
9248 features of the standard pathlib can be used also on older Python versions.
9249
9250 Pathlib offers a set of classes to handle file system paths. It offers the
9251 following advantages over using string objects:
9252
9253 @enumerate
9254 @item No more cumbersome use of os and os.path functions. Everything can
9255 be done easily through operators, attribute accesses, and method calls.
9256 @item Embodies the semantics of different path types. For example,
9257 comparing Windows paths ignores casing.
9258 @item Well-defined semantics, eliminating any inconsistencies or
9259 ambiguities (forward vs. backward slashes, etc.).
9260 @end enumerate")
9261 (license license:expat)))
9262
9263 (define-public python2-pathlib2-bootstrap
9264 (hidden-package
9265 (package
9266 (inherit python2-pathlib2)
9267 (name "python2-pathlib2-bootstrap")
9268 (propagated-inputs
9269 `(("python2-scandir" ,python2-scandir)
9270 ("python2-six" ,python2-six-bootstrap))))))
9271
9272 (define-public python-jellyfish
9273 (package
9274 (name "python-jellyfish")
9275 (version "0.5.6")
9276 (source (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "jellyfish" version))
9279 (sha256
9280 (base32
9281 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9282 (build-system python-build-system)
9283 (native-inputs
9284 `(("python-pytest" ,python-pytest)))
9285 (home-page "https://github.com/jamesturk/jellyfish")
9286 (synopsis "Approximate and phonetic matching of strings")
9287 (description "Jellyfish uses a variety of string comparison and phonetic
9288 encoding algorithms to do fuzzy string matching.")
9289 (license license:bsd-2)
9290 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9291
9292 (define-public python2-jellyfish
9293 (let ((jellyfish (package-with-python2
9294 (strip-python2-variant python-jellyfish))))
9295 (package (inherit jellyfish)
9296 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9297 ,@(package-native-inputs jellyfish))))))
9298
9299 (define-public python2-unicodecsv
9300 (package
9301 (name "python2-unicodecsv")
9302 (version "0.14.1")
9303 (source (origin
9304 (method url-fetch)
9305 ;; The test suite is not included in the PyPi release.
9306 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9307 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9308 "archive/" version ".tar.gz"))
9309 (file-name (string-append name "-" version ".tar.gz"))
9310 (sha256
9311 (base32
9312 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9313 (build-system python-build-system)
9314 (arguments
9315 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9316 #:python ,python-2))
9317 (native-inputs
9318 `(("python2-unittest2" ,python2-unittest2)))
9319 (home-page "https://github.com/jdunck/python-unicodecsv")
9320 (synopsis "Unicode CSV module for Python 2")
9321 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9322 module, adding support for Unicode strings.")
9323 (license license:bsd-2)))
9324
9325 (define-public python-rarfile
9326 (package
9327 (name "python-rarfile")
9328 (version "2.8")
9329 (source (origin
9330 (method url-fetch)
9331 (uri (pypi-uri "rarfile" version))
9332 (sha256
9333 (base32
9334 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9335 (build-system python-build-system)
9336 (arguments
9337 '(#:phases
9338 (modify-phases %standard-phases
9339 (replace 'check
9340 ;; Many tests fail, but the installation proceeds.
9341 (lambda _ (invoke "make" "-C" "test" "test"))))))
9342 (native-inputs
9343 `(("which" ,which))) ; required for tests
9344 (propagated-inputs
9345 `(("libarchive" ,libarchive)))
9346 (home-page "https://github.com/markokr/rarfile")
9347 (synopsis "RAR archive reader for Python")
9348 (description "This is Python module for RAR archive reading. The interface
9349 is made as zipfile like as possible.")
9350 (license license:isc)))
9351
9352 (define-public python2-rarfile
9353 (package-with-python2 python-rarfile))
9354
9355 (define-public python-magic
9356 (package
9357 (name "python-magic")
9358 (version "0.4.15")
9359 (source
9360 (origin
9361 (method url-fetch)
9362 (uri (pypi-uri "python-magic" version))
9363 (sha256
9364 (base32
9365 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9366 (file-name (string-append name "-" version "-checkout"))))
9367 (build-system python-build-system)
9368 (arguments
9369 ;; The tests are unreliable, so don't run them. The tests fail
9370 ;; under Python3 because they were written for Python2 and
9371 ;; contain import statements that do not work in Python3. One of
9372 ;; the tests fails under Python2 because its assertions are
9373 ;; overly stringent; it relies on comparing output strings which
9374 ;; are brittle and can change depending on the version of
9375 ;; libmagic being used and the system on which the test is
9376 ;; running. In my case, under GuixSD 0.10.0, only one test
9377 ;; failed, and it seems to have failed only because the version
9378 ;; of libmagic that is packaged in Guix outputs a slightly
9379 ;; different (but not wrong) string than the one that the test
9380 ;; expected.
9381 '(#:tests? #f
9382 #:phases (modify-phases %standard-phases
9383 ;; Replace a specific method call with a hard-coded
9384 ;; path to the necessary libmagic.so file in the
9385 ;; store. If we don't do this, then the method call
9386 ;; will fail to find the libmagic.so file, which in
9387 ;; turn will cause any application using
9388 ;; python-magic to fail.
9389 (add-before 'build 'hard-code-path-to-libmagic
9390 (lambda* (#:key inputs #:allow-other-keys)
9391 (let ((file (assoc-ref inputs "file")))
9392 (substitute* "magic.py"
9393 (("ctypes.util.find_library\\('magic'\\)")
9394 (string-append "'" file "/lib/libmagic.so'")))
9395 #t)))
9396 (add-before 'install 'disable-egg-compression
9397 (lambda _
9398 (let ((port (open-file "setup.cfg" "a")))
9399 (display "\n[easy_install]\nzip_ok = 0\n"
9400 port)
9401 (close-port port)
9402 #t))))))
9403 (inputs
9404 ;; python-magic needs to be able to find libmagic.so.
9405 `(("file" ,file)))
9406 (home-page
9407 "https://github.com/ahupp/python-magic")
9408 (synopsis
9409 "File type identification using libmagic")
9410 (description
9411 "This module uses ctypes to access the libmagic file type
9412 identification library. It makes use of the local magic database and
9413 supports both textual and MIME-type output. Note that this module and
9414 the python-file module both provide a \"magic.py\" file; these two
9415 modules, which are different and were developed separately, both serve
9416 the same purpose: to provide Python bindings for libmagic.")
9417 (license license:expat)))
9418
9419 (define-public python2-magic
9420 (package-with-python2 python-magic))
9421
9422 (define-public python2-s3cmd
9423 (package
9424 (name "python2-s3cmd")
9425 (version "1.6.1")
9426 (source
9427 (origin
9428 (method url-fetch)
9429 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9430 "s3cmd-" version ".tar.gz"))
9431 (sha256
9432 (base32
9433 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9434 (build-system python-build-system)
9435 (arguments
9436 ;; s3cmd is written for python2 only and contains no tests.
9437 `(#:python ,python-2
9438 #:tests? #f))
9439 (propagated-inputs
9440 `(("python2-dateutil" ,python2-dateutil)
9441 ;; The python-file package also provides a magic.py module.
9442 ;; This is an unfortunate state of affairs; however, s3cmd
9443 ;; fails to install if it cannot find specifically the
9444 ;; python-magic package. Thus we include it, instead of using
9445 ;; python-file. Ironically, s3cmd sometimes works better
9446 ;; without libmagic bindings at all:
9447 ;; https://github.com/s3tools/s3cmd/issues/198
9448 ("python2-magic" ,python2-magic)))
9449 (home-page "http://s3tools.org/s3cmd")
9450 (synopsis "Command line tool for S3-compatible storage services")
9451 (description
9452 "S3cmd is a command line tool for uploading, retrieving and managing data
9453 in storage services that are compatible with the Amazon Simple Storage
9454 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9455 GnuPG encryption, and more. It also supports management of Amazon's
9456 CloudFront content delivery network.")
9457 (license license:gpl2+)))
9458
9459 (define-public python-pkgconfig
9460 (package
9461 (name "python-pkgconfig")
9462 (version "1.3.1")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "pkgconfig" version))
9467 (sha256
9468 (base32
9469 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9470 (build-system python-build-system)
9471 (native-inputs
9472 `(("python-nose" ,python-nose)))
9473 (inputs
9474 `(("pkg-config" ,pkg-config)))
9475 (arguments
9476 `(#:phases
9477 (modify-phases %standard-phases
9478 (add-before 'build 'patch
9479 ;; Hard-code the path to pkg-config.
9480 (lambda _
9481 (substitute* "pkgconfig/pkgconfig.py"
9482 (("cmd = 'pkg-config")
9483 (string-append "cmd = '" (which "pkg-config"))))
9484 #t))
9485 (replace 'check
9486 (lambda _
9487 (invoke "nosetests" "test.py"))))))
9488 (home-page "https://github.com/matze/pkgconfig")
9489 (synopsis "Python interface for pkg-config")
9490 (description "This module provides a Python interface to pkg-config. It
9491 can be used to find all pkg-config packages, check if a package exists,
9492 check if a package meets certain version requirements, query CFLAGS and
9493 LDFLAGS and parse the output to build extensions with setup.py.")
9494 (license license:expat)))
9495
9496 (define-public python2-pkgconfig
9497 (package-with-python2 python-pkgconfig))
9498
9499 (define-public python-bz2file
9500 (package
9501 (name "python-bz2file")
9502 (version "0.98")
9503 (source
9504 (origin
9505 (method url-fetch)
9506 (uri (pypi-uri "bz2file" version))
9507 (sha256
9508 (base32
9509 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9510 (build-system python-build-system)
9511 (arguments
9512 `(#:tests? #f)) ; Tests use deprecated python modules.
9513 (home-page "https://github.com/nvawda/bz2file")
9514 (synopsis "Read and write bzip2-compressed files")
9515 (description
9516 "Bz2file is a Python library for reading and writing bzip2-compressed
9517 files. It contains a drop-in replacement for the I/O interface in the
9518 standard library's @code{bz2} module, including features from the latest
9519 development version of CPython that are not available in older releases.")
9520 (license license:asl2.0)))
9521
9522 (define-public python2-bz2file
9523 (package-with-python2 python-bz2file))
9524
9525 (define-public python-future
9526 (package
9527 (name "python-future")
9528 (version "0.17.1")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "future" version))
9533 (sha256
9534 (base32
9535 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9536 (build-system python-build-system)
9537 ;; Many tests connect to the network or are otherwise flawed.
9538 ;; https://github.com/PythonCharmers/python-future/issues/210
9539 (arguments
9540 `(#:tests? #f))
9541 (home-page "http://python-future.org")
9542 (synopsis "Single-source support for Python 3 and 2")
9543 (description
9544 "@code{python-future} is the missing compatibility layer between Python 2 and
9545 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9546 to support both Python 2 and Python 3 with minimal overhead.")
9547 (license license:expat)))
9548
9549 (define-public python2-future
9550 (package-with-python2 python-future))
9551
9552 (define-public python-cysignals
9553 (package
9554 (name "python-cysignals")
9555 (version "1.9.0")
9556 (source
9557 (origin
9558 (method url-fetch)
9559 (uri (pypi-uri "cysignals" version))
9560 (sha256
9561 (base32
9562 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9563 (build-system python-build-system)
9564 (native-inputs
9565 `(("python-cython" ,python-cython)
9566 ("python-sphinx" ,python-sphinx)))
9567 (inputs
9568 `(("pari-gp" ,pari-gp)))
9569 (arguments
9570 `(#:modules ((guix build python-build-system)
9571 ((guix build gnu-build-system) #:prefix gnu:)
9572 (guix build utils))
9573 ;; FIXME: Tests are executed after installation and currently fail
9574 ;; when not installing into standard locations; the author is working
9575 ;; on a fix.
9576 #:tests? #f
9577 #:phases
9578 (modify-phases %standard-phases
9579 (add-before
9580 'build 'configure
9581 (assoc-ref gnu:%standard-phases 'configure)))))
9582 (home-page
9583 "https://github.com/sagemath/cysignals")
9584 (synopsis
9585 "Handling of interrupts and signals for Cython")
9586 (description
9587 "The cysignals package provides mechanisms to handle interrupts (and
9588 other signals and errors) in Cython code, using two related approaches,
9589 for mixed Cython/Python code or external C libraries and pure Cython code,
9590 respectively.")
9591 (license license:lgpl3+)))
9592
9593 (define-public python2-cysignals
9594 (package-with-python2 python-cysignals))
9595
9596 (define-public python2-shedskin
9597 (package
9598 (name "python2-shedskin")
9599 (version "0.9.4")
9600 (source
9601 (origin
9602 (method url-fetch)
9603 (uri (string-append "https://github.com/shedskin/shedskin/"
9604 "releases/download/v" version
9605 "/shedskin-" version ".tgz"))
9606 (sha256
9607 (base32
9608 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9609 (build-system python-build-system)
9610 (arguments
9611 `(#:python ,python-2
9612 #:phases (modify-phases %standard-phases
9613 (add-after 'unpack 'fix-resulting-include-libs
9614 (lambda* (#:key inputs #:allow-other-keys)
9615 (let ((libgc (assoc-ref inputs "libgc"))
9616 (pcre (assoc-ref inputs "pcre")))
9617 (substitute* "shedskin/makefile.py"
9618 (("variable == 'CCFLAGS':[ ]*")
9619 (string-append "variable == 'CCFLAGS':\n"
9620 " line += ' -I " pcre "/include"
9621 " -I " libgc "/include'"))
9622 (("variable == 'LFLAGS':[ ]*")
9623 (string-append "variable == 'LFLAGS':\n"
9624 " line += ' -L" pcre "/lib"
9625 " -L " libgc "/lib'")))
9626 #t))))))
9627 (inputs `(("pcre" ,pcre)
9628 ("libgc" ,libgc)))
9629 (home-page "https://shedskin.github.io/")
9630 (synopsis "Experimental Python-2 to C++ Compiler")
9631 (description (string-append "This is an experimental compiler for a subset of
9632 Python. It generates C++ code and a Makefile."))
9633 (license (list license:gpl3 license:bsd-3 license:expat))))
9634
9635 (define-public python2-rope
9636 (package
9637 (name "python2-rope")
9638 (version "0.11.0")
9639 (source
9640 (origin
9641 (method url-fetch)
9642 (uri (pypi-uri "rope" version))
9643 (sha256
9644 (base32
9645 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9646 (arguments
9647 ;; Rope has only partial python3 support, see `python-rope'
9648 `(#:python ,python-2))
9649 (build-system python-build-system)
9650 (native-inputs
9651 `(("python2-unittest2" ,python2-unittest2)))
9652 (home-page "https://github.com/python-rope/rope")
9653 (synopsis "Refactoring library for Python")
9654 (description "Rope is a refactoring library for Python. It facilitates
9655 the renaming, moving and extracting of attributes, functions, modules, fields
9656 and parameters in Python 2 source code. These refactorings can also be applied
9657 to occurrences in strings and comments.")
9658 (license license:gpl2)))
9659
9660 (define-public python-rope
9661 (package
9662 (inherit python2-rope)
9663 (name "python-rope")
9664 (arguments `(#:python ,python-wrapper
9665 ;; XXX: Only partial python3 support, results in some failing
9666 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9667 #:tests? #f))
9668 (properties `((python2-variant . ,(delay python2-rope))))))
9669
9670 (define-public python-py3status
9671 (package
9672 (name "python-py3status")
9673 (version "3.16")
9674 (source
9675 (origin
9676 (method url-fetch)
9677 (uri (pypi-uri "py3status" version))
9678 (sha256
9679 (base32
9680 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9681 (build-system python-build-system)
9682 (inputs
9683 `(("file" ,file)))
9684 (arguments
9685 '(#:phases
9686 (modify-phases %standard-phases
9687 ;; 'file' is used for detection of configuration file encoding
9688 ;; let's make link the dependency to particular input
9689 (add-before 'build 'patch-file-path
9690 (lambda* (#:key inputs #:allow-other-keys)
9691 (let ((file-path (assoc-ref inputs "file")))
9692 (substitute* "py3status/parse_config.py"
9693 (("\\['file', '-b'")
9694 (string-append "['" file-path "/bin/file', '-b'")))
9695 #t))))
9696 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9697 (home-page "https://github.com/ultrabug/py3status")
9698 (synopsis "Extensible i3status wrapper written in Python")
9699 (description "py3status is an i3status wrapper which extends i3status
9700 functionality in a modular way, allowing you to extend your panel with your
9701 own code, responding to click events and updating clock every second.")
9702 (license license:bsd-3)))
9703
9704 (define-public python-tblib
9705 (package
9706 (name "python-tblib")
9707 (version "1.3.2")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "tblib" version))
9711 (sha256 (base32
9712 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9713 (build-system python-build-system)
9714 (arguments
9715 `(#:phases
9716 (modify-phases %standard-phases
9717 (add-before 'check 'adjust-tests
9718 (lambda _
9719 (when (which "python3")
9720 ;; Adjust the example output to match that of Python 3.7:
9721 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9722 (substitute* "README.rst"
9723 (("Exception\\('fail',") "Exception('fail'"))
9724 #t)))
9725 (replace 'check
9726 (lambda _
9727 ;; Upstream runs tests after installation and the package itself
9728 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9729 ;; found.
9730 (setenv "PYTHONPATH"
9731 (string-append (getcwd) "/build/lib:"
9732 (getenv "PYTHONPATH")))
9733 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9734 (native-inputs
9735 `(("python-pytest" ,python-pytest)
9736 ("python-six" ,python-six)))
9737 (home-page "https://github.com/ionelmc/python-tblib")
9738 (synopsis "Traceback serialization library")
9739 (description
9740 "Traceback serialization allows you to:
9741
9742 @enumerate
9743 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9744 different processes. This allows better error handling when running code over
9745 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9746
9747 @item Parse traceback strings and raise with the parsed tracebacks.
9748 @end enumerate\n")
9749 (license license:bsd-3)))
9750
9751 (define-public python2-tblib
9752 (package-with-python2 python-tblib))
9753
9754 (define-public python-greenlet
9755 (package
9756 (name "python-greenlet")
9757 (version "0.4.15")
9758 (source (origin
9759 (method url-fetch)
9760 (uri (pypi-uri "greenlet" version))
9761 (sha256
9762 (base32
9763 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9764 (build-system python-build-system)
9765 (home-page "https://greenlet.readthedocs.io/")
9766 (synopsis "Lightweight in-process concurrent programming")
9767 (description
9768 "Greenlet package is a spin-off of Stackless, a version of CPython
9769 that supports micro-threads called \"tasklets\". Tasklets run
9770 pseudo-concurrently (typically in a single or a few OS-level threads) and
9771 are synchronized with data exchanges on \"channels\".")
9772 (license (list license:psfl license:expat))))
9773
9774 (define-public python2-greenlet
9775 (package-with-python2 python-greenlet))
9776
9777 (define-public python-objgraph
9778 (package
9779 (name "python-objgraph")
9780 (version "3.4.0")
9781 (source
9782 (origin
9783 (method url-fetch)
9784 (uri (pypi-uri "objgraph" version))
9785 (sha256
9786 (base32
9787 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9788 (build-system python-build-system)
9789 (propagated-inputs
9790 `(("python-graphviz" ,python-graphviz)))
9791 (native-inputs
9792 `(("python-mock" ,python-mock)
9793 ("graphviz" ,graphviz)))
9794 (home-page "https://mg.pov.lt/objgraph/")
9795 (synopsis "Draw Python object reference graphs with graphviz")
9796 (description
9797 "This package provides tools to draw Python object reference graphs with
9798 graphviz.")
9799 (license license:expat)))
9800
9801 (define-public python-gevent
9802 (package
9803 (name "python-gevent")
9804 (version "1.3.7")
9805 (source (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "gevent" version))
9808 (sha256
9809 (base32
9810 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9811 (modules '((guix build utils)))
9812 (snippet
9813 '(begin
9814 ;; unbunding libev and c-ares
9815 (delete-file-recursively "deps")
9816 #t))))
9817 (build-system python-build-system)
9818 (arguments
9819 `(#:modules ((ice-9 ftw)
9820 (ice-9 match)
9821 (srfi srfi-26)
9822 (guix build utils)
9823 (guix build python-build-system))
9824 #:phases (modify-phases %standard-phases
9825 (add-after 'unpack 'unpack-libev
9826 (lambda* (#:key inputs #:allow-other-keys)
9827 (mkdir-p "deps/libev")
9828 ;; FIXME: gevent requires building libev, even though
9829 ;; it only links against the proper one.
9830 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9831 "--strip-components=1" "-C" "deps/libev")))
9832 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9833 (lambda _
9834 (substitute* "src/gevent/subprocess.py"
9835 (("/bin/sh") (which "sh")))
9836 (for-each (lambda (file)
9837 (substitute* file
9838 (("/bin/sh") (which "sh"))
9839 (("/bin/true") (which "true"))))
9840 (find-files "src/greentest" "\\.py$"))
9841 #t))
9842 (add-before 'build 'do-not-use-bundled-sources
9843 (lambda* (#:key inputs #:allow-other-keys)
9844 (setenv "CONFIG_SHELL" (which "bash"))
9845 (setenv "LIBEV_EMBED" "false")
9846 (setenv "CARES_EMBED" "false")
9847 (setenv "EMBED" "false")
9848
9849 (let ((greenlet (string-append
9850 (assoc-ref inputs "python-greenlet")
9851 "/include")))
9852 (match (scandir greenlet
9853 (lambda (item)
9854 (string-prefix? "python" item)))
9855 ((python)
9856 (setenv "CPATH"
9857 (string-append greenlet "/" python)))))
9858 #t))
9859 (add-before 'check 'skip-timer-test
9860 (lambda _
9861 ;; XXX: Skip 'TestTimerResolution', which appears to be
9862 ;; unreliable.
9863 (substitute* "src/greentest/test__core_timer.py"
9864 (("not greentest.RUNNING_ON_CI") "False"))
9865 #t))
9866 (replace 'check
9867 (lambda _
9868 ;; Make sure the build directory is on PYTHONPATH.
9869 (setenv "PYTHONPATH"
9870 (string-append
9871 (getenv "PYTHONPATH") ":"
9872 (getcwd) "/build/"
9873 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9874 (with-directory-excursion "src/greentest"
9875 ;; XXX: Many tests require network access. Instead we only
9876 ;; run known-good tests. Unfortunately we cannot use
9877 ;; recursion here since this directory also contains
9878 ;; Python-version-specific subfolders.
9879 (apply invoke "python" "testrunner.py" "--config"
9880 "known_failures.py"
9881 (scandir "." (cut regexp-exec
9882 (make-regexp "test_+(subprocess|core)")
9883 <>)))))))))
9884 (propagated-inputs
9885 `(("python-greenlet" ,python-greenlet)
9886 ("python-objgraph" ,python-objgraph)))
9887 (native-inputs
9888 `(("libev-source" ,(package-source libev))
9889 ("python-six" ,python-six)))
9890 (inputs
9891 `(("c-ares" ,c-ares)
9892 ("libev" ,libev)))
9893 (home-page "http://www.gevent.org/")
9894 (synopsis "Coroutine-based network library")
9895 (description
9896 "gevent is a coroutine-based Python networking library that uses greenlet
9897 to provide a high-level synchronous API on top of the libev event loop.")
9898 (license license:expat)
9899 (properties `((python2-variant . ,(delay python2-gevent))))))
9900
9901 (define-public python2-gevent
9902 (let ((base (package-with-python2
9903 (strip-python2-variant python-gevent))))
9904 (package
9905 (inherit base)
9906 (native-inputs `(,@(package-native-inputs python-gevent)
9907 ("python-mock" ,python2-mock))))))
9908
9909 (define-public python-fastimport
9910 (package
9911 (name "python-fastimport")
9912 (version "0.9.6")
9913 (source
9914 (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "fastimport" version))
9917 (sha256
9918 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9919 (build-system python-build-system)
9920 (home-page "https://github.com/jelmer/python-fastimport")
9921 (synopsis "VCS fastimport parser and generator in Python")
9922 (description "This package provides a parser for and generator of the Git
9923 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9924 format.")
9925 (license license:gpl2+)))
9926
9927 (define-public python2-fastimport
9928 (package-with-python2 python-fastimport))
9929
9930 (define-public python-twisted
9931 (package
9932 (name "python-twisted")
9933 (version "19.2.1")
9934 (source (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9937 (sha256
9938 (base32
9939 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
9940 (build-system python-build-system)
9941 (arguments
9942 '(#:tests? #f)) ; FIXME: some tests fail
9943 (propagated-inputs
9944 `(("python-zope-interface" ,python-zope-interface)
9945 ("python-pyhamcrest" ,python-pyhamcrest)
9946 ("python-incremental" ,python-incremental)
9947 ("python-hyperlink" ,python-hyperlink)
9948 ("python-constantly" ,python-constantly)
9949 ("python-automat" ,python-automat)))
9950 (home-page "https://twistedmatrix.com/")
9951 (synopsis "Asynchronous networking framework written in Python")
9952 (description
9953 "Twisted is an extensible framework for Python programming, with special
9954 focus on event-based network programming and multiprotocol integration.")
9955 (license license:expat)))
9956
9957 (define-public python2-twisted
9958 (package-with-python2 python-twisted))
9959
9960 (define-public python-pika
9961 (package
9962 (name "python-pika")
9963 (version "0.12.0")
9964 (source
9965 (origin
9966 (method url-fetch)
9967 (uri (pypi-uri "pika" version))
9968 (sha256
9969 (base32
9970 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9971 (build-system python-build-system)
9972 (native-inputs
9973 `(("python-pyev" ,python-pyev)
9974 ("python-tornado" ,python-tornado)
9975 ("python-twisted" ,python-twisted)))
9976 (home-page "https://pika.readthedocs.org")
9977 (synopsis "Pure Python AMQP Client Library")
9978 (description
9979 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9980 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9981 network support library.")
9982 (license license:bsd-3)))
9983
9984 (define-public python2-pika
9985 (package-with-python2 python-pika))
9986
9987 (define-public python-ply
9988 (package
9989 (name "python-ply")
9990 (version "3.10")
9991 (source
9992 (origin
9993 (method url-fetch)
9994 (uri (pypi-uri "ply" version))
9995 (sha256
9996 (base32
9997 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9998 (build-system python-build-system)
9999 (home-page "http://www.dabeaz.com/ply/")
10000 (synopsis "Python Lex & Yacc")
10001 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10002 It uses LR parsing and does extensive error checking.")
10003 (license license:bsd-3)))
10004
10005 (define-public python2-ply
10006 (package-with-python2 python-ply))
10007
10008 (define-public python-tabulate
10009 (package
10010 (name "python-tabulate")
10011 (version "0.7.7")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "tabulate" version))
10015 (sha256
10016 (base32
10017 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10018 (build-system python-build-system)
10019 (arguments
10020 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10021 ;; and the latest release is not tagged in the upstream repository.
10022 '(#:tests? #f))
10023 (home-page "https://bitbucket.org/astanin/python-tabulate")
10024 (synopsis "Pretty-print tabular data")
10025 (description
10026 "Tabulate is a library and command-line utility to pretty-print tabular
10027 data in Python.")
10028 (license license:expat)))
10029
10030 (define-public python2-tabulate
10031 (package-with-python2 python-tabulate))
10032
10033 (define-public python-kazoo
10034 (package
10035 (name "python-kazoo")
10036 (version "2.4.0")
10037 (source
10038 (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "kazoo" version))
10041 (sha256
10042 (base32
10043 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10044 (build-system python-build-system)
10045 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10046 (propagated-inputs
10047 `(("python-six" ,python-six)))
10048 (home-page "https://kazoo.readthedocs.org")
10049 (synopsis "High-level Zookeeper client library")
10050 (description
10051 "Kazoo is a Python client library for the Apache Zookeeper distributed
10052 application service. It is designed to be easy to use and to avoid common
10053 programming errors.")
10054 (license license:asl2.0)))
10055
10056 (define-public python2-kazoo
10057 (package-with-python2 python-kazoo))
10058
10059 (define-public python-pykafka
10060 (package
10061 (name "python-pykafka")
10062 (version "2.4.0")
10063 (source (origin
10064 (method url-fetch)
10065 (uri (pypi-uri "pykafka" version))
10066 (sha256
10067 (base32
10068 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10069 (build-system python-build-system)
10070 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10071 (propagated-inputs
10072 `(("python-gevent" ,python-gevent)
10073 ("python-kazoo" ,python-kazoo)
10074 ("python-tabulate" ,python-tabulate)))
10075 (inputs
10076 `(("librdkafka" ,librdkafka)))
10077 (home-page "https://pykafka.readthedocs.io/")
10078 (synopsis "Apache Kafka client for Python")
10079 (description
10080 "PyKafka is a client for the Apache Kafka distributed messaging system.
10081 It includes Python implementations of Kafka producers and consumers, which
10082 are optionally backed by a C extension built on librdkafka.")
10083 (license license:asl2.0)))
10084
10085 (define-public python2-pykafka
10086 (package-with-python2 python-pykafka))
10087
10088 (define-public python-wcwidth
10089 (package
10090 (name "python-wcwidth")
10091 (version "0.1.7")
10092 (source
10093 (origin
10094 (method url-fetch)
10095 (uri (pypi-uri "wcwidth" version))
10096 (sha256
10097 (base32
10098 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10099 (build-system python-build-system)
10100 (home-page "https://github.com/jquast/wcwidth")
10101 (synopsis "Measure number of terminal column cells of wide-character codes")
10102 (description "Wcwidth measures the number of terminal column cells of
10103 wide-character codes. It is useful for those implementing a terminal emulator,
10104 or programs that carefully produce output to be interpreted by one. It is a
10105 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10106 specified in POSIX.1-2001 and POSIX.1-2008.")
10107 (license license:expat)))
10108
10109 (define-public python2-wcwidth
10110 (package-with-python2 python-wcwidth))
10111
10112 (define-public python2-jsonrpclib
10113 (package
10114 (name "python2-jsonrpclib")
10115 (version "0.1.7")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "jsonrpclib" version))
10119 (sha256
10120 (base32
10121 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10122 (build-system python-build-system)
10123 (arguments
10124 `(#:tests? #f
10125 #:python ,python-2))
10126 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10127 (synopsis "Implementation of JSON-RPC specification for Python")
10128 (description
10129 "This library is an implementation of the JSON-RPC specification.
10130 It supports both the original 1.0 specification, as well as the
10131 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10132 etc.")
10133 (license license:asl2.0)))
10134
10135 (define-public python-chai
10136 (package
10137 (name "python-chai")
10138 (version "1.1.2")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "chai" version))
10142 (sha256
10143 (base32
10144 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10145 (build-system python-build-system)
10146 (home-page "https://github.com/agoragames/chai")
10147 (synopsis "Mocking framework for Python")
10148 (description
10149 "Chai provides an api for mocking, stubbing and spying your python
10150 objects, patterned after the Mocha library for Ruby.")
10151 (license license:bsd-3)))
10152
10153 (define-public python2-chai
10154 (package-with-python2 python-chai))
10155
10156 (define-public python-inflection
10157 (package
10158 (name "python-inflection")
10159 (version "0.3.1")
10160 (source
10161 (origin (method url-fetch)
10162 (uri (pypi-uri "inflection" version))
10163 (sha256
10164 (base32
10165 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10166 (build-system python-build-system)
10167 (native-inputs
10168 `(("python-pytest" ,python-pytest)))
10169 (home-page "https://github.com/jpvanhal/inflection")
10170 (synopsis "Python string transformation library")
10171 (description
10172 "Inflection is a string transformation library. It singularizes
10173 and pluralizes English words, and transforms strings from CamelCase to
10174 underscored string.")
10175 (license license:expat)))
10176
10177 (define-public python2-inflection
10178 (package-with-python2 python-inflection))
10179
10180 (define-public python-pylev
10181 (package
10182 (name "python-pylev")
10183 (version "1.3.0")
10184 (source (origin
10185 (method url-fetch)
10186 (uri (pypi-uri "pylev" version))
10187 (sha256
10188 (base32
10189 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10190 (build-system python-build-system)
10191 (home-page "https://github.com/toastdriven/pylev")
10192 (synopsis "Levenshtein distance implementation in Python")
10193 (description "Pure Python Levenshtein implementation, based off the
10194 Wikipedia code samples at
10195 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10196 (license license:bsd-3)))
10197
10198 (define-public python2-pylev
10199 (package-with-python2 python-pylev))
10200
10201 (define-public python-cleo
10202 (package
10203 (name "python-cleo")
10204 (version "0.6.1")
10205 (source (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "cleo" version))
10208 (sha256
10209 (base32
10210 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10211 (build-system python-build-system)
10212 (native-inputs
10213 `(;; For testing
10214 ("python-mock" ,python-mock)
10215 ("python-pytest-mock" ,python-pytest-mock)
10216 ("python-pytest" ,python-pytest)))
10217 (propagated-inputs
10218 `(("python-backpack" ,python-backpack)
10219 ("python-pastel" ,python-pastel)
10220 ("python-pylev" ,python-pylev)))
10221 (home-page "https://github.com/sdispater/cleo")
10222 (synopsis "Command-line arguments library for Python")
10223 (description
10224 "Cleo allows you to create command-line commands with signature in
10225 docstring and colored output.")
10226 (license license:expat)))
10227
10228 (define-public python2-cleo
10229 (package-with-python2 python-cleo))
10230
10231 (define-public python-lazy-object-proxy
10232 (package
10233 (name "python-lazy-object-proxy")
10234 (version "1.3.1")
10235 (source (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "lazy-object-proxy" version))
10238 (sha256
10239 (base32
10240 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10241 (build-system python-build-system)
10242 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10243 (synopsis "Lazy object proxy for python")
10244 (description
10245 "Lazy object proxy is an object that wraps a callable but defers the call
10246 until the object is actually required, and caches the result of said call.")
10247 (license license:bsd-2)))
10248
10249 (define-public python2-lazy-object-proxy
10250 (package-with-python2 python-lazy-object-proxy))
10251
10252 (define-public python-dnspython
10253 (package
10254 (name "python-dnspython")
10255 (version "1.15.0")
10256 (source (origin
10257 (method url-fetch)
10258 (uri (string-append "http://www.dnspython.org/kits/"
10259 version "/dnspython-" version ".tar.gz"))
10260 (sha256
10261 (base32
10262 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10263 (build-system python-build-system)
10264 (arguments '(#:tests? #f)) ; XXX: requires internet access
10265 (home-page "http://www.dnspython.org")
10266 (synopsis "DNS toolkit for Python")
10267 (description
10268 "dnspython is a DNS toolkit for Python. It supports almost all record
10269 types. It can be used for queries, zone transfers, and dynamic updates.
10270 It supports TSIG authenticated messages and EDNS0.")
10271 (license license:expat)))
10272
10273 (define-public python2-dnspython
10274 (package-with-python2 python-dnspython))
10275
10276 (define-public python-email-validator
10277 (package
10278 (name "python-email-validator")
10279 (version "1.0.2")
10280 (source
10281 (origin (method url-fetch)
10282 (uri (pypi-uri "email_validator" version))
10283 (sha256
10284 (base32
10285 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10286 (build-system python-build-system)
10287 (arguments
10288 '(#:phases
10289 (modify-phases %standard-phases
10290 (add-before 'build 'use-dnspython
10291 (lambda _
10292 (substitute* "setup.py"
10293 (("dnspython3") "dnspython"))
10294 #t)))))
10295 (propagated-inputs
10296 `(("python-dnspython" ,python-dnspython)
10297 ("python-idna" ,python-idna)))
10298 (home-page "https://github.com/JoshData/python-email-validator")
10299 (synopsis "Email address validation library for Python")
10300 (description
10301 "This library validates email address syntax and deliverability.")
10302 (license license:cc0)))
10303
10304 (define-public python2-email-validator
10305 (package-with-python2 python-email-validator))
10306
10307 (define-public python-ukpostcodeparser
10308 (package
10309 (name "python-ukpostcodeparser")
10310 (version "1.0.3")
10311 (source (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "UkPostcodeParser" version))
10314 (sha256
10315 (base32
10316 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10317 (build-system python-build-system)
10318 (home-page "https://github.com/hamstah/ukpostcodeparser")
10319 (synopsis "UK Postcode parser for Python")
10320 (description
10321 "This library provides the @code{parse_uk_postcode} function for
10322 parsing UK postcodes.")
10323 (license license:expat)))
10324
10325 (define-public python2-ukpostcodeparser
10326 (package-with-python2 python-ukpostcodeparser))
10327
10328 (define-public python-faker
10329 (package
10330 (name "python-faker")
10331 (version "0.7.9")
10332 (source (origin
10333 (method url-fetch)
10334 (uri (pypi-uri "Faker" version))
10335 (sha256
10336 (base32
10337 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10338 (patches
10339 (search-patches "python-faker-fix-build-32bit.patch"))
10340 (modules '((guix build utils)))
10341 (snippet
10342 '(begin
10343 (for-each delete-file (find-files "." "\\.pyc$"))
10344 #t))))
10345 (build-system python-build-system)
10346 (arguments
10347 '(#:phases
10348 (modify-phases %standard-phases
10349 (replace 'check
10350 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10351 (native-inputs
10352 `(;; For testing
10353 ("python-email-validator" ,python-email-validator)
10354 ("python-mock" ,python-mock)
10355 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10356 (propagated-inputs
10357 `(("python-dateutil" ,python-dateutil)
10358 ("python-six" ,python-six)))
10359 (home-page "https://github.com/joke2k/faker")
10360 (synopsis "Python package that generates fake data")
10361 (description
10362 "Faker is a Python package that generates fake data such as names,
10363 addresses, and phone numbers.")
10364 (license license:expat)
10365 (properties `((python2-variant . ,(delay python2-faker))))))
10366
10367 (define-public python2-faker
10368 (let ((base (package-with-python2 (strip-python2-variant
10369 python-faker))))
10370 (package
10371 (inherit base)
10372 (propagated-inputs
10373 `(("python2-ipaddress" ,python2-ipaddress)
10374 ,@(package-propagated-inputs base))))))
10375
10376 (define-public python-pyaml
10377 (package
10378 (name "python-pyaml")
10379 (version "18.11.0")
10380 (source (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "pyaml" version))
10383 (sha256
10384 (base32
10385 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10386 (build-system python-build-system)
10387 (native-inputs
10388 `(("python-unidecode" ,python-unidecode)))
10389 (propagated-inputs
10390 `(("python-pyyaml" ,python-pyyaml)))
10391 (home-page "https://github.com/mk-fg/pretty-yaml")
10392 (synopsis "YAML pretty-print library for Python")
10393 (description
10394 "pyaml is a PyYAML based python module to produce pretty and readable
10395 YAML-serialized data.")
10396 (license license:wtfpl2)))
10397
10398 (define-public python2-pyaml
10399 (package-with-python2 python-pyaml))
10400
10401 (define-public python-backpack
10402 (package
10403 (name "python-backpack")
10404 (version "0.1")
10405 (source
10406 (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "backpack" version))
10409 (sha256
10410 (base32
10411 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10412 (build-system python-build-system)
10413 (native-inputs
10414 `(("python-pytest" ,python-pytest)
10415 ("python-nose" ,python-nose)))
10416 (propagated-inputs
10417 `(("python-simplejson" ,python-simplejson)))
10418 (home-page "https://github.com/sdispater/backpack")
10419 (synopsis "Utilities for working with Python collections")
10420 (description "Backpack provides some useful utilities for working with
10421 collections of data.")
10422 (license license:expat)))
10423
10424 (define-public python2-backpack
10425 (package-with-python2 python-backpack))
10426
10427 (define-public python-prompt-toolkit
10428 (package
10429 (name "python-prompt-toolkit")
10430 (version "2.0.7")
10431 (source
10432 (origin
10433 (method url-fetch)
10434 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10435 (sha256
10436 (base32
10437 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10438 (build-system python-build-system)
10439 (arguments
10440 `(#:phases
10441 (modify-phases %standard-phases
10442 (delete 'check)
10443 (add-after 'install 'post-install-check
10444 (lambda* (#:key inputs outputs #:allow-other-keys)
10445 ;; HOME is needed for the test
10446 ;; "test_pathcompleter_can_expanduser".
10447 (setenv "HOME" "/tmp")
10448 (add-installed-pythonpath inputs outputs)
10449 (invoke "py.test"))))))
10450 (propagated-inputs
10451 `(("python-wcwidth" ,python-wcwidth)
10452 ("python-six" ,python-six)
10453 ("python-pygments" ,python-pygments)))
10454 (native-inputs
10455 `(("python-pytest" ,python-pytest)))
10456 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10457 (synopsis "Library for building command line interfaces in Python")
10458 (description
10459 "Prompt-Toolkit is a library for building interactive command line
10460 interfaces in Python. It's like GNU Readline but it also features syntax
10461 highlighting while typing, out-of-the-box multi-line input editing, advanced
10462 code completion, incremental search, support for Chinese double-width
10463 characters, mouse support, and auto suggestions.")
10464 (license license:bsd-3)))
10465
10466 (define-public python2-prompt-toolkit
10467 (package-with-python2 python-prompt-toolkit))
10468
10469 (define-public python-prompt-toolkit-1
10470 (package (inherit python-prompt-toolkit)
10471 (version "1.0.15")
10472 (source
10473 (origin
10474 (method url-fetch)
10475 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10476 (sha256
10477 (base32
10478 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10479
10480 (define-public python2-prompt-toolkit-1
10481 (package-with-python2 python-prompt-toolkit-1))
10482
10483 (define-public python-jedi
10484 (package
10485 (name "python-jedi")
10486 (version "0.13.3")
10487 (source
10488 (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "jedi" version))
10491 (sha256
10492 (base32
10493 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
10494 (build-system python-build-system)
10495 (arguments
10496 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
10497 ;; https://github.com/davidhalter/jedi/issues/1263)
10498 #:tests? #f
10499 #:phases
10500 (modify-phases %standard-phases
10501 (replace 'check
10502 (lambda* (#:key tests? #:allow-other-keys)
10503 (when tests?
10504 (invoke "py.test" "-vv")))))))
10505 (native-inputs
10506 `(("python-pytest" ,python-pytest)
10507 ("python-docopt" ,python-docopt)))
10508 (propagated-inputs
10509 `(("python-parso" ,python-parso)))
10510 (home-page "https://github.com/davidhalter/jedi")
10511 (synopsis "Autocompletion and static analysis library for Python")
10512 (description
10513 "Jedi is a static analysis tool for Python that can be used in Integrated
10514 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10515 on a deeper level than many other static analysis frameworks for Python.
10516
10517 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10518 well.")
10519 (license license:expat)))
10520
10521 (define-public python2-jedi
10522 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10523 (package
10524 (inherit base)
10525 (arguments (substitute-keyword-arguments (package-arguments base)
10526 ((#:tests? _) #t))))))
10527
10528 (define-public ptpython
10529 (package
10530 (name "ptpython")
10531 (version "0.34")
10532 (source (origin
10533 (method url-fetch)
10534 (uri (pypi-uri "ptpython" version))
10535 (sha256
10536 (base32
10537 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10538 (build-system python-build-system)
10539 (arguments
10540 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10541 (propagated-inputs
10542 `(("python-docopt" ,python-docopt)
10543 ("python-jedi" ,python-jedi)
10544 ("python-prompt-toolkit" ,python-prompt-toolkit)
10545 ("python-pygments" ,python-pygments)))
10546 (home-page "https://github.com/jonathanslenders/ptpython")
10547 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10548 (description
10549 "ptpython is a Python read-eval-print loop with IDE-like features.
10550 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10551 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10552 etc.")
10553 (license license:bsd-3)
10554 (properties `((python2-variant . ,(delay ptpython-2))))))
10555
10556 (define-public ptpython-2
10557 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10558 (package
10559 (inherit base)
10560 (name "ptpython2"))))
10561
10562 (define-public python-stem
10563 (package
10564 (name "python-stem")
10565 (version "1.7.1")
10566 (source
10567 (origin
10568 (method url-fetch)
10569 (uri (pypi-uri "stem" version))
10570 (sha256
10571 (base32
10572 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10573 (build-system python-build-system)
10574 (arguments
10575 `(#:phases
10576 (modify-phases %standard-phases
10577 (replace 'check
10578 (lambda _
10579 (invoke "./run_tests.py" "--unit")
10580 #t)))))
10581 (native-inputs
10582 `(("python-mock" ,python-mock)
10583 ("python-pycodestyle" ,python-pycodestyle)
10584 ("python-pyflakes" ,python-pyflakes)))
10585 (home-page "https://stem.torproject.org/")
10586 (synopsis
10587 "Python controller library that allows applications to interact with Tor")
10588 (description
10589 "Stem is a Python controller library for Tor. With it you can use Tor's
10590 control protocol to script against the Tor process and read descriptor data
10591 relays publish about themselves.")
10592 (license license:lgpl3)))
10593
10594 (define-public python2-stem
10595 (package-with-python2 python-stem))
10596
10597 (define-public python-pyserial
10598 (package
10599 (name "python-pyserial")
10600 (version "3.1.1")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "pyserial" version))
10605 (sha256
10606 (base32
10607 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10608 (build-system python-build-system)
10609 (arguments
10610 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10611 ;; #:phases
10612 ;; (modify-phases %standard-phases
10613 ;; (replace 'check
10614 ;; (lambda _
10615 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10616 (home-page
10617 "https://github.com/pyserial/pyserial")
10618 (synopsis "Python Serial Port Bindings")
10619 (description "@code{pyserial} provide serial port bindings for Python. It
10620 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10621 and/or Xon/Xoff. The port is accessed in RAW mode.")
10622 (license license:bsd-3)))
10623
10624 (define-public python2-pyserial
10625 (package-with-python2 python-pyserial))
10626
10627 (define-public python-kivy
10628 (package
10629 (name "python-kivy")
10630 (version "1.10.1")
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "Kivy" version))
10635 (file-name (string-append name "-" version ".tar.gz"))
10636 (sha256
10637 (base32
10638 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10639 (build-system python-build-system)
10640 (arguments
10641 `(#:tests? #f ; Tests require many optional packages
10642 #:phases
10643 (modify-phases %standard-phases
10644 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10645 (lambda* (#:key inputs #:allow-other-keys)
10646 (setenv "KIVY_SDL2_PATH"
10647 (string-append (assoc-ref inputs "sdl-union")
10648 "/include/SDL2"))
10649 #t)))))
10650 (native-inputs
10651 `(("git" ,git)
10652 ("pkg-config" ,pkg-config)
10653 ("python-cython" ,python-cython)))
10654 (inputs
10655 `(("gstreamer" ,gstreamer)
10656 ("mesa" ,mesa)
10657 ("sdl-union"
10658 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10659 (home-page "http://kivy.org")
10660 (synopsis
10661 "Multitouch application framework")
10662 (description
10663 "A software library for rapid development of
10664 hardware-accelerated multitouch applications.")
10665 (license license:expat)))
10666
10667 (define-public python2-kivy
10668 (package-with-python2 python-kivy))
10669
10670 (define-public python-kivy-next
10671 (deprecated-package "python-kivy-next" python-kivy))
10672
10673 (define-public python2-kivy-next
10674 (deprecated-package "python2-kivy-next" python2-kivy))
10675
10676 (define-public python-binaryornot
10677 (package
10678 (name "python-binaryornot")
10679 (version "0.4.4")
10680 (source (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "binaryornot" version))
10683 (sha256
10684 (base32
10685 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10686 (build-system python-build-system)
10687 (propagated-inputs
10688 `(("python-chardet" ,python-chardet)
10689 ("python-hypothesis" ,python-hypothesis)))
10690 (home-page "https://github.com/audreyr/binaryornot")
10691 (synopsis "Package to check if a file is binary or text")
10692 (description "Ultra-lightweight pure Python package to check if a file is
10693 binary or text.")
10694 (license license:bsd-3)
10695 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10696
10697 (define-public python2-binaryornot
10698 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10699 (package (inherit base)
10700 (propagated-inputs
10701 `(("python2-enum34" ,python2-enum34)
10702 ,@(package-propagated-inputs base))))))
10703
10704 (define-public python-nltk
10705 (package
10706 (name "python-nltk")
10707 (version "3.2.1")
10708 (source (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "nltk" version))
10711 (sha256
10712 (base32
10713 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10714 (build-system python-build-system)
10715 (arguments
10716 '(;; The tests require some extra resources to be downloaded.
10717 ;; TODO Try packaging these resources.
10718 #:tests? #f))
10719 (home-page "http://nltk.org/")
10720 (synopsis "Natural Language Toolkit")
10721 (description "It provides interfaces to over 50 corpora and lexical
10722 resources such as WordNet, along with a suite of text processing libraries
10723 for classification, tokenization, stemming, tagging, parsing, and semantic
10724 reasoning, wrappers for natural language processing libraries.")
10725 (license license:asl2.0)))
10726
10727 (define-public python2-nltk
10728 (package-with-python2 python-nltk))
10729
10730 (define-public python-pymongo
10731 (package
10732 (name "python-pymongo")
10733 (version "3.7.2")
10734 (source (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "pymongo" version))
10737 (sha256
10738 (base32
10739 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10740 (build-system python-build-system)
10741 (propagated-inputs
10742 `(("python-certifi" ,python-certifi)))
10743 (home-page "https://github.com/mongodb/mongo-python-driver")
10744 (synopsis "Python driver for MongoDB")
10745 (description "Python driver for MongoDB.")
10746 (license license:asl2.0)))
10747
10748 (define-public python2-pymongo
10749 (package-with-python2 python-pymongo))
10750
10751 (define-public python-consul
10752 (package
10753 (name "python-consul")
10754 (version "0.6.1")
10755 (source
10756 (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "python-consul" version))
10759 (sha256
10760 (base32
10761 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10762 (build-system python-build-system)
10763 (arguments
10764 '(#:tests? #f)) ; The tests are not distributed
10765 (propagated-inputs
10766 `(("python-requests" ,python-requests)
10767 ("python-six" ,python-six)))
10768 (home-page "https://github.com/cablehead/python-consul")
10769 (synopsis "Python client for Consul")
10770 (description
10771 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10772 discovery, monitoring and configuration.")
10773 (license license:expat)))
10774
10775 (define-public python2-consul
10776 (package-with-python2 python-consul))
10777
10778 (define-public python-schematics
10779 (package
10780 (name "python-schematics")
10781 (version "1.1.1")
10782 (source
10783 (origin
10784 (method git-fetch)
10785 (uri (git-reference
10786 (url "https://github.com/schematics/schematics.git")
10787 (commit (string-append "v" version))))
10788 (file-name (git-file-name name version))
10789 (sha256
10790 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
10791 (build-system python-build-system)
10792 (propagated-inputs
10793 `(("python-six" ,python-six)))
10794 (arguments
10795 ;; The tests require a bunch of not very nice packages with fixed
10796 ;; version requirements (e.g. python-coveralls).
10797 `(#:tests? #f))
10798 (home-page "https://github.com/schematics/schematics")
10799 (synopsis "Python Data Structures for Humans")
10800 (description "Python Data Structures for Humans.")
10801 (license license:bsd-3)))
10802
10803 (define-public python2-schematics
10804 (package-with-python2 python-schematics))
10805
10806 (define-public python-odfpy
10807 (package
10808 (name "python-odfpy")
10809 (version "1.3.3")
10810 (source (origin
10811 (method url-fetch)
10812 (uri (pypi-uri "odfpy" version))
10813 (sha256
10814 (base32
10815 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10816 (arguments
10817 `(#:modules ((srfi srfi-1)
10818 (guix build python-build-system)
10819 (guix build utils))
10820 #:phases
10821 (modify-phases %standard-phases
10822 (replace 'check
10823 ;; The test runner invokes python2 and python3 for test*.py.
10824 ;; To avoid having both in inputs, we replicate it here.
10825 (lambda _
10826 (for-each (lambda (test-file) (invoke "python" test-file))
10827 (find-files "tests" "^test.*\\.py$"))
10828 #t)))))
10829 (build-system python-build-system)
10830 (home-page "https://github.com/eea/odfpy")
10831 (synopsis "Python API and tools to manipulate OpenDocument files")
10832 (description "Collection of libraries and utility programs written in
10833 Python to manipulate OpenDocument 1.2 files.")
10834 (license
10835 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10836 ;; number of files with other licenses.
10837 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10838
10839 (define-public python2-odfpy
10840 (package-with-python2 python-odfpy))
10841
10842 (define-public python-natsort
10843 (package
10844 (name "python-natsort")
10845 (version "5.4.1")
10846 (source (origin
10847 (method url-fetch)
10848 (uri (pypi-uri "natsort" version))
10849 (sha256
10850 (base32
10851 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10852 (build-system python-build-system)
10853 (arguments
10854 `(#:modules ((guix build utils)
10855 (guix build python-build-system)
10856 (srfi srfi-1)
10857 (srfi srfi-26)
10858 (ice-9 ftw))
10859 #:phases
10860 (modify-phases %standard-phases
10861 (add-before 'check 'set-cachedir
10862 ;; Tests require write access to $HOME by default
10863 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10864 (replace 'check
10865 (lambda _
10866 (let ((cwd (getcwd)))
10867 (setenv "PYTHONPATH"
10868 (string-append
10869 cwd "/build/"
10870 (find (cut string-prefix? "lib" <>)
10871 (scandir (string-append cwd "/build")))
10872 ":"
10873 (getenv "PYTHONPATH")))
10874 (invoke "pytest" "-v")))))))
10875 (native-inputs
10876 `(("python-hypothesis" ,python-hypothesis)
10877 ("python-pytest-cov" ,python-pytest-cov)
10878 ("python-pytest-mock" ,python-pytest-mock)
10879 ("python-pytest" ,python-pytest)))
10880 (propagated-inputs ; TODO: Add python-fastnumbers.
10881 `(("python-pyicu" ,python-pyicu)))
10882 (home-page "https://github.com/SethMMorton/natsort")
10883 (synopsis "Natural sorting for python and shell")
10884 (description
10885 "Natsort lets you apply natural sorting on lists instead of
10886 lexicographical. If you use the built-in @code{sorted} method in python
10887 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10888 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10889 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10890 identifies numbers and sorts them separately from strings. It can also sort
10891 version numbers, real numbers, mixed types and more, and comes with a shell
10892 command @command{natsort} that exposes this functionality in the command line.")
10893 (license license:expat)
10894 (properties `((python2-variant . ,(delay python2-natsort))))))
10895
10896 (define-public python2-natsort
10897 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10898 (package (inherit base)
10899 (native-inputs
10900 `(("python2-pathlib" ,python2-pathlib)
10901 ,@(package-native-inputs base))))))
10902
10903 (define-public python-glances
10904 (package
10905 (name "python-glances")
10906 (version "3.0.2")
10907 (source
10908 (origin
10909 (method url-fetch)
10910 (uri (pypi-uri "Glances" version))
10911 (sha256
10912 (base32
10913 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10914 (build-system python-build-system)
10915 (propagated-inputs
10916 `(("python-psutil" ,python-psutil)))
10917 (home-page
10918 "https://github.com/nicolargo/glances")
10919 (synopsis
10920 "A cross-platform curses-based monitoring tool")
10921 (description
10922 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10923 Glances uses the PsUtil library to get information from your system. It monitors
10924 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10925 (license license:lgpl3+)))
10926
10927 (define-public python2-glances
10928 (package-with-python2 python-glances))
10929
10930 (define-public python-graphql-core
10931 (package
10932 (name "python-graphql-core")
10933 (version "0.5.3")
10934 (source
10935 (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "graphql-core" version))
10938 (sha256
10939 (base32
10940 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10941 (build-system python-build-system)
10942 (arguments
10943 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10944 #:phases
10945 (modify-phases %standard-phases
10946 (add-after 'unpack 'patch-hardcoded-version
10947 (lambda _ (substitute*
10948 "setup.py"
10949 (("'gevent==1.1rc1'") "'gevent'"))
10950 #t)))))
10951 (native-inputs
10952 `(("python-gevent" ,python-gevent)
10953 ("python-mock" ,python-mock)
10954 ("python-pytest-mock" ,python-pytest-mock)))
10955 (propagated-inputs
10956 `(("python-promise" ,python-promise)
10957 ("python-six" ,python-six)))
10958 (home-page "https://github.com/graphql-python/graphql-core")
10959 (synopsis "GraphQL implementation for Python")
10960 (description
10961 "GraphQL implementation for Python. GraphQL is a data query language and
10962 runtime designed and used to request and deliver data to mobile and web apps.
10963 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10964 to Python.")
10965 (license license:expat)))
10966
10967 (define-public python2-graphql-core
10968 (package-with-python2 python-graphql-core))
10969
10970 (define-public python-graphql-relay
10971 (package
10972 (name "python-graphql-relay")
10973 (version "0.4.5")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "graphql-relay" version))
10978 (sha256
10979 (base32
10980 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10981 (build-system python-build-system)
10982 (arguments
10983 '(#:tests? #f)) ; The tests are not distributed
10984 (propagated-inputs
10985 `(("python-graphql-core" ,python-graphql-core)
10986 ("python-promise" ,python-promise)
10987 ("python-six" ,python-six)))
10988 (home-page "https://github.com/graphql-python/graphql-relay-py")
10989 (synopsis "Relay implementation for Python")
10990 (description
10991 "This is a library to allow the easy creation of Relay-compliant servers
10992 using the GraphQL Python reference implementation of a GraphQL server. It
10993 should be noted that the code is a exact port of the original
10994 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10995 from Facebook.")
10996 (license license:expat)))
10997
10998 (define-public python2-graphql-relay
10999 (package-with-python2 python-graphql-relay))
11000
11001 (define-public python-graphene
11002 (package
11003 (name "python-graphene")
11004 (version "0.10.2")
11005 (source
11006 (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "graphene" version))
11009 (sha256
11010 (base32
11011 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11012 (build-system python-build-system)
11013 (propagated-inputs
11014 `(("python-graphql-core" ,python-graphql-core)
11015 ("python-graphql-relay" ,python-graphql-relay)
11016 ("python-iso8601" ,python-iso8601)
11017 ("python-promise" ,python-promise)
11018 ("python-six" ,python-six)))
11019 (arguments
11020 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11021 (home-page "http://graphene-python.org/")
11022 (synopsis "GraphQL Framework for Python")
11023 (description
11024 "Graphene is a Python library for building GraphQL schemas/types.
11025 A GraphQL schema describes your data model, and provides a GraphQL server
11026 with an associated set of resolve methods that know how to fetch data.")
11027 (properties `((python2-variant . ,(delay python2-graphene))))
11028 (license license:expat)))
11029
11030 (define-public python2-graphene
11031 (let ((base (package-with-python2
11032 (strip-python2-variant python-graphene))))
11033 (package (inherit base)
11034 (native-inputs
11035 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11036 ,@(package-native-inputs base))))))
11037
11038 (define-public python-nautilus
11039 (package
11040 (name "python-nautilus")
11041 (version "0.4.9")
11042 (source
11043 (origin
11044 (method url-fetch)
11045 (uri (pypi-uri "nautilus" version))
11046 (sha256
11047 (base32
11048 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11049 (build-system python-build-system)
11050 (arguments `(#:tests? #f)) ; fails to import test modules
11051 (propagated-inputs
11052 `(("python-bcrypt" ,python-bcrypt)
11053 ("python-click" ,python-click)
11054 ("python-consul" ,python-consul)
11055 ("python-graphene" ,python-graphene)
11056 ("python-jinja2" ,python-jinja2)
11057 ("python-peewee" ,python-peewee)
11058 ("python-pika" ,python-pika)
11059 ("python-tornado" ,python-tornado)
11060 ("python-wtforms" ,python-wtforms)))
11061 (native-inputs
11062 `(("python-nose2" ,python-nose2)))
11063 (home-page "https://github.com/AlecAivazis/nautilus")
11064 (synopsis "Library for creating microservice applications")
11065 (description
11066 "Nautilus is a framework for flux based microservices that looks to
11067 provide extendible implementations of common aspects of a cloud so that you can
11068 focus on building massively scalable web applications.")
11069 (license license:expat)))
11070
11071 (define-public python-snowballstemmer
11072 (package
11073 (name "python-snowballstemmer")
11074 (version "1.2.1")
11075 (source (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "snowballstemmer" version))
11078 (sha256
11079 (base32
11080 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11081 (build-system python-build-system)
11082 (arguments
11083 `(;; No tests exist
11084 #:tests? #f))
11085 (home-page "https://github.com/shibukawa/snowball_py")
11086 (synopsis "Snowball stemming library collection for Python")
11087 (description "This package provides 16 word stemmer algorithms generated
11088 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11089 English stemmer.")
11090 (license license:bsd-3)))
11091
11092 (define-public python2-snowballstemmer
11093 (package-with-python2 python-snowballstemmer))
11094
11095 (define-public python-setproctitle
11096 (package
11097 (name "python-setproctitle")
11098 (version "1.1.10")
11099 (source
11100 (origin
11101 (method url-fetch)
11102 (uri (pypi-uri "setproctitle" version))
11103 (sha256
11104 (base32
11105 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11106 (build-system python-build-system)
11107 (arguments
11108 '(#:phases
11109 (modify-phases %standard-phases
11110 (add-before 'check 'patch-Makefile
11111 ;; Stricly this is only required for the python2 variant.
11112 ;; But adding a phase in an inherited package seems to be
11113 ;; cumbersum. So we patch even for python3.
11114 (lambda _
11115 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11116 (when nose
11117 (substitute* "Makefile"
11118 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11119 (string-append nose "/bin/nosetests "))))
11120 #t)))
11121 (replace 'check
11122 (lambda _
11123 (setenv "PYTHON" (or (which "python3") (which "python")))
11124 (setenv "PYCONFIG" (or (which "python3-config")
11125 (which "python-config")))
11126 (setenv "CC" "gcc")
11127 ;; No need to extend PYTHONPATH to find the built package, since
11128 ;; the Makefile will build anyway
11129 (invoke "make" "check"))))))
11130 (native-inputs
11131 `(("procps" ,procps))) ; required for tests
11132 (home-page
11133 "https://github.com/dvarrazzo/py-setproctitle")
11134 (synopsis
11135 "Setproctitle implementation for Python to customize the process title")
11136 (description "The library allows a process to change its title (as displayed
11137 by system tools such as ps and top).
11138
11139 Changing the title is mostly useful in multi-process systems, for
11140 example when a master process is forked: changing the children's title
11141 allows to identify the task each process is busy with. The technique
11142 is used by PostgreSQL and the OpenSSH Server for example.")
11143 (license license:bsd-3)
11144 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11145
11146 (define-public python2-setproctitle
11147 (let ((base (package-with-python2
11148 (strip-python2-variant python-setproctitle))))
11149 (package
11150 (inherit base)
11151 (native-inputs `(("python2-nose" ,python2-nose)
11152 ,@(package-native-inputs base))))))
11153
11154 (define-public python-validictory
11155 (package
11156 (name "python-validictory")
11157 (version "1.0.1")
11158 (source
11159 (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "validictory" version))
11162 (sha256
11163 (base32
11164 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11165 (build-system python-build-system)
11166 (arguments
11167 '(#:phases
11168 (modify-phases %standard-phases
11169 (add-after 'unpack 'bootstrap
11170 ;; Move the tests out of the package directory to avoid
11171 ;; packaging them.
11172 (lambda* _
11173 (rename-file "validictory/tests" "tests")
11174 (delete-file "tests/__init__.py")))
11175 (replace 'check
11176 (lambda _
11177 ;; Extend PYTHONPATH so the built package will be found.
11178 (setenv "PYTHONPATH"
11179 (string-append (getcwd) "/build/lib:"
11180 (getenv "PYTHONPATH")))
11181 (invoke "py.test" "-vv" ))))))
11182 (native-inputs
11183 `(("python-pytest" ,python-pytest)))
11184 (home-page
11185 "https://github.com/jamesturk/validictory")
11186 (synopsis "General purpose Python data validator")
11187 (description "It allows validation of arbitrary Python data structures.
11188
11189 The schema format is based on the JSON Schema
11190 proposal (http://json-schema.org), so combined with json the library is also
11191 useful as a validator for JSON data.")
11192 (license license:expat)))
11193
11194 (define-public python2-validictory
11195 (package-with-python2 python-validictory))
11196
11197 (define-public python-pyelftools
11198 (package
11199 (name "python-pyelftools")
11200 (version "0.25")
11201 (source
11202 (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "pyelftools" version))
11205 (sha256
11206 (base32
11207 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11208 (build-system python-build-system)
11209 (arguments
11210 `(#:phases
11211 (modify-phases %standard-phases
11212 (add-before 'check 'set-pythonpath
11213 (lambda _
11214 (setenv "PYTHONPATH"
11215 (string-append
11216 (getcwd) "/test/"
11217 ":" (getenv "PYTHONPATH")))
11218 #t)))))
11219 (home-page
11220 "https://github.com/eliben/pyelftools")
11221 (synopsis
11222 "Analyze binary and library file information")
11223 (description "This Python library provides interfaces for parsing and
11224 analyzing two binary and library file formats; the Executable and Linking
11225 Format (ELF), and debugging information in the Debugging With Attributed
11226 Record Format (DWARF).")
11227 (license license:public-domain)))
11228
11229 (define-public python-pyev
11230 (package
11231 (name "python-pyev")
11232 (version "0.9.0")
11233 (source
11234 (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "pyev" version))
11237 (sha256
11238 (base32
11239 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11240 (build-system python-build-system)
11241 (arguments
11242 `(#:tests? #f ; no test suite
11243 #:phases
11244 (modify-phases %standard-phases
11245 (add-after 'unpack 'patch
11246 (lambda* (#:key inputs #:allow-other-keys)
11247 (let ((libev (string-append (assoc-ref inputs "libev")
11248 "/lib/libev.so.4")))
11249 (substitute* "setup.py"
11250 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11251 (string-append "libev_dll_name = \"" libev "\"")))))))))
11252 (inputs
11253 `(("libev" ,libev)))
11254 (home-page "http://pythonhosted.org/pyev/")
11255 (synopsis "Python libev interface")
11256 (description "Pyev provides a Python interface to libev.")
11257 (license license:gpl3)))
11258
11259 (define-public python2-pyev
11260 (package-with-python2 python-pyev))
11261
11262 (define-public python-imagesize
11263 (package
11264 (name "python-imagesize")
11265 (version "1.1.0")
11266 (source
11267 (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "imagesize" version))
11270 (sha256
11271 (base32
11272 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11273 (build-system python-build-system)
11274 (home-page "https://github.com/shibukawa/imagesize_py")
11275 (synopsis "Gets image size of files in various formats in Python")
11276 (description
11277 "This package allows determination of image size from
11278 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11279 (license license:expat)))
11280
11281 (define-public python2-imagesize
11282 (package-with-python2 python-imagesize))
11283
11284 (define-public python-termstyle
11285 (package
11286 (name "python-termstyle")
11287 (version "0.1.11")
11288 (source
11289 (origin
11290 (method url-fetch)
11291 (uri (pypi-uri "termstyle" version))
11292 (sha256
11293 (base32
11294 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11295 (build-system python-build-system)
11296 (arguments
11297 '(#:phases
11298 (modify-phases %standard-phases
11299 (replace 'check
11300 (lambda _
11301 (invoke "python" "test3.py"))))))
11302 (home-page "https://github.com/gfxmonk/termstyle")
11303 (synopsis "Console text coloring for Python")
11304 (description "This package provides console text coloring for Python.")
11305 (license license:bsd-3)))
11306
11307 (define-public python-argcomplete
11308 (package
11309 (name "python-argcomplete")
11310 (version "1.7.0")
11311 (source
11312 (origin
11313 (method url-fetch)
11314 (uri (pypi-uri "argcomplete" version))
11315 (sha256
11316 (base32
11317 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11318 (build-system python-build-system)
11319 (native-inputs
11320 `(("python-pexpect" ,python-pexpect)
11321 ("tcsh" ,tcsh)
11322 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11323 (home-page "https://github.com/kislyuk/argcomplete")
11324 (synopsis "Shell tab completion for Python argparse")
11325 (description "argcomplete provides extensible command line tab completion
11326 of arguments and options for Python scripts using @code{argparse}. It's
11327 particularly useful for programs with many options or sub-parsers that can
11328 dynamically suggest completions; for example, when browsing resources over the
11329 network.")
11330 (license license:asl2.0)))
11331
11332 (define-public python2-argcomplete
11333 (package-with-python2 python-argcomplete))
11334
11335 (define-public python-xopen
11336 (package
11337 (name "python-xopen")
11338 (version "0.5.0")
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "xopen" version))
11343 (sha256
11344 (base32
11345 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11346 (build-system python-build-system)
11347 (propagated-inputs
11348 `(("python-setuptools-scm" ,python-setuptools-scm)))
11349 (home-page "https://github.com/marcelm/xopen/")
11350 (synopsis "Open compressed files transparently")
11351 (description "This module provides an @code{xopen} function that works like
11352 Python's built-in @code{open} function, but can also deal with compressed files.
11353 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11354 recognized by their file extensions. The focus is on being as efficient as
11355 possible on all supported Python versions.")
11356 (license license:expat)))
11357
11358 (define-public python2-xopen
11359 (let ((base (package-with-python2
11360 (strip-python2-variant python-xopen))))
11361 (package
11362 (inherit base)
11363 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11364 ,@(package-propagated-inputs base))))))
11365
11366 (define-public python-cheetah
11367 (package
11368 (name "python-cheetah")
11369 (version "3.1.0")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "Cheetah3" version))
11374 (sha256
11375 (base32
11376 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:modules ((guix build utils)
11380 (guix build python-build-system)
11381 (ice-9 ftw)
11382 (srfi srfi-1)
11383 (srfi srfi-26))
11384 #:phases (modify-phases %standard-phases
11385 (add-after 'unpack 'use-absolute-python
11386 (lambda _
11387 (substitute* "Cheetah/CheetahWrapper.py"
11388 (("#!/usr/bin/env python")
11389 (string-append "#!" (which "python"))))
11390 #t))
11391 (replace 'check
11392 (lambda _
11393 (let ((cwd (getcwd)))
11394 (setenv "PYTHONPATH"
11395 (string-append
11396 cwd "/build/"
11397 (find (cut string-prefix? "lib" <>)
11398 (scandir (string-append cwd "/build")))
11399 ":" (getenv "PYTHONPATH")))
11400 (setenv "PATH"
11401 (string-append (getenv "PATH")
11402 ":" cwd "/bin"))
11403 (setenv "TMPDIR" "/tmp")
11404
11405 (substitute* "Cheetah/Tests/Test.py"
11406 (("unittest.TextTestRunner\\(\\)")
11407 "unittest.TextTestRunner(verbosity=2)"))
11408
11409 (invoke "python" "Cheetah/Tests/Test.py")))))))
11410 (propagated-inputs
11411 `(("python-markdown" ,python-markdown))) ;optional
11412 (home-page "http://cheetahtemplate.org/")
11413 (synopsis "Template engine")
11414 (description "Cheetah is a text-based template engine and Python code
11415 generator.
11416
11417 Cheetah can be used as a standalone templating utility or referenced as
11418 a library from other Python applications. It has many potential uses,
11419 but web developers looking for a viable alternative to ASP, JSP, PHP and
11420 PSP are expected to be its principle user group.
11421
11422 Features:
11423 @enumerate
11424 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11425 text-based format.
11426 @item Cleanly separates content, graphic design, and program code.
11427 @item Blends the power and flexibility of Python with a simple template language
11428 that non-programmers can understand.
11429 @item Gives template writers full access to any Python data structure, module,
11430 function, object, or method in their templates.
11431 @item Makes code reuse easy by providing an object-orientated interface to
11432 templates that is accessible from Python code or other Cheetah templates.
11433 One template can subclass another and selectively reimplement sections of it.
11434 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11435 improve the performance of a dynamic website.
11436 @item Compiles templates into optimized, yet readable, Python code.
11437 @end enumerate")
11438 (license (license:x11-style "file://LICENSE"))))
11439
11440 (define-public python2-cheetah
11441 (package-with-python2 python-cheetah))
11442
11443 (define-public python-dulwich
11444 (package
11445 (name "python-dulwich")
11446 (version "0.18.6")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (list (string-append "https://www.dulwich.io/releases/"
11451 "dulwich-" version ".tar.gz")
11452 (pypi-uri "dulwich" version)))
11453 (sha256
11454 (base32
11455 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11456 (build-system python-build-system)
11457 (arguments
11458 `(#:phases
11459 (modify-phases %standard-phases
11460 (add-before 'check 'fix-tests
11461 (lambda* (#:key inputs #:allow-other-keys)
11462 ;; The tests use Popen with a custom environment which doesn't
11463 ;; include PATH.
11464 (substitute* "dulwich/tests/compat/utils.py"
11465 (("'git'") (string-append "'"
11466 (which "git")
11467 "'")))
11468 (substitute* '("dulwich/tests/test_repository.py"
11469 "dulwich/tests/test_hooks.py")
11470 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11471 (setenv "TEST_RUNNER" "unittest")
11472 (setenv "PYTHONHASHSEED" "random")
11473 #t)))))
11474 (propagated-inputs
11475 `(("python-fastimport" ,python-fastimport)))
11476 (native-inputs
11477 `(("python-mock" ,python-mock)
11478 ("python-geventhttpclient" ,python-geventhttpclient)
11479 ("git" ,git)))
11480 (home-page "https://www.dulwich.io/")
11481 (synopsis "Git implementation in Python")
11482 (description "Dulwich is an implementation of the Git file formats and
11483 protocols written in pure Python.")
11484 ;; Can be used with either license.
11485 (license (list license:asl2.0 license:gpl2+))))
11486
11487 (define-public python2-dulwich
11488 (package-with-python2 python-dulwich))
11489
11490 (define-public python-pbkdf2
11491 (package
11492 (name "python-pbkdf2")
11493 (version "1.3")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "pbkdf2" version))
11498 (sha256
11499 (base32
11500 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11501 (build-system python-build-system)
11502 (arguments
11503 '(#:phases
11504 (modify-phases %standard-phases
11505 (replace 'check
11506 (lambda _
11507 (setenv "PYTHONPATH"
11508 (string-append (getcwd) "/build/lib:"
11509 (getenv "PYTHONPATH")))
11510 (invoke "python" "test/test_pbkdf2.py"))))))
11511 (propagated-inputs
11512 `(("python-pycrypto" ,python-pycrypto))) ; optional
11513 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11514 (synopsis "Password-based key derivation")
11515 (description "This module implements the password-based key derivation
11516 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11517
11518 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11519 is part of the RSA Public Key Cryptography Standards series. The provided
11520 implementation takes a password or a passphrase and a salt value (and
11521 optionally a iteration count, a digest module, and a MAC module) and provides
11522 a file-like object from which an arbitrarly-sized key can be read.")
11523 (license license:expat)))
11524
11525 (define-public python2-pbkdf2
11526 (package-with-python2 python-pbkdf2))
11527
11528 (define-public python-qrcode
11529 (package
11530 (name "python-qrcode")
11531 (version "6.1")
11532 (source
11533 (origin
11534 (method url-fetch)
11535 (uri (pypi-uri "qrcode" version))
11536 (sha256
11537 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11538 (build-system python-build-system)
11539 (arguments
11540 ;; FIXME: Tests require packaging 'pymaging'.
11541 '(#:tests? #f))
11542 (propagated-inputs
11543 `(("python-lxml" ,python-lxml) ; for SVG output
11544 ("python-pillow" ,python-pillow) ; for PNG output
11545 ("python-six" ,python-six)))
11546 (home-page "https://github.com/lincolnloop/python-qrcode")
11547 (synopsis "QR Code image generator")
11548 (description "This package provides a pure Python QR Code generator
11549 module. It uses the Python Imaging Library (PIL) to allow for the generation
11550 of QR Codes.
11551
11552 In addition this package provides a command line tool to generate QR codes and
11553 either write these QR codes to a file or do the output as ascii art at the
11554 console.")
11555 (license license:bsd-3)))
11556
11557 (define-public python2-qrcode
11558 (package-with-python2 python-qrcode))
11559
11560 (define-public python-rst2ansi
11561 (package
11562 (name "python-rst2ansi")
11563 (version "0.1.5")
11564 (source
11565 (origin
11566 (method url-fetch)
11567 (uri (pypi-uri "rst2ansi" version))
11568 (sha256
11569 (base32
11570 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11571 (build-system python-build-system)
11572 (propagated-inputs
11573 `(("python-docutils" ,python-docutils)))
11574 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11575 (synopsis "Convert RST to ANSI-decorated console output")
11576 (description
11577 "Python module dedicated to rendering RST (reStructuredText) documents
11578 to ansi-escaped strings suitable for display in a terminal.")
11579 (license license:expat)))
11580
11581 (define-public python-ansi2html
11582 (package
11583 (name "python-ansi2html")
11584 (version "1.2.0")
11585 (source
11586 (origin
11587 (method url-fetch)
11588 (uri (pypi-uri "ansi2html" version))
11589 (sha256
11590 (base32
11591 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11592 (build-system python-build-system)
11593 (native-inputs
11594 `(("python-mock" ,python-mock)
11595 ("python-nose" ,python-nose)))
11596 (propagated-inputs
11597 `(("python-six" ,python-six)))
11598 (home-page "https://github.com/ralphbean/ansi2html")
11599 (synopsis "Convert ANSI-decorated console output to HTML")
11600 (description
11601 "@command{ansi2html} is a Python library and command line utility for
11602 convering text with ANSI color codes to HTML or LaTeX.")
11603 (license license:gpl3+)))
11604
11605 (define-public python2-ansi2html
11606 (package-with-python2 python-ansi2html))
11607
11608 (define-public python-ddt
11609 (package
11610 (name "python-ddt")
11611 (version "1.1.3")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (pypi-uri "ddt" version))
11616 (sha256
11617 (base32
11618 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11619 (build-system python-build-system)
11620 (native-inputs
11621 `(("python-mock" ,python-mock)
11622 ("python-nose" ,python-nose)))
11623 (propagated-inputs
11624 `(("python-six" ,python-six)
11625 ("python-pyyaml" ,python-pyyaml)))
11626 (home-page "https://github.com/txels/ddt")
11627 (synopsis "Data-Driven Tests")
11628 (description
11629 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11630 running it with different test data, and make it appear as multiple test
11631 cases.")
11632 (license license:expat)))
11633
11634 (define-public python2-ddt
11635 (package-with-python2 python-ddt))
11636
11637 (define-public python-pycountry
11638 (package
11639 (name "python-pycountry")
11640 (version "18.5.26")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "pycountry" version))
11645 (sha256
11646 (base32
11647 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11648 (build-system python-build-system)
11649 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11650 (synopsis "ISO databases for languages, countries, currencies, etc.")
11651 (description
11652 "@code{pycountry} provides the ISO databases for the standards:
11653 @enumerate
11654 @item 639-3 (Languages)
11655 @item 3166 (Countries)
11656 @item 3166-3 (Deleted Countries)
11657 @item 3166-2 (Subdivisions of countries)
11658 @item 4217 (Currencies)
11659 @item 15924 (Scripts)
11660 @end enumerate
11661 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11662 through a Python API.")
11663 (license license:lgpl2.1+)))
11664
11665 (define-public python2-pycountry
11666 (package-with-python2 python-pycountry))
11667
11668 (define-public python-pycosat
11669 (package
11670 (name "python-pycosat")
11671 (version "0.6.1")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "pycosat" version))
11676 (sha256
11677 (base32
11678 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11679 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11680 (build-system python-build-system)
11681 (home-page "https://github.com/ContinuumIO/pycosat")
11682 (synopsis "Bindings to picosat (a SAT solver)")
11683 (description
11684 "This package provides efficient Python bindings to @code{picosat} on
11685 the C level. When importing pycosat, the @code{picosat} solver becomes part
11686 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11687 Problem} (SAT) solver.")
11688 (license license:expat)))
11689
11690 (define-public python2-pycosat
11691 (package-with-python2 python-pycosat))
11692
11693 (define-public python2-ruamel.ordereddict
11694 (package
11695 (name "python2-ruamel.ordereddict")
11696 (version "0.4.9")
11697 (source
11698 (origin
11699 (method url-fetch)
11700 (uri (pypi-uri "ruamel.ordereddict" version))
11701 (sha256
11702 (base32
11703 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11704 (build-system python-build-system)
11705 (arguments
11706 `(#:python ,python-2
11707 #:phases
11708 (modify-phases %standard-phases
11709 (delete 'check)
11710 (add-after 'install 'check
11711 (lambda* (#:key inputs outputs #:allow-other-keys)
11712 (add-installed-pythonpath inputs outputs)
11713 (invoke "python" "test/testordereddict.py"))))))
11714 (home-page "https://bitbucket.org/ruamel/ordereddict")
11715 (synopsis "Version of dict that keeps keys in insertion order")
11716 (description
11717 "This is an implementation of an ordered dictionary with @dfn{Key
11718 Insertion Order} (KIO: updates of values do not affect the position of the
11719 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11720 removed and put at the back). The standard library module @code{OrderedDict},
11721 implemented later, implements a subset of @code{ordereddict} functionality.
11722 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11723 Order} (KSO, no sorting function can be specified, but a transform can be
11724 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11725 (license license:expat)))
11726
11727 (define-public python-pypeg2
11728 (package
11729 (name "python-pypeg2")
11730 (version "2.15.2")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "pyPEG2" version))
11735 (sha256
11736 (base32
11737 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11738 (build-system python-build-system)
11739 (propagated-inputs `(("python-lxml" ,python-lxml)))
11740 (arguments
11741 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11742 '(#:tests? #f))
11743 (home-page "https://fdik.org/pyPEG/")
11744 (synopsis "Parsering Expression Grammars in Python")
11745 (description "PyPEG is an intrinsic parser interpreter framework for
11746 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11747 parse many formal languages.")
11748 (license license:gpl2)))
11749
11750 (define-public python-incremental
11751 (package
11752 (name "python-incremental")
11753 (version "17.5.0")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "incremental" version))
11758 (sha256
11759 (base32
11760 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11761 (build-system python-build-system)
11762 (home-page "https://github.com/hawkowl/incremental")
11763 (synopsis "Library for versioning Python projects")
11764 (description "Incremental is a small library that versions your Python
11765 projects.")
11766 (license license:expat)))
11767
11768 (define-public python2-incremental
11769 (package-with-python2 python-incremental))
11770
11771 (define-public python-invoke
11772 (package
11773 (name "python-invoke")
11774 (home-page "http://www.pyinvoke.org/")
11775 (version "1.1.0")
11776 (source (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "invoke" version))
11779 (sha256
11780 (base32
11781 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11782 (build-system python-build-system)
11783 (arguments
11784 ;; XXX: Requires many dependencies that are not yet in Guix.
11785 `(#:tests? #f))
11786 (synopsis "Pythonic task execution")
11787 (description
11788 "Invoke is a Python task execution tool and library, drawing inspiration
11789 from various sources to arrive at a powerful and clean feature set. It is
11790 evolved from the Fabric project, but focuses on local and abstract concerns
11791 instead of servers and network commands.")
11792 (license license:bsd-3)))
11793
11794 (define-public python2-invoke
11795 (package-with-python2 python-invoke))
11796
11797 (define-public python-automat
11798 (package
11799 (name "python-automat")
11800 (version "0.7.0")
11801 (source (origin
11802 (method url-fetch)
11803 (uri (pypi-uri "Automat" version))
11804 (sha256
11805 (base32
11806 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
11807 (build-system python-build-system)
11808 ;; We disable the tests because they require python-twisted, while
11809 ;; python-twisted depends on python-automat. Twisted is optional, but the
11810 ;; tests fail if it is not available. Also see
11811 ;; <https://github.com/glyph/automat/issues/71>.
11812 (arguments '(#:tests? #f))
11813 (native-inputs
11814 `(("python-m2r" ,python-m2r)
11815 ("python-setuptools-scm" ,python-setuptools-scm)
11816 ("python-graphviz" ,python-graphviz)))
11817 (propagated-inputs
11818 `(("python-six" ,python-six)
11819 ("python-attrs" ,python-attrs)))
11820 (home-page "https://github.com/glyph/Automat")
11821 (synopsis "Self-service finite-state machines")
11822 (description "Automat is a library for concise, idiomatic Python
11823 expression of finite-state automata (particularly deterministic finite-state
11824 transducers).")
11825 (license license:expat)))
11826
11827 (define-public python2-automat
11828 (package-with-python2 python-automat))
11829
11830 (define-public python-m2r
11831 (package
11832 (name "python-m2r")
11833 (version "0.2.1")
11834 (source (origin
11835 (method url-fetch)
11836 (uri (pypi-uri "m2r" version))
11837 (sha256
11838 (base32
11839 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
11840 (build-system python-build-system)
11841 (propagated-inputs
11842 `(("python-docutils" ,python-docutils)
11843 ("python-mistune" ,python-mistune)))
11844 (native-inputs
11845 `(("python-pygments" ,python-pygments)
11846 ("python-mock" ,python-mock)))
11847 (home-page "https://github.com/miyakogi/m2r")
11848 (synopsis "Markdown to reStructuredText converter")
11849 (description "M2R converts a markdown file including reST markups to valid
11850 reST format.")
11851 (license license:expat)))
11852
11853 (define-public python2-m2r
11854 (package-with-python2 python-m2r))
11855
11856 (define-public python-constantly
11857 (package
11858 (name "python-constantly")
11859 (version "15.1.0")
11860 (source (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "constantly" version))
11863 (sha256
11864 (base32
11865 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11866 (build-system python-build-system)
11867 (home-page "https://github.com/twisted/constantly")
11868 (synopsis "Symbolic constants in Python")
11869 (description "Constantly is a Python library that provides symbolic
11870 constant support. It includes collections and constants with text, numeric,
11871 and bit flag values.")
11872 (license license:expat)))
11873
11874 (define-public python2-constantly
11875 (package-with-python2 python-constantly))
11876
11877 (define-public python-attrs
11878 (package
11879 (name "python-attrs")
11880 (version "19.1.0")
11881 (source (origin
11882 (method url-fetch)
11883 (uri (pypi-uri "attrs" version))
11884 (sha256
11885 (base32
11886 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
11887 (build-system python-build-system)
11888 (arguments
11889 `(#:modules ((guix build utils)
11890 (guix build python-build-system)
11891 (ice-9 ftw)
11892 (srfi srfi-1)
11893 (srfi srfi-26))
11894 #:phases (modify-phases %standard-phases
11895 (replace 'check
11896 (lambda _
11897 (let ((cwd (getcwd)))
11898 (setenv "PYTHONPATH"
11899 (string-append
11900 cwd "/build/"
11901 (find (cut string-prefix? "lib" <>)
11902 (scandir (string-append cwd "/build")))
11903 ":"
11904 (getenv "PYTHONPATH")))
11905 (invoke "python" "-m" "pytest")))))))
11906 (native-inputs
11907 `(("python-coverage" ,python-coverage)
11908 ("python-hypothesis" ,python-hypothesis)
11909 ("python-pympler" ,python-pympler)
11910 ("python-pytest" ,python-pytest)
11911 ("python-six" ,python-six)
11912 ("python-sphinx" ,python-sphinx)
11913 ("python-zope-interface" ,python-zope-interface)))
11914 (home-page "https://github.com/python-attrs/attrs/")
11915 (synopsis "Attributes without boilerplate")
11916 (description "@code{attrs} is a Python package with class decorators that
11917 ease the chores of implementing the most common attribute-related object
11918 protocols.")
11919 (license license:expat)))
11920
11921 (define-public python2-attrs
11922 (package-with-python2 python-attrs))
11923
11924 (define-public python-attrs-bootstrap
11925 (package
11926 (inherit python-attrs)
11927 (name "python-attrs-bootstrap")
11928 (native-inputs `())
11929 (arguments `(#:tests? #f))))
11930
11931 (define-public python2-attrs-bootstrap
11932 (package-with-python2 python-attrs-bootstrap))
11933
11934 (define-public python2-cliapp
11935 (package
11936 (name "python2-cliapp")
11937 (version "1.20180812.1")
11938 (source
11939 (origin
11940 (method url-fetch)
11941 (uri (string-append
11942 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11943 version ".tar.gz"))
11944 (sha256
11945 (base32
11946 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:python ,python-2
11950 #:phases
11951 (modify-phases %standard-phases
11952 ;; check phase needs to be run before the build phase. If not,
11953 ;; coverage-test-runner looks for tests for the built source files,
11954 ;; and fails.
11955 (delete 'check)
11956 (add-before 'build 'check
11957 (lambda _
11958 ;; Disable python3 tests
11959 (substitute* "check"
11960 (("python3") "# python3"))
11961 (invoke "./check"))))))
11962 (native-inputs
11963 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11964 ("python2-pep8" ,python2-pep8)))
11965 (propagated-inputs
11966 `(("python2-pyaml" ,python2-pyaml)))
11967 (home-page "https://liw.fi/cliapp/")
11968 (synopsis "Python framework for command line programs")
11969 (description "@code{python2-cliapp} is a python framework for
11970 command line programs. It contains the typical stuff such programs
11971 need to do, such as parsing the command line for options, and
11972 iterating over input files.")
11973 (license license:gpl2+)))
11974
11975 (define-public python2-ttystatus
11976 (package
11977 (name "python2-ttystatus")
11978 (version "0.36")
11979 (source
11980 (origin
11981 (method url-fetch)
11982 (uri (string-append
11983 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11984 version ".tar.gz"))
11985 (sha256
11986 (base32
11987 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
11988 (build-system python-build-system)
11989 (native-inputs
11990 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11991 ("python2-pep8" ,python2-pep8)))
11992 (arguments
11993 `(#:python ,python-2
11994 #:phases
11995 (modify-phases %standard-phases
11996 ;; check phase needs to be run before the build phase. If not,
11997 ;; coverage-test-runner looks for tests for the built source files,
11998 ;; and fails.
11999 (delete 'check)
12000 (add-before 'build 'check
12001 (lambda _ (invoke "make" "check"))))))
12002 (home-page "https://liw.fi/ttystatus/")
12003 (synopsis "Python library for showing progress reporting and
12004 status updates on terminals")
12005 (description "@code{python2-ttystatus} is a python library for
12006 showing progress reporting and status updates on terminals, for
12007 command line programs. Output is automatically adapted to the width
12008 of the terminal: truncated if it does not fit, and resized if the
12009 terminal size changes.")
12010 (license license:gpl3+)))
12011
12012 (define-public python2-tracing
12013 (package
12014 (name "python2-tracing")
12015 (version "0.10")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (string-append
12020 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12021 version ".tar.gz"))
12022 (sha256
12023 (base32
12024 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12025 (build-system python-build-system)
12026 (arguments
12027 `(#:python ,python-2))
12028 (home-page "https://liw.fi/tracing/")
12029 (synopsis "Python debug logging helper")
12030 (description "@code{python2-tracing} is a python library for
12031 logging debug messages. It provides a way to turn debugging messages
12032 on and off, based on the filename they occur in. It is much faster
12033 than using @code{logging.Filter} to accomplish the same thing, which
12034 matters when code is run in production mode. The actual logging still
12035 happens using the @code{logging} library.")
12036 (license license:gpl3+)))
12037
12038 (define-public python2-larch
12039 (package
12040 (name "python2-larch")
12041 (version "1.20151025")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (string-append
12046 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12047 version ".tar.gz"))
12048 (patches (search-patches
12049 "python2-larch-coverage-4.0a6-compatibility.patch"))
12050 (sha256
12051 (base32
12052 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12053 (build-system python-build-system)
12054 (arguments
12055 `(#:python ,python-2
12056 #:phases
12057 (modify-phases %standard-phases
12058 ;; check phase needs to be run before the build phase. If not,
12059 ;; coverage-test-runner looks for tests for the built source files,
12060 ;; and fails.
12061 (delete 'check)
12062 (add-before 'build 'check
12063 (lambda _ (invoke "make" "check"))))))
12064 (native-inputs
12065 `(("cmdtest" ,cmdtest)
12066 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12067 (propagated-inputs
12068 `(("python2-tracing" ,python2-tracing)))
12069 (home-page "https://liw.fi/larch/")
12070 (synopsis "Python copy-on-write B-tree library")
12071 (description "@code{python2-larch} is an implementation of
12072 particular kind of B-tree, based on research by Ohad Rodeh. See
12073 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12074 on the data structure.
12075
12076 The distinctive feature of this B-tree is that a node is never
12077 (conceptually) modified. Instead, all updates are done by
12078 copy-on-write. This makes it easy to clone a tree, and modify only the
12079 clone, while other processes access the original tree.")
12080 (license license:gpl3+)))
12081
12082 (define-public python-astroid
12083 (package
12084 (name "python-astroid")
12085 (version "2.1.0")
12086 (source
12087 (origin
12088 (method url-fetch)
12089 (uri (pypi-uri "astroid" version))
12090 (sha256
12091 (base32
12092 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12093 (build-system python-build-system)
12094 (propagated-inputs
12095 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12096 ("python-six" ,python-six)
12097 ("python-wrapt" ,python-wrapt)))
12098 (native-inputs
12099 `(("python-dateutil" ,python-dateutil)
12100 ("python-nose" ,python-nose)
12101 ("python-pytest" ,python-pytest)
12102 ("python-pytest-runner" ,python-pytest-runner)))
12103 (arguments
12104 `(#:phases
12105 (modify-phases %standard-phases
12106 (add-after 'unpack 'remove-spurious-test
12107 (lambda _
12108 ;; This can be removed after upgrading from python-3.7
12109 ;; https://github.com/PyCQA/astroid/issues/593
12110 ;; https://bugs.python.org/issue34056
12111 (delete-file "astroid/tests/unittest_modutils.py")
12112 #t))
12113 (replace 'check
12114 (lambda _
12115 (invoke "pytest" "astroid"))))))
12116 (home-page "https://github.com/PyCQA/astroid")
12117 (synopsis "Common base representation of python source code for pylint and
12118 other projects")
12119 (description "@code{python-astroid} provides a common base representation
12120 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12121
12122 It provides a compatible representation which comes from the _ast module. It
12123 rebuilds the tree generated by the builtin _ast module by recursively walking
12124 down the AST and building an extended ast. The new node classes have
12125 additional methods and attributes for different usages. They include some
12126 support for static inference and local name scopes. Furthermore, astroid
12127 builds partial trees by inspecting living objects.")
12128 (license license:lgpl2.1+)
12129 (properties `((python2-variant . ,(delay python2-astroid))))))
12130
12131 (define-public python2-astroid
12132 (let ((base (package-with-python2
12133 (strip-python2-variant python-astroid))))
12134 (package (inherit base)
12135 ;; Version 2.x removes python2 support.
12136 (version "1.6.5")
12137 (source
12138 (origin
12139 (method url-fetch)
12140 (uri (pypi-uri "astroid" version))
12141 (sha256
12142 (base32
12143 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12144 (arguments
12145 (substitute-keyword-arguments (package-arguments base)
12146 ((#:phases phases)
12147 `(modify-phases ,phases
12148 (add-after 'unpack 'remove-spurious-test
12149 (lambda _
12150 ;; https://github.com/PyCQA/astroid/issues/276
12151 (delete-file "astroid/tests/unittest_brain.py")
12152 #t))
12153 (replace 'check
12154 (lambda _
12155 (invoke"python" "-m" "unittest" "discover"
12156 "-p" "unittest*.py")))))))
12157 (native-inputs `())
12158 (propagated-inputs
12159 `(("python2-backports-functools-lru-cache"
12160 ,python2-backports-functools-lru-cache)
12161 ("python2-enum34" ,python2-enum34)
12162 ("python2-singledispatch" ,python2-singledispatch)
12163 ,@(package-propagated-inputs base))))))
12164
12165 (define-public python-isort
12166 (package
12167 (name "python-isort")
12168 (version "4.3.4")
12169 (source
12170 (origin
12171 (method git-fetch)
12172 (uri (git-reference
12173 ;; Tests pass only from the Github sources
12174 (url "https://github.com/timothycrosley/isort")
12175 (commit version)))
12176 (file-name (git-file-name name version))
12177 (sha256
12178 (base32
12179 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12180 (build-system python-build-system)
12181 (native-inputs
12182 `(("python-mock" ,python-mock)
12183 ("python-pytest" ,python-pytest)))
12184 (home-page "https://github.com/timothycrosley/isort")
12185 (synopsis "Python utility/library to sort python imports")
12186 (description "@code{python-isort} is a python utility/library to sort
12187 imports alphabetically, and automatically separated into sections. It
12188 provides a command line utility, a python library and plugins for various
12189 editors.")
12190 (license license:expat)
12191 (properties `((python2-variant . ,(delay python2-isort))))))
12192
12193 (define-public python2-isort
12194 (let ((base (package-with-python2
12195 (strip-python2-variant python-isort))))
12196 (package (inherit base)
12197 (native-inputs
12198 `(("python2-futures" ,python2-futures)
12199 ,@(package-native-inputs base))))))
12200
12201 (define-public python2-backports-functools-lru-cache
12202 (package
12203 (name "python2-backports-functools-lru-cache")
12204 (version "1.5")
12205 (source
12206 (origin
12207 (method url-fetch)
12208 ;; only the pypi tarballs contain the necessary metadata
12209 (uri (pypi-uri "backports.functools_lru_cache" version))
12210 (sha256
12211 (base32
12212 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12213 (build-system python-build-system)
12214 (native-inputs
12215 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12216 (arguments
12217 `(#:python ,python-2))
12218 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12219 (synopsis "Backport of functools.lru_cache from Python 3.3")
12220 (description "@code{python2-backports-functools-lru-cache} is a backport
12221 of @code{functools.lru_cache} from python 3.3.")
12222 (license license:expat)))
12223
12224 (define-public python-configparser
12225 (package
12226 (name "python-configparser")
12227 (version "3.7.1")
12228 (source
12229 (origin
12230 (method url-fetch)
12231 (uri (pypi-uri "configparser" version))
12232 (sha256
12233 (base32
12234 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12235 (build-system python-build-system)
12236 (home-page "https://github.com/jaraco/configparser/")
12237 (synopsis "Backport of configparser from python 3.5")
12238 (description "@code{python-configparser} is a backport of
12239 @code{configparser} from Python 3.5 so that it can be used directly
12240 in other versions.")
12241 (license license:expat)))
12242
12243 (define-public python2-configparser
12244 (package-with-python2 python-configparser))
12245
12246 (define-public python-mando
12247 (package
12248 (name "python-mando")
12249 (version "0.6.4")
12250 (source (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "mando" version))
12253 (sha256
12254 (base32
12255 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12256 (build-system python-build-system)
12257 (propagated-inputs
12258 `(("python-rst2ansi" ,python-rst2ansi)
12259 ("python-six" ,python-six)))
12260 (native-inputs
12261 `(("python-pytest" ,python-pytest)))
12262 (home-page "https://mando.readthedocs.org/")
12263 (synopsis
12264 "Wrapper around argparse, allowing creation of complete CLI applications")
12265 (description
12266 "This package is a wrapper around argparse, allowing you to write complete CLI
12267 applications in seconds while maintaining all the flexibility.")
12268 (license license:expat)))
12269
12270 (define-public python2-mando
12271 (package-with-python2 python-mando))
12272
12273 (define-public python2-argparse
12274 (package
12275 (name "python2-argparse")
12276 (version "1.4.0")
12277 (source
12278 (origin
12279 (method url-fetch)
12280 (uri (pypi-uri "argparse" version))
12281 (sha256
12282 (base32
12283 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12284 (build-system python-build-system)
12285 (arguments
12286 `(#:python ,python-2))
12287 (home-page "https://github.com/ThomasWaldmann/argparse/")
12288 (synopsis "Python command-line parsing library")
12289 (description
12290 "This package is mostly for people who want to have @code{argparse} on
12291 older Pythons because it was not part of the standard library back then.")
12292 (license license:psfl)))
12293
12294 (define-public python-fudge
12295 (package
12296 (name "python-fudge")
12297 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12298 ;; package, which is currently the only use of this package.
12299 (version "0.9.6")
12300 (source
12301 (origin
12302 (method url-fetch)
12303 (uri (pypi-uri "fudge" version))
12304 (sha256
12305 (base32
12306 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12307 (build-system python-build-system)
12308 (arguments
12309 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12310 (home-page "https://github.com/fudge-py/fudge")
12311 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12312 (description
12313 "Fudge is a Python module for using fake objects (mocks and stubs) to
12314 test real ones.
12315
12316 In readable Python code, you declare the methods available on your fake object
12317 and how they should be called. Then you inject that into your application and
12318 start testing. This declarative approach means you don’t have to record and
12319 playback actions and you don’t have to inspect your fakes after running code.
12320 If the fake object was used incorrectly then you’ll see an informative
12321 exception message with a traceback that points to the culprit.")
12322 (license license:expat)))
12323
12324 (define-public python2-fudge
12325 (package-with-python2 python-fudge))
12326
12327 (define-public python-mwclient
12328 (package
12329 (name "python-mwclient")
12330 (version "0.8.4")
12331 (source
12332 (origin
12333 (method url-fetch)
12334 ;; The PyPI version wouldn't contain tests.
12335 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12336 "v" version ".tar.gz"))
12337 (file-name (string-append name "-" version ".tar.gz"))
12338 (sha256
12339 (base32
12340 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12341 (build-system python-build-system)
12342 (propagated-inputs
12343 `(("python-requests" ,python-requests)
12344 ("python-requests-oauthlib"
12345 ,python-requests-oauthlib)
12346 ("python-six" ,python-six)))
12347 (native-inputs
12348 `(("python-mock" ,python-mock)
12349 ("python-pytest" ,python-pytest)
12350 ("python-pytest-pep8" ,python-pytest-pep8)
12351 ("python-pytest-cache" ,python-pytest-cache)
12352 ("python-pytest-cov" ,python-pytest-cov)
12353 ("python-responses" ,python-responses)))
12354 (home-page "https://github.com/btongminh/mwclient")
12355 (synopsis "MediaWiki API client")
12356 (description "This package provides a MediaWiki API client.")
12357 (license license:expat)))
12358
12359 (define-public python2-mwclient
12360 (package-with-python2 python-mwclient))
12361
12362 (define-public python-utils
12363 (package
12364 (name "python-utils")
12365 (version "2.1.0")
12366 (source (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "python-utils" version))
12369 (sha256
12370 (base32
12371 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12372 (build-system python-build-system)
12373 (native-inputs
12374 `(("pytest-runner" ,python-pytest-runner)
12375 ("pytest" ,python-pytest)
12376 ("six" ,python-six)))
12377 (home-page "https://github.com/WoLpH/python-utils")
12378 (synopsis "Convenient utilities not included with the standard Python install")
12379 (description
12380 "Python Utils is a collection of small Python functions and classes which
12381 make common patterns shorter and easier.")
12382 (license license:bsd-2)))
12383
12384 (define-public python2-utils
12385 (package-with-python2 python-utils))
12386
12387 (define-public python-diff-match-patch
12388 (package
12389 (name "python-diff-match-patch")
12390 (version "20121119")
12391 (source
12392 (origin
12393 (method url-fetch)
12394 (uri (pypi-uri "diff-match-patch" version))
12395 (sha256
12396 (base32
12397 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12398 (build-system python-build-system)
12399 (home-page "https://code.google.com/p/google-diff-match-patch")
12400 (synopsis "Synchronize plain text")
12401 (description "Diff Match and Patch libraries offer robust algorithms to
12402 perform the operations required for synchronizing plain text.")
12403 (license license:asl2.0)))
12404
12405 (define-public python2-diff-match-patch
12406 (package-with-python2 python-diff-match-patch))
12407
12408 (define-public python-dirsync
12409 (package
12410 (name "python-dirsync")
12411 (version "2.2.3")
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "dirsync" version))
12416 (sha256
12417 (base32
12418 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12419 (build-system python-build-system)
12420 (propagated-inputs
12421 `(("six" ,python-six)))
12422 (home-page "https://bitbucket.org/tkhyn/dirsync")
12423 (synopsis "Advanced directory tree synchronisation tool")
12424 (description "Advanced directory tree synchronisation tool.")
12425 (license license:expat)))
12426
12427 (define-public python2-dirsync
12428 (package-with-python2 python-dirsync))
12429
12430 (define-public python-levenshtein
12431 (package
12432 (name "python-levenshtein")
12433 (version "0.12.0")
12434 (source
12435 (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "python-Levenshtein" version))
12438 (sha256
12439 (base32
12440 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12441 (build-system python-build-system)
12442 (home-page "https://github.com/ztane/python-Levenshtein")
12443 (synopsis "Fast computation of Levenshtein distance and string similarity")
12444 (description
12445 "The Levenshtein Python C extension module contains functions for fast computation of
12446 @enumerate
12447 @item Levenshtein (edit) distance, and edit operations
12448 @item string similarity
12449 @item approximate median strings, and generally string averaging
12450 @item string sequence and set similarity
12451 @end enumerate
12452 It supports both normal and Unicode strings.")
12453 (license license:gpl2+)))
12454
12455 (define-public python2-levenshtein
12456 (package-with-python2 python-levenshtein))
12457
12458 (define-public python-scandir
12459 (package
12460 (name "python-scandir")
12461 (version "1.9.0")
12462 (source
12463 (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "scandir" version))
12466 (sha256
12467 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12468 (build-system python-build-system)
12469 (arguments
12470 `(#:phases (modify-phases %standard-phases
12471 (replace 'check
12472 (lambda _
12473 (invoke "python" "test/run_tests.py"))))))
12474 (home-page "https://github.com/benhoyt/scandir")
12475 (synopsis "Directory iteration function")
12476 (description
12477 "Directory iteration function like os.listdir(), except that instead of
12478 returning a list of bare filenames, it yields DirEntry objects that include
12479 file type and stat information along with the name. Using scandir() increases
12480 the speed of os.walk() by 2-20 times (depending on the platform and file
12481 system) by avoiding unnecessary calls to os.stat() in most cases.
12482
12483 This package is part of the Python standard library since version 3.5.")
12484 (license license:bsd-3)))
12485
12486 (define-public python2-scandir
12487 (package-with-python2 python-scandir))
12488
12489 (define-public python2-stemming
12490 (package
12491 (name "python2-stemming")
12492 (version "1.0.1")
12493 (source
12494 (origin
12495 (method url-fetch)
12496 (uri (pypi-uri "stemming" version))
12497 (sha256
12498 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12499 (build-system python-build-system)
12500 (arguments
12501 `(#:python ,python-2))
12502 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12503 (synopsis "Python implementations of various stemming algorithms")
12504 (description
12505 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12506 stemming algorithms for English. These implementations are straightforward and
12507 efficient, unlike some Python versions of the same algorithms available on the
12508 Web. This package is an extraction of the stemming code included in the Whoosh
12509 search engine.")
12510 (license license:public-domain)))
12511
12512 (define-public python-factory-boy
12513 (package
12514 (name "python-factory-boy")
12515 (version "2.8.1")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (pypi-uri "factory_boy" version))
12520 (sha256
12521 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12522 (build-system python-build-system)
12523 (arguments
12524 ;; Tests are not included in the tarball.
12525 `(#:tests? #f))
12526 (propagated-inputs
12527 `(("faker" ,python-faker)))
12528 (home-page "https://github.com/benhoyt/scandir")
12529 (synopsis "Versatile test fixtures replacement")
12530 (description
12531 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12532
12533 As a fixtures replacement tool, it aims to replace static, hard to maintain
12534 fixtures with easy-to-use factories for complex object.
12535
12536 Instead of building an exhaustive test setup with every possible combination
12537 of corner cases, factory_boy allows you to use objects customized for the
12538 current test, while only declaring the test-specific fields")
12539 (license license:expat)))
12540
12541 (define-public python2-factory-boy
12542 (package-with-python2 python-factory-boy))
12543
12544 (define-public python-translate-toolkit
12545 (package
12546 (name "python-translate-toolkit")
12547 (version "2.1.0")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12552 (sha256
12553 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12554 (build-system python-build-system)
12555 (native-inputs
12556 `(("python-pytest" ,python-pytest)
12557 ("python-sphinx" ,python-sphinx)))
12558 (propagated-inputs
12559 `(("python-babel" ,python-babel)
12560 ("python-beautifulsoup4" ,python-beautifulsoup4)
12561 ("python-chardet" ,python-chardet)
12562 ("python-diff-match-patch" ,python-diff-match-patch)
12563 ("python-levenshtein" ,python-levenshtein)
12564 ("python-lxml" ,python-lxml)
12565 ("python-six" ,python-six)
12566 ("python-vobject" ,python-vobject)
12567 ("python-pyyaml" ,python-pyyaml)))
12568 (arguments
12569 ;; TODO: tests are not run, because they end with
12570 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12571 ;; 'parse_funcs'
12572 ;; during test setup.
12573 `(#:tests? #f))
12574 (home-page "https://toolkit.translatehouse.org")
12575 (synopsis "Tools and API for translation and localization engineering")
12576 (description
12577 "Tools and API for translation and localization engineering. It contains
12578 several utilities, as well as an API for building localization tools.")
12579 (license license:gpl2+)))
12580
12581 (define-public python2-translate-toolkit
12582 (package-with-python2 python-translate-toolkit))
12583
12584 (define-public python-packaging
12585 (package
12586 (name "python-packaging")
12587 (version "19.0")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "packaging" version))
12592 (sha256
12593 (base32
12594 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12595 (build-system python-build-system)
12596 (arguments
12597 `(#:phases (modify-phases %standard-phases
12598 (replace 'check
12599 (lambda _ (invoke "py.test" "-vv"))))))
12600 (native-inputs
12601 `(("python-pretend" ,python-pretend)
12602 ("python-pytest" ,python-pytest)))
12603 (propagated-inputs
12604 `(("python-pyparsing" ,python-pyparsing)
12605 ("python-six" ,python-six)))
12606 (home-page "https://github.com/pypa/packaging")
12607 (synopsis "Core utilities for Python packages")
12608 (description "Packaging is a Python module for dealing with Python packages.
12609 It offers an interface for working with package versions, names, and dependency
12610 information.")
12611 ;; From 'LICENSE': This software is made available under the terms of
12612 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12613 ;; Contributions to this software is made under the terms of *both* these
12614 ;; licenses.
12615 (license (list license:asl2.0 license:bsd-2))))
12616
12617 (define-public python2-packaging
12618 (package-with-python2 python-packaging))
12619
12620 (define-public python-relatorio
12621 (package
12622 (name "python-relatorio")
12623 (version "0.8.0")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "relatorio" version))
12628 (sha256
12629 (base32
12630 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12631 (build-system python-build-system)
12632 (propagated-inputs
12633 `(("python-lxml" ,python-lxml)
12634 ("python-genshi" ,python-genshi)))
12635 (native-inputs
12636 `(("python-magic" ,python-magic)))
12637 (home-page "https://relatorio.tryton.org/")
12638 (synopsis "Templating library able to output ODT and PDF files")
12639 (description "Relatorio is a templating library which provides a way to
12640 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12641 for more filetypes can be easily added by creating plugins for them.")
12642 (license license:gpl3+)))
12643
12644 (define-public python2-relatorio
12645 (package-with-python2 python-relatorio))
12646
12647 (define-public python-radon
12648 (package
12649 (name "python-radon")
12650 (version "2.2.0")
12651 (source
12652 (origin
12653 (method url-fetch)
12654 (uri (pypi-uri "radon" version))
12655 (sha256
12656 (base32
12657 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12658 (build-system python-build-system)
12659 (arguments
12660 `(#:phases (modify-phases %standard-phases
12661 (replace 'check
12662 (lambda _
12663 (invoke "python" "radon/tests/run.py"))))))
12664 (propagated-inputs
12665 `(("python-colorama" ,python-colorama)
12666 ("python-flake8-polyfill" ,python-flake8-polyfill)
12667 ("python-mando" ,python-mando)))
12668 (native-inputs
12669 `(("python-pytest" ,python-pytest)
12670 ("python-pytest-mock" ,python-pytest-mock)))
12671 (home-page "https://radon.readthedocs.org/")
12672 (synopsis "Code Metrics in Python")
12673 (description "Radon is a Python tool which computes various code metrics.
12674 Supported metrics are:
12675 @itemize @bullet
12676 @item raw metrics: SLOC, comment lines, blank lines, &c.
12677 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12678 @item Halstead metrics (all of them)
12679 @item the Maintainability Index (a Visual Studio metric)
12680 @end itemize")
12681 (license license:expat)))
12682
12683 (define-public python2-radon
12684 (package-with-python2 python-radon))
12685
12686 (define-public python-sure
12687 (package
12688 (name "python-sure")
12689 (version "1.4.11")
12690 (source
12691 (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "sure" version))
12694 (sha256
12695 (base32
12696 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12697 (build-system python-build-system)
12698 (propagated-inputs
12699 `(("python-mock" ,python-mock)
12700 ("python-six" ,python-six)))
12701 (native-inputs
12702 `(("python-nose" ,python-nose)))
12703 (home-page "https://github.com/gabrielfalcao/sure")
12704 (synopsis "Automated testing library in python for python")
12705 (description
12706 "Sure is a python library that leverages a DSL for writing assertions.
12707 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12708 (license license:gpl3+)))
12709
12710 (define-public python2-sure
12711 (package-with-python2 python-sure))
12712
12713 (define-public python2-couleur
12714 ;; This package does not seem to support python3 at all, hence,
12715 ;; only the python2 variant definition is provided.
12716 (package
12717 (name "python2-couleur")
12718 (version "0.6.2")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "couleur" version))
12723 (sha256
12724 (base32
12725 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12726 (build-system python-build-system)
12727 (arguments
12728 `(#:python ,python-2))
12729 (home-page "https://github.com/gabrielfalcao/couleur")
12730 (synopsis
12731 "ANSI terminal tool for python, colored shell and other handy fancy features")
12732 (description
12733 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12734 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12735 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12736 ;; https://github.com/gabrielfalcao/couleur/issues/11
12737 (license license:lgpl3+)))
12738
12739 (define-public python-misaka
12740 (package
12741 (name "python-misaka")
12742 (version "2.1.1")
12743 (source
12744 (origin
12745 (method url-fetch)
12746 (uri (pypi-uri "misaka" version))
12747 (sha256
12748 (base32
12749 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
12750 (build-system python-build-system)
12751 (arguments
12752 `(;; Line 37 of setup.py calls self.run_command('develop')
12753 ;; in the 'check' phase. This command seems to be trying
12754 ;; to write to
12755 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12756 ;; for which it does not have the permission to write.
12757 #:tests? #f))
12758 (propagated-inputs
12759 `(("python-cffi" ,python-cffi)))
12760 (home-page "https://github.com/FSX/misaka")
12761 (synopsis "Python binding for Hoedown")
12762 (description
12763 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12764 library written in C. It features a fast HTML renderer and functionality to make custom
12765 renderers (e.g. man pages or LaTeX).")
12766 (license license:expat)))
12767
12768 (define-public python2-misaka
12769 (package-with-python2 python-misaka))
12770
12771 (define-public python2-steadymark
12772 ;; This is forced into being a python2 only variant
12773 ;; due to its dependence on couleur that has no support
12774 ;; for python3
12775 (package
12776 (name "python2-steadymark")
12777 (version "0.7.3")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "steadymark" version))
12782 (sha256
12783 (base32
12784 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12785 (build-system python-build-system)
12786 (native-inputs
12787 `(("python-couleur" ,python2-couleur)
12788 ("python-sure" ,python2-sure)
12789 ("python-misaka" ,python2-misaka)))
12790 (arguments
12791 `(#:python ,python-2
12792 #:phases
12793 (modify-phases %standard-phases
12794 (add-before 'build 'patch-setup-py
12795 (lambda _
12796 ;; Update requirements from dependency==version
12797 ;; to dependency>=version
12798 (substitute* "setup.py"
12799 (("==") ">="))
12800 #t)))))
12801 (home-page "https://github.com/gabrielfalcao/steadymark")
12802 (synopsis "Markdown-based test runner for python")
12803 (description
12804 "@code{Steadymark} allows documentation to be written in github-flavoured
12805 markdown. The documentation may contain snippets of code surrounded by python
12806 code blocks and @code{Steadymark} will find these snippets and run them, making
12807 sure that there are no old malfunctional examples in the documentation examples.")
12808 (license license:expat)))
12809
12810 (define-public python-jsonpointer
12811 (package
12812 (name "python-jsonpointer")
12813 (version "1.10")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "jsonpointer" version))
12818 (sha256
12819 (base32
12820 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12821 (build-system python-build-system)
12822 (home-page "https://github.com/stefankoegl/python-json-pointer")
12823 (synopsis "Identify specific nodes in a JSON document")
12824 (description "@code{jsonpointer} allows you to access specific nodes
12825 by path in a JSON document (see RFC 6901).")
12826 (license license:bsd-3)))
12827
12828 (define-public python2-jsonpointer
12829 (package-with-python2 python-jsonpointer))
12830
12831 (define-public python-jsonpatch
12832 (package
12833 (name "python-jsonpatch")
12834 (version "1.16")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 ;; pypi version lacks tests.js
12839 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12840 "archive/v" version ".tar.gz"))
12841 (file-name (string-append name "-" version ".tar.gz"))
12842 (sha256
12843 (base32
12844 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12845 (build-system python-build-system)
12846 (native-inputs
12847 `(("python-jsonpointer" ,python-jsonpointer)))
12848 (home-page "https://github.com/stefankoegl/python-json-patch")
12849 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12850 (description "@code{jsonpatch} is a library and program that allows
12851 applying JSON Patches according to RFC 6902.")
12852 (license license:bsd-3)))
12853
12854 (define-public python2-jsonpatch
12855 (package-with-python2 python-jsonpatch))
12856
12857 (define-public python-jsonpatch-0.4
12858 (package (inherit python-jsonpatch)
12859 (name "python-jsonpatch")
12860 (version "0.4")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12865 "archive/v" version ".tar.gz"))
12866 (file-name (string-append name "-" version ".tar.gz"))
12867 (sha256
12868 (base32
12869 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12870
12871 (define-public python2-jsonpatch-0.4
12872 (package-with-python2 python-jsonpatch-0.4))
12873
12874 (define-public python-rfc3986
12875 (package
12876 (name "python-rfc3986")
12877 (version "1.1.0")
12878 (source (origin
12879 (method url-fetch)
12880 (uri (pypi-uri "rfc3986" version))
12881 (sha256
12882 (base32
12883 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12884 (build-system python-build-system)
12885 (arguments
12886 `(#:modules ((guix build utils)
12887 (guix build python-build-system)
12888 (ice-9 ftw)
12889 (srfi srfi-1)
12890 (srfi srfi-26))
12891 #:phases
12892 (modify-phases %standard-phases
12893 (replace 'check
12894 (lambda _
12895 (let ((cwd (getcwd)))
12896 (setenv "PYTHONPATH"
12897 (string-append cwd "/build/"
12898 (find (cut string-prefix? "lib" <>)
12899 (scandir (string-append cwd "/build")))
12900 ":"
12901 (getenv "PYTHONPATH")))
12902 (invoke "pytest" "-v")))))))
12903 (native-inputs
12904 `(("python-pytest" ,python-pytest)))
12905 (home-page "https://rfc3986.readthedocs.io/")
12906 (synopsis "Parse and validate URI references")
12907 (description
12908 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12909 validation and authority parsing. This module also supports RFC@tie{}6874
12910 which adds support for zone identifiers to IPv6 addresses.")
12911 (license license:asl2.0)))
12912
12913 (define-public python2-rfc3986
12914 (package-with-python2 python-rfc3986))
12915
12916 (define-public python-rfc3987
12917 (package
12918 (name "python-rfc3987")
12919 (version "1.3.7")
12920 (source
12921 (origin
12922 (method url-fetch)
12923 (uri (pypi-uri "rfc3987" version))
12924 (sha256
12925 (base32
12926 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12927 (build-system python-build-system)
12928 (home-page "https://pypi.python.org/pypi/rfc3987")
12929 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12930 (description "@code{rfc3987} provides routines for parsing and
12931 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12932 (license license:gpl3+)))
12933
12934 (define-public python2-rfc3987
12935 (package-with-python2 python-rfc3987))
12936
12937 (define-public python-validate-email
12938 (package
12939 (name "python-validate-email")
12940 (version "1.3")
12941 (source
12942 (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "validate_email" version))
12945 (sha256
12946 (base32
12947 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12948 (build-system python-build-system)
12949 (home-page "https://github.com/syrusakbary/validate_email")
12950 (synopsis "Verifies if an email address is valid and really exists")
12951 (description "@code{validate_email} can be used to verify if an email
12952 address is valid and really exists.")
12953 (license license:lgpl3+)))
12954
12955 (define-public python2-validate-email
12956 (package-with-python2 python-validate-email))
12957
12958 (define-public python-flex
12959 (package
12960 (name "python-flex")
12961 (version "6.10.0")
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "flex" version))
12966 (sha256
12967 (base32
12968 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12969 (build-system python-build-system)
12970 (propagated-inputs
12971 `(("python-click" ,python-click)
12972 ("python-iso8601" ,python-iso8601)
12973 ("python-jsonpointer" ,python-jsonpointer)
12974 ("python-pyyaml" ,python-pyyaml)
12975 ("python-requests" ,python-requests)
12976 ("python-rfc3987" ,python-rfc3987)
12977 ("python-six" ,python-six)
12978 ("python-validate-email" ,python-validate-email)))
12979 (home-page "https://github.com/pipermerriam/flex")
12980 (synopsis "Validates Swagger schemata")
12981 (description "@code{flex} can be used to validate Swagger schemata.")
12982 (license license:bsd-3)))
12983
12984 (define-public python2-flex
12985 (package-with-python2 python-flex))
12986
12987 (define-public python-marshmallow
12988 (package
12989 (name "python-marshmallow")
12990 (version "3.0.0b14")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "marshmallow" version))
12995 (sha256
12996 (base32
12997 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12998 (build-system python-build-system)
12999 (propagated-inputs
13000 `(("python-dateutil" ,python-dateutil)
13001 ("python-simplejson" ,python-simplejson)))
13002 (native-inputs
13003 `(("python-pytest" ,python-pytest)
13004 ("python-pytz" ,python-pytz)))
13005 (home-page "https://github.com/marshmallow-code/marshmallow")
13006 (synopsis "Convert complex datatypes to and from native
13007 Python datatypes.")
13008 (description "@code{marshmallow} provides a library for converting
13009 complex datatypes to and from native Python datatypes.")
13010 (license license:expat)))
13011
13012 (define-public python2-marshmallow
13013 (package-with-python2 python-marshmallow))
13014
13015 (define-public python-apispec
13016 (package
13017 (name "python-apispec")
13018 (version "0.25.3")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "apispec" version))
13023 (sha256
13024 (base32
13025 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13026 (build-system python-build-system)
13027 (propagated-inputs
13028 `(("python-pyyaml" ,python-pyyaml)))
13029 (native-inputs
13030 `(("python-pytest" ,python-pytest)
13031 ("python-flask" ,python-flask)
13032 ("python-marshmallow" ,python-marshmallow)
13033 ("python-tornado" ,python-tornado)
13034 ("python-bottle" ,python-bottle)
13035 ("python-mock" ,python-mock)))
13036 (home-page "https://github.com/marshmallow-code/apispec")
13037 (synopsis "Swagger 2.0 API specification generator")
13038 (description "@code{python-apispec} is a pluggable API specification
13039 generator. Currently supports the OpenAPI specification (f.k.a.
13040 Swagger 2.0).")
13041 (license license:expat)))
13042
13043 (define-public python2-apispec
13044 (package-with-python2 python-apispec))
13045
13046 (define-public python-flasgger
13047 (package
13048 (name "python-flasgger")
13049 (version "0.6.3")
13050 (source
13051 (origin
13052 (method git-fetch)
13053 (uri (git-reference
13054 (url "https://github.com/rochacbruno/flasgger.git")
13055 (commit version)))
13056 (file-name (git-file-name name version))
13057 (sha256
13058 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13059 (build-system python-build-system)
13060 (arguments
13061 `(#:phases
13062 (modify-phases %standard-phases
13063 (replace 'check
13064 (lambda* (#:key inputs outputs #:allow-other-keys)
13065 (substitute* "Makefile"
13066 (("flake8 flasgger --ignore=F403")
13067 "flake8 flasgger --ignore=E731,F403"))
13068 (setenv "PYTHONPATH" (string-append (getcwd)
13069 ":"
13070 (getenv "PYTHONPATH")))
13071 (invoke "py.test"))))))
13072 (propagated-inputs
13073 `(("python-flask" ,python-flask)
13074 ("python-pyyaml" ,python-pyyaml)
13075 ("python-jsonschema" ,python-jsonschema)
13076 ("python-mistune" ,python-mistune)
13077 ("python-six" ,python-six)))
13078 (native-inputs
13079 `(("python-decorator" ,python-decorator)
13080 ("python-flake8" ,python-flake8)
13081 ("python-flask-restful" ,python-flask-restful)
13082 ("python-flex" ,python-flex)
13083 ("python-pytest" ,python-pytest)
13084 ("python-pytest-cov" ,python-pytest-cov)
13085 ("python-marshmallow" ,python-marshmallow)
13086 ("python-apispec" ,python-apispec)))
13087 (home-page "https://github.com/rochacbruno/flasgger/")
13088 (synopsis "Extract Swagger specs from your Flask project")
13089 (description "@code{python-flasgger} allows extracting Swagger specs
13090 from your Flask project. It is a fork of Flask-Swagger.")
13091 (license license:expat)))
13092
13093 (define-public python2-flasgger
13094 (package-with-python2 python-flasgger))
13095
13096 (define-public python-swagger-spec-validator
13097 (package
13098 (name "python-swagger-spec-validator")
13099 (version "2.1.0")
13100 (source
13101 (origin
13102 (method url-fetch)
13103 (uri (pypi-uri "swagger-spec-validator" version))
13104 (sha256
13105 (base32
13106 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13107 (build-system python-build-system)
13108 (propagated-inputs
13109 `(("python-jsonschema" ,python-jsonschema)
13110 ("python-six" ,python-six)))
13111 (home-page
13112 "https://github.com/Yelp/swagger_spec_validator")
13113 (synopsis "Validation of Swagger specifications")
13114 (description "@code{swagger_spec_validator} provides a library for
13115 validating Swagger API specifications.")
13116 (license license:asl2.0)))
13117
13118 (define-public python2-swagger-spec-validator
13119 (package-with-python2 python-swagger-spec-validator))
13120
13121 (define-public python-apache-libcloud
13122 (package
13123 (name "python-apache-libcloud")
13124 (version "2.4.0")
13125 (source
13126 (origin
13127 (method url-fetch)
13128 (uri (pypi-uri "apache-libcloud" version))
13129 (sha256
13130 (base32
13131 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13132 (build-system python-build-system)
13133 (arguments
13134 `(#:phases
13135 (modify-phases %standard-phases
13136 (add-after 'unpack 'patch-ssh
13137 (lambda* (#:key inputs #:allow-other-keys)
13138 (substitute* "libcloud/compute/ssh.py"
13139 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13140 "/bin/ssh" "'")))
13141 #t))
13142 (add-after 'unpack 'patch-tests
13143 (lambda _
13144 (substitute* "./libcloud/test/test_file_fixtures.py"
13145 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13146 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13147 return (httplib.OK,
13148 \"1234abcd\",
13149 {\"test\": \"value\"},
13150 httplib.responses[httplib.OK])
13151 def _ascii"))
13152 (substitute* "libcloud/test/compute/test_ssh_client.py"
13153 (("class ShellOutSSHClientTests")
13154 "@unittest.skip(\"Guix container doesn't have ssh service\")
13155 class ShellOutSSHClientTests")
13156 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13157 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13158 (("'.xF0', '.x90', '.x8D', '.x88'")
13159 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13160 #t))
13161 (add-before 'check 'copy-secret
13162 (lambda _
13163 (copy-file "libcloud/test/secrets.py-dist"
13164 "libcloud/test/secrets.py")
13165 #t)))))
13166 (inputs
13167 `(("openssh" ,openssh)))
13168 (propagated-inputs
13169 `(("python-paramiko" ,python-paramiko)
13170 ("python-requests" ,python-requests)))
13171 (native-inputs
13172 `(("python-lockfile" ,python-lockfile)
13173 ("python-mock" ,python-mock)
13174 ("python-pytest" ,python-pytest)
13175 ("python-pytest-runner" ,python-pytest-runner)
13176 ("python-requests-mock" ,python-requests-mock)))
13177 (home-page "https://libcloud.apache.org/")
13178 (synopsis "Unified Cloud API")
13179 (description "@code{libcloud} is a Python library for interacting with
13180 many of the popular cloud service providers using a unified API.")
13181 (license license:asl2.0)))
13182
13183 (define-public python2-apache-libcloud
13184 (package-with-python2 python-apache-libcloud))
13185
13186 (define-public python-smmap2
13187 (package
13188 (name "python-smmap2")
13189 (version "2.0.3")
13190 (source
13191 (origin
13192 (method url-fetch)
13193 (uri (pypi-uri "smmap2" version))
13194 (sha256
13195 (base32
13196 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13197 (build-system python-build-system)
13198 (native-inputs
13199 `(("python-nosexcover" ,python-nosexcover)))
13200 (home-page "https://github.com/Byron/smmap")
13201 (synopsis "Python sliding window memory map manager")
13202 (description "@code{smmap2} is a pure Python implementation of a sliding
13203 window memory map manager.")
13204 (license license:bsd-3)))
13205
13206 (define-public python2-smmap2
13207 (package-with-python2 python-smmap2))
13208
13209 (define-public python-regex
13210 (package
13211 (name "python-regex")
13212 (version "2019.04.14")
13213 (source (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "regex" version))
13216 (sha256
13217 (base32
13218 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13219 ;; TODO: Fix and enable regex_test.py tests that complain about the
13220 ;; test.support module not existing.
13221 (build-system python-build-system)
13222 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13223 (synopsis "Alternative regular expression module")
13224 (description "This regular expression implementation is backwards-
13225 compatible with the standard @code{re} module, but offers additional
13226 functionality like full case-folding for case-insensitive matches in Unicode.")
13227 (license license:psfl)))
13228
13229 (define-public python2-regex
13230 (package-with-python2 python-regex))
13231
13232 (define-public python2-pyopengl
13233 (package
13234 (name "python2-pyopengl")
13235 (version "3.1.0")
13236 (source
13237 (origin
13238 (method url-fetch)
13239 (uri (pypi-uri "PyOpenGL" version))
13240 (sha256
13241 (base32
13242 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13243 (arguments
13244 `(#:python ,python-2))
13245 (build-system python-build-system)
13246 (home-page "http://pyopengl.sourceforge.net")
13247 (synopsis "Standard OpenGL bindings for Python")
13248 (description
13249 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13250 related APIs. The binding is created using the standard @code{ctypes}
13251 library.")
13252 (license license:bsd-3)))
13253
13254 (define-public python2-pyopengl-accelerate
13255 (package
13256 (inherit python2-pyopengl)
13257 (name "python2-pyopengl-accelerate")
13258 (version "3.1.0")
13259 (source
13260 (origin
13261 (method url-fetch)
13262 (uri (pypi-uri "PyOpenGL-accelerate" version))
13263 (sha256
13264 (base32
13265 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13266 (synopsis "Acceleration code for PyOpenGL")
13267 (description
13268 "This is the Cython-coded accelerator module for PyOpenGL.")))
13269
13270 (define-public python-rencode
13271 (package
13272 (name "python-rencode")
13273 (version "1.0.5")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "rencode" version))
13278 (sha256
13279 (base32
13280 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13281 (build-system python-build-system)
13282 (arguments
13283 `(#:phases
13284 (modify-phases %standard-phases
13285 (add-before 'check 'delete-bogus-test
13286 ;; This test requires /home/aresch/Downloads, which is not provided by
13287 ;; the build environment.
13288 (lambda _
13289 (delete-file "rencode/t.py")
13290 #t)))))
13291 (native-inputs `(("pkg-config" ,pkg-config)
13292 ("python-cython" ,python-cython)))
13293 (home-page "https://github.com/aresch/rencode")
13294 (synopsis "Serialization of heterogeneous data structures")
13295 (description
13296 "The @code{rencode} module is a data structure serialization library,
13297 similar to @code{bencode} from the BitTorrent project. For complex,
13298 heterogeneous data structures with many small elements, r-encoding stake up
13299 significantly less space than b-encodings. This version of rencode is a
13300 complete rewrite in Cython to attempt to increase the performance over the
13301 pure Python module.")
13302 (license license:bsd-3)))
13303
13304 (define-public python2-rencode
13305 (package-with-python2 python-rencode))
13306
13307 (define-public python-xenon
13308 (package
13309 (name "python-xenon")
13310 (version "0.5.4")
13311 (source
13312 (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "xenon" version))
13315 (sha256
13316 (base32
13317 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13318 (build-system python-build-system)
13319 (native-inputs
13320 `(("python-pyyaml" ,python-pyyaml)
13321 ("python-radon" ,python-radon)
13322 ("python-requests" ,python-requests)
13323 ("python-flake8" ,python-flake8)
13324 ("python-tox" ,python-tox)))
13325 (arguments
13326 `(#:phases
13327 (modify-phases %standard-phases
13328 (add-before 'build 'patch-test-requirements
13329 (lambda _
13330 ;; Remove httpretty dependency for tests.
13331 (substitute* "setup.py"
13332 (("httpretty") ""))
13333 #t)))))
13334 (home-page "https://xenon.readthedocs.org/")
13335 (synopsis "Monitor code metrics for Python on your CI server")
13336 (description
13337 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13338 Ideally, @code{xenon} is run every time code is committed. Through command
13339 line options, various thresholds can be set for the complexity of code. It
13340 will fail (i.e. it will exit with a non-zero exit code) when any of these
13341 requirements is not met.")
13342 (license license:expat)))
13343
13344 (define-public python2-xenon
13345 (package-with-python2 python-xenon))
13346
13347 (define-public python-pysocks
13348 (package
13349 (name "python-pysocks")
13350 (version "1.7.0")
13351 (source
13352 (origin
13353 (method url-fetch)
13354 (uri (pypi-uri "PySocks" version))
13355 (sha256
13356 (base32
13357 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13358 (build-system python-build-system)
13359 (arguments `(#:tests? #f))
13360 (home-page "https://github.com/Anorov/PySocks")
13361 (synopsis "SOCKS client module")
13362 (description "@code{pysocks} is an updated and semi-actively maintained
13363 version of @code{SocksiPy} with bug fixes and extra features.")
13364 (license license:bsd-3)))
13365
13366 (define-public python2-pysocks
13367 (package-with-python2 python-pysocks))
13368
13369 (define-public python-pydiff
13370 (package
13371 (name "python-pydiff")
13372 (version "0.2")
13373 (source
13374 (origin
13375 (method url-fetch)
13376 (uri (pypi-uri "pydiff" version))
13377 (sha256
13378 (base32
13379 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13380 (build-system python-build-system)
13381 (home-page "https://github.com/myint/pydiff")
13382 (synopsis "Library to diff two Python files at the bytecode level")
13383 (description
13384 "@code{pydiff} makes it easy to look for actual code changes while
13385 ignoring formatting changes.")
13386 (license license:expat)))
13387
13388 (define-public python2-pydiff
13389 (package-with-python2 python-pydiff))
13390
13391 (define-public python-tqdm
13392 (package
13393 (name "python-tqdm")
13394 (version "4.19.6")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "tqdm" version))
13399 (sha256
13400 (base32
13401 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13402 (build-system python-build-system)
13403 (native-inputs
13404 `(("python-flake8" ,python-flake8)
13405 ("python-nose" ,python-nose)
13406 ("python-coverage" ,python-coverage)))
13407 (home-page "https://github.com/tqdm/tqdm")
13408 (synopsis "Fast, extensible progress meter")
13409 (description
13410 "Make loops show a progress bar on the console by just wrapping any
13411 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13412 design and layout.")
13413 (license (list license:mpl2.0 license:expat))))
13414
13415 (define-public python2-tqdm
13416 (package-with-python2 python-tqdm))
13417
13418 (define-public python-pkginfo
13419 (package
13420 (name "python-pkginfo")
13421 (version "1.4.2")
13422 (source
13423 (origin
13424 (method url-fetch)
13425 (uri (pypi-uri "pkginfo" version))
13426 (sha256
13427 (base32
13428 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13429 (build-system python-build-system)
13430 (arguments
13431 ;; The tests are broken upstream.
13432 '(#:tests? #f))
13433 (home-page
13434 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13435 (synopsis
13436 "Query metadatdata from sdists, bdists, and installed packages")
13437 (description
13438 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13439 source distriubtion (an sdist) or a binary distribution (e.g., created by
13440 running bdist_egg). It can also query the EGG-INFO directory of an installed
13441 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13442 created by running @code{python setup.py develop}).")
13443 (license license:expat)))
13444
13445 (define-public python2-pkginfo
13446 (package-with-python2 python-pkginfo))
13447
13448 (define-public python-twine
13449 (package
13450 (name "python-twine")
13451 (version "1.9.1")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "twine" version))
13456 (sha256
13457 (base32
13458 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13459 (build-system python-build-system)
13460 (propagated-inputs
13461 `(("python-tqdm" ,python-tqdm)
13462 ("python-pkginfo" ,python-pkginfo)
13463 ("python-requests" ,python-requests)
13464 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13465 (home-page "https://github.com/pypa/twine")
13466 (synopsis "Collection of utilities for interacting with PyPI")
13467 (description
13468 "@code{twine} currently supports registering projects and uploading
13469 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13470 their files and supports any packaging format (including wheels).")
13471 (license license:asl2.0)))
13472
13473 (define-public python2-twine
13474 (package-with-python2 python-twine))
13475
13476 (define-public python-linecache2
13477 (package
13478 (name "python-linecache2")
13479 (version "1.0.0")
13480 (source
13481 (origin
13482 (method url-fetch)
13483 (uri (pypi-uri "linecache2" version))
13484 (sha256
13485 (base32
13486 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13487 (build-system python-build-system)
13488 (arguments
13489 `(;; The tests depend on unittest2, and our version is a bit too old.
13490 #:tests? #f))
13491 (native-inputs
13492 `(("python-pbr" ,python-pbr-minimal)))
13493 (home-page
13494 "https://github.com/testing-cabal/linecache2")
13495 (synopsis "Backports of the linecache module")
13496 (description
13497 "The linecache module allows one to get any line from any file, while
13498 attempting to optimize internally, using a cache, the common case where many
13499 lines are read from a single file.")
13500 (license license:psfl)))
13501
13502 (define-public python2-linecache2
13503 (package-with-python2 python-linecache2))
13504
13505 (define-public python-traceback2
13506 (package
13507 (name "python-traceback2")
13508 (version "1.4.0")
13509 (source
13510 (origin
13511 (method url-fetch)
13512 (uri (pypi-uri "traceback2" version))
13513 (sha256
13514 (base32
13515 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13516 (build-system python-build-system)
13517 (arguments
13518 `(;; python-traceback2 and python-unittest2 depend on one another.
13519 #:tests? #f))
13520 (native-inputs
13521 `(("python-pbr" ,python-pbr-minimal)))
13522 (propagated-inputs
13523 `(("python-linecache2" ,python-linecache2)))
13524 (home-page
13525 "https://github.com/testing-cabal/traceback2")
13526 (synopsis "Backports of the traceback module")
13527 (description
13528 "This module provides a standard interface to extract, format and print
13529 stack traces of Python programs. It exactly mimics the behavior of the Python
13530 interpreter when it prints a stack trace.")
13531 (license license:psfl)))
13532
13533 (define-public python2-traceback2
13534 (package-with-python2 python-traceback2))
13535
13536 (define-public python-ratelimiter
13537 (package
13538 (name "python-ratelimiter")
13539 (version "1.2.0")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "ratelimiter" version))
13544 (sha256
13545 (base32
13546 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13547 (build-system python-build-system)
13548 (arguments
13549 '(#:tests? #f)) ; There are no tests in the pypi archive.
13550 (home-page "https://github.com/RazerM/ratelimiter")
13551 (synopsis "Simple rate limiting object")
13552 (description
13553 "The @code{ratelimiter} module ensures that an operation will not be
13554 executed more than a given number of times during a given period.")
13555 (license license:asl2.0)))
13556
13557 (define-public python2-ratelimiter
13558 (package-with-python2 python-ratelimiter))
13559
13560 (define-public python-dukpy
13561 (package
13562 (name "python-dukpy")
13563 (version "0.3")
13564 (source
13565 (origin
13566 (method git-fetch)
13567 (uri (git-reference
13568 (url "https://github.com/kovidgoyal/dukpy.git")
13569 (commit (string-append "v" version))))
13570 (file-name (git-file-name name version))
13571 (sha256
13572 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13573 (build-system python-build-system)
13574 (home-page "https://github.com/kovidgoyal/dukpy")
13575 (synopsis "Run JavaScript in python")
13576 (description
13577 "dukpy is a JavaScript runtime environment for Python using the duktape
13578 embeddable JavaScript engine.")
13579 ;; Dukpy is licensed under MIT like the embedded duktape library,
13580 ;; with 'errors.c' as GPL3.
13581 (license (list license:expat license:gpl3))))
13582
13583 (define-public python2-dukpy
13584 (package-with-python2 python-dukpy))
13585
13586 (define-public python-jsonrpclib-pelix
13587 (package
13588 (name "python-jsonrpclib-pelix")
13589 (version "0.3.2")
13590 (source
13591 (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "jsonrpclib-pelix" version))
13594 (sha256
13595 (base32
13596 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13597 (build-system python-build-system)
13598 (arguments
13599 `(#:tests? #f)) ; no tests in PyPI tarball
13600 (home-page "https://github.com/tcalmant/jsonrpclib/")
13601 (synopsis "JSON-RPC 2.0 client library for Python")
13602 (description
13603 "This library implements the JSON-RPC v2.0
13604 specification (backwards-compatible) as a client library for Python. This
13605 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13606 services.")
13607 (license license:asl2.0)))
13608
13609 (define-public python2-jsonrpclib-pelix
13610 (package-with-python2 python-jsonrpclib-pelix))
13611
13612 (define-public python-setuptools-scm-git-archive
13613 (package
13614 (name "python-setuptools-scm-git-archive")
13615 (version "1.0")
13616 (source
13617 (origin
13618 (method url-fetch)
13619 (uri (pypi-uri "setuptools_scm_git_archive" version))
13620 (sha256
13621 (base32
13622 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13623 (build-system python-build-system)
13624 (native-inputs
13625 `(("python-pytest" ,python-pytest)))
13626 (propagated-inputs
13627 `(("python-setuptools-scm" ,python-setuptools-scm)))
13628 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13629 (synopsis "Setuptools_scm plugin for git archives")
13630 (description
13631 "The setuptools_scm_git_archive package is a plugin to
13632 setuptools_scm, which supports obtaining versions from git archives that
13633 belong to tagged versions.")
13634 (license license:expat)))
13635
13636 (define-public python2-setuptools-scm-git-archive
13637 (package-with-python2 python-setuptools-scm-git-archive))
13638
13639 (define-public python-setuptools-git
13640 (package
13641 (name "python-setuptools-git")
13642 (version "1.2")
13643 (source
13644 (origin
13645 (method url-fetch)
13646 (uri (pypi-uri "setuptools-git" version))
13647 (sha256
13648 (base32
13649 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13650 (build-system python-build-system)
13651 (arguments
13652 `(#:phases
13653 (modify-phases %standard-phases
13654 ;; This is needed for tests.
13655 (add-after 'unpack 'configure-git
13656 (lambda _
13657 (setenv "HOME" "/tmp")
13658 (invoke "git" "config" "--global" "user.email" "guix")
13659 (invoke "git" "config" "--global" "user.name" "guix")
13660 #t)))))
13661 (native-inputs
13662 `(("git" ,git-minimal)))
13663 (home-page "https://github.com/msabramo/setuptools-git")
13664 (synopsis "Setuptools revision control system plugin for Git")
13665 (description
13666 "This package provides a plugin for Setuptools for revision control with
13667 Git.")
13668 (license license:bsd-3)))
13669
13670 (define-public python-pyclipper
13671 (package
13672 (name "python-pyclipper")
13673 (version "1.1.0.post1")
13674 (source
13675 (origin
13676 (method url-fetch)
13677 (uri (pypi-uri "pyclipper" version ".zip"))
13678 (sha256
13679 (base32
13680 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13681 (modules '((guix build utils)))
13682 (snippet
13683 '(begin
13684 ;; This file is generated by Cython.
13685 (delete-file "pyclipper/pyclipper.cpp") #t))))
13686 (build-system python-build-system)
13687 (arguments
13688 `(#:phases
13689 (modify-phases %standard-phases
13690 (add-before 'build 'cythonize-sources
13691 (lambda _
13692 (with-directory-excursion "pyclipper"
13693 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13694 (propagated-inputs
13695 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13696 (native-inputs
13697 `(("python-cython" ,python-cython)
13698 ("python-pytest" ,python-pytest)
13699 ("python-pytest-runner" ,python-pytest-runner)
13700 ("python-unittest2" ,python-unittest2)
13701 ("unzip" ,unzip)))
13702 (home-page "https://github.com/greginvm/pyclipper")
13703 (synopsis "Wrapper for Angus Johnson's Clipper library")
13704 (description
13705 "Pyclipper is a Cython wrapper for the C++ translation of the
13706 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13707 (license license:expat)))
13708
13709 (define-public python2-pyclipper
13710 (package-with-python2 python-pyclipper))
13711
13712 (define-public python2-booleanoperations
13713 (package
13714 (name "python2-booleanoperations")
13715 (version "0.7.1")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "booleanOperations" version ".zip"))
13720 (sha256
13721 (base32
13722 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13723 (build-system python-build-system)
13724 (arguments
13725 `(#:python ,python-2))
13726 (native-inputs
13727 `(("unzip" ,unzip)
13728 ("python2-pytest" ,python2-pytest)
13729 ("python2-pytest-runner" ,python2-pytest-runner)))
13730 (propagated-inputs
13731 `(("python-fonttools" ,python2-fonttools)
13732 ("python-pyclipper" ,python2-pyclipper)
13733 ("python-ufolib" ,python2-ufolib)))
13734 (home-page "https://github.com/typemytype/booleanOperations")
13735 (synopsis "Boolean operations on paths")
13736 (description
13737 "BooleanOperations provides a Python library that enables
13738 boolean operations on paths.")
13739 (license license:expat)))
13740
13741 (define-public python-tempdir
13742 (package
13743 (name "python-tempdir")
13744 (version "0.7.1")
13745 (source
13746 (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "tempdir" version))
13749 (sha256
13750 (base32
13751 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13752 (build-system python-build-system)
13753 (home-page "https://pypi.org/project/tempdir/")
13754 (arguments
13755 ;; the package has no tests
13756 '(#:tests? #f))
13757 (synopsis "Python library for managing temporary directories")
13758 (description
13759 "This library manages temporary directories that are automatically
13760 deleted with all their contents when they are no longer needed. It is
13761 particularly convenient for use in tests.")
13762 (license license:expat)))
13763
13764 (define-public python2-tempdir
13765 (package-with-python2 python-tempdir))
13766
13767 (define-public python-activepapers
13768 (package
13769 (name "python-activepapers")
13770 (version "0.2.2")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "ActivePapers.Py" version))
13775 (sha256
13776 (base32
13777 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13778 (build-system python-build-system)
13779 (arguments
13780 `(#:modules ((ice-9 ftw)
13781 (srfi srfi-1)
13782 (guix build utils)
13783 (guix build python-build-system))
13784
13785 #:phases
13786 (modify-phases %standard-phases
13787 (add-after 'unpack 'delete-python2-code
13788 (lambda _
13789 (for-each delete-file
13790 '("lib/activepapers/builtins2.py"
13791 "lib/activepapers/standardlib2.py"
13792 "lib/activepapers/utility2.py"))))
13793 (replace 'check
13794 (lambda _
13795 ;; Deactivate the test cases that download files
13796 (setenv "NO_NETWORK_ACCESS" "1")
13797 ;; For some strange reason, some tests fail if nosetests runs all
13798 ;; test modules in a single execution. They pass if each test
13799 ;; module is run individually.
13800 (for-each (lambda (filename)
13801 (invoke "nosetests"
13802 (string-append "tests/" filename)))
13803 (scandir "tests"
13804 (lambda (filename)
13805 (string-suffix? ".py" filename)))))))))
13806 (native-inputs
13807 `(("python-tempdir" ,python-tempdir)
13808 ("python-nose" ,python-nose)))
13809 (propagated-inputs
13810 `(("python-h5py" ,python-h5py)))
13811 (home-page "http://www.activepapers.org/")
13812 (synopsis "Executable papers for scientific computing")
13813 (description
13814 "ActivePapers is a tool for working with executable papers, which
13815 combine data, code, and documentation in single-file packages,
13816 suitable for publication as supplementary material or on repositories
13817 such as figshare or Zenodo.")
13818 (properties `((python2-variant . ,(delay python2-activepapers))))
13819 (license license:bsd-3)))
13820
13821 (define-public python2-activepapers
13822 (let ((base (package-with-python2
13823 (strip-python2-variant python-activepapers))))
13824 (package
13825 (inherit base)
13826 (arguments
13827 (substitute-keyword-arguments (package-arguments base)
13828 ((#:phases phases)
13829 `(modify-phases ,phases
13830 (delete 'delete-python2-code)
13831 (add-after 'unpack 'delete-python3-code
13832 (lambda _
13833 (for-each delete-file
13834 '("lib/activepapers/builtins3.py"
13835 "lib/activepapers/standardlib3.py"
13836 "lib/activepapers/utility3.py")))))))))))
13837
13838 (define-public python-semver
13839 (package
13840 (name "python-semver")
13841 (version "2.7.9")
13842 (source
13843 (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "semver" version))
13846 (sha256
13847 (base32
13848 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13849 (build-system python-build-system)
13850 (arguments
13851 `(#:phases
13852 (modify-phases %standard-phases
13853 (add-after 'unpack 'patch-test-requirements
13854 (lambda _
13855 (substitute* "setup.py"
13856 ;; Our Python is new enough.
13857 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13858 #t)))))
13859 (native-inputs
13860 `(("python-tox" ,python-tox)
13861 ("python-virtualenv" ,python-virtualenv)))
13862 (home-page "https://github.com/k-bx/python-semver")
13863 (synopsis "Python helper for Semantic Versioning")
13864 (description "This package provides a Python library for
13865 @url{Semantic Versioning, http://semver.org/}.")
13866 (license license:bsd-3)))
13867
13868 (define-public python2-semver
13869 (package-with-python2 python-semver))
13870
13871 (define-public python-pyro4
13872 (package
13873 (name "python-pyro4")
13874 (version "4.75")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 (uri (pypi-uri "Pyro4" version))
13879 (sha256
13880 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
13881 (build-system python-build-system)
13882 (propagated-inputs
13883 `(("python-serpent" ,python-serpent)))
13884 (home-page "https://pyro4.readthedocs.io")
13885 (synopsis "Distributed object middleware for Python")
13886 (description
13887 "Pyro enables you to build applications in which objects can talk to each
13888 other over the network. You can just use normal Python method calls to call
13889 objects on other machines, also known as remote procedure calls (RPC).")
13890 (license license:expat)))
13891
13892 (define-public python2-pyro
13893 (package
13894 (name "python2-pyro")
13895 (version "3.16")
13896 (source
13897 (origin
13898 (method url-fetch)
13899 (uri (pypi-uri "Pyro" version))
13900 (file-name (string-append "Pyro-" version ".tar.gz"))
13901 (sha256
13902 (base32
13903 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13904 (build-system python-build-system)
13905 (arguments
13906 ;; Pyro is not compatible with Python 3
13907 `(#:python ,python-2
13908 ;; Pyro has no test cases for automatic execution
13909 #:tests? #f))
13910 (home-page "http://pythonhosted.org/Pyro/")
13911 (synopsis "Distributed object manager for Python")
13912 (description "Pyro is a Distributed Object Technology system
13913 written in Python that is designed to be easy to use. It resembles
13914 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13915 which is a system and language independent Distributed Object Technology
13916 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13917 longer maintained. New projects should use Pyro4 instead, which
13918 is the new Pyro version that is actively developed.")
13919 (license license:expat)))
13920
13921 (define-public python2-scientific
13922 (package
13923 (name "python2-scientific")
13924 (version "2.9.4")
13925 (source
13926 (origin
13927 (method url-fetch)
13928 (uri (string-append "https://bitbucket.org/khinsen/"
13929 "scientificpython/downloads/ScientificPython-"
13930 version ".tar.gz"))
13931 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13932 (sha256
13933 (base32
13934 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13935 (build-system python-build-system)
13936 (inputs
13937 `(("netcdf" ,netcdf)))
13938 (propagated-inputs
13939 `(("python-numpy" ,python2-numpy-1.8)
13940 ("python-pyro" ,python2-pyro)))
13941 (arguments
13942 ;; ScientificPython is not compatible with Python 3
13943 `(#:python ,python-2
13944 #:tests? #f ; No test suite
13945 #:phases
13946 (modify-phases %standard-phases
13947 (replace 'build
13948 (lambda* (#:key inputs #:allow-other-keys)
13949 (invoke "python" "setup.py" "build"
13950 (string-append "--netcdf_prefix="
13951 (assoc-ref inputs "netcdf"))))))))
13952 (home-page "https://bitbucket.org/khinsen/scientificpython")
13953 (synopsis "Python modules for scientific computing")
13954 (description "ScientificPython is a collection of Python modules that are
13955 useful for scientific computing. Most modules are rather general (Geometry,
13956 physical units, automatic derivatives, ...) whereas others are more
13957 domain-specific (e.g. netCDF and PDB support). The library is currently
13958 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13959 (license license:cecill-c)))
13960
13961 (define-public python2-mmtk
13962 (package
13963 (name "python2-mmtk")
13964 (version "2.7.11")
13965 (source
13966 (origin
13967 (method url-fetch)
13968 (uri (string-append "https://bitbucket.org/khinsen/"
13969 "mmtk/downloads/MMTK-" version ".tar.gz"))
13970 (file-name (string-append "MMTK-" version ".tar.gz"))
13971 (sha256
13972 (base32
13973 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13974 (build-system python-build-system)
13975 (native-inputs
13976 `(("netcdf" ,netcdf)))
13977 (propagated-inputs
13978 `(("python-scientific" ,python2-scientific)
13979 ("python-tkinter" ,python-2 "tk")))
13980 (arguments
13981 `(#:python ,python-2
13982 #:tests? #f
13983 #:phases
13984 (modify-phases %standard-phases
13985 (add-before 'build 'includes-from-scientific
13986 (lambda* (#:key inputs #:allow-other-keys)
13987 (mkdir-p "Include/Scientific")
13988 (copy-recursively
13989 (string-append
13990 (assoc-ref inputs "python-scientific")
13991 "/include/python2.7/Scientific")
13992 "Include/Scientific"))))))
13993 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13994 (synopsis "Python library for molecular simulation")
13995 (description "MMTK is a library for molecular simulations with an emphasis
13996 on biomolecules. It provides widely used methods such as Molecular Dynamics
13997 and normal mode analysis, but also basic routines for implementing new methods
13998 for simulation and analysis. The library is currently not actively maintained
13999 and works only with Python 2 and NumPy < 1.9.")
14000 (license license:cecill-c)))
14001
14002 (define-public python-phonenumbers
14003 (package
14004 (name "python-phonenumbers")
14005 (version "8.9.1")
14006 (source
14007 (origin
14008 (method url-fetch)
14009 (uri (pypi-uri "phonenumbers" version))
14010 (sha256
14011 (base32
14012 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14013 (build-system python-build-system)
14014 (home-page
14015 "https://github.com/daviddrysdale/python-phonenumbers")
14016 (synopsis
14017 "Python library for dealing with international phone numbers")
14018 (description
14019 "This package provides a Python port of Google's libphonenumber library.")
14020 (license license:asl2.0)))
14021
14022 (define-public python2-phonenumbers
14023 (package-with-python2 python-phonenumbers))
14024
14025 (define-public python-send2trash
14026 (package
14027 (name "python-send2trash")
14028 (version "1.5.0")
14029 (source
14030 (origin (method git-fetch)
14031 ;; Source tarball on PyPI doesn't include tests.
14032 (uri (git-reference
14033 (url "https://github.com/hsoft/send2trash.git")
14034 (commit version)))
14035 (file-name (git-file-name name version))
14036 (sha256
14037 (base32
14038 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14039 (build-system python-build-system)
14040 (arguments
14041 '(#:phases
14042 (modify-phases %standard-phases
14043 (add-before 'check 'pre-check
14044 (lambda _
14045 (mkdir-p "/tmp/foo")
14046 (setenv "HOME" "/tmp/foo")
14047 #t)))))
14048 (home-page "https://github.com/hsoft/send2trash")
14049 (synopsis "Send files to the user's @file{~/Trash} directory")
14050 (description "This package provides a Python library to send files to the
14051 user's @file{~/Trash} directory.")
14052 (properties `((python2-variant . ,(delay python2-send2trash))))
14053 (license license:bsd-3)))
14054
14055 (define-public python2-send2trash
14056 (package
14057 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14058 (arguments
14059 (substitute-keyword-arguments (package-arguments python-send2trash)
14060 ((#:phases phases)
14061 `(modify-phases ,phases
14062 (add-before 'check 'setenv
14063 (lambda _
14064 (setenv "PYTHONPATH"
14065 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14066 #t))))))))
14067
14068 (define-public python-yapf
14069 (package
14070 (name "python-yapf")
14071 (version "0.24.0")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "yapf" version))
14076 (sha256
14077 (base32
14078 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14079 (build-system python-build-system)
14080 (home-page "https://github.com/google/yapf")
14081 (synopsis "Formatter for Python code")
14082 (description "YAPF is a formatter for Python code. It's based off of
14083 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14084 takes the code and reformats it to the best formatting that conforms to the
14085 style guide, even if the original code didn't violate the style guide.")
14086 (license license:asl2.0)))
14087
14088 (define-public python2-yapf
14089 (package-with-python2 python-yapf))
14090
14091 (define-public python-gyp
14092 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14093 (revision "0"))
14094 (package
14095 (name "python-gyp")
14096 ;; Google does not release versions,
14097 ;; based on second most recent commit date.
14098 (version (git-version "0.0.0" revision commit))
14099 (source
14100 (origin
14101 ;; Google does not release tarballs,
14102 ;; git checkout is needed.
14103 (method git-fetch)
14104 (uri (git-reference
14105 (url "https://chromium.googlesource.com/external/gyp")
14106 (commit commit)))
14107 (file-name (git-file-name name version))
14108 (sha256
14109 (base32
14110 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14111 (build-system python-build-system)
14112 (home-page "https://gyp.gsrc.io/")
14113 (synopsis "GYP is a Meta-Build system")
14114 (description
14115 "GYP builds build systems for large, cross platform applications.
14116 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14117 files, and Makefiles.")
14118 (license license:bsd-3))))
14119
14120 (define-public python2-gyp
14121 (package-with-python2 python-gyp))
14122
14123 (define-public python-whatever
14124 (package
14125 (name "python-whatever")
14126 (version "0.5")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14131 ".tar.gz"))
14132 (sha256
14133 (base32
14134 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14135 (file-name (string-append name "-" version ".tar.gz"))))
14136 (build-system python-build-system)
14137 (arguments
14138 `(#:phases
14139 (modify-phases %standard-phases
14140 (replace 'check
14141 (lambda _
14142 (invoke "py.test"))))))
14143 (native-inputs
14144 `(("python-pytest" ,python-pytest)))
14145 (home-page "http://github.com/Suor/whatever")
14146 (synopsis "Make anonymous functions by partial application of operators")
14147 (description "@code{whatever} provides an easy way to make anonymous
14148 functions by partial application of operators.")
14149 (license license:bsd-3)))
14150
14151 (define-public python2-whatever
14152 (package-with-python2 python-whatever))
14153
14154 (define-public python-funcy
14155 (package
14156 (name "python-funcy")
14157 (version "1.11")
14158 (source
14159 (origin
14160 (method git-fetch)
14161 (uri (git-reference
14162 (url "https://github.com/Suor/funcy.git")
14163 (commit version)))
14164 (sha256
14165 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14166 (file-name (git-file-name name version))))
14167 (build-system python-build-system)
14168 (arguments
14169 `(#:phases
14170 (modify-phases %standard-phases
14171 (replace 'check
14172 (lambda _
14173 (invoke "py.test"))))))
14174 (native-inputs
14175 `(("python-pytest" ,python-pytest)
14176 ("python-whatever" ,python-whatever)))
14177 (home-page "http://github.com/Suor/funcy")
14178 (synopsis "Functional tools")
14179 (description "@code{funcy} is a library that provides functional tools.
14180 Examples are:
14181 @enumerate
14182 @item merge - Merges collections of the same type
14183 @item walk - Type-preserving map
14184 @item select - Selects a part of a collection
14185 @item take - Takes the first n items of a collection
14186 @item first - Takes the first item of a collection
14187 @item remove - Predicated-removes items of a collection
14188 @item concat - Concatenates two collections
14189 @item flatten - Flattens a collection with subcollections
14190 @item distinct - Returns only distinct items
14191 @item split - Predicated-splits a collection
14192 @item split_at - Splits a collection at a given item
14193 @item group_by - Groups items by group
14194 @item pairwise - Pairs off adjacent items
14195 @item partial - Partially-applies a function
14196 @item curry - Curries a function
14197 @item compose - Composes functions
14198 @item complement - Complements a predicate
14199 @item all_fn - \"all\" with predicate
14200 @end enumerate")
14201 (license license:bsd-3)))
14202
14203 (define-public python2-funcy
14204 (package-with-python2 python-funcy))
14205
14206 (define-public python-isoweek
14207 (package
14208 (name "python-isoweek")
14209 (version "1.3.3")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "isoweek" version))
14214 (sha256
14215 (base32
14216 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14217 (build-system python-build-system)
14218 (home-page "https://github.com/gisle/isoweek")
14219 (synopsis "Objects representing a week")
14220 (description "The @code{isoweek} module provide the class Week that
14221 implements the week definition of ISO 8601. This standard also defines
14222 a notation for identifying weeks; yyyyWww (where the W is a literal).
14223 Week instances stringify to this form.")
14224 (license license:bsd-3)))
14225
14226 (define-public python2-isoweek
14227 (package-with-python2 python-isoweek))
14228
14229 (define-public python-tokenize-rt
14230 (package
14231 (name "python-tokenize-rt")
14232 (version "2.0.1")
14233 (source
14234 (origin
14235 (method url-fetch)
14236 (uri (pypi-uri "tokenize-rt" version))
14237 (sha256
14238 (base32
14239 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14240 (build-system python-build-system)
14241 (home-page "https://github.com/asottile/tokenize-rt")
14242 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14243 (description
14244 "This Python library is a wrapper around @code{tokenize} from the Python
14245 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14246 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14247 and @code{tokens_to_src} to roundtrip.")
14248 (license license:expat)))
14249
14250 (define-public python-future-fstrings
14251 (package
14252 (name "python-future-fstrings")
14253 (version "0.4.1")
14254 (source
14255 (origin
14256 (method url-fetch)
14257 (uri (pypi-uri "future_fstrings" version))
14258 (sha256
14259 (base32
14260 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14261 (build-system python-build-system)
14262 (propagated-inputs
14263 `(("python-tokenize-rt" ,python-tokenize-rt)))
14264 (home-page "https://github.com/asottile/future-fstrings")
14265 (synopsis "Backport of fstrings to Python < 3.6")
14266 (description
14267 "This package provides a UTF-8 compatible encoding
14268 @code{future_fstrings}, which performs source manipulation. It decodes the
14269 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14270 @code{f} strings.")
14271 (license license:expat)))
14272
14273 (define-public python-typed-ast
14274 (package
14275 (name "python-typed-ast")
14276 (version "1.3.5")
14277 (source
14278 (origin
14279 (method url-fetch)
14280 (uri (pypi-uri "typed-ast" version))
14281 (sha256
14282 (base32
14283 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14284 (build-system python-build-system)
14285 (arguments
14286 `(#:modules ((guix build utils)
14287 (guix build python-build-system)
14288 (ice-9 ftw)
14289 (srfi srfi-1)
14290 (srfi srfi-26))
14291 #:phases
14292 (modify-phases %standard-phases
14293 (replace 'check
14294 (lambda _
14295 (let ((cwd (getcwd)))
14296 (setenv "PYTHONPATH"
14297 (string-append cwd "/build/"
14298 (find (cut string-prefix? "lib" <>)
14299 (scandir (string-append cwd "/build")))
14300 ":"
14301 (getenv "PYTHONPATH"))))
14302 (invoke "pytest")
14303 #t)))))
14304 (native-inputs `(("python-pytest" ,python-pytest)))
14305 (home-page "https://github.com/python/typed_ast")
14306 (synopsis "Fork of Python @code{ast} modules with type comment support")
14307 (description "This package provides a parser similar to the standard
14308 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14309 include PEP 484 type comments and are independent of the version of Python
14310 under which they are run. The @code{typed_ast} parsers produce the standard
14311 Python AST (plus type comments), and are both fast and correct, as they are
14312 based on the CPython 2.7 and 3.7 parsers.")
14313 ;; See the file "LICENSE" for the details.
14314 (license (list license:psfl
14315 license:asl2.0
14316 license:expat)))) ;ast27/Parser/spark.py
14317
14318 (define-public python-typing
14319 (package
14320 (name "python-typing")
14321 (version "3.6.6")
14322 (source
14323 (origin
14324 (method url-fetch)
14325 (uri (pypi-uri "typing" version))
14326 (sha256
14327 (base32
14328 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14329 (build-system python-build-system)
14330 (home-page "https://docs.python.org/3/library/typing.html")
14331 (synopsis "Type hints for Python")
14332 (description "This is a backport of the standard library @code{typing}
14333 module to Python versions older than 3.5. Typing defines a standard notation
14334 for Python function and variable type annotations. The notation can be used
14335 for documenting code in a concise, standard format, and it has been designed
14336 to also be used by static and runtime type checkers, static analyzers, IDEs
14337 and other tools.")
14338 (license license:psfl)))
14339
14340 (define-public python2-typing
14341 (package-with-python2 python-typing))
14342
14343 (define-public python-typing-extensions
14344 (package
14345 (name "python-typing-extensions")
14346 (version "3.7.2")
14347 (source
14348 (origin
14349 (method url-fetch)
14350 (uri (pypi-uri "typing_extensions" version))
14351 (sha256
14352 (base32
14353 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14354 (build-system python-build-system)
14355 (home-page
14356 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14357 (synopsis "Experimental type hints for Python")
14358 (description
14359 "The typing_extensions module contains additional @code{typing} hints not
14360 yet present in the of the @code{typing} standard library.
14361 Included are implementations of:
14362 @enumerate
14363 @item ClassVar
14364 @item ContextManager
14365 @item Counter
14366 @item DefaultDict
14367 @item Deque
14368 @item NewType
14369 @item NoReturn
14370 @item overload
14371 @item Protocol
14372 @item runtime
14373 @item Text
14374 @item Type
14375 @item TYPE_CHECKING
14376 @item AsyncGenerator
14377 @end enumerate\n")
14378 (license license:psfl)))
14379
14380 (define-public bpython
14381 (package
14382 (name "bpython")
14383 (version "0.17.1")
14384 (source
14385 (origin
14386 (method url-fetch)
14387 (uri (pypi-uri "bpython" version))
14388 (sha256
14389 (base32
14390 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14391 (build-system python-build-system)
14392 (arguments
14393 `(#:phases
14394 (modify-phases %standard-phases
14395 (add-after 'unpack 'remove-failing-test
14396 (lambda _
14397 ;; Remove failing test. FIXME: make it pass
14398 (delete-file "bpython/test/test_args.py")
14399 #t))
14400 (add-after 'wrap 'add-aliases
14401 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14402 (lambda* (#:key outputs #:allow-other-keys)
14403 (let ((out (assoc-ref outputs "out")))
14404 (for-each
14405 (lambda (old new)
14406 (symlink old (string-append out "/bin/" new)))
14407 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14408 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14409 #t)))))
14410 (propagated-inputs
14411 `(("python-pygments" ,python-pygments)
14412 ("python-requests" ,python-requests)
14413 ("python-babel" ,python-babel) ; optional, for internationalization
14414 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14415 ("python-greenlet" ,python-greenlet)
14416 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14417 ("python-six" ,python-six)))
14418 (native-inputs
14419 `(("python-sphinx" ,python-sphinx)
14420 ("python-mock" ,python-mock)))
14421 (home-page "https://bpython-interpreter.org/")
14422 (synopsis "Fancy interface to the Python interpreter")
14423 (description "Bpython is a fancy interface to the Python
14424 interpreter. bpython's main features are
14425
14426 @enumerate
14427 @item in-line syntax highlighting,
14428 @item readline-like autocomplete with suggestions displayed as you type,
14429 @item expected parameter list for any Python function,
14430 @item \"rewind\" function to pop the last line of code from memory and
14431 re-evaluate,
14432 @item send the code you've entered off to a pastebin,
14433 @item save the code you've entered to a file, and
14434 @item auto-indentation.
14435 @end enumerate")
14436 (license license:expat)))
14437
14438 (define-public bpython2
14439 (let ((base (package-with-python2
14440 (strip-python2-variant bpython))))
14441 (package (inherit base)
14442 (name "bpython2")
14443 (arguments
14444 `(#:python ,python-2
14445 #:phases
14446 (modify-phases %standard-phases
14447 (add-after 'unpack 'remove-failing-test
14448 (lambda _
14449 ;; Remove failing test. FIXME: make it pass
14450 (delete-file "bpython/test/test_args.py")
14451 ;; Disable failing test-cases (renaming inhibits they are
14452 ;; discovered)
14453 (substitute* "bpython/test/test_curtsies_repl.py"
14454 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14455 (string-append a "xxx_off_" b))
14456 (("^(\\s*def )(test_complex\\W)" _ a b)
14457 (string-append a "xxx_off_" b)))
14458 #t))
14459 (add-before 'build 'rename-scripts
14460 ;; rename the scripts to bypthon2, bpdb2, etc.
14461 (lambda _
14462 (substitute* "setup.py"
14463 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14464 (string-append name "2" rest "\n"))
14465 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14466 (string-append name "2" (or sub "") rest "\n")))
14467 #t))))))))
14468
14469 (define-public python-pyinotify
14470 (package
14471 (name "python-pyinotify")
14472 (version "0.9.6")
14473 (source (origin
14474 (method url-fetch)
14475 (uri (pypi-uri "pyinotify" version))
14476 (sha256
14477 (base32
14478 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14479 (build-system python-build-system)
14480 (arguments `(#:tests? #f)) ;no tests
14481 (home-page "https://github.com/seb-m/pyinotify")
14482 (synopsis "Python library for monitoring inotify events")
14483 (description
14484 "@code{pyinotify} provides a Python interface for monitoring
14485 file system events on Linux.")
14486 (license license:expat)))
14487
14488 (define-public python2-pyinotify
14489 (package-with-python2 python-pyinotify))
14490
14491 ;; Ada parser uses this version.
14492 (define-public python2-quex-0.67.3
14493 (package
14494 (name "python2-quex")
14495 (version "0.67.3")
14496 (source
14497 (origin
14498 (method url-fetch)
14499 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14500 (version-major+minor version)
14501 "/quex-" version ".zip"))
14502 (sha256
14503 (base32
14504 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14505 (build-system python-build-system)
14506 (native-inputs
14507 `(("unzip" ,unzip)))
14508 (arguments
14509 `(#:python ,python-2
14510 #:tests? #f
14511 #:phases
14512 (modify-phases %standard-phases
14513 (delete 'configure)
14514 (delete 'build)
14515 (replace 'install
14516 (lambda* (#:key outputs #:allow-other-keys)
14517 (let* ((out (assoc-ref outputs "out"))
14518 (share/quex (string-append out "/share/quex"))
14519 (bin (string-append out "/bin")))
14520 (copy-recursively "." share/quex)
14521 (mkdir-p bin)
14522 (symlink (string-append share/quex "/quex-exe.py")
14523 (string-append bin "/quex"))
14524 #t))))))
14525 (native-search-paths
14526 (list (search-path-specification
14527 (variable "QUEX_PATH")
14528 (files '("share/quex")))))
14529 (home-page "http://quex.sourceforge.net/")
14530 (synopsis "Lexical analyzer generator in Python")
14531 (description "@code{quex} is a lexical analyzer generator in Python.")
14532 (license license:lgpl2.1+))) ; Non-military
14533
14534 (define-public python2-quex
14535 (package (inherit python2-quex-0.67.3)
14536 (name "python2-quex")
14537 (version "0.68.1")
14538 (source
14539 (origin
14540 (method url-fetch)
14541 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14542 (sha256
14543 (base32
14544 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14545 (file-name (string-append name "-" version ".tar.gz"))))))
14546
14547 (define-public python-more-itertools
14548 (package
14549 (name "python-more-itertools")
14550 (version "7.1.0")
14551 (source
14552 (origin
14553 (method url-fetch)
14554 (uri (pypi-uri "more-itertools" version))
14555 (sha256
14556 (base32
14557 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14558 (build-system python-build-system)
14559 (home-page "https://github.com/erikrose/more-itertools")
14560 (synopsis "More routines for operating on iterables, beyond itertools")
14561 (description "Python's built-in @code{itertools} module implements a
14562 number of iterator building blocks inspired by constructs from APL, Haskell,
14563 and SML. @code{more-itertools} includes additional building blocks for
14564 working with iterables.")
14565 (properties `((python2-variant . ,(delay python2-more-itertools))))
14566 (license license:expat)))
14567
14568 ;; The 5.x series are the last versions supporting Python 2.7.
14569 (define-public python2-more-itertools
14570 (package
14571 (inherit python-more-itertools)
14572 (name "python2-more-itertools")
14573 (version "5.0.0")
14574 (source (origin
14575 (method url-fetch)
14576 (uri (pypi-uri "more-itertools" version))
14577 (sha256
14578 (base32
14579 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14580 (arguments
14581 `(#:python ,python2-minimal))
14582 (propagated-inputs
14583 `(("python2-six" ,python2-six-bootstrap)))))
14584
14585 (define-public python-latexcodec
14586 (package
14587 (name "python-latexcodec")
14588 (version "1.0.6")
14589 (source
14590 (origin
14591 (method url-fetch)
14592 (uri (pypi-uri "latexcodec" version))
14593 (sha256
14594 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14595 (build-system python-build-system)
14596 (inputs
14597 `(("python-six" ,python-six)))
14598 (home-page "https://readthedocs.org/projects/latexcodec/")
14599 (synopsis "Work with LaTeX code in Python")
14600 (description "Lexer and codec to work with LaTeX code in Python.")
14601 (license license:expat)))
14602
14603 (define-public python-pybtex
14604 (package
14605 (name "python-pybtex")
14606 (version "0.21")
14607 (source
14608 (origin
14609 (method url-fetch)
14610 (uri (pypi-uri "pybtex" version))
14611 (sha256
14612 (base32
14613 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14614 (build-system python-build-system)
14615 (native-inputs
14616 `(("python-nose" ,python-nose)))
14617 (inputs
14618 `(("python-latexcodec" ,python-latexcodec)
14619 ("python-pyyaml" ,python-pyyaml)
14620 ("python-six" ,python-six)))
14621 (arguments
14622 `(#:test-target "nosetests"))
14623 (home-page "https://pybtex.org/")
14624 (synopsis "BibTeX-compatible bibliography processor")
14625 (description "Pybtex is a BibTeX-compatible bibliography processor written
14626 in Python. You can simply type pybtex instead of bibtex.")
14627 (license license:expat)))
14628
14629 (define-public python-onetimepass
14630 (package
14631 (name "python-onetimepass")
14632 (version "1.0.1")
14633 (source
14634 (origin
14635 (method url-fetch)
14636 (uri (pypi-uri "onetimepass" version))
14637 (sha256
14638 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14639 (build-system python-build-system)
14640 (propagated-inputs `(("python-six" ,python-six)))
14641 (home-page "https://github.com/tadeck/onetimepass/")
14642 (synopsis "One-time password library")
14643 (description "Python one-time password library for HMAC-based (HOTP) and
14644 time-based (TOTP) passwords.")
14645 (license license:expat)))
14646
14647 (define-public python-parso
14648 (package
14649 (name "python-parso")
14650 (version "0.3.1")
14651 (source
14652 (origin
14653 (method url-fetch)
14654 (uri (pypi-uri "parso" version))
14655 (sha256
14656 (base32
14657 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14658 (native-inputs
14659 `(("python-pytest" ,python-pytest)))
14660 (build-system python-build-system)
14661 (home-page "https://github.com/davidhalter/parso")
14662 (synopsis "Python Parser")
14663 (description "Parso is a Python parser that supports error recovery and
14664 round-trip parsing for different Python versions (in multiple Python versions).
14665 Parso is also able to list multiple syntax errors in your Python file.")
14666 (license license:expat)))
14667
14668 (define-public python2-parso
14669 (package-with-python2 python-parso))
14670
14671 (define-public python-async-generator
14672 (package
14673 (name "python-async-generator")
14674 (version "1.10")
14675 (source
14676 (origin
14677 (method url-fetch)
14678 (uri (pypi-uri "async_generator" version))
14679 (sha256
14680 (base32
14681 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
14682 (build-system python-build-system)
14683 (native-inputs
14684 `(("python-pytest" ,python-pytest)))
14685 (home-page "https://github.com/python-trio/async_generator")
14686 (synopsis "Async generators and context managers for Python 3.5+")
14687 (description "@code{async_generator} back-ports Python 3.6's native async
14688 generators and Python 3.7's context managers into Python 3.5.")
14689 ;; Dual licensed.
14690 (license (list license:expat license:asl2.0))))
14691
14692 (define-public python-async-timeout
14693 (package
14694 (name "python-async-timeout")
14695 (version "3.0.1")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "async-timeout" version))
14700 (sha256
14701 (base32
14702 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14703 (build-system python-build-system)
14704 (home-page "https://github.com/aio-libs/async_timeout/")
14705 (synopsis "Timeout context manager for asyncio programs")
14706 (description "@code{async-timeout} provides a timeout timeout context
14707 manager compatible with @code{asyncio}.")
14708 (license license:asl2.0)))
14709
14710 (define-public python-glob2
14711 (package
14712 (name "python-glob2")
14713 (version "0.6")
14714 (source
14715 (origin
14716 (method git-fetch)
14717 (uri (git-reference
14718 (url "https://github.com/miracle2k/python-glob2.git")
14719 (commit version)))
14720 (file-name (git-file-name name version))
14721 (sha256
14722 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
14723 (build-system python-build-system)
14724 (home-page "https://github.com/miracle2k/python-glob2/")
14725 (synopsis "Extended Version of the python buildin glob module")
14726 (description "This is an extended version of the Python
14727 @url{http://docs.python.org/library/glob.html, built-in glob module} which
14728 adds:
14729
14730 @itemize
14731 @item The ability to capture the text matched by glob patterns, and return
14732 those matches alongside the file names.
14733 @item A recursive @code{**} globbing syntax, akin for example to the
14734 @code{globstar} option of Bash.
14735 @item The ability to replace the file system functions used, in order to glob
14736 on virtual file systems.
14737 @item Compatible with Python 2 and Python 3 (tested with 3.3).
14738 @end itemize
14739
14740 Glob2 currently based on the glob code from Python 3.3.1.")
14741 (license license:bsd-2)))
14742
14743 (define-public python2-glob2
14744 (package-with-python2 python-glob2))
14745
14746 (define-public python-gipc
14747 (package
14748 (name "python-gipc")
14749 (version "0.6.0")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "gipc" version ".zip"))
14754 (sha256
14755 (base32
14756 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14757 (build-system python-build-system)
14758 (native-inputs
14759 `(("unzip" ,unzip)))
14760 (propagated-inputs
14761 `(("python-gevent" ,python-gevent)))
14762 (home-page "http://gehrcke.de/gipc")
14763 (synopsis "Child process management in the context of gevent")
14764 (description "Usage of Python's multiprocessing package in a
14765 gevent-powered application may raise problems. With @code{gipc},
14766 process-based child processes can safely be created anywhere within a
14767 gevent-powered application.")
14768 (license license:expat)))
14769
14770 (define-public python2-gipc
14771 (package-with-python2 python-gipc))
14772
14773 (define-public python-fusepy
14774 (package
14775 (name "python-fusepy")
14776 (version "2.0.4")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "fusepy" version))
14781 (sha256
14782 (base32
14783 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14784 (build-system python-build-system)
14785 (arguments
14786 `(#:phases
14787 (modify-phases %standard-phases
14788 (add-before 'build 'set-library-file-name
14789 (lambda* (#:key inputs #:allow-other-keys)
14790 (let ((fuse (assoc-ref inputs "fuse")))
14791 (substitute* "fuse.py"
14792 (("find_library\\('fuse'\\)")
14793 (string-append "'" fuse "/lib/libfuse.so'")))
14794 #t))))))
14795 (propagated-inputs
14796 `(("fuse" ,fuse)))
14797 (home-page "https://github.com/fusepy/fusepy")
14798 (synopsis "Simple ctypes bindings for FUSE")
14799 (description "Python module that provides a simple interface to FUSE and
14800 MacFUSE. The binding is created using the standard @code{ctypes} library.")
14801 (license license:isc)))
14802
14803 (define-public python2-fusepy
14804 (package-with-python2 python-fusepy))
14805
14806 (define-public python2-gdrivefs
14807 (package
14808 (name "python2-gdrivefs")
14809 (version "0.14.9")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "gdrivefs" version))
14814 (sha256
14815 (base32
14816 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14817 (build-system python-build-system)
14818 (arguments
14819 `(#:python ,python-2
14820 #:phases
14821 (modify-phases %standard-phases
14822 (add-before 'build 'patch-setup-py
14823 (lambda _
14824 ;; Update requirements from dependency==version
14825 ;; to dependency>=version
14826 (substitute* "gdrivefs/resources/requirements.txt"
14827 (("==") ">="))
14828 #t)))))
14829 (native-inputs
14830 `(("python2-gipc" ,python2-gipc)
14831 ("python2-gevent" ,python2-gevent)
14832 ("python2-greenlet" ,python2-greenlet)
14833 ("python2-httplib2" ,python2-httplib2)
14834 ("python2-uritemplate" ,python2-uritemplate)
14835 ("python2-oauth2client" ,python2-oauth2client)
14836 ("python2-six" ,python2-six)))
14837 (propagated-inputs
14838 `(("python2-dateutil" ,python2-dateutil)
14839 ("python2-fusepy" ,python2-fusepy)
14840 ("python2-google-api-client" ,python2-google-api-client)))
14841 (home-page "https://github.com/dsoprea/GDriveFS")
14842 (synopsis "Mount Google Drive as a local file system")
14843 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14844 under Python 2.7.")
14845 (license license:gpl2)))
14846
14847 (define-public pybind11
14848 (package
14849 (name "pybind11")
14850 (version "2.2.4")
14851 (source (origin
14852 (method git-fetch)
14853 (uri (git-reference
14854 (url "https://github.com/pybind/pybind11.git")
14855 (commit (string-append "v" version))))
14856 (sha256
14857 (base32
14858 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14859 (file-name (git-file-name name version))))
14860 (build-system cmake-build-system)
14861 (native-inputs
14862 `(("python" ,python)
14863 ("python-pytest" ,python-pytest)))
14864 (arguments
14865 `(#:test-target "check"))
14866 (home-page "https://github.com/pybind/pybind11/")
14867 (synopsis "Seamless operability between C++11 and Python")
14868 (description "pybind11 is a lightweight header-only library that exposes
14869 C++ types in Python and vice versa, mainly to create Python bindings of
14870 existing C++ code. Its goals and syntax are similar to the excellent
14871 Boost.Python library by David Abrahams: to minimize boilerplate code in
14872 traditional extension modules by inferring type information using compile-time
14873 introspection.")
14874 (license license:expat)))
14875
14876 (define-public python-fasteners
14877 (package
14878 (name "python-fasteners")
14879 (version "0.14.1")
14880 (source
14881 (origin
14882 (method url-fetch)
14883 (uri (pypi-uri "fasteners" version))
14884 (sha256
14885 (base32
14886 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14887 (build-system python-build-system)
14888 (propagated-inputs
14889 `(("python-monotonic" ,python-monotonic)
14890 ("python-six" ,python-six)
14891 ("python-testtools" ,python-testtools)))
14892 (home-page "https://github.com/harlowja/fasteners")
14893 (synopsis "Python package that provides useful locks")
14894 (description
14895 "This package provides a Python program that provides following locks:
14896
14897 @itemize
14898 @item Locking decorator
14899 @item Reader-writer locks
14900 @item Inter-process locks
14901 @item Generic helpers
14902 @end itemize\n")
14903 (properties `((python2-variant . ,(delay python2-fasteners))))
14904 (license license:asl2.0)))
14905
14906 (define-public python2-fasteners
14907 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14908 (package
14909 (inherit base)
14910 (propagated-inputs
14911 `(("python2-futures" ,python2-futures)
14912 ,@(package-propagated-inputs base))))))
14913
14914 (define-public python-requests-file
14915 (package
14916 (name "python-requests-file")
14917 (version "1.4.3")
14918 (source
14919 (origin
14920 (method url-fetch)
14921 (uri (pypi-uri "requests-file" version))
14922 (sha256
14923 (base32
14924 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14925 (build-system python-build-system)
14926 (propagated-inputs
14927 `(("python-requests" ,python-requests)
14928 ("python-six" ,python-six)))
14929 (home-page
14930 "https://github.com/dashea/requests-file")
14931 (synopsis "File transport adapter for Requests")
14932 (description
14933 "Requests-File is a transport adapter for use with the Requests Python
14934 library to allow local file system access via @code{file://} URLs.")
14935 (license license:asl2.0)))
14936
14937 (define-public python2-requests-file
14938 (package-with-python2 python-requests-file))
14939
14940 (define-public python-tldextract
14941 (package
14942 (name "python-tldextract")
14943 (version "2.2.0")
14944 (source
14945 (origin
14946 (method url-fetch)
14947 (uri (pypi-uri "tldextract" version))
14948 (sha256
14949 (base32
14950 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14951 (build-system python-build-system)
14952 (native-inputs
14953 `(("python-pytest" ,python-pytest)
14954 ("python-responses" ,python-responses)))
14955 (propagated-inputs
14956 `(("python-idna" ,python-idna)
14957 ("python-requests" ,python-requests)
14958 ("python-requests-file" ,python-requests-file)))
14959 (home-page
14960 "https://github.com/john-kurkowski/tldextract")
14961 (synopsis
14962 "Separate the TLD from the registered domain and subdomains of a URL")
14963 (description
14964 "TLDExtract accurately separates the TLD from the registered domain and
14965 subdomains of a URL, using the Public Suffix List. By default, this includes
14966 the public ICANN TLDs and their exceptions. It can optionally support the
14967 Public Suffix List's private domains as well.")
14968 (license license:bsd-3)))
14969
14970 (define-public python2-tldextract
14971 (package-with-python2 python-tldextract))
14972
14973 (define-public python-pynamecheap
14974 (package
14975 (name "python-pynamecheap")
14976 (version "0.0.3")
14977 (source
14978 (origin
14979 (method url-fetch)
14980 (uri (pypi-uri "PyNamecheap" version))
14981 (sha256
14982 (base32
14983 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14984 (build-system python-build-system)
14985 (propagated-inputs
14986 `(("python-requests" ,python-requests)))
14987 (home-page
14988 "https://github.com/Bemmu/PyNamecheap")
14989 (synopsis
14990 "Namecheap API client in Python")
14991 (description
14992 "PyNamecheap is a Namecheap API client in Python.")
14993 (license license:expat)))
14994
14995 (define-public python2-pynamecheap
14996 (package-with-python2 python-pynamecheap))
14997
14998 (define-public python-dns-lexicon
14999 (package
15000 (name "python-dns-lexicon")
15001 (version "2.4.0")
15002 (source
15003 (origin
15004 (method url-fetch)
15005 (uri (pypi-uri "dns-lexicon" version))
15006 (sha256
15007 (base32
15008 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15009 (build-system python-build-system)
15010 (arguments
15011 `(#:tests? #f)) ;requires internet access
15012 (propagated-inputs
15013 `(("python-future" ,python-future)
15014 ("python-pynamecheap" ,python-pynamecheap)
15015 ("python-requests" ,python-requests)
15016 ("python-tldextract" ,python-tldextract)
15017 ("python-urllib3" ,python-urllib3)))
15018 (home-page "https://github.com/AnalogJ/lexicon")
15019 (synopsis
15020 "Manipulate DNS records on various DNS providers")
15021 (description
15022 "Lexicon provides a way to manipulate DNS records on multiple DNS
15023 providers in a standardized way. It has a CLI but it can also be used as a
15024 Python library. It was designed to be used in automation, specifically with
15025 Let's Encrypt.")
15026 (license license:expat)))
15027
15028 (define-public python2-dns-lexicon
15029 (package-with-python2 python-dns-lexicon))
15030
15031 (define-public python-commandlines
15032 (package
15033 (name "python-commandlines")
15034 (version "0.4.1")
15035 (source
15036 (origin
15037 (method url-fetch)
15038 (uri (pypi-uri "commandlines" version))
15039 (sha256
15040 (base32
15041 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15042 (build-system python-build-system)
15043 (home-page "https://github.com/chrissimpkins/commandlines")
15044 (synopsis "Command line argument to object parsing library")
15045 (description
15046 "@code{Commandlines} is a Python library for command line application
15047 development that supports command line argument parsing, command string
15048 validation testing and application logic.")
15049 (license license:expat)))
15050
15051 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15052 ;; python-numba. They have a very unflexible relationship.
15053 (define-public python-numba
15054 (package
15055 (name "python-numba")
15056 (version "0.42.0")
15057 (source
15058 (origin
15059 (method url-fetch)
15060 (uri (pypi-uri "numba" version))
15061 (sha256
15062 (base32
15063 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15064 (build-system python-build-system)
15065 (arguments
15066 `(#:modules ((guix build utils)
15067 (guix build python-build-system)
15068 (ice-9 ftw)
15069 (srfi srfi-1)
15070 (srfi srfi-26))
15071 #:phases
15072 (modify-phases %standard-phases
15073 (add-after 'unpack 'disable-proprietary-features
15074 (lambda _
15075 (setenv "NUMBA_DISABLE_HSA" "1")
15076 (setenv "NUMBA_DISABLE_CUDA" "1")
15077 #t))
15078 (add-after 'unpack 'remove-failing-tests
15079 (lambda _
15080 ;; FIXME: these tests fail for unknown reasons:
15081 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15082 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15083 (substitute* "numba/tests/test_dispatcher.py"
15084 (("def test(_non_writable_pycache)" _ m)
15085 (string-append "def guix_skip" m))
15086 (("def test(_non_creatable_pycache)" _ m)
15087 (string-append "def guix_skip" m))
15088 (("def test(_frozen)" _ m)
15089 (string-append "def guix_skip" m)))
15090
15091 ;; These tests fail because we don't run the tests from the build
15092 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15093 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15094 (substitute* "numba/tests/test_pycc.py"
15095 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15096 (string-append "def guix_skip" m)))
15097 #t))
15098 (replace 'check
15099 (lambda _
15100 (let ((cwd (getcwd)))
15101 (setenv "PYTHONPATH"
15102 (string-append cwd "/build/"
15103 (find (cut string-prefix? "lib" <>)
15104 (scandir (string-append cwd "/build")))
15105 ":"
15106 (getenv "PYTHONPATH")))
15107 ;; Something is wrong with the PYTHONPATH when running the
15108 ;; tests from the build directory, as it complains about not being
15109 ;; able to import certain modules.
15110 (with-directory-excursion "/tmp"
15111 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15112 #t)))))
15113 (propagated-inputs
15114 `(("python-llvmlite" ,python-llvmlite)
15115 ("python-numpy" ,python-numpy)
15116 ("python-singledispatch" ,python-singledispatch)))
15117 ;; Needed for tests.
15118 (inputs
15119 `(("python-jinja2" ,python-jinja2)
15120 ("python-pygments" ,python-pygments)))
15121 (home-page "https://numba.pydata.org")
15122 (synopsis "Compile Python code using LLVM")
15123 (description "Numba gives you the power to speed up your applications with
15124 high performance functions written directly in Python. With a few
15125 annotations, array-oriented and math-heavy Python code can be just-in-time
15126 compiled to native machine instructions, similar in performance to C, C++ and
15127 Fortran, without having to switch languages or Python interpreters.
15128
15129 Numba works by generating optimized machine code using the LLVM compiler
15130 infrastructure at import time, runtime, or statically (using the included pycc
15131 tool).")
15132 (license license:bsd-3)))
15133
15134 (define-public python-anndata
15135 (package
15136 (name "python-anndata")
15137 (version "0.6.18")
15138 (source
15139 (origin
15140 (method url-fetch)
15141 (uri (pypi-uri "anndata" version))
15142 (sha256
15143 (base32
15144 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15145 (build-system python-build-system)
15146 (propagated-inputs
15147 `(("python-h5py" ,python-h5py)
15148 ("python-natsort" ,python-natsort)
15149 ("python-pandas" ,python-pandas)
15150 ("python-scipy" ,python-scipy)))
15151 (home-page "https://github.com/theislab/anndata")
15152 (synopsis "Annotated data for data analysis pipelines")
15153 (description "Anndata is a package for simple (functional) high-level APIs
15154 for data analysis pipelines. In this context, it provides an efficient,
15155 scalable way of keeping track of data together with learned annotations and
15156 reduces the code overhead typically encountered when using a mostly
15157 object-oriented library such as @code{scikit-learn}.")
15158 (license license:bsd-3)))
15159
15160 (define-public python-dill
15161 (package
15162 (name "python-dill")
15163 (version "0.2.9")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "dill" version))
15168 (sha256
15169 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15170 (build-system python-build-system)
15171 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15172 (arguments '(#:tests? #f))
15173 (home-page "https://pypi.org/project/dill")
15174 (synopsis "Serialize all of Python")
15175 (description "Dill extends Python's @code{pickle} module for serializing
15176 and de-serializing Python objects to the majority of the built-in Python
15177 types. Dill provides the user the same interface as the @code{pickle} module,
15178 and also includes some additional features. In addition to pickling Python
15179 objects, @code{dill} provides the ability to save the state of an interpreter
15180 session in a single command. Hence, it would be feasible to save a
15181 interpreter session, close the interpreter, ship the pickled file to another
15182 computer, open a new interpreter, unpickle the session and thus continue from
15183 the saved state of the original interpreter session.")
15184 (license license:bsd-3)))
15185
15186 (define-public python-multiprocess
15187 (package
15188 (name "python-multiprocess")
15189 (version "0.70.6.1")
15190 (source
15191 (origin
15192 (method url-fetch)
15193 (uri (pypi-uri "multiprocess" version))
15194 (sha256
15195 (base32
15196 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15197 (build-system python-build-system)
15198 (propagated-inputs
15199 `(("python-dill" ,python-dill)))
15200 (home-page "https://pypi.org/project/multiprocess")
15201 (synopsis "Multiprocessing and multithreading in Python")
15202 (description
15203 "This package is a fork of the multiprocessing Python package, a package
15204 which supports the spawning of processes using the API of the standard
15205 library's @code{threading} module.")
15206 (license license:bsd-3)))
15207
15208 (define-public python-toolz
15209 (package
15210 (name "python-toolz")
15211 (version "0.9.0")
15212 (source
15213 (origin
15214 (method url-fetch)
15215 (uri (pypi-uri "toolz" version))
15216 (sha256
15217 (base32
15218 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15219 (build-system python-build-system)
15220 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15221 ;; unregistered loader type"
15222 (arguments '(#:tests? #f))
15223 (home-page "https://github.com/pytoolz/toolz/")
15224 (synopsis "List processing tools and functional utilities")
15225 (description
15226 "This package provides a set of utility functions for iterators,
15227 functions, and dictionaries.")
15228 (license license:bsd-3)))
15229
15230 (define-public python2-toolz
15231 (package-with-python2 python-toolz))
15232
15233 (define-public python-cytoolz
15234 (package
15235 (name "python-cytoolz")
15236 (version "0.9.0.1")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "cytoolz" version))
15241 (sha256
15242 (base32
15243 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15244 (build-system python-build-system)
15245 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15246 ;; 'exceptions'"
15247 (arguments '(#:tests? #f))
15248 (propagated-inputs
15249 `(("python-toolz" ,python-toolz)))
15250 (native-inputs
15251 `(("python-cython" ,python-cython)))
15252 (home-page "https://github.com/pytoolz/cytoolz")
15253 (synopsis "High performance functional utilities")
15254 (description
15255 "The cytoolz package implements the same API as provided by toolz. The
15256 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15257 that is accessible to other projects developed in Cython.")
15258 (license license:bsd-3)))
15259
15260 (define-public python-sortedcontainers
15261 (package
15262 (name "python-sortedcontainers")
15263 (version "2.0.4")
15264 (source
15265 (origin
15266 (method url-fetch)
15267 (uri (pypi-uri "sortedcontainers" version))
15268 (sha256
15269 (base32
15270 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15271 (build-system python-build-system)
15272 (native-inputs
15273 `(("python-tox" ,python-tox)))
15274 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15275 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15276 (description
15277 "This package provides a sorted collections library, written in
15278 pure-Python.")
15279 (license license:asl2.0)))
15280
15281 (define-public python-cloudpickle
15282 (package
15283 (name "python-cloudpickle")
15284 (version "0.6.1")
15285 (source
15286 (origin
15287 (method url-fetch)
15288 (uri (pypi-uri "cloudpickle" version))
15289 (sha256
15290 (base32
15291 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15292 (build-system python-build-system)
15293 ;; FIXME: there are 5 errors in 122 tests:
15294 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15295 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15296 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15297 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15298 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15299 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15300 (arguments '(#:tests? #f))
15301 (native-inputs
15302 `(("python-pytest" ,python-pytest)
15303 ("python-mock" ,python-mock)
15304 ("python-tornado" ,python-tornado)))
15305 (home-page "https://github.com/cloudpipe/cloudpickle")
15306 (synopsis "Extended pickling support for Python objects")
15307 (description
15308 "Cloudpickle makes it possible to serialize Python constructs not
15309 supported by the default pickle module from the Python standard library. It
15310 is especially useful for cluster computing where Python expressions are
15311 shipped over the network to execute on remote hosts, possibly close to the
15312 data.")
15313 (license license:bsd-3)))
15314
15315 (define-public python2-cloudpickle
15316 (package-with-python2 python-cloudpickle))
15317
15318 (define-public python-locket
15319 (package
15320 (name "python-locket")
15321 (version "0.2.0")
15322 (source
15323 (origin
15324 (method url-fetch)
15325 (uri (pypi-uri "locket" version))
15326 (sha256
15327 (base32
15328 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15329 (build-system python-build-system)
15330 (home-page "https://github.com/mwilliamson/locket.py")
15331 (synopsis "File-based locks for Python")
15332 (description
15333 "Locket implements a lock that can be used by multiple processes provided
15334 they use the same path.")
15335 (license license:bsd-2)))
15336
15337 (define-public python2-locket
15338 (package-with-python2 python-locket))
15339
15340 (define-public python-blosc
15341 (package
15342 (name "python-blosc")
15343 (version "1.5.1")
15344 (source
15345 (origin
15346 (method url-fetch)
15347 (uri (pypi-uri "blosc" version))
15348 (sha256
15349 (base32
15350 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15351 (build-system python-build-system)
15352 ;; FIXME: all tests pass, but then this error is printed:
15353 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15354 (arguments '(#:tests? #f))
15355 (propagated-inputs
15356 `(("python-numpy" ,python-numpy)))
15357 (home-page "https://github.com/blosc/python-blosc")
15358 (synopsis "Python wrapper for the Blosc data compressor library")
15359 (description "Blosc is a high performance compressor optimized for binary
15360 data. It has been designed to transmit data to the processor cache faster
15361 than the traditional, non-compressed, direct memory fetch approach via a
15362 @code{memcpy()} system call.
15363
15364 Blosc works well for compressing numerical arrays that contains data with
15365 relatively low entropy, like sparse data, time series, grids with
15366 regular-spaced values, etc.
15367
15368 This Python package wraps the Blosc library.")
15369 (license license:bsd-3)))
15370
15371 (define-public python2-blosc
15372 (package-with-python2 python-blosc))
15373
15374 (define-public python-partd
15375 (package
15376 (name "python-partd")
15377 (version "0.3.9")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "partd" version))
15382 (sha256
15383 (base32
15384 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15385 (build-system python-build-system)
15386 (propagated-inputs
15387 `(("python-blosc" ,python-blosc)
15388 ("python-locket" ,python-locket)
15389 ("python-numpy" ,python-numpy)
15390 ("python-pandas" ,python-pandas)
15391 ("python-pyzmq" ,python-pyzmq)
15392 ("python-toolz" ,python-toolz)))
15393 (home-page "https://github.com/dask/partd/")
15394 (synopsis "Appendable key-value storage")
15395 (description "Partd stores key-value pairs. Values are raw bytes. We
15396 append on old values. Partd excels at shuffling operations.")
15397 (license license:bsd-3)))
15398
15399 (define-public python2-partd
15400 (package-with-python2 python-partd))
15401
15402 (define-public python-dask
15403 (package
15404 (name "python-dask")
15405 (version "1.2.2")
15406 (source
15407 (origin
15408 (method url-fetch)
15409 (uri (pypi-uri "dask" version))
15410 (sha256
15411 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15412 (build-system python-build-system)
15413 ;; A single test out of 5000+ fails. This test is marked as xfail when
15414 ;; pytest-xdist is used.
15415 (arguments
15416 `(#:phases
15417 (modify-phases %standard-phases
15418 (add-after 'unpack 'disable-broken-test
15419 (lambda _
15420 (substitute* "dask/tests/test_threaded.py"
15421 (("def test_interrupt\\(\\)" m)
15422 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15423 m)))
15424 (when (which "python2")
15425 ;; This test fails with recent Pandas:
15426 ;; <https://github.com/dask/dask/issues/3794>.
15427 (substitute* "dask/dataframe/tests/test_dataframe.py"
15428 (("def test_info\\(\\)" m)
15429 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15430 m))))
15431 #t))
15432 (replace 'check
15433 (lambda _ (invoke "pytest" "-vv"))))))
15434 (propagated-inputs
15435 `(("python-cloudpickle" ,python-cloudpickle)
15436 ("python-numpy" ,python-numpy)
15437 ("python-pandas" ,python-pandas)
15438 ("python-partd" ,python-partd)
15439 ("python-toolz" ,python-toolz)
15440 ("python-pyyaml" ,python-pyyaml)))
15441 (native-inputs
15442 `(("python-pytest" ,python-pytest)
15443 ("python-pytest-runner" ,python-pytest-runner)))
15444 (home-page "https://github.com/dask/dask/")
15445 (synopsis "Parallel computing with task scheduling")
15446 (description
15447 "Dask is a flexible parallel computing library for analytics. It
15448 consists of two components: dynamic task scheduling optimized for computation,
15449 and large data collections like parallel arrays, dataframes, and lists that
15450 extend common interfaces like NumPy, Pandas, or Python iterators to
15451 larger-than-memory or distributed environments. These parallel collections
15452 run on top of the dynamic task schedulers. ")
15453 (license license:bsd-3)))
15454
15455 (define-public python2-dask
15456 (package-with-python2 python-dask))
15457
15458 (define-public python-ilinkedlist
15459 (package
15460 (name "python-ilinkedlist")
15461 (version "0.4.0")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "ilinkedlist" version))
15466 (sha256
15467 (base32
15468 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15469 (build-system python-build-system)
15470 (native-inputs `(("python-pytest" ,python-pytest)))
15471 (inputs `(("python" ,python)))
15472 (home-page "https://github.com/luther9/ilinkedlist-py")
15473 (synopsis "Immutable linked list library")
15474 (description
15475 "This is a implementation of immutable linked lists for Python. It
15476 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15477 Since a linked list is treated as immutable, it is hashable, and its length
15478 can be retrieved in constant time. Some of the terminology is inspired by
15479 LISP. It is possible to create an improper list by creating a @code{Pair}
15480 with a non-list @code{cdr}.")
15481 (license license:gpl3+)))
15482
15483 (define-public python-readlike
15484 (package
15485 (name "python-readlike")
15486 (version "0.1.3")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "readlike" version))
15491 (sha256
15492 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15493 (build-system python-build-system)
15494 (home-page "https://github.com/jangler/readlike")
15495 (synopsis "GNU Readline-like line editing module")
15496 (description
15497 "This Python module provides line editing functions similar to the default
15498 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15499 @code{readline} package, this one allows access to those capabilties in settings
15500 outside of a standard command-line interface. It is especially well-suited to
15501 interfacing with Urwid, due to a shared syntax for describing key inputs.
15502
15503 Currently, all stateless Readline commands are implemented. Yanking and history
15504 are not supported.")
15505 (license license:expat)))
15506
15507 (define-public python2-readlike
15508 (package-with-python2 python-readlike))
15509
15510 (define-public python-reparser
15511 (package
15512 (name "python-reparser")
15513 (version "1.4.3")
15514 (source
15515 (origin
15516 (method url-fetch)
15517 (uri (pypi-uri "ReParser" version))
15518 (sha256
15519 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15520 (build-system python-build-system)
15521 (home-page "https://github.com/xmikos/reparser")
15522 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15523 (description
15524 "This Python library provides a simple lexer/parser for inline markup based
15525 on regular expressions.")
15526 (license license:expat)))
15527
15528 (define-public python2-reparser
15529 (let ((reparser (package-with-python2
15530 (strip-python2-variant python-reparser))))
15531 (package (inherit reparser)
15532 (propagated-inputs
15533 `(("python2-enum34" ,python2-enum34)
15534 ,@(package-propagated-inputs reparser))))))
15535
15536 (define-public python-precis-i18n
15537 (package
15538 (name "python-precis-i18n")
15539 (version "1.0.0")
15540 (source
15541 (origin
15542 (method url-fetch)
15543 (uri (pypi-uri "precis_i18n" version))
15544 (sha256
15545 (base32
15546 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15547 (build-system python-build-system)
15548 (home-page "https://github.com/byllyfish/precis_i18n")
15549 (synopsis "Implementation of the PRECIS framework")
15550 (description
15551 "This module implements the PRECIS Framework as described in RFC 8264,
15552 RFC 8265 and RFC 8266.")
15553 (license license:expat)))
15554
15555 (define-public python-absl-py
15556 (package
15557 (name "python-absl-py")
15558 (version "0.6.1")
15559 (source
15560 (origin
15561 (method url-fetch)
15562 (uri (pypi-uri "absl-py" version))
15563 (sha256
15564 (base32
15565 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15566 (build-system python-build-system)
15567 (propagated-inputs
15568 `(("python-six" ,python-six)))
15569 (home-page "https://github.com/abseil/abseil-py")
15570 (synopsis "Abseil Python common libraries")
15571 (description
15572 "This package provides the Abseil Python Common Libraries, a collection
15573 of Python libraries for building Python applications.")
15574 (license license:asl2.0)))
15575
15576 (define-public python-astor
15577 (package
15578 (name "python-astor")
15579 (version "0.7.1")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "astor" version))
15584 (sha256
15585 (base32
15586 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15587 (build-system python-build-system)
15588 ;; FIXME: There are two errors and two test failures.
15589 (arguments `(#:tests? #f))
15590 (home-page "https://github.com/berkerpeksag/astor")
15591 (synopsis "Read and write Python ASTs")
15592 (description "Astor is designed to allow easy manipulation of Python
15593 source via the Abstract Syntax Tree.")
15594 (license license:bsd-3)))
15595
15596 (define-public python2-astor
15597 (package-with-python2 python-astor))
15598
15599 (define-public python-grpcio
15600 (package
15601 (name "python-grpcio")
15602 (version "1.17.1")
15603 (source
15604 (origin
15605 (method url-fetch)
15606 (uri (pypi-uri "grpcio" version))
15607 (sha256
15608 (base32
15609 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15610 (build-system python-build-system)
15611 (propagated-inputs
15612 `(("python-six" ,python-six)))
15613 (home-page "https://grpc.io")
15614 (synopsis "HTTP/2-based RPC framework")
15615 (description "This package provides a Python library for communicating
15616 with the HTTP/2-based RPC framework gRPC.")
15617 (license license:asl2.0)))
15618
15619 (define-public python-astunparse
15620 (package
15621 (name "python-astunparse")
15622 (version "1.6.2")
15623 (source
15624 (origin
15625 (method url-fetch)
15626 (uri (pypi-uri "astunparse" version))
15627 (sha256
15628 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15629 (build-system python-build-system)
15630 (arguments '(#:tests? #f)) ; there are none
15631 (propagated-inputs
15632 `(("python-six" ,python-six)
15633 ("python-wheel" ,python-wheel)))
15634 (home-page "https://github.com/simonpercivall/astunparse")
15635 (synopsis "AST unparser for Python")
15636 (description "This package provides an AST unparser for Python. It is a
15637 factored out version of @code{unparse} found in the Python source
15638 distribution.")
15639 (license license:bsd-3)))
15640
15641 (define-public python-gast
15642 (package
15643 (name "python-gast")
15644 (version "0.2.2")
15645 (source
15646 (origin
15647 (method url-fetch)
15648 (uri (pypi-uri "gast" version))
15649 (sha256
15650 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
15651 (build-system python-build-system)
15652 (propagated-inputs
15653 `(("python-astunparse" ,python-astunparse)))
15654 (home-page "https://pypi.org/project/gast/")
15655 (synopsis "Generic Python AST that abstracts the underlying Python version")
15656 (description
15657 "GAST provides a compatibility layer between the AST of various Python
15658 versions, as produced by @code{ast.parse} from the standard @code{ast}
15659 module.")
15660 (license license:bsd-3)))
15661
15662 (define-public python-wikidata
15663 (package
15664 (name "python-wikidata")
15665 (version "0.6.1")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "Wikidata" version))
15670 (sha256
15671 (base32
15672 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15673 (build-system python-build-system)
15674 (propagated-inputs
15675 `(("python-babel" ,python-babel)))
15676 (home-page "https://github.com/dahlia/wikidata")
15677 (synopsis "Wikidata client library")
15678 (description
15679 "This package provides a Python interface to
15680 @url{https://www.wikidata.org/, Wikidata}.")
15681 (properties '((upstream-name . "Wikidata")))
15682 (license license:gpl3+)))
15683
15684 (define-public python-doctest-ignore-unicode
15685 (package
15686 (name "python-doctest-ignore-unicode")
15687 (version "0.1.2")
15688 (source
15689 (origin
15690 (method url-fetch)
15691 (uri (pypi-uri "doctest-ignore-unicode" version))
15692 (sha256
15693 (base32
15694 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15695 (build-system python-build-system)
15696 (native-inputs
15697 `(("python-nose" ,python-nose)))
15698 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15699 (synopsis "Ignore Unicode literal prefixes in doctests")
15700 (description
15701 "This package adds support for a flag to ignore Unicode literal prefixes
15702 in doctests.")
15703 (license license:asl2.0)))
15704
15705 (define-public python-attr
15706 (package
15707 (name "python-attr")
15708 (version "0.3.1")
15709 (source
15710 (origin
15711 (method url-fetch)
15712 (uri (pypi-uri "attr" version))
15713 (sha256
15714 (base32
15715 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15716 (build-system python-build-system)
15717 (home-page "https://github.com/denis-ryzhkov/attr")
15718 (synopsis "Decorator for attributes of target function or class")
15719 (description "Simple decorator to set attributes of target function or
15720 class in a @acronym{DRY, Don't Repeat Yourself} way.")
15721 (license license:expat)))
15722
15723 (define-public python-construct
15724 (package
15725 (name "python-construct")
15726 (version "2.9.45")
15727 (source
15728 (origin
15729 (method url-fetch)
15730 (uri (pypi-uri "construct" version))
15731 (sha256
15732 (base32
15733 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15734 (build-system python-build-system)
15735 (arguments
15736 `(#:tests? #f)) ; No tests exist.
15737 (propagated-inputs
15738 `(("python-extras" ,python-extras)
15739 ("python-arrow" ,python-arrow)
15740 ("python-numpy" ,python-numpy)
15741 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15742 (home-page "http://construct.readthedocs.io")
15743 (synopsis "Declarative and symmetrical parser and builder for binary data")
15744 (description
15745 "This package provides both simple, atomic constructs (such as
15746 integers of various sizes), as well as composite ones which allow you
15747 form hierarchical and sequential structures of increasing complexity.
15748 It features bit and byte granularity, easy debugging and testing, an
15749 easy-to-extend subclass system, and lots of primitive constructs to
15750 make your work easier.")
15751 (license license:expat)))
15752
15753 (define-public python-humanize
15754 (package
15755 (name "python-humanize")
15756 (version "0.5.1")
15757 (source
15758 (origin
15759 (method url-fetch)
15760 (uri (pypi-uri "humanize" version))
15761 (sha256
15762 (base32
15763 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15764 (arguments
15765 '(#:tests? #f)) ; tests not in pypi archive
15766 (build-system python-build-system)
15767 (home-page "https://github.com/jmoiron/humanize")
15768 (synopsis "Print numerical information in a human-readable form")
15769 (description "This package provides a Python module that displays numbers
15770 and dates in \"human readable\" forms. For example, it would display
15771 \"12345591313\" as \"12.3 billion\".")
15772 (license license:expat)))
15773
15774 (define-public python-txaio
15775 (package
15776 (name "python-txaio")
15777 (version "18.8.1")
15778 (source
15779 (origin
15780 (method url-fetch)
15781 (uri (pypi-uri "txaio" version))
15782 (sha256
15783 (base32
15784 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15785 (build-system python-build-system)
15786 (propagated-inputs
15787 `(("python-twisted" ,python-twisted)
15788 ("python-six" ,python-six)))
15789 (home-page "https://github.com/crossbario/txaio")
15790 (synopsis "Compatibility layer between Python asyncio and Twisted")
15791 (description "Txaio provides a compatibility layer between the Python
15792 @code{asyncio} module and @code{Twisted}.")
15793 (license license:expat)))
15794
15795 (define-public python-toolshed
15796 (package
15797 (name "python-toolshed")
15798 (version "0.4.6")
15799 (source
15800 (origin
15801 (method url-fetch)
15802 (uri (pypi-uri "toolshed" version))
15803 (sha256
15804 (base32
15805 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15806 (build-system python-build-system)
15807 (native-inputs
15808 `(("python-nose" ,python-nose)))
15809 (home-page "https://github.com/brentp/toolshed/")
15810 (synopsis "Collection of modules and functions for working with data")
15811 (description "This is a collection of well-tested, simple modules and
15812 functions that aim to reduce boilerplate when working with data.")
15813 (license license:bsd-2)))
15814
15815 (define-public python-annoy
15816 (package
15817 (name "python-annoy")
15818 (version "1.15.1")
15819 (source
15820 (origin
15821 (method url-fetch)
15822 (uri (pypi-uri "annoy" version))
15823 (sha256
15824 (base32
15825 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15826 (build-system python-build-system)
15827 (native-inputs
15828 `(("python-nose" ,python-nose)))
15829 (home-page "https://github.com/spotify/annoy/")
15830 (synopsis "Approximate nearest neighbors library")
15831 (description
15832 "Annoy is a C++ library with Python bindings to search for points in
15833 space that are close to a given query point. It also creates large read-only
15834 file-based data structures that are @code{mmap}ped into memory so that many
15835 processes may share the same data.")
15836 (license license:asl2.0)))
15837
15838 (define-public python-pylzma
15839 (package
15840 (name "python-pylzma")
15841 (version "0.5.0")
15842 (source
15843 (origin
15844 (method url-fetch)
15845 (uri (pypi-uri "pylzma" version))
15846 (sha256
15847 (base32
15848 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
15849 (build-system python-build-system)
15850 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15851 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15852 (description "This package provides Python bindings for the LZMA library
15853 by Igor Pavlov.")
15854 (license license:lgpl2.1+)))
15855
15856 (define-public python2-pylzma
15857 (package-with-python2 python-pylzma))
15858
15859 (define-public python2-zeroconf
15860 (package
15861 (name "python2-zeroconf")
15862
15863 ;; This is the last version that supports Python 2.x.
15864 (version "0.19.1")
15865 (source
15866 (origin
15867 (method url-fetch)
15868 (uri (pypi-uri "zeroconf" version))
15869 (sha256
15870 (base32
15871 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15872 (build-system python-build-system)
15873 (arguments
15874 `(#:python ,python-2
15875 #:phases
15876 (modify-phases %standard-phases
15877 (add-after 'unpack 'patch-requires
15878 (lambda* (#:key inputs #:allow-other-keys)
15879 (substitute* "setup.py"
15880 (("enum-compat")
15881 "enum34"))
15882 #t)))))
15883 (native-inputs
15884 `(("python2-six" ,python2-six)
15885 ("python2-enum32" ,python2-enum34)
15886 ("python2-netifaces" ,python2-netifaces)
15887 ("python2-typing" ,python2-typing)))
15888 (home-page "https://github.com/jstasiak/python-zeroconf")
15889 (synopsis "Pure Python mDNS service discovery")
15890 (description
15891 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15892 compatible).")
15893 (license license:lgpl2.1+)))
15894
15895 (define-public python-bsddb3
15896 (package
15897 (name "python-bsddb3")
15898 (version "6.2.6")
15899 (source
15900 (origin
15901 (method url-fetch)
15902 (uri (pypi-uri "bsddb3" version))
15903 (sha256
15904 (base32
15905 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15906 (build-system python-build-system)
15907 (inputs
15908 `(("bdb" ,bdb)))
15909 (arguments
15910 '(#:phases
15911 (modify-phases %standard-phases
15912 (add-after 'unpack 'configure-locations
15913 (lambda* (#:key inputs #:allow-other-keys)
15914 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15915 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15916 #t))
15917 (replace 'check
15918 (lambda _
15919 (invoke "python3" "test3.py" "-v"))))))
15920 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15921 (synopsis "Python bindings for Oracle Berkeley DB")
15922 (description
15923 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15924 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15925 Transaction objects, and each of these is exposed as a Python type in the
15926 bsddb3.db module. The database objects can use various access methods: btree,
15927 hash, recno, and queue. Complete support of Berkeley DB distributed
15928 transactions. Complete support for Berkeley DB Replication Manager.
15929 Complete support for Berkeley DB Base Replication. Support for RPC.")
15930 (license license:bsd-3)))
15931
15932 (define-public python-dbfread
15933 (package
15934 (name "python-dbfread")
15935 (version "2.0.7")
15936 (source (origin
15937 (method url-fetch)
15938 (uri (pypi-uri "dbfread" version))
15939 (sha256
15940 (base32
15941 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15942 (build-system python-build-system)
15943 (native-inputs
15944 `(("python-pytest" ,python-pytest)))
15945 (home-page "https://dbfread.readthedocs.io")
15946 (synopsis "Read DBF Files with Python")
15947 (description
15948 "This library reads DBF files and returns the data as native Python data
15949 types for further processing. It is primarily intended for batch jobs and
15950 one-off scripts.")
15951 (license license:expat)))