gnu: python2-matplotlib: Disable tests.
[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)))))
3917 (home-page "http://matplotlib.org")
3918 (synopsis "2D plotting library for Python")
3919 (description
3920 "Matplotlib is a Python 2D plotting library which produces publication
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)
5ea654cf
RW
3932 (version "2.2.3")
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "matplotlib" version))
3937 (sha256
3938 (base32
3939 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
5d484f42
EF
3940 (arguments
3941 (substitute-keyword-arguments (package-arguments matplotlib)
3942 ((#:phases phases)
3943 `(modify-phases ,phases
3944 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
3945 ;; Make sure to use special packages for Python 2 instead
3946 ;; of those automatically rewritten by package-with-python2.
3947 (propagated-inputs
3948 `(("python2-pycairo" ,python2-pycairo)
3949 ("python2-backports-functools-lru-cache"
3950 ,python2-backports-functools-lru-cache)
3951 ("python2-functools32" ,python2-functools32)
3952 ("python2-pygobject-2" ,python2-pygobject-2)
3953 ("python2-subprocess32" ,python2-subprocess32)
3954 ("python2-tkinter" ,python-2 "tk")
3955 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3956 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3957
3958(define-public python-matplotlib-documentation
3959 (package
3960 (name "python-matplotlib-documentation")
3961 (version (package-version python-matplotlib))
3962 (source (package-source python-matplotlib))
3963 (build-system python-build-system)
3964 (native-inputs
3965 `(("python-matplotlib" ,python-matplotlib)
3966 ("python-colorspacious" ,python-colorspacious)
3967 ("python-sphinx" ,python-sphinx)
5ad0a452 3968 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
3969 ("python-sphinx-gallery" ,python-sphinx-gallery)
3970 ("python-numpydoc" ,python-numpydoc)
3971 ("python-ipython" ,python-ipython)
e7a53914 3972 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3973 ("python-mock" ,python-mock)
3974 ("graphviz" ,graphviz)
f75aa97f 3975 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
3976 texlive-latex-amsmath
3977 texlive-latex-enumitem
3978 texlive-latex-expdlist
3979 texlive-latex-geometry
3980 texlive-latex-preview
3981 texlive-latex-type1cm
3982 texlive-latex-ucs
3983
3984 texlive-generic-pdftex
3985
e7a53914
RW
3986 texlive-fonts-ec
3987 texlive-fonts-adobe-times
3988 texlive-fonts-txfonts)))
44d10b1f
RW
3989 ("texinfo" ,texinfo)
3990 ,@(package-native-inputs python-matplotlib)))
3991 (arguments
3992 `(#:tests? #f ; we're only generating documentation
3993 #:phases
3994 (modify-phases %standard-phases
5ea654cf
RW
3995 ;; The tests in python-matplotlib are run after the install phase, so
3996 ;; we need to delete the extra phase here.
3997 (delete 'check)
44d10b1f
RW
3998 (replace 'build
3999 (lambda _
4000 (chdir "doc")
e7a53914
RW
4001 (setenv "PYTHONPATH"
4002 (string-append (getenv "PYTHONPATH")
4003 ":" (getcwd) "/../examples/units"))
44d10b1f 4004 (substitute* "conf.py"
e7a53914
RW
4005 ;; Don't use git.
4006 (("^SHA = check_output.*")
4007 (string-append "SHA = \"" ,version "\"\n"))
4008 ;; Don't fetch intersphinx files from the Internet
4009 (("^explicit_order_folders" m)
4010 (string-append "intersphinx_mapping = {}\n" m))
4011 (("'sphinx.ext.intersphinx',") "")
4012 ;; Disable URL embedding which requires internet access.
4013 (("'https://docs.scipy.org/doc/numpy'") "None")
4014 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4015 (invoke "make"
4016 "SPHINXBUILD=sphinx-build"
4017 "SPHINXOPTS=" ; don't abort on warnings
4018 "html" "texinfo")))
44d10b1f
RW
4019 (replace 'install
4020 (lambda* (#:key inputs outputs #:allow-other-keys)
4021 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4022 (doc (string-append data "/doc/python-matplotlib-" ,version))
4023 (info (string-append data "/info"))
4024 (html (string-append doc "/html")))
4025 (mkdir-p html)
4026 (mkdir-p info)
4027 (copy-recursively "build/html" html)
4028 (symlink (string-append html "/_images")
4029 (string-append info "/matplotlib-figures"))
4030 (with-directory-excursion "build/texinfo"
4031 (substitute* "matplotlib.texi"
4032 (("@image\\{([^,]*)" all file)
4033 (string-append "@image{matplotlib-figures/" file)))
4034 (symlink (string-append html "/_images")
4035 "./matplotlib-figures")
e7a53914
RW
4036 (invoke "makeinfo" "--no-split"
4037 "-o" "matplotlib.info" "matplotlib.texi"))
4038 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4039 #t)))))
4040 (home-page (package-home-page python-matplotlib))
4041 (synopsis "Documentation for the python-matplotlib package")
4042 (description (package-description python-matplotlib))
4043 (license (package-license python-matplotlib))))
4044
4045(define-public python2-matplotlib-documentation
5ad0a452
RW
4046 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4047 (package
4048 (inherit parent)
4049 (native-inputs
4050 (alist-delete "python-sphinx-copybutton"
4051 (package-native-inputs parent))))))
44d10b1f 4052
55dae98f
RW
4053(define-public python-matplotlib-venn
4054 (package
4055 (name "python-matplotlib-venn")
4056 (version "0.11.5")
4057 (source
4058 (origin
4059 (method url-fetch)
4060 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4061 (sha256
4062 (base32
4063 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4064 (build-system python-build-system)
4065 (arguments '(#:tests? #f)) ; tests are not included
4066 (propagated-inputs
4067 `(("python-matplotlib" ,python-matplotlib)
4068 ("python-numpy" ,python-numpy)
4069 ("python-scipy" ,python-scipy)))
4070 (native-inputs
4071 `(("unzip" ,unzip)))
4072 (home-page "https://github.com/konstantint/matplotlib-venn")
4073 (synopsis "Plot area-proportional Venn diagrams")
4074 (description
4075 "This package provides tools for plotting area-proportional two- and
4076three-way Venn diagrams in @code{matplotlib}.")
4077 (license license:expat)))
4078
44d10b1f
RW
4079(define-public python2-pysnptools
4080 (package
4081 (name "python2-pysnptools")
5d1ade85 4082 (version "0.3.13")
44d10b1f
RW
4083 (source
4084 (origin
4085 (method url-fetch)
5d1ade85 4086 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4087 (sha256
4088 (base32
5d1ade85 4089 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4090 (build-system python-build-system)
4091 (arguments
5d1ade85
RW
4092 `(#:python ,python-2 ; only Python 2.7 is supported
4093 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4094 (propagated-inputs
4095 `(("python2-numpy" ,python2-numpy)
4096 ("python2-scipy" ,python2-scipy)
4097 ("python2-pandas" ,python2-pandas)))
44d10b1f 4098 (native-inputs
5d1ade85 4099 `(("python2-cython" ,python2-cython)))
1b66989b 4100 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4101 (synopsis "Library for reading and manipulating genetic data")
4102 (description
4103 "PySnpTools is a library for reading and manipulating genetic data. It
4104can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4105those files. It can also efficiently manipulate ranges of integers using set
4106operators such as union, intersection, and difference.")
4107 (license license:asl2.0)))
4108
4109(define-public python-scipy
4110 (package
4111 (name "python-scipy")
a35f153d 4112 (version "1.3.1")
44d10b1f
RW
4113 (source
4114 (origin
4115 (method url-fetch)
4116 (uri (pypi-uri "scipy" version))
4117 (sha256
4118 (base32
a35f153d 4119 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
44d10b1f
RW
4120 (build-system python-build-system)
4121 (propagated-inputs
4122 `(("python-numpy" ,python-numpy)
4123 ("python-matplotlib" ,python-matplotlib)
4124 ("python-pyparsing" ,python-pyparsing)))
4125 (inputs
4126 `(("lapack" ,lapack)
4127 ("openblas" ,openblas)))
4128 (native-inputs
4129 `(("python-cython" ,python-cython)
4130 ("python-pytest" ,python-pytest)
4131 ("python-sphinx" ,python-sphinx)
4132 ("python-numpydoc" ,python-numpydoc)
4133 ("gfortran" ,gfortran)
4134 ("perl" ,perl)
4135 ("which" ,which)))
4136 (outputs '("out" "doc"))
4137 (arguments
4138 `(#:phases
4139 (modify-phases %standard-phases
4140 (add-after 'unpack 'disable-broken-tests
4141 (lambda _
4142 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4143 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4144 (string-append indent
4145 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4146 m)))
4147 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4148 (("^def test_parallel_threads\\(\\):" m)
4149 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4150 m)))
4151 #t))
4152 (add-before 'build 'configure-openblas
4153 (lambda* (#:key inputs #:allow-other-keys)
4154 (call-with-output-file "site.cfg"
4155 (lambda (port)
4156 (format port
4157 "[blas]
4158libraries = openblas
4159library_dirs = ~a/lib
4160include_dirs = ~a/include
4161
4162# backslash-n to make emacs happy
4163\n[atlas]
4164library_dirs = ~a/lib
4165atlas_libs = openblas
4166"
4167 (assoc-ref inputs "openblas")
4168 (assoc-ref inputs "openblas")
4169 (assoc-ref inputs "openblas"))))
4170 #t))
4171 (add-after 'install 'install-doc
4172 (lambda* (#:key inputs outputs #:allow-other-keys)
4173 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4174 (doc (string-append data "/doc/" ,name "-" ,version))
4175 (html (string-append doc "/html"))
4176 (pyver ,(string-append "PYVER=" (version-major+minor
4177 (package-version python))))
4178 ;; By default it tries to run sphinx-build through the Python
4179 ;; interpreter which won't work with our shell wrapper.
4180 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4181 ;; Make installed package available for building the
4182 ;; documentation
4183 (add-installed-pythonpath inputs outputs)
4184 (with-directory-excursion "doc"
4185 ;; Fix generation of images for mathematical expressions.
4186 (substitute* (find-files "source" "conf\\.py")
4187 (("pngmath_use_preview = True")
4188 "pngmath_use_preview = False"))
4189 (mkdir-p html)
4190 (invoke "make" "html" pyver sphinxbuild)
4191 (with-directory-excursion "build/html"
4192 (for-each (lambda (file)
4193 (let* ((dir (dirname file))
4194 (tgt-dir (string-append html "/" dir)))
4195 (install-file file html)))
4196 (find-files "." ".*")))))
4197 #t))
4198 ;; Tests can only be run after the library has been installed and not
4199 ;; within the source directory.
4200 (delete 'check)
4201 (add-after 'install 'check
4202 (lambda* (#:key inputs outputs #:allow-other-keys)
4203 (add-installed-pythonpath inputs outputs)
4204 (with-directory-excursion "/tmp"
4205 (invoke "python" "-c"
4206 "import scipy; scipy.test(verbose=2)")))))))
4207 (home-page "https://www.scipy.org/")
4208 (synopsis "The Scipy library provides efficient numerical routines")
4209 (description "The SciPy library is one of the core packages that make up
4210the SciPy stack. It provides many user-friendly and efficient numerical
4211routines such as routines for numerical integration and optimization.")
4212 (properties `((python2-variant . ,(delay python2-scipy))))
4213 (license license:bsd-3)))
4214
a35f153d 4215;; Version 1.2.2 is the last version to support Python 2
44d10b1f 4216(define-public python2-scipy
a35f153d
RW
4217 (package
4218 (inherit (package-with-python2
4219 (strip-python2-variant python-scipy)))
4220 (version "1.2.2")
4221 (source
4222 (origin
4223 (method url-fetch)
4224 (uri (pypi-uri "scipy" version))
4225 (sha256
4226 (base32
4227 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
44d10b1f
RW
4228
4229(define-public python-socksipy-branch
4230 (package
4231 (name "python-socksipy-branch")
4232 (version "1.01")
4233 (source
4234 (origin
4235 (method url-fetch)
4236 (uri (pypi-uri "SocksiPy-branch" version))
4237 (sha256
4238 (base32
4239 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4240 (build-system python-build-system)
4241 (arguments
4242 `(#:tests? #f)) ; There are no tests
4243 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4244 (synopsis "Python SOCKS module")
4245 (description
4246 "SocksiPy - A Python SOCKS client module. It provides a
4247socket-like interface that supports connections to any TCP
4248service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4249The original version was developed by Dan Haim, this is a
4250branch created by Mario Vilas to address some open issues,
4251as the original project seems to have been abandoned circa 2007.")
4252 (license license:bsd-3)))
4253
4254(define-public python2-socksipy-branch
4255 (package-with-python2 python-socksipy-branch))
4256
4257(define-public python-pycodestyle
4258 (package
4259 (name "python-pycodestyle")
4260 (version "2.4.0")
4261 (source
4262 (origin
4263 (method url-fetch)
4264 (uri (pypi-uri "pycodestyle" version))
4265 (sha256
4266 (base32
4267 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
4268 (build-system python-build-system)
4269 (home-page "https://pycodestyle.readthedocs.io/")
4270 (synopsis "Python style guide checker")
4271 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4272Python code against some of the style conventions in
4273@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4274 (license license:expat)))
4275
4276(define-public python2-pycodestyle
4277 (package-with-python2 python-pycodestyle))
4278
4279(define-public python-multidict
4280 (package
4281 (name "python-multidict")
4282 (version "4.2.0")
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (pypi-uri "multidict" version))
4287 (sha256
4288 (base32
4289 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4290 (build-system python-build-system)
4291 (native-inputs
4292 `(("python-pytest" ,python-pytest)
4293 ("python-pytest-runner" ,python-pytest-runner)))
4294 (home-page "https://github.com/aio-libs/multidict/")
4295 (synopsis "Multidict implementation")
4296 (description "Multidict is dict-like collection of key-value pairs
4297where key might be occurred more than once in the container.")
4298 (license license:asl2.0)))
4299
4300(define-public python-orderedmultidict
4301 (package
4302 (name "python-orderedmultidict")
4303 (version "0.7.11")
4304 (source
4305 (origin
4306 (method url-fetch)
4307 (uri (pypi-uri "orderedmultidict" version))
4308 (sha256
4309 (base32
4310 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4311 (build-system python-build-system)
4312 (arguments
4313 `(#:phases
4314 (modify-phases %standard-phases
4315 (add-after 'unpack 'fix-tests
4316 (lambda _
4317 ;; The package uses nosetest for running the tests.
4318 ;; Adding this initfile allows to run the test suite
4319 ;; without requiring nosetest.
d1c4f329
RW
4320 (with-output-to-file "tests/__init__.py" newline)
4321 #t)))))
44d10b1f
RW
4322 (propagated-inputs
4323 `(("python-six" ,python-six)))
4324 (native-inputs
4325 `(("python-pycodestyle" ,python-pycodestyle)))
4326 (home-page "https://github.com/gruns/orderedmultidict")
4327 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4328 (description "This package contains a library for ordered multivalue
4329dictionaries. A multivalue dictionary is a dictionary that can store
4330multiple values for the same key. An ordered multivalue dictionary is a
4331multivalue dictionary that retains the order of insertions and deletions.")
4332 (license license:unlicense)))
4333
4334(define-public python2-orderedmultidict
4335 (package-with-python2 python-orderedmultidict))
4336
4337(define-public python-autopep8
4338 (package
4339 (name "python-autopep8")
4340 (version "1.3.5")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "autopep8" version))
4345 (sha256
4346 (base32
4347 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4348 (build-system python-build-system)
4349 (propagated-inputs
4350 `(("python-pycodestyle" ,python-pycodestyle)))
4351 (home-page "https://github.com/hhatto/autopep8")
4352 (synopsis "Format Python code according to the PEP 8 style guide")
4353 (description
4354 "@code{autopep8} automatically formats Python code to conform to
4355the PEP 8 style guide. It uses the pycodestyle utility to determine
4356what parts of the code needs to be formatted. @code{autopep8} is
4357capable of fixing most of the formatting issues that can be reported
4358by pycodestyle.")
4359 (license (license:non-copyleft
4360 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4361
4362(define-public python2-autopep8
4363 (package-with-python2 python-autopep8))
4364
4365(define-public python-distutils-extra
4366 (package
4367 (name "python-distutils-extra")
4368 (version "2.38")
4369 (source
4370 (origin
4371 (method url-fetch)
4372 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4373 version "/+download/python-distutils-extra-"
4374 version ".tar.gz"))
4375 (sha256
4376 (base32
4377 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4378 (build-system python-build-system)
4379 (home-page "https://launchpad.net/python-distutils-extra/")
4380 (synopsis "Enhancements to Python's distutils")
4381 (description
4382 "The python-distutils-extra module enables you to easily integrate
4383gettext support, themed icons, and scrollkeeper-based documentation into
4384Python's distutils.")
4385 (license license:gpl2)))
4386
4387(define-public python2-distutils-extra
4388 (package-with-python2 python-distutils-extra))
4389
4390(define-public python2-elib.intl
4391 (package
4392 (name "python2-elib.intl")
4393 (version "0.0.3")
4394 (source
4395 (origin
4396 ;; This project doesn't tag releases or publish tarballs, so we take
4397 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4398 (method git-fetch)
4399 (uri (git-reference
4400 (url "https://github.com/dieterv/elib.intl.git")
4401 (commit "d09997cfef")))
4402 (file-name (string-append name "-" version "-checkout"))
4403 (sha256
4404 (base32
4405 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4406 (build-system python-build-system)
4407 (arguments
4408 ;; incompatible with Python 3 (exception syntax)
4409 `(#:python ,python-2
4410 #:tests? #f))
4411 (home-page "https://github.com/dieterv/elib.intl")
4412 (synopsis "Enhanced internationalization for Python")
4413 (description
4414 "The elib.intl module provides enhanced internationalization (I18N)
4415services for your Python modules and applications.")
4416 (license license:lgpl3+)))
4417
4418(define-public python-olefile
4419 (package
4420 (name "python-olefile")
5bef0f10 4421 (version "0.46")
44d10b1f
RW
4422 (source
4423 (origin
4424 (method url-fetch)
5bef0f10
MB
4425 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4426 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4427 (file-name (string-append name "-" version ".tar.gz"))
4428 (sha256
4429 (base32
5bef0f10 4430 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4431 (build-system python-build-system)
5bef0f10 4432 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4433 (synopsis "Read and write Microsoft OLE2 files.")
4434 (description
4435 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4436Storage or Compound Document, Microsoft Office). It is an improved version of
4437the OleFileIO module from PIL, the Python Image Library.")
4438 (license license:bsd-3)))
4439
4440(define-public python2-olefile
4441 (package-with-python2 python-olefile))
4442
4443(define-public python-pillow
4444 (package
4445 (name "python-pillow")
6263b5b3 4446 (version "6.1.0")
44d10b1f
RW
4447 (source
4448 (origin
4449 (method url-fetch)
4450 (uri (pypi-uri "Pillow" version))
4451 (sha256
4452 (base32
6263b5b3 4453 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4454 (build-system python-build-system)
4455 (native-inputs
4456 `(("python-pytest" ,python-pytest)))
4457 (inputs
4458 `(("freetype" ,freetype)
4459 ("lcms" ,lcms)
4460 ("zlib" ,zlib)
4461 ("libjpeg" ,libjpeg)
4462 ("openjpeg" ,openjpeg)
4463 ("libtiff" ,libtiff)
4464 ("libwebp" ,libwebp)))
4465 (propagated-inputs
4466 `(("python-olefile" ,python-olefile)))
4467 (arguments
4468 `(#:phases
4469 (modify-phases %standard-phases
4470 (add-after 'unpack 'patch-ldconfig
4471 (lambda _
4472 (substitute* "setup.py"
4473 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4474 (delete 'check) ; We must run checks after python-pillow is installed.
4475 (add-after 'install 'check-installed
4476 (lambda* (#:key outputs inputs #:allow-other-keys)
4477 (begin
4478 (setenv "HOME" (getcwd))
4479 ;; Make installed package available for running the tests.
4480 (add-installed-pythonpath inputs outputs)
4481 (invoke "python" "selftest.py" "--installed")
4482 (invoke "python" "-m" "pytest" "-vv")))))))
4483 (home-page "https://python-pillow.org")
4484 (synopsis "Fork of the Python Imaging Library")
4485 (description
4486 "The Python Imaging Library adds image processing capabilities to your
4487Python interpreter. This library provides extensive file format support, an
4488efficient internal representation, and fairly powerful image processing
4489capabilities. The core image library is designed for fast access to data
4490stored in a few basic pixel formats. It should provide a solid foundation for
4491a general image processing tool.")
4492 (license (license:x11-style
4493 "http://www.pythonware.com/products/pil/license.htm"
4494 "The PIL Software License"))))
4495
4496(define-public python2-pillow
4497 (package-with-python2 python-pillow))
4498
4499(define-public python-pycparser
4500 (package
4501 (name "python-pycparser")
c6c0940e 4502 (version "2.19")
44d10b1f
RW
4503 (source
4504 (origin
4505 (method url-fetch)
4506 (uri (pypi-uri "pycparser" version))
4507 (sha256
4508 (base32
c6c0940e 4509 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4510 (outputs '("out" "doc"))
4511 (build-system python-build-system)
4512 (native-inputs
4513 `(("pkg-config" ,pkg-config)))
4514 (arguments
4515 `(#:phases
4516 (modify-phases %standard-phases
4517 (replace 'check
4518 (lambda _
4519 (with-directory-excursion "tests"
acb75c03
RW
4520 (invoke "python" "all_tests.py"))
4521 #t))
44d10b1f
RW
4522 (add-after 'install 'install-doc
4523 (lambda* (#:key outputs #:allow-other-keys)
4524 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4525 (doc (string-append data "/doc/" ,name "-" ,version))
4526 (examples (string-append doc "/examples")))
4527 (mkdir-p examples)
4528 (for-each (lambda (file)
4529 (copy-file (string-append "." file)
4530 (string-append doc file)))
4531 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4532 (copy-recursively "examples" examples)
4533 #t))))))
44d10b1f
RW
4534 (home-page "https://github.com/eliben/pycparser")
4535 (synopsis "C parser in Python")
4536 (description
4537 "Pycparser is a complete parser of the C language, written in pure Python
4538using the PLY parsing library. It parses C code into an AST and can serve as
4539a front-end for C compilers or analysis tools.")
4540 (license license:bsd-3)))
4541
4542(define-public python2-pycparser
4543 (package-with-python2 python-pycparser))
4544
4545(define-public python-pywavelets
4546 (package
4547 (name "python-pywavelets")
4548 (version "1.0.1")
4549 (home-page "https://github.com/PyWavelets/pywt")
4550 (source (origin
4551 (method url-fetch)
4552 (uri (pypi-uri "PyWavelets" version))
4553 (sha256
4554 (base32
4555 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4556 (build-system python-build-system)
4557 (arguments
4558 '(#:modules ((ice-9 ftw)
4559 (srfi srfi-1)
4560 (srfi srfi-26)
4561 (guix build utils)
4562 (guix build python-build-system))
4563 #:phases (modify-phases %standard-phases
4564 (replace 'check
4565 (lambda _
4566 (let ((cwd (getcwd))
4567 (libdir (find (cut string-prefix? "lib." <>)
4568 (scandir "build"))))
4569 (with-directory-excursion (string-append cwd "/build/" libdir)
4570 (invoke "nosetests" "-v" "."))))))))
4571 (native-inputs
4572 `(("python-matplotlib" ,python-matplotlib) ;for tests
4573 ("python-nose" ,python-nose)))
4574 (propagated-inputs
4575 `(("python-numpy" ,python-numpy)))
4576 (synopsis "Wavelet transforms in Python")
4577 (description
4578 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4579mathematical basis functions that are localized in both time and frequency.
4580Wavelet transforms are time-frequency transforms employing wavelets. They are
4581similar to Fourier transforms, the difference being that Fourier transforms are
4582localized only in frequency instead of in time and frequency.")
4583 (license license:expat)))
4584
4585(define-public python2-pywavelets
4586 (package-with-python2 python-pywavelets))
4587
4588(define-public python-xcffib
4589 (package
4590 (name "python-xcffib")
4591 (version "0.6.0")
4592 (source
4593 (origin
4594 (method url-fetch)
4595 (uri (pypi-uri "xcffib" version))
4596 (sha256
4597 (base32
4598 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4599 (build-system python-build-system)
4600 (inputs
4601 `(("libxcb" ,libxcb)))
4602 (propagated-inputs
4603 `(("python-cffi" ,python-cffi) ; used at run time
4604 ("python-six" ,python-six)))
4605 (arguments
4606 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4607 #:tests? #f
4608 #:phases
4609 (modify-phases %standard-phases
4610 (add-after 'unpack 'fix-libxcb-path
4611 (lambda* (#:key inputs #:allow-other-keys)
4612 (let ((libxcb (assoc-ref inputs "libxcb")))
4613 (substitute* '("xcffib/__init__.py")
4614 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4615 #t)))
4616 (add-after 'install 'install-doc
4617 (lambda* (#:key outputs #:allow-other-keys)
4618 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4619 "/doc/" ,name "-" ,version)))
4620 (mkdir-p doc)
4621 (copy-file "README.md"
4622 (string-append doc "/README.md"))
4623 #t))))))
4624 (home-page "https://github.com/tych0/xcffib")
4625 (synopsis "XCB Python bindings")
4626 (description
4627 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4628support for Python 3 and PyPy. It is based on cffi.")
4629 (license license:expat)))
4630
4631(define-public python2-xcffib
4632 (package-with-python2 python-xcffib))
4633
4634(define-public python-cairocffi
4635 (package
4636 (name "python-cairocffi")
4637 (version "0.9.0")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "cairocffi" version))
4642 (sha256
4643 (base32
4644 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4645 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4646 (build-system python-build-system)
4647 (outputs '("out" "doc"))
4648 (inputs
4649 `(("glib" ,glib)
4650 ("gtk+" ,gtk+)
4651 ("gdk-pixbuf" ,gdk-pixbuf)
4652 ("cairo" ,cairo)
4653 ("pango" ,pango)))
4654 (native-inputs
4655 `(("pkg-config" ,pkg-config)
4656 ("python-pytest" ,python-pytest)
4657 ("python-pytest-cov" ,python-pytest-cov)
4658 ("python-pytest-runner" ,python-pytest-runner)
4659 ("python-sphinx" ,python-sphinx)
4660 ("python-docutils" ,python-docutils)))
4661 (propagated-inputs
4662 `(("python-xcffib" ,python-xcffib))) ; used at run time
4663 (arguments
4664 `(#:phases
4665 (modify-phases %standard-phases
4666 (add-after 'unpack 'patch-paths
4667 (lambda* (#:key inputs outputs #:allow-other-keys)
4668 (substitute* (find-files "." "\\.py$")
4669 (("dlopen\\(ffi, 'cairo'")
4670 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4671 "/lib/libcairo.so.2'"))
4672 (("dlopen\\(ffi, 'gdk-3'")
4673 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4674 "/lib/libgtk-3.so.0'"))
4675 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4676 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4677 "/lib/libgdk_pixbuf-2.0.so.0'"))
4678 (("dlopen\\(ffi, 'glib-2.0'")
4679 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4680 "/lib/libglib-2.0.so.0'"))
4681 (("dlopen\\(ffi, 'gobject-2.0'")
4682 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4683 "/lib/libgobject-2.0.so.0'"))
4684 (("dlopen\\(ffi, 'pangocairo-1.0'")
4685 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4686 "/lib/libpangocairo-1.0.so.0'"))
4687 (("dlopen\\(ffi, 'pango-1.0'")
4688 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4689 "/lib/libpango-1.0.so.0'")))
4690 #t))
4691 (add-after 'install 'install-doc
4692 (lambda* (#:key inputs outputs #:allow-other-keys)
4693 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4694 (doc (string-append data "/doc/" ,name "-" ,version))
4695 (html (string-append doc "/html")))
4696 (setenv "LD_LIBRARY_PATH"
4697 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4698 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4699 (setenv "LANG" "en_US.UTF-8")
4700 (mkdir-p html)
4701 (for-each (lambda (file)
4702 (copy-file (string-append "." file)
4703 (string-append doc file)))
4704 '("/README.rst" "/CHANGES" "/LICENSE"))
4705 (system* "python" "setup.py" "build_sphinx")
4706 (copy-recursively "docs/_build/html" html)
4707 #t))))))
4708 (home-page "https://github.com/Kozea/cairocffi")
4709 (synopsis "Python bindings and object-oriented API for Cairo")
4710 (description
4711 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4712Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4713graphics library with support for multiple backends including image buffers,
4714PNG, PostScript, PDF, and SVG file output.")
4715 (license license:bsd-3)))
4716
4717(define-public python2-cairocffi
4718 (package-with-python2 python-cairocffi))
4719
4720(define-public python-decorator
4721 (package
4722 (name "python-decorator")
4723 (version "4.3.0")
4724 (source
4725 (origin
4726 (method url-fetch)
4727 (uri (pypi-uri "decorator" version))
4728 (sha256
4729 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4730 (build-system python-build-system)
4731 (home-page "https://pypi.python.org/pypi/decorator/")
4732 (synopsis "Python module to simplify usage of decorators")
4733 (description
4734 "The aim of the decorator module is to simplify the usage of decorators
4735for the average programmer, and to popularize decorators usage giving examples
4736of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4737etc. The core of this module is a decorator factory.")
4738 (license license:expat)))
4739
4740(define-public python2-decorator
4741 (package-with-python2 python-decorator))
4742
4743(define-public python-drmaa
4744 (package
4745 (name "python-drmaa")
4746 (version "0.7.7")
4747 (source
4748 (origin
4749 (method url-fetch)
4750 (uri (pypi-uri "drmaa" version))
4751 (sha256
4752 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4753 (build-system python-build-system)
4754 ;; The test suite requires libdrmaa which is provided by the cluster
4755 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4756 ;; should be set to the path of the libdrmaa library.
4757 (arguments '(#:tests? #f))
4758 (native-inputs
4759 `(("python-nose" ,python-nose)))
4760 (home-page "https://pypi.python.org/pypi/drmaa")
4761 (synopsis "Python bindings for the DRMAA library")
4762 (description
4763 "A Python package for Distributed Resource Management (DRM) job
4764submission and control. This package is an implementation of the DRMAA 1.0
4765Python language binding specification.")
4766 (license license:bsd-3)))
4767
4768(define-public python2-drmaa
4769 (package-with-python2 python-drmaa))
4770
4771(define-public python-grako
4772 (package
4773 (name "python-grako")
4774 (version "3.99.9")
4775 (source
4776 (origin
4777 (method url-fetch)
4778 (uri
4779 (pypi-uri "grako" version ".zip"))
4780 (sha256
4781 (base32
4782 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4783 (build-system python-build-system)
4784 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4785 (native-inputs
4786 `(("unzip" ,unzip)
4787 ("python-pytest" ,python-pytest)
4788 ("python-pytest-runner" ,python-pytest-runner)))
4789 (home-page "https://bitbucket.org/neogeny/grako")
4790 (synopsis "EBNF parser generator")
4791 (description
4792 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4793memoizing PEG/Packrat parser in Python.")
4794 (license license:bsd-3)))
4795
4796(define-public python2-grako
4797 (package-with-python2 python-grako))
4798
4799(define-public python-gridmap
4800 (package
4801 (name "python-gridmap")
4802 (version "0.13.0")
4803 (source
4804 (origin
768fea0f
TGR
4805 (method git-fetch)
4806 (uri (git-reference
4807 (url "https://github.com/pygridtools/gridmap.git")
4808 (commit (string-append "v" version))))
4809 (file-name (git-file-name name version))
44d10b1f 4810 (sha256
768fea0f 4811 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4812 (build-system python-build-system)
4813 (arguments
4814 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4815 (propagated-inputs
4816 `(("python-psutil" ,python-psutil)
4817 ("python-drmaa" ,python-drmaa)
4818 ("python-pyzmq" ,python-pyzmq)))
4819 (home-page "https://github.com/pygridtools/gridmap")
4820 (synopsis "Create jobs on a cluster directly from Python")
4821 (description
4822 "Gridmap is a Python package to allow you to easily create jobs on the
4823cluster directly from Python. You can directly map Python functions onto the
4824cluster without needing to write any wrapper code yourself.")
4825 (license license:gpl3+)))
4826
4827(define-public python2-gridmap
4828 (package-with-python2 python-gridmap))
4829
4830(define-public python-honcho
4831 (package
4832 (name "python-honcho")
4833 (version "1.0.1")
4834 (source
4835 (origin
8524d130
TGR
4836 (method git-fetch)
4837 (uri (git-reference
4838 (url "https://github.com/nickstenning/honcho.git")
4839 (commit (string-append "v" version))))
4840 (file-name (git-file-name name version))
44d10b1f 4841 (sha256
8524d130 4842 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4843 (build-system python-build-system)
4844 (native-inputs
4845 `(("python-pytest" ,python-pytest)
4846 ("python-mock" ,python-mock)
4847 ("python-tox" ,python-tox)
4848 ("which" ,which))) ;for tests
4849 (propagated-inputs
4850 `(("python-jinja2" ,python-jinja2)))
4851 (arguments
4852 `(#:phases
4853 (modify-phases %standard-phases
4854 (delete 'check)
4855 (add-after 'install 'check
4856 (lambda* (#:key outputs inputs #:allow-other-keys)
4857 ;; fix honcho path in testsuite
4858 (substitute* "tests/conftest.py"
4859 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4860 "/bin/honcho" "'")))
4861 ;; It's easier to run tests after install.
4862 ;; Make installed package available for running the tests
4863 (add-installed-pythonpath inputs outputs)
95b707fb 4864 (invoke "py.test" "-v"))))))
44d10b1f
RW
4865 (home-page "https://github.com/nickstenning/honcho")
4866 (synopsis "Manage Procfile-based applications")
4867 (description
4868 "A Procfile is a file which describes how to run an application
50fceab0 4869consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4870The output of all running processes is collected by honcho and
4871displayed.")
4872 (license license:expat)))
4873
4874(define-public python2-honcho
4875 (package-with-python2 python-honcho))
4876
4877(define-public python-pexpect
4878 (package
4879 (name "python-pexpect")
4880 (version "4.6.0")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (pypi-uri "pexpect" version))
4885 (sha256
4886 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4887 (build-system python-build-system)
4888 (arguments
4889 `(#:phases
4890 (modify-phases %standard-phases
4891 (add-before 'check 'prepare-tests
4892 (lambda _
4893 (substitute* (find-files "tests")
4894 (("/bin/ls") (which "ls"))
4895 (("/bin/echo") (which "echo"))
4896 (("/bin/which") (which "which"))
4897 ;; Many tests try to use the /bin directory which
4898 ;; is not present in the build environment.
4899 ;; Use one that's non-empty and unlikely to change.
4900 (("/bin'") "/dev'"))
4901 ;; XXX: Socket connection test gets "Connection reset by peer".
4902 ;; Why does it not work? Delete for now.
4903 (delete-file "tests/test_socket.py")
4904 #t))
4905 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4906 (native-inputs
4907 `(("python-nose" ,python-nose)
4908 ("python-pytest" ,python-pytest)
4909 ("man-db" ,man-db)
4910 ("which" ,which)
4911 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4912 (propagated-inputs
4913 `(("python-ptyprocess" ,python-ptyprocess)))
4914 (home-page "http://pexpect.readthedocs.org/")
4915 (synopsis "Controlling interactive console applications")
4916 (description
4917 "Pexpect is a pure Python module for spawning child applications;
4918controlling them; and responding to expected patterns in their output.
4919Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4920child application and control it as if a human were typing commands.")
4921 (license license:isc)))
4922
4923(define-public python2-pexpect
4924 (package-with-python2 python-pexpect))
4925
4926(define-public python-setuptools-scm
4927 (package
4928 (name "python-setuptools-scm")
4929 (version "3.1.0")
4930 (source (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "setuptools_scm" version))
4933 (sha256
4934 (base32
4935 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4936 (build-system python-build-system)
4937 (home-page "https://github.com/pypa/setuptools_scm/")
4938 (synopsis "Manage Python package versions in SCM metadata")
4939 (description
4940 "Setuptools_scm handles managing your Python package versions in
4941@dfn{software configuration management} (SCM) metadata instead of declaring
4942them as the version argument or in a SCM managed file.")
4943 (license license:expat)))
4944
4945(define-public python2-setuptools-scm
4946 (package-with-python2 python-setuptools-scm))
4947
bb74ea09
RW
4948(define-public python-pathlib2
4949 (package
4950 (name "python-pathlib2")
4951 (version "2.3.3")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "pathlib2" version))
4956 (sha256
4957 (base32
4958 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4959 (build-system python-build-system)
4960 (propagated-inputs
4961 `(("python-scandir" ,python-scandir)
4962 ("python-six" ,python-six)))
4963 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4964 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4965 (description "The goal of pathlib2 is to provide a backport of the
4966standard @code{pathlib} module which tracks the standard library module, so
4967all the newest features of the standard @code{pathlib} can be used also on
4968older Python versions.")
4969 (license license:expat)))
4970
15b65617
RW
4971(define-public python-importlib-metadata
4972 (package
4973 (name "python-importlib-metadata")
4974 (version "0.18")
4975 (source
4976 (origin
4977 (method url-fetch)
4978 (uri (pypi-uri "importlib_metadata" version))
4979 (sha256
4980 (base32
4981 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4982 (build-system python-build-system)
4983 (propagated-inputs
4984 `(("python-configparser" ,python-configparser)
4985 ("python-contextlib2" ,python-contextlib2)
4986 ("python-docutils" ,python-docutils)
4987 ("python-pathlib2" ,python-pathlib2)
4988 ("python-rst.linker" ,python-rst.linker)
4989 ("python-zipp" ,python-zipp)))
4990 (native-inputs
4991 `(("python-setuptools-scm" ,python-setuptools-scm)
4992 ("python-sphinx" ,python-sphinx)))
4993 (home-page "https://importlib-metadata.readthedocs.io/")
4994 (synopsis "Read metadata from Python packages")
4995 (description
4996 "@code{importlib_metadata} is a library which provides an API for
4997accessing an installed Python package's metadata, such as its entry points or
4998its top-level name. This functionality intends to replace most uses of
4999@code{pkg_resources} entry point API and metadata API. Along with
5000@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5001need to use the older and less efficient @code{pkg_resources} package.")
5002 (license license:asl2.0)))
5003
37c173d1
RW
5004(define-public python-jaraco-packaging
5005 (package
5006 (name "python-jaraco-packaging")
5007 (version "6.1")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (pypi-uri "jaraco.packaging" version))
5012 (sha256
5013 (base32
5014 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5015 (build-system python-build-system)
5016 (propagated-inputs
5017 `(("python-pytest" ,python-pytest)
5018 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5019 ("python-pytest-flake8" ,python-pytest-flake8)
5020 ("python-rst.linker" ,python-rst.linker)
5021 ("python-setuptools" ,python-setuptools)
5022 ("python-setuptools-scm" ,python-setuptools-scm)
5023 ("python-six" ,python-six)
5024 ("python-sphinx" ,python-sphinx)))
5025 (home-page "https://github.com/jaraco/jaraco.packaging")
5026 (synopsis "Tools to supplement packaging Python releases")
5027 (description
5028 "This package provides various tools to supplement packaging Python
5029releases.")
5030 (license license:expat)))
5031
44d10b1f
RW
5032(define-public python-pathpy
5033 (package
5034 (name "python-pathpy")
49ad11e9 5035 (version "11.5.0")
44d10b1f
RW
5036 (source
5037 (origin
5038 (method url-fetch)
5039 (uri (pypi-uri "path.py" version))
5040 (sha256
49ad11e9
RW
5041 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5042 (outputs '("out" "doc"))
44d10b1f
RW
5043 (build-system python-build-system)
5044 (propagated-inputs
01a53e0b
MC
5045 `(("python-appdirs" ,python-appdirs)
5046 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5047 (native-inputs
5048 `(("python-setuptools-scm" ,python-setuptools-scm)
5049 ("python-sphinx" ,python-sphinx)
5050 ("python-rst.linker" ,python-rst.linker)
5051 ("python-pytest" ,python-pytest)
49ad11e9
RW
5052 ("python-pytest-runner" ,python-pytest-runner)
5053 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5054 (arguments
49ad11e9
RW
5055 `(#:phases
5056 (modify-phases %standard-phases
5057 (add-after 'build 'build-doc
5058 (lambda _
5059 (setenv "LANG" "en_US.UTF-8")
5060 (invoke "python" "setup.py" "build_sphinx")))
5061 (add-after 'install 'install-doc
5062 (lambda* (#:key outputs #:allow-other-keys)
5063 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5064 (doc (string-append data "/doc/" ,name "-" ,version))
5065 (html (string-append doc "/html")))
5066 (mkdir-p html)
5067 (for-each (lambda (file)
5068 (copy-file file (string-append doc "/" file)))
5069 '("README.rst" "CHANGES.rst"))
5070 (copy-recursively "build/sphinx/html" html)
5071 #t)))
5072 (replace 'check
5073 (lambda _
5074 ;; The import time test aborts if an import takes longer than
5075 ;; 100ms. It may very well take a little longer than that.
5076 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5077 (home-page "https://github.com/jaraco/path.py")
5078 (synopsis "Python module wrapper for built-in os.path")
5079 (description
5080 "@code{path.py} implements path objects as first-class entities, allowing
5081common operations on files to be invoked on those path objects directly.")
5082 (license license:expat)))
5083
5084(define-public python2-pathpy
5085 (package-with-python2 python-pathpy))
5086
5087(define-public python-simplegeneric
5088 (package
5089 (name "python-simplegeneric")
5090 (version "0.8.1")
5091 (source
5092 (origin
5093 (method url-fetch)
6c8c3980 5094 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5095 (sha256
5096 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5097 (build-system python-build-system)
5098 (native-inputs
5099 `(("unzip" ,unzip)))
5100 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5101 (synopsis "Python module for simple generic functions")
5102 (description
5103 "The simplegeneric module lets you define simple single-dispatch generic
5104functions, akin to Python’s built-in generic functions like @code{len()},
5105@code{iter()} and so on. However, instead of using specially-named methods,
5106these generic functions use simple lookup tables, akin to those used by
5107e.g. @code{pickle.dump()} and other generic functions found in the Python
5108standard library.")
5109 (license license:zpl2.1)))
5110
5111(define-public python2-simplegeneric
5112 (package-with-python2 python-simplegeneric))
5113
5114(define-public python-ipython-genutils
5115 ;; TODO: This package is retired, check if can be removed, see description.
5116 (package
5117 (name "python-ipython-genutils")
5118 (version "0.1.0")
5119 (source
5120 (origin
5121 (method url-fetch)
c9671d4b 5122 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5123 (sha256
5124 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5125 (build-system python-build-system)
5126 (arguments `(#:tests? #f)) ; no tests
5127 (home-page "https://ipython.org")
5128 (synopsis "Vestigial utilities from IPython")
5129 (description
5130 "This package provides retired utilities from IPython. No packages
5131outside IPython/Jupyter should depend on it.
5132
5133This package shouldn't exist. It contains some common utilities shared by
5134Jupyter and IPython projects during The Big Split. As soon as possible, those
5135packages will remove their dependency on this, and this package will go
5136away.")
5137 (license license:bsd-3)))
5138
5139(define-public python2-ipython-genutils
5140 (package-with-python2 python-ipython-genutils))
5141
5142(define-public python-traitlets
5143 (package
5144 (name "python-traitlets")
5145 (version "4.3.2")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "traitlets" version))
5150 (sha256
5151 (base32
5152 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5153 (build-system python-build-system)
5154 (arguments
5155 `(#:phases
5156 (modify-phases %standard-phases
5157 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5158 (propagated-inputs
5159 `(("python-ipython-genutils" ,python-ipython-genutils)
5160 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5161 (native-inputs
5162 `(("python-pytest" ,python-pytest)))
5163 (properties `((python2-variant . ,(delay python2-traitlets))))
5164 (home-page "https://ipython.org")
5165 (synopsis "Configuration system for Python applications")
5166 (description
5167 "Traitlets is a framework that lets Python classes have attributes with
5168type checking, dynamically calculated default values, and ‘on change’
5169callbacks. The package also includes a mechanism to use traitlets for
5170configuration, loading values from files or from command line arguments. This
5171is a distinct layer on top of traitlets, so you can use traitlets in your code
5172without using the configuration machinery.")
5173 (license license:bsd-3)))
5174
5175(define-public python2-traitlets
5176 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5177 (package
5178 (inherit traitlets)
5179 (propagated-inputs
5180 `(("python2-enum34" ,python2-enum34)
5181 ,@(package-propagated-inputs traitlets))))))
5182
5183(define-public python-jupyter-core
5184 (package
5185 (name "python-jupyter-core")
5186 (version "4.4.0")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 (uri (string-append (pypi-uri "jupyter_core" version)))
5191 (sha256
5192 (base32
5193 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5194 (build-system python-build-system)
5195 ;; FIXME: not sure how to run the tests
5196 (arguments `(#:tests? #f))
5197 (propagated-inputs
5198 `(("python-traitlets" ,python-traitlets)))
5199 (home-page "http://jupyter.org/")
5200 (synopsis "Jupyter base package")
5201 (description
5202 "Jupyter core is the base package on which Jupyter projects rely.")
5203 (license license:bsd-3)))
5204
5205(define-public python2-jupyter-core
5206 (package-with-python2 python-jupyter-core))
5207
5208(define-public python-jupyter-client
5209 (package
5210 (name "python-jupyter-client")
5211 (version "5.2.4")
5212 (source
5213 (origin
5214 (method url-fetch)
5215 (uri (pypi-uri "jupyter_client" version))
5216 (sha256
5217 (base32
5218 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5219 (build-system python-build-system)
5220 ;; Tests fail because of missing native python kernel which I assume is
5221 ;; provided by the ipython package, which we cannot use because it would
5222 ;; cause a dependency cycle.
ddc586ea
LC
5223 (arguments
5224 `(#:tests? #f
5225
5226 #:phases (modify-phases %standard-phases
5227 (add-after 'unpack 'set-tool-file-names
5228 (lambda* (#:key inputs #:allow-other-keys)
5229 (let ((iproute (assoc-ref inputs "iproute")))
5230 (substitute* "jupyter_client/localinterfaces.py"
5231 (("'ip'")
5232 (string-append "'" iproute "/sbin/ip'")))
5233 #t))))))
5234 (inputs
5235 `(("iproute" ,iproute)))
44d10b1f
RW
5236 (propagated-inputs
5237 `(("python-pyzmq" ,python-pyzmq)
5238 ("python-traitlets" ,python-traitlets)
5239 ("python-jupyter-core" ,python-jupyter-core)))
5240 (home-page "http://jupyter.org/")
5241 (synopsis "Jupyter protocol implementation and client libraries")
5242 (description
5243 "The @code{jupyter_client} package contains the reference implementation
5244of the Jupyter protocol. It also provides client and kernel management APIs
5245for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5246installing @code{kernelspec}s for use with Jupyter frontends.")
5247 (license license:bsd-3)))
5248
5249(define-public python2-jupyter-client
5250 (package-with-python2 python-jupyter-client))
5251
5252(define-public python-ipykernel
5253 (package
5254 (name "python-ipykernel")
82110dea 5255 (version "5.1.1")
44d10b1f
RW
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "ipykernel" version))
5260 (sha256
82110dea 5261 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5262 (build-system python-build-system)
5263 (arguments
5264 `(#:phases
5265 (modify-phases %standard-phases
5266 (replace 'check
5267 (lambda _
5268 (setenv "HOME" "/tmp")
5269 (invoke "pytest" "-v")
aa856d02
LC
5270 #t))
5271 (add-after 'install 'set-python-file-name
5272 (lambda* (#:key outputs #:allow-other-keys)
5273 ;; Record the absolute file name of the 'python' executable in
5274 ;; 'kernel.json'.
5275 (let ((out (assoc-ref outputs "out")))
5276 (substitute* (string-append out "/share/jupyter"
5277 "/kernels/python3/kernel.json")
5278 (("\"python\"")
5279 (string-append "\"" (which "python") "\"")))
5280 #t))))))
44d10b1f
RW
5281 (propagated-inputs
5282 `(("python-ipython" ,python-ipython)
5283 ;; imported at runtime during connect
5284 ("python-jupyter-client" ,python-jupyter-client)))
5285 (native-inputs
5286 `(("python-pytest" ,python-pytest)
5287 ("python-nose" ,python-nose)))
5288 (home-page "https://ipython.org")
5289 (synopsis "IPython Kernel for Jupyter")
5290 (description
5291 "This package provides the IPython kernel for Jupyter.")
5292 (license license:bsd-3)))
5293
0f378947 5294;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5295(define-public python2-ipykernel
0f378947
RW
5296 (package
5297 (name "python2-ipykernel")
5298 (version "5.1.0")
5299 (source
5300 (origin
5301 (method url-fetch)
5302 (uri (pypi-uri "ipykernel" version))
5303 (sha256
5304 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5305 (build-system python-build-system)
5306 (arguments
5307 `(#:python ,python-2
5308 #:phases
5309 (modify-phases %standard-phases
5310 (replace 'check
5311 (lambda _
5312 (setenv "HOME" "/tmp")
5313 (invoke "pytest" "-v")
5314 #t)))))
5315 (propagated-inputs
5316 `(("python2-ipython" ,python2-ipython)
5317 ;; imported at runtime during connect
5318 ("python2-jupyter-client" ,python2-jupyter-client)))
5319 (native-inputs
5320 `(("python2-pytest" ,python2-pytest)
5321 ("python2-nose" ,python2-nose)))
5322 (home-page "https://ipython.org")
5323 (synopsis "IPython Kernel for Jupyter")
5324 (description
5325 "This package provides the IPython kernel for Jupyter.")
5326 (license license:bsd-3)))
44d10b1f 5327
966aa714
AE
5328(define-public python-pari-jupyter
5329 (package
5330 (name "python-pari-jupyter")
5331 (version "1.3.2")
5332 (source
5333 (origin
5334 (method url-fetch)
5335 (uri (pypi-uri "pari_jupyter" version))
5336 (sha256
5337 (base32
5338 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5339 (build-system python-build-system)
5340 (propagated-inputs
5341 `(("python-ipykernel" ,python-ipykernel)))
5342 (inputs
5343 `(("pari-gp" ,pari-gp)
5344 ("readline" ,readline)))
5345 (arguments
5346 `(#:tests? #f)) ; no test suite
5347 (home-page
5348 "https://github.com/jdemeyer/pari_jupyter")
5349 (synopsis "A Jupyter kernel for PARI/GP")
5350 (description "The package provides a PARI/GP kernel for Jupyter.")
5351 (license license:gpl3+)))
5352
dede052a
RW
5353(define-public python-backcall
5354 (package
5355 (name "python-backcall")
5356 (version "0.1.0")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "backcall" version))
5361 (sha256
5362 (base32
5363 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5364 (build-system python-build-system)
5365 (home-page "https://github.com/takluyver/backcall/")
5366 (synopsis "Specifications for callback functions passed in to an API")
5367 (description
5368 "If your code lets other people supply callback functions, it's important
5369to specify the function signature you expect, and check that functions support
5370that. Adding extra parameters later would break other peoples code unless
5371you're careful. The @code{backcall} package provides a way of specifying the
5372callback signature using a prototype function.")
5373 (license license:bsd-3)))
5374
44d10b1f
RW
5375;; This is the latest release of the LTS version of ipython with support for
5376;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5377;; dropped support for Python 2.7.
5378(define-public python2-ipython
44d10b1f 5379 (package
8b5f756c 5380 (name "python2-ipython")
44d10b1f
RW
5381 (version "5.8.0")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (pypi-uri "ipython" version ".tar.gz"))
5386 (sha256
5387 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5388 (build-system python-build-system)
44d10b1f 5389 (propagated-inputs
8b5f756c
RW
5390 `(("python2-backports-shutil-get-terminal-size"
5391 ,python2-backports-shutil-get-terminal-size)
5392 ("python2-pathlib2" ,python2-pathlib2)
5393 ("python2-pyzmq" ,python2-pyzmq)
5394 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5395 ("python2-terminado" ,python2-terminado)
5396 ("python2-matplotlib" ,python2-matplotlib)
5397 ("python2-numpy" ,python2-numpy)
5398 ("python2-numpydoc" ,python2-numpydoc)
5399 ("python2-jinja2" ,python2-jinja2)
5400 ("python2-mistune" ,python2-mistune)
5401 ("python2-pexpect" ,python2-pexpect)
5402 ("python2-pickleshare" ,python2-pickleshare)
5403 ("python2-simplegeneric" ,python2-simplegeneric)
5404 ("python2-jsonschema" ,python2-jsonschema)
5405 ("python2-traitlets" ,python2-traitlets)
5406 ("python2-nbformat" ,python2-nbformat)
5407 ("python2-pygments" ,python2-pygments)))
5408 (inputs
5409 `(("readline" ,readline)
5410 ("which" ,which)))
5411 (native-inputs
5412 `(("graphviz" ,graphviz)
5413 ("pkg-config" ,pkg-config)
5414 ("python2-requests" ,python2-requests) ;; for tests
5415 ("python2-testpath" ,python2-testpath)
5416 ("python2-mock" ,python2-mock)
5417 ("python2-nose" ,python2-nose)))
5418 (arguments
5419 `(#:python ,python-2
5420 #:phases
5421 (modify-phases %standard-phases
5422 (add-before 'check 'delete-broken-tests
5423 (lambda* (#:key inputs #:allow-other-keys)
5424 ;; These tests throw errors for unknown reasons.
5425 (delete-file "IPython/core/tests/test_profile.py")
5426 (delete-file "IPython/core/tests/test_interactiveshell.py")
5427 (delete-file "IPython/core/tests/test_magic.py")
5428 #t)))))
5429 (home-page "https://ipython.org")
5430 (synopsis "IPython is a tool for interactive computing in Python")
5431 (description
5432 "IPython provides a rich architecture for interactive computing with:
5433Powerful interactive shells, a browser-based notebook, support for interactive
5434data visualization, embeddable interpreters and tools for parallel
5435computing.")
5436 (license license:bsd-3)))
5437
5438(define-public python-ipython
5439 (package
5440 (name "python-ipython")
5441 (version "7.5.0")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (pypi-uri "ipython" version ".tar.gz"))
5446 (sha256
5447 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5448 (build-system python-build-system)
5449 (propagated-inputs
5450 `(("python-backcall" ,python-backcall)
5451 ("python-pyzmq" ,python-pyzmq)
5452 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5453 ("python-terminado" ,python-terminado)
5454 ("python-matplotlib" ,python-matplotlib)
5455 ("python-numpy" ,python-numpy)
5456 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5457 ("python-jedi" ,python-jedi)
44d10b1f
RW
5458 ("python-jinja2" ,python-jinja2)
5459 ("python-mistune" ,python-mistune)
5460 ("python-pexpect" ,python-pexpect)
5461 ("python-pickleshare" ,python-pickleshare)
5462 ("python-simplegeneric" ,python-simplegeneric)
5463 ("python-jsonschema" ,python-jsonschema)
5464 ("python-traitlets" ,python-traitlets)
5465 ("python-nbformat" ,python-nbformat)
5466 ("python-pygments" ,python-pygments)))
5467 (inputs
5468 `(("readline" ,readline)
5469 ("which" ,which)))
5470 (native-inputs
5471 `(("graphviz" ,graphviz)
5472 ("pkg-config" ,pkg-config)
5473 ("python-requests" ,python-requests) ;; for tests
5474 ("python-testpath" ,python-testpath)
8b5f756c 5475 ("python-nose" ,python-nose)))
44d10b1f
RW
5476 (arguments
5477 `(#:phases
5478 (modify-phases %standard-phases
0f272518
RW
5479 (add-after 'unpack 'make-docs-reproducible
5480 (lambda _
5481 (substitute* "IPython/sphinxext/ipython_directive.py"
5482 ((".*import datetime") "")
5483 ((".*datetime.datetime.now\\(\\)") "")
5484 (("%timeit") "# %timeit"))
5485 #t))
44d10b1f
RW
5486 ;; Tests can only be run after the library has been installed and not
5487 ;; within the source directory.
5488 (delete 'check)
5489 (add-after 'install 'check
5490 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5491 (if tests?
5492 (begin
5493 ;; Make installed package available for running the tests
5494 (add-installed-pythonpath inputs outputs)
5495 (setenv "HOME" "/tmp/") ;; required by a test
5496 ;; We only test the core because one of the other tests
5497 ;; tries to import ipykernel.
5498 (invoke "python" "IPython/testing/iptest.py"
5499 "-v" "IPython/core/tests"))
5500 #t)))
5501 (add-before 'check 'fix-tests
5502 (lambda* (#:key inputs #:allow-other-keys)
5503 (substitute* "./IPython/utils/_process_posix.py"
5504 (("/usr/bin/env', 'which") (which "which")))
5505 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5506 (("#!/usr/bin/env python")
5507 (string-append "#!" (which "python"))))
44d10b1f
RW
5508 ;; This test introduces a circular dependency on ipykernel
5509 ;; (which depends on ipython).
5510 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5511 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5512 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5513 #t)))))
5514 (home-page "https://ipython.org")
5515 (synopsis "IPython is a tool for interactive computing in Python")
5516 (description
5517 "IPython provides a rich architecture for interactive computing with:
5518Powerful interactive shells, a browser-based notebook, support for interactive
5519data visualization, embeddable interpreters and tools for parallel
5520computing.")
8b5f756c 5521 (license license:bsd-3)))
44d10b1f 5522
8b5f756c
RW
5523(define-public python-ipython-documentation
5524 (package
5525 (inherit python-ipython)
5526 (name "python-ipython-documentation")
5527 (version (package-version python-ipython))
5528 (arguments
5529 `(#:phases
5530 (modify-phases %standard-phases
5531 (delete 'build)
5532 (delete 'check)
5533 (replace 'install
5534 (lambda* (#:key outputs #:allow-other-keys)
5535 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5536 (doc (string-append data "/doc/" ,name "-" ,version))
5537 (html (string-append doc "/html"))
5538 (man1 (string-append data "/man/man1"))
5539 (info (string-append data "/info"))
5540 (examples (string-append doc "/examples"))
5541 (python-arg (string-append "PYTHON=" (which "python"))))
5542 (setenv "LANG" "en_US.utf8")
5543 (with-directory-excursion "docs"
5544 ;; FIXME: pdf fails to build
5545 ;;(system* "make" "pdf" "PAPER=a4")
5546 (system* "make" python-arg "html")
5547 ;; FIXME: the generated texi file contains ^@^@, which trips
5548 ;; up the parser.
5549 ;; (system* "make" python-arg "info")
5550 )
5551 (copy-recursively "docs/man" man1)
5552 (copy-recursively "examples" examples)
5553 (copy-recursively "docs/build/html" html)
5554 ;; (copy-file "docs/build/latex/ipython.pdf"
5555 ;; (string-append doc "/ipython.pdf"))
5556 (mkdir-p info)
5557 ;; (copy-file "docs/build/texinfo/ipython.info"
5558 ;; (string-append info "/ipython.info"))
5559 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5560 #t)))))
5561 (inputs
5562 `(("python-ipython" ,python-ipython)
5563 ("python-ipykernel" ,python-ipykernel)))
5564 (native-inputs
5565 `(("python-sphinx" ,python-sphinx)
5566 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5567 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5568 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5569 texlive-fonts-ec
5570 texlive-generic-ifxetex
5571 texlive-generic-pdftex
8b5f756c
RW
5572 texlive-latex-capt-of
5573 texlive-latex-cmap
5574 texlive-latex-environ
5575 texlive-latex-eqparbox
5576 texlive-latex-etoolbox
5577 texlive-latex-expdlist
5578 texlive-latex-fancyhdr
5579 texlive-latex-fancyvrb
5580 texlive-latex-fncychap
5581 texlive-latex-float
5582 texlive-latex-framed
5583 texlive-latex-geometry
5584 texlive-latex-graphics
5585 texlive-latex-hyperref
5586 texlive-latex-mdwtools
5587 texlive-latex-multirow
5588 texlive-latex-needspace
5589 texlive-latex-oberdiek
5590 texlive-latex-parskip
5591 texlive-latex-preview
5592 texlive-latex-tabulary
5593 texlive-latex-threeparttable
5594 texlive-latex-titlesec
5595 texlive-latex-trimspaces
5596 texlive-latex-ucs
5597 texlive-latex-upquote
5598 texlive-latex-url
5599 texlive-latex-varwidth
5600 texlive-latex-wrapfig)))
5601 ("texinfo" ,texinfo)))))
44d10b1f
RW
5602
5603(define-public python-urwid
5604 (package
5605 (name "python-urwid")
5606 (version "2.0.1")
5607 (source
5608 (origin
5609 (method url-fetch)
5610 (uri (pypi-uri "urwid" version))
5611 (sha256
5612 (base32
5613 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5614 (build-system python-build-system)
5615 (home-page "http://urwid.org")
5616 (synopsis "Console user interface library for Python")
5617 (description
5618 "Urwid is a curses-based UI/widget library for Python. It includes many
5619features useful for text console applications.")
5620 (license license:lgpl2.1+)))
5621
5622(define-public python2-urwid
5623 (package-with-python2 python-urwid))
5624
5625(define-public python-urwidtrees
5626 (package
5627 (name "python-urwidtrees")
5628 (version "1.0.2")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 ;; package author intends on distributing via github rather than pypi:
5633 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5634 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5635 version ".tar.gz"))
5636 (file-name (string-append name "-" version ".tar.gz"))
5637 (sha256
5638 (base32
5639 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5640 (build-system python-build-system)
5641 (arguments
5642 '(#:tests? #f)) ; no tests
5643 (propagated-inputs `(("python-urwid" ,python-urwid)))
5644 (home-page "https://github.com/pazz/urwidtrees")
5645 (synopsis "Tree widgets for urwid")
5646 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5647toolkit. Use it to build trees of widgets.")
5648 (license license:gpl3+)))
5649
5650(define-public python2-urwidtrees
5651 (package-with-python2 python-urwidtrees))
5652
5653(define-public python-ua-parser
5654 (package
5655 (name "python-ua-parser")
5656 (version "0.8.0")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "ua-parser" version))
5661 (sha256
5662 (base32
5663 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5664 (build-system python-build-system)
5665 (arguments
5666 `(#:tests? #f)) ;no test suite in release
5667 (native-inputs
5668 `(("python-pyyaml" ,python-pyyaml)))
5669 (home-page "https://github.com/ua-parser/uap-python")
5670 (synopsis "User agent parser")
5671 (description
5672 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5673 (license license:asl2.0)))
5674
5675(define-public python2-ua-parser
5676 (package-with-python2 python-ua-parser))
5677
5678(define-public python-user-agents
5679 (package
5680 (name "python-user-agents")
5681 (version "1.1.0")
5682 (source
5683 (origin
5684 (method url-fetch)
5685 (uri (pypi-uri "user-agents" version))
5686 (sha256
5687 (base32
5688 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5689 (build-system python-build-system)
5690 (arguments
5691 `(#:tests? #f)) ;missing devices.json test file in release
5692 (propagated-inputs
5693 `(("python-ua-parser" ,python-ua-parser)))
5694 (home-page "https://github.com/selwin/python-user-agents")
5695 (synopsis "User Agent strings parsing library")
5696 (description
5697 "A library to identify devices (phones, tablets) and their capabilities by
5698parsing (browser/HTTP) user agent strings.")
5699 (license license:expat)))
5700
5701(define-public python2-user-agents
5702 (package-with-python2 python-user-agents))
5703
5704(define-public python-dbus
5705 (package
5706 (name "python-dbus")
5707 (version "1.2.8")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5712 "dbus-python-" version ".tar.gz"))
5713 (sha256
5714 (base32
5715 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5716 (build-system gnu-build-system)
5717 (arguments
5718 '(#:phases
5719 (modify-phases %standard-phases
5720 (add-before
5721 'check 'pre-check
5722 (lambda _
5723 ;; XXX: For the missing '/etc/machine-id'.
5724 (substitute* "test/run-test.sh"
5725 (("DBUS_FATAL_WARNINGS=1")
5726 "DBUS_FATAL_WARNINGS=0"))
5727 #t)))))
5728 (native-inputs
5729 `(("pkg-config" ,pkg-config)))
5730 (inputs
5731 `(("python" ,python-wrapper)
5732 ("dbus-glib" ,dbus-glib)))
5733 (synopsis "Python bindings for D-bus")
5734 (description "python-dbus provides bindings for libdbus, the reference
5735implementation of D-Bus.")
5736 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5737 (license license:expat)))
5738
5739(define-public python2-dbus
5740 (package (inherit python-dbus)
5741 (name "python2-dbus")
5742 (inputs `(("python" ,python-2)
5743 ,@(alist-delete "python"
5744 (package-inputs python-dbus)
5745 equal?)))
5746 ;; FIXME: on Python 2, the test_utf8 fails with:
5747 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5748 (arguments `(#:tests? #f))))
5749
fb236fdd
AG
5750(define-public python-notify2
5751 (package
5752 (name "python-notify2")
5753 (version "0.3.1")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "notify2" version))
5758 (sha256
5759 (base32
5760 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5761 (build-system python-build-system)
5762 (arguments `(#:tests? #f)) ; tests depend on system state
5763 (native-inputs
5764 `(("python-dbus" ,python-dbus)))
5765 (home-page "https://bitbucket.org/takluyver/pynotify2")
5766 (synopsis "Python interface to D-Bus notifications")
5767 (description
5768 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5769It is a reimplementation of pynotify in pure Python, and an alternative to
5770the GObject Introspection bindings to libnotify for non-GTK applications.")
5771 (license (list license:bsd-2
5772 license:lgpl2.1+))))
5773
5774(define-public python2-notify2
5775 (package-with-python2 python-notify2))
5776
44d10b1f
RW
5777(define-public python-lxml
5778 (package
5779 (name "python-lxml")
5780 (version "4.2.5")
5781 (source
5782 (origin
5783 (method url-fetch)
5784 (uri (pypi-uri "lxml" version))
5785 (sha256
5786 (base32
5787 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5788 (build-system python-build-system)
5789 (inputs
5790 `(("libxml2" ,libxml2)
5791 ("libxslt" ,libxslt)))
5792 (home-page "http://lxml.de/")
5793 (synopsis
5794 "Python XML processing library")
5795 (description
5796 "The lxml XML toolkit is a Pythonic binding for the C libraries
5797libxml2 and libxslt.")
5798 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5799
5800(define-public python2-lxml
5801 (package-with-python2 python-lxml))
5802
5803;; beautifulsoup4 has a totally different namespace than 3.x,
5804;; and pypi seems to put it under its own name, so I guess we should too
5805(define-public python-beautifulsoup4
5806 (package
5807 (name "python-beautifulsoup4")
abb53e6f 5808 (version "4.7.1")
44d10b1f
RW
5809 (source
5810 (origin
5811 (method url-fetch)
5812 (uri (pypi-uri "beautifulsoup4" version))
5813 (sha256
5814 (base32
abb53e6f 5815 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5816 (build-system python-build-system)
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5821 ;; must use this conversion script when building with Python 3. The
5822 ;; conversion script also runs the tests.
5823 ;; For more information, see the file 'convert-py3k' in the source
5824 ;; distribution.
5825 (replace 'check
dff0197e 5826 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5827 (propagated-inputs
abb53e6f 5828 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5829 (home-page
5830 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5831 (synopsis
5832 "Python screen-scraping library")
5833 (description
5834 "Beautiful Soup is a Python library designed for rapidly setting up
5835screen-scraping projects. It offers Pythonic idioms for navigating,
5836searching, and modifying a parse tree, providing a toolkit for
5837dissecting a document and extracting what you need. It automatically
5838converts incoming documents to Unicode and outgoing documents to UTF-8.")
5839 (license license:expat)
5840 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5841
5842(define-public python2-beautifulsoup4
5843 (package
5844 (inherit (package-with-python2
5845 (strip-python2-variant python-beautifulsoup4)))
5846 (arguments `(#:python ,python-2))))
5847
ad74978a
BT
5848(define-public python-soupsieve
5849 (package
5850 (name "python-soupsieve")
e9cb6edd 5851 (version "1.9.2")
ad74978a
BT
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "soupsieve" version))
5856 (sha256
5857 (base32
e9cb6edd 5858 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5859 (build-system python-build-system)
5860 (arguments `(#:tests? #f))
5861 ;;XXX: 2 tests fail currently despite claming they were to be
5862 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5863 ;;don't want to create a circular dependency.
5864 (home-page "https://github.com/facelessuser/soupsieve")
5865 (synopsis "CSS selector library")
5866 (description
5867 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5868Soup 4. It aims to provide selecting, matching, and filtering using modern
5869CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5870specifications up through the latest CSS level 4 drafts and beyond (though
5871some are not yet implemented).")
d00b83fb 5872 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5873 (license license:expat)))
5874
5875(define-public python2-soupsieve
d00b83fb 5876 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5877 (package
5878 (inherit base)
5879 (propagated-inputs
d00b83fb
MB
5880 `(("python2-backports-functools-lru-cache"
5881 ,python2-backports-functools-lru-cache)
5882 ,@(package-propagated-inputs base))))))
ad74978a 5883
44d10b1f
RW
5884(define-public python-netifaces
5885 (package
5886 (name "python-netifaces")
5887 (version "0.10.7")
5888 (source
5889 (origin
5890 (method url-fetch)
5891 (uri (pypi-uri "netifaces" version))
5892 (sha256
5893 (base32
5894 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5895 (build-system python-build-system)
5896 (home-page "https://github.com/al45tair/netifaces")
5897 (synopsis
5898 "Python module for portable network interface information")
5899 (description
5900 "Netifaces is a Python module providing information on network
5901interfaces in an easy and portable manner.")
5902 (license license:expat)))
5903
5904(define-public python2-netifaces
5905 (package-with-python2 python-netifaces))
5906
5907(define-public python-networkx
5908 (package
5909 (name "python-networkx")
5910 (version "2.2")
5911 (source
5912 (origin
5913 (method url-fetch)
5914 (uri (pypi-uri "networkx" version ".zip"))
5915 (sha256
5916 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5917 (build-system python-build-system)
5918 ;; python-decorator is needed at runtime.
5919 (propagated-inputs
5920 `(("python-decorator" ,python-decorator)))
5921 (native-inputs
5922 `(("python-nose" ,python-nose)
5923 ("unzip" ,unzip)))
5924 (home-page "https://networkx.github.io/")
5925 (synopsis "Python module for creating and manipulating graphs and networks")
5926 (description
5927 "NetworkX is a Python package for the creation, manipulation, and study
5928of the structure, dynamics, and functions of complex networks.")
5929 (license license:bsd-3)))
5930
5931(define-public python2-networkx
5932 (package-with-python2 python-networkx))
5933
5934(define-public python-datrie
5935 (package
5936 (name "python-datrie")
5937 (version "0.7.1")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (pypi-uri "datrie" version))
5942 (sha256
5943 (base32
5944 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5945 (build-system python-build-system)
5946 (arguments
5947 `(#:phases (modify-phases %standard-phases
5948 (add-before 'build 'cythonize
5949 (lambda _
5950 ;; Regenerate Cython classes to solve ABI issues with Python
5951 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5952 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5953 "src/stdio_ext.pxd" "-a"))))))
5954 (native-inputs
5955 `(("python-cython" ,python-cython)
5956 ("python-hypothesis" ,python-hypothesis)
5957 ("python-pytest" ,python-pytest)
5958 ("python-pytest-runner" ,python-pytest-runner)))
5959 (home-page "https://github.com/kmike/datrie")
5960 (synopsis "Fast, efficiently stored trie for Python")
5961 (description
5962 "This package provides a fast, efficiently stored trie implementation for
5963Python.")
5964 (license license:lgpl2.1+)))
5965
5966(define-public snakemake
5967 (package
5968 (name "snakemake")
5969 (version "5.2.4")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 (uri (pypi-uri "snakemake" version))
5974 (sha256
5975 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5976 (build-system python-build-system)
5977 (arguments
5978 ;; TODO: Package missing test dependencies.
5979 '(#:tests? #f
5980 #:phases
5981 (modify-phases %standard-phases
5982 ;; For cluster execution Snakemake will call Python. Since there is
5983 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5984 ;; this by calling the snakemake wrapper instead.
5985 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5986 (lambda* (#:key outputs #:allow-other-keys)
5987 (substitute* "snakemake/executors.py"
5988 (("\\{sys.executable\\} -m snakemake")
5989 (string-append (assoc-ref outputs "out")
5990 "/bin/snakemake")))
5991 #t)))))
5992 (propagated-inputs
5993 `(("python-gitpython" ,python-gitpython)
5994 ("python-wrapt" ,python-wrapt)
5995 ("python-requests" ,python-requests)
5996 ("python-appdirs" ,python-appdirs)
5997 ("python-configargparse" ,python-configargparse)
5998 ("python-datrie" ,python-datrie)
5999 ("python-docutils" ,python-docutils)
6000 ("python-jinja2" ,python-jinja2)
6001 ("python-jsonschema" ,python-jsonschema)
6002 ("python-networkx" ,python-networkx)
6003 ("python-pyyaml" ,python-pyyaml)
6004 ("python-ratelimiter" ,python-ratelimiter)))
6005 (home-page "https://snakemake.readthedocs.io")
6006 (synopsis "Python-based execution environment for make-like workflows")
6007 (description
6008 "Snakemake aims to reduce the complexity of creating workflows by
6009providing a clean and modern domain specific specification language (DSL) in
6010Python style, together with a fast and comfortable execution environment.")
6011 (license license:expat)))
6012
6013;; This is currently needed for the pigx-* packages.
6014(define-public snakemake-4
6015 (package (inherit snakemake)
6016 (version "4.4.0")
6017 (source
6018 (origin
6019 (method url-fetch)
6020 (uri (pypi-uri "snakemake" version))
6021 (sha256
6022 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6023 (propagated-inputs
6024 `(("python-wrapt" ,python-wrapt)
6025 ("python-requests" ,python-requests)
6026 ("python-appdirs" ,python-appdirs)
6027 ("python-configargparse" ,python-configargparse)
6028 ("python-pyyaml" ,python-pyyaml)
6029 ("python-ratelimiter" ,python-ratelimiter)))))
6030
6031(define-public python-pyqrcode
6032 (package
6033 (name "python-pyqrcode")
6034 (version "1.2.1")
6035 (source
6036 (origin
6037 (method url-fetch)
6038 (uri (pypi-uri "PyQRCode" version))
6039 (sha256
6040 (base32
6041 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6042 (build-system python-build-system)
6043 (home-page
6044 "https://github.com/mnooner256/pyqrcode")
6045 (synopsis "QR code generator")
6046 (description
6047 "Pyqrcode is a QR code generator written purely in Python with
6048SVG, EPS, PNG and terminal output.")
6049 (license license:bsd-3)))
6050
6051(define-public python-seaborn
6052 (package
6053 (name "python-seaborn")
6054 (version "0.9.0")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "seaborn" version))
6059 (sha256
6060 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6061 (build-system python-build-system)
6062 (arguments
6063 `(#:phases
6064 (modify-phases %standard-phases
6065 (add-before 'check 'start-xserver
6066 (lambda* (#:key inputs #:allow-other-keys)
6067 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6068 ;; There must be a running X server and make check doesn't
6069 ;; start one. Therefore we must do it.
6070 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6071 (setenv "DISPLAY" ":1")
6072 #t)))
6073 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6074 (propagated-inputs
6075 `(("python-pandas" ,python-pandas)
6076 ("python-matplotlib" ,python-matplotlib)
6077 ("python-numpy" ,python-numpy)
6078 ("python-scipy" ,python-scipy)))
6079 (native-inputs
6080 `(("python-pytest" ,python-pytest)
6081 ("xorg-server" ,xorg-server)))
6082 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6083 (synopsis "Statistical data visualization")
6084 (description
6085 "Seaborn is a library for making attractive and informative statistical
6086graphics in Python. It is built on top of matplotlib and tightly integrated
6087with the PyData stack, including support for numpy and pandas data structures
6088and statistical routines from scipy and statsmodels.")
6089 (license license:bsd-3)))
6090
6091(define-public python2-seaborn
6092 (package-with-python2 python-seaborn))
6093
6094(define-public python-mpmath
6095 (package
6096 (name "python-mpmath")
6097 (version "0.19")
6098 (source (origin
6099 (method url-fetch)
6100 (uri (string-append "http://mpmath.org/files/mpmath-"
6101 version ".tar.gz"))
6102 (sha256
6103 (base32
6104 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6105 (build-system python-build-system)
6106 (arguments
6107 '(#:phases
6108 (modify-phases %standard-phases
6109 (replace 'check
6110 (lambda _
5d7a6f1c 6111 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6112 (home-page "http://mpmath.org")
6113 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6114 (description
6115 "@code{mpmath} can be used as an arbitrary-precision substitute for
6116Python's float/complex types and math/cmath modules, but also does much
6117more advanced mathematics.")
6118 (license license:bsd-3)))
6119
6120(define-public python2-mpmath
6121 (package-with-python2 python-mpmath))
6122
6123(define-public python-bigfloat
6124 (package
6125 (name "python-bigfloat")
6126 (version "0.3.0")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (pypi-uri "bigfloat" version))
6131 (sha256
6132 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6133 (build-system python-build-system)
6134 (inputs
6135 `(("mpfr" ,mpfr)))
6136 (home-page "https://github.com/mdickinson/bigfloat")
6137 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6138 (description
e36de31b 6139 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6140multiprecision arithmetic.")
6141 (license license:lgpl3+)))
6142
6143(define-public python2-bigfloat
6144 (package-with-python2 python-bigfloat))
6145
6146(define-public python-sympy
6147 (package
6148 (name "python-sympy")
6149 (version "1.1.1")
6150 (source
6151 (origin
6152 (method url-fetch)
6153 (uri (string-append
6154 "https://github.com/sympy/sympy/releases/download/sympy-"
6155 version "/sympy-" version ".tar.gz"))
6156 (sha256
6157 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6158 (build-system python-build-system)
6159 (arguments
6160 `(#:phases
6161 (modify-phases %standard-phases
6162 ;; Run the core tests after installation. By default it would run
6163 ;; *all* tests, which take a very long time to complete and are known
6164 ;; to be flaky.
6165 (delete 'check)
6166 (add-after 'install 'check
6167 (lambda* (#:key outputs #:allow-other-keys)
6168 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6169 #t)))))
6170 (propagated-inputs
6171 `(("python-mpmath" ,python-mpmath)))
6172 (home-page "http://www.sympy.org/")
6173 (synopsis "Python library for symbolic mathematics")
6174 (description
6175 "SymPy is a Python library for symbolic mathematics. It aims to become a
6176full-featured computer algebra system (CAS) while keeping the code as simple
6177as possible in order to be comprehensible and easily extensible.")
6178 (license license:bsd-3)))
6179
6180(define-public python2-sympy
6181 (package
6182 (inherit (package-with-python2 python-sympy))
6183 (arguments
6184 `(#:phases
6185 (modify-phases %standard-phases
6186 ;; Run the core tests after installation. By default it would run
6187 ;; *all* tests, which take a very long time to complete and are known
6188 ;; to be flaky.
6189 (delete 'check)
6190 (add-after 'install 'check
6191 (lambda* (#:key outputs #:allow-other-keys)
6192 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6193 #t)))))))
6194
6195(define-public python-q
6196 (package
6197 (name "python-q")
6198 (version "2.6")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "q" version))
6203 (sha256
6204 (base32
6205 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6206 (build-system python-build-system)
6207 (home-page "https://github.com/zestyping/q")
6208 (synopsis "Quick-and-dirty debugging output for tired programmers")
6209 (description
6210 "q is a Python module for \"print\" style of debugging Python code. It
6211provides convenient short API for print out of values, tracebacks, and
6212falling into the Python interpreter.")
6213 (license license:asl2.0)))
6214
6215(define-public python2-q
6216 (package-with-python2 python-q))
6217
6218(define-public python2-xlib
6219 (package
6220 (name "python2-xlib")
6221 (version "0.14")
6222 (source (origin
6223 (method url-fetch)
6224 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6225 "/" version "/"
6226 "python-xlib-" version ".tar.gz"))
6227 (sha256
6228 (base32
6229 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6230 (build-system python-build-system)
6231 (arguments
6232 `(#:python ,python-2 ;Python 2 only
6233 #:tests? #f)) ;no tests
6234 (home-page "http://python-xlib.sourceforge.net/")
6235 (synopsis "Python X11 client library")
6236 (description
6237 "The Python X Library is intended to be a fully functional X client
6238library for Python programs. It is useful to implement low-level X clients.
6239It is written entirely in Python.")
6240 (license license:gpl2+)))
6241
6242(define-public python-singledispatch
6243 (package
6244 (name "python-singledispatch")
6245 (version "3.4.0.3")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri (pypi-uri "singledispatch" version))
6250 (sha256
6251 (base32
6252 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6253 (build-system python-build-system)
6254 (native-inputs
6255 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6256 (home-page
6257 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6258 (synopsis "Backport of singledispatch feature from Python 3.4")
6259 (description
6260 "This library brings functools.singledispatch from Python 3.4 to Python
62612.6-3.3.")
6262 (license license:expat)))
6263
6264(define-public python2-singledispatch
6265 (package-with-python2 python-singledispatch))
6266
6267;; the python- version can be removed with python-3.5
6268(define-public python-backports-abc
6269 (package
6270 (name "python-backports-abc")
6271 (version "0.5")
6272 (source
6273 (origin
6274 (method url-fetch)
6275 (uri (pypi-uri "backports_abc" version))
6276 (sha256
6277 (base32
6278 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6279 (build-system python-build-system)
6280 (home-page "https://github.com/cython/backports_abc")
6281 (synopsis "Backport of additions to the 'collections.abc' module")
6282 (description
6283 "Python-backports-abc provides a backport of additions to the
36a4366d 6284@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6285 (license license:psfl)))
6286
6287(define-public python2-backports-abc
6288 (package-with-python2 python-backports-abc))
6289
6290(define-public python-backports-csv
6291 (package
6292 (name "python-backports-csv")
6293 (version "1.0.5")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "backports.csv" version))
6298 (sha256
6299 (base32
6300 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6301 (build-system python-build-system)
6302 (home-page "https://github.com/ryanhiebert/backports.csv")
6303 (synopsis "Backport of Python 3's csv module for Python 2")
6304 (description
6305 "Provides a backport of Python 3's @code{csv} module for parsing
6306comma separated values. The API of the @code{csv} module in Python 2
6307is drastically different from the @code{csv} module in Python 3.
6308This is due, for the most part, to the difference between str in
6309Python 2 and Python 3.")
6310 (license license:psfl)))
6311
6312(define-public python2-backports-csv
6313 (package-with-python2 python-backports-csv))
6314
6315(define-public python2-backports-shutil-get-terminal-size
6316 (package
6317 (name "python2-backports-shutil-get-terminal-size")
6318 (version "1.0.0")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6323 (sha256
6324 (base32
6325 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6326 (build-system python-build-system)
6327 (arguments
6328 `(#:python ,python-2
6329 #:phases
6330 (modify-phases %standard-phases
6331 (replace 'check
6332 (lambda _
4a4a7d9a 6333 (invoke "py.test" "-v"))))))
44d10b1f
RW
6334 (native-inputs
6335 `(("python2-pytest" ,python2-pytest)))
6336 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6337 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6338 (description
6339 "This package provides a backport of the @code{get_terminal_size
6340function} from Python 3.3's @code{shutil}.
6341Unlike the original version it is written in pure Python rather than C,
6342so it might be a tiny bit slower.")
6343 (license license:expat)))
6344
6345(define-public python-waf
6346 (package
6347 (name "python-waf")
6348 (version "2.0.11")
6349 (source (origin
6350 (method url-fetch)
6351 (uri (string-append "https://waf.io/"
6352 "waf-" version ".tar.bz2"))
6353 (sha256
6354 (base32
6355 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6356 (build-system python-build-system)
6357 (arguments
6358 '(#:phases
6359 (modify-phases %standard-phases
6360 (replace 'build
6361 (lambda _
6362 (invoke "python" "waf-light" "configure" "build")))
6363 (replace 'check
6364 (lambda _
6365 (invoke "python" "waf" "--version")))
6366 (replace 'install
6367 (lambda* (#:key outputs #:allow-other-keys)
6368 (let ((out (assoc-ref outputs "out")))
6369 (install-file "waf" (string-append out "/bin")))
6370 #t))
6371 ;; waf breaks when it is wrapped.
6372 (delete 'wrap))))
6373 (home-page "https://waf.io/")
6374 (synopsis "Python-based build system")
6375 (description
6376 "Waf is a Python-based framework for configuring, compiling and installing
6377applications.")
6378 (license license:bsd-3)))
6379
6380(define-public python2-waf
6381 (package-with-python2 python-waf))
6382
6383(define-public python-pyzmq
6384 (package
6385 (name "python-pyzmq")
6386 (version "17.1.2")
6387 (source
6388 (origin
6389 (method url-fetch)
6390 (uri (pypi-uri "pyzmq" version))
6391 (sha256
6392 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6393 (build-system python-build-system)
6394 (arguments
6395 `(#:configure-flags
6396 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6397 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6398 ;; --inplace' for 'python setup.py test' to work.
6399 #:tests? #f))
6400 (inputs
6401 `(("zeromq" ,zeromq)))
6402 (native-inputs
6403 `(("pkg-config" ,pkg-config)
6404 ("python-nose" ,python-nose)))
6405 (home-page "https://github.com/zeromq/pyzmq")
6406 (synopsis "Python bindings for 0MQ")
6407 (description
6408 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6409 (license license:bsd-4)))
6410
6411(define-public python2-pyzmq
6412 (package-with-python2 python-pyzmq))
6413
6414(define-public python-pep8
6415 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6416 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6417 ;; some dependents' test suites, and nothing more.
6418 (package
6419 (name "python-pep8")
6420 (version "1.7.0")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "pep8" version))
6425 (sha256
6426 (base32
6427 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6428 (build-system python-build-system)
6429 (home-page "https://pep8.readthedocs.org/")
6430 (synopsis "Python style guide checker")
6431 (description
6432 "This tools checks Python code against some of the style conventions in
6433PEP 8.")
6434 (license license:expat)))
6435
6436(define-public python2-pep8
6437 (package-with-python2 python-pep8))
6438
6439(define-public python-pyflakes
6440 (package
6441 (name "python-pyflakes")
6442 (version "2.0.0")
6443 (source
6444 (origin
6445 (method url-fetch)
6446 (uri (pypi-uri "pyflakes" version))
6447 (sha256
6448 (base32
6449 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
6450 (build-system python-build-system)
6451 (home-page
6452 "https://github.com/pyflakes/pyflakes")
6453 (synopsis "Passive checker of Python programs")
6454 (description
6455 "Pyflakes statically checks Python source code for common errors.")
6456 (license license:expat)))
6457
6458(define-public python2-pyflakes
6459 (package-with-python2 python-pyflakes))
6460
6461(define-public python-mccabe
6462 (package
6463 (name "python-mccabe")
6464 (version "0.6.1")
6465 (source
6466 (origin
6467 (method url-fetch)
6468 (uri (pypi-uri "mccabe" version))
6469 (sha256
6470 (base32
6471 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6472 (build-system python-build-system)
6473 (native-inputs
6474 `(("python-pytest" ,python-pytest-bootstrap)
6475 ("python-pytest-runner" ,python-pytest-runner)))
6476 (home-page "https://github.com/flintwork/mccabe")
6477 (synopsis "McCabe checker, plugin for flake8")
6478 (description
6479 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6480complexity of Python source code.")
6481 (license license:expat)))
6482
6483(define-public python2-mccabe
6484 (package-with-python2 python-mccabe))
6485
6486(define-public python-mccabe-0.2.1
6487 (package (inherit python-mccabe)
6488 (version "0.2.1")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "mccabe" version))
6493 (sha256
6494 (base32
6495 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6496
6497(define-public python2-mccabe-0.2.1
6498 (package-with-python2 python-mccabe-0.2.1))
6499
6500;; Flake8 2.4.1 requires an older version of pep8.
6501;; This should be removed ASAP.
6502(define-public python-pep8-1.5.7
6503 (package (inherit python-pep8)
6504 (version "1.5.7")
6505 (source
f3576970
RW
6506 (origin
6507 (method url-fetch)
6508 (uri (pypi-uri "pep8" version))
6509 (sha256
6510 (base32
6511 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6512 (arguments
6513 ;; XXX Tests not compatible with Python 3.5.
6514 '(#:tests? #f))))
6515
6516(define-public python2-pep8-1.5.7
6517 (package-with-python2 python-pep8-1.5.7))
6518
6519;; Flake8 2.4.1 requires an older version of pyflakes.
6520;; This should be removed ASAP.
6521(define-public python-pyflakes-0.8.1
6522 (package (inherit python-pyflakes)
6523 (version "0.8.1")
6524 (source
8c4dffb5
RW
6525 (origin
6526 (method url-fetch)
6527 (uri (pypi-uri "pyflakes" version))
6528 (sha256
6529 (base32
6530 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6531 (arguments
6532 ;; XXX Tests not compatible with Python 3.5.
6533 '(#:tests? #f))))
6534
6535(define-public python2-pyflakes-0.8.1
6536 (package-with-python2 python-pyflakes-0.8.1))
6537
6538;; This package is used by hypothesis which has thousands of dependent packages.
6539;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
6540(define-public python-flake8-3.5
6541 (package
6542 (name "python-flake8")
6543 (version "3.5.0")
6544 (source
6545 (origin
6546 (method url-fetch)
6547 (uri (pypi-uri "flake8" version))
6548 (sha256
6549 (base32
6550 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
6551 (build-system python-build-system)
6552 (arguments
6553 `(#:phases
6554 (modify-phases %standard-phases
6555 ;; Two errors don't seem to have assigned codes.
6556 (add-after 'unpack 'delete-broken-test
6557 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
6558 (add-after 'unpack 'fix-problem-with-pycodestyle
6559 (lambda _
6560 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
6561 ;; This should no longer be needed with the next release.
6562 (substitute* "setup.py"
6563 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
6564 "PEP8_PLUGIN('break_after_binary_operator'),\
6565PEP8_PLUGIN('break_before_binary_operator'),"))
6566 #t))
6567 (delete 'check)
6568 (add-after 'install 'check
6569 (lambda* (#:key inputs outputs #:allow-other-keys)
6570 (add-installed-pythonpath inputs outputs)
6571 (invoke "pytest" "-v")
6572 #t)))))
6573 (propagated-inputs
6574 `(("python-pycodestyle" ,python-pycodestyle)
6575 ("python-pyflakes" ,python-pyflakes)
6576 ("python-mccabe" ,python-mccabe)))
6577 (native-inputs
6578 `(("python-mock" ,python-mock)
6579 ("python-pytest" ,python-pytest-bootstrap)
6580 ("python-pytest-runner" ,python-pytest-runner)))
6581 (home-page "https://gitlab.com/pycqa/flake8")
6582 (synopsis
6583 "The modular source code checker: pep8, pyflakes and co")
6584 (description
6585 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6586 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
6587 (license license:expat)))
6588
6589(define-public python2-flake8-3.5
6590 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
6591 (package (inherit base)
6592 (propagated-inputs
6593 `(("python2-configparser" ,python2-configparser)
6594 ("python2-enum34" ,python2-enum34)
6595 ,@(package-propagated-inputs base))))))
6596
6597;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
6598;; this newer version. Keep it as a separate variable for now to avoid
6599;; rebuilding "python-hypothesis"; this should be removed in the next
6600;; rebuild cycle.
6601(define-public python-flake8
6602 (package
6603 (inherit python-flake8-3.5)
6604 (version "3.6.0")
6605 (source (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "flake8" version))
6608 (sha256
6609 (base32
6610 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
6611 (arguments
6612 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
6613 ((#:phases phases)
6614 `(modify-phases ,phases
6615 (delete 'delete-broken-test)
6616 (delete 'fix-problem-with-pycodestyle)))))
6617 (properties `((python2-variant . ,(delay python2-flake8))))))
6618
6619(define-public python2-flake8
6620 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6621 (package (inherit base)
6622 (propagated-inputs
6623 (package-propagated-inputs python2-flake8-3.5)))))
6624
6625;; python-hacking requires flake8 <2.6.0.
6626(define-public python-flake8-2.5
6627 (package
6628 (inherit python-flake8)
6629 (version "2.5.5")
6630 (source (origin
6631 (method url-fetch)
6632 (uri (pypi-uri "flake8" version))
6633 (sha256
6634 (base32
6635 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6636 (propagated-inputs
6637 `(("python-pep8" ,python-pep8)
6638 ,@(package-propagated-inputs python-flake8)))
6639 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6640
6641(define-public python2-flake8-2.5
6642 (package
6643 (inherit python2-flake8)
6644 (version (package-version python-flake8-2.5))
6645 (source (origin
6646 (inherit (package-source python-flake8-2.5))))
6647 (propagated-inputs
6648 `(("python2-pep8" ,python2-pep8)
6649 ,@(package-propagated-inputs python2-flake8)))))
6650
6651(define-public python-flake8-polyfill
6652 (package
6653 (name "python-flake8-polyfill")
6654 (version "1.0.2")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "flake8-polyfill" version))
6659 (sha256
6660 (base32
6661 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6662 (build-system python-build-system)
6663 (arguments
6664 '(#:phases
6665 (modify-phases %standard-phases
6666 (replace 'check
6667 (lambda _
6668 (setenv "PYTHONPATH"
6669 (string-append (getcwd) "/build/lib:"
6670 (getenv "PYTHONPATH")))
4f0a0894 6671 (invoke "py.test" "-v"))))))
44d10b1f
RW
6672 (native-inputs
6673 `(("python-flake8" ,python-flake8)
6674 ("python-mock" ,python-mock)
6675 ("python-pep8" ,python-pep8)
6676 ("python-pycodestyle" ,python-pycodestyle)
6677 ("python-pytest" ,python-pytest)))
6678 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6679 (synopsis "Polyfill package for Flake8 plugins")
6680 (description
6681 "This package that provides some compatibility helpers for Flake8
6682plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6683 (license license:expat)))
6684
6685(define-public python2-flake8-polyfill
6686 (package-with-python2 python-flake8-polyfill))
6687
6688(define-public python-mistune
6689 (package
6690 (name "python-mistune")
6691 (version "0.8.4")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "mistune" version))
6696 (sha256
6697 (base32
6698 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6699 (build-system python-build-system)
6700 (native-inputs
6701 `(("python-nose" ,python-nose)
6702 ("python-cython" ,python-cython)))
6703 (home-page "https://github.com/lepture/mistune")
6704 (synopsis "Markdown parser in pure Python")
6705 (description "This package provides a fast markdown parser in pure
6706Python.")
6707 (license license:bsd-3)))
6708
6709(define-public python2-mistune
6710 (package-with-python2 python-mistune))
6711
6712(define-public python-markdown
6713 (package
6714 (name "python-markdown")
ceb1936a 6715 (version "3.1.1")
44d10b1f
RW
6716 (source
6717 (origin
6718 (method url-fetch)
6719 (uri (pypi-uri "Markdown" version))
6720 (sha256
6721 (base32
ceb1936a 6722 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6723 (build-system python-build-system)
6724 (native-inputs
6725 `(("python-nose" ,python-nose)
6726 ("python-pyyaml" ,python-pyyaml)))
6727 (home-page "https://python-markdown.github.io/")
6728 (synopsis "Python implementation of Markdown")
6729 (description
6730 "This package provides a Python implementation of John Gruber's
6731Markdown. The library features international input, various Markdown
6732extensions, and several HTML output formats. A command line wrapper
6733markdown_py is also provided to convert Markdown files to HTML.")
6734 (license license:bsd-3)))
6735
6736(define-public python2-markdown
6737 (package-with-python2 python-markdown))
6738
6739(define-public python-ptyprocess
6740 (package
6741 (name "python-ptyprocess")
6742 (version "0.5.2")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "ptyprocess" version))
6747 (sha256
6748 (base32
6749 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6750 (build-system python-build-system)
6751 (native-inputs
6752 `(("python-nose" ,python-nose)))
6753 (arguments
6754 `(#:phases
6755 (modify-phases %standard-phases
6756 (replace 'check
7904d6fa 6757 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6758 (home-page "https://github.com/pexpect/ptyprocess")
6759 (synopsis "Run a subprocess in a pseudo terminal")
6760 (description
6761 "This package provides a Python library used to launch a subprocess in a
6762pseudo terminal (pty), and interact with both the process and its pty.")
6763 (license license:isc)))
6764
6765(define-public python2-ptyprocess
6766 (package-with-python2 python-ptyprocess))
6767
6768(define-public python-cram
6769 (package
6770 (name "python-cram")
6771 (version "0.7")
6772 (home-page "https://bitheap.org/cram/")
6773 (source (origin
6774 (method url-fetch)
6775 (uri (list (string-append home-page "cram-"
6776 version ".tar.gz")
6777 (pypi-uri "cram" version)))
6778 (sha256
6779 (base32
6780 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6781 (arguments
6782 '(#:phases
6783 (modify-phases %standard-phases
6784 (add-after 'unpack 'patch-source
6785 (lambda _
6786 (substitute* (find-files "cram" ".*\\.py$")
6787 ;; Replace default shell path.
6788 (("/bin/sh") (which "sh")))
6789 (substitute* (find-files "tests" ".*\\.t$")
6790 (("md5") "md5sum")
6791 (("/bin/bash") (which "bash"))
6792 (("/bin/sh") (which "sh")))
6793 (substitute* "cram/_test.py"
6794 ;; This hack works around a bug triggered by substituting
6795 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6796 ;; "cram -h", which breaks the output at 80 characters. This
6797 ;; causes the line showing the default shell to break into two
6798 ;; lines, but the test expects a single line...
6799 (("env\\['COLUMNS'\\] = '80'")
6800 "env['COLUMNS'] = '160'"))
6801 #t))
6802 (delete 'check)
6803 (add-after 'install 'check
6804 ;; The test phase uses the built library and executable.
6805 ;; It's easier to run it after install since the build
6806 ;; directory contains version-specific PATH.
6807 (lambda* (#:key inputs outputs #:allow-other-keys)
6808 (add-installed-pythonpath inputs outputs)
6809 (setenv "PATH" (string-append (getenv "PATH") ":"
6810 (assoc-ref outputs "out") "/bin"))
2d7db192 6811 (invoke "make" "test"))))))
44d10b1f
RW
6812 (build-system python-build-system)
6813 (native-inputs
6814 `(("python-coverage" ,python-coverage)
6815 ("which" ,which)))
6816 (synopsis "Simple testing framework for command line applications")
6817 (description
6818 "Cram is a functional testing framework for command line applications.
6819Cram tests look like snippets of interactive shell sessions. Cram runs each
6820command and compares the command output in the test with the command’s actual
6821output.")
6822 (license license:gpl2+)))
6823
6824(define-public python2-cram
6825 (package-with-python2 python-cram))
6826
6827(define-public python-straight-plugin
6828 (package
6829 (name "python-straight-plugin")
6830 (version "1.4.1")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "straight.plugin" version))
6835 (sha256
6836 (base32
6837 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6838 (build-system python-build-system)
6839 (home-page "https://github.com/ironfroggy/straight.plugin")
6840 (synopsis "Simple namespaced plugin facility")
6841 (description "Straight Plugin provides a type of plugin you can create from
6842almost any existing Python modules, and an easy way for outside developers to
6843add functionality and customization to your projects with their own plugins.")
6844 (license license:expat)))
6845
6846(define-public python2-straight-plugin
6847 (package-with-python2 python-straight-plugin))
6848
6849(define-public python-fonttools
6850 (package
6851 (name "python-fonttools")
6852 (version "3.28.0")
6853 (source (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "fonttools" version ".zip"))
6856 (sha256
6857 (base32
6858 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6859 (build-system python-build-system)
6860 (native-inputs
6861 `(("unzip" ,unzip)
6862 ("python-pytest" ,python-pytest)
6863 ("python-pytest-runner" ,python-pytest-runner)))
6864 (home-page "https://github.com/behdad/fonttools")
6865 (synopsis "Tools to manipulate font files")
6866 (description
6867 "FontTools/TTX is a library to manipulate font files from Python. It
6868supports reading and writing of TrueType/OpenType fonts, reading and writing
6869of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6870also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6871from an XML-based format.")
6872 (license license:expat)))
6873
6874(define-public python2-fonttools
6875 (package-with-python2 python-fonttools))
6876
6877(define-public python-ly
6878 (package
6879 (name "python-ly")
6880 (version "0.9.5")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (pypi-uri name version))
6885 (sha256
6886 (base32
6887 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6888 (build-system python-build-system)
6889 (arguments
6890 ;; FIXME: Some tests need network access.
6891 '(#:tests? #f))
6892 (synopsis "Tool and library for manipulating LilyPond files")
6893 (description "This package provides a Python library to parse, manipulate
6894or create documents in LilyPond format. A command line program ly is also
6895provided that can be used to do various manipulations with LilyPond files.")
6896 (home-page "https://pypi.python.org/pypi/python-ly")
6897 (license license:gpl2+)))
6898
6899(define-public python-appdirs
6900 (package
6901 (name "python-appdirs")
6902 (version "1.4.3")
6903 (source
6904 (origin
6905 (method url-fetch)
6906 (uri (pypi-uri "appdirs" version))
6907 (sha256
6908 (base32
6909 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6910 (build-system python-build-system)
6911 (home-page "https://github.com/ActiveState/appdirs")
6912 (synopsis
6913 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6914 (description
6915 "This module provides a portable way of finding out where user data
6916should be stored on various operating systems.")
6917 (license license:expat)))
6918
6919(define-public python2-appdirs
6920 (package-with-python2 python-appdirs))
6921
6922(define-public python-llfuse
6923 (package
6924 (name "python-llfuse")
6925 (version "1.3.5")
6926 (source (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6929 (sha256
6930 (base32
6931 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6932 (build-system python-build-system)
6933 (inputs
6934 `(("fuse" ,fuse)
6935 ("attr" ,attr)))
6936 (native-inputs
6937 `(("pkg-config" ,pkg-config)))
6938 (synopsis "Python bindings for FUSE")
6939 (description
6940 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6941 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6942 (license license:lgpl2.0+)
6943 (properties `((python2-variant . ,(delay python2-llfuse))))))
6944
6945(define-public python2-llfuse
6946 (package (inherit (package-with-python2
6947 (strip-python2-variant python-llfuse)))
6948 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6949
6950;; For attic-0.16
6951(define-public python-llfuse-0.41
6952 (package (inherit python-llfuse)
6953 (version "0.41.1")
6954 (source (origin
6955 (method url-fetch)
6956 (uri (string-append
6957 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6958 "llfuse-" version ".tar.bz2"))
6959 (sha256
6960 (base32
6961 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6962 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6963 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6964 (license (list license:expat license:lgpl2.0+))))
6965
6966(define-public python-msgpack
6967 (package
6968 (name "python-msgpack")
6969 (version "0.5.6")
6970 (source (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "msgpack" version))
6973 (sha256
6974 (base32
6975 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6976 (build-system python-build-system)
6977 (arguments
6978 `(#:modules ((guix build utils)
6979 (guix build python-build-system)
6980 (ice-9 ftw)
6981 (srfi srfi-1)
6982 (srfi srfi-26))
6983 #:phases
6984 (modify-phases %standard-phases
6985 (replace 'check
6986 (lambda _
6987 (let ((cwd (getcwd)))
6988 (setenv "PYTHONPATH"
6989 (string-append cwd "/build/"
6990 (find (cut string-prefix? "lib" <>)
6991 (scandir (string-append cwd "/build")))
6992 ":"
6993 (getenv "PYTHONPATH")))
6994 (invoke "pytest" "-v" "test")))))))
6995 (native-inputs
6996 `(("python-pytest" ,python-pytest)))
6997 (synopsis "MessagePack (de)serializer")
6998 (description "MessagePack is a fast, compact binary serialization format,
6999suitable for similar data to JSON. This package provides CPython bindings for
7000reading and writing MessagePack data.")
7001 (home-page "https://pypi.python.org/pypi/msgpack/")
7002 (license license:asl2.0)))
7003
7004;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7005;; release 0.5. Some packages like borg still call it by the old name for now.
7006;; <https://bugs.gnu.org/30662>
7007(define-public python-msgpack-transitional
7008 (package
7009 (inherit python-msgpack)
7010 (name "python-msgpack-transitional")
7011 (arguments
7012 (substitute-keyword-arguments (package-arguments python-msgpack)
7013 ((#:phases phases)
7014 `(modify-phases ,phases
7015 (add-after 'unpack 'configure-transitional
7016 (lambda _
7017 ;; Keep using the old name.
7018 (substitute* "setup.py"
7019 (("TRANSITIONAL = False")
7020 "TRANSITIONAL = 1"))
7021 #t))))))))
7022
7023(define-public python2-msgpack
7024 (package-with-python2 python-msgpack))
7025
7026(define-public python-netaddr
7027 (package
7028 (name "python-netaddr")
7029 (version "0.7.19")
7030 (source
7031 (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "netaddr" version))
7034 (sha256
7035 (base32
7036 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7037 (build-system python-build-system)
7038 (arguments `(#:tests? #f)) ;; No tests.
7039 (home-page "https://github.com/drkjam/netaddr/")
7040 (synopsis "Pythonic manipulation of network addresses")
7041 (description
7042 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7043and MAC network addresses.")
7044 (license license:bsd-3)))
7045
7046(define-public python2-netaddr
7047 (package-with-python2 python-netaddr))
7048
dd85eca0
AG
7049(define-public python2-pyroute2
7050 (package
7051 (name "python2-pyroute2")
7052 (version "0.5.6")
7053 (source
7054 (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "pyroute2" version))
7057 (sha256
7058 (base32
7059 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7060 (build-system python-build-system)
7061 (arguments
7062 `(#:python ,python-2)) ;Python 3.x is not supported
7063 (home-page "https://github.com/svinota/pyroute2")
7064 (synopsis "Python netlink library")
7065 (description
7066 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7067Supported netlink families and protocols include:
7068@itemize
7069@item rtnl, network settings - addresses, routes, traffic controls
7070@item nfnetlink - netfilter API: ipset, nftables, ...
7071@item ipq - simplest userspace packet filtering, iptables QUEUE target
7072@item devlink - manage and monitor devlink-enabled hardware
7073@item generic - generic netlink families
7074 @itemize
7075 @item nl80211 - wireless functions API (basic support)
7076 @item taskstats - extended process statistics
7077 @item acpi_events - ACPI events monitoring
7078 @item thermal_events - thermal events monitoring
7079 @item VFS_DQUOT - disk quota events monitoring
7080 @end itemize
7081@end itemize")
7082 (license license:gpl2+)))
7083
44d10b1f
RW
7084(define-public python-wrapt
7085 (package
7086 (name "python-wrapt")
2271a1dc 7087 (version "1.11.2")
44d10b1f 7088 (source
2271a1dc
MB
7089 (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "wrapt" version))
7092 (sha256
7093 (base32
7094 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7095 (build-system python-build-system)
7096 (arguments
7097 ;; Tests are not included in the tarball, they are only available in the
7098 ;; git repository.
7099 `(#:tests? #f))
7100 (home-page "https://github.com/GrahamDumpleton/wrapt")
7101 (synopsis "Module for decorators, wrappers and monkey patching")
7102 (description
2271a1dc 7103 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7104 Python, which can be used as the basis for the construction of function
7105 wrappers and decorator functions.")
7106 (license license:bsd-2)))
7107
7108(define-public python2-wrapt
7109 (package-with-python2 python-wrapt))
7110
7111(define-public python-xlrd
7112 (package
7113 (name "python-xlrd")
7114 (version "1.0.0")
7115 (source (origin
7116 (method url-fetch)
7117 (uri (pypi-uri "xlrd" version))
7118 (sha256
7119 (base32
7120 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7121 (build-system python-build-system)
7122 (arguments
7123 `(#:phases
7124 (modify-phases %standard-phases
7125 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7126 ;; run tests instead for now.
45fd0081 7127 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7128 (native-inputs `(("python-nose" ,python-nose)))
7129 (home-page "http://www.python-excel.org/")
7130 (synopsis "Library for extracting data from Excel files")
a0909286 7131 (description "This package provides a library to extract data from
44d10b1f
RW
7132spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7133@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7134Unicode-aware. It is not intended as an end-user tool.")
7135 (license license:bsd-3)))
7136
7137(define-public python2-xlrd
7138 (package-with-python2 python-xlrd))
7139
7140(define-public python-prettytable
7141 (package
7142 (name "python-prettytable")
7143 (version "0.7.2")
7144 (source
7145 (origin
7146 (method url-fetch)
337c3a1e 7147 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7148 (sha256
7149 (base32
7150 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7151 (build-system python-build-system)
7152 (home-page "http://code.google.com/p/prettytable/")
7153 (synopsis "Display tabular data in an ASCII table format")
7154 (description
7155 "A library designed to represent tabular data in visually appealing ASCII
7156tables. PrettyTable allows for selection of which columns are to be printed,
7157independent alignment of columns (left or right justified or centred) and
7158printing of sub-tables by specifying a row range.")
7159 (license license:bsd-3)))
7160
7161(define-public python2-prettytable
7162 (package-with-python2 python-prettytable))
7163
7164(define-public python-tables
7165 (package
7166 (name "python-tables")
7167 (version "3.4.4")
7168 (source
7169 (origin
7170 (method url-fetch)
7171 (uri (pypi-uri "tables" version))
7172 (sha256
7173 (base32
7174 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7175 (modules '((guix build utils)))
7176 (snippet
7177 '(begin
7178 ;; Remove pre-compiled .pyc files from source.
7179 (for-each delete-file-recursively
7180 (find-files "." "__pycache__" #:directories? #t))
7181 (for-each delete-file (find-files "." "\\.pyc$"))
7182 #t))))
7183 (build-system python-build-system)
7184 (arguments
7185 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7186 ;; or "check", so we must override the build and check phases.
7187 #:phases
7188 (modify-phases %standard-phases
7189 (add-after 'unpack 'use-gcc
7190 (lambda _
7191 (substitute* "setup.py"
7192 (("compiler = new_compiler\\(\\)" line)
7193 (string-append line
7194 "\ncompiler.set_executables(compiler='gcc',"
7195 "compiler_so='gcc',"
7196 "linker_exe='gcc',"
7197 "linker_so='gcc -shared')")))
7198 #t))
7199 (replace 'build
7200 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7201 (invoke "python" "setup.py" "build"
7202 (string-append "--hdf5="
7203 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7204 (replace 'check
7205 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7206 (invoke "python" "setup.py" "check"
7207 (string-append "--hdf5="
7208 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7209 (propagated-inputs
7210 `(("python-numexpr" ,python-numexpr)
7211 ("python-numpy" ,python-numpy)))
7212 (native-inputs
7213 `(("python-cython" ,python-cython)
7214 ("pkg-config" ,pkg-config)))
7215 (inputs
7216 `(("hdf5" ,hdf5)
7217 ("bzip2" ,bzip2)
7218 ("zlib" ,zlib)))
7219 (home-page "http://www.pytables.org/")
7220 (synopsis "Hierarchical datasets for Python")
7221 (description "PyTables is a package for managing hierarchical datasets and
7222designed to efficiently cope with extremely large amounts of data.")
7223 (license license:bsd-3)))
7224
7225(define-public python2-tables
7226 (package-with-python2 python-tables))
7227
7228(define-public python-pyasn1
7229 (package
7230 (name "python-pyasn1")
7231 (version "0.4.3")
7232 (source
7233 (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "pyasn1" version))
7236 (sha256
7237 (base32
7238 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7239 (build-system python-build-system)
7240 (home-page "http://pyasn1.sourceforge.net/")
7241 (synopsis "ASN.1 types and codecs")
7242 (description
7243 "This is an implementation of ASN.1 types and codecs in Python. It is
7244suitable for a wide range of protocols based on the ASN.1 specification.")
7245 (license license:bsd-2)))
7246
7247(define-public python2-pyasn1
7248 (package-with-python2 python-pyasn1))
7249
7250(define-public python-pyasn1-modules
7251 (package
7252 (name "python-pyasn1-modules")
7253 (version "0.2.2")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "pyasn1-modules" version))
7258 (sha256
7259 (base32
7260 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7261 (build-system python-build-system)
7262 (propagated-inputs
7263 `(("python-pyasn1" ,python-pyasn1)))
7264 (home-page "https://sourceforge.net/projects/pyasn1/")
7265 (synopsis "ASN.1 codec implementations")
7266 (description
7267 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7268implementations of ASN.1-based codecs and protocols.")
7269 (license license:bsd-3)))
7270
7271(define-public python2-pyasn1-modules
7272 (package-with-python2 python-pyasn1-modules))
7273
7274(define-public python-ipaddress
7275 (package
7276 (name "python-ipaddress")
7277 (version "1.0.22")
7278 (source (origin
7279 (method url-fetch)
7280 (uri (pypi-uri "ipaddress" version))
7281 (sha256
7282 (base32
7283 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7284 (build-system python-build-system)
7285 (home-page "https://github.com/phihag/ipaddress")
7286 (synopsis "IP address manipulation library")
7287 (description
7288 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7289 in Python. This library is used to create, poke at, and manipulate IPv4 and
7290 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7291 module to older versions of Python.")
7292 (license license:psfl)))
7293
7294(define-public python2-ipaddress
7295 (package-with-python2 python-ipaddress))
7296
7297(define-public python2-ipaddr
7298 (package
7299 (name "python2-ipaddr")
7300 (version "2.1.11")
7301 (source
7302 (origin
7303 (method url-fetch)
7304 (uri (pypi-uri "ipaddr" version))
7305 (sha256
7306 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7307 (build-system python-build-system)
7308 (arguments
7309 `(#:python ,python-2 ;version 2 only
7310 #:phases
7311 (modify-phases %standard-phases
7312 (replace 'check
40b8c4e3 7313 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7314 (home-page "https://github.com/google/ipaddr-py")
7315 (synopsis "IP address manipulation library")
7316 (description
7317 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7318IPv6 addresses and networks.
7319
7320For new implementations you may prefer to use the standard module
7321@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7322versions of Python.")
7323 (license license:asl2.0)))
7324
7325(define-public python-idna
7326 (package
7327 (name "python-idna")
e95c9837 7328 (version "2.8")
44d10b1f
RW
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "idna" version))
7333 (sha256
7334 (base32
e95c9837 7335 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7336 (build-system python-build-system)
7337 (home-page "https://github.com/kjd/idna")
7338 (synopsis "Internationalized domain names in applications")
7339 (description
7340 "This is a library to support the Internationalised Domain Names in
7341Applications (IDNA) protocol as specified in RFC 5891. This version of the
7342protocol is often referred to as “IDNA2008” and can produce different results
7343from the earlier standard from 2003. The library is also intended to act as a
7344suitable drop-in replacement for the “encodings.idna” module that comes with
7345the Python standard library but currently only supports the older 2003
7346specification.")
7347 (license license:bsd-4)))
7348
a76e6a69
JM
7349(define-public python-idna-2.7
7350 (package (inherit python-idna)
7351 (version "2.7")
7352 (source (origin
7353 (method url-fetch)
7354 (uri (pypi-uri "idna" version))
7355 (sha256
7356 (base32
7357 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7358
7359
44d10b1f
RW
7360(define-public python2-idna
7361 (package-with-python2 python-idna))
7362
7363(define-public python-idna-ssl
7364 (package
7365 (name "python-idna-ssl")
7366 (version "1.0.1")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "idna-ssl" version))
7371 (sha256
7372 (base32
7373 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7374 (build-system python-build-system)
7375 (arguments
7376 `(#:tests? #f)) ;circular dependency with python-aiohttp
7377 (home-page "https://github.com/aio-libs/idna-ssl")
7378 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7379 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7380domains support.")
7381 (license license:expat)))
7382
7383(define-public python-pretend
7384 (package
7385 (name "python-pretend")
7386 (version "1.0.9")
7387 (source
7388 (origin
7389 (method url-fetch)
9f1f22ee 7390 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7391 (sha256
7392 (base32
7393 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7394 (build-system python-build-system)
7395 (home-page "https://github.com/alex/pretend")
7396 (synopsis "Library for stubbing in Python")
7397 (description
7398 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7399technique for writing tests. You may hear the term mixed up with mocks,
7400fakes, or doubles. Basically, a stub is an object that returns pre-canned
7401responses, rather than doing any computation.")
7402 (license license:bsd-3)))
7403
7404(define-public python2-pretend
7405 (package-with-python2 python-pretend))
7406
7407(define-public python-pip
7408 (package
7409 (name "python-pip")
523ba4b1 7410 (version "19.2.1")
44d10b1f
RW
7411 (source
7412 (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "pip" version))
7415 (sha256
7416 (base32
523ba4b1 7417 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7418 (build-system python-build-system)
7419 (arguments
7420 '(#:tests? #f)) ; there are no tests in the pypi archive.
7421 (home-page "https://pip.pypa.io/")
7422 (synopsis "Package manager for Python software")
7423 (description
7424 "Pip is a package manager for Python software, that finds packages on the
7425Python Package Index (PyPI).")
7426 (license license:expat)))
7427
7428(define-public python2-pip
7429 (package-with-python2 python-pip))
7430
7431(define-public python-tlsh
7432 (package
7433 (name "python-tlsh")
7434 (version "3.4.5")
7435 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7436 (source
7437 (origin
7438 (method git-fetch)
7439 (uri (git-reference
7440 (url "https://github.com/trendmicro/tlsh.git")
7441 (commit (string-append "v" version))))
7442 (file-name (git-file-name name version))
7443 (sha256
7444 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7445 (build-system cmake-build-system)
7446 (arguments
7447 '(#:out-of-source? #f
7448 #:phases (modify-phases %standard-phases
7449 (replace
7450 'install
7451 (lambda* (#:key outputs #:allow-other-keys)
7452 ;; Build and install the Python bindings. The underlying
7453 ;; C++ library is apparently not meant to be installed.
7454 (let ((out (assoc-ref outputs "out")))
7455 (with-directory-excursion "py_ext"
7456 (and (system* "python" "setup.py" "build")
7457 (system* "python" "setup.py" "install"
7458 (string-append "--prefix=" out))))))))))
7459 (inputs `(("python" ,python-wrapper))) ;for the bindings
7460 (synopsis "Fuzzy matching library for Python")
7461 (description
7462 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7463Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7464value which can be used for similarity comparisons. Similar objects have
7465similar hash values, which allows for the detection of similar objects by
7466comparing their hash values. The byte stream should have a sufficient amount
7467of complexity; for example, a byte stream of identical bytes will not generate
7468a hash value.")
7469 (license license:asl2.0)))
7470
7471(define-public python2-tlsh
7472 (package
7473 (inherit python-tlsh)
7474 (name "python2-tlsh")
7475 (inputs `(("python" ,python-2)))))
7476
7477(define-public python-termcolor
7478 (package
7479 (name "python-termcolor")
7480 (version "1.1.0")
7481 (source
7482 (origin
7483 (method url-fetch)
7484 (uri (pypi-uri "termcolor" version))
7485 (sha256
7486 (base32
7487 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7488 (build-system python-build-system)
7489 (arguments
7490 ;; There are no tests.
7491 `(#:tests? #f))
7492 (home-page "https://pypi.python.org/pypi/termcolor")
7493 (synopsis "ANSII Color formatting for terminal output")
7494 (description
7495 "This package provides ANSII Color formatting for output in terminals.")
7496 (license license:expat)))
7497
7498(define-public python2-termcolor
7499 (package-with-python2 python-termcolor))
7500
7501(define-public python-libarchive-c
7502 (package
7503 (name "python-libarchive-c")
7504 (version "2.8")
7505 (source (origin
7506 (method url-fetch)
7507 (uri (pypi-uri "libarchive-c" version))
7508 (sha256
7509 (base32
7510 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7511 (build-system python-build-system)
7512 (arguments
7513 '(#:phases (modify-phases %standard-phases
7514 (add-before
7515 'build 'reference-libarchive
7516 (lambda* (#:key inputs #:allow-other-keys)
7517 ;; Retain the absolute file name of libarchive.so.
7518 (let ((libarchive (assoc-ref inputs "libarchive")))
7519 (substitute* "libarchive/ffi.py"
7520 (("find_library\\('archive'\\)")
7521 (string-append "'" libarchive
7522 "/lib/libarchive.so'"))))))
7523 (replace 'check
7524 (lambda _ (invoke "pytest" "-vv"))))))
7525 (native-inputs
7526 `(("python-mock" ,python-mock)
7527 ("python-pytest" ,python-pytest)))
7528 (inputs
7529 `(("libarchive" ,libarchive)))
7530 (home-page "https://github.com/Changaco/python-libarchive-c")
7531 (synopsis "Python interface to libarchive")
7532 (description
7533 "This package provides Python bindings to libarchive, a C library to
7534access possibly compressed archives in many different formats. It uses
7535Python's @code{ctypes} foreign function interface (FFI).")
7536 (license license:lgpl2.0+)))
7537
7538(define-public python2-libarchive-c
7539 (package-with-python2 python-libarchive-c))
7540
7541(define-public python-file
7542 (package
7543 (inherit file)
7544 (name "python-file")
7545 (build-system python-build-system)
7546 (arguments
7547 '(#:tests? #f ;no tests
7548 #:configure-flags '("--single-version-externally-managed" "--root=/")
7549 #:phases (modify-phases %standard-phases
7550 (add-before 'build 'change-directory
7551 (lambda _
7552 (chdir "python")
7553 #t))
7554 (add-before 'build 'set-library-file-name
7555 (lambda* (#:key inputs #:allow-other-keys)
7556 (let ((file (assoc-ref inputs "file")))
7557 (substitute* "magic.py"
7558 (("find_library\\('magic'\\)")
7559 (string-append "'" file "/lib/libmagic.so'")))
7560 #t))))))
7561 (inputs `(("file" ,file)))
528ea990
LC
7562 (native-inputs (if (%current-target-system)
7563 `(("self" ,this-package))
7564 '()))
44d10b1f
RW
7565 (synopsis "Python bindings to the libmagic file type guesser. Note that
7566this module and the python-magic module both provide a \"magic.py\" file;
7567these two modules, which are different and were developed separately, both
7568serve the same purpose: provide Python bindings for libmagic.")))
7569
7570(define-public python2-file
7571 (package-with-python2 python-file))
7572
7573(define-public python-debian
7574 (package
7575 (name "python-debian")
7576 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7577 (version "0.1.36")
44d10b1f
RW
7578 (source
7579 (origin
9f74bd31
VC
7580 ;; Use git-fetch, as pypi doesn't include test suite.
7581 (method git-fetch)
7582 (uri (git-reference
7583 (url home-page)
7584 (commit version)))
7585 (file-name (git-file-name name version))
44d10b1f
RW
7586 (sha256
7587 (base32
9f74bd31 7588 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7589 (build-system python-build-system)
9f74bd31
VC
7590 (arguments
7591 `(#:phases (modify-phases %standard-phases
7592 (add-after 'unpack 'remove-debian-specific-tests
7593 ;; python-apt, apt and dpkg are not yet available in guix,
7594 ;; and these tests heavily depend on them.
7595 (lambda _
7596 (delete-file "lib/debian/tests/test_deb822.py")
7597 (delete-file "lib/debian/tests/test_debfile.py")
7598 #t)))))
44d10b1f 7599 (propagated-inputs
9f74bd31
VC
7600 `(("python-six" ,python-six)
7601 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7602 (synopsis "Debian package related modules")
7603 (description
7604 ;; XXX: Use @enumerate instead of @itemize to work around
7605 ;; <http://bugs.gnu.org/21772>.
7606 "This package provides Python modules that abstract many formats of
7607Debian-related files, such as:
7608
7609@enumerate
7610@item Debtags information;
7611@item @file{debian/changelog} files;
7612@item packages files, pdiffs;
7613@item control files of single or multiple RFC822-style paragraphs---e.g.
7614 @file{debian/control}, @file{.changes}, @file{.dsc};
7615@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7616 contained files and meta-information.
7617@end enumerate\n")
7618
7619 ;; Modules are either GPLv2+ or GPLv3+.
7620 (license license:gpl3+)))
7621
7622(define-public python2-debian
7623 (package-with-python2 python-debian))
7624
7625(define-public python-nbformat
7626 (package
7627 (name "python-nbformat")
7628 (version "4.4.0")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "nbformat" version))
7633 (sha256
7634 (base32
7635 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7636 (build-system python-build-system)
7637 (arguments `(#:tests? #f)) ; no test target
7638 (propagated-inputs
7639 `(("python-ipython-genutils" ,python-ipython-genutils)
7640 ("python-jsonschema" ,python-jsonschema)
7641 ("python-jupyter-core" ,python-jupyter-core)
7642 ("python-traitlets" ,python-traitlets)))
7643 (home-page "http://jupyter.org")
7644 (synopsis "Jupyter Notebook format")
7645 (description "This package provides the reference implementation of the
7646Jupyter Notebook format and Python APIs for working with notebooks.")
7647 (license license:bsd-3)))
7648
7649(define-public python2-nbformat
7650 (package-with-python2 python-nbformat))
7651
7652(define-public python-bleach
7653 (package
7654 (name "python-bleach")
7655 (version "1.4.3")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "bleach" version))
7660 (sha256
7661 (base32
7662 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7663 (build-system python-build-system)
7664 (propagated-inputs
7665 `(("python-html5lib" ,python-html5lib-0.9)
7666 ("python-six" ,python-six)))
7667 (native-inputs
7668 `(("python-nose" ,python-nose)))
7669 (home-page "https://github.com/jsocol/bleach")
7670 (synopsis "Whitelist-based HTML-sanitizing tool")
7671 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7672 (license license:asl2.0)))
7673
7674(define-public python2-bleach
7675 (package-with-python2 python-bleach))
7676
7677(define-public python-entrypoints
7678 (package
7679 (name "python-entrypoints")
a7f1b718 7680 (version "0.3")
44d10b1f
RW
7681 (source
7682 (origin
7683 (method url-fetch)
a7f1b718 7684 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7685 (sha256
7686 (base32
a7f1b718 7687 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7688 (build-system python-build-system)
7689 ;; The package does not come with a setup.py file, so we have to generate
7690 ;; one ourselves.
7691 (arguments
7692 `(#:tests? #f
7693 #:phases
7694 (modify-phases %standard-phases
7695 (add-after 'unpack 'create-setup.py
7696 (lambda _
7697 (call-with-output-file "setup.py"
7698 (lambda (port)
7699 (format port "\
7700from setuptools import setup
7701setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7702" ,version))))))))
7703 (home-page "https://github.com/takluyver/entrypoints")
7704 (synopsis "Discover and load entry points from installed Python packages")
7705 (description "Entry points are a way for Python packages to advertise
7706objects with some common interface. The most common examples are
7707@code{console_scripts} entry points, which define shell commands by
7708identifying a Python function to run. The @code{entrypoints} module contains
7709functions to find and load entry points.")
7710 (license license:expat)))
7711
7712(define-public python2-entrypoints
7713 (package-with-python2 python-entrypoints))
7714
7715(define-public python-nbconvert
7716 (package
7717 (name "python-nbconvert")
7718 (version "5.0.0b1")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "nbconvert" version))
7723 (sha256
7724 (base32
7725 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7726 (build-system python-build-system)
7727 (arguments
7728 `(;; The "bdist_egg" target is disabled by default, causing the installation
7729 ;; to fail.
7730 #:configure-flags (list "bdist_egg")
7731 ;; FIXME: 5 failures, 40 errors.
7732 #:tests? #f))
7733 ;; #:phases
7734 ;; (modify-phases %standard-phases
7735 ;; (replace 'check
7736 ;; (lambda _
7737 ;; (zero? (system* "py.test" "-v")))))
7738 (native-inputs
7739 `(("python-pytest" ,python-pytest)))
7740 (propagated-inputs
7741 `(("python-bleach" ,python-bleach)
7742 ("python-entrypoints" ,python-entrypoints)
7743 ("python-jinja2" ,python-jinja2)
7744 ("python-jupyter-core" ,python-jupyter-core)
7745 ("python-mistune" ,python-mistune)
7746 ("python-nbformat" ,python-nbformat)
7747 ("python-pygments" ,python-pygments)
7748 ("python-traitlets" ,python-traitlets)))
7749 (home-page "http://jupyter.org")
7750 (synopsis "Converting Jupyter Notebooks")
7751 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7752notebooks to various other formats via Jinja templates. It allows you to
7753convert an @code{.ipynb} notebook file into various static formats including:
7754
7755@enumerate
7756@item HTML
7757@item LaTeX
7758@item PDF
7759@item Reveal JS
7760@item Markdown (md)
7761@item ReStructured Text (rst)
7762@item executable script
7763@end enumerate\n")
7764 (license license:bsd-3)))
7765
7766(define-public python2-nbconvert
7767 (package-with-python2 python-nbconvert))
7768
44d10b1f
RW
7769(define-public python-notebook
7770 (package
7771 (name "python-notebook")
7772 (version "5.7.4")
7773 (source (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "notebook" version))
7776 (sha256
7777 (base32
7778 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7779 (build-system python-build-system)
7780 (arguments
7781 `(#:phases
7782 (modify-phases %standard-phases
7783 (replace 'check
7784 (lambda _
7785 ;; These tests require a browser
7786 (delete-file-recursively "notebook/tests/selenium")
7787 ;; Some tests need HOME
7788 (setenv "HOME" "/tmp")
7789 ;; This file contains "warningfilters", which are not supported
7790 ;; by this version of nose.
7791 (delete-file "setup.cfg")
7792 (with-directory-excursion "/tmp"
7793 (invoke "nosetests" "-v"))
7794 #t)))))
7795 (propagated-inputs
7796 `(("python-jupyter-core" ,python-jupyter-core)
7797 ("python-nbformat" ,python-nbformat)
7798 ("python-nbconvert" ,python-nbconvert)
7799 ("python-prometheus-client" ,python-prometheus-client)
7800 ("python-send2trash" ,python-send2trash)
7801 ("python-terminado" ,python-terminado)))
7802 (native-inputs
7803 `(("python-nose" ,python-nose)
7804 ("python-sphinx" ,python-sphinx)
7805 ("python-requests" ,python-requests)))
7806 (home-page "http://jupyter.org/")
7807 (synopsis "Web-based notebook environment for interactive computing")
7808 (description
7809 "The Jupyter HTML notebook is a web-based notebook environment for
7810interactive computing.")
7811 (properties `((python2-variant . ,(delay python2-notebook))))
7812 (license license:bsd-3)))
7813
7814(define-public python2-notebook
7815 (let ((base (package-with-python2
7816 (strip-python2-variant python-notebook))))
7817 (package (inherit base)
7818 (native-inputs
7819 `(("python2-mock" ,python2-mock)
7820 ,@(package-native-inputs base)))
7821 (arguments
7822 (substitute-keyword-arguments (package-arguments base)
7823 ((#:phases phases)
7824 `(modify-phases ,phases
7825 (add-before 'check 'disable-test-case
7826 ;; The test requires network access to localhost. Curiously it
7827 ;; fails with Python 2 only. Simply make the test-case return
7828 ;; immediately.
7829 (lambda _
7830 (substitute*
7831 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7832 (("formats = self.nbconvert_api") "return #")))))))))))
7833
7834(define-public python-widgetsnbextension
7835 (package
7836 (name "python-widgetsnbextension")
7837 (version "3.4.2")
7838 (source
7839 (origin
7840 (method url-fetch)
7841 (uri (pypi-uri "widgetsnbextension" version))
7842 (sha256
7843 (base32
7844 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7845 (build-system python-build-system)
7846 (propagated-inputs
7847 `(("python-ipykernel" ,python-ipykernel)
7848 ("python-notebook" ,python-notebook)))
7849 (native-inputs
7850 `(("python-certifi" ,python-certifi)
7851 ("python-nose" ,python-nose)))
7852 (home-page "https://ipython.org")
7853 (synopsis "IPython HTML widgets for Jupyter")
7854 (description "This package provides interactive HTML widgets for Jupyter
7855notebooks.")
7856 (license license:bsd-3)))
7857
7858(define-public python2-widgetsnbextension
7859 (package-with-python2 python-widgetsnbextension))
7860
7861(define-public python-ipywidgets
7862 (package
7863 (name "python-ipywidgets")
7864 (version "5.2.2")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "ipywidgets" version))
7869 (sha256
7870 (base32
7871 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7872 (build-system python-build-system)
7873 (propagated-inputs
7874 `(("python-ipython" ,python-ipython)
7875 ("python-traitlets" ,python-traitlets)
7876 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7877 (native-inputs
7878 `(("python-nose" ,python-nose)
7879 ("python-pytest" ,python-pytest)))
7880 (home-page "https://ipython.org")
7881 (synopsis "IPython HTML widgets for Jupyter")
7882 (description "Ipywidgets are interactive HTML widgets for Jupyter
7883notebooks and the IPython kernel. Notebooks come alive when interactive
7884widgets are used. Users gain control of their data and can visualize changes
7885in the data.")
7886 (license license:bsd-3)))
7887
7888(define-public python2-ipywidgets
7889 (package-with-python2 python-ipywidgets))
7890
7891(define-public python-jupyter-console
7892 (package
7893 (name "python-jupyter-console")
becb9cbf 7894 (version "6.0.0")
44d10b1f
RW
7895 (source
7896 (origin
7897 (method url-fetch)
7898 (uri (pypi-uri "jupyter_console" version))
7899 (sha256
7900 (base32
becb9cbf 7901 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7902 (build-system python-build-system)
44d10b1f
RW
7903 (propagated-inputs
7904 `(("python-ipykernel" ,python-ipykernel)
7905 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7906 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7907 ("python-pygments" ,python-pygments)))
7908 (native-inputs
7909 `(("python-nose" ,python-nose)))
7910 (home-page "https://jupyter.org")
7911 (synopsis "Jupyter terminal console")
7912 (description "This package provides a terminal-based console frontend for
7913Jupyter kernels. It also allows for console-based interaction with non-Python
7914Jupyter kernels such as IJulia and IRKernel.")
7915 (license license:bsd-3)))
7916
7917(define-public python2-jupyter-console
8e590c81
RW
7918 (package
7919 (name "python2-jupyter-console")
7920 (version "5.2.0")
7921 (source
7922 (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "jupyter_console" version))
7925 (sha256
7926 (base32
7927 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7928 (build-system python-build-system)
7929 ;; Tests only run in an TTY.
7930 (arguments `(#:tests? #f))
7931 (propagated-inputs
7932 `(("python2-ipykernel" ,python2-ipykernel)
7933 ("python2-jupyter-client" ,python2-jupyter-client)
7934 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7935 ("python2-pygments" ,python2-pygments)))
7936 (native-inputs
7937 `(("python2-nose" ,python2-nose)))
7938 (home-page "https://jupyter.org")
7939 (synopsis "Jupyter terminal console")
7940 (description "This package provides a terminal-based console frontend for
7941Jupyter kernels. It also allows for console-based interaction with non-Python
7942Jupyter kernels such as IJulia and IRKernel.")
7943 (license license:bsd-3)))
44d10b1f
RW
7944
7945;; The python-ipython and python-jupyter-console require each other. To get
7946;; the functionality in both packages working, strip down the
7947;; python-jupyter-console package when using it as an input to python-ipython.
7948(define python-jupyter-console-minimal
7949 (package
7950 (inherit python-jupyter-console)
7951 (name "python-jupyter-console-minimal")
7952 (arguments
7953 (substitute-keyword-arguments
7954 (package-arguments python-jupyter-console)
7955 ((#:phases phases)
7956 `(modify-phases ,phases
7957 (add-after 'install 'delete-bin
7958 (lambda* (#:key outputs #:allow-other-keys)
7959 ;; Delete the bin files, to avoid conflicts in profiles
7960 ;; where python-ipython and python-jupyter-console are
7961 ;; both present.
7962 (delete-file-recursively
7963 (string-append
7964 (assoc-ref outputs "out") "/bin"))))))))
7965 ;; Remove the python-ipython propagated input, to avoid the cycle
7966 (propagated-inputs
7967 (alist-delete
7968 "python-ipython"
7969 (package-propagated-inputs python-jupyter-console)))))
7970
7971(define-public python-qtconsole
7972 (package
7973 (name "python-qtconsole")
7974 (version "4.4.3")
7975 (source
7976 (origin
7977 (method url-fetch)
7978 (uri (pypi-uri "qtconsole" version))
7979 (sha256
7980 (base32
7981 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7982 (build-system python-build-system)
7983 (arguments
7984 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7985 ;; but we only have the LTS version 5.x. This means that there might be
7986 ;; runtime errors, but since this is a dependency of the Jupyter package,
7987 ;; and Jupyter can be used without the qtconsole we can overlook this for
7988 ;; now.
7989 `(#:tests? #f
7990 #:phases
7991 (modify-phases %standard-phases
7992 (add-before 'check 'pre-check
7993 (lambda _
7994 (setenv "QT_QPA_PLATFORM" "offscreen")
7995 #t)))))
7996 (propagated-inputs
7997 `(("python-ipykernel" ,python-ipykernel)
7998 ("python-ipython" ,python-ipython)))
7999 (native-inputs
8000 `(("python-pytest" ,python-pytest)))
8001 (home-page "http://jupyter.org")
8002 (synopsis "Jupyter Qt console")
8003 (description "This package provides a Qt-based console for Jupyter with
8004support for rich media output.")
8005 (license license:bsd-3)))
8006
8007(define-public jupyter
8008 (package
8009 (name "jupyter")
8010 (version "1.0.0")
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "jupyter" version))
8015 (sha256
8016 (base32
8017 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8018 (build-system python-build-system)
8019 (arguments '(#:tests? #f)) ; there are none.
8020 (propagated-inputs
8021 `(("python-ipykernel" ,python-ipykernel)
8022 ("python-ipywidgets" ,python-ipywidgets)
8023 ("python-jupyter-console" ,python-jupyter-console)
8024 ("python-nbconvert" ,python-nbconvert)
8025 ("python-notebook" ,python-notebook)
8026 ("python-qtconsole" ,python-qtconsole)))
8027 (native-search-paths
8028 (list (search-path-specification
8029 (variable "JUPYTER_PATH")
8030 (files '("share/jupyter")))))
8031 (home-page "https://jupyter.org")
8032 (synopsis "Web application for interactive documents")
8033 (description
8034 "The Jupyter Notebook is a web application that allows you to create and
8035share documents that contain live code, equations, visualizations and
8036explanatory text. Uses include: data cleaning and transformation, numerical
8037simulation, statistical modeling, machine learning and much more.")
8038 (license license:bsd-3)))
8039
8040(define-public python-chardet
8041 (package
8042 (name "python-chardet")
8043 (version "3.0.4")
8044 (source
8045 (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "chardet" version))
8048 (sha256
8049 (base32
8050 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8051 (native-inputs
8052 `(("python-hypothesis" ,python-hypothesis)
8053 ("python-pytest" ,python-pytest)
8054 ("python-pytest-runner" ,python-pytest-runner)))
8055 (build-system python-build-system)
8056 (home-page "https://github.com/chardet/chardet")
8057 (synopsis "Universal encoding detector for Python 2 and 3")
8058 (description
8059 "This package provides @code{chardet}, a Python module that can
8060automatically detect a wide range of file encodings.")
8061 (license license:lgpl2.1+)))
8062
8063(define-public python2-chardet
8064 (package-with-python2 python-chardet))
8065
8066(define-public python-docopt
8067 (package
8068 (name "python-docopt")
8069 (version "0.6.2")
8070 (source
8071 (origin
8072 (method url-fetch)
8073 ;; The release on PyPI does not include tests.
8074 (uri (string-append
8075 "https://github.com/docopt/docopt/archive/"
8076 version ".tar.gz"))
8077 (file-name (string-append name "-" version ".tar.gz"))
8078 (sha256
8079 (base32
8080 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8081 (build-system python-build-system)
8082 (native-inputs
8083 `(("python-pytest" ,python-pytest)))
8084 (arguments
8085 `(#:phases
8086 (modify-phases %standard-phases
8087 (replace 'check
8088 (lambda _ (invoke "py.test"))))))
8089 (home-page "http://docopt.org")
8090 (synopsis "Command-line interface description language for Python")
8091 (description "This library allows the user to define a command-line
8092interface from a program's help message rather than specifying it
4ca7207b 8093programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8094@code{argparse}.")
8095 (license license:expat)))
8096
8097(define-public python2-docopt
8098 (package-with-python2 python-docopt))
8099
8100(define-public python-pythondialog
8101 (package
8102 (name "python-pythondialog")
8103 (version "3.4.0")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (pypi-uri "pythondialog" version))
8108 (sha256
8109 (base32
8110 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8111 (build-system python-build-system)
8112 (arguments
8113 `(#:phases
8114 (modify-phases %standard-phases
8115 (add-after 'unpack 'patch-path
8116 (lambda* (#:key inputs #:allow-other-keys)
8117 (let* ((dialog (assoc-ref inputs "dialog")))
8118 ;; Since this library really wants to grovel the search path, we
8119 ;; must hardcode dialog's store path into it.
8120 (substitute* "dialog.py"
8121 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8122 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8123 #t))))
8124 #:tests? #f)) ; no test suite
8125 (propagated-inputs
8126 `(("dialog" ,dialog)))
8127 (home-page "http://pythondialog.sourceforge.net/")
8128 (synopsis "Python interface to the UNIX dialog utility")
8129 (description "A Python wrapper for the dialog utility. Its purpose is to
8130provide an easy to use, pythonic and comprehensive Python interface to dialog.
8131This allows one to make simple text-mode user interfaces on Unix-like systems")
8132 (license license:lgpl2.1)
8133 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8134
8135(define-public python2-pythondialog
8136 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8137 (package
8138 (inherit base)
8139 (version (package-version python-pythondialog))
8140 (source (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "python2-pythondialog" version))
8143 (sha256
8144 (base32
8145 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8146
8147(define-public python-configobj
8148 (package
8149 (name "python-configobj")
8150 (version "5.0.6")
8151 (source (origin
8152 (method url-fetch)
b0758fbb 8153 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8154 (sha256
8155 (base32
8156 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8157 ;; Patch setup.py so it looks for python-setuptools, which is
8158 ;; required to parse the keyword 'install_requires' in setup.py.
8159 (patches (search-patches "python-configobj-setuptools.patch"))))
8160 (build-system python-build-system)
8161 (propagated-inputs
8162 `(("python-six" ,python-six)))
8163 (synopsis "Config file reading, writing and validation")
8164 (description "ConfigObj is a simple but powerful config file reader and
8165writer: an ini file round tripper. Its main feature is that it is very easy to
8166use, with a straightforward programmer’s interface and a simple syntax for
8167config files.")
8168 (home-page "https://github.com/DiffSK/configobj")
8169 (license license:bsd-3)))
8170
8171(define-public python2-configobj
8172 (package-with-python2 python-configobj))
8173
8174(define-public python-configargparse
8175 (package
8176 (name "python-configargparse")
86ae491f 8177 (version "0.14.0")
44d10b1f
RW
8178 (source (origin
8179 (method url-fetch)
8180 (uri (pypi-uri "ConfigArgParse" version))
8181 (sha256
8182 (base32
86ae491f 8183 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8184 (build-system python-build-system)
8185 (native-inputs
8186 `(("python-pyyaml" ,python-pyyaml)))
8187 (arguments
8188 `(#:phases
8189 (modify-phases %standard-phases
8190 (replace 'check
8191 (lambda _
8192 ;; Bypass setuptools-shim because one test relies on "setup.py"
8193 ;; being the first argument passed to the python call.
8194 ;;
8195 ;; NOTE: Many tests do not run because they rely on Python's
8196 ;; built-in test.test_argparse, but we remove the unit tests from
8197 ;; our Python installation.
8198 (invoke "python" "setup.py" "test"))))))
8199 (synopsis "Replacement for argparse")
8200 (description "A drop-in replacement for argparse that allows options to also
8201be set via config files and/or environment variables.")
8202 (home-page "https://github.com/bw2/ConfigArgParse")
8203 (license license:expat)))
8204
8205(define-public python2-configargparse
8206 (package-with-python2 python-configargparse))
8207
8208(define-public python-argparse-manpage
8209 (package
8210 (name "python-argparse-manpage")
8211 (version "1.1")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "argparse-manpage" version))
8216 (sha256
8217 (base32
8218 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8219 (build-system python-build-system)
8220 (home-page "https://github.com/praiskup/argparse-manpage")
8221 (synopsis "Build manual page from Python's ArgumentParser object")
8222 (description
8223 "This package provides tools to build manual pages from Python's
8224@code{ArgumentParser} object.")
8225 (license license:asl2.0)))
8226
3e8f76d8
RW
8227(define-public python-contextlib2
8228 (package
8229 (name "python-contextlib2")
8230 (version "0.5.5")
8231 (source
8232 (origin
8233 (method url-fetch)
8234 (uri (pypi-uri "contextlib2" version))
8235 (sha256
8236 (base32
8237 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8238 (build-system python-build-system)
8239 (home-page "http://contextlib2.readthedocs.org/")
8240 (synopsis "Tools for decorators and context managers")
8241 (description "This module is primarily a backport of the Python
82423.2 contextlib to earlier Python versions. Like contextlib, it
8243provides utilities for common tasks involving decorators and context
8244managers. It also contains additional features that are not part of
8245the standard library.")
8246 (license license:psfl)))
8247
44d10b1f
RW
8248(define-public python2-contextlib2
8249 (package
8250 (name "python2-contextlib2")
8251 (version "0.5.5")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "contextlib2" version))
8256 (sha256
8257 (base32
8258 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8259 (build-system python-build-system)
8260 (arguments
8261 `(#:python ,python-2
8262 #:phases
8263 (modify-phases %standard-phases
8264 (replace 'check
8265 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8266 (native-inputs
8267 `(("python2-unittest2" ,python2-unittest2)))
8268 (home-page "http://contextlib2.readthedocs.org/")
8269 (synopsis "Tools for decorators and context managers")
8270 (description "This module is primarily a backport of the Python
82713.2 contextlib to earlier Python versions. Like contextlib, it
8272provides utilities for common tasks involving decorators and context
8273managers. It also contains additional features that are not part of
8274the standard library.")
8275 (license license:psfl)))
8276
8277(define-public python-texttable
8278 (package
8279 (name "python-texttable")
52cc4892 8280 (version "0.9.1")
44d10b1f
RW
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "texttable" version))
8285 (sha256
8286 (base32
52cc4892 8287 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8288 (build-system python-build-system)
8289 (arguments '(#:tests? #f)) ; no tests
8290 (home-page "https://github.com/foutaise/texttable/")
8291 (synopsis "Python module for creating simple ASCII tables")
8292 (description "Texttable is a Python module for creating simple ASCII
8293tables.")
8294 (license license:lgpl2.1+)))
8295
8296(define-public python2-texttable
8297 (package-with-python2 python-texttable))
8298
8299(define-public python-atomicwrites
8300 (package
8301 (name "python-atomicwrites")
8302 (version "1.1.5")
8303 (source (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "atomicwrites" version))
8306 (sha256
8307 (base32
8308 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8309 (build-system python-build-system)
8310 (synopsis "Atomic file writes in Python")
8311 (description "Library for atomic file writes using platform dependent tools
8312for atomic file system operations.")
8313 (home-page "https://github.com/untitaker/python-atomicwrites")
8314 (license license:expat)))
8315
8316(define-public python2-atomicwrites
8317 (package-with-python2 python-atomicwrites))
8318
8319(define-public python-click-threading
8320 (package
8321 (name "python-click-threading")
8322 (version "0.4.4")
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "click-threading" version))
8326 (sha256
8327 (base32
8328 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8329 (build-system python-build-system)
8330 (propagated-inputs
8331 `(("python-click" ,python-click)))
8332 (synopsis "Utilities for multithreading in Click")
8333 (description "This package provides utilities for multithreading in Click
8334applications.")
8335 (home-page "https://github.com/click-contrib/click-threading")
8336 (license license:expat)))
8337
8338(define-public python-click-log
8339 (package
8340 (name "python-click-log")
8341 (version "0.3.2")
8342 (source (origin
8343 (method url-fetch)
8344 (uri (pypi-uri "click-log" version))
8345 (sha256
8346 (base32
8347 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8348 (build-system python-build-system)
8349 (propagated-inputs
8350 `(("python-click" ,python-click)))
8351 (synopsis "Logging for click applications")
8352 (description "This package provides a Python library for logging Click
8353applications.")
8354 (home-page "https://github.com/click-contrib/click-log")
8355 (license license:expat)))
8356
8357(define-public python-apipkg
8358 (package
8359 (name "python-apipkg")
8360 (version "1.4")
8361 (source (origin
8362 (method url-fetch)
8363 (uri (pypi-uri "apipkg" version))
8364 (sha256
8365 (base32
8366 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8367 (build-system python-build-system)
8368 (native-inputs
8369 `(("python-pytest" ,python-pytest)))
8370 (synopsis "Namespace control and lazy-import mechanism")
8371 (description "With apipkg you can control the exported namespace of a Python
8372package and greatly reduce the number of imports for your users. It is a small
8373pure Python module that works on virtually all Python versions.")
8374 (home-page "https://github.com/pytest-dev/apipkg")
8375 (license license:expat)))
8376
8377(define-public python2-apipkg
8378 (package-with-python2 python-apipkg))
8379
8380(define-public python-execnet
8381 (package
8382 (name "python-execnet")
8383 (version "1.4.1")
8384 (source (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "execnet" version))
8387 (sha256
8388 (base32
8389 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8390 (build-system python-build-system)
8391 (arguments
8392 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8393 ;; The two test failures are caused by the lack of an `ssh` executable.
8394 ;; The test suite can be run with pytest after the 'install' phase.
8395 #:tests? #f))
8396 (native-inputs
8397 `(("python-pytest" ,python-pytest)
8398 ("python-setuptools-scm" ,python-setuptools-scm)))
8399 (propagated-inputs
8400 `(("python-apipkg" ,python-apipkg)))
8401 (synopsis "Rapid multi-Python deployment")
8402 (description "Execnet provides a share-nothing model with
8403channel-send/receive communication for distributing execution across many
8404Python interpreters across version, platform and network barriers. It has a
8405minimal and fast API targeting the following uses:
8406@enumerate
8407@item distribute tasks to (many) local or remote CPUs
8408@item write and deploy hybrid multi-process applications
8409@item write scripts to administer multiple environments
8410@end enumerate")
8411 (home-page "http://codespeak.net/execnet/")
8412 (license license:expat)))
8413
8414(define-public python2-execnet
8415 (package-with-python2 python-execnet))
8416
8417(define-public python-icalendar
8418 (package
8419 (name "python-icalendar")
8420 (version "4.0.3")
8421 (source (origin
8422 (method url-fetch)
8423 (uri (pypi-uri "icalendar" version))
8424 (sha256
8425 (base32
8426 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8427 (build-system python-build-system)
8428 (propagated-inputs
8429 `(("python-dateutil" ,python-dateutil)
8430 ("python-pytz" ,python-pytz)))
8431 (synopsis "Python library for parsing iCalendar files")
8432 (description "The icalendar package is a parser/generator of iCalendar
8433files for use with Python.")
8434 (home-page "https://github.com/collective/icalendar")
8435 (license license:bsd-2)))
8436
44d10b1f
RW
8437(define-public python-args
8438 (package
8439 (name "python-args")
8440 (version "0.1.0")
8441 (source (origin
8442 (method url-fetch)
8443 (uri (pypi-uri "args" version))
8444 (sha256
8445 (base32
8446 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8447 (build-system python-build-system)
8448 (home-page "https://github.com/kennethreitz/args")
8449 (synopsis "Command-line argument parser")
8450 (description
8451 "This library provides a Python module to parse command-line arguments.")
8452 (license license:bsd-3)))
8453
8454(define-public python2-args
8455 (package-with-python2 python-args))
8456
8457(define-public python-clint
8458 (package
8459 (name "python-clint")
8460 (version "0.5.1")
8461 (source (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "clint" version))
8464 (sha256
8465 (base32
8466 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8467 (build-system python-build-system)
8468 (arguments
8469 '(#:phases
8470 (modify-phases %standard-phases
8471 (replace 'check
8472 (lambda _ (invoke "py.test" "-v"))))))
8473 (native-inputs
8474 `(("python-pytest" ,python-pytest)))
8475 (propagated-inputs
8476 `(("python-args" ,python-args)))
8477 (home-page "https://github.com/kennethreitz/clint")
8478 (synopsis "Command-line interface tools")
8479 (description
8480 "Clint is a Python module filled with a set of tools for developing
8481command-line applications, including tools for colored and indented
8482output, progress bar display, and pipes.")
8483 (license license:isc)))
8484
8485(define-public python2-clint
8486 (package-with-python2 python-clint))
8487
44d10b1f
RW
8488(define-public python-rply
8489 (package
8490 (name "python-rply")
8491 (version "0.7.5")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "rply" version))
8495 (sha256
8496 (base32
8497 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8498 (build-system python-build-system)
8499 (propagated-inputs
8500 `(("python-appdirs" ,python-appdirs)))
8501 (home-page "https://github.com/alex/rply")
8502 (synopsis "Parser generator for Python")
8503 (description
8504 "This package provides a pure Python based parser generator, that also
8505works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8506with a new public API, and RPython support.")
8507 (license license:bsd-3)))
8508
8509(define-public python2-rply
8510 (package-with-python2 python-rply))
8511
8512(define-public python-hy
8513 (package
8514 (name "python-hy")
8515 (version "0.13.0")
8516 (source (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "hy" version))
8519 (sha256
8520 (base32
8521 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8522 (build-system python-build-system)
8523 (arguments
8524 '(#:phases
8525 (modify-phases %standard-phases
8526 (replace 'check
8527 (lambda _
8528 ;; Tests require write access to HOME.
8529 (setenv "HOME" "/tmp")
8530 (invoke "nosetests"))))))
8531 (native-inputs
8532 `(("python-coverage" ,python-coverage)
8533 ("python-nose" ,python-nose)))
8534 (propagated-inputs
8535 `(("python-astor" ,python-astor)
8536 ("python-clint" ,python-clint)
8537 ("python-rply" ,python-rply)))
8538 (home-page "http://hylang.org/")
8539 (synopsis "Lisp frontend to Python")
8540 (description
8541 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8542its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8543Python at your fingertips, in Lisp form.")
8544 (license license:expat)))
8545
8546(define-public python2-hy
8547 (package-with-python2 python-hy))
8548
8549(define-public python2-functools32
8550 (package
8551 (name "python2-functools32")
8552 (version "3.2.3-2")
8553 (source
8554 (origin
8555 (method url-fetch)
8556 (uri (pypi-uri "functools32" version))
8557 (sha256
8558 (base32
8559 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8560 (build-system python-build-system)
8561 (arguments
8562 `(#:python ,python-2
8563 #:tests? #f)) ; no test target
8564 (home-page "https://github.com/MiCHiLU/python-functools32")
8565 (synopsis
8566 "Backport of the functools module from Python 3.2.3")
8567 (description
8568 "This package is a backport of the @code{functools} module from Python
85693.2.3 for use with older versions of Python and PyPy.")
8570 (license license:expat)))
8571
8572(define-public python2-subprocess32
8573 (package
8574 (name "python2-subprocess32")
8575 (version "3.2.7")
8576 (source (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "subprocess32" version))
8579 (sha256
8580 (base32
8581 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8582 (patches
8583 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8584 (build-system python-build-system)
8585 (arguments
8586 `(#:python ,python-2
8587 ;; The test suite fails with Python > 2.7.13:
8588 ;; import test.support
8589 ;; ImportError: No module named support
8590 #:tests? #f
8591 #:phases
8592 (modify-phases %standard-phases
8593 (add-after 'unpack 'patch-/bin/sh
8594 (lambda _
8595 (substitute* '("subprocess32.py"
8596 "test_subprocess32.py")
8597 (("/bin/sh") (which "sh")))
8598 #t)))))
8599 (home-page "https://github.com/google/python-subprocess32")
8600 (synopsis "Backport of the subprocess module from Python 3.2")
8601 (description
8602 "This is a backport of the @code{subprocess} standard library module
8603from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8604new features. On POSIX systems it is guaranteed to be reliable when used
8605in threaded applications. It includes timeout support from Python 3.3 but
8606otherwise matches 3.2’s API.")
8607 (license license:psfl)))
8608
8609(define-public python2-futures
8610 (package
8611 (name "python2-futures")
8612 (version "3.2.0")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "futures" version))
8617 (sha256
8618 (base32
8619 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8620 (build-system python-build-system)
8621 (arguments `(#:python ,python-2
8622 ;; FIXME: Python 2.7.14 moved the test.support library,
8623 ;; but our package has not yet been adjusted. Enable
8624 ;; tests when the python2 package has been fixed.
8625 #:tests? #f))
8626 (home-page "https://github.com/agronholm/pythonfutures")
8627 (synopsis
8628 "Backport of the concurrent.futures package from Python 3.2")
8629 (description
8630 "The concurrent.futures module provides a high-level interface for
8631asynchronously executing callables. This package backports the
8632concurrent.futures package from Python 3.2")
8633 (license license:bsd-3)))
8634
8635(define-public python-promise
8636 (package
8637 (name "python-promise")
8638 (version "0.4.2")
8639 (source
8640 (origin
8641 (method url-fetch)
8642 (uri (pypi-uri "promise" version))
8643 (sha256
8644 (base32
8645 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8646 (build-system python-build-system)
8647 ;; Tests wants python-futures, which is a python2 only program, and
8648 ;; can't be found by python-promise at test time.
8649 (arguments `(#:tests? #f))
8650 (home-page "https://github.com/syrusakbary/promise")
8651 (synopsis "Promises/A+ implementation for Python")
8652 (description
8653 "Promises/A+ implementation for Python")
8654 (properties `((python2-variant . ,(delay python2-promise))))
8655 (license license:expat)))
8656
8657(define-public python2-promise
8658 (let ((promise (package-with-python2
8659 (strip-python2-variant python-promise))))
8660 (package (inherit promise)
8661 (arguments (substitute-keyword-arguments (package-arguments promise)
8662 ((#:tests? _) #t)))
8663 (native-inputs
8664 `(("python2-futures" ,python2-futures)
8665 ("python2-pytest" ,python2-pytest)
8666 ,@(package-native-inputs promise))))))
8667
d71d85cd
RW
8668(define-public python-progressbar33
8669 (package
8670 (name "python-progressbar33")
8671 (version "2.4")
8672 (source
8673 (origin
8674 (method url-fetch)
8675 (uri (pypi-uri "progressbar33" version))
8676 (sha256
8677 (base32
8678 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8679 (build-system python-build-system)
8680 (home-page "http://github.com/germangh/python-progressbar")
8681 (synopsis "Text progress bar library for Python")
8682 (description
8683 "This package provides a text progress bar library for Python. This
8684version only differs from the original @code{progressbar} package in that it
8685uses relative package imports instead of absolute imports, which is necessary
8686for the module to work under Python 3.3.")
8687 ;; Either or both of these licenses may be selected.
8688 (license (list license:lgpl2.1+ license:bsd-3))))
8689
44d10b1f
RW
8690(define-public python-colorama
8691 (package
8692 (name "python-colorama")
8693 (version "0.3.9")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (pypi-uri "colorama" version))
8698 (sha256
8699 (base32
8700 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8701 (build-system python-build-system)
8702 (synopsis "Colored terminal text rendering for Python")
8703 (description "Colorama is a Python library for rendering colored terminal
8704text.")
8705 (home-page "https://pypi.python.org/pypi/colorama")
8706 (license license:bsd-3)))
8707
8708(define-public python2-colorama
8709 (package-with-python2 python-colorama))
8710
8711(define-public python-rsa
8712 (package
8713 (name "python-rsa")
8714 (version "3.4.2")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "rsa" version))
8719 (sha256
8720 (base32
8721 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8722 (build-system python-build-system)
8723 (propagated-inputs
8724 `(("python-pyasn1" ,python-pyasn1)))
8725 (synopsis "Pure-Python RSA implementation")
8726 (description "Python-RSA is a pure-Python RSA implementation. It supports
8727encryption and decryption, signing and verifying signatures, and key
8728generation according to PKCS#1 version 1.5. It can be used as a Python
8729library as well as on the command line.")
8730 (home-page "https://stuvel.eu/rsa")
8731 (license license:asl2.0)))
8732
8733(define-public python2-rsa
8734 (package-with-python2 python-rsa))
8735
8736(define-public python-pluggy
8737 (package
8738 (name "python-pluggy")
8739 (version "0.7.1")
8740 (source
8741 (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "pluggy" version))
8744 (sha256
8745 (base32
8746 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
8747 (build-system python-build-system)
8748 (native-inputs
8749 `(("python-setuptools-scm" ,python-setuptools-scm)))
8750 (synopsis "Plugin and hook calling mechanism for Python")
8751 (description "Pluggy is an extraction of the plugin manager as used by
8752Pytest but stripped of Pytest specific details.")
8753 (home-page "https://pypi.python.org/pypi/pluggy")
8754 (license license:expat)))
8755
8756(define-public python2-pluggy
8757 (package-with-python2 python-pluggy))
8758
8759(define-public python-tox
8760 (package
8761 (name "python-tox")
8762 (version "2.8.1")
8763 (source
8764 (origin
8765 (method url-fetch)
8766 (uri (pypi-uri "tox" version))
8767 (sha256
8768 (base32
8769 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8770 (build-system python-build-system)
8771 (arguments
8772 ;; FIXME: Tests require pytest-timeout, which itself requires
8773 ;; pytest>=2.8.0 for installation.
8774 '(#:tests? #f))
8775 (propagated-inputs
8776 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8777 ("python-py" ,python-py)
8778 ("python-virtualenv" ,python-virtualenv)))
8779 (native-inputs
8780 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8781 ("python-pytest" ,python-pytest) ; >= 2.3.5
8782 ("python-setuptools-scm" ,python-setuptools-scm)))
8783 (home-page "http://tox.testrun.org/")
8784 (synopsis "Virtualenv-based automation of test activities")
8785 (description "Tox is a generic virtualenv management and test command line
8786tool. It can be used to check that a package installs correctly with
8787different Python versions and interpreters, or run tests in each type of
8788supported environment, or act as a frontend to continuous integration
8789servers.")
8790 (license license:expat)))
8791
8792(define-public python2-tox
8793 (package-with-python2 python-tox))
8794
8795(define-public python-jmespath
8796 (package
8797 (name "python-jmespath")
8798 (version "0.9.3")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "jmespath" version))
8803 (sha256
8804 (base32
8805 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8806 (build-system python-build-system)
8807 (native-inputs
8808 `(("python-nose" ,python-nose)))
8809 (synopsis "JSON Matching Expressions")
8810 (description "JMESPath (pronounced “james path”) is a Python library that
8811allows one to declaratively specify how to extract elements from a JSON
8812document.")
8813 (home-page "https://github.com/jmespath/jmespath.py")
8814 (license license:expat)))
8815
8816(define-public python2-jmespath
8817 (package-with-python2 python-jmespath))
8818
8819(define-public python-botocore
8820 (package
7bcf827c
RW
8821 (name "python-botocore")
8822 (version "1.12.149")
8823 (source
8824 (origin
8825 (method url-fetch)
8826 (uri (pypi-uri "botocore" version))
8827 (sha256
8828 (base32
8829 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8830 (build-system python-build-system)
8831 (arguments
8832 ;; FIXME: Many tests are failing.
8833 '(#:tests? #f))
8834 (propagated-inputs
8835 `(("python-dateutil" ,python-dateutil)
8836 ("python-docutils" ,python-docutils)
8837 ("python-jmespath" ,python-jmespath)))
8838 (native-inputs
8839 `(("python-mock" ,python-mock)
8840 ("python-nose" ,python-nose)
8841 ("behave" ,behave)
8842 ("python-tox" ,python-tox)
8843 ("python-urllib3" ,python-urllib3)
8844 ("python-wheel" ,python-wheel)))
8845 (home-page "https://github.com/boto/botocore")
8846 (synopsis "Low-level interface to AWS")
8847 (description "Botocore is a Python library that provides a low-level
44d10b1f 8848interface to the Amazon Web Services (AWS) API.")
7bcf827c 8849 (license license:asl2.0)))
44d10b1f
RW
8850
8851(define-public python2-botocore
8852 (package-with-python2 python-botocore))
8853
8854(define-public python-xdo
8855 (package
8856 (name "python-xdo")
8857 (version "0.3")
8858 (source (origin
8859 (method url-fetch)
8860 (uri (string-append
8861 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8862 "python-xdo_" version ".orig.tar.gz"))
8863 (sha256
8864 (base32
8865 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8866 (build-system python-build-system)
8867 (arguments
8868 '(#:phases
8869 (modify-phases %standard-phases
8870 (add-before 'install 'patch-libxdo-path
8871 ;; Hardcode the path of dynamically loaded libxdo library.
8872 (lambda* (#:key inputs #:allow-other-keys)
8873 (let ((libxdo (string-append
8874 (assoc-ref inputs "xdotool")
8875 "/lib/libxdo.so")))
8876 (substitute* "xdo/_xdo.py"
8877 (("find_library\\(\"xdo\"\\)")
8878 (simple-format #f "\"~a\"" libxdo)))
8879 #t))))
8880 #:tests? #f)) ; no tests provided
8881 (propagated-inputs
8882 `(("python-six" ,python-six)))
8883 (inputs
8884 `(("xdotool" ,xdotool)
8885 ("libX11" ,libx11)))
8886 (home-page "https://tracker.debian.org/pkg/python-xdo")
8887 (synopsis "Python library for simulating X11 keyboard/mouse input")
8888 (description "Provides bindings to libxdo for manipulating X11 via simulated
8889input. (Note that this is mostly a legacy library; you may wish to look at
8890python-xdo for newer bindings.)")
8891 (license license:bsd-3)))
8892
8893(define-public python2-xdo
8894 (package-with-python2 python-xdo))
8895
8896(define-public python-mako
8897 (package
8898 (name "python-mako")
6bf53ad5 8899 (version "1.1.0")
44d10b1f
RW
8900 (source
8901 (origin
8902 (method url-fetch)
8903 (uri (pypi-uri "Mako" version))
8904 (sha256
8905 (base32
6bf53ad5 8906 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8907 (build-system python-build-system)
6bf53ad5
MB
8908 (arguments
8909 `(#:phases (modify-phases %standard-phases
8910 (replace 'check
8911 (lambda _
8912 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8913 (propagated-inputs
8914 `(("python-markupsafe" ,python-markupsafe)))
8915 (native-inputs
8916 `(("python-mock" ,python-mock)
44d10b1f 8917 ("python-pytest" ,python-pytest)))
7016e620 8918 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8919 (synopsis "Templating language for Python")
8920 (description "Mako is a templating language for Python that compiles
8921templates into Python modules.")
8922 (license license:expat)))
8923
8924(define-public python2-mako
8925 (package-with-python2 python-mako))
8926
8927(define-public python-waitress
8928 (package
8929 (name "python-waitress")
8930 (version "1.1.0")
8931 (source
8932 (origin
8933 (method url-fetch)
8934 (uri (pypi-uri "waitress" version))
8935 (patches (search-patches "python-waitress-fix-tests.patch"))
8936 (sha256
8937 (base32
8938 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8939 (build-system python-build-system)
8940 (home-page "https://github.com/Pylons/waitress")
8941 (synopsis "Waitress WSGI server")
8942 (description "Waitress is meant to be a production-quality pure-Python WSGI
8943server with very acceptable performance.")
8944 (license license:zpl2.1)))
8945
8946(define-public python2-waitress
8947 (package-with-python2 python-waitress))
8948
8949(define-public python-pyquery
8950 (package
8951 (name "python-pyquery")
8952 (version "1.2.17")
8953 (source
8954 (origin
8955 (method url-fetch)
8956 (uri (pypi-uri "pyquery" version))
8957 (sha256
8958 (base32
8959 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8960 (build-system python-build-system)
8961 (native-inputs
8962 `(("python-webob" ,python-webob)
8963 ("python-webtest" ,python-webtest)))
8964 (propagated-inputs
8965 `(("python-lxml" ,python-lxml)
8966 ("python-cssselect" ,python-cssselect)))
8967 (home-page "https://github.com/gawel/pyquery")
8968 (synopsis "Make jQuery-like queries on xml documents")
8969 (description "pyquery allows you to make jQuery queries on xml documents.
8970The API is as much as possible the similar to jQuery. pyquery uses lxml for
8971fast xml and html manipulation.")
8972 (license license:bsd-3)))
8973
44d10b1f
RW
8974(define-public python-anyjson
8975 (package
8976 (name "python-anyjson")
8977 (version "0.3.3")
8978 (source
8979 (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "anyjson" version))
8982 (sha256
8983 (base32
8984 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8985 (build-system python-build-system)
8986 (arguments
8987 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8988 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8989 ;; whatever) so this transformation needs to be done before the tests
8990 ;; can be run. Maybe we could add a build step to transform beforehand
8991 ;; but it could be annoying/difficult.
8992 ;; We can enable tests for the Python 2 version, though, and do below.
8993 #:tests? #f))
8994 (home-page "https://bitbucket.org/runeh/anyjson/")
8995 (synopsis
8996 "Wraps best available JSON implementation in a common interface")
8997 (description
8998 "Anyjson loads whichever is the fastest JSON module installed
8999and provides a uniform API regardless of which JSON implementation is used.")
9000 (license license:bsd-3)
9001 (properties `((python2-variant . ,(delay python2-anyjson))))))
9002
9003(define-public python2-anyjson
9004 (let ((anyjson (package-with-python2
9005 (strip-python2-variant python-anyjson))))
9006 (package
9007 (inherit anyjson)
9008 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9009 #:tests? #t
9010 ,@(package-arguments anyjson)))
9011 (native-inputs `(("python2-nose" ,python2-nose))))))
9012
9013(define-public python-amqp
9014 (package
9015 (name "python-amqp")
9016 (version "2.3.2")
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "amqp" version))
9021 (sha256
9022 (base32
9023 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9024 (build-system python-build-system)
9025 (native-inputs
9026 `(("python-case" ,python-case)
9027 ("python-pytest-sugar" ,python-pytest-sugar)
9028 ("python-mock" ,python-mock)))
9029 (propagated-inputs
9030 `(("python-vine" ,python-vine)))
9031 (home-page "https://github.com/celery/py-amqp")
9032 (synopsis
9033 "Low-level AMQP client for Python (fork of amqplib)")
9034 (description
9035 "This is a fork of amqplib which was originally written by Barry Pederson.
9036It is maintained by the Celery project, and used by kombu as a pure python
9037alternative when librabbitmq is not available.")
9038 (license license:lgpl2.1+)
9039 (properties `((python2-variant . ,(delay python2-amqp))))))
9040
9041(define-public python2-amqp
9042 (let ((amqp (package-with-python2
9043 (strip-python2-variant python-amqp))))
9044 (package
9045 (inherit amqp)
9046 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9047 ;; unmaintained. Weirdly, does not do this on the python 3
9048 ;; version?
9049 #:tests? #f
9050 ,@(package-arguments amqp))))))
9051
9052(define-public python-txamqp
9053 (package
9054 (name "python-txamqp")
9055 (version "0.8.2")
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "txAMQP" version))
9060 (sha256
9061 (base32
9062 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9063 (build-system python-build-system)
9064 (propagated-inputs
9065 `(("python-six" ,python-six)
9066 ("python-twisted" ,python-twisted)))
9067 (home-page "https://github.com/txamqp/txamqp")
9068 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9069 (description
9070 "This package provides a Python library for communicating with AMQP peers
9071and brokers using the asynchronous networking framework Twisted. It contains
9072all the necessary code to connect, send and receive messages to/from an
9073AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9074also includes support for using Thrift RPC over AMQP in Twisted
9075applications.")
9076 (license license:asl2.0)))
9077
9078(define-public python2-txamqp
9079 (package-with-python2 python-txamqp))
9080
9081(define-public python-kombu
9082 (package
9083 (name "python-kombu")
9084 (version "4.2.2")
9085 (source
9086 (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "kombu" version))
9089 (sha256
9090 (base32
9091 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9092 (build-system python-build-system)
9093 (native-inputs
9094 `(("python-mock" ,python-mock)
9095 ("python-case" ,python-case)
9096 ("python-pyro4" ,python-pyro4)
9097 ("python-pytest-sugar" ,python-pytest-sugar)
9098 ("python-pytz" ,python-pytz)))
9099 (propagated-inputs
9100 `(("python-anyjson" ,python-anyjson)
9101 ("python-amqp" ,python-amqp)
9102 ("python-redis" ,python-redis)))
9103 (home-page "https://kombu.readthedocs.io")
9104 (synopsis "Message passing library for Python")
9105 (description "The aim of Kombu is to make messaging in Python as easy as
9106possible by providing an idiomatic high-level interface for the AMQ protocol,
9107and also provide proven and tested solutions to common messaging problems.
9108AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9109message orientation, queuing, routing, reliability and security, for which the
9110RabbitMQ messaging server is the most popular implementation.")
9111 (license license:bsd-3)
9112 (properties `((python2-variant . ,(delay python2-kombu))))))
9113
9114(define-public python2-kombu
9115 (let ((kombu (package-with-python2
9116 (strip-python2-variant python-kombu))))
9117 (package
9118 (inherit kombu)
9119 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9120 ;; It works fine on the python3 variant.
9121 #:tests? #f
9122 ,@(package-arguments kombu)))
9123 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9124 ,@(package-native-inputs kombu))))))
9125
9126(define-public python-billiard
9127 (package
9128 (name "python-billiard")
9129 (version "3.5.0.5")
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "billiard" version))
9134 (sha256
9135 (base32
9136 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9137 (build-system python-build-system)
9138 (native-inputs
9139 `(("python-case" ,python-case)
9140 ("python-pytest" ,python-pytest)))
9141 (home-page "https://github.com/celery/billiard")
9142 (synopsis
9143 "Python multiprocessing fork with improvements and bugfixes")
9144 (description
9145 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9146multiprocessing package itself is a renamed and updated version of R Oudkerk's
9147pyprocessing package. This standalone variant is intended to be compatible with
9148Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9149 (license license:bsd-3)
9150 (properties `((python2-variant . ,(delay python2-billiard))))))
9151
9152(define-public python2-billiard
9153 (let ((billiard (package-with-python2
9154 (strip-python2-variant python-billiard))))
9155 (package
9156 (inherit billiard)
9157 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9158 ("python2-mock" ,python2-mock)
9159 ,@(package-native-inputs billiard))))))
9160
9161(define-public python-celery
9162 (package
9163 (name "python-celery")
9164 (version "4.2.1")
9165 (source
9166 (origin
9167 (method url-fetch)
9168 (uri (pypi-uri "celery" version))
9169 (sha256
9170 (base32
9171 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9172 (build-system python-build-system)
9173 (arguments
9174 '(;; TODO The tests fail with Python 3.7
9175 ;; https://github.com/celery/celery/issues/4849
9176 #:tests? #f
9177 #:phases
9178 (modify-phases %standard-phases
9179 (add-after 'unpack 'patch-requirements
9180 (lambda _
9181 (substitute* "requirements/test.txt"
9182 (("pytest>=3\\.0,<3\\.3")
9183 "pytest>=3.0"))
9184 #t)))))
9185 (native-inputs
9186 `(("python-case" ,python-case)
9187 ("python-pytest" ,python-pytest)))
9188 (propagated-inputs
9189 `(("python-pytz" ,python-pytz)
9190 ("python-billiard" ,python-billiard)
9191 ("python-kombu" ,python-kombu)))
9192 (home-page "https://celeryproject.org")
9193 (synopsis "Distributed Task Queue")
9194 (description "Celery is an asynchronous task queue/job queue based on
9195distributed message passing. It is focused on real-time operation, but
9196supports scheduling as well. The execution units, called tasks, are executed
9197concurrently on a single or more worker servers using multiprocessing,
9198Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9199synchronously (wait until ready).")
9200 (license license:bsd-3)
9201 (properties `((python2-variant . ,(delay python2-celery))))))
9202
9203(define-public python2-celery
9204 (let ((celery (package-with-python2
9205 (strip-python2-variant python-celery))))
9206 (package
9207 (inherit celery)
9208 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9209 ("python2-mock" ,python2-mock)
9210 ,@(package-native-inputs celery))))))
9211
9212(define-public python-translitcodec
9213 (package
9214 (name "python-translitcodec")
9215 (version "0.4.0")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "translitcodec" version))
9220 (sha256
9221 (base32
9222 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9223 (build-system python-build-system)
9224 (arguments
9225 `(#:tests? #f)) ; no tests provided
9226 (home-page
9227 "https://github.com/claudep/translitcodec")
9228 (synopsis
9229 "Unicode to 8-bit charset transliteration codec")
9230 (description
9231 "This package contains codecs for transliterating ISO 10646 texts into
9232best-effort representations using smaller coded character sets (ASCII,
9233ISO 8859, etc.).")
9234 (license license:expat)))
9235
9236(define-public python2-translitcodec
9237 (package-with-python2 python-translitcodec))
9238
9239(define-public python-editor
9240 (package
9241 (name "python-editor")
9242 (version "0.5")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "python-editor" version))
9247 (sha256
9248 (base32
9249 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9250 (build-system python-build-system)
9251 (home-page
9252 "https://github.com/fmoo/python-editor")
9253 (synopsis
9254 "Programmatically open an editor, capture the result")
9255 (description
9256 "python-editor is a library that provides the editor module for
9257programmatically interfacing with your system's $EDITOR.")
9258 (license license:asl2.0)))
9259
9260(define-public python2-editor
9261 (package-with-python2 python-editor))
9262
44d10b1f
RW
9263(define-public python-vobject
9264 (package
9265 (name "python-vobject")
9266 (version "0.9.5")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "vobject" version))
9270 (sha256
9271 (base32
9272 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9273 (build-system python-build-system)
9274 (arguments
9275 '(;; The test suite relies on some non-portable Windows interfaces.
9276 #:tests? #f))
9277 (propagated-inputs
9278 `(("python-dateutil" ,python-dateutil)
9279 ("python-pyicu" ,python-pyicu)))
9280 (synopsis "Parse and generate vCard and vCalendar files")
9281 (description "Vobject is intended to be a full featured Python package for
9282parsing and generating vCard and vCalendar files. Currently, iCalendar files
9283are supported and well tested. vCard 3.0 files are supported, and all data
9284should be imported, but only a few components are understood in a sophisticated
9285way.")
9286 (home-page "http://eventable.github.io/vobject/")
9287 (license license:asl2.0)))
9288
9289(define-public python2-vobject
9290 (package-with-python2 python-vobject))
9291
9292(define-public python-munkres
9293 (package
9294 (name "python-munkres")
9295 (version "1.0.8")
9296 (source (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "munkres" version))
9299 (sha256
9300 (base32
9301 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9302 (build-system python-build-system)
9303 (arguments
9304 '(#:tests? #f)) ; no test suite
9305 (home-page "http://software.clapper.org/munkres/")
9306 (synopsis "Implementation of the Munkres algorithm")
9307 (description "The Munkres module provides an implementation of the Munkres
9308algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9309useful for solving the Assignment Problem.")
9310 (license license:bsd-3)))
9311
9312(define-public python2-munkres
9313 (package-with-python2 python-munkres))
9314
9315(define-public python-whoosh
9316 (package
9317 (name "python-whoosh")
9318 (version "2.7.4")
9319 (source
9320 (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "Whoosh" version))
9323 (sha256
9324 (base32
9325 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9326 (build-system python-build-system)
9327 (native-inputs
9328 `(("python-pytest" ,python-pytest)))
9329 (home-page "https://bitbucket.org/mchaput/whoosh")
9330 (synopsis "Full text indexing, search, and spell checking library")
9331 (description
9332 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9333checking library.")
9334 (license license:bsd-2)))
9335
9336(define-public python2-whoosh
9337 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9338 (package (inherit whoosh)
9339 (propagated-inputs
9340 `(("python2-backport-ssl-match-hostname"
9341 ,python2-backport-ssl-match-hostname)
9342 ,@(package-propagated-inputs whoosh))))))
9343
9344(define-public python-pathlib
9345 (package
9346 (name "python-pathlib")
9347 (version "1.0.1")
9348 (source (origin
9349 (method url-fetch)
9350 (uri (pypi-uri "pathlib" version))
9351 (sha256
9352 (base32
9353 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9354 (build-system python-build-system)
9355 ;; The tests depend on the internal "test" module, which does not provide
9356 ;; a stable interface.
9357 (arguments `(#:tests? #f))
9358 (home-page "https://pathlib.readthedocs.org/")
9359 (synopsis "Object-oriented file system paths")
9360 (description "Pathlib offers a set of classes to handle file system paths.
9361It offers the following advantages over using string objects:
9362
9363@enumerate
9364@item No more cumbersome use of os and os.path functions. Everything can
9365be done easily through operators, attribute accesses, and method calls.
9366@item Embodies the semantics of different path types. For example,
9367comparing Windows paths ignores casing.
9368@item Well-defined semantics, eliminating any inconsistencies or
9369ambiguities (forward vs. backward slashes, etc.).
9370@end enumerate
9371
9372Note: In Python 3.4, pathlib is now part of the standard library. For other
9373Python versions please consider python-pathlib2 instead, which tracks the
9374standard library module. This module (python-pathlib) isn't maintained
9375anymore.")
9376 (license license:expat)))
9377
9378(define-public python2-pathlib
9379 (package-with-python2 python-pathlib))
9380
9381(define-public python2-pathlib2
9382 (package
9383 (name "python2-pathlib2")
9384 (version "2.3.2")
9385 (source (origin
9386 (method url-fetch)
9387 (uri (pypi-uri "pathlib2" version))
9388 (sha256
9389 (base32
9390 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
9391 (build-system python-build-system)
9392 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9393 ;; version is 3.4 which already includes this package as part of the
9394 ;; standard library.
9395 (arguments
9396 `(#:python ,python-2))
9397 (propagated-inputs
9398 `(("python2-scandir" ,python2-scandir)
9399 ("python2-six" ,python2-six)))
9400 (home-page "https://pypi.python.org/pypi/pathlib2/")
9401 (synopsis "Object-oriented file system paths - backport of standard
9402pathlib module")
9403 (description "The goal of pathlib2 is to provide a backport of standard
9404pathlib module which tracks the standard library module, so all the newest
9405features of the standard pathlib can be used also on older Python versions.
9406
9407Pathlib offers a set of classes to handle file system paths. It offers the
9408following advantages over using string objects:
9409
9410@enumerate
9411@item No more cumbersome use of os and os.path functions. Everything can
9412be done easily through operators, attribute accesses, and method calls.
9413@item Embodies the semantics of different path types. For example,
9414comparing Windows paths ignores casing.
9415@item Well-defined semantics, eliminating any inconsistencies or
9416ambiguities (forward vs. backward slashes, etc.).
9417@end enumerate")
9418 (license license:expat)))
9419
9420(define-public python2-pathlib2-bootstrap
9421 (hidden-package
9422 (package
9423 (inherit python2-pathlib2)
9424 (name "python2-pathlib2-bootstrap")
9425 (propagated-inputs
9426 `(("python2-scandir" ,python2-scandir)
9427 ("python2-six" ,python2-six-bootstrap))))))
9428
9429(define-public python-jellyfish
9430 (package
9431 (name "python-jellyfish")
9432 (version "0.5.6")
9433 (source (origin
9434 (method url-fetch)
9435 (uri (pypi-uri "jellyfish" version))
9436 (sha256
9437 (base32
9438 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9439 (build-system python-build-system)
9440 (native-inputs
9441 `(("python-pytest" ,python-pytest)))
9442 (home-page "https://github.com/jamesturk/jellyfish")
9443 (synopsis "Approximate and phonetic matching of strings")
9444 (description "Jellyfish uses a variety of string comparison and phonetic
9445encoding algorithms to do fuzzy string matching.")
9446 (license license:bsd-2)
9447 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9448
9449(define-public python2-jellyfish
9450 (let ((jellyfish (package-with-python2
9451 (strip-python2-variant python-jellyfish))))
9452 (package (inherit jellyfish)
9453 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9454 ,@(package-native-inputs jellyfish))))))
9455
9456(define-public python2-unicodecsv
9457 (package
9458 (name "python2-unicodecsv")
9459 (version "0.14.1")
9460 (source (origin
9461 (method url-fetch)
9462 ;; The test suite is not included in the PyPi release.
9463 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9464 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9465 "archive/" version ".tar.gz"))
9466 (file-name (string-append name "-" version ".tar.gz"))
9467 (sha256
9468 (base32
9469 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9470 (build-system python-build-system)
9471 (arguments
9472 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9473 #:python ,python-2))
9474 (native-inputs
9475 `(("python2-unittest2" ,python2-unittest2)))
9476 (home-page "https://github.com/jdunck/python-unicodecsv")
9477 (synopsis "Unicode CSV module for Python 2")
9478 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9479module, adding support for Unicode strings.")
9480 (license license:bsd-2)))
9481
9482(define-public python-rarfile
9483 (package
9484 (name "python-rarfile")
9485 (version "2.8")
9486 (source (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "rarfile" version))
9489 (sha256
9490 (base32
9491 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9492 (build-system python-build-system)
9493 (arguments
9494 '(#:phases
9495 (modify-phases %standard-phases
9496 (replace 'check
9497 ;; Many tests fail, but the installation proceeds.
e59dd341 9498 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9499 (native-inputs
9500 `(("which" ,which))) ; required for tests
9501 (propagated-inputs
9502 `(("libarchive" ,libarchive)))
9503 (home-page "https://github.com/markokr/rarfile")
9504 (synopsis "RAR archive reader for Python")
9505 (description "This is Python module for RAR archive reading. The interface
9506is made as zipfile like as possible.")
9507 (license license:isc)))
9508
9509(define-public python2-rarfile
9510 (package-with-python2 python-rarfile))
9511
9512(define-public python-magic
9513 (package
9514 (name "python-magic")
9515 (version "0.4.15")
9516 (source
9517 (origin
9518 (method url-fetch)
9519 (uri (pypi-uri "python-magic" version))
9520 (sha256
9521 (base32
9522 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9523 (file-name (string-append name "-" version "-checkout"))))
9524 (build-system python-build-system)
9525 (arguments
9526 ;; The tests are unreliable, so don't run them. The tests fail
9527 ;; under Python3 because they were written for Python2 and
9528 ;; contain import statements that do not work in Python3. One of
9529 ;; the tests fails under Python2 because its assertions are
9530 ;; overly stringent; it relies on comparing output strings which
9531 ;; are brittle and can change depending on the version of
9532 ;; libmagic being used and the system on which the test is
9533 ;; running. In my case, under GuixSD 0.10.0, only one test
9534 ;; failed, and it seems to have failed only because the version
9535 ;; of libmagic that is packaged in Guix outputs a slightly
9536 ;; different (but not wrong) string than the one that the test
9537 ;; expected.
9538 '(#:tests? #f
9539 #:phases (modify-phases %standard-phases
9540 ;; Replace a specific method call with a hard-coded
9541 ;; path to the necessary libmagic.so file in the
9542 ;; store. If we don't do this, then the method call
9543 ;; will fail to find the libmagic.so file, which in
9544 ;; turn will cause any application using
9545 ;; python-magic to fail.
9546 (add-before 'build 'hard-code-path-to-libmagic
9547 (lambda* (#:key inputs #:allow-other-keys)
9548 (let ((file (assoc-ref inputs "file")))
9549 (substitute* "magic.py"
9550 (("ctypes.util.find_library\\('magic'\\)")
9551 (string-append "'" file "/lib/libmagic.so'")))
9552 #t)))
9553 (add-before 'install 'disable-egg-compression
9554 (lambda _
9555 (let ((port (open-file "setup.cfg" "a")))
9556 (display "\n[easy_install]\nzip_ok = 0\n"
9557 port)
9558 (close-port port)
9559 #t))))))
9560 (inputs
9561 ;; python-magic needs to be able to find libmagic.so.
9562 `(("file" ,file)))
9563 (home-page
9564 "https://github.com/ahupp/python-magic")
9565 (synopsis
9566 "File type identification using libmagic")
9567 (description
9568 "This module uses ctypes to access the libmagic file type
9569identification library. It makes use of the local magic database and
9570supports both textual and MIME-type output. Note that this module and
9571the python-file module both provide a \"magic.py\" file; these two
9572modules, which are different and were developed separately, both serve
9573the same purpose: to provide Python bindings for libmagic.")
9574 (license license:expat)))
9575
9576(define-public python2-magic
9577 (package-with-python2 python-magic))
9578
9579(define-public python2-s3cmd
9580 (package
9581 (name "python2-s3cmd")
9582 (version "1.6.1")
9583 (source
9584 (origin
9585 (method url-fetch)
9586 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9587 "s3cmd-" version ".tar.gz"))
9588 (sha256
9589 (base32
9590 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9591 (build-system python-build-system)
9592 (arguments
9593 ;; s3cmd is written for python2 only and contains no tests.
9594 `(#:python ,python-2
9595 #:tests? #f))
9596 (propagated-inputs
9597 `(("python2-dateutil" ,python2-dateutil)
9598 ;; The python-file package also provides a magic.py module.
9599 ;; This is an unfortunate state of affairs; however, s3cmd
9600 ;; fails to install if it cannot find specifically the
9601 ;; python-magic package. Thus we include it, instead of using
9602 ;; python-file. Ironically, s3cmd sometimes works better
9603 ;; without libmagic bindings at all:
9604 ;; https://github.com/s3tools/s3cmd/issues/198
9605 ("python2-magic" ,python2-magic)))
9606 (home-page "http://s3tools.org/s3cmd")
9607 (synopsis "Command line tool for S3-compatible storage services")
9608 (description
9609 "S3cmd is a command line tool for uploading, retrieving and managing data
9610in storage services that are compatible with the Amazon Simple Storage
9611Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9612GnuPG encryption, and more. It also supports management of Amazon's
9613CloudFront content delivery network.")
9614 (license license:gpl2+)))
9615
9616(define-public python-pkgconfig
9617 (package
9618 (name "python-pkgconfig")
9619 (version "1.3.1")
9620 (source
9621 (origin
9622 (method url-fetch)
9623 (uri (pypi-uri "pkgconfig" version))
9624 (sha256
9625 (base32
9626 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9627 (build-system python-build-system)
9628 (native-inputs
9629 `(("python-nose" ,python-nose)))
9630 (inputs
9631 `(("pkg-config" ,pkg-config)))
9632 (arguments
9633 `(#:phases
9634 (modify-phases %standard-phases
9635 (add-before 'build 'patch
9636 ;; Hard-code the path to pkg-config.
9637 (lambda _
9638 (substitute* "pkgconfig/pkgconfig.py"
9639 (("cmd = 'pkg-config")
9640 (string-append "cmd = '" (which "pkg-config"))))
9641 #t))
9642 (replace 'check
9643 (lambda _
9644 (invoke "nosetests" "test.py"))))))
9645 (home-page "https://github.com/matze/pkgconfig")
9646 (synopsis "Python interface for pkg-config")
9647 (description "This module provides a Python interface to pkg-config. It
9648can be used to find all pkg-config packages, check if a package exists,
9649check if a package meets certain version requirements, query CFLAGS and
9650LDFLAGS and parse the output to build extensions with setup.py.")
9651 (license license:expat)))
9652
9653(define-public python2-pkgconfig
9654 (package-with-python2 python-pkgconfig))
9655
9656(define-public python-bz2file
9657 (package
9658 (name "python-bz2file")
9659 (version "0.98")
9660 (source
9661 (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "bz2file" version))
9664 (sha256
9665 (base32
9666 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9667 (build-system python-build-system)
9668 (arguments
9669 `(#:tests? #f)) ; Tests use deprecated python modules.
9670 (home-page "https://github.com/nvawda/bz2file")
9671 (synopsis "Read and write bzip2-compressed files")
9672 (description
9673 "Bz2file is a Python library for reading and writing bzip2-compressed
9674files. It contains a drop-in replacement for the I/O interface in the
9675standard library's @code{bz2} module, including features from the latest
9676development version of CPython that are not available in older releases.")
9677 (license license:asl2.0)))
9678
9679(define-public python2-bz2file
9680 (package-with-python2 python-bz2file))
9681
9682(define-public python-future
9683 (package
9684 (name "python-future")
d5d54030 9685 (version "0.17.1")
44d10b1f
RW
9686 (source
9687 (origin
9688 (method url-fetch)
9689 (uri (pypi-uri "future" version))
9690 (sha256
9691 (base32
d5d54030 9692 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9693 (build-system python-build-system)
9694 ;; Many tests connect to the network or are otherwise flawed.
9695 ;; https://github.com/PythonCharmers/python-future/issues/210
9696 (arguments
9697 `(#:tests? #f))
9698 (home-page "http://python-future.org")
9699 (synopsis "Single-source support for Python 3 and 2")
9700 (description
9701 "@code{python-future} is the missing compatibility layer between Python 2 and
9702Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9703to support both Python 2 and Python 3 with minimal overhead.")
9704 (license license:expat)))
9705
9706(define-public python2-future
9707 (package-with-python2 python-future))
9708
9709(define-public python-cysignals
9710 (package
9711 (name "python-cysignals")
8e3e51df 9712 (version "1.9.0")
44d10b1f
RW
9713 (source
9714 (origin
9715 (method url-fetch)
8e3e51df 9716 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9717 (sha256
9718 (base32
8e3e51df 9719 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9720 (build-system python-build-system)
9721 (native-inputs
9722 `(("python-cython" ,python-cython)
9723 ("python-sphinx" ,python-sphinx)))
9724 (inputs
9725 `(("pari-gp" ,pari-gp)))
9726 (arguments
9727 `(#:modules ((guix build python-build-system)
9728 ((guix build gnu-build-system) #:prefix gnu:)
9729 (guix build utils))
9730 ;; FIXME: Tests are executed after installation and currently fail
9731 ;; when not installing into standard locations; the author is working
9732 ;; on a fix.
9733 #:tests? #f
9734 #:phases
9735 (modify-phases %standard-phases
9736 (add-before
9737 'build 'configure
9738 (assoc-ref gnu:%standard-phases 'configure)))))
9739 (home-page
9740 "https://github.com/sagemath/cysignals")
9741 (synopsis
9742 "Handling of interrupts and signals for Cython")
9743 (description
9744 "The cysignals package provides mechanisms to handle interrupts (and
9745other signals and errors) in Cython code, using two related approaches,
9746for mixed Cython/Python code or external C libraries and pure Cython code,
9747respectively.")
9748 (license license:lgpl3+)))
9749
9750(define-public python2-cysignals
9751 (package-with-python2 python-cysignals))
9752
9753(define-public python2-shedskin
9754 (package
9755 (name "python2-shedskin")
9756 (version "0.9.4")
9757 (source
9758 (origin
9759 (method url-fetch)
9760 (uri (string-append "https://github.com/shedskin/shedskin/"
9761 "releases/download/v" version
9762 "/shedskin-" version ".tgz"))
9763 (sha256
9764 (base32
9765 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9766 (build-system python-build-system)
9767 (arguments
9768 `(#:python ,python-2
9769 #:phases (modify-phases %standard-phases
9770 (add-after 'unpack 'fix-resulting-include-libs
9771 (lambda* (#:key inputs #:allow-other-keys)
9772 (let ((libgc (assoc-ref inputs "libgc"))
9773 (pcre (assoc-ref inputs "pcre")))
9774 (substitute* "shedskin/makefile.py"
9775 (("variable == 'CCFLAGS':[ ]*")
9776 (string-append "variable == 'CCFLAGS':\n"
9777 " line += ' -I " pcre "/include"
9778 " -I " libgc "/include'"))
9779 (("variable == 'LFLAGS':[ ]*")
9780 (string-append "variable == 'LFLAGS':\n"
9781 " line += ' -L" pcre "/lib"
9782 " -L " libgc "/lib'")))
9783 #t))))))
9784 (inputs `(("pcre" ,pcre)
9785 ("libgc" ,libgc)))
9786 (home-page "https://shedskin.github.io/")
9787 (synopsis "Experimental Python-2 to C++ Compiler")
9788 (description (string-append "This is an experimental compiler for a subset of
9789Python. It generates C++ code and a Makefile."))
9790 (license (list license:gpl3 license:bsd-3 license:expat))))
9791
9792(define-public python2-rope
9793 (package
9794 (name "python2-rope")
a9ba0a31 9795 (version "0.11.0")
44d10b1f
RW
9796 (source
9797 (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "rope" version))
9800 (sha256
9801 (base32
a9ba0a31 9802 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9803 (arguments
afb29715 9804 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9805 `(#:python ,python-2))
9806 (build-system python-build-system)
9807 (native-inputs
9808 `(("python2-unittest2" ,python2-unittest2)))
9809 (home-page "https://github.com/python-rope/rope")
9810 (synopsis "Refactoring library for Python")
9811 (description "Rope is a refactoring library for Python. It facilitates
9812the renaming, moving and extracting of attributes, functions, modules, fields
9813and parameters in Python 2 source code. These refactorings can also be applied
9814to occurrences in strings and comments.")
9815 (license license:gpl2)))
9816
2c880ef4
LC
9817(define-public python-rope
9818 (package
9819 (inherit python2-rope)
9820 (name "python-rope")
9821 (arguments `(#:python ,python-wrapper
9822 ;; XXX: Only partial python3 support, results in some failing
9823 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9824 #:tests? #f))
9825 (properties `((python2-variant . ,(delay python2-rope))))))
9826
44d10b1f
RW
9827(define-public python-py3status
9828 (package
9829 (name "python-py3status")
77f3d303 9830 (version "3.16")
44d10b1f
RW
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "py3status" version))
9835 (sha256
9836 (base32
77f3d303 9837 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9838 (build-system python-build-system)
9839 (inputs
9840 `(("file" ,file)))
9841 (arguments
9842 '(#:phases
9843 (modify-phases %standard-phases
9844 ;; 'file' is used for detection of configuration file encoding
9845 ;; let's make link the dependency to particular input
9846 (add-before 'build 'patch-file-path
9847 (lambda* (#:key inputs #:allow-other-keys)
9848 (let ((file-path (assoc-ref inputs "file")))
9849 (substitute* "py3status/parse_config.py"
9850 (("\\['file', '-b'")
9851 (string-append "['" file-path "/bin/file', '-b'")))
9852 #t))))
9853 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9854 (home-page "https://github.com/ultrabug/py3status")
9855 (synopsis "Extensible i3status wrapper written in Python")
9856 (description "py3status is an i3status wrapper which extends i3status
9857functionality in a modular way, allowing you to extend your panel with your
9858own code, responding to click events and updating clock every second.")
9859 (license license:bsd-3)))
9860
9861(define-public python-tblib
9862 (package
9863 (name "python-tblib")
9864 (version "1.3.2")
9865 (source (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "tblib" version))
9868 (sha256 (base32
9869 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9870 (build-system python-build-system)
9871 (arguments
9872 `(#:phases
9873 (modify-phases %standard-phases
9874 (add-before 'check 'adjust-tests
9875 (lambda _
9876 (when (which "python3")
9877 ;; Adjust the example output to match that of Python 3.7:
9878 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9879 (substitute* "README.rst"
9880 (("Exception\\('fail',") "Exception('fail'"))
9881 #t)))
9882 (replace 'check
9883 (lambda _
9884 ;; Upstream runs tests after installation and the package itself
9885 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9886 ;; found.
9887 (setenv "PYTHONPATH"
9888 (string-append (getcwd) "/build/lib:"
9889 (getenv "PYTHONPATH")))
9890 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9891 (native-inputs
9892 `(("python-pytest" ,python-pytest)
9893 ("python-six" ,python-six)))
9894 (home-page "https://github.com/ionelmc/python-tblib")
9895 (synopsis "Traceback serialization library")
9896 (description
9897 "Traceback serialization allows you to:
9898
9899@enumerate
9900@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9901different processes. This allows better error handling when running code over
9902multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9903
9904@item Parse traceback strings and raise with the parsed tracebacks.
9905@end enumerate\n")
9906 (license license:bsd-3)))
9907
9908(define-public python2-tblib
9909 (package-with-python2 python-tblib))
9910
9911(define-public python-greenlet
9912 (package
9913 (name "python-greenlet")
9914 (version "0.4.15")
9915 (source (origin
9916 (method url-fetch)
9917 (uri (pypi-uri "greenlet" version))
9918 (sha256
9919 (base32
9920 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9921 (build-system python-build-system)
9922 (home-page "https://greenlet.readthedocs.io/")
9923 (synopsis "Lightweight in-process concurrent programming")
9924 (description
9925 "Greenlet package is a spin-off of Stackless, a version of CPython
9926that supports micro-threads called \"tasklets\". Tasklets run
9927pseudo-concurrently (typically in a single or a few OS-level threads) and
9928are synchronized with data exchanges on \"channels\".")
9929 (license (list license:psfl license:expat))))
9930
9931(define-public python2-greenlet
9932 (package-with-python2 python-greenlet))
9933
9934(define-public python-objgraph
9935 (package
9936 (name "python-objgraph")
9937 (version "3.4.0")
9938 (source
9939 (origin
9940 (method url-fetch)
9941 (uri (pypi-uri "objgraph" version))
9942 (sha256
9943 (base32
9944 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9945 (build-system python-build-system)
9946 (propagated-inputs
9947 `(("python-graphviz" ,python-graphviz)))
9948 (native-inputs
9949 `(("python-mock" ,python-mock)
9950 ("graphviz" ,graphviz)))
9951 (home-page "https://mg.pov.lt/objgraph/")
9952 (synopsis "Draw Python object reference graphs with graphviz")
9953 (description
9954 "This package provides tools to draw Python object reference graphs with
9955graphviz.")
9956 (license license:expat)))
9957
9958(define-public python-gevent
9959 (package
9960 (name "python-gevent")
9961 (version "1.3.7")
9962 (source (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "gevent" version))
9965 (sha256
9966 (base32
9967 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9968 (modules '((guix build utils)))
9969 (snippet
9970 '(begin
9971 ;; unbunding libev and c-ares
9972 (delete-file-recursively "deps")
9973 #t))))
9974 (build-system python-build-system)
9975 (arguments
9976 `(#:modules ((ice-9 ftw)
9977 (ice-9 match)
9978 (srfi srfi-26)
9979 (guix build utils)
9980 (guix build python-build-system))
9981 #:phases (modify-phases %standard-phases
9982 (add-after 'unpack 'unpack-libev
9983 (lambda* (#:key inputs #:allow-other-keys)
9984 (mkdir-p "deps/libev")
9985 ;; FIXME: gevent requires building libev, even though
9986 ;; it only links against the proper one.
9987 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9988 "--strip-components=1" "-C" "deps/libev")))
9989 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9990 (lambda _
9991 (substitute* "src/gevent/subprocess.py"
9992 (("/bin/sh") (which "sh")))
9993 (for-each (lambda (file)
9994 (substitute* file
9995 (("/bin/sh") (which "sh"))
9996 (("/bin/true") (which "true"))))
9997 (find-files "src/greentest" "\\.py$"))
9998 #t))
9999 (add-before 'build 'do-not-use-bundled-sources
10000 (lambda* (#:key inputs #:allow-other-keys)
10001 (setenv "CONFIG_SHELL" (which "bash"))
10002 (setenv "LIBEV_EMBED" "false")
10003 (setenv "CARES_EMBED" "false")
10004 (setenv "EMBED" "false")
10005
10006 (let ((greenlet (string-append
10007 (assoc-ref inputs "python-greenlet")
10008 "/include")))
10009 (match (scandir greenlet
10010 (lambda (item)
10011 (string-prefix? "python" item)))
10012 ((python)
10013 (setenv "CPATH"
10014 (string-append greenlet "/" python)))))
10015 #t))
10016 (add-before 'check 'skip-timer-test
10017 (lambda _
10018 ;; XXX: Skip 'TestTimerResolution', which appears to be
10019 ;; unreliable.
10020 (substitute* "src/greentest/test__core_timer.py"
10021 (("not greentest.RUNNING_ON_CI") "False"))
10022 #t))
10023 (replace 'check
10024 (lambda _
10025 ;; Make sure the build directory is on PYTHONPATH.
10026 (setenv "PYTHONPATH"
10027 (string-append
10028 (getenv "PYTHONPATH") ":"
10029 (getcwd) "/build/"
10030 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10031 (with-directory-excursion "src/greentest"
10032 ;; XXX: Many tests require network access. Instead we only
10033 ;; run known-good tests. Unfortunately we cannot use
10034 ;; recursion here since this directory also contains
10035 ;; Python-version-specific subfolders.
10036 (apply invoke "python" "testrunner.py" "--config"
10037 "known_failures.py"
10038 (scandir "." (cut regexp-exec
10039 (make-regexp "test_+(subprocess|core)")
10040 <>)))))))))
10041 (propagated-inputs
10042 `(("python-greenlet" ,python-greenlet)
10043 ("python-objgraph" ,python-objgraph)))
10044 (native-inputs
10045 `(("libev-source" ,(package-source libev))
10046 ("python-six" ,python-six)))
10047 (inputs
10048 `(("c-ares" ,c-ares)
10049 ("libev" ,libev)))
10050 (home-page "http://www.gevent.org/")
10051 (synopsis "Coroutine-based network library")
10052 (description
10053 "gevent is a coroutine-based Python networking library that uses greenlet
10054to provide a high-level synchronous API on top of the libev event loop.")
10055 (license license:expat)
10056 (properties `((python2-variant . ,(delay python2-gevent))))))
10057
10058(define-public python2-gevent
10059 (let ((base (package-with-python2
10060 (strip-python2-variant python-gevent))))
10061 (package
10062 (inherit base)
10063 (native-inputs `(,@(package-native-inputs python-gevent)
10064 ("python-mock" ,python2-mock))))))
10065
10066(define-public python-fastimport
10067 (package
10068 (name "python-fastimport")
10069 (version "0.9.6")
10070 (source
10071 (origin
10072 (method url-fetch)
10073 (uri (pypi-uri "fastimport" version))
10074 (sha256
10075 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10076 (build-system python-build-system)
10077 (home-page "https://github.com/jelmer/python-fastimport")
10078 (synopsis "VCS fastimport parser and generator in Python")
10079 (description "This package provides a parser for and generator of the Git
10080@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10081format.")
10082 (license license:gpl2+)))
10083
10084(define-public python2-fastimport
10085 (package-with-python2 python-fastimport))
10086
10087(define-public python-twisted
10088 (package
10089 (name "python-twisted")
fdfad2fc 10090 (version "19.7.0")
44d10b1f
RW
10091 (source (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10094 (sha256
10095 (base32
fdfad2fc 10096 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10097 (build-system python-build-system)
10098 (arguments
0107c9b8 10099 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10100 (propagated-inputs
10101 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10102 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10103 ("python-incremental" ,python-incremental)
e5ba2fe3 10104 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10105 ("python-constantly" ,python-constantly)
10106 ("python-automat" ,python-automat)))
10107 (home-page "https://twistedmatrix.com/")
10108 (synopsis "Asynchronous networking framework written in Python")
10109 (description
10110 "Twisted is an extensible framework for Python programming, with special
10111focus on event-based network programming and multiprotocol integration.")
10112 (license license:expat)))
10113
10114(define-public python2-twisted
10115 (package-with-python2 python-twisted))
10116
10117(define-public python-pika
10118 (package
10119 (name "python-pika")
10120 (version "0.12.0")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "pika" version))
10125 (sha256
10126 (base32
10127 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10128 (build-system python-build-system)
10129 (native-inputs
10130 `(("python-pyev" ,python-pyev)
10131 ("python-tornado" ,python-tornado)
10132 ("python-twisted" ,python-twisted)))
10133 (home-page "https://pika.readthedocs.org")
10134 (synopsis "Pure Python AMQP Client Library")
10135 (description
10136 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10137Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10138network support library.")
10139 (license license:bsd-3)))
10140
10141(define-public python2-pika
10142 (package-with-python2 python-pika))
10143
10144(define-public python-ply
10145 (package
10146 (name "python-ply")
10147 (version "3.10")
10148 (source
10149 (origin
10150 (method url-fetch)
10151 (uri (pypi-uri "ply" version))
10152 (sha256
10153 (base32
10154 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10155 (build-system python-build-system)
10156 (home-page "http://www.dabeaz.com/ply/")
10157 (synopsis "Python Lex & Yacc")
10158 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10159It uses LR parsing and does extensive error checking.")
10160 (license license:bsd-3)))
10161
10162(define-public python2-ply
10163 (package-with-python2 python-ply))
10164
10165(define-public python-tabulate
10166 (package
10167 (name "python-tabulate")
10168 (version "0.7.7")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "tabulate" version))
10172 (sha256
10173 (base32
10174 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10175 (build-system python-build-system)
10176 (arguments
10177 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10178 ;; and the latest release is not tagged in the upstream repository.
10179 '(#:tests? #f))
10180 (home-page "https://bitbucket.org/astanin/python-tabulate")
10181 (synopsis "Pretty-print tabular data")
10182 (description
10183 "Tabulate is a library and command-line utility to pretty-print tabular
10184data in Python.")
10185 (license license:expat)))
10186
10187(define-public python2-tabulate
10188 (package-with-python2 python-tabulate))
10189
10190(define-public python-kazoo
10191 (package
10192 (name "python-kazoo")
10193 (version "2.4.0")
10194 (source
10195 (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "kazoo" version))
10198 (sha256
10199 (base32
10200 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10201 (build-system python-build-system)
10202 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10203 (propagated-inputs
10204 `(("python-six" ,python-six)))
10205 (home-page "https://kazoo.readthedocs.org")
10206 (synopsis "High-level Zookeeper client library")
10207 (description
10208 "Kazoo is a Python client library for the Apache Zookeeper distributed
10209application service. It is designed to be easy to use and to avoid common
10210programming errors.")
10211 (license license:asl2.0)))
10212
10213(define-public python2-kazoo
10214 (package-with-python2 python-kazoo))
10215
10216(define-public python-pykafka
10217 (package
10218 (name "python-pykafka")
10219 (version "2.4.0")
10220 (source (origin
10221 (method url-fetch)
0ca1d040 10222 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10223 (sha256
10224 (base32
10225 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10226 (build-system python-build-system)
10227 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10228 (propagated-inputs
10229 `(("python-gevent" ,python-gevent)
10230 ("python-kazoo" ,python-kazoo)
10231 ("python-tabulate" ,python-tabulate)))
10232 (inputs
10233 `(("librdkafka" ,librdkafka)))
10234 (home-page "https://pykafka.readthedocs.io/")
10235 (synopsis "Apache Kafka client for Python")
10236 (description
10237 "PyKafka is a client for the Apache Kafka distributed messaging system.
10238It includes Python implementations of Kafka producers and consumers, which
10239are optionally backed by a C extension built on librdkafka.")
10240 (license license:asl2.0)))
10241
10242(define-public python2-pykafka
10243 (package-with-python2 python-pykafka))
10244
10245(define-public python-wcwidth
10246 (package
10247 (name "python-wcwidth")
10248 (version "0.1.7")
10249 (source
10250 (origin
10251 (method url-fetch)
10252 (uri (pypi-uri "wcwidth" version))
10253 (sha256
10254 (base32
10255 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10256 (build-system python-build-system)
10257 (home-page "https://github.com/jquast/wcwidth")
10258 (synopsis "Measure number of terminal column cells of wide-character codes")
10259 (description "Wcwidth measures the number of terminal column cells of
10260wide-character codes. It is useful for those implementing a terminal emulator,
10261or programs that carefully produce output to be interpreted by one. It is a
10262Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10263specified in POSIX.1-2001 and POSIX.1-2008.")
10264 (license license:expat)))
10265
10266(define-public python2-wcwidth
10267 (package-with-python2 python-wcwidth))
10268
10269(define-public python2-jsonrpclib
10270 (package
10271 (name "python2-jsonrpclib")
10272 (version "0.1.7")
10273 (source (origin
10274 (method url-fetch)
6571bba0 10275 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10276 (sha256
10277 (base32
10278 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10279 (build-system python-build-system)
10280 (arguments
10281 `(#:tests? #f
10282 #:python ,python-2))
10283 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10284 (synopsis "Implementation of JSON-RPC specification for Python")
10285 (description
10286 "This library is an implementation of the JSON-RPC specification.
10287It supports both the original 1.0 specification, as well as the
10288new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10289etc.")
10290 (license license:asl2.0)))
10291
10292(define-public python-chai
10293 (package
10294 (name "python-chai")
10295 (version "1.1.2")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (pypi-uri "chai" version))
10299 (sha256
10300 (base32
10301 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10302 (build-system python-build-system)
10303 (home-page "https://github.com/agoragames/chai")
10304 (synopsis "Mocking framework for Python")
10305 (description
10306 "Chai provides an api for mocking, stubbing and spying your python
10307objects, patterned after the Mocha library for Ruby.")
10308 (license license:bsd-3)))
10309
10310(define-public python2-chai
10311 (package-with-python2 python-chai))
10312
10313(define-public python-inflection
10314 (package
10315 (name "python-inflection")
10316 (version "0.3.1")
10317 (source
10318 (origin (method url-fetch)
10319 (uri (pypi-uri "inflection" version))
10320 (sha256
10321 (base32
10322 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10323 (build-system python-build-system)
10324 (native-inputs
10325 `(("python-pytest" ,python-pytest)))
10326 (home-page "https://github.com/jpvanhal/inflection")
10327 (synopsis "Python string transformation library")
10328 (description
10329 "Inflection is a string transformation library. It singularizes
10330and pluralizes English words, and transforms strings from CamelCase to
10331underscored string.")
10332 (license license:expat)))
10333
10334(define-public python2-inflection
10335 (package-with-python2 python-inflection))
10336
10337(define-public python-pylev
10338 (package
10339 (name "python-pylev")
10340 (version "1.3.0")
10341 (source (origin
10342 (method url-fetch)
10343 (uri (pypi-uri "pylev" version))
10344 (sha256
10345 (base32
10346 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10347 (build-system python-build-system)
10348 (home-page "https://github.com/toastdriven/pylev")
10349 (synopsis "Levenshtein distance implementation in Python")
10350 (description "Pure Python Levenshtein implementation, based off the
10351Wikipedia code samples at
10352@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10353 (license license:bsd-3)))
10354
10355(define-public python2-pylev
10356 (package-with-python2 python-pylev))
10357
10358(define-public python-cleo
10359 (package
10360 (name "python-cleo")
10361 (version "0.6.1")
10362 (source (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "cleo" version))
10365 (sha256
10366 (base32
10367 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10368 (build-system python-build-system)
10369 (native-inputs
10370 `(;; For testing
10371 ("python-mock" ,python-mock)
10372 ("python-pytest-mock" ,python-pytest-mock)
10373 ("python-pytest" ,python-pytest)))
10374 (propagated-inputs
10375 `(("python-backpack" ,python-backpack)
10376 ("python-pastel" ,python-pastel)
10377 ("python-pylev" ,python-pylev)))
10378 (home-page "https://github.com/sdispater/cleo")
10379 (synopsis "Command-line arguments library for Python")
10380 (description
10381 "Cleo allows you to create command-line commands with signature in
10382docstring and colored output.")
10383 (license license:expat)))
10384
10385(define-public python2-cleo
10386 (package-with-python2 python-cleo))
10387
10388(define-public python-lazy-object-proxy
10389 (package
10390 (name "python-lazy-object-proxy")
10391 (version "1.3.1")
10392 (source (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "lazy-object-proxy" version))
10395 (sha256
10396 (base32
10397 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10398 (build-system python-build-system)
10399 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10400 (synopsis "Lazy object proxy for python")
10401 (description
10402 "Lazy object proxy is an object that wraps a callable but defers the call
10403until the object is actually required, and caches the result of said call.")
10404 (license license:bsd-2)))
10405
10406(define-public python2-lazy-object-proxy
10407 (package-with-python2 python-lazy-object-proxy))
10408
10409(define-public python-dnspython
10410 (package
10411 (name "python-dnspython")
10412 (version "1.15.0")
10413 (source (origin
10414 (method url-fetch)
10415 (uri (string-append "http://www.dnspython.org/kits/"
10416 version "/dnspython-" version ".tar.gz"))
10417 (sha256
10418 (base32
10419 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10420 (build-system python-build-system)
10421 (arguments '(#:tests? #f)) ; XXX: requires internet access
10422 (home-page "http://www.dnspython.org")
10423 (synopsis "DNS toolkit for Python")
10424 (description
10425 "dnspython is a DNS toolkit for Python. It supports almost all record
10426types. It can be used for queries, zone transfers, and dynamic updates.
10427It supports TSIG authenticated messages and EDNS0.")
10428 (license license:expat)))
10429
10430(define-public python2-dnspython
10431 (package-with-python2 python-dnspython))
10432
10433(define-public python-email-validator
10434 (package
10435 (name "python-email-validator")
10436 (version "1.0.2")
10437 (source
10438 (origin (method url-fetch)
10439 (uri (pypi-uri "email_validator" version))
10440 (sha256
10441 (base32
10442 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10443 (build-system python-build-system)
10444 (arguments
10445 '(#:phases
10446 (modify-phases %standard-phases
10447 (add-before 'build 'use-dnspython
10448 (lambda _
10449 (substitute* "setup.py"
10450 (("dnspython3") "dnspython"))
10451 #t)))))
10452 (propagated-inputs
10453 `(("python-dnspython" ,python-dnspython)
10454 ("python-idna" ,python-idna)))
10455 (home-page "https://github.com/JoshData/python-email-validator")
10456 (synopsis "Email address validation library for Python")
10457 (description
10458 "This library validates email address syntax and deliverability.")
10459 (license license:cc0)))
10460
10461(define-public python2-email-validator
10462 (package-with-python2 python-email-validator))
10463
10464(define-public python-ukpostcodeparser
10465 (package
10466 (name "python-ukpostcodeparser")
10467 (version "1.0.3")
10468 (source (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "UkPostcodeParser" version))
10471 (sha256
10472 (base32
10473 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10474 (build-system python-build-system)
10475 (home-page "https://github.com/hamstah/ukpostcodeparser")
10476 (synopsis "UK Postcode parser for Python")
10477 (description
10478 "This library provides the @code{parse_uk_postcode} function for
10479parsing UK postcodes.")
10480 (license license:expat)))
10481
10482(define-public python2-ukpostcodeparser
10483 (package-with-python2 python-ukpostcodeparser))
10484
10485(define-public python-faker
10486 (package
10487 (name "python-faker")
10488 (version "0.7.9")
10489 (source (origin
10490 (method url-fetch)
10491 (uri (pypi-uri "Faker" version))
10492 (sha256
10493 (base32
10494 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10495 (patches
10496 (search-patches "python-faker-fix-build-32bit.patch"))
10497 (modules '((guix build utils)))
10498 (snippet
10499 '(begin
10500 (for-each delete-file (find-files "." "\\.pyc$"))
10501 #t))))
10502 (build-system python-build-system)
10503 (arguments
10504 '(#:phases
10505 (modify-phases %standard-phases
10506 (replace 'check
49ff8827 10507 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10508 (native-inputs
10509 `(;; For testing
10510 ("python-email-validator" ,python-email-validator)
10511 ("python-mock" ,python-mock)
10512 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10513 (propagated-inputs
10514 `(("python-dateutil" ,python-dateutil)
10515 ("python-six" ,python-six)))
10516 (home-page "https://github.com/joke2k/faker")
10517 (synopsis "Python package that generates fake data")
10518 (description
10519 "Faker is a Python package that generates fake data such as names,
10520addresses, and phone numbers.")
10521 (license license:expat)
10522 (properties `((python2-variant . ,(delay python2-faker))))))
10523
10524(define-public python2-faker
10525 (let ((base (package-with-python2 (strip-python2-variant
10526 python-faker))))
10527 (package
10528 (inherit base)
10529 (propagated-inputs
10530 `(("python2-ipaddress" ,python2-ipaddress)
10531 ,@(package-propagated-inputs base))))))
10532
10533(define-public python-pyaml
10534 (package
10535 (name "python-pyaml")
10536 (version "18.11.0")
10537 (source (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "pyaml" version))
10540 (sha256
10541 (base32
10542 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10543 (build-system python-build-system)
10544 (native-inputs
10545 `(("python-unidecode" ,python-unidecode)))
10546 (propagated-inputs
10547 `(("python-pyyaml" ,python-pyyaml)))
10548 (home-page "https://github.com/mk-fg/pretty-yaml")
10549 (synopsis "YAML pretty-print library for Python")
10550 (description
10551 "pyaml is a PyYAML based python module to produce pretty and readable
10552YAML-serialized data.")
492e3a7a 10553 (license license:wtfpl2)))
44d10b1f
RW
10554
10555(define-public python2-pyaml
10556 (package-with-python2 python-pyaml))
10557
10558(define-public python-backpack
10559 (package
10560 (name "python-backpack")
10561 (version "0.1")
10562 (source
10563 (origin
10564 (method url-fetch)
10565 (uri (pypi-uri "backpack" version))
10566 (sha256
10567 (base32
10568 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10569 (build-system python-build-system)
10570 (native-inputs
10571 `(("python-pytest" ,python-pytest)
10572 ("python-nose" ,python-nose)))
10573 (propagated-inputs
10574 `(("python-simplejson" ,python-simplejson)))
10575 (home-page "https://github.com/sdispater/backpack")
10576 (synopsis "Utilities for working with Python collections")
10577 (description "Backpack provides some useful utilities for working with
10578collections of data.")
10579 (license license:expat)))
10580
10581(define-public python2-backpack
10582 (package-with-python2 python-backpack))
10583
10584(define-public python-prompt-toolkit
10585 (package
10586 (name "python-prompt-toolkit")
10587 (version "2.0.7")
10588 (source
10589 (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10592 (sha256
10593 (base32
10594 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10595 (build-system python-build-system)
10596 (arguments
10597 `(#:phases
10598 (modify-phases %standard-phases
10599 (delete 'check)
10600 (add-after 'install 'post-install-check
10601 (lambda* (#:key inputs outputs #:allow-other-keys)
10602 ;; HOME is needed for the test
10603 ;; "test_pathcompleter_can_expanduser".
10604 (setenv "HOME" "/tmp")
10605 (add-installed-pythonpath inputs outputs)
10606 (invoke "py.test"))))))
10607 (propagated-inputs
10608 `(("python-wcwidth" ,python-wcwidth)
10609 ("python-six" ,python-six)
10610 ("python-pygments" ,python-pygments)))
10611 (native-inputs
10612 `(("python-pytest" ,python-pytest)))
10613 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10614 (synopsis "Library for building command line interfaces in Python")
10615 (description
10616 "Prompt-Toolkit is a library for building interactive command line
10617interfaces in Python. It's like GNU Readline but it also features syntax
10618highlighting while typing, out-of-the-box multi-line input editing, advanced
10619code completion, incremental search, support for Chinese double-width
10620characters, mouse support, and auto suggestions.")
10621 (license license:bsd-3)))
10622
10623(define-public python2-prompt-toolkit
10624 (package-with-python2 python-prompt-toolkit))
10625
10626(define-public python-prompt-toolkit-1
10627 (package (inherit python-prompt-toolkit)
10628 (version "1.0.15")
10629 (source
10630 (origin
10631 (method url-fetch)
10632 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10633 (sha256
10634 (base32
10635 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10636
10637(define-public python2-prompt-toolkit-1
10638 (package-with-python2 python-prompt-toolkit-1))
10639
10640(define-public python-jedi
10641 (package
10642 (name "python-jedi")
296e1aea 10643 (version "0.15.1")
44d10b1f
RW
10644 (source
10645 (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "jedi" version))
10648 (sha256
10649 (base32
296e1aea 10650 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10651 (build-system python-build-system)
10652 (arguments
296e1aea 10653 `(#:phases
44d10b1f 10654 (modify-phases %standard-phases
296e1aea
MC
10655 (add-after 'unpack 'disable-file-completion-test
10656 ;; A single parameterized test currently fail (see:
10657 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10658 (lambda _
10659 (substitute* "test/test_api/test_completion.py"
10660 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10661 #t))
44d10b1f 10662 (replace 'check
296e1aea
MC
10663 (lambda _
10664 (setenv "HOME" "/tmp")
10665 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10666 (native-inputs
10667 `(("python-pytest" ,python-pytest)
10668 ("python-docopt" ,python-docopt)))
10669 (propagated-inputs
10670 `(("python-parso" ,python-parso)))
10671 (home-page "https://github.com/davidhalter/jedi")
10672 (synopsis "Autocompletion and static analysis library for Python")
10673 (description
10674 "Jedi is a static analysis tool for Python that can be used in Integrated
10675Development Environments (@dfn{IDE}s) and text editors. It understands Python
10676on a deeper level than many other static analysis frameworks for Python.
10677
10678Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10679well.")
10680 (license license:expat)))
10681
10682(define-public python2-jedi
296e1aea 10683 (package-with-python2 python-jedi))
44d10b1f
RW
10684
10685(define-public ptpython
10686 (package
10687 (name "ptpython")
10688 (version "0.34")
10689 (source (origin
10690 (method url-fetch)
10691 (uri (pypi-uri "ptpython" version))
10692 (sha256
10693 (base32
10694 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10695 (build-system python-build-system)
10696 (arguments
10697 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10698 (propagated-inputs
10699 `(("python-docopt" ,python-docopt)
10700 ("python-jedi" ,python-jedi)
10701 ("python-prompt-toolkit" ,python-prompt-toolkit)
10702 ("python-pygments" ,python-pygments)))
10703 (home-page "https://github.com/jonathanslenders/ptpython")
10704 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10705 (description
10706 "ptpython is a Python read-eval-print loop with IDE-like features.
10707It supports syntax highlighting, multiline editing, autocompletion, mouse,
10708color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10709etc.")
10710 (license license:bsd-3)
10711 (properties `((python2-variant . ,(delay ptpython-2))))))
10712
10713(define-public ptpython-2
10714 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10715 (package
10716 (inherit base)
10717 (name "ptpython2"))))
10718
10719(define-public python-stem
10720 (package
10721 (name "python-stem")
e746d1c3 10722 (version "1.7.1")
44d10b1f
RW
10723 (source
10724 (origin
10725 (method url-fetch)
10726 (uri (pypi-uri "stem" version))
10727 (sha256
10728 (base32
e746d1c3 10729 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10730 (build-system python-build-system)
10731 (arguments
10732 `(#:phases
10733 (modify-phases %standard-phases
10734 (replace 'check
10735 (lambda _
10736 (invoke "./run_tests.py" "--unit")
10737 #t)))))
10738 (native-inputs
10739 `(("python-mock" ,python-mock)
10740 ("python-pycodestyle" ,python-pycodestyle)
10741 ("python-pyflakes" ,python-pyflakes)))
10742 (home-page "https://stem.torproject.org/")
10743 (synopsis
10744 "Python controller library that allows applications to interact with Tor")
10745 (description
10746 "Stem is a Python controller library for Tor. With it you can use Tor's
10747control protocol to script against the Tor process and read descriptor data
10748relays publish about themselves.")
10749 (license license:lgpl3)))
10750
10751(define-public python2-stem
10752 (package-with-python2 python-stem))
10753
10754(define-public python-pyserial
10755 (package
10756 (name "python-pyserial")
10757 (version "3.1.1")
10758 (source
10759 (origin
10760 (method url-fetch)
10761 (uri (pypi-uri "pyserial" version))
10762 (sha256
10763 (base32
10764 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10765 (build-system python-build-system)
10766 (arguments
10767 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10768 ;; #:phases
10769 ;; (modify-phases %standard-phases
10770 ;; (replace 'check
10771 ;; (lambda _
10772 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10773 (home-page
10774 "https://github.com/pyserial/pyserial")
10775 (synopsis "Python Serial Port Bindings")
10776 (description "@code{pyserial} provide serial port bindings for Python. It
10777supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10778and/or Xon/Xoff. The port is accessed in RAW mode.")
10779 (license license:bsd-3)))
10780
10781(define-public python2-pyserial
10782 (package-with-python2 python-pyserial))
10783
10784(define-public python-kivy
10785 (package
10786 (name "python-kivy")
10787 (version "1.10.1")
10788 (source
10789 (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "Kivy" version))
10792 (file-name (string-append name "-" version ".tar.gz"))
10793 (sha256
10794 (base32
10795 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10796 (build-system python-build-system)
10797 (arguments
10798 `(#:tests? #f ; Tests require many optional packages
10799 #:phases
10800 (modify-phases %standard-phases
10801 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10802 (lambda* (#:key inputs #:allow-other-keys)
10803 (setenv "KIVY_SDL2_PATH"
10804 (string-append (assoc-ref inputs "sdl-union")
10805 "/include/SDL2"))
10806 #t)))))
10807 (native-inputs
10808 `(("git" ,git)
10809 ("pkg-config" ,pkg-config)
10810 ("python-cython" ,python-cython)))
10811 (inputs
10812 `(("gstreamer" ,gstreamer)
10813 ("mesa" ,mesa)
10814 ("sdl-union"
10815 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10816 (home-page "http://kivy.org")
10817 (synopsis
10818 "Multitouch application framework")
10819 (description
10820 "A software library for rapid development of
10821hardware-accelerated multitouch applications.")
10822 (license license:expat)))
10823
10824(define-public python2-kivy
10825 (package-with-python2 python-kivy))
10826
10827(define-public python-kivy-next
10828 (deprecated-package "python-kivy-next" python-kivy))
10829
10830(define-public python2-kivy-next
10831 (deprecated-package "python2-kivy-next" python2-kivy))
10832
10833(define-public python-binaryornot
10834 (package
10835 (name "python-binaryornot")
10836 (version "0.4.4")
10837 (source (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "binaryornot" version))
10840 (sha256
10841 (base32
10842 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10843 (build-system python-build-system)
10844 (propagated-inputs
10845 `(("python-chardet" ,python-chardet)
10846 ("python-hypothesis" ,python-hypothesis)))
10847 (home-page "https://github.com/audreyr/binaryornot")
10848 (synopsis "Package to check if a file is binary or text")
10849 (description "Ultra-lightweight pure Python package to check if a file is
10850binary or text.")
10851 (license license:bsd-3)
10852 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10853
10854(define-public python2-binaryornot
10855 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10856 (package (inherit base)
10857 (propagated-inputs
10858 `(("python2-enum34" ,python2-enum34)
10859 ,@(package-propagated-inputs base))))))
10860
10861(define-public python-nltk
10862 (package
10863 (name "python-nltk")
10864 (version "3.2.1")
10865 (source (origin
10866 (method url-fetch)
10867 (uri (pypi-uri "nltk" version))
10868 (sha256
10869 (base32
10870 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10871 (build-system python-build-system)
10872 (arguments
10873 '(;; The tests require some extra resources to be downloaded.
10874 ;; TODO Try packaging these resources.
10875 #:tests? #f))
10876 (home-page "http://nltk.org/")
10877 (synopsis "Natural Language Toolkit")
10878 (description "It provides interfaces to over 50 corpora and lexical
10879resources such as WordNet, along with a suite of text processing libraries
10880for classification, tokenization, stemming, tagging, parsing, and semantic
10881reasoning, wrappers for natural language processing libraries.")
10882 (license license:asl2.0)))
10883
10884(define-public python2-nltk
10885 (package-with-python2 python-nltk))
10886
10887(define-public python-pymongo
10888 (package
10889 (name "python-pymongo")
10890 (version "3.7.2")
10891 (source (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "pymongo" version))
10894 (sha256
10895 (base32
10896 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10897 (build-system python-build-system)
10898 (propagated-inputs
10899 `(("python-certifi" ,python-certifi)))
10900 (home-page "https://github.com/mongodb/mongo-python-driver")
10901 (synopsis "Python driver for MongoDB")
10902 (description "Python driver for MongoDB.")
10903 (license license:asl2.0)))
10904
10905(define-public python2-pymongo
10906 (package-with-python2 python-pymongo))
10907
44d10b1f
RW
10908(define-public python-consul
10909 (package
10910 (name "python-consul")
10911 (version "0.6.1")
10912 (source
10913 (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "python-consul" version))
10916 (sha256
10917 (base32
10918 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10919 (build-system python-build-system)
10920 (arguments
10921 '(#:tests? #f)) ; The tests are not distributed
10922 (propagated-inputs
10923 `(("python-requests" ,python-requests)
10924 ("python-six" ,python-six)))
10925 (home-page "https://github.com/cablehead/python-consul")
10926 (synopsis "Python client for Consul")
10927 (description
10928 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10929discovery, monitoring and configuration.")
10930 (license license:expat)))
10931
10932(define-public python2-consul
10933 (package-with-python2 python-consul))
10934
10935(define-public python-schematics
10936 (package
10937 (name "python-schematics")
10938 (version "1.1.1")
10939 (source
1961d187
TGR
10940 (origin
10941 (method git-fetch)
10942 (uri (git-reference
10943 (url "https://github.com/schematics/schematics.git")
10944 (commit (string-append "v" version))))
10945 (file-name (git-file-name name version))
10946 (sha256
10947 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10948 (build-system python-build-system)
10949 (propagated-inputs
10950 `(("python-six" ,python-six)))
10951 (arguments
1961d187
TGR
10952 ;; The tests require a bunch of not very nice packages with fixed
10953 ;; version requirements (e.g. python-coveralls).
10954 `(#:tests? #f))
44d10b1f
RW
10955 (home-page "https://github.com/schematics/schematics")
10956 (synopsis "Python Data Structures for Humans")
10957 (description "Python Data Structures for Humans.")
10958 (license license:bsd-3)))
10959
10960(define-public python2-schematics
10961 (package-with-python2 python-schematics))
10962
10963(define-public python-odfpy
10964 (package
10965 (name "python-odfpy")
10966 (version "1.3.3")
10967 (source (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "odfpy" version))
10970 (sha256
10971 (base32
10972 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10973 (arguments
10974 `(#:modules ((srfi srfi-1)
10975 (guix build python-build-system)
10976 (guix build utils))
10977 #:phases
10978 (modify-phases %standard-phases
10979 (replace 'check
10980 ;; The test runner invokes python2 and python3 for test*.py.
10981 ;; To avoid having both in inputs, we replicate it here.
10982 (lambda _
21ccc01d
RW
10983 (for-each (lambda (test-file) (invoke "python" test-file))
10984 (find-files "tests" "^test.*\\.py$"))
10985 #t)))))
44d10b1f
RW
10986 (build-system python-build-system)
10987 (home-page "https://github.com/eea/odfpy")
10988 (synopsis "Python API and tools to manipulate OpenDocument files")
10989 (description "Collection of libraries and utility programs written in
10990Python to manipulate OpenDocument 1.2 files.")
10991 (license
10992 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10993 ;; number of files with other licenses.
10994 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10995
10996(define-public python2-odfpy
10997 (package-with-python2 python-odfpy))
10998
10999(define-public python-natsort
11000 (package
11001 (name "python-natsort")
11002 (version "5.4.1")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (pypi-uri "natsort" version))
11006 (sha256
11007 (base32
11008 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11009 (build-system python-build-system)
11010 (arguments
11011 `(#:modules ((guix build utils)
11012 (guix build python-build-system)
11013 (srfi srfi-1)
11014 (srfi srfi-26)
11015 (ice-9 ftw))
11016 #:phases
11017 (modify-phases %standard-phases
11018 (add-before 'check 'set-cachedir
11019 ;; Tests require write access to $HOME by default
11020 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11021 (replace 'check
11022 (lambda _
11023 (let ((cwd (getcwd)))
11024 (setenv "PYTHONPATH"
11025 (string-append
11026 cwd "/build/"
11027 (find (cut string-prefix? "lib" <>)
11028 (scandir (string-append cwd "/build")))
11029 ":"
11030 (getenv "PYTHONPATH")))
11031 (invoke "pytest" "-v")))))))
11032 (native-inputs
11033 `(("python-hypothesis" ,python-hypothesis)
11034 ("python-pytest-cov" ,python-pytest-cov)
11035 ("python-pytest-mock" ,python-pytest-mock)
11036 ("python-pytest" ,python-pytest)))
11037 (propagated-inputs ; TODO: Add python-fastnumbers.
11038 `(("python-pyicu" ,python-pyicu)))
11039 (home-page "https://github.com/SethMMorton/natsort")
11040 (synopsis "Natural sorting for python and shell")
11041 (description
11042 "Natsort lets you apply natural sorting on lists instead of
11043lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11044on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11045@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11046@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11047identifies numbers and sorts them separately from strings. It can also sort
11048version numbers, real numbers, mixed types and more, and comes with a shell
11049command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11050 (license license:expat)
11051 (properties `((python2-variant . ,(delay python2-natsort))))))
11052
11053(define-public python2-natsort
11054 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11055 (package (inherit base)
11056 (native-inputs
11057 `(("python2-pathlib" ,python2-pathlib)
11058 ,@(package-native-inputs base))))))
11059
11060(define-public python-glances
11061 (package
11062 (name "python-glances")
9898a2d3 11063 (version "3.1.1")
44d10b1f
RW
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "Glances" version))
11068 (sha256
11069 (base32
15b4c911
TGR
11070 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11071 (modules '((guix build utils)))
11072 (snippet
11073 '(begin
11074 ;; Glances phones PyPI for weekly update checks by default.
11075 ;; Disable these. The user can re-enable them if desired.
11076 (substitute* "glances/outdated.py"
11077 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11078 (string-append indentation
11079 "self.args.disable_check_update = True\n"
11080 line)))
11081 #t))))
44d10b1f
RW
11082 (build-system python-build-system)
11083 (propagated-inputs
9898a2d3
TGR
11084 `(("python-future" ,python-future)
11085 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11086 (home-page
11087 "https://github.com/nicolargo/glances")
bab94ffa 11088 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11089 (description
11090 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11091Glances uses the PsUtil library to get information from your system. It
11092monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11093 (license license:lgpl3+)))
11094
11095(define-public python2-glances
11096 (package-with-python2 python-glances))
11097
11098(define-public python-graphql-core
11099 (package
11100 (name "python-graphql-core")
11101 (version "0.5.3")
11102 (source
11103 (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "graphql-core" version))
11106 (sha256
11107 (base32
11108 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11109 (build-system python-build-system)
11110 (arguments
11111 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11112 #:phases
11113 (modify-phases %standard-phases
11114 (add-after 'unpack 'patch-hardcoded-version
11115 (lambda _ (substitute*
11116 "setup.py"
11117 (("'gevent==1.1rc1'") "'gevent'"))
11118 #t)))))
11119 (native-inputs
11120 `(("python-gevent" ,python-gevent)
11121 ("python-mock" ,python-mock)
11122 ("python-pytest-mock" ,python-pytest-mock)))
11123 (propagated-inputs
11124 `(("python-promise" ,python-promise)
11125 ("python-six" ,python-six)))
11126 (home-page "https://github.com/graphql-python/graphql-core")
11127 (synopsis "GraphQL implementation for Python")
11128 (description
11129 "GraphQL implementation for Python. GraphQL is a data query language and
11130runtime designed and used to request and deliver data to mobile and web apps.
11131This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11132to Python.")
11133 (license license:expat)))
11134
11135(define-public python2-graphql-core
11136 (package-with-python2 python-graphql-core))
11137
11138(define-public python-graphql-relay
11139 (package
11140 (name "python-graphql-relay")
11141 (version "0.4.5")
11142 (source
11143 (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "graphql-relay" version))
11146 (sha256
11147 (base32
11148 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11149 (build-system python-build-system)
11150 (arguments
11151 '(#:tests? #f)) ; The tests are not distributed
11152 (propagated-inputs
11153 `(("python-graphql-core" ,python-graphql-core)
11154 ("python-promise" ,python-promise)
11155 ("python-six" ,python-six)))
11156 (home-page "https://github.com/graphql-python/graphql-relay-py")
11157 (synopsis "Relay implementation for Python")
11158 (description
11159 "This is a library to allow the easy creation of Relay-compliant servers
11160using the GraphQL Python reference implementation of a GraphQL server. It
11161should be noted that the code is a exact port of the original
11162@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11163from Facebook.")
11164 (license license:expat)))
11165
11166(define-public python2-graphql-relay
11167 (package-with-python2 python-graphql-relay))
11168
11169(define-public python-graphene
11170 (package
11171 (name "python-graphene")
11172 (version "0.10.2")
11173 (source
11174 (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "graphene" version))
11177 (sha256
11178 (base32
11179 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11180 (build-system python-build-system)
11181 (propagated-inputs
11182 `(("python-graphql-core" ,python-graphql-core)
11183 ("python-graphql-relay" ,python-graphql-relay)
11184 ("python-iso8601" ,python-iso8601)
11185 ("python-promise" ,python-promise)
11186 ("python-six" ,python-six)))
11187 (arguments
11188 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11189 (home-page "http://graphene-python.org/")
11190 (synopsis "GraphQL Framework for Python")
11191 (description
11192 "Graphene is a Python library for building GraphQL schemas/types.
11193A GraphQL schema describes your data model, and provides a GraphQL server
11194with an associated set of resolve methods that know how to fetch data.")
11195 (properties `((python2-variant . ,(delay python2-graphene))))
11196 (license license:expat)))
11197
11198(define-public python2-graphene
11199 (let ((base (package-with-python2
11200 (strip-python2-variant python-graphene))))
11201 (package (inherit base)
11202 (native-inputs
11203 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11204 ,@(package-native-inputs base))))))
11205
11206(define-public python-nautilus
11207 (package
11208 (name "python-nautilus")
11209 (version "0.4.9")
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "nautilus" version))
11214 (sha256
11215 (base32
11216 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11217 (build-system python-build-system)
11218 (arguments `(#:tests? #f)) ; fails to import test modules
11219 (propagated-inputs
11220 `(("python-bcrypt" ,python-bcrypt)
11221 ("python-click" ,python-click)
11222 ("python-consul" ,python-consul)
11223 ("python-graphene" ,python-graphene)
11224 ("python-jinja2" ,python-jinja2)
11225 ("python-peewee" ,python-peewee)
11226 ("python-pika" ,python-pika)
11227 ("python-tornado" ,python-tornado)
11228 ("python-wtforms" ,python-wtforms)))
11229 (native-inputs
11230 `(("python-nose2" ,python-nose2)))
11231 (home-page "https://github.com/AlecAivazis/nautilus")
11232 (synopsis "Library for creating microservice applications")
11233 (description
11234 "Nautilus is a framework for flux based microservices that looks to
11235provide extendible implementations of common aspects of a cloud so that you can
11236focus on building massively scalable web applications.")
11237 (license license:expat)))
11238
11239(define-public python-snowballstemmer
11240 (package
11241 (name "python-snowballstemmer")
11242 (version "1.2.1")
11243 (source (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "snowballstemmer" version))
11246 (sha256
11247 (base32
11248 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11249 (build-system python-build-system)
11250 (arguments
11251 `(;; No tests exist
11252 #:tests? #f))
11253 (home-page "https://github.com/shibukawa/snowball_py")
11254 (synopsis "Snowball stemming library collection for Python")
11255 (description "This package provides 16 word stemmer algorithms generated
11256from Snowball algorithms. It includes the 15 original ones plus the Poerter
11257English stemmer.")
11258 (license license:bsd-3)))
11259
11260(define-public python2-snowballstemmer
11261 (package-with-python2 python-snowballstemmer))
11262
44d10b1f
RW
11263(define-public python-setproctitle
11264(package
11265 (name "python-setproctitle")
11266 (version "1.1.10")
11267 (source
11268 (origin
11269 (method url-fetch)
11270 (uri (pypi-uri "setproctitle" version))
11271 (sha256
11272 (base32
11273 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11274 (build-system python-build-system)
11275 (arguments
11276 '(#:phases
11277 (modify-phases %standard-phases
11278 (add-before 'check 'patch-Makefile
11279 ;; Stricly this is only required for the python2 variant.
11280 ;; But adding a phase in an inherited package seems to be
11281 ;; cumbersum. So we patch even for python3.
11282 (lambda _
11283 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11284 (when nose
11285 (substitute* "Makefile"
11286 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11287 (string-append nose "/bin/nosetests "))))
11288 #t)))
11289 (replace 'check
11290 (lambda _
11291 (setenv "PYTHON" (or (which "python3") (which "python")))
11292 (setenv "PYCONFIG" (or (which "python3-config")
11293 (which "python-config")))
11294 (setenv "CC" "gcc")
11295 ;; No need to extend PYTHONPATH to find the built package, since
11296 ;; the Makefile will build anyway
11297 (invoke "make" "check"))))))
11298 (native-inputs
11299 `(("procps" ,procps))) ; required for tests
11300 (home-page
11301 "https://github.com/dvarrazzo/py-setproctitle")
11302 (synopsis
11303 "Setproctitle implementation for Python to customize the process title")
11304 (description "The library allows a process to change its title (as displayed
11305by system tools such as ps and top).
11306
11307Changing the title is mostly useful in multi-process systems, for
11308example when a master process is forked: changing the children's title
11309allows to identify the task each process is busy with. The technique
11310is used by PostgreSQL and the OpenSSH Server for example.")
11311 (license license:bsd-3)
11312 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11313
11314(define-public python2-setproctitle
11315 (let ((base (package-with-python2
11316 (strip-python2-variant python-setproctitle))))
11317 (package
11318 (inherit base)
11319 (native-inputs `(("python2-nose" ,python2-nose)
11320 ,@(package-native-inputs base))))))
11321
11322(define-public python-validictory
11323 (package
11324 (name "python-validictory")
11325 (version "1.0.1")
11326 (source
11327 (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "validictory" version))
11330 (sha256
11331 (base32
11332 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11333 (build-system python-build-system)
11334 (arguments
11335 '(#:phases
11336 (modify-phases %standard-phases
11337 (add-after 'unpack 'bootstrap
11338 ;; Move the tests out of the package directory to avoid
11339 ;; packaging them.
11340 (lambda* _
11341 (rename-file "validictory/tests" "tests")
11342 (delete-file "tests/__init__.py")))
11343 (replace 'check
11344 (lambda _
11345 ;; Extend PYTHONPATH so the built package will be found.
11346 (setenv "PYTHONPATH"
11347 (string-append (getcwd) "/build/lib:"
11348 (getenv "PYTHONPATH")))
6568bd5d 11349 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11350 (native-inputs
11351 `(("python-pytest" ,python-pytest)))
11352 (home-page
11353 "https://github.com/jamesturk/validictory")
11354 (synopsis "General purpose Python data validator")
11355 (description "It allows validation of arbitrary Python data structures.
11356
11357The schema format is based on the JSON Schema
11358proposal (http://json-schema.org), so combined with json the library is also
11359useful as a validator for JSON data.")
11360 (license license:expat)))
11361
11362(define-public python2-validictory
11363 (package-with-python2 python-validictory))
11364
11365(define-public python-pyelftools
11366 (package
11367 (name "python-pyelftools")
11368 (version "0.25")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "pyelftools" version))
11373 (sha256
11374 (base32
11375 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11376 (build-system python-build-system)
11377 (arguments
11378 `(#:phases
11379 (modify-phases %standard-phases
11380 (add-before 'check 'set-pythonpath
11381 (lambda _
11382 (setenv "PYTHONPATH"
11383 (string-append
11384 (getcwd) "/test/"
11385 ":" (getenv "PYTHONPATH")))
11386 #t)))))
11387 (home-page
11388 "https://github.com/eliben/pyelftools")
11389 (synopsis
11390 "Analyze binary and library file information")
11391 (description "This Python library provides interfaces for parsing and
11392analyzing two binary and library file formats; the Executable and Linking
11393Format (ELF), and debugging information in the Debugging With Attributed
11394Record Format (DWARF).")
11395 (license license:public-domain)))
11396
11397(define-public python-pyev
11398 (package
11399 (name "python-pyev")
11400 (version "0.9.0")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "pyev" version))
11405 (sha256
11406 (base32
11407 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11408 (build-system python-build-system)
11409 (arguments
11410 `(#:tests? #f ; no test suite
11411 #:phases
11412 (modify-phases %standard-phases
11413 (add-after 'unpack 'patch
11414 (lambda* (#:key inputs #:allow-other-keys)
11415 (let ((libev (string-append (assoc-ref inputs "libev")
11416 "/lib/libev.so.4")))
11417 (substitute* "setup.py"
11418 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11419 (string-append "libev_dll_name = \"" libev "\"")))))))))
11420 (inputs
11421 `(("libev" ,libev)))
11422 (home-page "http://pythonhosted.org/pyev/")
11423 (synopsis "Python libev interface")
11424 (description "Pyev provides a Python interface to libev.")
11425 (license license:gpl3)))
11426
11427(define-public python2-pyev
11428 (package-with-python2 python-pyev))
11429
11430(define-public python-imagesize
11431 (package
11432 (name "python-imagesize")
11433 (version "1.1.0")
11434 (source
11435 (origin
11436 (method url-fetch)
11437 (uri (pypi-uri "imagesize" version))
11438 (sha256
11439 (base32
11440 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11441 (build-system python-build-system)
11442 (home-page "https://github.com/shibukawa/imagesize_py")
11443 (synopsis "Gets image size of files in various formats in Python")
11444 (description
11445 "This package allows determination of image size from
11446PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11447 (license license:expat)))
11448
11449(define-public python2-imagesize
11450 (package-with-python2 python-imagesize))
11451
11452(define-public python-termstyle
11453 (package
11454 (name "python-termstyle")
11455 (version "0.1.11")
11456 (source
11457 (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "termstyle" version))
11460 (sha256
11461 (base32
11462 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11463 (build-system python-build-system)
11464 (arguments
11465 '(#:phases
11466 (modify-phases %standard-phases
11467 (replace 'check
11468 (lambda _
831080a6 11469 (invoke "python" "test3.py"))))))
44d10b1f
RW
11470 (home-page "https://github.com/gfxmonk/termstyle")
11471 (synopsis "Console text coloring for Python")
11472 (description "This package provides console text coloring for Python.")
11473 (license license:bsd-3)))
11474
11475(define-public python-argcomplete
11476 (package
11477 (name "python-argcomplete")
11478 (version "1.7.0")
11479 (source
11480 (origin
11481 (method url-fetch)
11482 (uri (pypi-uri "argcomplete" version))
11483 (sha256
11484 (base32
11485 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11486 (build-system python-build-system)
11487 (native-inputs
11488 `(("python-pexpect" ,python-pexpect)
11489 ("tcsh" ,tcsh)
11490 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11491 (home-page "https://github.com/kislyuk/argcomplete")
11492 (synopsis "Shell tab completion for Python argparse")
11493 (description "argcomplete provides extensible command line tab completion
11494of arguments and options for Python scripts using @code{argparse}. It's
11495particularly useful for programs with many options or sub-parsers that can
11496dynamically suggest completions; for example, when browsing resources over the
11497network.")
11498 (license license:asl2.0)))
11499
11500(define-public python2-argcomplete
11501 (package-with-python2 python-argcomplete))
11502
11503(define-public python-xopen
11504 (package
11505 (name "python-xopen")
24d64989 11506 (version "0.5.0")
44d10b1f
RW
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "xopen" version))
11511 (sha256
11512 (base32
24d64989 11513 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11514 (build-system python-build-system)
24d64989
RW
11515 (propagated-inputs
11516 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11517 (home-page "https://github.com/marcelm/xopen/")
11518 (synopsis "Open compressed files transparently")
11519 (description "This module provides an @code{xopen} function that works like
11520Python's built-in @code{open} function, but can also deal with compressed files.
11521Supported compression formats are gzip, bzip2 and, xz, and are automatically
11522recognized by their file extensions. The focus is on being as efficient as
11523possible on all supported Python versions.")
11524 (license license:expat)))
11525
11526(define-public python2-xopen
11527 (let ((base (package-with-python2
11528 (strip-python2-variant python-xopen))))
11529 (package
11530 (inherit base)
11531 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11532 ,@(package-propagated-inputs base))))))
11533
11534(define-public python-cheetah
11535 (package
11536 (name "python-cheetah")
11537 (version "3.1.0")
11538 (source
11539 (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "Cheetah3" version))
11542 (sha256
11543 (base32
11544 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11545 (build-system python-build-system)
11546 (arguments
11547 `(#:modules ((guix build utils)
11548 (guix build python-build-system)
11549 (ice-9 ftw)
11550 (srfi srfi-1)
11551 (srfi srfi-26))
11552 #:phases (modify-phases %standard-phases
11553 (add-after 'unpack 'use-absolute-python
11554 (lambda _
11555 (substitute* "Cheetah/CheetahWrapper.py"
11556 (("#!/usr/bin/env python")
11557 (string-append "#!" (which "python"))))
11558 #t))
11559 (replace 'check
11560 (lambda _
11561 (let ((cwd (getcwd)))
11562 (setenv "PYTHONPATH"
11563 (string-append
11564 cwd "/build/"
11565 (find (cut string-prefix? "lib" <>)
11566 (scandir (string-append cwd "/build")))
11567 ":" (getenv "PYTHONPATH")))
11568 (setenv "PATH"
11569 (string-append (getenv "PATH")
11570 ":" cwd "/bin"))
11571 (setenv "TMPDIR" "/tmp")
11572
11573 (substitute* "Cheetah/Tests/Test.py"
11574 (("unittest.TextTestRunner\\(\\)")
11575 "unittest.TextTestRunner(verbosity=2)"))
11576
11577 (invoke "python" "Cheetah/Tests/Test.py")))))))
11578 (propagated-inputs
11579 `(("python-markdown" ,python-markdown))) ;optional
11580 (home-page "http://cheetahtemplate.org/")
11581 (synopsis "Template engine")
11582 (description "Cheetah is a text-based template engine and Python code
11583generator.
11584
11585Cheetah can be used as a standalone templating utility or referenced as
11586a library from other Python applications. It has many potential uses,
11587but web developers looking for a viable alternative to ASP, JSP, PHP and
11588PSP are expected to be its principle user group.
11589
11590Features:
11591@enumerate
11592@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11593 text-based format.
11594@item Cleanly separates content, graphic design, and program code.
11595@item Blends the power and flexibility of Python with a simple template language
11596 that non-programmers can understand.
11597@item Gives template writers full access to any Python data structure, module,
11598 function, object, or method in their templates.
11599@item Makes code reuse easy by providing an object-orientated interface to
11600 templates that is accessible from Python code or other Cheetah templates.
11601 One template can subclass another and selectively reimplement sections of it.
11602@item Provides a simple, yet powerful, caching mechanism that can dramatically
11603 improve the performance of a dynamic website.
11604@item Compiles templates into optimized, yet readable, Python code.
11605@end enumerate")
11606 (license (license:x11-style "file://LICENSE"))))
11607
11608(define-public python2-cheetah
11609 (package-with-python2 python-cheetah))
11610
11611(define-public python-dulwich
11612 (package
11613 (name "python-dulwich")
11614 (version "0.18.6")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (list (string-append "https://www.dulwich.io/releases/"
11619 "dulwich-" version ".tar.gz")
11620 (pypi-uri "dulwich" version)))
11621 (sha256
11622 (base32
11623 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11624 (build-system python-build-system)
11625 (arguments
11626 `(#:phases
11627 (modify-phases %standard-phases
11628 (add-before 'check 'fix-tests
11629 (lambda* (#:key inputs #:allow-other-keys)
11630 ;; The tests use Popen with a custom environment which doesn't
11631 ;; include PATH.
11632 (substitute* "dulwich/tests/compat/utils.py"
11633 (("'git'") (string-append "'"
11634 (which "git")
11635 "'")))
11636 (substitute* '("dulwich/tests/test_repository.py"
11637 "dulwich/tests/test_hooks.py")
11638 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11639 (setenv "TEST_RUNNER" "unittest")
11640 (setenv "PYTHONHASHSEED" "random")
11641 #t)))))
11642 (propagated-inputs
11643 `(("python-fastimport" ,python-fastimport)))
11644 (native-inputs
11645 `(("python-mock" ,python-mock)
11646 ("python-geventhttpclient" ,python-geventhttpclient)
11647 ("git" ,git)))
11648 (home-page "https://www.dulwich.io/")
11649 (synopsis "Git implementation in Python")
11650 (description "Dulwich is an implementation of the Git file formats and
11651protocols written in pure Python.")
11652 ;; Can be used with either license.
11653 (license (list license:asl2.0 license:gpl2+))))
11654
11655(define-public python2-dulwich
11656 (package-with-python2 python-dulwich))
11657
11658(define-public python-pbkdf2
11659 (package
11660 (name "python-pbkdf2")
11661 (version "1.3")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "pbkdf2" version))
11666 (sha256
11667 (base32
11668 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11669 (build-system python-build-system)
11670 (arguments
11671 '(#:phases
11672 (modify-phases %standard-phases
11673 (replace 'check
11674 (lambda _
11675 (setenv "PYTHONPATH"
11676 (string-append (getcwd) "/build/lib:"
11677 (getenv "PYTHONPATH")))
ee2bb944 11678 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11679 (propagated-inputs
11680 `(("python-pycrypto" ,python-pycrypto))) ; optional
11681 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11682 (synopsis "Password-based key derivation")
11683 (description "This module implements the password-based key derivation
11684function, PBKDF2, specified in RSA PKCS#5 v2.0.
11685
11686PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11687is part of the RSA Public Key Cryptography Standards series. The provided
11688implementation takes a password or a passphrase and a salt value (and
11689optionally a iteration count, a digest module, and a MAC module) and provides
11690a file-like object from which an arbitrarly-sized key can be read.")
11691 (license license:expat)))
11692
11693(define-public python2-pbkdf2
11694 (package-with-python2 python-pbkdf2))
11695
11696(define-public python-qrcode
11697 (package
11698 (name "python-qrcode")
217ea1a1 11699 (version "6.1")
44d10b1f
RW
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "qrcode" version))
11704 (sha256
217ea1a1 11705 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11706 (build-system python-build-system)
11707 (arguments
11708 ;; FIXME: Tests require packaging 'pymaging'.
11709 '(#:tests? #f))
11710 (propagated-inputs
11711 `(("python-lxml" ,python-lxml) ; for SVG output
11712 ("python-pillow" ,python-pillow) ; for PNG output
11713 ("python-six" ,python-six)))
44d10b1f
RW
11714 (home-page "https://github.com/lincolnloop/python-qrcode")
11715 (synopsis "QR Code image generator")
11716 (description "This package provides a pure Python QR Code generator
11717module. It uses the Python Imaging Library (PIL) to allow for the generation
11718of QR Codes.
11719
11720In addition this package provides a command line tool to generate QR codes and
11721either write these QR codes to a file or do the output as ascii art at the
11722console.")
11723 (license license:bsd-3)))
11724
11725(define-public python2-qrcode
11726 (package-with-python2 python-qrcode))
11727
11728(define-public python-rst2ansi
11729 (package
11730 (name "python-rst2ansi")
11731 (version "0.1.5")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "rst2ansi" version))
11736 (sha256
11737 (base32
11738 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11739 (build-system python-build-system)
11740 (propagated-inputs
11741 `(("python-docutils" ,python-docutils)))
11742 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11743 (synopsis "Convert RST to ANSI-decorated console output")
11744 (description
11745 "Python module dedicated to rendering RST (reStructuredText) documents
11746to ansi-escaped strings suitable for display in a terminal.")
11747 (license license:expat)))
11748
11749(define-public python-ansi2html
11750 (package
11751 (name "python-ansi2html")
11752 (version "1.2.0")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "ansi2html" version))
11757 (sha256
11758 (base32
11759 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11760 (build-system python-build-system)
11761 (native-inputs
11762 `(("python-mock" ,python-mock)
11763 ("python-nose" ,python-nose)))
11764 (propagated-inputs
11765 `(("python-six" ,python-six)))
11766 (home-page "https://github.com/ralphbean/ansi2html")
11767 (synopsis "Convert ANSI-decorated console output to HTML")
11768 (description
11769 "@command{ansi2html} is a Python library and command line utility for
11770convering text with ANSI color codes to HTML or LaTeX.")
11771 (license license:gpl3+)))
11772
11773(define-public python2-ansi2html
11774 (package-with-python2 python-ansi2html))
11775
11776(define-public python-ddt
11777 (package
11778 (name "python-ddt")
11779 (version "1.1.3")
11780 (source
11781 (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "ddt" version))
11784 (sha256
11785 (base32
11786 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11787 (build-system python-build-system)
11788 (native-inputs
11789 `(("python-mock" ,python-mock)
11790 ("python-nose" ,python-nose)))
11791 (propagated-inputs
11792 `(("python-six" ,python-six)
11793 ("python-pyyaml" ,python-pyyaml)))
11794 (home-page "https://github.com/txels/ddt")
11795 (synopsis "Data-Driven Tests")
11796 (description
11797 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11798running it with different test data, and make it appear as multiple test
11799cases.")
11800 (license license:expat)))
11801
11802(define-public python2-ddt
11803 (package-with-python2 python-ddt))
11804
11805(define-public python-pycountry
11806 (package
11807 (name "python-pycountry")
11808 (version "18.5.26")
11809 (source
11810 (origin
11811 (method url-fetch)
11812 (uri (pypi-uri "pycountry" version))
11813 (sha256
11814 (base32
11815 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11816 (build-system python-build-system)
11817 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11818 (synopsis "ISO databases for languages, countries, currencies, etc.")
11819 (description
11820 "@code{pycountry} provides the ISO databases for the standards:
11821@enumerate
11822@item 639-3 (Languages)
11823@item 3166 (Countries)
11824@item 3166-3 (Deleted Countries)
11825@item 3166-2 (Subdivisions of countries)
11826@item 4217 (Currencies)
11827@item 15924 (Scripts)
11828@end enumerate
11829It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11830through a Python API.")
11831 (license license:lgpl2.1+)))
11832
11833(define-public python2-pycountry
11834 (package-with-python2 python-pycountry))
11835
11836(define-public python-pycosat
11837 (package
11838 (name "python-pycosat")
11839 (version "0.6.1")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "pycosat" version))
11844 (sha256
11845 (base32
11846 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11847 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11848 (build-system python-build-system)
11849 (home-page "https://github.com/ContinuumIO/pycosat")
11850 (synopsis "Bindings to picosat (a SAT solver)")
11851 (description
11852 "This package provides efficient Python bindings to @code{picosat} on
11853the C level. When importing pycosat, the @code{picosat} solver becomes part
11854of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11855Problem} (SAT) solver.")
11856 (license license:expat)))
11857
11858(define-public python2-pycosat
11859 (package-with-python2 python-pycosat))
11860
11861(define-public python2-ruamel.ordereddict
11862 (package
11863 (name "python2-ruamel.ordereddict")
11864 (version "0.4.9")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "ruamel.ordereddict" version))
11869 (sha256
11870 (base32
11871 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11872 (build-system python-build-system)
11873 (arguments
11874 `(#:python ,python-2
11875 #:phases
11876 (modify-phases %standard-phases
11877 (delete 'check)
11878 (add-after 'install 'check
11879 (lambda* (#:key inputs outputs #:allow-other-keys)
11880 (add-installed-pythonpath inputs outputs)
f987ac30 11881 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11882 (home-page "https://bitbucket.org/ruamel/ordereddict")
11883 (synopsis "Version of dict that keeps keys in insertion order")
11884 (description
11885 "This is an implementation of an ordered dictionary with @dfn{Key
11886Insertion Order} (KIO: updates of values do not affect the position of the
11887key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11888removed and put at the back). The standard library module @code{OrderedDict},
11889implemented later, implements a subset of @code{ordereddict} functionality.
11890Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11891Order} (KSO, no sorting function can be specified, but a transform can be
11892specified to apply on the key before comparison (e.g. @code{string.lower})).")
11893 (license license:expat)))
11894
11895(define-public python-pypeg2
11896 (package
11897 (name "python-pypeg2")
11898 (version "2.15.2")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "pyPEG2" version))
11903 (sha256
11904 (base32
11905 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11906 (build-system python-build-system)
11907 (propagated-inputs `(("python-lxml" ,python-lxml)))
11908 (arguments
11909 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11910 '(#:tests? #f))
11911 (home-page "https://fdik.org/pyPEG/")
11912 (synopsis "Parsering Expression Grammars in Python")
11913 (description "PyPEG is an intrinsic parser interpreter framework for
11914Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11915parse many formal languages.")
11916 (license license:gpl2)))
11917
11918(define-public python-incremental
11919 (package
11920 (name "python-incremental")
11921 (version "17.5.0")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "incremental" version))
11926 (sha256
11927 (base32
11928 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11929 (build-system python-build-system)
11930 (home-page "https://github.com/hawkowl/incremental")
11931 (synopsis "Library for versioning Python projects")
11932 (description "Incremental is a small library that versions your Python
11933projects.")
11934 (license license:expat)))
11935
11936(define-public python2-incremental
11937 (package-with-python2 python-incremental))
11938
11939(define-public python-invoke
11940 (package
11941 (name "python-invoke")
11942 (home-page "http://www.pyinvoke.org/")
11943 (version "1.1.0")
11944 (source (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "invoke" version))
11947 (sha256
11948 (base32
11949 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11950 (build-system python-build-system)
11951 (arguments
11952 ;; XXX: Requires many dependencies that are not yet in Guix.
11953 `(#:tests? #f))
11954 (synopsis "Pythonic task execution")
11955 (description
11956 "Invoke is a Python task execution tool and library, drawing inspiration
11957from various sources to arrive at a powerful and clean feature set. It is
11958evolved from the Fabric project, but focuses on local and abstract concerns
11959instead of servers and network commands.")
11960 (license license:bsd-3)))
11961
11962(define-public python2-invoke
11963 (package-with-python2 python-invoke))
11964
11965(define-public python-automat
11966 (package
11967 (name "python-automat")
919d80a0 11968 (version "0.7.0")
44d10b1f
RW
11969 (source (origin
11970 (method url-fetch)
11971 (uri (pypi-uri "Automat" version))
11972 (sha256
11973 (base32
919d80a0 11974 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11975 (build-system python-build-system)
11976 ;; We disable the tests because they require python-twisted, while
11977 ;; python-twisted depends on python-automat. Twisted is optional, but the
11978 ;; tests fail if it is not available. Also see
11979 ;; <https://github.com/glyph/automat/issues/71>.
11980 (arguments '(#:tests? #f))
11981 (native-inputs
11982 `(("python-m2r" ,python-m2r)
11983 ("python-setuptools-scm" ,python-setuptools-scm)
11984 ("python-graphviz" ,python-graphviz)))
11985 (propagated-inputs
11986 `(("python-six" ,python-six)
11987 ("python-attrs" ,python-attrs)))
11988 (home-page "https://github.com/glyph/Automat")
11989 (synopsis "Self-service finite-state machines")
11990 (description "Automat is a library for concise, idiomatic Python
11991expression of finite-state automata (particularly deterministic finite-state
11992transducers).")
11993 (license license:expat)))
11994
11995(define-public python2-automat
11996 (package-with-python2 python-automat))
11997
11998(define-public python-m2r
11999 (package
12000 (name "python-m2r")
bcfb8fac 12001 (version "0.2.1")
44d10b1f
RW
12002 (source (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "m2r" version))
12005 (sha256
12006 (base32
bcfb8fac 12007 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12008 (build-system python-build-system)
12009 (propagated-inputs
12010 `(("python-docutils" ,python-docutils)
12011 ("python-mistune" ,python-mistune)))
12012 (native-inputs
12013 `(("python-pygments" ,python-pygments)
12014 ("python-mock" ,python-mock)))
12015 (home-page "https://github.com/miyakogi/m2r")
12016 (synopsis "Markdown to reStructuredText converter")
12017 (description "M2R converts a markdown file including reST markups to valid
12018reST format.")
12019 (license license:expat)))
12020
12021(define-public python2-m2r
12022 (package-with-python2 python-m2r))
12023
12024(define-public python-constantly
12025 (package
12026 (name "python-constantly")
12027 (version "15.1.0")
12028 (source (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "constantly" version))
12031 (sha256
12032 (base32
12033 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12034 (build-system python-build-system)
12035 (home-page "https://github.com/twisted/constantly")
12036 (synopsis "Symbolic constants in Python")
12037 (description "Constantly is a Python library that provides symbolic
12038constant support. It includes collections and constants with text, numeric,
12039and bit flag values.")
12040 (license license:expat)))
12041
12042(define-public python2-constantly
12043 (package-with-python2 python-constantly))
12044
12045(define-public python-attrs
12046 (package
12047 (name "python-attrs")
67458e20 12048 (version "19.1.0")
44d10b1f
RW
12049 (source (origin
12050 (method url-fetch)
12051 (uri (pypi-uri "attrs" version))
12052 (sha256
12053 (base32
67458e20 12054 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12055 (build-system python-build-system)
12056 (arguments
12057 `(#:modules ((guix build utils)
12058 (guix build python-build-system)
12059 (ice-9 ftw)
12060 (srfi srfi-1)
12061 (srfi srfi-26))
12062 #:phases (modify-phases %standard-phases
12063 (replace 'check
12064 (lambda _
12065 (let ((cwd (getcwd)))
12066 (setenv "PYTHONPATH"
12067 (string-append
12068 cwd "/build/"
12069 (find (cut string-prefix? "lib" <>)
12070 (scandir (string-append cwd "/build")))
12071 ":"
12072 (getenv "PYTHONPATH")))
12073 (invoke "python" "-m" "pytest")))))))
12074 (native-inputs
12075 `(("python-coverage" ,python-coverage)
12076 ("python-hypothesis" ,python-hypothesis)
12077 ("python-pympler" ,python-pympler)
12078 ("python-pytest" ,python-pytest)
12079 ("python-six" ,python-six)
12080 ("python-sphinx" ,python-sphinx)
12081 ("python-zope-interface" ,python-zope-interface)))
12082 (home-page "https://github.com/python-attrs/attrs/")
12083 (synopsis "Attributes without boilerplate")
12084 (description "@code{attrs} is a Python package with class decorators that
12085ease the chores of implementing the most common attribute-related object
12086protocols.")
12087 (license license:expat)))
12088
12089(define-public python2-attrs
12090 (package-with-python2 python-attrs))
12091
12092(define-public python-attrs-bootstrap
12093 (package
12094 (inherit python-attrs)
12095 (name "python-attrs-bootstrap")
12096 ;; Keep this on a fixed version so python-attrs can be updated without
12097 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
12098 (version "17.4.0")
12099 (source (origin
12100 (method url-fetch)
12101 (uri (pypi-uri "attrs" version))
12102 (sha256
12103 (base32
12104 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
12105 (native-inputs `())
12106 (arguments `(#:tests? #f))))
12107
12108(define-public python2-attrs-bootstrap
12109 (package-with-python2 python-attrs-bootstrap))
12110
12111(define-public python2-cliapp
12112 (package
12113 (name "python2-cliapp")
9064b84e 12114 (version "1.20180812.1")
44d10b1f
RW
12115 (source
12116 (origin
12117 (method url-fetch)
12118 (uri (string-append
12119 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12120 version ".tar.gz"))
12121 (sha256
12122 (base32
9064b84e 12123 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12124 (build-system python-build-system)
12125 (arguments
12126 `(#:python ,python-2
12127 #:phases
12128 (modify-phases %standard-phases
12129 ;; check phase needs to be run before the build phase. If not,
12130 ;; coverage-test-runner looks for tests for the built source files,
12131 ;; and fails.
12132 (delete 'check)
12133 (add-before 'build 'check
12134 (lambda _
12135 ;; Disable python3 tests
12136 (substitute* "check"
12137 (("python3") "# python3"))
6c826d32 12138 (invoke "./check"))))))
44d10b1f
RW
12139 (native-inputs
12140 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12141 ("python2-pep8" ,python2-pep8)))
12142 (propagated-inputs
12143 `(("python2-pyaml" ,python2-pyaml)))
12144 (home-page "https://liw.fi/cliapp/")
12145 (synopsis "Python framework for command line programs")
12146 (description "@code{python2-cliapp} is a python framework for
12147command line programs. It contains the typical stuff such programs
12148need to do, such as parsing the command line for options, and
12149iterating over input files.")
12150 (license license:gpl2+)))
12151
12152(define-public python2-ttystatus
12153 (package
12154 (name "python2-ttystatus")
e516a9c2 12155 (version "0.36")
44d10b1f
RW
12156 (source
12157 (origin
12158 (method url-fetch)
12159 (uri (string-append
12160 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12161 version ".tar.gz"))
12162 (sha256
12163 (base32
e516a9c2 12164 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12165 (build-system python-build-system)
12166 (native-inputs
12167 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12168 ("python2-pep8" ,python2-pep8)))
12169 (arguments
12170 `(#:python ,python-2
12171 #:phases
12172 (modify-phases %standard-phases
12173 ;; check phase needs to be run before the build phase. If not,
12174 ;; coverage-test-runner looks for tests for the built source files,
12175 ;; and fails.
12176 (delete 'check)
12177 (add-before 'build 'check
cbeee881 12178 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12179 (home-page "https://liw.fi/ttystatus/")
12180 (synopsis "Python library for showing progress reporting and
12181status updates on terminals")
12182 (description "@code{python2-ttystatus} is a python library for
12183showing progress reporting and status updates on terminals, for
12184command line programs. Output is automatically adapted to the width
12185of the terminal: truncated if it does not fit, and resized if the
12186terminal size changes.")
12187 (license license:gpl3+)))
12188
12189(define-public python2-tracing
12190 (package
12191 (name "python2-tracing")
12192 (version "0.10")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (string-append
12197 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12198 version ".tar.gz"))
12199 (sha256
12200 (base32
12201 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12202 (build-system python-build-system)
12203 (arguments
12204 `(#:python ,python-2))
12205 (home-page "https://liw.fi/tracing/")
12206 (synopsis "Python debug logging helper")
12207 (description "@code{python2-tracing} is a python library for
12208logging debug messages. It provides a way to turn debugging messages
12209on and off, based on the filename they occur in. It is much faster
12210than using @code{logging.Filter} to accomplish the same thing, which
12211matters when code is run in production mode. The actual logging still
12212happens using the @code{logging} library.")
12213 (license license:gpl3+)))
12214
12215(define-public python2-larch
12216 (package
12217 (name "python2-larch")
12218 (version "1.20151025")
12219 (source
12220 (origin
12221 (method url-fetch)
12222 (uri (string-append
12223 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12224 version ".tar.gz"))
12225 (patches (search-patches
12226 "python2-larch-coverage-4.0a6-compatibility.patch"))
12227 (sha256
12228 (base32
12229 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12230 (build-system python-build-system)
12231 (arguments
12232 `(#:python ,python-2
12233 #:phases
12234 (modify-phases %standard-phases
12235 ;; check phase needs to be run before the build phase. If not,
12236 ;; coverage-test-runner looks for tests for the built source files,
12237 ;; and fails.
12238 (delete 'check)
12239 (add-before 'build 'check
204ad455 12240 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12241 (native-inputs
12242 `(("cmdtest" ,cmdtest)
12243 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12244 (propagated-inputs
12245 `(("python2-tracing" ,python2-tracing)))
12246 (home-page "https://liw.fi/larch/")
12247 (synopsis "Python copy-on-write B-tree library")
12248 (description "@code{python2-larch} is an implementation of
12249particular kind of B-tree, based on research by Ohad Rodeh. See
12250@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12251on the data structure.
12252
12253The distinctive feature of this B-tree is that a node is never
12254(conceptually) modified. Instead, all updates are done by
12255copy-on-write. This makes it easy to clone a tree, and modify only the
12256clone, while other processes access the original tree.")
12257 (license license:gpl3+)))
12258
12259(define-public python-astroid
12260 (package
12261 (name "python-astroid")
12262 (version "2.1.0")
12263 (source
12264 (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "astroid" version))
12267 (sha256
12268 (base32
12269 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12270 (build-system python-build-system)
12271 (propagated-inputs
12272 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12273 ("python-six" ,python-six)
12274 ("python-wrapt" ,python-wrapt)))
12275 (native-inputs
12276 `(("python-dateutil" ,python-dateutil)
12277 ("python-nose" ,python-nose)
12278 ("python-pytest" ,python-pytest)
12279 ("python-pytest-runner" ,python-pytest-runner)))
12280 (arguments
12281 `(#:phases
12282 (modify-phases %standard-phases
12283 (add-after 'unpack 'remove-spurious-test
12284 (lambda _
12285 ;; This can be removed after upgrading from python-3.7
12286 ;; https://github.com/PyCQA/astroid/issues/593
12287 ;; https://bugs.python.org/issue34056
12288 (delete-file "astroid/tests/unittest_modutils.py")
12289 #t))
12290 (replace 'check
12291 (lambda _
12292 (invoke "pytest" "astroid"))))))
12293 (home-page "https://github.com/PyCQA/astroid")
12294 (synopsis "Common base representation of python source code for pylint and
12295other projects")
12296 (description "@code{python-astroid} provides a common base representation
12297of python source code for projects such as pychecker, pyreverse, pylint, etc.
12298
12299It provides a compatible representation which comes from the _ast module. It
12300rebuilds the tree generated by the builtin _ast module by recursively walking
12301down the AST and building an extended ast. The new node classes have
12302additional methods and attributes for different usages. They include some
12303support for static inference and local name scopes. Furthermore, astroid
12304builds partial trees by inspecting living objects.")
12305 (license license:lgpl2.1+)
12306 (properties `((python2-variant . ,(delay python2-astroid))))))
12307
12308(define-public python2-astroid
12309 (let ((base (package-with-python2
12310 (strip-python2-variant python-astroid))))
12311 (package (inherit base)
12312 ;; Version 2.x removes python2 support.
12313 (version "1.6.5")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "astroid" version))
12318 (sha256
12319 (base32
12320 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12321 (arguments
12322 (substitute-keyword-arguments (package-arguments base)
12323 ((#:phases phases)
12324 `(modify-phases ,phases
12325 (add-after 'unpack 'remove-spurious-test
12326 (lambda _
12327 ;; https://github.com/PyCQA/astroid/issues/276
12328 (delete-file "astroid/tests/unittest_brain.py")
12329 #t))
12330 (replace 'check
12331 (lambda _
12332 (invoke"python" "-m" "unittest" "discover"
12333 "-p" "unittest*.py")))))))
12334 (native-inputs `())
12335 (propagated-inputs
12336 `(("python2-backports-functools-lru-cache"
12337 ,python2-backports-functools-lru-cache)
12338 ("python2-enum34" ,python2-enum34)
12339 ("python2-singledispatch" ,python2-singledispatch)
12340 ,@(package-propagated-inputs base))))))
12341
12342(define-public python-isort
12343 (package
12344 (name "python-isort")
e2227b6a 12345 (version "4.3.4")
44d10b1f
RW
12346 (source
12347 (origin
e2227b6a
EF
12348 (method git-fetch)
12349 (uri (git-reference
12350 ;; Tests pass only from the Github sources
12351 (url "https://github.com/timothycrosley/isort")
12352 (commit version)))
12353 (file-name (git-file-name name version))
44d10b1f
RW
12354 (sha256
12355 (base32
e2227b6a 12356 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12357 (build-system python-build-system)
12358 (native-inputs
12359 `(("python-mock" ,python-mock)
12360 ("python-pytest" ,python-pytest)))
12361 (home-page "https://github.com/timothycrosley/isort")
12362 (synopsis "Python utility/library to sort python imports")
12363 (description "@code{python-isort} is a python utility/library to sort
12364imports alphabetically, and automatically separated into sections. It
12365provides a command line utility, a python library and plugins for various
12366editors.")
e2227b6a
EF
12367 (license license:expat)
12368 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12369
12370(define-public python2-isort
e2227b6a
EF
12371 (let ((base (package-with-python2
12372 (strip-python2-variant python-isort))))
12373 (package (inherit base)
12374 (native-inputs
12375 `(("python2-futures" ,python2-futures)
12376 ,@(package-native-inputs base))))))
44d10b1f
RW
12377
12378(define-public python2-backports-functools-lru-cache
12379 (package
12380 (name "python2-backports-functools-lru-cache")
12381 (version "1.5")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 ;; only the pypi tarballs contain the necessary metadata
12386 (uri (pypi-uri "backports.functools_lru_cache" version))
12387 (sha256
12388 (base32
12389 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12390 (build-system python-build-system)
12391 (native-inputs
12392 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12393 (arguments
12394 `(#:python ,python-2))
12395 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12396 (synopsis "Backport of functools.lru_cache from Python 3.3")
12397 (description "@code{python2-backports-functools-lru-cache} is a backport
12398of @code{functools.lru_cache} from python 3.3.")
12399 (license license:expat)))
12400
12401(define-public python-configparser
12402 (package
12403 (name "python-configparser")
12404 (version "3.5.0")
12405 (source
12406 (origin
12407 (method url-fetch)
12408 (uri (string-append
12409 "https://bitbucket.org/ambv/configparser/get/"
12410 version ".tar.bz2"))
12411 (file-name (string-append name "-" version ".tar.gz"))
12412 (sha256
12413 (base32
12414 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
12415 (build-system python-build-system)
809f003f 12416 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12417 (synopsis "Backport of configparser from python 3.5")
12418 (description "@code{python-configparser} is a backport of
12419@code{configparser} from Python 3.5 so that it can be used directly
12420in other versions.")
12421 (license license:expat)))
12422
12423(define-public python2-configparser
12424 (package-with-python2 python-configparser))
12425
12426(define-public python-mando
12427 (package
12428 (name "python-mando")
12429 (version "0.6.4")
12430 (source (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "mando" version))
12433 (sha256
12434 (base32
12435 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12436 (build-system python-build-system)
12437 (propagated-inputs
12438 `(("python-rst2ansi" ,python-rst2ansi)
12439 ("python-six" ,python-six)))
12440 (native-inputs
12441 `(("python-pytest" ,python-pytest)))
12442 (home-page "https://mando.readthedocs.org/")
12443 (synopsis
12444 "Wrapper around argparse, allowing creation of complete CLI applications")
12445 (description
12446 "This package is a wrapper around argparse, allowing you to write complete CLI
12447applications in seconds while maintaining all the flexibility.")
12448 (license license:expat)))
12449
12450(define-public python2-mando
12451 (package-with-python2 python-mando))
12452
70daf82f
RW
12453(define-public python2-argparse
12454 (package
12455 (name "python2-argparse")
12456 (version "1.4.0")
12457 (source
12458 (origin
12459 (method url-fetch)
12460 (uri (pypi-uri "argparse" version))
12461 (sha256
12462 (base32
12463 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12464 (build-system python-build-system)
12465 (arguments
12466 `(#:python ,python-2))
12467 (home-page "https://github.com/ThomasWaldmann/argparse/")
12468 (synopsis "Python command-line parsing library")
12469 (description
12470 "This package is mostly for people who want to have @code{argparse} on
12471older Pythons because it was not part of the standard library back then.")
12472 (license license:psfl)))
12473
44d10b1f
RW
12474(define-public python-fudge
12475 (package
12476 (name "python-fudge")
12477 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12478 ;; package, which is currently the only use of this package.
12479 (version "0.9.6")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "fudge" version))
12484 (sha256
12485 (base32
12486 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12487 (build-system python-build-system)
12488 (arguments
12489 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12490 (home-page "https://github.com/fudge-py/fudge")
12491 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12492 (description
12493 "Fudge is a Python module for using fake objects (mocks and stubs) to
12494test real ones.
12495
12496In readable Python code, you declare the methods available on your fake object
12497and how they should be called. Then you inject that into your application and
12498start testing. This declarative approach means you don’t have to record and
12499playback actions and you don’t have to inspect your fakes after running code.
12500If the fake object was used incorrectly then you’ll see an informative
12501exception message with a traceback that points to the culprit.")
12502 (license license:expat)))
12503
12504(define-public python2-fudge
12505 (package-with-python2 python-fudge))
12506
12507(define-public python-mwclient
12508 (package
12509 (name "python-mwclient")
12510 (version "0.8.4")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 ;; The PyPI version wouldn't contain tests.
12515 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12516 "v" version ".tar.gz"))
12517 (file-name (string-append name "-" version ".tar.gz"))
12518 (sha256
12519 (base32
12520 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12521 (build-system python-build-system)
12522 (propagated-inputs
12523 `(("python-requests" ,python-requests)
12524 ("python-requests-oauthlib"
12525 ,python-requests-oauthlib)
12526 ("python-six" ,python-six)))
12527 (native-inputs
12528 `(("python-mock" ,python-mock)
12529 ("python-pytest" ,python-pytest)
12530 ("python-pytest-pep8" ,python-pytest-pep8)
12531 ("python-pytest-cache" ,python-pytest-cache)
12532 ("python-pytest-cov" ,python-pytest-cov)
12533 ("python-responses" ,python-responses)))
12534 (home-page "https://github.com/btongminh/mwclient")
12535 (synopsis "MediaWiki API client")
12536 (description "This package provides a MediaWiki API client.")
12537 (license license:expat)))
12538
12539(define-public python2-mwclient
12540 (package-with-python2 python-mwclient))
12541
12542(define-public python-utils
12543 (package
12544 (name "python-utils")
12545 (version "2.1.0")
12546 (source (origin
12547 (method url-fetch)
12548 (uri (pypi-uri "python-utils" version))
12549 (sha256
12550 (base32
12551 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12552 (build-system python-build-system)
12553 (native-inputs
12554 `(("pytest-runner" ,python-pytest-runner)
12555 ("pytest" ,python-pytest)
12556 ("six" ,python-six)))
12557 (home-page "https://github.com/WoLpH/python-utils")
12558 (synopsis "Convenient utilities not included with the standard Python install")
12559 (description
12560 "Python Utils is a collection of small Python functions and classes which
12561make common patterns shorter and easier.")
12562 (license license:bsd-2)))
12563
12564(define-public python2-utils
12565 (package-with-python2 python-utils))
12566
44d10b1f
RW
12567(define-public python-diff-match-patch
12568 (package
12569 (name "python-diff-match-patch")
12570 (version "20121119")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "diff-match-patch" version))
12575 (sha256
12576 (base32
12577 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12578 (build-system python-build-system)
12579 (home-page "https://code.google.com/p/google-diff-match-patch")
12580 (synopsis "Synchronize plain text")
12581 (description "Diff Match and Patch libraries offer robust algorithms to
12582perform the operations required for synchronizing plain text.")
12583 (license license:asl2.0)))
12584
12585(define-public python2-diff-match-patch
12586 (package-with-python2 python-diff-match-patch))
12587
12588(define-public python-dirsync
12589 (package
12590 (name "python-dirsync")
12591 (version "2.2.3")
12592 (source
12593 (origin
12594 (method url-fetch)
12595 (uri (pypi-uri "dirsync" version))
12596 (sha256
12597 (base32
12598 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12599 (build-system python-build-system)
12600 (propagated-inputs
12601 `(("six" ,python-six)))
12602 (home-page "https://bitbucket.org/tkhyn/dirsync")
12603 (synopsis "Advanced directory tree synchronisation tool")
12604 (description "Advanced directory tree synchronisation tool.")
12605 (license license:expat)))
12606
12607(define-public python2-dirsync
12608 (package-with-python2 python-dirsync))
12609
12610(define-public python-levenshtein
12611 (package
12612 (name "python-levenshtein")
12613 (version "0.12.0")
12614 (source
12615 (origin
12616 (method url-fetch)
12617 (uri (pypi-uri "python-Levenshtein" version))
12618 (sha256
12619 (base32
12620 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12621 (build-system python-build-system)
12622 (home-page "https://github.com/ztane/python-Levenshtein")
12623 (synopsis "Fast computation of Levenshtein distance and string similarity")
12624 (description
12625 "The Levenshtein Python C extension module contains functions for fast computation of
12626@enumerate
12627@item Levenshtein (edit) distance, and edit operations
12628@item string similarity
12629@item approximate median strings, and generally string averaging
12630@item string sequence and set similarity
12631@end enumerate
12632It supports both normal and Unicode strings.")
12633 (license license:gpl2+)))
12634
12635(define-public python2-levenshtein
12636 (package-with-python2 python-levenshtein))
12637
12638(define-public python-scandir
12639 (package
12640 (name "python-scandir")
12641 (version "1.9.0")
12642 (source
12643 (origin
12644 (method url-fetch)
12645 (uri (pypi-uri "scandir" version))
12646 (sha256
12647 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12648 (build-system python-build-system)
12649 (arguments
12650 `(#:phases (modify-phases %standard-phases
12651 (replace 'check
12652 (lambda _
12653 (invoke "python" "test/run_tests.py"))))))
12654 (home-page "https://github.com/benhoyt/scandir")
12655 (synopsis "Directory iteration function")
12656 (description
12657 "Directory iteration function like os.listdir(), except that instead of
12658returning a list of bare filenames, it yields DirEntry objects that include
12659file type and stat information along with the name. Using scandir() increases
12660the speed of os.walk() by 2-20 times (depending on the platform and file
12661system) by avoiding unnecessary calls to os.stat() in most cases.
12662
12663This package is part of the Python standard library since version 3.5.")
12664 (license license:bsd-3)))
12665
12666(define-public python2-scandir
12667 (package-with-python2 python-scandir))
12668
12669(define-public python2-stemming
12670 (package
12671 (name "python2-stemming")
12672 (version "1.0.1")
12673 (source
12674 (origin
12675 (method url-fetch)
12676 (uri (pypi-uri "stemming" version))
12677 (sha256
12678 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12679 (build-system python-build-system)
12680 (arguments
12681 `(#:python ,python-2))
12682 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12683 (synopsis "Python implementations of various stemming algorithms")
12684 (description
12685 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12686stemming algorithms for English. These implementations are straightforward and
12687efficient, unlike some Python versions of the same algorithms available on the
12688Web. This package is an extraction of the stemming code included in the Whoosh
12689search engine.")
12690 (license license:public-domain)))
12691
12692(define-public python-factory-boy
12693 (package
12694 (name "python-factory-boy")
12695 (version "2.8.1")
12696 (source
12697 (origin
12698 (method url-fetch)
12699 (uri (pypi-uri "factory_boy" version))
12700 (sha256
12701 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12702 (build-system python-build-system)
12703 (arguments
12704 ;; Tests are not included in the tarball.
12705 `(#:tests? #f))
12706 (propagated-inputs
12707 `(("faker" ,python-faker)))
12708 (home-page "https://github.com/benhoyt/scandir")
12709 (synopsis "Versatile test fixtures replacement")
12710 (description
12711 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12712
12713As a fixtures replacement tool, it aims to replace static, hard to maintain
12714fixtures with easy-to-use factories for complex object.
12715
12716Instead of building an exhaustive test setup with every possible combination
12717of corner cases, factory_boy allows you to use objects customized for the
12718current test, while only declaring the test-specific fields")
12719 (license license:expat)))
12720
12721(define-public python2-factory-boy
12722 (package-with-python2 python-factory-boy))
12723
12724(define-public python-translate-toolkit
12725 (package
12726 (name "python-translate-toolkit")
12727 (version "2.1.0")
12728 (source
12729 (origin
12730 (method url-fetch)
12731 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12732 (sha256
12733 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12734 (build-system python-build-system)
12735 (native-inputs
12736 `(("python-pytest" ,python-pytest)
12737 ("python-sphinx" ,python-sphinx)))
12738 (propagated-inputs
12739 `(("python-babel" ,python-babel)
12740 ("python-beautifulsoup4" ,python-beautifulsoup4)
12741 ("python-chardet" ,python-chardet)
12742 ("python-diff-match-patch" ,python-diff-match-patch)
12743 ("python-levenshtein" ,python-levenshtein)
12744 ("python-lxml" ,python-lxml)
12745 ("python-six" ,python-six)
12746 ("python-vobject" ,python-vobject)
12747 ("python-pyyaml" ,python-pyyaml)))
12748 (arguments
12749 ;; TODO: tests are not run, because they end with
12750 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12751 ;; 'parse_funcs'
12752 ;; during test setup.
12753 `(#:tests? #f))
18919cf9 12754 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12755 (synopsis "Tools and API for translation and localization engineering")
12756 (description
12757 "Tools and API for translation and localization engineering. It contains
12758several utilities, as well as an API for building localization tools.")
12759 (license license:gpl2+)))
12760
12761(define-public python2-translate-toolkit
12762 (package-with-python2 python-translate-toolkit))
12763
12764(define-public python-packaging
12765 (package
12766 (name "python-packaging")
5e5cdac0 12767 (version "19.0")
44d10b1f
RW
12768 (source
12769 (origin
12770 (method url-fetch)
12771 (uri (pypi-uri "packaging" version))
12772 (sha256
12773 (base32
5e5cdac0 12774 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12775 (build-system python-build-system)
12776 (arguments
12777 `(#:phases (modify-phases %standard-phases
12778 (replace 'check
12779 (lambda _ (invoke "py.test" "-vv"))))))
12780 (native-inputs
12781 `(("python-pretend" ,python-pretend)
12782 ("python-pytest" ,python-pytest)))
12783 (propagated-inputs
12784 `(("python-pyparsing" ,python-pyparsing)
12785 ("python-six" ,python-six)))
12786 (home-page "https://github.com/pypa/packaging")
12787 (synopsis "Core utilities for Python packages")
12788 (description "Packaging is a Python module for dealing with Python packages.
12789It offers an interface for working with package versions, names, and dependency
12790information.")
12791 ;; From 'LICENSE': This software is made available under the terms of
12792 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12793 ;; Contributions to this software is made under the terms of *both* these
12794 ;; licenses.
12795 (license (list license:asl2.0 license:bsd-2))))
12796
12797(define-public python2-packaging
12798 (package-with-python2 python-packaging))
12799
12800(define-public python-relatorio
12801 (package
12802 (name "python-relatorio")
12803 (version "0.8.0")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "relatorio" version))
12808 (sha256
12809 (base32
12810 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12811 (build-system python-build-system)
12812 (propagated-inputs
12813 `(("python-lxml" ,python-lxml)
12814 ("python-genshi" ,python-genshi)))
12815 (native-inputs
12816 `(("python-magic" ,python-magic)))
12817 (home-page "https://relatorio.tryton.org/")
12818 (synopsis "Templating library able to output ODT and PDF files")
12819 (description "Relatorio is a templating library which provides a way to
12820easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12821for more filetypes can be easily added by creating plugins for them.")
12822 (license license:gpl3+)))
12823
12824(define-public python2-relatorio
12825 (package-with-python2 python-relatorio))
12826
12827(define-public python-radon
12828 (package
12829 (name "python-radon")
12830 (version "2.2.0")
12831 (source
12832 (origin
12833 (method url-fetch)
12834 (uri (pypi-uri "radon" version))
12835 (sha256
12836 (base32
12837 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12838 (build-system python-build-system)
12839 (arguments
12840 `(#:phases (modify-phases %standard-phases
12841 (replace 'check
12842 (lambda _
12843 (invoke "python" "radon/tests/run.py"))))))
12844 (propagated-inputs
12845 `(("python-colorama" ,python-colorama)
12846 ("python-flake8-polyfill" ,python-flake8-polyfill)
12847 ("python-mando" ,python-mando)))
12848 (native-inputs
12849 `(("python-pytest" ,python-pytest)
12850 ("python-pytest-mock" ,python-pytest-mock)))
12851 (home-page "https://radon.readthedocs.org/")
12852 (synopsis "Code Metrics in Python")
12853 (description "Radon is a Python tool which computes various code metrics.
12854Supported metrics are:
12855@itemize @bullet
12856@item raw metrics: SLOC, comment lines, blank lines, &c.
12857@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12858@item Halstead metrics (all of them)
12859@item the Maintainability Index (a Visual Studio metric)
12860@end itemize")
12861 (license license:expat)))
12862
12863(define-public python2-radon
12864 (package-with-python2 python-radon))
12865
12866(define-public python-sure
12867 (package
12868 (name "python-sure")
12869 (version "1.4.11")
12870 (source
12871 (origin
12872 (method url-fetch)
12873 (uri (pypi-uri "sure" version))
12874 (sha256
12875 (base32
12876 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12877 (build-system python-build-system)
12878 (propagated-inputs
12879 `(("python-mock" ,python-mock)
12880 ("python-six" ,python-six)))
12881 (native-inputs
12882 `(("python-nose" ,python-nose)))
12883 (home-page "https://github.com/gabrielfalcao/sure")
12884 (synopsis "Automated testing library in python for python")
12885 (description
12886 "Sure is a python library that leverages a DSL for writing assertions.
12887Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12888 (license license:gpl3+)))
12889
12890(define-public python2-sure
12891 (package-with-python2 python-sure))
12892
12893(define-public python2-couleur
12894 ;; This package does not seem to support python3 at all, hence,
12895 ;; only the python2 variant definition is provided.
12896 (package
12897 (name "python2-couleur")
12898 (version "0.6.2")
12899 (source
12900 (origin
12901 (method url-fetch)
12902 (uri (pypi-uri "couleur" version))
12903 (sha256
12904 (base32
12905 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12906 (build-system python-build-system)
12907 (arguments
12908 `(#:python ,python-2))
12909 (home-page "https://github.com/gabrielfalcao/couleur")
12910 (synopsis
12911 "ANSI terminal tool for python, colored shell and other handy fancy features")
12912 (description
12913 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12914terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12915 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12916 ;; https://github.com/gabrielfalcao/couleur/issues/11
12917 (license license:lgpl3+)))
12918
12919(define-public python-misaka
12920 (package
12921 (name "python-misaka")
0dcb3412 12922 (version "2.1.1")
44d10b1f
RW
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "misaka" version))
12927 (sha256
12928 (base32
0dcb3412 12929 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12930 (build-system python-build-system)
12931 (arguments
12932 `(;; Line 37 of setup.py calls self.run_command('develop')
12933 ;; in the 'check' phase. This command seems to be trying
12934 ;; to write to
12935 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12936 ;; for which it does not have the permission to write.
12937 #:tests? #f))
12938 (propagated-inputs
12939 `(("python-cffi" ,python-cffi)))
12940 (home-page "https://github.com/FSX/misaka")
12941 (synopsis "Python binding for Hoedown")
12942 (description
12943 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12944library written in C. It features a fast HTML renderer and functionality to make custom
12945renderers (e.g. man pages or LaTeX).")
12946 (license license:expat)))
12947
12948(define-public python2-misaka
12949 (package-with-python2 python-misaka))
12950
12951(define-public python2-steadymark
12952 ;; This is forced into being a python2 only variant
12953 ;; due to its dependence on couleur that has no support
12954 ;; for python3
12955 (package
12956 (name "python2-steadymark")
12957 (version "0.7.3")
12958 (source
12959 (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "steadymark" version))
12962 (sha256
12963 (base32
12964 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12965 (build-system python-build-system)
12966 (native-inputs
12967 `(("python-couleur" ,python2-couleur)
12968 ("python-sure" ,python2-sure)
12969 ("python-misaka" ,python2-misaka)))
12970 (arguments
12971 `(#:python ,python-2
12972 #:phases
12973 (modify-phases %standard-phases
12974 (add-before 'build 'patch-setup-py
12975 (lambda _
12976 ;; Update requirements from dependency==version
12977 ;; to dependency>=version
12978 (substitute* "setup.py"
12979 (("==") ">="))
12980 #t)))))
12981 (home-page "https://github.com/gabrielfalcao/steadymark")
12982 (synopsis "Markdown-based test runner for python")
12983 (description
12984 "@code{Steadymark} allows documentation to be written in github-flavoured
12985markdown. The documentation may contain snippets of code surrounded by python
12986code blocks and @code{Steadymark} will find these snippets and run them, making
12987sure that there are no old malfunctional examples in the documentation examples.")
12988 (license license:expat)))
12989
12990(define-public python-jsonpointer
12991 (package
12992 (name "python-jsonpointer")
12993 (version "1.10")
12994 (source
12995 (origin
12996 (method url-fetch)
12997 (uri (pypi-uri "jsonpointer" version))
12998 (sha256
12999 (base32
13000 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13001 (build-system python-build-system)
13002 (home-page "https://github.com/stefankoegl/python-json-pointer")
13003 (synopsis "Identify specific nodes in a JSON document")
13004 (description "@code{jsonpointer} allows you to access specific nodes
13005by path in a JSON document (see RFC 6901).")
13006 (license license:bsd-3)))
13007
13008(define-public python2-jsonpointer
13009 (package-with-python2 python-jsonpointer))
13010
13011(define-public python-jsonpatch
13012 (package
13013 (name "python-jsonpatch")
13014 (version "1.16")
13015 (source
13016 (origin
13017 (method url-fetch)
13018 ;; pypi version lacks tests.js
13019 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13020 "archive/v" version ".tar.gz"))
13021 (file-name (string-append name "-" version ".tar.gz"))
13022 (sha256
13023 (base32
13024 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13025 (build-system python-build-system)
13026 (native-inputs
13027 `(("python-jsonpointer" ,python-jsonpointer)))
13028 (home-page "https://github.com/stefankoegl/python-json-patch")
13029 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13030 (description "@code{jsonpatch} is a library and program that allows
13031applying JSON Patches according to RFC 6902.")
13032 (license license:bsd-3)))
13033
13034(define-public python2-jsonpatch
13035 (package-with-python2 python-jsonpatch))
13036
13037(define-public python-jsonpatch-0.4
13038 (package (inherit python-jsonpatch)
13039 (name "python-jsonpatch")
13040 (version "0.4")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13045 "archive/v" version ".tar.gz"))
13046 (file-name (string-append name "-" version ".tar.gz"))
13047 (sha256
13048 (base32
13049 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13050
13051(define-public python2-jsonpatch-0.4
13052 (package-with-python2 python-jsonpatch-0.4))
13053
13054(define-public python-rfc3986
13055 (package
13056 (name "python-rfc3986")
13057 (version "1.1.0")
13058 (source (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "rfc3986" version))
13061 (sha256
13062 (base32
13063 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:modules ((guix build utils)
13067 (guix build python-build-system)
13068 (ice-9 ftw)
13069 (srfi srfi-1)
13070 (srfi srfi-26))
13071 #:phases
13072 (modify-phases %standard-phases
13073 (replace 'check
13074 (lambda _
13075 (let ((cwd (getcwd)))
13076 (setenv "PYTHONPATH"
13077 (string-append cwd "/build/"
13078 (find (cut string-prefix? "lib" <>)
13079 (scandir (string-append cwd "/build")))
13080 ":"
13081 (getenv "PYTHONPATH")))
13082 (invoke "pytest" "-v")))))))
13083 (native-inputs
13084 `(("python-pytest" ,python-pytest)))
13085 (home-page "https://rfc3986.readthedocs.io/")
13086 (synopsis "Parse and validate URI references")
13087 (description
13088 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13089validation and authority parsing. This module also supports RFC@tie{}6874
13090which adds support for zone identifiers to IPv6 addresses.")
13091 (license license:asl2.0)))
13092
13093(define-public python2-rfc3986
13094 (package-with-python2 python-rfc3986))
13095
13096(define-public python-rfc3987
13097 (package
13098 (name "python-rfc3987")
13099 (version "1.3.7")
13100 (source
13101 (origin
13102 (method url-fetch)
13103 (uri (pypi-uri "rfc3987" version))
13104 (sha256
13105 (base32
13106 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13107 (build-system python-build-system)
13108 (home-page "https://pypi.python.org/pypi/rfc3987")
13109 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13110 (description "@code{rfc3987} provides routines for parsing and
13111validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13112 (license license:gpl3+)))
13113
13114(define-public python2-rfc3987
13115 (package-with-python2 python-rfc3987))
13116
13117(define-public python-validate-email
13118 (package
13119 (name "python-validate-email")
13120 (version "1.3")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "validate_email" version))
13125 (sha256
13126 (base32
13127 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13128 (build-system python-build-system)
13129 (home-page "https://github.com/syrusakbary/validate_email")
13130 (synopsis "Verifies if an email address is valid and really exists")
13131 (description "@code{validate_email} can be used to verify if an email
13132address is valid and really exists.")
13133 (license license:lgpl3+)))
13134
13135(define-public python2-validate-email
13136 (package-with-python2 python-validate-email))
13137
13138(define-public python-flex
13139 (package
13140 (name "python-flex")
13141 (version "6.10.0")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "flex" version))
13146 (sha256
13147 (base32
13148 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13149 (build-system python-build-system)
13150 (propagated-inputs
13151 `(("python-click" ,python-click)
13152 ("python-iso8601" ,python-iso8601)
13153 ("python-jsonpointer" ,python-jsonpointer)
13154 ("python-pyyaml" ,python-pyyaml)
13155 ("python-requests" ,python-requests)
13156 ("python-rfc3987" ,python-rfc3987)
13157 ("python-six" ,python-six)
13158 ("python-validate-email" ,python-validate-email)))
13159 (home-page "https://github.com/pipermerriam/flex")
13160 (synopsis "Validates Swagger schemata")
13161 (description "@code{flex} can be used to validate Swagger schemata.")
13162 (license license:bsd-3)))
13163
13164(define-public python2-flex
13165 (package-with-python2 python-flex))
13166
13167(define-public python-marshmallow
13168 (package
13169 (name "python-marshmallow")
13170 (version "3.0.0b14")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "marshmallow" version))
13175 (sha256
13176 (base32
13177 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13178 (build-system python-build-system)
13179 (propagated-inputs
13180 `(("python-dateutil" ,python-dateutil)
13181 ("python-simplejson" ,python-simplejson)))
13182 (native-inputs
13183 `(("python-pytest" ,python-pytest)
13184 ("python-pytz" ,python-pytz)))
13185 (home-page "https://github.com/marshmallow-code/marshmallow")
13186 (synopsis "Convert complex datatypes to and from native
13187Python datatypes.")
13188 (description "@code{marshmallow} provides a library for converting
13189complex datatypes to and from native Python datatypes.")
13190 (license license:expat)))
13191
13192(define-public python2-marshmallow
13193 (package-with-python2 python-marshmallow))
13194
13195(define-public python-apispec
13196 (package
13197 (name "python-apispec")
13198 (version "0.25.3")
13199 (source
13200 (origin
13201 (method url-fetch)
13202 (uri (pypi-uri "apispec" version))
13203 (sha256
13204 (base32
13205 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13206 (build-system python-build-system)
13207 (propagated-inputs
13208 `(("python-pyyaml" ,python-pyyaml)))
13209 (native-inputs
13210 `(("python-pytest" ,python-pytest)
13211 ("python-flask" ,python-flask)
13212 ("python-marshmallow" ,python-marshmallow)
13213 ("python-tornado" ,python-tornado)
13214 ("python-bottle" ,python-bottle)
13215 ("python-mock" ,python-mock)))
13216 (home-page "https://github.com/marshmallow-code/apispec")
13217 (synopsis "Swagger 2.0 API specification generator")
13218 (description "@code{python-apispec} is a pluggable API specification
13219generator. Currently supports the OpenAPI specification (f.k.a.
13220Swagger 2.0).")
13221 (license license:expat)))
13222
13223(define-public python2-apispec
13224 (package-with-python2 python-apispec))
13225
13226(define-public python-flasgger
13227 (package
13228 (name "python-flasgger")
13229 (version "0.6.3")
13230 (source
13231 (origin
1a04d421
TGR
13232 (method git-fetch)
13233 (uri (git-reference
13234 (url "https://github.com/rochacbruno/flasgger.git")
13235 (commit version)))
13236 (file-name (git-file-name name version))
44d10b1f 13237 (sha256
1a04d421 13238 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13239 (build-system python-build-system)
13240 (arguments
13241 `(#:phases
13242 (modify-phases %standard-phases
13243 (replace 'check
13244 (lambda* (#:key inputs outputs #:allow-other-keys)
13245 (substitute* "Makefile"
13246 (("flake8 flasgger --ignore=F403")
13247 "flake8 flasgger --ignore=E731,F403"))
13248 (setenv "PYTHONPATH" (string-append (getcwd)
13249 ":"
13250 (getenv "PYTHONPATH")))
ac599a09 13251 (invoke "py.test"))))))
44d10b1f
RW
13252 (propagated-inputs
13253 `(("python-flask" ,python-flask)
13254 ("python-pyyaml" ,python-pyyaml)
13255 ("python-jsonschema" ,python-jsonschema)
13256 ("python-mistune" ,python-mistune)
13257 ("python-six" ,python-six)))
13258 (native-inputs
13259 `(("python-decorator" ,python-decorator)
13260 ("python-flake8" ,python-flake8)
13261 ("python-flask-restful" ,python-flask-restful)
13262 ("python-flex" ,python-flex)
13263 ("python-pytest" ,python-pytest)
13264 ("python-pytest-cov" ,python-pytest-cov)
13265 ("python-marshmallow" ,python-marshmallow)
13266 ("python-apispec" ,python-apispec)))
13267 (home-page "https://github.com/rochacbruno/flasgger/")
13268 (synopsis "Extract Swagger specs from your Flask project")
13269 (description "@code{python-flasgger} allows extracting Swagger specs
13270from your Flask project. It is a fork of Flask-Swagger.")
13271 (license license:expat)))
13272
13273(define-public python2-flasgger
13274 (package-with-python2 python-flasgger))
13275
13276(define-public python-swagger-spec-validator
13277 (package
13278 (name "python-swagger-spec-validator")
fe9c5b1d 13279 (version "2.4.3")
44d10b1f
RW
13280 (source
13281 (origin
13282 (method url-fetch)
13283 (uri (pypi-uri "swagger-spec-validator" version))
13284 (sha256
13285 (base32
fe9c5b1d 13286 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13287 (build-system python-build-system)
13288 (propagated-inputs
13289 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13290 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13291 ("python-six" ,python-six)))
13292 (home-page
13293 "https://github.com/Yelp/swagger_spec_validator")
13294 (synopsis "Validation of Swagger specifications")
13295 (description "@code{swagger_spec_validator} provides a library for
13296validating Swagger API specifications.")
13297 (license license:asl2.0)))
13298
13299(define-public python2-swagger-spec-validator
13300 (package-with-python2 python-swagger-spec-validator))
13301
13302(define-public python-apache-libcloud
13303 (package
13304 (name "python-apache-libcloud")
13305 (version "2.4.0")
13306 (source
13307 (origin
13308 (method url-fetch)
13309 (uri (pypi-uri "apache-libcloud" version))
13310 (sha256
13311 (base32
13312 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13313 (build-system python-build-system)
13314 (arguments
13315 `(#:phases
13316 (modify-phases %standard-phases
13317 (add-after 'unpack 'patch-ssh
13318 (lambda* (#:key inputs #:allow-other-keys)
13319 (substitute* "libcloud/compute/ssh.py"
13320 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13321 "/bin/ssh" "'")))
13322 #t))
13323 (add-after 'unpack 'patch-tests
13324 (lambda _
13325 (substitute* "./libcloud/test/test_file_fixtures.py"
13326 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13327 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13328 return (httplib.OK,
13329 \"1234abcd\",
13330 {\"test\": \"value\"},
13331 httplib.responses[httplib.OK])
13332 def _ascii"))
13333 (substitute* "libcloud/test/compute/test_ssh_client.py"
13334 (("class ShellOutSSHClientTests")
13335 "@unittest.skip(\"Guix container doesn't have ssh service\")
13336class ShellOutSSHClientTests")
13337 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13338 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13339 (("'.xF0', '.x90', '.x8D', '.x88'")
13340 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13341 #t))
13342 (add-before 'check 'copy-secret
13343 (lambda _
13344 (copy-file "libcloud/test/secrets.py-dist"
13345 "libcloud/test/secrets.py")
13346 #t)))))
13347 (inputs
13348 `(("openssh" ,openssh)))
13349 (propagated-inputs
13350 `(("python-paramiko" ,python-paramiko)
13351 ("python-requests" ,python-requests)))
13352 (native-inputs
13353 `(("python-lockfile" ,python-lockfile)
13354 ("python-mock" ,python-mock)
13355 ("python-pytest" ,python-pytest)
13356 ("python-pytest-runner" ,python-pytest-runner)
13357 ("python-requests-mock" ,python-requests-mock)))
13358 (home-page "https://libcloud.apache.org/")
13359 (synopsis "Unified Cloud API")
13360 (description "@code{libcloud} is a Python library for interacting with
13361many of the popular cloud service providers using a unified API.")
13362 (license license:asl2.0)))
13363
13364(define-public python2-apache-libcloud
13365 (package-with-python2 python-apache-libcloud))
13366
13367(define-public python-smmap2
13368 (package
13369 (name "python-smmap2")
13370 (version "2.0.3")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "smmap2" version))
13375 (sha256
13376 (base32
13377 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13378 (build-system python-build-system)
13379 (native-inputs
13380 `(("python-nosexcover" ,python-nosexcover)))
13381 (home-page "https://github.com/Byron/smmap")
13382 (synopsis "Python sliding window memory map manager")
13383 (description "@code{smmap2} is a pure Python implementation of a sliding
13384window memory map manager.")
13385 (license license:bsd-3)))
13386
13387(define-public python2-smmap2
13388 (package-with-python2 python-smmap2))
13389
13390(define-public python-regex
13391 (package
13392 (name "python-regex")
c187c9d7 13393 (version "2019.04.14")
44d10b1f
RW
13394 (source (origin
13395 (method url-fetch)
13396 (uri (pypi-uri "regex" version))
13397 (sha256
13398 (base32
c187c9d7
BT
13399 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13400 ;; TODO: Fix and enable regex_test.py tests that complain about the
13401 ;; test.support module not existing.
44d10b1f
RW
13402 (build-system python-build-system)
13403 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13404 (synopsis "Alternative regular expression module")
13405 (description "This regular expression implementation is backwards-
13406compatible with the standard @code{re} module, but offers additional
13407functionality like full case-folding for case-insensitive matches in Unicode.")
13408 (license license:psfl)))
13409
13410(define-public python2-regex
13411 (package-with-python2 python-regex))
13412
13413(define-public python2-pyopengl
13414 (package
13415 (name "python2-pyopengl")
13416 (version "3.1.0")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "PyOpenGL" version))
13421 (sha256
13422 (base32
13423 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13424 (arguments
13425 `(#:python ,python-2))
13426 (build-system python-build-system)
13427 (home-page "http://pyopengl.sourceforge.net")
13428 (synopsis "Standard OpenGL bindings for Python")
13429 (description
13430 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13431related APIs. The binding is created using the standard @code{ctypes}
13432library.")
13433 (license license:bsd-3)))
13434
13435(define-public python2-pyopengl-accelerate
13436 (package
13437 (inherit python2-pyopengl)
13438 (name "python2-pyopengl-accelerate")
13439 (version "3.1.0")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "PyOpenGL-accelerate" version))
13444 (sha256
13445 (base32
13446 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13447 (synopsis "Acceleration code for PyOpenGL")
13448 (description
13449 "This is the Cython-coded accelerator module for PyOpenGL.")))
13450
13451(define-public python-rencode
13452 (package
13453 (name "python-rencode")
13454 (version "1.0.5")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "rencode" version))
13459 (sha256
13460 (base32
13461 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13462 (build-system python-build-system)
13463 (arguments
13464 `(#:phases
13465 (modify-phases %standard-phases
13466 (add-before 'check 'delete-bogus-test
13467 ;; This test requires /home/aresch/Downloads, which is not provided by
13468 ;; the build environment.
13469 (lambda _
13470 (delete-file "rencode/t.py")
13471 #t)))))
13472 (native-inputs `(("pkg-config" ,pkg-config)
13473 ("python-cython" ,python-cython)))
13474 (home-page "https://github.com/aresch/rencode")
13475 (synopsis "Serialization of heterogeneous data structures")
13476 (description
13477 "The @code{rencode} module is a data structure serialization library,
13478similar to @code{bencode} from the BitTorrent project. For complex,
13479heterogeneous data structures with many small elements, r-encoding stake up
13480significantly less space than b-encodings. This version of rencode is a
13481complete rewrite in Cython to attempt to increase the performance over the
13482pure Python module.")
13483 (license license:bsd-3)))
13484
13485(define-public python2-rencode
13486 (package-with-python2 python-rencode))
13487
13488(define-public python-xenon
13489 (package
13490 (name "python-xenon")
13491 (version "0.5.4")
13492 (source
13493 (origin
13494 (method url-fetch)
13495 (uri (pypi-uri "xenon" version))
13496 (sha256
13497 (base32
13498 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13499 (build-system python-build-system)
13500 (native-inputs
13501 `(("python-pyyaml" ,python-pyyaml)
13502 ("python-radon" ,python-radon)
13503 ("python-requests" ,python-requests)
13504 ("python-flake8" ,python-flake8)
13505 ("python-tox" ,python-tox)))
13506 (arguments
13507 `(#:phases
13508 (modify-phases %standard-phases
13509 (add-before 'build 'patch-test-requirements
13510 (lambda _
13511 ;; Remove httpretty dependency for tests.
13512 (substitute* "setup.py"
13513 (("httpretty") ""))
13514 #t)))))
13515 (home-page "https://xenon.readthedocs.org/")
13516 (synopsis "Monitor code metrics for Python on your CI server")
13517 (description
13518 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13519Ideally, @code{xenon} is run every time code is committed. Through command
13520line options, various thresholds can be set for the complexity of code. It
13521will fail (i.e. it will exit with a non-zero exit code) when any of these
13522requirements is not met.")
13523 (license license:expat)))
13524
13525(define-public python2-xenon
13526 (package-with-python2 python-xenon))
13527
13528(define-public python-pysocks
13529 (package
13530 (name "python-pysocks")
b8725cdf 13531 (version "1.7.0")
44d10b1f
RW
13532 (source
13533 (origin
13534 (method url-fetch)
13535 (uri (pypi-uri "PySocks" version))
13536 (sha256
13537 (base32
b8725cdf 13538 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13539 (build-system python-build-system)
13540 (arguments `(#:tests? #f))
13541 (home-page "https://github.com/Anorov/PySocks")
13542 (synopsis "SOCKS client module")
13543 (description "@code{pysocks} is an updated and semi-actively maintained
13544version of @code{SocksiPy} with bug fixes and extra features.")
13545 (license license:bsd-3)))
13546
13547(define-public python2-pysocks
13548 (package-with-python2 python-pysocks))
13549
13550(define-public python-pydiff
13551 (package
13552 (name "python-pydiff")
13553 (version "0.2")
13554 (source
13555 (origin
13556 (method url-fetch)
13557 (uri (pypi-uri "pydiff" version))
13558 (sha256
13559 (base32
13560 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13561 (build-system python-build-system)
13562 (home-page "https://github.com/myint/pydiff")
13563 (synopsis "Library to diff two Python files at the bytecode level")
13564 (description
13565 "@code{pydiff} makes it easy to look for actual code changes while
13566ignoring formatting changes.")
13567 (license license:expat)))
13568
13569(define-public python2-pydiff
13570 (package-with-python2 python-pydiff))
13571
13572(define-public python-tqdm
13573 (package
13574 (name "python-tqdm")
13575 (version "4.19.6")
13576 (source
13577 (origin
13578 (method url-fetch)
13579 (uri (pypi-uri "tqdm" version))
13580 (sha256
13581 (base32
13582 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13583 (build-system python-build-system)
13584 (native-inputs
13585 `(("python-flake8" ,python-flake8)
13586 ("python-nose" ,python-nose)
13587 ("python-coverage" ,python-coverage)))
13588 (home-page "https://github.com/tqdm/tqdm")
13589 (synopsis "Fast, extensible progress meter")
13590 (description
13591 "Make loops show a progress bar on the console by just wrapping any
13592iterable with @code{|tqdm(iterable)|}. Offers many options to define
13593design and layout.")
13594 (license (list license:mpl2.0 license:expat))))
13595
13596(define-public python2-tqdm
13597 (package-with-python2 python-tqdm))
13598
13599(define-public python-pkginfo
13600 (package
13601 (name "python-pkginfo")
13602 (version "1.4.2")
13603 (source
13604 (origin
13605 (method url-fetch)
13606 (uri (pypi-uri "pkginfo" version))
13607 (sha256
13608 (base32
13609 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13610 (build-system python-build-system)
13611 (arguments
13612 ;; The tests are broken upstream.
13613 '(#:tests? #f))
13614 (home-page
13615 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13616 (synopsis
13617 "Query metadatdata from sdists, bdists, and installed packages")
13618 (description
13619 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13620source distriubtion (an sdist) or a binary distribution (e.g., created by
13621running bdist_egg). It can also query the EGG-INFO directory of an installed
13622distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13623created by running @code{python setup.py develop}).")
13624 (license license:expat)))
13625
13626(define-public python2-pkginfo
13627 (package-with-python2 python-pkginfo))
13628
13629(define-public python-twine
13630 (package
13631 (name "python-twine")
13632 (version "1.9.1")
13633 (source
13634 (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "twine" version))
13637 (sha256
13638 (base32
13639 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13640 (build-system python-build-system)
13641 (propagated-inputs
13642 `(("python-tqdm" ,python-tqdm)
13643 ("python-pkginfo" ,python-pkginfo)
13644 ("python-requests" ,python-requests)
13645 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13646 (home-page "https://github.com/pypa/twine")
13647 (synopsis "Collection of utilities for interacting with PyPI")
13648 (description
13649 "@code{twine} currently supports registering projects and uploading
13650distributions. It authenticates the user over HTTPS, allows them to pre-sign
13651their files and supports any packaging format (including wheels).")
13652 (license license:asl2.0)))
13653
13654(define-public python2-twine
13655 (package-with-python2 python-twine))
13656
13657(define-public python-linecache2
13658 (package
13659 (name "python-linecache2")
13660 (version "1.0.0")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "linecache2" version))
13665 (sha256
13666 (base32
13667 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(;; The tests depend on unittest2, and our version is a bit too old.
13671 #:tests? #f))
13672 (native-inputs
13673 `(("python-pbr" ,python-pbr-minimal)))
13674 (home-page
13675 "https://github.com/testing-cabal/linecache2")
13676 (synopsis "Backports of the linecache module")
13677 (description
13678 "The linecache module allows one to get any line from any file, while
13679attempting to optimize internally, using a cache, the common case where many
13680lines are read from a single file.")
13681 (license license:psfl)))
13682
13683(define-public python2-linecache2
13684 (package-with-python2 python-linecache2))
13685
13686(define-public python-traceback2
13687 (package
13688 (name "python-traceback2")
13689 (version "1.4.0")
13690 (source
13691 (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "traceback2" version))
13694 (sha256
13695 (base32
13696 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13697 (build-system python-build-system)
13698 (arguments
13699 `(;; python-traceback2 and python-unittest2 depend on one another.
13700 #:tests? #f))
13701 (native-inputs
13702 `(("python-pbr" ,python-pbr-minimal)))
13703 (propagated-inputs
13704 `(("python-linecache2" ,python-linecache2)))
13705 (home-page
13706 "https://github.com/testing-cabal/traceback2")
13707 (synopsis "Backports of the traceback module")
13708 (description
13709 "This module provides a standard interface to extract, format and print
13710stack traces of Python programs. It exactly mimics the behavior of the Python
13711interpreter when it prints a stack trace.")
13712 (license license:psfl)))
13713
13714(define-public python2-traceback2
13715 (package-with-python2 python-traceback2))
13716
13717(define-public python-ratelimiter
13718 (package
13719 (name "python-ratelimiter")
13720 (version "1.2.0")
13721 (source
13722 (origin
13723 (method url-fetch)
13724 (uri (pypi-uri "ratelimiter" version))
13725 (sha256
13726 (base32
13727 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13728 (build-system python-build-system)
13729 (arguments
13730 '(#:tests? #f)) ; There are no tests in the pypi archive.
13731 (home-page "https://github.com/RazerM/ratelimiter")
13732 (synopsis "Simple rate limiting object")
13733 (description
13734 "The @code{ratelimiter} module ensures that an operation will not be
13735executed more than a given number of times during a given period.")
13736 (license license:asl2.0)))
13737
13738(define-public python2-ratelimiter
13739 (package-with-python2 python-ratelimiter))
13740
13741(define-public python-dukpy
13742 (package
13743 (name "python-dukpy")
13744 (version "0.3")
13745 (source
13746 (origin
5b77ebe1
TGR
13747 (method git-fetch)
13748 (uri (git-reference
13749 (url "https://github.com/kovidgoyal/dukpy.git")
13750 (commit (string-append "v" version))))
13751 (file-name (git-file-name name version))
44d10b1f 13752 (sha256
5b77ebe1 13753 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13754 (build-system python-build-system)
13755 (home-page "https://github.com/kovidgoyal/dukpy")
13756 (synopsis "Run JavaScript in python")
13757 (description
13758 "dukpy is a JavaScript runtime environment for Python using the duktape
13759embeddable JavaScript engine.")
13760 ;; Dukpy is licensed under MIT like the embedded duktape library,
13761 ;; with 'errors.c' as GPL3.
13762 (license (list license:expat license:gpl3))))
13763
13764(define-public python2-dukpy
13765 (package-with-python2 python-dukpy))
13766
13767(define-public python-jsonrpclib-pelix
13768 (package
13769 (name "python-jsonrpclib-pelix")
13770 (version "0.3.2")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "jsonrpclib-pelix" version))
13775 (sha256
13776 (base32
13777 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13778 (build-system python-build-system)
13779 (arguments
13780 `(#:tests? #f)) ; no tests in PyPI tarball
13781 (home-page "https://github.com/tcalmant/jsonrpclib/")
13782 (synopsis "JSON-RPC 2.0 client library for Python")
13783 (description
13784 "This library implements the JSON-RPC v2.0
13785specification (backwards-compatible) as a client library for Python. This
13786version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13787services.")
13788 (license license:asl2.0)))
13789
13790(define-public python2-jsonrpclib-pelix
13791 (package-with-python2 python-jsonrpclib-pelix))
13792
13793(define-public python-setuptools-scm-git-archive
13794 (package
13795 (name "python-setuptools-scm-git-archive")
13796 (version "1.0")
13797 (source
13798 (origin
13799 (method url-fetch)
13800 (uri (pypi-uri "setuptools_scm_git_archive" version))
13801 (sha256
13802 (base32
13803 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13804 (build-system python-build-system)
13805 (native-inputs
13806 `(("python-pytest" ,python-pytest)))
13807 (propagated-inputs
13808 `(("python-setuptools-scm" ,python-setuptools-scm)))
13809 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13810 (synopsis "Setuptools_scm plugin for git archives")
13811 (description
13812 "The setuptools_scm_git_archive package is a plugin to
13813setuptools_scm, which supports obtaining versions from git archives that
13814belong to tagged versions.")
13815 (license license:expat)))
13816
13817(define-public python2-setuptools-scm-git-archive
13818 (package-with-python2 python-setuptools-scm-git-archive))
13819
724a350c
RW
13820(define-public python-setuptools-git
13821 (package
13822 (name "python-setuptools-git")
13823 (version "1.2")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "setuptools-git" version))
13828 (sha256
13829 (base32
13830 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13831 (build-system python-build-system)
13832 (arguments
13833 `(#:phases
13834 (modify-phases %standard-phases
13835 ;; This is needed for tests.
13836 (add-after 'unpack 'configure-git
13837 (lambda _
13838 (setenv "HOME" "/tmp")
13839 (invoke "git" "config" "--global" "user.email" "guix")
13840 (invoke "git" "config" "--global" "user.name" "guix")
13841 #t)))))
13842 (native-inputs
13843 `(("git" ,git-minimal)))
13844 (home-page "https://github.com/msabramo/setuptools-git")
13845 (synopsis "Setuptools revision control system plugin for Git")
13846 (description
13847 "This package provides a plugin for Setuptools for revision control with
13848Git.")
13849 (license license:bsd-3)))
13850
44d10b1f
RW
13851(define-public python-pyclipper
13852 (package
13853 (name "python-pyclipper")
13854 (version "1.1.0.post1")
13855 (source
13856 (origin
13857 (method url-fetch)
13858 (uri (pypi-uri "pyclipper" version ".zip"))
13859 (sha256
13860 (base32
13861 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13862 (modules '((guix build utils)))
13863 (snippet
13864 '(begin
13865 ;; This file is generated by Cython.
13866 (delete-file "pyclipper/pyclipper.cpp") #t))))
13867 (build-system python-build-system)
13868 (arguments
13869 `(#:phases
13870 (modify-phases %standard-phases
13871 (add-before 'build 'cythonize-sources
13872 (lambda _
13873 (with-directory-excursion "pyclipper"
13874 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13875 (propagated-inputs
13876 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13877 (native-inputs
13878 `(("python-cython" ,python-cython)
13879 ("python-pytest" ,python-pytest)
13880 ("python-pytest-runner" ,python-pytest-runner)
13881 ("python-unittest2" ,python-unittest2)
13882 ("unzip" ,unzip)))
13883 (home-page "https://github.com/greginvm/pyclipper")
13884 (synopsis "Wrapper for Angus Johnson's Clipper library")
13885 (description
13886 "Pyclipper is a Cython wrapper for the C++ translation of the
13887Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13888 (license license:expat)))
13889
13890(define-public python2-pyclipper
13891 (package-with-python2 python-pyclipper))
13892
13893(define-public python2-booleanoperations
13894 (package
13895 (name "python2-booleanoperations")
13896 (version "0.7.1")
13897 (source
13898 (origin
13899 (method url-fetch)
13900 (uri (pypi-uri "booleanOperations" version ".zip"))
13901 (sha256
13902 (base32
13903 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13904 (build-system python-build-system)
13905 (arguments
13906 `(#:python ,python-2))
13907 (native-inputs
13908 `(("unzip" ,unzip)
13909 ("python2-pytest" ,python2-pytest)
13910 ("python2-pytest-runner" ,python2-pytest-runner)))
13911 (propagated-inputs
13912 `(("python-fonttools" ,python2-fonttools)
13913 ("python-pyclipper" ,python2-pyclipper)
13914 ("python-ufolib" ,python2-ufolib)))
13915 (home-page "https://github.com/typemytype/booleanOperations")
13916 (synopsis "Boolean operations on paths")
13917 (description
13918 "BooleanOperations provides a Python library that enables
13919boolean operations on paths.")
13920 (license license:expat)))
13921
13922(define-public python-tempdir
13923 (package
13924 (name "python-tempdir")
13925 (version "0.7.1")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "tempdir" version))
13930 (sha256
13931 (base32
13932 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13933 (build-system python-build-system)
13934 (home-page "https://pypi.org/project/tempdir/")
13935 (arguments
13936 ;; the package has no tests
13937 '(#:tests? #f))
13938 (synopsis "Python library for managing temporary directories")
13939 (description
13940 "This library manages temporary directories that are automatically
13941deleted with all their contents when they are no longer needed. It is
13942particularly convenient for use in tests.")
13943 (license license:expat)))
13944
13945(define-public python2-tempdir
13946 (package-with-python2 python-tempdir))
13947
13948(define-public python-activepapers
13949 (package
13950 (name "python-activepapers")
13951 (version "0.2.2")
13952 (source
13953 (origin
13954 (method url-fetch)
13955 (uri (pypi-uri "ActivePapers.Py" version))
13956 (sha256
13957 (base32
13958 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13959 (build-system python-build-system)
13960 (arguments
13961 `(#:modules ((ice-9 ftw)
13962 (srfi srfi-1)
13963 (guix build utils)
13964 (guix build python-build-system))
13965
13966 #:phases
13967 (modify-phases %standard-phases
13968 (add-after 'unpack 'delete-python2-code
13969 (lambda _
13970 (for-each delete-file
13971 '("lib/activepapers/builtins2.py"
13972 "lib/activepapers/standardlib2.py"
13973 "lib/activepapers/utility2.py"))))
13974 (replace 'check
13975 (lambda _
13976 ;; Deactivate the test cases that download files
13977 (setenv "NO_NETWORK_ACCESS" "1")
13978 ;; For some strange reason, some tests fail if nosetests runs all
13979 ;; test modules in a single execution. They pass if each test
13980 ;; module is run individually.
13981 (for-each (lambda (filename)
13982 (invoke "nosetests"
13983 (string-append "tests/" filename)))
13984 (scandir "tests"
13985 (lambda (filename)
13986 (string-suffix? ".py" filename)))))))))
13987 (native-inputs
13988 `(("python-tempdir" ,python-tempdir)
13989 ("python-nose" ,python-nose)))
13990 (propagated-inputs
13991 `(("python-h5py" ,python-h5py)))
13992 (home-page "http://www.activepapers.org/")
13993 (synopsis "Executable papers for scientific computing")
13994 (description
13995 "ActivePapers is a tool for working with executable papers, which
13996combine data, code, and documentation in single-file packages,
13997suitable for publication as supplementary material or on repositories
13998such as figshare or Zenodo.")
13999 (properties `((python2-variant . ,(delay python2-activepapers))))
14000 (license license:bsd-3)))
14001
14002(define-public python2-activepapers
14003 (let ((base (package-with-python2
14004 (strip-python2-variant python-activepapers))))
14005 (package
14006 (inherit base)
14007 (arguments
14008 (substitute-keyword-arguments (package-arguments base)
14009 ((#:phases phases)
14010 `(modify-phases ,phases
14011 (delete 'delete-python2-code)
14012 (add-after 'unpack 'delete-python3-code
14013 (lambda _
14014 (for-each delete-file
14015 '("lib/activepapers/builtins3.py"
14016 "lib/activepapers/standardlib3.py"
14017 "lib/activepapers/utility3.py")))))))))))
14018
14019(define-public python-semver
14020 (package
14021 (name "python-semver")
14022 (version "2.7.9")
14023 (source
14024 (origin
14025 (method url-fetch)
14026 (uri (pypi-uri "semver" version))
14027 (sha256
14028 (base32
14029 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14030 (build-system python-build-system)
14031 (arguments
14032 `(#:phases
14033 (modify-phases %standard-phases
14034 (add-after 'unpack 'patch-test-requirements
14035 (lambda _
14036 (substitute* "setup.py"
14037 ;; Our Python is new enough.
14038 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14039 #t)))))
14040 (native-inputs
14041 `(("python-tox" ,python-tox)
14042 ("python-virtualenv" ,python-virtualenv)))
14043 (home-page "https://github.com/k-bx/python-semver")
14044 (synopsis "Python helper for Semantic Versioning")
14045 (description "This package provides a Python library for
14046@url{Semantic Versioning, http://semver.org/}.")
14047 (license license:bsd-3)))
14048
14049(define-public python2-semver
14050 (package-with-python2 python-semver))
14051
14052(define-public python-pyro4
14053 (package
14054 (name "python-pyro4")
ad1acb81 14055 (version "4.75")
44d10b1f
RW
14056 (source
14057 (origin
14058 (method url-fetch)
14059 (uri (pypi-uri "Pyro4" version))
14060 (sha256
ad1acb81 14061 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
14062 (build-system python-build-system)
14063 (propagated-inputs
14064 `(("python-serpent" ,python-serpent)))
14065 (home-page "https://pyro4.readthedocs.io")
14066 (synopsis "Distributed object middleware for Python")
14067 (description
14068 "Pyro enables you to build applications in which objects can talk to each
14069other over the network. You can just use normal Python method calls to call
14070objects on other machines, also known as remote procedure calls (RPC).")
14071 (license license:expat)))
14072
14073(define-public python2-pyro
14074 (package
14075 (name "python2-pyro")
14076 (version "3.16")
14077 (source
14078 (origin
14079 (method url-fetch)
14080 (uri (pypi-uri "Pyro" version))
14081 (file-name (string-append "Pyro-" version ".tar.gz"))
14082 (sha256
14083 (base32
14084 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14085 (build-system python-build-system)
14086 (arguments
14087 ;; Pyro is not compatible with Python 3
14088 `(#:python ,python-2
14089 ;; Pyro has no test cases for automatic execution
14090 #:tests? #f))
14091 (home-page "http://pythonhosted.org/Pyro/")
14092 (synopsis "Distributed object manager for Python")
14093 (description "Pyro is a Distributed Object Technology system
14094written in Python that is designed to be easy to use. It resembles
14095Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14096which is a system and language independent Distributed Object Technology
14097and has much more to offer than Pyro or RMI. Pyro 3.x is no
14098longer maintained. New projects should use Pyro4 instead, which
14099is the new Pyro version that is actively developed.")
14100 (license license:expat)))
14101
14102(define-public python2-scientific
14103 (package
14104 (name "python2-scientific")
14105 (version "2.9.4")
14106 (source
14107 (origin
14108 (method url-fetch)
14109 (uri (string-append "https://bitbucket.org/khinsen/"
14110 "scientificpython/downloads/ScientificPython-"
14111 version ".tar.gz"))
14112 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14113 (sha256
14114 (base32
14115 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14116 (build-system python-build-system)
14117 (inputs
14118 `(("netcdf" ,netcdf)))
14119 (propagated-inputs
14120 `(("python-numpy" ,python2-numpy-1.8)
14121 ("python-pyro" ,python2-pyro)))
14122 (arguments
14123 ;; ScientificPython is not compatible with Python 3
14124 `(#:python ,python-2
14125 #:tests? #f ; No test suite
14126 #:phases
14127 (modify-phases %standard-phases
14128 (replace 'build
14129 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14130 (invoke "python" "setup.py" "build"
14131 (string-append "--netcdf_prefix="
14132 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
14133 (home-page "https://bitbucket.org/khinsen/scientificpython")
14134 (synopsis "Python modules for scientific computing")
14135 (description "ScientificPython is a collection of Python modules that are
14136useful for scientific computing. Most modules are rather general (Geometry,
14137physical units, automatic derivatives, ...) whereas others are more
14138domain-specific (e.g. netCDF and PDB support). The library is currently
14139not actively maintained and works only with Python 2 and NumPy < 1.9.")
14140 (license license:cecill-c)))
14141
14142(define-public python2-mmtk
14143 (package
14144 (name "python2-mmtk")
14145 (version "2.7.11")
14146 (source
14147 (origin
14148 (method url-fetch)
14149 (uri (string-append "https://bitbucket.org/khinsen/"
14150 "mmtk/downloads/MMTK-" version ".tar.gz"))
14151 (file-name (string-append "MMTK-" version ".tar.gz"))
14152 (sha256
14153 (base32
14154 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14155 (build-system python-build-system)
14156 (native-inputs
14157 `(("netcdf" ,netcdf)))
14158 (propagated-inputs
14159 `(("python-scientific" ,python2-scientific)
14160 ("python-tkinter" ,python-2 "tk")))
14161 (arguments
14162 `(#:python ,python-2
14163 #:tests? #f
14164 #:phases
14165 (modify-phases %standard-phases
14166 (add-before 'build 'includes-from-scientific
14167 (lambda* (#:key inputs #:allow-other-keys)
14168 (mkdir-p "Include/Scientific")
14169 (copy-recursively
14170 (string-append
14171 (assoc-ref inputs "python-scientific")
14172 "/include/python2.7/Scientific")
14173 "Include/Scientific"))))))
14174 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14175 (synopsis "Python library for molecular simulation")
14176 (description "MMTK is a library for molecular simulations with an emphasis
14177on biomolecules. It provides widely used methods such as Molecular Dynamics
14178and normal mode analysis, but also basic routines for implementing new methods
14179for simulation and analysis. The library is currently not actively maintained
14180and works only with Python 2 and NumPy < 1.9.")
14181 (license license:cecill-c)))
14182
14183(define-public python-phonenumbers
14184 (package
14185 (name "python-phonenumbers")
14186 (version "8.9.1")
14187 (source
14188 (origin
14189 (method url-fetch)
14190 (uri (pypi-uri "phonenumbers" version))
14191 (sha256
14192 (base32
14193 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14194 (build-system python-build-system)
14195 (home-page
14196 "https://github.com/daviddrysdale/python-phonenumbers")
14197 (synopsis
14198 "Python library for dealing with international phone numbers")
14199 (description
14200 "This package provides a Python port of Google's libphonenumber library.")
14201 (license license:asl2.0)))
14202
14203(define-public python2-phonenumbers
14204 (package-with-python2 python-phonenumbers))
14205
14206(define-public python-send2trash
14207 (package
14208 (name "python-send2trash")
d9b0216b 14209 (version "1.5.0")
44d10b1f 14210 (source
d9b0216b 14211 (origin (method git-fetch)
44d10b1f 14212 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14213 (uri (git-reference
14214 (url "https://github.com/hsoft/send2trash.git")
14215 (commit version)))
14216 (file-name (git-file-name name version))
44d10b1f
RW
14217 (sha256
14218 (base32
d9b0216b 14219 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14220 (build-system python-build-system)
14221 (arguments
14222 '(#:phases
14223 (modify-phases %standard-phases
14224 (add-before 'check 'pre-check
14225 (lambda _
14226 (mkdir-p "/tmp/foo")
14227 (setenv "HOME" "/tmp/foo")
14228 #t)))))
14229 (home-page "https://github.com/hsoft/send2trash")
14230 (synopsis "Send files to the user's @file{~/Trash} directory")
14231 (description "This package provides a Python library to send files to the
14232user's @file{~/Trash} directory.")
20b3fde7 14233 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14234 (license license:bsd-3)))
14235
14236(define-public python2-send2trash
14237 (package
f32164ab 14238 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14239 (arguments
14240 (substitute-keyword-arguments (package-arguments python-send2trash)
14241 ((#:phases phases)
14242 `(modify-phases ,phases
14243 (add-before 'check 'setenv
14244 (lambda _
14245 (setenv "PYTHONPATH"
14246 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14247 #t))))))))
44d10b1f
RW
14248
14249(define-public python-yapf
14250 (package
14251 (name "python-yapf")
14252 (version "0.24.0")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (pypi-uri "yapf" version))
14257 (sha256
14258 (base32
14259 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14260 (build-system python-build-system)
14261 (home-page "https://github.com/google/yapf")
14262 (synopsis "Formatter for Python code")
14263 (description "YAPF is a formatter for Python code. It's based off of
14264@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14265takes the code and reformats it to the best formatting that conforms to the
14266style guide, even if the original code didn't violate the style guide.")
14267 (license license:asl2.0)))
14268
14269(define-public python2-yapf
14270 (package-with-python2 python-yapf))
14271
14272(define-public python-gyp
14273 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14274 (revision "0"))
14275 (package
14276 (name "python-gyp")
14277 ;; Google does not release versions,
14278 ;; based on second most recent commit date.
14279 (version (git-version "0.0.0" revision commit))
14280 (source
14281 (origin
14282 ;; Google does not release tarballs,
14283 ;; git checkout is needed.
14284 (method git-fetch)
14285 (uri (git-reference
14286 (url "https://chromium.googlesource.com/external/gyp")
14287 (commit commit)))
14288 (file-name (git-file-name name version))
14289 (sha256
14290 (base32
14291 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14292 (build-system python-build-system)
14293 (home-page "https://gyp.gsrc.io/")
14294 (synopsis "GYP is a Meta-Build system")
14295 (description
14296 "GYP builds build systems for large, cross platform applications.
14297It can be used to generate XCode projects, Visual Studio projects, Ninja build
14298files, and Makefiles.")
14299 (license license:bsd-3))))
14300
14301(define-public python2-gyp
14302 (package-with-python2 python-gyp))
14303
14304(define-public python-whatever
14305 (package
14306 (name "python-whatever")
14307 (version "0.5")
14308 (source
14309 (origin
14310 (method url-fetch)
14311 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14312 ".tar.gz"))
14313 (sha256
14314 (base32
14315 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14316 (file-name (string-append name "-" version ".tar.gz"))))
14317 (build-system python-build-system)
14318 (arguments
14319 `(#:phases
14320 (modify-phases %standard-phases
14321 (replace 'check
14322 (lambda _
14323 (invoke "py.test"))))))
14324 (native-inputs
14325 `(("python-pytest" ,python-pytest)))
14326 (home-page "http://github.com/Suor/whatever")
14327 (synopsis "Make anonymous functions by partial application of operators")
14328 (description "@code{whatever} provides an easy way to make anonymous
14329functions by partial application of operators.")
14330 (license license:bsd-3)))
14331
14332(define-public python2-whatever
14333 (package-with-python2 python-whatever))
14334
14335(define-public python-funcy
14336 (package
14337 (name "python-funcy")
9e396ab8 14338 (version "1.11")
44d10b1f
RW
14339 (source
14340 (origin
a85c6027
TGR
14341 (method git-fetch)
14342 (uri (git-reference
14343 (url "https://github.com/Suor/funcy.git")
14344 (commit version)))
44d10b1f 14345 (sha256
a85c6027
TGR
14346 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14347 (file-name (git-file-name name version))))
44d10b1f
RW
14348 (build-system python-build-system)
14349 (arguments
14350 `(#:phases
14351 (modify-phases %standard-phases
14352 (replace 'check
14353 (lambda _
14354 (invoke "py.test"))))))
14355 (native-inputs
14356 `(("python-pytest" ,python-pytest)
14357 ("python-whatever" ,python-whatever)))
14358 (home-page "http://github.com/Suor/funcy")
14359 (synopsis "Functional tools")
14360 (description "@code{funcy} is a library that provides functional tools.
14361Examples are:
14362@enumerate
14363@item merge - Merges collections of the same type
14364@item walk - Type-preserving map
14365@item select - Selects a part of a collection
14366@item take - Takes the first n items of a collection
14367@item first - Takes the first item of a collection
14368@item remove - Predicated-removes items of a collection
14369@item concat - Concatenates two collections
14370@item flatten - Flattens a collection with subcollections
14371@item distinct - Returns only distinct items
14372@item split - Predicated-splits a collection
14373@item split_at - Splits a collection at a given item
14374@item group_by - Groups items by group
14375@item pairwise - Pairs off adjacent items
14376@item partial - Partially-applies a function
14377@item curry - Curries a function
14378@item compose - Composes functions
14379@item complement - Complements a predicate
14380@item all_fn - \"all\" with predicate
14381@end enumerate")
14382 (license license:bsd-3)))
14383
14384(define-public python2-funcy
14385 (package-with-python2 python-funcy))
14386
14387(define-public python-isoweek
14388 (package
14389 (name "python-isoweek")
14390 (version "1.3.3")
14391 (source
14392 (origin
14393 (method url-fetch)
14394 (uri (pypi-uri "isoweek" version))
14395 (sha256
14396 (base32
14397 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14398 (build-system python-build-system)
14399 (home-page "https://github.com/gisle/isoweek")
14400 (synopsis "Objects representing a week")
14401 (description "The @code{isoweek} module provide the class Week that
14402implements the week definition of ISO 8601. This standard also defines
14403a notation for identifying weeks; yyyyWww (where the W is a literal).
14404Week instances stringify to this form.")
14405 (license license:bsd-3)))
14406
14407(define-public python2-isoweek
14408 (package-with-python2 python-isoweek))
14409
14410(define-public python-tokenize-rt
14411 (package
14412 (name "python-tokenize-rt")
14413 (version "2.0.1")
14414 (source
14415 (origin
14416 (method url-fetch)
14417 (uri (pypi-uri "tokenize-rt" version))
14418 (sha256
14419 (base32
14420 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14421 (build-system python-build-system)
14422 (home-page "https://github.com/asottile/tokenize-rt")
14423 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14424 (description
14425 "This Python library is a wrapper around @code{tokenize} from the Python
14426standard library. It provides two additional tokens @code{ESCAPED_NL} and
14427@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14428and @code{tokens_to_src} to roundtrip.")
14429 (license license:expat)))
14430
14431(define-public python-future-fstrings
14432 (package
14433 (name "python-future-fstrings")
14434 (version "0.4.1")
14435 (source
14436 (origin
14437 (method url-fetch)
14438 (uri (pypi-uri "future_fstrings" version))
14439 (sha256
14440 (base32
14441 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14442 (build-system python-build-system)
14443 (propagated-inputs
14444 `(("python-tokenize-rt" ,python-tokenize-rt)))
14445 (home-page "https://github.com/asottile/future-fstrings")
14446 (synopsis "Backport of fstrings to Python < 3.6")
14447 (description
14448 "This package provides a UTF-8 compatible encoding
14449@code{future_fstrings}, which performs source manipulation. It decodes the
14450source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14451@code{f} strings.")
14452 (license license:expat)))
14453
dae2eb1c
MC
14454(define-public python-typed-ast
14455 (package
14456 (name "python-typed-ast")
14457 (version "1.3.5")
14458 (source
14459 (origin
14460 (method url-fetch)
14461 (uri (pypi-uri "typed-ast" version))
14462 (sha256
14463 (base32
14464 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14465 (build-system python-build-system)
14466 (arguments
14467 `(#:modules ((guix build utils)
14468 (guix build python-build-system)
14469 (ice-9 ftw)
14470 (srfi srfi-1)
14471 (srfi srfi-26))
14472 #:phases
14473 (modify-phases %standard-phases
14474 (replace 'check
14475 (lambda _
14476 (let ((cwd (getcwd)))
14477 (setenv "PYTHONPATH"
14478 (string-append cwd "/build/"
14479 (find (cut string-prefix? "lib" <>)
14480 (scandir (string-append cwd "/build")))
14481 ":"
14482 (getenv "PYTHONPATH"))))
14483 (invoke "pytest")
14484 #t)))))
14485 (native-inputs `(("python-pytest" ,python-pytest)))
14486 (home-page "https://github.com/python/typed_ast")
14487 (synopsis "Fork of Python @code{ast} modules with type comment support")
14488 (description "This package provides a parser similar to the standard
14489@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14490include PEP 484 type comments and are independent of the version of Python
14491under which they are run. The @code{typed_ast} parsers produce the standard
14492Python AST (plus type comments), and are both fast and correct, as they are
14493based on the CPython 2.7 and 3.7 parsers.")
14494 ;; See the file "LICENSE" for the details.
14495 (license (list license:psfl
14496 license:asl2.0
14497 license:expat)))) ;ast27/Parser/spark.py
14498
44d10b1f
RW
14499(define-public python-typing
14500 (package
14501 (name "python-typing")
14502 (version "3.6.6")
14503 (source
14504 (origin
14505 (method url-fetch)
14506 (uri (pypi-uri "typing" version))
14507 (sha256
14508 (base32
14509 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14510 (build-system python-build-system)
14511 (home-page "https://docs.python.org/3/library/typing.html")
14512 (synopsis "Type hints for Python")
14513 (description "This is a backport of the standard library @code{typing}
14514module to Python versions older than 3.5. Typing defines a standard notation
14515for Python function and variable type annotations. The notation can be used
14516for documenting code in a concise, standard format, and it has been designed
14517to also be used by static and runtime type checkers, static analyzers, IDEs
14518and other tools.")
14519 (license license:psfl)))
14520
14521(define-public python2-typing
14522 (package-with-python2 python-typing))
14523
f89d443b
VC
14524(define-public python-typing-extensions
14525 (package
14526 (name "python-typing-extensions")
14527 (version "3.7.2")
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "typing_extensions" version))
14532 (sha256
14533 (base32
14534 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14535 (build-system python-build-system)
14536 (home-page
14537 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14538 (synopsis "Experimental type hints for Python")
14539 (description
14540 "The typing_extensions module contains additional @code{typing} hints not
14541yet present in the of the @code{typing} standard library.
14542Included are implementations of:
14543@enumerate
14544@item ClassVar
14545@item ContextManager
14546@item Counter
14547@item DefaultDict
14548@item Deque
14549@item NewType
14550@item NoReturn
14551@item overload
14552@item Protocol
14553@item runtime
14554@item Text
14555@item Type
14556@item TYPE_CHECKING
14557@item AsyncGenerator
14558@end enumerate\n")
14559 (license license:psfl)))
14560
44d10b1f
RW
14561(define-public bpython
14562 (package
14563 (name "bpython")
14564 (version "0.17.1")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "bpython" version))
14569 (sha256
14570 (base32
14571 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14572 (build-system python-build-system)
14573 (arguments
14574 `(#:phases
14575 (modify-phases %standard-phases
14576 (add-after 'unpack 'remove-failing-test
14577 (lambda _
14578 ;; Remove failing test. FIXME: make it pass
14579 (delete-file "bpython/test/test_args.py")
14580 #t))
14581 (add-after 'wrap 'add-aliases
14582 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14583 (lambda* (#:key outputs #:allow-other-keys)
14584 (let ((out (assoc-ref outputs "out")))
14585 (for-each
14586 (lambda (old new)
14587 (symlink old (string-append out "/bin/" new)))
14588 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14589 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14590 #t)))))
14591 (propagated-inputs
14592 `(("python-pygments" ,python-pygments)
14593 ("python-requests" ,python-requests)
14594 ("python-babel" ,python-babel) ; optional, for internationalization
14595 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14596 ("python-greenlet" ,python-greenlet)
14597 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14598 ("python-six" ,python-six)))
14599 (native-inputs
14600 `(("python-sphinx" ,python-sphinx)
14601 ("python-mock" ,python-mock)))
14602 (home-page "https://bpython-interpreter.org/")
14603 (synopsis "Fancy interface to the Python interpreter")
14604 (description "Bpython is a fancy interface to the Python
14605interpreter. bpython's main features are
14606
14607@enumerate
14608@item in-line syntax highlighting,
14609@item readline-like autocomplete with suggestions displayed as you type,
14610@item expected parameter list for any Python function,
14611@item \"rewind\" function to pop the last line of code from memory and
14612 re-evaluate,
14613@item send the code you've entered off to a pastebin,
14614@item save the code you've entered to a file, and
14615@item auto-indentation.
14616@end enumerate")
14617 (license license:expat)))
14618
14619(define-public bpython2
14620 (let ((base (package-with-python2
14621 (strip-python2-variant bpython))))
14622 (package (inherit base)
14623 (name "bpython2")
14624 (arguments
14625 `(#:python ,python-2
14626 #:phases
14627 (modify-phases %standard-phases
14628 (add-after 'unpack 'remove-failing-test
14629 (lambda _
14630 ;; Remove failing test. FIXME: make it pass
14631 (delete-file "bpython/test/test_args.py")
14632 ;; Disable failing test-cases (renaming inhibits they are
14633 ;; discovered)
14634 (substitute* "bpython/test/test_curtsies_repl.py"
14635 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14636 (string-append a "xxx_off_" b))
14637 (("^(\\s*def )(test_complex\\W)" _ a b)
14638 (string-append a "xxx_off_" b)))
14639 #t))
14640 (add-before 'build 'rename-scripts
14641 ;; rename the scripts to bypthon2, bpdb2, etc.
14642 (lambda _
14643 (substitute* "setup.py"
14644 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14645 (string-append name "2" rest "\n"))
14646 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14647 (string-append name "2" (or sub "") rest "\n")))
14648 #t))))))))
14649
14650(define-public python-pyinotify
14651 (package
14652 (name "python-pyinotify")
14653 (version "0.9.6")
14654 (source (origin
14655 (method url-fetch)
14656 (uri (pypi-uri "pyinotify" version))
14657 (sha256
14658 (base32
14659 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14660 (build-system python-build-system)
14661 (arguments `(#:tests? #f)) ;no tests
14662 (home-page "https://github.com/seb-m/pyinotify")
14663 (synopsis "Python library for monitoring inotify events")
14664 (description
14665 "@code{pyinotify} provides a Python interface for monitoring
14666file system events on Linux.")
14667 (license license:expat)))
14668
14669(define-public python2-pyinotify
14670 (package-with-python2 python-pyinotify))
14671
14672;; Ada parser uses this version.
14673(define-public python2-quex-0.67.3
14674 (package
14675 (name "python2-quex")
14676 (version "0.67.3")
14677 (source
14678 (origin
14679 (method url-fetch)
14680 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14681 (version-major+minor version)
14682 "/quex-" version ".zip"))
14683 (sha256
14684 (base32
14685 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14686 (build-system python-build-system)
14687 (native-inputs
14688 `(("unzip" ,unzip)))
14689 (arguments
14690 `(#:python ,python-2
14691 #:tests? #f
14692 #:phases
14693 (modify-phases %standard-phases
14694 (delete 'configure)
14695 (delete 'build)
14696 (replace 'install
14697 (lambda* (#:key outputs #:allow-other-keys)
14698 (let* ((out (assoc-ref outputs "out"))
14699 (share/quex (string-append out "/share/quex"))
14700 (bin (string-append out "/bin")))
14701 (copy-recursively "." share/quex)
14702 (mkdir-p bin)
14703 (symlink (string-append share/quex "/quex-exe.py")
14704 (string-append bin "/quex"))
14705 #t))))))
14706 (native-search-paths
14707 (list (search-path-specification
14708 (variable "QUEX_PATH")
14709 (files '("share/quex")))))
14710 (home-page "http://quex.sourceforge.net/")
14711 (synopsis "Lexical analyzer generator in Python")
14712 (description "@code{quex} is a lexical analyzer generator in Python.")
14713 (license license:lgpl2.1+))) ; Non-military
14714
14715(define-public python2-quex
14716 (package (inherit python2-quex-0.67.3)
14717 (name "python2-quex")
14718 (version "0.68.1")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14723 (sha256
14724 (base32
14725 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14726 (file-name (string-append name "-" version ".tar.gz"))))))
14727
14728(define-public python-more-itertools
14729 (package
14730 (name "python-more-itertools")
14731 (version "4.3.0")
14732 (source
14733 (origin
14734 (method url-fetch)
14735 (uri (pypi-uri "more-itertools" version))
14736 (sha256
14737 (base32
14738 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
14739 (build-system python-build-system)
14740 (arguments
14741 `(,@(if (any (cute string-prefix? <> (or (%current-system)
14742 (%current-target-system)))
14743 '("armhf" "i686"))
14744 '(#:phases
14745 (modify-phases %standard-phases
14746 ;; This is required for 32-bit hardware.
14747 ;; TODO: Try to remove this when upgrading.
14748 (add-after 'unpack 'patch-test
14749 (lambda _
14750 (substitute* "more_itertools/tests/test_more.py"
14751 (("10 \\*\\* 10") "9 ** 9"))
14752 #t))))
14753 '())))
14754 (propagated-inputs
14755 `(("python-six" ,python-six-bootstrap)))
14756 (home-page "https://github.com/erikrose/more-itertools")
14757 (synopsis "More routines for operating on iterables, beyond itertools")
14758 (description "Python's built-in @code{itertools} module implements a
14759number of iterator building blocks inspired by constructs from APL, Haskell,
14760and SML. @code{more-itertools} includes additional building blocks for
14761working with iterables.")
14762 (license license:expat)))
14763
14764(define-public python2-more-itertools
14765 (package-with-python2 python-more-itertools))
14766
14767(define-public python-latexcodec
14768 (package
14769 (name "python-latexcodec")
91b61f02 14770 (version "1.0.6")
44d10b1f
RW
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "latexcodec" version))
14775 (sha256
91b61f02 14776 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14777 (build-system python-build-system)
14778 (inputs
14779 `(("python-six" ,python-six)))
14780 (home-page "https://readthedocs.org/projects/latexcodec/")
14781 (synopsis "Work with LaTeX code in Python")
14782 (description "Lexer and codec to work with LaTeX code in Python.")
14783 (license license:expat)))
14784
14785(define-public python-pybtex
14786 (package
14787 (name "python-pybtex")
9441a9c1 14788 (version "0.22.2")
44d10b1f
RW
14789 (source
14790 (origin
14791 (method url-fetch)
14792 (uri (pypi-uri "pybtex" version))
14793 (sha256
9441a9c1 14794 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
14795 (build-system python-build-system)
14796 (native-inputs
14797 `(("python-nose" ,python-nose)))
14798 (inputs
14799 `(("python-latexcodec" ,python-latexcodec)
14800 ("python-pyyaml" ,python-pyyaml)
14801 ("python-six" ,python-six)))
14802 (arguments
14803 `(#:test-target "nosetests"))
14804 (home-page "https://pybtex.org/")
14805 (synopsis "BibTeX-compatible bibliography processor")
14806 (description "Pybtex is a BibTeX-compatible bibliography processor written
14807in Python. You can simply type pybtex instead of bibtex.")
14808 (license license:expat)))
14809
14810(define-public python-onetimepass
14811 (package
14812 (name "python-onetimepass")
14813 (version "1.0.1")
14814 (source
14815 (origin
14816 (method url-fetch)
14817 (uri (pypi-uri "onetimepass" version))
14818 (sha256
14819 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14820 (build-system python-build-system)
14821 (propagated-inputs `(("python-six" ,python-six)))
14822 (home-page "https://github.com/tadeck/onetimepass/")
14823 (synopsis "One-time password library")
14824 (description "Python one-time password library for HMAC-based (HOTP) and
14825time-based (TOTP) passwords.")
14826 (license license:expat)))
14827
14828(define-public python-parso
14829 (package
14830 (name "python-parso")
1475094a 14831 (version "0.5.1")
44d10b1f
RW
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (pypi-uri "parso" version))
14836 (sha256
14837 (base32
1475094a 14838 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
14839 (native-inputs
14840 `(("python-pytest" ,python-pytest)))
14841 (build-system python-build-system)
4eb97c25
MC
14842 (arguments
14843 `(#:phases (modify-phases %standard-phases
14844 (replace 'check
14845 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
14846 (home-page "https://github.com/davidhalter/parso")
14847 (synopsis "Python Parser")
14848 (description "Parso is a Python parser that supports error recovery and
14849round-trip parsing for different Python versions (in multiple Python versions).
14850Parso is also able to list multiple syntax errors in your Python file.")
14851 (license license:expat)))
14852
14853(define-public python2-parso
14854 (package-with-python2 python-parso))
14855
14856(define-public python-async-generator
14857 (package
14858 (name "python-async-generator")
94fcbf8d 14859 (version "1.10")
44d10b1f
RW
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "async_generator" version))
14864 (sha256
14865 (base32
94fcbf8d 14866 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14867 (build-system python-build-system)
14868 (native-inputs
14869 `(("python-pytest" ,python-pytest)))
14870 (home-page "https://github.com/python-trio/async_generator")
14871 (synopsis "Async generators and context managers for Python 3.5+")
14872 (description "@code{async_generator} back-ports Python 3.6's native async
14873generators and Python 3.7's context managers into Python 3.5.")
14874 ;; Dual licensed.
14875 (license (list license:expat license:asl2.0))))
14876
14877(define-public python-async-timeout
14878 (package
14879 (name "python-async-timeout")
14880 (version "3.0.1")
14881 (source
14882 (origin
14883 (method url-fetch)
14884 (uri (pypi-uri "async-timeout" version))
14885 (sha256
14886 (base32
14887 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14888 (build-system python-build-system)
14889 (home-page "https://github.com/aio-libs/async_timeout/")
14890 (synopsis "Timeout context manager for asyncio programs")
14891 (description "@code{async-timeout} provides a timeout timeout context
14892manager compatible with @code{asyncio}.")
14893 (license license:asl2.0)))
14894
14895(define-public python-glob2
14896 (package
14897 (name "python-glob2")
14898 (version "0.6")
8fa2bcc7
TGR
14899 (source
14900 (origin
14901 (method git-fetch)
14902 (uri (git-reference
14903 (url "https://github.com/miracle2k/python-glob2.git")
14904 (commit version)))
14905 (file-name (git-file-name name version))
14906 (sha256
14907 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14908 (build-system python-build-system)
14909 (home-page "https://github.com/miracle2k/python-glob2/")
14910 (synopsis "Extended Version of the python buildin glob module")
14911 (description "This is an extended version of the Python
14912@url{http://docs.python.org/library/glob.html, built-in glob module} which
14913adds:
14914
14915@itemize
14916@item The ability to capture the text matched by glob patterns, and return
14917those matches alongside the file names.
14918@item A recursive @code{**} globbing syntax, akin for example to the
14919@code{globstar} option of Bash.
14920@item The ability to replace the file system functions used, in order to glob
14921on virtual file systems.
14922@item Compatible with Python 2 and Python 3 (tested with 3.3).
14923@end itemize
14924
14925Glob2 currently based on the glob code from Python 3.3.1.")
14926 (license license:bsd-2)))
14927
14928(define-public python2-glob2
14929 (package-with-python2 python-glob2))
14930
14931(define-public python-gipc
14932 (package
14933 (name "python-gipc")
14934 (version "0.6.0")
14935 (source
14936 (origin
14937 (method url-fetch)
14938 (uri (pypi-uri "gipc" version ".zip"))
14939 (sha256
14940 (base32
14941 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14942 (build-system python-build-system)
14943 (native-inputs
14944 `(("unzip" ,unzip)))
14945 (propagated-inputs
14946 `(("python-gevent" ,python-gevent)))
14947 (home-page "http://gehrcke.de/gipc")
14948 (synopsis "Child process management in the context of gevent")
14949 (description "Usage of Python's multiprocessing package in a
14950gevent-powered application may raise problems. With @code{gipc},
14951process-based child processes can safely be created anywhere within a
14952gevent-powered application.")
14953 (license license:expat)))
14954
14955(define-public python2-gipc
14956 (package-with-python2 python-gipc))
14957
14958(define-public python-fusepy
14959 (package
14960 (name "python-fusepy")
14961 (version "2.0.4")
14962 (source
14963 (origin
14964 (method url-fetch)
14965 (uri (pypi-uri "fusepy" version))
14966 (sha256
14967 (base32
14968 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14969 (build-system python-build-system)
14970 (arguments
14971 `(#:phases
14972 (modify-phases %standard-phases
14973 (add-before 'build 'set-library-file-name
14974 (lambda* (#:key inputs #:allow-other-keys)
14975 (let ((fuse (assoc-ref inputs "fuse")))
14976 (substitute* "fuse.py"
14977 (("find_library\\('fuse'\\)")
14978 (string-append "'" fuse "/lib/libfuse.so'")))
14979 #t))))))
14980 (propagated-inputs
14981 `(("fuse" ,fuse)))
14982 (home-page "https://github.com/fusepy/fusepy")
14983 (synopsis "Simple ctypes bindings for FUSE")
14984 (description "Python module that provides a simple interface to FUSE and
14985MacFUSE. The binding is created using the standard @code{ctypes} library.")
14986 (license license:isc)))
14987
14988(define-public python2-fusepy
14989 (package-with-python2 python-fusepy))
14990
14991(define-public python2-gdrivefs
14992 (package
14993 (name "python2-gdrivefs")
14994 (version "0.14.9")
14995 (source
14996 (origin
14997 (method url-fetch)
14998 (uri (pypi-uri "gdrivefs" version))
14999 (sha256
15000 (base32
15001 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15002 (build-system python-build-system)
15003 (arguments
15004 `(#:python ,python-2
15005 #:phases
15006 (modify-phases %standard-phases
15007 (add-before 'build 'patch-setup-py
15008 (lambda _
15009 ;; Update requirements from dependency==version
15010 ;; to dependency>=version
15011 (substitute* "gdrivefs/resources/requirements.txt"
15012 (("==") ">="))
15013 #t)))))
15014 (native-inputs
15015 `(("python2-gipc" ,python2-gipc)
15016 ("python2-gevent" ,python2-gevent)
15017 ("python2-greenlet" ,python2-greenlet)
15018 ("python2-httplib2" ,python2-httplib2)
15019 ("python2-uritemplate" ,python2-uritemplate)
15020 ("python2-oauth2client" ,python2-oauth2client)
15021 ("python2-six" ,python2-six)))
15022 (propagated-inputs
15023 `(("python2-dateutil" ,python2-dateutil)
15024 ("python2-fusepy" ,python2-fusepy)
15025 ("python2-google-api-client" ,python2-google-api-client)))
15026 (home-page "https://github.com/dsoprea/GDriveFS")
15027 (synopsis "Mount Google Drive as a local file system")
15028 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15029under Python 2.7.")
15030 (license license:gpl2)))
15031
15032(define-public pybind11
15033 (package
15034 (name "pybind11")
15035 (version "2.2.4")
15036 (source (origin
15037 (method git-fetch)
15038 (uri (git-reference
15039 (url "https://github.com/pybind/pybind11.git")
15040 (commit (string-append "v" version))))
15041 (sha256
15042 (base32
15043 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
15044 (file-name (git-file-name name version))))
15045 (build-system cmake-build-system)
15046 (native-inputs
15047 `(("python" ,python)
15048 ("python-pytest" ,python-pytest)))
15049 (arguments
15050 `(#:test-target "check"))
15051 (home-page "https://github.com/pybind/pybind11/")
15052 (synopsis "Seamless operability between C++11 and Python")
15053 (description "pybind11 is a lightweight header-only library that exposes
15054C++ types in Python and vice versa, mainly to create Python bindings of
15055existing C++ code. Its goals and syntax are similar to the excellent
15056Boost.Python library by David Abrahams: to minimize boilerplate code in
15057traditional extension modules by inferring type information using compile-time
15058introspection.")
15059 (license license:expat)))
15060
15061(define-public python-fasteners
15062 (package
15063 (name "python-fasteners")
15064 (version "0.14.1")
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "fasteners" version))
15069 (sha256
15070 (base32
15071 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15072 (build-system python-build-system)
15073 (propagated-inputs
15074 `(("python-monotonic" ,python-monotonic)
15075 ("python-six" ,python-six)
15076 ("python-testtools" ,python-testtools)))
15077 (home-page "https://github.com/harlowja/fasteners")
15078 (synopsis "Python package that provides useful locks")
15079 (description
15080 "This package provides a Python program that provides following locks:
15081
15082@itemize
15083@item Locking decorator
15084@item Reader-writer locks
15085@item Inter-process locks
15086@item Generic helpers
15087@end itemize\n")
15088 (properties `((python2-variant . ,(delay python2-fasteners))))
15089 (license license:asl2.0)))
15090
15091(define-public python2-fasteners
15092 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15093 (package
15094 (inherit base)
15095 (propagated-inputs
15096 `(("python2-futures" ,python2-futures)
15097 ,@(package-propagated-inputs base))))))
15098
15099(define-public python-requests-file
15100 (package
15101 (name "python-requests-file")
15102 (version "1.4.3")
15103 (source
15104 (origin
15105 (method url-fetch)
15106 (uri (pypi-uri "requests-file" version))
15107 (sha256
15108 (base32
15109 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15110 (build-system python-build-system)
15111 (propagated-inputs
15112 `(("python-requests" ,python-requests)
15113 ("python-six" ,python-six)))
15114 (home-page
15115 "https://github.com/dashea/requests-file")
15116 (synopsis "File transport adapter for Requests")
15117 (description
15118 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15119library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15120 (license license:asl2.0)))
15121
15122(define-public python2-requests-file
15123 (package-with-python2 python-requests-file))
15124
15125(define-public python-tldextract
15126 (package
15127 (name "python-tldextract")
15128 (version "2.2.0")
15129 (source
15130 (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "tldextract" version))
15133 (sha256
15134 (base32
15135 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15136 (build-system python-build-system)
15137 (native-inputs
15138 `(("python-pytest" ,python-pytest)
15139 ("python-responses" ,python-responses)))
15140 (propagated-inputs
15141 `(("python-idna" ,python-idna)
15142 ("python-requests" ,python-requests)
15143 ("python-requests-file" ,python-requests-file)))
15144 (home-page
15145 "https://github.com/john-kurkowski/tldextract")
15146 (synopsis
15147 "Separate the TLD from the registered domain and subdomains of a URL")
15148 (description
15149 "TLDExtract accurately separates the TLD from the registered domain and
15150subdomains of a URL, using the Public Suffix List. By default, this includes
15151the public ICANN TLDs and their exceptions. It can optionally support the
15152Public Suffix List's private domains as well.")
15153 (license license:bsd-3)))
15154
15155(define-public python2-tldextract
15156 (package-with-python2 python-tldextract))
15157
15158(define-public python-pynamecheap
15159 (package
15160 (name "python-pynamecheap")
15161 (version "0.0.3")
15162 (source
15163 (origin
15164 (method url-fetch)
15165 (uri (pypi-uri "PyNamecheap" version))
15166 (sha256
15167 (base32
15168 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15169 (build-system python-build-system)
15170 (propagated-inputs
15171 `(("python-requests" ,python-requests)))
15172 (home-page
15173 "https://github.com/Bemmu/PyNamecheap")
15174 (synopsis
15175 "Namecheap API client in Python")
15176 (description
15177 "PyNamecheap is a Namecheap API client in Python.")
15178 (license license:expat)))
15179
15180(define-public python2-pynamecheap
15181 (package-with-python2 python-pynamecheap))
15182
15183(define-public python-dns-lexicon
15184 (package
15185 (name "python-dns-lexicon")
15186 (version "2.4.0")
15187 (source
15188 (origin
15189 (method url-fetch)
15190 (uri (pypi-uri "dns-lexicon" version))
15191 (sha256
15192 (base32
15193 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15194 (build-system python-build-system)
15195 (arguments
15196 `(#:tests? #f)) ;requires internet access
15197 (propagated-inputs
15198 `(("python-future" ,python-future)
15199 ("python-pynamecheap" ,python-pynamecheap)
15200 ("python-requests" ,python-requests)
15201 ("python-tldextract" ,python-tldextract)
15202 ("python-urllib3" ,python-urllib3)))
15203 (home-page "https://github.com/AnalogJ/lexicon")
15204 (synopsis
15205 "Manipulate DNS records on various DNS providers")
15206 (description
15207 "Lexicon provides a way to manipulate DNS records on multiple DNS
15208providers in a standardized way. It has a CLI but it can also be used as a
15209Python library. It was designed to be used in automation, specifically with
15210Let's Encrypt.")
15211 (license license:expat)))
15212
15213(define-public python2-dns-lexicon
15214 (package-with-python2 python-dns-lexicon))
15215
15216(define-public python-commandlines
15217 (package
15218 (name "python-commandlines")
15219 (version "0.4.1")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "commandlines" version))
15224 (sha256
15225 (base32
15226 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15227 (build-system python-build-system)
15228 (home-page "https://github.com/chrissimpkins/commandlines")
15229 (synopsis "Command line argument to object parsing library")
15230 (description
15231 "@code{Commandlines} is a Python library for command line application
15232development that supports command line argument parsing, command string
15233validation testing and application logic.")
15234 (license license:expat)))
15235
15236;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15237;; python-numba. They have a very unflexible relationship.
15238(define-public python-numba
15239 (package
15240 (name "python-numba")
7757e6d8 15241 (version "0.42.0")
44d10b1f
RW
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "numba" version))
15246 (sha256
15247 (base32
7757e6d8 15248 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15249 (build-system python-build-system)
15250 (arguments
15251 `(#:modules ((guix build utils)
15252 (guix build python-build-system)
15253 (ice-9 ftw)
15254 (srfi srfi-1)
15255 (srfi srfi-26))
15256 #:phases
15257 (modify-phases %standard-phases
15258 (add-after 'unpack 'disable-proprietary-features
15259 (lambda _
15260 (setenv "NUMBA_DISABLE_HSA" "1")
15261 (setenv "NUMBA_DISABLE_CUDA" "1")
15262 #t))
15263 (add-after 'unpack 'remove-failing-tests
15264 (lambda _
15265 ;; FIXME: these tests fail for unknown reasons:
15266 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15267 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15268 (substitute* "numba/tests/test_dispatcher.py"
15269 (("def test(_non_writable_pycache)" _ m)
15270 (string-append "def guix_skip" m))
15271 (("def test(_non_creatable_pycache)" _ m)
15272 (string-append "def guix_skip" m))
15273 (("def test(_frozen)" _ m)
15274 (string-append "def guix_skip" m)))
15275
15276 ;; These tests fail because we don't run the tests from the build
15277 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15278 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15279 (substitute* "numba/tests/test_pycc.py"
15280 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15281 (string-append "def guix_skip" m)))
15282 #t))
15283 (replace 'check
15284 (lambda _
15285 (let ((cwd (getcwd)))
15286 (setenv "PYTHONPATH"
15287 (string-append cwd "/build/"
15288 (find (cut string-prefix? "lib" <>)
15289 (scandir (string-append cwd "/build")))
15290 ":"
15291 (getenv "PYTHONPATH")))
15292 ;; Something is wrong with the PYTHONPATH when running the
15293 ;; tests from the build directory, as it complains about not being
15294 ;; able to import certain modules.
15295 (with-directory-excursion "/tmp"
15296 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15297 #t)))))
15298 (propagated-inputs
15299 `(("python-llvmlite" ,python-llvmlite)
15300 ("python-numpy" ,python-numpy)
15301 ("python-singledispatch" ,python-singledispatch)))
15302 ;; Needed for tests.
15303 (inputs
15304 `(("python-jinja2" ,python-jinja2)
15305 ("python-pygments" ,python-pygments)))
15306 (home-page "https://numba.pydata.org")
15307 (synopsis "Compile Python code using LLVM")
15308 (description "Numba gives you the power to speed up your applications with
15309high performance functions written directly in Python. With a few
15310annotations, array-oriented and math-heavy Python code can be just-in-time
15311compiled to native machine instructions, similar in performance to C, C++ and
15312Fortran, without having to switch languages or Python interpreters.
15313
15314Numba works by generating optimized machine code using the LLVM compiler
15315infrastructure at import time, runtime, or statically (using the included pycc
15316tool).")
15317 (license license:bsd-3)))
15318
15319(define-public python-anndata
15320 (package
15321 (name "python-anndata")
8c9372c1 15322 (version "0.6.18")
44d10b1f
RW
15323 (source
15324 (origin
15325 (method url-fetch)
15326 (uri (pypi-uri "anndata" version))
15327 (sha256
15328 (base32
8c9372c1 15329 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15330 (build-system python-build-system)
15331 (propagated-inputs
15332 `(("python-h5py" ,python-h5py)
15333 ("python-natsort" ,python-natsort)
15334 ("python-pandas" ,python-pandas)
15335 ("python-scipy" ,python-scipy)))
15336 (home-page "https://github.com/theislab/anndata")
15337 (synopsis "Annotated data for data analysis pipelines")
15338 (description "Anndata is a package for simple (functional) high-level APIs
15339for data analysis pipelines. In this context, it provides an efficient,
15340scalable way of keeping track of data together with learned annotations and
15341reduces the code overhead typically encountered when using a mostly
15342object-oriented library such as @code{scikit-learn}.")
15343 (license license:bsd-3)))
15344
15345(define-public python-dill
15346 (package
15347 (name "python-dill")
c60b15cc 15348 (version "0.2.9")
44d10b1f
RW
15349 (source
15350 (origin
15351 (method url-fetch)
15352 (uri (pypi-uri "dill" version))
15353 (sha256
c60b15cc 15354 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15355 (build-system python-build-system)
c60b15cc 15356 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15357 (arguments '(#:tests? #f))
15358 (home-page "https://pypi.org/project/dill")
15359 (synopsis "Serialize all of Python")
15360 (description "Dill extends Python's @code{pickle} module for serializing
15361and de-serializing Python objects to the majority of the built-in Python
15362types. Dill provides the user the same interface as the @code{pickle} module,
15363and also includes some additional features. In addition to pickling Python
15364objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15365session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15366interpreter session, close the interpreter, ship the pickled file to another
15367computer, open a new interpreter, unpickle the session and thus continue from
15368the saved state of the original interpreter session.")
15369 (license license:bsd-3)))
15370
15371(define-public python-multiprocess
15372 (package
15373 (name "python-multiprocess")
15374 (version "0.70.6.1")
15375 (source
15376 (origin
15377 (method url-fetch)
15378 (uri (pypi-uri "multiprocess" version))
15379 (sha256
15380 (base32
15381 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15382 (build-system python-build-system)
15383 (propagated-inputs
15384 `(("python-dill" ,python-dill)))
15385 (home-page "https://pypi.org/project/multiprocess")
15386 (synopsis "Multiprocessing and multithreading in Python")
15387 (description
15388 "This package is a fork of the multiprocessing Python package, a package
15389which supports the spawning of processes using the API of the standard
15390library's @code{threading} module.")
15391 (license license:bsd-3)))
15392
15393(define-public python-toolz
15394 (package
15395 (name "python-toolz")
15396 (version "0.9.0")
15397 (source
15398 (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "toolz" version))
15401 (sha256
15402 (base32
15403 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15404 (build-system python-build-system)
15405 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15406 ;; unregistered loader type"
15407 (arguments '(#:tests? #f))
15408 (home-page "https://github.com/pytoolz/toolz/")
15409 (synopsis "List processing tools and functional utilities")
15410 (description
15411 "This package provides a set of utility functions for iterators,
15412functions, and dictionaries.")
15413 (license license:bsd-3)))
15414
15415(define-public python2-toolz
15416 (package-with-python2 python-toolz))
15417
15418(define-public python-cytoolz
15419 (package
15420 (name "python-cytoolz")
15421 (version "0.9.0.1")
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "cytoolz" version))
15426 (sha256
15427 (base32
15428 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15429 (build-system python-build-system)
15430 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15431 ;; 'exceptions'"
15432 (arguments '(#:tests? #f))
15433 (propagated-inputs
15434 `(("python-toolz" ,python-toolz)))
15435 (native-inputs
15436 `(("python-cython" ,python-cython)))
15437 (home-page "https://github.com/pytoolz/cytoolz")
15438 (synopsis "High performance functional utilities")
15439 (description
15440 "The cytoolz package implements the same API as provided by toolz. The
15441main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15442that is accessible to other projects developed in Cython.")
15443 (license license:bsd-3)))
15444
15445(define-public python-sortedcontainers
15446 (package
15447 (name "python-sortedcontainers")
15448 (version "2.0.4")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "sortedcontainers" version))
15453 (sha256
15454 (base32
15455 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15456 (build-system python-build-system)
15457 (native-inputs
15458 `(("python-tox" ,python-tox)))
15459 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15460 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15461 (description
15462 "This package provides a sorted collections library, written in
15463pure-Python.")
15464 (license license:asl2.0)))
15465
15466(define-public python-cloudpickle
15467 (package
15468 (name "python-cloudpickle")
15469 (version "0.6.1")
15470 (source
15471 (origin
15472 (method url-fetch)
15473 (uri (pypi-uri "cloudpickle" version))
15474 (sha256
15475 (base32
15476 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15477 (build-system python-build-system)
15478 ;; FIXME: there are 5 errors in 122 tests:
15479 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15480 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15481 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15482 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15483 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15484 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15485 (arguments '(#:tests? #f))
15486 (native-inputs
15487 `(("python-pytest" ,python-pytest)
15488 ("python-mock" ,python-mock)
15489 ("python-tornado" ,python-tornado)))
15490 (home-page "https://github.com/cloudpipe/cloudpickle")
15491 (synopsis "Extended pickling support for Python objects")
15492 (description
15493 "Cloudpickle makes it possible to serialize Python constructs not
15494supported by the default pickle module from the Python standard library. It
15495is especially useful for cluster computing where Python expressions are
15496shipped over the network to execute on remote hosts, possibly close to the
15497data.")
15498 (license license:bsd-3)))
15499
15500(define-public python2-cloudpickle
15501 (package-with-python2 python-cloudpickle))
15502
15503(define-public python-locket
15504 (package
15505 (name "python-locket")
15506 (version "0.2.0")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "locket" version))
15511 (sha256
15512 (base32
15513 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15514 (build-system python-build-system)
15515 (home-page "https://github.com/mwilliamson/locket.py")
15516 (synopsis "File-based locks for Python")
15517 (description
15518 "Locket implements a lock that can be used by multiple processes provided
15519they use the same path.")
15520 (license license:bsd-2)))
15521
15522(define-public python2-locket
15523 (package-with-python2 python-locket))
15524
15525(define-public python-blosc
15526 (package
15527 (name "python-blosc")
15528 (version "1.5.1")
15529 (source
15530 (origin
15531 (method url-fetch)
15532 (uri (pypi-uri "blosc" version))
15533 (sha256
15534 (base32
15535 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15536 (build-system python-build-system)
15537 ;; FIXME: all tests pass, but then this error is printed:
15538 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15539 (arguments '(#:tests? #f))
15540 (propagated-inputs
15541 `(("python-numpy" ,python-numpy)))
15542 (home-page "https://github.com/blosc/python-blosc")
15543 (synopsis "Python wrapper for the Blosc data compressor library")
15544 (description "Blosc is a high performance compressor optimized for binary
15545data. It has been designed to transmit data to the processor cache faster
15546than the traditional, non-compressed, direct memory fetch approach via a
15547@code{memcpy()} system call.
15548
15549Blosc works well for compressing numerical arrays that contains data with
15550relatively low entropy, like sparse data, time series, grids with
15551regular-spaced values, etc.
15552
15553This Python package wraps the Blosc library.")
15554 (license license:bsd-3)))
15555
15556(define-public python2-blosc
15557 (package-with-python2 python-blosc))
15558
15559(define-public python-partd
15560 (package
15561 (name "python-partd")
15562 (version "0.3.9")
15563 (source
15564 (origin
15565 (method url-fetch)
15566 (uri (pypi-uri "partd" version))
15567 (sha256
15568 (base32
15569 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15570 (build-system python-build-system)
15571 (propagated-inputs
15572 `(("python-blosc" ,python-blosc)
15573 ("python-locket" ,python-locket)
15574 ("python-numpy" ,python-numpy)
15575 ("python-pandas" ,python-pandas)
15576 ("python-pyzmq" ,python-pyzmq)
15577 ("python-toolz" ,python-toolz)))
15578 (home-page "https://github.com/dask/partd/")
15579 (synopsis "Appendable key-value storage")
15580 (description "Partd stores key-value pairs. Values are raw bytes. We
15581append on old values. Partd excels at shuffling operations.")
15582 (license license:bsd-3)))
15583
15584(define-public python2-partd
15585 (package-with-python2 python-partd))
15586
15587(define-public python-dask
15588 (package
15589 (name "python-dask")
0998175f 15590 (version "1.2.2")
44d10b1f
RW
15591 (source
15592 (origin
15593 (method url-fetch)
15594 (uri (pypi-uri "dask" version))
15595 (sha256
0998175f 15596 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15597 (build-system python-build-system)
15598 ;; A single test out of 5000+ fails. This test is marked as xfail when
15599 ;; pytest-xdist is used.
15600 (arguments
15601 `(#:phases
15602 (modify-phases %standard-phases
15603 (add-after 'unpack 'disable-broken-test
15604 (lambda _
15605 (substitute* "dask/tests/test_threaded.py"
15606 (("def test_interrupt\\(\\)" m)
15607 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15608 m)))
15609 (when (which "python2")
15610 ;; This test fails with recent Pandas:
15611 ;; <https://github.com/dask/dask/issues/3794>.
15612 (substitute* "dask/dataframe/tests/test_dataframe.py"
15613 (("def test_info\\(\\)" m)
15614 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15615 m))))
15616 #t))
15617 (replace 'check
15618 (lambda _ (invoke "pytest" "-vv"))))))
15619 (propagated-inputs
15620 `(("python-cloudpickle" ,python-cloudpickle)
15621 ("python-numpy" ,python-numpy)
15622 ("python-pandas" ,python-pandas)
15623 ("python-partd" ,python-partd)
15624 ("python-toolz" ,python-toolz)
15625 ("python-pyyaml" ,python-pyyaml)))
15626 (native-inputs
15627 `(("python-pytest" ,python-pytest)
15628 ("python-pytest-runner" ,python-pytest-runner)))
15629 (home-page "https://github.com/dask/dask/")
15630 (synopsis "Parallel computing with task scheduling")
15631 (description
15632 "Dask is a flexible parallel computing library for analytics. It
15633consists of two components: dynamic task scheduling optimized for computation,
15634and large data collections like parallel arrays, dataframes, and lists that
15635extend common interfaces like NumPy, Pandas, or Python iterators to
15636larger-than-memory or distributed environments. These parallel collections
15637run on top of the dynamic task schedulers. ")
15638 (license license:bsd-3)))
15639
15640(define-public python2-dask
15641 (package-with-python2 python-dask))
15642
15643(define-public python-ilinkedlist
15644 (package
15645 (name "python-ilinkedlist")
15646 (version "0.4.0")
15647 (source
15648 (origin
15649 (method url-fetch)
15650 (uri (pypi-uri "ilinkedlist" version))
15651 (sha256
15652 (base32
15653 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15654 (build-system python-build-system)
15655 (native-inputs `(("python-pytest" ,python-pytest)))
15656 (inputs `(("python" ,python)))
15657 (home-page "https://github.com/luther9/ilinkedlist-py")
15658 (synopsis "Immutable linked list library")
15659 (description
15660 "This is a implementation of immutable linked lists for Python. It
15661contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15662Since a linked list is treated as immutable, it is hashable, and its length
15663can be retrieved in constant time. Some of the terminology is inspired by
15664LISP. It is possible to create an improper list by creating a @code{Pair}
15665with a non-list @code{cdr}.")
15666 (license license:gpl3+)))
15667
15668(define-public python-readlike
15669 (package
15670 (name "python-readlike")
15671 (version "0.1.3")
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "readlike" version))
15676 (sha256
15677 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15678 (build-system python-build-system)
15679 (home-page "https://github.com/jangler/readlike")
15680 (synopsis "GNU Readline-like line editing module")
15681 (description
15682 "This Python module provides line editing functions similar to the default
15683Emacs-style ones of GNU Readline. Unlike the Python standard library's
15684@code{readline} package, this one allows access to those capabilties in settings
15685outside of a standard command-line interface. It is especially well-suited to
15686interfacing with Urwid, due to a shared syntax for describing key inputs.
15687
15688Currently, all stateless Readline commands are implemented. Yanking and history
15689are not supported.")
15690 (license license:expat)))
15691
15692(define-public python2-readlike
15693 (package-with-python2 python-readlike))
15694
15695(define-public python-reparser
15696 (package
15697 (name "python-reparser")
15698 (version "1.4.3")
15699 (source
15700 (origin
15701 (method url-fetch)
15702 (uri (pypi-uri "ReParser" version))
15703 (sha256
15704 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15705 (build-system python-build-system)
15706 (home-page "https://github.com/xmikos/reparser")
15707 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15708 (description
15709 "This Python library provides a simple lexer/parser for inline markup based
15710on regular expressions.")
15711 (license license:expat)))
15712
15713(define-public python2-reparser
15714 (let ((reparser (package-with-python2
15715 (strip-python2-variant python-reparser))))
15716 (package (inherit reparser)
15717 (propagated-inputs
15718 `(("python2-enum34" ,python2-enum34)
15719 ,@(package-propagated-inputs reparser))))))
15720
15721(define-public python-precis-i18n
15722 (package
15723 (name "python-precis-i18n")
15724 (version "1.0.0")
15725 (source
15726 (origin
15727 (method url-fetch)
15728 (uri (pypi-uri "precis_i18n" version))
15729 (sha256
15730 (base32
15731 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15732 (build-system python-build-system)
15733 (home-page "https://github.com/byllyfish/precis_i18n")
15734 (synopsis "Implementation of the PRECIS framework")
15735 (description
15736 "This module implements the PRECIS Framework as described in RFC 8264,
15737RFC 8265 and RFC 8266.")
15738 (license license:expat)))
15739
d0446c4b
RW
15740(define-public python-absl-py
15741 (package
15742 (name "python-absl-py")
15743 (version "0.6.1")
15744 (source
15745 (origin
15746 (method url-fetch)
15747 (uri (pypi-uri "absl-py" version))
15748 (sha256
15749 (base32
15750 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15751 (build-system python-build-system)
15752 (propagated-inputs
15753 `(("python-six" ,python-six)))
15754 (home-page "https://github.com/abseil/abseil-py")
15755 (synopsis "Abseil Python common libraries")
15756 (description
15757 "This package provides the Abseil Python Common Libraries, a collection
15758of Python libraries for building Python applications.")
15759 (license license:asl2.0)))
15760
81bed4e9
RW
15761(define-public python-astor
15762 (package
15763 (name "python-astor")
15764 (version "0.7.1")
15765 (source
15766 (origin
15767 (method url-fetch)
15768 (uri (pypi-uri "astor" version))
15769 (sha256
15770 (base32
15771 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15772 (build-system python-build-system)
15773 ;; FIXME: There are two errors and two test failures.
15774 (arguments `(#:tests? #f))
15775 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15776 (synopsis "Read and write Python ASTs")
81bed4e9 15777 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15778source via the Abstract Syntax Tree.")
81bed4e9
RW
15779 (license license:bsd-3)))
15780
39ee82ff
RW
15781(define-public python2-astor
15782 (package-with-python2 python-astor))
15783
22e623ae
RW
15784(define-public python-grpcio
15785 (package
15786 (name "python-grpcio")
15787 (version "1.17.1")
15788 (source
15789 (origin
15790 (method url-fetch)
15791 (uri (pypi-uri "grpcio" version))
15792 (sha256
15793 (base32
15794 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15795 (build-system python-build-system)
15796 (propagated-inputs
15797 `(("python-six" ,python-six)))
15798 (home-page "https://grpc.io")
15799 (synopsis "HTTP/2-based RPC framework")
15800 (description "This package provides a Python library for communicating
15801with the HTTP/2-based RPC framework gRPC.")
15802 (license license:asl2.0)))
15803
79869f80
RW
15804(define-public python-astunparse
15805 (package
15806 (name "python-astunparse")
47d79541 15807 (version "1.6.2")
79869f80
RW
15808 (source
15809 (origin
15810 (method url-fetch)
15811 (uri (pypi-uri "astunparse" version))
15812 (sha256
47d79541 15813 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15814 (build-system python-build-system)
47d79541 15815 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15816 (propagated-inputs
15817 `(("python-six" ,python-six)
15818 ("python-wheel" ,python-wheel)))
15819 (home-page "https://github.com/simonpercivall/astunparse")
15820 (synopsis "AST unparser for Python")
15821 (description "This package provides an AST unparser for Python. It is a
15822factored out version of @code{unparse} found in the Python source
15823distribution.")
15824 (license license:bsd-3)))
15825
2884aac0
RW
15826(define-public python-gast
15827 (package
15828 (name "python-gast")
bd300261 15829 (version "0.2.2")
2884aac0
RW
15830 (source
15831 (origin
15832 (method url-fetch)
15833 (uri (pypi-uri "gast" version))
15834 (sha256
bd300261 15835 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15836 (build-system python-build-system)
15837 (propagated-inputs
15838 `(("python-astunparse" ,python-astunparse)))
15839 (home-page "https://pypi.org/project/gast/")
15840 (synopsis "Generic Python AST that abstracts the underlying Python version")
15841 (description
15842 "GAST provides a compatibility layer between the AST of various Python
15843versions, as produced by @code{ast.parse} from the standard @code{ast}
15844module.")
15845 (license license:bsd-3)))
15846
44d10b1f
RW
15847(define-public python-wikidata
15848 (package
15849 (name "python-wikidata")
15850 (version "0.6.1")
15851 (source
15852 (origin
15853 (method url-fetch)
15854 (uri (pypi-uri "Wikidata" version))
15855 (sha256
15856 (base32
15857 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15858 (build-system python-build-system)
15859 (propagated-inputs
15860 `(("python-babel" ,python-babel)))
15861 (home-page "https://github.com/dahlia/wikidata")
15862 (synopsis "Wikidata client library")
15863 (description
15864 "This package provides a Python interface to
15865@url{https://www.wikidata.org/, Wikidata}.")
15866 (properties '((upstream-name . "Wikidata")))
15867 (license license:gpl3+)))
15868
15869(define-public python-doctest-ignore-unicode
15870 (package
15871 (name "python-doctest-ignore-unicode")
15872 (version "0.1.2")
15873 (source
15874 (origin
15875 (method url-fetch)
15876 (uri (pypi-uri "doctest-ignore-unicode" version))
15877 (sha256
15878 (base32
15879 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15880 (build-system python-build-system)
15881 (native-inputs
15882 `(("python-nose" ,python-nose)))
15883 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15884 (synopsis "Ignore Unicode literal prefixes in doctests")
15885 (description
15886 "This package adds support for a flag to ignore Unicode literal prefixes
15887in doctests.")
15888 (license license:asl2.0)))
15889
15890(define-public python-attr
15891 (package
15892 (name "python-attr")
15893 (version "0.3.1")
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "attr" version))
15898 (sha256
15899 (base32
15900 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15901 (build-system python-build-system)
15902 (home-page "https://github.com/denis-ryzhkov/attr")
15903 (synopsis "Decorator for attributes of target function or class")
15904 (description "Simple decorator to set attributes of target function or
15905class in a @acronym{DRY, Don't Repeat Yourself} way.")
15906 (license license:expat)))
f98232a3
VC
15907
15908(define-public python-construct
15909 (package
15910 (name "python-construct")
15911 (version "2.9.45")
15912 (source
15913 (origin
15914 (method url-fetch)
15915 (uri (pypi-uri "construct" version))
15916 (sha256
15917 (base32
15918 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15919 (build-system python-build-system)
15920 (arguments
15921 `(#:tests? #f)) ; No tests exist.
15922 (propagated-inputs
15923 `(("python-extras" ,python-extras)
15924 ("python-arrow" ,python-arrow)
15925 ("python-numpy" ,python-numpy)
15926 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15927 (home-page "http://construct.readthedocs.io")
15928 (synopsis "Declarative and symmetrical parser and builder for binary data")
15929 (description
15930 "This package provides both simple, atomic constructs (such as
15931integers of various sizes), as well as composite ones which allow you
15932form hierarchical and sequential structures of increasing complexity.
15933It features bit and byte granularity, easy debugging and testing, an
15934easy-to-extend subclass system, and lots of primitive constructs to
15935make your work easier.")
15936 (license license:expat)))
b742c006
LF
15937
15938(define-public python-humanize
15939 (package
15940 (name "python-humanize")
15941 (version "0.5.1")
15942 (source
15943 (origin
15944 (method url-fetch)
15945 (uri (pypi-uri "humanize" version))
15946 (sha256
15947 (base32
15948 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15949 (arguments
15950 '(#:tests? #f)) ; tests not in pypi archive
15951 (build-system python-build-system)
15952 (home-page "https://github.com/jmoiron/humanize")
15953 (synopsis "Print numerical information in a human-readable form")
15954 (description "This package provides a Python module that displays numbers
15955and dates in \"human readable\" forms. For example, it would display
15956\"12345591313\" as \"12.3 billion\".")
15957 (license license:expat)))
d5bbf66d
LF
15958
15959(define-public python-txaio
15960 (package
15961 (name "python-txaio")
15962 (version "18.8.1")
15963 (source
15964 (origin
15965 (method url-fetch)
15966 (uri (pypi-uri "txaio" version))
15967 (sha256
15968 (base32
15969 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15970 (build-system python-build-system)
15971 (propagated-inputs
15972 `(("python-twisted" ,python-twisted)
15973 ("python-six" ,python-six)))
15974 (home-page "https://github.com/crossbario/txaio")
15975 (synopsis "Compatibility layer between Python asyncio and Twisted")
15976 (description "Txaio provides a compatibility layer between the Python
15977@code{asyncio} module and @code{Twisted}.")
15978 (license license:expat)))
963dfd3a
RW
15979
15980(define-public python-toolshed
15981 (package
15982 (name "python-toolshed")
15983 (version "0.4.6")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "toolshed" version))
15988 (sha256
15989 (base32
15990 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15991 (build-system python-build-system)
15992 (native-inputs
15993 `(("python-nose" ,python-nose)))
15994 (home-page "https://github.com/brentp/toolshed/")
15995 (synopsis "Collection of modules and functions for working with data")
15996 (description "This is a collection of well-tested, simple modules and
15997functions that aim to reduce boilerplate when working with data.")
15998 (license license:bsd-2)))
c91ecf2d
RW
15999
16000(define-public python-annoy
16001 (package
16002 (name "python-annoy")
16003 (version "1.15.1")
16004 (source
16005 (origin
16006 (method url-fetch)
16007 (uri (pypi-uri "annoy" version))
16008 (sha256
16009 (base32
16010 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16011 (build-system python-build-system)
16012 (native-inputs
16013 `(("python-nose" ,python-nose)))
16014 (home-page "https://github.com/spotify/annoy/")
16015 (synopsis "Approximate nearest neighbors library")
16016 (description
16017 "Annoy is a C++ library with Python bindings to search for points in
16018space that are close to a given query point. It also creates large read-only
16019file-based data structures that are @code{mmap}ped into memory so that many
16020processes may share the same data.")
16021 (license license:asl2.0)))
412342d1 16022
79bfa422 16023(define-public python-pylzma
412342d1 16024 (package
79bfa422
DM
16025 (name "python-pylzma")
16026 (version "0.5.0")
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "pylzma" version))
16031 (sha256
16032 (base32
16033 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16034 (build-system python-build-system)
79bfa422
DM
16035 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16036 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16037 (description "This package provides Python bindings for the LZMA library
16038by Igor Pavlov.")
16039 (license license:lgpl2.1+)))
16040
16041(define-public python2-pylzma
16042 (package-with-python2 python-pylzma))
f825e605 16043
6609ebe7
AG
16044(define-public python2-zeroconf
16045 (package
16046 (name "python2-zeroconf")
16047
16048 ;; This is the last version that supports Python 2.x.
16049 (version "0.19.1")
16050 (source
16051 (origin
16052 (method url-fetch)
16053 (uri (pypi-uri "zeroconf" version))
16054 (sha256
16055 (base32
16056 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16057 (build-system python-build-system)
16058 (arguments
16059 `(#:python ,python-2
16060 #:phases
16061 (modify-phases %standard-phases
16062 (add-after 'unpack 'patch-requires
16063 (lambda* (#:key inputs #:allow-other-keys)
16064 (substitute* "setup.py"
16065 (("enum-compat")
16066 "enum34"))
16067 #t)))))
16068 (native-inputs
16069 `(("python2-six" ,python2-six)
16070 ("python2-enum32" ,python2-enum34)
16071 ("python2-netifaces" ,python2-netifaces)
16072 ("python2-typing" ,python2-typing)))
16073 (home-page "https://github.com/jstasiak/python-zeroconf")
16074 (synopsis "Pure Python mDNS service discovery")
16075 (description
16076 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16077compatible).")
16078 (license license:lgpl2.1+)))
16079
f825e605
GLV
16080(define-public python-bsddb3
16081 (package
16082 (name "python-bsddb3")
16083 (version "6.2.6")
16084 (source
16085 (origin
16086 (method url-fetch)
16087 (uri (pypi-uri "bsddb3" version))
16088 (sha256
16089 (base32
16090 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16091 (build-system python-build-system)
16092 (inputs
16093 `(("bdb" ,bdb)))
16094 (arguments
16095 '(#:phases
16096 (modify-phases %standard-phases
16097 (add-after 'unpack 'configure-locations
16098 (lambda* (#:key inputs #:allow-other-keys)
16099 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16100 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16101 #t))
16102 (replace 'check
16103 (lambda _
16104 (invoke "python3" "test3.py" "-v"))))))
16105 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16106 (synopsis "Python bindings for Oracle Berkeley DB")
16107 (description
16108 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16109C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16110Transaction objects, and each of these is exposed as a Python type in the
16111bsddb3.db module. The database objects can use various access methods: btree,
16112hash, recno, and queue. Complete support of Berkeley DB distributed
16113transactions. Complete support for Berkeley DB Replication Manager.
16114Complete support for Berkeley DB Base Replication. Support for RPC.")
16115 (license license:bsd-3)))
edeb04bf
PL
16116
16117(define-public python-dbfread
16118 (package
16119 (name "python-dbfread")
16120 (version "2.0.7")
16121 (source (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "dbfread" version))
16124 (sha256
16125 (base32
16126 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16127 (build-system python-build-system)
16128 (native-inputs
16129 `(("python-pytest" ,python-pytest)))
16130 (home-page "https://dbfread.readthedocs.io")
16131 (synopsis "Read DBF Files with Python")
16132 (description
16133 "This library reads DBF files and returns the data as native Python data
16134types for further processing. It is primarily intended for batch jobs and
16135one-off scripts.")
16136 (license license:expat)))
e308b4f0
JM
16137
16138(define-public python-cached-property
16139 (package
16140 (name "python-cached-property")
16141 (version "1.5.1")
16142 (source
16143 (origin
16144 (method url-fetch)
16145 (uri (pypi-uri "cached-property" version))
16146 (sha256
16147 (base32
16148 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16149 (build-system python-build-system)
16150 (arguments
16151 `(#:phases
16152 (modify-phases %standard-phases
16153 ;; https://github.com/pydanny/cached-property/issues/131
16154 ;; recent versions of freezegun break one test
16155 (add-after 'unpack 'disable-broken-test
16156 (lambda _
16157 (substitute* "tests/test_cached_property.py"
16158 (("def test_threads_ttl_expiry\\(self\\)" m)
16159 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16160 " " m)))
16161 #t)))))
16162 (native-inputs
16163 `(("python-freezegun" ,python-freezegun)))
16164 (home-page
16165 "https://github.com/pydanny/cached-property")
16166 (synopsis
16167 "Decorator for caching properties in classes")
16168 (description
16169 "This package provides a decorator which makes caching
16170time-or-computationally-expensive properties quick and easy and works in Python
161712 or 3.")
16172 (license license:bsd-3)))
dfe8a704
NG
16173
16174(define-public python-folium
16175 (package
16176 (name "python-folium")
16177 (version "0.10.0")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "folium" version))
16182 (sha256
16183 (base32
16184 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16185 (build-system python-build-system)
16186 (propagated-inputs
16187 `(("python-branca" ,python-branca)
16188 ("python-jinja2" ,python-jinja2)
16189 ("python-numpy" ,python-numpy)
16190 ("python-requests" ,python-requests)))
16191 (native-inputs
16192 `(("python-pytest" ,python-pytest)))
16193 (home-page "https://github.com/python-visualization/folium")
16194 (synopsis "Make beautiful maps with Leaflet.js & Python")
16195 (description "@code{folium} makes it easy to visualize data that’s been
16196manipulated in Python on an interactive leaflet map. It enables both the
16197binding of data to a map for @code{choropleth} visualizations as well as
16198passing rich vector/raster/HTML visualizations as markers on the map.
16199
16200The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16201Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16202supports Image, Video, GeoJSON and TopoJSON overlays.")
16203 (license license:expat)))
9dd5f475
LC
16204
16205(define-public jube
16206 (package
16207 ;; This is a command-line tool, so no "python-" prefix.
16208 (name "jube")
16209 (version "2.2.2")
16210 (source (origin
16211 (method url-fetch)
16212 (uri (string-append
16213 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16214 version))
16215 (sha256
16216 (base32
16217 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16218 (file-name (string-append "jube-" version ".tar.gz"))))
16219 (build-system python-build-system)
16220 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16221 (synopsis "Benchmarking environment")
16222 (description
16223 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16224benchmarked application, benchmark data is stored in a format that allows JUBE
16225to deduct the desired information. This data can be parsed by automatic pre-
16226and post-processing scripts that draw information and store it more densely
16227for manual interpretation.")
a9f33960 16228 (license license:gpl3+)))
66436424
NG
16229
16230(define-public python-pyroutelib3
16231 (package
16232 (name "python-pyroutelib3")
16233 (version "1.3.post1")
16234 (source
16235 (origin
16236 (method url-fetch)
16237 (uri (pypi-uri "pyroutelib3" version))
16238 (sha256
16239 (base32
16240 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16241 (build-system python-build-system)
16242 (propagated-inputs
16243 `(("python-dateutil" ,python-dateutil)))
16244 (home-page "https://github.com/MKuranowski/pyroutelib3")
16245 (synopsis "Library for simple routing on OSM data")
16246 (description "Library for simple routing on OSM data")
16247 (license license:gpl3+)))
30e7c03a
GL
16248
16249(define-public python-elementpath
16250 (package
16251 (name "python-elementpath")
16252 (version "1.2.0")
16253 (source
16254 (origin
16255 (method url-fetch)
16256 (uri (pypi-uri "elementpath" version))
16257 (sha256
16258 (base32
16259 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16260 (build-system python-build-system)
16261 (home-page
16262 "https://github.com/sissaschool/elementpath")
16263 (synopsis
16264 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16265 (description
16266 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16267for Python's ElementTree XML data structures, both for the standard
16268ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16269
16270For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16271because lxml.etree already has it's own implementation of XPath 1.0.")
16272 (license license:expat)))