gnu: tor: Update to 0.4.1.6.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
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>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
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>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
ea43f0d5 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
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>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
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>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
44d10b1f
RW
68;;;
69;;; This file is part of GNU Guix.
70;;;
71;;; GNU Guix is free software; you can redistribute it and/or modify it
72;;; under the terms of the GNU General Public License as published by
73;;; the Free Software Foundation; either version 3 of the License, or (at
74;;; your option) any later version.
75;;;
76;;; GNU Guix is distributed in the hope that it will be useful, but
77;;; WITHOUT ANY WARRANTY; without even the implied warranty of
78;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79;;; GNU General Public License for more details.
80;;;
81;;; You should have received a copy of the GNU General Public License
82;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
83
84(define-module (gnu packages python-xyz)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (gnu packages)
87 #:use-module (gnu packages algebra)
88 #:use-module (gnu packages adns)
89 #:use-module (gnu packages attr)
90 #:use-module (gnu packages backup)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages databases)
f825e605 96 #:use-module (gnu packages dbm)
44d10b1f
RW
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages gcc)
100 #:use-module (gnu packages geo)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages graphviz)
105 #:use-module (gnu packages graphics)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages icu4c)
109 #:use-module (gnu packages image)
110 #:use-module (gnu packages imagemagick)
111 #:use-module (gnu packages libevent)
112 #:use-module (gnu packages libffi)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages llvm)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages maths)
42f0b0c2 117 #:use-module (gnu packages monitoring)
44d10b1f
RW
118 #:use-module (gnu packages multiprecision)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ncurses)
121 #:use-module (gnu packages openstack)
122 #:use-module (gnu packages pcre)
123 #:use-module (gnu packages perl)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages python)
d362b11d 126 #:use-module (gnu packages python-check)
15b65617 127 #:use-module (gnu packages python-compression)
44d10b1f
RW
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages qt)
131 #:use-module (gnu packages readline)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages search)
134 #:use-module (gnu packages shells)
9d0c291e 135 #:use-module (gnu packages sphinx)
44d10b1f
RW
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages terminals)
138 #:use-module (gnu packages tex)
139 #:use-module (gnu packages texinfo)
140 #:use-module (gnu packages time)
141 #:use-module (gnu packages tls)
142 #:use-module (gnu packages version-control)
143 #:use-module (gnu packages video)
144 #:use-module (gnu packages web)
145 #:use-module (gnu packages base)
146 #:use-module (gnu packages xml)
147 #:use-module (gnu packages xorg)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages tcl)
150 #:use-module (gnu packages bdw-gc)
f98232a3 151 #:use-module (gnu packages serialization)
44d10b1f
RW
152 #:use-module (guix packages)
153 #:use-module (guix download)
154 #:use-module (guix git-download)
a042d348 155 #:use-module (guix hg-download)
44d10b1f
RW
156 #:use-module (guix utils)
157 #:use-module (guix build-system gnu)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system python)
160 #:use-module (guix build-system trivial)
161 #:use-module (srfi srfi-1)
162 #:use-module (srfi srfi-26))
163
164(define-public python-psutil
165 (package
166 (name "python-psutil")
7abf3cbf 167 (version "5.6.2")
44d10b1f
RW
168 (source
169 (origin
170 (method url-fetch)
171 (uri (pypi-uri "psutil" version))
172 (sha256
173 (base32
7abf3cbf 174 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
175 (build-system python-build-system)
176 (arguments
177 ;; FIXME: some tests does not return and times out.
178 '(#:tests? #f))
179 (home-page "https://www.github.com/giampaolo/psutil")
180 (synopsis "Library for retrieving information on running processes")
181 (description
182 "psutil (Python system and process utilities) is a library for retrieving
183information on running processes and system utilization (CPU, memory, disks,
184network) in Python. It is useful mainly for system monitoring, profiling and
185limiting process resources and management of running processes. It implements
186many functionalities offered by command line tools such as: ps, top, lsof,
187netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
188pidof, tty, taskset, pmap.")
189 (properties `((python2-variant . ,(delay python2-psutil))))
190 (license license:bsd-3)))
191
192(define-public python2-psutil
193 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
194 (package
195 (inherit base)
196 (propagated-inputs
197 `(("python2-enum34" ,python2-enum34) ;optional
198 ,@(package-propagated-inputs base))))))
199
200(define-public python-shapely
201 (package
202 (name "python-shapely")
6d94465b 203 (version "1.6.4.post2")
44d10b1f
RW
204 (source
205 (origin
206 (method url-fetch)
207 (uri (pypi-uri "Shapely" version))
208 (sha256
209 (base32
6d94465b 210 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
211 (build-system python-build-system)
212 (native-inputs
213 `(("python-cython" ,python-cython)
214 ("python-matplotlib" ,python-matplotlib)
215 ("python-pytest" ,python-pytest)
216 ("python-pytest-cov" ,python-pytest-cov)))
217 (inputs
218 `(("geos" ,geos)))
219 (propagated-inputs
220 `(("python-numpy" ,python-numpy)))
221 (arguments
222 `(#:phases
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-geos-path
225 (lambda* (#:key inputs #:allow-other-keys)
226 (let ((geos (assoc-ref inputs "geos"))
227 (glibc (assoc-ref inputs ,(if (%current-target-system)
228 "cross-libc" "libc"))))
229 (substitute* "shapely/geos.py"
230 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
231 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
232 geos "/lib/libgeos_c.so'])"))
233 (("free = load_dll\\('c'\\)\\.free")
234 (string-append "free = load_dll('c', fallbacks=['"
235 glibc "/lib/libc.so.6']).free"))))
236 #t)))))
237 (home-page "https://github.com/Toblerity/Shapely")
238 (synopsis "Library for the manipulation and analysis of geometric objects")
239 (description "Shapely is a Python package for manipulation and analysis of
240planar geometric objects. It is based on the @code{GEOS} library.")
241 (license license:bsd-3)))
242
a91f4eba
S
243(define-public python-shortuuid
244 (package
245 (name "python-shortuuid")
246 (version "0.5.0")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (pypi-uri "shortuuid" version))
251 (sha256
252 (base32
253 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
254 (build-system python-build-system)
255 (native-inputs
256 `(("python-pep8" ,python-pep8)))
257 (home-page "https://github.com/skorokithakis/shortuuid")
258 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
259 (description
260 "@code{shortuuid} is a Python library for generating concise, unambiguous
261and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
262module and then similar looking characters are removed.")
263 (license license:bsd-3)))
264
44d10b1f
RW
265(define-public python-logwrap
266 (package
267 (name "python-logwrap")
268 (version "3.2.1")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (pypi-uri "logwrap" version ".zip"))
273 (sha256
274 (base32
275 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
276 (build-system python-build-system)
277 (propagated-inputs
278 `(("python-six" ,python-six)
279 ("python-typing" ,python-typing)))
280 (native-inputs
281 `(("unzip" ,unzip)
282 ("python-cython" ,python-cython)
283 ("python-pytest" ,python-pytest)
284 ("python-pytest-cov" ,python-pytest-cov)
285 ("python-pytest-runner" ,python-pytest-runner)))
286 (home-page "https://github.com/penguinolog/logwrap")
287 (synopsis "Decorator for logging function arguments")
288 (description "This package provides a decorator to log function arguments
289and function call return values in a human-readable way.")
290 (license license:asl2.0)))
291
292(define-public python2-shapely
293 (package-with-python2 python-shapely))
294
295(define-public python-clyent
296 (package
297 (name "python-clyent")
298 (version "1.2.1")
299 (source
300 (origin
301 (method url-fetch)
302 (uri (pypi-uri "clyent" version))
303 (sha256
304 (base32
305 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
306 (build-system python-build-system)
307 (native-inputs
308 `(("python-mock" ,python-mock)))
309 (home-page "https://github.com/binstar/clyent")
310 (synopsis "Command line client library")
311 (description "Clyent is a Python command line utiliy library. It is used
312by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
313 (license license:bsd-3)))
314
315(define-public python2-clyent
316 (package-with-python2 python-clyent))
317
318(define-public python-babel
319 (package
320 (name "python-babel")
93253411 321 (version "2.7.0")
44d10b1f
RW
322 (source
323 (origin
324 (method url-fetch)
325 (uri (pypi-uri "Babel" version))
326 (sha256
327 (base32
93253411 328 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
329 (build-system python-build-system)
330 (native-inputs
331 `(("python-freezegun" ,python-freezegun)
332 ("python-pytest" ,python-pytest)))
333 (propagated-inputs
334 `(("python-pytz" ,python-pytz)))
335 (arguments
336 `(#:phases (modify-phases %standard-phases
337 (replace 'check
338 (lambda _ (invoke "pytest" "-vv"))))))
339 (home-page "http://babel.pocoo.org/")
340 (synopsis
341 "Tools for internationalizing Python applications")
342 (description
343 "Babel is composed of two major parts:
344- tools to build and work with gettext message catalogs
345- a Python interface to the CLDR (Common Locale Data Repository), providing
346access to various locale display names, localized number and date formatting,
347etc. ")
348 (license license:bsd-3)))
349
350(define-public python2-babel
351 (package-with-python2 python-babel))
352
93253411
MB
353;; Sphinx < 2.0 requires this version. Remove once no longer needed.
354(define-public python2-babel-2.6
355 (package
356 (inherit python2-babel)
357 (version "2.6.0")
358 (source (origin
359 (method url-fetch)
360 (uri (pypi-uri "Babel" version))
361 (sha256
362 (base32
363 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
364
44d10b1f
RW
365(define-public python2-backport-ssl-match-hostname
366 (package
367 (name "python2-backport-ssl-match-hostname")
368 (version "3.5.0.1")
369 (source
370 (origin
371 (method url-fetch)
2c1f0d09 372 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
373 (sha256
374 (base32
375 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
376 (build-system python-build-system)
377 (arguments
378 `(#:python ,python-2
379 #:tests? #f)) ; no test target
380 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
381 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
382 (description
383 "This backport brings the ssl.match_hostname() function to users of
384earlier versions of Python. The function checks the hostname in the
385certificate returned by the server to which a connection has been established,
386and verifies that it matches the intended target hostname.")
387 (license license:psfl)))
388
389(define-public python-hdf4
390 (package
391 (name "python-hdf4")
392 (version "0.9")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri name version))
397 (sha256
398 (base32
399 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
400 (build-system python-build-system)
401 (native-inputs `(("nose" ,python-nose)))
402 (propagated-inputs `(("numpy" ,python-numpy)))
403 (inputs
404 `(("hdf4" ,hdf4)
405 ("libjpeg" ,libjpeg)
406 ("zlib" ,zlib)))
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (replace 'check
411 (lambda _
412 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
413 ;; on to import numpy. Somehow this works on their CI system.
414 ;; Let's just manage PYTHONPATH here instead.
415 (substitute* "runexamples.sh"
416 (("export PYTHONPATH=.*") ""))
417 (setenv "PYTHONPATH"
418 (string-append (getcwd) ":"
419 (getenv "PYTHONPATH")))
420 (invoke "./runexamples.sh")
421 (invoke "nosetests" "-v"))))))
422 (home-page "https://github.com/fhs/python-hdf4")
423 (synopsis "Python interface to the NCSA HDF4 library")
424 (description
425 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
426which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
427NetCDF files can also be read and modified. Python-HDF4 is a fork of
428@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
429 (license license:expat)))
430
431(define-public python2-hdf4
432 (package-with-python2 python-hdf4))
433
434(define-public python-h5py
435 (package
436 (name "python-h5py")
437 (version "2.8.0")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (pypi-uri "h5py" version))
442 (sha256
443 (base32
444 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
445 (build-system python-build-system)
446 (arguments
447 `(#:tests? #f ; no test target
448 #:phases
449 (modify-phases %standard-phases
450 (add-after 'unpack 'fix-hdf5-paths
451 (lambda* (#:key inputs #:allow-other-keys)
452 (let ((prefix (assoc-ref inputs "hdf5")))
453 (substitute* "setup_build.py"
454 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
455 (string-append "['" prefix "/lib" "']"))
456 (("'/opt/local/include', '/usr/local/include'")
457 (string-append "'" prefix "/include" "'")))
458 (substitute* "setup_configure.py"
459 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']")))
461 #t))))))
462 (propagated-inputs
463 `(("python-six" ,python-six)
464 ("python-numpy" ,python-numpy)))
465 (inputs
466 `(("hdf5" ,hdf5)))
467 (native-inputs
468 `(("python-cython" ,python-cython)
469 ("python-pkgconfig" ,python-pkgconfig)))
470 (home-page "http://www.h5py.org/")
471 (synopsis "Read and write HDF5 files from Python")
472 (description
473 "The h5py package provides both a high- and low-level interface to the
474HDF5 library from Python. The low-level interface is intended to be a
475complete wrapping of the HDF5 API, while the high-level component supports
476access to HDF5 files, datasets and groups using established Python and NumPy
477concepts.")
478 (license license:bsd-3)))
479
480(define-public python2-h5py
481 (package-with-python2 python-h5py))
482
8b89dedc
RW
483(define-public python-sh
484 (package
485 (name "python-sh")
486 (version "1.12.14")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "sh" version))
491 (sha256
492 (base32
493 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
494 (build-system python-build-system)
fd3638d8
EF
495 (arguments
496 '(#:phases
497 (modify-phases %standard-phases
498 (replace 'check
499 (lambda _
ca983a2f
NG
500 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
501 (setenv "HOME" "/tmp")
fd3638d8
EF
502 (invoke "python" "sh.py" "test"))))))
503 (native-inputs
504 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
505 (home-page "https://github.com/amoffat/sh")
506 (synopsis "Python subprocess replacement")
507 (description "This package provides a replacement for Python's
508@code{subprocess} feature.")
509 (license license:expat)))
510
3869effd
RW
511(define-public python2-sh
512 (package-with-python2 python-sh))
513
d362b11d
RW
514(define-public python-cftime
515 (package
516 (name "python-cftime")
517 (version "1.0.3.4")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "cftime" version))
522 (sha256
523 (base32
524 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
525 (build-system python-build-system)
526 (propagated-inputs
527 `(("python-numpy" ,python-numpy)))
528 (native-inputs
529 `(("python-coveralls" ,python-coveralls)
530 ("python-cython" ,python-cython)
531 ("python-pytest-cov" ,python-pytest-cov)))
532 (home-page "https://github.com/Unidata/cftime")
533 (synopsis "Library for time handling")
534 (description
535 "This package provides time-handling functionality that used to be part
536of the netcdf4 package before.")
537 ;; This package claims to include code under the GPLv3 but is released
538 ;; under ISC.
539 (license (list license:isc license:gpl3+))))
540
44d10b1f
RW
541(define-public python-netcdf4
542 (package
543 (name "python-netcdf4")
93e7b209 544 (version "1.4.2")
44d10b1f
RW
545 (source
546 (origin
547 (method url-fetch)
548 (uri (pypi-uri "netCDF4" version))
549 (sha256
550 (base32
93e7b209 551 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 552 (build-system python-build-system)
93e7b209
RW
553 (arguments
554 '(#:phases
555 (modify-phases %standard-phases
556 (add-after 'unpack 'configure-locations
557 (lambda* (#:key inputs #:allow-other-keys)
558 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
559 #t)))))
44d10b1f
RW
560 (native-inputs
561 `(("python-cython" ,python-cython)))
562 (propagated-inputs
93e7b209
RW
563 `(("python-numpy" ,python-numpy)
564 ("python-cftime" ,python-cftime)))
44d10b1f
RW
565 (inputs
566 `(("netcdf" ,netcdf)
567 ("hdf4" ,hdf4)
568 ("hdf5" ,hdf5)))
93e7b209 569 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
570 (synopsis "Python/numpy interface to the netCDF library")
571 (description "Netcdf4-python is a Python interface to the netCDF C
572library. netCDF version 4 has many features not found in earlier
573versions of the library and is implemented on top of HDF5. This module
574can read and write files in both the new netCDF 4 and the old netCDF 3
575format, and can create files that are readable by HDF5 clients. The
576API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
577to users of that module.")
578 ;; The software is mainly ISC, but includes some files covered
579 ;; by the Expat license.
580 (license (list license:isc license:expat))))
581
582(define-public python2-netcdf4
583 (package-with-python2 python-netcdf4))
584
585(define-public python-lockfile
586 (package
587 (name "python-lockfile")
588 (version "0.12.2")
589 (source
590 (origin
591 (method url-fetch)
8318bf07 592 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
593 (sha256
594 (base32
595 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
596 (build-system python-build-system)
597 (arguments '(#:test-target "check"))
598 (native-inputs
599 `(("python-pbr" ,python-pbr)))
600 (home-page "https://launchpad.net/pylockfile")
601 (synopsis "Platform-independent file locking module")
602 (description
603 "The lockfile package exports a LockFile class which provides a simple
604API for locking files.")
605 (license license:expat)))
606
607(define-public python2-lockfile
608 (package-with-python2 python-lockfile))
609
610(define-public python-semantic-version
611 (package
612 (name "python-semantic-version")
613 (version "2.6.0")
614 (source
615 (origin
616 (method url-fetch)
617 (uri (pypi-uri "semantic_version" version))
618 (sha256
619 (base32
620 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
621 (build-system python-build-system)
622 (arguments
623 `(#:tests? #f)) ; PyPI tarball lacks tests
624 (home-page "https://github.com/rbarrois/python-semanticversion")
625 (synopsis "Semantic versioning module for Python")
626 (description
627 "The @code{semantic_version} class is a small library for handling
628@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
629
630It can compare versions, generate a new version that represents a bump in one of
631the version levels, and check whether any given string is a proper semantic
632version identifier.")
633 (license license:bsd-3)))
634
635(define-public python2-semantic-version
636 (package-with-python2 python-semantic-version))
637
638(define-public python-serpent
639 (package
640 (name "python-serpent")
fa9d14ac 641 (version "1.28")
44d10b1f
RW
642 (source
643 (origin
644 (method url-fetch)
645 (uri (pypi-uri "serpent" version))
646 (sha256
fa9d14ac 647 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 648 (build-system python-build-system)
fa9d14ac
TGR
649 (native-inputs
650 `(("python-attrs" ,python-attrs)
651 ("python-pytz" ,python-pytz)))
44d10b1f
RW
652 (home-page "https://github.com/irmen/Serpent")
653 (synopsis "Serializer for literal Python expressions")
654 (description
1d3c7803
TGR
655 "Serpent provides @code{ast.literal_eval()}-compatible object tree
656serialization. It serializes an object tree into bytes (an utf-8 encoded
657string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
658to rebuild the original object tree.
659
660Because only safe literals are encoded, it is safe to send serpent data to
661other machines, such as over the network.")
44d10b1f
RW
662 (license license:expat)))
663
664(define-public python-setuptools
665 (package
666 (name "python-setuptools")
e39d4933 667 (version "41.0.1")
44d10b1f
RW
668 (source
669 (origin
670 (method url-fetch)
671 (uri (pypi-uri "setuptools" version ".zip"))
672 (sha256
673 (base32
e39d4933 674 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
675 (modules '((guix build utils)))
676 (snippet
677 '(begin
678 ;; Remove included binaries which are used to build self-extracting
679 ;; installers for Windows.
680 ;; TODO: Find some way to build them ourself so we can include them.
681 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
682 #t))))
683 (build-system python-build-system)
684 ;; FIXME: Tests require pytest, which itself relies on setuptools.
685 ;; One could bootstrap with an internal untested setuptools.
686 (arguments
687 `(#:tests? #f))
688 (home-page "https://pypi.python.org/pypi/setuptools")
689 (synopsis
690 "Library designed to facilitate packaging Python projects")
691 (description
692 "Setuptools is a fully-featured, stable library designed to facilitate
693packaging Python projects, where packaging includes:
694Python package and module definitions,
695distribution package metadata,
696test hooks,
697project installation,
698platform-specific details,
699Python 3 support.")
700 ;; TODO: setuptools now bundles the following libraries:
701 ;; packaging, pyparsing, six and appdirs. How to unbundle?
702 (license (list license:psfl ; setuptools itself
703 license:expat ; six, appdirs, pyparsing
704 license:asl2.0 ; packaging is dual ASL2/BSD-2
705 license:bsd-2))))
706
707(define-public python2-setuptools
708 (package-with-python2 python-setuptools))
709
710(define-public python-uniseg
711 (package
712 (name "python-uniseg")
713 (version "0.7.1")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (pypi-uri "uniseg" version ".zip"))
718 (sha256
719 (base32
720 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
721 (build-system python-build-system)
722 (arguments
723 '(#:tests? #f)) ; The test suite requires network access.
724 (native-inputs
725 `(("unzip" ,unzip)))
726 (home-page
727 "https://bitbucket.org/emptypage/uniseg-python")
728 (synopsis
729 "Python library to determine Unicode text segmentations")
730 (description
731 "Uniseg is a Python package used to determine Unicode text segmentations.
732Supported segmentations include:
733@enumerate
734@item @dfn{Code point} (any value in the Unicode codespace)
735@item @dfn{Grapheme cluster} (user-perceived character made of a single or
736multiple Unicode code points, e.g. \"G\" + acute-accent)
737@item Word break
738@item Sentence break
739@item Line break
740@end enumerate")
741 (license license:expat)))
742
743(define-public python2-uniseg
744 (package-with-python2 python-uniseg))
745
746(define-public python-humanfriendly
747 (package
748 (name "python-humanfriendly")
749 (version "4.4.1")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (pypi-uri "humanfriendly" version))
754 (sha256
755 (base32
756 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
757 (build-system python-build-system)
758 (arguments
759 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
760 #:tests? #f))
761 (propagated-inputs
762 `(("python-monotonic" ,python-monotonic)))
763 (home-page "https://humanfriendly.readthedocs.io")
764 (synopsis "Human-friendly input and output in Python")
765 (description
766 "The functions and classes in @code{humanfriendly} can be used to make
767text interfaces more user-friendly. It includes tools to parse and format
768numbers, file sizes, and timespans, timers for long-running operations, menus
769to allow the user to choose from a list of options, and terminal interaction
770helpers.")
771 (license license:expat)))
772
773(define-public python2-humanfriendly
774 (package-with-python2 python-humanfriendly))
775
776(define-public python-capturer
777 (package
778 (name "python-capturer")
779 (version "2.4")
780 (source
781 (origin
782 (method url-fetch)
783 (uri (pypi-uri "capturer" version))
784 (sha256
785 (base32
786 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
787 (build-system python-build-system)
788 (arguments
789 `(#:tests? #f))
790 (propagated-inputs
791 `(("python-humanfriendly" ,python-humanfriendly)))
792 (home-page "https://capturer.readthedocs.io")
793 (synopsis "Capture stdout and stderr streams of the current process")
794 (description
795 "The capturer package makes it easy to capture the stdout and stderr
796streams of the current process and subprocesses. Output can be relayed
797to the terminal in real time but is also available to the Python program
798for additional processing.")
799 (license license:expat)))
800
801(define-public python2-capturer
802 (package-with-python2 python-capturer))
803
804(define-public python-case
805 (package
806 (name "python-case")
807 (version "1.5.3")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (pypi-uri "case" version))
812 (sha256
813 (base32
814 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
815 (build-system python-build-system)
816 (propagated-inputs
817 `(("python-mock" ,python-mock)
818 ("python-nose" ,python-nose)
819 ("python-six" ,python-six)
820 ("python-unittest2" ,python-unittest2)))
821 (native-inputs
822 `(("python-coverage" ,python-coverage)))
823 (home-page "https://github.com/celery/case")
824 (synopsis "Unittest utilities and convenience methods")
825 (description
826 "The @code{case} package provides utilities on top of unittest, including
827some helpful Python 2 compatibility convenience methods.")
828 (license license:bsd-3)))
829
830(define-public python-verboselogs
831 (package
832 (name "python-verboselogs")
833 (version "1.7")
834 (source
835 (origin
836 (method url-fetch)
837 (uri (pypi-uri "verboselogs" version))
838 (sha256
839 (base32
840 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
841 (build-system python-build-system)
842 (native-inputs
843 `(("python-mock" ,python-mock)
844 ("python-astroid" ,python-astroid)
845 ("python-pylint" ,python-pylint)))
846 (home-page "https://verboselogs.readthedocs.io")
847 (synopsis "Verbose logging level for Python's logging module")
848 (description
849 "The @code{verboselogs} package extends Python's @code{logging} module to
850add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
851 (license license:expat)))
852
853(define-public python2-verboselogs
854 (package-with-python2 python-verboselogs))
855
856(define-public python-coloredlogs
857 (package
858 (name "python-coloredlogs")
859 (version "7.3")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "coloredlogs" version))
864 (sha256
865 (base32
866 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
867 (build-system python-build-system)
868 (arguments
869 `(;Tests require some updated modules
870 #:tests? #f))
871 (propagated-inputs
872 `(("python-capturer" ,python-capturer)))
873 (home-page "https://coloredlogs.readthedocs.io")
874 (synopsis "Colored stream handler for Python's logging module")
875 (description
876 "The @code{coloredlogs} package enables colored terminal output for
877Python's logging module. The @code{ColoredFormatter} class inherits from
878@code{logging.Formatter} and uses ANSI escape sequences to render your logging
879messages in color.")
880 (license license:expat)))
881
882(define-public python2-coloredlogs
883 (package-with-python2 python-coloredlogs))
884
4caf37b0
MC
885(define-public python-et-xmlfile
886 (package
887 (name "python-et-xmlfile")
888 (version "1.0.1")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (pypi-uri "et_xmlfile" version))
893 (sha256
894 (base32
895 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
896 (build-system python-build-system)
897 (arguments
898 `(#:phases (modify-phases %standard-phases
899 (replace 'check
900 (lambda _
901 (invoke "pytest"))))))
902 (native-inputs
903 `(("python-pytest" ,python-pytest)
904 ("python-lxml" ,python-lxml))) ;used for the tests
905 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
906 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
907 (description "This Python library is based upon the @code{xmlfile} module
908from @code{lxml}. It aims to provide a low memory, compatible implementation
909of @code{xmlfile}.")
910 (license license:expat)))
911
912(define-public python2-et-xmlfile
913 (package-with-python2 python-et-xmlfile))
914
a042d348
MC
915(define-public python-openpyxl
916 (package
917 (name "python-openpyxl")
441e6d93 918 (version "2.6.2")
a042d348
MC
919 (source
920 (origin
921 ;; We use the upstream repository, as the tests are not included in the
922 ;; PyPI releases.
923 (method hg-fetch)
924 (uri (hg-reference
925 (url "https://bitbucket.org/openpyxl/openpyxl")
926 (changeset version)))
927 (file-name (string-append name "-" version "-checkout"))
928 (sha256
441e6d93 929 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
930 (build-system python-build-system)
931 (arguments
932 `(#:phases (modify-phases %standard-phases
933 (replace 'check
934 (lambda _
935 (invoke "pytest"))))))
936 (native-inputs
937 ;; For the test suite.
938 `(("python-lxml" ,python-lxml)
939 ("python-pillow" ,python-pillow)
940 ("python-pytest" ,python-pytest)))
941 (propagated-inputs
942 `(("python-et-xmlfile" ,python-et-xmlfile)
943 ("python-jdcal" ,python-jdcal)))
944 (home-page "https://openpyxl.readthedocs.io")
945 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
946 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
947XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
948standard.")
949 (license license:expat)))
950
44d10b1f
RW
951(define-public python-eventlet
952 (package
953 (name "python-eventlet")
954 (version "0.20.1")
955 (source
956 (origin
957 (method url-fetch)
958 (uri (pypi-uri "eventlet" version))
959 (sha256
960 (base32
961 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
962 (build-system python-build-system)
963 (propagated-inputs
964 `(("python-greenlet" ,python-greenlet)))
965 (arguments
966 ;; TODO: Requires unpackaged 'enum-compat'.
967 '(#:tests? #f))
968 (home-page "http://eventlet.net")
969 (synopsis "Concurrent networking library for Python")
970 (description
971 "Eventlet is a concurrent networking library for Python that
972allows you to change how you run your code, not how you write it.
973It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
974Coroutines ensure that the developer uses a blocking style of programming
975that is similar to threading, but provide the benefits of non-blocking I/O.
976The event dispatch is implicit, which means you can easily use @code{Eventlet}
977from the Python interpreter, or as a small part of a larger application.")
978 (license license:expat)))
979
980(define-public python2-eventlet
981 (let ((base (package-with-python2
982 (strip-python2-variant python-eventlet))))
983 (package (inherit base)
984 (propagated-inputs
985 `(("python2-enum34" ,python2-enum34)
986 ,@(package-propagated-inputs base))))))
987
988(define-public python-six
989 (package
990 (name "python-six")
991 (version "1.11.0")
992 (source
993 (origin
994 (method url-fetch)
995 (uri (pypi-uri "six" version))
996 (sha256
997 (base32
998 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
999 (build-system python-build-system)
1000 (arguments
1001 `(#:phases
1002 (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "py.test" "-v"))))))
1006 (native-inputs
1007 `(("python-py" ,python-py)
1008 ("python-pytest" ,python-pytest-bootstrap)))
1009 (home-page "https://pypi.python.org/pypi/six/")
1010 (synopsis "Python 2 and 3 compatibility utilities")
1011 (description
1012 "Six is a Python 2 and 3 compatibility library. It provides utility
1013functions for smoothing over the differences between the Python versions with
1014the goal of writing Python code that is compatible on both Python versions.
1015Six supports every Python version since 2.5. It is contained in only one
1016Python file, so it can be easily copied into your project.")
1017 (license license:x11)))
1018
1019(define-public python2-six
1020 (package-with-python2 python-six))
1021
1022(define-public python-six-bootstrap
1023 (package
1024 (inherit python-six)
1025 (name "python-six-bootstrap")
1026 (native-inputs `())
1027 (arguments `(#:tests? #f))))
1028
1029(define-public python2-six-bootstrap
1030 (package-with-python2 python-six-bootstrap))
1031
1032(define-public python-schedule
1033 (package
1034 (name "python-schedule")
1035 (version "0.4.3")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (pypi-uri "schedule" version))
1040 (sha256
1041 (base32
1042 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1043 (build-system python-build-system)
1044 (native-inputs
1045 `(("python-pytest" ,python-pytest)
1046 ("python-mock" ,python-mock)))
1047 (home-page "https://github.com/dbader/schedule")
1048 (synopsis "Schedule periodic function calls in Python")
1049 (description
1050 "Schedule is an in-process scheduler for periodic jobs that uses the
1051builder pattern for configuration. Schedule lets you run Python functions (or
1052any other callable) periodically at pre-determined intervals using a simple,
1053human-friendly syntax.")
1054 (license license:expat)))
1055
1056(define-public python2-schedule
1057 (package-with-python2 python-schedule))
1058
1059(define-public python-pandas
1060 (package
1061 (name "python-pandas")
c0d43f62 1062 (version "0.24.2")
44d10b1f
RW
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pandas" version))
1067 (sha256
c0d43f62 1068 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1069 (build-system python-build-system)
1070 (arguments
1071 `(#:modules ((guix build utils)
1072 (guix build python-build-system)
1073 (ice-9 ftw)
1074 (srfi srfi-26))
1075 #:phases (modify-phases %standard-phases
c0d43f62
MC
1076 (add-after 'unpack 'patch-which
1077 (lambda* (#:key inputs #:allow-other-keys)
1078 (let ((which (assoc-ref inputs "which")))
1079 (substitute* "pandas/io/clipboard/__init__.py"
1080 (("^CHECK_CMD = .*")
1081 (string-append "CHECK_CMD = \"" which "\"\n"))))
1082 #t))
44d10b1f
RW
1083 (replace 'check
1084 (lambda _
1085 (let ((build-directory
1086 (string-append
1087 (getcwd) "/build/"
1088 (car (scandir "build"
1089 (cut string-prefix? "lib." <>))))))
1090 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1091 ;; the build to error out if required data files are
1092 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1093 (substitute* "setup.cfg"
1094 (("addopts = --strict-data-files") "addopts = "))
1095 (with-directory-excursion build-directory
c0d43f62
MC
1096 ;; Delete tests that require "moto" which is not yet
1097 ;; in Guix.
44d10b1f
RW
1098 (for-each delete-file
1099 '("pandas/tests/io/conftest.py"
1100 "pandas/tests/io/json/test_compression.py"
1101 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1102 "pandas/tests/io/test_parquet.py"))
1103 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1104 "--skip-network" "-k"
1105 ;; XXX: Due to the deleted tests above.
1106 "not test_read_s3_jsonl"))))))))
1107 (propagated-inputs
1108 `(("python-numpy" ,python-numpy)
667c6ef5 1109 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1110 ("python-pytz" ,python-pytz)
667c6ef5
MC
1111 ("python-dateutil" ,python-dateutil)
1112 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1113 (inputs
1114 `(("which" ,which)))
44d10b1f
RW
1115 (native-inputs
1116 `(("python-cython" ,python-cython)
1117 ("python-beautifulsoup4" ,python-beautifulsoup4)
1118 ("python-lxml" ,python-lxml)
1119 ("python-html5lib" ,python-html5lib)
1120 ("python-nose" ,python-nose)
c0d43f62
MC
1121 ("python-pytest" ,python-pytest)
1122 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1123 (home-page "https://pandas.pydata.org")
1124 (synopsis "Data structures for data analysis, time series, and statistics")
1125 (description
1126 "Pandas is a Python package providing fast, flexible, and expressive data
1127structures designed to make working with structured (tabular,
1128multidimensional, potentially heterogeneous) and time series data both easy
1129and intuitive. It aims to be the fundamental high-level building block for
1130doing practical, real world data analysis in Python.")
1131 (license license:bsd-3)))
1132
1133(define-public python2-pandas
1134 (package-with-python2 python-pandas))
1135
1136(define-public python2-mechanize
1137 (package
1138 (name "python2-mechanize")
1139 (version "0.2.5")
1140 (source
1141 (origin
1142 (method url-fetch)
1cc184e6 1143 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1144 (sha256
1145 (base32
1146 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(#:python ,python-2 ; apparently incompatible with Python 3
1150 #:tests? #f))
1151 ;; test fails with message
1152 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1153 ;; (python-3.3.2) or
1154 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1155 ;; (python-2.7.5).
1156 ;; The source code is from March 2011 and probably not up-to-date
1157 ;; with respect to python unit tests.
1158 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1159 (synopsis
1160 "Stateful programmatic web browsing in Python")
1161 (description
1162 "Mechanize implements stateful programmatic web browsing in Python,
1163after Andy Lester’s Perl module WWW::Mechanize.")
1164 (license (license:non-copyleft
1165 "file://COPYING"
1166 "See COPYING in the distribution."))))
1167
1168
1169(define-public python-simplejson
1170 (package
1171 (name "python-simplejson")
1172 (version "3.14.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "simplejson" version))
1177 (sha256
1178 (base32
1179 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1180 (build-system python-build-system)
1181 (home-page "http://simplejson.readthedocs.org/en/latest/")
1182 (synopsis
1183 "Json library for Python")
1184 (description
1185 "JSON (JavaScript Object Notation) is a subset of JavaScript
1186syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1187format.
1188
1189Simplejson exposes an API familiar to users of the standard library marshal
1190and pickle modules. It is the externally maintained version of the json
1191library contained in Python 2.6, but maintains compatibility with Python 2.5
1192and (currently) has significant performance advantages, even without using
1193the optional C extension for speedups. Simplejson is also supported on
1194Python 3.3+.")
1195 (license license:x11)))
1196
1197(define-public python2-simplejson
1198 (package-with-python2 python-simplejson))
1199
1200
1201(define-public python-pyicu
1202 (package
1203 (name "python-pyicu")
1204 (version "2.2")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (pypi-uri "PyICU" version))
1209 (sha256
1210 (base32
1211 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1212 (build-system python-build-system)
1213 (inputs
1214 `(("icu4c" ,icu4c)))
1215 (native-inputs
1216 `(("python-pytest" ,python-pytest)
1217 ("python-six" ,python-six)))
1218 (home-page "https://github.com/ovalhub/pyicu")
1219 (synopsis "Python extension wrapping the ICU C++ API")
1220 (description
1221 "PyICU is a python extension wrapping the ICU C++ API.")
1222 (properties `((python2-variant . ,(delay python2-pyicu))))
1223 (license license:x11)))
1224
1225(define-public python2-pyicu
1226 (let ((base (package-with-python2
1227 (strip-python2-variant python-pyicu))))
1228 (package
1229 (inherit base)
1230 (arguments
1231 `(,@(package-arguments base)
1232 #:phases
1233 (modify-phases %standard-phases
1234 (add-before 'check 'delete-failing-test
1235 (λ _
1236 ;; XXX: This fails due to Unicode issues unique to Python 2,
1237 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1238 (delete-file "test/test_Script.py")
1239 #t))))))))
1240
1241(define-public python2-dogtail
1242 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1243 ;; spaces in indentation" with Python 3.
1244 (package
1245 (name "python2-dogtail")
1246 (version "0.9.9")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (pypi-uri "dogtail" version))
1250 (sha256
1251 (base32
1252 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1253 (build-system python-build-system)
1254 (arguments `(#:python ,python-2
1255 #:tests? #f)) ; invalid command "test"
1256 ;; Currently no offical homepage.
1257 (home-page "https://pypi.python.org/pypi/dogtail/")
1258 (synopsis "GUI test tool and automation framework written in Python")
1259 (description
1260 "Dogtail is a GUI test tool and automation framework written in Python.
1261It uses Accessibility (a11y) technologies to communicate with desktop
1262applications. dogtail scripts are written in Python and executed like any
1263other Python program.")
1264 (license license:gpl2+)))
1265
1266(define-public python-empy
1267 (package
1268 (name "python-empy")
0f6d5115 1269 (version "3.3.3")
44d10b1f
RW
1270 (source (origin
1271 (method url-fetch)
1272 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1273 version ".tar.gz"))
1274 (sha256
1275 (base32
0f6d5115 1276 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1277 (build-system python-build-system)
1278 (arguments
0f6d5115 1279 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1280 (home-page "http://www.alcyone.com/software/empy/")
1281 (synopsis "Templating system for Python")
1282 (description
1283 "EmPy is a system for embedding Python expressions and statements in
1284template text; it takes an EmPy source file, processes it, and produces
1285output. This is accomplished via expansions, which are special signals to the
1286EmPy system and are set off by a special prefix (by default the at sign, @@).
1287EmPy can expand arbitrary Python expressions and statements in this way, as
1288well as a variety of special forms. Textual data not explicitly delimited in
1289this way is sent unaffected to the output, allowing Python to be used in
1290effect as a markup language. Also supported are callbacks via hooks,
1291recording and playback via diversions, and dynamic, chainable filters. The
1292system is highly configurable via command line options and embedded
1293commands.")
1294 (license license:lgpl2.1+)))
1295
1296(define-public python2-empy
0f064242
TGR
1297 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1298 (package
1299 (inherit base)
1300 (arguments `(,@(package-arguments base)
1301 #:tests? #t)))))
44d10b1f
RW
1302
1303(define-public python2-element-tree
1304 (package
1305 (name "python2-element-tree")
1306 (version "1.2.6")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "http://effbot.org/media/downloads/elementtree-"
1311 version "-20050316.tar.gz"))
1312 (sha256
1313 (base32
1314 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:python ,python-2 ; seems to be part of Python 3
1318 #:tests? #f)) ; no 'test' sub-command
1319 (synopsis "Toolkit for XML processing in Python")
1320 (description
1321 "ElementTree is a Python library supporting lightweight XML processing.")
1322 (home-page "http://effbot.org/zone/element-index.htm")
1323 (license (license:x11-style
1324 "http://docs.python.org/2/license.html"
1325 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1326
1327(define-public python2-pybugz
1328 (package
1329 (name "python2-pybugz")
1330 (version "0.6.11")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1335 version ".tar.gz"))
1336 (sha256
1337 (base32
1338 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1339 (patches (search-patches "pybugz-stty.patch"
1340 "pybugz-encode-error.patch"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:python ,python-2 ; SyntaxError with Python 3
1344 #:tests? #f)) ; no 'test' sub-command
1345 (propagated-inputs
1346 `(("element-tree" ,python2-element-tree)))
1347 (synopsis "Python and command-line interface to Bugzilla")
1348 (description
1349 "PyBugz is a Python library and command-line tool to query the Bugzilla
1350bug tracking system. It is meant as an aid to speed up interaction with the
1351bug tracker.")
1352 (home-page "http://www.liquidx.net/pybugz/")
1353 (license license:gpl2)))
1354
1355(define-public python2-enum
1356 (package
1357 (name "python2-enum")
1358 (version "0.4.6")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "enum" version))
1362 (sha256
1363 (base32
1364 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2))
1368 (home-page "http://pypi.python.org/pypi/enum/")
1369 (synopsis "Robust enumerated type support in Python")
1370 (description
1371 "This provides a module for robust enumerations in Python. It has
1372been superseded by the Python standard library and is provided only for
1373compatibility.")
1374 ;; Choice of either license.
1375 (license (list license:gpl3+ license:psfl))))
1376
1377(define-public python-enum34
1378 (package
1379 (name "python-enum34")
1380 (version "1.1.6")
1381 (source
1382 (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "enum34" version))
1385 (sha256
1386 (base32
1387 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1388 (build-system python-build-system)
1389 (home-page "https://pypi.python.org/pypi/enum34")
1390 (synopsis "Backported Python 3.4 Enum")
1391 (description
1392 "Enum34 is the new Python stdlib enum module available in Python 3.4
1393backported for previous versions of Python from 2.4 to 3.3.")
1394 (license license:bsd-3)))
1395
1396(define-public python2-enum34
1397 (package-with-python2 python-enum34))
1398
1399(define-public python-parse-type
1400 (package
1401 (name "python-parse-type")
1402 (version "0.4.2")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "parse_type" version))
1407 (sha256
1408 (base32
1409 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1410 (build-system python-build-system)
1411 (propagated-inputs
1412 `(("python-six" ,python-six)
1413 ("python-parse" ,python-parse)))
1414 (native-inputs
1415 `(("python-pytest" ,python-pytest)
1416 ("python-pytest-runner" ,python-pytest-runner)))
1417 (home-page "https://github.com/jenisys/parse_type")
1418 (synopsis "Extended parse module")
1419 (description
1420 "Parse_type extends the python parse module.")
1421 (properties
1422 `((python2-variant . ,(delay python2-parse-type))))
1423 (license license:bsd-3)))
1424
1425(define-public python2-parse-type
1426 (let ((base (package-with-python2
1427 (strip-python2-variant python-parse-type))))
1428 (package (inherit base)
1429 (propagated-inputs
1430 `(("python2-enum34" ,python2-enum34)
1431 ,@(package-propagated-inputs base))))))
1432
1433(define-public python-parse
1434 (package
1435 (name "python-parse")
1436 (version "1.8.4")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (pypi-uri "parse" version))
1441 (sha256
1442 (base32
1443 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1444 (build-system python-build-system)
1445 (arguments
1446 `(#:phases
1447 (modify-phases %standard-phases
1448 (replace 'check
1449 (lambda _ (invoke "python" "test_parse.py"))))))
1450 (home-page "https://github.com/r1chardj0n3s/parse")
1451 (synopsis "Parse strings")
1452 (description
1453 "Parse strings using a specification based on the Python @code{format()}
1454syntax.")
1455 (license license:x11)))
1456
1457(define-public python-polib
1458 (package
1459 (name "python-polib")
1460 (version "1.0.8")
1461 (source (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "polib" version))
1464 (sha256
1465 (base32
1466 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1467 (build-system python-build-system)
1468 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1469 (synopsis "Manipulate, create and modify gettext files")
1470 (description "Polib can manipulate any gettext format (po, pot and mo)
1471files. It can be used to create po files from scratch or to modify
1472existing ones.")
1473 (license license:expat)))
1474
1475(define-public python2-polib
1476 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1477 (package
1478 (inherit base)
1479 (arguments `(,@(package-arguments base)
1480 ;; Tests don't work with python2.
1481 #:tests? #f)))))
1482
1483(define-public scons
1484 (package
1485 (name "scons")
05487ed8 1486 (version "3.0.4")
44d10b1f 1487 (source (origin
ad34338d
RW
1488 (method git-fetch)
1489 (uri (git-reference
1490 (url "https://github.com/SCons/scons.git")
1491 (commit version)))
1492 (file-name (git-file-name name version))
44d10b1f
RW
1493 (sha256
1494 (base32
05487ed8 1495 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1496 (build-system python-build-system)
1497 (arguments
1498 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1499 #:tests? #f ; no 'python setup.py test' command
1500 #:phases
1501 (modify-phases %standard-phases
1502 (add-before 'build 'bootstrap
1503 (lambda _
1504 (substitute* "src/engine/SCons/compat/__init__.py"
1505 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1506 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1507 (substitute* "src/engine/SCons/Platform/__init__.py"
1508 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1509 "mod = __import__(full_name)"))
ad34338d
RW
1510 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1511 (chdir "build/scons")
1512 #t)))))
44d10b1f
RW
1513 (home-page "http://scons.org/")
1514 (synopsis "Software construction tool written in Python")
1515 (description
1516 "SCons is a software construction tool. Think of SCons as an improved,
1517cross-platform substitute for the classic Make utility with integrated
1518functionality similar to autoconf/automake and compiler caches such as ccache.
1519In short, SCons is an easier, more reliable and faster way to build
1520software.")
1521 (license license:x11)))
1522
1523(define-public scons-python2
1524 (package
1525 (inherit (package-with-python2 scons))
1526 (name "scons-python2")))
1527
1528(define-public python-extras
1529 (package
1530 (name "python-extras")
1531 (version "1.0.0")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "extras" version))
1536 (sha256
1537 (base32
1538 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1539 (build-system python-build-system)
1540 (arguments
1541 ;; FIXME: Circular dependency on testtools.
1542 '(#:tests? #f))
1543 (home-page "https://github.com/testing-cabal/extras")
1544 (synopsis "Useful extensions to the Python standard library")
1545 (description
1546 "Extras is a set of extensions to the Python standard library.")
1547 (license license:expat)))
1548
1549(define-public python2-extras
1550 (package-with-python2 python-extras))
1551
1552(define-public python-mimeparse
1553 (package
1554 (name "python-mimeparse")
1555 (version "1.6.0")
1556 (source
1557 (origin
1558 (method url-fetch)
89bf667c 1559 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1560 (sha256
1561 (base32
1562 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1563 (build-system python-build-system)
1564 (arguments
1565 '(#:phases
1566 (modify-phases %standard-phases
1567 (replace 'check
1568 (lambda _
1569 (invoke "./mimeparse_test.py"))))))
1570 (home-page
1571 "https://github.com/dbtsai/python-mimeparse")
1572 (synopsis "Python library for parsing MIME types")
1573 (description
1574 "Mimeparse provides basic functions for parsing MIME type names and
1575matching them against a list of media-ranges.")
1576 (license license:expat)))
1577
1578(define-public python2-mimeparse
1579 (package-with-python2 python-mimeparse))
1580
1581(define-public python-miniboa
1582 (package
1583 (name "python-miniboa")
1584 (version "1.0.7")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "miniboa" version))
1589 (sha256
1590 (base32
1591 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1592 (build-system python-build-system)
1593 (home-page "https://github.com/shmup/miniboa")
1594 (synopsis "Simple, single-threaded Telnet server")
1595 (description
1596 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1597server.")
1598 (license license:asl2.0)))
1599
1600(define-public python2-miniboa
1601 (package-with-python2 python-miniboa))
1602
1603(define-public python-pafy
1604 (package
1605 (name "python-pafy")
1606 (version "0.5.3.1")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "pafy" version))
1611 (sha256
1612 (base32
1613 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1614 (build-system python-build-system)
1615 (arguments
1616 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1617 (propagated-inputs
1618 ;; Youtube-dl is a python package which is imported in the file
1619 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1620 `(("youtube-dl" ,youtube-dl)))
1621 (home-page "https://np1.github.io/pafy/")
1622 (synopsis "Retrieve YouTube content and metadata")
1623 (description
1624 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1625 (license license:lgpl3+)))
1626
1627(define-public python2-funcsigs
1628 (package
1629 (name "python2-funcsigs")
1630 (version "1.0.2")
1631 (source (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "funcsigs" version))
1634 (sha256
1635 (base32
1636 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1637 (build-system python-build-system)
1638 (arguments
1639 `(#:python ,python-2))
1640 (native-inputs
1641 `(("python2-unittest2" ,python2-unittest2)))
1642 (home-page "http://funcsigs.readthedocs.org")
1643 (synopsis "Python function signatures from PEP362")
1644 (description
1645 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1646 (license license:asl2.0)))
1647
1648(define-public python2-funcsigs-bootstrap
1649 (package
1650 (inherit python2-funcsigs)
1651 (name "python2-funcsigs-bootstrap")
1652 (native-inputs `())
1653 (arguments
1654 `(#:tests? #f
1655 ,@(package-arguments python2-funcsigs)))))
1656
1657(define-public python-py
1658 (package
1659 (name "python-py")
1660 (version "1.5.4")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "py" version))
1665 (sha256
1666 (base32
1667 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1668 (build-system python-build-system)
1669 (arguments
1670 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1671 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1672 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1673 ;; Is this module globally installed?"
1674 '(#:tests? #f))
1675 (native-inputs
1676 `(("python-setuptools-scm" ,python-setuptools-scm)))
1677 (home-page "https://github.com/pytest-dev/py")
1678 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1679 (description
1680 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1681code introspection, and logging.")
1682 (license license:expat)))
1683
1684(define-public python2-py
1685 (package-with-python2 python-py))
1686
1687;; Recent versions of python-fixtures and python-testrepository need
1688;; python-pbr for packaging, which itself needs these two packages for
1689;; testing.
1690;; To fix this circular dependency, we use a build of python-pbr, based on the
1691;; same source, just without any test dependencies and with tests disabled.
1692;; python-pbr-minmal is then used to package python-fixtures and
1693;; python-testrepository.
1694;; Strictly speaking we currently could remove the test-requirements from the
1695;; normal python-pbr package (and save this package) since test are disabled
1696;; there anyway. But this may change in future.
1697(define-public python-pbr-minimal
1698 (package
1699 (name "python-pbr-minimal")
1700 (version "3.0.1")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "pbr" version))
1705 (sha256
1706 (base32
1707 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1708 (build-system python-build-system)
1709 (arguments
1710 `(#:tests? #f))
1711 (home-page "http://docs.openstack.org/developer/pbr/")
1712 (synopsis "Minimal build of python-pbr used for bootstrapping")
1713 (description
1714 "Used only for bootstrapping python2-pbr, you should not need this.")
1715 (license license:asl2.0)))
1716
1717(define-public python2-pbr-minimal
1718 (package-with-python2 python-pbr-minimal))
1719
1720(define-public python-pbr
1721 (package
1722 (inherit python-pbr-minimal)
1723 (name "python-pbr")
1724 (arguments
1725 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1726 (propagated-inputs
1727 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1728 (native-inputs
1729 `(("python-fixtures" ,python-fixtures-bootstrap)
1730 ;; discover, coverage, hacking, subunit
1731 ("python-mock" ,python-mock)
1732 ("python-six" ,python-six)
1733 ("python-sphinx" ,python-sphinx)
1734 ("python-testrepository" ,python-testrepository-bootstrap)
1735 ("python-testresources" ,python-testresources-bootstrap)
1736 ("python-testscenarios" ,python-testscenarios-bootstrap)
1737 ("python-testtools" ,python-testtools-bootstrap)
1738 ("python-virtualenv" ,python-virtualenv)))
1739 (synopsis "Enhance the default behavior of Python’s setuptools")
1740 (description
1741 "Python Build Reasonableness (PBR) is a library that injects some useful
1742and sensible default behaviors into your setuptools run. It will set
1743versions, process requirements files and generate AUTHORS and ChangeLog file
1744from git information.
1745")))
1746
1747(define-public python2-pbr
1748 (package-with-python2 python-pbr))
1749
ea43f0d5
MB
1750(define-public python-pyrsistent
1751 (package
1752 (name "python-pyrsistent")
1753 (version "0.14.11")
1754 (home-page "https://github.com/tobgu/pyrsistent")
1755 (source (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pyrsistent" version))
1758 (sha256
1759 (base32
1760 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1761 (build-system python-build-system)
1762 (native-inputs
1763 `(("python-hypothesis" ,python-hypothesis)
1764 ("python-pytest" ,python-pytest)
1765 ("python-pytest-runner" ,python-pytest-runner)))
1766 (propagated-inputs
1767 `(("python-six" ,python-six)))
1768 (synopsis "Persistent data structures for Python")
1769 (description
1770 "Pyrsistent is a number of persistent collections (by some referred to as
1771functional data structures). Persistent in the sense that they are immutable.
1772
1773All methods on a data structure that would normally mutate it instead return a
1774new copy of the structure containing the requested updates. The original
1775structure is left untouched.")
1776 (license license:expat)))
1777
1778(define-public python2-pyrsistent
1779 (package-with-python2 python-pyrsistent))
1780
44d10b1f
RW
1781(define-public python-exif-read
1782 (package
1783 (name "python-exif-read")
1784 (version "2.1.2")
1785 (source (origin
1786 (method url-fetch)
1787 (uri (pypi-uri "ExifRead" version))
1788 (sha256
1789 (base32
1790 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1791 (build-system python-build-system)
1792 (arguments `(#:tests? #f)) ; no tests
1793 (home-page "https://github.com/ianare/exif-py")
1794 (synopsis "Python library to extract EXIF data from image files")
1795 (description
1796 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1797files.")
1798 (license license:bsd-3)))
1799
1800(define-public python2-exif-read
1801 (package-with-python2 python-exif-read))
1802
1803(define-public python-pyld
1804 (package
1805 (name "python-pyld")
1806 (version "1.0.3")
1807 (source (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "PyLD" version))
1810 (sha256
1811 (base32
1812 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1813 (build-system python-build-system)
1814 (home-page "https://github.com/digitalbazaar/pyld")
1815 (synopsis "Python implementation of the JSON-LD specification")
1816 (description
1817 "PyLD is an implementation of the JSON-LD specification.")
1818 (license license:bsd-3)))
1819
1820(define-public python2-pyld
1821 (package-with-python2 python-pyld))
1822
1823(define-public python-click
1824 (package
1825 (name "python-click")
61984855 1826 (version "7.0")
44d10b1f
RW
1827 (source
1828 (origin
1829 (method url-fetch)
1830 (uri (pypi-uri "click" version))
1831 (sha256
1832 (base32
61984855 1833 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1834 (build-system python-build-system)
1835 (arguments
8d7e7ca6 1836 `(#:phases
44d10b1f
RW
1837 (modify-phases %standard-phases
1838 (add-after 'unpack 'fix-paths
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1841 "cross-libc" "libc"))))
1842 (substitute* "click/_unicodefun.py"
1843 (("'locale'")
1844 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1845 #t))
1846 (replace 'check
1847 (lambda _
1848 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1849 (native-inputs
1850 `(("python-pytest" ,python-pytest)))
61984855 1851 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1852 (synopsis "Command line library for Python")
1853 (description
1854 "Click is a Python package for creating command line interfaces in a
1855composable way with as little code as necessary. Its name stands for
1856\"Command Line Interface Creation Kit\". It's highly configurable but comes
1857with sensible defaults out of the box.")
1858 (license license:bsd-3)))
1859
1860(define-public python2-click
1861 (package-with-python2 python-click))
1862
1863(define-public python-wheel
1864 (package
1865 (name "python-wheel")
746c074b 1866 (version "0.32.3")
44d10b1f
RW
1867 (source
1868 (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "wheel" version))
1871 (sha256
1872 (base32
746c074b 1873 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1874 (build-system python-build-system)
1875 (native-inputs
1876 `(("python-jsonschema" ,python-jsonschema)
1877 ("python-pytest-cov" ,python-pytest-cov)))
1878 (home-page "https://bitbucket.org/pypa/wheel/")
1879 (synopsis "Format for built Python packages")
1880 (description
1881 "A wheel is a ZIP-format archive with a specially formatted filename and
1882the @code{.whl} extension. It is designed to contain all the files for a PEP
1883376 compatible install in a way that is very close to the on-disk format. Many
1884packages will be properly installed with only the @code{Unpack} step and the
1885unpacked archive preserves enough information to @code{Spread} (copy data and
1886scripts to their final locations) at any later time. Wheel files can be
1887installed with a newer @code{pip} or with wheel's own command line utility.")
1888 (license license:expat)
1889 (properties `((python2-variant . ,(delay python2-wheel))))))
1890
1891(define-public python2-wheel
1892 (let ((wheel (package-with-python2
1893 (strip-python2-variant python-wheel))))
1894 (package (inherit wheel)
1895 (native-inputs `(("python2-functools32" ,python2-functools32)
1896 ,@(package-native-inputs wheel))))))
1897
1898(define-public python-vcversioner
1899 (package
1900 (name "python-vcversioner")
1901 (version "2.16.0.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "vcversioner" version))
1906 (sha256
1907 (base32
1908 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1909 (build-system python-build-system)
1910 (synopsis "Python library for version number discovery")
1911 (description "Vcversioner is a Python library that inspects tagging
1912information in a variety of version control systems in order to discover
1913version numbers.")
1914 (home-page "https://github.com/habnabit/vcversioner")
1915 (license license:isc)))
1916
1917(define-public python2-vcversioner
1918 (package-with-python2 python-vcversioner))
1919
5591fc4f
MC
1920(define-public python-jdcal
1921 (package
1922 (name "python-jdcal")
1923 (version "1.4")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (pypi-uri "jdcal" version))
1928 (sha256
1929 (base32
1930 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1931 (build-system python-build-system)
1932 (arguments
1933 `(#:phases (modify-phases %standard-phases
1934 (replace 'check
1935 (lambda _
1936 (invoke "pytest"))))))
1937 (native-inputs
1938 `(("python-pytest" ,python-pytest)))
1939 (home-page "https://github.com/phn/jdcal")
1940 (synopsis "Functions to convert between Julian dates Gregorian dates")
1941 (description "This Python library provides functions for converting
1942between Julian dates and Gregorian dates.")
1943 (license license:bsd-2)))
1944
1945(define-public python2-jdcal
1946 (package-with-python2 python-jdcal))
1947
44d10b1f
RW
1948(define-public python-jsonschema
1949 (package
1950 (name "python-jsonschema")
1adde06e 1951 (version "3.0.1")
44d10b1f
RW
1952 (source (origin
1953 (method url-fetch)
786ccb87 1954 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1955 (sha256
1956 (base32
1adde06e 1957 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1958 (build-system python-build-system)
1959 (arguments
1960 '(#:phases
1961 (modify-phases %standard-phases
1adde06e
MB
1962 (replace 'check
1963 (lambda _
1964 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1965 (invoke "trial" "jsonschema"))))))
44d10b1f 1966 (native-inputs
1adde06e
MB
1967 `(("python-setuptools_scm" ,python-setuptools-scm)
1968 ("python-twisted" ,python-twisted)))
1969 (propagated-inputs
1970 `(("python-attrs" ,python-attrs)
1971 ("python-pyrsistent" ,python-pyrsistent)
1972 ("python-six" ,python-six)))
44d10b1f
RW
1973 (home-page "https://github.com/Julian/jsonschema")
1974 (synopsis "Implementation of JSON Schema for Python")
1975 (description
1976 "Jsonschema is an implementation of JSON Schema for Python.")
1977 (license license:expat)
1978 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1979
1980(define-public python2-jsonschema
1981 (let ((jsonschema (package-with-python2
1982 (strip-python2-variant python-jsonschema))))
1983 (package (inherit jsonschema)
44d10b1f 1984 (propagated-inputs
1adde06e
MB
1985 `(("python2-functools32" ,python2-functools32)
1986 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1987
914bba28
TGR
1988;; This old version is still required by docker-compose as of 1.24.0.
1989(define-public python-jsonschema-2.6
1990 (package
1991 (name "python-jsonschema")
1992 (version "2.6.0")
1993 (source (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "jsonschema" version))
1996 (sha256
1997 (base32
1998 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1999 (build-system python-build-system)
2000 (arguments
2001 '(#:phases
2002 (modify-phases %standard-phases
2003 (replace 'check (lambda _ (invoke "nosetests"))))))
2004 (native-inputs
2005 `(("python-nose" ,python-nose)
2006 ("python-vcversioner" ,python-vcversioner)))
2007 (home-page "https://github.com/Julian/jsonschema")
2008 (synopsis "Implementation of JSON Schema for Python")
2009 (description
2010 "Jsonschema is an implementation of JSON Schema for Python.")
2011 (license license:expat)
2012 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2013
44d10b1f
RW
2014(define-public python-schema
2015 (package
2016 (name "python-schema")
2017 (version "0.6.6")
2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "schema" version))
2022 (sha256
2023 (base32
2024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2025 (build-system python-build-system)
2026 (native-inputs
2027 `(("python-pytest" ,python-pytest)))
2028 (home-page "https://github.com/keleshev/schema")
2029 (synopsis "Simple data validation library")
2030 (description
2031 "@code{python-schema} is a library for validating Python data
2032structures, such as those obtained from config-files, forms, external
2033services or command-line parsing, converted from JSON/YAML (or
2034something else) to Python data-types.")
2035 (license license:psfl)))
2036
2037(define-public python2-schema
2038 (package-with-python2 python-schema))
2039
2040(define-public python-schema-0.5
2041 (package (inherit python-schema)
2042 (version "0.5.0")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "schema" version))
2047 (sha256
2048 (base32
2049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2050
2051(define-public python2-schema-0.5
2052 (package-with-python2 python-schema-0.5))
2053
2054(define-public python-kitchen
2055 (package
2056 (name "python-kitchen")
2057 (version "1.2.5")
2058 (source
2059 (origin
2060 (method url-fetch)
2061 (uri (pypi-uri "kitchen" version))
2062 (sha256
2063 (base32
2064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2065 (build-system python-build-system)
2066 (propagated-inputs
2067 `(("python-chardet" ,python-chardet)))
2068 (home-page "https://github.com/fedora-infra/kitchen")
2069 (synopsis "Python API for snippets")
2070 (description "@code{kitchen} module provides a python API for all sorts of
2071little useful snippets of code that everybody ends up writing for their projects
2072but never seem big enough to build an independent release. Use kitchen and stop
2073cutting and pasting that code over and over.")
2074 (license (list license:lgpl2.1+
2075 ;; subprocess.py, test_subprocess.py,
2076 ;; kitchen/pycompat25/defaultdict.py:
2077 license:psfl))))
2078
2079(define-public python2-kitchen
2080 (package-with-python2 python-kitchen))
2081
2082(define-public python-unidecode
2083 (package
2084 (name "python-unidecode")
bd9d7206 2085 (version "1.1.0")
44d10b1f
RW
2086 (source (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "Unidecode" version))
2089 (sha256
2090 (base32
bd9d7206 2091 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2092 (build-system python-build-system)
2093 (home-page "https://pypi.python.org/pypi/Unidecode")
2094 (synopsis "ASCII transliterations of Unicode text")
2095 (description
2096 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2097useful when integrating with legacy code that doesn't support Unicode, or for
2098ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2099machine identifiers from human-readable Unicode strings that should still be
2100somewhat intelligible.")
2101 (license license:gpl2+)))
2102
2103(define-public python2-unidecode
2104 (package-with-python2 python-unidecode))
2105
2106(define-public python-pyjwt
2107 (package
2108 (name "python-pyjwt")
2109 (version "1.5.3")
2110 (source
2111 (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "PyJWT" version))
2114 (sha256
2115 (base32
2116 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2117 (modules '((guix build utils)))
2118 (snippet
2119 '(begin
2120 (for-each delete-file-recursively
2121 (find-files "." "\\.pyc$"))
2122 #t))))
2123 (build-system python-build-system)
2124 (native-inputs
2125 `(("python-pytest" ,python-pytest)
2126 ("python-pytest-cov" ,python-pytest-cov)
2127 ("python-pytest-runner" ,python-pytest-runner)))
2128 (home-page "https://github.com/progrium/pyjwt")
2129 (synopsis "JSON Web Token implementation in Python")
2130 (description
2131 "PyJWT is a JSON Web Token implementation written in Python.")
2132 (license license:expat)))
2133
2134(define-public python2-pyjwt
2135 (package-with-python2 python-pyjwt))
2136
2137(define-public python-pykka
2138 (package
2139 (name "python-pykka")
2140 (version "1.2.1")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (pypi-uri "Pykka" version))
2145 (sha256
2146 (base32
2147 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2148 (build-system python-build-system)
2149 (native-inputs
2150 `(("python-mock" ,python-mock)
2151 ("python-nose" ,python-nose)
2152 ("python-gevent" ,python-gevent)
2153 ("python-eventlet" ,python-eventlet)))
2154 (home-page "https://www.pykka.org/")
2155 (synopsis "Pykka is a Python implementation of the actor model")
2156 (description
2157 "Pykka is a Python implementation of the actor model.
2158The actor model introduces some simple rules to control the sharing
2159of state and cooperation between execution units, which makes it
2160easier to build concurrent applications.")
2161 (license license:asl2.0)))
2162
2163(define-public python2-pykka
2164 (package-with-python2 python-pykka))
2165
8d22f7e3
VC
2166(define-public python-pymsgbox
2167 (package
2168 (name "python-pymsgbox")
2169 (version "1.0.6")
2170 (source
2171 (origin
2172 (method git-fetch)
2173 (uri (git-reference
2174 ;; LICENSE.txt is not present on pypi
2175 (url "https://github.com/asweigart/PyMsgBox")
2176 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2177 (file-name (git-file-name name version))
2178 (sha256
2179 (base32
2180 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2181 (arguments
2182 ;; Circular dependency to run tests:
2183 ;; Tests need pyautogui, which depends on pymsgbox.
2184 '(#:tests? #f))
2185 (build-system python-build-system)
2186 (home-page "https://github.com/asweigart/PyMsgBox")
2187 (synopsis "Python module for JavaScript-like message boxes")
2188 (description
2189 "PyMsgBox is a simple, cross-platform, pure Python module for
2190JavaScript-like message boxes. Types of dialog boxes include:
2191@enumerate
2192@item alert
2193@item confirm
2194@item prompt
2195@item password
2196@end enumerate
2197")
2198 (license license:bsd-3)))
2199
44d10b1f
RW
2200(define-public python-pympler
2201 (package
2202 (name "python-pympler")
2203 (home-page "https://pythonhosted.org/Pympler/")
2204 (version "0.5")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "Pympler" version))
2208 (sha256
2209 (base32
2210 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2211 (build-system python-build-system)
2212 (arguments
2213 `(#:phases (modify-phases %standard-phases
2214 (delete 'check)
2215 (add-after 'install 'check
2216 (lambda* (#:key inputs outputs #:allow-other-keys)
2217 (add-installed-pythonpath inputs outputs)
2218 (invoke "python" "setup.py" "test"))))))
2219 (synopsis "Measure, monitor and analyze memory behavior")
2220 (description
2221 "Pympler is a development tool to measure, monitor and analyze
2222the memory behavior of Python objects in a running Python application.
2223
2224By pympling a Python application, detailed insight in the size and the
2225lifetime of Python objects can be obtained. Undesirable or unexpected
2226runtime behavior like memory bloat and other @samp{pymples} can easily
2227be identified.
2228
2229A web profiling frontend exposes process statistics, garbage
2230visualisation and class tracker statistics.")
2231 (license license:asl2.0)))
2232
2233(define-public python2-pympler
2234 (package-with-python2 python-pympler))
2235
2236(define-public python-itsdangerous
2237 (package
2238 (name "python-itsdangerous")
acfcf2ed 2239 (version "1.1.0")
44d10b1f
RW
2240 (source
2241 (origin
2242 (method url-fetch)
acfcf2ed 2243 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2244 (sha256
2245 (base32
acfcf2ed 2246 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2247 (build-system python-build-system)
acfcf2ed 2248 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2249 (synopsis "Python library for passing data to/from untrusted environments")
2250 (description
2251 "Itsdangerous provides various helpers to pass trusted data to untrusted
2252environments and back.")
2253 (license license:bsd-3)))
2254
2255(define-public python2-itsdangerous
2256 (package-with-python2 python-itsdangerous))
2257
2258(define-public python-pyyaml
2259 (package
2260 (name "python-pyyaml")
2261 (version "3.13")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "PyYAML" version))
2266 (sha256
2267 (base32
2268 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2269 (build-system python-build-system)
2270 (inputs
2271 `(("libyaml" ,libyaml)))
2272 (home-page "http://pyyaml.org/wiki/PyYAML")
2273 (synopsis "YAML parser and emitter for Python")
2274 (description
2275 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2276complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2277API, and sensible error messages. PyYAML supports standard YAML tags and
2278provides Python-specific tags that allow to represent an arbitrary Python
2279object.")
2280 (license license:expat)))
2281
2282(define-public python2-pyyaml
2283 (package-with-python2 python-pyyaml))
2284
2285(define-public python-vine
2286 (package
2287 (name "python-vine")
2288 (version "1.1.4")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "vine" version))
2293 (sha256
2294 (base32
2295 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2296 (build-system python-build-system)
2297 (native-inputs
2298 `(("python-pytest" ,python-pytest)
2299 ("python-case" ,python-case)))
2300 (home-page "https://github.com/celery/vine")
2301 (synopsis "Promises for Python")
2302 (description
2303 "@code{vine} provides a special implementation of promises in that it can
2304be used both for \"promise of a value\" and lazy evaluation. The biggest
2305upside for this is that everything in a promise can also be a promise,
2306e.g. filters, callbacks and errbacks can all be promises.")
2307 (license license:bsd-3)))
2308
2309(define-public python-virtualenv
2310 (package
2311 (name "python-virtualenv")
2782bd51 2312 (version "16.1.0")
44d10b1f
RW
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "virtualenv" version))
2317 (sha256
2318 (base32
2782bd51 2319 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2320 (build-system python-build-system)
2321 (arguments
2322 `(#:phases
2323 (modify-phases %standard-phases
2782bd51 2324 (add-before 'check 'disable-failing-test
44d10b1f
RW
2325 (lambda _
2326 ;; Disable failing test. See upstream bug report
2327 ;; https://github.com/pypa/virtualenv/issues/957
2328 (substitute* "tests/test_virtualenv.py"
2329 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2330 #t)))))
44d10b1f
RW
2331 (native-inputs
2332 `(("python-mock" ,python-mock)
2333 ("python-pytest" ,python-pytest)))
2334 (home-page "https://virtualenv.pypa.io/")
2335 (synopsis "Virtual Python environment builder")
2336 (description
2337 "Virtualenv is a tool to create isolated Python environments.")
2338 (license license:expat)))
2339
2340(define-public python2-virtualenv
2341 (package-with-python2 python-virtualenv))
2342
2343(define-public python-markupsafe
2344 (package
2345 (name "python-markupsafe")
753eb411 2346 (version "1.1.1")
44d10b1f
RW
2347 (source
2348 (origin
2349 (method url-fetch)
5182927c 2350 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2351 (sha256
2352 (base32
753eb411 2353 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2354 (build-system python-build-system)
753eb411
MB
2355 (arguments
2356 `(#:modules ((ice-9 ftw)
2357 (srfi srfi-1)
2358 (srfi srfi-26)
2359 (guix build utils)
2360 (guix build python-build-system))
2361 #:phases (modify-phases %standard-phases
2362 (replace 'check
2363 (lambda _
2364 (let ((cwd (getcwd))
2365 (libdir (find (cut string-prefix? "lib." <>)
2366 (scandir "build"))))
2367 (setenv "PYTHONPATH"
2368 (string-append cwd "/build/" libdir ":"
2369 (getenv "PYTHONPATH")))
2370 (invoke "pytest" "-vv")))))))
2371 (native-inputs
2372 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2373 (home-page "https://github.com/mitsuhiko/markupsafe")
2374 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2375 (description
2376 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2377for Python.")
2378 (license license:bsd-3)))
2379
2380(define-public python2-markupsafe
2381 (package-with-python2 python-markupsafe))
2382
2383(define-public python-jinja2
2384 (package
2385 (name "python-jinja2")
4a5c7934 2386 (version "2.10.1")
44d10b1f
RW
2387 (source
2388 (origin
2389 (method url-fetch)
2390 (uri (pypi-uri "Jinja2" version))
2391 (sha256
2392 (base32
4a5c7934 2393 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2394 (build-system python-build-system)
2395 (propagated-inputs
2396 `(("python-markupsafe" ,python-markupsafe)))
2397 (home-page "http://jinja.pocoo.org/")
2398 (synopsis "Python template engine")
2399 (description
2400 "Jinja2 is a small but fast and easy to use stand-alone template engine
2401written in pure Python.")
2402 (license license:bsd-3)))
2403
2404(define-public python2-jinja2
2405 (package-with-python2 python-jinja2))
2406
2407(define-public python-pystache
2408 (package
2409 (name "python-pystache")
2410 (version "0.5.4")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "pystache" version))
2414 (sha256
2415 (base32
2416 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2417 (build-system python-build-system)
2418 (arguments
2419 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2420 (home-page "http://defunkt.io/pystache/")
2421 (synopsis "Python logic-less template engine")
2422 (description
2423 "Pystache is a Python implementation of the framework agnostic,
2424logic-free templating system Mustache.")
2425 (license license:expat)
2426 (properties `((python2-variant . ,(delay python2-pystache))))))
2427
2428(define-public python2-pystache
2429 (package (inherit (package-with-python2
2430 (strip-python2-variant python-pystache)))
2431 (arguments
2432 `(#:python ,python-2
2433 #:phases
2434 (modify-phases %standard-phases
2435 (replace 'check
2436 (lambda _
dfafc29b 2437 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2438
2439(define-public python-joblib
2440 (package
2441 (name "python-joblib")
2442 (version "0.13.0")
2443 (source (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "joblib" version))
2446 (sha256
2447 (base32
2448 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2449 (build-system python-build-system)
2450 (arguments
2451 `(#:phases
2452 (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2455 (native-inputs
2456 `(("python-pytest" ,python-pytest)))
2457 (home-page "https://joblib.readthedocs.io/")
2458 (synopsis "Using Python functions as pipeline jobs")
2459 (description
2460 "Joblib is a set of tools to provide lightweight pipelining in Python.
2461In particular, joblib offers: transparent disk-caching of the output values
2462and lazy re-evaluation (memoize pattern), easy simple parallel computing
2463logging and tracing of the execution.")
2464 (license license:bsd-3)))
2465
2466(define-public python2-joblib
2467 (package-with-python2 python-joblib))
2468
a3363341
VC
2469(define-public python-daemon
2470 (package
2471 (name "python-daemon")
2472 (version "2.2.3")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "python-daemon" version))
2477 (sha256
2478 (base32
2479 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2480 (build-system python-build-system)
2481 (arguments
2482 `(#:phases
2483 (modify-phases %standard-phases
2484 (add-before 'check 'disable-tests
2485 (lambda _
2486 ;; FIXME: Determine why test fails
2487 (substitute* "test/test_daemon.py"
2488 (("test_detaches_process_context")
2489 "skip_test_detaches_process_context"))
2490 #t)))))
2491 (propagated-inputs
2492 `(("python-lockfile" ,python-lockfile)))
2493 (native-inputs
2494 `(("python-unittest2" ,python-unittest2)
2495 ("python-testtools" ,python-testtools)
2496 ("python-testscenarios" ,python-testscenarios)
2497 ("python-mock" ,python-mock)
2498 ("python-docutils" ,python-docutils)))
2499 (home-page "https://pagure.io/python-daemon/")
2500 (synopsis "Python library for making a Unix daemon process")
2501 (description "Python-daemon is a library that assists a Python program to
2502turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2503
2504This library provides a @code{DaemonContext} class that manages the following
2505important tasks for becoming a daemon process:
2506@enumerate
2507@item Detach the process into its own process group.
2508@item Set process environment appropriate for running inside a chroot.
2509@item Renounce suid and sgid privileges.
2510@item Close all open file descriptors.
2511@item Change the working directory, uid, gid, and umask.
2512@item Set appropriate signal handlers.
2513@item Open new file descriptors for stdin, stdout, and stderr.
2514@item Manage a specified PID lock file.
2515@item Register cleanup functions for at-exit processing.
2516@end enumerate")
2517 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2518 (license (list license:asl2.0 license:gpl3+))))
2519
44d10b1f
RW
2520(define-public python-docutils
2521 (package
2522 (name "python-docutils")
2523 (version "0.14")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "docutils" version))
2528 (sha256
2529 (base32
2530 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2531 (build-system python-build-system)
2532 (arguments
2533 '(#:tests? #f)) ; no setup.py test command
2534 (home-page "http://docutils.sourceforge.net/")
2535 (synopsis "Python Documentation Utilities")
2536 (description
2537 "Docutils is a modular system for processing documentation into useful
2538formats, such as HTML, XML, and LaTeX. For input Docutils supports
2539reStructuredText.")
2540 ;; Most of the source code is public domain, but some source files are
2541 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2542 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2543
2544(define-public python2-docutils
2545 (package-with-python2 python-docutils))
2546
2547(define-public python-pygments
2548 (package
2549 (name "python-pygments")
eed81080 2550 (version "2.4.2")
44d10b1f
RW
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "Pygments" version))
2555 (sha256
2556 (base32
eed81080 2557 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2558 (build-system python-build-system)
2559 (arguments
2560 ;; FIXME: Tests require sphinx, which depends on this.
2561 '(#:tests? #f))
2562 (home-page "http://pygments.org/")
2563 (synopsis "Syntax highlighting")
2564 (description
2565 "Pygments is a syntax highlighting package written in Python.")
2566 (license license:bsd-2)))
2567
2568(define-public python2-pygments
2569 (package-with-python2 python-pygments))
2570
0f0a5ef9
MC
2571(define-public python-bumpversion
2572 (package
2573 (name "python-bumpversion")
2574 (version "0.5.3")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "bumpversion" version))
2579 (sha256
2580 (base32
2581 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2582 (build-system python-build-system)
2583 (home-page "https://github.com/peritus/bumpversion")
2584 (synopsis "Tool to bump software version")
2585 (description "This tool provides a command-line interface (CLI) to bump a
2586software version simply.")
2587 (license license:expat)))
2588
b24fd2c2
MC
2589(define-public python-deprecated
2590 (package
2591 (name "python-deprecated")
2592 (version "1.2.5")
2593 (source
2594 (origin
2595 (method git-fetch)
2596 (uri (git-reference
2597 (url "https://github.com/tantale/deprecated.git")
2598 (commit (string-append "v" version))))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2603 (build-system python-build-system)
2604 (arguments
2605 `(#:phases (modify-phases %standard-phases
2606 (replace 'check
2607 (lambda _
2608 (invoke "pytest"))))))
2609 (propagated-inputs
2610 `(("python-wrapt" ,python-wrapt)))
2611 (native-inputs
2612 `(("python-bumpversion" ,python-bumpversion)
2613 ("python-pytest" ,python-pytest)
2614 ("python-pytest-cov" ,python-pytest-cov)
2615 ("python-sphinx" ,python-sphinx)
2616 ("python-tox" ,python-tox)))
2617 (home-page "https://github.com/tantale/deprecated")
2618 (synopsis "Python decorator to deprecate classes, functions or methods")
2619 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2620to deprecate classes, functions or methods.")
2621 (license license:expat)))
2622
d5a998fa
MC
2623(define-public python-pygithub
2624 (package
2625 (name "python-pygithub")
2626 (version "1.43.7")
2627 (source
2628 ;; We fetch from the Git repo because there are no tests in the PyPI
2629 ;; archive.
2630 (origin
2631 (method git-fetch)
2632 (uri (git-reference
2633 (url "https://github.com/PyGithub/PyGithub.git")
2634 (commit (string-append "v" version))))
2635 (file-name (git-file-name name version))
2636 (sha256
2637 (base32
2638 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2639 (build-system python-build-system)
2640 (arguments
2641 `(#:phases (modify-phases %standard-phases
2642 ;; Some tests rely on the network.
2643 (add-after 'unpack 'disable-failing-tests
2644 (lambda _
2645 (substitute* "tests/Issue142.py"
2646 (("testDecodeJson") "disabled_testDecodeJson"))
2647 #t))
2648 (add-before 'check 'prepare-for-tests
2649 (lambda _
2650 (for-each (lambda (f)
2651 (chmod f #o666))
2652 (find-files "./tests"))
2653 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2654 (setenv "PYTHONPATH"
2655 (string-append "./tests:" (getenv "PYTHONPATH")))
2656 #t)))))
2657 (propagated-inputs
2658 `(("python-deprecated" ,python-deprecated)
2659 ("python-pyjwt" ,python-pyjwt)
2660 ("python-requests" ,python-requests)))
2661 (native-inputs `(("python-httpretty" ,python-httpretty)))
2662 (home-page "https://pygithub.readthedocs.io/en/latest/")
2663 (synopsis "Python library for the GitHub API")
2664 (description "This library allows managing GitHub resources such as
2665repositories, user profiles, and organizations in your Python applications,
2666using version 3 of the GitHub application programming interface (API).")
2667 (license license:lgpl3+)))
2668
c0c0bb38
MC
2669(define-public python-rellu
2670 (package
2671 (name "python-rellu")
2672 (version "0.7")
2673 (source
2674 (origin
2675 (method url-fetch)
2676 (uri (pypi-uri "rellu" version))
2677 (sha256
2678 (base32
2679 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2680 (build-system python-build-system)
2681 (propagated-inputs
2682 `(("python-invoke" ,python-invoke)
2683 ("python-pygithub" ,python-pygithub)))
2684 (home-page "https://github.com/robotframework/rellu")
2685 (synopsis "Utilities to create PyPI releases")
2686 (description "This collection of utilities contains tooling and templates
2687to assist in creating releases on GitHub and publishing them on PyPI. It is
2688designed to be used by Robot Framework and tools and libraries in its
2689ecosystem, but can naturally be used also by other projects.")
2690 (license license:asl2.0)))
2691
b9790285
MC
2692(define-public python-robotframework
2693 (package
2694 (name "python-robotframework")
1710b8f8 2695 (version "3.1.2")
b9790285
MC
2696 ;; There are no tests in the PyPI archive.
2697 (source
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/robotframework/robotframework.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2704 (sha256
1710b8f8 2705 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2706 (patches (search-patches
2707 "python-robotframework-honor-source-date-epoch.patch"))))
2708 (build-system python-build-system)
2709 (arguments
2710 `(#:phases (modify-phases %standard-phases
2711 (add-before 'build 'build-and-install-doc
2712 (lambda* (#:key outputs #:allow-other-keys)
2713 (let* ((doc-output (assoc-ref outputs "doc"))
2714 (doc (string-append doc-output "/share/"
2715 ,name "-" ,version "/")))
2716 (invoke "invoke" "library-docs" "all")
2717 (mkdir-p doc)
2718 (copy-recursively "doc/libraries"
2719 (string-append doc "/libraries"))
2720 #t)))
2721 (replace 'check
2722 (lambda _
2723 (invoke "python" "utest/run.py"))))))
2724 (native-inputs
2725 `(("python-invoke" ,python-invoke)
2726 ("python-rellu" ,python-rellu)
2727 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2728 (outputs '("out" "doc"))
2729 (home-page "https://robotframework.org")
2730 (synopsis "Generic automation framework")
2731 (description "Robot Framework is a generic automation framework for
2732acceptance testing, acceptance test driven development (ATDD), and robotic
2733process automation (RPA).")
2734 (license license:asl2.0)))
2735
5b84c120
MC
2736(define-public python-robotframework-lint
2737 ;; There is no properly tagged release; the commit below seems to correspond
2738 ;; to the 0.9 stable release available from PyPI. The tests are not
2739 ;; included in the PyPI archive, so we fetch the sources from the upstream
2740 ;; Git repo.
2741 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2742 (revision "1"))
2743 (package
2744 (name "python-robotframework-lint")
2745 (version (git-version "0.9.0" revision commit))
2746 (source
2747 (origin
2748 (method git-fetch)
2749 (uri (git-reference
2750 (url "https://github.com/boakley/robotframework-lint.git")
2751 (commit commit)))
2752 (file-name (git-file-name name version))
2753 (sha256
2754 (base32
2755 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2756 (build-system python-build-system)
2757 (arguments
2758 `(#:phases
2759 (modify-phases %standard-phases
2760 (replace 'check
2761 (lambda _
2762 (invoke "python" "-m" "robot" "-A"
2763 "tests/conf/default.args" "tests"))))))
2764 (propagated-inputs
2765 `(("python-robotframework" ,python-robotframework)))
2766 (home-page "https://github.com/boakley/robotframework-lint/")
2767 (synopsis "Static analysis tool (linter) for Robot Framework")
2768 (description "This package provides the @code{rflint} command-line
2769utility, a static analysis tool (linter) for Robot Framework source files.")
2770 (license license:asl2.0))))
2771
c0c64f17
MC
2772(define-public python-robotframework-sshlibrary
2773 (package
2774 (name "python-robotframework-sshlibrary")
2775 (version "3.3.0")
2776 ;; There are no tests in the PyPI archive.
2777 (source
2778 (origin
2779 (method git-fetch)
2780 (uri (git-reference
2781 (url "https://github.com/robotframework/SSHLibrary.git")
2782 (commit (string-append "v" version))))
2783 (file-name (git-file-name name version))
2784 (sha256
2785 (base32
2786 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2787 (build-system python-build-system)
2788 (arguments
2789 `(#:phases
2790 (modify-phases %standard-phases
2791 (add-before 'build 'build-and-install-doc
2792 (lambda* (#:key outputs #:allow-other-keys)
2793 (let* ((doc-output (assoc-ref outputs "doc"))
2794 (doc (string-append doc-output "/share/"
2795 ,name "-" ,version "/")))
2796 (invoke "chmod" "-R" "+w" "docs")
2797 (invoke "invoke" "kw-docs" "project-docs")
2798 (mkdir-p doc)
2799 (for-each delete-file (find-files "docs" "\\.rst"))
2800 (copy-recursively "docs" doc)
2801 #t)))
2802 (replace 'check
2803 (lambda _
2804 ;; Some tests require an SSH server; we remove them.
2805 (delete-file "utest/test_client_api.py")
2806 (delete-file "utest/test_scp.py")
2807 (invoke "python" "utest/run.py"))))))
2808 (propagated-inputs
2809 `(("python-robotframework" ,python-robotframework)
2810 ("python-paramiko" ,python-paramiko)
2811 ("python-scp" ,python-scp)))
2812 (native-inputs
2813 `(("openssh" ,openssh)
2814 ("which" ,which)
2815 ;; To generate the documentation
2816 ("python-docutils" ,python-docutils)
2817 ("python-invoke" ,python-invoke)
2818 ("python-pygments" ,python-pygments)
2819 ("python-rellu" ,python-rellu)))
2820 (outputs '("out" "doc"))
2821 (home-page "https://github.com/robotframework/SSHLibrary")
2822 (synopsis "Robot Framework library for SSH and SFTP")
2823 (description "SSHLibrary is a Robot Framework library providing support
2824for SSH and SFTP. It has the following main usages:
2825@itemize @bullet
2826@item Executing commands on the remote machine, either blocking or non-blocking.
2827@item Writing and reading in an interactive shell.
2828@item Transferring files and directories over SFTP.
2829@item Ensuring that files and directories exist on the remote machine.
2830@end itemize")
2831 (license license:asl2.0)))
2832
13d825fc
MC
2833(define-public python-scp
2834 (package
2835 (name "python-scp")
2836 (version "0.13.2")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "scp" version))
2841 (sha256
2842 (base32
2843 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2844 (build-system python-build-system)
2845 (arguments
2846 '(#:tests? #f)) ;tests require an SSH server
2847 (propagated-inputs
2848 `(("python-paramiko" ,python-paramiko)))
2849 (home-page "https://github.com/jbardin/scp.py")
2850 (synopsis "SCP protocol module for Python and Paramiko")
2851 (description "The scp module extends the Paramiko library to send and
2852receive files via the SCP1 protocol, as implemented by the OpenSSH
2853@command{scp} program.")
2854 (license license:gpl2+)))
2855
44d10b1f
RW
2856(define-public python-rst.linker
2857 (package
2858 (name "python-rst.linker")
2859 (version "1.10")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "rst.linker" version))
2864 (sha256
2865 (base32
2866 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2867 (build-system python-build-system)
2868 (propagated-inputs
2869 `(("python-dateutil" ,python-dateutil)
2870 ("python-six" ,python-six)))
2871 (native-inputs
2872 `(("python-setuptools-scm" ,python-setuptools-scm)))
2873 ;; Test would require path.py, which would introduce a cyclic dependence.
2874 (arguments `(#:tests? #f))
2875 ;; Note: As of version 1.7 the documentation is not worth building.
2876 (home-page "https://github.com/jaraco/rst.linker")
2877 (synopsis "Sphinx plugin to add links and timestamps")
2878 (description "rst.linker allows to automatically replace text by a
2879reStructuredText external reference or timestamps. It's primary purpose is to
2880augment the changelog, but it can be used for other documents, too.")
2881 (license license:expat)))
2882
2883(define-public python2-rst.linker
2884 (package-with-python2 python-rst.linker))
2885
2886(define-public python-feedgenerator
2887 (package
2888 (name "python-feedgenerator")
2889 (version "1.9")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "feedgenerator" version))
2894 (sha256
2895 (base32
2896 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2897 (modules '((guix build utils)))
2898 (snippet
2899 '(begin
2900 ;; Remove pre-compiled .pyc files from source.
2901 (for-each delete-file-recursively
2902 (find-files "." "__pycache__" #:directories? #t))
2903 (for-each delete-file (find-files "." "\\.pyc$"))
2904 #t))))
2905 (build-system python-build-system)
2906 (propagated-inputs
2907 `(("python-pytz" ,python-pytz)
2908 ("python-six" ,python-six)))
2909 (home-page "https://github.com/getpelican/feedgenerator")
2910 (synopsis
2911 "Standalone version of Django's Atom/RSS feed generator")
2912 (description
2913 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2914which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2915 (license license:bsd-3)))
2916
2917(define-public python2-feedgenerator
2918 (package-with-python2 python-feedgenerator))
2919
2920(define-public python-toml
2921 (package
2922 (name "python-toml")
2923 (version "0.9.4")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "toml" version))
2928 (sha256
2929 (base32
2930 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2931 (build-system python-build-system)
2932 (arguments
2933 `(#:tests? #f)) ;no tests suite in release
2934 (home-page "https://github.com/uiri/toml")
2935 (synopsis "Library for TOML")
2936 (description
2937 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2938Language (TOML) configuration files.")
2939 (license license:expat)))
2940
346c8752
BG
2941(define-public python-jsonrpc-server
2942 (package
2943 (name "python-jsonrpc-server")
2944 (version "0.1.2")
2945 (source
2946 (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "python-jsonrpc-server" version))
2949 (sha256
2950 (base32
2951 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2952 (build-system python-build-system)
2953 (propagated-inputs
2954 `(("python-future" ,python-future)
2955 ("python-mock" ,python-mock)
2956 ("python-pytest" ,python-pytest)))
2957 (home-page
2958 "https://github.com/palantir/python-jsonrpc-server")
2959 (synopsis "JSON RPC 2.0 server library")
2960 (description
1df5407c 2961 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2962 (license license:expat)))
2963
56f4ad47
BG
2964(define-public python-pydocstyle
2965 (package
2966 (name "python-pydocstyle")
2967 (version "3.0.0")
2968 (source
2969 (origin
2970 (method url-fetch)
2971 (uri (pypi-uri "pydocstyle" version))
2972 (sha256
2973 (base32
2974 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2975 (build-system python-build-system)
2976 (propagated-inputs
2977 `(("python-six" ,python-six)
2978 ("python-snowballstemmer" ,python-snowballstemmer)))
2979 (home-page
2980 "https://github.com/PyCQA/pydocstyle/")
2981 (synopsis "Python docstring style checker")
2982 (description
2983 "This package provides a style checker for the Python Language
2984Server (PLS).")
2985 (license license:expat)))
2986
4913828b
BL
2987;; XXX: We must use a non-release version since the latest release version
2988;; requires python-jedi version < 0.15.
be4d840c 2989(define-public python-language-server
4913828b
BL
2990 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
2991 (revision "1"))
2992 (package
2993 (name "python-language-server")
2994 (version (git-version "0.28.3" revision commit))
2995 (source
2996 (origin
2997 (method git-fetch)
2998 (uri (git-reference
2999 (url "https://github.com/palantir/python-language-server.git")
3000 (commit commit)))
3001 (sha256
3002 (base32
3003 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3004 (build-system python-build-system)
3005 (propagated-inputs
3006 `(("python-pluggy" ,python-pluggy)
3007 ("python-jsonrpc-server" ,python-jsonrpc-server)
3008 ("python-jedi" ,python-jedi)
3009 ("python-yapf" ,python-yapf)
3010 ("python-pyflakes" ,python-pyflakes)
3011 ("python-pydocstyle" ,python-pydocstyle)
3012 ("python-pycodestyle" ,python-pycodestyle)
3013 ("python-mccabe" ,python-mccabe)
3014 ("python-rope" ,python-rope)
3015 ("python-autopep8" ,python-autopep8)
3016 ("python-pylint" ,python-pylint)))
3017 (home-page "https://github.com/palantir/python-language-server")
3018 (synopsis "Python implementation of the Language Server Protocol")
3019 (description
3020 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3021language specification for the Language Server Protocol (LSP). This tool is
3022used in text editing environments to provide a complete and integrated
3023feature-set for programming Python effectively.")
4913828b 3024 (license license:expat))))
be4d840c 3025
44d10b1f
RW
3026(define-public python-black
3027 (package
3028 (name "python-black")
3029 (version "18.6b4")
3030 (source
3031 (origin
3032 (method url-fetch)
3033 (uri (pypi-uri "black" version))
3034 (sha256
3035 (base32
3036 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3037 (build-system python-build-system)
3038 (arguments
3039 `(#:phases
3040 (modify-phases %standard-phases
3041 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3042 (lambda _
3043 (let ((python3 (which "python3")))
3044 (substitute* '("tests/data/fmtonoff.py"
3045 "tests/data/string_prefixes.py"
3046 "tests/data/function.py")
3047 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3048 (string-append "#!" python3 (if (string? minor-version)
3049 minor-version
3050 ""))))))))))
3051 (propagated-inputs
3052 `(("python-click" ,python-click)
3053 ("python-attrs" ,python-attrs)
3054 ("python-appdirs" ,python-appdirs)
3055 ("python-toml" ,python-toml)))
3056 (home-page "https://github.com/ambv/black")
3057 (synopsis "The uncompromising code formatter")
3058 (description "Black is the uncompromising Python code formatter.")
3059 (license license:expat)))
3060
3061(define-public python-blinker
3062 (package
3063 (name "python-blinker")
3064 (version "1.4")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "blinker" version))
3069 (sha256
3070 (base32
3071 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3072 (build-system python-build-system)
3073 (home-page "http://pythonhosted.org/blinker/")
3074 (synopsis "Fast, simple object-to-object and broadcast signaling")
3075 (description
3076 "Blinker provides a fast dispatching system that allows any number of
3077interested parties to subscribe to events, or \"signals\".")
3078 (license license:expat)))
3079
3080(define-public python2-blinker
3081 (package-with-python2 python-blinker))
3082
3083(define-public pelican
3084 (package
3085 (name "pelican")
aa71b690 3086 (version "4.0.1")
44d10b1f
RW
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "pelican" version))
3091 (sha256
3092 (base32
aa71b690 3093 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3094 (build-system python-build-system)
3095 (propagated-inputs
3096 `(("python-feedgenerator" ,python-feedgenerator)
3097 ("python-jinja2" ,python-jinja2)
3098 ("python-pygments" ,python-pygments)
3099 ("python-docutils" ,python-docutils)
3100 ("python-pytz" ,python-pytz)
3101 ("python-blinker" ,python-blinker)
3102 ("python-unidecode" ,python-unidecode)
3103 ("python-six" ,python-six)
3104 ("python-dateutil" ,python-dateutil)
3105 ("python-markdown" ,python-markdown)))
3106 (home-page "https://getpelican.com/")
3107 (arguments
3108 `(;; XXX Requires a lot more packages to do unit tests :P
3109 #:tests? #f
3110 #:phases (modify-phases %standard-phases
3111 (add-before
3112 'install 'adjust-requires
3113 ;; Since feedgenerator is installed from git, it doesn't
3114 ;; conform to the version requirements.
3115 ;;
3116 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3117 ;; version requirement so setuptools doesn't get confused.
3118 (lambda _
3119 (substitute* "setup.py"
3120 (("['\"]feedgenerator.*?['\"]")
3121 "'feedgenerator'")))))))
3122 (synopsis "Python-based static site publishing system")
3123 (description
3124 "Pelican is a tool to generate a static blog from reStructuredText,
3125Markdown input files, and more. Pelican uses Jinja2 for templating
3126and is very extensible.")
3127 (license license:agpl3+)))
3128
8c141421
JH
3129(define-public mallard-ducktype
3130 (package
3131 (name "mallard-ducktype")
12cc3da5 3132 (version "1.0.2")
8c141421
JH
3133 (source
3134 (origin
3135 (method git-fetch)
12cc3da5
JH
3136 ;; git-reference because tests are not included in pypi source tarball
3137 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3138 (uri (git-reference
3139 (url "https://github.com/projectmallard/mallard-ducktype.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
12cc3da5 3144 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3145 (build-system python-build-system)
5246655f
EF
3146 (arguments
3147 '(#:phases
3148 (modify-phases %standard-phases
3149 (replace 'check
3150 (lambda _
3151 (with-directory-excursion "tests"
3152 (invoke "sh" "runtests")))))))
8c141421
JH
3153 (home-page "http://projectmallard.org")
3154 (synopsis "Convert Ducktype to Mallard documentation markup")
3155 (description
3156 "Ducktype is a lightweight syntax that can represent all the semantics
3157of the Mallard XML documentation system. Ducktype files can be converted to
3158Mallard using the @command{ducktype} tool. The yelp-tools package
3159provides additional functionality on the produced Mallard documents.")
3160 (license license:expat)))
3161
44d10b1f
RW
3162(define-public python-scikit-image
3163 (package
3164 (name "python-scikit-image")
9ff04084 3165 (version "0.14.2")
44d10b1f
RW
3166 (source
3167 (origin
3168 (method url-fetch)
3169 (uri (pypi-uri "scikit-image" version))
3170 (sha256
9ff04084 3171 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3172 (build-system python-build-system)
3173 (arguments
3174 ;; TODO: Some tests require running X11 server. Disable them?
3175 '(#:tests? #f))
3176 ;; See DEPENDS.txt for the list of build and run time requiremnts
3177 (propagated-inputs
3178 `(("python-cloudpickle" ,python-cloudpickle)
3179 ("python-dask" ,python-dask)
3180 ("python-matplotlib" ,python-matplotlib)
3181 ("python-networkx" ,python-networkx)
3182 ("python-numpy" ,python-numpy)
3183 ("python-pillow" ,python-pillow)
3184 ("python-pywavelets" ,python-pywavelets)
3185 ("python-scipy" ,python-scipy)
3186 ("python-six" ,python-six)))
3187 (native-inputs
3188 `(("python-cython" ,python-cython)))
3189 (home-page "http://scikit-image.org/")
3190 (synopsis "Image processing in Python")
3191 (description
3192 "Scikit-image is a collection of algorithms for image processing.")
3193 (license license:bsd-3)))
3194
3195(define-public python2-scikit-image
3196 (package-with-python2 python-scikit-image))
3197
3198(define-public python-cython
3199 (package
3200 (name "python-cython")
756a9809 3201 (version "0.29.13")
44d10b1f
RW
3202 (source
3203 (origin
3204 (method url-fetch)
3205 (uri (pypi-uri "Cython" version))
3206 (sha256
3207 (base32
756a9809 3208 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3209 (build-system python-build-system)
3210 ;; we need the full python package and not just the python-wrapper
3211 ;; because we need libpython3.3m.so
3212 (inputs
3213 `(("python" ,python)))
3214 (arguments
3215 `(#:phases
3216 (modify-phases %standard-phases
3217 (add-before 'check 'set-HOME
3218 ;; some tests require access to "$HOME/.cython"
3219 (lambda _ (setenv "HOME" "/tmp") #t))
3220
3221 ;; FIXME: These tests started failing on armhf after the 0.28 update
3222 ;; (commit c69d11c5930), both with an error such as this:
3223 ;; compiling (cpp) and running dictcomp ...
3224 ;; === C/C++ compiler error output: ===
3225 ;; ‘
3226 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3227 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3228 ,@(if (target-arm32?)
3229 `((add-before 'check 'disable-failing-tests
3230 (lambda _
3231 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3232 (for-each (lambda (test)
3233 (format disabled-tests "~a\n" test))
3234 '("memslice" "dictcomp"))
3235 (close-port disabled-tests)))))
3236 '())
3237
3238 (replace 'check
3239 (lambda _
275cce3d
MB
3240 ;; Disable compiler optimizations to greatly reduce the running
3241 ;; time of the test suite.
3242 (setenv "CFLAGS" "-O0")
3243
3244 (invoke "python" "runtests.py" "-vv"
3245 "-j" (number->string (parallel-job-count))))))))
f319409b 3246 (home-page "https://cython.org/")
44d10b1f
RW
3247 (synopsis "C extensions for Python")
3248 (description "Cython is an optimising static compiler for both the Python
3249programming language and the extended Cython programming language. It makes
3250writing C extensions for Python as easy as Python itself.")
3251 (license license:asl2.0)
3252 (properties `((python2-variant . ,(delay python2-cython))))))
3253
3254(define-public python2-cython
3255 (package (inherit (package-with-python2
3256 (strip-python2-variant python-cython)))
3257 (name "python2-cython")
3258 (inputs
3259 `(("python-2" ,python-2))))) ; this is not automatically changed
3260
3261;; The RPython toolchain currently does not support Python 3.
3262(define-public python2-rpython
3263 (package
3264 (name "python2-rpython")
3265 (version "0.2.1")
3266 (source
3267 (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "rpython" version))
3270 (sha256
3271 (base32
3272 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3273 (build-system python-build-system)
3274 (arguments `(#:python ,python-2))
3275 (native-inputs
3276 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3277 (home-page "https://rpython.readthedocs.org")
3278 (synopsis "Framework for implementing interpreters and virtual machines")
3279 (description "RPython is a translation and support framework for
3280producing implementations of dynamic languages, emphasizing a clean separation
3281between language specification and implementation aspects.")
3282 (license license:expat)))
3283
3284;; NOTE: when upgrading numpy please make sure that python-pandas and
3285;; python-scipy still build, as these three packages are often used together.
3286(define-public python-numpy
3287 (package
3288 (name "python-numpy")
3289 (version "1.15.4")
3290 (source
3291 (origin
3292 (method url-fetch)
3293 (uri (string-append
3294 "https://github.com/numpy/numpy/releases/download/v"
3295 version "/numpy-" version ".tar.gz"))
3296 (sha256
3297 (base32
3298 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3299 (build-system python-build-system)
3300 (inputs
3301 `(("openblas" ,openblas)
3302 ("lapack" ,lapack)))
3303 (native-inputs
3304 `(("python-cython" ,python-cython)
3305 ("python-pytest" ,python-pytest)
3306 ("gfortran" ,gfortran)))
3307 (arguments
3308 `(#:phases
3309 (modify-phases %standard-phases
3310 (add-before 'build 'configure-blas-lapack
3311 (lambda* (#:key inputs #:allow-other-keys)
3312 (call-with-output-file "site.cfg"
3313 (lambda (port)
3314 (format port
3315 "[openblas]
3316libraries = openblas
3317library_dirs = ~a/lib
3318include_dirs = ~a/include
3319
3320# backslash-n to make emacs happy
3321\n[lapack]
3322lapack_libs = lapack
3323library_dirs = ~a/lib
3324include_dirs = ~a/include
3325"
3326 (assoc-ref inputs "openblas")
3327 (assoc-ref inputs "openblas")
3328 (assoc-ref inputs "lapack")
3329 (assoc-ref inputs "lapack"))))
3330 #t))
3331 (add-before 'build 'fix-executable-paths
3332 (lambda* (#:key inputs #:allow-other-keys)
3333 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3334 ;; instead of /bin/sh.
3335 (substitute* "numpy/distutils/exec_command.py"
3336 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3337 (string-append match-start (assoc-ref inputs "bash") match-end)))
3338 ;; Use "gcc" executable, not "cc".
3339 (substitute* "numpy/distutils/system_info.py"
3340 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3341 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3342 #t))
3343 ;; Tests can only be run after the library has been installed and not
3344 ;; within the source directory.
3345 (delete 'check)
3346 (add-after 'install 'check
3347 (lambda* (#:key outputs inputs #:allow-other-keys)
3348 ;; Make installed package available for running the tests
3349 (add-installed-pythonpath inputs outputs)
3350 ;; Make sure "f2py" etc is found.
3351 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3352 ":" (getenv "PATH")))
3353 (with-directory-excursion "/tmp"
3354 (invoke "python" "-c"
3355 "import numpy; numpy.test(verbose=2)")))))))
3356 (home-page "http://www.numpy.org/")
3357 (synopsis "Fundamental package for scientific computing with Python")
3358 (description "NumPy is the fundamental package for scientific computing
3359with Python. It contains among other things: a powerful N-dimensional array
3360object, sophisticated (broadcasting) functions, tools for integrating C/C++
3361and Fortran code, useful linear algebra, Fourier transform, and random number
3362capabilities.")
3363 (license license:bsd-3)))
3364
3365(define-public python2-numpy
3366 (package-with-python2 python-numpy))
3367
3368;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3369;; interest only for legacy code going back to NumPy's predecessor
3370;; Numeric.
3371(define-public python2-numpy-1.8
3372 (package (inherit python2-numpy)
3373 (version "1.8.2")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (string-append
3378 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3379 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3380 (sha256
3381 (base32
3382 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3383 (arguments
3384 (substitute-keyword-arguments (package-arguments python2-numpy)
3385 ((#:phases phases)
3386 `(modify-phases ,phases
3387 (replace 'configure-blas-lapack
3388 (lambda* (#:key inputs #:allow-other-keys)
3389 (call-with-output-file "site.cfg"
3390 (lambda (port)
3391 (format port
3392 "[openblas]
3393libraries = openblas,lapack
3394library_dirs = ~a/lib:~a/lib
3395include_dirs = ~a/include:~a/include
3396"
3397 (assoc-ref inputs "openblas")
3398 (assoc-ref inputs "lapack")
3399 (assoc-ref inputs "openblas")
3400 (assoc-ref inputs "lapack"))))
3401 #t))))))
3402 (native-inputs
3403 `(("python2-nose" ,python2-nose)))
3404 (description "NumPy is the fundamental package for scientific computing
3405with Python. It contains among other things: a powerful N-dimensional array
3406object, sophisticated (broadcasting) functions, tools for integrating C/C++
3407and Fortran code, useful linear algebra, Fourier transform, and random number
3408capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3409that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3410Numeric.")
3411 (license license:bsd-3)))
3412
3413(define-public python-munch
3414 (package
3415 (name "python-munch")
3416 (version "2.0.4")
3417 (source
3418 (origin
3419 (method url-fetch)
3420 (uri (pypi-uri "munch" version))
3421 (sha256
3422 (base32
3423 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3424 (build-system python-build-system)
3425 (home-page "https://github.com/Infinidat/munch")
3426 (synopsis "Dot-accessible dictionary")
3427 (description "Munch is a dot-accessible dictionary similar to JavaScript
3428objects.")
3429 (license license:expat)))
3430
3431(define-public python2-munch
3432 (package-with-python2 python-munch))
3433
3434(define-public python-colormath
3435 (package
3436 (name "python-colormath")
3437 (version "3.0.0")
3438 (source
3439 (origin
3440 (method url-fetch)
3441 (uri (pypi-uri "colormath" version))
3442 (sha256
3443 (base32
3444 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3445 (build-system python-build-system)
3446 (propagated-inputs
3447 `(("python-networkx" ,python-networkx)
3448 ("python-numpy" ,python-numpy)))
3449 (home-page "https://github.com/gtaylor/python-colormath")
3450 (synopsis "Color math and conversion library")
3451 (description
3452 "This is a Python library for color math and conversions.")
3453 (license license:bsd-3)))
3454
3455(define-public python2-colormath
3456 (package-with-python2 python-colormath))
3457
3458(define-public python-spectra
3459 (package
3460 (name "python-spectra")
3461 (version "0.0.11")
3462 (source
3463 (origin
3464 (method url-fetch)
3465 (uri (pypi-uri "spectra" version))
3466 (sha256
3467 (base32
3468 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3469 (build-system python-build-system)
3470 (arguments
3471 `(#:phases
3472 (modify-phases %standard-phases
3473 (replace 'check
38ec0f6a 3474 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3475 (propagated-inputs
3476 `(("python-colormath" ,python-colormath)))
3477 (native-inputs
3478 `(("python-nose" ,python-nose)))
3479 (home-page "https://github.com/jsvine/spectra")
3480 (synopsis "Color scales and color conversion")
3481 (description
3482 "This package provides a Python library intended to make color math,
3483color scales, and color space conversion easy. It has support for:
3484
3485@enumerate
3486@item Color scales
3487@item Color ranges
3488@item Color blending
3489@item Brightening/darkening colors
3490@item Saturating/desaturating colors
3491@item Conversion to/from multiple color spaces.
3492@end enumerate\n")
3493 (license license:expat)))
3494
3495(define-public python2-spectra
3496 (package-with-python2 python-spectra))
3497
3498(define-public python-numpy-documentation
3499 (package
3500 (name "python-numpy-documentation")
3501 (version (package-version python-numpy))
3502 (source (package-source python-numpy))
3503 (build-system python-build-system)
3504 (native-inputs
3505 `(("python-matplotlib" ,python-matplotlib)
3506 ("python-numpy" ,python-numpy)
3507 ("pkg-config" ,pkg-config)
3508 ("python-sphinx" ,python-sphinx)
3509 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3510 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3511 texlive-fonts-ec
3512 texlive-generic-ifxetex
3513 texlive-generic-pdftex
f75aa97f 3514 texlive-amsfonts
44d10b1f
RW
3515 texlive-latex-capt-of
3516 texlive-latex-cmap
3517 texlive-latex-environ
3518 texlive-latex-eqparbox
3519 texlive-latex-etoolbox
3520 texlive-latex-expdlist
3521 texlive-latex-fancyhdr
3522 texlive-latex-fancyvrb
3523 texlive-latex-fncychap
3524 texlive-latex-float
3525 texlive-latex-framed
3526 texlive-latex-geometry
3527 texlive-latex-graphics
3528 texlive-latex-hyperref
3529 texlive-latex-mdwtools
3530 texlive-latex-multirow
3531 texlive-latex-needspace
3532 texlive-latex-oberdiek
3533 texlive-latex-parskip
3534 texlive-latex-preview
3535 texlive-latex-tabulary
3536 texlive-latex-threeparttable
3537 texlive-latex-titlesec
3538 texlive-latex-trimspaces
3539 texlive-latex-ucs
3540 texlive-latex-upquote
3541 texlive-latex-url
3542 texlive-latex-varwidth
3543 texlive-latex-wrapfig)))
3544 ("texinfo" ,texinfo)
3545 ("perl" ,perl)
3546 ("scipy-sphinx-theme"
3547 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3548 (method git-fetch)
3549 (uri (git-reference
3550 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3551 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3552 (sha256
3553 (base32
3554 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3555 ,@(package-native-inputs python-numpy)))
3556 (arguments
3557 `(#:tests? #f ; we're only generating the documentation
3558 #:phases
3559 (modify-phases %standard-phases
3560 (delete 'build)
3561 (replace 'install
3562 (lambda* (#:key inputs outputs #:allow-other-keys)
3563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3564 (doc (string-append
3565 data "/doc/" ,name "-"
3566 ,(package-version python-numpy)))
3567 (info-reader (string-append data "/info"))
3568 (html (string-append doc "/html"))
3569 (scipy-sphinx-theme "scipy-sphinx-theme")
3570 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3571 (pyver ,(string-append "PYVER=")))
3572
3573 ;; FIXME: this is needed to for texlive-union to generate
3574 ;; fonts, which are not found.
3575 (setenv "HOME" "/tmp")
3576
3577 (with-directory-excursion "doc"
3578 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3579 (mkdir-p html)
4fc898da
RW
3580 (invoke "make" "html" pyver)
3581 (invoke "make" "latex" "PAPER=a4" pyver)
3582 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3583 "all-pdf" "PAPER=a4" pyver)
3584 ;; FIXME: Generation of the info file fails.
4fc898da 3585 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3586 ;; (mkdir-p info)
3587 ;; (copy-file "build/texinfo/numpy.info"
3588 ;; (string-append info "/numpy.info"))
3589 (for-each (lambda (file)
3590 (copy-file (string-append "build/latex" file)
3591 (string-append doc file)))
3592 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3593 (with-directory-excursion "build/html"
3594 (for-each (lambda (file)
3595 (let* ((dir (dirname file))
3596 (tgt-dir (string-append html "/" dir)))
3597 (unless (equal? "." dir)
3598 (mkdir-p tgt-dir))
3599 (install-file file html)))
3600 (find-files "." ".*")))))
3601 #t)))))
3602 (home-page (package-home-page python-numpy))
3603 (synopsis "Documentation for the python-numpy package")
3604 (description (package-description python-numpy))
3605 (license (package-license python-numpy))))
3606
3607(define-public python2-numpy-documentation
3608 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3609 (package
3610 (inherit numpy-documentation)
3611 (native-inputs `(("python2-functools32" ,python2-functools32)
3612 ,@(package-native-inputs numpy-documentation))))))
3613
3614(define-public python-pygit2
3615 (package
3616 (name "python-pygit2")
dac8b275 3617 (version "0.28.2")
44d10b1f
RW
3618 (source
3619 (origin
3620 (method url-fetch)
3621 (uri (pypi-uri "pygit2" version))
3622 (sha256
dac8b275 3623 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3624 (build-system python-build-system)
3625 (arguments
c3ecab0d 3626 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3627 (propagated-inputs
3628 `(("python-six" ,python-six)
3629 ("python-cffi" ,python-cffi)
3630 ("libgit2" ,libgit2)
3631 ("python-tox" ,python-tox)))
3632 (native-inputs
3633 `(("python-pytest" ,python-pytest)))
3634 (home-page "https://github.com/libgit2/pygit2")
3635 (synopsis "Python bindings for libgit2")
3636 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3637library, libgit2 implements Git plumbing.")
3638 ;; GPL2.0 only, with linking exception.
3639 (license license:gpl2)))
3640
3641(define-public python2-pygit2
3642 (package-with-python2 python-pygit2))
3643
3644(define-public python-pyparsing
3645 (package
3646 (name "python-pyparsing")
6d3cff5a 3647 (version "2.3.1")
44d10b1f
RW
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "pyparsing" version))
3652 (sha256
6d3cff5a 3653 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3654 (build-system python-build-system)
3655 (outputs '("out" "doc"))
3656 (arguments
3657 `(#:tests? #f ; no test target
3658 #:phases
3659 (modify-phases %standard-phases
3660 (add-after 'install 'install-doc
3661 (lambda* (#:key outputs #:allow-other-keys)
3662 (let* ((doc (string-append (assoc-ref outputs "doc")
3663 "/share/doc/" ,name "-" ,version))
3664 (html-doc (string-append doc "/html"))
3665 (examples (string-append doc "/examples")))
3666 (mkdir-p html-doc)
3667 (mkdir-p examples)
3668 (for-each
3669 (lambda (dir tgt)
3670 (map (lambda (file)
3671 (install-file file tgt))
3672 (find-files dir ".*")))
3673 (list "docs" "htmldoc" "examples")
3674 (list doc html-doc examples))
3675 #t))))))
3676 (home-page "https://github.com/pyparsing/pyparsing")
3677 (synopsis "Python parsing class library")
3678 (description
3679 "The pyparsing module is an alternative approach to creating and
3680executing simple grammars, vs. the traditional lex/yacc approach, or the use
3681of regular expressions. The pyparsing module provides a library of classes
3682that client code uses to construct the grammar directly in Python code.")
3683 (license license:expat)))
3684
3685(define-public python2-pyparsing
3686 (package-with-python2 python-pyparsing))
3687
3688(define-public python-numpydoc
3689 (package
3690 (name "python-numpydoc")
3691 (version "0.8.0")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (pypi-uri "numpydoc" version))
3696 (sha256
3697 (base32
3698 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3699 (build-system python-build-system)
3700 (propagated-inputs
3701 `(("python-sphinx" ,python-sphinx)))
3702 (native-inputs
3703 `(("python-nose" ,python-nose)))
3704 (home-page "https://pypi.python.org/pypi/numpydoc")
3705 (synopsis
3706 "Numpy's Sphinx extensions")
3707 (description
3708 "Sphinx extension to support docstrings in Numpy format.")
3709 (license license:bsd-2)))
3710
3711(define-public python2-numpydoc
3712 (package-with-python2 python-numpydoc))
3713
3714(define-public python-numexpr
3715 (package
3716 (name "python-numexpr")
3717 (version "2.6.5")
3718 (source
3719 (origin
3720 (method url-fetch)
3721 (uri (pypi-uri "numexpr" version))
3722 (sha256
3723 (base32
3724 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3725 (build-system python-build-system)
3726 (arguments `(#:tests? #f)) ; no tests included
3727 (propagated-inputs
3728 `(("python-numpy" ,python-numpy)))
3729 (home-page "https://github.com/pydata/numexpr")
3730 (synopsis "Fast numerical expression evaluator for NumPy")
3731 (description
3732 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3733expressions that operate on arrays are accelerated and use less memory than
3734doing the same calculation in Python. In addition, its multi-threaded
3735capabilities can make use of all your cores, which may accelerate
3736computations, most specially if they are not memory-bounded (e.g. those using
3737transcendental functions).")
3738 (license license:expat)))
3739
3740(define-public python2-numexpr
3741 (package-with-python2 python-numexpr))
3742
3743(define-public python-cycler
3744 (package
3745 (name "python-cycler")
3746 (version "0.10.0")
3747 (source (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "cycler" version))
3750 (sha256
3751 (base32
3752 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3753 (build-system python-build-system)
3754 (arguments
3755 ;; XXX: The current version requires 'coveralls' which we don't have.
3756 ;; Enable this for the next release which uses 'python-pytest'.
3757 '(#:tests? #f))
3758 (propagated-inputs
3759 `(("python-six" ,python-six)))
3760 (home-page "http://matplotlib.org/cycler/")
3761 (synopsis "Composable keyword argument iterator")
3762 (description
3763 "When using @code{matplotlib} and plotting more than one line, it is
3764common to want to be able to want to be able to cycle over one or more artist
3765styles; but the plotting logic can quickly become involved.
3766To address this and enable easy cycling over arbitrary @code{kwargs}, the
3767@code{Cycler} class was developed.")
3768 (license license:bsd-3)))
3769
3770(define-public python2-cycler
3771 (package-with-python2 python-cycler))
3772
3773(define-public python-colorspacious
3774 (package
3775 (name "python-colorspacious")
3776 (version "1.1.0")
3777 (source
dee92e65
TGR
3778 (origin
3779 (method git-fetch)
3780 (uri (git-reference
3781 (url "https://github.com/njsmith/colorspacious.git")
3782 (commit (string-append "v" version))))
3783 (file-name (git-file-name name version))
3784 (sha256
3785 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3786 (build-system python-build-system)
3787 (propagated-inputs
3788 `(("python-numpy" ,python-numpy)))
3789 (native-inputs
3790 `(("python-nose" ,python-nose)))
3791 (arguments
3792 `(#:phases
3793 (modify-phases %standard-phases
3794 (replace 'check
3795 (lambda _
c988afda 3796 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3797 (home-page "https://github.com/njsmith/colorspacious")
3798 (synopsis "Python library for colorspace conversions")
3799 (description "@code{colorspacious} is a Python library that lets you
3800convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3801 (license license:expat)))
3802
3803(define-public python2-colorspacious
3804 (package-with-python2 python-colorspacious))
3805
3806(define-public python-matplotlib
3807 (package
3808 (name "python-matplotlib")
5ea654cf 3809 (version "3.1.1")
44d10b1f
RW
3810 (source
3811 (origin
3812 (method url-fetch)
3813 (uri (pypi-uri "matplotlib" version))
3814 (sha256
3815 (base32
5ea654cf 3816 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
44d10b1f
RW
3817 (build-system python-build-system)
3818 (propagated-inputs ; the following packages are all needed at run time
3819 `(("python-cycler" ,python-cycler)
3820 ("python-kiwisolver" ,python-kiwisolver)
3821 ("python-pyparsing" ,python-pyparsing)
3822 ("python-pygobject" ,python-pygobject)
3823 ("gobject-introspection" ,gobject-introspection)
3824 ("python-tkinter" ,python "tk")
3825 ("python-dateutil" ,python-dateutil)
3826 ("python-numpy" ,python-numpy)
3827 ("python-pillow" ,python-pillow)
3828 ("python-pytz" ,python-pytz)
3829 ("python-six" ,python-six)
44d10b1f
RW
3830 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3831 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3832 ;; object. For this reason we need to import both libraries.
5ea654cf 3833 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3834 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3835 ("python-cairocffi" ,python-cairocffi)))
3836 (inputs
3837 `(("libpng" ,libpng)
3838 ("imagemagick" ,imagemagick)
3839 ("freetype" ,freetype)
3840 ("cairo" ,cairo)
3841 ("glib" ,glib)
3842 ;; FIXME: Add backends when available.
3843 ;("python-wxpython" ,python-wxpython)
3844 ("tcl" ,tcl)
3845 ("tk" ,tk)))
3846 (native-inputs
3847 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3848 ("python-pytest" ,python-pytest)
3849 ("python-mock" ,python-mock)
3850 ("unzip" ,unzip)
3851 ("jquery-ui"
3852 ,(origin
3853 (method url-fetch)
3854 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3855 (sha256
3856 (base32
3857 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3858 (arguments
3859 `(#:phases
3860 (modify-phases %standard-phases
5ea654cf
RW
3861 ;; XXX We disable all image comparison tests because we're using a
3862 ;; newer version of FreeType than matplotlib expects. This leads to
3863 ;; minor differences throughout the tests.
3864 (add-after 'unpack 'fix-and-disable-failing-tests
3865 (lambda _
3866 (substitute* (append (find-files "lib/matplotlib/tests/"
3867 "test_.*\\.py$")
3868 (find-files "lib/mpl_toolkits/tests"
3869 "test_.*\\.py$"))
3870 (("^from matplotlib" match)
3871 (string-append "import pytest\n" match))
3872 (("( *)@image_comparison" match indent)
3873 (string-append indent
3874 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3875 match)))
3876 (substitute* "lib/matplotlib/tests/test_animation.py"
3877 (("/bin/sh") (which "sh")))
3878 (for-each delete-file
3879 ;; test_normal_axes, test_get_tightbbox_polar
3880 '("lib/matplotlib/tests/test_axes.py"
3881 ;; test_outward_ticks
3882 "lib/matplotlib/tests/test_tightlayout.py"
3883 ;; Fontconfig returns no fonts.
3884 "lib/matplotlib/tests/test_font_manager.py"))
3885 #t))
3886 (add-before 'install 'install-jquery-ui
3887 (lambda* (#:key outputs inputs #:allow-other-keys)
3888 (let ((dir (string-append (assoc-ref outputs "out")
3889 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3890 (mkdir-p dir)
3891 (invoke "unzip"
3892 (assoc-ref inputs "jquery-ui")
3893 "-d" dir))
3894 #t))
3895 (delete 'check)
3896 (add-after 'install 'check
3897 (lambda* (#:key outputs inputs #:allow-other-keys)
3898 (add-installed-pythonpath inputs outputs)
3899 (invoke "python" "tests.py" "-v"
3900 "-m" "not network")))
44d10b1f
RW
3901 (add-before 'build 'configure-environment
3902 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3903 (let ((cairo (assoc-ref inputs "cairo")))
3904 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3905 ;; has not effect.
34c2a16b 3906 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3907 (setenv "HOME" (getcwd))
3908 (call-with-output-file "setup.cfg"
3909 (lambda (port)
3910 (format port "[directories]~%
3911basedirlist = ~a,~a~%
5ea654cf
RW
3912[packages]~%
3913tests = True~%"
44d10b1f
RW
3914 (assoc-ref inputs "tcl")
3915 (assoc-ref inputs "tk")))))
3916 #t)))))
339b5828 3917 (home-page "https://matplotlib.org/")
44d10b1f
RW
3918 (synopsis "2D plotting library for Python")
3919 (description
3920 "Matplotlib is a Python 2D plotting library which produces publication
3921quality figures in a variety of hardcopy formats and interactive environments
3922across platforms. Matplotlib can be used in Python scripts, the python and
3923ipython shell, web application servers, and six graphical user interface
3924toolkits.")
3925 (license license:psfl)
3926 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3927
3928(define-public python2-matplotlib
3929 (let ((matplotlib (package-with-python2
3930 (strip-python2-variant python-matplotlib))))
3931 (package (inherit matplotlib)
7380df73 3932 (version "2.2.4")
5ea654cf
RW
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "matplotlib" version))
3937 (sha256
3938 (base32
7380df73 3939 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
3940 (arguments
3941 (substitute-keyword-arguments (package-arguments matplotlib)
3942 ((#:phases phases)
3943 `(modify-phases ,phases
66a3c2db
EF
3944 (replace 'install-jquery-ui
3945 (lambda* (#:key outputs inputs #:allow-other-keys)
3946 (let ((dir (string-append (assoc-ref outputs "out")
3947 "/lib/python2.7/site-packages/"
3948 "matplotlib/backends/web_backend/")))
3949 (mkdir-p dir)
3950 (invoke "unzip"
3951 (assoc-ref inputs "jquery-ui")
3952 "-d" dir))
3953 #t))
5d484f42 3954 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
3955 ;; Make sure to use special packages for Python 2 instead
3956 ;; of those automatically rewritten by package-with-python2.
3957 (propagated-inputs
3958 `(("python2-pycairo" ,python2-pycairo)
3959 ("python2-backports-functools-lru-cache"
3960 ,python2-backports-functools-lru-cache)
3961 ("python2-functools32" ,python2-functools32)
3962 ("python2-pygobject-2" ,python2-pygobject-2)
3963 ("python2-subprocess32" ,python2-subprocess32)
3964 ("python2-tkinter" ,python-2 "tk")
3965 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3966 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3967
3968(define-public python-matplotlib-documentation
3969 (package
3970 (name "python-matplotlib-documentation")
3971 (version (package-version python-matplotlib))
3972 (source (package-source python-matplotlib))
3973 (build-system python-build-system)
3974 (native-inputs
3975 `(("python-matplotlib" ,python-matplotlib)
3976 ("python-colorspacious" ,python-colorspacious)
3977 ("python-sphinx" ,python-sphinx)
5ad0a452 3978 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
3979 ("python-sphinx-gallery" ,python-sphinx-gallery)
3980 ("python-numpydoc" ,python-numpydoc)
3981 ("python-ipython" ,python-ipython)
e7a53914 3982 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3983 ("python-mock" ,python-mock)
3984 ("graphviz" ,graphviz)
f75aa97f 3985 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
3986 texlive-latex-amsmath
3987 texlive-latex-enumitem
3988 texlive-latex-expdlist
3989 texlive-latex-geometry
3990 texlive-latex-preview
3991 texlive-latex-type1cm
3992 texlive-latex-ucs
3993
3994 texlive-generic-pdftex
3995
e7a53914
RW
3996 texlive-fonts-ec
3997 texlive-fonts-adobe-times
3998 texlive-fonts-txfonts)))
44d10b1f
RW
3999 ("texinfo" ,texinfo)
4000 ,@(package-native-inputs python-matplotlib)))
4001 (arguments
4002 `(#:tests? #f ; we're only generating documentation
4003 #:phases
4004 (modify-phases %standard-phases
5ea654cf
RW
4005 ;; The tests in python-matplotlib are run after the install phase, so
4006 ;; we need to delete the extra phase here.
4007 (delete 'check)
44d10b1f
RW
4008 (replace 'build
4009 (lambda _
4010 (chdir "doc")
e7a53914
RW
4011 (setenv "PYTHONPATH"
4012 (string-append (getenv "PYTHONPATH")
4013 ":" (getcwd) "/../examples/units"))
44d10b1f 4014 (substitute* "conf.py"
e7a53914
RW
4015 ;; Don't use git.
4016 (("^SHA = check_output.*")
4017 (string-append "SHA = \"" ,version "\"\n"))
4018 ;; Don't fetch intersphinx files from the Internet
4019 (("^explicit_order_folders" m)
4020 (string-append "intersphinx_mapping = {}\n" m))
4021 (("'sphinx.ext.intersphinx',") "")
4022 ;; Disable URL embedding which requires internet access.
4023 (("'https://docs.scipy.org/doc/numpy'") "None")
4024 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4025 (invoke "make"
4026 "SPHINXBUILD=sphinx-build"
4027 "SPHINXOPTS=" ; don't abort on warnings
4028 "html" "texinfo")))
44d10b1f
RW
4029 (replace 'install
4030 (lambda* (#:key inputs outputs #:allow-other-keys)
4031 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4032 (doc (string-append data "/doc/python-matplotlib-" ,version))
4033 (info (string-append data "/info"))
4034 (html (string-append doc "/html")))
4035 (mkdir-p html)
4036 (mkdir-p info)
4037 (copy-recursively "build/html" html)
4038 (symlink (string-append html "/_images")
4039 (string-append info "/matplotlib-figures"))
4040 (with-directory-excursion "build/texinfo"
4041 (substitute* "matplotlib.texi"
4042 (("@image\\{([^,]*)" all file)
4043 (string-append "@image{matplotlib-figures/" file)))
4044 (symlink (string-append html "/_images")
4045 "./matplotlib-figures")
e7a53914
RW
4046 (invoke "makeinfo" "--no-split"
4047 "-o" "matplotlib.info" "matplotlib.texi"))
4048 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4049 #t)))))
4050 (home-page (package-home-page python-matplotlib))
4051 (synopsis "Documentation for the python-matplotlib package")
4052 (description (package-description python-matplotlib))
4053 (license (package-license python-matplotlib))))
4054
4055(define-public python2-matplotlib-documentation
5ad0a452
RW
4056 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4057 (package
4058 (inherit parent)
4059 (native-inputs
4060 (alist-delete "python-sphinx-copybutton"
4061 (package-native-inputs parent))))))
44d10b1f 4062
55dae98f
RW
4063(define-public python-matplotlib-venn
4064 (package
4065 (name "python-matplotlib-venn")
4066 (version "0.11.5")
4067 (source
4068 (origin
4069 (method url-fetch)
4070 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4071 (sha256
4072 (base32
4073 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4074 (build-system python-build-system)
4075 (arguments '(#:tests? #f)) ; tests are not included
4076 (propagated-inputs
4077 `(("python-matplotlib" ,python-matplotlib)
4078 ("python-numpy" ,python-numpy)
4079 ("python-scipy" ,python-scipy)))
4080 (native-inputs
4081 `(("unzip" ,unzip)))
4082 (home-page "https://github.com/konstantint/matplotlib-venn")
4083 (synopsis "Plot area-proportional Venn diagrams")
4084 (description
4085 "This package provides tools for plotting area-proportional two- and
4086three-way Venn diagrams in @code{matplotlib}.")
4087 (license license:expat)))
4088
44d10b1f
RW
4089(define-public python2-pysnptools
4090 (package
4091 (name "python2-pysnptools")
5d1ade85 4092 (version "0.3.13")
44d10b1f
RW
4093 (source
4094 (origin
4095 (method url-fetch)
5d1ade85 4096 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4097 (sha256
4098 (base32
5d1ade85 4099 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4100 (build-system python-build-system)
4101 (arguments
5d1ade85
RW
4102 `(#:python ,python-2 ; only Python 2.7 is supported
4103 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4104 (propagated-inputs
4105 `(("python2-numpy" ,python2-numpy)
4106 ("python2-scipy" ,python2-scipy)
4107 ("python2-pandas" ,python2-pandas)))
44d10b1f 4108 (native-inputs
5d1ade85 4109 `(("python2-cython" ,python2-cython)))
1b66989b 4110 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4111 (synopsis "Library for reading and manipulating genetic data")
4112 (description
4113 "PySnpTools is a library for reading and manipulating genetic data. It
4114can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4115those files. It can also efficiently manipulate ranges of integers using set
4116operators such as union, intersection, and difference.")
4117 (license license:asl2.0)))
4118
4119(define-public python-scipy
4120 (package
4121 (name "python-scipy")
a35f153d 4122 (version "1.3.1")
44d10b1f
RW
4123 (source
4124 (origin
4125 (method url-fetch)
4126 (uri (pypi-uri "scipy" version))
4127 (sha256
4128 (base32
a35f153d 4129 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
44d10b1f
RW
4130 (build-system python-build-system)
4131 (propagated-inputs
4132 `(("python-numpy" ,python-numpy)
4133 ("python-matplotlib" ,python-matplotlib)
4134 ("python-pyparsing" ,python-pyparsing)))
4135 (inputs
4136 `(("lapack" ,lapack)
4137 ("openblas" ,openblas)))
4138 (native-inputs
4139 `(("python-cython" ,python-cython)
4140 ("python-pytest" ,python-pytest)
4141 ("python-sphinx" ,python-sphinx)
4142 ("python-numpydoc" ,python-numpydoc)
4143 ("gfortran" ,gfortran)
4144 ("perl" ,perl)
4145 ("which" ,which)))
4146 (outputs '("out" "doc"))
4147 (arguments
4148 `(#:phases
4149 (modify-phases %standard-phases
4150 (add-after 'unpack 'disable-broken-tests
4151 (lambda _
4152 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4153 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4154 (string-append indent
4155 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4156 m)))
4157 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4158 (("^def test_parallel_threads\\(\\):" m)
4159 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4160 m)))
4161 #t))
4162 (add-before 'build 'configure-openblas
4163 (lambda* (#:key inputs #:allow-other-keys)
4164 (call-with-output-file "site.cfg"
4165 (lambda (port)
4166 (format port
4167 "[blas]
4168libraries = openblas
4169library_dirs = ~a/lib
4170include_dirs = ~a/include
4171
4172# backslash-n to make emacs happy
4173\n[atlas]
4174library_dirs = ~a/lib
4175atlas_libs = openblas
4176"
4177 (assoc-ref inputs "openblas")
4178 (assoc-ref inputs "openblas")
4179 (assoc-ref inputs "openblas"))))
4180 #t))
4181 (add-after 'install 'install-doc
4182 (lambda* (#:key inputs outputs #:allow-other-keys)
4183 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4184 (doc (string-append data "/doc/" ,name "-" ,version))
4185 (html (string-append doc "/html"))
4186 (pyver ,(string-append "PYVER=" (version-major+minor
4187 (package-version python))))
4188 ;; By default it tries to run sphinx-build through the Python
4189 ;; interpreter which won't work with our shell wrapper.
4190 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4191 ;; Make installed package available for building the
4192 ;; documentation
4193 (add-installed-pythonpath inputs outputs)
4194 (with-directory-excursion "doc"
4195 ;; Fix generation of images for mathematical expressions.
4196 (substitute* (find-files "source" "conf\\.py")
4197 (("pngmath_use_preview = True")
4198 "pngmath_use_preview = False"))
4199 (mkdir-p html)
4200 (invoke "make" "html" pyver sphinxbuild)
4201 (with-directory-excursion "build/html"
4202 (for-each (lambda (file)
4203 (let* ((dir (dirname file))
4204 (tgt-dir (string-append html "/" dir)))
4205 (install-file file html)))
4206 (find-files "." ".*")))))
4207 #t))
4208 ;; Tests can only be run after the library has been installed and not
4209 ;; within the source directory.
4210 (delete 'check)
4211 (add-after 'install 'check
4212 (lambda* (#:key inputs outputs #:allow-other-keys)
4213 (add-installed-pythonpath inputs outputs)
4214 (with-directory-excursion "/tmp"
4215 (invoke "python" "-c"
4216 "import scipy; scipy.test(verbose=2)")))))))
4217 (home-page "https://www.scipy.org/")
4218 (synopsis "The Scipy library provides efficient numerical routines")
4219 (description "The SciPy library is one of the core packages that make up
4220the SciPy stack. It provides many user-friendly and efficient numerical
4221routines such as routines for numerical integration and optimization.")
4222 (properties `((python2-variant . ,(delay python2-scipy))))
4223 (license license:bsd-3)))
4224
a35f153d 4225;; Version 1.2.2 is the last version to support Python 2
44d10b1f 4226(define-public python2-scipy
a35f153d
RW
4227 (package
4228 (inherit (package-with-python2
4229 (strip-python2-variant python-scipy)))
4230 (version "1.2.2")
4231 (source
4232 (origin
4233 (method url-fetch)
4234 (uri (pypi-uri "scipy" version))
4235 (sha256
4236 (base32
4237 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
44d10b1f
RW
4238
4239(define-public python-socksipy-branch
4240 (package
4241 (name "python-socksipy-branch")
4242 (version "1.01")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (pypi-uri "SocksiPy-branch" version))
4247 (sha256
4248 (base32
4249 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4250 (build-system python-build-system)
4251 (arguments
4252 `(#:tests? #f)) ; There are no tests
4253 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4254 (synopsis "Python SOCKS module")
4255 (description
4256 "SocksiPy - A Python SOCKS client module. It provides a
4257socket-like interface that supports connections to any TCP
4258service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4259The original version was developed by Dan Haim, this is a
4260branch created by Mario Vilas to address some open issues,
4261as the original project seems to have been abandoned circa 2007.")
4262 (license license:bsd-3)))
4263
4264(define-public python2-socksipy-branch
4265 (package-with-python2 python-socksipy-branch))
4266
4267(define-public python-pycodestyle
4268 (package
4269 (name "python-pycodestyle")
4270 (version "2.4.0")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (pypi-uri "pycodestyle" version))
4275 (sha256
4276 (base32
4277 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4278 (build-system python-build-system)
4279 (home-page "https://pycodestyle.readthedocs.io/")
4280 (synopsis "Python style guide checker")
4281 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4282Python code against some of the style conventions in
4283@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4284 (license license:expat)))
4285
4286(define-public python2-pycodestyle
4287 (package-with-python2 python-pycodestyle))
4288
4289(define-public python-multidict
4290 (package
4291 (name "python-multidict")
4292 (version "4.2.0")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "multidict" version))
4297 (sha256
4298 (base32
4299 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4300 (build-system python-build-system)
4301 (native-inputs
4302 `(("python-pytest" ,python-pytest)
4303 ("python-pytest-runner" ,python-pytest-runner)))
4304 (home-page "https://github.com/aio-libs/multidict/")
4305 (synopsis "Multidict implementation")
4306 (description "Multidict is dict-like collection of key-value pairs
4307where key might be occurred more than once in the container.")
4308 (license license:asl2.0)))
4309
4310(define-public python-orderedmultidict
4311 (package
4312 (name "python-orderedmultidict")
4313 (version "0.7.11")
4314 (source
4315 (origin
4316 (method url-fetch)
4317 (uri (pypi-uri "orderedmultidict" version))
4318 (sha256
4319 (base32
4320 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4321 (build-system python-build-system)
4322 (arguments
4323 `(#:phases
4324 (modify-phases %standard-phases
4325 (add-after 'unpack 'fix-tests
4326 (lambda _
4327 ;; The package uses nosetest for running the tests.
4328 ;; Adding this initfile allows to run the test suite
4329 ;; without requiring nosetest.
d1c4f329
RW
4330 (with-output-to-file "tests/__init__.py" newline)
4331 #t)))))
44d10b1f
RW
4332 (propagated-inputs
4333 `(("python-six" ,python-six)))
4334 (native-inputs
4335 `(("python-pycodestyle" ,python-pycodestyle)))
4336 (home-page "https://github.com/gruns/orderedmultidict")
4337 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4338 (description "This package contains a library for ordered multivalue
4339dictionaries. A multivalue dictionary is a dictionary that can store
4340multiple values for the same key. An ordered multivalue dictionary is a
4341multivalue dictionary that retains the order of insertions and deletions.")
4342 (license license:unlicense)))
4343
4344(define-public python2-orderedmultidict
4345 (package-with-python2 python-orderedmultidict))
4346
4347(define-public python-autopep8
4348 (package
4349 (name "python-autopep8")
4350 (version "1.3.5")
4351 (source
4352 (origin
4353 (method url-fetch)
4354 (uri (pypi-uri "autopep8" version))
4355 (sha256
4356 (base32
4357 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4358 (build-system python-build-system)
4359 (propagated-inputs
4360 `(("python-pycodestyle" ,python-pycodestyle)))
4361 (home-page "https://github.com/hhatto/autopep8")
4362 (synopsis "Format Python code according to the PEP 8 style guide")
4363 (description
4364 "@code{autopep8} automatically formats Python code to conform to
4365the PEP 8 style guide. It uses the pycodestyle utility to determine
4366what parts of the code needs to be formatted. @code{autopep8} is
4367capable of fixing most of the formatting issues that can be reported
4368by pycodestyle.")
4369 (license (license:non-copyleft
4370 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4371
4372(define-public python2-autopep8
4373 (package-with-python2 python-autopep8))
4374
4375(define-public python-distutils-extra
4376 (package
4377 (name "python-distutils-extra")
4378 (version "2.38")
4379 (source
4380 (origin
4381 (method url-fetch)
4382 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4383 version "/+download/python-distutils-extra-"
4384 version ".tar.gz"))
4385 (sha256
4386 (base32
4387 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4388 (build-system python-build-system)
4389 (home-page "https://launchpad.net/python-distutils-extra/")
4390 (synopsis "Enhancements to Python's distutils")
4391 (description
4392 "The python-distutils-extra module enables you to easily integrate
4393gettext support, themed icons, and scrollkeeper-based documentation into
4394Python's distutils.")
4395 (license license:gpl2)))
4396
4397(define-public python2-distutils-extra
4398 (package-with-python2 python-distutils-extra))
4399
4400(define-public python2-elib.intl
4401 (package
4402 (name "python2-elib.intl")
4403 (version "0.0.3")
4404 (source
4405 (origin
4406 ;; This project doesn't tag releases or publish tarballs, so we take
4407 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4408 (method git-fetch)
4409 (uri (git-reference
4410 (url "https://github.com/dieterv/elib.intl.git")
4411 (commit "d09997cfef")))
4412 (file-name (string-append name "-" version "-checkout"))
4413 (sha256
4414 (base32
4415 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4416 (build-system python-build-system)
4417 (arguments
4418 ;; incompatible with Python 3 (exception syntax)
4419 `(#:python ,python-2
4420 #:tests? #f))
4421 (home-page "https://github.com/dieterv/elib.intl")
4422 (synopsis "Enhanced internationalization for Python")
4423 (description
4424 "The elib.intl module provides enhanced internationalization (I18N)
4425services for your Python modules and applications.")
4426 (license license:lgpl3+)))
4427
4428(define-public python-olefile
4429 (package
4430 (name "python-olefile")
5bef0f10 4431 (version "0.46")
44d10b1f
RW
4432 (source
4433 (origin
4434 (method url-fetch)
5bef0f10
MB
4435 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4436 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4437 (file-name (string-append name "-" version ".tar.gz"))
4438 (sha256
4439 (base32
5bef0f10 4440 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4441 (build-system python-build-system)
5bef0f10 4442 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4443 (synopsis "Read and write Microsoft OLE2 files.")
4444 (description
4445 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4446Storage or Compound Document, Microsoft Office). It is an improved version of
4447the OleFileIO module from PIL, the Python Image Library.")
4448 (license license:bsd-3)))
4449
4450(define-public python2-olefile
4451 (package-with-python2 python-olefile))
4452
4453(define-public python-pillow
4454 (package
4455 (name "python-pillow")
6263b5b3 4456 (version "6.1.0")
44d10b1f
RW
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "Pillow" version))
4461 (sha256
4462 (base32
6263b5b3 4463 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4464 (build-system python-build-system)
4465 (native-inputs
4466 `(("python-pytest" ,python-pytest)))
4467 (inputs
4468 `(("freetype" ,freetype)
4469 ("lcms" ,lcms)
4470 ("zlib" ,zlib)
4471 ("libjpeg" ,libjpeg)
4472 ("openjpeg" ,openjpeg)
4473 ("libtiff" ,libtiff)
4474 ("libwebp" ,libwebp)))
4475 (propagated-inputs
4476 `(("python-olefile" ,python-olefile)))
4477 (arguments
4478 `(#:phases
4479 (modify-phases %standard-phases
4480 (add-after 'unpack 'patch-ldconfig
4481 (lambda _
4482 (substitute* "setup.py"
4483 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4484 (delete 'check) ; We must run checks after python-pillow is installed.
4485 (add-after 'install 'check-installed
4486 (lambda* (#:key outputs inputs #:allow-other-keys)
4487 (begin
4488 (setenv "HOME" (getcwd))
4489 ;; Make installed package available for running the tests.
4490 (add-installed-pythonpath inputs outputs)
4491 (invoke "python" "selftest.py" "--installed")
4492 (invoke "python" "-m" "pytest" "-vv")))))))
4493 (home-page "https://python-pillow.org")
4494 (synopsis "Fork of the Python Imaging Library")
4495 (description
4496 "The Python Imaging Library adds image processing capabilities to your
4497Python interpreter. This library provides extensive file format support, an
4498efficient internal representation, and fairly powerful image processing
4499capabilities. The core image library is designed for fast access to data
4500stored in a few basic pixel formats. It should provide a solid foundation for
4501a general image processing tool.")
4502 (license (license:x11-style
4503 "http://www.pythonware.com/products/pil/license.htm"
4504 "The PIL Software License"))))
4505
4506(define-public python2-pillow
4507 (package-with-python2 python-pillow))
4508
4509(define-public python-pycparser
4510 (package
4511 (name "python-pycparser")
c6c0940e 4512 (version "2.19")
44d10b1f
RW
4513 (source
4514 (origin
4515 (method url-fetch)
4516 (uri (pypi-uri "pycparser" version))
4517 (sha256
4518 (base32
c6c0940e 4519 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4520 (outputs '("out" "doc"))
4521 (build-system python-build-system)
4522 (native-inputs
4523 `(("pkg-config" ,pkg-config)))
4524 (arguments
4525 `(#:phases
4526 (modify-phases %standard-phases
4527 (replace 'check
4528 (lambda _
4529 (with-directory-excursion "tests"
acb75c03
RW
4530 (invoke "python" "all_tests.py"))
4531 #t))
44d10b1f
RW
4532 (add-after 'install 'install-doc
4533 (lambda* (#:key outputs #:allow-other-keys)
4534 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4535 (doc (string-append data "/doc/" ,name "-" ,version))
4536 (examples (string-append doc "/examples")))
4537 (mkdir-p examples)
4538 (for-each (lambda (file)
4539 (copy-file (string-append "." file)
4540 (string-append doc file)))
4541 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4542 (copy-recursively "examples" examples)
4543 #t))))))
44d10b1f
RW
4544 (home-page "https://github.com/eliben/pycparser")
4545 (synopsis "C parser in Python")
4546 (description
4547 "Pycparser is a complete parser of the C language, written in pure Python
4548using the PLY parsing library. It parses C code into an AST and can serve as
4549a front-end for C compilers or analysis tools.")
4550 (license license:bsd-3)))
4551
4552(define-public python2-pycparser
4553 (package-with-python2 python-pycparser))
4554
4555(define-public python-pywavelets
4556 (package
4557 (name "python-pywavelets")
4558 (version "1.0.1")
4559 (home-page "https://github.com/PyWavelets/pywt")
4560 (source (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "PyWavelets" version))
4563 (sha256
4564 (base32
4565 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4566 (build-system python-build-system)
4567 (arguments
4568 '(#:modules ((ice-9 ftw)
4569 (srfi srfi-1)
4570 (srfi srfi-26)
4571 (guix build utils)
4572 (guix build python-build-system))
4573 #:phases (modify-phases %standard-phases
4574 (replace 'check
4575 (lambda _
4576 (let ((cwd (getcwd))
4577 (libdir (find (cut string-prefix? "lib." <>)
4578 (scandir "build"))))
4579 (with-directory-excursion (string-append cwd "/build/" libdir)
4580 (invoke "nosetests" "-v" "."))))))))
4581 (native-inputs
4582 `(("python-matplotlib" ,python-matplotlib) ;for tests
4583 ("python-nose" ,python-nose)))
4584 (propagated-inputs
4585 `(("python-numpy" ,python-numpy)))
4586 (synopsis "Wavelet transforms in Python")
4587 (description
4588 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4589mathematical basis functions that are localized in both time and frequency.
4590Wavelet transforms are time-frequency transforms employing wavelets. They are
4591similar to Fourier transforms, the difference being that Fourier transforms are
4592localized only in frequency instead of in time and frequency.")
4593 (license license:expat)))
4594
4595(define-public python2-pywavelets
4596 (package-with-python2 python-pywavelets))
4597
4598(define-public python-xcffib
4599 (package
4600 (name "python-xcffib")
4601 (version "0.6.0")
4602 (source
4603 (origin
4604 (method url-fetch)
4605 (uri (pypi-uri "xcffib" version))
4606 (sha256
4607 (base32
4608 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4609 (build-system python-build-system)
4610 (inputs
4611 `(("libxcb" ,libxcb)))
4612 (propagated-inputs
4613 `(("python-cffi" ,python-cffi) ; used at run time
4614 ("python-six" ,python-six)))
4615 (arguments
4616 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4617 #:tests? #f
4618 #:phases
4619 (modify-phases %standard-phases
4620 (add-after 'unpack 'fix-libxcb-path
4621 (lambda* (#:key inputs #:allow-other-keys)
4622 (let ((libxcb (assoc-ref inputs "libxcb")))
4623 (substitute* '("xcffib/__init__.py")
4624 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4625 #t)))
4626 (add-after 'install 'install-doc
4627 (lambda* (#:key outputs #:allow-other-keys)
4628 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4629 "/doc/" ,name "-" ,version)))
4630 (mkdir-p doc)
4631 (copy-file "README.md"
4632 (string-append doc "/README.md"))
4633 #t))))))
4634 (home-page "https://github.com/tych0/xcffib")
4635 (synopsis "XCB Python bindings")
4636 (description
4637 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4638support for Python 3 and PyPy. It is based on cffi.")
4639 (license license:expat)))
4640
4641(define-public python2-xcffib
4642 (package-with-python2 python-xcffib))
4643
4644(define-public python-cairocffi
4645 (package
4646 (name "python-cairocffi")
4647 (version "0.9.0")
4648 (source
4649 (origin
4650 (method url-fetch)
4651 (uri (pypi-uri "cairocffi" version))
4652 (sha256
4653 (base32
4654 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4655 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4656 (build-system python-build-system)
4657 (outputs '("out" "doc"))
4658 (inputs
4659 `(("glib" ,glib)
4660 ("gtk+" ,gtk+)
4661 ("gdk-pixbuf" ,gdk-pixbuf)
4662 ("cairo" ,cairo)
4663 ("pango" ,pango)))
4664 (native-inputs
4665 `(("pkg-config" ,pkg-config)
4666 ("python-pytest" ,python-pytest)
4667 ("python-pytest-cov" ,python-pytest-cov)
4668 ("python-pytest-runner" ,python-pytest-runner)
4669 ("python-sphinx" ,python-sphinx)
4670 ("python-docutils" ,python-docutils)))
4671 (propagated-inputs
4672 `(("python-xcffib" ,python-xcffib))) ; used at run time
4673 (arguments
4674 `(#:phases
4675 (modify-phases %standard-phases
4676 (add-after 'unpack 'patch-paths
4677 (lambda* (#:key inputs outputs #:allow-other-keys)
4678 (substitute* (find-files "." "\\.py$")
4679 (("dlopen\\(ffi, 'cairo'")
4680 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4681 "/lib/libcairo.so.2'"))
4682 (("dlopen\\(ffi, 'gdk-3'")
4683 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4684 "/lib/libgtk-3.so.0'"))
4685 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4686 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4687 "/lib/libgdk_pixbuf-2.0.so.0'"))
4688 (("dlopen\\(ffi, 'glib-2.0'")
4689 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4690 "/lib/libglib-2.0.so.0'"))
4691 (("dlopen\\(ffi, 'gobject-2.0'")
4692 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4693 "/lib/libgobject-2.0.so.0'"))
4694 (("dlopen\\(ffi, 'pangocairo-1.0'")
4695 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4696 "/lib/libpangocairo-1.0.so.0'"))
4697 (("dlopen\\(ffi, 'pango-1.0'")
4698 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4699 "/lib/libpango-1.0.so.0'")))
4700 #t))
4701 (add-after 'install 'install-doc
4702 (lambda* (#:key inputs outputs #:allow-other-keys)
4703 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4704 (doc (string-append data "/doc/" ,name "-" ,version))
4705 (html (string-append doc "/html")))
4706 (setenv "LD_LIBRARY_PATH"
4707 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4708 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4709 (setenv "LANG" "en_US.UTF-8")
4710 (mkdir-p html)
4711 (for-each (lambda (file)
4712 (copy-file (string-append "." file)
4713 (string-append doc file)))
4714 '("/README.rst" "/CHANGES" "/LICENSE"))
4715 (system* "python" "setup.py" "build_sphinx")
4716 (copy-recursively "docs/_build/html" html)
4717 #t))))))
4718 (home-page "https://github.com/Kozea/cairocffi")
4719 (synopsis "Python bindings and object-oriented API for Cairo")
4720 (description
4721 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4722Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4723graphics library with support for multiple backends including image buffers,
4724PNG, PostScript, PDF, and SVG file output.")
4725 (license license:bsd-3)))
4726
4727(define-public python2-cairocffi
4728 (package-with-python2 python-cairocffi))
4729
4730(define-public python-decorator
4731 (package
4732 (name "python-decorator")
4733 (version "4.3.0")
4734 (source
4735 (origin
4736 (method url-fetch)
4737 (uri (pypi-uri "decorator" version))
4738 (sha256
4739 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4740 (build-system python-build-system)
4741 (home-page "https://pypi.python.org/pypi/decorator/")
4742 (synopsis "Python module to simplify usage of decorators")
4743 (description
4744 "The aim of the decorator module is to simplify the usage of decorators
4745for the average programmer, and to popularize decorators usage giving examples
4746of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4747etc. The core of this module is a decorator factory.")
4748 (license license:expat)))
4749
4750(define-public python2-decorator
4751 (package-with-python2 python-decorator))
4752
4753(define-public python-drmaa
4754 (package
4755 (name "python-drmaa")
4756 (version "0.7.7")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri (pypi-uri "drmaa" version))
4761 (sha256
4762 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4763 (build-system python-build-system)
4764 ;; The test suite requires libdrmaa which is provided by the cluster
4765 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4766 ;; should be set to the path of the libdrmaa library.
4767 (arguments '(#:tests? #f))
4768 (native-inputs
4769 `(("python-nose" ,python-nose)))
4770 (home-page "https://pypi.python.org/pypi/drmaa")
4771 (synopsis "Python bindings for the DRMAA library")
4772 (description
4773 "A Python package for Distributed Resource Management (DRM) job
4774submission and control. This package is an implementation of the DRMAA 1.0
4775Python language binding specification.")
4776 (license license:bsd-3)))
4777
4778(define-public python2-drmaa
4779 (package-with-python2 python-drmaa))
4780
4781(define-public python-grako
4782 (package
4783 (name "python-grako")
4784 (version "3.99.9")
4785 (source
4786 (origin
4787 (method url-fetch)
4788 (uri
4789 (pypi-uri "grako" version ".zip"))
4790 (sha256
4791 (base32
4792 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4793 (build-system python-build-system)
4794 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4795 (native-inputs
4796 `(("unzip" ,unzip)
4797 ("python-pytest" ,python-pytest)
4798 ("python-pytest-runner" ,python-pytest-runner)))
4799 (home-page "https://bitbucket.org/neogeny/grako")
4800 (synopsis "EBNF parser generator")
4801 (description
4802 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4803memoizing PEG/Packrat parser in Python.")
4804 (license license:bsd-3)))
4805
4806(define-public python2-grako
4807 (package-with-python2 python-grako))
4808
4809(define-public python-gridmap
4810 (package
4811 (name "python-gridmap")
4812 (version "0.13.0")
4813 (source
4814 (origin
768fea0f
TGR
4815 (method git-fetch)
4816 (uri (git-reference
4817 (url "https://github.com/pygridtools/gridmap.git")
4818 (commit (string-append "v" version))))
4819 (file-name (git-file-name name version))
44d10b1f 4820 (sha256
768fea0f 4821 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4822 (build-system python-build-system)
4823 (arguments
4824 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4825 (propagated-inputs
4826 `(("python-psutil" ,python-psutil)
4827 ("python-drmaa" ,python-drmaa)
4828 ("python-pyzmq" ,python-pyzmq)))
4829 (home-page "https://github.com/pygridtools/gridmap")
4830 (synopsis "Create jobs on a cluster directly from Python")
4831 (description
4832 "Gridmap is a Python package to allow you to easily create jobs on the
4833cluster directly from Python. You can directly map Python functions onto the
4834cluster without needing to write any wrapper code yourself.")
4835 (license license:gpl3+)))
4836
4837(define-public python2-gridmap
4838 (package-with-python2 python-gridmap))
4839
4840(define-public python-honcho
4841 (package
4842 (name "python-honcho")
4843 (version "1.0.1")
4844 (source
4845 (origin
8524d130
TGR
4846 (method git-fetch)
4847 (uri (git-reference
4848 (url "https://github.com/nickstenning/honcho.git")
4849 (commit (string-append "v" version))))
4850 (file-name (git-file-name name version))
44d10b1f 4851 (sha256
8524d130 4852 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4853 (build-system python-build-system)
4854 (native-inputs
4855 `(("python-pytest" ,python-pytest)
4856 ("python-mock" ,python-mock)
4857 ("python-tox" ,python-tox)
4858 ("which" ,which))) ;for tests
4859 (propagated-inputs
4860 `(("python-jinja2" ,python-jinja2)))
4861 (arguments
4862 `(#:phases
4863 (modify-phases %standard-phases
4864 (delete 'check)
4865 (add-after 'install 'check
4866 (lambda* (#:key outputs inputs #:allow-other-keys)
4867 ;; fix honcho path in testsuite
4868 (substitute* "tests/conftest.py"
4869 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4870 "/bin/honcho" "'")))
4871 ;; It's easier to run tests after install.
4872 ;; Make installed package available for running the tests
4873 (add-installed-pythonpath inputs outputs)
95b707fb 4874 (invoke "py.test" "-v"))))))
44d10b1f
RW
4875 (home-page "https://github.com/nickstenning/honcho")
4876 (synopsis "Manage Procfile-based applications")
4877 (description
4878 "A Procfile is a file which describes how to run an application
50fceab0 4879consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4880The output of all running processes is collected by honcho and
4881displayed.")
4882 (license license:expat)))
4883
4884(define-public python2-honcho
4885 (package-with-python2 python-honcho))
4886
4887(define-public python-pexpect
4888 (package
4889 (name "python-pexpect")
4890 (version "4.6.0")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "pexpect" version))
4895 (sha256
4896 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4897 (build-system python-build-system)
4898 (arguments
4899 `(#:phases
4900 (modify-phases %standard-phases
4901 (add-before 'check 'prepare-tests
4902 (lambda _
4903 (substitute* (find-files "tests")
4904 (("/bin/ls") (which "ls"))
4905 (("/bin/echo") (which "echo"))
4906 (("/bin/which") (which "which"))
4907 ;; Many tests try to use the /bin directory which
4908 ;; is not present in the build environment.
4909 ;; Use one that's non-empty and unlikely to change.
4910 (("/bin'") "/dev'"))
4911 ;; XXX: Socket connection test gets "Connection reset by peer".
4912 ;; Why does it not work? Delete for now.
4913 (delete-file "tests/test_socket.py")
4914 #t))
4915 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4916 (native-inputs
4917 `(("python-nose" ,python-nose)
4918 ("python-pytest" ,python-pytest)
4919 ("man-db" ,man-db)
4920 ("which" ,which)
4921 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4922 (propagated-inputs
4923 `(("python-ptyprocess" ,python-ptyprocess)))
4924 (home-page "http://pexpect.readthedocs.org/")
4925 (synopsis "Controlling interactive console applications")
4926 (description
4927 "Pexpect is a pure Python module for spawning child applications;
4928controlling them; and responding to expected patterns in their output.
4929Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4930child application and control it as if a human were typing commands.")
4931 (license license:isc)))
4932
4933(define-public python2-pexpect
4934 (package-with-python2 python-pexpect))
4935
4936(define-public python-setuptools-scm
4937 (package
4938 (name "python-setuptools-scm")
4939 (version "3.1.0")
4940 (source (origin
4941 (method url-fetch)
4942 (uri (pypi-uri "setuptools_scm" version))
4943 (sha256
4944 (base32
4945 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4946 (build-system python-build-system)
4947 (home-page "https://github.com/pypa/setuptools_scm/")
4948 (synopsis "Manage Python package versions in SCM metadata")
4949 (description
4950 "Setuptools_scm handles managing your Python package versions in
4951@dfn{software configuration management} (SCM) metadata instead of declaring
4952them as the version argument or in a SCM managed file.")
4953 (license license:expat)))
4954
4955(define-public python2-setuptools-scm
4956 (package-with-python2 python-setuptools-scm))
4957
bb74ea09
RW
4958(define-public python-pathlib2
4959 (package
4960 (name "python-pathlib2")
4961 (version "2.3.3")
4962 (source
4963 (origin
4964 (method url-fetch)
4965 (uri (pypi-uri "pathlib2" version))
4966 (sha256
4967 (base32
4968 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4969 (build-system python-build-system)
4970 (propagated-inputs
4971 `(("python-scandir" ,python-scandir)
4972 ("python-six" ,python-six)))
4973 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4974 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4975 (description "The goal of pathlib2 is to provide a backport of the
4976standard @code{pathlib} module which tracks the standard library module, so
4977all the newest features of the standard @code{pathlib} can be used also on
4978older Python versions.")
4979 (license license:expat)))
4980
15b65617
RW
4981(define-public python-importlib-metadata
4982 (package
4983 (name "python-importlib-metadata")
4984 (version "0.18")
4985 (source
4986 (origin
4987 (method url-fetch)
4988 (uri (pypi-uri "importlib_metadata" version))
4989 (sha256
4990 (base32
4991 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4992 (build-system python-build-system)
4993 (propagated-inputs
4994 `(("python-configparser" ,python-configparser)
4995 ("python-contextlib2" ,python-contextlib2)
4996 ("python-docutils" ,python-docutils)
4997 ("python-pathlib2" ,python-pathlib2)
4998 ("python-rst.linker" ,python-rst.linker)
4999 ("python-zipp" ,python-zipp)))
5000 (native-inputs
5001 `(("python-setuptools-scm" ,python-setuptools-scm)
5002 ("python-sphinx" ,python-sphinx)))
5003 (home-page "https://importlib-metadata.readthedocs.io/")
5004 (synopsis "Read metadata from Python packages")
5005 (description
5006 "@code{importlib_metadata} is a library which provides an API for
5007accessing an installed Python package's metadata, such as its entry points or
5008its top-level name. This functionality intends to replace most uses of
5009@code{pkg_resources} entry point API and metadata API. Along with
5010@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5011need to use the older and less efficient @code{pkg_resources} package.")
5012 (license license:asl2.0)))
5013
37c173d1
RW
5014(define-public python-jaraco-packaging
5015 (package
5016 (name "python-jaraco-packaging")
5017 (version "6.1")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (pypi-uri "jaraco.packaging" version))
5022 (sha256
5023 (base32
5024 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5025 (build-system python-build-system)
5026 (propagated-inputs
5027 `(("python-pytest" ,python-pytest)
5028 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5029 ("python-pytest-flake8" ,python-pytest-flake8)
5030 ("python-rst.linker" ,python-rst.linker)
5031 ("python-setuptools" ,python-setuptools)
5032 ("python-setuptools-scm" ,python-setuptools-scm)
5033 ("python-six" ,python-six)
5034 ("python-sphinx" ,python-sphinx)))
5035 (home-page "https://github.com/jaraco/jaraco.packaging")
5036 (synopsis "Tools to supplement packaging Python releases")
5037 (description
5038 "This package provides various tools to supplement packaging Python
5039releases.")
5040 (license license:expat)))
5041
44d10b1f
RW
5042(define-public python-pathpy
5043 (package
5044 (name "python-pathpy")
49ad11e9 5045 (version "11.5.0")
44d10b1f
RW
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "path.py" version))
5050 (sha256
49ad11e9
RW
5051 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5052 (outputs '("out" "doc"))
44d10b1f
RW
5053 (build-system python-build-system)
5054 (propagated-inputs
01a53e0b
MC
5055 `(("python-appdirs" ,python-appdirs)
5056 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5057 (native-inputs
5058 `(("python-setuptools-scm" ,python-setuptools-scm)
5059 ("python-sphinx" ,python-sphinx)
5060 ("python-rst.linker" ,python-rst.linker)
5061 ("python-pytest" ,python-pytest)
49ad11e9
RW
5062 ("python-pytest-runner" ,python-pytest-runner)
5063 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5064 (arguments
49ad11e9
RW
5065 `(#:phases
5066 (modify-phases %standard-phases
5067 (add-after 'build 'build-doc
5068 (lambda _
5069 (setenv "LANG" "en_US.UTF-8")
5070 (invoke "python" "setup.py" "build_sphinx")))
5071 (add-after 'install 'install-doc
5072 (lambda* (#:key outputs #:allow-other-keys)
5073 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5074 (doc (string-append data "/doc/" ,name "-" ,version))
5075 (html (string-append doc "/html")))
5076 (mkdir-p html)
5077 (for-each (lambda (file)
5078 (copy-file file (string-append doc "/" file)))
5079 '("README.rst" "CHANGES.rst"))
5080 (copy-recursively "build/sphinx/html" html)
5081 #t)))
5082 (replace 'check
5083 (lambda _
5084 ;; The import time test aborts if an import takes longer than
5085 ;; 100ms. It may very well take a little longer than that.
5086 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5087 (home-page "https://github.com/jaraco/path.py")
5088 (synopsis "Python module wrapper for built-in os.path")
5089 (description
5090 "@code{path.py} implements path objects as first-class entities, allowing
5091common operations on files to be invoked on those path objects directly.")
5092 (license license:expat)))
5093
5094(define-public python2-pathpy
5095 (package-with-python2 python-pathpy))
5096
5097(define-public python-simplegeneric
5098 (package
5099 (name "python-simplegeneric")
5100 (version "0.8.1")
5101 (source
5102 (origin
5103 (method url-fetch)
6c8c3980 5104 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5105 (sha256
5106 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5107 (build-system python-build-system)
5108 (native-inputs
5109 `(("unzip" ,unzip)))
5110 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5111 (synopsis "Python module for simple generic functions")
5112 (description
5113 "The simplegeneric module lets you define simple single-dispatch generic
5114functions, akin to Python’s built-in generic functions like @code{len()},
5115@code{iter()} and so on. However, instead of using specially-named methods,
5116these generic functions use simple lookup tables, akin to those used by
5117e.g. @code{pickle.dump()} and other generic functions found in the Python
5118standard library.")
5119 (license license:zpl2.1)))
5120
5121(define-public python2-simplegeneric
5122 (package-with-python2 python-simplegeneric))
5123
5124(define-public python-ipython-genutils
5125 ;; TODO: This package is retired, check if can be removed, see description.
5126 (package
5127 (name "python-ipython-genutils")
5128 (version "0.1.0")
5129 (source
5130 (origin
5131 (method url-fetch)
c9671d4b 5132 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5133 (sha256
5134 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5135 (build-system python-build-system)
5136 (arguments `(#:tests? #f)) ; no tests
5137 (home-page "https://ipython.org")
5138 (synopsis "Vestigial utilities from IPython")
5139 (description
5140 "This package provides retired utilities from IPython. No packages
5141outside IPython/Jupyter should depend on it.
5142
5143This package shouldn't exist. It contains some common utilities shared by
5144Jupyter and IPython projects during The Big Split. As soon as possible, those
5145packages will remove their dependency on this, and this package will go
5146away.")
5147 (license license:bsd-3)))
5148
5149(define-public python2-ipython-genutils
5150 (package-with-python2 python-ipython-genutils))
5151
5152(define-public python-traitlets
5153 (package
5154 (name "python-traitlets")
5155 (version "4.3.2")
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "traitlets" version))
5160 (sha256
5161 (base32
5162 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5163 (build-system python-build-system)
5164 (arguments
5165 `(#:phases
5166 (modify-phases %standard-phases
5167 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5168 (propagated-inputs
5169 `(("python-ipython-genutils" ,python-ipython-genutils)
5170 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5171 (native-inputs
5172 `(("python-pytest" ,python-pytest)))
5173 (properties `((python2-variant . ,(delay python2-traitlets))))
5174 (home-page "https://ipython.org")
5175 (synopsis "Configuration system for Python applications")
5176 (description
5177 "Traitlets is a framework that lets Python classes have attributes with
5178type checking, dynamically calculated default values, and ‘on change’
5179callbacks. The package also includes a mechanism to use traitlets for
5180configuration, loading values from files or from command line arguments. This
5181is a distinct layer on top of traitlets, so you can use traitlets in your code
5182without using the configuration machinery.")
5183 (license license:bsd-3)))
5184
5185(define-public python2-traitlets
5186 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5187 (package
5188 (inherit traitlets)
5189 (propagated-inputs
5190 `(("python2-enum34" ,python2-enum34)
5191 ,@(package-propagated-inputs traitlets))))))
5192
5193(define-public python-jupyter-core
5194 (package
5195 (name "python-jupyter-core")
5196 (version "4.4.0")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (string-append (pypi-uri "jupyter_core" version)))
5201 (sha256
5202 (base32
5203 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5204 (build-system python-build-system)
5205 ;; FIXME: not sure how to run the tests
5206 (arguments `(#:tests? #f))
5207 (propagated-inputs
5208 `(("python-traitlets" ,python-traitlets)))
5209 (home-page "http://jupyter.org/")
5210 (synopsis "Jupyter base package")
5211 (description
5212 "Jupyter core is the base package on which Jupyter projects rely.")
5213 (license license:bsd-3)))
5214
5215(define-public python2-jupyter-core
5216 (package-with-python2 python-jupyter-core))
5217
5218(define-public python-jupyter-client
5219 (package
5220 (name "python-jupyter-client")
5221 (version "5.2.4")
5222 (source
5223 (origin
5224 (method url-fetch)
5225 (uri (pypi-uri "jupyter_client" version))
5226 (sha256
5227 (base32
5228 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5229 (build-system python-build-system)
5230 ;; Tests fail because of missing native python kernel which I assume is
5231 ;; provided by the ipython package, which we cannot use because it would
5232 ;; cause a dependency cycle.
ddc586ea
LC
5233 (arguments
5234 `(#:tests? #f
5235
5236 #:phases (modify-phases %standard-phases
5237 (add-after 'unpack 'set-tool-file-names
5238 (lambda* (#:key inputs #:allow-other-keys)
5239 (let ((iproute (assoc-ref inputs "iproute")))
5240 (substitute* "jupyter_client/localinterfaces.py"
5241 (("'ip'")
5242 (string-append "'" iproute "/sbin/ip'")))
5243 #t))))))
5244 (inputs
5245 `(("iproute" ,iproute)))
44d10b1f
RW
5246 (propagated-inputs
5247 `(("python-pyzmq" ,python-pyzmq)
5248 ("python-traitlets" ,python-traitlets)
5249 ("python-jupyter-core" ,python-jupyter-core)))
5250 (home-page "http://jupyter.org/")
5251 (synopsis "Jupyter protocol implementation and client libraries")
5252 (description
5253 "The @code{jupyter_client} package contains the reference implementation
5254of the Jupyter protocol. It also provides client and kernel management APIs
5255for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5256installing @code{kernelspec}s for use with Jupyter frontends.")
5257 (license license:bsd-3)))
5258
5259(define-public python2-jupyter-client
5260 (package-with-python2 python-jupyter-client))
5261
5262(define-public python-ipykernel
5263 (package
5264 (name "python-ipykernel")
82110dea 5265 (version "5.1.1")
44d10b1f
RW
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "ipykernel" version))
5270 (sha256
82110dea 5271 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5272 (build-system python-build-system)
5273 (arguments
5274 `(#:phases
5275 (modify-phases %standard-phases
5276 (replace 'check
5277 (lambda _
5278 (setenv "HOME" "/tmp")
5279 (invoke "pytest" "-v")
aa856d02
LC
5280 #t))
5281 (add-after 'install 'set-python-file-name
5282 (lambda* (#:key outputs #:allow-other-keys)
5283 ;; Record the absolute file name of the 'python' executable in
5284 ;; 'kernel.json'.
5285 (let ((out (assoc-ref outputs "out")))
5286 (substitute* (string-append out "/share/jupyter"
5287 "/kernels/python3/kernel.json")
5288 (("\"python\"")
5289 (string-append "\"" (which "python") "\"")))
5290 #t))))))
44d10b1f
RW
5291 (propagated-inputs
5292 `(("python-ipython" ,python-ipython)
5293 ;; imported at runtime during connect
5294 ("python-jupyter-client" ,python-jupyter-client)))
5295 (native-inputs
5296 `(("python-pytest" ,python-pytest)
5297 ("python-nose" ,python-nose)))
5298 (home-page "https://ipython.org")
5299 (synopsis "IPython Kernel for Jupyter")
5300 (description
5301 "This package provides the IPython kernel for Jupyter.")
5302 (license license:bsd-3)))
5303
0f378947 5304;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5305(define-public python2-ipykernel
0f378947
RW
5306 (package
5307 (name "python2-ipykernel")
5308 (version "5.1.0")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "ipykernel" version))
5313 (sha256
5314 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5315 (build-system python-build-system)
5316 (arguments
5317 `(#:python ,python-2
5318 #:phases
5319 (modify-phases %standard-phases
5320 (replace 'check
5321 (lambda _
5322 (setenv "HOME" "/tmp")
5323 (invoke "pytest" "-v")
5324 #t)))))
5325 (propagated-inputs
5326 `(("python2-ipython" ,python2-ipython)
5327 ;; imported at runtime during connect
5328 ("python2-jupyter-client" ,python2-jupyter-client)))
5329 (native-inputs
5330 `(("python2-pytest" ,python2-pytest)
5331 ("python2-nose" ,python2-nose)))
5332 (home-page "https://ipython.org")
5333 (synopsis "IPython Kernel for Jupyter")
5334 (description
5335 "This package provides the IPython kernel for Jupyter.")
5336 (license license:bsd-3)))
44d10b1f 5337
966aa714
AE
5338(define-public python-pari-jupyter
5339 (package
5340 (name "python-pari-jupyter")
5341 (version "1.3.2")
5342 (source
5343 (origin
5344 (method url-fetch)
5345 (uri (pypi-uri "pari_jupyter" version))
5346 (sha256
5347 (base32
5348 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5349 (build-system python-build-system)
5350 (propagated-inputs
5351 `(("python-ipykernel" ,python-ipykernel)))
5352 (inputs
5353 `(("pari-gp" ,pari-gp)
5354 ("readline" ,readline)))
5355 (arguments
5356 `(#:tests? #f)) ; no test suite
5357 (home-page
5358 "https://github.com/jdemeyer/pari_jupyter")
5359 (synopsis "A Jupyter kernel for PARI/GP")
5360 (description "The package provides a PARI/GP kernel for Jupyter.")
5361 (license license:gpl3+)))
5362
dede052a
RW
5363(define-public python-backcall
5364 (package
5365 (name "python-backcall")
5366 (version "0.1.0")
5367 (source
5368 (origin
5369 (method url-fetch)
5370 (uri (pypi-uri "backcall" version))
5371 (sha256
5372 (base32
5373 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5374 (build-system python-build-system)
5375 (home-page "https://github.com/takluyver/backcall/")
5376 (synopsis "Specifications for callback functions passed in to an API")
5377 (description
5378 "If your code lets other people supply callback functions, it's important
5379to specify the function signature you expect, and check that functions support
5380that. Adding extra parameters later would break other peoples code unless
5381you're careful. The @code{backcall} package provides a way of specifying the
5382callback signature using a prototype function.")
5383 (license license:bsd-3)))
5384
44d10b1f
RW
5385;; This is the latest release of the LTS version of ipython with support for
5386;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5387;; dropped support for Python 2.7.
5388(define-public python2-ipython
44d10b1f 5389 (package
8b5f756c 5390 (name "python2-ipython")
44d10b1f
RW
5391 (version "5.8.0")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "ipython" version ".tar.gz"))
5396 (sha256
5397 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5398 (build-system python-build-system)
44d10b1f 5399 (propagated-inputs
8b5f756c
RW
5400 `(("python2-backports-shutil-get-terminal-size"
5401 ,python2-backports-shutil-get-terminal-size)
5402 ("python2-pathlib2" ,python2-pathlib2)
5403 ("python2-pyzmq" ,python2-pyzmq)
5404 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5405 ("python2-terminado" ,python2-terminado)
5406 ("python2-matplotlib" ,python2-matplotlib)
5407 ("python2-numpy" ,python2-numpy)
5408 ("python2-numpydoc" ,python2-numpydoc)
5409 ("python2-jinja2" ,python2-jinja2)
5410 ("python2-mistune" ,python2-mistune)
5411 ("python2-pexpect" ,python2-pexpect)
5412 ("python2-pickleshare" ,python2-pickleshare)
5413 ("python2-simplegeneric" ,python2-simplegeneric)
5414 ("python2-jsonschema" ,python2-jsonschema)
5415 ("python2-traitlets" ,python2-traitlets)
5416 ("python2-nbformat" ,python2-nbformat)
5417 ("python2-pygments" ,python2-pygments)))
5418 (inputs
5419 `(("readline" ,readline)
5420 ("which" ,which)))
5421 (native-inputs
5422 `(("graphviz" ,graphviz)
5423 ("pkg-config" ,pkg-config)
5424 ("python2-requests" ,python2-requests) ;; for tests
5425 ("python2-testpath" ,python2-testpath)
5426 ("python2-mock" ,python2-mock)
5427 ("python2-nose" ,python2-nose)))
5428 (arguments
5429 `(#:python ,python-2
5430 #:phases
5431 (modify-phases %standard-phases
5432 (add-before 'check 'delete-broken-tests
5433 (lambda* (#:key inputs #:allow-other-keys)
5434 ;; These tests throw errors for unknown reasons.
5435 (delete-file "IPython/core/tests/test_profile.py")
5436 (delete-file "IPython/core/tests/test_interactiveshell.py")
5437 (delete-file "IPython/core/tests/test_magic.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:
5443Powerful interactive shells, a browser-based notebook, support for interactive
5444data visualization, embeddable interpreters and tools for parallel
5445computing.")
5446 (license license:bsd-3)))
5447
5448(define-public python-ipython
5449 (package
5450 (name "python-ipython")
5451 (version "7.5.0")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (pypi-uri "ipython" version ".tar.gz"))
5456 (sha256
5457 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5458 (build-system python-build-system)
5459 (propagated-inputs
5460 `(("python-backcall" ,python-backcall)
5461 ("python-pyzmq" ,python-pyzmq)
5462 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5463 ("python-terminado" ,python-terminado)
5464 ("python-matplotlib" ,python-matplotlib)
5465 ("python-numpy" ,python-numpy)
5466 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5467 ("python-jedi" ,python-jedi)
44d10b1f
RW
5468 ("python-jinja2" ,python-jinja2)
5469 ("python-mistune" ,python-mistune)
5470 ("python-pexpect" ,python-pexpect)
5471 ("python-pickleshare" ,python-pickleshare)
5472 ("python-simplegeneric" ,python-simplegeneric)
5473 ("python-jsonschema" ,python-jsonschema)
5474 ("python-traitlets" ,python-traitlets)
5475 ("python-nbformat" ,python-nbformat)
5476 ("python-pygments" ,python-pygments)))
5477 (inputs
5478 `(("readline" ,readline)
5479 ("which" ,which)))
5480 (native-inputs
5481 `(("graphviz" ,graphviz)
5482 ("pkg-config" ,pkg-config)
5483 ("python-requests" ,python-requests) ;; for tests
5484 ("python-testpath" ,python-testpath)
8b5f756c 5485 ("python-nose" ,python-nose)))
44d10b1f
RW
5486 (arguments
5487 `(#:phases
5488 (modify-phases %standard-phases
0f272518
RW
5489 (add-after 'unpack 'make-docs-reproducible
5490 (lambda _
5491 (substitute* "IPython/sphinxext/ipython_directive.py"
5492 ((".*import datetime") "")
5493 ((".*datetime.datetime.now\\(\\)") "")
5494 (("%timeit") "# %timeit"))
5495 #t))
44d10b1f
RW
5496 ;; Tests can only be run after the library has been installed and not
5497 ;; within the source directory.
5498 (delete 'check)
5499 (add-after 'install 'check
5500 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5501 (if tests?
5502 (begin
5503 ;; Make installed package available for running the tests
5504 (add-installed-pythonpath inputs outputs)
5505 (setenv "HOME" "/tmp/") ;; required by a test
5506 ;; We only test the core because one of the other tests
5507 ;; tries to import ipykernel.
5508 (invoke "python" "IPython/testing/iptest.py"
5509 "-v" "IPython/core/tests"))
5510 #t)))
5511 (add-before 'check 'fix-tests
5512 (lambda* (#:key inputs #:allow-other-keys)
5513 (substitute* "./IPython/utils/_process_posix.py"
5514 (("/usr/bin/env', 'which") (which "which")))
5515 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5516 (("#!/usr/bin/env python")
5517 (string-append "#!" (which "python"))))
44d10b1f
RW
5518 ;; This test introduces a circular dependency on ipykernel
5519 ;; (which depends on ipython).
5520 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5521 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5522 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5523 #t)))))
5524 (home-page "https://ipython.org")
5525 (synopsis "IPython is a tool for interactive computing in Python")
5526 (description
5527 "IPython provides a rich architecture for interactive computing with:
5528Powerful interactive shells, a browser-based notebook, support for interactive
5529data visualization, embeddable interpreters and tools for parallel
5530computing.")
8b5f756c 5531 (license license:bsd-3)))
44d10b1f 5532
8b5f756c
RW
5533(define-public python-ipython-documentation
5534 (package
5535 (inherit python-ipython)
5536 (name "python-ipython-documentation")
5537 (version (package-version python-ipython))
5538 (arguments
5539 `(#:phases
5540 (modify-phases %standard-phases
5541 (delete 'build)
5542 (delete 'check)
5543 (replace 'install
5544 (lambda* (#:key outputs #:allow-other-keys)
5545 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5546 (doc (string-append data "/doc/" ,name "-" ,version))
5547 (html (string-append doc "/html"))
5548 (man1 (string-append data "/man/man1"))
5549 (info (string-append data "/info"))
5550 (examples (string-append doc "/examples"))
5551 (python-arg (string-append "PYTHON=" (which "python"))))
5552 (setenv "LANG" "en_US.utf8")
5553 (with-directory-excursion "docs"
5554 ;; FIXME: pdf fails to build
5555 ;;(system* "make" "pdf" "PAPER=a4")
5556 (system* "make" python-arg "html")
5557 ;; FIXME: the generated texi file contains ^@^@, which trips
5558 ;; up the parser.
5559 ;; (system* "make" python-arg "info")
5560 )
5561 (copy-recursively "docs/man" man1)
5562 (copy-recursively "examples" examples)
5563 (copy-recursively "docs/build/html" html)
5564 ;; (copy-file "docs/build/latex/ipython.pdf"
5565 ;; (string-append doc "/ipython.pdf"))
5566 (mkdir-p info)
5567 ;; (copy-file "docs/build/texinfo/ipython.info"
5568 ;; (string-append info "/ipython.info"))
5569 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5570 #t)))))
5571 (inputs
5572 `(("python-ipython" ,python-ipython)
5573 ("python-ipykernel" ,python-ipykernel)))
5574 (native-inputs
5575 `(("python-sphinx" ,python-sphinx)
5576 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5577 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5578 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5579 texlive-fonts-ec
5580 texlive-generic-ifxetex
5581 texlive-generic-pdftex
8b5f756c
RW
5582 texlive-latex-capt-of
5583 texlive-latex-cmap
5584 texlive-latex-environ
5585 texlive-latex-eqparbox
5586 texlive-latex-etoolbox
5587 texlive-latex-expdlist
5588 texlive-latex-fancyhdr
5589 texlive-latex-fancyvrb
5590 texlive-latex-fncychap
5591 texlive-latex-float
5592 texlive-latex-framed
5593 texlive-latex-geometry
5594 texlive-latex-graphics
5595 texlive-latex-hyperref
5596 texlive-latex-mdwtools
5597 texlive-latex-multirow
5598 texlive-latex-needspace
5599 texlive-latex-oberdiek
5600 texlive-latex-parskip
5601 texlive-latex-preview
5602 texlive-latex-tabulary
5603 texlive-latex-threeparttable
5604 texlive-latex-titlesec
5605 texlive-latex-trimspaces
5606 texlive-latex-ucs
5607 texlive-latex-upquote
5608 texlive-latex-url
5609 texlive-latex-varwidth
5610 texlive-latex-wrapfig)))
5611 ("texinfo" ,texinfo)))))
44d10b1f
RW
5612
5613(define-public python-urwid
5614 (package
5615 (name "python-urwid")
5616 (version "2.0.1")
5617 (source
5618 (origin
5619 (method url-fetch)
5620 (uri (pypi-uri "urwid" version))
5621 (sha256
5622 (base32
5623 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5624 (build-system python-build-system)
5625 (home-page "http://urwid.org")
5626 (synopsis "Console user interface library for Python")
5627 (description
5628 "Urwid is a curses-based UI/widget library for Python. It includes many
5629features useful for text console applications.")
5630 (license license:lgpl2.1+)))
5631
5632(define-public python2-urwid
5633 (package-with-python2 python-urwid))
5634
5635(define-public python-urwidtrees
5636 (package
5637 (name "python-urwidtrees")
5638 (version "1.0.2")
5639 (source
5640 (origin
5641 (method url-fetch)
5642 ;; package author intends on distributing via github rather than pypi:
5643 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5644 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5645 version ".tar.gz"))
5646 (file-name (string-append name "-" version ".tar.gz"))
5647 (sha256
5648 (base32
5649 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5650 (build-system python-build-system)
5651 (arguments
5652 '(#:tests? #f)) ; no tests
5653 (propagated-inputs `(("python-urwid" ,python-urwid)))
5654 (home-page "https://github.com/pazz/urwidtrees")
5655 (synopsis "Tree widgets for urwid")
5656 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5657toolkit. Use it to build trees of widgets.")
5658 (license license:gpl3+)))
5659
5660(define-public python2-urwidtrees
5661 (package-with-python2 python-urwidtrees))
5662
5663(define-public python-ua-parser
5664 (package
5665 (name "python-ua-parser")
5666 (version "0.8.0")
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (pypi-uri "ua-parser" version))
5671 (sha256
5672 (base32
5673 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5674 (build-system python-build-system)
5675 (arguments
5676 `(#:tests? #f)) ;no test suite in release
5677 (native-inputs
5678 `(("python-pyyaml" ,python-pyyaml)))
5679 (home-page "https://github.com/ua-parser/uap-python")
5680 (synopsis "User agent parser")
5681 (description
5682 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5683 (license license:asl2.0)))
5684
5685(define-public python2-ua-parser
5686 (package-with-python2 python-ua-parser))
5687
5688(define-public python-user-agents
5689 (package
5690 (name "python-user-agents")
5691 (version "1.1.0")
5692 (source
5693 (origin
5694 (method url-fetch)
5695 (uri (pypi-uri "user-agents" version))
5696 (sha256
5697 (base32
5698 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5699 (build-system python-build-system)
5700 (arguments
5701 `(#:tests? #f)) ;missing devices.json test file in release
5702 (propagated-inputs
5703 `(("python-ua-parser" ,python-ua-parser)))
5704 (home-page "https://github.com/selwin/python-user-agents")
5705 (synopsis "User Agent strings parsing library")
5706 (description
5707 "A library to identify devices (phones, tablets) and their capabilities by
5708parsing (browser/HTTP) user agent strings.")
5709 (license license:expat)))
5710
5711(define-public python2-user-agents
5712 (package-with-python2 python-user-agents))
5713
5714(define-public python-dbus
5715 (package
5716 (name "python-dbus")
5717 (version "1.2.8")
5718 (source
5719 (origin
5720 (method url-fetch)
5721 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5722 "dbus-python-" version ".tar.gz"))
5723 (sha256
5724 (base32
5725 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5726 (build-system gnu-build-system)
5727 (arguments
5728 '(#:phases
5729 (modify-phases %standard-phases
5730 (add-before
5731 'check 'pre-check
5732 (lambda _
5733 ;; XXX: For the missing '/etc/machine-id'.
5734 (substitute* "test/run-test.sh"
5735 (("DBUS_FATAL_WARNINGS=1")
5736 "DBUS_FATAL_WARNINGS=0"))
5737 #t)))))
5738 (native-inputs
5739 `(("pkg-config" ,pkg-config)))
5740 (inputs
5741 `(("python" ,python-wrapper)
5742 ("dbus-glib" ,dbus-glib)))
5743 (synopsis "Python bindings for D-bus")
5744 (description "python-dbus provides bindings for libdbus, the reference
5745implementation of D-Bus.")
5746 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5747 (license license:expat)))
5748
5749(define-public python2-dbus
5750 (package (inherit python-dbus)
5751 (name "python2-dbus")
5752 (inputs `(("python" ,python-2)
5753 ,@(alist-delete "python"
5754 (package-inputs python-dbus)
5755 equal?)))
5756 ;; FIXME: on Python 2, the test_utf8 fails with:
5757 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5758 (arguments `(#:tests? #f))))
5759
fb236fdd
AG
5760(define-public python-notify2
5761 (package
5762 (name "python-notify2")
5763 (version "0.3.1")
5764 (source
5765 (origin
5766 (method url-fetch)
5767 (uri (pypi-uri "notify2" version))
5768 (sha256
5769 (base32
5770 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5771 (build-system python-build-system)
5772 (arguments `(#:tests? #f)) ; tests depend on system state
5773 (native-inputs
5774 `(("python-dbus" ,python-dbus)))
5775 (home-page "https://bitbucket.org/takluyver/pynotify2")
5776 (synopsis "Python interface to D-Bus notifications")
5777 (description
5778 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5779It is a reimplementation of pynotify in pure Python, and an alternative to
5780the GObject Introspection bindings to libnotify for non-GTK applications.")
5781 (license (list license:bsd-2
5782 license:lgpl2.1+))))
5783
5784(define-public python2-notify2
5785 (package-with-python2 python-notify2))
5786
44d10b1f
RW
5787(define-public python-lxml
5788 (package
5789 (name "python-lxml")
5790 (version "4.2.5")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "lxml" version))
5795 (sha256
5796 (base32
5797 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5798 (build-system python-build-system)
5799 (inputs
5800 `(("libxml2" ,libxml2)
5801 ("libxslt" ,libxslt)))
5802 (home-page "http://lxml.de/")
5803 (synopsis
5804 "Python XML processing library")
5805 (description
5806 "The lxml XML toolkit is a Pythonic binding for the C libraries
5807libxml2 and libxslt.")
5808 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5809
5810(define-public python2-lxml
5811 (package-with-python2 python-lxml))
5812
5813;; beautifulsoup4 has a totally different namespace than 3.x,
5814;; and pypi seems to put it under its own name, so I guess we should too
5815(define-public python-beautifulsoup4
5816 (package
5817 (name "python-beautifulsoup4")
abb53e6f 5818 (version "4.7.1")
44d10b1f
RW
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "beautifulsoup4" version))
5823 (sha256
5824 (base32
abb53e6f 5825 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5826 (build-system python-build-system)
5827 (arguments
5828 `(#:phases
5829 (modify-phases %standard-phases
5830 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5831 ;; must use this conversion script when building with Python 3. The
5832 ;; conversion script also runs the tests.
5833 ;; For more information, see the file 'convert-py3k' in the source
5834 ;; distribution.
5835 (replace 'check
dff0197e 5836 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5837 (propagated-inputs
abb53e6f 5838 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5839 (home-page
5840 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5841 (synopsis
5842 "Python screen-scraping library")
5843 (description
5844 "Beautiful Soup is a Python library designed for rapidly setting up
5845screen-scraping projects. It offers Pythonic idioms for navigating,
5846searching, and modifying a parse tree, providing a toolkit for
5847dissecting a document and extracting what you need. It automatically
5848converts incoming documents to Unicode and outgoing documents to UTF-8.")
5849 (license license:expat)
5850 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5851
5852(define-public python2-beautifulsoup4
5853 (package
5854 (inherit (package-with-python2
5855 (strip-python2-variant python-beautifulsoup4)))
5856 (arguments `(#:python ,python-2))))
5857
ad74978a
BT
5858(define-public python-soupsieve
5859 (package
5860 (name "python-soupsieve")
e9cb6edd 5861 (version "1.9.2")
ad74978a
BT
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (pypi-uri "soupsieve" version))
5866 (sha256
5867 (base32
e9cb6edd 5868 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5869 (build-system python-build-system)
5870 (arguments `(#:tests? #f))
5871 ;;XXX: 2 tests fail currently despite claming they were to be
5872 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5873 ;;don't want to create a circular dependency.
5874 (home-page "https://github.com/facelessuser/soupsieve")
5875 (synopsis "CSS selector library")
5876 (description
5877 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5878Soup 4. It aims to provide selecting, matching, and filtering using modern
5879CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5880specifications up through the latest CSS level 4 drafts and beyond (though
5881some are not yet implemented).")
d00b83fb 5882 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5883 (license license:expat)))
5884
5885(define-public python2-soupsieve
d00b83fb 5886 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5887 (package
5888 (inherit base)
5889 (propagated-inputs
d00b83fb
MB
5890 `(("python2-backports-functools-lru-cache"
5891 ,python2-backports-functools-lru-cache)
5892 ,@(package-propagated-inputs base))))))
ad74978a 5893
44d10b1f
RW
5894(define-public python-netifaces
5895 (package
5896 (name "python-netifaces")
5897 (version "0.10.7")
5898 (source
5899 (origin
5900 (method url-fetch)
5901 (uri (pypi-uri "netifaces" version))
5902 (sha256
5903 (base32
5904 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5905 (build-system python-build-system)
5906 (home-page "https://github.com/al45tair/netifaces")
5907 (synopsis
5908 "Python module for portable network interface information")
5909 (description
5910 "Netifaces is a Python module providing information on network
5911interfaces in an easy and portable manner.")
5912 (license license:expat)))
5913
5914(define-public python2-netifaces
5915 (package-with-python2 python-netifaces))
5916
5917(define-public python-networkx
5918 (package
5919 (name "python-networkx")
5920 (version "2.2")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri "networkx" version ".zip"))
5925 (sha256
5926 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5927 (build-system python-build-system)
5928 ;; python-decorator is needed at runtime.
5929 (propagated-inputs
5930 `(("python-decorator" ,python-decorator)))
5931 (native-inputs
5932 `(("python-nose" ,python-nose)
5933 ("unzip" ,unzip)))
5934 (home-page "https://networkx.github.io/")
5935 (synopsis "Python module for creating and manipulating graphs and networks")
5936 (description
5937 "NetworkX is a Python package for the creation, manipulation, and study
5938of the structure, dynamics, and functions of complex networks.")
5939 (license license:bsd-3)))
5940
5941(define-public python2-networkx
5942 (package-with-python2 python-networkx))
5943
5944(define-public python-datrie
5945 (package
5946 (name "python-datrie")
5947 (version "0.7.1")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "datrie" version))
5952 (sha256
5953 (base32
5954 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5955 (build-system python-build-system)
5956 (arguments
5957 `(#:phases (modify-phases %standard-phases
5958 (add-before 'build 'cythonize
5959 (lambda _
5960 ;; Regenerate Cython classes to solve ABI issues with Python
5961 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5962 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5963 "src/stdio_ext.pxd" "-a"))))))
5964 (native-inputs
5965 `(("python-cython" ,python-cython)
5966 ("python-hypothesis" ,python-hypothesis)
5967 ("python-pytest" ,python-pytest)
5968 ("python-pytest-runner" ,python-pytest-runner)))
5969 (home-page "https://github.com/kmike/datrie")
5970 (synopsis "Fast, efficiently stored trie for Python")
5971 (description
5972 "This package provides a fast, efficiently stored trie implementation for
5973Python.")
5974 (license license:lgpl2.1+)))
5975
5976(define-public snakemake
5977 (package
5978 (name "snakemake")
5979 (version "5.2.4")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "snakemake" version))
5984 (sha256
5985 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5986 (build-system python-build-system)
5987 (arguments
5988 ;; TODO: Package missing test dependencies.
5989 '(#:tests? #f
5990 #:phases
5991 (modify-phases %standard-phases
5992 ;; For cluster execution Snakemake will call Python. Since there is
5993 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5994 ;; this by calling the snakemake wrapper instead.
5995 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5996 (lambda* (#:key outputs #:allow-other-keys)
5997 (substitute* "snakemake/executors.py"
5998 (("\\{sys.executable\\} -m snakemake")
5999 (string-append (assoc-ref outputs "out")
6000 "/bin/snakemake")))
6001 #t)))))
6002 (propagated-inputs
6003 `(("python-gitpython" ,python-gitpython)
6004 ("python-wrapt" ,python-wrapt)
6005 ("python-requests" ,python-requests)
6006 ("python-appdirs" ,python-appdirs)
6007 ("python-configargparse" ,python-configargparse)
6008 ("python-datrie" ,python-datrie)
6009 ("python-docutils" ,python-docutils)
6010 ("python-jinja2" ,python-jinja2)
6011 ("python-jsonschema" ,python-jsonschema)
6012 ("python-networkx" ,python-networkx)
6013 ("python-pyyaml" ,python-pyyaml)
6014 ("python-ratelimiter" ,python-ratelimiter)))
6015 (home-page "https://snakemake.readthedocs.io")
6016 (synopsis "Python-based execution environment for make-like workflows")
6017 (description
6018 "Snakemake aims to reduce the complexity of creating workflows by
6019providing a clean and modern domain specific specification language (DSL) in
6020Python style, together with a fast and comfortable execution environment.")
6021 (license license:expat)))
6022
6023;; This is currently needed for the pigx-* packages.
6024(define-public snakemake-4
6025 (package (inherit snakemake)
6026 (version "4.4.0")
6027 (source
6028 (origin
6029 (method url-fetch)
6030 (uri (pypi-uri "snakemake" version))
6031 (sha256
6032 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6033 (propagated-inputs
6034 `(("python-wrapt" ,python-wrapt)
6035 ("python-requests" ,python-requests)
6036 ("python-appdirs" ,python-appdirs)
6037 ("python-configargparse" ,python-configargparse)
6038 ("python-pyyaml" ,python-pyyaml)
6039 ("python-ratelimiter" ,python-ratelimiter)))))
6040
6041(define-public python-pyqrcode
6042 (package
6043 (name "python-pyqrcode")
6044 (version "1.2.1")
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "PyQRCode" version))
6049 (sha256
6050 (base32
6051 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6052 (build-system python-build-system)
6053 (home-page
6054 "https://github.com/mnooner256/pyqrcode")
6055 (synopsis "QR code generator")
6056 (description
6057 "Pyqrcode is a QR code generator written purely in Python with
6058SVG, EPS, PNG and terminal output.")
6059 (license license:bsd-3)))
6060
6061(define-public python-seaborn
6062 (package
6063 (name "python-seaborn")
6064 (version "0.9.0")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "seaborn" version))
6069 (sha256
6070 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6071 (build-system python-build-system)
6072 (arguments
6073 `(#:phases
6074 (modify-phases %standard-phases
6075 (add-before 'check 'start-xserver
6076 (lambda* (#:key inputs #:allow-other-keys)
6077 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6078 ;; There must be a running X server and make check doesn't
6079 ;; start one. Therefore we must do it.
6080 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6081 (setenv "DISPLAY" ":1")
6082 #t)))
6083 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6084 (propagated-inputs
6085 `(("python-pandas" ,python-pandas)
6086 ("python-matplotlib" ,python-matplotlib)
6087 ("python-numpy" ,python-numpy)
6088 ("python-scipy" ,python-scipy)))
6089 (native-inputs
6090 `(("python-pytest" ,python-pytest)
6091 ("xorg-server" ,xorg-server)))
6092 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6093 (synopsis "Statistical data visualization")
6094 (description
6095 "Seaborn is a library for making attractive and informative statistical
6096graphics in Python. It is built on top of matplotlib and tightly integrated
6097with the PyData stack, including support for numpy and pandas data structures
6098and statistical routines from scipy and statsmodels.")
6099 (license license:bsd-3)))
6100
6101(define-public python2-seaborn
6102 (package-with-python2 python-seaborn))
6103
6104(define-public python-mpmath
6105 (package
6106 (name "python-mpmath")
6107 (version "0.19")
6108 (source (origin
6109 (method url-fetch)
6110 (uri (string-append "http://mpmath.org/files/mpmath-"
6111 version ".tar.gz"))
6112 (sha256
6113 (base32
6114 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6115 (build-system python-build-system)
6116 (arguments
6117 '(#:phases
6118 (modify-phases %standard-phases
6119 (replace 'check
6120 (lambda _
5d7a6f1c 6121 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6122 (home-page "http://mpmath.org")
6123 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6124 (description
6125 "@code{mpmath} can be used as an arbitrary-precision substitute for
6126Python's float/complex types and math/cmath modules, but also does much
6127more advanced mathematics.")
6128 (license license:bsd-3)))
6129
6130(define-public python2-mpmath
6131 (package-with-python2 python-mpmath))
6132
6133(define-public python-bigfloat
6134 (package
6135 (name "python-bigfloat")
6136 (version "0.3.0")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "bigfloat" version))
6141 (sha256
6142 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6143 (build-system python-build-system)
6144 (inputs
6145 `(("mpfr" ,mpfr)))
6146 (home-page "https://github.com/mdickinson/bigfloat")
6147 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6148 (description
e36de31b 6149 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6150multiprecision arithmetic.")
6151 (license license:lgpl3+)))
6152
6153(define-public python2-bigfloat
6154 (package-with-python2 python-bigfloat))
6155
6156(define-public python-sympy
6157 (package
6158 (name "python-sympy")
6159 (version "1.1.1")
6160 (source
6161 (origin
6162 (method url-fetch)
6163 (uri (string-append
6164 "https://github.com/sympy/sympy/releases/download/sympy-"
6165 version "/sympy-" version ".tar.gz"))
6166 (sha256
6167 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6168 (build-system python-build-system)
6169 (arguments
6170 `(#:phases
6171 (modify-phases %standard-phases
6172 ;; Run the core tests after installation. By default it would run
6173 ;; *all* tests, which take a very long time to complete and are known
6174 ;; to be flaky.
6175 (delete 'check)
6176 (add-after 'install 'check
6177 (lambda* (#:key outputs #:allow-other-keys)
6178 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6179 #t)))))
6180 (propagated-inputs
6181 `(("python-mpmath" ,python-mpmath)))
6182 (home-page "http://www.sympy.org/")
6183 (synopsis "Python library for symbolic mathematics")
6184 (description
6185 "SymPy is a Python library for symbolic mathematics. It aims to become a
6186full-featured computer algebra system (CAS) while keeping the code as simple
6187as possible in order to be comprehensible and easily extensible.")
6188 (license license:bsd-3)))
6189
6190(define-public python2-sympy
6191 (package
6192 (inherit (package-with-python2 python-sympy))
6193 (arguments
6194 `(#:phases
6195 (modify-phases %standard-phases
6196 ;; Run the core tests after installation. By default it would run
6197 ;; *all* tests, which take a very long time to complete and are known
6198 ;; to be flaky.
6199 (delete 'check)
6200 (add-after 'install 'check
6201 (lambda* (#:key outputs #:allow-other-keys)
6202 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6203 #t)))))))
6204
6205(define-public python-q
6206 (package
6207 (name "python-q")
6208 (version "2.6")
6209 (source
6210 (origin
6211 (method url-fetch)
6212 (uri (pypi-uri "q" version))
6213 (sha256
6214 (base32
6215 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6216 (build-system python-build-system)
6217 (home-page "https://github.com/zestyping/q")
6218 (synopsis "Quick-and-dirty debugging output for tired programmers")
6219 (description
6220 "q is a Python module for \"print\" style of debugging Python code. It
6221provides convenient short API for print out of values, tracebacks, and
6222falling into the Python interpreter.")
6223 (license license:asl2.0)))
6224
6225(define-public python2-q
6226 (package-with-python2 python-q))
6227
6228(define-public python2-xlib
6229 (package
6230 (name "python2-xlib")
6231 (version "0.14")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6235 "/" version "/"
6236 "python-xlib-" version ".tar.gz"))
6237 (sha256
6238 (base32
6239 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6240 (build-system python-build-system)
6241 (arguments
6242 `(#:python ,python-2 ;Python 2 only
6243 #:tests? #f)) ;no tests
6244 (home-page "http://python-xlib.sourceforge.net/")
6245 (synopsis "Python X11 client library")
6246 (description
6247 "The Python X Library is intended to be a fully functional X client
6248library for Python programs. It is useful to implement low-level X clients.
6249It is written entirely in Python.")
6250 (license license:gpl2+)))
6251
6252(define-public python-singledispatch
6253 (package
6254 (name "python-singledispatch")
6255 (version "3.4.0.3")
6256 (source
6257 (origin
6258 (method url-fetch)
6259 (uri (pypi-uri "singledispatch" version))
6260 (sha256
6261 (base32
6262 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6263 (build-system python-build-system)
6264 (native-inputs
6265 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6266 (home-page
6267 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6268 (synopsis "Backport of singledispatch feature from Python 3.4")
6269 (description
6270 "This library brings functools.singledispatch from Python 3.4 to Python
62712.6-3.3.")
6272 (license license:expat)))
6273
6274(define-public python2-singledispatch
6275 (package-with-python2 python-singledispatch))
6276
6277;; the python- version can be removed with python-3.5
6278(define-public python-backports-abc
6279 (package
6280 (name "python-backports-abc")
6281 (version "0.5")
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (pypi-uri "backports_abc" version))
6286 (sha256
6287 (base32
6288 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6289 (build-system python-build-system)
6290 (home-page "https://github.com/cython/backports_abc")
6291 (synopsis "Backport of additions to the 'collections.abc' module")
6292 (description
6293 "Python-backports-abc provides a backport of additions to the
36a4366d 6294@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6295 (license license:psfl)))
6296
6297(define-public python2-backports-abc
6298 (package-with-python2 python-backports-abc))
6299
6300(define-public python-backports-csv
6301 (package
6302 (name "python-backports-csv")
6303 (version "1.0.5")
6304 (source
6305 (origin
6306 (method url-fetch)
6307 (uri (pypi-uri "backports.csv" version))
6308 (sha256
6309 (base32
6310 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6311 (build-system python-build-system)
6312 (home-page "https://github.com/ryanhiebert/backports.csv")
6313 (synopsis "Backport of Python 3's csv module for Python 2")
6314 (description
6315 "Provides a backport of Python 3's @code{csv} module for parsing
6316comma separated values. The API of the @code{csv} module in Python 2
6317is drastically different from the @code{csv} module in Python 3.
6318This is due, for the most part, to the difference between str in
6319Python 2 and Python 3.")
6320 (license license:psfl)))
6321
6322(define-public python2-backports-csv
6323 (package-with-python2 python-backports-csv))
6324
6325(define-public python2-backports-shutil-get-terminal-size
6326 (package
6327 (name "python2-backports-shutil-get-terminal-size")
6328 (version "1.0.0")
6329 (source
6330 (origin
6331 (method url-fetch)
6332 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6333 (sha256
6334 (base32
6335 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6336 (build-system python-build-system)
6337 (arguments
6338 `(#:python ,python-2
6339 #:phases
6340 (modify-phases %standard-phases
6341 (replace 'check
6342 (lambda _
4a4a7d9a 6343 (invoke "py.test" "-v"))))))
44d10b1f
RW
6344 (native-inputs
6345 `(("python2-pytest" ,python2-pytest)))
6346 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6347 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6348 (description
6349 "This package provides a backport of the @code{get_terminal_size
6350function} from Python 3.3's @code{shutil}.
6351Unlike the original version it is written in pure Python rather than C,
6352so it might be a tiny bit slower.")
6353 (license license:expat)))
6354
6355(define-public python-waf
6356 (package
6357 (name "python-waf")
6358 (version "2.0.11")
6359 (source (origin
6360 (method url-fetch)
6361 (uri (string-append "https://waf.io/"
6362 "waf-" version ".tar.bz2"))
6363 (sha256
6364 (base32
6365 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6366 (build-system python-build-system)
6367 (arguments
6368 '(#:phases
6369 (modify-phases %standard-phases
6370 (replace 'build
6371 (lambda _
6372 (invoke "python" "waf-light" "configure" "build")))
6373 (replace 'check
6374 (lambda _
6375 (invoke "python" "waf" "--version")))
6376 (replace 'install
6377 (lambda* (#:key outputs #:allow-other-keys)
6378 (let ((out (assoc-ref outputs "out")))
6379 (install-file "waf" (string-append out "/bin")))
6380 #t))
6381 ;; waf breaks when it is wrapped.
6382 (delete 'wrap))))
6383 (home-page "https://waf.io/")
6384 (synopsis "Python-based build system")
6385 (description
6386 "Waf is a Python-based framework for configuring, compiling and installing
6387applications.")
6388 (license license:bsd-3)))
6389
6390(define-public python2-waf
6391 (package-with-python2 python-waf))
6392
6393(define-public python-pyzmq
6394 (package
6395 (name "python-pyzmq")
6396 (version "17.1.2")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (pypi-uri "pyzmq" version))
6401 (sha256
6402 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6403 (build-system python-build-system)
6404 (arguments
6405 `(#:configure-flags
6406 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6407 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6408 ;; --inplace' for 'python setup.py test' to work.
6409 #:tests? #f))
6410 (inputs
6411 `(("zeromq" ,zeromq)))
6412 (native-inputs
6413 `(("pkg-config" ,pkg-config)
6414 ("python-nose" ,python-nose)))
6415 (home-page "https://github.com/zeromq/pyzmq")
6416 (synopsis "Python bindings for 0MQ")
6417 (description
6418 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6419 (license license:bsd-4)))
6420
6421(define-public python2-pyzmq
6422 (package-with-python2 python-pyzmq))
6423
6424(define-public python-pep8
6425 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6426 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6427 ;; some dependents' test suites, and nothing more.
6428 (package
6429 (name "python-pep8")
6430 (version "1.7.0")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "pep8" version))
6435 (sha256
6436 (base32
6437 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6438 (build-system python-build-system)
6439 (home-page "https://pep8.readthedocs.org/")
6440 (synopsis "Python style guide checker")
6441 (description
6442 "This tools checks Python code against some of the style conventions in
6443PEP 8.")
6444 (license license:expat)))
6445
6446(define-public python2-pep8
6447 (package-with-python2 python-pep8))
6448
6449(define-public python-pyflakes
6450 (package
6451 (name "python-pyflakes")
6452 (version "2.0.0")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "pyflakes" version))
6457 (sha256
6458 (base32
6459 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6460 (build-system python-build-system)
6461 (home-page
6462 "https://github.com/pyflakes/pyflakes")
6463 (synopsis "Passive checker of Python programs")
6464 (description
6465 "Pyflakes statically checks Python source code for common errors.")
6466 (license license:expat)))
6467
6468(define-public python2-pyflakes
6469 (package-with-python2 python-pyflakes))
6470
6471(define-public python-mccabe
6472 (package
6473 (name "python-mccabe")
6474 (version "0.6.1")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "mccabe" version))
6479 (sha256
6480 (base32
6481 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6482 (build-system python-build-system)
6483 (native-inputs
6484 `(("python-pytest" ,python-pytest-bootstrap)
6485 ("python-pytest-runner" ,python-pytest-runner)))
6486 (home-page "https://github.com/flintwork/mccabe")
6487 (synopsis "McCabe checker, plugin for flake8")
6488 (description
6489 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6490complexity of Python source code.")
6491 (license license:expat)))
6492
6493(define-public python2-mccabe
6494 (package-with-python2 python-mccabe))
6495
6496(define-public python-mccabe-0.2.1
6497 (package (inherit python-mccabe)
6498 (version "0.2.1")
6499 (source
6500 (origin
6501 (method url-fetch)
6502 (uri (pypi-uri "mccabe" version))
6503 (sha256
6504 (base32
6505 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6506
6507(define-public python2-mccabe-0.2.1
6508 (package-with-python2 python-mccabe-0.2.1))
6509
6510;; Flake8 2.4.1 requires an older version of pep8.
6511;; This should be removed ASAP.
6512(define-public python-pep8-1.5.7
6513 (package (inherit python-pep8)
6514 (version "1.5.7")
6515 (source
f3576970
RW
6516 (origin
6517 (method url-fetch)
6518 (uri (pypi-uri "pep8" version))
6519 (sha256
6520 (base32
6521 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6522 (arguments
6523 ;; XXX Tests not compatible with Python 3.5.
6524 '(#:tests? #f))))
6525
6526(define-public python2-pep8-1.5.7
6527 (package-with-python2 python-pep8-1.5.7))
6528
6529;; Flake8 2.4.1 requires an older version of pyflakes.
6530;; This should be removed ASAP.
6531(define-public python-pyflakes-0.8.1
6532 (package (inherit python-pyflakes)
6533 (version "0.8.1")
6534 (source
8c4dffb5
RW
6535 (origin
6536 (method url-fetch)
6537 (uri (pypi-uri "pyflakes" version))
6538 (sha256
6539 (base32
6540 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6541 (arguments
6542 ;; XXX Tests not compatible with Python 3.5.
6543 '(#:tests? #f))))
6544
6545(define-public python2-pyflakes-0.8.1
6546 (package-with-python2 python-pyflakes-0.8.1))
6547
6548;; This package is used by hypothesis which has thousands of dependent packages.
6549;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6550(define-public python-flake8-3.5
6551 (package
6552 (name "python-flake8")
6553 (version "3.5.0")
6554 (source
6555 (origin
6556 (method url-fetch)
6557 (uri (pypi-uri "flake8" version))
6558 (sha256
6559 (base32
6560 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6561 (build-system python-build-system)
6562 (arguments
6563 `(#:phases
6564 (modify-phases %standard-phases
6565 ;; Two errors don't seem to have assigned codes.
6566 (add-after 'unpack 'delete-broken-test
6567 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6568 (add-after 'unpack 'fix-problem-with-pycodestyle
6569 (lambda _
6570 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6571 ;; This should no longer be needed with the next release.
6572 (substitute* "setup.py"
6573 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6574 "PEP8_PLUGIN('break_after_binary_operator'),\
6575PEP8_PLUGIN('break_before_binary_operator'),"))
6576 #t))
6577 (delete 'check)
6578 (add-after 'install 'check
6579 (lambda* (#:key inputs outputs #:allow-other-keys)
6580 (add-installed-pythonpath inputs outputs)
6581 (invoke "pytest" "-v")
6582 #t)))))
6583 (propagated-inputs
6584 `(("python-pycodestyle" ,python-pycodestyle)
6585 ("python-pyflakes" ,python-pyflakes)
6586 ("python-mccabe" ,python-mccabe)))
6587 (native-inputs
6588 `(("python-mock" ,python-mock)
6589 ("python-pytest" ,python-pytest-bootstrap)
6590 ("python-pytest-runner" ,python-pytest-runner)))
6591 (home-page "https://gitlab.com/pycqa/flake8")
6592 (synopsis
6593 "The modular source code checker: pep8, pyflakes and co")
6594 (description
6595 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6596 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6597 (license license:expat)))
6598
6599(define-public python2-flake8-3.5
6600 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6601 (package (inherit base)
6602 (propagated-inputs
6603 `(("python2-configparser" ,python2-configparser)
6604 ("python2-enum34" ,python2-enum34)
6605 ,@(package-propagated-inputs base))))))
6606
6607;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6608;; this newer version. Keep it as a separate variable for now to avoid
6609;; rebuilding "python-hypothesis"; this should be removed in the next
6610;; rebuild cycle.
6611(define-public python-flake8
6612 (package
6613 (inherit python-flake8-3.5)
6614 (version "3.6.0")
6615 (source (origin
6616 (method url-fetch)
6617 (uri (pypi-uri "flake8" version))
6618 (sha256
6619 (base32
6620 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6621 (arguments
6622 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6623 ((#:phases phases)
6624 `(modify-phases ,phases
6625 (delete 'delete-broken-test)
6626 (delete 'fix-problem-with-pycodestyle)))))
6627 (properties `((python2-variant . ,(delay python2-flake8))))))
6628
6629(define-public python2-flake8
6630 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6631 (package (inherit base)
6632 (propagated-inputs
6633 (package-propagated-inputs python2-flake8-3.5)))))
6634
6635;; python-hacking requires flake8 <2.6.0.
6636(define-public python-flake8-2.5
6637 (package
6638 (inherit python-flake8)
6639 (version "2.5.5")
6640 (source (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "flake8" version))
6643 (sha256
6644 (base32
6645 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6646 (propagated-inputs
6647 `(("python-pep8" ,python-pep8)
6648 ,@(package-propagated-inputs python-flake8)))
6649 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6650
6651(define-public python2-flake8-2.5
6652 (package
6653 (inherit python2-flake8)
6654 (version (package-version python-flake8-2.5))
6655 (source (origin
6656 (inherit (package-source python-flake8-2.5))))
6657 (propagated-inputs
6658 `(("python2-pep8" ,python2-pep8)
6659 ,@(package-propagated-inputs python2-flake8)))))
6660
6661(define-public python-flake8-polyfill
6662 (package
6663 (name "python-flake8-polyfill")
6664 (version "1.0.2")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "flake8-polyfill" version))
6669 (sha256
6670 (base32
6671 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6672 (build-system python-build-system)
6673 (arguments
6674 '(#:phases
6675 (modify-phases %standard-phases
6676 (replace 'check
6677 (lambda _
6678 (setenv "PYTHONPATH"
6679 (string-append (getcwd) "/build/lib:"
6680 (getenv "PYTHONPATH")))
4f0a0894 6681 (invoke "py.test" "-v"))))))
44d10b1f
RW
6682 (native-inputs
6683 `(("python-flake8" ,python-flake8)
6684 ("python-mock" ,python-mock)
6685 ("python-pep8" ,python-pep8)
6686 ("python-pycodestyle" ,python-pycodestyle)
6687 ("python-pytest" ,python-pytest)))
6688 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6689 (synopsis "Polyfill package for Flake8 plugins")
6690 (description
6691 "This package that provides some compatibility helpers for Flake8
6692plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6693 (license license:expat)))
6694
6695(define-public python2-flake8-polyfill
6696 (package-with-python2 python-flake8-polyfill))
6697
6698(define-public python-mistune
6699 (package
6700 (name "python-mistune")
6701 (version "0.8.4")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "mistune" version))
6706 (sha256
6707 (base32
6708 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6709 (build-system python-build-system)
6710 (native-inputs
6711 `(("python-nose" ,python-nose)
6712 ("python-cython" ,python-cython)))
6713 (home-page "https://github.com/lepture/mistune")
6714 (synopsis "Markdown parser in pure Python")
6715 (description "This package provides a fast markdown parser in pure
6716Python.")
6717 (license license:bsd-3)))
6718
6719(define-public python2-mistune
6720 (package-with-python2 python-mistune))
6721
6722(define-public python-markdown
6723 (package
6724 (name "python-markdown")
ceb1936a 6725 (version "3.1.1")
44d10b1f
RW
6726 (source
6727 (origin
6728 (method url-fetch)
6729 (uri (pypi-uri "Markdown" version))
6730 (sha256
6731 (base32
ceb1936a 6732 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6733 (build-system python-build-system)
6734 (native-inputs
6735 `(("python-nose" ,python-nose)
6736 ("python-pyyaml" ,python-pyyaml)))
6737 (home-page "https://python-markdown.github.io/")
6738 (synopsis "Python implementation of Markdown")
6739 (description
6740 "This package provides a Python implementation of John Gruber's
6741Markdown. The library features international input, various Markdown
6742extensions, and several HTML output formats. A command line wrapper
6743markdown_py is also provided to convert Markdown files to HTML.")
6744 (license license:bsd-3)))
6745
6746(define-public python2-markdown
6747 (package-with-python2 python-markdown))
6748
6749(define-public python-ptyprocess
6750 (package
6751 (name "python-ptyprocess")
6752 (version "0.5.2")
6753 (source
6754 (origin
6755 (method url-fetch)
6756 (uri (pypi-uri "ptyprocess" version))
6757 (sha256
6758 (base32
6759 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6760 (build-system python-build-system)
6761 (native-inputs
6762 `(("python-nose" ,python-nose)))
6763 (arguments
6764 `(#:phases
6765 (modify-phases %standard-phases
6766 (replace 'check
7904d6fa 6767 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6768 (home-page "https://github.com/pexpect/ptyprocess")
6769 (synopsis "Run a subprocess in a pseudo terminal")
6770 (description
6771 "This package provides a Python library used to launch a subprocess in a
6772pseudo terminal (pty), and interact with both the process and its pty.")
6773 (license license:isc)))
6774
6775(define-public python2-ptyprocess
6776 (package-with-python2 python-ptyprocess))
6777
6778(define-public python-cram
6779 (package
6780 (name "python-cram")
6781 (version "0.7")
6782 (home-page "https://bitheap.org/cram/")
6783 (source (origin
6784 (method url-fetch)
6785 (uri (list (string-append home-page "cram-"
6786 version ".tar.gz")
6787 (pypi-uri "cram" version)))
6788 (sha256
6789 (base32
6790 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6791 (arguments
6792 '(#:phases
6793 (modify-phases %standard-phases
6794 (add-after 'unpack 'patch-source
6795 (lambda _
6796 (substitute* (find-files "cram" ".*\\.py$")
6797 ;; Replace default shell path.
6798 (("/bin/sh") (which "sh")))
6799 (substitute* (find-files "tests" ".*\\.t$")
6800 (("md5") "md5sum")
6801 (("/bin/bash") (which "bash"))
6802 (("/bin/sh") (which "sh")))
6803 (substitute* "cram/_test.py"
6804 ;; This hack works around a bug triggered by substituting
6805 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6806 ;; "cram -h", which breaks the output at 80 characters. This
6807 ;; causes the line showing the default shell to break into two
6808 ;; lines, but the test expects a single line...
6809 (("env\\['COLUMNS'\\] = '80'")
6810 "env['COLUMNS'] = '160'"))
6811 #t))
6812 (delete 'check)
6813 (add-after 'install 'check
6814 ;; The test phase uses the built library and executable.
6815 ;; It's easier to run it after install since the build
6816 ;; directory contains version-specific PATH.
6817 (lambda* (#:key inputs outputs #:allow-other-keys)
6818 (add-installed-pythonpath inputs outputs)
6819 (setenv "PATH" (string-append (getenv "PATH") ":"
6820 (assoc-ref outputs "out") "/bin"))
2d7db192 6821 (invoke "make" "test"))))))
44d10b1f
RW
6822 (build-system python-build-system)
6823 (native-inputs
6824 `(("python-coverage" ,python-coverage)
6825 ("which" ,which)))
6826 (synopsis "Simple testing framework for command line applications")
6827 (description
6828 "Cram is a functional testing framework for command line applications.
6829Cram tests look like snippets of interactive shell sessions. Cram runs each
6830command and compares the command output in the test with the command’s actual
6831output.")
6832 (license license:gpl2+)))
6833
6834(define-public python2-cram
6835 (package-with-python2 python-cram))
6836
6837(define-public python-straight-plugin
6838 (package
6839 (name "python-straight-plugin")
6840 (version "1.4.1")
6841 (source
6842 (origin
6843 (method url-fetch)
6844 (uri (pypi-uri "straight.plugin" version))
6845 (sha256
6846 (base32
6847 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6848 (build-system python-build-system)
6849 (home-page "https://github.com/ironfroggy/straight.plugin")
6850 (synopsis "Simple namespaced plugin facility")
6851 (description "Straight Plugin provides a type of plugin you can create from
6852almost any existing Python modules, and an easy way for outside developers to
6853add functionality and customization to your projects with their own plugins.")
6854 (license license:expat)))
6855
6856(define-public python2-straight-plugin
6857 (package-with-python2 python-straight-plugin))
6858
6859(define-public python-fonttools
6860 (package
6861 (name "python-fonttools")
6862 (version "3.28.0")
6863 (source (origin
6864 (method url-fetch)
6865 (uri (pypi-uri "fonttools" version ".zip"))
6866 (sha256
6867 (base32
6868 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6869 (build-system python-build-system)
6870 (native-inputs
6871 `(("unzip" ,unzip)
6872 ("python-pytest" ,python-pytest)
6873 ("python-pytest-runner" ,python-pytest-runner)))
6874 (home-page "https://github.com/behdad/fonttools")
6875 (synopsis "Tools to manipulate font files")
6876 (description
6877 "FontTools/TTX is a library to manipulate font files from Python. It
6878supports reading and writing of TrueType/OpenType fonts, reading and writing
6879of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6880also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6881from an XML-based format.")
6882 (license license:expat)))
6883
6884(define-public python2-fonttools
6885 (package-with-python2 python-fonttools))
6886
6887(define-public python-ly
6888 (package
6889 (name "python-ly")
6890 (version "0.9.5")
6891 (source
6892 (origin
6893 (method url-fetch)
6894 (uri (pypi-uri name version))
6895 (sha256
6896 (base32
6897 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6898 (build-system python-build-system)
6899 (arguments
6900 ;; FIXME: Some tests need network access.
6901 '(#:tests? #f))
6902 (synopsis "Tool and library for manipulating LilyPond files")
6903 (description "This package provides a Python library to parse, manipulate
6904or create documents in LilyPond format. A command line program ly is also
6905provided that can be used to do various manipulations with LilyPond files.")
6906 (home-page "https://pypi.python.org/pypi/python-ly")
6907 (license license:gpl2+)))
6908
6909(define-public python-appdirs
6910 (package
6911 (name "python-appdirs")
6912 (version "1.4.3")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (pypi-uri "appdirs" version))
6917 (sha256
6918 (base32
6919 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6920 (build-system python-build-system)
6921 (home-page "https://github.com/ActiveState/appdirs")
6922 (synopsis
6923 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6924 (description
6925 "This module provides a portable way of finding out where user data
6926should be stored on various operating systems.")
6927 (license license:expat)))
6928
6929(define-public python2-appdirs
6930 (package-with-python2 python-appdirs))
6931
6932(define-public python-llfuse
6933 (package
6934 (name "python-llfuse")
6935 (version "1.3.5")
6936 (source (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6939 (sha256
6940 (base32
6941 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6942 (build-system python-build-system)
6943 (inputs
6944 `(("fuse" ,fuse)
6945 ("attr" ,attr)))
6946 (native-inputs
6947 `(("pkg-config" ,pkg-config)))
6948 (synopsis "Python bindings for FUSE")
6949 (description
6950 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6951 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6952 (license license:lgpl2.0+)
6953 (properties `((python2-variant . ,(delay python2-llfuse))))))
6954
6955(define-public python2-llfuse
6956 (package (inherit (package-with-python2
6957 (strip-python2-variant python-llfuse)))
6958 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6959
6960;; For attic-0.16
6961(define-public python-llfuse-0.41
6962 (package (inherit python-llfuse)
6963 (version "0.41.1")
6964 (source (origin
6965 (method url-fetch)
6966 (uri (string-append
6967 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6968 "llfuse-" version ".tar.bz2"))
6969 (sha256
6970 (base32
6971 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6972 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6973 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6974 (license (list license:expat license:lgpl2.0+))))
6975
6976(define-public python-msgpack
6977 (package
6978 (name "python-msgpack")
6979 (version "0.5.6")
6980 (source (origin
6981 (method url-fetch)
6982 (uri (pypi-uri "msgpack" version))
6983 (sha256
6984 (base32
6985 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6986 (build-system python-build-system)
6987 (arguments
6988 `(#:modules ((guix build utils)
6989 (guix build python-build-system)
6990 (ice-9 ftw)
6991 (srfi srfi-1)
6992 (srfi srfi-26))
6993 #:phases
6994 (modify-phases %standard-phases
6995 (replace 'check
6996 (lambda _
6997 (let ((cwd (getcwd)))
6998 (setenv "PYTHONPATH"
6999 (string-append cwd "/build/"
7000 (find (cut string-prefix? "lib" <>)
7001 (scandir (string-append cwd "/build")))
7002 ":"
7003 (getenv "PYTHONPATH")))
7004 (invoke "pytest" "-v" "test")))))))
7005 (native-inputs
7006 `(("python-pytest" ,python-pytest)))
7007 (synopsis "MessagePack (de)serializer")
7008 (description "MessagePack is a fast, compact binary serialization format,
7009suitable for similar data to JSON. This package provides CPython bindings for
7010reading and writing MessagePack data.")
7011 (home-page "https://pypi.python.org/pypi/msgpack/")
7012 (license license:asl2.0)))
7013
7014;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7015;; release 0.5. Some packages like borg still call it by the old name for now.
7016;; <https://bugs.gnu.org/30662>
7017(define-public python-msgpack-transitional
7018 (package
7019 (inherit python-msgpack)
7020 (name "python-msgpack-transitional")
7021 (arguments
7022 (substitute-keyword-arguments (package-arguments python-msgpack)
7023 ((#:phases phases)
7024 `(modify-phases ,phases
7025 (add-after 'unpack 'configure-transitional
7026 (lambda _
7027 ;; Keep using the old name.
7028 (substitute* "setup.py"
7029 (("TRANSITIONAL = False")
7030 "TRANSITIONAL = 1"))
7031 #t))))))))
7032
7033(define-public python2-msgpack
7034 (package-with-python2 python-msgpack))
7035
7036(define-public python-netaddr
7037 (package
7038 (name "python-netaddr")
7039 (version "0.7.19")
7040 (source
7041 (origin
7042 (method url-fetch)
7043 (uri (pypi-uri "netaddr" version))
7044 (sha256
7045 (base32
7046 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7047 (build-system python-build-system)
7048 (arguments `(#:tests? #f)) ;; No tests.
7049 (home-page "https://github.com/drkjam/netaddr/")
7050 (synopsis "Pythonic manipulation of network addresses")
7051 (description
7052 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7053and MAC network addresses.")
7054 (license license:bsd-3)))
7055
7056(define-public python2-netaddr
7057 (package-with-python2 python-netaddr))
7058
dd85eca0
AG
7059(define-public python2-pyroute2
7060 (package
7061 (name "python2-pyroute2")
7062 (version "0.5.6")
7063 (source
7064 (origin
7065 (method url-fetch)
7066 (uri (pypi-uri "pyroute2" version))
7067 (sha256
7068 (base32
7069 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7070 (build-system python-build-system)
7071 (arguments
7072 `(#:python ,python-2)) ;Python 3.x is not supported
7073 (home-page "https://github.com/svinota/pyroute2")
7074 (synopsis "Python netlink library")
7075 (description
7076 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7077Supported netlink families and protocols include:
7078@itemize
7079@item rtnl, network settings - addresses, routes, traffic controls
7080@item nfnetlink - netfilter API: ipset, nftables, ...
7081@item ipq - simplest userspace packet filtering, iptables QUEUE target
7082@item devlink - manage and monitor devlink-enabled hardware
7083@item generic - generic netlink families
7084 @itemize
7085 @item nl80211 - wireless functions API (basic support)
7086 @item taskstats - extended process statistics
7087 @item acpi_events - ACPI events monitoring
7088 @item thermal_events - thermal events monitoring
7089 @item VFS_DQUOT - disk quota events monitoring
7090 @end itemize
7091@end itemize")
7092 (license license:gpl2+)))
7093
44d10b1f
RW
7094(define-public python-wrapt
7095 (package
7096 (name "python-wrapt")
2271a1dc 7097 (version "1.11.2")
44d10b1f 7098 (source
2271a1dc
MB
7099 (origin
7100 (method url-fetch)
7101 (uri (pypi-uri "wrapt" version))
7102 (sha256
7103 (base32
7104 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7105 (build-system python-build-system)
7106 (arguments
7107 ;; Tests are not included in the tarball, they are only available in the
7108 ;; git repository.
7109 `(#:tests? #f))
7110 (home-page "https://github.com/GrahamDumpleton/wrapt")
7111 (synopsis "Module for decorators, wrappers and monkey patching")
7112 (description
2271a1dc 7113 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7114 Python, which can be used as the basis for the construction of function
7115 wrappers and decorator functions.")
7116 (license license:bsd-2)))
7117
7118(define-public python2-wrapt
7119 (package-with-python2 python-wrapt))
7120
7121(define-public python-xlrd
7122 (package
7123 (name "python-xlrd")
7124 (version "1.0.0")
7125 (source (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "xlrd" version))
7128 (sha256
7129 (base32
7130 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7131 (build-system python-build-system)
7132 (arguments
7133 `(#:phases
7134 (modify-phases %standard-phases
7135 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7136 ;; run tests instead for now.
45fd0081 7137 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7138 (native-inputs `(("python-nose" ,python-nose)))
7139 (home-page "http://www.python-excel.org/")
7140 (synopsis "Library for extracting data from Excel files")
a0909286 7141 (description "This package provides a library to extract data from
44d10b1f
RW
7142spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7143@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7144Unicode-aware. It is not intended as an end-user tool.")
7145 (license license:bsd-3)))
7146
7147(define-public python2-xlrd
7148 (package-with-python2 python-xlrd))
7149
7150(define-public python-prettytable
7151 (package
7152 (name "python-prettytable")
7153 (version "0.7.2")
7154 (source
7155 (origin
7156 (method url-fetch)
337c3a1e 7157 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7158 (sha256
7159 (base32
7160 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7161 (build-system python-build-system)
7162 (home-page "http://code.google.com/p/prettytable/")
7163 (synopsis "Display tabular data in an ASCII table format")
7164 (description
7165 "A library designed to represent tabular data in visually appealing ASCII
7166tables. PrettyTable allows for selection of which columns are to be printed,
7167independent alignment of columns (left or right justified or centred) and
7168printing of sub-tables by specifying a row range.")
7169 (license license:bsd-3)))
7170
7171(define-public python2-prettytable
7172 (package-with-python2 python-prettytable))
7173
7174(define-public python-tables
7175 (package
7176 (name "python-tables")
7177 (version "3.4.4")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "tables" version))
7182 (sha256
7183 (base32
7184 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7185 (modules '((guix build utils)))
7186 (snippet
7187 '(begin
7188 ;; Remove pre-compiled .pyc files from source.
7189 (for-each delete-file-recursively
7190 (find-files "." "__pycache__" #:directories? #t))
7191 (for-each delete-file (find-files "." "\\.pyc$"))
7192 #t))))
7193 (build-system python-build-system)
7194 (arguments
7195 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7196 ;; or "check", so we must override the build and check phases.
7197 #:phases
7198 (modify-phases %standard-phases
7199 (add-after 'unpack 'use-gcc
7200 (lambda _
7201 (substitute* "setup.py"
7202 (("compiler = new_compiler\\(\\)" line)
7203 (string-append line
7204 "\ncompiler.set_executables(compiler='gcc',"
7205 "compiler_so='gcc',"
7206 "linker_exe='gcc',"
7207 "linker_so='gcc -shared')")))
7208 #t))
7209 (replace 'build
7210 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7211 (invoke "python" "setup.py" "build"
7212 (string-append "--hdf5="
7213 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7214 (replace 'check
7215 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7216 (invoke "python" "setup.py" "check"
7217 (string-append "--hdf5="
7218 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7219 (propagated-inputs
7220 `(("python-numexpr" ,python-numexpr)
7221 ("python-numpy" ,python-numpy)))
7222 (native-inputs
7223 `(("python-cython" ,python-cython)
7224 ("pkg-config" ,pkg-config)))
7225 (inputs
7226 `(("hdf5" ,hdf5)
7227 ("bzip2" ,bzip2)
7228 ("zlib" ,zlib)))
7229 (home-page "http://www.pytables.org/")
7230 (synopsis "Hierarchical datasets for Python")
7231 (description "PyTables is a package for managing hierarchical datasets and
7232designed to efficiently cope with extremely large amounts of data.")
7233 (license license:bsd-3)))
7234
7235(define-public python2-tables
7236 (package-with-python2 python-tables))
7237
7238(define-public python-pyasn1
7239 (package
7240 (name "python-pyasn1")
7241 (version "0.4.3")
7242 (source
7243 (origin
7244 (method url-fetch)
7245 (uri (pypi-uri "pyasn1" version))
7246 (sha256
7247 (base32
7248 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7249 (build-system python-build-system)
7250 (home-page "http://pyasn1.sourceforge.net/")
7251 (synopsis "ASN.1 types and codecs")
7252 (description
7253 "This is an implementation of ASN.1 types and codecs in Python. It is
7254suitable for a wide range of protocols based on the ASN.1 specification.")
7255 (license license:bsd-2)))
7256
7257(define-public python2-pyasn1
7258 (package-with-python2 python-pyasn1))
7259
7260(define-public python-pyasn1-modules
7261 (package
7262 (name "python-pyasn1-modules")
7263 (version "0.2.2")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "pyasn1-modules" version))
7268 (sha256
7269 (base32
7270 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7271 (build-system python-build-system)
7272 (propagated-inputs
7273 `(("python-pyasn1" ,python-pyasn1)))
7274 (home-page "https://sourceforge.net/projects/pyasn1/")
7275 (synopsis "ASN.1 codec implementations")
7276 (description
7277 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7278implementations of ASN.1-based codecs and protocols.")
7279 (license license:bsd-3)))
7280
7281(define-public python2-pyasn1-modules
7282 (package-with-python2 python-pyasn1-modules))
7283
7284(define-public python-ipaddress
7285 (package
7286 (name "python-ipaddress")
7287 (version "1.0.22")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "ipaddress" version))
7291 (sha256
7292 (base32
7293 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7294 (build-system python-build-system)
7295 (home-page "https://github.com/phihag/ipaddress")
7296 (synopsis "IP address manipulation library")
7297 (description
7298 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7299 in Python. This library is used to create, poke at, and manipulate IPv4 and
7300 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7301 module to older versions of Python.")
7302 (license license:psfl)))
7303
7304(define-public python2-ipaddress
7305 (package-with-python2 python-ipaddress))
7306
7307(define-public python2-ipaddr
7308 (package
7309 (name "python2-ipaddr")
7310 (version "2.1.11")
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (pypi-uri "ipaddr" version))
7315 (sha256
7316 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7317 (build-system python-build-system)
7318 (arguments
7319 `(#:python ,python-2 ;version 2 only
7320 #:phases
7321 (modify-phases %standard-phases
7322 (replace 'check
40b8c4e3 7323 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7324 (home-page "https://github.com/google/ipaddr-py")
7325 (synopsis "IP address manipulation library")
7326 (description
7327 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7328IPv6 addresses and networks.
7329
7330For new implementations you may prefer to use the standard module
7331@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7332versions of Python.")
7333 (license license:asl2.0)))
7334
7335(define-public python-idna
7336 (package
7337 (name "python-idna")
e95c9837 7338 (version "2.8")
44d10b1f
RW
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (pypi-uri "idna" version))
7343 (sha256
7344 (base32
e95c9837 7345 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7346 (build-system python-build-system)
7347 (home-page "https://github.com/kjd/idna")
7348 (synopsis "Internationalized domain names in applications")
7349 (description
7350 "This is a library to support the Internationalised Domain Names in
7351Applications (IDNA) protocol as specified in RFC 5891. This version of the
7352protocol is often referred to as “IDNA2008” and can produce different results
7353from the earlier standard from 2003. The library is also intended to act as a
7354suitable drop-in replacement for the “encodings.idna” module that comes with
7355the Python standard library but currently only supports the older 2003
7356specification.")
7357 (license license:bsd-4)))
7358
a76e6a69
JM
7359(define-public python-idna-2.7
7360 (package (inherit python-idna)
7361 (version "2.7")
7362 (source (origin
7363 (method url-fetch)
7364 (uri (pypi-uri "idna" version))
7365 (sha256
7366 (base32
7367 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7368
7369
44d10b1f
RW
7370(define-public python2-idna
7371 (package-with-python2 python-idna))
7372
7373(define-public python-idna-ssl
7374 (package
7375 (name "python-idna-ssl")
7376 (version "1.0.1")
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "idna-ssl" version))
7381 (sha256
7382 (base32
7383 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7384 (build-system python-build-system)
7385 (arguments
7386 `(#:tests? #f)) ;circular dependency with python-aiohttp
7387 (home-page "https://github.com/aio-libs/idna-ssl")
7388 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7389 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7390domains support.")
7391 (license license:expat)))
7392
7393(define-public python-pretend
7394 (package
7395 (name "python-pretend")
7396 (version "1.0.9")
7397 (source
7398 (origin
7399 (method url-fetch)
9f1f22ee 7400 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7401 (sha256
7402 (base32
7403 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7404 (build-system python-build-system)
7405 (home-page "https://github.com/alex/pretend")
7406 (synopsis "Library for stubbing in Python")
7407 (description
7408 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7409technique for writing tests. You may hear the term mixed up with mocks,
7410fakes, or doubles. Basically, a stub is an object that returns pre-canned
7411responses, rather than doing any computation.")
7412 (license license:bsd-3)))
7413
7414(define-public python2-pretend
7415 (package-with-python2 python-pretend))
7416
7417(define-public python-pip
7418 (package
7419 (name "python-pip")
523ba4b1 7420 (version "19.2.1")
44d10b1f
RW
7421 (source
7422 (origin
7423 (method url-fetch)
7424 (uri (pypi-uri "pip" version))
7425 (sha256
7426 (base32
523ba4b1 7427 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7428 (build-system python-build-system)
7429 (arguments
7430 '(#:tests? #f)) ; there are no tests in the pypi archive.
7431 (home-page "https://pip.pypa.io/")
7432 (synopsis "Package manager for Python software")
7433 (description
7434 "Pip is a package manager for Python software, that finds packages on the
7435Python Package Index (PyPI).")
7436 (license license:expat)))
7437
7438(define-public python2-pip
7439 (package-with-python2 python-pip))
7440
7441(define-public python-tlsh
7442 (package
7443 (name "python-tlsh")
7444 (version "3.4.5")
7445 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7446 (source
7447 (origin
7448 (method git-fetch)
7449 (uri (git-reference
7450 (url "https://github.com/trendmicro/tlsh.git")
7451 (commit (string-append "v" version))))
7452 (file-name (git-file-name name version))
7453 (sha256
7454 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7455 (build-system cmake-build-system)
7456 (arguments
7457 '(#:out-of-source? #f
7458 #:phases (modify-phases %standard-phases
7459 (replace
7460 'install
7461 (lambda* (#:key outputs #:allow-other-keys)
7462 ;; Build and install the Python bindings. The underlying
7463 ;; C++ library is apparently not meant to be installed.
7464 (let ((out (assoc-ref outputs "out")))
7465 (with-directory-excursion "py_ext"
7466 (and (system* "python" "setup.py" "build")
7467 (system* "python" "setup.py" "install"
7468 (string-append "--prefix=" out))))))))))
7469 (inputs `(("python" ,python-wrapper))) ;for the bindings
7470 (synopsis "Fuzzy matching library for Python")
7471 (description
7472 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7473Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7474value which can be used for similarity comparisons. Similar objects have
7475similar hash values, which allows for the detection of similar objects by
7476comparing their hash values. The byte stream should have a sufficient amount
7477of complexity; for example, a byte stream of identical bytes will not generate
7478a hash value.")
7479 (license license:asl2.0)))
7480
7481(define-public python2-tlsh
7482 (package
7483 (inherit python-tlsh)
7484 (name "python2-tlsh")
7485 (inputs `(("python" ,python-2)))))
7486
7487(define-public python-termcolor
7488 (package
7489 (name "python-termcolor")
7490 (version "1.1.0")
7491 (source
7492 (origin
7493 (method url-fetch)
7494 (uri (pypi-uri "termcolor" version))
7495 (sha256
7496 (base32
7497 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7498 (build-system python-build-system)
7499 (arguments
7500 ;; There are no tests.
7501 `(#:tests? #f))
7502 (home-page "https://pypi.python.org/pypi/termcolor")
7503 (synopsis "ANSII Color formatting for terminal output")
7504 (description
7505 "This package provides ANSII Color formatting for output in terminals.")
7506 (license license:expat)))
7507
7508(define-public python2-termcolor
7509 (package-with-python2 python-termcolor))
7510
7511(define-public python-libarchive-c
7512 (package
7513 (name "python-libarchive-c")
7514 (version "2.8")
7515 (source (origin
7516 (method url-fetch)
7517 (uri (pypi-uri "libarchive-c" version))
7518 (sha256
7519 (base32
7520 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7521 (build-system python-build-system)
7522 (arguments
7523 '(#:phases (modify-phases %standard-phases
7524 (add-before
7525 'build 'reference-libarchive
7526 (lambda* (#:key inputs #:allow-other-keys)
7527 ;; Retain the absolute file name of libarchive.so.
7528 (let ((libarchive (assoc-ref inputs "libarchive")))
7529 (substitute* "libarchive/ffi.py"
7530 (("find_library\\('archive'\\)")
7531 (string-append "'" libarchive
7532 "/lib/libarchive.so'"))))))
7533 (replace 'check
7534 (lambda _ (invoke "pytest" "-vv"))))))
7535 (native-inputs
7536 `(("python-mock" ,python-mock)
7537 ("python-pytest" ,python-pytest)))
7538 (inputs
7539 `(("libarchive" ,libarchive)))
7540 (home-page "https://github.com/Changaco/python-libarchive-c")
7541 (synopsis "Python interface to libarchive")
7542 (description
7543 "This package provides Python bindings to libarchive, a C library to
7544access possibly compressed archives in many different formats. It uses
7545Python's @code{ctypes} foreign function interface (FFI).")
7546 (license license:lgpl2.0+)))
7547
7548(define-public python2-libarchive-c
7549 (package-with-python2 python-libarchive-c))
7550
7551(define-public python-file
7552 (package
7553 (inherit file)
7554 (name "python-file")
7555 (build-system python-build-system)
7556 (arguments
7557 '(#:tests? #f ;no tests
7558 #:configure-flags '("--single-version-externally-managed" "--root=/")
7559 #:phases (modify-phases %standard-phases
7560 (add-before 'build 'change-directory
7561 (lambda _
7562 (chdir "python")
7563 #t))
7564 (add-before 'build 'set-library-file-name
7565 (lambda* (#:key inputs #:allow-other-keys)
7566 (let ((file (assoc-ref inputs "file")))
7567 (substitute* "magic.py"
7568 (("find_library\\('magic'\\)")
7569 (string-append "'" file "/lib/libmagic.so'")))
7570 #t))))))
7571 (inputs `(("file" ,file)))
528ea990
LC
7572 (native-inputs (if (%current-target-system)
7573 `(("self" ,this-package))
7574 '()))
44d10b1f
RW
7575 (synopsis "Python bindings to the libmagic file type guesser. Note that
7576this module and the python-magic module both provide a \"magic.py\" file;
7577these two modules, which are different and were developed separately, both
7578serve the same purpose: provide Python bindings for libmagic.")))
7579
7580(define-public python2-file
7581 (package-with-python2 python-file))
7582
7583(define-public python-debian
7584 (package
7585 (name "python-debian")
7586 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7587 (version "0.1.36")
44d10b1f
RW
7588 (source
7589 (origin
9f74bd31
VC
7590 ;; Use git-fetch, as pypi doesn't include test suite.
7591 (method git-fetch)
7592 (uri (git-reference
7593 (url home-page)
7594 (commit version)))
7595 (file-name (git-file-name name version))
44d10b1f
RW
7596 (sha256
7597 (base32
9f74bd31 7598 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7599 (build-system python-build-system)
9f74bd31
VC
7600 (arguments
7601 `(#:phases (modify-phases %standard-phases
7602 (add-after 'unpack 'remove-debian-specific-tests
7603 ;; python-apt, apt and dpkg are not yet available in guix,
7604 ;; and these tests heavily depend on them.
7605 (lambda _
7606 (delete-file "lib/debian/tests/test_deb822.py")
7607 (delete-file "lib/debian/tests/test_debfile.py")
7608 #t)))))
44d10b1f 7609 (propagated-inputs
9f74bd31
VC
7610 `(("python-six" ,python-six)
7611 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7612 (synopsis "Debian package related modules")
7613 (description
7614 ;; XXX: Use @enumerate instead of @itemize to work around
7615 ;; <http://bugs.gnu.org/21772>.
7616 "This package provides Python modules that abstract many formats of
7617Debian-related files, such as:
7618
7619@enumerate
7620@item Debtags information;
7621@item @file{debian/changelog} files;
7622@item packages files, pdiffs;
7623@item control files of single or multiple RFC822-style paragraphs---e.g.
7624 @file{debian/control}, @file{.changes}, @file{.dsc};
7625@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7626 contained files and meta-information.
7627@end enumerate\n")
7628
7629 ;; Modules are either GPLv2+ or GPLv3+.
7630 (license license:gpl3+)))
7631
7632(define-public python2-debian
7633 (package-with-python2 python-debian))
7634
7635(define-public python-nbformat
7636 (package
7637 (name "python-nbformat")
7638 (version "4.4.0")
7639 (source
7640 (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "nbformat" version))
7643 (sha256
7644 (base32
7645 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7646 (build-system python-build-system)
7647 (arguments `(#:tests? #f)) ; no test target
7648 (propagated-inputs
7649 `(("python-ipython-genutils" ,python-ipython-genutils)
7650 ("python-jsonschema" ,python-jsonschema)
7651 ("python-jupyter-core" ,python-jupyter-core)
7652 ("python-traitlets" ,python-traitlets)))
7653 (home-page "http://jupyter.org")
7654 (synopsis "Jupyter Notebook format")
7655 (description "This package provides the reference implementation of the
7656Jupyter Notebook format and Python APIs for working with notebooks.")
7657 (license license:bsd-3)))
7658
7659(define-public python2-nbformat
7660 (package-with-python2 python-nbformat))
7661
7662(define-public python-bleach
7663 (package
7664 (name "python-bleach")
7665 (version "1.4.3")
7666 (source
7667 (origin
7668 (method url-fetch)
7669 (uri (pypi-uri "bleach" version))
7670 (sha256
7671 (base32
7672 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7673 (build-system python-build-system)
7674 (propagated-inputs
7675 `(("python-html5lib" ,python-html5lib-0.9)
7676 ("python-six" ,python-six)))
7677 (native-inputs
7678 `(("python-nose" ,python-nose)))
7679 (home-page "https://github.com/jsocol/bleach")
7680 (synopsis "Whitelist-based HTML-sanitizing tool")
7681 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7682 (license license:asl2.0)))
7683
7684(define-public python2-bleach
7685 (package-with-python2 python-bleach))
7686
7687(define-public python-entrypoints
7688 (package
7689 (name "python-entrypoints")
a7f1b718 7690 (version "0.3")
44d10b1f
RW
7691 (source
7692 (origin
7693 (method url-fetch)
a7f1b718 7694 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7695 (sha256
7696 (base32
a7f1b718 7697 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7698 (build-system python-build-system)
7699 ;; The package does not come with a setup.py file, so we have to generate
7700 ;; one ourselves.
7701 (arguments
7702 `(#:tests? #f
7703 #:phases
7704 (modify-phases %standard-phases
7705 (add-after 'unpack 'create-setup.py
7706 (lambda _
7707 (call-with-output-file "setup.py"
7708 (lambda (port)
7709 (format port "\
7710from setuptools import setup
7711setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7712" ,version))))))))
7713 (home-page "https://github.com/takluyver/entrypoints")
7714 (synopsis "Discover and load entry points from installed Python packages")
7715 (description "Entry points are a way for Python packages to advertise
7716objects with some common interface. The most common examples are
7717@code{console_scripts} entry points, which define shell commands by
7718identifying a Python function to run. The @code{entrypoints} module contains
7719functions to find and load entry points.")
7720 (license license:expat)))
7721
7722(define-public python2-entrypoints
7723 (package-with-python2 python-entrypoints))
7724
7725(define-public python-nbconvert
7726 (package
7727 (name "python-nbconvert")
7728 (version "5.0.0b1")
7729 (source
7730 (origin
7731 (method url-fetch)
7732 (uri (pypi-uri "nbconvert" version))
7733 (sha256
7734 (base32
7735 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7736 (build-system python-build-system)
7737 (arguments
7738 `(;; The "bdist_egg" target is disabled by default, causing the installation
7739 ;; to fail.
7740 #:configure-flags (list "bdist_egg")
7741 ;; FIXME: 5 failures, 40 errors.
7742 #:tests? #f))
7743 ;; #:phases
7744 ;; (modify-phases %standard-phases
7745 ;; (replace 'check
7746 ;; (lambda _
7747 ;; (zero? (system* "py.test" "-v")))))
7748 (native-inputs
7749 `(("python-pytest" ,python-pytest)))
7750 (propagated-inputs
7751 `(("python-bleach" ,python-bleach)
7752 ("python-entrypoints" ,python-entrypoints)
7753 ("python-jinja2" ,python-jinja2)
7754 ("python-jupyter-core" ,python-jupyter-core)
7755 ("python-mistune" ,python-mistune)
7756 ("python-nbformat" ,python-nbformat)
7757 ("python-pygments" ,python-pygments)
7758 ("python-traitlets" ,python-traitlets)))
7759 (home-page "http://jupyter.org")
7760 (synopsis "Converting Jupyter Notebooks")
7761 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7762notebooks to various other formats via Jinja templates. It allows you to
7763convert an @code{.ipynb} notebook file into various static formats including:
7764
7765@enumerate
7766@item HTML
7767@item LaTeX
7768@item PDF
7769@item Reveal JS
7770@item Markdown (md)
7771@item ReStructured Text (rst)
7772@item executable script
7773@end enumerate\n")
7774 (license license:bsd-3)))
7775
7776(define-public python2-nbconvert
7777 (package-with-python2 python-nbconvert))
7778
44d10b1f
RW
7779(define-public python-notebook
7780 (package
7781 (name "python-notebook")
7782 (version "5.7.4")
7783 (source (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "notebook" version))
7786 (sha256
7787 (base32
7788 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7789 (build-system python-build-system)
7790 (arguments
7791 `(#:phases
7792 (modify-phases %standard-phases
7793 (replace 'check
7794 (lambda _
7795 ;; These tests require a browser
7796 (delete-file-recursively "notebook/tests/selenium")
7797 ;; Some tests need HOME
7798 (setenv "HOME" "/tmp")
7799 ;; This file contains "warningfilters", which are not supported
7800 ;; by this version of nose.
7801 (delete-file "setup.cfg")
7802 (with-directory-excursion "/tmp"
7803 (invoke "nosetests" "-v"))
7804 #t)))))
7805 (propagated-inputs
7806 `(("python-jupyter-core" ,python-jupyter-core)
7807 ("python-nbformat" ,python-nbformat)
7808 ("python-nbconvert" ,python-nbconvert)
7809 ("python-prometheus-client" ,python-prometheus-client)
7810 ("python-send2trash" ,python-send2trash)
7811 ("python-terminado" ,python-terminado)))
7812 (native-inputs
7813 `(("python-nose" ,python-nose)
7814 ("python-sphinx" ,python-sphinx)
7815 ("python-requests" ,python-requests)))
7816 (home-page "http://jupyter.org/")
7817 (synopsis "Web-based notebook environment for interactive computing")
7818 (description
7819 "The Jupyter HTML notebook is a web-based notebook environment for
7820interactive computing.")
7821 (properties `((python2-variant . ,(delay python2-notebook))))
7822 (license license:bsd-3)))
7823
7824(define-public python2-notebook
7825 (let ((base (package-with-python2
7826 (strip-python2-variant python-notebook))))
7827 (package (inherit base)
7828 (native-inputs
7829 `(("python2-mock" ,python2-mock)
7830 ,@(package-native-inputs base)))
7831 (arguments
7832 (substitute-keyword-arguments (package-arguments base)
7833 ((#:phases phases)
7834 `(modify-phases ,phases
7835 (add-before 'check 'disable-test-case
7836 ;; The test requires network access to localhost. Curiously it
7837 ;; fails with Python 2 only. Simply make the test-case return
7838 ;; immediately.
7839 (lambda _
7840 (substitute*
7841 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7842 (("formats = self.nbconvert_api") "return #")))))))))))
7843
7844(define-public python-widgetsnbextension
7845 (package
7846 (name "python-widgetsnbextension")
7847 (version "3.4.2")
7848 (source
7849 (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "widgetsnbextension" version))
7852 (sha256
7853 (base32
7854 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7855 (build-system python-build-system)
7856 (propagated-inputs
7857 `(("python-ipykernel" ,python-ipykernel)
7858 ("python-notebook" ,python-notebook)))
7859 (native-inputs
7860 `(("python-certifi" ,python-certifi)
7861 ("python-nose" ,python-nose)))
7862 (home-page "https://ipython.org")
7863 (synopsis "IPython HTML widgets for Jupyter")
7864 (description "This package provides interactive HTML widgets for Jupyter
7865notebooks.")
7866 (license license:bsd-3)))
7867
7868(define-public python2-widgetsnbextension
7869 (package-with-python2 python-widgetsnbextension))
7870
7871(define-public python-ipywidgets
7872 (package
7873 (name "python-ipywidgets")
7874 (version "5.2.2")
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "ipywidgets" version))
7879 (sha256
7880 (base32
7881 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7882 (build-system python-build-system)
7883 (propagated-inputs
7884 `(("python-ipython" ,python-ipython)
7885 ("python-traitlets" ,python-traitlets)
7886 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7887 (native-inputs
7888 `(("python-nose" ,python-nose)
7889 ("python-pytest" ,python-pytest)))
7890 (home-page "https://ipython.org")
7891 (synopsis "IPython HTML widgets for Jupyter")
7892 (description "Ipywidgets are interactive HTML widgets for Jupyter
7893notebooks and the IPython kernel. Notebooks come alive when interactive
7894widgets are used. Users gain control of their data and can visualize changes
7895in the data.")
7896 (license license:bsd-3)))
7897
7898(define-public python2-ipywidgets
7899 (package-with-python2 python-ipywidgets))
7900
7901(define-public python-jupyter-console
7902 (package
7903 (name "python-jupyter-console")
becb9cbf 7904 (version "6.0.0")
44d10b1f
RW
7905 (source
7906 (origin
7907 (method url-fetch)
7908 (uri (pypi-uri "jupyter_console" version))
7909 (sha256
7910 (base32
becb9cbf 7911 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7912 (build-system python-build-system)
44d10b1f
RW
7913 (propagated-inputs
7914 `(("python-ipykernel" ,python-ipykernel)
7915 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7916 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7917 ("python-pygments" ,python-pygments)))
7918 (native-inputs
7919 `(("python-nose" ,python-nose)))
7920 (home-page "https://jupyter.org")
7921 (synopsis "Jupyter terminal console")
7922 (description "This package provides a terminal-based console frontend for
7923Jupyter kernels. It also allows for console-based interaction with non-Python
7924Jupyter kernels such as IJulia and IRKernel.")
7925 (license license:bsd-3)))
7926
7927(define-public python2-jupyter-console
8e590c81
RW
7928 (package
7929 (name "python2-jupyter-console")
7930 (version "5.2.0")
7931 (source
7932 (origin
7933 (method url-fetch)
7934 (uri (pypi-uri "jupyter_console" version))
7935 (sha256
7936 (base32
7937 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7938 (build-system python-build-system)
7939 ;; Tests only run in an TTY.
7940 (arguments `(#:tests? #f))
7941 (propagated-inputs
7942 `(("python2-ipykernel" ,python2-ipykernel)
7943 ("python2-jupyter-client" ,python2-jupyter-client)
7944 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7945 ("python2-pygments" ,python2-pygments)))
7946 (native-inputs
7947 `(("python2-nose" ,python2-nose)))
7948 (home-page "https://jupyter.org")
7949 (synopsis "Jupyter terminal console")
7950 (description "This package provides a terminal-based console frontend for
7951Jupyter kernels. It also allows for console-based interaction with non-Python
7952Jupyter kernels such as IJulia and IRKernel.")
7953 (license license:bsd-3)))
44d10b1f
RW
7954
7955;; The python-ipython and python-jupyter-console require each other. To get
7956;; the functionality in both packages working, strip down the
7957;; python-jupyter-console package when using it as an input to python-ipython.
7958(define python-jupyter-console-minimal
7959 (package
7960 (inherit python-jupyter-console)
7961 (name "python-jupyter-console-minimal")
7962 (arguments
7963 (substitute-keyword-arguments
7964 (package-arguments python-jupyter-console)
7965 ((#:phases phases)
7966 `(modify-phases ,phases
7967 (add-after 'install 'delete-bin
7968 (lambda* (#:key outputs #:allow-other-keys)
7969 ;; Delete the bin files, to avoid conflicts in profiles
7970 ;; where python-ipython and python-jupyter-console are
7971 ;; both present.
7972 (delete-file-recursively
7973 (string-append
7974 (assoc-ref outputs "out") "/bin"))))))))
7975 ;; Remove the python-ipython propagated input, to avoid the cycle
7976 (propagated-inputs
7977 (alist-delete
7978 "python-ipython"
7979 (package-propagated-inputs python-jupyter-console)))))
7980
7981(define-public python-qtconsole
7982 (package
7983 (name "python-qtconsole")
7984 (version "4.4.3")
7985 (source
7986 (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "qtconsole" version))
7989 (sha256
7990 (base32
7991 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7992 (build-system python-build-system)
7993 (arguments
7994 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7995 ;; but we only have the LTS version 5.x. This means that there might be
7996 ;; runtime errors, but since this is a dependency of the Jupyter package,
7997 ;; and Jupyter can be used without the qtconsole we can overlook this for
7998 ;; now.
7999 `(#:tests? #f
8000 #:phases
8001 (modify-phases %standard-phases
8002 (add-before 'check 'pre-check
8003 (lambda _
8004 (setenv "QT_QPA_PLATFORM" "offscreen")
8005 #t)))))
8006 (propagated-inputs
8007 `(("python-ipykernel" ,python-ipykernel)
8008 ("python-ipython" ,python-ipython)))
8009 (native-inputs
8010 `(("python-pytest" ,python-pytest)))
8011 (home-page "http://jupyter.org")
8012 (synopsis "Jupyter Qt console")
8013 (description "This package provides a Qt-based console for Jupyter with
8014support for rich media output.")
8015 (license license:bsd-3)))
8016
8017(define-public jupyter
8018 (package
8019 (name "jupyter")
8020 (version "1.0.0")
8021 (source
8022 (origin
8023 (method url-fetch)
8024 (uri (pypi-uri "jupyter" version))
8025 (sha256
8026 (base32
8027 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8028 (build-system python-build-system)
8029 (arguments '(#:tests? #f)) ; there are none.
8030 (propagated-inputs
8031 `(("python-ipykernel" ,python-ipykernel)
8032 ("python-ipywidgets" ,python-ipywidgets)
8033 ("python-jupyter-console" ,python-jupyter-console)
8034 ("python-nbconvert" ,python-nbconvert)
8035 ("python-notebook" ,python-notebook)
8036 ("python-qtconsole" ,python-qtconsole)))
8037 (native-search-paths
8038 (list (search-path-specification
8039 (variable "JUPYTER_PATH")
8040 (files '("share/jupyter")))))
8041 (home-page "https://jupyter.org")
8042 (synopsis "Web application for interactive documents")
8043 (description
8044 "The Jupyter Notebook is a web application that allows you to create and
8045share documents that contain live code, equations, visualizations and
8046explanatory text. Uses include: data cleaning and transformation, numerical
8047simulation, statistical modeling, machine learning and much more.")
8048 (license license:bsd-3)))
8049
8050(define-public python-chardet
8051 (package
8052 (name "python-chardet")
8053 (version "3.0.4")
8054 (source
8055 (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "chardet" version))
8058 (sha256
8059 (base32
8060 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8061 (native-inputs
8062 `(("python-hypothesis" ,python-hypothesis)
8063 ("python-pytest" ,python-pytest)
8064 ("python-pytest-runner" ,python-pytest-runner)))
8065 (build-system python-build-system)
8066 (home-page "https://github.com/chardet/chardet")
8067 (synopsis "Universal encoding detector for Python 2 and 3")
8068 (description
8069 "This package provides @code{chardet}, a Python module that can
8070automatically detect a wide range of file encodings.")
8071 (license license:lgpl2.1+)))
8072
8073(define-public python2-chardet
8074 (package-with-python2 python-chardet))
8075
8076(define-public python-docopt
8077 (package
8078 (name "python-docopt")
8079 (version "0.6.2")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 ;; The release on PyPI does not include tests.
8084 (uri (string-append
8085 "https://github.com/docopt/docopt/archive/"
8086 version ".tar.gz"))
8087 (file-name (string-append name "-" version ".tar.gz"))
8088 (sha256
8089 (base32
8090 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8091 (build-system python-build-system)
8092 (native-inputs
8093 `(("python-pytest" ,python-pytest)))
8094 (arguments
8095 `(#:phases
8096 (modify-phases %standard-phases
8097 (replace 'check
8098 (lambda _ (invoke "py.test"))))))
8099 (home-page "http://docopt.org")
8100 (synopsis "Command-line interface description language for Python")
8101 (description "This library allows the user to define a command-line
8102interface from a program's help message rather than specifying it
4ca7207b 8103programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8104@code{argparse}.")
8105 (license license:expat)))
8106
8107(define-public python2-docopt
8108 (package-with-python2 python-docopt))
8109
8110(define-public python-pythondialog
8111 (package
8112 (name "python-pythondialog")
8113 (version "3.4.0")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "pythondialog" version))
8118 (sha256
8119 (base32
8120 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8121 (build-system python-build-system)
8122 (arguments
8123 `(#:phases
8124 (modify-phases %standard-phases
8125 (add-after 'unpack 'patch-path
8126 (lambda* (#:key inputs #:allow-other-keys)
8127 (let* ((dialog (assoc-ref inputs "dialog")))
8128 ;; Since this library really wants to grovel the search path, we
8129 ;; must hardcode dialog's store path into it.
8130 (substitute* "dialog.py"
8131 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8132 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8133 #t))))
8134 #:tests? #f)) ; no test suite
8135 (propagated-inputs
8136 `(("dialog" ,dialog)))
8137 (home-page "http://pythondialog.sourceforge.net/")
8138 (synopsis "Python interface to the UNIX dialog utility")
8139 (description "A Python wrapper for the dialog utility. Its purpose is to
8140provide an easy to use, pythonic and comprehensive Python interface to dialog.
8141This allows one to make simple text-mode user interfaces on Unix-like systems")
8142 (license license:lgpl2.1)
8143 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8144
8145(define-public python2-pythondialog
8146 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8147 (package
8148 (inherit base)
8149 (version (package-version python-pythondialog))
8150 (source (origin
8151 (method url-fetch)
8152 (uri (pypi-uri "python2-pythondialog" version))
8153 (sha256
8154 (base32
8155 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8156
8157(define-public python-configobj
8158 (package
8159 (name "python-configobj")
8160 (version "5.0.6")
8161 (source (origin
8162 (method url-fetch)
b0758fbb 8163 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8164 (sha256
8165 (base32
8166 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8167 ;; Patch setup.py so it looks for python-setuptools, which is
8168 ;; required to parse the keyword 'install_requires' in setup.py.
8169 (patches (search-patches "python-configobj-setuptools.patch"))))
8170 (build-system python-build-system)
8171 (propagated-inputs
8172 `(("python-six" ,python-six)))
8173 (synopsis "Config file reading, writing and validation")
8174 (description "ConfigObj is a simple but powerful config file reader and
8175writer: an ini file round tripper. Its main feature is that it is very easy to
8176use, with a straightforward programmer’s interface and a simple syntax for
8177config files.")
8178 (home-page "https://github.com/DiffSK/configobj")
8179 (license license:bsd-3)))
8180
8181(define-public python2-configobj
8182 (package-with-python2 python-configobj))
8183
8184(define-public python-configargparse
8185 (package
8186 (name "python-configargparse")
86ae491f 8187 (version "0.14.0")
44d10b1f
RW
8188 (source (origin
8189 (method url-fetch)
8190 (uri (pypi-uri "ConfigArgParse" version))
8191 (sha256
8192 (base32
86ae491f 8193 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8194 (build-system python-build-system)
8195 (native-inputs
8196 `(("python-pyyaml" ,python-pyyaml)))
8197 (arguments
8198 `(#:phases
8199 (modify-phases %standard-phases
8200 (replace 'check
8201 (lambda _
8202 ;; Bypass setuptools-shim because one test relies on "setup.py"
8203 ;; being the first argument passed to the python call.
8204 ;;
8205 ;; NOTE: Many tests do not run because they rely on Python's
8206 ;; built-in test.test_argparse, but we remove the unit tests from
8207 ;; our Python installation.
8208 (invoke "python" "setup.py" "test"))))))
8209 (synopsis "Replacement for argparse")
8210 (description "A drop-in replacement for argparse that allows options to also
8211be set via config files and/or environment variables.")
8212 (home-page "https://github.com/bw2/ConfigArgParse")
8213 (license license:expat)))
8214
8215(define-public python2-configargparse
8216 (package-with-python2 python-configargparse))
8217
8218(define-public python-argparse-manpage
8219 (package
8220 (name "python-argparse-manpage")
8221 (version "1.1")
8222 (source
8223 (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "argparse-manpage" version))
8226 (sha256
8227 (base32
8228 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8229 (build-system python-build-system)
8230 (home-page "https://github.com/praiskup/argparse-manpage")
8231 (synopsis "Build manual page from Python's ArgumentParser object")
8232 (description
8233 "This package provides tools to build manual pages from Python's
8234@code{ArgumentParser} object.")
8235 (license license:asl2.0)))
8236
3e8f76d8
RW
8237(define-public python-contextlib2
8238 (package
8239 (name "python-contextlib2")
8240 (version "0.5.5")
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "contextlib2" version))
8245 (sha256
8246 (base32
8247 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8248 (build-system python-build-system)
8249 (home-page "http://contextlib2.readthedocs.org/")
8250 (synopsis "Tools for decorators and context managers")
8251 (description "This module is primarily a backport of the Python
82523.2 contextlib to earlier Python versions. Like contextlib, it
8253provides utilities for common tasks involving decorators and context
8254managers. It also contains additional features that are not part of
8255the standard library.")
8256 (license license:psfl)))
8257
44d10b1f
RW
8258(define-public python2-contextlib2
8259 (package
8260 (name "python2-contextlib2")
8261 (version "0.5.5")
8262 (source
8263 (origin
8264 (method url-fetch)
8265 (uri (pypi-uri "contextlib2" version))
8266 (sha256
8267 (base32
8268 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8269 (build-system python-build-system)
8270 (arguments
8271 `(#:python ,python-2
8272 #:phases
8273 (modify-phases %standard-phases
8274 (replace 'check
8275 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8276 (native-inputs
8277 `(("python2-unittest2" ,python2-unittest2)))
8278 (home-page "http://contextlib2.readthedocs.org/")
8279 (synopsis "Tools for decorators and context managers")
8280 (description "This module is primarily a backport of the Python
82813.2 contextlib to earlier Python versions. Like contextlib, it
8282provides utilities for common tasks involving decorators and context
8283managers. It also contains additional features that are not part of
8284the standard library.")
8285 (license license:psfl)))
8286
8287(define-public python-texttable
8288 (package
8289 (name "python-texttable")
52cc4892 8290 (version "0.9.1")
44d10b1f
RW
8291 (source
8292 (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "texttable" version))
8295 (sha256
8296 (base32
52cc4892 8297 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8298 (build-system python-build-system)
8299 (arguments '(#:tests? #f)) ; no tests
8300 (home-page "https://github.com/foutaise/texttable/")
8301 (synopsis "Python module for creating simple ASCII tables")
8302 (description "Texttable is a Python module for creating simple ASCII
8303tables.")
8304 (license license:lgpl2.1+)))
8305
8306(define-public python2-texttable
8307 (package-with-python2 python-texttable))
8308
8309(define-public python-atomicwrites
8310 (package
8311 (name "python-atomicwrites")
8312 (version "1.1.5")
8313 (source (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "atomicwrites" version))
8316 (sha256
8317 (base32
8318 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8319 (build-system python-build-system)
8320 (synopsis "Atomic file writes in Python")
8321 (description "Library for atomic file writes using platform dependent tools
8322for atomic file system operations.")
8323 (home-page "https://github.com/untitaker/python-atomicwrites")
8324 (license license:expat)))
8325
8326(define-public python2-atomicwrites
8327 (package-with-python2 python-atomicwrites))
8328
8329(define-public python-click-threading
8330 (package
8331 (name "python-click-threading")
8332 (version "0.4.4")
8333 (source (origin
8334 (method url-fetch)
8335 (uri (pypi-uri "click-threading" version))
8336 (sha256
8337 (base32
8338 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8339 (build-system python-build-system)
8340 (propagated-inputs
8341 `(("python-click" ,python-click)))
8342 (synopsis "Utilities for multithreading in Click")
8343 (description "This package provides utilities for multithreading in Click
8344applications.")
8345 (home-page "https://github.com/click-contrib/click-threading")
8346 (license license:expat)))
8347
8348(define-public python-click-log
8349 (package
8350 (name "python-click-log")
8351 (version "0.3.2")
8352 (source (origin
8353 (method url-fetch)
8354 (uri (pypi-uri "click-log" version))
8355 (sha256
8356 (base32
8357 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8358 (build-system python-build-system)
8359 (propagated-inputs
8360 `(("python-click" ,python-click)))
8361 (synopsis "Logging for click applications")
8362 (description "This package provides a Python library for logging Click
8363applications.")
8364 (home-page "https://github.com/click-contrib/click-log")
8365 (license license:expat)))
8366
8367(define-public python-apipkg
8368 (package
8369 (name "python-apipkg")
8370 (version "1.4")
8371 (source (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "apipkg" version))
8374 (sha256
8375 (base32
8376 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8377 (build-system python-build-system)
8378 (native-inputs
8379 `(("python-pytest" ,python-pytest)))
8380 (synopsis "Namespace control and lazy-import mechanism")
8381 (description "With apipkg you can control the exported namespace of a Python
8382package and greatly reduce the number of imports for your users. It is a small
8383pure Python module that works on virtually all Python versions.")
8384 (home-page "https://github.com/pytest-dev/apipkg")
8385 (license license:expat)))
8386
8387(define-public python2-apipkg
8388 (package-with-python2 python-apipkg))
8389
8390(define-public python-execnet
8391 (package
8392 (name "python-execnet")
8393 (version "1.4.1")
8394 (source (origin
8395 (method url-fetch)
8396 (uri (pypi-uri "execnet" version))
8397 (sha256
8398 (base32
8399 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8400 (build-system python-build-system)
8401 (arguments
8402 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8403 ;; The two test failures are caused by the lack of an `ssh` executable.
8404 ;; The test suite can be run with pytest after the 'install' phase.
8405 #:tests? #f))
8406 (native-inputs
8407 `(("python-pytest" ,python-pytest)
8408 ("python-setuptools-scm" ,python-setuptools-scm)))
8409 (propagated-inputs
8410 `(("python-apipkg" ,python-apipkg)))
8411 (synopsis "Rapid multi-Python deployment")
8412 (description "Execnet provides a share-nothing model with
8413channel-send/receive communication for distributing execution across many
8414Python interpreters across version, platform and network barriers. It has a
8415minimal and fast API targeting the following uses:
8416@enumerate
8417@item distribute tasks to (many) local or remote CPUs
8418@item write and deploy hybrid multi-process applications
8419@item write scripts to administer multiple environments
8420@end enumerate")
8421 (home-page "http://codespeak.net/execnet/")
8422 (license license:expat)))
8423
8424(define-public python2-execnet
8425 (package-with-python2 python-execnet))
8426
8427(define-public python-icalendar
8428 (package
8429 (name "python-icalendar")
8430 (version "4.0.3")
8431 (source (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "icalendar" version))
8434 (sha256
8435 (base32
8436 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8437 (build-system python-build-system)
8438 (propagated-inputs
8439 `(("python-dateutil" ,python-dateutil)
8440 ("python-pytz" ,python-pytz)))
8441 (synopsis "Python library for parsing iCalendar files")
8442 (description "The icalendar package is a parser/generator of iCalendar
8443files for use with Python.")
8444 (home-page "https://github.com/collective/icalendar")
8445 (license license:bsd-2)))
8446
44d10b1f
RW
8447(define-public python-args
8448 (package
8449 (name "python-args")
8450 (version "0.1.0")
8451 (source (origin
8452 (method url-fetch)
8453 (uri (pypi-uri "args" version))
8454 (sha256
8455 (base32
8456 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8457 (build-system python-build-system)
8458 (home-page "https://github.com/kennethreitz/args")
8459 (synopsis "Command-line argument parser")
8460 (description
8461 "This library provides a Python module to parse command-line arguments.")
8462 (license license:bsd-3)))
8463
8464(define-public python2-args
8465 (package-with-python2 python-args))
8466
8467(define-public python-clint
8468 (package
8469 (name "python-clint")
8470 (version "0.5.1")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "clint" version))
8474 (sha256
8475 (base32
8476 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8477 (build-system python-build-system)
8478 (arguments
8479 '(#:phases
8480 (modify-phases %standard-phases
8481 (replace 'check
8482 (lambda _ (invoke "py.test" "-v"))))))
8483 (native-inputs
8484 `(("python-pytest" ,python-pytest)))
8485 (propagated-inputs
8486 `(("python-args" ,python-args)))
8487 (home-page "https://github.com/kennethreitz/clint")
8488 (synopsis "Command-line interface tools")
8489 (description
8490 "Clint is a Python module filled with a set of tools for developing
8491command-line applications, including tools for colored and indented
8492output, progress bar display, and pipes.")
8493 (license license:isc)))
8494
8495(define-public python2-clint
8496 (package-with-python2 python-clint))
8497
44d10b1f
RW
8498(define-public python-rply
8499 (package
8500 (name "python-rply")
8501 (version "0.7.5")
8502 (source (origin
8503 (method url-fetch)
8504 (uri (pypi-uri "rply" version))
8505 (sha256
8506 (base32
8507 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8508 (build-system python-build-system)
8509 (propagated-inputs
8510 `(("python-appdirs" ,python-appdirs)))
8511 (home-page "https://github.com/alex/rply")
8512 (synopsis "Parser generator for Python")
8513 (description
8514 "This package provides a pure Python based parser generator, that also
8515works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8516with a new public API, and RPython support.")
8517 (license license:bsd-3)))
8518
8519(define-public python2-rply
8520 (package-with-python2 python-rply))
8521
8522(define-public python-hy
8523 (package
8524 (name "python-hy")
8525 (version "0.13.0")
8526 (source (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "hy" version))
8529 (sha256
8530 (base32
8531 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8532 (build-system python-build-system)
8533 (arguments
8534 '(#:phases
8535 (modify-phases %standard-phases
8536 (replace 'check
8537 (lambda _
8538 ;; Tests require write access to HOME.
8539 (setenv "HOME" "/tmp")
8540 (invoke "nosetests"))))))
8541 (native-inputs
8542 `(("python-coverage" ,python-coverage)
8543 ("python-nose" ,python-nose)))
8544 (propagated-inputs
8545 `(("python-astor" ,python-astor)
8546 ("python-clint" ,python-clint)
8547 ("python-rply" ,python-rply)))
8548 (home-page "http://hylang.org/")
8549 (synopsis "Lisp frontend to Python")
8550 (description
8551 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8552its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8553Python at your fingertips, in Lisp form.")
8554 (license license:expat)))
8555
8556(define-public python2-hy
8557 (package-with-python2 python-hy))
8558
8559(define-public python2-functools32
8560 (package
8561 (name "python2-functools32")
8562 (version "3.2.3-2")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "functools32" version))
8567 (sha256
8568 (base32
8569 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8570 (build-system python-build-system)
8571 (arguments
8572 `(#:python ,python-2
8573 #:tests? #f)) ; no test target
8574 (home-page "https://github.com/MiCHiLU/python-functools32")
8575 (synopsis
8576 "Backport of the functools module from Python 3.2.3")
8577 (description
8578 "This package is a backport of the @code{functools} module from Python
85793.2.3 for use with older versions of Python and PyPy.")
8580 (license license:expat)))
8581
8582(define-public python2-subprocess32
8583 (package
8584 (name "python2-subprocess32")
8585 (version "3.2.7")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (pypi-uri "subprocess32" version))
8589 (sha256
8590 (base32
8591 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8592 (patches
8593 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8594 (build-system python-build-system)
8595 (arguments
8596 `(#:python ,python-2
8597 ;; The test suite fails with Python > 2.7.13:
8598 ;; import test.support
8599 ;; ImportError: No module named support
8600 #:tests? #f
8601 #:phases
8602 (modify-phases %standard-phases
8603 (add-after 'unpack 'patch-/bin/sh
8604 (lambda _
8605 (substitute* '("subprocess32.py"
8606 "test_subprocess32.py")
8607 (("/bin/sh") (which "sh")))
8608 #t)))))
8609 (home-page "https://github.com/google/python-subprocess32")
8610 (synopsis "Backport of the subprocess module from Python 3.2")
8611 (description
8612 "This is a backport of the @code{subprocess} standard library module
8613from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8614new features. On POSIX systems it is guaranteed to be reliable when used
8615in threaded applications. It includes timeout support from Python 3.3 but
8616otherwise matches 3.2’s API.")
8617 (license license:psfl)))
8618
8619(define-public python2-futures
8620 (package
8621 (name "python2-futures")
8622 (version "3.2.0")
8623 (source
8624 (origin
8625 (method url-fetch)
8626 (uri (pypi-uri "futures" version))
8627 (sha256
8628 (base32
8629 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8630 (build-system python-build-system)
8631 (arguments `(#:python ,python-2
8632 ;; FIXME: Python 2.7.14 moved the test.support library,
8633 ;; but our package has not yet been adjusted. Enable
8634 ;; tests when the python2 package has been fixed.
8635 #:tests? #f))
8636 (home-page "https://github.com/agronholm/pythonfutures")
8637 (synopsis
8638 "Backport of the concurrent.futures package from Python 3.2")
8639 (description
8640 "The concurrent.futures module provides a high-level interface for
8641asynchronously executing callables. This package backports the
8642concurrent.futures package from Python 3.2")
8643 (license license:bsd-3)))
8644
8645(define-public python-promise
8646 (package
8647 (name "python-promise")
8648 (version "0.4.2")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "promise" version))
8653 (sha256
8654 (base32
8655 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8656 (build-system python-build-system)
8657 ;; Tests wants python-futures, which is a python2 only program, and
8658 ;; can't be found by python-promise at test time.
8659 (arguments `(#:tests? #f))
8660 (home-page "https://github.com/syrusakbary/promise")
8661 (synopsis "Promises/A+ implementation for Python")
8662 (description
8663 "Promises/A+ implementation for Python")
8664 (properties `((python2-variant . ,(delay python2-promise))))
8665 (license license:expat)))
8666
8667(define-public python2-promise
8668 (let ((promise (package-with-python2
8669 (strip-python2-variant python-promise))))
8670 (package (inherit promise)
8671 (arguments (substitute-keyword-arguments (package-arguments promise)
8672 ((#:tests? _) #t)))
8673 (native-inputs
8674 `(("python2-futures" ,python2-futures)
8675 ("python2-pytest" ,python2-pytest)
8676 ,@(package-native-inputs promise))))))
8677
d71d85cd
RW
8678(define-public python-progressbar33
8679 (package
8680 (name "python-progressbar33")
8681 (version "2.4")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "progressbar33" version))
8686 (sha256
8687 (base32
8688 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8689 (build-system python-build-system)
8690 (home-page "http://github.com/germangh/python-progressbar")
8691 (synopsis "Text progress bar library for Python")
8692 (description
8693 "This package provides a text progress bar library for Python. This
8694version only differs from the original @code{progressbar} package in that it
8695uses relative package imports instead of absolute imports, which is necessary
8696for the module to work under Python 3.3.")
8697 ;; Either or both of these licenses may be selected.
8698 (license (list license:lgpl2.1+ license:bsd-3))))
8699
44d10b1f
RW
8700(define-public python-colorama
8701 (package
8702 (name "python-colorama")
8703 (version "0.3.9")
8704 (source
8705 (origin
8706 (method url-fetch)
8707 (uri (pypi-uri "colorama" version))
8708 (sha256
8709 (base32
8710 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8711 (build-system python-build-system)
8712 (synopsis "Colored terminal text rendering for Python")
8713 (description "Colorama is a Python library for rendering colored terminal
8714text.")
8715 (home-page "https://pypi.python.org/pypi/colorama")
8716 (license license:bsd-3)))
8717
8718(define-public python2-colorama
8719 (package-with-python2 python-colorama))
8720
8721(define-public python-rsa
8722 (package
8723 (name "python-rsa")
8724 (version "3.4.2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "rsa" version))
8729 (sha256
8730 (base32
8731 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8732 (build-system python-build-system)
8733 (propagated-inputs
8734 `(("python-pyasn1" ,python-pyasn1)))
8735 (synopsis "Pure-Python RSA implementation")
8736 (description "Python-RSA is a pure-Python RSA implementation. It supports
8737encryption and decryption, signing and verifying signatures, and key
8738generation according to PKCS#1 version 1.5. It can be used as a Python
8739library as well as on the command line.")
8740 (home-page "https://stuvel.eu/rsa")
8741 (license license:asl2.0)))
8742
8743(define-public python2-rsa
8744 (package-with-python2 python-rsa))
8745
8746(define-public python-pluggy
8747 (package
8748 (name "python-pluggy")
8749 (version "0.7.1")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "pluggy" version))
8754 (sha256
8755 (base32
8756 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8757 (build-system python-build-system)
8758 (native-inputs
8759 `(("python-setuptools-scm" ,python-setuptools-scm)))
8760 (synopsis "Plugin and hook calling mechanism for Python")
8761 (description "Pluggy is an extraction of the plugin manager as used by
8762Pytest but stripped of Pytest specific details.")
8763 (home-page "https://pypi.python.org/pypi/pluggy")
8764 (license license:expat)))
8765
8766(define-public python2-pluggy
8767 (package-with-python2 python-pluggy))
8768
8769(define-public python-tox
8770 (package
8771 (name "python-tox")
8772 (version "2.8.1")
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "tox" version))
8777 (sha256
8778 (base32
8779 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8780 (build-system python-build-system)
8781 (arguments
8782 ;; FIXME: Tests require pytest-timeout, which itself requires
8783 ;; pytest>=2.8.0 for installation.
8784 '(#:tests? #f))
8785 (propagated-inputs
8786 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8787 ("python-py" ,python-py)
8788 ("python-virtualenv" ,python-virtualenv)))
8789 (native-inputs
8790 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8791 ("python-pytest" ,python-pytest) ; >= 2.3.5
8792 ("python-setuptools-scm" ,python-setuptools-scm)))
8793 (home-page "http://tox.testrun.org/")
8794 (synopsis "Virtualenv-based automation of test activities")
8795 (description "Tox is a generic virtualenv management and test command line
8796tool. It can be used to check that a package installs correctly with
8797different Python versions and interpreters, or run tests in each type of
8798supported environment, or act as a frontend to continuous integration
8799servers.")
8800 (license license:expat)))
8801
8802(define-public python2-tox
8803 (package-with-python2 python-tox))
8804
8805(define-public python-jmespath
8806 (package
8807 (name "python-jmespath")
8808 (version "0.9.3")
8809 (source
8810 (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "jmespath" version))
8813 (sha256
8814 (base32
8815 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8816 (build-system python-build-system)
8817 (native-inputs
8818 `(("python-nose" ,python-nose)))
8819 (synopsis "JSON Matching Expressions")
8820 (description "JMESPath (pronounced “james path”) is a Python library that
8821allows one to declaratively specify how to extract elements from a JSON
8822document.")
8823 (home-page "https://github.com/jmespath/jmespath.py")
8824 (license license:expat)))
8825
8826(define-public python2-jmespath
8827 (package-with-python2 python-jmespath))
8828
8829(define-public python-botocore
8830 (package
7bcf827c
RW
8831 (name "python-botocore")
8832 (version "1.12.149")
8833 (source
8834 (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "botocore" version))
8837 (sha256
8838 (base32
8839 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8840 (build-system python-build-system)
8841 (arguments
8842 ;; FIXME: Many tests are failing.
8843 '(#:tests? #f))
8844 (propagated-inputs
8845 `(("python-dateutil" ,python-dateutil)
8846 ("python-docutils" ,python-docutils)
8847 ("python-jmespath" ,python-jmespath)))
8848 (native-inputs
8849 `(("python-mock" ,python-mock)
8850 ("python-nose" ,python-nose)
8851 ("behave" ,behave)
8852 ("python-tox" ,python-tox)
8853 ("python-urllib3" ,python-urllib3)
8854 ("python-wheel" ,python-wheel)))
8855 (home-page "https://github.com/boto/botocore")
8856 (synopsis "Low-level interface to AWS")
8857 (description "Botocore is a Python library that provides a low-level
44d10b1f 8858interface to the Amazon Web Services (AWS) API.")
7bcf827c 8859 (license license:asl2.0)))
44d10b1f
RW
8860
8861(define-public python2-botocore
8862 (package-with-python2 python-botocore))
8863
8864(define-public python-xdo
8865 (package
8866 (name "python-xdo")
8867 (version "0.3")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (string-append
8871 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8872 "python-xdo_" version ".orig.tar.gz"))
8873 (sha256
8874 (base32
8875 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8876 (build-system python-build-system)
8877 (arguments
8878 '(#:phases
8879 (modify-phases %standard-phases
8880 (add-before 'install 'patch-libxdo-path
8881 ;; Hardcode the path of dynamically loaded libxdo library.
8882 (lambda* (#:key inputs #:allow-other-keys)
8883 (let ((libxdo (string-append
8884 (assoc-ref inputs "xdotool")
8885 "/lib/libxdo.so")))
8886 (substitute* "xdo/_xdo.py"
8887 (("find_library\\(\"xdo\"\\)")
8888 (simple-format #f "\"~a\"" libxdo)))
8889 #t))))
8890 #:tests? #f)) ; no tests provided
8891 (propagated-inputs
8892 `(("python-six" ,python-six)))
8893 (inputs
8894 `(("xdotool" ,xdotool)
8895 ("libX11" ,libx11)))
8896 (home-page "https://tracker.debian.org/pkg/python-xdo")
8897 (synopsis "Python library for simulating X11 keyboard/mouse input")
8898 (description "Provides bindings to libxdo for manipulating X11 via simulated
8899input. (Note that this is mostly a legacy library; you may wish to look at
8900python-xdo for newer bindings.)")
8901 (license license:bsd-3)))
8902
8903(define-public python2-xdo
8904 (package-with-python2 python-xdo))
8905
8906(define-public python-mako
8907 (package
8908 (name "python-mako")
6bf53ad5 8909 (version "1.1.0")
44d10b1f
RW
8910 (source
8911 (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "Mako" version))
8914 (sha256
8915 (base32
6bf53ad5 8916 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8917 (build-system python-build-system)
6bf53ad5
MB
8918 (arguments
8919 `(#:phases (modify-phases %standard-phases
8920 (replace 'check
8921 (lambda _
8922 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8923 (propagated-inputs
8924 `(("python-markupsafe" ,python-markupsafe)))
8925 (native-inputs
8926 `(("python-mock" ,python-mock)
44d10b1f 8927 ("python-pytest" ,python-pytest)))
7016e620 8928 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8929 (synopsis "Templating language for Python")
8930 (description "Mako is a templating language for Python that compiles
8931templates into Python modules.")
8932 (license license:expat)))
8933
8934(define-public python2-mako
8935 (package-with-python2 python-mako))
8936
8937(define-public python-waitress
8938 (package
8939 (name "python-waitress")
8940 (version "1.1.0")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "waitress" version))
8945 (patches (search-patches "python-waitress-fix-tests.patch"))
8946 (sha256
8947 (base32
8948 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8949 (build-system python-build-system)
8950 (home-page "https://github.com/Pylons/waitress")
8951 (synopsis "Waitress WSGI server")
8952 (description "Waitress is meant to be a production-quality pure-Python WSGI
8953server with very acceptable performance.")
8954 (license license:zpl2.1)))
8955
8956(define-public python2-waitress
8957 (package-with-python2 python-waitress))
8958
8959(define-public python-pyquery
8960 (package
8961 (name "python-pyquery")
8962 (version "1.2.17")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "pyquery" version))
8967 (sha256
8968 (base32
8969 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8970 (build-system python-build-system)
8971 (native-inputs
8972 `(("python-webob" ,python-webob)
8973 ("python-webtest" ,python-webtest)))
8974 (propagated-inputs
8975 `(("python-lxml" ,python-lxml)
8976 ("python-cssselect" ,python-cssselect)))
8977 (home-page "https://github.com/gawel/pyquery")
8978 (synopsis "Make jQuery-like queries on xml documents")
8979 (description "pyquery allows you to make jQuery queries on xml documents.
8980The API is as much as possible the similar to jQuery. pyquery uses lxml for
8981fast xml and html manipulation.")
8982 (license license:bsd-3)))
8983
44d10b1f
RW
8984(define-public python-anyjson
8985 (package
8986 (name "python-anyjson")
8987 (version "0.3.3")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "anyjson" version))
8992 (sha256
8993 (base32
8994 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8995 (build-system python-build-system)
8996 (arguments
8997 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8998 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8999 ;; whatever) so this transformation needs to be done before the tests
9000 ;; can be run. Maybe we could add a build step to transform beforehand
9001 ;; but it could be annoying/difficult.
9002 ;; We can enable tests for the Python 2 version, though, and do below.
9003 #:tests? #f))
9004 (home-page "https://bitbucket.org/runeh/anyjson/")
9005 (synopsis
9006 "Wraps best available JSON implementation in a common interface")
9007 (description
9008 "Anyjson loads whichever is the fastest JSON module installed
9009and provides a uniform API regardless of which JSON implementation is used.")
9010 (license license:bsd-3)
9011 (properties `((python2-variant . ,(delay python2-anyjson))))))
9012
9013(define-public python2-anyjson
9014 (let ((anyjson (package-with-python2
9015 (strip-python2-variant python-anyjson))))
9016 (package
9017 (inherit anyjson)
9018 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9019 #:tests? #t
9020 ,@(package-arguments anyjson)))
9021 (native-inputs `(("python2-nose" ,python2-nose))))))
9022
9023(define-public python-amqp
9024 (package
9025 (name "python-amqp")
9026 (version "2.3.2")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "amqp" version))
9031 (sha256
9032 (base32
9033 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9034 (build-system python-build-system)
9035 (native-inputs
9036 `(("python-case" ,python-case)
9037 ("python-pytest-sugar" ,python-pytest-sugar)
9038 ("python-mock" ,python-mock)))
9039 (propagated-inputs
9040 `(("python-vine" ,python-vine)))
9041 (home-page "https://github.com/celery/py-amqp")
9042 (synopsis
9043 "Low-level AMQP client for Python (fork of amqplib)")
9044 (description
9045 "This is a fork of amqplib which was originally written by Barry Pederson.
9046It is maintained by the Celery project, and used by kombu as a pure python
9047alternative when librabbitmq is not available.")
9048 (license license:lgpl2.1+)
9049 (properties `((python2-variant . ,(delay python2-amqp))))))
9050
9051(define-public python2-amqp
9052 (let ((amqp (package-with-python2
9053 (strip-python2-variant python-amqp))))
9054 (package
9055 (inherit amqp)
9056 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9057 ;; unmaintained. Weirdly, does not do this on the python 3
9058 ;; version?
9059 #:tests? #f
9060 ,@(package-arguments amqp))))))
9061
9062(define-public python-txamqp
9063 (package
9064 (name "python-txamqp")
9065 (version "0.8.2")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (pypi-uri "txAMQP" version))
9070 (sha256
9071 (base32
9072 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9073 (build-system python-build-system)
9074 (propagated-inputs
9075 `(("python-six" ,python-six)
9076 ("python-twisted" ,python-twisted)))
9077 (home-page "https://github.com/txamqp/txamqp")
9078 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9079 (description
9080 "This package provides a Python library for communicating with AMQP peers
9081and brokers using the asynchronous networking framework Twisted. It contains
9082all the necessary code to connect, send and receive messages to/from an
9083AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9084also includes support for using Thrift RPC over AMQP in Twisted
9085applications.")
9086 (license license:asl2.0)))
9087
9088(define-public python2-txamqp
9089 (package-with-python2 python-txamqp))
9090
9091(define-public python-kombu
9092 (package
9093 (name "python-kombu")
9094 (version "4.2.2")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "kombu" version))
9099 (sha256
9100 (base32
9101 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9102 (build-system python-build-system)
9103 (native-inputs
9104 `(("python-mock" ,python-mock)
9105 ("python-case" ,python-case)
9106 ("python-pyro4" ,python-pyro4)
9107 ("python-pytest-sugar" ,python-pytest-sugar)
9108 ("python-pytz" ,python-pytz)))
9109 (propagated-inputs
9110 `(("python-anyjson" ,python-anyjson)
9111 ("python-amqp" ,python-amqp)
9112 ("python-redis" ,python-redis)))
9113 (home-page "https://kombu.readthedocs.io")
9114 (synopsis "Message passing library for Python")
9115 (description "The aim of Kombu is to make messaging in Python as easy as
9116possible by providing an idiomatic high-level interface for the AMQ protocol,
9117and also provide proven and tested solutions to common messaging problems.
9118AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9119message orientation, queuing, routing, reliability and security, for which the
9120RabbitMQ messaging server is the most popular implementation.")
9121 (license license:bsd-3)
9122 (properties `((python2-variant . ,(delay python2-kombu))))))
9123
9124(define-public python2-kombu
9125 (let ((kombu (package-with-python2
9126 (strip-python2-variant python-kombu))))
9127 (package
9128 (inherit kombu)
9129 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9130 ;; It works fine on the python3 variant.
9131 #:tests? #f
9132 ,@(package-arguments kombu)))
9133 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9134 ,@(package-native-inputs kombu))))))
9135
9136(define-public python-billiard
9137 (package
9138 (name "python-billiard")
9139 (version "3.5.0.5")
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "billiard" version))
9144 (sha256
9145 (base32
9146 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9147 (build-system python-build-system)
9148 (native-inputs
9149 `(("python-case" ,python-case)
9150 ("python-pytest" ,python-pytest)))
9151 (home-page "https://github.com/celery/billiard")
9152 (synopsis
9153 "Python multiprocessing fork with improvements and bugfixes")
9154 (description
9155 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9156multiprocessing package itself is a renamed and updated version of R Oudkerk's
9157pyprocessing package. This standalone variant is intended to be compatible with
9158Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9159 (license license:bsd-3)
9160 (properties `((python2-variant . ,(delay python2-billiard))))))
9161
9162(define-public python2-billiard
9163 (let ((billiard (package-with-python2
9164 (strip-python2-variant python-billiard))))
9165 (package
9166 (inherit billiard)
9167 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9168 ("python2-mock" ,python2-mock)
9169 ,@(package-native-inputs billiard))))))
9170
9171(define-public python-celery
9172 (package
9173 (name "python-celery")
9174 (version "4.2.1")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "celery" version))
9179 (sha256
9180 (base32
9181 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9182 (build-system python-build-system)
9183 (arguments
9184 '(;; TODO The tests fail with Python 3.7
9185 ;; https://github.com/celery/celery/issues/4849
9186 #:tests? #f
9187 #:phases
9188 (modify-phases %standard-phases
9189 (add-after 'unpack 'patch-requirements
9190 (lambda _
9191 (substitute* "requirements/test.txt"
9192 (("pytest>=3\\.0,<3\\.3")
9193 "pytest>=3.0"))
9194 #t)))))
9195 (native-inputs
9196 `(("python-case" ,python-case)
9197 ("python-pytest" ,python-pytest)))
9198 (propagated-inputs
9199 `(("python-pytz" ,python-pytz)
9200 ("python-billiard" ,python-billiard)
9201 ("python-kombu" ,python-kombu)))
9202 (home-page "https://celeryproject.org")
9203 (synopsis "Distributed Task Queue")
9204 (description "Celery is an asynchronous task queue/job queue based on
9205distributed message passing. It is focused on real-time operation, but
9206supports scheduling as well. The execution units, called tasks, are executed
9207concurrently on a single or more worker servers using multiprocessing,
9208Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9209synchronously (wait until ready).")
9210 (license license:bsd-3)
9211 (properties `((python2-variant . ,(delay python2-celery))))))
9212
9213(define-public python2-celery
9214 (let ((celery (package-with-python2
9215 (strip-python2-variant python-celery))))
9216 (package
9217 (inherit celery)
9218 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9219 ("python2-mock" ,python2-mock)
9220 ,@(package-native-inputs celery))))))
9221
9222(define-public python-translitcodec
9223 (package
9224 (name "python-translitcodec")
9225 (version "0.4.0")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "translitcodec" version))
9230 (sha256
9231 (base32
9232 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9233 (build-system python-build-system)
9234 (arguments
9235 `(#:tests? #f)) ; no tests provided
9236 (home-page
9237 "https://github.com/claudep/translitcodec")
9238 (synopsis
9239 "Unicode to 8-bit charset transliteration codec")
9240 (description
9241 "This package contains codecs for transliterating ISO 10646 texts into
9242best-effort representations using smaller coded character sets (ASCII,
9243ISO 8859, etc.).")
9244 (license license:expat)))
9245
9246(define-public python2-translitcodec
9247 (package-with-python2 python-translitcodec))
9248
9249(define-public python-editor
9250 (package
9251 (name "python-editor")
9252 (version "0.5")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "python-editor" version))
9257 (sha256
9258 (base32
9259 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9260 (build-system python-build-system)
9261 (home-page
9262 "https://github.com/fmoo/python-editor")
9263 (synopsis
9264 "Programmatically open an editor, capture the result")
9265 (description
9266 "python-editor is a library that provides the editor module for
9267programmatically interfacing with your system's $EDITOR.")
9268 (license license:asl2.0)))
9269
9270(define-public python2-editor
9271 (package-with-python2 python-editor))
9272
44d10b1f
RW
9273(define-public python-vobject
9274 (package
9275 (name "python-vobject")
9276 (version "0.9.5")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "vobject" version))
9280 (sha256
9281 (base32
9282 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9283 (build-system python-build-system)
9284 (arguments
9285 '(;; The test suite relies on some non-portable Windows interfaces.
9286 #:tests? #f))
9287 (propagated-inputs
9288 `(("python-dateutil" ,python-dateutil)
9289 ("python-pyicu" ,python-pyicu)))
9290 (synopsis "Parse and generate vCard and vCalendar files")
9291 (description "Vobject is intended to be a full featured Python package for
9292parsing and generating vCard and vCalendar files. Currently, iCalendar files
9293are supported and well tested. vCard 3.0 files are supported, and all data
9294should be imported, but only a few components are understood in a sophisticated
9295way.")
9296 (home-page "http://eventable.github.io/vobject/")
9297 (license license:asl2.0)))
9298
9299(define-public python2-vobject
9300 (package-with-python2 python-vobject))
9301
9302(define-public python-munkres
9303 (package
9304 (name "python-munkres")
9305 (version "1.0.8")
9306 (source (origin
9307 (method url-fetch)
9308 (uri (pypi-uri "munkres" version))
9309 (sha256
9310 (base32
9311 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9312 (build-system python-build-system)
9313 (arguments
9314 '(#:tests? #f)) ; no test suite
9315 (home-page "http://software.clapper.org/munkres/")
9316 (synopsis "Implementation of the Munkres algorithm")
9317 (description "The Munkres module provides an implementation of the Munkres
9318algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9319useful for solving the Assignment Problem.")
9320 (license license:bsd-3)))
9321
9322(define-public python2-munkres
9323 (package-with-python2 python-munkres))
9324
9325(define-public python-whoosh
9326 (package
9327 (name "python-whoosh")
9328 (version "2.7.4")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "Whoosh" version))
9333 (sha256
9334 (base32
9335 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9336 (build-system python-build-system)
9337 (native-inputs
9338 `(("python-pytest" ,python-pytest)))
9339 (home-page "https://bitbucket.org/mchaput/whoosh")
9340 (synopsis "Full text indexing, search, and spell checking library")
9341 (description
9342 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9343checking library.")
9344 (license license:bsd-2)))
9345
9346(define-public python2-whoosh
9347 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9348 (package (inherit whoosh)
9349 (propagated-inputs
9350 `(("python2-backport-ssl-match-hostname"
9351 ,python2-backport-ssl-match-hostname)
9352 ,@(package-propagated-inputs whoosh))))))
9353
9354(define-public python-pathlib
9355 (package
9356 (name "python-pathlib")
9357 (version "1.0.1")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "pathlib" version))
9361 (sha256
9362 (base32
9363 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9364 (build-system python-build-system)
9365 ;; The tests depend on the internal "test" module, which does not provide
9366 ;; a stable interface.
9367 (arguments `(#:tests? #f))
9368 (home-page "https://pathlib.readthedocs.org/")
9369 (synopsis "Object-oriented file system paths")
9370 (description "Pathlib offers a set of classes to handle file system paths.
9371It offers the following advantages over using string objects:
9372
9373@enumerate
9374@item No more cumbersome use of os and os.path functions. Everything can
9375be done easily through operators, attribute accesses, and method calls.
9376@item Embodies the semantics of different path types. For example,
9377comparing Windows paths ignores casing.
9378@item Well-defined semantics, eliminating any inconsistencies or
9379ambiguities (forward vs. backward slashes, etc.).
9380@end enumerate
9381
9382Note: In Python 3.4, pathlib is now part of the standard library. For other
9383Python versions please consider python-pathlib2 instead, which tracks the
9384standard library module. This module (python-pathlib) isn't maintained
9385anymore.")
9386 (license license:expat)))
9387
9388(define-public python2-pathlib
9389 (package-with-python2 python-pathlib))
9390
9391(define-public python2-pathlib2
9392 (package
9393 (name "python2-pathlib2")
9394 (version "2.3.2")
9395 (source (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "pathlib2" version))
9398 (sha256
9399 (base32
9400 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9401 (build-system python-build-system)
9402 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9403 ;; version is 3.4 which already includes this package as part of the
9404 ;; standard library.
9405 (arguments
9406 `(#:python ,python-2))
9407 (propagated-inputs
9408 `(("python2-scandir" ,python2-scandir)
9409 ("python2-six" ,python2-six)))
9410 (home-page "https://pypi.python.org/pypi/pathlib2/")
9411 (synopsis "Object-oriented file system paths - backport of standard
9412pathlib module")
9413 (description "The goal of pathlib2 is to provide a backport of standard
9414pathlib module which tracks the standard library module, so all the newest
9415features of the standard pathlib can be used also on older Python versions.
9416
9417Pathlib offers a set of classes to handle file system paths. It offers the
9418following advantages over using string objects:
9419
9420@enumerate
9421@item No more cumbersome use of os and os.path functions. Everything can
9422be done easily through operators, attribute accesses, and method calls.
9423@item Embodies the semantics of different path types. For example,
9424comparing Windows paths ignores casing.
9425@item Well-defined semantics, eliminating any inconsistencies or
9426ambiguities (forward vs. backward slashes, etc.).
9427@end enumerate")
9428 (license license:expat)))
9429
9430(define-public python2-pathlib2-bootstrap
9431 (hidden-package
9432 (package
9433 (inherit python2-pathlib2)
9434 (name "python2-pathlib2-bootstrap")
9435 (propagated-inputs
9436 `(("python2-scandir" ,python2-scandir)
9437 ("python2-six" ,python2-six-bootstrap))))))
9438
9439(define-public python-jellyfish
9440 (package
9441 (name "python-jellyfish")
9442 (version "0.5.6")
9443 (source (origin
9444 (method url-fetch)
9445 (uri (pypi-uri "jellyfish" version))
9446 (sha256
9447 (base32
9448 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9449 (build-system python-build-system)
9450 (native-inputs
9451 `(("python-pytest" ,python-pytest)))
9452 (home-page "https://github.com/jamesturk/jellyfish")
9453 (synopsis "Approximate and phonetic matching of strings")
9454 (description "Jellyfish uses a variety of string comparison and phonetic
9455encoding algorithms to do fuzzy string matching.")
9456 (license license:bsd-2)
9457 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9458
9459(define-public python2-jellyfish
9460 (let ((jellyfish (package-with-python2
9461 (strip-python2-variant python-jellyfish))))
9462 (package (inherit jellyfish)
9463 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9464 ,@(package-native-inputs jellyfish))))))
9465
9466(define-public python2-unicodecsv
9467 (package
9468 (name "python2-unicodecsv")
9469 (version "0.14.1")
9470 (source (origin
9471 (method url-fetch)
9472 ;; The test suite is not included in the PyPi release.
9473 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9474 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9475 "archive/" version ".tar.gz"))
9476 (file-name (string-append name "-" version ".tar.gz"))
9477 (sha256
9478 (base32
9479 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9480 (build-system python-build-system)
9481 (arguments
9482 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9483 #:python ,python-2))
9484 (native-inputs
9485 `(("python2-unittest2" ,python2-unittest2)))
9486 (home-page "https://github.com/jdunck/python-unicodecsv")
9487 (synopsis "Unicode CSV module for Python 2")
9488 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9489module, adding support for Unicode strings.")
9490 (license license:bsd-2)))
9491
9492(define-public python-rarfile
9493 (package
9494 (name "python-rarfile")
9495 (version "2.8")
9496 (source (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "rarfile" version))
9499 (sha256
9500 (base32
9501 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9502 (build-system python-build-system)
9503 (arguments
9504 '(#:phases
9505 (modify-phases %standard-phases
9506 (replace 'check
9507 ;; Many tests fail, but the installation proceeds.
e59dd341 9508 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9509 (native-inputs
9510 `(("which" ,which))) ; required for tests
9511 (propagated-inputs
9512 `(("libarchive" ,libarchive)))
9513 (home-page "https://github.com/markokr/rarfile")
9514 (synopsis "RAR archive reader for Python")
9515 (description "This is Python module for RAR archive reading. The interface
9516is made as zipfile like as possible.")
9517 (license license:isc)))
9518
9519(define-public python2-rarfile
9520 (package-with-python2 python-rarfile))
9521
9522(define-public python-magic
9523 (package
9524 (name "python-magic")
9525 (version "0.4.15")
9526 (source
9527 (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "python-magic" version))
9530 (sha256
9531 (base32
9532 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9533 (file-name (string-append name "-" version "-checkout"))))
9534 (build-system python-build-system)
9535 (arguments
9536 ;; The tests are unreliable, so don't run them. The tests fail
9537 ;; under Python3 because they were written for Python2 and
9538 ;; contain import statements that do not work in Python3. One of
9539 ;; the tests fails under Python2 because its assertions are
9540 ;; overly stringent; it relies on comparing output strings which
9541 ;; are brittle and can change depending on the version of
9542 ;; libmagic being used and the system on which the test is
9543 ;; running. In my case, under GuixSD 0.10.0, only one test
9544 ;; failed, and it seems to have failed only because the version
9545 ;; of libmagic that is packaged in Guix outputs a slightly
9546 ;; different (but not wrong) string than the one that the test
9547 ;; expected.
9548 '(#:tests? #f
9549 #:phases (modify-phases %standard-phases
9550 ;; Replace a specific method call with a hard-coded
9551 ;; path to the necessary libmagic.so file in the
9552 ;; store. If we don't do this, then the method call
9553 ;; will fail to find the libmagic.so file, which in
9554 ;; turn will cause any application using
9555 ;; python-magic to fail.
9556 (add-before 'build 'hard-code-path-to-libmagic
9557 (lambda* (#:key inputs #:allow-other-keys)
9558 (let ((file (assoc-ref inputs "file")))
9559 (substitute* "magic.py"
9560 (("ctypes.util.find_library\\('magic'\\)")
9561 (string-append "'" file "/lib/libmagic.so'")))
9562 #t)))
9563 (add-before 'install 'disable-egg-compression
9564 (lambda _
9565 (let ((port (open-file "setup.cfg" "a")))
9566 (display "\n[easy_install]\nzip_ok = 0\n"
9567 port)
9568 (close-port port)
9569 #t))))))
9570 (inputs
9571 ;; python-magic needs to be able to find libmagic.so.
9572 `(("file" ,file)))
9573 (home-page
9574 "https://github.com/ahupp/python-magic")
9575 (synopsis
9576 "File type identification using libmagic")
9577 (description
9578 "This module uses ctypes to access the libmagic file type
9579identification library. It makes use of the local magic database and
9580supports both textual and MIME-type output. Note that this module and
9581the python-file module both provide a \"magic.py\" file; these two
9582modules, which are different and were developed separately, both serve
9583the same purpose: to provide Python bindings for libmagic.")
9584 (license license:expat)))
9585
9586(define-public python2-magic
9587 (package-with-python2 python-magic))
9588
9589(define-public python2-s3cmd
9590 (package
9591 (name "python2-s3cmd")
9592 (version "1.6.1")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9597 "s3cmd-" version ".tar.gz"))
9598 (sha256
9599 (base32
9600 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9601 (build-system python-build-system)
9602 (arguments
9603 ;; s3cmd is written for python2 only and contains no tests.
9604 `(#:python ,python-2
9605 #:tests? #f))
9606 (propagated-inputs
9607 `(("python2-dateutil" ,python2-dateutil)
9608 ;; The python-file package also provides a magic.py module.
9609 ;; This is an unfortunate state of affairs; however, s3cmd
9610 ;; fails to install if it cannot find specifically the
9611 ;; python-magic package. Thus we include it, instead of using
9612 ;; python-file. Ironically, s3cmd sometimes works better
9613 ;; without libmagic bindings at all:
9614 ;; https://github.com/s3tools/s3cmd/issues/198
9615 ("python2-magic" ,python2-magic)))
9616 (home-page "http://s3tools.org/s3cmd")
9617 (synopsis "Command line tool for S3-compatible storage services")
9618 (description
9619 "S3cmd is a command line tool for uploading, retrieving and managing data
9620in storage services that are compatible with the Amazon Simple Storage
9621Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9622GnuPG encryption, and more. It also supports management of Amazon's
9623CloudFront content delivery network.")
9624 (license license:gpl2+)))
9625
9626(define-public python-pkgconfig
9627 (package
9628 (name "python-pkgconfig")
9629 (version "1.3.1")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "pkgconfig" version))
9634 (sha256
9635 (base32
9636 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9637 (build-system python-build-system)
9638 (native-inputs
9639 `(("python-nose" ,python-nose)))
9640 (inputs
9641 `(("pkg-config" ,pkg-config)))
9642 (arguments
9643 `(#:phases
9644 (modify-phases %standard-phases
9645 (add-before 'build 'patch
9646 ;; Hard-code the path to pkg-config.
9647 (lambda _
9648 (substitute* "pkgconfig/pkgconfig.py"
9649 (("cmd = 'pkg-config")
9650 (string-append "cmd = '" (which "pkg-config"))))
9651 #t))
9652 (replace 'check
9653 (lambda _
9654 (invoke "nosetests" "test.py"))))))
9655 (home-page "https://github.com/matze/pkgconfig")
9656 (synopsis "Python interface for pkg-config")
9657 (description "This module provides a Python interface to pkg-config. It
9658can be used to find all pkg-config packages, check if a package exists,
9659check if a package meets certain version requirements, query CFLAGS and
9660LDFLAGS and parse the output to build extensions with setup.py.")
9661 (license license:expat)))
9662
9663(define-public python2-pkgconfig
9664 (package-with-python2 python-pkgconfig))
9665
9666(define-public python-bz2file
9667 (package
9668 (name "python-bz2file")
9669 (version "0.98")
9670 (source
9671 (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "bz2file" version))
9674 (sha256
9675 (base32
9676 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9677 (build-system python-build-system)
9678 (arguments
9679 `(#:tests? #f)) ; Tests use deprecated python modules.
9680 (home-page "https://github.com/nvawda/bz2file")
9681 (synopsis "Read and write bzip2-compressed files")
9682 (description
9683 "Bz2file is a Python library for reading and writing bzip2-compressed
9684files. It contains a drop-in replacement for the I/O interface in the
9685standard library's @code{bz2} module, including features from the latest
9686development version of CPython that are not available in older releases.")
9687 (license license:asl2.0)))
9688
9689(define-public python2-bz2file
9690 (package-with-python2 python-bz2file))
9691
9692(define-public python-future
9693 (package
9694 (name "python-future")
d5d54030 9695 (version "0.17.1")
44d10b1f
RW
9696 (source
9697 (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "future" version))
9700 (sha256
9701 (base32
d5d54030 9702 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9703 (build-system python-build-system)
9704 ;; Many tests connect to the network or are otherwise flawed.
9705 ;; https://github.com/PythonCharmers/python-future/issues/210
9706 (arguments
9707 `(#:tests? #f))
9708 (home-page "http://python-future.org")
9709 (synopsis "Single-source support for Python 3 and 2")
9710 (description
9711 "@code{python-future} is the missing compatibility layer between Python 2 and
9712Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9713to support both Python 2 and Python 3 with minimal overhead.")
9714 (license license:expat)))
9715
9716(define-public python2-future
9717 (package-with-python2 python-future))
9718
9719(define-public python-cysignals
9720 (package
9721 (name "python-cysignals")
8e3e51df 9722 (version "1.9.0")
44d10b1f
RW
9723 (source
9724 (origin
9725 (method url-fetch)
8e3e51df 9726 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9727 (sha256
9728 (base32
8e3e51df 9729 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9730 (build-system python-build-system)
9731 (native-inputs
9732 `(("python-cython" ,python-cython)
9733 ("python-sphinx" ,python-sphinx)))
9734 (inputs
9735 `(("pari-gp" ,pari-gp)))
9736 (arguments
9737 `(#:modules ((guix build python-build-system)
9738 ((guix build gnu-build-system) #:prefix gnu:)
9739 (guix build utils))
9740 ;; FIXME: Tests are executed after installation and currently fail
9741 ;; when not installing into standard locations; the author is working
9742 ;; on a fix.
9743 #:tests? #f
9744 #:phases
9745 (modify-phases %standard-phases
9746 (add-before
9747 'build 'configure
9748 (assoc-ref gnu:%standard-phases 'configure)))))
9749 (home-page
9750 "https://github.com/sagemath/cysignals")
9751 (synopsis
9752 "Handling of interrupts and signals for Cython")
9753 (description
9754 "The cysignals package provides mechanisms to handle interrupts (and
9755other signals and errors) in Cython code, using two related approaches,
9756for mixed Cython/Python code or external C libraries and pure Cython code,
9757respectively.")
9758 (license license:lgpl3+)))
9759
9760(define-public python2-cysignals
9761 (package-with-python2 python-cysignals))
9762
9763(define-public python2-shedskin
9764 (package
9765 (name "python2-shedskin")
9766 (version "0.9.4")
9767 (source
9768 (origin
9769 (method url-fetch)
9770 (uri (string-append "https://github.com/shedskin/shedskin/"
9771 "releases/download/v" version
9772 "/shedskin-" version ".tgz"))
9773 (sha256
9774 (base32
9775 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9776 (build-system python-build-system)
9777 (arguments
9778 `(#:python ,python-2
9779 #:phases (modify-phases %standard-phases
9780 (add-after 'unpack 'fix-resulting-include-libs
9781 (lambda* (#:key inputs #:allow-other-keys)
9782 (let ((libgc (assoc-ref inputs "libgc"))
9783 (pcre (assoc-ref inputs "pcre")))
9784 (substitute* "shedskin/makefile.py"
9785 (("variable == 'CCFLAGS':[ ]*")
9786 (string-append "variable == 'CCFLAGS':\n"
9787 " line += ' -I " pcre "/include"
9788 " -I " libgc "/include'"))
9789 (("variable == 'LFLAGS':[ ]*")
9790 (string-append "variable == 'LFLAGS':\n"
9791 " line += ' -L" pcre "/lib"
9792 " -L " libgc "/lib'")))
9793 #t))))))
9794 (inputs `(("pcre" ,pcre)
9795 ("libgc" ,libgc)))
9796 (home-page "https://shedskin.github.io/")
9797 (synopsis "Experimental Python-2 to C++ Compiler")
9798 (description (string-append "This is an experimental compiler for a subset of
9799Python. It generates C++ code and a Makefile."))
9800 (license (list license:gpl3 license:bsd-3 license:expat))))
9801
9802(define-public python2-rope
9803 (package
9804 (name "python2-rope")
a9ba0a31 9805 (version "0.11.0")
44d10b1f
RW
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "rope" version))
9810 (sha256
9811 (base32
a9ba0a31 9812 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9813 (arguments
afb29715 9814 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9815 `(#:python ,python-2))
9816 (build-system python-build-system)
9817 (native-inputs
9818 `(("python2-unittest2" ,python2-unittest2)))
9819 (home-page "https://github.com/python-rope/rope")
9820 (synopsis "Refactoring library for Python")
9821 (description "Rope is a refactoring library for Python. It facilitates
9822the renaming, moving and extracting of attributes, functions, modules, fields
9823and parameters in Python 2 source code. These refactorings can also be applied
9824to occurrences in strings and comments.")
9825 (license license:gpl2)))
9826
2c880ef4
LC
9827(define-public python-rope
9828 (package
9829 (inherit python2-rope)
9830 (name "python-rope")
9831 (arguments `(#:python ,python-wrapper
9832 ;; XXX: Only partial python3 support, results in some failing
9833 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9834 #:tests? #f))
9835 (properties `((python2-variant . ,(delay python2-rope))))))
9836
44d10b1f
RW
9837(define-public python-py3status
9838 (package
9839 (name "python-py3status")
77f3d303 9840 (version "3.16")
44d10b1f
RW
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "py3status" version))
9845 (sha256
9846 (base32
77f3d303 9847 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9848 (build-system python-build-system)
9849 (inputs
9850 `(("file" ,file)))
9851 (arguments
9852 '(#:phases
9853 (modify-phases %standard-phases
9854 ;; 'file' is used for detection of configuration file encoding
9855 ;; let's make link the dependency to particular input
9856 (add-before 'build 'patch-file-path
9857 (lambda* (#:key inputs #:allow-other-keys)
9858 (let ((file-path (assoc-ref inputs "file")))
9859 (substitute* "py3status/parse_config.py"
9860 (("\\['file', '-b'")
9861 (string-append "['" file-path "/bin/file', '-b'")))
9862 #t))))
9863 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9864 (home-page "https://github.com/ultrabug/py3status")
9865 (synopsis "Extensible i3status wrapper written in Python")
9866 (description "py3status is an i3status wrapper which extends i3status
9867functionality in a modular way, allowing you to extend your panel with your
9868own code, responding to click events and updating clock every second.")
9869 (license license:bsd-3)))
9870
9871(define-public python-tblib
9872 (package
9873 (name "python-tblib")
9874 (version "1.3.2")
9875 (source (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "tblib" version))
9878 (sha256 (base32
9879 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9880 (build-system python-build-system)
9881 (arguments
9882 `(#:phases
9883 (modify-phases %standard-phases
9884 (add-before 'check 'adjust-tests
9885 (lambda _
9886 (when (which "python3")
9887 ;; Adjust the example output to match that of Python 3.7:
9888 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9889 (substitute* "README.rst"
9890 (("Exception\\('fail',") "Exception('fail'"))
9891 #t)))
9892 (replace 'check
9893 (lambda _
9894 ;; Upstream runs tests after installation and the package itself
9895 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9896 ;; found.
9897 (setenv "PYTHONPATH"
9898 (string-append (getcwd) "/build/lib:"
9899 (getenv "PYTHONPATH")))
9900 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9901 (native-inputs
9902 `(("python-pytest" ,python-pytest)
9903 ("python-six" ,python-six)))
9904 (home-page "https://github.com/ionelmc/python-tblib")
9905 (synopsis "Traceback serialization library")
9906 (description
9907 "Traceback serialization allows you to:
9908
9909@enumerate
9910@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9911different processes. This allows better error handling when running code over
9912multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9913
9914@item Parse traceback strings and raise with the parsed tracebacks.
9915@end enumerate\n")
9916 (license license:bsd-3)))
9917
9918(define-public python2-tblib
9919 (package-with-python2 python-tblib))
9920
9921(define-public python-greenlet
9922 (package
9923 (name "python-greenlet")
9924 (version "0.4.15")
9925 (source (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "greenlet" version))
9928 (sha256
9929 (base32
9930 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9931 (build-system python-build-system)
9932 (home-page "https://greenlet.readthedocs.io/")
9933 (synopsis "Lightweight in-process concurrent programming")
9934 (description
9935 "Greenlet package is a spin-off of Stackless, a version of CPython
9936that supports micro-threads called \"tasklets\". Tasklets run
9937pseudo-concurrently (typically in a single or a few OS-level threads) and
9938are synchronized with data exchanges on \"channels\".")
9939 (license (list license:psfl license:expat))))
9940
9941(define-public python2-greenlet
9942 (package-with-python2 python-greenlet))
9943
9944(define-public python-objgraph
9945 (package
9946 (name "python-objgraph")
9947 (version "3.4.0")
9948 (source
9949 (origin
9950 (method url-fetch)
9951 (uri (pypi-uri "objgraph" version))
9952 (sha256
9953 (base32
9954 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9955 (build-system python-build-system)
9956 (propagated-inputs
9957 `(("python-graphviz" ,python-graphviz)))
9958 (native-inputs
9959 `(("python-mock" ,python-mock)
9960 ("graphviz" ,graphviz)))
9961 (home-page "https://mg.pov.lt/objgraph/")
9962 (synopsis "Draw Python object reference graphs with graphviz")
9963 (description
9964 "This package provides tools to draw Python object reference graphs with
9965graphviz.")
9966 (license license:expat)))
9967
9968(define-public python-gevent
9969 (package
9970 (name "python-gevent")
9971 (version "1.3.7")
9972 (source (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "gevent" version))
9975 (sha256
9976 (base32
9977 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9978 (modules '((guix build utils)))
9979 (snippet
9980 '(begin
9981 ;; unbunding libev and c-ares
9982 (delete-file-recursively "deps")
9983 #t))))
9984 (build-system python-build-system)
9985 (arguments
9986 `(#:modules ((ice-9 ftw)
9987 (ice-9 match)
9988 (srfi srfi-26)
9989 (guix build utils)
9990 (guix build python-build-system))
9991 #:phases (modify-phases %standard-phases
9992 (add-after 'unpack 'unpack-libev
9993 (lambda* (#:key inputs #:allow-other-keys)
9994 (mkdir-p "deps/libev")
9995 ;; FIXME: gevent requires building libev, even though
9996 ;; it only links against the proper one.
9997 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9998 "--strip-components=1" "-C" "deps/libev")))
9999 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10000 (lambda _
10001 (substitute* "src/gevent/subprocess.py"
10002 (("/bin/sh") (which "sh")))
10003 (for-each (lambda (file)
10004 (substitute* file
10005 (("/bin/sh") (which "sh"))
10006 (("/bin/true") (which "true"))))
10007 (find-files "src/greentest" "\\.py$"))
10008 #t))
10009 (add-before 'build 'do-not-use-bundled-sources
10010 (lambda* (#:key inputs #:allow-other-keys)
10011 (setenv "CONFIG_SHELL" (which "bash"))
10012 (setenv "LIBEV_EMBED" "false")
10013 (setenv "CARES_EMBED" "false")
10014 (setenv "EMBED" "false")
10015
10016 (let ((greenlet (string-append
10017 (assoc-ref inputs "python-greenlet")
10018 "/include")))
10019 (match (scandir greenlet
10020 (lambda (item)
10021 (string-prefix? "python" item)))
10022 ((python)
10023 (setenv "CPATH"
10024 (string-append greenlet "/" python)))))
10025 #t))
10026 (add-before 'check 'skip-timer-test
10027 (lambda _
10028 ;; XXX: Skip 'TestTimerResolution', which appears to be
10029 ;; unreliable.
10030 (substitute* "src/greentest/test__core_timer.py"
10031 (("not greentest.RUNNING_ON_CI") "False"))
10032 #t))
10033 (replace 'check
10034 (lambda _
10035 ;; Make sure the build directory is on PYTHONPATH.
10036 (setenv "PYTHONPATH"
10037 (string-append
10038 (getenv "PYTHONPATH") ":"
10039 (getcwd) "/build/"
10040 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10041 (with-directory-excursion "src/greentest"
10042 ;; XXX: Many tests require network access. Instead we only
10043 ;; run known-good tests. Unfortunately we cannot use
10044 ;; recursion here since this directory also contains
10045 ;; Python-version-specific subfolders.
10046 (apply invoke "python" "testrunner.py" "--config"
10047 "known_failures.py"
10048 (scandir "." (cut regexp-exec
10049 (make-regexp "test_+(subprocess|core)")
10050 <>)))))))))
10051 (propagated-inputs
10052 `(("python-greenlet" ,python-greenlet)
10053 ("python-objgraph" ,python-objgraph)))
10054 (native-inputs
10055 `(("libev-source" ,(package-source libev))
10056 ("python-six" ,python-six)))
10057 (inputs
10058 `(("c-ares" ,c-ares)
10059 ("libev" ,libev)))
10060 (home-page "http://www.gevent.org/")
10061 (synopsis "Coroutine-based network library")
10062 (description
10063 "gevent is a coroutine-based Python networking library that uses greenlet
10064to provide a high-level synchronous API on top of the libev event loop.")
10065 (license license:expat)
10066 (properties `((python2-variant . ,(delay python2-gevent))))))
10067
10068(define-public python2-gevent
10069 (let ((base (package-with-python2
10070 (strip-python2-variant python-gevent))))
10071 (package
10072 (inherit base)
10073 (native-inputs `(,@(package-native-inputs python-gevent)
10074 ("python-mock" ,python2-mock))))))
10075
10076(define-public python-fastimport
10077 (package
10078 (name "python-fastimport")
10079 (version "0.9.6")
10080 (source
10081 (origin
10082 (method url-fetch)
10083 (uri (pypi-uri "fastimport" version))
10084 (sha256
10085 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10086 (build-system python-build-system)
10087 (home-page "https://github.com/jelmer/python-fastimport")
10088 (synopsis "VCS fastimport parser and generator in Python")
10089 (description "This package provides a parser for and generator of the Git
10090@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10091format.")
10092 (license license:gpl2+)))
10093
10094(define-public python2-fastimport
10095 (package-with-python2 python-fastimport))
10096
10097(define-public python-twisted
10098 (package
10099 (name "python-twisted")
fdfad2fc 10100 (version "19.7.0")
44d10b1f
RW
10101 (source (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10104 (sha256
10105 (base32
fdfad2fc 10106 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10107 (build-system python-build-system)
10108 (arguments
0107c9b8 10109 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10110 (propagated-inputs
10111 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10112 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10113 ("python-incremental" ,python-incremental)
e5ba2fe3 10114 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10115 ("python-constantly" ,python-constantly)
10116 ("python-automat" ,python-automat)))
10117 (home-page "https://twistedmatrix.com/")
10118 (synopsis "Asynchronous networking framework written in Python")
10119 (description
10120 "Twisted is an extensible framework for Python programming, with special
10121focus on event-based network programming and multiprotocol integration.")
10122 (license license:expat)))
10123
10124(define-public python2-twisted
10125 (package-with-python2 python-twisted))
10126
10127(define-public python-pika
10128 (package
10129 (name "python-pika")
10130 (version "0.12.0")
10131 (source
10132 (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "pika" version))
10135 (sha256
10136 (base32
10137 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10138 (build-system python-build-system)
10139 (native-inputs
10140 `(("python-pyev" ,python-pyev)
10141 ("python-tornado" ,python-tornado)
10142 ("python-twisted" ,python-twisted)))
10143 (home-page "https://pika.readthedocs.org")
10144 (synopsis "Pure Python AMQP Client Library")
10145 (description
10146 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10147Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10148network support library.")
10149 (license license:bsd-3)))
10150
10151(define-public python2-pika
10152 (package-with-python2 python-pika))
10153
10154(define-public python-ply
10155 (package
10156 (name "python-ply")
10157 (version "3.10")
10158 (source
10159 (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "ply" version))
10162 (sha256
10163 (base32
10164 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10165 (build-system python-build-system)
10166 (home-page "http://www.dabeaz.com/ply/")
10167 (synopsis "Python Lex & Yacc")
10168 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10169It uses LR parsing and does extensive error checking.")
10170 (license license:bsd-3)))
10171
10172(define-public python2-ply
10173 (package-with-python2 python-ply))
10174
10175(define-public python-tabulate
10176 (package
10177 (name "python-tabulate")
10178 (version "0.7.7")
10179 (source (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "tabulate" version))
10182 (sha256
10183 (base32
10184 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10185 (build-system python-build-system)
10186 (arguments
10187 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10188 ;; and the latest release is not tagged in the upstream repository.
10189 '(#:tests? #f))
10190 (home-page "https://bitbucket.org/astanin/python-tabulate")
10191 (synopsis "Pretty-print tabular data")
10192 (description
10193 "Tabulate is a library and command-line utility to pretty-print tabular
10194data in Python.")
10195 (license license:expat)))
10196
10197(define-public python2-tabulate
10198 (package-with-python2 python-tabulate))
10199
10200(define-public python-kazoo
10201 (package
10202 (name "python-kazoo")
10203 (version "2.4.0")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "kazoo" version))
10208 (sha256
10209 (base32
10210 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10211 (build-system python-build-system)
10212 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10213 (propagated-inputs
10214 `(("python-six" ,python-six)))
10215 (home-page "https://kazoo.readthedocs.org")
10216 (synopsis "High-level Zookeeper client library")
10217 (description
10218 "Kazoo is a Python client library for the Apache Zookeeper distributed
10219application service. It is designed to be easy to use and to avoid common
10220programming errors.")
10221 (license license:asl2.0)))
10222
10223(define-public python2-kazoo
10224 (package-with-python2 python-kazoo))
10225
10226(define-public python-pykafka
10227 (package
10228 (name "python-pykafka")
10229 (version "2.4.0")
10230 (source (origin
10231 (method url-fetch)
0ca1d040 10232 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10233 (sha256
10234 (base32
10235 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10236 (build-system python-build-system)
10237 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10238 (propagated-inputs
10239 `(("python-gevent" ,python-gevent)
10240 ("python-kazoo" ,python-kazoo)
10241 ("python-tabulate" ,python-tabulate)))
10242 (inputs
10243 `(("librdkafka" ,librdkafka)))
10244 (home-page "https://pykafka.readthedocs.io/")
10245 (synopsis "Apache Kafka client for Python")
10246 (description
10247 "PyKafka is a client for the Apache Kafka distributed messaging system.
10248It includes Python implementations of Kafka producers and consumers, which
10249are optionally backed by a C extension built on librdkafka.")
10250 (license license:asl2.0)))
10251
10252(define-public python2-pykafka
10253 (package-with-python2 python-pykafka))
10254
10255(define-public python-wcwidth
10256 (package
10257 (name "python-wcwidth")
10258 (version "0.1.7")
10259 (source
10260 (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "wcwidth" version))
10263 (sha256
10264 (base32
10265 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10266 (build-system python-build-system)
10267 (home-page "https://github.com/jquast/wcwidth")
10268 (synopsis "Measure number of terminal column cells of wide-character codes")
10269 (description "Wcwidth measures the number of terminal column cells of
10270wide-character codes. It is useful for those implementing a terminal emulator,
10271or programs that carefully produce output to be interpreted by one. It is a
10272Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10273specified in POSIX.1-2001 and POSIX.1-2008.")
10274 (license license:expat)))
10275
10276(define-public python2-wcwidth
10277 (package-with-python2 python-wcwidth))
10278
10279(define-public python2-jsonrpclib
10280 (package
10281 (name "python2-jsonrpclib")
10282 (version "0.1.7")
10283 (source (origin
10284 (method url-fetch)
6571bba0 10285 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10286 (sha256
10287 (base32
10288 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10289 (build-system python-build-system)
10290 (arguments
10291 `(#:tests? #f
10292 #:python ,python-2))
10293 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10294 (synopsis "Implementation of JSON-RPC specification for Python")
10295 (description
10296 "This library is an implementation of the JSON-RPC specification.
10297It supports both the original 1.0 specification, as well as the
10298new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10299etc.")
10300 (license license:asl2.0)))
10301
10302(define-public python-chai
10303 (package
10304 (name "python-chai")
10305 (version "1.1.2")
10306 (source (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "chai" version))
10309 (sha256
10310 (base32
10311 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10312 (build-system python-build-system)
10313 (home-page "https://github.com/agoragames/chai")
10314 (synopsis "Mocking framework for Python")
10315 (description
10316 "Chai provides an api for mocking, stubbing and spying your python
10317objects, patterned after the Mocha library for Ruby.")
10318 (license license:bsd-3)))
10319
10320(define-public python2-chai
10321 (package-with-python2 python-chai))
10322
10323(define-public python-inflection
10324 (package
10325 (name "python-inflection")
10326 (version "0.3.1")
10327 (source
10328 (origin (method url-fetch)
10329 (uri (pypi-uri "inflection" version))
10330 (sha256
10331 (base32
10332 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10333 (build-system python-build-system)
10334 (native-inputs
10335 `(("python-pytest" ,python-pytest)))
10336 (home-page "https://github.com/jpvanhal/inflection")
10337 (synopsis "Python string transformation library")
10338 (description
10339 "Inflection is a string transformation library. It singularizes
10340and pluralizes English words, and transforms strings from CamelCase to
10341underscored string.")
10342 (license license:expat)))
10343
10344(define-public python2-inflection
10345 (package-with-python2 python-inflection))
10346
10347(define-public python-pylev
10348 (package
10349 (name "python-pylev")
10350 (version "1.3.0")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "pylev" version))
10354 (sha256
10355 (base32
10356 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10357 (build-system python-build-system)
10358 (home-page "https://github.com/toastdriven/pylev")
10359 (synopsis "Levenshtein distance implementation in Python")
10360 (description "Pure Python Levenshtein implementation, based off the
10361Wikipedia code samples at
10362@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10363 (license license:bsd-3)))
10364
10365(define-public python2-pylev
10366 (package-with-python2 python-pylev))
10367
10368(define-public python-cleo
10369 (package
10370 (name "python-cleo")
10371 (version "0.6.1")
10372 (source (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "cleo" version))
10375 (sha256
10376 (base32
10377 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10378 (build-system python-build-system)
10379 (native-inputs
10380 `(;; For testing
10381 ("python-mock" ,python-mock)
10382 ("python-pytest-mock" ,python-pytest-mock)
10383 ("python-pytest" ,python-pytest)))
10384 (propagated-inputs
10385 `(("python-backpack" ,python-backpack)
10386 ("python-pastel" ,python-pastel)
10387 ("python-pylev" ,python-pylev)))
10388 (home-page "https://github.com/sdispater/cleo")
10389 (synopsis "Command-line arguments library for Python")
10390 (description
10391 "Cleo allows you to create command-line commands with signature in
10392docstring and colored output.")
10393 (license license:expat)))
10394
10395(define-public python2-cleo
10396 (package-with-python2 python-cleo))
10397
10398(define-public python-lazy-object-proxy
10399 (package
10400 (name "python-lazy-object-proxy")
10401 (version "1.3.1")
10402 (source (origin
10403 (method url-fetch)
10404 (uri (pypi-uri "lazy-object-proxy" version))
10405 (sha256
10406 (base32
10407 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10408 (build-system python-build-system)
10409 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10410 (synopsis "Lazy object proxy for python")
10411 (description
10412 "Lazy object proxy is an object that wraps a callable but defers the call
10413until the object is actually required, and caches the result of said call.")
10414 (license license:bsd-2)))
10415
10416(define-public python2-lazy-object-proxy
10417 (package-with-python2 python-lazy-object-proxy))
10418
10419(define-public python-dnspython
10420 (package
10421 (name "python-dnspython")
10422 (version "1.15.0")
10423 (source (origin
10424 (method url-fetch)
10425 (uri (string-append "http://www.dnspython.org/kits/"
10426 version "/dnspython-" version ".tar.gz"))
10427 (sha256
10428 (base32
10429 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10430 (build-system python-build-system)
10431 (arguments '(#:tests? #f)) ; XXX: requires internet access
10432 (home-page "http://www.dnspython.org")
10433 (synopsis "DNS toolkit for Python")
10434 (description
10435 "dnspython is a DNS toolkit for Python. It supports almost all record
10436types. It can be used for queries, zone transfers, and dynamic updates.
10437It supports TSIG authenticated messages and EDNS0.")
10438 (license license:expat)))
10439
10440(define-public python2-dnspython
10441 (package-with-python2 python-dnspython))
10442
10443(define-public python-email-validator
10444 (package
10445 (name "python-email-validator")
10446 (version "1.0.2")
10447 (source
10448 (origin (method url-fetch)
10449 (uri (pypi-uri "email_validator" version))
10450 (sha256
10451 (base32
10452 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10453 (build-system python-build-system)
10454 (arguments
10455 '(#:phases
10456 (modify-phases %standard-phases
10457 (add-before 'build 'use-dnspython
10458 (lambda _
10459 (substitute* "setup.py"
10460 (("dnspython3") "dnspython"))
10461 #t)))))
10462 (propagated-inputs
10463 `(("python-dnspython" ,python-dnspython)
10464 ("python-idna" ,python-idna)))
10465 (home-page "https://github.com/JoshData/python-email-validator")
10466 (synopsis "Email address validation library for Python")
10467 (description
10468 "This library validates email address syntax and deliverability.")
10469 (license license:cc0)))
10470
10471(define-public python2-email-validator
10472 (package-with-python2 python-email-validator))
10473
10474(define-public python-ukpostcodeparser
10475 (package
10476 (name "python-ukpostcodeparser")
10477 (version "1.0.3")
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "UkPostcodeParser" version))
10481 (sha256
10482 (base32
10483 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10484 (build-system python-build-system)
10485 (home-page "https://github.com/hamstah/ukpostcodeparser")
10486 (synopsis "UK Postcode parser for Python")
10487 (description
10488 "This library provides the @code{parse_uk_postcode} function for
10489parsing UK postcodes.")
10490 (license license:expat)))
10491
10492(define-public python2-ukpostcodeparser
10493 (package-with-python2 python-ukpostcodeparser))
10494
10495(define-public python-faker
10496 (package
10497 (name "python-faker")
10498 (version "0.7.9")
10499 (source (origin
10500 (method url-fetch)
10501 (uri (pypi-uri "Faker" version))
10502 (sha256
10503 (base32
10504 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10505 (patches
10506 (search-patches "python-faker-fix-build-32bit.patch"))
10507 (modules '((guix build utils)))
10508 (snippet
10509 '(begin
10510 (for-each delete-file (find-files "." "\\.pyc$"))
10511 #t))))
10512 (build-system python-build-system)
10513 (arguments
10514 '(#:phases
10515 (modify-phases %standard-phases
10516 (replace 'check
49ff8827 10517 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10518 (native-inputs
10519 `(;; For testing
10520 ("python-email-validator" ,python-email-validator)
10521 ("python-mock" ,python-mock)
10522 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10523 (propagated-inputs
10524 `(("python-dateutil" ,python-dateutil)
10525 ("python-six" ,python-six)))
10526 (home-page "https://github.com/joke2k/faker")
10527 (synopsis "Python package that generates fake data")
10528 (description
10529 "Faker is a Python package that generates fake data such as names,
10530addresses, and phone numbers.")
10531 (license license:expat)
10532 (properties `((python2-variant . ,(delay python2-faker))))))
10533
10534(define-public python2-faker
10535 (let ((base (package-with-python2 (strip-python2-variant
10536 python-faker))))
10537 (package
10538 (inherit base)
10539 (propagated-inputs
10540 `(("python2-ipaddress" ,python2-ipaddress)
10541 ,@(package-propagated-inputs base))))))
10542
10543(define-public python-pyaml
10544 (package
10545 (name "python-pyaml")
10546 (version "18.11.0")
10547 (source (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "pyaml" version))
10550 (sha256
10551 (base32
10552 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10553 (build-system python-build-system)
10554 (native-inputs
10555 `(("python-unidecode" ,python-unidecode)))
10556 (propagated-inputs
10557 `(("python-pyyaml" ,python-pyyaml)))
10558 (home-page "https://github.com/mk-fg/pretty-yaml")
10559 (synopsis "YAML pretty-print library for Python")
10560 (description
10561 "pyaml is a PyYAML based python module to produce pretty and readable
10562YAML-serialized data.")
492e3a7a 10563 (license license:wtfpl2)))
44d10b1f
RW
10564
10565(define-public python2-pyaml
10566 (package-with-python2 python-pyaml))
10567
10568(define-public python-backpack
10569 (package
10570 (name "python-backpack")
10571 (version "0.1")
10572 (source
10573 (origin
10574 (method url-fetch)
10575 (uri (pypi-uri "backpack" version))
10576 (sha256
10577 (base32
10578 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10579 (build-system python-build-system)
10580 (native-inputs
10581 `(("python-pytest" ,python-pytest)
10582 ("python-nose" ,python-nose)))
10583 (propagated-inputs
10584 `(("python-simplejson" ,python-simplejson)))
10585 (home-page "https://github.com/sdispater/backpack")
10586 (synopsis "Utilities for working with Python collections")
10587 (description "Backpack provides some useful utilities for working with
10588collections of data.")
10589 (license license:expat)))
10590
10591(define-public python2-backpack
10592 (package-with-python2 python-backpack))
10593
10594(define-public python-prompt-toolkit
10595 (package
10596 (name "python-prompt-toolkit")
10597 (version "2.0.7")
10598 (source
10599 (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10602 (sha256
10603 (base32
10604 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10605 (build-system python-build-system)
10606 (arguments
10607 `(#:phases
10608 (modify-phases %standard-phases
10609 (delete 'check)
10610 (add-after 'install 'post-install-check
10611 (lambda* (#:key inputs outputs #:allow-other-keys)
10612 ;; HOME is needed for the test
10613 ;; "test_pathcompleter_can_expanduser".
10614 (setenv "HOME" "/tmp")
10615 (add-installed-pythonpath inputs outputs)
10616 (invoke "py.test"))))))
10617 (propagated-inputs
10618 `(("python-wcwidth" ,python-wcwidth)
10619 ("python-six" ,python-six)
10620 ("python-pygments" ,python-pygments)))
10621 (native-inputs
10622 `(("python-pytest" ,python-pytest)))
10623 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10624 (synopsis "Library for building command line interfaces in Python")
10625 (description
10626 "Prompt-Toolkit is a library for building interactive command line
10627interfaces in Python. It's like GNU Readline but it also features syntax
10628highlighting while typing, out-of-the-box multi-line input editing, advanced
10629code completion, incremental search, support for Chinese double-width
10630characters, mouse support, and auto suggestions.")
10631 (license license:bsd-3)))
10632
10633(define-public python2-prompt-toolkit
10634 (package-with-python2 python-prompt-toolkit))
10635
10636(define-public python-prompt-toolkit-1
10637 (package (inherit python-prompt-toolkit)
10638 (version "1.0.15")
10639 (source
10640 (origin
10641 (method url-fetch)
10642 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10643 (sha256
10644 (base32
10645 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10646
10647(define-public python2-prompt-toolkit-1
10648 (package-with-python2 python-prompt-toolkit-1))
10649
10650(define-public python-jedi
10651 (package
10652 (name "python-jedi")
296e1aea 10653 (version "0.15.1")
44d10b1f
RW
10654 (source
10655 (origin
10656 (method url-fetch)
10657 (uri (pypi-uri "jedi" version))
10658 (sha256
10659 (base32
296e1aea 10660 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10661 (build-system python-build-system)
10662 (arguments
296e1aea 10663 `(#:phases
44d10b1f 10664 (modify-phases %standard-phases
296e1aea
MC
10665 (add-after 'unpack 'disable-file-completion-test
10666 ;; A single parameterized test currently fail (see:
10667 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10668 (lambda _
10669 (substitute* "test/test_api/test_completion.py"
10670 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10671 #t))
44d10b1f 10672 (replace 'check
296e1aea
MC
10673 (lambda _
10674 (setenv "HOME" "/tmp")
10675 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10676 (native-inputs
10677 `(("python-pytest" ,python-pytest)
10678 ("python-docopt" ,python-docopt)))
10679 (propagated-inputs
10680 `(("python-parso" ,python-parso)))
10681 (home-page "https://github.com/davidhalter/jedi")
10682 (synopsis "Autocompletion and static analysis library for Python")
10683 (description
10684 "Jedi is a static analysis tool for Python that can be used in Integrated
10685Development Environments (@dfn{IDE}s) and text editors. It understands Python
10686on a deeper level than many other static analysis frameworks for Python.
10687
10688Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10689well.")
10690 (license license:expat)))
10691
10692(define-public python2-jedi
296e1aea 10693 (package-with-python2 python-jedi))
44d10b1f
RW
10694
10695(define-public ptpython
10696 (package
10697 (name "ptpython")
10698 (version "0.34")
10699 (source (origin
10700 (method url-fetch)
10701 (uri (pypi-uri "ptpython" version))
10702 (sha256
10703 (base32
10704 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10705 (build-system python-build-system)
10706 (arguments
10707 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10708 (propagated-inputs
10709 `(("python-docopt" ,python-docopt)
10710 ("python-jedi" ,python-jedi)
10711 ("python-prompt-toolkit" ,python-prompt-toolkit)
10712 ("python-pygments" ,python-pygments)))
10713 (home-page "https://github.com/jonathanslenders/ptpython")
10714 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10715 (description
10716 "ptpython is a Python read-eval-print loop with IDE-like features.
10717It supports syntax highlighting, multiline editing, autocompletion, mouse,
10718color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10719etc.")
10720 (license license:bsd-3)
10721 (properties `((python2-variant . ,(delay ptpython-2))))))
10722
10723(define-public ptpython-2
10724 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10725 (package
10726 (inherit base)
10727 (name "ptpython2"))))
10728
10729(define-public python-stem
10730 (package
10731 (name "python-stem")
e746d1c3 10732 (version "1.7.1")
44d10b1f
RW
10733 (source
10734 (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "stem" version))
10737 (sha256
10738 (base32
e746d1c3 10739 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10740 (build-system python-build-system)
10741 (arguments
10742 `(#:phases
10743 (modify-phases %standard-phases
10744 (replace 'check
10745 (lambda _
10746 (invoke "./run_tests.py" "--unit")
10747 #t)))))
10748 (native-inputs
10749 `(("python-mock" ,python-mock)
10750 ("python-pycodestyle" ,python-pycodestyle)
10751 ("python-pyflakes" ,python-pyflakes)))
10752 (home-page "https://stem.torproject.org/")
10753 (synopsis
10754 "Python controller library that allows applications to interact with Tor")
10755 (description
10756 "Stem is a Python controller library for Tor. With it you can use Tor's
10757control protocol to script against the Tor process and read descriptor data
10758relays publish about themselves.")
10759 (license license:lgpl3)))
10760
10761(define-public python2-stem
10762 (package-with-python2 python-stem))
10763
10764(define-public python-pyserial
10765 (package
10766 (name "python-pyserial")
10767 (version "3.1.1")
10768 (source
10769 (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "pyserial" version))
10772 (sha256
10773 (base32
10774 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10775 (build-system python-build-system)
10776 (arguments
10777 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10778 ;; #:phases
10779 ;; (modify-phases %standard-phases
10780 ;; (replace 'check
10781 ;; (lambda _
10782 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10783 (home-page
10784 "https://github.com/pyserial/pyserial")
10785 (synopsis "Python Serial Port Bindings")
10786 (description "@code{pyserial} provide serial port bindings for Python. It
10787supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10788and/or Xon/Xoff. The port is accessed in RAW mode.")
10789 (license license:bsd-3)))
10790
10791(define-public python2-pyserial
10792 (package-with-python2 python-pyserial))
10793
10794(define-public python-kivy
10795 (package
10796 (name "python-kivy")
10797 (version "1.10.1")
10798 (source
10799 (origin
10800 (method url-fetch)
10801 (uri (pypi-uri "Kivy" version))
10802 (file-name (string-append name "-" version ".tar.gz"))
10803 (sha256
10804 (base32
10805 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10806 (build-system python-build-system)
10807 (arguments
10808 `(#:tests? #f ; Tests require many optional packages
10809 #:phases
10810 (modify-phases %standard-phases
10811 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10812 (lambda* (#:key inputs #:allow-other-keys)
10813 (setenv "KIVY_SDL2_PATH"
10814 (string-append (assoc-ref inputs "sdl-union")
10815 "/include/SDL2"))
10816 #t)))))
10817 (native-inputs
10818 `(("git" ,git)
10819 ("pkg-config" ,pkg-config)
10820 ("python-cython" ,python-cython)))
10821 (inputs
10822 `(("gstreamer" ,gstreamer)
10823 ("mesa" ,mesa)
10824 ("sdl-union"
10825 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10826 (home-page "http://kivy.org")
10827 (synopsis
10828 "Multitouch application framework")
10829 (description
10830 "A software library for rapid development of
10831hardware-accelerated multitouch applications.")
10832 (license license:expat)))
10833
10834(define-public python2-kivy
10835 (package-with-python2 python-kivy))
10836
10837(define-public python-kivy-next
10838 (deprecated-package "python-kivy-next" python-kivy))
10839
10840(define-public python2-kivy-next
10841 (deprecated-package "python2-kivy-next" python2-kivy))
10842
10843(define-public python-binaryornot
10844 (package
10845 (name "python-binaryornot")
10846 (version "0.4.4")
10847 (source (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "binaryornot" version))
10850 (sha256
10851 (base32
10852 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10853 (build-system python-build-system)
10854 (propagated-inputs
10855 `(("python-chardet" ,python-chardet)
10856 ("python-hypothesis" ,python-hypothesis)))
10857 (home-page "https://github.com/audreyr/binaryornot")
10858 (synopsis "Package to check if a file is binary or text")
10859 (description "Ultra-lightweight pure Python package to check if a file is
10860binary or text.")
10861 (license license:bsd-3)
10862 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10863
10864(define-public python2-binaryornot
10865 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10866 (package (inherit base)
10867 (propagated-inputs
10868 `(("python2-enum34" ,python2-enum34)
10869 ,@(package-propagated-inputs base))))))
10870
10871(define-public python-nltk
10872 (package
10873 (name "python-nltk")
10874 (version "3.2.1")
10875 (source (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "nltk" version))
10878 (sha256
10879 (base32
10880 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10881 (build-system python-build-system)
10882 (arguments
10883 '(;; The tests require some extra resources to be downloaded.
10884 ;; TODO Try packaging these resources.
10885 #:tests? #f))
10886 (home-page "http://nltk.org/")
10887 (synopsis "Natural Language Toolkit")
10888 (description "It provides interfaces to over 50 corpora and lexical
10889resources such as WordNet, along with a suite of text processing libraries
10890for classification, tokenization, stemming, tagging, parsing, and semantic
10891reasoning, wrappers for natural language processing libraries.")
10892 (license license:asl2.0)))
10893
10894(define-public python2-nltk
10895 (package-with-python2 python-nltk))
10896
10897(define-public python-pymongo
10898 (package
10899 (name "python-pymongo")
10900 (version "3.7.2")
10901 (source (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "pymongo" version))
10904 (sha256
10905 (base32
10906 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10907 (build-system python-build-system)
10908 (propagated-inputs
10909 `(("python-certifi" ,python-certifi)))
10910 (home-page "https://github.com/mongodb/mongo-python-driver")
10911 (synopsis "Python driver for MongoDB")
10912 (description "Python driver for MongoDB.")
10913 (license license:asl2.0)))
10914
10915(define-public python2-pymongo
10916 (package-with-python2 python-pymongo))
10917
44d10b1f
RW
10918(define-public python-consul
10919 (package
10920 (name "python-consul")
10921 (version "0.6.1")
10922 (source
10923 (origin
10924 (method url-fetch)
10925 (uri (pypi-uri "python-consul" version))
10926 (sha256
10927 (base32
10928 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10929 (build-system python-build-system)
10930 (arguments
10931 '(#:tests? #f)) ; The tests are not distributed
10932 (propagated-inputs
10933 `(("python-requests" ,python-requests)
10934 ("python-six" ,python-six)))
10935 (home-page "https://github.com/cablehead/python-consul")
10936 (synopsis "Python client for Consul")
10937 (description
10938 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10939discovery, monitoring and configuration.")
10940 (license license:expat)))
10941
10942(define-public python2-consul
10943 (package-with-python2 python-consul))
10944
10945(define-public python-schematics
10946 (package
10947 (name "python-schematics")
10948 (version "1.1.1")
10949 (source
1961d187
TGR
10950 (origin
10951 (method git-fetch)
10952 (uri (git-reference
10953 (url "https://github.com/schematics/schematics.git")
10954 (commit (string-append "v" version))))
10955 (file-name (git-file-name name version))
10956 (sha256
10957 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10958 (build-system python-build-system)
10959 (propagated-inputs
10960 `(("python-six" ,python-six)))
10961 (arguments
1961d187
TGR
10962 ;; The tests require a bunch of not very nice packages with fixed
10963 ;; version requirements (e.g. python-coveralls).
10964 `(#:tests? #f))
44d10b1f
RW
10965 (home-page "https://github.com/schematics/schematics")
10966 (synopsis "Python Data Structures for Humans")
10967 (description "Python Data Structures for Humans.")
10968 (license license:bsd-3)))
10969
10970(define-public python2-schematics
10971 (package-with-python2 python-schematics))
10972
10973(define-public python-odfpy
10974 (package
10975 (name "python-odfpy")
10976 (version "1.3.3")
10977 (source (origin
10978 (method url-fetch)
10979 (uri (pypi-uri "odfpy" version))
10980 (sha256
10981 (base32
10982 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10983 (arguments
10984 `(#:modules ((srfi srfi-1)
10985 (guix build python-build-system)
10986 (guix build utils))
10987 #:phases
10988 (modify-phases %standard-phases
10989 (replace 'check
10990 ;; The test runner invokes python2 and python3 for test*.py.
10991 ;; To avoid having both in inputs, we replicate it here.
10992 (lambda _
21ccc01d
RW
10993 (for-each (lambda (test-file) (invoke "python" test-file))
10994 (find-files "tests" "^test.*\\.py$"))
10995 #t)))))
44d10b1f
RW
10996 (build-system python-build-system)
10997 (home-page "https://github.com/eea/odfpy")
10998 (synopsis "Python API and tools to manipulate OpenDocument files")
10999 (description "Collection of libraries and utility programs written in
11000Python to manipulate OpenDocument 1.2 files.")
11001 (license
11002 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11003 ;; number of files with other licenses.
11004 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11005
11006(define-public python2-odfpy
11007 (package-with-python2 python-odfpy))
11008
11009(define-public python-natsort
11010 (package
11011 (name "python-natsort")
11012 (version "5.4.1")
11013 (source (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "natsort" version))
11016 (sha256
11017 (base32
11018 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11019 (build-system python-build-system)
11020 (arguments
11021 `(#:modules ((guix build utils)
11022 (guix build python-build-system)
11023 (srfi srfi-1)
11024 (srfi srfi-26)
11025 (ice-9 ftw))
11026 #:phases
11027 (modify-phases %standard-phases
11028 (add-before 'check 'set-cachedir
11029 ;; Tests require write access to $HOME by default
11030 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11031 (replace 'check
11032 (lambda _
11033 (let ((cwd (getcwd)))
11034 (setenv "PYTHONPATH"
11035 (string-append
11036 cwd "/build/"
11037 (find (cut string-prefix? "lib" <>)
11038 (scandir (string-append cwd "/build")))
11039 ":"
11040 (getenv "PYTHONPATH")))
11041 (invoke "pytest" "-v")))))))
11042 (native-inputs
11043 `(("python-hypothesis" ,python-hypothesis)
11044 ("python-pytest-cov" ,python-pytest-cov)
11045 ("python-pytest-mock" ,python-pytest-mock)
11046 ("python-pytest" ,python-pytest)))
11047 (propagated-inputs ; TODO: Add python-fastnumbers.
11048 `(("python-pyicu" ,python-pyicu)))
11049 (home-page "https://github.com/SethMMorton/natsort")
11050 (synopsis "Natural sorting for python and shell")
11051 (description
11052 "Natsort lets you apply natural sorting on lists instead of
11053lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11054on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11055@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11056@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11057identifies numbers and sorts them separately from strings. It can also sort
11058version numbers, real numbers, mixed types and more, and comes with a shell
11059command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11060 (license license:expat)
11061 (properties `((python2-variant . ,(delay python2-natsort))))))
11062
11063(define-public python2-natsort
11064 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11065 (package (inherit base)
11066 (native-inputs
11067 `(("python2-pathlib" ,python2-pathlib)
11068 ,@(package-native-inputs base))))))
11069
11070(define-public python-glances
11071 (package
11072 (name "python-glances")
9898a2d3 11073 (version "3.1.1")
44d10b1f
RW
11074 (source
11075 (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "Glances" version))
11078 (sha256
11079 (base32
15b4c911
TGR
11080 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11081 (modules '((guix build utils)))
11082 (snippet
11083 '(begin
11084 ;; Glances phones PyPI for weekly update checks by default.
11085 ;; Disable these. The user can re-enable them if desired.
11086 (substitute* "glances/outdated.py"
11087 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11088 (string-append indentation
11089 "self.args.disable_check_update = True\n"
11090 line)))
11091 #t))))
44d10b1f
RW
11092 (build-system python-build-system)
11093 (propagated-inputs
9898a2d3
TGR
11094 `(("python-future" ,python-future)
11095 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11096 (home-page
11097 "https://github.com/nicolargo/glances")
bab94ffa 11098 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11099 (description
11100 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11101Glances uses the PsUtil library to get information from your system. It
11102monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11103 (license license:lgpl3+)))
11104
11105(define-public python2-glances
11106 (package-with-python2 python-glances))
11107
11108(define-public python-graphql-core
11109 (package
11110 (name "python-graphql-core")
11111 (version "0.5.3")
11112 (source
11113 (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "graphql-core" version))
11116 (sha256
11117 (base32
11118 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11119 (build-system python-build-system)
11120 (arguments
11121 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11122 #:phases
11123 (modify-phases %standard-phases
11124 (add-after 'unpack 'patch-hardcoded-version
11125 (lambda _ (substitute*
11126 "setup.py"
11127 (("'gevent==1.1rc1'") "'gevent'"))
11128 #t)))))
11129 (native-inputs
11130 `(("python-gevent" ,python-gevent)
11131 ("python-mock" ,python-mock)
11132 ("python-pytest-mock" ,python-pytest-mock)))
11133 (propagated-inputs
11134 `(("python-promise" ,python-promise)
11135 ("python-six" ,python-six)))
11136 (home-page "https://github.com/graphql-python/graphql-core")
11137 (synopsis "GraphQL implementation for Python")
11138 (description
11139 "GraphQL implementation for Python. GraphQL is a data query language and
11140runtime designed and used to request and deliver data to mobile and web apps.
11141This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11142to Python.")
11143 (license license:expat)))
11144
11145(define-public python2-graphql-core
11146 (package-with-python2 python-graphql-core))
11147
11148(define-public python-graphql-relay
11149 (package
11150 (name "python-graphql-relay")
11151 (version "0.4.5")
11152 (source
11153 (origin
11154 (method url-fetch)
11155 (uri (pypi-uri "graphql-relay" version))
11156 (sha256
11157 (base32
11158 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11159 (build-system python-build-system)
11160 (arguments
11161 '(#:tests? #f)) ; The tests are not distributed
11162 (propagated-inputs
11163 `(("python-graphql-core" ,python-graphql-core)
11164 ("python-promise" ,python-promise)
11165 ("python-six" ,python-six)))
11166 (home-page "https://github.com/graphql-python/graphql-relay-py")
11167 (synopsis "Relay implementation for Python")
11168 (description
11169 "This is a library to allow the easy creation of Relay-compliant servers
11170using the GraphQL Python reference implementation of a GraphQL server. It
11171should be noted that the code is a exact port of the original
11172@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11173from Facebook.")
11174 (license license:expat)))
11175
11176(define-public python2-graphql-relay
11177 (package-with-python2 python-graphql-relay))
11178
11179(define-public python-graphene
11180 (package
11181 (name "python-graphene")
11182 (version "0.10.2")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "graphene" version))
11187 (sha256
11188 (base32
11189 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11190 (build-system python-build-system)
11191 (propagated-inputs
11192 `(("python-graphql-core" ,python-graphql-core)
11193 ("python-graphql-relay" ,python-graphql-relay)
11194 ("python-iso8601" ,python-iso8601)
11195 ("python-promise" ,python-promise)
11196 ("python-six" ,python-six)))
11197 (arguments
11198 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11199 (home-page "http://graphene-python.org/")
11200 (synopsis "GraphQL Framework for Python")
11201 (description
11202 "Graphene is a Python library for building GraphQL schemas/types.
11203A GraphQL schema describes your data model, and provides a GraphQL server
11204with an associated set of resolve methods that know how to fetch data.")
11205 (properties `((python2-variant . ,(delay python2-graphene))))
11206 (license license:expat)))
11207
11208(define-public python2-graphene
11209 (let ((base (package-with-python2
11210 (strip-python2-variant python-graphene))))
11211 (package (inherit base)
11212 (native-inputs
11213 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11214 ,@(package-native-inputs base))))))
11215
11216(define-public python-nautilus
11217 (package
11218 (name "python-nautilus")
11219 (version "0.4.9")
11220 (source
11221 (origin
11222 (method url-fetch)
11223 (uri (pypi-uri "nautilus" version))
11224 (sha256
11225 (base32
11226 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11227 (build-system python-build-system)
11228 (arguments `(#:tests? #f)) ; fails to import test modules
11229 (propagated-inputs
11230 `(("python-bcrypt" ,python-bcrypt)
11231 ("python-click" ,python-click)
11232 ("python-consul" ,python-consul)
11233 ("python-graphene" ,python-graphene)
11234 ("python-jinja2" ,python-jinja2)
11235 ("python-peewee" ,python-peewee)
11236 ("python-pika" ,python-pika)
11237 ("python-tornado" ,python-tornado)
11238 ("python-wtforms" ,python-wtforms)))
11239 (native-inputs
11240 `(("python-nose2" ,python-nose2)))
11241 (home-page "https://github.com/AlecAivazis/nautilus")
11242 (synopsis "Library for creating microservice applications")
11243 (description
11244 "Nautilus is a framework for flux based microservices that looks to
11245provide extendible implementations of common aspects of a cloud so that you can
11246focus on building massively scalable web applications.")
11247 (license license:expat)))
11248
11249(define-public python-snowballstemmer
11250 (package
11251 (name "python-snowballstemmer")
11252 (version "1.2.1")
11253 (source (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "snowballstemmer" version))
11256 (sha256
11257 (base32
11258 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11259 (build-system python-build-system)
11260 (arguments
11261 `(;; No tests exist
11262 #:tests? #f))
11263 (home-page "https://github.com/shibukawa/snowball_py")
11264 (synopsis "Snowball stemming library collection for Python")
11265 (description "This package provides 16 word stemmer algorithms generated
11266from Snowball algorithms. It includes the 15 original ones plus the Poerter
11267English stemmer.")
11268 (license license:bsd-3)))
11269
11270(define-public python2-snowballstemmer
11271 (package-with-python2 python-snowballstemmer))
11272
44d10b1f
RW
11273(define-public python-setproctitle
11274(package
11275 (name "python-setproctitle")
11276 (version "1.1.10")
11277 (source
11278 (origin
11279 (method url-fetch)
11280 (uri (pypi-uri "setproctitle" version))
11281 (sha256
11282 (base32
11283 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11284 (build-system python-build-system)
11285 (arguments
11286 '(#:phases
11287 (modify-phases %standard-phases
11288 (add-before 'check 'patch-Makefile
11289 ;; Stricly this is only required for the python2 variant.
11290 ;; But adding a phase in an inherited package seems to be
11291 ;; cumbersum. So we patch even for python3.
11292 (lambda _
11293 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11294 (when nose
11295 (substitute* "Makefile"
11296 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11297 (string-append nose "/bin/nosetests "))))
11298 #t)))
11299 (replace 'check
11300 (lambda _
11301 (setenv "PYTHON" (or (which "python3") (which "python")))
11302 (setenv "PYCONFIG" (or (which "python3-config")
11303 (which "python-config")))
11304 (setenv "CC" "gcc")
11305 ;; No need to extend PYTHONPATH to find the built package, since
11306 ;; the Makefile will build anyway
11307 (invoke "make" "check"))))))
11308 (native-inputs
11309 `(("procps" ,procps))) ; required for tests
11310 (home-page
11311 "https://github.com/dvarrazzo/py-setproctitle")
11312 (synopsis
11313 "Setproctitle implementation for Python to customize the process title")
11314 (description "The library allows a process to change its title (as displayed
11315by system tools such as ps and top).
11316
11317Changing the title is mostly useful in multi-process systems, for
11318example when a master process is forked: changing the children's title
11319allows to identify the task each process is busy with. The technique
11320is used by PostgreSQL and the OpenSSH Server for example.")
11321 (license license:bsd-3)
11322 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11323
11324(define-public python2-setproctitle
11325 (let ((base (package-with-python2
11326 (strip-python2-variant python-setproctitle))))
11327 (package
11328 (inherit base)
11329 (native-inputs `(("python2-nose" ,python2-nose)
11330 ,@(package-native-inputs base))))))
11331
11332(define-public python-validictory
11333 (package
11334 (name "python-validictory")
11335 (version "1.0.1")
11336 (source
11337 (origin
11338 (method url-fetch)
11339 (uri (pypi-uri "validictory" version))
11340 (sha256
11341 (base32
11342 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11343 (build-system python-build-system)
11344 (arguments
11345 '(#:phases
11346 (modify-phases %standard-phases
11347 (add-after 'unpack 'bootstrap
11348 ;; Move the tests out of the package directory to avoid
11349 ;; packaging them.
11350 (lambda* _
11351 (rename-file "validictory/tests" "tests")
11352 (delete-file "tests/__init__.py")))
11353 (replace 'check
11354 (lambda _
11355 ;; Extend PYTHONPATH so the built package will be found.
11356 (setenv "PYTHONPATH"
11357 (string-append (getcwd) "/build/lib:"
11358 (getenv "PYTHONPATH")))
6568bd5d 11359 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11360 (native-inputs
11361 `(("python-pytest" ,python-pytest)))
11362 (home-page
11363 "https://github.com/jamesturk/validictory")
11364 (synopsis "General purpose Python data validator")
11365 (description "It allows validation of arbitrary Python data structures.
11366
11367The schema format is based on the JSON Schema
11368proposal (http://json-schema.org), so combined with json the library is also
11369useful as a validator for JSON data.")
11370 (license license:expat)))
11371
11372(define-public python2-validictory
11373 (package-with-python2 python-validictory))
11374
11375(define-public python-pyelftools
11376 (package
11377 (name "python-pyelftools")
11378 (version "0.25")
11379 (source
11380 (origin
11381 (method url-fetch)
11382 (uri (pypi-uri "pyelftools" version))
11383 (sha256
11384 (base32
11385 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11386 (build-system python-build-system)
11387 (arguments
11388 `(#:phases
11389 (modify-phases %standard-phases
11390 (add-before 'check 'set-pythonpath
11391 (lambda _
11392 (setenv "PYTHONPATH"
11393 (string-append
11394 (getcwd) "/test/"
11395 ":" (getenv "PYTHONPATH")))
11396 #t)))))
11397 (home-page
11398 "https://github.com/eliben/pyelftools")
11399 (synopsis
11400 "Analyze binary and library file information")
11401 (description "This Python library provides interfaces for parsing and
11402analyzing two binary and library file formats; the Executable and Linking
11403Format (ELF), and debugging information in the Debugging With Attributed
11404Record Format (DWARF).")
11405 (license license:public-domain)))
11406
11407(define-public python-pyev
11408 (package
11409 (name "python-pyev")
11410 (version "0.9.0")
11411 (source
11412 (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "pyev" version))
11415 (sha256
11416 (base32
11417 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11418 (build-system python-build-system)
11419 (arguments
11420 `(#:tests? #f ; no test suite
11421 #:phases
11422 (modify-phases %standard-phases
11423 (add-after 'unpack 'patch
11424 (lambda* (#:key inputs #:allow-other-keys)
11425 (let ((libev (string-append (assoc-ref inputs "libev")
11426 "/lib/libev.so.4")))
11427 (substitute* "setup.py"
11428 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11429 (string-append "libev_dll_name = \"" libev "\"")))))))))
11430 (inputs
11431 `(("libev" ,libev)))
11432 (home-page "http://pythonhosted.org/pyev/")
11433 (synopsis "Python libev interface")
11434 (description "Pyev provides a Python interface to libev.")
11435 (license license:gpl3)))
11436
11437(define-public python2-pyev
11438 (package-with-python2 python-pyev))
11439
11440(define-public python-imagesize
11441 (package
11442 (name "python-imagesize")
11443 (version "1.1.0")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "imagesize" version))
11448 (sha256
11449 (base32
11450 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11451 (build-system python-build-system)
11452 (home-page "https://github.com/shibukawa/imagesize_py")
11453 (synopsis "Gets image size of files in various formats in Python")
11454 (description
11455 "This package allows determination of image size from
11456PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11457 (license license:expat)))
11458
11459(define-public python2-imagesize
11460 (package-with-python2 python-imagesize))
11461
11462(define-public python-termstyle
11463 (package
11464 (name "python-termstyle")
11465 (version "0.1.11")
11466 (source
11467 (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "termstyle" version))
11470 (sha256
11471 (base32
11472 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11473 (build-system python-build-system)
11474 (arguments
11475 '(#:phases
11476 (modify-phases %standard-phases
11477 (replace 'check
11478 (lambda _
831080a6 11479 (invoke "python" "test3.py"))))))
44d10b1f
RW
11480 (home-page "https://github.com/gfxmonk/termstyle")
11481 (synopsis "Console text coloring for Python")
11482 (description "This package provides console text coloring for Python.")
11483 (license license:bsd-3)))
11484
11485(define-public python-argcomplete
11486 (package
11487 (name "python-argcomplete")
11488 (version "1.7.0")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "argcomplete" version))
11493 (sha256
11494 (base32
11495 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11496 (build-system python-build-system)
11497 (native-inputs
11498 `(("python-pexpect" ,python-pexpect)
11499 ("tcsh" ,tcsh)
11500 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11501 (home-page "https://github.com/kislyuk/argcomplete")
11502 (synopsis "Shell tab completion for Python argparse")
11503 (description "argcomplete provides extensible command line tab completion
11504of arguments and options for Python scripts using @code{argparse}. It's
11505particularly useful for programs with many options or sub-parsers that can
11506dynamically suggest completions; for example, when browsing resources over the
11507network.")
11508 (license license:asl2.0)))
11509
11510(define-public python2-argcomplete
11511 (package-with-python2 python-argcomplete))
11512
11513(define-public python-xopen
11514 (package
11515 (name "python-xopen")
24d64989 11516 (version "0.5.0")
44d10b1f
RW
11517 (source
11518 (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "xopen" version))
11521 (sha256
11522 (base32
24d64989 11523 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11524 (build-system python-build-system)
24d64989
RW
11525 (propagated-inputs
11526 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11527 (home-page "https://github.com/marcelm/xopen/")
11528 (synopsis "Open compressed files transparently")
11529 (description "This module provides an @code{xopen} function that works like
11530Python's built-in @code{open} function, but can also deal with compressed files.
11531Supported compression formats are gzip, bzip2 and, xz, and are automatically
11532recognized by their file extensions. The focus is on being as efficient as
11533possible on all supported Python versions.")
11534 (license license:expat)))
11535
11536(define-public python2-xopen
11537 (let ((base (package-with-python2
11538 (strip-python2-variant python-xopen))))
11539 (package
11540 (inherit base)
11541 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11542 ,@(package-propagated-inputs base))))))
11543
11544(define-public python-cheetah
11545 (package
11546 (name "python-cheetah")
11547 (version "3.1.0")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "Cheetah3" version))
11552 (sha256
11553 (base32
11554 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11555 (build-system python-build-system)
11556 (arguments
11557 `(#:modules ((guix build utils)
11558 (guix build python-build-system)
11559 (ice-9 ftw)
11560 (srfi srfi-1)
11561 (srfi srfi-26))
11562 #:phases (modify-phases %standard-phases
11563 (add-after 'unpack 'use-absolute-python
11564 (lambda _
11565 (substitute* "Cheetah/CheetahWrapper.py"
11566 (("#!/usr/bin/env python")
11567 (string-append "#!" (which "python"))))
11568 #t))
11569 (replace 'check
11570 (lambda _
11571 (let ((cwd (getcwd)))
11572 (setenv "PYTHONPATH"
11573 (string-append
11574 cwd "/build/"
11575 (find (cut string-prefix? "lib" <>)
11576 (scandir (string-append cwd "/build")))
11577 ":" (getenv "PYTHONPATH")))
11578 (setenv "PATH"
11579 (string-append (getenv "PATH")
11580 ":" cwd "/bin"))
11581 (setenv "TMPDIR" "/tmp")
11582
11583 (substitute* "Cheetah/Tests/Test.py"
11584 (("unittest.TextTestRunner\\(\\)")
11585 "unittest.TextTestRunner(verbosity=2)"))
11586
11587 (invoke "python" "Cheetah/Tests/Test.py")))))))
11588 (propagated-inputs
11589 `(("python-markdown" ,python-markdown))) ;optional
11590 (home-page "http://cheetahtemplate.org/")
11591 (synopsis "Template engine")
11592 (description "Cheetah is a text-based template engine and Python code
11593generator.
11594
11595Cheetah can be used as a standalone templating utility or referenced as
11596a library from other Python applications. It has many potential uses,
11597but web developers looking for a viable alternative to ASP, JSP, PHP and
11598PSP are expected to be its principle user group.
11599
11600Features:
11601@enumerate
11602@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11603 text-based format.
11604@item Cleanly separates content, graphic design, and program code.
11605@item Blends the power and flexibility of Python with a simple template language
11606 that non-programmers can understand.
11607@item Gives template writers full access to any Python data structure, module,
11608 function, object, or method in their templates.
11609@item Makes code reuse easy by providing an object-orientated interface to
11610 templates that is accessible from Python code or other Cheetah templates.
11611 One template can subclass another and selectively reimplement sections of it.
11612@item Provides a simple, yet powerful, caching mechanism that can dramatically
11613 improve the performance of a dynamic website.
11614@item Compiles templates into optimized, yet readable, Python code.
11615@end enumerate")
11616 (license (license:x11-style "file://LICENSE"))))
11617
11618(define-public python2-cheetah
11619 (package-with-python2 python-cheetah))
11620
11621(define-public python-dulwich
11622 (package
11623 (name "python-dulwich")
11624 (version "0.18.6")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (list (string-append "https://www.dulwich.io/releases/"
11629 "dulwich-" version ".tar.gz")
11630 (pypi-uri "dulwich" version)))
11631 (sha256
11632 (base32
11633 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11634 (build-system python-build-system)
11635 (arguments
11636 `(#:phases
11637 (modify-phases %standard-phases
11638 (add-before 'check 'fix-tests
11639 (lambda* (#:key inputs #:allow-other-keys)
11640 ;; The tests use Popen with a custom environment which doesn't
11641 ;; include PATH.
11642 (substitute* "dulwich/tests/compat/utils.py"
11643 (("'git'") (string-append "'"
11644 (which "git")
11645 "'")))
11646 (substitute* '("dulwich/tests/test_repository.py"
11647 "dulwich/tests/test_hooks.py")
11648 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11649 (setenv "TEST_RUNNER" "unittest")
11650 (setenv "PYTHONHASHSEED" "random")
11651 #t)))))
11652 (propagated-inputs
11653 `(("python-fastimport" ,python-fastimport)))
11654 (native-inputs
11655 `(("python-mock" ,python-mock)
11656 ("python-geventhttpclient" ,python-geventhttpclient)
11657 ("git" ,git)))
11658 (home-page "https://www.dulwich.io/")
11659 (synopsis "Git implementation in Python")
11660 (description "Dulwich is an implementation of the Git file formats and
11661protocols written in pure Python.")
11662 ;; Can be used with either license.
11663 (license (list license:asl2.0 license:gpl2+))))
11664
11665(define-public python2-dulwich
11666 (package-with-python2 python-dulwich))
11667
11668(define-public python-pbkdf2
11669 (package
11670 (name "python-pbkdf2")
11671 (version "1.3")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "pbkdf2" version))
11676 (sha256
11677 (base32
11678 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11679 (build-system python-build-system)
11680 (arguments
11681 '(#:phases
11682 (modify-phases %standard-phases
11683 (replace 'check
11684 (lambda _
11685 (setenv "PYTHONPATH"
11686 (string-append (getcwd) "/build/lib:"
11687 (getenv "PYTHONPATH")))
ee2bb944 11688 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11689 (propagated-inputs
11690 `(("python-pycrypto" ,python-pycrypto))) ; optional
11691 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11692 (synopsis "Password-based key derivation")
11693 (description "This module implements the password-based key derivation
11694function, PBKDF2, specified in RSA PKCS#5 v2.0.
11695
11696PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11697is part of the RSA Public Key Cryptography Standards series. The provided
11698implementation takes a password or a passphrase and a salt value (and
11699optionally a iteration count, a digest module, and a MAC module) and provides
11700a file-like object from which an arbitrarly-sized key can be read.")
11701 (license license:expat)))
11702
11703(define-public python2-pbkdf2
11704 (package-with-python2 python-pbkdf2))
11705
11706(define-public python-qrcode
11707 (package
11708 (name "python-qrcode")
217ea1a1 11709 (version "6.1")
44d10b1f
RW
11710 (source
11711 (origin
11712 (method url-fetch)
11713 (uri (pypi-uri "qrcode" version))
11714 (sha256
217ea1a1 11715 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11716 (build-system python-build-system)
11717 (arguments
11718 ;; FIXME: Tests require packaging 'pymaging'.
11719 '(#:tests? #f))
11720 (propagated-inputs
11721 `(("python-lxml" ,python-lxml) ; for SVG output
11722 ("python-pillow" ,python-pillow) ; for PNG output
11723 ("python-six" ,python-six)))
44d10b1f
RW
11724 (home-page "https://github.com/lincolnloop/python-qrcode")
11725 (synopsis "QR Code image generator")
11726 (description "This package provides a pure Python QR Code generator
11727module. It uses the Python Imaging Library (PIL) to allow for the generation
11728of QR Codes.
11729
11730In addition this package provides a command line tool to generate QR codes and
11731either write these QR codes to a file or do the output as ascii art at the
11732console.")
11733 (license license:bsd-3)))
11734
11735(define-public python2-qrcode
11736 (package-with-python2 python-qrcode))
11737
11738(define-public python-rst2ansi
11739 (package
11740 (name "python-rst2ansi")
11741 (version "0.1.5")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "rst2ansi" version))
11746 (sha256
11747 (base32
11748 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11749 (build-system python-build-system)
11750 (propagated-inputs
11751 `(("python-docutils" ,python-docutils)))
11752 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11753 (synopsis "Convert RST to ANSI-decorated console output")
11754 (description
11755 "Python module dedicated to rendering RST (reStructuredText) documents
11756to ansi-escaped strings suitable for display in a terminal.")
11757 (license license:expat)))
11758
11759(define-public python-ansi2html
11760 (package
11761 (name "python-ansi2html")
11762 (version "1.2.0")
11763 (source
11764 (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "ansi2html" version))
11767 (sha256
11768 (base32
11769 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11770 (build-system python-build-system)
11771 (native-inputs
11772 `(("python-mock" ,python-mock)
11773 ("python-nose" ,python-nose)))
11774 (propagated-inputs
11775 `(("python-six" ,python-six)))
11776 (home-page "https://github.com/ralphbean/ansi2html")
11777 (synopsis "Convert ANSI-decorated console output to HTML")
11778 (description
11779 "@command{ansi2html} is a Python library and command line utility for
11780convering text with ANSI color codes to HTML or LaTeX.")
11781 (license license:gpl3+)))
11782
11783(define-public python2-ansi2html
11784 (package-with-python2 python-ansi2html))
11785
11786(define-public python-ddt
11787 (package
11788 (name "python-ddt")
11789 (version "1.1.3")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "ddt" version))
11794 (sha256
11795 (base32
11796 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11797 (build-system python-build-system)
11798 (native-inputs
11799 `(("python-mock" ,python-mock)
11800 ("python-nose" ,python-nose)))
11801 (propagated-inputs
11802 `(("python-six" ,python-six)
11803 ("python-pyyaml" ,python-pyyaml)))
11804 (home-page "https://github.com/txels/ddt")
11805 (synopsis "Data-Driven Tests")
11806 (description
11807 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11808running it with different test data, and make it appear as multiple test
11809cases.")
11810 (license license:expat)))
11811
11812(define-public python2-ddt
11813 (package-with-python2 python-ddt))
11814
11815(define-public python-pycountry
11816 (package
11817 (name "python-pycountry")
11818 (version "18.5.26")
11819 (source
11820 (origin
11821 (method url-fetch)
11822 (uri (pypi-uri "pycountry" version))
11823 (sha256
11824 (base32
11825 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11826 (build-system python-build-system)
11827 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11828 (synopsis "ISO databases for languages, countries, currencies, etc.")
11829 (description
11830 "@code{pycountry} provides the ISO databases for the standards:
11831@enumerate
11832@item 639-3 (Languages)
11833@item 3166 (Countries)
11834@item 3166-3 (Deleted Countries)
11835@item 3166-2 (Subdivisions of countries)
11836@item 4217 (Currencies)
11837@item 15924 (Scripts)
11838@end enumerate
11839It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11840through a Python API.")
11841 (license license:lgpl2.1+)))
11842
11843(define-public python2-pycountry
11844 (package-with-python2 python-pycountry))
11845
11846(define-public python-pycosat
11847 (package
11848 (name "python-pycosat")
11849 (version "0.6.1")
11850 (source
11851 (origin
11852 (method url-fetch)
11853 (uri (pypi-uri "pycosat" version))
11854 (sha256
11855 (base32
11856 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11857 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11858 (build-system python-build-system)
11859 (home-page "https://github.com/ContinuumIO/pycosat")
11860 (synopsis "Bindings to picosat (a SAT solver)")
11861 (description
11862 "This package provides efficient Python bindings to @code{picosat} on
11863the C level. When importing pycosat, the @code{picosat} solver becomes part
11864of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11865Problem} (SAT) solver.")
11866 (license license:expat)))
11867
11868(define-public python2-pycosat
11869 (package-with-python2 python-pycosat))
11870
11871(define-public python2-ruamel.ordereddict
11872 (package
11873 (name "python2-ruamel.ordereddict")
11874 (version "0.4.9")
11875 (source
11876 (origin
11877 (method url-fetch)
11878 (uri (pypi-uri "ruamel.ordereddict" version))
11879 (sha256
11880 (base32
11881 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11882 (build-system python-build-system)
11883 (arguments
11884 `(#:python ,python-2
11885 #:phases
11886 (modify-phases %standard-phases
11887 (delete 'check)
11888 (add-after 'install 'check
11889 (lambda* (#:key inputs outputs #:allow-other-keys)
11890 (add-installed-pythonpath inputs outputs)
f987ac30 11891 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11892 (home-page "https://bitbucket.org/ruamel/ordereddict")
11893 (synopsis "Version of dict that keeps keys in insertion order")
11894 (description
11895 "This is an implementation of an ordered dictionary with @dfn{Key
11896Insertion Order} (KIO: updates of values do not affect the position of the
11897key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11898removed and put at the back). The standard library module @code{OrderedDict},
11899implemented later, implements a subset of @code{ordereddict} functionality.
11900Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11901Order} (KSO, no sorting function can be specified, but a transform can be
11902specified to apply on the key before comparison (e.g. @code{string.lower})).")
11903 (license license:expat)))
11904
11905(define-public python-pypeg2
11906 (package
11907 (name "python-pypeg2")
11908 (version "2.15.2")
11909 (source
11910 (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "pyPEG2" version))
11913 (sha256
11914 (base32
11915 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11916 (build-system python-build-system)
11917 (propagated-inputs `(("python-lxml" ,python-lxml)))
11918 (arguments
11919 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11920 '(#:tests? #f))
11921 (home-page "https://fdik.org/pyPEG/")
11922 (synopsis "Parsering Expression Grammars in Python")
11923 (description "PyPEG is an intrinsic parser interpreter framework for
11924Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11925parse many formal languages.")
11926 (license license:gpl2)))
11927
11928(define-public python-incremental
11929 (package
11930 (name "python-incremental")
11931 (version "17.5.0")
11932 (source
11933 (origin
11934 (method url-fetch)
11935 (uri (pypi-uri "incremental" version))
11936 (sha256
11937 (base32
11938 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11939 (build-system python-build-system)
11940 (home-page "https://github.com/hawkowl/incremental")
11941 (synopsis "Library for versioning Python projects")
11942 (description "Incremental is a small library that versions your Python
11943projects.")
11944 (license license:expat)))
11945
11946(define-public python2-incremental
11947 (package-with-python2 python-incremental))
11948
11949(define-public python-invoke
11950 (package
11951 (name "python-invoke")
11952 (home-page "http://www.pyinvoke.org/")
11953 (version "1.1.0")
11954 (source (origin
11955 (method url-fetch)
11956 (uri (pypi-uri "invoke" version))
11957 (sha256
11958 (base32
11959 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11960 (build-system python-build-system)
11961 (arguments
11962 ;; XXX: Requires many dependencies that are not yet in Guix.
11963 `(#:tests? #f))
11964 (synopsis "Pythonic task execution")
11965 (description
11966 "Invoke is a Python task execution tool and library, drawing inspiration
11967from various sources to arrive at a powerful and clean feature set. It is
11968evolved from the Fabric project, but focuses on local and abstract concerns
11969instead of servers and network commands.")
11970 (license license:bsd-3)))
11971
11972(define-public python2-invoke
11973 (package-with-python2 python-invoke))
11974
11975(define-public python-automat
11976 (package
11977 (name "python-automat")
919d80a0 11978 (version "0.7.0")
44d10b1f
RW
11979 (source (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "Automat" version))
11982 (sha256
11983 (base32
919d80a0 11984 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11985 (build-system python-build-system)
11986 ;; We disable the tests because they require python-twisted, while
11987 ;; python-twisted depends on python-automat. Twisted is optional, but the
11988 ;; tests fail if it is not available. Also see
11989 ;; <https://github.com/glyph/automat/issues/71>.
11990 (arguments '(#:tests? #f))
11991 (native-inputs
11992 `(("python-m2r" ,python-m2r)
11993 ("python-setuptools-scm" ,python-setuptools-scm)
11994 ("python-graphviz" ,python-graphviz)))
11995 (propagated-inputs
11996 `(("python-six" ,python-six)
11997 ("python-attrs" ,python-attrs)))
11998 (home-page "https://github.com/glyph/Automat")
11999 (synopsis "Self-service finite-state machines")
12000 (description "Automat is a library for concise, idiomatic Python
12001expression of finite-state automata (particularly deterministic finite-state
12002transducers).")
12003 (license license:expat)))
12004
12005(define-public python2-automat
12006 (package-with-python2 python-automat))
12007
12008(define-public python-m2r
12009 (package
12010 (name "python-m2r")
bcfb8fac 12011 (version "0.2.1")
44d10b1f
RW
12012 (source (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "m2r" version))
12015 (sha256
12016 (base32
bcfb8fac 12017 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12018 (build-system python-build-system)
12019 (propagated-inputs
12020 `(("python-docutils" ,python-docutils)
12021 ("python-mistune" ,python-mistune)))
12022 (native-inputs
12023 `(("python-pygments" ,python-pygments)
12024 ("python-mock" ,python-mock)))
12025 (home-page "https://github.com/miyakogi/m2r")
12026 (synopsis "Markdown to reStructuredText converter")
12027 (description "M2R converts a markdown file including reST markups to valid
12028reST format.")
12029 (license license:expat)))
12030
12031(define-public python2-m2r
12032 (package-with-python2 python-m2r))
12033
12034(define-public python-constantly
12035 (package
12036 (name "python-constantly")
12037 (version "15.1.0")
12038 (source (origin
12039 (method url-fetch)
12040 (uri (pypi-uri "constantly" version))
12041 (sha256
12042 (base32
12043 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12044 (build-system python-build-system)
12045 (home-page "https://github.com/twisted/constantly")
12046 (synopsis "Symbolic constants in Python")
12047 (description "Constantly is a Python library that provides symbolic
12048constant support. It includes collections and constants with text, numeric,
12049and bit flag values.")
12050 (license license:expat)))
12051
12052(define-public python2-constantly
12053 (package-with-python2 python-constantly))
12054
12055(define-public python-attrs
12056 (package
12057 (name "python-attrs")
67458e20 12058 (version "19.1.0")
44d10b1f
RW
12059 (source (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "attrs" version))
12062 (sha256
12063 (base32
67458e20 12064 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12065 (build-system python-build-system)
12066 (arguments
12067 `(#:modules ((guix build utils)
12068 (guix build python-build-system)
12069 (ice-9 ftw)
12070 (srfi srfi-1)
12071 (srfi srfi-26))
12072 #:phases (modify-phases %standard-phases
12073 (replace 'check
12074 (lambda _
12075 (let ((cwd (getcwd)))
12076 (setenv "PYTHONPATH"
12077 (string-append
12078 cwd "/build/"
12079 (find (cut string-prefix? "lib" <>)
12080 (scandir (string-append cwd "/build")))
12081 ":"
12082 (getenv "PYTHONPATH")))
12083 (invoke "python" "-m" "pytest")))))))
12084 (native-inputs
12085 `(("python-coverage" ,python-coverage)
12086 ("python-hypothesis" ,python-hypothesis)
12087 ("python-pympler" ,python-pympler)
12088 ("python-pytest" ,python-pytest)
12089 ("python-six" ,python-six)
12090 ("python-sphinx" ,python-sphinx)
12091 ("python-zope-interface" ,python-zope-interface)))
12092 (home-page "https://github.com/python-attrs/attrs/")
12093 (synopsis "Attributes without boilerplate")
12094 (description "@code{attrs} is a Python package with class decorators that
12095ease the chores of implementing the most common attribute-related object
12096protocols.")
12097 (license license:expat)))
12098
12099(define-public python2-attrs
12100 (package-with-python2 python-attrs))
12101
12102(define-public python-attrs-bootstrap
12103 (package
12104 (inherit python-attrs)
12105 (name "python-attrs-bootstrap")
12106 ;; Keep this on a fixed version so python-attrs can be updated without
12107 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
12108 (version "17.4.0")
12109 (source (origin
12110 (method url-fetch)
12111 (uri (pypi-uri "attrs" version))
12112 (sha256
12113 (base32
12114 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
12115 (native-inputs `())
12116 (arguments `(#:tests? #f))))
12117
12118(define-public python2-attrs-bootstrap
12119 (package-with-python2 python-attrs-bootstrap))
12120
12121(define-public python2-cliapp
12122 (package
12123 (name "python2-cliapp")
9064b84e 12124 (version "1.20180812.1")
44d10b1f
RW
12125 (source
12126 (origin
12127 (method url-fetch)
12128 (uri (string-append
12129 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12130 version ".tar.gz"))
12131 (sha256
12132 (base32
9064b84e 12133 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12134 (build-system python-build-system)
12135 (arguments
12136 `(#:python ,python-2
12137 #:phases
12138 (modify-phases %standard-phases
12139 ;; check phase needs to be run before the build phase. If not,
12140 ;; coverage-test-runner looks for tests for the built source files,
12141 ;; and fails.
12142 (delete 'check)
12143 (add-before 'build 'check
12144 (lambda _
12145 ;; Disable python3 tests
12146 (substitute* "check"
12147 (("python3") "# python3"))
6c826d32 12148 (invoke "./check"))))))
44d10b1f
RW
12149 (native-inputs
12150 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12151 ("python2-pep8" ,python2-pep8)))
12152 (propagated-inputs
12153 `(("python2-pyaml" ,python2-pyaml)))
12154 (home-page "https://liw.fi/cliapp/")
12155 (synopsis "Python framework for command line programs")
12156 (description "@code{python2-cliapp} is a python framework for
12157command line programs. It contains the typical stuff such programs
12158need to do, such as parsing the command line for options, and
12159iterating over input files.")
12160 (license license:gpl2+)))
12161
12162(define-public python2-ttystatus
12163 (package
12164 (name "python2-ttystatus")
e516a9c2 12165 (version "0.36")
44d10b1f
RW
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (string-append
12170 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12171 version ".tar.gz"))
12172 (sha256
12173 (base32
e516a9c2 12174 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12175 (build-system python-build-system)
12176 (native-inputs
12177 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12178 ("python2-pep8" ,python2-pep8)))
12179 (arguments
12180 `(#:python ,python-2
12181 #:phases
12182 (modify-phases %standard-phases
12183 ;; check phase needs to be run before the build phase. If not,
12184 ;; coverage-test-runner looks for tests for the built source files,
12185 ;; and fails.
12186 (delete 'check)
12187 (add-before 'build 'check
cbeee881 12188 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12189 (home-page "https://liw.fi/ttystatus/")
12190 (synopsis "Python library for showing progress reporting and
12191status updates on terminals")
12192 (description "@code{python2-ttystatus} is a python library for
12193showing progress reporting and status updates on terminals, for
12194command line programs. Output is automatically adapted to the width
12195of the terminal: truncated if it does not fit, and resized if the
12196terminal size changes.")
12197 (license license:gpl3+)))
12198
12199(define-public python2-tracing
12200 (package
12201 (name "python2-tracing")
12202 (version "0.10")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (string-append
12207 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12208 version ".tar.gz"))
12209 (sha256
12210 (base32
12211 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12212 (build-system python-build-system)
12213 (arguments
12214 `(#:python ,python-2))
12215 (home-page "https://liw.fi/tracing/")
12216 (synopsis "Python debug logging helper")
12217 (description "@code{python2-tracing} is a python library for
12218logging debug messages. It provides a way to turn debugging messages
12219on and off, based on the filename they occur in. It is much faster
12220than using @code{logging.Filter} to accomplish the same thing, which
12221matters when code is run in production mode. The actual logging still
12222happens using the @code{logging} library.")
12223 (license license:gpl3+)))
12224
12225(define-public python2-larch
12226 (package
12227 (name "python2-larch")
12228 (version "1.20151025")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (string-append
12233 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12234 version ".tar.gz"))
12235 (patches (search-patches
12236 "python2-larch-coverage-4.0a6-compatibility.patch"))
12237 (sha256
12238 (base32
12239 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12240 (build-system python-build-system)
12241 (arguments
12242 `(#:python ,python-2
12243 #:phases
12244 (modify-phases %standard-phases
12245 ;; check phase needs to be run before the build phase. If not,
12246 ;; coverage-test-runner looks for tests for the built source files,
12247 ;; and fails.
12248 (delete 'check)
12249 (add-before 'build 'check
204ad455 12250 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12251 (native-inputs
12252 `(("cmdtest" ,cmdtest)
12253 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12254 (propagated-inputs
12255 `(("python2-tracing" ,python2-tracing)))
12256 (home-page "https://liw.fi/larch/")
12257 (synopsis "Python copy-on-write B-tree library")
12258 (description "@code{python2-larch} is an implementation of
12259particular kind of B-tree, based on research by Ohad Rodeh. See
12260@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12261on the data structure.
12262
12263The distinctive feature of this B-tree is that a node is never
12264(conceptually) modified. Instead, all updates are done by
12265copy-on-write. This makes it easy to clone a tree, and modify only the
12266clone, while other processes access the original tree.")
12267 (license license:gpl3+)))
12268
12269(define-public python-astroid
12270 (package
12271 (name "python-astroid")
12272 (version "2.1.0")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 (uri (pypi-uri "astroid" version))
12277 (sha256
12278 (base32
12279 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12280 (build-system python-build-system)
12281 (propagated-inputs
12282 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12283 ("python-six" ,python-six)
12284 ("python-wrapt" ,python-wrapt)))
12285 (native-inputs
12286 `(("python-dateutil" ,python-dateutil)
12287 ("python-nose" ,python-nose)
12288 ("python-pytest" ,python-pytest)
12289 ("python-pytest-runner" ,python-pytest-runner)))
12290 (arguments
12291 `(#:phases
12292 (modify-phases %standard-phases
12293 (add-after 'unpack 'remove-spurious-test
12294 (lambda _
12295 ;; This can be removed after upgrading from python-3.7
12296 ;; https://github.com/PyCQA/astroid/issues/593
12297 ;; https://bugs.python.org/issue34056
12298 (delete-file "astroid/tests/unittest_modutils.py")
12299 #t))
12300 (replace 'check
12301 (lambda _
12302 (invoke "pytest" "astroid"))))))
12303 (home-page "https://github.com/PyCQA/astroid")
12304 (synopsis "Common base representation of python source code for pylint and
12305other projects")
12306 (description "@code{python-astroid} provides a common base representation
12307of python source code for projects such as pychecker, pyreverse, pylint, etc.
12308
12309It provides a compatible representation which comes from the _ast module. It
12310rebuilds the tree generated by the builtin _ast module by recursively walking
12311down the AST and building an extended ast. The new node classes have
12312additional methods and attributes for different usages. They include some
12313support for static inference and local name scopes. Furthermore, astroid
12314builds partial trees by inspecting living objects.")
12315 (license license:lgpl2.1+)
12316 (properties `((python2-variant . ,(delay python2-astroid))))))
12317
12318(define-public python2-astroid
12319 (let ((base (package-with-python2
12320 (strip-python2-variant python-astroid))))
12321 (package (inherit base)
12322 ;; Version 2.x removes python2 support.
12323 (version "1.6.5")
12324 (source
12325 (origin
12326 (method url-fetch)
12327 (uri (pypi-uri "astroid" version))
12328 (sha256
12329 (base32
12330 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12331 (arguments
12332 (substitute-keyword-arguments (package-arguments base)
12333 ((#:phases phases)
12334 `(modify-phases ,phases
12335 (add-after 'unpack 'remove-spurious-test
12336 (lambda _
12337 ;; https://github.com/PyCQA/astroid/issues/276
12338 (delete-file "astroid/tests/unittest_brain.py")
12339 #t))
12340 (replace 'check
12341 (lambda _
12342 (invoke"python" "-m" "unittest" "discover"
12343 "-p" "unittest*.py")))))))
12344 (native-inputs `())
12345 (propagated-inputs
12346 `(("python2-backports-functools-lru-cache"
12347 ,python2-backports-functools-lru-cache)
12348 ("python2-enum34" ,python2-enum34)
12349 ("python2-singledispatch" ,python2-singledispatch)
12350 ,@(package-propagated-inputs base))))))
12351
12352(define-public python-isort
12353 (package
12354 (name "python-isort")
e2227b6a 12355 (version "4.3.4")
44d10b1f
RW
12356 (source
12357 (origin
e2227b6a
EF
12358 (method git-fetch)
12359 (uri (git-reference
12360 ;; Tests pass only from the Github sources
12361 (url "https://github.com/timothycrosley/isort")
12362 (commit version)))
12363 (file-name (git-file-name name version))
44d10b1f
RW
12364 (sha256
12365 (base32
e2227b6a 12366 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12367 (build-system python-build-system)
12368 (native-inputs
12369 `(("python-mock" ,python-mock)
12370 ("python-pytest" ,python-pytest)))
12371 (home-page "https://github.com/timothycrosley/isort")
12372 (synopsis "Python utility/library to sort python imports")
12373 (description "@code{python-isort} is a python utility/library to sort
12374imports alphabetically, and automatically separated into sections. It
12375provides a command line utility, a python library and plugins for various
12376editors.")
e2227b6a
EF
12377 (license license:expat)
12378 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12379
12380(define-public python2-isort
e2227b6a
EF
12381 (let ((base (package-with-python2
12382 (strip-python2-variant python-isort))))
12383 (package (inherit base)
12384 (native-inputs
12385 `(("python2-futures" ,python2-futures)
12386 ,@(package-native-inputs base))))))
44d10b1f
RW
12387
12388(define-public python2-backports-functools-lru-cache
12389 (package
12390 (name "python2-backports-functools-lru-cache")
12391 (version "1.5")
12392 (source
12393 (origin
12394 (method url-fetch)
12395 ;; only the pypi tarballs contain the necessary metadata
12396 (uri (pypi-uri "backports.functools_lru_cache" version))
12397 (sha256
12398 (base32
12399 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12400 (build-system python-build-system)
12401 (native-inputs
12402 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12403 (arguments
12404 `(#:python ,python-2))
12405 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12406 (synopsis "Backport of functools.lru_cache from Python 3.3")
12407 (description "@code{python2-backports-functools-lru-cache} is a backport
12408of @code{functools.lru_cache} from python 3.3.")
12409 (license license:expat)))
12410
12411(define-public python-configparser
12412 (package
12413 (name "python-configparser")
12414 (version "3.5.0")
12415 (source
12416 (origin
12417 (method url-fetch)
12418 (uri (string-append
12419 "https://bitbucket.org/ambv/configparser/get/"
12420 version ".tar.bz2"))
12421 (file-name (string-append name "-" version ".tar.gz"))
12422 (sha256
12423 (base32
12424 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12425 (build-system python-build-system)
809f003f 12426 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12427 (synopsis "Backport of configparser from python 3.5")
12428 (description "@code{python-configparser} is a backport of
12429@code{configparser} from Python 3.5 so that it can be used directly
12430in other versions.")
12431 (license license:expat)))
12432
12433(define-public python2-configparser
12434 (package-with-python2 python-configparser))
12435
12436(define-public python-mando
12437 (package
12438 (name "python-mando")
12439 (version "0.6.4")
12440 (source (origin
12441 (method url-fetch)
12442 (uri (pypi-uri "mando" version))
12443 (sha256
12444 (base32
12445 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12446 (build-system python-build-system)
12447 (propagated-inputs
12448 `(("python-rst2ansi" ,python-rst2ansi)
12449 ("python-six" ,python-six)))
12450 (native-inputs
12451 `(("python-pytest" ,python-pytest)))
12452 (home-page "https://mando.readthedocs.org/")
12453 (synopsis
12454 "Wrapper around argparse, allowing creation of complete CLI applications")
12455 (description
12456 "This package is a wrapper around argparse, allowing you to write complete CLI
12457applications in seconds while maintaining all the flexibility.")
12458 (license license:expat)))
12459
12460(define-public python2-mando
12461 (package-with-python2 python-mando))
12462
70daf82f
RW
12463(define-public python2-argparse
12464 (package
12465 (name "python2-argparse")
12466 (version "1.4.0")
12467 (source
12468 (origin
12469 (method url-fetch)
12470 (uri (pypi-uri "argparse" version))
12471 (sha256
12472 (base32
12473 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12474 (build-system python-build-system)
12475 (arguments
12476 `(#:python ,python-2))
12477 (home-page "https://github.com/ThomasWaldmann/argparse/")
12478 (synopsis "Python command-line parsing library")
12479 (description
12480 "This package is mostly for people who want to have @code{argparse} on
12481older Pythons because it was not part of the standard library back then.")
12482 (license license:psfl)))
12483
44d10b1f
RW
12484(define-public python-fudge
12485 (package
12486 (name "python-fudge")
12487 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12488 ;; package, which is currently the only use of this package.
12489 (version "0.9.6")
12490 (source
12491 (origin
12492 (method url-fetch)
12493 (uri (pypi-uri "fudge" version))
12494 (sha256
12495 (base32
12496 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12497 (build-system python-build-system)
12498 (arguments
12499 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12500 (home-page "https://github.com/fudge-py/fudge")
12501 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12502 (description
12503 "Fudge is a Python module for using fake objects (mocks and stubs) to
12504test real ones.
12505
12506In readable Python code, you declare the methods available on your fake object
12507and how they should be called. Then you inject that into your application and
12508start testing. This declarative approach means you don’t have to record and
12509playback actions and you don’t have to inspect your fakes after running code.
12510If the fake object was used incorrectly then you’ll see an informative
12511exception message with a traceback that points to the culprit.")
12512 (license license:expat)))
12513
12514(define-public python2-fudge
12515 (package-with-python2 python-fudge))
12516
12517(define-public python-mwclient
12518 (package
12519 (name "python-mwclient")
12520 (version "0.8.4")
12521 (source
12522 (origin
12523 (method url-fetch)
12524 ;; The PyPI version wouldn't contain tests.
12525 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12526 "v" version ".tar.gz"))
12527 (file-name (string-append name "-" version ".tar.gz"))
12528 (sha256
12529 (base32
12530 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12531 (build-system python-build-system)
12532 (propagated-inputs
12533 `(("python-requests" ,python-requests)
12534 ("python-requests-oauthlib"
12535 ,python-requests-oauthlib)
12536 ("python-six" ,python-six)))
12537 (native-inputs
12538 `(("python-mock" ,python-mock)
12539 ("python-pytest" ,python-pytest)
12540 ("python-pytest-pep8" ,python-pytest-pep8)
12541 ("python-pytest-cache" ,python-pytest-cache)
12542 ("python-pytest-cov" ,python-pytest-cov)
12543 ("python-responses" ,python-responses)))
12544 (home-page "https://github.com/btongminh/mwclient")
12545 (synopsis "MediaWiki API client")
12546 (description "This package provides a MediaWiki API client.")
12547 (license license:expat)))
12548
12549(define-public python2-mwclient
12550 (package-with-python2 python-mwclient))
12551
12552(define-public python-utils
12553 (package
12554 (name "python-utils")
12555 (version "2.1.0")
12556 (source (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "python-utils" version))
12559 (sha256
12560 (base32
12561 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12562 (build-system python-build-system)
12563 (native-inputs
12564 `(("pytest-runner" ,python-pytest-runner)
12565 ("pytest" ,python-pytest)
12566 ("six" ,python-six)))
12567 (home-page "https://github.com/WoLpH/python-utils")
12568 (synopsis "Convenient utilities not included with the standard Python install")
12569 (description
12570 "Python Utils is a collection of small Python functions and classes which
12571make common patterns shorter and easier.")
12572 (license license:bsd-2)))
12573
12574(define-public python2-utils
12575 (package-with-python2 python-utils))
12576
44d10b1f
RW
12577(define-public python-diff-match-patch
12578 (package
12579 (name "python-diff-match-patch")
12580 (version "20121119")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "diff-match-patch" version))
12585 (sha256
12586 (base32
12587 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12588 (build-system python-build-system)
12589 (home-page "https://code.google.com/p/google-diff-match-patch")
12590 (synopsis "Synchronize plain text")
12591 (description "Diff Match and Patch libraries offer robust algorithms to
12592perform the operations required for synchronizing plain text.")
12593 (license license:asl2.0)))
12594
12595(define-public python2-diff-match-patch
12596 (package-with-python2 python-diff-match-patch))
12597
12598(define-public python-dirsync
12599 (package
12600 (name "python-dirsync")
12601 (version "2.2.3")
12602 (source
12603 (origin
12604 (method url-fetch)
12605 (uri (pypi-uri "dirsync" version))
12606 (sha256
12607 (base32
12608 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12609 (build-system python-build-system)
12610 (propagated-inputs
12611 `(("six" ,python-six)))
12612 (home-page "https://bitbucket.org/tkhyn/dirsync")
12613 (synopsis "Advanced directory tree synchronisation tool")
12614 (description "Advanced directory tree synchronisation tool.")
12615 (license license:expat)))
12616
12617(define-public python2-dirsync
12618 (package-with-python2 python-dirsync))
12619
12620(define-public python-levenshtein
12621 (package
12622 (name "python-levenshtein")
12623 (version "0.12.0")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "python-Levenshtein" version))
12628 (sha256
12629 (base32
12630 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12631 (build-system python-build-system)
12632 (home-page "https://github.com/ztane/python-Levenshtein")
12633 (synopsis "Fast computation of Levenshtein distance and string similarity")
12634 (description
12635 "The Levenshtein Python C extension module contains functions for fast computation of
12636@enumerate
12637@item Levenshtein (edit) distance, and edit operations
12638@item string similarity
12639@item approximate median strings, and generally string averaging
12640@item string sequence and set similarity
12641@end enumerate
12642It supports both normal and Unicode strings.")
12643 (license license:gpl2+)))
12644
12645(define-public python2-levenshtein
12646 (package-with-python2 python-levenshtein))
12647
12648(define-public python-scandir
12649 (package
12650 (name "python-scandir")
12651 (version "1.9.0")
12652 (source
12653 (origin
12654 (method url-fetch)
12655 (uri (pypi-uri "scandir" version))
12656 (sha256
12657 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12658 (build-system python-build-system)
12659 (arguments
12660 `(#:phases (modify-phases %standard-phases
12661 (replace 'check
12662 (lambda _
12663 (invoke "python" "test/run_tests.py"))))))
12664 (home-page "https://github.com/benhoyt/scandir")
12665 (synopsis "Directory iteration function")
12666 (description
12667 "Directory iteration function like os.listdir(), except that instead of
12668returning a list of bare filenames, it yields DirEntry objects that include
12669file type and stat information along with the name. Using scandir() increases
12670the speed of os.walk() by 2-20 times (depending on the platform and file
12671system) by avoiding unnecessary calls to os.stat() in most cases.
12672
12673This package is part of the Python standard library since version 3.5.")
12674 (license license:bsd-3)))
12675
12676(define-public python2-scandir
12677 (package-with-python2 python-scandir))
12678
12679(define-public python2-stemming
12680 (package
12681 (name "python2-stemming")
12682 (version "1.0.1")
12683 (source
12684 (origin
12685 (method url-fetch)
12686 (uri (pypi-uri "stemming" version))
12687 (sha256
12688 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12689 (build-system python-build-system)
12690 (arguments
12691 `(#:python ,python-2))
12692 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12693 (synopsis "Python implementations of various stemming algorithms")
12694 (description
12695 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12696stemming algorithms for English. These implementations are straightforward and
12697efficient, unlike some Python versions of the same algorithms available on the
12698Web. This package is an extraction of the stemming code included in the Whoosh
12699search engine.")
12700 (license license:public-domain)))
12701
12702(define-public python-factory-boy
12703 (package
12704 (name "python-factory-boy")
12705 (version "2.8.1")
12706 (source
12707 (origin
12708 (method url-fetch)
12709 (uri (pypi-uri "factory_boy" version))
12710 (sha256
12711 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12712 (build-system python-build-system)
12713 (arguments
12714 ;; Tests are not included in the tarball.
12715 `(#:tests? #f))
12716 (propagated-inputs
12717 `(("faker" ,python-faker)))
12718 (home-page "https://github.com/benhoyt/scandir")
12719 (synopsis "Versatile test fixtures replacement")
12720 (description
12721 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12722
12723As a fixtures replacement tool, it aims to replace static, hard to maintain
12724fixtures with easy-to-use factories for complex object.
12725
12726Instead of building an exhaustive test setup with every possible combination
12727of corner cases, factory_boy allows you to use objects customized for the
12728current test, while only declaring the test-specific fields")
12729 (license license:expat)))
12730
12731(define-public python2-factory-boy
12732 (package-with-python2 python-factory-boy))
12733
12734(define-public python-translate-toolkit
12735 (package
12736 (name "python-translate-toolkit")
12737 (version "2.1.0")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12742 (sha256
12743 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12744 (build-system python-build-system)
12745 (native-inputs
12746 `(("python-pytest" ,python-pytest)
12747 ("python-sphinx" ,python-sphinx)))
12748 (propagated-inputs
12749 `(("python-babel" ,python-babel)
12750 ("python-beautifulsoup4" ,python-beautifulsoup4)
12751 ("python-chardet" ,python-chardet)
12752 ("python-diff-match-patch" ,python-diff-match-patch)
12753 ("python-levenshtein" ,python-levenshtein)
12754 ("python-lxml" ,python-lxml)
12755 ("python-six" ,python-six)
12756 ("python-vobject" ,python-vobject)
12757 ("python-pyyaml" ,python-pyyaml)))
12758 (arguments
12759 ;; TODO: tests are not run, because they end with
12760 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12761 ;; 'parse_funcs'
12762 ;; during test setup.
12763 `(#:tests? #f))
18919cf9 12764 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12765 (synopsis "Tools and API for translation and localization engineering")
12766 (description
12767 "Tools and API for translation and localization engineering. It contains
12768several utilities, as well as an API for building localization tools.")
12769 (license license:gpl2+)))
12770
12771(define-public python2-translate-toolkit
12772 (package-with-python2 python-translate-toolkit))
12773
12774(define-public python-packaging
12775 (package
12776 (name "python-packaging")
5e5cdac0 12777 (version "19.0")
44d10b1f
RW
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "packaging" version))
12782 (sha256
12783 (base32
5e5cdac0 12784 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12785 (build-system python-build-system)
12786 (arguments
12787 `(#:phases (modify-phases %standard-phases
12788 (replace 'check
12789 (lambda _ (invoke "py.test" "-vv"))))))
12790 (native-inputs
12791 `(("python-pretend" ,python-pretend)
12792 ("python-pytest" ,python-pytest)))
12793 (propagated-inputs
12794 `(("python-pyparsing" ,python-pyparsing)
12795 ("python-six" ,python-six)))
12796 (home-page "https://github.com/pypa/packaging")
12797 (synopsis "Core utilities for Python packages")
12798 (description "Packaging is a Python module for dealing with Python packages.
12799It offers an interface for working with package versions, names, and dependency
12800information.")
12801 ;; From 'LICENSE': This software is made available under the terms of
12802 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12803 ;; Contributions to this software is made under the terms of *both* these
12804 ;; licenses.
12805 (license (list license:asl2.0 license:bsd-2))))
12806
12807(define-public python2-packaging
12808 (package-with-python2 python-packaging))
12809
12810(define-public python-relatorio
12811 (package
12812 (name "python-relatorio")
12813 (version "0.8.0")
12814 (source
12815 (origin
12816 (method url-fetch)
12817 (uri (pypi-uri "relatorio" version))
12818 (sha256
12819 (base32
12820 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12821 (build-system python-build-system)
12822 (propagated-inputs
12823 `(("python-lxml" ,python-lxml)
12824 ("python-genshi" ,python-genshi)))
12825 (native-inputs
12826 `(("python-magic" ,python-magic)))
12827 (home-page "https://relatorio.tryton.org/")
12828 (synopsis "Templating library able to output ODT and PDF files")
12829 (description "Relatorio is a templating library which provides a way to
12830easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12831for more filetypes can be easily added by creating plugins for them.")
12832 (license license:gpl3+)))
12833
12834(define-public python2-relatorio
12835 (package-with-python2 python-relatorio))
12836
12837(define-public python-radon
12838 (package
12839 (name "python-radon")
12840 (version "2.2.0")
12841 (source
12842 (origin
12843 (method url-fetch)
12844 (uri (pypi-uri "radon" version))
12845 (sha256
12846 (base32
12847 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12848 (build-system python-build-system)
12849 (arguments
12850 `(#:phases (modify-phases %standard-phases
12851 (replace 'check
12852 (lambda _
12853 (invoke "python" "radon/tests/run.py"))))))
12854 (propagated-inputs
12855 `(("python-colorama" ,python-colorama)
12856 ("python-flake8-polyfill" ,python-flake8-polyfill)
12857 ("python-mando" ,python-mando)))
12858 (native-inputs
12859 `(("python-pytest" ,python-pytest)
12860 ("python-pytest-mock" ,python-pytest-mock)))
12861 (home-page "https://radon.readthedocs.org/")
12862 (synopsis "Code Metrics in Python")
12863 (description "Radon is a Python tool which computes various code metrics.
12864Supported metrics are:
12865@itemize @bullet
12866@item raw metrics: SLOC, comment lines, blank lines, &c.
12867@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12868@item Halstead metrics (all of them)
12869@item the Maintainability Index (a Visual Studio metric)
12870@end itemize")
12871 (license license:expat)))
12872
12873(define-public python2-radon
12874 (package-with-python2 python-radon))
12875
12876(define-public python-sure
12877 (package
12878 (name "python-sure")
12879 (version "1.4.11")
12880 (source
12881 (origin
12882 (method url-fetch)
12883 (uri (pypi-uri "sure" version))
12884 (sha256
12885 (base32
12886 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12887 (build-system python-build-system)
12888 (propagated-inputs
12889 `(("python-mock" ,python-mock)
12890 ("python-six" ,python-six)))
12891 (native-inputs
12892 `(("python-nose" ,python-nose)))
12893 (home-page "https://github.com/gabrielfalcao/sure")
12894 (synopsis "Automated testing library in python for python")
12895 (description
12896 "Sure is a python library that leverages a DSL for writing assertions.
12897Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12898 (license license:gpl3+)))
12899
12900(define-public python2-sure
12901 (package-with-python2 python-sure))
12902
12903(define-public python2-couleur
12904 ;; This package does not seem to support python3 at all, hence,
12905 ;; only the python2 variant definition is provided.
12906 (package
12907 (name "python2-couleur")
12908 (version "0.6.2")
12909 (source
12910 (origin
12911 (method url-fetch)
12912 (uri (pypi-uri "couleur" version))
12913 (sha256
12914 (base32
12915 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12916 (build-system python-build-system)
12917 (arguments
12918 `(#:python ,python-2))
12919 (home-page "https://github.com/gabrielfalcao/couleur")
12920 (synopsis
12921 "ANSI terminal tool for python, colored shell and other handy fancy features")
12922 (description
12923 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12924terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12925 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12926 ;; https://github.com/gabrielfalcao/couleur/issues/11
12927 (license license:lgpl3+)))
12928
12929(define-public python-misaka
12930 (package
12931 (name "python-misaka")
0dcb3412 12932 (version "2.1.1")
44d10b1f
RW
12933 (source
12934 (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "misaka" version))
12937 (sha256
12938 (base32
0dcb3412 12939 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12940 (build-system python-build-system)
12941 (arguments
12942 `(;; Line 37 of setup.py calls self.run_command('develop')
12943 ;; in the 'check' phase. This command seems to be trying
12944 ;; to write to
12945 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12946 ;; for which it does not have the permission to write.
12947 #:tests? #f))
12948 (propagated-inputs
12949 `(("python-cffi" ,python-cffi)))
12950 (home-page "https://github.com/FSX/misaka")
12951 (synopsis "Python binding for Hoedown")
12952 (description
12953 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12954library written in C. It features a fast HTML renderer and functionality to make custom
12955renderers (e.g. man pages or LaTeX).")
12956 (license license:expat)))
12957
12958(define-public python2-misaka
12959 (package-with-python2 python-misaka))
12960
12961(define-public python2-steadymark
12962 ;; This is forced into being a python2 only variant
12963 ;; due to its dependence on couleur that has no support
12964 ;; for python3
12965 (package
12966 (name "python2-steadymark")
12967 (version "0.7.3")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "steadymark" version))
12972 (sha256
12973 (base32
12974 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12975 (build-system python-build-system)
12976 (native-inputs
12977 `(("python-couleur" ,python2-couleur)
12978 ("python-sure" ,python2-sure)
12979 ("python-misaka" ,python2-misaka)))
12980 (arguments
12981 `(#:python ,python-2
12982 #:phases
12983 (modify-phases %standard-phases
12984 (add-before 'build 'patch-setup-py
12985 (lambda _
12986 ;; Update requirements from dependency==version
12987 ;; to dependency>=version
12988 (substitute* "setup.py"
12989 (("==") ">="))
12990 #t)))))
12991 (home-page "https://github.com/gabrielfalcao/steadymark")
12992 (synopsis "Markdown-based test runner for python")
12993 (description
12994 "@code{Steadymark} allows documentation to be written in github-flavoured
12995markdown. The documentation may contain snippets of code surrounded by python
12996code blocks and @code{Steadymark} will find these snippets and run them, making
12997sure that there are no old malfunctional examples in the documentation examples.")
12998 (license license:expat)))
12999
13000(define-public python-jsonpointer
13001 (package
13002 (name "python-jsonpointer")
13003 (version "1.10")
13004 (source
13005 (origin
13006 (method url-fetch)
13007 (uri (pypi-uri "jsonpointer" version))
13008 (sha256
13009 (base32
13010 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13011 (build-system python-build-system)
13012 (home-page "https://github.com/stefankoegl/python-json-pointer")
13013 (synopsis "Identify specific nodes in a JSON document")
13014 (description "@code{jsonpointer} allows you to access specific nodes
13015by path in a JSON document (see RFC 6901).")
13016 (license license:bsd-3)))
13017
13018(define-public python2-jsonpointer
13019 (package-with-python2 python-jsonpointer))
13020
13021(define-public python-jsonpatch
13022 (package
13023 (name "python-jsonpatch")
13024 (version "1.16")
13025 (source
13026 (origin
13027 (method url-fetch)
13028 ;; pypi version lacks tests.js
13029 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13030 "archive/v" version ".tar.gz"))
13031 (file-name (string-append name "-" version ".tar.gz"))
13032 (sha256
13033 (base32
13034 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13035 (build-system python-build-system)
13036 (native-inputs
13037 `(("python-jsonpointer" ,python-jsonpointer)))
13038 (home-page "https://github.com/stefankoegl/python-json-patch")
13039 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13040 (description "@code{jsonpatch} is a library and program that allows
13041applying JSON Patches according to RFC 6902.")
13042 (license license:bsd-3)))
13043
13044(define-public python2-jsonpatch
13045 (package-with-python2 python-jsonpatch))
13046
13047(define-public python-jsonpatch-0.4
13048 (package (inherit python-jsonpatch)
13049 (name "python-jsonpatch")
13050 (version "0.4")
13051 (source
13052 (origin
13053 (method url-fetch)
13054 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13055 "archive/v" version ".tar.gz"))
13056 (file-name (string-append name "-" version ".tar.gz"))
13057 (sha256
13058 (base32
13059 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13060
13061(define-public python2-jsonpatch-0.4
13062 (package-with-python2 python-jsonpatch-0.4))
13063
13064(define-public python-rfc3986
13065 (package
13066 (name "python-rfc3986")
13067 (version "1.1.0")
13068 (source (origin
13069 (method url-fetch)
13070 (uri (pypi-uri "rfc3986" version))
13071 (sha256
13072 (base32
13073 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13074 (build-system python-build-system)
13075 (arguments
13076 `(#:modules ((guix build utils)
13077 (guix build python-build-system)
13078 (ice-9 ftw)
13079 (srfi srfi-1)
13080 (srfi srfi-26))
13081 #:phases
13082 (modify-phases %standard-phases
13083 (replace 'check
13084 (lambda _
13085 (let ((cwd (getcwd)))
13086 (setenv "PYTHONPATH"
13087 (string-append cwd "/build/"
13088 (find (cut string-prefix? "lib" <>)
13089 (scandir (string-append cwd "/build")))
13090 ":"
13091 (getenv "PYTHONPATH")))
13092 (invoke "pytest" "-v")))))))
13093 (native-inputs
13094 `(("python-pytest" ,python-pytest)))
13095 (home-page "https://rfc3986.readthedocs.io/")
13096 (synopsis "Parse and validate URI references")
13097 (description
13098 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13099validation and authority parsing. This module also supports RFC@tie{}6874
13100which adds support for zone identifiers to IPv6 addresses.")
13101 (license license:asl2.0)))
13102
13103(define-public python2-rfc3986
13104 (package-with-python2 python-rfc3986))
13105
13106(define-public python-rfc3987
13107 (package
13108 (name "python-rfc3987")
13109 (version "1.3.7")
13110 (source
13111 (origin
13112 (method url-fetch)
13113 (uri (pypi-uri "rfc3987" version))
13114 (sha256
13115 (base32
13116 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13117 (build-system python-build-system)
13118 (home-page "https://pypi.python.org/pypi/rfc3987")
13119 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13120 (description "@code{rfc3987} provides routines for parsing and
13121validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13122 (license license:gpl3+)))
13123
13124(define-public python2-rfc3987
13125 (package-with-python2 python-rfc3987))
13126
13127(define-public python-validate-email
13128 (package
13129 (name "python-validate-email")
13130 (version "1.3")
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (pypi-uri "validate_email" version))
13135 (sha256
13136 (base32
13137 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13138 (build-system python-build-system)
13139 (home-page "https://github.com/syrusakbary/validate_email")
13140 (synopsis "Verifies if an email address is valid and really exists")
13141 (description "@code{validate_email} can be used to verify if an email
13142address is valid and really exists.")
13143 (license license:lgpl3+)))
13144
13145(define-public python2-validate-email
13146 (package-with-python2 python-validate-email))
13147
13148(define-public python-flex
13149 (package
13150 (name "python-flex")
13151 (version "6.10.0")
13152 (source
13153 (origin
13154 (method url-fetch)
13155 (uri (pypi-uri "flex" version))
13156 (sha256
13157 (base32
13158 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13159 (build-system python-build-system)
13160 (propagated-inputs
13161 `(("python-click" ,python-click)
13162 ("python-iso8601" ,python-iso8601)
13163 ("python-jsonpointer" ,python-jsonpointer)
13164 ("python-pyyaml" ,python-pyyaml)
13165 ("python-requests" ,python-requests)
13166 ("python-rfc3987" ,python-rfc3987)
13167 ("python-six" ,python-six)
13168 ("python-validate-email" ,python-validate-email)))
13169 (home-page "https://github.com/pipermerriam/flex")
13170 (synopsis "Validates Swagger schemata")
13171 (description "@code{flex} can be used to validate Swagger schemata.")
13172 (license license:bsd-3)))
13173
13174(define-public python2-flex
13175 (package-with-python2 python-flex))
13176
13177(define-public python-marshmallow
13178 (package
13179 (name "python-marshmallow")
13180 (version "3.0.0b14")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "marshmallow" version))
13185 (sha256
13186 (base32
13187 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13188 (build-system python-build-system)
13189 (propagated-inputs
13190 `(("python-dateutil" ,python-dateutil)
13191 ("python-simplejson" ,python-simplejson)))
13192 (native-inputs
13193 `(("python-pytest" ,python-pytest)
13194 ("python-pytz" ,python-pytz)))
13195 (home-page "https://github.com/marshmallow-code/marshmallow")
13196 (synopsis "Convert complex datatypes to and from native
13197Python datatypes.")
13198 (description "@code{marshmallow} provides a library for converting
13199complex datatypes to and from native Python datatypes.")
13200 (license license:expat)))
13201
13202(define-public python2-marshmallow
13203 (package-with-python2 python-marshmallow))
13204
13205(define-public python-apispec
13206 (package
13207 (name "python-apispec")
13208 (version "0.25.3")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "apispec" version))
13213 (sha256
13214 (base32
13215 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13216 (build-system python-build-system)
13217 (propagated-inputs
13218 `(("python-pyyaml" ,python-pyyaml)))
13219 (native-inputs
13220 `(("python-pytest" ,python-pytest)
13221 ("python-flask" ,python-flask)
13222 ("python-marshmallow" ,python-marshmallow)
13223 ("python-tornado" ,python-tornado)
13224 ("python-bottle" ,python-bottle)
13225 ("python-mock" ,python-mock)))
13226 (home-page "https://github.com/marshmallow-code/apispec")
13227 (synopsis "Swagger 2.0 API specification generator")
13228 (description "@code{python-apispec} is a pluggable API specification
13229generator. Currently supports the OpenAPI specification (f.k.a.
13230Swagger 2.0).")
13231 (license license:expat)))
13232
13233(define-public python2-apispec
13234 (package-with-python2 python-apispec))
13235
13236(define-public python-flasgger
13237 (package
13238 (name "python-flasgger")
13239 (version "0.6.3")
13240 (source
13241 (origin
1a04d421
TGR
13242 (method git-fetch)
13243 (uri (git-reference
13244 (url "https://github.com/rochacbruno/flasgger.git")
13245 (commit version)))
13246 (file-name (git-file-name name version))
44d10b1f 13247 (sha256
1a04d421 13248 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13249 (build-system python-build-system)
13250 (arguments
13251 `(#:phases
13252 (modify-phases %standard-phases
13253 (replace 'check
13254 (lambda* (#:key inputs outputs #:allow-other-keys)
13255 (substitute* "Makefile"
13256 (("flake8 flasgger --ignore=F403")
13257 "flake8 flasgger --ignore=E731,F403"))
13258 (setenv "PYTHONPATH" (string-append (getcwd)
13259 ":"
13260 (getenv "PYTHONPATH")))
ac599a09 13261 (invoke "py.test"))))))
44d10b1f
RW
13262 (propagated-inputs
13263 `(("python-flask" ,python-flask)
13264 ("python-pyyaml" ,python-pyyaml)
13265 ("python-jsonschema" ,python-jsonschema)
13266 ("python-mistune" ,python-mistune)
13267 ("python-six" ,python-six)))
13268 (native-inputs
13269 `(("python-decorator" ,python-decorator)
13270 ("python-flake8" ,python-flake8)
13271 ("python-flask-restful" ,python-flask-restful)
13272 ("python-flex" ,python-flex)
13273 ("python-pytest" ,python-pytest)
13274 ("python-pytest-cov" ,python-pytest-cov)
13275 ("python-marshmallow" ,python-marshmallow)
13276 ("python-apispec" ,python-apispec)))
13277 (home-page "https://github.com/rochacbruno/flasgger/")
13278 (synopsis "Extract Swagger specs from your Flask project")
13279 (description "@code{python-flasgger} allows extracting Swagger specs
13280from your Flask project. It is a fork of Flask-Swagger.")
13281 (license license:expat)))
13282
13283(define-public python2-flasgger
13284 (package-with-python2 python-flasgger))
13285
13286(define-public python-swagger-spec-validator
13287 (package
13288 (name "python-swagger-spec-validator")
fe9c5b1d 13289 (version "2.4.3")
44d10b1f
RW
13290 (source
13291 (origin
13292 (method url-fetch)
13293 (uri (pypi-uri "swagger-spec-validator" version))
13294 (sha256
13295 (base32
fe9c5b1d 13296 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13297 (build-system python-build-system)
13298 (propagated-inputs
13299 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13300 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13301 ("python-six" ,python-six)))
13302 (home-page
13303 "https://github.com/Yelp/swagger_spec_validator")
13304 (synopsis "Validation of Swagger specifications")
13305 (description "@code{swagger_spec_validator} provides a library for
13306validating Swagger API specifications.")
13307 (license license:asl2.0)))
13308
13309(define-public python2-swagger-spec-validator
13310 (package-with-python2 python-swagger-spec-validator))
13311
13312(define-public python-apache-libcloud
13313 (package
13314 (name "python-apache-libcloud")
13315 (version "2.4.0")
13316 (source
13317 (origin
13318 (method url-fetch)
13319 (uri (pypi-uri "apache-libcloud" version))
13320 (sha256
13321 (base32
13322 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13323 (build-system python-build-system)
13324 (arguments
13325 `(#:phases
13326 (modify-phases %standard-phases
13327 (add-after 'unpack 'patch-ssh
13328 (lambda* (#:key inputs #:allow-other-keys)
13329 (substitute* "libcloud/compute/ssh.py"
13330 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13331 "/bin/ssh" "'")))
13332 #t))
13333 (add-after 'unpack 'patch-tests
13334 (lambda _
13335 (substitute* "./libcloud/test/test_file_fixtures.py"
13336 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13337 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13338 return (httplib.OK,
13339 \"1234abcd\",
13340 {\"test\": \"value\"},
13341 httplib.responses[httplib.OK])
13342 def _ascii"))
13343 (substitute* "libcloud/test/compute/test_ssh_client.py"
13344 (("class ShellOutSSHClientTests")
13345 "@unittest.skip(\"Guix container doesn't have ssh service\")
13346class ShellOutSSHClientTests")
13347 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13348 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13349 (("'.xF0', '.x90', '.x8D', '.x88'")
13350 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13351 #t))
13352 (add-before 'check 'copy-secret
13353 (lambda _
13354 (copy-file "libcloud/test/secrets.py-dist"
13355 "libcloud/test/secrets.py")
13356 #t)))))
13357 (inputs
13358 `(("openssh" ,openssh)))
13359 (propagated-inputs
13360 `(("python-paramiko" ,python-paramiko)
13361 ("python-requests" ,python-requests)))
13362 (native-inputs
13363 `(("python-lockfile" ,python-lockfile)
13364 ("python-mock" ,python-mock)
13365 ("python-pytest" ,python-pytest)
13366 ("python-pytest-runner" ,python-pytest-runner)
13367 ("python-requests-mock" ,python-requests-mock)))
13368 (home-page "https://libcloud.apache.org/")
13369 (synopsis "Unified Cloud API")
13370 (description "@code{libcloud} is a Python library for interacting with
13371many of the popular cloud service providers using a unified API.")
13372 (license license:asl2.0)))
13373
13374(define-public python2-apache-libcloud
13375 (package-with-python2 python-apache-libcloud))
13376
13377(define-public python-smmap2
13378 (package
13379 (name "python-smmap2")
13380 (version "2.0.3")
13381 (source
13382 (origin
13383 (method url-fetch)
13384 (uri (pypi-uri "smmap2" version))
13385 (sha256
13386 (base32
13387 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13388 (build-system python-build-system)
13389 (native-inputs
13390 `(("python-nosexcover" ,python-nosexcover)))
13391 (home-page "https://github.com/Byron/smmap")
13392 (synopsis "Python sliding window memory map manager")
13393 (description "@code{smmap2} is a pure Python implementation of a sliding
13394window memory map manager.")
13395 (license license:bsd-3)))
13396
13397(define-public python2-smmap2
13398 (package-with-python2 python-smmap2))
13399
13400(define-public python-regex
13401 (package
13402 (name "python-regex")
c187c9d7 13403 (version "2019.04.14")
44d10b1f
RW
13404 (source (origin
13405 (method url-fetch)
13406 (uri (pypi-uri "regex" version))
13407 (sha256
13408 (base32
c187c9d7
BT
13409 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13410 ;; TODO: Fix and enable regex_test.py tests that complain about the
13411 ;; test.support module not existing.
44d10b1f
RW
13412 (build-system python-build-system)
13413 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13414 (synopsis "Alternative regular expression module")
13415 (description "This regular expression implementation is backwards-
13416compatible with the standard @code{re} module, but offers additional
13417functionality like full case-folding for case-insensitive matches in Unicode.")
13418 (license license:psfl)))
13419
13420(define-public python2-regex
13421 (package-with-python2 python-regex))
13422
13423(define-public python2-pyopengl
13424 (package
13425 (name "python2-pyopengl")
13426 (version "3.1.0")
13427 (source
13428 (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "PyOpenGL" version))
13431 (sha256
13432 (base32
13433 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13434 (arguments
13435 `(#:python ,python-2))
13436 (build-system python-build-system)
13437 (home-page "http://pyopengl.sourceforge.net")
13438 (synopsis "Standard OpenGL bindings for Python")
13439 (description
13440 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13441related APIs. The binding is created using the standard @code{ctypes}
13442library.")
13443 (license license:bsd-3)))
13444
13445(define-public python2-pyopengl-accelerate
13446 (package
13447 (inherit python2-pyopengl)
13448 (name "python2-pyopengl-accelerate")
13449 (version "3.1.0")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "PyOpenGL-accelerate" version))
13454 (sha256
13455 (base32
13456 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13457 (synopsis "Acceleration code for PyOpenGL")
13458 (description
13459 "This is the Cython-coded accelerator module for PyOpenGL.")))
13460
13461(define-public python-rencode
13462 (package
13463 (name "python-rencode")
13464 (version "1.0.5")
13465 (source
13466 (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "rencode" version))
13469 (sha256
13470 (base32
13471 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13472 (build-system python-build-system)
13473 (arguments
13474 `(#:phases
13475 (modify-phases %standard-phases
13476 (add-before 'check 'delete-bogus-test
13477 ;; This test requires /home/aresch/Downloads, which is not provided by
13478 ;; the build environment.
13479 (lambda _
13480 (delete-file "rencode/t.py")
13481 #t)))))
13482 (native-inputs `(("pkg-config" ,pkg-config)
13483 ("python-cython" ,python-cython)))
13484 (home-page "https://github.com/aresch/rencode")
13485 (synopsis "Serialization of heterogeneous data structures")
13486 (description
13487 "The @code{rencode} module is a data structure serialization library,
13488similar to @code{bencode} from the BitTorrent project. For complex,
13489heterogeneous data structures with many small elements, r-encoding stake up
13490significantly less space than b-encodings. This version of rencode is a
13491complete rewrite in Cython to attempt to increase the performance over the
13492pure Python module.")
13493 (license license:bsd-3)))
13494
13495(define-public python2-rencode
13496 (package-with-python2 python-rencode))
13497
13498(define-public python-xenon
13499 (package
13500 (name "python-xenon")
13501 (version "0.5.4")
13502 (source
13503 (origin
13504 (method url-fetch)
13505 (uri (pypi-uri "xenon" version))
13506 (sha256
13507 (base32
13508 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13509 (build-system python-build-system)
13510 (native-inputs
13511 `(("python-pyyaml" ,python-pyyaml)
13512 ("python-radon" ,python-radon)
13513 ("python-requests" ,python-requests)
13514 ("python-flake8" ,python-flake8)
13515 ("python-tox" ,python-tox)))
13516 (arguments
13517 `(#:phases
13518 (modify-phases %standard-phases
13519 (add-before 'build 'patch-test-requirements
13520 (lambda _
13521 ;; Remove httpretty dependency for tests.
13522 (substitute* "setup.py"
13523 (("httpretty") ""))
13524 #t)))))
13525 (home-page "https://xenon.readthedocs.org/")
13526 (synopsis "Monitor code metrics for Python on your CI server")
13527 (description
13528 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13529Ideally, @code{xenon} is run every time code is committed. Through command
13530line options, various thresholds can be set for the complexity of code. It
13531will fail (i.e. it will exit with a non-zero exit code) when any of these
13532requirements is not met.")
13533 (license license:expat)))
13534
13535(define-public python2-xenon
13536 (package-with-python2 python-xenon))
13537
13538(define-public python-pysocks
13539 (package
13540 (name "python-pysocks")
b8725cdf 13541 (version "1.7.0")
44d10b1f
RW
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "PySocks" version))
13546 (sha256
13547 (base32
b8725cdf 13548 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13549 (build-system python-build-system)
13550 (arguments `(#:tests? #f))
13551 (home-page "https://github.com/Anorov/PySocks")
13552 (synopsis "SOCKS client module")
13553 (description "@code{pysocks} is an updated and semi-actively maintained
13554version of @code{SocksiPy} with bug fixes and extra features.")
13555 (license license:bsd-3)))
13556
13557(define-public python2-pysocks
13558 (package-with-python2 python-pysocks))
13559
13560(define-public python-pydiff
13561 (package
13562 (name "python-pydiff")
13563 (version "0.2")
13564 (source
13565 (origin
13566 (method url-fetch)
13567 (uri (pypi-uri "pydiff" version))
13568 (sha256
13569 (base32
13570 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13571 (build-system python-build-system)
13572 (home-page "https://github.com/myint/pydiff")
13573 (synopsis "Library to diff two Python files at the bytecode level")
13574 (description
13575 "@code{pydiff} makes it easy to look for actual code changes while
13576ignoring formatting changes.")
13577 (license license:expat)))
13578
13579(define-public python2-pydiff
13580 (package-with-python2 python-pydiff))
13581
13582(define-public python-tqdm
13583 (package
13584 (name "python-tqdm")
13585 (version "4.19.6")
13586 (source
13587 (origin
13588 (method url-fetch)
13589 (uri (pypi-uri "tqdm" version))
13590 (sha256
13591 (base32
13592 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13593 (build-system python-build-system)
13594 (native-inputs
13595 `(("python-flake8" ,python-flake8)
13596 ("python-nose" ,python-nose)
13597 ("python-coverage" ,python-coverage)))
13598 (home-page "https://github.com/tqdm/tqdm")
13599 (synopsis "Fast, extensible progress meter")
13600 (description
13601 "Make loops show a progress bar on the console by just wrapping any
13602iterable with @code{|tqdm(iterable)|}. Offers many options to define
13603design and layout.")
13604 (license (list license:mpl2.0 license:expat))))
13605
13606(define-public python2-tqdm
13607 (package-with-python2 python-tqdm))
13608
13609(define-public python-pkginfo
13610 (package
13611 (name "python-pkginfo")
13612 (version "1.4.2")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "pkginfo" version))
13617 (sha256
13618 (base32
13619 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13620 (build-system python-build-system)
13621 (arguments
13622 ;; The tests are broken upstream.
13623 '(#:tests? #f))
13624 (home-page
13625 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13626 (synopsis
13627 "Query metadatdata from sdists, bdists, and installed packages")
13628 (description
13629 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13630source distriubtion (an sdist) or a binary distribution (e.g., created by
13631running bdist_egg). It can also query the EGG-INFO directory of an installed
13632distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13633created by running @code{python setup.py develop}).")
13634 (license license:expat)))
13635
13636(define-public python2-pkginfo
13637 (package-with-python2 python-pkginfo))
13638
13639(define-public python-twine
13640 (package
13641 (name "python-twine")
13642 (version "1.9.1")
13643 (source
13644 (origin
13645 (method url-fetch)
13646 (uri (pypi-uri "twine" version))
13647 (sha256
13648 (base32
13649 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13650 (build-system python-build-system)
13651 (propagated-inputs
13652 `(("python-tqdm" ,python-tqdm)
13653 ("python-pkginfo" ,python-pkginfo)
13654 ("python-requests" ,python-requests)
13655 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13656 (home-page "https://github.com/pypa/twine")
13657 (synopsis "Collection of utilities for interacting with PyPI")
13658 (description
13659 "@code{twine} currently supports registering projects and uploading
13660distributions. It authenticates the user over HTTPS, allows them to pre-sign
13661their files and supports any packaging format (including wheels).")
13662 (license license:asl2.0)))
13663
13664(define-public python2-twine
13665 (package-with-python2 python-twine))
13666
13667(define-public python-linecache2
13668 (package
13669 (name "python-linecache2")
13670 (version "1.0.0")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "linecache2" version))
13675 (sha256
13676 (base32
13677 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13678 (build-system python-build-system)
13679 (arguments
13680 `(;; The tests depend on unittest2, and our version is a bit too old.
13681 #:tests? #f))
13682 (native-inputs
13683 `(("python-pbr" ,python-pbr-minimal)))
13684 (home-page
13685 "https://github.com/testing-cabal/linecache2")
13686 (synopsis "Backports of the linecache module")
13687 (description
13688 "The linecache module allows one to get any line from any file, while
13689attempting to optimize internally, using a cache, the common case where many
13690lines are read from a single file.")
13691 (license license:psfl)))
13692
13693(define-public python2-linecache2
13694 (package-with-python2 python-linecache2))
13695
13696(define-public python-traceback2
13697 (package
13698 (name "python-traceback2")
13699 (version "1.4.0")
13700 (source
13701 (origin
13702 (method url-fetch)
13703 (uri (pypi-uri "traceback2" version))
13704 (sha256
13705 (base32
13706 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13707 (build-system python-build-system)
13708 (arguments
13709 `(;; python-traceback2 and python-unittest2 depend on one another.
13710 #:tests? #f))
13711 (native-inputs
13712 `(("python-pbr" ,python-pbr-minimal)))
13713 (propagated-inputs
13714 `(("python-linecache2" ,python-linecache2)))
13715 (home-page
13716 "https://github.com/testing-cabal/traceback2")
13717 (synopsis "Backports of the traceback module")
13718 (description
13719 "This module provides a standard interface to extract, format and print
13720stack traces of Python programs. It exactly mimics the behavior of the Python
13721interpreter when it prints a stack trace.")
13722 (license license:psfl)))
13723
13724(define-public python2-traceback2
13725 (package-with-python2 python-traceback2))
13726
13727(define-public python-ratelimiter
13728 (package
13729 (name "python-ratelimiter")
13730 (version "1.2.0")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "ratelimiter" version))
13735 (sha256
13736 (base32
13737 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13738 (build-system python-build-system)
13739 (arguments
13740 '(#:tests? #f)) ; There are no tests in the pypi archive.
13741 (home-page "https://github.com/RazerM/ratelimiter")
13742 (synopsis "Simple rate limiting object")
13743 (description
13744 "The @code{ratelimiter} module ensures that an operation will not be
13745executed more than a given number of times during a given period.")
13746 (license license:asl2.0)))
13747
13748(define-public python2-ratelimiter
13749 (package-with-python2 python-ratelimiter))
13750
13751(define-public python-dukpy
13752 (package
13753 (name "python-dukpy")
13754 (version "0.3")
13755 (source
13756 (origin
5b77ebe1
TGR
13757 (method git-fetch)
13758 (uri (git-reference
13759 (url "https://github.com/kovidgoyal/dukpy.git")
13760 (commit (string-append "v" version))))
13761 (file-name (git-file-name name version))
44d10b1f 13762 (sha256
5b77ebe1 13763 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13764 (build-system python-build-system)
13765 (home-page "https://github.com/kovidgoyal/dukpy")
13766 (synopsis "Run JavaScript in python")
13767 (description
13768 "dukpy is a JavaScript runtime environment for Python using the duktape
13769embeddable JavaScript engine.")
13770 ;; Dukpy is licensed under MIT like the embedded duktape library,
13771 ;; with 'errors.c' as GPL3.
13772 (license (list license:expat license:gpl3))))
13773
13774(define-public python2-dukpy
13775 (package-with-python2 python-dukpy))
13776
13777(define-public python-jsonrpclib-pelix
13778 (package
13779 (name "python-jsonrpclib-pelix")
13780 (version "0.3.2")
13781 (source
13782 (origin
13783 (method url-fetch)
13784 (uri (pypi-uri "jsonrpclib-pelix" version))
13785 (sha256
13786 (base32
13787 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13788 (build-system python-build-system)
13789 (arguments
13790 `(#:tests? #f)) ; no tests in PyPI tarball
13791 (home-page "https://github.com/tcalmant/jsonrpclib/")
13792 (synopsis "JSON-RPC 2.0 client library for Python")
13793 (description
13794 "This library implements the JSON-RPC v2.0
13795specification (backwards-compatible) as a client library for Python. This
13796version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13797services.")
13798 (license license:asl2.0)))
13799
13800(define-public python2-jsonrpclib-pelix
13801 (package-with-python2 python-jsonrpclib-pelix))
13802
13803(define-public python-setuptools-scm-git-archive
13804 (package
13805 (name "python-setuptools-scm-git-archive")
13806 (version "1.0")
13807 (source
13808 (origin
13809 (method url-fetch)
13810 (uri (pypi-uri "setuptools_scm_git_archive" version))
13811 (sha256
13812 (base32
13813 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13814 (build-system python-build-system)
13815 (native-inputs
13816 `(("python-pytest" ,python-pytest)))
13817 (propagated-inputs
13818 `(("python-setuptools-scm" ,python-setuptools-scm)))
13819 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13820 (synopsis "Setuptools_scm plugin for git archives")
13821 (description
13822 "The setuptools_scm_git_archive package is a plugin to
13823setuptools_scm, which supports obtaining versions from git archives that
13824belong to tagged versions.")
13825 (license license:expat)))
13826
13827(define-public python2-setuptools-scm-git-archive
13828 (package-with-python2 python-setuptools-scm-git-archive))
13829
724a350c
RW
13830(define-public python-setuptools-git
13831 (package
13832 (name "python-setuptools-git")
13833 (version "1.2")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "setuptools-git" version))
13838 (sha256
13839 (base32
13840 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13841 (build-system python-build-system)
13842 (arguments
13843 `(#:phases
13844 (modify-phases %standard-phases
13845 ;; This is needed for tests.
13846 (add-after 'unpack 'configure-git
13847 (lambda _
13848 (setenv "HOME" "/tmp")
13849 (invoke "git" "config" "--global" "user.email" "guix")
13850 (invoke "git" "config" "--global" "user.name" "guix")
13851 #t)))))
13852 (native-inputs
13853 `(("git" ,git-minimal)))
13854 (home-page "https://github.com/msabramo/setuptools-git")
13855 (synopsis "Setuptools revision control system plugin for Git")
13856 (description
13857 "This package provides a plugin for Setuptools for revision control with
13858Git.")
13859 (license license:bsd-3)))
13860
44d10b1f
RW
13861(define-public python-pyclipper
13862 (package
13863 (name "python-pyclipper")
13864 (version "1.1.0.post1")
13865 (source
13866 (origin
13867 (method url-fetch)
13868 (uri (pypi-uri "pyclipper" version ".zip"))
13869 (sha256
13870 (base32
13871 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13872 (modules '((guix build utils)))
13873 (snippet
13874 '(begin
13875 ;; This file is generated by Cython.
13876 (delete-file "pyclipper/pyclipper.cpp") #t))))
13877 (build-system python-build-system)
13878 (arguments
13879 `(#:phases
13880 (modify-phases %standard-phases
13881 (add-before 'build 'cythonize-sources
13882 (lambda _
13883 (with-directory-excursion "pyclipper"
13884 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13885 (propagated-inputs
13886 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13887 (native-inputs
13888 `(("python-cython" ,python-cython)
13889 ("python-pytest" ,python-pytest)
13890 ("python-pytest-runner" ,python-pytest-runner)
13891 ("python-unittest2" ,python-unittest2)
13892 ("unzip" ,unzip)))
13893 (home-page "https://github.com/greginvm/pyclipper")
13894 (synopsis "Wrapper for Angus Johnson's Clipper library")
13895 (description
13896 "Pyclipper is a Cython wrapper for the C++ translation of the
13897Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13898 (license license:expat)))
13899
13900(define-public python2-pyclipper
13901 (package-with-python2 python-pyclipper))
13902
13903(define-public python2-booleanoperations
13904 (package
13905 (name "python2-booleanoperations")
13906 (version "0.7.1")
13907 (source
13908 (origin
13909 (method url-fetch)
13910 (uri (pypi-uri "booleanOperations" version ".zip"))
13911 (sha256
13912 (base32
13913 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13914 (build-system python-build-system)
13915 (arguments
13916 `(#:python ,python-2))
13917 (native-inputs
13918 `(("unzip" ,unzip)
13919 ("python2-pytest" ,python2-pytest)
13920 ("python2-pytest-runner" ,python2-pytest-runner)))
13921 (propagated-inputs
13922 `(("python-fonttools" ,python2-fonttools)
13923 ("python-pyclipper" ,python2-pyclipper)
13924 ("python-ufolib" ,python2-ufolib)))
13925 (home-page "https://github.com/typemytype/booleanOperations")
13926 (synopsis "Boolean operations on paths")
13927 (description
13928 "BooleanOperations provides a Python library that enables
13929boolean operations on paths.")
13930 (license license:expat)))
13931
13932(define-public python-tempdir
13933 (package
13934 (name "python-tempdir")
13935 (version "0.7.1")
13936 (source
13937 (origin
13938 (method url-fetch)
13939 (uri (pypi-uri "tempdir" version))
13940 (sha256
13941 (base32
13942 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13943 (build-system python-build-system)
13944 (home-page "https://pypi.org/project/tempdir/")
13945 (arguments
13946 ;; the package has no tests
13947 '(#:tests? #f))
13948 (synopsis "Python library for managing temporary directories")
13949 (description
13950 "This library manages temporary directories that are automatically
13951deleted with all their contents when they are no longer needed. It is
13952particularly convenient for use in tests.")
13953 (license license:expat)))
13954
13955(define-public python2-tempdir
13956 (package-with-python2 python-tempdir))
13957
13958(define-public python-activepapers
13959 (package
13960 (name "python-activepapers")
13961 (version "0.2.2")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "ActivePapers.Py" version))
13966 (sha256
13967 (base32
13968 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13969 (build-system python-build-system)
13970 (arguments
13971 `(#:modules ((ice-9 ftw)
13972 (srfi srfi-1)
13973 (guix build utils)
13974 (guix build python-build-system))
13975
13976 #:phases
13977 (modify-phases %standard-phases
13978 (add-after 'unpack 'delete-python2-code
13979 (lambda _
13980 (for-each delete-file
13981 '("lib/activepapers/builtins2.py"
13982 "lib/activepapers/standardlib2.py"
13983 "lib/activepapers/utility2.py"))))
13984 (replace 'check
13985 (lambda _
13986 ;; Deactivate the test cases that download files
13987 (setenv "NO_NETWORK_ACCESS" "1")
13988 ;; For some strange reason, some tests fail if nosetests runs all
13989 ;; test modules in a single execution. They pass if each test
13990 ;; module is run individually.
13991 (for-each (lambda (filename)
13992 (invoke "nosetests"
13993 (string-append "tests/" filename)))
13994 (scandir "tests"
13995 (lambda (filename)
13996 (string-suffix? ".py" filename)))))))))
13997 (native-inputs
13998 `(("python-tempdir" ,python-tempdir)
13999 ("python-nose" ,python-nose)))
14000 (propagated-inputs
14001 `(("python-h5py" ,python-h5py)))
14002 (home-page "http://www.activepapers.org/")
14003 (synopsis "Executable papers for scientific computing")
14004 (description
14005 "ActivePapers is a tool for working with executable papers, which
14006combine data, code, and documentation in single-file packages,
14007suitable for publication as supplementary material or on repositories
14008such as figshare or Zenodo.")
14009 (properties `((python2-variant . ,(delay python2-activepapers))))
14010 (license license:bsd-3)))
14011
14012(define-public python2-activepapers
14013 (let ((base (package-with-python2
14014 (strip-python2-variant python-activepapers))))
14015 (package
14016 (inherit base)
14017 (arguments
14018 (substitute-keyword-arguments (package-arguments base)
14019 ((#:phases phases)
14020 `(modify-phases ,phases
14021 (delete 'delete-python2-code)
14022 (add-after 'unpack 'delete-python3-code
14023 (lambda _
14024 (for-each delete-file
14025 '("lib/activepapers/builtins3.py"
14026 "lib/activepapers/standardlib3.py"
14027 "lib/activepapers/utility3.py")))))))))))
14028
14029(define-public python-semver
14030 (package
14031 (name "python-semver")
14032 (version "2.7.9")
14033 (source
14034 (origin
14035 (method url-fetch)
14036 (uri (pypi-uri "semver" version))
14037 (sha256
14038 (base32
14039 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14040 (build-system python-build-system)
14041 (arguments
14042 `(#:phases
14043 (modify-phases %standard-phases
14044 (add-after 'unpack 'patch-test-requirements
14045 (lambda _
14046 (substitute* "setup.py"
14047 ;; Our Python is new enough.
14048 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14049 #t)))))
14050 (native-inputs
14051 `(("python-tox" ,python-tox)
14052 ("python-virtualenv" ,python-virtualenv)))
14053 (home-page "https://github.com/k-bx/python-semver")
14054 (synopsis "Python helper for Semantic Versioning")
14055 (description "This package provides a Python library for
14056@url{Semantic Versioning, http://semver.org/}.")
14057 (license license:bsd-3)))
14058
14059(define-public python2-semver
14060 (package-with-python2 python-semver))
14061
14062(define-public python-pyro4
14063 (package
14064 (name "python-pyro4")
ad1acb81 14065 (version "4.75")
44d10b1f
RW
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "Pyro4" version))
14070 (sha256
ad1acb81 14071 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
14072 (build-system python-build-system)
14073 (propagated-inputs
14074 `(("python-serpent" ,python-serpent)))
14075 (home-page "https://pyro4.readthedocs.io")
14076 (synopsis "Distributed object middleware for Python")
14077 (description
14078 "Pyro enables you to build applications in which objects can talk to each
14079other over the network. You can just use normal Python method calls to call
14080objects on other machines, also known as remote procedure calls (RPC).")
14081 (license license:expat)))
14082
14083(define-public python2-pyro
14084 (package
14085 (name "python2-pyro")
14086 (version "3.16")
14087 (source
14088 (origin
14089 (method url-fetch)
14090 (uri (pypi-uri "Pyro" version))
14091 (file-name (string-append "Pyro-" version ".tar.gz"))
14092 (sha256
14093 (base32
14094 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14095 (build-system python-build-system)
14096 (arguments
14097 ;; Pyro is not compatible with Python 3
14098 `(#:python ,python-2
14099 ;; Pyro has no test cases for automatic execution
14100 #:tests? #f))
14101 (home-page "http://pythonhosted.org/Pyro/")
14102 (synopsis "Distributed object manager for Python")
14103 (description "Pyro is a Distributed Object Technology system
14104written in Python that is designed to be easy to use. It resembles
14105Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14106which is a system and language independent Distributed Object Technology
14107and has much more to offer than Pyro or RMI. Pyro 3.x is no
14108longer maintained. New projects should use Pyro4 instead, which
14109is the new Pyro version that is actively developed.")
14110 (license license:expat)))
14111
14112(define-public python2-scientific
14113 (package
14114 (name "python2-scientific")
14115 (version "2.9.4")
14116 (source
14117 (origin
14118 (method url-fetch)
14119 (uri (string-append "https://bitbucket.org/khinsen/"
14120 "scientificpython/downloads/ScientificPython-"
14121 version ".tar.gz"))
14122 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14123 (sha256
14124 (base32
14125 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14126 (build-system python-build-system)
14127 (inputs
14128 `(("netcdf" ,netcdf)))
14129 (propagated-inputs
14130 `(("python-numpy" ,python2-numpy-1.8)
14131 ("python-pyro" ,python2-pyro)))
14132 (arguments
14133 ;; ScientificPython is not compatible with Python 3
14134 `(#:python ,python-2
14135 #:tests? #f ; No test suite
14136 #:phases
14137 (modify-phases %standard-phases
14138 (replace 'build
14139 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14140 (invoke "python" "setup.py" "build"
14141 (string-append "--netcdf_prefix="
14142 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
14143 (home-page "https://bitbucket.org/khinsen/scientificpython")
14144 (synopsis "Python modules for scientific computing")
14145 (description "ScientificPython is a collection of Python modules that are
14146useful for scientific computing. Most modules are rather general (Geometry,
14147physical units, automatic derivatives, ...) whereas others are more
14148domain-specific (e.g. netCDF and PDB support). The library is currently
14149not actively maintained and works only with Python 2 and NumPy < 1.9.")
14150 (license license:cecill-c)))
14151
14152(define-public python2-mmtk
14153 (package
14154 (name "python2-mmtk")
14155 (version "2.7.11")
14156 (source
14157 (origin
14158 (method url-fetch)
14159 (uri (string-append "https://bitbucket.org/khinsen/"
14160 "mmtk/downloads/MMTK-" version ".tar.gz"))
14161 (file-name (string-append "MMTK-" version ".tar.gz"))
14162 (sha256
14163 (base32
14164 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14165 (build-system python-build-system)
14166 (native-inputs
14167 `(("netcdf" ,netcdf)))
14168 (propagated-inputs
14169 `(("python-scientific" ,python2-scientific)
14170 ("python-tkinter" ,python-2 "tk")))
14171 (arguments
14172 `(#:python ,python-2
14173 #:tests? #f
14174 #:phases
14175 (modify-phases %standard-phases
14176 (add-before 'build 'includes-from-scientific
14177 (lambda* (#:key inputs #:allow-other-keys)
14178 (mkdir-p "Include/Scientific")
14179 (copy-recursively
14180 (string-append
14181 (assoc-ref inputs "python-scientific")
14182 "/include/python2.7/Scientific")
14183 "Include/Scientific"))))))
14184 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14185 (synopsis "Python library for molecular simulation")
14186 (description "MMTK is a library for molecular simulations with an emphasis
14187on biomolecules. It provides widely used methods such as Molecular Dynamics
14188and normal mode analysis, but also basic routines for implementing new methods
14189for simulation and analysis. The library is currently not actively maintained
14190and works only with Python 2 and NumPy < 1.9.")
14191 (license license:cecill-c)))
14192
14193(define-public python-phonenumbers
14194 (package
14195 (name "python-phonenumbers")
14196 (version "8.9.1")
14197 (source
14198 (origin
14199 (method url-fetch)
14200 (uri (pypi-uri "phonenumbers" version))
14201 (sha256
14202 (base32
14203 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14204 (build-system python-build-system)
14205 (home-page
14206 "https://github.com/daviddrysdale/python-phonenumbers")
14207 (synopsis
14208 "Python library for dealing with international phone numbers")
14209 (description
14210 "This package provides a Python port of Google's libphonenumber library.")
14211 (license license:asl2.0)))
14212
14213(define-public python2-phonenumbers
14214 (package-with-python2 python-phonenumbers))
14215
14216(define-public python-send2trash
14217 (package
14218 (name "python-send2trash")
d9b0216b 14219 (version "1.5.0")
44d10b1f 14220 (source
d9b0216b 14221 (origin (method git-fetch)
44d10b1f 14222 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14223 (uri (git-reference
14224 (url "https://github.com/hsoft/send2trash.git")
14225 (commit version)))
14226 (file-name (git-file-name name version))
44d10b1f
RW
14227 (sha256
14228 (base32
d9b0216b 14229 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14230 (build-system python-build-system)
14231 (arguments
14232 '(#:phases
14233 (modify-phases %standard-phases
14234 (add-before 'check 'pre-check
14235 (lambda _
14236 (mkdir-p "/tmp/foo")
14237 (setenv "HOME" "/tmp/foo")
14238 #t)))))
14239 (home-page "https://github.com/hsoft/send2trash")
14240 (synopsis "Send files to the user's @file{~/Trash} directory")
14241 (description "This package provides a Python library to send files to the
14242user's @file{~/Trash} directory.")
20b3fde7 14243 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14244 (license license:bsd-3)))
14245
14246(define-public python2-send2trash
14247 (package
f32164ab 14248 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14249 (arguments
14250 (substitute-keyword-arguments (package-arguments python-send2trash)
14251 ((#:phases phases)
14252 `(modify-phases ,phases
14253 (add-before 'check 'setenv
14254 (lambda _
14255 (setenv "PYTHONPATH"
14256 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14257 #t))))))))
44d10b1f
RW
14258
14259(define-public python-yapf
14260 (package
14261 (name "python-yapf")
14262 (version "0.24.0")
14263 (source
14264 (origin
14265 (method url-fetch)
14266 (uri (pypi-uri "yapf" version))
14267 (sha256
14268 (base32
14269 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14270 (build-system python-build-system)
14271 (home-page "https://github.com/google/yapf")
14272 (synopsis "Formatter for Python code")
14273 (description "YAPF is a formatter for Python code. It's based off of
14274@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14275takes the code and reformats it to the best formatting that conforms to the
14276style guide, even if the original code didn't violate the style guide.")
14277 (license license:asl2.0)))
14278
14279(define-public python2-yapf
14280 (package-with-python2 python-yapf))
14281
14282(define-public python-gyp
14283 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14284 (revision "0"))
14285 (package
14286 (name "python-gyp")
14287 ;; Google does not release versions,
14288 ;; based on second most recent commit date.
14289 (version (git-version "0.0.0" revision commit))
14290 (source
14291 (origin
14292 ;; Google does not release tarballs,
14293 ;; git checkout is needed.
14294 (method git-fetch)
14295 (uri (git-reference
14296 (url "https://chromium.googlesource.com/external/gyp")
14297 (commit commit)))
14298 (file-name (git-file-name name version))
14299 (sha256
14300 (base32
14301 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14302 (build-system python-build-system)
14303 (home-page "https://gyp.gsrc.io/")
14304 (synopsis "GYP is a Meta-Build system")
14305 (description
14306 "GYP builds build systems for large, cross platform applications.
14307It can be used to generate XCode projects, Visual Studio projects, Ninja build
14308files, and Makefiles.")
14309 (license license:bsd-3))))
14310
14311(define-public python2-gyp
14312 (package-with-python2 python-gyp))
14313
14314(define-public python-whatever
14315 (package
14316 (name "python-whatever")
14317 (version "0.5")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14322 ".tar.gz"))
14323 (sha256
14324 (base32
14325 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14326 (file-name (string-append name "-" version ".tar.gz"))))
14327 (build-system python-build-system)
14328 (arguments
14329 `(#:phases
14330 (modify-phases %standard-phases
14331 (replace 'check
14332 (lambda _
14333 (invoke "py.test"))))))
14334 (native-inputs
14335 `(("python-pytest" ,python-pytest)))
14336 (home-page "http://github.com/Suor/whatever")
14337 (synopsis "Make anonymous functions by partial application of operators")
14338 (description "@code{whatever} provides an easy way to make anonymous
14339functions by partial application of operators.")
14340 (license license:bsd-3)))
14341
14342(define-public python2-whatever
14343 (package-with-python2 python-whatever))
14344
14345(define-public python-funcy
14346 (package
14347 (name "python-funcy")
9e396ab8 14348 (version "1.11")
44d10b1f
RW
14349 (source
14350 (origin
a85c6027
TGR
14351 (method git-fetch)
14352 (uri (git-reference
14353 (url "https://github.com/Suor/funcy.git")
14354 (commit version)))
44d10b1f 14355 (sha256
a85c6027
TGR
14356 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14357 (file-name (git-file-name name version))))
44d10b1f
RW
14358 (build-system python-build-system)
14359 (arguments
14360 `(#:phases
14361 (modify-phases %standard-phases
14362 (replace 'check
14363 (lambda _
14364 (invoke "py.test"))))))
14365 (native-inputs
14366 `(("python-pytest" ,python-pytest)
14367 ("python-whatever" ,python-whatever)))
14368 (home-page "http://github.com/Suor/funcy")
14369 (synopsis "Functional tools")
14370 (description "@code{funcy} is a library that provides functional tools.
14371Examples are:
14372@enumerate
14373@item merge - Merges collections of the same type
14374@item walk - Type-preserving map
14375@item select - Selects a part of a collection
14376@item take - Takes the first n items of a collection
14377@item first - Takes the first item of a collection
14378@item remove - Predicated-removes items of a collection
14379@item concat - Concatenates two collections
14380@item flatten - Flattens a collection with subcollections
14381@item distinct - Returns only distinct items
14382@item split - Predicated-splits a collection
14383@item split_at - Splits a collection at a given item
14384@item group_by - Groups items by group
14385@item pairwise - Pairs off adjacent items
14386@item partial - Partially-applies a function
14387@item curry - Curries a function
14388@item compose - Composes functions
14389@item complement - Complements a predicate
14390@item all_fn - \"all\" with predicate
14391@end enumerate")
14392 (license license:bsd-3)))
14393
14394(define-public python2-funcy
14395 (package-with-python2 python-funcy))
14396
14397(define-public python-isoweek
14398 (package
14399 (name "python-isoweek")
14400 (version "1.3.3")
14401 (source
14402 (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "isoweek" version))
14405 (sha256
14406 (base32
14407 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14408 (build-system python-build-system)
14409 (home-page "https://github.com/gisle/isoweek")
14410 (synopsis "Objects representing a week")
14411 (description "The @code{isoweek} module provide the class Week that
14412implements the week definition of ISO 8601. This standard also defines
14413a notation for identifying weeks; yyyyWww (where the W is a literal).
14414Week instances stringify to this form.")
14415 (license license:bsd-3)))
14416
14417(define-public python2-isoweek
14418 (package-with-python2 python-isoweek))
14419
14420(define-public python-tokenize-rt
14421 (package
14422 (name "python-tokenize-rt")
14423 (version "2.0.1")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "tokenize-rt" version))
14428 (sha256
14429 (base32
14430 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14431 (build-system python-build-system)
14432 (home-page "https://github.com/asottile/tokenize-rt")
14433 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14434 (description
14435 "This Python library is a wrapper around @code{tokenize} from the Python
14436standard library. It provides two additional tokens @code{ESCAPED_NL} and
14437@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14438and @code{tokens_to_src} to roundtrip.")
14439 (license license:expat)))
14440
14441(define-public python-future-fstrings
14442 (package
14443 (name "python-future-fstrings")
14444 (version "0.4.1")
14445 (source
14446 (origin
14447 (method url-fetch)
14448 (uri (pypi-uri "future_fstrings" version))
14449 (sha256
14450 (base32
14451 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14452 (build-system python-build-system)
14453 (propagated-inputs
14454 `(("python-tokenize-rt" ,python-tokenize-rt)))
14455 (home-page "https://github.com/asottile/future-fstrings")
14456 (synopsis "Backport of fstrings to Python < 3.6")
14457 (description
14458 "This package provides a UTF-8 compatible encoding
14459@code{future_fstrings}, which performs source manipulation. It decodes the
14460source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14461@code{f} strings.")
14462 (license license:expat)))
14463
dae2eb1c
MC
14464(define-public python-typed-ast
14465 (package
14466 (name "python-typed-ast")
14467 (version "1.3.5")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "typed-ast" version))
14472 (sha256
14473 (base32
14474 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14475 (build-system python-build-system)
14476 (arguments
14477 `(#:modules ((guix build utils)
14478 (guix build python-build-system)
14479 (ice-9 ftw)
14480 (srfi srfi-1)
14481 (srfi srfi-26))
14482 #:phases
14483 (modify-phases %standard-phases
14484 (replace 'check
14485 (lambda _
14486 (let ((cwd (getcwd)))
14487 (setenv "PYTHONPATH"
14488 (string-append cwd "/build/"
14489 (find (cut string-prefix? "lib" <>)
14490 (scandir (string-append cwd "/build")))
14491 ":"
14492 (getenv "PYTHONPATH"))))
14493 (invoke "pytest")
14494 #t)))))
14495 (native-inputs `(("python-pytest" ,python-pytest)))
14496 (home-page "https://github.com/python/typed_ast")
14497 (synopsis "Fork of Python @code{ast} modules with type comment support")
14498 (description "This package provides a parser similar to the standard
14499@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14500include PEP 484 type comments and are independent of the version of Python
14501under which they are run. The @code{typed_ast} parsers produce the standard
14502Python AST (plus type comments), and are both fast and correct, as they are
14503based on the CPython 2.7 and 3.7 parsers.")
14504 ;; See the file "LICENSE" for the details.
14505 (license (list license:psfl
14506 license:asl2.0
14507 license:expat)))) ;ast27/Parser/spark.py
14508
44d10b1f
RW
14509(define-public python-typing
14510 (package
14511 (name "python-typing")
14512 (version "3.6.6")
14513 (source
14514 (origin
14515 (method url-fetch)
14516 (uri (pypi-uri "typing" version))
14517 (sha256
14518 (base32
14519 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14520 (build-system python-build-system)
14521 (home-page "https://docs.python.org/3/library/typing.html")
14522 (synopsis "Type hints for Python")
14523 (description "This is a backport of the standard library @code{typing}
14524module to Python versions older than 3.5. Typing defines a standard notation
14525for Python function and variable type annotations. The notation can be used
14526for documenting code in a concise, standard format, and it has been designed
14527to also be used by static and runtime type checkers, static analyzers, IDEs
14528and other tools.")
14529 (license license:psfl)))
14530
14531(define-public python2-typing
14532 (package-with-python2 python-typing))
14533
f89d443b
VC
14534(define-public python-typing-extensions
14535 (package
14536 (name "python-typing-extensions")
14537 (version "3.7.2")
14538 (source
14539 (origin
14540 (method url-fetch)
14541 (uri (pypi-uri "typing_extensions" version))
14542 (sha256
14543 (base32
14544 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14545 (build-system python-build-system)
14546 (home-page
14547 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14548 (synopsis "Experimental type hints for Python")
14549 (description
14550 "The typing_extensions module contains additional @code{typing} hints not
14551yet present in the of the @code{typing} standard library.
14552Included are implementations of:
14553@enumerate
14554@item ClassVar
14555@item ContextManager
14556@item Counter
14557@item DefaultDict
14558@item Deque
14559@item NewType
14560@item NoReturn
14561@item overload
14562@item Protocol
14563@item runtime
14564@item Text
14565@item Type
14566@item TYPE_CHECKING
14567@item AsyncGenerator
14568@end enumerate\n")
14569 (license license:psfl)))
14570
44d10b1f
RW
14571(define-public bpython
14572 (package
14573 (name "bpython")
14574 (version "0.17.1")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (pypi-uri "bpython" version))
14579 (sha256
14580 (base32
14581 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14582 (build-system python-build-system)
14583 (arguments
14584 `(#:phases
14585 (modify-phases %standard-phases
14586 (add-after 'unpack 'remove-failing-test
14587 (lambda _
14588 ;; Remove failing test. FIXME: make it pass
14589 (delete-file "bpython/test/test_args.py")
14590 #t))
14591 (add-after 'wrap 'add-aliases
14592 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14593 (lambda* (#:key outputs #:allow-other-keys)
14594 (let ((out (assoc-ref outputs "out")))
14595 (for-each
14596 (lambda (old new)
14597 (symlink old (string-append out "/bin/" new)))
14598 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14599 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14600 #t)))))
14601 (propagated-inputs
14602 `(("python-pygments" ,python-pygments)
14603 ("python-requests" ,python-requests)
14604 ("python-babel" ,python-babel) ; optional, for internationalization
14605 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14606 ("python-greenlet" ,python-greenlet)
14607 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14608 ("python-six" ,python-six)))
14609 (native-inputs
14610 `(("python-sphinx" ,python-sphinx)
14611 ("python-mock" ,python-mock)))
14612 (home-page "https://bpython-interpreter.org/")
14613 (synopsis "Fancy interface to the Python interpreter")
14614 (description "Bpython is a fancy interface to the Python
14615interpreter. bpython's main features are
14616
14617@enumerate
14618@item in-line syntax highlighting,
14619@item readline-like autocomplete with suggestions displayed as you type,
14620@item expected parameter list for any Python function,
14621@item \"rewind\" function to pop the last line of code from memory and
14622 re-evaluate,
14623@item send the code you've entered off to a pastebin,
14624@item save the code you've entered to a file, and
14625@item auto-indentation.
14626@end enumerate")
14627 (license license:expat)))
14628
14629(define-public bpython2
14630 (let ((base (package-with-python2
14631 (strip-python2-variant bpython))))
14632 (package (inherit base)
14633 (name "bpython2")
14634 (arguments
14635 `(#:python ,python-2
14636 #:phases
14637 (modify-phases %standard-phases
14638 (add-after 'unpack 'remove-failing-test
14639 (lambda _
14640 ;; Remove failing test. FIXME: make it pass
14641 (delete-file "bpython/test/test_args.py")
14642 ;; Disable failing test-cases (renaming inhibits they are
14643 ;; discovered)
14644 (substitute* "bpython/test/test_curtsies_repl.py"
14645 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14646 (string-append a "xxx_off_" b))
14647 (("^(\\s*def )(test_complex\\W)" _ a b)
14648 (string-append a "xxx_off_" b)))
14649 #t))
14650 (add-before 'build 'rename-scripts
14651 ;; rename the scripts to bypthon2, bpdb2, etc.
14652 (lambda _
14653 (substitute* "setup.py"
14654 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14655 (string-append name "2" rest "\n"))
14656 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14657 (string-append name "2" (or sub "") rest "\n")))
14658 #t))))))))
14659
14660(define-public python-pyinotify
14661 (package
14662 (name "python-pyinotify")
14663 (version "0.9.6")
14664 (source (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "pyinotify" version))
14667 (sha256
14668 (base32
14669 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14670 (build-system python-build-system)
14671 (arguments `(#:tests? #f)) ;no tests
14672 (home-page "https://github.com/seb-m/pyinotify")
14673 (synopsis "Python library for monitoring inotify events")
14674 (description
14675 "@code{pyinotify} provides a Python interface for monitoring
14676file system events on Linux.")
14677 (license license:expat)))
14678
14679(define-public python2-pyinotify
14680 (package-with-python2 python-pyinotify))
14681
14682;; Ada parser uses this version.
14683(define-public python2-quex-0.67.3
14684 (package
14685 (name "python2-quex")
14686 (version "0.67.3")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14691 (version-major+minor version)
14692 "/quex-" version ".zip"))
14693 (sha256
14694 (base32
14695 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14696 (build-system python-build-system)
14697 (native-inputs
14698 `(("unzip" ,unzip)))
14699 (arguments
14700 `(#:python ,python-2
14701 #:tests? #f
14702 #:phases
14703 (modify-phases %standard-phases
14704 (delete 'configure)
14705 (delete 'build)
14706 (replace 'install
14707 (lambda* (#:key outputs #:allow-other-keys)
14708 (let* ((out (assoc-ref outputs "out"))
14709 (share/quex (string-append out "/share/quex"))
14710 (bin (string-append out "/bin")))
14711 (copy-recursively "." share/quex)
14712 (mkdir-p bin)
14713 (symlink (string-append share/quex "/quex-exe.py")
14714 (string-append bin "/quex"))
14715 #t))))))
14716 (native-search-paths
14717 (list (search-path-specification
14718 (variable "QUEX_PATH")
14719 (files '("share/quex")))))
14720 (home-page "http://quex.sourceforge.net/")
14721 (synopsis "Lexical analyzer generator in Python")
14722 (description "@code{quex} is a lexical analyzer generator in Python.")
14723 (license license:lgpl2.1+))) ; Non-military
14724
14725(define-public python2-quex
14726 (package (inherit python2-quex-0.67.3)
14727 (name "python2-quex")
14728 (version "0.68.1")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14733 (sha256
14734 (base32
14735 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14736 (file-name (string-append name "-" version ".tar.gz"))))))
14737
14738(define-public python-more-itertools
14739 (package
14740 (name "python-more-itertools")
14741 (version "4.3.0")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "more-itertools" version))
14746 (sha256
14747 (base32
14748 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14749 (build-system python-build-system)
14750 (arguments
14751 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14752 (%current-target-system)))
14753 '("armhf" "i686"))
14754 '(#:phases
14755 (modify-phases %standard-phases
14756 ;; This is required for 32-bit hardware.
14757 ;; TODO: Try to remove this when upgrading.
14758 (add-after 'unpack 'patch-test
14759 (lambda _
14760 (substitute* "more_itertools/tests/test_more.py"
14761 (("10 \\*\\* 10") "9 ** 9"))
14762 #t))))
14763 '())))
14764 (propagated-inputs
14765 `(("python-six" ,python-six-bootstrap)))
14766 (home-page "https://github.com/erikrose/more-itertools")
14767 (synopsis "More routines for operating on iterables, beyond itertools")
14768 (description "Python's built-in @code{itertools} module implements a
14769number of iterator building blocks inspired by constructs from APL, Haskell,
14770and SML. @code{more-itertools} includes additional building blocks for
14771working with iterables.")
14772 (license license:expat)))
14773
14774(define-public python2-more-itertools
14775 (package-with-python2 python-more-itertools))
14776
14777(define-public python-latexcodec
14778 (package
14779 (name "python-latexcodec")
91b61f02 14780 (version "1.0.6")
44d10b1f
RW
14781 (source
14782 (origin
14783 (method url-fetch)
14784 (uri (pypi-uri "latexcodec" version))
14785 (sha256
91b61f02 14786 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14787 (build-system python-build-system)
14788 (inputs
14789 `(("python-six" ,python-six)))
14790 (home-page "https://readthedocs.org/projects/latexcodec/")
14791 (synopsis "Work with LaTeX code in Python")
14792 (description "Lexer and codec to work with LaTeX code in Python.")
14793 (license license:expat)))
14794
14795(define-public python-pybtex
14796 (package
14797 (name "python-pybtex")
9441a9c1 14798 (version "0.22.2")
44d10b1f
RW
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "pybtex" version))
14803 (sha256
9441a9c1 14804 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
14805 (build-system python-build-system)
14806 (native-inputs
14807 `(("python-nose" ,python-nose)))
14808 (inputs
14809 `(("python-latexcodec" ,python-latexcodec)
14810 ("python-pyyaml" ,python-pyyaml)
14811 ("python-six" ,python-six)))
14812 (arguments
14813 `(#:test-target "nosetests"))
14814 (home-page "https://pybtex.org/")
14815 (synopsis "BibTeX-compatible bibliography processor")
14816 (description "Pybtex is a BibTeX-compatible bibliography processor written
14817in Python. You can simply type pybtex instead of bibtex.")
14818 (license license:expat)))
14819
14820(define-public python-onetimepass
14821 (package
14822 (name "python-onetimepass")
14823 (version "1.0.1")
14824 (source
14825 (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "onetimepass" version))
14828 (sha256
14829 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14830 (build-system python-build-system)
14831 (propagated-inputs `(("python-six" ,python-six)))
14832 (home-page "https://github.com/tadeck/onetimepass/")
14833 (synopsis "One-time password library")
14834 (description "Python one-time password library for HMAC-based (HOTP) and
14835time-based (TOTP) passwords.")
14836 (license license:expat)))
14837
14838(define-public python-parso
14839 (package
14840 (name "python-parso")
1475094a 14841 (version "0.5.1")
44d10b1f
RW
14842 (source
14843 (origin
14844 (method url-fetch)
14845 (uri (pypi-uri "parso" version))
14846 (sha256
14847 (base32
1475094a 14848 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
14849 (native-inputs
14850 `(("python-pytest" ,python-pytest)))
14851 (build-system python-build-system)
4eb97c25
MC
14852 (arguments
14853 `(#:phases (modify-phases %standard-phases
14854 (replace 'check
14855 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
14856 (home-page "https://github.com/davidhalter/parso")
14857 (synopsis "Python Parser")
14858 (description "Parso is a Python parser that supports error recovery and
14859round-trip parsing for different Python versions (in multiple Python versions).
14860Parso is also able to list multiple syntax errors in your Python file.")
14861 (license license:expat)))
14862
14863(define-public python2-parso
14864 (package-with-python2 python-parso))
14865
14866(define-public python-async-generator
14867 (package
14868 (name "python-async-generator")
94fcbf8d 14869 (version "1.10")
44d10b1f
RW
14870 (source
14871 (origin
14872 (method url-fetch)
14873 (uri (pypi-uri "async_generator" version))
14874 (sha256
14875 (base32
94fcbf8d 14876 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14877 (build-system python-build-system)
14878 (native-inputs
14879 `(("python-pytest" ,python-pytest)))
14880 (home-page "https://github.com/python-trio/async_generator")
14881 (synopsis "Async generators and context managers for Python 3.5+")
14882 (description "@code{async_generator} back-ports Python 3.6's native async
14883generators and Python 3.7's context managers into Python 3.5.")
14884 ;; Dual licensed.
14885 (license (list license:expat license:asl2.0))))
14886
14887(define-public python-async-timeout
14888 (package
14889 (name "python-async-timeout")
14890 (version "3.0.1")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (pypi-uri "async-timeout" version))
14895 (sha256
14896 (base32
14897 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14898 (build-system python-build-system)
14899 (home-page "https://github.com/aio-libs/async_timeout/")
14900 (synopsis "Timeout context manager for asyncio programs")
14901 (description "@code{async-timeout} provides a timeout timeout context
14902manager compatible with @code{asyncio}.")
14903 (license license:asl2.0)))
14904
14905(define-public python-glob2
14906 (package
14907 (name "python-glob2")
14908 (version "0.6")
8fa2bcc7
TGR
14909 (source
14910 (origin
14911 (method git-fetch)
14912 (uri (git-reference
14913 (url "https://github.com/miracle2k/python-glob2.git")
14914 (commit version)))
14915 (file-name (git-file-name name version))
14916 (sha256
14917 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14918 (build-system python-build-system)
14919 (home-page "https://github.com/miracle2k/python-glob2/")
14920 (synopsis "Extended Version of the python buildin glob module")
14921 (description "This is an extended version of the Python
14922@url{http://docs.python.org/library/glob.html, built-in glob module} which
14923adds:
14924
14925@itemize
14926@item The ability to capture the text matched by glob patterns, and return
14927those matches alongside the file names.
14928@item A recursive @code{**} globbing syntax, akin for example to the
14929@code{globstar} option of Bash.
14930@item The ability to replace the file system functions used, in order to glob
14931on virtual file systems.
14932@item Compatible with Python 2 and Python 3 (tested with 3.3).
14933@end itemize
14934
14935Glob2 currently based on the glob code from Python 3.3.1.")
14936 (license license:bsd-2)))
14937
14938(define-public python2-glob2
14939 (package-with-python2 python-glob2))
14940
14941(define-public python-gipc
14942 (package
14943 (name "python-gipc")
14944 (version "0.6.0")
14945 (source
14946 (origin
14947 (method url-fetch)
14948 (uri (pypi-uri "gipc" version ".zip"))
14949 (sha256
14950 (base32
14951 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14952 (build-system python-build-system)
14953 (native-inputs
14954 `(("unzip" ,unzip)))
14955 (propagated-inputs
14956 `(("python-gevent" ,python-gevent)))
14957 (home-page "http://gehrcke.de/gipc")
14958 (synopsis "Child process management in the context of gevent")
14959 (description "Usage of Python's multiprocessing package in a
14960gevent-powered application may raise problems. With @code{gipc},
14961process-based child processes can safely be created anywhere within a
14962gevent-powered application.")
14963 (license license:expat)))
14964
14965(define-public python2-gipc
14966 (package-with-python2 python-gipc))
14967
14968(define-public python-fusepy
14969 (package
14970 (name "python-fusepy")
14971 (version "2.0.4")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "fusepy" version))
14976 (sha256
14977 (base32
14978 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14979 (build-system python-build-system)
14980 (arguments
14981 `(#:phases
14982 (modify-phases %standard-phases
14983 (add-before 'build 'set-library-file-name
14984 (lambda* (#:key inputs #:allow-other-keys)
14985 (let ((fuse (assoc-ref inputs "fuse")))
14986 (substitute* "fuse.py"
14987 (("find_library\\('fuse'\\)")
14988 (string-append "'" fuse "/lib/libfuse.so'")))
14989 #t))))))
14990 (propagated-inputs
14991 `(("fuse" ,fuse)))
14992 (home-page "https://github.com/fusepy/fusepy")
14993 (synopsis "Simple ctypes bindings for FUSE")
14994 (description "Python module that provides a simple interface to FUSE and
14995MacFUSE. The binding is created using the standard @code{ctypes} library.")
14996 (license license:isc)))
14997
14998(define-public python2-fusepy
14999 (package-with-python2 python-fusepy))
15000
15001(define-public python2-gdrivefs
15002 (package
15003 (name "python2-gdrivefs")
15004 (version "0.14.9")
15005 (source
15006 (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "gdrivefs" version))
15009 (sha256
15010 (base32
15011 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15012 (build-system python-build-system)
15013 (arguments
15014 `(#:python ,python-2
15015 #:phases
15016 (modify-phases %standard-phases
15017 (add-before 'build 'patch-setup-py
15018 (lambda _
15019 ;; Update requirements from dependency==version
15020 ;; to dependency>=version
15021 (substitute* "gdrivefs/resources/requirements.txt"
15022 (("==") ">="))
15023 #t)))))
15024 (native-inputs
15025 `(("python2-gipc" ,python2-gipc)
15026 ("python2-gevent" ,python2-gevent)
15027 ("python2-greenlet" ,python2-greenlet)
15028 ("python2-httplib2" ,python2-httplib2)
15029 ("python2-uritemplate" ,python2-uritemplate)
15030 ("python2-oauth2client" ,python2-oauth2client)
15031 ("python2-six" ,python2-six)))
15032 (propagated-inputs
15033 `(("python2-dateutil" ,python2-dateutil)
15034 ("python2-fusepy" ,python2-fusepy)
15035 ("python2-google-api-client" ,python2-google-api-client)))
15036 (home-page "https://github.com/dsoprea/GDriveFS")
15037 (synopsis "Mount Google Drive as a local file system")
15038 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15039under Python 2.7.")
15040 (license license:gpl2)))
15041
15042(define-public pybind11
15043 (package
15044 (name "pybind11")
15045 (version "2.2.4")
15046 (source (origin
15047 (method git-fetch)
15048 (uri (git-reference
15049 (url "https://github.com/pybind/pybind11.git")
15050 (commit (string-append "v" version))))
15051 (sha256
15052 (base32
15053 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
15054 (file-name (git-file-name name version))))
15055 (build-system cmake-build-system)
15056 (native-inputs
15057 `(("python" ,python)
15058 ("python-pytest" ,python-pytest)))
15059 (arguments
15060 `(#:test-target "check"))
15061 (home-page "https://github.com/pybind/pybind11/")
15062 (synopsis "Seamless operability between C++11 and Python")
15063 (description "pybind11 is a lightweight header-only library that exposes
15064C++ types in Python and vice versa, mainly to create Python bindings of
15065existing C++ code. Its goals and syntax are similar to the excellent
15066Boost.Python library by David Abrahams: to minimize boilerplate code in
15067traditional extension modules by inferring type information using compile-time
15068introspection.")
15069 (license license:expat)))
15070
15071(define-public python-fasteners
15072 (package
15073 (name "python-fasteners")
15074 (version "0.14.1")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "fasteners" version))
15079 (sha256
15080 (base32
15081 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15082 (build-system python-build-system)
15083 (propagated-inputs
15084 `(("python-monotonic" ,python-monotonic)
15085 ("python-six" ,python-six)
15086 ("python-testtools" ,python-testtools)))
15087 (home-page "https://github.com/harlowja/fasteners")
15088 (synopsis "Python package that provides useful locks")
15089 (description
15090 "This package provides a Python program that provides following locks:
15091
15092@itemize
15093@item Locking decorator
15094@item Reader-writer locks
15095@item Inter-process locks
15096@item Generic helpers
15097@end itemize\n")
15098 (properties `((python2-variant . ,(delay python2-fasteners))))
15099 (license license:asl2.0)))
15100
15101(define-public python2-fasteners
15102 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15103 (package
15104 (inherit base)
15105 (propagated-inputs
15106 `(("python2-futures" ,python2-futures)
15107 ,@(package-propagated-inputs base))))))
15108
15109(define-public python-requests-file
15110 (package
15111 (name "python-requests-file")
15112 (version "1.4.3")
15113 (source
15114 (origin
15115 (method url-fetch)
15116 (uri (pypi-uri "requests-file" version))
15117 (sha256
15118 (base32
15119 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15120 (build-system python-build-system)
15121 (propagated-inputs
15122 `(("python-requests" ,python-requests)
15123 ("python-six" ,python-six)))
15124 (home-page
15125 "https://github.com/dashea/requests-file")
15126 (synopsis "File transport adapter for Requests")
15127 (description
15128 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15129library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15130 (license license:asl2.0)))
15131
15132(define-public python2-requests-file
15133 (package-with-python2 python-requests-file))
15134
15135(define-public python-tldextract
15136 (package
15137 (name "python-tldextract")
15138 (version "2.2.0")
15139 (source
15140 (origin
15141 (method url-fetch)
15142 (uri (pypi-uri "tldextract" version))
15143 (sha256
15144 (base32
15145 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15146 (build-system python-build-system)
15147 (native-inputs
15148 `(("python-pytest" ,python-pytest)
15149 ("python-responses" ,python-responses)))
15150 (propagated-inputs
15151 `(("python-idna" ,python-idna)
15152 ("python-requests" ,python-requests)
15153 ("python-requests-file" ,python-requests-file)))
15154 (home-page
15155 "https://github.com/john-kurkowski/tldextract")
15156 (synopsis
15157 "Separate the TLD from the registered domain and subdomains of a URL")
15158 (description
15159 "TLDExtract accurately separates the TLD from the registered domain and
15160subdomains of a URL, using the Public Suffix List. By default, this includes
15161the public ICANN TLDs and their exceptions. It can optionally support the
15162Public Suffix List's private domains as well.")
15163 (license license:bsd-3)))
15164
15165(define-public python2-tldextract
15166 (package-with-python2 python-tldextract))
15167
15168(define-public python-pynamecheap
15169 (package
15170 (name "python-pynamecheap")
15171 (version "0.0.3")
15172 (source
15173 (origin
15174 (method url-fetch)
15175 (uri (pypi-uri "PyNamecheap" version))
15176 (sha256
15177 (base32
15178 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15179 (build-system python-build-system)
15180 (propagated-inputs
15181 `(("python-requests" ,python-requests)))
15182 (home-page
15183 "https://github.com/Bemmu/PyNamecheap")
15184 (synopsis
15185 "Namecheap API client in Python")
15186 (description
15187 "PyNamecheap is a Namecheap API client in Python.")
15188 (license license:expat)))
15189
15190(define-public python2-pynamecheap
15191 (package-with-python2 python-pynamecheap))
15192
15193(define-public python-dns-lexicon
15194 (package
15195 (name "python-dns-lexicon")
15196 (version "2.4.0")
15197 (source
15198 (origin
15199 (method url-fetch)
15200 (uri (pypi-uri "dns-lexicon" version))
15201 (sha256
15202 (base32
15203 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15204 (build-system python-build-system)
15205 (arguments
15206 `(#:tests? #f)) ;requires internet access
15207 (propagated-inputs
15208 `(("python-future" ,python-future)
15209 ("python-pynamecheap" ,python-pynamecheap)
15210 ("python-requests" ,python-requests)
15211 ("python-tldextract" ,python-tldextract)
15212 ("python-urllib3" ,python-urllib3)))
15213 (home-page "https://github.com/AnalogJ/lexicon")
15214 (synopsis
15215 "Manipulate DNS records on various DNS providers")
15216 (description
15217 "Lexicon provides a way to manipulate DNS records on multiple DNS
15218providers in a standardized way. It has a CLI but it can also be used as a
15219Python library. It was designed to be used in automation, specifically with
15220Let's Encrypt.")
15221 (license license:expat)))
15222
15223(define-public python2-dns-lexicon
15224 (package-with-python2 python-dns-lexicon))
15225
15226(define-public python-commandlines
15227 (package
15228 (name "python-commandlines")
15229 (version "0.4.1")
15230 (source
15231 (origin
15232 (method url-fetch)
15233 (uri (pypi-uri "commandlines" version))
15234 (sha256
15235 (base32
15236 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15237 (build-system python-build-system)
15238 (home-page "https://github.com/chrissimpkins/commandlines")
15239 (synopsis "Command line argument to object parsing library")
15240 (description
15241 "@code{Commandlines} is a Python library for command line application
15242development that supports command line argument parsing, command string
15243validation testing and application logic.")
15244 (license license:expat)))
15245
15246;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15247;; python-numba. They have a very unflexible relationship.
15248(define-public python-numba
15249 (package
15250 (name "python-numba")
7757e6d8 15251 (version "0.42.0")
44d10b1f
RW
15252 (source
15253 (origin
15254 (method url-fetch)
15255 (uri (pypi-uri "numba" version))
15256 (sha256
15257 (base32
7757e6d8 15258 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15259 (build-system python-build-system)
15260 (arguments
15261 `(#:modules ((guix build utils)
15262 (guix build python-build-system)
15263 (ice-9 ftw)
15264 (srfi srfi-1)
15265 (srfi srfi-26))
15266 #:phases
15267 (modify-phases %standard-phases
15268 (add-after 'unpack 'disable-proprietary-features
15269 (lambda _
15270 (setenv "NUMBA_DISABLE_HSA" "1")
15271 (setenv "NUMBA_DISABLE_CUDA" "1")
15272 #t))
15273 (add-after 'unpack 'remove-failing-tests
15274 (lambda _
15275 ;; FIXME: these tests fail for unknown reasons:
15276 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15277 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15278 (substitute* "numba/tests/test_dispatcher.py"
15279 (("def test(_non_writable_pycache)" _ m)
15280 (string-append "def guix_skip" m))
15281 (("def test(_non_creatable_pycache)" _ m)
15282 (string-append "def guix_skip" m))
15283 (("def test(_frozen)" _ m)
15284 (string-append "def guix_skip" m)))
15285
15286 ;; These tests fail because we don't run the tests from the build
15287 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15288 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15289 (substitute* "numba/tests/test_pycc.py"
15290 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15291 (string-append "def guix_skip" m)))
15292 #t))
15293 (replace 'check
15294 (lambda _
15295 (let ((cwd (getcwd)))
15296 (setenv "PYTHONPATH"
15297 (string-append cwd "/build/"
15298 (find (cut string-prefix? "lib" <>)
15299 (scandir (string-append cwd "/build")))
15300 ":"
15301 (getenv "PYTHONPATH")))
15302 ;; Something is wrong with the PYTHONPATH when running the
15303 ;; tests from the build directory, as it complains about not being
15304 ;; able to import certain modules.
15305 (with-directory-excursion "/tmp"
15306 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15307 #t)))))
15308 (propagated-inputs
15309 `(("python-llvmlite" ,python-llvmlite)
15310 ("python-numpy" ,python-numpy)
15311 ("python-singledispatch" ,python-singledispatch)))
15312 ;; Needed for tests.
15313 (inputs
15314 `(("python-jinja2" ,python-jinja2)
15315 ("python-pygments" ,python-pygments)))
15316 (home-page "https://numba.pydata.org")
15317 (synopsis "Compile Python code using LLVM")
15318 (description "Numba gives you the power to speed up your applications with
15319high performance functions written directly in Python. With a few
15320annotations, array-oriented and math-heavy Python code can be just-in-time
15321compiled to native machine instructions, similar in performance to C, C++ and
15322Fortran, without having to switch languages or Python interpreters.
15323
15324Numba works by generating optimized machine code using the LLVM compiler
15325infrastructure at import time, runtime, or statically (using the included pycc
15326tool).")
15327 (license license:bsd-3)))
15328
15329(define-public python-anndata
15330 (package
15331 (name "python-anndata")
8c9372c1 15332 (version "0.6.18")
44d10b1f
RW
15333 (source
15334 (origin
15335 (method url-fetch)
15336 (uri (pypi-uri "anndata" version))
15337 (sha256
15338 (base32
8c9372c1 15339 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15340 (build-system python-build-system)
15341 (propagated-inputs
15342 `(("python-h5py" ,python-h5py)
15343 ("python-natsort" ,python-natsort)
15344 ("python-pandas" ,python-pandas)
15345 ("python-scipy" ,python-scipy)))
15346 (home-page "https://github.com/theislab/anndata")
15347 (synopsis "Annotated data for data analysis pipelines")
15348 (description "Anndata is a package for simple (functional) high-level APIs
15349for data analysis pipelines. In this context, it provides an efficient,
15350scalable way of keeping track of data together with learned annotations and
15351reduces the code overhead typically encountered when using a mostly
15352object-oriented library such as @code{scikit-learn}.")
15353 (license license:bsd-3)))
15354
15355(define-public python-dill
15356 (package
15357 (name "python-dill")
c60b15cc 15358 (version "0.2.9")
44d10b1f
RW
15359 (source
15360 (origin
15361 (method url-fetch)
15362 (uri (pypi-uri "dill" version))
15363 (sha256
c60b15cc 15364 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15365 (build-system python-build-system)
c60b15cc 15366 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15367 (arguments '(#:tests? #f))
15368 (home-page "https://pypi.org/project/dill")
15369 (synopsis "Serialize all of Python")
15370 (description "Dill extends Python's @code{pickle} module for serializing
15371and de-serializing Python objects to the majority of the built-in Python
15372types. Dill provides the user the same interface as the @code{pickle} module,
15373and also includes some additional features. In addition to pickling Python
15374objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15375session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15376interpreter session, close the interpreter, ship the pickled file to another
15377computer, open a new interpreter, unpickle the session and thus continue from
15378the saved state of the original interpreter session.")
15379 (license license:bsd-3)))
15380
15381(define-public python-multiprocess
15382 (package
15383 (name "python-multiprocess")
15384 (version "0.70.6.1")
15385 (source
15386 (origin
15387 (method url-fetch)
15388 (uri (pypi-uri "multiprocess" version))
15389 (sha256
15390 (base32
15391 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15392 (build-system python-build-system)
15393 (propagated-inputs
15394 `(("python-dill" ,python-dill)))
15395 (home-page "https://pypi.org/project/multiprocess")
15396 (synopsis "Multiprocessing and multithreading in Python")
15397 (description
15398 "This package is a fork of the multiprocessing Python package, a package
15399which supports the spawning of processes using the API of the standard
15400library's @code{threading} module.")
15401 (license license:bsd-3)))
15402
15403(define-public python-toolz
15404 (package
15405 (name "python-toolz")
15406 (version "0.9.0")
15407 (source
15408 (origin
15409 (method url-fetch)
15410 (uri (pypi-uri "toolz" version))
15411 (sha256
15412 (base32
15413 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15414 (build-system python-build-system)
15415 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15416 ;; unregistered loader type"
15417 (arguments '(#:tests? #f))
15418 (home-page "https://github.com/pytoolz/toolz/")
15419 (synopsis "List processing tools and functional utilities")
15420 (description
15421 "This package provides a set of utility functions for iterators,
15422functions, and dictionaries.")
15423 (license license:bsd-3)))
15424
15425(define-public python2-toolz
15426 (package-with-python2 python-toolz))
15427
15428(define-public python-cytoolz
15429 (package
15430 (name "python-cytoolz")
15431 (version "0.9.0.1")
15432 (source
15433 (origin
15434 (method url-fetch)
15435 (uri (pypi-uri "cytoolz" version))
15436 (sha256
15437 (base32
15438 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15439 (build-system python-build-system)
15440 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15441 ;; 'exceptions'"
15442 (arguments '(#:tests? #f))
15443 (propagated-inputs
15444 `(("python-toolz" ,python-toolz)))
15445 (native-inputs
15446 `(("python-cython" ,python-cython)))
15447 (home-page "https://github.com/pytoolz/cytoolz")
15448 (synopsis "High performance functional utilities")
15449 (description
15450 "The cytoolz package implements the same API as provided by toolz. The
15451main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15452that is accessible to other projects developed in Cython.")
15453 (license license:bsd-3)))
15454
15455(define-public python-sortedcontainers
15456 (package
15457 (name "python-sortedcontainers")
15458 (version "2.0.4")
15459 (source
15460 (origin
15461 (method url-fetch)
15462 (uri (pypi-uri "sortedcontainers" version))
15463 (sha256
15464 (base32
15465 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15466 (build-system python-build-system)
15467 (native-inputs
15468 `(("python-tox" ,python-tox)))
15469 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15470 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15471 (description
15472 "This package provides a sorted collections library, written in
15473pure-Python.")
15474 (license license:asl2.0)))
15475
15476(define-public python-cloudpickle
15477 (package
15478 (name "python-cloudpickle")
15479 (version "0.6.1")
15480 (source
15481 (origin
15482 (method url-fetch)
15483 (uri (pypi-uri "cloudpickle" version))
15484 (sha256
15485 (base32
15486 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15487 (build-system python-build-system)
15488 ;; FIXME: there are 5 errors in 122 tests:
15489 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15490 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15491 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15492 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15493 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15494 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15495 (arguments '(#:tests? #f))
15496 (native-inputs
15497 `(("python-pytest" ,python-pytest)
15498 ("python-mock" ,python-mock)
15499 ("python-tornado" ,python-tornado)))
15500 (home-page "https://github.com/cloudpipe/cloudpickle")
15501 (synopsis "Extended pickling support for Python objects")
15502 (description
15503 "Cloudpickle makes it possible to serialize Python constructs not
15504supported by the default pickle module from the Python standard library. It
15505is especially useful for cluster computing where Python expressions are
15506shipped over the network to execute on remote hosts, possibly close to the
15507data.")
15508 (license license:bsd-3)))
15509
15510(define-public python2-cloudpickle
15511 (package-with-python2 python-cloudpickle))
15512
15513(define-public python-locket
15514 (package
15515 (name "python-locket")
15516 (version "0.2.0")
15517 (source
15518 (origin
15519 (method url-fetch)
15520 (uri (pypi-uri "locket" version))
15521 (sha256
15522 (base32
15523 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15524 (build-system python-build-system)
15525 (home-page "https://github.com/mwilliamson/locket.py")
15526 (synopsis "File-based locks for Python")
15527 (description
15528 "Locket implements a lock that can be used by multiple processes provided
15529they use the same path.")
15530 (license license:bsd-2)))
15531
15532(define-public python2-locket
15533 (package-with-python2 python-locket))
15534
15535(define-public python-blosc
15536 (package
15537 (name "python-blosc")
15538 (version "1.5.1")
15539 (source
15540 (origin
15541 (method url-fetch)
15542 (uri (pypi-uri "blosc" version))
15543 (sha256
15544 (base32
15545 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15546 (build-system python-build-system)
15547 ;; FIXME: all tests pass, but then this error is printed:
15548 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15549 (arguments '(#:tests? #f))
15550 (propagated-inputs
15551 `(("python-numpy" ,python-numpy)))
15552 (home-page "https://github.com/blosc/python-blosc")
15553 (synopsis "Python wrapper for the Blosc data compressor library")
15554 (description "Blosc is a high performance compressor optimized for binary
15555data. It has been designed to transmit data to the processor cache faster
15556than the traditional, non-compressed, direct memory fetch approach via a
15557@code{memcpy()} system call.
15558
15559Blosc works well for compressing numerical arrays that contains data with
15560relatively low entropy, like sparse data, time series, grids with
15561regular-spaced values, etc.
15562
15563This Python package wraps the Blosc library.")
15564 (license license:bsd-3)))
15565
15566(define-public python2-blosc
15567 (package-with-python2 python-blosc))
15568
15569(define-public python-partd
15570 (package
15571 (name "python-partd")
15572 (version "0.3.9")
15573 (source
15574 (origin
15575 (method url-fetch)
15576 (uri (pypi-uri "partd" version))
15577 (sha256
15578 (base32
15579 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15580 (build-system python-build-system)
15581 (propagated-inputs
15582 `(("python-blosc" ,python-blosc)
15583 ("python-locket" ,python-locket)
15584 ("python-numpy" ,python-numpy)
15585 ("python-pandas" ,python-pandas)
15586 ("python-pyzmq" ,python-pyzmq)
15587 ("python-toolz" ,python-toolz)))
15588 (home-page "https://github.com/dask/partd/")
15589 (synopsis "Appendable key-value storage")
15590 (description "Partd stores key-value pairs. Values are raw bytes. We
15591append on old values. Partd excels at shuffling operations.")
15592 (license license:bsd-3)))
15593
15594(define-public python2-partd
15595 (package-with-python2 python-partd))
15596
15597(define-public python-dask
15598 (package
15599 (name "python-dask")
0998175f 15600 (version "1.2.2")
44d10b1f
RW
15601 (source
15602 (origin
15603 (method url-fetch)
15604 (uri (pypi-uri "dask" version))
15605 (sha256
0998175f 15606 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15607 (build-system python-build-system)
15608 ;; A single test out of 5000+ fails. This test is marked as xfail when
15609 ;; pytest-xdist is used.
15610 (arguments
15611 `(#:phases
15612 (modify-phases %standard-phases
15613 (add-after 'unpack 'disable-broken-test
15614 (lambda _
15615 (substitute* "dask/tests/test_threaded.py"
15616 (("def test_interrupt\\(\\)" m)
15617 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15618 m)))
15619 (when (which "python2")
15620 ;; This test fails with recent Pandas:
15621 ;; <https://github.com/dask/dask/issues/3794>.
15622 (substitute* "dask/dataframe/tests/test_dataframe.py"
15623 (("def test_info\\(\\)" m)
15624 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15625 m))))
15626 #t))
15627 (replace 'check
15628 (lambda _ (invoke "pytest" "-vv"))))))
15629 (propagated-inputs
15630 `(("python-cloudpickle" ,python-cloudpickle)
15631 ("python-numpy" ,python-numpy)
15632 ("python-pandas" ,python-pandas)
15633 ("python-partd" ,python-partd)
15634 ("python-toolz" ,python-toolz)
15635 ("python-pyyaml" ,python-pyyaml)))
15636 (native-inputs
15637 `(("python-pytest" ,python-pytest)
15638 ("python-pytest-runner" ,python-pytest-runner)))
15639 (home-page "https://github.com/dask/dask/")
15640 (synopsis "Parallel computing with task scheduling")
15641 (description
15642 "Dask is a flexible parallel computing library for analytics. It
15643consists of two components: dynamic task scheduling optimized for computation,
15644and large data collections like parallel arrays, dataframes, and lists that
15645extend common interfaces like NumPy, Pandas, or Python iterators to
15646larger-than-memory or distributed environments. These parallel collections
15647run on top of the dynamic task schedulers. ")
15648 (license license:bsd-3)))
15649
15650(define-public python2-dask
15651 (package-with-python2 python-dask))
15652
15653(define-public python-ilinkedlist
15654 (package
15655 (name "python-ilinkedlist")
15656 (version "0.4.0")
15657 (source
15658 (origin
15659 (method url-fetch)
15660 (uri (pypi-uri "ilinkedlist" version))
15661 (sha256
15662 (base32
15663 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15664 (build-system python-build-system)
15665 (native-inputs `(("python-pytest" ,python-pytest)))
15666 (inputs `(("python" ,python)))
15667 (home-page "https://github.com/luther9/ilinkedlist-py")
15668 (synopsis "Immutable linked list library")
15669 (description
15670 "This is a implementation of immutable linked lists for Python. It
15671contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15672Since a linked list is treated as immutable, it is hashable, and its length
15673can be retrieved in constant time. Some of the terminology is inspired by
15674LISP. It is possible to create an improper list by creating a @code{Pair}
15675with a non-list @code{cdr}.")
15676 (license license:gpl3+)))
15677
15678(define-public python-readlike
15679 (package
15680 (name "python-readlike")
15681 (version "0.1.3")
15682 (source
15683 (origin
15684 (method url-fetch)
15685 (uri (pypi-uri "readlike" version))
15686 (sha256
15687 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15688 (build-system python-build-system)
15689 (home-page "https://github.com/jangler/readlike")
15690 (synopsis "GNU Readline-like line editing module")
15691 (description
15692 "This Python module provides line editing functions similar to the default
15693Emacs-style ones of GNU Readline. Unlike the Python standard library's
15694@code{readline} package, this one allows access to those capabilties in settings
15695outside of a standard command-line interface. It is especially well-suited to
15696interfacing with Urwid, due to a shared syntax for describing key inputs.
15697
15698Currently, all stateless Readline commands are implemented. Yanking and history
15699are not supported.")
15700 (license license:expat)))
15701
15702(define-public python2-readlike
15703 (package-with-python2 python-readlike))
15704
15705(define-public python-reparser
15706 (package
15707 (name "python-reparser")
15708 (version "1.4.3")
15709 (source
15710 (origin
15711 (method url-fetch)
15712 (uri (pypi-uri "ReParser" version))
15713 (sha256
15714 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15715 (build-system python-build-system)
15716 (home-page "https://github.com/xmikos/reparser")
15717 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15718 (description
15719 "This Python library provides a simple lexer/parser for inline markup based
15720on regular expressions.")
15721 (license license:expat)))
15722
15723(define-public python2-reparser
15724 (let ((reparser (package-with-python2
15725 (strip-python2-variant python-reparser))))
15726 (package (inherit reparser)
15727 (propagated-inputs
15728 `(("python2-enum34" ,python2-enum34)
15729 ,@(package-propagated-inputs reparser))))))
15730
15731(define-public python-precis-i18n
15732 (package
15733 (name "python-precis-i18n")
15734 (version "1.0.0")
15735 (source
15736 (origin
15737 (method url-fetch)
15738 (uri (pypi-uri "precis_i18n" version))
15739 (sha256
15740 (base32
15741 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15742 (build-system python-build-system)
15743 (home-page "https://github.com/byllyfish/precis_i18n")
15744 (synopsis "Implementation of the PRECIS framework")
15745 (description
15746 "This module implements the PRECIS Framework as described in RFC 8264,
15747RFC 8265 and RFC 8266.")
15748 (license license:expat)))
15749
d0446c4b
RW
15750(define-public python-absl-py
15751 (package
15752 (name "python-absl-py")
15753 (version "0.6.1")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "absl-py" version))
15758 (sha256
15759 (base32
15760 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15761 (build-system python-build-system)
15762 (propagated-inputs
15763 `(("python-six" ,python-six)))
15764 (home-page "https://github.com/abseil/abseil-py")
15765 (synopsis "Abseil Python common libraries")
15766 (description
15767 "This package provides the Abseil Python Common Libraries, a collection
15768of Python libraries for building Python applications.")
15769 (license license:asl2.0)))
15770
81bed4e9
RW
15771(define-public python-astor
15772 (package
15773 (name "python-astor")
15774 (version "0.7.1")
15775 (source
15776 (origin
15777 (method url-fetch)
15778 (uri (pypi-uri "astor" version))
15779 (sha256
15780 (base32
15781 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15782 (build-system python-build-system)
15783 ;; FIXME: There are two errors and two test failures.
15784 (arguments `(#:tests? #f))
15785 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15786 (synopsis "Read and write Python ASTs")
81bed4e9 15787 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15788source via the Abstract Syntax Tree.")
81bed4e9
RW
15789 (license license:bsd-3)))
15790
39ee82ff
RW
15791(define-public python2-astor
15792 (package-with-python2 python-astor))
15793
22e623ae
RW
15794(define-public python-grpcio
15795 (package
15796 (name "python-grpcio")
15797 (version "1.17.1")
15798 (source
15799 (origin
15800 (method url-fetch)
15801 (uri (pypi-uri "grpcio" version))
15802 (sha256
15803 (base32
15804 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15805 (build-system python-build-system)
15806 (propagated-inputs
15807 `(("python-six" ,python-six)))
15808 (home-page "https://grpc.io")
15809 (synopsis "HTTP/2-based RPC framework")
15810 (description "This package provides a Python library for communicating
15811with the HTTP/2-based RPC framework gRPC.")
15812 (license license:asl2.0)))
15813
79869f80
RW
15814(define-public python-astunparse
15815 (package
15816 (name "python-astunparse")
47d79541 15817 (version "1.6.2")
79869f80
RW
15818 (source
15819 (origin
15820 (method url-fetch)
15821 (uri (pypi-uri "astunparse" version))
15822 (sha256
47d79541 15823 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15824 (build-system python-build-system)
47d79541 15825 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15826 (propagated-inputs
15827 `(("python-six" ,python-six)
15828 ("python-wheel" ,python-wheel)))
15829 (home-page "https://github.com/simonpercivall/astunparse")
15830 (synopsis "AST unparser for Python")
15831 (description "This package provides an AST unparser for Python. It is a
15832factored out version of @code{unparse} found in the Python source
15833distribution.")
15834 (license license:bsd-3)))
15835
2884aac0
RW
15836(define-public python-gast
15837 (package
15838 (name "python-gast")
bd300261 15839 (version "0.2.2")
2884aac0
RW
15840 (source
15841 (origin
15842 (method url-fetch)
15843 (uri (pypi-uri "gast" version))
15844 (sha256
bd300261 15845 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15846 (build-system python-build-system)
15847 (propagated-inputs
15848 `(("python-astunparse" ,python-astunparse)))
15849 (home-page "https://pypi.org/project/gast/")
15850 (synopsis "Generic Python AST that abstracts the underlying Python version")
15851 (description
15852 "GAST provides a compatibility layer between the AST of various Python
15853versions, as produced by @code{ast.parse} from the standard @code{ast}
15854module.")
15855 (license license:bsd-3)))
15856
44d10b1f
RW
15857(define-public python-wikidata
15858 (package
15859 (name "python-wikidata")
15860 (version "0.6.1")
15861 (source
15862 (origin
15863 (method url-fetch)
15864 (uri (pypi-uri "Wikidata" version))
15865 (sha256
15866 (base32
15867 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15868 (build-system python-build-system)
15869 (propagated-inputs
15870 `(("python-babel" ,python-babel)))
15871 (home-page "https://github.com/dahlia/wikidata")
15872 (synopsis "Wikidata client library")
15873 (description
15874 "This package provides a Python interface to
15875@url{https://www.wikidata.org/, Wikidata}.")
15876 (properties '((upstream-name . "Wikidata")))
15877 (license license:gpl3+)))
15878
15879(define-public python-doctest-ignore-unicode
15880 (package
15881 (name "python-doctest-ignore-unicode")
15882 (version "0.1.2")
15883 (source
15884 (origin
15885 (method url-fetch)
15886 (uri (pypi-uri "doctest-ignore-unicode" version))
15887 (sha256
15888 (base32
15889 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15890 (build-system python-build-system)
15891 (native-inputs
15892 `(("python-nose" ,python-nose)))
15893 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15894 (synopsis "Ignore Unicode literal prefixes in doctests")
15895 (description
15896 "This package adds support for a flag to ignore Unicode literal prefixes
15897in doctests.")
15898 (license license:asl2.0)))
15899
15900(define-public python-attr
15901 (package
15902 (name "python-attr")
15903 (version "0.3.1")
15904 (source
15905 (origin
15906 (method url-fetch)
15907 (uri (pypi-uri "attr" version))
15908 (sha256
15909 (base32
15910 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15911 (build-system python-build-system)
15912 (home-page "https://github.com/denis-ryzhkov/attr")
15913 (synopsis "Decorator for attributes of target function or class")
15914 (description "Simple decorator to set attributes of target function or
15915class in a @acronym{DRY, Don't Repeat Yourself} way.")
15916 (license license:expat)))
f98232a3
VC
15917
15918(define-public python-construct
15919 (package
15920 (name "python-construct")
15921 (version "2.9.45")
15922 (source
15923 (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "construct" version))
15926 (sha256
15927 (base32
15928 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15929 (build-system python-build-system)
15930 (arguments
15931 `(#:tests? #f)) ; No tests exist.
15932 (propagated-inputs
15933 `(("python-extras" ,python-extras)
15934 ("python-arrow" ,python-arrow)
15935 ("python-numpy" ,python-numpy)
15936 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15937 (home-page "http://construct.readthedocs.io")
15938 (synopsis "Declarative and symmetrical parser and builder for binary data")
15939 (description
15940 "This package provides both simple, atomic constructs (such as
15941integers of various sizes), as well as composite ones which allow you
15942form hierarchical and sequential structures of increasing complexity.
15943It features bit and byte granularity, easy debugging and testing, an
15944easy-to-extend subclass system, and lots of primitive constructs to
15945make your work easier.")
15946 (license license:expat)))
b742c006
LF
15947
15948(define-public python-humanize
15949 (package
15950 (name "python-humanize")
15951 (version "0.5.1")
15952 (source
15953 (origin
15954 (method url-fetch)
15955 (uri (pypi-uri "humanize" version))
15956 (sha256
15957 (base32
15958 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15959 (arguments
15960 '(#:tests? #f)) ; tests not in pypi archive
15961 (build-system python-build-system)
15962 (home-page "https://github.com/jmoiron/humanize")
15963 (synopsis "Print numerical information in a human-readable form")
15964 (description "This package provides a Python module that displays numbers
15965and dates in \"human readable\" forms. For example, it would display
15966\"12345591313\" as \"12.3 billion\".")
15967 (license license:expat)))
d5bbf66d
LF
15968
15969(define-public python-txaio
15970 (package
15971 (name "python-txaio")
15972 (version "18.8.1")
15973 (source
15974 (origin
15975 (method url-fetch)
15976 (uri (pypi-uri "txaio" version))
15977 (sha256
15978 (base32
15979 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15980 (build-system python-build-system)
15981 (propagated-inputs
15982 `(("python-twisted" ,python-twisted)
15983 ("python-six" ,python-six)))
15984 (home-page "https://github.com/crossbario/txaio")
15985 (synopsis "Compatibility layer between Python asyncio and Twisted")
15986 (description "Txaio provides a compatibility layer between the Python
15987@code{asyncio} module and @code{Twisted}.")
15988 (license license:expat)))
963dfd3a
RW
15989
15990(define-public python-toolshed
15991 (package
15992 (name "python-toolshed")
15993 (version "0.4.6")
15994 (source
15995 (origin
15996 (method url-fetch)
15997 (uri (pypi-uri "toolshed" version))
15998 (sha256
15999 (base32
16000 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16001 (build-system python-build-system)
16002 (native-inputs
16003 `(("python-nose" ,python-nose)))
16004 (home-page "https://github.com/brentp/toolshed/")
16005 (synopsis "Collection of modules and functions for working with data")
16006 (description "This is a collection of well-tested, simple modules and
16007functions that aim to reduce boilerplate when working with data.")
16008 (license license:bsd-2)))
c91ecf2d
RW
16009
16010(define-public python-annoy
16011 (package
16012 (name "python-annoy")
16013 (version "1.15.1")
16014 (source
16015 (origin
16016 (method url-fetch)
16017 (uri (pypi-uri "annoy" version))
16018 (sha256
16019 (base32
16020 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16021 (build-system python-build-system)
16022 (native-inputs
16023 `(("python-nose" ,python-nose)))
16024 (home-page "https://github.com/spotify/annoy/")
16025 (synopsis "Approximate nearest neighbors library")
16026 (description
16027 "Annoy is a C++ library with Python bindings to search for points in
16028space that are close to a given query point. It also creates large read-only
16029file-based data structures that are @code{mmap}ped into memory so that many
16030processes may share the same data.")
16031 (license license:asl2.0)))
412342d1 16032
79bfa422 16033(define-public python-pylzma
412342d1 16034 (package
79bfa422
DM
16035 (name "python-pylzma")
16036 (version "0.5.0")
16037 (source
16038 (origin
16039 (method url-fetch)
16040 (uri (pypi-uri "pylzma" version))
16041 (sha256
16042 (base32
16043 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16044 (build-system python-build-system)
79bfa422
DM
16045 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16046 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16047 (description "This package provides Python bindings for the LZMA library
16048by Igor Pavlov.")
16049 (license license:lgpl2.1+)))
16050
16051(define-public python2-pylzma
16052 (package-with-python2 python-pylzma))
f825e605 16053
6609ebe7
AG
16054(define-public python2-zeroconf
16055 (package
16056 (name "python2-zeroconf")
16057
16058 ;; This is the last version that supports Python 2.x.
16059 (version "0.19.1")
16060 (source
16061 (origin
16062 (method url-fetch)
16063 (uri (pypi-uri "zeroconf" version))
16064 (sha256
16065 (base32
16066 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16067 (build-system python-build-system)
16068 (arguments
16069 `(#:python ,python-2
16070 #:phases
16071 (modify-phases %standard-phases
16072 (add-after 'unpack 'patch-requires
16073 (lambda* (#:key inputs #:allow-other-keys)
16074 (substitute* "setup.py"
16075 (("enum-compat")
16076 "enum34"))
16077 #t)))))
16078 (native-inputs
16079 `(("python2-six" ,python2-six)
16080 ("python2-enum32" ,python2-enum34)
16081 ("python2-netifaces" ,python2-netifaces)
16082 ("python2-typing" ,python2-typing)))
16083 (home-page "https://github.com/jstasiak/python-zeroconf")
16084 (synopsis "Pure Python mDNS service discovery")
16085 (description
16086 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16087compatible).")
16088 (license license:lgpl2.1+)))
16089
f825e605
GLV
16090(define-public python-bsddb3
16091 (package
16092 (name "python-bsddb3")
16093 (version "6.2.6")
16094 (source
16095 (origin
16096 (method url-fetch)
16097 (uri (pypi-uri "bsddb3" version))
16098 (sha256
16099 (base32
16100 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16101 (build-system python-build-system)
16102 (inputs
16103 `(("bdb" ,bdb)))
16104 (arguments
16105 '(#:phases
16106 (modify-phases %standard-phases
16107 (add-after 'unpack 'configure-locations
16108 (lambda* (#:key inputs #:allow-other-keys)
16109 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16110 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16111 #t))
16112 (replace 'check
16113 (lambda _
16114 (invoke "python3" "test3.py" "-v"))))))
16115 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16116 (synopsis "Python bindings for Oracle Berkeley DB")
16117 (description
16118 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16119C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16120Transaction objects, and each of these is exposed as a Python type in the
16121bsddb3.db module. The database objects can use various access methods: btree,
16122hash, recno, and queue. Complete support of Berkeley DB distributed
16123transactions. Complete support for Berkeley DB Replication Manager.
16124Complete support for Berkeley DB Base Replication. Support for RPC.")
16125 (license license:bsd-3)))
edeb04bf
PL
16126
16127(define-public python-dbfread
16128 (package
16129 (name "python-dbfread")
16130 (version "2.0.7")
16131 (source (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "dbfread" version))
16134 (sha256
16135 (base32
16136 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16137 (build-system python-build-system)
16138 (native-inputs
16139 `(("python-pytest" ,python-pytest)))
16140 (home-page "https://dbfread.readthedocs.io")
16141 (synopsis "Read DBF Files with Python")
16142 (description
16143 "This library reads DBF files and returns the data as native Python data
16144types for further processing. It is primarily intended for batch jobs and
16145one-off scripts.")
16146 (license license:expat)))
e308b4f0
JM
16147
16148(define-public python-cached-property
16149 (package
16150 (name "python-cached-property")
16151 (version "1.5.1")
16152 (source
16153 (origin
16154 (method url-fetch)
16155 (uri (pypi-uri "cached-property" version))
16156 (sha256
16157 (base32
16158 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16159 (build-system python-build-system)
16160 (arguments
16161 `(#:phases
16162 (modify-phases %standard-phases
16163 ;; https://github.com/pydanny/cached-property/issues/131
16164 ;; recent versions of freezegun break one test
16165 (add-after 'unpack 'disable-broken-test
16166 (lambda _
16167 (substitute* "tests/test_cached_property.py"
16168 (("def test_threads_ttl_expiry\\(self\\)" m)
16169 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16170 " " m)))
16171 #t)))))
16172 (native-inputs
16173 `(("python-freezegun" ,python-freezegun)))
16174 (home-page
16175 "https://github.com/pydanny/cached-property")
16176 (synopsis
16177 "Decorator for caching properties in classes")
16178 (description
16179 "This package provides a decorator which makes caching
16180time-or-computationally-expensive properties quick and easy and works in Python
161812 or 3.")
16182 (license license:bsd-3)))
dfe8a704
NG
16183
16184(define-public python-folium
16185 (package
16186 (name "python-folium")
16187 (version "0.10.0")
16188 (source
16189 (origin
16190 (method url-fetch)
16191 (uri (pypi-uri "folium" version))
16192 (sha256
16193 (base32
16194 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16195 (build-system python-build-system)
16196 (propagated-inputs
16197 `(("python-branca" ,python-branca)
16198 ("python-jinja2" ,python-jinja2)
16199 ("python-numpy" ,python-numpy)
16200 ("python-requests" ,python-requests)))
16201 (native-inputs
16202 `(("python-pytest" ,python-pytest)))
16203 (home-page "https://github.com/python-visualization/folium")
16204 (synopsis "Make beautiful maps with Leaflet.js & Python")
16205 (description "@code{folium} makes it easy to visualize data that’s been
16206manipulated in Python on an interactive leaflet map. It enables both the
16207binding of data to a map for @code{choropleth} visualizations as well as
16208passing rich vector/raster/HTML visualizations as markers on the map.
16209
16210The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16211Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16212supports Image, Video, GeoJSON and TopoJSON overlays.")
16213 (license license:expat)))
9dd5f475
LC
16214
16215(define-public jube
16216 (package
16217 ;; This is a command-line tool, so no "python-" prefix.
16218 (name "jube")
16219 (version "2.2.2")
16220 (source (origin
16221 (method url-fetch)
16222 (uri (string-append
16223 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16224 version))
16225 (sha256
16226 (base32
16227 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16228 (file-name (string-append "jube-" version ".tar.gz"))))
16229 (build-system python-build-system)
16230 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16231 (synopsis "Benchmarking environment")
16232 (description
16233 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16234benchmarked application, benchmark data is stored in a format that allows JUBE
16235to deduct the desired information. This data can be parsed by automatic pre-
16236and post-processing scripts that draw information and store it more densely
16237for manual interpretation.")
a9f33960 16238 (license license:gpl3+)))
66436424
NG
16239
16240(define-public python-pyroutelib3
16241 (package
16242 (name "python-pyroutelib3")
16243 (version "1.3.post1")
16244 (source
16245 (origin
16246 (method url-fetch)
16247 (uri (pypi-uri "pyroutelib3" version))
16248 (sha256
16249 (base32
16250 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16251 (build-system python-build-system)
16252 (propagated-inputs
16253 `(("python-dateutil" ,python-dateutil)))
16254 (home-page "https://github.com/MKuranowski/pyroutelib3")
16255 (synopsis "Library for simple routing on OSM data")
16256 (description "Library for simple routing on OSM data")
16257 (license license:gpl3+)))
30e7c03a
GL
16258
16259(define-public python-elementpath
16260 (package
16261 (name "python-elementpath")
16262 (version "1.2.0")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "elementpath" version))
16267 (sha256
16268 (base32
16269 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16270 (build-system python-build-system)
16271 (home-page
16272 "https://github.com/sissaschool/elementpath")
16273 (synopsis
16274 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16275 (description
16276 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16277for Python's ElementTree XML data structures, both for the standard
16278ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16279
16280For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16281because lxml.etree already has it's own implementation of XPath 1.0.")
16282 (license license:expat)))