gnu: python2-cython: Fix failing test.
[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>
47f66348 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>
44d10b1f
RW
66;;;
67;;; This file is part of GNU Guix.
68;;;
69;;; GNU Guix is free software; you can redistribute it and/or modify it
70;;; under the terms of the GNU General Public License as published by
71;;; the Free Software Foundation; either version 3 of the License, or (at
72;;; your option) any later version.
73;;;
74;;; GNU Guix is distributed in the hope that it will be useful, but
75;;; WITHOUT ANY WARRANTY; without even the implied warranty of
76;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77;;; GNU General Public License for more details.
78;;;
79;;; You should have received a copy of the GNU General Public License
80;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
81
82(define-module (gnu packages python-xyz)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (gnu packages)
85 #:use-module (gnu packages algebra)
86 #:use-module (gnu packages adns)
87 #:use-module (gnu packages attr)
88 #:use-module (gnu packages backup)
89 #:use-module (gnu packages bash)
90 #:use-module (gnu packages check)
91 #:use-module (gnu packages compression)
92 #:use-module (gnu packages crypto)
93 #:use-module (gnu packages databases)
f825e605 94 #:use-module (gnu packages dbm)
44d10b1f
RW
95 #:use-module (gnu packages file)
96 #:use-module (gnu packages fontutils)
97 #:use-module (gnu packages gcc)
98 #:use-module (gnu packages geo)
99 #:use-module (gnu packages ghostscript)
100 #:use-module (gnu packages gl)
101 #:use-module (gnu packages glib)
102 #:use-module (gnu packages graphviz)
103 #:use-module (gnu packages graphics)
104 #:use-module (gnu packages gstreamer)
105 #:use-module (gnu packages gtk)
106 #:use-module (gnu packages icu4c)
107 #:use-module (gnu packages image)
108 #:use-module (gnu packages imagemagick)
109 #:use-module (gnu packages libevent)
110 #:use-module (gnu packages libffi)
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages llvm)
113 #:use-module (gnu packages man)
114 #:use-module (gnu packages maths)
42f0b0c2 115 #:use-module (gnu packages monitoring)
44d10b1f
RW
116 #:use-module (gnu packages multiprecision)
117 #:use-module (gnu packages networking)
118 #:use-module (gnu packages ncurses)
119 #:use-module (gnu packages openstack)
120 #:use-module (gnu packages pcre)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages pkg-config)
123 #:use-module (gnu packages python)
d362b11d 124 #:use-module (gnu packages python-check)
15b65617 125 #:use-module (gnu packages python-compression)
44d10b1f
RW
126 #:use-module (gnu packages python-crypto)
127 #:use-module (gnu packages python-web)
128 #:use-module (gnu packages qt)
129 #:use-module (gnu packages readline)
130 #:use-module (gnu packages sdl)
131 #:use-module (gnu packages search)
132 #:use-module (gnu packages shells)
9d0c291e 133 #:use-module (gnu packages sphinx)
44d10b1f
RW
134 #:use-module (gnu packages ssh)
135 #:use-module (gnu packages terminals)
136 #:use-module (gnu packages tex)
137 #:use-module (gnu packages texinfo)
138 #:use-module (gnu packages time)
139 #:use-module (gnu packages tls)
140 #:use-module (gnu packages version-control)
141 #:use-module (gnu packages video)
142 #:use-module (gnu packages web)
143 #:use-module (gnu packages base)
144 #:use-module (gnu packages xml)
145 #:use-module (gnu packages xorg)
146 #:use-module (gnu packages xdisorg)
147 #:use-module (gnu packages tcl)
148 #:use-module (gnu packages bdw-gc)
f98232a3 149 #:use-module (gnu packages serialization)
44d10b1f
RW
150 #:use-module (guix packages)
151 #:use-module (guix download)
152 #:use-module (guix git-download)
a042d348 153 #:use-module (guix hg-download)
44d10b1f
RW
154 #:use-module (guix utils)
155 #:use-module (guix build-system gnu)
156 #:use-module (guix build-system cmake)
157 #:use-module (guix build-system python)
158 #:use-module (guix build-system trivial)
159 #:use-module (srfi srfi-1)
160 #:use-module (srfi srfi-26))
161
162(define-public python-psutil
163 (package
164 (name "python-psutil")
7abf3cbf 165 (version "5.6.2")
44d10b1f
RW
166 (source
167 (origin
168 (method url-fetch)
169 (uri (pypi-uri "psutil" version))
170 (sha256
171 (base32
7abf3cbf 172 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
173 (build-system python-build-system)
174 (arguments
175 ;; FIXME: some tests does not return and times out.
176 '(#:tests? #f))
177 (home-page "https://www.github.com/giampaolo/psutil")
178 (synopsis "Library for retrieving information on running processes")
179 (description
180 "psutil (Python system and process utilities) is a library for retrieving
181information on running processes and system utilization (CPU, memory, disks,
182network) in Python. It is useful mainly for system monitoring, profiling and
183limiting process resources and management of running processes. It implements
184many functionalities offered by command line tools such as: ps, top, lsof,
185netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
186pidof, tty, taskset, pmap.")
187 (properties `((python2-variant . ,(delay python2-psutil))))
188 (license license:bsd-3)))
189
190(define-public python2-psutil
191 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
192 (package
193 (inherit base)
194 (propagated-inputs
195 `(("python2-enum34" ,python2-enum34) ;optional
196 ,@(package-propagated-inputs base))))))
197
198(define-public python-shapely
199 (package
200 (name "python-shapely")
6d94465b 201 (version "1.6.4.post2")
44d10b1f
RW
202 (source
203 (origin
204 (method url-fetch)
205 (uri (pypi-uri "Shapely" version))
206 (sha256
207 (base32
6d94465b 208 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
209 (build-system python-build-system)
210 (native-inputs
211 `(("python-cython" ,python-cython)
212 ("python-matplotlib" ,python-matplotlib)
213 ("python-pytest" ,python-pytest)
214 ("python-pytest-cov" ,python-pytest-cov)))
215 (inputs
216 `(("geos" ,geos)))
217 (propagated-inputs
218 `(("python-numpy" ,python-numpy)))
219 (arguments
220 `(#:phases
221 (modify-phases %standard-phases
222 (add-after 'unpack 'patch-geos-path
223 (lambda* (#:key inputs #:allow-other-keys)
224 (let ((geos (assoc-ref inputs "geos"))
225 (glibc (assoc-ref inputs ,(if (%current-target-system)
226 "cross-libc" "libc"))))
227 (substitute* "shapely/geos.py"
228 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
229 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
230 geos "/lib/libgeos_c.so'])"))
231 (("free = load_dll\\('c'\\)\\.free")
232 (string-append "free = load_dll('c', fallbacks=['"
233 glibc "/lib/libc.so.6']).free"))))
234 #t)))))
235 (home-page "https://github.com/Toblerity/Shapely")
236 (synopsis "Library for the manipulation and analysis of geometric objects")
237 (description "Shapely is a Python package for manipulation and analysis of
238planar geometric objects. It is based on the @code{GEOS} library.")
239 (license license:bsd-3)))
240
a91f4eba
S
241(define-public python-shortuuid
242 (package
243 (name "python-shortuuid")
244 (version "0.5.0")
245 (source
246 (origin
247 (method url-fetch)
248 (uri (pypi-uri "shortuuid" version))
249 (sha256
250 (base32
251 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
252 (build-system python-build-system)
253 (native-inputs
254 `(("python-pep8" ,python-pep8)))
255 (home-page "https://github.com/skorokithakis/shortuuid")
256 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
257 (description
258 "@code{shortuuid} is a Python library for generating concise, unambiguous
259and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
260module and then similar looking characters are removed.")
261 (license license:bsd-3)))
262
44d10b1f
RW
263(define-public python-logwrap
264 (package
265 (name "python-logwrap")
266 (version "3.2.1")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (pypi-uri "logwrap" version ".zip"))
271 (sha256
272 (base32
273 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
274 (build-system python-build-system)
275 (propagated-inputs
276 `(("python-six" ,python-six)
277 ("python-typing" ,python-typing)))
278 (native-inputs
279 `(("unzip" ,unzip)
280 ("python-cython" ,python-cython)
281 ("python-pytest" ,python-pytest)
282 ("python-pytest-cov" ,python-pytest-cov)
283 ("python-pytest-runner" ,python-pytest-runner)))
284 (home-page "https://github.com/penguinolog/logwrap")
285 (synopsis "Decorator for logging function arguments")
286 (description "This package provides a decorator to log function arguments
287and function call return values in a human-readable way.")
288 (license license:asl2.0)))
289
290(define-public python2-shapely
291 (package-with-python2 python-shapely))
292
293(define-public python-clyent
294 (package
295 (name "python-clyent")
296 (version "1.2.1")
297 (source
298 (origin
299 (method url-fetch)
300 (uri (pypi-uri "clyent" version))
301 (sha256
302 (base32
303 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-mock" ,python-mock)))
307 (home-page "https://github.com/binstar/clyent")
308 (synopsis "Command line client library")
309 (description "Clyent is a Python command line utiliy library. It is used
310by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
311 (license license:bsd-3)))
312
313(define-public python2-clyent
314 (package-with-python2 python-clyent))
315
316(define-public python-babel
317 (package
318 (name "python-babel")
93253411 319 (version "2.7.0")
44d10b1f
RW
320 (source
321 (origin
322 (method url-fetch)
323 (uri (pypi-uri "Babel" version))
324 (sha256
325 (base32
93253411 326 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
327 (build-system python-build-system)
328 (native-inputs
329 `(("python-freezegun" ,python-freezegun)
330 ("python-pytest" ,python-pytest)))
331 (propagated-inputs
332 `(("python-pytz" ,python-pytz)))
333 (arguments
334 `(#:phases (modify-phases %standard-phases
335 (replace 'check
8acd1e90
MB
336 (lambda _
337 (invoke "pytest" "-vv" "-k"
338 (string-append
339 ;; XXX: These tests fail when using Pytest 4.x and
340 ;; Babel 2.6.0. Try removing this for later versions.
341 "not test_no_inherit_metazone_marker_never_in_output"
342 " and not test_smoke_dates"
343 " and not test_smoke_numbers")))))))
44d10b1f
RW
344 (home-page "http://babel.pocoo.org/")
345 (synopsis
346 "Tools for internationalizing Python applications")
347 (description
348 "Babel is composed of two major parts:
349- tools to build and work with gettext message catalogs
350- a Python interface to the CLDR (Common Locale Data Repository), providing
351access to various locale display names, localized number and date formatting,
352etc. ")
353 (license license:bsd-3)))
354
355(define-public python2-babel
356 (package-with-python2 python-babel))
357
93253411
MB
358;; Sphinx < 2.0 requires this version. Remove once no longer needed.
359(define-public python2-babel-2.6
360 (package
361 (inherit python2-babel)
362 (version "2.6.0")
363 (source (origin
364 (method url-fetch)
365 (uri (pypi-uri "Babel" version))
366 (sha256
367 (base32
368 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
369
44d10b1f
RW
370(define-public python2-backport-ssl-match-hostname
371 (package
372 (name "python2-backport-ssl-match-hostname")
373 (version "3.5.0.1")
374 (source
375 (origin
376 (method url-fetch)
2c1f0d09 377 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
378 (sha256
379 (base32
380 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
381 (build-system python-build-system)
382 (arguments
383 `(#:python ,python-2
384 #:tests? #f)) ; no test target
385 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
386 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
387 (description
388 "This backport brings the ssl.match_hostname() function to users of
389earlier versions of Python. The function checks the hostname in the
390certificate returned by the server to which a connection has been established,
391and verifies that it matches the intended target hostname.")
392 (license license:psfl)))
393
394(define-public python-hdf4
395 (package
396 (name "python-hdf4")
397 (version "0.9")
398 (source
399 (origin
400 (method url-fetch)
401 (uri (pypi-uri name version))
402 (sha256
403 (base32
404 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
405 (build-system python-build-system)
406 (native-inputs `(("nose" ,python-nose)))
407 (propagated-inputs `(("numpy" ,python-numpy)))
408 (inputs
409 `(("hdf4" ,hdf4)
410 ("libjpeg" ,libjpeg)
411 ("zlib" ,zlib)))
412 (arguments
413 `(#:phases
414 (modify-phases %standard-phases
415 (replace 'check
416 (lambda _
417 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
418 ;; on to import numpy. Somehow this works on their CI system.
419 ;; Let's just manage PYTHONPATH here instead.
420 (substitute* "runexamples.sh"
421 (("export PYTHONPATH=.*") ""))
422 (setenv "PYTHONPATH"
423 (string-append (getcwd) ":"
424 (getenv "PYTHONPATH")))
425 (invoke "./runexamples.sh")
426 (invoke "nosetests" "-v"))))))
427 (home-page "https://github.com/fhs/python-hdf4")
428 (synopsis "Python interface to the NCSA HDF4 library")
429 (description
430 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
431which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
432NetCDF files can also be read and modified. Python-HDF4 is a fork of
433@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
434 (license license:expat)))
435
436(define-public python2-hdf4
437 (package-with-python2 python-hdf4))
438
439(define-public python-h5py
440 (package
441 (name "python-h5py")
442 (version "2.8.0")
443 (source
444 (origin
445 (method url-fetch)
446 (uri (pypi-uri "h5py" version))
447 (sha256
448 (base32
449 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
450 (build-system python-build-system)
451 (arguments
452 `(#:tests? #f ; no test target
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'unpack 'fix-hdf5-paths
456 (lambda* (#:key inputs #:allow-other-keys)
457 (let ((prefix (assoc-ref inputs "hdf5")))
458 (substitute* "setup_build.py"
459 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
460 (string-append "['" prefix "/lib" "']"))
461 (("'/opt/local/include', '/usr/local/include'")
462 (string-append "'" prefix "/include" "'")))
463 (substitute* "setup_configure.py"
464 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
465 (string-append "['" prefix "/lib" "']")))
466 #t))))))
467 (propagated-inputs
468 `(("python-six" ,python-six)
469 ("python-numpy" ,python-numpy)))
470 (inputs
471 `(("hdf5" ,hdf5)))
472 (native-inputs
473 `(("python-cython" ,python-cython)
474 ("python-pkgconfig" ,python-pkgconfig)))
475 (home-page "http://www.h5py.org/")
476 (synopsis "Read and write HDF5 files from Python")
477 (description
478 "The h5py package provides both a high- and low-level interface to the
479HDF5 library from Python. The low-level interface is intended to be a
480complete wrapping of the HDF5 API, while the high-level component supports
481access to HDF5 files, datasets and groups using established Python and NumPy
482concepts.")
483 (license license:bsd-3)))
484
485(define-public python2-h5py
486 (package-with-python2 python-h5py))
487
8b89dedc
RW
488(define-public python-sh
489 (package
490 (name "python-sh")
491 (version "1.12.14")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (pypi-uri "sh" version))
496 (sha256
497 (base32
498 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
499 (build-system python-build-system)
fd3638d8
EF
500 (arguments
501 '(#:phases
502 (modify-phases %standard-phases
503 (replace 'check
504 (lambda _
ca983a2f
NG
505 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
506 (setenv "HOME" "/tmp")
fd3638d8
EF
507 (invoke "python" "sh.py" "test"))))))
508 (native-inputs
509 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
510 (home-page "https://github.com/amoffat/sh")
511 (synopsis "Python subprocess replacement")
512 (description "This package provides a replacement for Python's
513@code{subprocess} feature.")
514 (license license:expat)))
515
3869effd
RW
516(define-public python2-sh
517 (package-with-python2 python-sh))
518
d362b11d
RW
519(define-public python-cftime
520 (package
521 (name "python-cftime")
522 (version "1.0.3.4")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "cftime" version))
527 (sha256
528 (base32
529 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
530 (build-system python-build-system)
531 (propagated-inputs
532 `(("python-numpy" ,python-numpy)))
533 (native-inputs
534 `(("python-coveralls" ,python-coveralls)
535 ("python-cython" ,python-cython)
536 ("python-pytest-cov" ,python-pytest-cov)))
537 (home-page "https://github.com/Unidata/cftime")
538 (synopsis "Library for time handling")
539 (description
540 "This package provides time-handling functionality that used to be part
541of the netcdf4 package before.")
542 ;; This package claims to include code under the GPLv3 but is released
543 ;; under ISC.
544 (license (list license:isc license:gpl3+))))
545
44d10b1f
RW
546(define-public python-netcdf4
547 (package
548 (name "python-netcdf4")
93e7b209 549 (version "1.4.2")
44d10b1f
RW
550 (source
551 (origin
552 (method url-fetch)
553 (uri (pypi-uri "netCDF4" version))
554 (sha256
555 (base32
93e7b209 556 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 557 (build-system python-build-system)
93e7b209
RW
558 (arguments
559 '(#:phases
560 (modify-phases %standard-phases
561 (add-after 'unpack 'configure-locations
562 (lambda* (#:key inputs #:allow-other-keys)
563 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
564 #t)))))
44d10b1f
RW
565 (native-inputs
566 `(("python-cython" ,python-cython)))
567 (propagated-inputs
93e7b209
RW
568 `(("python-numpy" ,python-numpy)
569 ("python-cftime" ,python-cftime)))
44d10b1f
RW
570 (inputs
571 `(("netcdf" ,netcdf)
572 ("hdf4" ,hdf4)
573 ("hdf5" ,hdf5)))
93e7b209 574 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
575 (synopsis "Python/numpy interface to the netCDF library")
576 (description "Netcdf4-python is a Python interface to the netCDF C
577library. netCDF version 4 has many features not found in earlier
578versions of the library and is implemented on top of HDF5. This module
579can read and write files in both the new netCDF 4 and the old netCDF 3
580format, and can create files that are readable by HDF5 clients. The
581API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
582to users of that module.")
583 ;; The software is mainly ISC, but includes some files covered
584 ;; by the Expat license.
585 (license (list license:isc license:expat))))
586
587(define-public python2-netcdf4
588 (package-with-python2 python-netcdf4))
589
590(define-public python-lockfile
591 (package
592 (name "python-lockfile")
593 (version "0.12.2")
594 (source
595 (origin
596 (method url-fetch)
8318bf07 597 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
598 (sha256
599 (base32
600 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
601 (build-system python-build-system)
602 (arguments '(#:test-target "check"))
603 (native-inputs
604 `(("python-pbr" ,python-pbr)))
605 (home-page "https://launchpad.net/pylockfile")
606 (synopsis "Platform-independent file locking module")
607 (description
608 "The lockfile package exports a LockFile class which provides a simple
609API for locking files.")
610 (license license:expat)))
611
612(define-public python2-lockfile
613 (package-with-python2 python-lockfile))
614
615(define-public python-semantic-version
616 (package
617 (name "python-semantic-version")
618 (version "2.6.0")
619 (source
620 (origin
621 (method url-fetch)
622 (uri (pypi-uri "semantic_version" version))
623 (sha256
624 (base32
625 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
626 (build-system python-build-system)
627 (arguments
628 `(#:tests? #f)) ; PyPI tarball lacks tests
629 (home-page "https://github.com/rbarrois/python-semanticversion")
630 (synopsis "Semantic versioning module for Python")
631 (description
632 "The @code{semantic_version} class is a small library for handling
633@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
634
635It can compare versions, generate a new version that represents a bump in one of
636the version levels, and check whether any given string is a proper semantic
637version identifier.")
638 (license license:bsd-3)))
639
640(define-public python2-semantic-version
641 (package-with-python2 python-semantic-version))
642
643(define-public python-serpent
644 (package
645 (name "python-serpent")
fa9d14ac 646 (version "1.28")
44d10b1f
RW
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "serpent" version))
651 (sha256
fa9d14ac 652 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 653 (build-system python-build-system)
fa9d14ac
TGR
654 (native-inputs
655 `(("python-attrs" ,python-attrs)
656 ("python-pytz" ,python-pytz)))
44d10b1f
RW
657 (home-page "https://github.com/irmen/Serpent")
658 (synopsis "Serializer for literal Python expressions")
659 (description
1d3c7803
TGR
660 "Serpent provides @code{ast.literal_eval()}-compatible object tree
661serialization. It serializes an object tree into bytes (an utf-8 encoded
662string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
663to rebuild the original object tree.
664
665Because only safe literals are encoded, it is safe to send serpent data to
666other machines, such as over the network.")
44d10b1f
RW
667 (license license:expat)))
668
669(define-public python-setuptools
670 (package
671 (name "python-setuptools")
e39d4933 672 (version "41.0.1")
44d10b1f
RW
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "setuptools" version ".zip"))
677 (sha256
678 (base32
e39d4933 679 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
680 (modules '((guix build utils)))
681 (snippet
682 '(begin
683 ;; Remove included binaries which are used to build self-extracting
684 ;; installers for Windows.
685 ;; TODO: Find some way to build them ourself so we can include them.
686 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
687 #t))))
688 (build-system python-build-system)
689 ;; FIXME: Tests require pytest, which itself relies on setuptools.
690 ;; One could bootstrap with an internal untested setuptools.
691 (arguments
692 `(#:tests? #f))
693 (home-page "https://pypi.python.org/pypi/setuptools")
694 (synopsis
695 "Library designed to facilitate packaging Python projects")
696 (description
697 "Setuptools is a fully-featured, stable library designed to facilitate
698packaging Python projects, where packaging includes:
699Python package and module definitions,
700distribution package metadata,
701test hooks,
702project installation,
703platform-specific details,
704Python 3 support.")
705 ;; TODO: setuptools now bundles the following libraries:
706 ;; packaging, pyparsing, six and appdirs. How to unbundle?
707 (license (list license:psfl ; setuptools itself
708 license:expat ; six, appdirs, pyparsing
709 license:asl2.0 ; packaging is dual ASL2/BSD-2
710 license:bsd-2))))
711
712(define-public python2-setuptools
713 (package-with-python2 python-setuptools))
714
715(define-public python-uniseg
716 (package
717 (name "python-uniseg")
718 (version "0.7.1")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (pypi-uri "uniseg" version ".zip"))
723 (sha256
724 (base32
725 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
726 (build-system python-build-system)
727 (arguments
728 '(#:tests? #f)) ; The test suite requires network access.
729 (native-inputs
730 `(("unzip" ,unzip)))
731 (home-page
732 "https://bitbucket.org/emptypage/uniseg-python")
733 (synopsis
734 "Python library to determine Unicode text segmentations")
735 (description
736 "Uniseg is a Python package used to determine Unicode text segmentations.
737Supported segmentations include:
738@enumerate
739@item @dfn{Code point} (any value in the Unicode codespace)
740@item @dfn{Grapheme cluster} (user-perceived character made of a single or
741multiple Unicode code points, e.g. \"G\" + acute-accent)
742@item Word break
743@item Sentence break
744@item Line break
745@end enumerate")
746 (license license:expat)))
747
748(define-public python2-uniseg
749 (package-with-python2 python-uniseg))
750
751(define-public python-humanfriendly
752 (package
753 (name "python-humanfriendly")
754 (version "4.4.1")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (pypi-uri "humanfriendly" version))
759 (sha256
760 (base32
761 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
762 (build-system python-build-system)
763 (arguments
764 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
765 #:tests? #f))
766 (propagated-inputs
767 `(("python-monotonic" ,python-monotonic)))
768 (home-page "https://humanfriendly.readthedocs.io")
769 (synopsis "Human-friendly input and output in Python")
770 (description
771 "The functions and classes in @code{humanfriendly} can be used to make
772text interfaces more user-friendly. It includes tools to parse and format
773numbers, file sizes, and timespans, timers for long-running operations, menus
774to allow the user to choose from a list of options, and terminal interaction
775helpers.")
776 (license license:expat)))
777
778(define-public python2-humanfriendly
779 (package-with-python2 python-humanfriendly))
780
781(define-public python-capturer
782 (package
783 (name "python-capturer")
784 (version "2.4")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "capturer" version))
789 (sha256
790 (base32
791 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
792 (build-system python-build-system)
793 (arguments
794 `(#:tests? #f))
795 (propagated-inputs
796 `(("python-humanfriendly" ,python-humanfriendly)))
797 (home-page "https://capturer.readthedocs.io")
798 (synopsis "Capture stdout and stderr streams of the current process")
799 (description
800 "The capturer package makes it easy to capture the stdout and stderr
801streams of the current process and subprocesses. Output can be relayed
802to the terminal in real time but is also available to the Python program
803for additional processing.")
804 (license license:expat)))
805
806(define-public python2-capturer
807 (package-with-python2 python-capturer))
808
809(define-public python-case
810 (package
811 (name "python-case")
812 (version "1.5.3")
813 (source
814 (origin
815 (method url-fetch)
816 (uri (pypi-uri "case" version))
817 (sha256
818 (base32
819 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
820 (build-system python-build-system)
821 (propagated-inputs
822 `(("python-mock" ,python-mock)
823 ("python-nose" ,python-nose)
824 ("python-six" ,python-six)
825 ("python-unittest2" ,python-unittest2)))
826 (native-inputs
827 `(("python-coverage" ,python-coverage)))
828 (home-page "https://github.com/celery/case")
829 (synopsis "Unittest utilities and convenience methods")
830 (description
831 "The @code{case} package provides utilities on top of unittest, including
832some helpful Python 2 compatibility convenience methods.")
833 (license license:bsd-3)))
834
835(define-public python-verboselogs
836 (package
837 (name "python-verboselogs")
838 (version "1.7")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "verboselogs" version))
843 (sha256
844 (base32
845 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
846 (build-system python-build-system)
847 (native-inputs
848 `(("python-mock" ,python-mock)
849 ("python-astroid" ,python-astroid)
850 ("python-pylint" ,python-pylint)))
851 (home-page "https://verboselogs.readthedocs.io")
852 (synopsis "Verbose logging level for Python's logging module")
853 (description
854 "The @code{verboselogs} package extends Python's @code{logging} module to
855add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
856 (license license:expat)))
857
858(define-public python2-verboselogs
859 (package-with-python2 python-verboselogs))
860
861(define-public python-coloredlogs
862 (package
863 (name "python-coloredlogs")
864 (version "7.3")
865 (source
866 (origin
867 (method url-fetch)
868 (uri (pypi-uri "coloredlogs" version))
869 (sha256
870 (base32
871 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
872 (build-system python-build-system)
873 (arguments
874 `(;Tests require some updated modules
875 #:tests? #f))
876 (propagated-inputs
877 `(("python-capturer" ,python-capturer)))
878 (home-page "https://coloredlogs.readthedocs.io")
879 (synopsis "Colored stream handler for Python's logging module")
880 (description
881 "The @code{coloredlogs} package enables colored terminal output for
882Python's logging module. The @code{ColoredFormatter} class inherits from
883@code{logging.Formatter} and uses ANSI escape sequences to render your logging
884messages in color.")
885 (license license:expat)))
886
887(define-public python2-coloredlogs
888 (package-with-python2 python-coloredlogs))
889
4caf37b0
MC
890(define-public python-et-xmlfile
891 (package
892 (name "python-et-xmlfile")
893 (version "1.0.1")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (pypi-uri "et_xmlfile" version))
898 (sha256
899 (base32
900 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
901 (build-system python-build-system)
902 (arguments
903 `(#:phases (modify-phases %standard-phases
904 (replace 'check
905 (lambda _
906 (invoke "pytest"))))))
907 (native-inputs
908 `(("python-pytest" ,python-pytest)
909 ("python-lxml" ,python-lxml))) ;used for the tests
910 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
911 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
912 (description "This Python library is based upon the @code{xmlfile} module
913from @code{lxml}. It aims to provide a low memory, compatible implementation
914of @code{xmlfile}.")
915 (license license:expat)))
916
917(define-public python2-et-xmlfile
918 (package-with-python2 python-et-xmlfile))
919
a042d348
MC
920(define-public python-openpyxl
921 (package
922 (name "python-openpyxl")
441e6d93 923 (version "2.6.2")
a042d348
MC
924 (source
925 (origin
926 ;; We use the upstream repository, as the tests are not included in the
927 ;; PyPI releases.
928 (method hg-fetch)
929 (uri (hg-reference
930 (url "https://bitbucket.org/openpyxl/openpyxl")
931 (changeset version)))
932 (file-name (string-append name "-" version "-checkout"))
933 (sha256
441e6d93 934 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
935 (build-system python-build-system)
936 (arguments
937 `(#:phases (modify-phases %standard-phases
938 (replace 'check
939 (lambda _
940 (invoke "pytest"))))))
941 (native-inputs
942 ;; For the test suite.
943 `(("python-lxml" ,python-lxml)
944 ("python-pillow" ,python-pillow)
945 ("python-pytest" ,python-pytest)))
946 (propagated-inputs
947 `(("python-et-xmlfile" ,python-et-xmlfile)
948 ("python-jdcal" ,python-jdcal)))
949 (home-page "https://openpyxl.readthedocs.io")
950 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
951 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
952XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
953standard.")
954 (license license:expat)))
955
44d10b1f
RW
956(define-public python-eventlet
957 (package
958 (name "python-eventlet")
959 (version "0.20.1")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "eventlet" version))
964 (sha256
965 (base32
966 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
967 (build-system python-build-system)
968 (propagated-inputs
969 `(("python-greenlet" ,python-greenlet)))
970 (arguments
971 ;; TODO: Requires unpackaged 'enum-compat'.
972 '(#:tests? #f))
973 (home-page "http://eventlet.net")
974 (synopsis "Concurrent networking library for Python")
975 (description
976 "Eventlet is a concurrent networking library for Python that
977allows you to change how you run your code, not how you write it.
978It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
979Coroutines ensure that the developer uses a blocking style of programming
980that is similar to threading, but provide the benefits of non-blocking I/O.
981The event dispatch is implicit, which means you can easily use @code{Eventlet}
982from the Python interpreter, or as a small part of a larger application.")
983 (license license:expat)))
984
985(define-public python2-eventlet
986 (let ((base (package-with-python2
987 (strip-python2-variant python-eventlet))))
988 (package (inherit base)
989 (propagated-inputs
990 `(("python2-enum34" ,python2-enum34)
991 ,@(package-propagated-inputs base))))))
992
993(define-public python-six
994 (package
995 (name "python-six")
6c58a06e 996 (version "1.12.0")
44d10b1f
RW
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "six" version))
1001 (sha256
1002 (base32
6c58a06e 1003 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1004 (build-system python-build-system)
1005 (arguments
1006 `(#:phases
1007 (modify-phases %standard-phases
1008 (replace 'check
1009 (lambda _
1010 (invoke "py.test" "-v"))))))
1011 (native-inputs
1012 `(("python-py" ,python-py)
1013 ("python-pytest" ,python-pytest-bootstrap)))
1014 (home-page "https://pypi.python.org/pypi/six/")
1015 (synopsis "Python 2 and 3 compatibility utilities")
1016 (description
1017 "Six is a Python 2 and 3 compatibility library. It provides utility
1018functions for smoothing over the differences between the Python versions with
1019the goal of writing Python code that is compatible on both Python versions.
1020Six supports every Python version since 2.5. It is contained in only one
1021Python file, so it can be easily copied into your project.")
1022 (license license:x11)))
1023
1024(define-public python2-six
1025 (package-with-python2 python-six))
1026
1027(define-public python-six-bootstrap
1028 (package
1029 (inherit python-six)
1030 (name "python-six-bootstrap")
1031 (native-inputs `())
1032 (arguments `(#:tests? #f))))
1033
1034(define-public python2-six-bootstrap
1035 (package-with-python2 python-six-bootstrap))
1036
1037(define-public python-schedule
1038 (package
1039 (name "python-schedule")
1040 (version "0.4.3")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "schedule" version))
1045 (sha256
1046 (base32
1047 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1048 (build-system python-build-system)
1049 (native-inputs
1050 `(("python-pytest" ,python-pytest)
1051 ("python-mock" ,python-mock)))
1052 (home-page "https://github.com/dbader/schedule")
1053 (synopsis "Schedule periodic function calls in Python")
1054 (description
1055 "Schedule is an in-process scheduler for periodic jobs that uses the
1056builder pattern for configuration. Schedule lets you run Python functions (or
1057any other callable) periodically at pre-determined intervals using a simple,
1058human-friendly syntax.")
1059 (license license:expat)))
1060
1061(define-public python2-schedule
1062 (package-with-python2 python-schedule))
1063
1064(define-public python-pandas
1065 (package
1066 (name "python-pandas")
c0d43f62 1067 (version "0.24.2")
44d10b1f
RW
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "pandas" version))
1072 (sha256
c0d43f62 1073 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1074 (build-system python-build-system)
1075 (arguments
1076 `(#:modules ((guix build utils)
1077 (guix build python-build-system)
1078 (ice-9 ftw)
1079 (srfi srfi-26))
1080 #:phases (modify-phases %standard-phases
c0d43f62
MC
1081 (add-after 'unpack 'patch-which
1082 (lambda* (#:key inputs #:allow-other-keys)
1083 (let ((which (assoc-ref inputs "which")))
1084 (substitute* "pandas/io/clipboard/__init__.py"
1085 (("^CHECK_CMD = .*")
1086 (string-append "CHECK_CMD = \"" which "\"\n"))))
1087 #t))
44d10b1f
RW
1088 (replace 'check
1089 (lambda _
1090 (let ((build-directory
1091 (string-append
1092 (getcwd) "/build/"
1093 (car (scandir "build"
1094 (cut string-prefix? "lib." <>))))))
1095 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1096 ;; the build to error out if required data files are
1097 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1098 (substitute* "setup.cfg"
1099 (("addopts = --strict-data-files") "addopts = "))
1100 (with-directory-excursion build-directory
c0d43f62
MC
1101 ;; Delete tests that require "moto" which is not yet
1102 ;; in Guix.
44d10b1f
RW
1103 (for-each delete-file
1104 '("pandas/tests/io/conftest.py"
1105 "pandas/tests/io/json/test_compression.py"
1106 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1107 "pandas/tests/io/test_parquet.py"))
1108 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1109 "--skip-network" "-k"
1110 ;; XXX: Due to the deleted tests above.
1111 "not test_read_s3_jsonl"))))))))
1112 (propagated-inputs
1113 `(("python-numpy" ,python-numpy)
667c6ef5 1114 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1115 ("python-pytz" ,python-pytz)
667c6ef5
MC
1116 ("python-dateutil" ,python-dateutil)
1117 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1118 (inputs
1119 `(("which" ,which)))
44d10b1f
RW
1120 (native-inputs
1121 `(("python-cython" ,python-cython)
1122 ("python-beautifulsoup4" ,python-beautifulsoup4)
1123 ("python-lxml" ,python-lxml)
1124 ("python-html5lib" ,python-html5lib)
1125 ("python-nose" ,python-nose)
c0d43f62
MC
1126 ("python-pytest" ,python-pytest)
1127 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1128 (home-page "https://pandas.pydata.org")
1129 (synopsis "Data structures for data analysis, time series, and statistics")
1130 (description
1131 "Pandas is a Python package providing fast, flexible, and expressive data
1132structures designed to make working with structured (tabular,
1133multidimensional, potentially heterogeneous) and time series data both easy
1134and intuitive. It aims to be the fundamental high-level building block for
1135doing practical, real world data analysis in Python.")
1136 (license license:bsd-3)))
1137
1138(define-public python2-pandas
1139 (package-with-python2 python-pandas))
1140
1141(define-public python2-mechanize
1142 (package
1143 (name "python2-mechanize")
1144 (version "0.2.5")
1145 (source
1146 (origin
1147 (method url-fetch)
1cc184e6 1148 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1149 (sha256
1150 (base32
1151 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1152 (build-system python-build-system)
1153 (arguments
1154 `(#:python ,python-2 ; apparently incompatible with Python 3
1155 #:tests? #f))
1156 ;; test fails with message
1157 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1158 ;; (python-3.3.2) or
1159 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1160 ;; (python-2.7.5).
1161 ;; The source code is from March 2011 and probably not up-to-date
1162 ;; with respect to python unit tests.
1163 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1164 (synopsis
1165 "Stateful programmatic web browsing in Python")
1166 (description
1167 "Mechanize implements stateful programmatic web browsing in Python,
1168after Andy Lester’s Perl module WWW::Mechanize.")
1169 (license (license:non-copyleft
1170 "file://COPYING"
1171 "See COPYING in the distribution."))))
1172
1173
1174(define-public python-simplejson
1175 (package
1176 (name "python-simplejson")
1177 (version "3.14.0")
1178 (source
1179 (origin
1180 (method url-fetch)
1181 (uri (pypi-uri "simplejson" version))
1182 (sha256
1183 (base32
1184 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1185 (build-system python-build-system)
1186 (home-page "http://simplejson.readthedocs.org/en/latest/")
1187 (synopsis
1188 "Json library for Python")
1189 (description
1190 "JSON (JavaScript Object Notation) is a subset of JavaScript
1191syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1192format.
1193
1194Simplejson exposes an API familiar to users of the standard library marshal
1195and pickle modules. It is the externally maintained version of the json
1196library contained in Python 2.6, but maintains compatibility with Python 2.5
1197and (currently) has significant performance advantages, even without using
1198the optional C extension for speedups. Simplejson is also supported on
1199Python 3.3+.")
1200 (license license:x11)))
1201
1202(define-public python2-simplejson
1203 (package-with-python2 python-simplejson))
1204
1205
1206(define-public python-pyicu
1207 (package
1208 (name "python-pyicu")
dc23bb45 1209 (version "2.3.1")
44d10b1f
RW
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri (pypi-uri "PyICU" version))
1214 (sha256
1215 (base32
dc23bb45 1216 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1217 (build-system python-build-system)
1218 (inputs
1219 `(("icu4c" ,icu4c)))
1220 (native-inputs
1221 `(("python-pytest" ,python-pytest)
1222 ("python-six" ,python-six)))
1223 (home-page "https://github.com/ovalhub/pyicu")
1224 (synopsis "Python extension wrapping the ICU C++ API")
1225 (description
1226 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (properties `((python2-variant . ,(delay python2-pyicu))))
1228 (license license:x11)))
1229
1230(define-public python2-pyicu
1231 (let ((base (package-with-python2
1232 (strip-python2-variant python-pyicu))))
1233 (package
1234 (inherit base)
1235 (arguments
1236 `(,@(package-arguments base)
1237 #:phases
1238 (modify-phases %standard-phases
1239 (add-before 'check 'delete-failing-test
1240 (λ _
1241 ;; XXX: This fails due to Unicode issues unique to Python 2,
1242 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1243 (delete-file "test/test_Script.py")
1244 #t))))))))
1245
1246(define-public python2-dogtail
1247 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1248 ;; spaces in indentation" with Python 3.
1249 (package
1250 (name "python2-dogtail")
1251 (version "0.9.9")
1252 (source (origin
1253 (method url-fetch)
1254 (uri (pypi-uri "dogtail" version))
1255 (sha256
1256 (base32
1257 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1258 (build-system python-build-system)
1259 (arguments `(#:python ,python-2
1260 #:tests? #f)) ; invalid command "test"
1261 ;; Currently no offical homepage.
1262 (home-page "https://pypi.python.org/pypi/dogtail/")
1263 (synopsis "GUI test tool and automation framework written in Python")
1264 (description
1265 "Dogtail is a GUI test tool and automation framework written in Python.
1266It uses Accessibility (a11y) technologies to communicate with desktop
1267applications. dogtail scripts are written in Python and executed like any
1268other Python program.")
1269 (license license:gpl2+)))
1270
1271(define-public python-empy
1272 (package
1273 (name "python-empy")
0f6d5115 1274 (version "3.3.3")
44d10b1f
RW
1275 (source (origin
1276 (method url-fetch)
1277 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1278 version ".tar.gz"))
1279 (sha256
1280 (base32
0f6d5115 1281 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1282 (build-system python-build-system)
1283 (arguments
0f6d5115 1284 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1285 (home-page "http://www.alcyone.com/software/empy/")
1286 (synopsis "Templating system for Python")
1287 (description
1288 "EmPy is a system for embedding Python expressions and statements in
1289template text; it takes an EmPy source file, processes it, and produces
1290output. This is accomplished via expansions, which are special signals to the
1291EmPy system and are set off by a special prefix (by default the at sign, @@).
1292EmPy can expand arbitrary Python expressions and statements in this way, as
1293well as a variety of special forms. Textual data not explicitly delimited in
1294this way is sent unaffected to the output, allowing Python to be used in
1295effect as a markup language. Also supported are callbacks via hooks,
1296recording and playback via diversions, and dynamic, chainable filters. The
1297system is highly configurable via command line options and embedded
1298commands.")
1299 (license license:lgpl2.1+)))
1300
1301(define-public python2-empy
0f064242
TGR
1302 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1303 (package
1304 (inherit base)
1305 (arguments `(,@(package-arguments base)
1306 #:tests? #t)))))
44d10b1f
RW
1307
1308(define-public python2-element-tree
1309 (package
1310 (name "python2-element-tree")
1311 (version "1.2.6")
1312 (source (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "http://effbot.org/media/downloads/elementtree-"
1316 version "-20050316.tar.gz"))
1317 (sha256
1318 (base32
1319 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1320 (build-system python-build-system)
1321 (arguments
1322 `(#:python ,python-2 ; seems to be part of Python 3
1323 #:tests? #f)) ; no 'test' sub-command
1324 (synopsis "Toolkit for XML processing in Python")
1325 (description
1326 "ElementTree is a Python library supporting lightweight XML processing.")
1327 (home-page "http://effbot.org/zone/element-index.htm")
1328 (license (license:x11-style
1329 "http://docs.python.org/2/license.html"
1330 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1331
1332(define-public python2-pybugz
1333 (package
1334 (name "python2-pybugz")
1335 (version "0.6.11")
1336 (source (origin
1337 (method url-fetch)
1338 (uri (string-append
1339 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1340 version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1344 (patches (search-patches "pybugz-stty.patch"
1345 "pybugz-encode-error.patch"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2 ; SyntaxError with Python 3
1349 #:tests? #f)) ; no 'test' sub-command
1350 (propagated-inputs
1351 `(("element-tree" ,python2-element-tree)))
1352 (synopsis "Python and command-line interface to Bugzilla")
1353 (description
1354 "PyBugz is a Python library and command-line tool to query the Bugzilla
1355bug tracking system. It is meant as an aid to speed up interaction with the
1356bug tracker.")
1357 (home-page "http://www.liquidx.net/pybugz/")
1358 (license license:gpl2)))
1359
1360(define-public python2-enum
1361 (package
1362 (name "python2-enum")
1363 (version "0.4.6")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (pypi-uri "enum" version))
1367 (sha256
1368 (base32
1369 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1370 (build-system python-build-system)
1371 (arguments
1372 `(#:python ,python-2))
1373 (home-page "http://pypi.python.org/pypi/enum/")
1374 (synopsis "Robust enumerated type support in Python")
1375 (description
1376 "This provides a module for robust enumerations in Python. It has
1377been superseded by the Python standard library and is provided only for
1378compatibility.")
1379 ;; Choice of either license.
1380 (license (list license:gpl3+ license:psfl))))
1381
1382(define-public python-enum34
1383 (package
1384 (name "python-enum34")
1385 (version "1.1.6")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (pypi-uri "enum34" version))
1390 (sha256
1391 (base32
1392 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1393 (build-system python-build-system)
1394 (home-page "https://pypi.python.org/pypi/enum34")
1395 (synopsis "Backported Python 3.4 Enum")
1396 (description
1397 "Enum34 is the new Python stdlib enum module available in Python 3.4
1398backported for previous versions of Python from 2.4 to 3.3.")
1399 (license license:bsd-3)))
1400
1401(define-public python2-enum34
1402 (package-with-python2 python-enum34))
1403
1404(define-public python-parse-type
1405 (package
1406 (name "python-parse-type")
1407 (version "0.4.2")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "parse_type" version))
1412 (sha256
1413 (base32
1414 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1415 (build-system python-build-system)
1416 (propagated-inputs
1417 `(("python-six" ,python-six)
1418 ("python-parse" ,python-parse)))
1419 (native-inputs
1420 `(("python-pytest" ,python-pytest)
1421 ("python-pytest-runner" ,python-pytest-runner)))
1422 (home-page "https://github.com/jenisys/parse_type")
1423 (synopsis "Extended parse module")
1424 (description
1425 "Parse_type extends the python parse module.")
1426 (properties
1427 `((python2-variant . ,(delay python2-parse-type))))
1428 (license license:bsd-3)))
1429
1430(define-public python2-parse-type
1431 (let ((base (package-with-python2
1432 (strip-python2-variant python-parse-type))))
1433 (package (inherit base)
1434 (propagated-inputs
1435 `(("python2-enum34" ,python2-enum34)
1436 ,@(package-propagated-inputs base))))))
1437
1438(define-public python-parse
1439 (package
1440 (name "python-parse")
1441 (version "1.8.4")
1442 (source
1443 (origin
1444 (method url-fetch)
1445 (uri (pypi-uri "parse" version))
1446 (sha256
1447 (base32
1448 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1449 (build-system python-build-system)
1450 (arguments
1451 `(#:phases
1452 (modify-phases %standard-phases
1453 (replace 'check
1454 (lambda _ (invoke "python" "test_parse.py"))))))
1455 (home-page "https://github.com/r1chardj0n3s/parse")
1456 (synopsis "Parse strings")
1457 (description
1458 "Parse strings using a specification based on the Python @code{format()}
1459syntax.")
1460 (license license:x11)))
1461
1462(define-public python-polib
1463 (package
1464 (name "python-polib")
1465 (version "1.0.8")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (pypi-uri "polib" version))
1469 (sha256
1470 (base32
1471 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1472 (build-system python-build-system)
1473 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1474 (synopsis "Manipulate, create and modify gettext files")
1475 (description "Polib can manipulate any gettext format (po, pot and mo)
1476files. It can be used to create po files from scratch or to modify
1477existing ones.")
1478 (license license:expat)))
1479
1480(define-public python2-polib
1481 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1482 (package
1483 (inherit base)
1484 (arguments `(,@(package-arguments base)
1485 ;; Tests don't work with python2.
1486 #:tests? #f)))))
1487
1488(define-public scons
1489 (package
1490 (name "scons")
05487ed8 1491 (version "3.0.4")
44d10b1f 1492 (source (origin
ad34338d
RW
1493 (method git-fetch)
1494 (uri (git-reference
1495 (url "https://github.com/SCons/scons.git")
1496 (commit version)))
1497 (file-name (git-file-name name version))
44d10b1f
RW
1498 (sha256
1499 (base32
05487ed8 1500 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1501 (build-system python-build-system)
1502 (arguments
1503 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1504 #:tests? #f ; no 'python setup.py test' command
1505 #:phases
1506 (modify-phases %standard-phases
1507 (add-before 'build 'bootstrap
1508 (lambda _
1509 (substitute* "src/engine/SCons/compat/__init__.py"
1510 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1511 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1512 (substitute* "src/engine/SCons/Platform/__init__.py"
1513 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1514 "mod = __import__(full_name)"))
ad34338d
RW
1515 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1516 (chdir "build/scons")
1517 #t)))))
44d10b1f
RW
1518 (home-page "http://scons.org/")
1519 (synopsis "Software construction tool written in Python")
1520 (description
1521 "SCons is a software construction tool. Think of SCons as an improved,
1522cross-platform substitute for the classic Make utility with integrated
1523functionality similar to autoconf/automake and compiler caches such as ccache.
1524In short, SCons is an easier, more reliable and faster way to build
1525software.")
1526 (license license:x11)))
1527
1528(define-public scons-python2
1529 (package
1530 (inherit (package-with-python2 scons))
1531 (name "scons-python2")))
1532
1533(define-public python-extras
1534 (package
1535 (name "python-extras")
1536 (version "1.0.0")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "extras" version))
1541 (sha256
1542 (base32
1543 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1544 (build-system python-build-system)
1545 (arguments
1546 ;; FIXME: Circular dependency on testtools.
1547 '(#:tests? #f))
1548 (home-page "https://github.com/testing-cabal/extras")
1549 (synopsis "Useful extensions to the Python standard library")
1550 (description
1551 "Extras is a set of extensions to the Python standard library.")
1552 (license license:expat)))
1553
1554(define-public python2-extras
1555 (package-with-python2 python-extras))
1556
1557(define-public python-mimeparse
1558 (package
1559 (name "python-mimeparse")
1560 (version "1.6.0")
1561 (source
1562 (origin
1563 (method url-fetch)
89bf667c 1564 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1565 (sha256
1566 (base32
1567 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1568 (build-system python-build-system)
1569 (arguments
1570 '(#:phases
1571 (modify-phases %standard-phases
1572 (replace 'check
1573 (lambda _
1574 (invoke "./mimeparse_test.py"))))))
1575 (home-page
1576 "https://github.com/dbtsai/python-mimeparse")
1577 (synopsis "Python library for parsing MIME types")
1578 (description
1579 "Mimeparse provides basic functions for parsing MIME type names and
1580matching them against a list of media-ranges.")
1581 (license license:expat)))
1582
1583(define-public python2-mimeparse
1584 (package-with-python2 python-mimeparse))
1585
1586(define-public python-miniboa
1587 (package
1588 (name "python-miniboa")
1589 (version "1.0.7")
1590 (source
1591 (origin
1592 (method url-fetch)
1593 (uri (pypi-uri "miniboa" version))
1594 (sha256
1595 (base32
1596 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1597 (build-system python-build-system)
1598 (home-page "https://github.com/shmup/miniboa")
1599 (synopsis "Simple, single-threaded Telnet server")
1600 (description
1601 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1602server.")
1603 (license license:asl2.0)))
1604
1605(define-public python2-miniboa
1606 (package-with-python2 python-miniboa))
1607
1608(define-public python-pafy
1609 (package
1610 (name "python-pafy")
1611 (version "0.5.3.1")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "pafy" version))
1616 (sha256
1617 (base32
1618 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1619 (build-system python-build-system)
1620 (arguments
1621 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1622 (propagated-inputs
1623 ;; Youtube-dl is a python package which is imported in the file
1624 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1625 `(("youtube-dl" ,youtube-dl)))
1626 (home-page "https://np1.github.io/pafy/")
1627 (synopsis "Retrieve YouTube content and metadata")
1628 (description
1629 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1630 (license license:lgpl3+)))
1631
1632(define-public python2-funcsigs
1633 (package
1634 (name "python2-funcsigs")
1635 (version "1.0.2")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "funcsigs" version))
1639 (sha256
1640 (base32
1641 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1642 (build-system python-build-system)
1643 (arguments
1644 `(#:python ,python-2))
1645 (native-inputs
1646 `(("python2-unittest2" ,python2-unittest2)))
1647 (home-page "http://funcsigs.readthedocs.org")
1648 (synopsis "Python function signatures from PEP362")
1649 (description
1650 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1651 (license license:asl2.0)))
1652
1653(define-public python2-funcsigs-bootstrap
1654 (package
1655 (inherit python2-funcsigs)
1656 (name "python2-funcsigs-bootstrap")
1657 (native-inputs `())
1658 (arguments
1659 `(#:tests? #f
1660 ,@(package-arguments python2-funcsigs)))))
1661
1662(define-public python-py
1663 (package
1664 (name "python-py")
08eba545 1665 (version "1.8.0")
44d10b1f
RW
1666 (source
1667 (origin
1668 (method url-fetch)
1669 (uri (pypi-uri "py" version))
1670 (sha256
1671 (base32
08eba545 1672 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1673 (build-system python-build-system)
1674 (arguments
1675 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1676 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1677 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1678 ;; Is this module globally installed?"
1679 '(#:tests? #f))
1680 (native-inputs
1681 `(("python-setuptools-scm" ,python-setuptools-scm)))
1682 (home-page "https://github.com/pytest-dev/py")
1683 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1684 (description
1685 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1686code introspection, and logging.")
1687 (license license:expat)))
1688
1689(define-public python2-py
1690 (package-with-python2 python-py))
1691
1692;; Recent versions of python-fixtures and python-testrepository need
1693;; python-pbr for packaging, which itself needs these two packages for
1694;; testing.
1695;; To fix this circular dependency, we use a build of python-pbr, based on the
1696;; same source, just without any test dependencies and with tests disabled.
1697;; python-pbr-minmal is then used to package python-fixtures and
1698;; python-testrepository.
1699;; Strictly speaking we currently could remove the test-requirements from the
1700;; normal python-pbr package (and save this package) since test are disabled
1701;; there anyway. But this may change in future.
1702(define-public python-pbr-minimal
1703 (package
1704 (name "python-pbr-minimal")
1705 (version "3.0.1")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "pbr" version))
1710 (sha256
1711 (base32
1712 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1713 (build-system python-build-system)
1714 (arguments
1715 `(#:tests? #f))
1716 (home-page "http://docs.openstack.org/developer/pbr/")
1717 (synopsis "Minimal build of python-pbr used for bootstrapping")
1718 (description
1719 "Used only for bootstrapping python2-pbr, you should not need this.")
1720 (license license:asl2.0)))
1721
1722(define-public python2-pbr-minimal
1723 (package-with-python2 python-pbr-minimal))
1724
1725(define-public python-pbr
1726 (package
1727 (inherit python-pbr-minimal)
1728 (name "python-pbr")
1729 (arguments
1730 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1731 (propagated-inputs
1732 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1733 (native-inputs
1734 `(("python-fixtures" ,python-fixtures-bootstrap)
1735 ;; discover, coverage, hacking, subunit
1736 ("python-mock" ,python-mock)
1737 ("python-six" ,python-six)
1738 ("python-sphinx" ,python-sphinx)
1739 ("python-testrepository" ,python-testrepository-bootstrap)
1740 ("python-testresources" ,python-testresources-bootstrap)
1741 ("python-testscenarios" ,python-testscenarios-bootstrap)
1742 ("python-testtools" ,python-testtools-bootstrap)
1743 ("python-virtualenv" ,python-virtualenv)))
1744 (synopsis "Enhance the default behavior of Python’s setuptools")
1745 (description
1746 "Python Build Reasonableness (PBR) is a library that injects some useful
1747and sensible default behaviors into your setuptools run. It will set
1748versions, process requirements files and generate AUTHORS and ChangeLog file
1749from git information.
1750")))
1751
1752(define-public python2-pbr
1753 (package-with-python2 python-pbr))
1754
ea43f0d5
MB
1755(define-public python-pyrsistent
1756 (package
1757 (name "python-pyrsistent")
1758 (version "0.14.11")
1759 (home-page "https://github.com/tobgu/pyrsistent")
1760 (source (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "pyrsistent" version))
1763 (sha256
1764 (base32
1765 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1766 (build-system python-build-system)
1767 (native-inputs
1768 `(("python-hypothesis" ,python-hypothesis)
1769 ("python-pytest" ,python-pytest)
1770 ("python-pytest-runner" ,python-pytest-runner)))
1771 (propagated-inputs
1772 `(("python-six" ,python-six)))
1773 (synopsis "Persistent data structures for Python")
1774 (description
1775 "Pyrsistent is a number of persistent collections (by some referred to as
1776functional data structures). Persistent in the sense that they are immutable.
1777
1778All methods on a data structure that would normally mutate it instead return a
1779new copy of the structure containing the requested updates. The original
1780structure is left untouched.")
1781 (license license:expat)))
1782
1783(define-public python2-pyrsistent
1784 (package-with-python2 python-pyrsistent))
1785
44d10b1f
RW
1786(define-public python-exif-read
1787 (package
1788 (name "python-exif-read")
1789 (version "2.1.2")
1790 (source (origin
1791 (method url-fetch)
1792 (uri (pypi-uri "ExifRead" version))
1793 (sha256
1794 (base32
1795 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1796 (build-system python-build-system)
1797 (arguments `(#:tests? #f)) ; no tests
1798 (home-page "https://github.com/ianare/exif-py")
1799 (synopsis "Python library to extract EXIF data from image files")
1800 (description
1801 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1802files.")
1803 (license license:bsd-3)))
1804
1805(define-public python2-exif-read
1806 (package-with-python2 python-exif-read))
1807
1808(define-public python-pyld
1809 (package
1810 (name "python-pyld")
1811 (version "1.0.3")
1812 (source (origin
1813 (method url-fetch)
1814 (uri (pypi-uri "PyLD" version))
1815 (sha256
1816 (base32
1817 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1818 (build-system python-build-system)
1819 (home-page "https://github.com/digitalbazaar/pyld")
1820 (synopsis "Python implementation of the JSON-LD specification")
1821 (description
1822 "PyLD is an implementation of the JSON-LD specification.")
1823 (license license:bsd-3)))
1824
1825(define-public python2-pyld
1826 (package-with-python2 python-pyld))
1827
1828(define-public python-click
1829 (package
1830 (name "python-click")
61984855 1831 (version "7.0")
44d10b1f
RW
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "click" version))
1836 (sha256
1837 (base32
61984855 1838 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1839 (build-system python-build-system)
1840 (arguments
8d7e7ca6 1841 `(#:phases
44d10b1f
RW
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'fix-paths
1844 (lambda* (#:key inputs #:allow-other-keys)
1845 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1846 "cross-libc" "libc"))))
1847 (substitute* "click/_unicodefun.py"
1848 (("'locale'")
1849 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1850 #t))
1851 (replace 'check
1852 (lambda _
1853 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1854 (native-inputs
1855 `(("python-pytest" ,python-pytest)))
61984855 1856 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1857 (synopsis "Command line library for Python")
1858 (description
1859 "Click is a Python package for creating command line interfaces in a
1860composable way with as little code as necessary. Its name stands for
1861\"Command Line Interface Creation Kit\". It's highly configurable but comes
1862with sensible defaults out of the box.")
1863 (license license:bsd-3)))
1864
1865(define-public python2-click
1866 (package-with-python2 python-click))
1867
1868(define-public python-wheel
1869 (package
1870 (name "python-wheel")
746c074b 1871 (version "0.32.3")
44d10b1f
RW
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "wheel" version))
1876 (sha256
1877 (base32
746c074b 1878 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1879 (build-system python-build-system)
1880 (native-inputs
1881 `(("python-jsonschema" ,python-jsonschema)
1882 ("python-pytest-cov" ,python-pytest-cov)))
1883 (home-page "https://bitbucket.org/pypa/wheel/")
1884 (synopsis "Format for built Python packages")
1885 (description
1886 "A wheel is a ZIP-format archive with a specially formatted filename and
1887the @code{.whl} extension. It is designed to contain all the files for a PEP
1888376 compatible install in a way that is very close to the on-disk format. Many
1889packages will be properly installed with only the @code{Unpack} step and the
1890unpacked archive preserves enough information to @code{Spread} (copy data and
1891scripts to their final locations) at any later time. Wheel files can be
1892installed with a newer @code{pip} or with wheel's own command line utility.")
1893 (license license:expat)
1894 (properties `((python2-variant . ,(delay python2-wheel))))))
1895
1896(define-public python2-wheel
1897 (let ((wheel (package-with-python2
1898 (strip-python2-variant python-wheel))))
1899 (package (inherit wheel)
1900 (native-inputs `(("python2-functools32" ,python2-functools32)
1901 ,@(package-native-inputs wheel))))))
1902
1903(define-public python-vcversioner
1904 (package
1905 (name "python-vcversioner")
1906 (version "2.16.0.0")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "vcversioner" version))
1911 (sha256
1912 (base32
1913 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1914 (build-system python-build-system)
1915 (synopsis "Python library for version number discovery")
1916 (description "Vcversioner is a Python library that inspects tagging
1917information in a variety of version control systems in order to discover
1918version numbers.")
1919 (home-page "https://github.com/habnabit/vcversioner")
1920 (license license:isc)))
1921
1922(define-public python2-vcversioner
1923 (package-with-python2 python-vcversioner))
1924
5591fc4f
MC
1925(define-public python-jdcal
1926 (package
1927 (name "python-jdcal")
1928 (version "1.4")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (pypi-uri "jdcal" version))
1933 (sha256
1934 (base32
1935 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1936 (build-system python-build-system)
1937 (arguments
1938 `(#:phases (modify-phases %standard-phases
1939 (replace 'check
1940 (lambda _
1941 (invoke "pytest"))))))
1942 (native-inputs
1943 `(("python-pytest" ,python-pytest)))
1944 (home-page "https://github.com/phn/jdcal")
1945 (synopsis "Functions to convert between Julian dates Gregorian dates")
1946 (description "This Python library provides functions for converting
1947between Julian dates and Gregorian dates.")
1948 (license license:bsd-2)))
1949
1950(define-public python2-jdcal
1951 (package-with-python2 python-jdcal))
1952
44d10b1f
RW
1953(define-public python-jsonschema
1954 (package
1955 (name "python-jsonschema")
1adde06e 1956 (version "3.0.1")
44d10b1f
RW
1957 (source (origin
1958 (method url-fetch)
786ccb87 1959 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1960 (sha256
1961 (base32
1adde06e 1962 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
1963 (build-system python-build-system)
1964 (arguments
1965 '(#:phases
1966 (modify-phases %standard-phases
1adde06e
MB
1967 (replace 'check
1968 (lambda _
1969 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
1970 (invoke "trial" "jsonschema"))))))
44d10b1f 1971 (native-inputs
1adde06e
MB
1972 `(("python-setuptools_scm" ,python-setuptools-scm)
1973 ("python-twisted" ,python-twisted)))
1974 (propagated-inputs
1975 `(("python-attrs" ,python-attrs)
1976 ("python-pyrsistent" ,python-pyrsistent)
1977 ("python-six" ,python-six)))
44d10b1f
RW
1978 (home-page "https://github.com/Julian/jsonschema")
1979 (synopsis "Implementation of JSON Schema for Python")
1980 (description
1981 "Jsonschema is an implementation of JSON Schema for Python.")
1982 (license license:expat)
1983 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1984
1985(define-public python2-jsonschema
1986 (let ((jsonschema (package-with-python2
1987 (strip-python2-variant python-jsonschema))))
1988 (package (inherit jsonschema)
44d10b1f 1989 (propagated-inputs
1adde06e
MB
1990 `(("python2-functools32" ,python2-functools32)
1991 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 1992
914bba28
TGR
1993;; This old version is still required by docker-compose as of 1.24.0.
1994(define-public python-jsonschema-2.6
1995 (package
1996 (name "python-jsonschema")
1997 (version "2.6.0")
1998 (source (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "jsonschema" version))
2001 (sha256
2002 (base32
2003 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2004 (build-system python-build-system)
2005 (arguments
2006 '(#:phases
2007 (modify-phases %standard-phases
2008 (replace 'check (lambda _ (invoke "nosetests"))))))
2009 (native-inputs
2010 `(("python-nose" ,python-nose)
2011 ("python-vcversioner" ,python-vcversioner)))
2012 (home-page "https://github.com/Julian/jsonschema")
2013 (synopsis "Implementation of JSON Schema for Python")
2014 (description
2015 "Jsonschema is an implementation of JSON Schema for Python.")
2016 (license license:expat)
2017 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2018
44d10b1f
RW
2019(define-public python-schema
2020 (package
2021 (name "python-schema")
2022 (version "0.6.6")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "schema" version))
2027 (sha256
2028 (base32
2029 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2030 (build-system python-build-system)
2031 (native-inputs
2032 `(("python-pytest" ,python-pytest)))
2033 (home-page "https://github.com/keleshev/schema")
2034 (synopsis "Simple data validation library")
2035 (description
2036 "@code{python-schema} is a library for validating Python data
2037structures, such as those obtained from config-files, forms, external
2038services or command-line parsing, converted from JSON/YAML (or
2039something else) to Python data-types.")
2040 (license license:psfl)))
2041
2042(define-public python2-schema
2043 (package-with-python2 python-schema))
2044
2045(define-public python-schema-0.5
2046 (package (inherit python-schema)
2047 (version "0.5.0")
2048 (source
2049 (origin
2050 (method url-fetch)
2051 (uri (pypi-uri "schema" version))
2052 (sha256
2053 (base32
2054 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2055
2056(define-public python2-schema-0.5
2057 (package-with-python2 python-schema-0.5))
2058
2059(define-public python-kitchen
2060 (package
2061 (name "python-kitchen")
2062 (version "1.2.5")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "kitchen" version))
2067 (sha256
2068 (base32
2069 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2070 (build-system python-build-system)
2071 (propagated-inputs
2072 `(("python-chardet" ,python-chardet)))
2073 (home-page "https://github.com/fedora-infra/kitchen")
2074 (synopsis "Python API for snippets")
2075 (description "@code{kitchen} module provides a python API for all sorts of
2076little useful snippets of code that everybody ends up writing for their projects
2077but never seem big enough to build an independent release. Use kitchen and stop
2078cutting and pasting that code over and over.")
2079 (license (list license:lgpl2.1+
2080 ;; subprocess.py, test_subprocess.py,
2081 ;; kitchen/pycompat25/defaultdict.py:
2082 license:psfl))))
2083
2084(define-public python2-kitchen
2085 (package-with-python2 python-kitchen))
2086
2087(define-public python-unidecode
2088 (package
2089 (name "python-unidecode")
bd9d7206 2090 (version "1.1.0")
44d10b1f
RW
2091 (source (origin
2092 (method url-fetch)
2093 (uri (pypi-uri "Unidecode" version))
2094 (sha256
2095 (base32
bd9d7206 2096 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2097 (build-system python-build-system)
2098 (home-page "https://pypi.python.org/pypi/Unidecode")
2099 (synopsis "ASCII transliterations of Unicode text")
2100 (description
2101 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2102useful when integrating with legacy code that doesn't support Unicode, or for
2103ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2104machine identifiers from human-readable Unicode strings that should still be
2105somewhat intelligible.")
2106 (license license:gpl2+)))
2107
2108(define-public python2-unidecode
2109 (package-with-python2 python-unidecode))
2110
2111(define-public python-pyjwt
2112 (package
2113 (name "python-pyjwt")
2114 (version "1.5.3")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (pypi-uri "PyJWT" version))
2119 (sha256
2120 (base32
2121 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2122 (modules '((guix build utils)))
2123 (snippet
2124 '(begin
2125 (for-each delete-file-recursively
2126 (find-files "." "\\.pyc$"))
2127 #t))))
2128 (build-system python-build-system)
2129 (native-inputs
2130 `(("python-pytest" ,python-pytest)
2131 ("python-pytest-cov" ,python-pytest-cov)
2132 ("python-pytest-runner" ,python-pytest-runner)))
2133 (home-page "https://github.com/progrium/pyjwt")
2134 (synopsis "JSON Web Token implementation in Python")
2135 (description
2136 "PyJWT is a JSON Web Token implementation written in Python.")
2137 (license license:expat)))
2138
2139(define-public python2-pyjwt
2140 (package-with-python2 python-pyjwt))
2141
2142(define-public python-pykka
2143 (package
2144 (name "python-pykka")
2145 (version "1.2.1")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (pypi-uri "Pykka" version))
2150 (sha256
2151 (base32
2152 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2153 (build-system python-build-system)
2154 (native-inputs
2155 `(("python-mock" ,python-mock)
2156 ("python-nose" ,python-nose)
2157 ("python-gevent" ,python-gevent)
2158 ("python-eventlet" ,python-eventlet)))
2159 (home-page "https://www.pykka.org/")
2160 (synopsis "Pykka is a Python implementation of the actor model")
2161 (description
2162 "Pykka is a Python implementation of the actor model.
2163The actor model introduces some simple rules to control the sharing
2164of state and cooperation between execution units, which makes it
2165easier to build concurrent applications.")
2166 (license license:asl2.0)))
2167
2168(define-public python2-pykka
2169 (package-with-python2 python-pykka))
2170
8d22f7e3
VC
2171(define-public python-pymsgbox
2172 (package
2173 (name "python-pymsgbox")
2174 (version "1.0.6")
2175 (source
2176 (origin
2177 (method git-fetch)
2178 (uri (git-reference
2179 ;; LICENSE.txt is not present on pypi
2180 (url "https://github.com/asweigart/PyMsgBox")
2181 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2182 (file-name (git-file-name name version))
2183 (sha256
2184 (base32
2185 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2186 (arguments
2187 ;; Circular dependency to run tests:
2188 ;; Tests need pyautogui, which depends on pymsgbox.
2189 '(#:tests? #f))
2190 (build-system python-build-system)
2191 (home-page "https://github.com/asweigart/PyMsgBox")
2192 (synopsis "Python module for JavaScript-like message boxes")
2193 (description
2194 "PyMsgBox is a simple, cross-platform, pure Python module for
2195JavaScript-like message boxes. Types of dialog boxes include:
2196@enumerate
2197@item alert
2198@item confirm
2199@item prompt
2200@item password
2201@end enumerate
2202")
2203 (license license:bsd-3)))
2204
44d10b1f
RW
2205(define-public python-pympler
2206 (package
2207 (name "python-pympler")
2208 (home-page "https://pythonhosted.org/Pympler/")
ce1706b1 2209 (version "0.6")
44d10b1f
RW
2210 (source (origin
2211 (method url-fetch)
2212 (uri (pypi-uri "Pympler" version))
2213 (sha256
2214 (base32
ce1706b1 2215 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
44d10b1f
RW
2216 (build-system python-build-system)
2217 (arguments
2218 `(#:phases (modify-phases %standard-phases
2219 (delete 'check)
2220 (add-after 'install 'check
2221 (lambda* (#:key inputs outputs #:allow-other-keys)
2222 (add-installed-pythonpath inputs outputs)
2223 (invoke "python" "setup.py" "test"))))))
2224 (synopsis "Measure, monitor and analyze memory behavior")
2225 (description
2226 "Pympler is a development tool to measure, monitor and analyze
2227the memory behavior of Python objects in a running Python application.
2228
2229By pympling a Python application, detailed insight in the size and the
2230lifetime of Python objects can be obtained. Undesirable or unexpected
2231runtime behavior like memory bloat and other @samp{pymples} can easily
2232be identified.
2233
2234A web profiling frontend exposes process statistics, garbage
2235visualisation and class tracker statistics.")
2236 (license license:asl2.0)))
2237
2238(define-public python2-pympler
2239 (package-with-python2 python-pympler))
2240
2241(define-public python-itsdangerous
2242 (package
2243 (name "python-itsdangerous")
acfcf2ed 2244 (version "1.1.0")
44d10b1f
RW
2245 (source
2246 (origin
2247 (method url-fetch)
acfcf2ed 2248 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2249 (sha256
2250 (base32
acfcf2ed 2251 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2252 (build-system python-build-system)
acfcf2ed 2253 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2254 (synopsis "Python library for passing data to/from untrusted environments")
2255 (description
2256 "Itsdangerous provides various helpers to pass trusted data to untrusted
2257environments and back.")
2258 (license license:bsd-3)))
2259
2260(define-public python2-itsdangerous
2261 (package-with-python2 python-itsdangerous))
2262
2263(define-public python-pyyaml
2264 (package
2265 (name "python-pyyaml")
2266 (version "3.13")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "PyYAML" version))
2271 (sha256
2272 (base32
2273 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2274 (build-system python-build-system)
2275 (inputs
2276 `(("libyaml" ,libyaml)))
2277 (home-page "http://pyyaml.org/wiki/PyYAML")
2278 (synopsis "YAML parser and emitter for Python")
2279 (description
2280 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2281complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2282API, and sensible error messages. PyYAML supports standard YAML tags and
2283provides Python-specific tags that allow to represent an arbitrary Python
2284object.")
2285 (license license:expat)))
2286
2287(define-public python2-pyyaml
2288 (package-with-python2 python-pyyaml))
2289
2290(define-public python-vine
2291 (package
2292 (name "python-vine")
2293 (version "1.1.4")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "vine" version))
2298 (sha256
2299 (base32
2300 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2301 (build-system python-build-system)
2302 (native-inputs
2303 `(("python-pytest" ,python-pytest)
2304 ("python-case" ,python-case)))
2305 (home-page "https://github.com/celery/vine")
2306 (synopsis "Promises for Python")
2307 (description
2308 "@code{vine} provides a special implementation of promises in that it can
2309be used both for \"promise of a value\" and lazy evaluation. The biggest
2310upside for this is that everything in a promise can also be a promise,
2311e.g. filters, callbacks and errbacks can all be promises.")
2312 (license license:bsd-3)))
2313
2314(define-public python-virtualenv
2315 (package
2316 (name "python-virtualenv")
2782bd51 2317 (version "16.1.0")
44d10b1f
RW
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (pypi-uri "virtualenv" version))
2322 (sha256
2323 (base32
2782bd51 2324 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2325 (build-system python-build-system)
2326 (arguments
2327 `(#:phases
2328 (modify-phases %standard-phases
2782bd51 2329 (add-before 'check 'disable-failing-test
44d10b1f
RW
2330 (lambda _
2331 ;; Disable failing test. See upstream bug report
2332 ;; https://github.com/pypa/virtualenv/issues/957
2333 (substitute* "tests/test_virtualenv.py"
2334 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2335 #t)))))
44d10b1f
RW
2336 (native-inputs
2337 `(("python-mock" ,python-mock)
2338 ("python-pytest" ,python-pytest)))
2339 (home-page "https://virtualenv.pypa.io/")
2340 (synopsis "Virtual Python environment builder")
2341 (description
2342 "Virtualenv is a tool to create isolated Python environments.")
2343 (license license:expat)))
2344
2345(define-public python2-virtualenv
2346 (package-with-python2 python-virtualenv))
2347
2348(define-public python-markupsafe
2349 (package
2350 (name "python-markupsafe")
753eb411 2351 (version "1.1.1")
44d10b1f
RW
2352 (source
2353 (origin
2354 (method url-fetch)
5182927c 2355 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2356 (sha256
2357 (base32
753eb411 2358 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2359 (build-system python-build-system)
753eb411
MB
2360 (arguments
2361 `(#:modules ((ice-9 ftw)
2362 (srfi srfi-1)
2363 (srfi srfi-26)
2364 (guix build utils)
2365 (guix build python-build-system))
2366 #:phases (modify-phases %standard-phases
2367 (replace 'check
2368 (lambda _
2369 (let ((cwd (getcwd))
2370 (libdir (find (cut string-prefix? "lib." <>)
2371 (scandir "build"))))
2372 (setenv "PYTHONPATH"
2373 (string-append cwd "/build/" libdir ":"
2374 (getenv "PYTHONPATH")))
2375 (invoke "pytest" "-vv")))))))
2376 (native-inputs
2377 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2378 (home-page "https://github.com/mitsuhiko/markupsafe")
2379 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2380 (description
2381 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2382for Python.")
2383 (license license:bsd-3)))
2384
2385(define-public python2-markupsafe
2386 (package-with-python2 python-markupsafe))
2387
2388(define-public python-jinja2
2389 (package
2390 (name "python-jinja2")
4a5c7934 2391 (version "2.10.1")
44d10b1f
RW
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "Jinja2" version))
2396 (sha256
2397 (base32
4a5c7934 2398 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2399 (build-system python-build-system)
2400 (propagated-inputs
2401 `(("python-markupsafe" ,python-markupsafe)))
2402 (home-page "http://jinja.pocoo.org/")
2403 (synopsis "Python template engine")
2404 (description
2405 "Jinja2 is a small but fast and easy to use stand-alone template engine
2406written in pure Python.")
2407 (license license:bsd-3)))
2408
2409(define-public python2-jinja2
2410 (package-with-python2 python-jinja2))
2411
2412(define-public python-pystache
2413 (package
2414 (name "python-pystache")
2415 (version "0.5.4")
2416 (source (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "pystache" version))
2419 (sha256
2420 (base32
2421 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2422 (build-system python-build-system)
2423 (arguments
2424 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2425 (home-page "http://defunkt.io/pystache/")
2426 (synopsis "Python logic-less template engine")
2427 (description
2428 "Pystache is a Python implementation of the framework agnostic,
2429logic-free templating system Mustache.")
2430 (license license:expat)
2431 (properties `((python2-variant . ,(delay python2-pystache))))))
2432
2433(define-public python2-pystache
2434 (package (inherit (package-with-python2
2435 (strip-python2-variant python-pystache)))
2436 (arguments
2437 `(#:python ,python-2
2438 #:phases
2439 (modify-phases %standard-phases
2440 (replace 'check
2441 (lambda _
dfafc29b 2442 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2443
2444(define-public python-joblib
2445 (package
2446 (name "python-joblib")
2447 (version "0.13.0")
2448 (source (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "joblib" version))
2451 (sha256
2452 (base32
2453 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2454 (build-system python-build-system)
2455 (arguments
2456 `(#:phases
2457 (modify-phases %standard-phases
2458 (replace 'check
2459 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2460 (native-inputs
2461 `(("python-pytest" ,python-pytest)))
2462 (home-page "https://joblib.readthedocs.io/")
2463 (synopsis "Using Python functions as pipeline jobs")
2464 (description
2465 "Joblib is a set of tools to provide lightweight pipelining in Python.
2466In particular, joblib offers: transparent disk-caching of the output values
2467and lazy re-evaluation (memoize pattern), easy simple parallel computing
2468logging and tracing of the execution.")
2469 (license license:bsd-3)))
2470
2471(define-public python2-joblib
2472 (package-with-python2 python-joblib))
2473
a3363341
VC
2474(define-public python-daemon
2475 (package
2476 (name "python-daemon")
2477 (version "2.2.3")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "python-daemon" version))
2482 (sha256
2483 (base32
2484 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2485 (build-system python-build-system)
2486 (arguments
2487 `(#:phases
2488 (modify-phases %standard-phases
2489 (add-before 'check 'disable-tests
2490 (lambda _
2491 ;; FIXME: Determine why test fails
2492 (substitute* "test/test_daemon.py"
2493 (("test_detaches_process_context")
2494 "skip_test_detaches_process_context"))
2495 #t)))))
2496 (propagated-inputs
2497 `(("python-lockfile" ,python-lockfile)))
2498 (native-inputs
2499 `(("python-unittest2" ,python-unittest2)
2500 ("python-testtools" ,python-testtools)
2501 ("python-testscenarios" ,python-testscenarios)
2502 ("python-mock" ,python-mock)
2503 ("python-docutils" ,python-docutils)))
2504 (home-page "https://pagure.io/python-daemon/")
2505 (synopsis "Python library for making a Unix daemon process")
2506 (description "Python-daemon is a library that assists a Python program to
2507turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2508
2509This library provides a @code{DaemonContext} class that manages the following
2510important tasks for becoming a daemon process:
2511@enumerate
2512@item Detach the process into its own process group.
2513@item Set process environment appropriate for running inside a chroot.
2514@item Renounce suid and sgid privileges.
2515@item Close all open file descriptors.
2516@item Change the working directory, uid, gid, and umask.
2517@item Set appropriate signal handlers.
2518@item Open new file descriptors for stdin, stdout, and stderr.
2519@item Manage a specified PID lock file.
2520@item Register cleanup functions for at-exit processing.
2521@end enumerate")
2522 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2523 (license (list license:asl2.0 license:gpl3+))))
2524
44d10b1f
RW
2525(define-public python-docutils
2526 (package
2527 (name "python-docutils")
2528 (version "0.14")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "docutils" version))
2533 (sha256
2534 (base32
2535 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2536 (build-system python-build-system)
2537 (arguments
2538 '(#:tests? #f)) ; no setup.py test command
2539 (home-page "http://docutils.sourceforge.net/")
2540 (synopsis "Python Documentation Utilities")
2541 (description
2542 "Docutils is a modular system for processing documentation into useful
2543formats, such as HTML, XML, and LaTeX. For input Docutils supports
2544reStructuredText.")
2545 ;; Most of the source code is public domain, but some source files are
2546 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2547 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2548
2549(define-public python2-docutils
2550 (package-with-python2 python-docutils))
2551
2552(define-public python-pygments
2553 (package
2554 (name "python-pygments")
eed81080 2555 (version "2.4.2")
44d10b1f
RW
2556 (source
2557 (origin
2558 (method url-fetch)
2559 (uri (pypi-uri "Pygments" version))
2560 (sha256
2561 (base32
eed81080 2562 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2563 (build-system python-build-system)
2564 (arguments
2565 ;; FIXME: Tests require sphinx, which depends on this.
2566 '(#:tests? #f))
2567 (home-page "http://pygments.org/")
2568 (synopsis "Syntax highlighting")
2569 (description
2570 "Pygments is a syntax highlighting package written in Python.")
2571 (license license:bsd-2)))
2572
2573(define-public python2-pygments
2574 (package-with-python2 python-pygments))
2575
0f0a5ef9
MC
2576(define-public python-bumpversion
2577 (package
2578 (name "python-bumpversion")
2579 (version "0.5.3")
2580 (source
2581 (origin
2582 (method url-fetch)
2583 (uri (pypi-uri "bumpversion" version))
2584 (sha256
2585 (base32
2586 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2587 (build-system python-build-system)
2588 (home-page "https://github.com/peritus/bumpversion")
2589 (synopsis "Tool to bump software version")
2590 (description "This tool provides a command-line interface (CLI) to bump a
2591software version simply.")
2592 (license license:expat)))
2593
b24fd2c2
MC
2594(define-public python-deprecated
2595 (package
2596 (name "python-deprecated")
2597 (version "1.2.5")
2598 (source
2599 (origin
2600 (method git-fetch)
2601 (uri (git-reference
2602 (url "https://github.com/tantale/deprecated.git")
2603 (commit (string-append "v" version))))
2604 (file-name (git-file-name name version))
2605 (sha256
2606 (base32
2607 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2608 (build-system python-build-system)
2609 (arguments
2610 `(#:phases (modify-phases %standard-phases
2611 (replace 'check
2612 (lambda _
2613 (invoke "pytest"))))))
2614 (propagated-inputs
2615 `(("python-wrapt" ,python-wrapt)))
2616 (native-inputs
2617 `(("python-bumpversion" ,python-bumpversion)
2618 ("python-pytest" ,python-pytest)
2619 ("python-pytest-cov" ,python-pytest-cov)
2620 ("python-sphinx" ,python-sphinx)
2621 ("python-tox" ,python-tox)))
2622 (home-page "https://github.com/tantale/deprecated")
2623 (synopsis "Python decorator to deprecate classes, functions or methods")
2624 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2625to deprecate classes, functions or methods.")
2626 (license license:expat)))
2627
d5a998fa
MC
2628(define-public python-pygithub
2629 (package
2630 (name "python-pygithub")
2631 (version "1.43.7")
2632 (source
2633 ;; We fetch from the Git repo because there are no tests in the PyPI
2634 ;; archive.
2635 (origin
2636 (method git-fetch)
2637 (uri (git-reference
2638 (url "https://github.com/PyGithub/PyGithub.git")
2639 (commit (string-append "v" version))))
2640 (file-name (git-file-name name version))
2641 (sha256
2642 (base32
2643 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2644 (build-system python-build-system)
2645 (arguments
2646 `(#:phases (modify-phases %standard-phases
2647 ;; Some tests rely on the network.
2648 (add-after 'unpack 'disable-failing-tests
2649 (lambda _
2650 (substitute* "tests/Issue142.py"
2651 (("testDecodeJson") "disabled_testDecodeJson"))
2652 #t))
2653 (add-before 'check 'prepare-for-tests
2654 (lambda _
2655 (for-each (lambda (f)
2656 (chmod f #o666))
2657 (find-files "./tests"))
2658 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2659 (setenv "PYTHONPATH"
2660 (string-append "./tests:" (getenv "PYTHONPATH")))
2661 #t)))))
2662 (propagated-inputs
2663 `(("python-deprecated" ,python-deprecated)
2664 ("python-pyjwt" ,python-pyjwt)
2665 ("python-requests" ,python-requests)))
2666 (native-inputs `(("python-httpretty" ,python-httpretty)))
2667 (home-page "https://pygithub.readthedocs.io/en/latest/")
2668 (synopsis "Python library for the GitHub API")
2669 (description "This library allows managing GitHub resources such as
2670repositories, user profiles, and organizations in your Python applications,
2671using version 3 of the GitHub application programming interface (API).")
2672 (license license:lgpl3+)))
2673
c0c0bb38
MC
2674(define-public python-rellu
2675 (package
2676 (name "python-rellu")
2677 (version "0.7")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "rellu" version))
2682 (sha256
2683 (base32
2684 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2685 (build-system python-build-system)
2686 (propagated-inputs
2687 `(("python-invoke" ,python-invoke)
2688 ("python-pygithub" ,python-pygithub)))
2689 (home-page "https://github.com/robotframework/rellu")
2690 (synopsis "Utilities to create PyPI releases")
2691 (description "This collection of utilities contains tooling and templates
2692to assist in creating releases on GitHub and publishing them on PyPI. It is
2693designed to be used by Robot Framework and tools and libraries in its
2694ecosystem, but can naturally be used also by other projects.")
2695 (license license:asl2.0)))
2696
b9790285
MC
2697(define-public python-robotframework
2698 (package
2699 (name "python-robotframework")
1710b8f8 2700 (version "3.1.2")
b9790285
MC
2701 ;; There are no tests in the PyPI archive.
2702 (source
2703 (origin
2704 (method git-fetch)
2705 (uri (git-reference
2706 (url "https://github.com/robotframework/robotframework.git")
2707 (commit (string-append "v" version))))
2708 (file-name (git-file-name name version))
2709 (sha256
1710b8f8 2710 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2711 (patches (search-patches
2712 "python-robotframework-honor-source-date-epoch.patch"))))
2713 (build-system python-build-system)
2714 (arguments
2715 `(#:phases (modify-phases %standard-phases
2716 (add-before 'build 'build-and-install-doc
2717 (lambda* (#:key outputs #:allow-other-keys)
2718 (let* ((doc-output (assoc-ref outputs "doc"))
2719 (doc (string-append doc-output "/share/"
2720 ,name "-" ,version "/")))
2721 (invoke "invoke" "library-docs" "all")
2722 (mkdir-p doc)
2723 (copy-recursively "doc/libraries"
2724 (string-append doc "/libraries"))
2725 #t)))
2726 (replace 'check
2727 (lambda _
2728 (invoke "python" "utest/run.py"))))))
2729 (native-inputs
2730 `(("python-invoke" ,python-invoke)
2731 ("python-rellu" ,python-rellu)
2732 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2733 (outputs '("out" "doc"))
2734 (home-page "https://robotframework.org")
2735 (synopsis "Generic automation framework")
2736 (description "Robot Framework is a generic automation framework for
2737acceptance testing, acceptance test driven development (ATDD), and robotic
2738process automation (RPA).")
2739 (license license:asl2.0)))
2740
5b84c120
MC
2741(define-public python-robotframework-lint
2742 ;; There is no properly tagged release; the commit below seems to correspond
2743 ;; to the 0.9 stable release available from PyPI. The tests are not
2744 ;; included in the PyPI archive, so we fetch the sources from the upstream
2745 ;; Git repo.
2746 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2747 (revision "1"))
2748 (package
2749 (name "python-robotframework-lint")
2750 (version (git-version "0.9.0" revision commit))
2751 (source
2752 (origin
2753 (method git-fetch)
2754 (uri (git-reference
2755 (url "https://github.com/boakley/robotframework-lint.git")
2756 (commit commit)))
2757 (file-name (git-file-name name version))
2758 (sha256
2759 (base32
2760 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2761 (build-system python-build-system)
2762 (arguments
2763 `(#:phases
2764 (modify-phases %standard-phases
2765 (replace 'check
2766 (lambda _
2767 (invoke "python" "-m" "robot" "-A"
2768 "tests/conf/default.args" "tests"))))))
2769 (propagated-inputs
2770 `(("python-robotframework" ,python-robotframework)))
2771 (home-page "https://github.com/boakley/robotframework-lint/")
2772 (synopsis "Static analysis tool (linter) for Robot Framework")
2773 (description "This package provides the @code{rflint} command-line
2774utility, a static analysis tool (linter) for Robot Framework source files.")
2775 (license license:asl2.0))))
2776
c0c64f17
MC
2777(define-public python-robotframework-sshlibrary
2778 (package
2779 (name "python-robotframework-sshlibrary")
2780 (version "3.3.0")
2781 ;; There are no tests in the PyPI archive.
2782 (source
2783 (origin
2784 (method git-fetch)
2785 (uri (git-reference
2786 (url "https://github.com/robotframework/SSHLibrary.git")
2787 (commit (string-append "v" version))))
2788 (file-name (git-file-name name version))
2789 (sha256
2790 (base32
2791 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2792 (build-system python-build-system)
2793 (arguments
2794 `(#:phases
2795 (modify-phases %standard-phases
2796 (add-before 'build 'build-and-install-doc
2797 (lambda* (#:key outputs #:allow-other-keys)
2798 (let* ((doc-output (assoc-ref outputs "doc"))
2799 (doc (string-append doc-output "/share/"
2800 ,name "-" ,version "/")))
2801 (invoke "chmod" "-R" "+w" "docs")
2802 (invoke "invoke" "kw-docs" "project-docs")
2803 (mkdir-p doc)
2804 (for-each delete-file (find-files "docs" "\\.rst"))
2805 (copy-recursively "docs" doc)
2806 #t)))
2807 (replace 'check
2808 (lambda _
2809 ;; Some tests require an SSH server; we remove them.
2810 (delete-file "utest/test_client_api.py")
2811 (delete-file "utest/test_scp.py")
2812 (invoke "python" "utest/run.py"))))))
2813 (propagated-inputs
2814 `(("python-robotframework" ,python-robotframework)
2815 ("python-paramiko" ,python-paramiko)
2816 ("python-scp" ,python-scp)))
2817 (native-inputs
2818 `(("openssh" ,openssh)
2819 ("which" ,which)
2820 ;; To generate the documentation
2821 ("python-docutils" ,python-docutils)
2822 ("python-invoke" ,python-invoke)
2823 ("python-pygments" ,python-pygments)
2824 ("python-rellu" ,python-rellu)))
2825 (outputs '("out" "doc"))
2826 (home-page "https://github.com/robotframework/SSHLibrary")
2827 (synopsis "Robot Framework library for SSH and SFTP")
2828 (description "SSHLibrary is a Robot Framework library providing support
2829for SSH and SFTP. It has the following main usages:
2830@itemize @bullet
2831@item Executing commands on the remote machine, either blocking or non-blocking.
2832@item Writing and reading in an interactive shell.
2833@item Transferring files and directories over SFTP.
2834@item Ensuring that files and directories exist on the remote machine.
2835@end itemize")
2836 (license license:asl2.0)))
2837
13d825fc
MC
2838(define-public python-scp
2839 (package
2840 (name "python-scp")
2841 (version "0.13.2")
2842 (source
2843 (origin
2844 (method url-fetch)
2845 (uri (pypi-uri "scp" version))
2846 (sha256
2847 (base32
2848 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2849 (build-system python-build-system)
2850 (arguments
2851 '(#:tests? #f)) ;tests require an SSH server
2852 (propagated-inputs
2853 `(("python-paramiko" ,python-paramiko)))
2854 (home-page "https://github.com/jbardin/scp.py")
2855 (synopsis "SCP protocol module for Python and Paramiko")
2856 (description "The scp module extends the Paramiko library to send and
2857receive files via the SCP1 protocol, as implemented by the OpenSSH
2858@command{scp} program.")
2859 (license license:gpl2+)))
2860
44d10b1f
RW
2861(define-public python-rst.linker
2862 (package
2863 (name "python-rst.linker")
2864 (version "1.10")
2865 (source
2866 (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "rst.linker" version))
2869 (sha256
2870 (base32
2871 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2872 (build-system python-build-system)
2873 (propagated-inputs
2874 `(("python-dateutil" ,python-dateutil)
2875 ("python-six" ,python-six)))
2876 (native-inputs
2877 `(("python-setuptools-scm" ,python-setuptools-scm)))
2878 ;; Test would require path.py, which would introduce a cyclic dependence.
2879 (arguments `(#:tests? #f))
2880 ;; Note: As of version 1.7 the documentation is not worth building.
2881 (home-page "https://github.com/jaraco/rst.linker")
2882 (synopsis "Sphinx plugin to add links and timestamps")
2883 (description "rst.linker allows to automatically replace text by a
2884reStructuredText external reference or timestamps. It's primary purpose is to
2885augment the changelog, but it can be used for other documents, too.")
2886 (license license:expat)))
2887
2888(define-public python2-rst.linker
2889 (package-with-python2 python-rst.linker))
2890
2891(define-public python-feedgenerator
2892 (package
2893 (name "python-feedgenerator")
2894 (version "1.9")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "feedgenerator" version))
2899 (sha256
2900 (base32
2901 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2902 (modules '((guix build utils)))
2903 (snippet
2904 '(begin
2905 ;; Remove pre-compiled .pyc files from source.
2906 (for-each delete-file-recursively
2907 (find-files "." "__pycache__" #:directories? #t))
2908 (for-each delete-file (find-files "." "\\.pyc$"))
2909 #t))))
2910 (build-system python-build-system)
2911 (propagated-inputs
2912 `(("python-pytz" ,python-pytz)
2913 ("python-six" ,python-six)))
2914 (home-page "https://github.com/getpelican/feedgenerator")
2915 (synopsis
2916 "Standalone version of Django's Atom/RSS feed generator")
2917 (description
2918 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2919which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2920 (license license:bsd-3)))
2921
2922(define-public python2-feedgenerator
2923 (package-with-python2 python-feedgenerator))
2924
2925(define-public python-toml
2926 (package
2927 (name "python-toml")
2928 (version "0.9.4")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "toml" version))
2933 (sha256
2934 (base32
2935 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2936 (build-system python-build-system)
2937 (arguments
2938 `(#:tests? #f)) ;no tests suite in release
2939 (home-page "https://github.com/uiri/toml")
2940 (synopsis "Library for TOML")
2941 (description
2942 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2943Language (TOML) configuration files.")
2944 (license license:expat)))
2945
346c8752
BG
2946(define-public python-jsonrpc-server
2947 (package
2948 (name "python-jsonrpc-server")
2949 (version "0.1.2")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "python-jsonrpc-server" version))
2954 (sha256
2955 (base32
2956 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2957 (build-system python-build-system)
2958 (propagated-inputs
2959 `(("python-future" ,python-future)
2960 ("python-mock" ,python-mock)
2961 ("python-pytest" ,python-pytest)))
2962 (home-page
2963 "https://github.com/palantir/python-jsonrpc-server")
2964 (synopsis "JSON RPC 2.0 server library")
2965 (description
1df5407c 2966 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
2967 (license license:expat)))
2968
56f4ad47
BG
2969(define-public python-pydocstyle
2970 (package
2971 (name "python-pydocstyle")
2972 (version "3.0.0")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "pydocstyle" version))
2977 (sha256
2978 (base32
2979 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2980 (build-system python-build-system)
2981 (propagated-inputs
2982 `(("python-six" ,python-six)
2983 ("python-snowballstemmer" ,python-snowballstemmer)))
2984 (home-page
2985 "https://github.com/PyCQA/pydocstyle/")
2986 (synopsis "Python docstring style checker")
2987 (description
2988 "This package provides a style checker for the Python Language
2989Server (PLS).")
2990 (license license:expat)))
2991
be4d840c
BG
2992(define-public python-language-server
2993 (package
2994 (name "python-language-server")
ccbaeba3 2995 (version "0.26.1")
be4d840c
BG
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "python-language-server" version))
3000 (sha256
3001 (base32
ccbaeba3 3002 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s"))))
be4d840c
BG
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-pluggy" ,python-pluggy)
3006 ("python-jsonrpc-server" ,python-jsonrpc-server)
3007 ("python-jedi" ,python-jedi)
3008 ("python-yapf" ,python-yapf)
3009 ("python-pyflakes" ,python-pyflakes)
3010 ("python-pydocstyle" ,python-pydocstyle)
3011 ("python-pycodestyle" ,python-pycodestyle)
3012 ("python-mccabe" ,python-mccabe)
3013 ("python-rope" ,python-rope)
fe4a4bd2
BG
3014 ("python-autopep8" ,python-autopep8)
3015 ("python-pylint" ,python-pylint)))
be4d840c
BG
3016 (home-page "https://github.com/palantir/python-language-server")
3017 (synopsis "Python implementation of the Language Server Protocol")
3018 (description
3019 "The Python Language Server (pyls) is an implementation of the Python 3
3020language specification for the Language Server Protocol (LSP). This tool is
3021used in text editing environments to provide a complete and integrated
3022feature-set for programming Python effectively.")
3023 (license license:expat)))
3024
44d10b1f
RW
3025(define-public python-black
3026 (package
3027 (name "python-black")
3028 (version "18.6b4")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "black" version))
3033 (sha256
3034 (base32
3035 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3036 (build-system python-build-system)
3037 (arguments
3038 `(#:phases
3039 (modify-phases %standard-phases
3040 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3041 (lambda _
3042 (let ((python3 (which "python3")))
3043 (substitute* '("tests/data/fmtonoff.py"
3044 "tests/data/string_prefixes.py"
3045 "tests/data/function.py")
3046 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3047 (string-append "#!" python3 (if (string? minor-version)
3048 minor-version
3049 ""))))))))))
3050 (propagated-inputs
3051 `(("python-click" ,python-click)
3052 ("python-attrs" ,python-attrs)
3053 ("python-appdirs" ,python-appdirs)
3054 ("python-toml" ,python-toml)))
3055 (home-page "https://github.com/ambv/black")
3056 (synopsis "The uncompromising code formatter")
3057 (description "Black is the uncompromising Python code formatter.")
3058 (license license:expat)))
3059
3060(define-public python-blinker
3061 (package
3062 (name "python-blinker")
3063 (version "1.4")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "blinker" version))
3068 (sha256
3069 (base32
3070 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3071 (build-system python-build-system)
3072 (home-page "http://pythonhosted.org/blinker/")
3073 (synopsis "Fast, simple object-to-object and broadcast signaling")
3074 (description
3075 "Blinker provides a fast dispatching system that allows any number of
3076interested parties to subscribe to events, or \"signals\".")
3077 (license license:expat)))
3078
3079(define-public python2-blinker
3080 (package-with-python2 python-blinker))
3081
3082(define-public pelican
3083 (package
3084 (name "pelican")
aa71b690 3085 (version "4.0.1")
44d10b1f
RW
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "pelican" version))
3090 (sha256
3091 (base32
aa71b690 3092 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3093 (build-system python-build-system)
3094 (propagated-inputs
3095 `(("python-feedgenerator" ,python-feedgenerator)
3096 ("python-jinja2" ,python-jinja2)
3097 ("python-pygments" ,python-pygments)
3098 ("python-docutils" ,python-docutils)
3099 ("python-pytz" ,python-pytz)
3100 ("python-blinker" ,python-blinker)
3101 ("python-unidecode" ,python-unidecode)
3102 ("python-six" ,python-six)
3103 ("python-dateutil" ,python-dateutil)
3104 ("python-markdown" ,python-markdown)))
3105 (home-page "https://getpelican.com/")
3106 (arguments
3107 `(;; XXX Requires a lot more packages to do unit tests :P
3108 #:tests? #f
3109 #:phases (modify-phases %standard-phases
3110 (add-before
3111 'install 'adjust-requires
3112 ;; Since feedgenerator is installed from git, it doesn't
3113 ;; conform to the version requirements.
3114 ;;
3115 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3116 ;; version requirement so setuptools doesn't get confused.
3117 (lambda _
3118 (substitute* "setup.py"
3119 (("['\"]feedgenerator.*?['\"]")
3120 "'feedgenerator'")))))))
3121 (synopsis "Python-based static site publishing system")
3122 (description
3123 "Pelican is a tool to generate a static blog from reStructuredText,
3124Markdown input files, and more. Pelican uses Jinja2 for templating
3125and is very extensible.")
3126 (license license:agpl3+)))
3127
8c141421
JH
3128(define-public mallard-ducktype
3129 (package
3130 (name "mallard-ducktype")
3131 (version "1.0.1")
3132 (source
3133 (origin
3134 (method git-fetch)
3135 ;; git-reference because a proper source tarball is not available
3136 ;; https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00209.html
3137 (uri (git-reference
3138 (url "https://github.com/projectmallard/mallard-ducktype.git")
3139 (commit version)))
3140 (file-name (git-file-name name version))
3141 (sha256
3142 (base32
3143 "0crland0kmpsyjfmnflcw7gaqy5b87b6ah17cmr9d5z1kyazf54n"))))
3144 (build-system python-build-system)
3145 (home-page "http://projectmallard.org")
3146 (synopsis "Convert Ducktype to Mallard documentation markup")
3147 (description
3148 "Ducktype is a lightweight syntax that can represent all the semantics
3149of the Mallard XML documentation system. Ducktype files can be converted to
3150Mallard using the @command{ducktype} tool. The yelp-tools package
3151provides additional functionality on the produced Mallard documents.")
3152 (license license:expat)))
3153
44d10b1f
RW
3154(define-public python-scikit-image
3155 (package
3156 (name "python-scikit-image")
9ff04084 3157 (version "0.14.2")
44d10b1f
RW
3158 (source
3159 (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "scikit-image" version))
3162 (sha256
9ff04084 3163 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3164 (build-system python-build-system)
3165 (arguments
3166 ;; TODO: Some tests require running X11 server. Disable them?
3167 '(#:tests? #f))
3168 ;; See DEPENDS.txt for the list of build and run time requiremnts
3169 (propagated-inputs
3170 `(("python-cloudpickle" ,python-cloudpickle)
3171 ("python-dask" ,python-dask)
3172 ("python-matplotlib" ,python-matplotlib)
3173 ("python-networkx" ,python-networkx)
3174 ("python-numpy" ,python-numpy)
3175 ("python-pillow" ,python-pillow)
3176 ("python-pywavelets" ,python-pywavelets)
3177 ("python-scipy" ,python-scipy)
3178 ("python-six" ,python-six)))
3179 (native-inputs
3180 `(("python-cython" ,python-cython)))
3181 (home-page "http://scikit-image.org/")
3182 (synopsis "Image processing in Python")
3183 (description
3184 "Scikit-image is a collection of algorithms for image processing.")
3185 (license license:bsd-3)))
3186
3187(define-public python2-scikit-image
3188 (package-with-python2 python-scikit-image))
3189
3190(define-public python-cython
3191 (package
3192 (name "python-cython")
d1b93e91 3193 (version "0.29.11")
44d10b1f
RW
3194 (source
3195 (origin
3196 (method url-fetch)
3197 (uri (pypi-uri "Cython" version))
3198 (sha256
3199 (base32
d1b93e91 3200 "1866m01ggl2h3rky4hac3m5p048gg4a0jb09ljkknryiqln54fkn"))))
44d10b1f
RW
3201 (build-system python-build-system)
3202 ;; we need the full python package and not just the python-wrapper
3203 ;; because we need libpython3.3m.so
3204 (inputs
3205 `(("python" ,python)))
3206 (arguments
3207 `(#:phases
3208 (modify-phases %standard-phases
3209 (add-before 'check 'set-HOME
3210 ;; some tests require access to "$HOME/.cython"
3211 (lambda _ (setenv "HOME" "/tmp") #t))
3212
3213 ;; FIXME: These tests started failing on armhf after the 0.28 update
3214 ;; (commit c69d11c5930), both with an error such as this:
3215 ;; compiling (cpp) and running dictcomp ...
3216 ;; === C/C++ compiler error output: ===
3217 ;; ‘
3218 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3219 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3220 ,@(if (target-arm32?)
3221 `((add-before 'check 'disable-failing-tests
3222 (lambda _
3223 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3224 (for-each (lambda (test)
3225 (format disabled-tests "~a\n" test))
3226 '("memslice" "dictcomp"))
3227 (close-port disabled-tests)))))
3228 '())
3229
3230 (replace 'check
3231 (lambda _
44d10b1f 3232 (invoke "python" "runtests.py" "-vv"))))))
f319409b 3233 (home-page "https://cython.org/")
44d10b1f
RW
3234 (synopsis "C extensions for Python")
3235 (description "Cython is an optimising static compiler for both the Python
3236programming language and the extended Cython programming language. It makes
3237writing C extensions for Python as easy as Python itself.")
3238 (license license:asl2.0)
3239 (properties `((python2-variant . ,(delay python2-cython))))))
3240
3241(define-public python2-cython
da460865
MB
3242 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3243 (package
3244 (inherit base)
3245 (name "python2-cython")
3246 (inputs
3247 `(("python-2" ,python-2))) ;this is not automatically changed
3248 (arguments
3249 (substitute-keyword-arguments (package-arguments base)
3250 ((#:phases phases)
3251 `(modify-phases ,phases
3252 (add-before 'check 'adjust-test_embed
3253 (lambda _
3254 (substitute* "runtests.py"
3255 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3256 ;; so it can give the right -L flag to GCC when embedding static
3257 ;; builds of Python. It is unaware that the Python "config"
3258 ;; directory (where the static library lives) was renamed in
3259 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3260 ;; which works fine, because that is where the shared library is.
3261 ;;
3262 ;; It also appears to be unaware that the Makefile in Demos/embed
3263 ;; already unconditionally pass the static library location to GCC,
3264 ;; after checking sysconfig.get_config_var('LIBPL).
3265 ;;
3266 ;; The effect is that the linker is unable to resolve libexpat
3267 ;; symbols when building for Python 2, because neither the Python 2
3268 ;; shared library nor Expat is available. To fix it, we can either
3269 ;; add Expat as an input and make it visible to the linker, or just
3270 ;; prevent it from overriding the Python shared library location.
3271 ;; The end result is identical, so we take the easy route.
3272 ((" or libname not in os\\.listdir\\(libdir\\)")
3273 ""))
3274 #t)))))))))
44d10b1f
RW
3275
3276;; The RPython toolchain currently does not support Python 3.
3277(define-public python2-rpython
3278 (package
3279 (name "python2-rpython")
3280 (version "0.2.1")
3281 (source
3282 (origin
3283 (method url-fetch)
3284 (uri (pypi-uri "rpython" version))
3285 (sha256
3286 (base32
3287 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3288 (build-system python-build-system)
3289 (arguments `(#:python ,python-2))
3290 (native-inputs
3291 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3292 (home-page "https://rpython.readthedocs.org")
3293 (synopsis "Framework for implementing interpreters and virtual machines")
3294 (description "RPython is a translation and support framework for
3295producing implementations of dynamic languages, emphasizing a clean separation
3296between language specification and implementation aspects.")
3297 (license license:expat)))
3298
3299;; NOTE: when upgrading numpy please make sure that python-pandas and
3300;; python-scipy still build, as these three packages are often used together.
3301(define-public python-numpy
3302 (package
3303 (name "python-numpy")
3304 (version "1.15.4")
3305 (source
3306 (origin
3307 (method url-fetch)
3308 (uri (string-append
3309 "https://github.com/numpy/numpy/releases/download/v"
3310 version "/numpy-" version ".tar.gz"))
3311 (sha256
3312 (base32
3313 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3314 (build-system python-build-system)
3315 (inputs
3316 `(("openblas" ,openblas)
3317 ("lapack" ,lapack)))
3318 (native-inputs
3319 `(("python-cython" ,python-cython)
3320 ("python-pytest" ,python-pytest)
3321 ("gfortran" ,gfortran)))
3322 (arguments
3323 `(#:phases
3324 (modify-phases %standard-phases
3325 (add-before 'build 'configure-blas-lapack
3326 (lambda* (#:key inputs #:allow-other-keys)
3327 (call-with-output-file "site.cfg"
3328 (lambda (port)
3329 (format port
3330 "[openblas]
3331libraries = openblas
3332library_dirs = ~a/lib
3333include_dirs = ~a/include
3334
3335# backslash-n to make emacs happy
3336\n[lapack]
3337lapack_libs = lapack
3338library_dirs = ~a/lib
3339include_dirs = ~a/include
3340"
3341 (assoc-ref inputs "openblas")
3342 (assoc-ref inputs "openblas")
3343 (assoc-ref inputs "lapack")
3344 (assoc-ref inputs "lapack"))))
3345 #t))
3346 (add-before 'build 'fix-executable-paths
3347 (lambda* (#:key inputs #:allow-other-keys)
3348 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3349 ;; instead of /bin/sh.
3350 (substitute* "numpy/distutils/exec_command.py"
3351 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3352 (string-append match-start (assoc-ref inputs "bash") match-end)))
3353 ;; Use "gcc" executable, not "cc".
3354 (substitute* "numpy/distutils/system_info.py"
3355 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3356 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3357 #t))
3358 ;; Tests can only be run after the library has been installed and not
3359 ;; within the source directory.
3360 (delete 'check)
3361 (add-after 'install 'check
3362 (lambda* (#:key outputs inputs #:allow-other-keys)
3363 ;; Make installed package available for running the tests
3364 (add-installed-pythonpath inputs outputs)
3365 ;; Make sure "f2py" etc is found.
3366 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3367 ":" (getenv "PATH")))
3368 (with-directory-excursion "/tmp"
3369 (invoke "python" "-c"
3370 "import numpy; numpy.test(verbose=2)")))))))
3371 (home-page "http://www.numpy.org/")
3372 (synopsis "Fundamental package for scientific computing with Python")
3373 (description "NumPy is the fundamental package for scientific computing
3374with Python. It contains among other things: a powerful N-dimensional array
3375object, sophisticated (broadcasting) functions, tools for integrating C/C++
3376and Fortran code, useful linear algebra, Fourier transform, and random number
3377capabilities.")
3378 (license license:bsd-3)))
3379
3380(define-public python2-numpy
3381 (package-with-python2 python-numpy))
3382
3383;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3384;; interest only for legacy code going back to NumPy's predecessor
3385;; Numeric.
3386(define-public python2-numpy-1.8
3387 (package (inherit python2-numpy)
3388 (version "1.8.2")
3389 (source
3390 (origin
3391 (method url-fetch)
3392 (uri (string-append
3393 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3394 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3395 (sha256
3396 (base32
3397 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3398 (arguments
3399 (substitute-keyword-arguments (package-arguments python2-numpy)
3400 ((#:phases phases)
3401 `(modify-phases ,phases
3402 (replace 'configure-blas-lapack
3403 (lambda* (#:key inputs #:allow-other-keys)
3404 (call-with-output-file "site.cfg"
3405 (lambda (port)
3406 (format port
3407 "[openblas]
3408libraries = openblas,lapack
3409library_dirs = ~a/lib:~a/lib
3410include_dirs = ~a/include:~a/include
3411"
3412 (assoc-ref inputs "openblas")
3413 (assoc-ref inputs "lapack")
3414 (assoc-ref inputs "openblas")
3415 (assoc-ref inputs "lapack"))))
3416 #t))))))
3417 (native-inputs
3418 `(("python2-nose" ,python2-nose)))
3419 (description "NumPy is the fundamental package for scientific computing
3420with Python. It contains among other things: a powerful N-dimensional array
3421object, sophisticated (broadcasting) functions, tools for integrating C/C++
3422and Fortran code, useful linear algebra, Fourier transform, and random number
3423capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3424that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3425Numeric.")
3426 (license license:bsd-3)))
3427
3428(define-public python-munch
3429 (package
3430 (name "python-munch")
3431 (version "2.0.4")
3432 (source
3433 (origin
3434 (method url-fetch)
3435 (uri (pypi-uri "munch" version))
3436 (sha256
3437 (base32
3438 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3439 (build-system python-build-system)
3440 (home-page "https://github.com/Infinidat/munch")
3441 (synopsis "Dot-accessible dictionary")
3442 (description "Munch is a dot-accessible dictionary similar to JavaScript
3443objects.")
3444 (license license:expat)))
3445
3446(define-public python2-munch
3447 (package-with-python2 python-munch))
3448
3449(define-public python-colormath
3450 (package
3451 (name "python-colormath")
3452 (version "3.0.0")
3453 (source
3454 (origin
3455 (method url-fetch)
3456 (uri (pypi-uri "colormath" version))
3457 (sha256
3458 (base32
3459 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3460 (build-system python-build-system)
3461 (propagated-inputs
3462 `(("python-networkx" ,python-networkx)
3463 ("python-numpy" ,python-numpy)))
3464 (home-page "https://github.com/gtaylor/python-colormath")
3465 (synopsis "Color math and conversion library")
3466 (description
3467 "This is a Python library for color math and conversions.")
3468 (license license:bsd-3)))
3469
3470(define-public python2-colormath
3471 (package-with-python2 python-colormath))
3472
3473(define-public python-spectra
3474 (package
3475 (name "python-spectra")
3476 (version "0.0.11")
3477 (source
3478 (origin
3479 (method url-fetch)
3480 (uri (pypi-uri "spectra" version))
3481 (sha256
3482 (base32
3483 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3484 (build-system python-build-system)
3485 (arguments
3486 `(#:phases
3487 (modify-phases %standard-phases
3488 (replace 'check
38ec0f6a 3489 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3490 (propagated-inputs
3491 `(("python-colormath" ,python-colormath)))
3492 (native-inputs
3493 `(("python-nose" ,python-nose)))
3494 (home-page "https://github.com/jsvine/spectra")
3495 (synopsis "Color scales and color conversion")
3496 (description
3497 "This package provides a Python library intended to make color math,
3498color scales, and color space conversion easy. It has support for:
3499
3500@enumerate
3501@item Color scales
3502@item Color ranges
3503@item Color blending
3504@item Brightening/darkening colors
3505@item Saturating/desaturating colors
3506@item Conversion to/from multiple color spaces.
3507@end enumerate\n")
3508 (license license:expat)))
3509
3510(define-public python2-spectra
3511 (package-with-python2 python-spectra))
3512
3513(define-public python-numpy-documentation
3514 (package
3515 (name "python-numpy-documentation")
3516 (version (package-version python-numpy))
3517 (source (package-source python-numpy))
3518 (build-system python-build-system)
3519 (native-inputs
3520 `(("python-matplotlib" ,python-matplotlib)
3521 ("python-numpy" ,python-numpy)
3522 ("pkg-config" ,pkg-config)
3523 ("python-sphinx" ,python-sphinx)
3524 ("python-numpydoc" ,python-numpydoc)
3525 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3526 texlive-fonts-cm-super
3527 texlive-fonts-ec
3528 texlive-generic-ifxetex
3529 texlive-generic-pdftex
3530 texlive-latex-amsfonts
3531 texlive-latex-capt-of
3532 texlive-latex-cmap
3533 texlive-latex-environ
3534 texlive-latex-eqparbox
3535 texlive-latex-etoolbox
3536 texlive-latex-expdlist
3537 texlive-latex-fancyhdr
3538 texlive-latex-fancyvrb
3539 texlive-latex-fncychap
3540 texlive-latex-float
3541 texlive-latex-framed
3542 texlive-latex-geometry
3543 texlive-latex-graphics
3544 texlive-latex-hyperref
3545 texlive-latex-mdwtools
3546 texlive-latex-multirow
3547 texlive-latex-needspace
3548 texlive-latex-oberdiek
3549 texlive-latex-parskip
3550 texlive-latex-preview
3551 texlive-latex-tabulary
3552 texlive-latex-threeparttable
3553 texlive-latex-titlesec
3554 texlive-latex-trimspaces
3555 texlive-latex-ucs
3556 texlive-latex-upquote
3557 texlive-latex-url
3558 texlive-latex-varwidth
3559 texlive-latex-wrapfig)))
3560 ("texinfo" ,texinfo)
3561 ("perl" ,perl)
3562 ("scipy-sphinx-theme"
3563 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3564 (method git-fetch)
3565 (uri (git-reference
3566 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3567 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3568 (sha256
3569 (base32
3570 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3571 ,@(package-native-inputs python-numpy)))
3572 (arguments
3573 `(#:tests? #f ; we're only generating the documentation
3574 #:phases
3575 (modify-phases %standard-phases
3576 (delete 'build)
3577 (replace 'install
3578 (lambda* (#:key inputs outputs #:allow-other-keys)
3579 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3580 (doc (string-append
3581 data "/doc/" ,name "-"
3582 ,(package-version python-numpy)))
3583 (info-reader (string-append data "/info"))
3584 (html (string-append doc "/html"))
3585 (scipy-sphinx-theme "scipy-sphinx-theme")
3586 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3587 (pyver ,(string-append "PYVER=")))
3588
3589 ;; FIXME: this is needed to for texlive-union to generate
3590 ;; fonts, which are not found.
3591 (setenv "HOME" "/tmp")
3592
3593 (with-directory-excursion "doc"
3594 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3595 (mkdir-p html)
4fc898da
RW
3596 (invoke "make" "html" pyver)
3597 (invoke "make" "latex" "PAPER=a4" pyver)
3598 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3599 "all-pdf" "PAPER=a4" pyver)
3600 ;; FIXME: Generation of the info file fails.
4fc898da 3601 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3602 ;; (mkdir-p info)
3603 ;; (copy-file "build/texinfo/numpy.info"
3604 ;; (string-append info "/numpy.info"))
3605 (for-each (lambda (file)
3606 (copy-file (string-append "build/latex" file)
3607 (string-append doc file)))
3608 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3609 (with-directory-excursion "build/html"
3610 (for-each (lambda (file)
3611 (let* ((dir (dirname file))
3612 (tgt-dir (string-append html "/" dir)))
3613 (unless (equal? "." dir)
3614 (mkdir-p tgt-dir))
3615 (install-file file html)))
3616 (find-files "." ".*")))))
3617 #t)))))
3618 (home-page (package-home-page python-numpy))
3619 (synopsis "Documentation for the python-numpy package")
3620 (description (package-description python-numpy))
3621 (license (package-license python-numpy))))
3622
3623(define-public python2-numpy-documentation
3624 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3625 (package
3626 (inherit numpy-documentation)
3627 (native-inputs `(("python2-functools32" ,python2-functools32)
3628 ,@(package-native-inputs numpy-documentation))))))
3629
3630(define-public python-pygit2
3631 (package
3632 (name "python-pygit2")
dac8b275 3633 (version "0.28.2")
44d10b1f
RW
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "pygit2" version))
3638 (sha256
dac8b275 3639 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3640 (build-system python-build-system)
3641 (arguments
c3ecab0d 3642 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3643 (propagated-inputs
3644 `(("python-six" ,python-six)
3645 ("python-cffi" ,python-cffi)
3646 ("libgit2" ,libgit2)
3647 ("python-tox" ,python-tox)))
3648 (native-inputs
3649 `(("python-pytest" ,python-pytest)))
3650 (home-page "https://github.com/libgit2/pygit2")
3651 (synopsis "Python bindings for libgit2")
3652 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3653library, libgit2 implements Git plumbing.")
3654 ;; GPL2.0 only, with linking exception.
3655 (license license:gpl2)))
3656
3657(define-public python2-pygit2
3658 (package-with-python2 python-pygit2))
3659
3660(define-public python-pyparsing
3661 (package
3662 (name "python-pyparsing")
6d3cff5a 3663 (version "2.3.1")
44d10b1f
RW
3664 (source
3665 (origin
3666 (method url-fetch)
3667 (uri (pypi-uri "pyparsing" version))
3668 (sha256
6d3cff5a 3669 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3670 (build-system python-build-system)
3671 (outputs '("out" "doc"))
3672 (arguments
3673 `(#:tests? #f ; no test target
3674 #:phases
3675 (modify-phases %standard-phases
3676 (add-after 'install 'install-doc
3677 (lambda* (#:key outputs #:allow-other-keys)
3678 (let* ((doc (string-append (assoc-ref outputs "doc")
3679 "/share/doc/" ,name "-" ,version))
3680 (html-doc (string-append doc "/html"))
3681 (examples (string-append doc "/examples")))
3682 (mkdir-p html-doc)
3683 (mkdir-p examples)
3684 (for-each
3685 (lambda (dir tgt)
3686 (map (lambda (file)
3687 (install-file file tgt))
3688 (find-files dir ".*")))
3689 (list "docs" "htmldoc" "examples")
3690 (list doc html-doc examples))
3691 #t))))))
3692 (home-page "https://github.com/pyparsing/pyparsing")
3693 (synopsis "Python parsing class library")
3694 (description
3695 "The pyparsing module is an alternative approach to creating and
3696executing simple grammars, vs. the traditional lex/yacc approach, or the use
3697of regular expressions. The pyparsing module provides a library of classes
3698that client code uses to construct the grammar directly in Python code.")
3699 (license license:expat)))
3700
3701(define-public python2-pyparsing
3702 (package-with-python2 python-pyparsing))
3703
3704(define-public python-numpydoc
3705 (package
3706 (name "python-numpydoc")
3707 (version "0.8.0")
3708 (source
3709 (origin
3710 (method url-fetch)
3711 (uri (pypi-uri "numpydoc" version))
3712 (sha256
3713 (base32
3714 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3715 (build-system python-build-system)
3716 (propagated-inputs
3717 `(("python-sphinx" ,python-sphinx)))
3718 (native-inputs
3719 `(("python-nose" ,python-nose)))
3720 (home-page "https://pypi.python.org/pypi/numpydoc")
3721 (synopsis
3722 "Numpy's Sphinx extensions")
3723 (description
3724 "Sphinx extension to support docstrings in Numpy format.")
3725 (license license:bsd-2)))
3726
3727(define-public python2-numpydoc
3728 (package-with-python2 python-numpydoc))
3729
3730(define-public python-numexpr
3731 (package
3732 (name "python-numexpr")
3733 (version "2.6.5")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "numexpr" version))
3738 (sha256
3739 (base32
3740 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3741 (build-system python-build-system)
3742 (arguments `(#:tests? #f)) ; no tests included
3743 (propagated-inputs
3744 `(("python-numpy" ,python-numpy)))
3745 (home-page "https://github.com/pydata/numexpr")
3746 (synopsis "Fast numerical expression evaluator for NumPy")
3747 (description
3748 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3749expressions that operate on arrays are accelerated and use less memory than
3750doing the same calculation in Python. In addition, its multi-threaded
3751capabilities can make use of all your cores, which may accelerate
3752computations, most specially if they are not memory-bounded (e.g. those using
3753transcendental functions).")
3754 (license license:expat)))
3755
3756(define-public python2-numexpr
3757 (package-with-python2 python-numexpr))
3758
3759(define-public python-cycler
3760 (package
3761 (name "python-cycler")
3762 (version "0.10.0")
3763 (source (origin
3764 (method url-fetch)
3765 (uri (pypi-uri "cycler" version))
3766 (sha256
3767 (base32
3768 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3769 (build-system python-build-system)
3770 (arguments
3771 ;; XXX: The current version requires 'coveralls' which we don't have.
3772 ;; Enable this for the next release which uses 'python-pytest'.
3773 '(#:tests? #f))
3774 (propagated-inputs
3775 `(("python-six" ,python-six)))
3776 (home-page "http://matplotlib.org/cycler/")
3777 (synopsis "Composable keyword argument iterator")
3778 (description
3779 "When using @code{matplotlib} and plotting more than one line, it is
3780common to want to be able to want to be able to cycle over one or more artist
3781styles; but the plotting logic can quickly become involved.
3782To address this and enable easy cycling over arbitrary @code{kwargs}, the
3783@code{Cycler} class was developed.")
3784 (license license:bsd-3)))
3785
3786(define-public python2-cycler
3787 (package-with-python2 python-cycler))
3788
3789(define-public python-colorspacious
3790 (package
3791 (name "python-colorspacious")
3792 (version "1.1.0")
3793 (source
dee92e65
TGR
3794 (origin
3795 (method git-fetch)
3796 (uri (git-reference
3797 (url "https://github.com/njsmith/colorspacious.git")
3798 (commit (string-append "v" version))))
3799 (file-name (git-file-name name version))
3800 (sha256
3801 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
44d10b1f
RW
3802 (build-system python-build-system)
3803 (propagated-inputs
3804 `(("python-numpy" ,python-numpy)))
3805 (native-inputs
3806 `(("python-nose" ,python-nose)))
3807 (arguments
3808 `(#:phases
3809 (modify-phases %standard-phases
3810 (replace 'check
3811 (lambda _
c988afda 3812 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3813 (home-page "https://github.com/njsmith/colorspacious")
3814 (synopsis "Python library for colorspace conversions")
3815 (description "@code{colorspacious} is a Python library that lets you
3816convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3817 (license license:expat)))
3818
3819(define-public python2-colorspacious
3820 (package-with-python2 python-colorspacious))
3821
3822(define-public python-matplotlib
3823 (package
3824 (name "python-matplotlib")
3825 (version "2.2.3")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "matplotlib" version))
3830 (sha256
3831 (base32
3832 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3833 (build-system python-build-system)
3834 (propagated-inputs ; the following packages are all needed at run time
3835 `(("python-cycler" ,python-cycler)
3836 ("python-kiwisolver" ,python-kiwisolver)
3837 ("python-pyparsing" ,python-pyparsing)
3838 ("python-pygobject" ,python-pygobject)
3839 ("gobject-introspection" ,gobject-introspection)
3840 ("python-tkinter" ,python "tk")
3841 ("python-dateutil" ,python-dateutil)
3842 ("python-numpy" ,python-numpy)
3843 ("python-pillow" ,python-pillow)
3844 ("python-pytz" ,python-pytz)
3845 ("python-six" ,python-six)
3846 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3847 ;; from 'gtk+') provides the required 'typelib' files used by
3848 ;; 'gobject-introspection'. The location of these files is set with the
3849 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3850 ;; is done automatically by a 'native-search-path' procedure. However,
3851 ;; at run-time the user must set this variable as follows:
3852 ;;
3853 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3854 ("gtk+" ,gtk+)
3855 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3856 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3857 ;; object. For this reason we need to import both libraries.
3858 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3859 ("python-pycairo" ,python-pycairo)
3860 ;; XXX: qtwebkit cannot be built reliably.
3861 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3862 ("python-cairocffi" ,python-cairocffi)))
3863 (inputs
3864 `(("libpng" ,libpng)
3865 ("imagemagick" ,imagemagick)
3866 ("freetype" ,freetype)
3867 ("cairo" ,cairo)
3868 ("glib" ,glib)
3869 ;; FIXME: Add backends when available.
3870 ;("python-wxpython" ,python-wxpython)
3871 ("tcl" ,tcl)
3872 ("tk" ,tk)))
3873 (native-inputs
3874 `(("pkg-config" ,pkg-config)
3875 ("python-nose" ,python-nose)
3876 ("python-mock" ,python-mock)))
3877 (arguments
3878 `(#:phases
3879 (modify-phases %standard-phases
3880 (add-before 'build 'configure-environment
3881 (lambda* (#:key outputs inputs #:allow-other-keys)
3882 (let ((cairo (assoc-ref inputs "cairo"))
3883 (gtk+ (assoc-ref inputs "gtk+")))
3884 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3885 ;; has not effect.
3886 (setenv "LD_LIBRARY_PATH"
3887 (string-append cairo "/lib:" gtk+ "/lib"))
3888 (setenv "HOME" (getcwd))
3889 (call-with-output-file "setup.cfg"
3890 (lambda (port)
3891 (format port "[directories]~%
3892basedirlist = ~a,~a~%
3893 [rc_options]~%
3894backend = TkAgg~%"
3895 (assoc-ref inputs "tcl")
3896 (assoc-ref inputs "tk")))))
3897 #t)))))
3898 (home-page "http://matplotlib.org")
3899 (synopsis "2D plotting library for Python")
3900 (description
3901 "Matplotlib is a Python 2D plotting library which produces publication
3902quality figures in a variety of hardcopy formats and interactive environments
3903across platforms. Matplotlib can be used in Python scripts, the python and
3904ipython shell, web application servers, and six graphical user interface
3905toolkits.")
3906 (license license:psfl)
3907 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3908
3909(define-public python2-matplotlib
3910 (let ((matplotlib (package-with-python2
3911 (strip-python2-variant python-matplotlib))))
3912 (package (inherit matplotlib)
3913 ;; Make sure to use special packages for Python 2 instead
3914 ;; of those automatically rewritten by package-with-python2.
3915 (propagated-inputs
3916 `(("python2-pycairo" ,python2-pycairo)
3917 ("python2-backports-functools-lru-cache"
3918 ,python2-backports-functools-lru-cache)
3919 ("python2-functools32" ,python2-functools32)
3920 ("python2-pygobject-2" ,python2-pygobject-2)
3921 ("python2-subprocess32" ,python2-subprocess32)
3922 ("python2-tkinter" ,python-2 "tk")
3923 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3924 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3925
3926(define-public python-matplotlib-documentation
3927 (package
3928 (name "python-matplotlib-documentation")
3929 (version (package-version python-matplotlib))
3930 (source (package-source python-matplotlib))
3931 (build-system python-build-system)
3932 (native-inputs
3933 `(("python-matplotlib" ,python-matplotlib)
3934 ("python-colorspacious" ,python-colorspacious)
3935 ("python-sphinx" ,python-sphinx)
3936 ("python-sphinx-gallery" ,python-sphinx-gallery)
3937 ("python-numpydoc" ,python-numpydoc)
3938 ("python-ipython" ,python-ipython)
e7a53914 3939 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3940 ("python-mock" ,python-mock)
3941 ("graphviz" ,graphviz)
e7a53914
RW
3942 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3943 texlive-latex-amsmath
3944 texlive-latex-enumitem
3945 texlive-latex-expdlist
3946 texlive-latex-geometry
3947 texlive-latex-preview
3948 texlive-latex-type1cm
3949 texlive-latex-ucs
3950
3951 texlive-generic-pdftex
3952
3953 texlive-fonts-amsfonts
3954 texlive-fonts-ec
3955 texlive-fonts-adobe-times
3956 texlive-fonts-txfonts)))
44d10b1f
RW
3957 ("texinfo" ,texinfo)
3958 ,@(package-native-inputs python-matplotlib)))
3959 (arguments
3960 `(#:tests? #f ; we're only generating documentation
3961 #:phases
3962 (modify-phases %standard-phases
3963 (replace 'build
3964 (lambda _
3965 (chdir "doc")
e7a53914
RW
3966 (setenv "PYTHONPATH"
3967 (string-append (getenv "PYTHONPATH")
3968 ":" (getcwd) "/../examples/units"))
44d10b1f 3969 (substitute* "conf.py"
e7a53914
RW
3970 ;; Don't use git.
3971 (("^SHA = check_output.*")
3972 (string-append "SHA = \"" ,version "\"\n"))
3973 ;; Don't fetch intersphinx files from the Internet
3974 (("^explicit_order_folders" m)
3975 (string-append "intersphinx_mapping = {}\n" m))
3976 (("'sphinx.ext.intersphinx',") "")
3977 ;; Disable URL embedding which requires internet access.
3978 (("'https://docs.scipy.org/doc/numpy'") "None")
3979 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3980 (invoke "make"
3981 "SPHINXBUILD=sphinx-build"
3982 "SPHINXOPTS=" ; don't abort on warnings
3983 "html" "texinfo")))
44d10b1f
RW
3984 (replace 'install
3985 (lambda* (#:key inputs outputs #:allow-other-keys)
3986 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3987 (doc (string-append data "/doc/python-matplotlib-" ,version))
3988 (info (string-append data "/info"))
3989 (html (string-append doc "/html")))
3990 (mkdir-p html)
3991 (mkdir-p info)
3992 (copy-recursively "build/html" html)
3993 (symlink (string-append html "/_images")
3994 (string-append info "/matplotlib-figures"))
3995 (with-directory-excursion "build/texinfo"
3996 (substitute* "matplotlib.texi"
3997 (("@image\\{([^,]*)" all file)
3998 (string-append "@image{matplotlib-figures/" file)))
3999 (symlink (string-append html "/_images")
4000 "./matplotlib-figures")
e7a53914
RW
4001 (invoke "makeinfo" "--no-split"
4002 "-o" "matplotlib.info" "matplotlib.texi"))
4003 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4004 #t)))))
4005 (home-page (package-home-page python-matplotlib))
4006 (synopsis "Documentation for the python-matplotlib package")
4007 (description (package-description python-matplotlib))
4008 (license (package-license python-matplotlib))))
4009
4010(define-public python2-matplotlib-documentation
4011 (package-with-python2 python-matplotlib-documentation))
4012
55dae98f
RW
4013(define-public python-matplotlib-venn
4014 (package
4015 (name "python-matplotlib-venn")
4016 (version "0.11.5")
4017 (source
4018 (origin
4019 (method url-fetch)
4020 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4021 (sha256
4022 (base32
4023 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4024 (build-system python-build-system)
4025 (arguments '(#:tests? #f)) ; tests are not included
4026 (propagated-inputs
4027 `(("python-matplotlib" ,python-matplotlib)
4028 ("python-numpy" ,python-numpy)
4029 ("python-scipy" ,python-scipy)))
4030 (native-inputs
4031 `(("unzip" ,unzip)))
4032 (home-page "https://github.com/konstantint/matplotlib-venn")
4033 (synopsis "Plot area-proportional Venn diagrams")
4034 (description
4035 "This package provides tools for plotting area-proportional two- and
4036three-way Venn diagrams in @code{matplotlib}.")
4037 (license license:expat)))
4038
44d10b1f
RW
4039(define-public python2-pysnptools
4040 (package
4041 (name "python2-pysnptools")
5d1ade85 4042 (version "0.3.13")
44d10b1f
RW
4043 (source
4044 (origin
4045 (method url-fetch)
5d1ade85 4046 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4047 (sha256
4048 (base32
5d1ade85 4049 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4050 (build-system python-build-system)
4051 (arguments
5d1ade85
RW
4052 `(#:python ,python-2 ; only Python 2.7 is supported
4053 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4054 (propagated-inputs
4055 `(("python2-numpy" ,python2-numpy)
4056 ("python2-scipy" ,python2-scipy)
4057 ("python2-pandas" ,python2-pandas)))
44d10b1f 4058 (native-inputs
5d1ade85 4059 `(("python2-cython" ,python2-cython)))
1b66989b 4060 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4061 (synopsis "Library for reading and manipulating genetic data")
4062 (description
4063 "PySnpTools is a library for reading and manipulating genetic data. It
4064can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4065those files. It can also efficiently manipulate ranges of integers using set
4066operators such as union, intersection, and difference.")
4067 (license license:asl2.0)))
4068
4069(define-public python-scipy
4070 (package
4071 (name "python-scipy")
5cfc1632 4072 (version "1.2.2")
44d10b1f
RW
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "scipy" version))
4077 (sha256
4078 (base32
5cfc1632 4079 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
44d10b1f
RW
4080 (build-system python-build-system)
4081 (propagated-inputs
4082 `(("python-numpy" ,python-numpy)
4083 ("python-matplotlib" ,python-matplotlib)
4084 ("python-pyparsing" ,python-pyparsing)))
4085 (inputs
4086 `(("lapack" ,lapack)
4087 ("openblas" ,openblas)))
4088 (native-inputs
4089 `(("python-cython" ,python-cython)
4090 ("python-pytest" ,python-pytest)
4091 ("python-sphinx" ,python-sphinx)
4092 ("python-numpydoc" ,python-numpydoc)
4093 ("gfortran" ,gfortran)
4094 ("perl" ,perl)
4095 ("which" ,which)))
4096 (outputs '("out" "doc"))
4097 (arguments
4098 `(#:phases
4099 (modify-phases %standard-phases
4100 (add-after 'unpack 'disable-broken-tests
4101 (lambda _
4102 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4103 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4104 (string-append indent
4105 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4106 m)))
4107 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4108 (("^def test_parallel_threads\\(\\):" m)
4109 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4110 m)))
4111 #t))
4112 (add-before 'build 'configure-openblas
4113 (lambda* (#:key inputs #:allow-other-keys)
4114 (call-with-output-file "site.cfg"
4115 (lambda (port)
4116 (format port
4117 "[blas]
4118libraries = openblas
4119library_dirs = ~a/lib
4120include_dirs = ~a/include
4121
4122# backslash-n to make emacs happy
4123\n[atlas]
4124library_dirs = ~a/lib
4125atlas_libs = openblas
4126"
4127 (assoc-ref inputs "openblas")
4128 (assoc-ref inputs "openblas")
4129 (assoc-ref inputs "openblas"))))
4130 #t))
4131 (add-after 'install 'install-doc
4132 (lambda* (#:key inputs outputs #:allow-other-keys)
4133 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4134 (doc (string-append data "/doc/" ,name "-" ,version))
4135 (html (string-append doc "/html"))
4136 (pyver ,(string-append "PYVER=" (version-major+minor
4137 (package-version python))))
4138 ;; By default it tries to run sphinx-build through the Python
4139 ;; interpreter which won't work with our shell wrapper.
4140 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4141 ;; Make installed package available for building the
4142 ;; documentation
4143 (add-installed-pythonpath inputs outputs)
4144 (with-directory-excursion "doc"
4145 ;; Fix generation of images for mathematical expressions.
4146 (substitute* (find-files "source" "conf\\.py")
4147 (("pngmath_use_preview = True")
4148 "pngmath_use_preview = False"))
4149 (mkdir-p html)
4150 (invoke "make" "html" pyver sphinxbuild)
4151 (with-directory-excursion "build/html"
4152 (for-each (lambda (file)
4153 (let* ((dir (dirname file))
4154 (tgt-dir (string-append html "/" dir)))
4155 (install-file file html)))
4156 (find-files "." ".*")))))
4157 #t))
4158 ;; Tests can only be run after the library has been installed and not
4159 ;; within the source directory.
4160 (delete 'check)
4161 (add-after 'install 'check
4162 (lambda* (#:key inputs outputs #:allow-other-keys)
4163 (add-installed-pythonpath inputs outputs)
4164 (with-directory-excursion "/tmp"
4165 (invoke "python" "-c"
4166 "import scipy; scipy.test(verbose=2)")))))))
4167 (home-page "https://www.scipy.org/")
4168 (synopsis "The Scipy library provides efficient numerical routines")
4169 (description "The SciPy library is one of the core packages that make up
4170the SciPy stack. It provides many user-friendly and efficient numerical
4171routines such as routines for numerical integration and optimization.")
4172 (properties `((python2-variant . ,(delay python2-scipy))))
4173 (license license:bsd-3)))
4174
4175(define-public python2-scipy
4176 (package-with-python2
4177 (strip-python2-variant python-scipy)))
4178
4179(define-public python-socksipy-branch
4180 (package
4181 (name "python-socksipy-branch")
4182 (version "1.01")
4183 (source
4184 (origin
4185 (method url-fetch)
4186 (uri (pypi-uri "SocksiPy-branch" version))
4187 (sha256
4188 (base32
4189 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4190 (build-system python-build-system)
4191 (arguments
4192 `(#:tests? #f)) ; There are no tests
4193 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4194 (synopsis "Python SOCKS module")
4195 (description
4196 "SocksiPy - A Python SOCKS client module. It provides a
4197socket-like interface that supports connections to any TCP
4198service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4199The original version was developed by Dan Haim, this is a
4200branch created by Mario Vilas to address some open issues,
4201as the original project seems to have been abandoned circa 2007.")
4202 (license license:bsd-3)))
4203
4204(define-public python2-socksipy-branch
4205 (package-with-python2 python-socksipy-branch))
4206
4207(define-public python-pycodestyle
4208 (package
4209 (name "python-pycodestyle")
d16ef28b 4210 (version "2.5.0")
44d10b1f 4211 (source
ba88eea2
RW
4212 (origin
4213 (method url-fetch)
4214 (uri (pypi-uri "pycodestyle" version))
4215 (sha256
4216 (base32
d16ef28b 4217 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4218 (build-system python-build-system)
4219 (home-page "https://pycodestyle.readthedocs.io/")
4220 (synopsis "Python style guide checker")
4221 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4222Python code against some of the style conventions in
4223@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4224 (license license:expat)))
4225
4226(define-public python2-pycodestyle
4227 (package-with-python2 python-pycodestyle))
4228
4229(define-public python-multidict
4230 (package
4231 (name "python-multidict")
4232 (version "4.2.0")
4233 (source
4234 (origin
4235 (method url-fetch)
4236 (uri (pypi-uri "multidict" version))
4237 (sha256
4238 (base32
4239 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4240 (build-system python-build-system)
4241 (native-inputs
4242 `(("python-pytest" ,python-pytest)
4243 ("python-pytest-runner" ,python-pytest-runner)))
4244 (home-page "https://github.com/aio-libs/multidict/")
4245 (synopsis "Multidict implementation")
4246 (description "Multidict is dict-like collection of key-value pairs
4247where key might be occurred more than once in the container.")
4248 (license license:asl2.0)))
4249
4250(define-public python-orderedmultidict
4251 (package
4252 (name "python-orderedmultidict")
4253 (version "0.7.11")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "orderedmultidict" version))
4258 (sha256
4259 (base32
4260 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4261 (build-system python-build-system)
4262 (arguments
4263 `(#:phases
4264 (modify-phases %standard-phases
4265 (add-after 'unpack 'fix-tests
4266 (lambda _
4267 ;; The package uses nosetest for running the tests.
4268 ;; Adding this initfile allows to run the test suite
4269 ;; without requiring nosetest.
d1c4f329
RW
4270 (with-output-to-file "tests/__init__.py" newline)
4271 #t)))))
44d10b1f
RW
4272 (propagated-inputs
4273 `(("python-six" ,python-six)))
4274 (native-inputs
4275 `(("python-pycodestyle" ,python-pycodestyle)))
4276 (home-page "https://github.com/gruns/orderedmultidict")
4277 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4278 (description "This package contains a library for ordered multivalue
4279dictionaries. A multivalue dictionary is a dictionary that can store
4280multiple values for the same key. An ordered multivalue dictionary is a
4281multivalue dictionary that retains the order of insertions and deletions.")
4282 (license license:unlicense)))
4283
4284(define-public python2-orderedmultidict
4285 (package-with-python2 python-orderedmultidict))
4286
4287(define-public python-autopep8
4288 (package
4289 (name "python-autopep8")
4290 (version "1.3.5")
4291 (source
4292 (origin
4293 (method url-fetch)
4294 (uri (pypi-uri "autopep8" version))
4295 (sha256
4296 (base32
4297 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4298 (build-system python-build-system)
4299 (propagated-inputs
4300 `(("python-pycodestyle" ,python-pycodestyle)))
4301 (home-page "https://github.com/hhatto/autopep8")
4302 (synopsis "Format Python code according to the PEP 8 style guide")
4303 (description
4304 "@code{autopep8} automatically formats Python code to conform to
4305the PEP 8 style guide. It uses the pycodestyle utility to determine
4306what parts of the code needs to be formatted. @code{autopep8} is
4307capable of fixing most of the formatting issues that can be reported
4308by pycodestyle.")
4309 (license (license:non-copyleft
4310 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4311
4312(define-public python2-autopep8
4313 (package-with-python2 python-autopep8))
4314
4315(define-public python-distutils-extra
4316 (package
4317 (name "python-distutils-extra")
4318 (version "2.38")
4319 (source
4320 (origin
4321 (method url-fetch)
4322 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4323 version "/+download/python-distutils-extra-"
4324 version ".tar.gz"))
4325 (sha256
4326 (base32
4327 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4328 (build-system python-build-system)
4329 (home-page "https://launchpad.net/python-distutils-extra/")
4330 (synopsis "Enhancements to Python's distutils")
4331 (description
4332 "The python-distutils-extra module enables you to easily integrate
4333gettext support, themed icons, and scrollkeeper-based documentation into
4334Python's distutils.")
4335 (license license:gpl2)))
4336
4337(define-public python2-distutils-extra
4338 (package-with-python2 python-distutils-extra))
4339
4340(define-public python2-elib.intl
4341 (package
4342 (name "python2-elib.intl")
4343 (version "0.0.3")
4344 (source
4345 (origin
4346 ;; This project doesn't tag releases or publish tarballs, so we take
4347 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4348 (method git-fetch)
4349 (uri (git-reference
4350 (url "https://github.com/dieterv/elib.intl.git")
4351 (commit "d09997cfef")))
4352 (file-name (string-append name "-" version "-checkout"))
4353 (sha256
4354 (base32
4355 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4356 (build-system python-build-system)
4357 (arguments
4358 ;; incompatible with Python 3 (exception syntax)
4359 `(#:python ,python-2
4360 #:tests? #f))
4361 (home-page "https://github.com/dieterv/elib.intl")
4362 (synopsis "Enhanced internationalization for Python")
4363 (description
4364 "The elib.intl module provides enhanced internationalization (I18N)
4365services for your Python modules and applications.")
4366 (license license:lgpl3+)))
4367
4368(define-public python-olefile
4369 (package
4370 (name "python-olefile")
5bef0f10 4371 (version "0.46")
44d10b1f
RW
4372 (source
4373 (origin
4374 (method url-fetch)
5bef0f10
MB
4375 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4376 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4377 (file-name (string-append name "-" version ".tar.gz"))
4378 (sha256
4379 (base32
5bef0f10 4380 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4381 (build-system python-build-system)
5bef0f10 4382 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4383 (synopsis "Read and write Microsoft OLE2 files.")
4384 (description
4385 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4386Storage or Compound Document, Microsoft Office). It is an improved version of
4387the OleFileIO module from PIL, the Python Image Library.")
4388 (license license:bsd-3)))
4389
4390(define-public python2-olefile
4391 (package-with-python2 python-olefile))
4392
4393(define-public python-pillow
4394 (package
4395 (name "python-pillow")
0c6de725 4396 (version "6.1.0")
44d10b1f
RW
4397 (source
4398 (origin
4399 (method url-fetch)
4400 (uri (pypi-uri "Pillow" version))
4401 (sha256
4402 (base32
0c6de725 4403 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4404 (build-system python-build-system)
4405 (native-inputs
4406 `(("python-pytest" ,python-pytest)))
4407 (inputs
4408 `(("freetype" ,freetype)
4409 ("lcms" ,lcms)
4410 ("zlib" ,zlib)
4411 ("libjpeg" ,libjpeg)
4412 ("openjpeg" ,openjpeg)
4413 ("libtiff" ,libtiff)
4414 ("libwebp" ,libwebp)))
4415 (propagated-inputs
4416 `(("python-olefile" ,python-olefile)))
4417 (arguments
4418 `(#:phases
4419 (modify-phases %standard-phases
4420 (add-after 'unpack 'patch-ldconfig
4421 (lambda _
4422 (substitute* "setup.py"
4423 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4424 (delete 'check) ; We must run checks after python-pillow is installed.
4425 (add-after 'install 'check-installed
4426 (lambda* (#:key outputs inputs #:allow-other-keys)
4427 (begin
4428 (setenv "HOME" (getcwd))
4429 ;; Make installed package available for running the tests.
4430 (add-installed-pythonpath inputs outputs)
4431 (invoke "python" "selftest.py" "--installed")
4432 (invoke "python" "-m" "pytest" "-vv")))))))
4433 (home-page "https://python-pillow.org")
4434 (synopsis "Fork of the Python Imaging Library")
4435 (description
4436 "The Python Imaging Library adds image processing capabilities to your
4437Python interpreter. This library provides extensive file format support, an
4438efficient internal representation, and fairly powerful image processing
4439capabilities. The core image library is designed for fast access to data
4440stored in a few basic pixel formats. It should provide a solid foundation for
4441a general image processing tool.")
4442 (license (license:x11-style
4443 "http://www.pythonware.com/products/pil/license.htm"
4444 "The PIL Software License"))))
4445
4446(define-public python2-pillow
4447 (package-with-python2 python-pillow))
4448
4449(define-public python-pycparser
4450 (package
4451 (name "python-pycparser")
c6c0940e 4452 (version "2.19")
44d10b1f
RW
4453 (source
4454 (origin
4455 (method url-fetch)
4456 (uri (pypi-uri "pycparser" version))
4457 (sha256
4458 (base32
c6c0940e 4459 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4460 (outputs '("out" "doc"))
4461 (build-system python-build-system)
4462 (native-inputs
4463 `(("pkg-config" ,pkg-config)))
4464 (arguments
4465 `(#:phases
4466 (modify-phases %standard-phases
4467 (replace 'check
4468 (lambda _
4469 (with-directory-excursion "tests"
acb75c03
RW
4470 (invoke "python" "all_tests.py"))
4471 #t))
44d10b1f
RW
4472 (add-after 'install 'install-doc
4473 (lambda* (#:key outputs #:allow-other-keys)
4474 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4475 (doc (string-append data "/doc/" ,name "-" ,version))
4476 (examples (string-append doc "/examples")))
4477 (mkdir-p examples)
4478 (for-each (lambda (file)
4479 (copy-file (string-append "." file)
4480 (string-append doc file)))
4481 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4482 (copy-recursively "examples" examples)
4483 #t))))))
44d10b1f
RW
4484 (home-page "https://github.com/eliben/pycparser")
4485 (synopsis "C parser in Python")
4486 (description
4487 "Pycparser is a complete parser of the C language, written in pure Python
4488using the PLY parsing library. It parses C code into an AST and can serve as
4489a front-end for C compilers or analysis tools.")
4490 (license license:bsd-3)))
4491
4492(define-public python2-pycparser
4493 (package-with-python2 python-pycparser))
4494
4495(define-public python-pywavelets
4496 (package
4497 (name "python-pywavelets")
4498 (version "1.0.1")
4499 (home-page "https://github.com/PyWavelets/pywt")
4500 (source (origin
4501 (method url-fetch)
4502 (uri (pypi-uri "PyWavelets" version))
4503 (sha256
4504 (base32
4505 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4506 (build-system python-build-system)
4507 (arguments
4508 '(#:modules ((ice-9 ftw)
4509 (srfi srfi-1)
4510 (srfi srfi-26)
4511 (guix build utils)
4512 (guix build python-build-system))
4513 #:phases (modify-phases %standard-phases
4514 (replace 'check
4515 (lambda _
4516 (let ((cwd (getcwd))
4517 (libdir (find (cut string-prefix? "lib." <>)
4518 (scandir "build"))))
4519 (with-directory-excursion (string-append cwd "/build/" libdir)
4520 (invoke "nosetests" "-v" "."))))))))
4521 (native-inputs
4522 `(("python-matplotlib" ,python-matplotlib) ;for tests
4523 ("python-nose" ,python-nose)))
4524 (propagated-inputs
4525 `(("python-numpy" ,python-numpy)))
4526 (synopsis "Wavelet transforms in Python")
4527 (description
4528 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4529mathematical basis functions that are localized in both time and frequency.
4530Wavelet transforms are time-frequency transforms employing wavelets. They are
4531similar to Fourier transforms, the difference being that Fourier transforms are
4532localized only in frequency instead of in time and frequency.")
4533 (license license:expat)))
4534
4535(define-public python2-pywavelets
4536 (package-with-python2 python-pywavelets))
4537
4538(define-public python-xcffib
4539 (package
4540 (name "python-xcffib")
4541 (version "0.6.0")
4542 (source
4543 (origin
4544 (method url-fetch)
4545 (uri (pypi-uri "xcffib" version))
4546 (sha256
4547 (base32
4548 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4549 (build-system python-build-system)
4550 (inputs
4551 `(("libxcb" ,libxcb)))
4552 (propagated-inputs
4553 `(("python-cffi" ,python-cffi) ; used at run time
4554 ("python-six" ,python-six)))
4555 (arguments
4556 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4557 #:tests? #f
4558 #:phases
4559 (modify-phases %standard-phases
4560 (add-after 'unpack 'fix-libxcb-path
4561 (lambda* (#:key inputs #:allow-other-keys)
4562 (let ((libxcb (assoc-ref inputs "libxcb")))
4563 (substitute* '("xcffib/__init__.py")
4564 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4565 #t)))
4566 (add-after 'install 'install-doc
4567 (lambda* (#:key outputs #:allow-other-keys)
4568 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4569 "/doc/" ,name "-" ,version)))
4570 (mkdir-p doc)
4571 (copy-file "README.md"
4572 (string-append doc "/README.md"))
4573 #t))))))
4574 (home-page "https://github.com/tych0/xcffib")
4575 (synopsis "XCB Python bindings")
4576 (description
4577 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4578support for Python 3 and PyPy. It is based on cffi.")
4579 (license license:expat)))
4580
4581(define-public python2-xcffib
4582 (package-with-python2 python-xcffib))
4583
4584(define-public python-cairocffi
4585 (package
4586 (name "python-cairocffi")
4587 (version "0.9.0")
4588 (source
4589 (origin
4590 (method url-fetch)
4591 (uri (pypi-uri "cairocffi" version))
4592 (sha256
4593 (base32
4594 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4595 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4596 (build-system python-build-system)
4597 (outputs '("out" "doc"))
4598 (inputs
4599 `(("glib" ,glib)
4600 ("gtk+" ,gtk+)
4601 ("gdk-pixbuf" ,gdk-pixbuf)
4602 ("cairo" ,cairo)
4603 ("pango" ,pango)))
4604 (native-inputs
4605 `(("pkg-config" ,pkg-config)
4606 ("python-pytest" ,python-pytest)
4607 ("python-pytest-cov" ,python-pytest-cov)
4608 ("python-pytest-runner" ,python-pytest-runner)
4609 ("python-sphinx" ,python-sphinx)
4610 ("python-docutils" ,python-docutils)))
4611 (propagated-inputs
4612 `(("python-xcffib" ,python-xcffib))) ; used at run time
4613 (arguments
4614 `(#:phases
4615 (modify-phases %standard-phases
4616 (add-after 'unpack 'patch-paths
4617 (lambda* (#:key inputs outputs #:allow-other-keys)
4618 (substitute* (find-files "." "\\.py$")
4619 (("dlopen\\(ffi, 'cairo'")
4620 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4621 "/lib/libcairo.so.2'"))
4622 (("dlopen\\(ffi, 'gdk-3'")
4623 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4624 "/lib/libgtk-3.so.0'"))
4625 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4626 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4627 "/lib/libgdk_pixbuf-2.0.so.0'"))
4628 (("dlopen\\(ffi, 'glib-2.0'")
4629 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4630 "/lib/libglib-2.0.so.0'"))
4631 (("dlopen\\(ffi, 'gobject-2.0'")
4632 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4633 "/lib/libgobject-2.0.so.0'"))
4634 (("dlopen\\(ffi, 'pangocairo-1.0'")
4635 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4636 "/lib/libpangocairo-1.0.so.0'"))
4637 (("dlopen\\(ffi, 'pango-1.0'")
4638 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4639 "/lib/libpango-1.0.so.0'")))
4640 #t))
4641 (add-after 'install 'install-doc
4642 (lambda* (#:key inputs outputs #:allow-other-keys)
4643 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4644 (doc (string-append data "/doc/" ,name "-" ,version))
4645 (html (string-append doc "/html")))
4646 (setenv "LD_LIBRARY_PATH"
4647 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4648 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4649 (setenv "LANG" "en_US.UTF-8")
4650 (mkdir-p html)
4651 (for-each (lambda (file)
4652 (copy-file (string-append "." file)
4653 (string-append doc file)))
4654 '("/README.rst" "/CHANGES" "/LICENSE"))
4655 (system* "python" "setup.py" "build_sphinx")
4656 (copy-recursively "docs/_build/html" html)
4657 #t))))))
4658 (home-page "https://github.com/Kozea/cairocffi")
4659 (synopsis "Python bindings and object-oriented API for Cairo")
4660 (description
4661 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4662Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4663graphics library with support for multiple backends including image buffers,
4664PNG, PostScript, PDF, and SVG file output.")
4665 (license license:bsd-3)))
4666
4667(define-public python2-cairocffi
4668 (package-with-python2 python-cairocffi))
4669
4670(define-public python-decorator
4671 (package
4672 (name "python-decorator")
4673 (version "4.3.0")
4674 (source
4675 (origin
4676 (method url-fetch)
4677 (uri (pypi-uri "decorator" version))
4678 (sha256
4679 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4680 (build-system python-build-system)
4681 (home-page "https://pypi.python.org/pypi/decorator/")
4682 (synopsis "Python module to simplify usage of decorators")
4683 (description
4684 "The aim of the decorator module is to simplify the usage of decorators
4685for the average programmer, and to popularize decorators usage giving examples
4686of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4687etc. The core of this module is a decorator factory.")
4688 (license license:expat)))
4689
4690(define-public python2-decorator
4691 (package-with-python2 python-decorator))
4692
4693(define-public python-drmaa
4694 (package
4695 (name "python-drmaa")
4696 (version "0.7.7")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (pypi-uri "drmaa" version))
4701 (sha256
4702 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4703 (build-system python-build-system)
4704 ;; The test suite requires libdrmaa which is provided by the cluster
4705 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4706 ;; should be set to the path of the libdrmaa library.
4707 (arguments '(#:tests? #f))
4708 (native-inputs
4709 `(("python-nose" ,python-nose)))
4710 (home-page "https://pypi.python.org/pypi/drmaa")
4711 (synopsis "Python bindings for the DRMAA library")
4712 (description
4713 "A Python package for Distributed Resource Management (DRM) job
4714submission and control. This package is an implementation of the DRMAA 1.0
4715Python language binding specification.")
4716 (license license:bsd-3)))
4717
4718(define-public python2-drmaa
4719 (package-with-python2 python-drmaa))
4720
4721(define-public python-grako
4722 (package
4723 (name "python-grako")
4724 (version "3.99.9")
4725 (source
4726 (origin
4727 (method url-fetch)
4728 (uri
4729 (pypi-uri "grako" version ".zip"))
4730 (sha256
4731 (base32
4732 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4733 (build-system python-build-system)
4734 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4735 (native-inputs
4736 `(("unzip" ,unzip)
4737 ("python-pytest" ,python-pytest)
4738 ("python-pytest-runner" ,python-pytest-runner)))
4739 (home-page "https://bitbucket.org/neogeny/grako")
4740 (synopsis "EBNF parser generator")
4741 (description
4742 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4743memoizing PEG/Packrat parser in Python.")
4744 (license license:bsd-3)))
4745
4746(define-public python2-grako
4747 (package-with-python2 python-grako))
4748
4749(define-public python-gridmap
4750 (package
4751 (name "python-gridmap")
4752 (version "0.13.0")
4753 (source
4754 (origin
768fea0f
TGR
4755 (method git-fetch)
4756 (uri (git-reference
4757 (url "https://github.com/pygridtools/gridmap.git")
4758 (commit (string-append "v" version))))
4759 (file-name (git-file-name name version))
44d10b1f 4760 (sha256
768fea0f 4761 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4762 (build-system python-build-system)
4763 (arguments
4764 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4765 (propagated-inputs
4766 `(("python-psutil" ,python-psutil)
4767 ("python-drmaa" ,python-drmaa)
4768 ("python-pyzmq" ,python-pyzmq)))
4769 (home-page "https://github.com/pygridtools/gridmap")
4770 (synopsis "Create jobs on a cluster directly from Python")
4771 (description
4772 "Gridmap is a Python package to allow you to easily create jobs on the
4773cluster directly from Python. You can directly map Python functions onto the
4774cluster without needing to write any wrapper code yourself.")
4775 (license license:gpl3+)))
4776
4777(define-public python2-gridmap
4778 (package-with-python2 python-gridmap))
4779
4780(define-public python-honcho
4781 (package
4782 (name "python-honcho")
4783 (version "1.0.1")
4784 (source
4785 (origin
8524d130
TGR
4786 (method git-fetch)
4787 (uri (git-reference
4788 (url "https://github.com/nickstenning/honcho.git")
4789 (commit (string-append "v" version))))
4790 (file-name (git-file-name name version))
44d10b1f 4791 (sha256
8524d130 4792 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4793 (build-system python-build-system)
4794 (native-inputs
4795 `(("python-pytest" ,python-pytest)
4796 ("python-mock" ,python-mock)
4797 ("python-tox" ,python-tox)
4798 ("which" ,which))) ;for tests
4799 (propagated-inputs
4800 `(("python-jinja2" ,python-jinja2)))
4801 (arguments
4802 `(#:phases
4803 (modify-phases %standard-phases
4804 (delete 'check)
4805 (add-after 'install 'check
4806 (lambda* (#:key outputs inputs #:allow-other-keys)
4807 ;; fix honcho path in testsuite
4808 (substitute* "tests/conftest.py"
4809 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4810 "/bin/honcho" "'")))
4811 ;; It's easier to run tests after install.
4812 ;; Make installed package available for running the tests
4813 (add-installed-pythonpath inputs outputs)
95b707fb 4814 (invoke "py.test" "-v"))))))
44d10b1f
RW
4815 (home-page "https://github.com/nickstenning/honcho")
4816 (synopsis "Manage Procfile-based applications")
4817 (description
4818 "A Procfile is a file which describes how to run an application
50fceab0 4819consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4820The output of all running processes is collected by honcho and
4821displayed.")
4822 (license license:expat)))
4823
4824(define-public python2-honcho
4825 (package-with-python2 python-honcho))
4826
4827(define-public python-pexpect
4828 (package
4829 (name "python-pexpect")
4830 (version "4.6.0")
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (pypi-uri "pexpect" version))
4835 (sha256
4836 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4837 (build-system python-build-system)
4838 (arguments
4839 `(#:phases
4840 (modify-phases %standard-phases
4841 (add-before 'check 'prepare-tests
4842 (lambda _
4843 (substitute* (find-files "tests")
4844 (("/bin/ls") (which "ls"))
4845 (("/bin/echo") (which "echo"))
4846 (("/bin/which") (which "which"))
4847 ;; Many tests try to use the /bin directory which
4848 ;; is not present in the build environment.
4849 ;; Use one that's non-empty and unlikely to change.
4850 (("/bin'") "/dev'"))
4851 ;; XXX: Socket connection test gets "Connection reset by peer".
4852 ;; Why does it not work? Delete for now.
4853 (delete-file "tests/test_socket.py")
4854 #t))
4855 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4856 (native-inputs
4857 `(("python-nose" ,python-nose)
4858 ("python-pytest" ,python-pytest)
4859 ("man-db" ,man-db)
4860 ("which" ,which)
4861 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4862 (propagated-inputs
4863 `(("python-ptyprocess" ,python-ptyprocess)))
4864 (home-page "http://pexpect.readthedocs.org/")
4865 (synopsis "Controlling interactive console applications")
4866 (description
4867 "Pexpect is a pure Python module for spawning child applications;
4868controlling them; and responding to expected patterns in their output.
4869Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4870child application and control it as if a human were typing commands.")
4871 (license license:isc)))
4872
4873(define-public python2-pexpect
4874 (package-with-python2 python-pexpect))
4875
4876(define-public python-setuptools-scm
4877 (package
4878 (name "python-setuptools-scm")
85092643 4879 (version "3.2.0")
44d10b1f
RW
4880 (source (origin
4881 (method url-fetch)
4882 (uri (pypi-uri "setuptools_scm" version))
4883 (sha256
4884 (base32
85092643 4885 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4886 (build-system python-build-system)
4887 (home-page "https://github.com/pypa/setuptools_scm/")
4888 (synopsis "Manage Python package versions in SCM metadata")
4889 (description
4890 "Setuptools_scm handles managing your Python package versions in
4891@dfn{software configuration management} (SCM) metadata instead of declaring
4892them as the version argument or in a SCM managed file.")
4893 (license license:expat)))
4894
4895(define-public python2-setuptools-scm
4896 (package-with-python2 python-setuptools-scm))
4897
bb74ea09
RW
4898(define-public python-pathlib2
4899 (package
4900 (name "python-pathlib2")
4901 (version "2.3.3")
4902 (source
4903 (origin
4904 (method url-fetch)
4905 (uri (pypi-uri "pathlib2" version))
4906 (sha256
4907 (base32
4908 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4909 (build-system python-build-system)
4910 (propagated-inputs
4911 `(("python-scandir" ,python-scandir)
4912 ("python-six" ,python-six)))
4913 (home-page "https://pypi.python.org/pypi/pathlib2/")
4914 (synopsis "Object-oriented filesystem paths")
4915 (description "The goal of pathlib2 is to provide a backport of the
4916standard @code{pathlib} module which tracks the standard library module, so
4917all the newest features of the standard @code{pathlib} can be used also on
4918older Python versions.")
4919 (license license:expat)))
4920
15b65617
RW
4921(define-public python-importlib-metadata
4922 (package
4923 (name "python-importlib-metadata")
4924 (version "0.18")
4925 (source
4926 (origin
4927 (method url-fetch)
4928 (uri (pypi-uri "importlib_metadata" version))
4929 (sha256
4930 (base32
4931 "1nqj6vj2z4byi8flzf2lbldhqgicsz9mkpv4k69kjd8p8qxy4vnb"))))
4932 (build-system python-build-system)
4933 (propagated-inputs
4934 `(("python-configparser" ,python-configparser)
4935 ("python-contextlib2" ,python-contextlib2)
4936 ("python-docutils" ,python-docutils)
4937 ("python-pathlib2" ,python-pathlib2)
4938 ("python-rst.linker" ,python-rst.linker)
4939 ("python-zipp" ,python-zipp)))
4940 (native-inputs
4941 `(("python-setuptools-scm" ,python-setuptools-scm)
4942 ("python-sphinx" ,python-sphinx)))
4943 (home-page "https://importlib-metadata.readthedocs.io/")
4944 (synopsis "Read metadata from Python packages")
4945 (description
4946 "@code{importlib_metadata} is a library which provides an API for
4947accessing an installed Python package's metadata, such as its entry points or
4948its top-level name. This functionality intends to replace most uses of
4949@code{pkg_resources} entry point API and metadata API. Along with
4950@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4951need to use the older and less efficient @code{pkg_resources} package.")
4952 (license license:asl2.0)))
4953
37c173d1
RW
4954(define-public python-jaraco-packaging
4955 (package
4956 (name "python-jaraco-packaging")
4957 (version "6.1")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "jaraco.packaging" version))
4962 (sha256
4963 (base32
4964 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4965 (build-system python-build-system)
4966 (propagated-inputs
4967 `(("python-pytest" ,python-pytest)
4968 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
4969 ("python-pytest-flake8" ,python-pytest-flake8)
4970 ("python-rst.linker" ,python-rst.linker)
4971 ("python-setuptools" ,python-setuptools)
4972 ("python-setuptools-scm" ,python-setuptools-scm)
4973 ("python-six" ,python-six)
4974 ("python-sphinx" ,python-sphinx)))
4975 (home-page "https://github.com/jaraco/jaraco.packaging")
4976 (synopsis "Tools to supplement packaging Python releases")
4977 (description
4978 "This package provides various tools to supplement packaging Python
4979releases.")
4980 (license license:expat)))
4981
44d10b1f
RW
4982(define-public python-pathpy
4983 (package
4984 (name "python-pathpy")
49ad11e9 4985 (version "11.5.0")
44d10b1f
RW
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (pypi-uri "path.py" version))
4990 (sha256
49ad11e9
RW
4991 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
4992 (outputs '("out" "doc"))
44d10b1f
RW
4993 (build-system python-build-system)
4994 (propagated-inputs
4995 `(("python-appdirs" ,python-appdirs)))
4996 (native-inputs
4997 `(("python-setuptools-scm" ,python-setuptools-scm)
4998 ("python-sphinx" ,python-sphinx)
4999 ("python-rst.linker" ,python-rst.linker)
5000 ("python-pytest" ,python-pytest)
49ad11e9
RW
5001 ("python-pytest-runner" ,python-pytest-runner)
5002 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5003 (arguments
49ad11e9
RW
5004 `(#:phases
5005 (modify-phases %standard-phases
5006 (add-after 'build 'build-doc
5007 (lambda _
5008 (setenv "LANG" "en_US.UTF-8")
5009 (invoke "python" "setup.py" "build_sphinx")))
5010 (add-after 'install 'install-doc
5011 (lambda* (#:key outputs #:allow-other-keys)
5012 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5013 (doc (string-append data "/doc/" ,name "-" ,version))
5014 (html (string-append doc "/html")))
5015 (mkdir-p html)
5016 (for-each (lambda (file)
5017 (copy-file file (string-append doc "/" file)))
5018 '("README.rst" "CHANGES.rst"))
5019 (copy-recursively "build/sphinx/html" html)
5020 #t)))
5021 (replace 'check
5022 (lambda _
5023 ;; The import time test aborts if an import takes longer than
5024 ;; 100ms. It may very well take a little longer than that.
5025 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5026 (home-page "https://github.com/jaraco/path.py")
5027 (synopsis "Python module wrapper for built-in os.path")
5028 (description
5029 "@code{path.py} implements path objects as first-class entities, allowing
5030common operations on files to be invoked on those path objects directly.")
5031 (license license:expat)))
5032
5033(define-public python2-pathpy
5034 (package-with-python2 python-pathpy))
5035
5036(define-public python-simplegeneric
5037 (package
5038 (name "python-simplegeneric")
5039 (version "0.8.1")
5040 (source
5041 (origin
5042 (method url-fetch)
6c8c3980 5043 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5044 (sha256
5045 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5046 (build-system python-build-system)
5047 (native-inputs
5048 `(("unzip" ,unzip)))
5049 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5050 (synopsis "Python module for simple generic functions")
5051 (description
5052 "The simplegeneric module lets you define simple single-dispatch generic
5053functions, akin to Python’s built-in generic functions like @code{len()},
5054@code{iter()} and so on. However, instead of using specially-named methods,
5055these generic functions use simple lookup tables, akin to those used by
5056e.g. @code{pickle.dump()} and other generic functions found in the Python
5057standard library.")
5058 (license license:zpl2.1)))
5059
5060(define-public python2-simplegeneric
5061 (package-with-python2 python-simplegeneric))
5062
5063(define-public python-ipython-genutils
5064 ;; TODO: This package is retired, check if can be removed, see description.
5065 (package
5066 (name "python-ipython-genutils")
5067 (version "0.1.0")
5068 (source
5069 (origin
5070 (method url-fetch)
c9671d4b 5071 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5072 (sha256
5073 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5074 (build-system python-build-system)
5075 (arguments `(#:tests? #f)) ; no tests
5076 (home-page "https://ipython.org")
5077 (synopsis "Vestigial utilities from IPython")
5078 (description
5079 "This package provides retired utilities from IPython. No packages
5080outside IPython/Jupyter should depend on it.
5081
5082This package shouldn't exist. It contains some common utilities shared by
5083Jupyter and IPython projects during The Big Split. As soon as possible, those
5084packages will remove their dependency on this, and this package will go
5085away.")
5086 (license license:bsd-3)))
5087
5088(define-public python2-ipython-genutils
5089 (package-with-python2 python-ipython-genutils))
5090
5091(define-public python-traitlets
5092 (package
5093 (name "python-traitlets")
5094 (version "4.3.2")
5095 (source
5096 (origin
5097 (method url-fetch)
5098 (uri (pypi-uri "traitlets" version))
5099 (sha256
5100 (base32
5101 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
5102 (build-system python-build-system)
5103 (arguments
5104 `(#:phases
5105 (modify-phases %standard-phases
5106 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5107 (propagated-inputs
5108 `(("python-ipython-genutils" ,python-ipython-genutils)
5109 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
5110 (native-inputs
5111 `(("python-pytest" ,python-pytest)))
5112 (properties `((python2-variant . ,(delay python2-traitlets))))
5113 (home-page "https://ipython.org")
5114 (synopsis "Configuration system for Python applications")
5115 (description
5116 "Traitlets is a framework that lets Python classes have attributes with
5117type checking, dynamically calculated default values, and ‘on change’
5118callbacks. The package also includes a mechanism to use traitlets for
5119configuration, loading values from files or from command line arguments. This
5120is a distinct layer on top of traitlets, so you can use traitlets in your code
5121without using the configuration machinery.")
5122 (license license:bsd-3)))
5123
5124(define-public python2-traitlets
5125 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5126 (package
5127 (inherit traitlets)
5128 (propagated-inputs
5129 `(("python2-enum34" ,python2-enum34)
5130 ,@(package-propagated-inputs traitlets))))))
5131
5132(define-public python-jupyter-core
5133 (package
5134 (name "python-jupyter-core")
5135 (version "4.4.0")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (string-append (pypi-uri "jupyter_core" version)))
5140 (sha256
5141 (base32
5142 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5143 (build-system python-build-system)
5144 ;; FIXME: not sure how to run the tests
5145 (arguments `(#:tests? #f))
5146 (propagated-inputs
5147 `(("python-traitlets" ,python-traitlets)))
5148 (home-page "http://jupyter.org/")
5149 (synopsis "Jupyter base package")
5150 (description
5151 "Jupyter core is the base package on which Jupyter projects rely.")
5152 (license license:bsd-3)))
5153
5154(define-public python2-jupyter-core
5155 (package-with-python2 python-jupyter-core))
5156
5157(define-public python-jupyter-client
5158 (package
5159 (name "python-jupyter-client")
5160 (version "5.2.4")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "jupyter_client" version))
5165 (sha256
5166 (base32
5167 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5168 (build-system python-build-system)
5169 ;; Tests fail because of missing native python kernel which I assume is
5170 ;; provided by the ipython package, which we cannot use because it would
5171 ;; cause a dependency cycle.
5172 (arguments `(#:tests? #f))
5173 (propagated-inputs
5174 `(("python-pyzmq" ,python-pyzmq)
5175 ("python-traitlets" ,python-traitlets)
5176 ("python-jupyter-core" ,python-jupyter-core)))
5177 (home-page "http://jupyter.org/")
5178 (synopsis "Jupyter protocol implementation and client libraries")
5179 (description
5180 "The @code{jupyter_client} package contains the reference implementation
5181of the Jupyter protocol. It also provides client and kernel management APIs
5182for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5183installing @code{kernelspec}s for use with Jupyter frontends.")
5184 (license license:bsd-3)))
5185
5186(define-public python2-jupyter-client
5187 (package-with-python2 python-jupyter-client))
5188
5189(define-public python-ipykernel
5190 (package
5191 (name "python-ipykernel")
82110dea 5192 (version "5.1.1")
44d10b1f
RW
5193 (source
5194 (origin
5195 (method url-fetch)
5196 (uri (pypi-uri "ipykernel" version))
5197 (sha256
82110dea 5198 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5199 (build-system python-build-system)
5200 (arguments
5201 `(#:phases
5202 (modify-phases %standard-phases
5203 (replace 'check
5204 (lambda _
5205 (setenv "HOME" "/tmp")
5206 (invoke "pytest" "-v")
5207 #t)))))
5208 (propagated-inputs
5209 `(("python-ipython" ,python-ipython)
5210 ;; imported at runtime during connect
5211 ("python-jupyter-client" ,python-jupyter-client)))
5212 (native-inputs
5213 `(("python-pytest" ,python-pytest)
5214 ("python-nose" ,python-nose)))
5215 (home-page "https://ipython.org")
5216 (synopsis "IPython Kernel for Jupyter")
5217 (description
5218 "This package provides the IPython kernel for Jupyter.")
5219 (license license:bsd-3)))
5220
0f378947 5221;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5222(define-public python2-ipykernel
0f378947
RW
5223 (package
5224 (name "python2-ipykernel")
5225 (version "5.1.0")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "ipykernel" version))
5230 (sha256
5231 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5232 (build-system python-build-system)
5233 (arguments
5234 `(#:python ,python-2
5235 #:phases
5236 (modify-phases %standard-phases
5237 (replace 'check
5238 (lambda _
5239 (setenv "HOME" "/tmp")
5240 (invoke "pytest" "-v")
5241 #t)))))
5242 (propagated-inputs
5243 `(("python2-ipython" ,python2-ipython)
5244 ;; imported at runtime during connect
5245 ("python2-jupyter-client" ,python2-jupyter-client)))
5246 (native-inputs
5247 `(("python2-pytest" ,python2-pytest)
5248 ("python2-nose" ,python2-nose)))
5249 (home-page "https://ipython.org")
5250 (synopsis "IPython Kernel for Jupyter")
5251 (description
5252 "This package provides the IPython kernel for Jupyter.")
5253 (license license:bsd-3)))
44d10b1f 5254
966aa714
AE
5255(define-public python-pari-jupyter
5256 (package
5257 (name "python-pari-jupyter")
5258 (version "1.3.2")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "pari_jupyter" version))
5263 (sha256
5264 (base32
5265 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5266 (build-system python-build-system)
5267 (propagated-inputs
5268 `(("python-ipykernel" ,python-ipykernel)))
5269 (inputs
5270 `(("pari-gp" ,pari-gp)
5271 ("readline" ,readline)))
5272 (arguments
5273 `(#:tests? #f)) ; no test suite
5274 (home-page
5275 "https://github.com/jdemeyer/pari_jupyter")
5276 (synopsis "A Jupyter kernel for PARI/GP")
5277 (description "The package provides a PARI/GP kernel for Jupyter.")
5278 (license license:gpl3+)))
5279
dede052a
RW
5280(define-public python-backcall
5281 (package
5282 (name "python-backcall")
5283 (version "0.1.0")
5284 (source
5285 (origin
5286 (method url-fetch)
5287 (uri (pypi-uri "backcall" version))
5288 (sha256
5289 (base32
5290 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5291 (build-system python-build-system)
5292 (home-page "https://github.com/takluyver/backcall/")
5293 (synopsis "Specifications for callback functions passed in to an API")
5294 (description
5295 "If your code lets other people supply callback functions, it's important
5296to specify the function signature you expect, and check that functions support
5297that. Adding extra parameters later would break other peoples code unless
5298you're careful. The @code{backcall} package provides a way of specifying the
5299callback signature using a prototype function.")
5300 (license license:bsd-3)))
5301
44d10b1f
RW
5302;; This is the latest release of the LTS version of ipython with support for
5303;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5304;; dropped support for Python 2.7.
5305(define-public python2-ipython
44d10b1f 5306 (package
8b5f756c 5307 (name "python2-ipython")
44d10b1f
RW
5308 (version "5.8.0")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "ipython" version ".tar.gz"))
5313 (sha256
5314 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5315 (build-system python-build-system)
44d10b1f 5316 (propagated-inputs
8b5f756c
RW
5317 `(("python2-backports-shutil-get-terminal-size"
5318 ,python2-backports-shutil-get-terminal-size)
5319 ("python2-pathlib2" ,python2-pathlib2)
5320 ("python2-pyzmq" ,python2-pyzmq)
5321 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5322 ("python2-terminado" ,python2-terminado)
5323 ("python2-matplotlib" ,python2-matplotlib)
5324 ("python2-numpy" ,python2-numpy)
5325 ("python2-numpydoc" ,python2-numpydoc)
5326 ("python2-jinja2" ,python2-jinja2)
5327 ("python2-mistune" ,python2-mistune)
5328 ("python2-pexpect" ,python2-pexpect)
5329 ("python2-pickleshare" ,python2-pickleshare)
5330 ("python2-simplegeneric" ,python2-simplegeneric)
5331 ("python2-jsonschema" ,python2-jsonschema)
5332 ("python2-traitlets" ,python2-traitlets)
5333 ("python2-nbformat" ,python2-nbformat)
5334 ("python2-pygments" ,python2-pygments)))
5335 (inputs
5336 `(("readline" ,readline)
5337 ("which" ,which)))
5338 (native-inputs
5339 `(("graphviz" ,graphviz)
5340 ("pkg-config" ,pkg-config)
5341 ("python2-requests" ,python2-requests) ;; for tests
5342 ("python2-testpath" ,python2-testpath)
5343 ("python2-mock" ,python2-mock)
5344 ("python2-nose" ,python2-nose)))
5345 (arguments
5346 `(#:python ,python-2
5347 #:phases
5348 (modify-phases %standard-phases
5349 (add-before 'check 'delete-broken-tests
5350 (lambda* (#:key inputs #:allow-other-keys)
5351 ;; These tests throw errors for unknown reasons.
5352 (delete-file "IPython/core/tests/test_profile.py")
5353 (delete-file "IPython/core/tests/test_interactiveshell.py")
5354 (delete-file "IPython/core/tests/test_magic.py")
5355 #t)))))
5356 (home-page "https://ipython.org")
5357 (synopsis "IPython is a tool for interactive computing in Python")
5358 (description
5359 "IPython provides a rich architecture for interactive computing with:
5360Powerful interactive shells, a browser-based notebook, support for interactive
5361data visualization, embeddable interpreters and tools for parallel
5362computing.")
5363 (license license:bsd-3)))
5364
5365(define-public python-ipython
5366 (package
5367 (name "python-ipython")
5368 (version "7.5.0")
5369 (source
5370 (origin
5371 (method url-fetch)
5372 (uri (pypi-uri "ipython" version ".tar.gz"))
5373 (sha256
5374 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5375 (build-system python-build-system)
5376 (propagated-inputs
5377 `(("python-backcall" ,python-backcall)
5378 ("python-pyzmq" ,python-pyzmq)
5379 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5380 ("python-terminado" ,python-terminado)
5381 ("python-matplotlib" ,python-matplotlib)
5382 ("python-numpy" ,python-numpy)
5383 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5384 ("python-jedi" ,python-jedi)
44d10b1f
RW
5385 ("python-jinja2" ,python-jinja2)
5386 ("python-mistune" ,python-mistune)
5387 ("python-pexpect" ,python-pexpect)
5388 ("python-pickleshare" ,python-pickleshare)
5389 ("python-simplegeneric" ,python-simplegeneric)
5390 ("python-jsonschema" ,python-jsonschema)
5391 ("python-traitlets" ,python-traitlets)
5392 ("python-nbformat" ,python-nbformat)
5393 ("python-pygments" ,python-pygments)))
5394 (inputs
5395 `(("readline" ,readline)
5396 ("which" ,which)))
5397 (native-inputs
5398 `(("graphviz" ,graphviz)
5399 ("pkg-config" ,pkg-config)
5400 ("python-requests" ,python-requests) ;; for tests
5401 ("python-testpath" ,python-testpath)
8b5f756c 5402 ("python-nose" ,python-nose)))
44d10b1f
RW
5403 (arguments
5404 `(#:phases
5405 (modify-phases %standard-phases
44d10b1f
RW
5406 ;; Tests can only be run after the library has been installed and not
5407 ;; within the source directory.
5408 (delete 'check)
5409 (add-after 'install 'check
5410 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5411 (if tests?
5412 (begin
5413 ;; Make installed package available for running the tests
5414 (add-installed-pythonpath inputs outputs)
5415 (setenv "HOME" "/tmp/") ;; required by a test
5416 ;; We only test the core because one of the other tests
5417 ;; tries to import ipykernel.
5418 (invoke "python" "IPython/testing/iptest.py"
5419 "-v" "IPython/core/tests"))
5420 #t)))
5421 (add-before 'check 'fix-tests
5422 (lambda* (#:key inputs #:allow-other-keys)
5423 (substitute* "./IPython/utils/_process_posix.py"
5424 (("/usr/bin/env', 'which") (which "which")))
5425 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5426 (("#!/usr/bin/env python")
5427 (string-append "#!" (which "python"))))
44d10b1f
RW
5428 ;; This test introduces a circular dependency on ipykernel
5429 ;; (which depends on ipython).
5430 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5431 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5432 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5433 #t)))))
5434 (home-page "https://ipython.org")
5435 (synopsis "IPython is a tool for interactive computing in Python")
5436 (description
5437 "IPython provides a rich architecture for interactive computing with:
5438Powerful interactive shells, a browser-based notebook, support for interactive
5439data visualization, embeddable interpreters and tools for parallel
5440computing.")
8b5f756c 5441 (license license:bsd-3)))
44d10b1f 5442
8b5f756c
RW
5443(define-public python-ipython-documentation
5444 (package
5445 (inherit python-ipython)
5446 (name "python-ipython-documentation")
5447 (version (package-version python-ipython))
5448 (arguments
5449 `(#:phases
5450 (modify-phases %standard-phases
5451 (delete 'build)
5452 (delete 'check)
5453 (replace 'install
5454 (lambda* (#:key outputs #:allow-other-keys)
5455 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5456 (doc (string-append data "/doc/" ,name "-" ,version))
5457 (html (string-append doc "/html"))
5458 (man1 (string-append data "/man/man1"))
5459 (info (string-append data "/info"))
5460 (examples (string-append doc "/examples"))
5461 (python-arg (string-append "PYTHON=" (which "python"))))
5462 (setenv "LANG" "en_US.utf8")
5463 (with-directory-excursion "docs"
5464 ;; FIXME: pdf fails to build
5465 ;;(system* "make" "pdf" "PAPER=a4")
5466 (system* "make" python-arg "html")
5467 ;; FIXME: the generated texi file contains ^@^@, which trips
5468 ;; up the parser.
5469 ;; (system* "make" python-arg "info")
5470 )
5471 (copy-recursively "docs/man" man1)
5472 (copy-recursively "examples" examples)
5473 (copy-recursively "docs/build/html" html)
5474 ;; (copy-file "docs/build/latex/ipython.pdf"
5475 ;; (string-append doc "/ipython.pdf"))
5476 (mkdir-p info)
5477 ;; (copy-file "docs/build/texinfo/ipython.info"
5478 ;; (string-append info "/ipython.info"))
5479 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5480 #t)))))
5481 (inputs
5482 `(("python-ipython" ,python-ipython)
5483 ("python-ipykernel" ,python-ipykernel)))
5484 (native-inputs
5485 `(("python-sphinx" ,python-sphinx)
5486 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5487 ;; FIXME: It's possible that a smaller union would work just as well.
5488 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5489 texlive-fonts-ec
5490 texlive-generic-ifxetex
5491 texlive-generic-pdftex
5492 texlive-latex-amsfonts
5493 texlive-latex-capt-of
5494 texlive-latex-cmap
5495 texlive-latex-environ
5496 texlive-latex-eqparbox
5497 texlive-latex-etoolbox
5498 texlive-latex-expdlist
5499 texlive-latex-fancyhdr
5500 texlive-latex-fancyvrb
5501 texlive-latex-fncychap
5502 texlive-latex-float
5503 texlive-latex-framed
5504 texlive-latex-geometry
5505 texlive-latex-graphics
5506 texlive-latex-hyperref
5507 texlive-latex-mdwtools
5508 texlive-latex-multirow
5509 texlive-latex-needspace
5510 texlive-latex-oberdiek
5511 texlive-latex-parskip
5512 texlive-latex-preview
5513 texlive-latex-tabulary
5514 texlive-latex-threeparttable
5515 texlive-latex-titlesec
5516 texlive-latex-trimspaces
5517 texlive-latex-ucs
5518 texlive-latex-upquote
5519 texlive-latex-url
5520 texlive-latex-varwidth
5521 texlive-latex-wrapfig)))
5522 ("texinfo" ,texinfo)))))
44d10b1f
RW
5523
5524(define-public python-urwid
5525 (package
5526 (name "python-urwid")
5527 (version "2.0.1")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "urwid" version))
5532 (sha256
5533 (base32
5534 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5535 (build-system python-build-system)
5536 (home-page "http://urwid.org")
5537 (synopsis "Console user interface library for Python")
5538 (description
5539 "Urwid is a curses-based UI/widget library for Python. It includes many
5540features useful for text console applications.")
5541 (license license:lgpl2.1+)))
5542
5543(define-public python2-urwid
5544 (package-with-python2 python-urwid))
5545
5546(define-public python-urwidtrees
5547 (package
5548 (name "python-urwidtrees")
5549 (version "1.0.2")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 ;; package author intends on distributing via github rather than pypi:
5554 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5555 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5556 version ".tar.gz"))
5557 (file-name (string-append name "-" version ".tar.gz"))
5558 (sha256
5559 (base32
5560 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5561 (build-system python-build-system)
5562 (arguments
5563 '(#:tests? #f)) ; no tests
5564 (propagated-inputs `(("python-urwid" ,python-urwid)))
5565 (home-page "https://github.com/pazz/urwidtrees")
5566 (synopsis "Tree widgets for urwid")
5567 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5568toolkit. Use it to build trees of widgets.")
5569 (license license:gpl3+)))
5570
5571(define-public python2-urwidtrees
5572 (package-with-python2 python-urwidtrees))
5573
5574(define-public python-ua-parser
5575 (package
5576 (name "python-ua-parser")
5577 (version "0.8.0")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "ua-parser" version))
5582 (sha256
5583 (base32
5584 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5585 (build-system python-build-system)
5586 (arguments
5587 `(#:tests? #f)) ;no test suite in release
5588 (native-inputs
5589 `(("python-pyyaml" ,python-pyyaml)))
5590 (home-page "https://github.com/ua-parser/uap-python")
5591 (synopsis "User agent parser")
5592 (description
5593 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5594 (license license:asl2.0)))
5595
5596(define-public python2-ua-parser
5597 (package-with-python2 python-ua-parser))
5598
5599(define-public python-user-agents
5600 (package
5601 (name "python-user-agents")
5602 (version "1.1.0")
5603 (source
5604 (origin
5605 (method url-fetch)
5606 (uri (pypi-uri "user-agents" version))
5607 (sha256
5608 (base32
5609 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5610 (build-system python-build-system)
5611 (arguments
5612 `(#:tests? #f)) ;missing devices.json test file in release
5613 (propagated-inputs
5614 `(("python-ua-parser" ,python-ua-parser)))
5615 (home-page "https://github.com/selwin/python-user-agents")
5616 (synopsis "User Agent strings parsing library")
5617 (description
5618 "A library to identify devices (phones, tablets) and their capabilities by
5619parsing (browser/HTTP) user agent strings.")
5620 (license license:expat)))
5621
5622(define-public python2-user-agents
5623 (package-with-python2 python-user-agents))
5624
5625(define-public python-dbus
5626 (package
5627 (name "python-dbus")
5628 (version "1.2.8")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5633 "dbus-python-" version ".tar.gz"))
5634 (sha256
5635 (base32
5636 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5637 (build-system gnu-build-system)
5638 (arguments
5639 '(#:phases
5640 (modify-phases %standard-phases
5641 (add-before
5642 'check 'pre-check
5643 (lambda _
5644 ;; XXX: For the missing '/etc/machine-id'.
5645 (substitute* "test/run-test.sh"
5646 (("DBUS_FATAL_WARNINGS=1")
5647 "DBUS_FATAL_WARNINGS=0"))
5648 #t)))))
5649 (native-inputs
5650 `(("pkg-config" ,pkg-config)))
5651 (inputs
5652 `(("python" ,python-wrapper)
5653 ("dbus-glib" ,dbus-glib)))
5654 (synopsis "Python bindings for D-bus")
5655 (description "python-dbus provides bindings for libdbus, the reference
5656implementation of D-Bus.")
5657 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5658 (license license:expat)))
5659
5660(define-public python2-dbus
5661 (package (inherit python-dbus)
5662 (name "python2-dbus")
5663 (inputs `(("python" ,python-2)
5664 ,@(alist-delete "python"
5665 (package-inputs python-dbus)
5666 equal?)))
5667 ;; FIXME: on Python 2, the test_utf8 fails with:
5668 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5669 (arguments `(#:tests? #f))))
5670
fb236fdd
AG
5671(define-public python-notify2
5672 (package
5673 (name "python-notify2")
5674 (version "0.3.1")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "notify2" version))
5679 (sha256
5680 (base32
5681 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5682 (build-system python-build-system)
5683 (arguments `(#:tests? #f)) ; tests depend on system state
5684 (native-inputs
5685 `(("python-dbus" ,python-dbus)))
5686 (home-page "https://bitbucket.org/takluyver/pynotify2")
5687 (synopsis "Python interface to D-Bus notifications")
5688 (description
5689 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5690It is a reimplementation of pynotify in pure Python, and an alternative to
5691the GObject Introspection bindings to libnotify for non-GTK applications.")
5692 (license (list license:bsd-2
5693 license:lgpl2.1+))))
5694
5695(define-public python2-notify2
5696 (package-with-python2 python-notify2))
5697
44d10b1f
RW
5698(define-public python-lxml
5699 (package
5700 (name "python-lxml")
5701 (version "4.2.5")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "lxml" version))
5706 (sha256
5707 (base32
5708 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5709 (build-system python-build-system)
5710 (inputs
5711 `(("libxml2" ,libxml2)
5712 ("libxslt" ,libxslt)))
5713 (home-page "http://lxml.de/")
5714 (synopsis
5715 "Python XML processing library")
5716 (description
5717 "The lxml XML toolkit is a Pythonic binding for the C libraries
5718libxml2 and libxslt.")
5719 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5720
5721(define-public python2-lxml
5722 (package-with-python2 python-lxml))
5723
5724;; beautifulsoup4 has a totally different namespace than 3.x,
5725;; and pypi seems to put it under its own name, so I guess we should too
5726(define-public python-beautifulsoup4
5727 (package
5728 (name "python-beautifulsoup4")
abb53e6f 5729 (version "4.7.1")
44d10b1f
RW
5730 (source
5731 (origin
5732 (method url-fetch)
5733 (uri (pypi-uri "beautifulsoup4" version))
5734 (sha256
5735 (base32
abb53e6f 5736 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5737 (build-system python-build-system)
5738 (arguments
5739 `(#:phases
5740 (modify-phases %standard-phases
5741 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5742 ;; must use this conversion script when building with Python 3. The
5743 ;; conversion script also runs the tests.
5744 ;; For more information, see the file 'convert-py3k' in the source
5745 ;; distribution.
5746 (replace 'check
dff0197e 5747 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5748 (propagated-inputs
abb53e6f 5749 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5750 (home-page
5751 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5752 (synopsis
5753 "Python screen-scraping library")
5754 (description
5755 "Beautiful Soup is a Python library designed for rapidly setting up
5756screen-scraping projects. It offers Pythonic idioms for navigating,
5757searching, and modifying a parse tree, providing a toolkit for
5758dissecting a document and extracting what you need. It automatically
5759converts incoming documents to Unicode and outgoing documents to UTF-8.")
5760 (license license:expat)
5761 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5762
5763(define-public python2-beautifulsoup4
5764 (package
5765 (inherit (package-with-python2
5766 (strip-python2-variant python-beautifulsoup4)))
5767 (arguments `(#:python ,python-2))))
5768
ad74978a
BT
5769(define-public python-soupsieve
5770 (package
5771 (name "python-soupsieve")
e9cb6edd 5772 (version "1.9.2")
ad74978a
BT
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "soupsieve" version))
5777 (sha256
5778 (base32
e9cb6edd 5779 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
5780 (build-system python-build-system)
5781 (arguments `(#:tests? #f))
5782 ;;XXX: 2 tests fail currently despite claming they were to be
5783 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5784 ;;don't want to create a circular dependency.
5785 (home-page "https://github.com/facelessuser/soupsieve")
5786 (synopsis "CSS selector library")
5787 (description
5788 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5789Soup 4. It aims to provide selecting, matching, and filtering using modern
5790CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5791specifications up through the latest CSS level 4 drafts and beyond (though
5792some are not yet implemented).")
d00b83fb 5793 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5794 (license license:expat)))
5795
5796(define-public python2-soupsieve
d00b83fb 5797 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5798 (package
5799 (inherit base)
5800 (propagated-inputs
d00b83fb
MB
5801 `(("python2-backports-functools-lru-cache"
5802 ,python2-backports-functools-lru-cache)
5803 ,@(package-propagated-inputs base))))))
ad74978a 5804
44d10b1f
RW
5805(define-public python-netifaces
5806 (package
5807 (name "python-netifaces")
5808 (version "0.10.7")
5809 (source
5810 (origin
5811 (method url-fetch)
5812 (uri (pypi-uri "netifaces" version))
5813 (sha256
5814 (base32
5815 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5816 (build-system python-build-system)
5817 (home-page "https://github.com/al45tair/netifaces")
5818 (synopsis
5819 "Python module for portable network interface information")
5820 (description
5821 "Netifaces is a Python module providing information on network
5822interfaces in an easy and portable manner.")
5823 (license license:expat)))
5824
5825(define-public python2-netifaces
5826 (package-with-python2 python-netifaces))
5827
5828(define-public python-networkx
5829 (package
5830 (name "python-networkx")
5831 (version "2.2")
5832 (source
5833 (origin
5834 (method url-fetch)
5835 (uri (pypi-uri "networkx" version ".zip"))
5836 (sha256
5837 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5838 (build-system python-build-system)
5839 ;; python-decorator is needed at runtime.
5840 (propagated-inputs
5841 `(("python-decorator" ,python-decorator)))
5842 (native-inputs
5843 `(("python-nose" ,python-nose)
5844 ("unzip" ,unzip)))
5845 (home-page "https://networkx.github.io/")
5846 (synopsis "Python module for creating and manipulating graphs and networks")
5847 (description
5848 "NetworkX is a Python package for the creation, manipulation, and study
5849of the structure, dynamics, and functions of complex networks.")
5850 (license license:bsd-3)))
5851
5852(define-public python2-networkx
5853 (package-with-python2 python-networkx))
5854
5855(define-public python-datrie
5856 (package
5857 (name "python-datrie")
5858 (version "0.7.1")
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "datrie" version))
5863 (sha256
5864 (base32
5865 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5866 (build-system python-build-system)
5867 (arguments
5868 `(#:phases (modify-phases %standard-phases
5869 (add-before 'build 'cythonize
5870 (lambda _
5871 ;; Regenerate Cython classes to solve ABI issues with Python
5872 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5873 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5874 "src/stdio_ext.pxd" "-a"))))))
5875 (native-inputs
5876 `(("python-cython" ,python-cython)
5877 ("python-hypothesis" ,python-hypothesis)
5878 ("python-pytest" ,python-pytest)
5879 ("python-pytest-runner" ,python-pytest-runner)))
5880 (home-page "https://github.com/kmike/datrie")
5881 (synopsis "Fast, efficiently stored trie for Python")
5882 (description
5883 "This package provides a fast, efficiently stored trie implementation for
5884Python.")
5885 (license license:lgpl2.1+)))
5886
5887(define-public snakemake
5888 (package
5889 (name "snakemake")
5890 (version "5.2.4")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "snakemake" version))
5895 (sha256
5896 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5897 (build-system python-build-system)
5898 (arguments
5899 ;; TODO: Package missing test dependencies.
5900 '(#:tests? #f
5901 #:phases
5902 (modify-phases %standard-phases
5903 ;; For cluster execution Snakemake will call Python. Since there is
5904 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5905 ;; this by calling the snakemake wrapper instead.
5906 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5907 (lambda* (#:key outputs #:allow-other-keys)
5908 (substitute* "snakemake/executors.py"
5909 (("\\{sys.executable\\} -m snakemake")
5910 (string-append (assoc-ref outputs "out")
5911 "/bin/snakemake")))
5912 #t)))))
5913 (propagated-inputs
5914 `(("python-gitpython" ,python-gitpython)
5915 ("python-wrapt" ,python-wrapt)
5916 ("python-requests" ,python-requests)
5917 ("python-appdirs" ,python-appdirs)
5918 ("python-configargparse" ,python-configargparse)
5919 ("python-datrie" ,python-datrie)
5920 ("python-docutils" ,python-docutils)
5921 ("python-jinja2" ,python-jinja2)
5922 ("python-jsonschema" ,python-jsonschema)
5923 ("python-networkx" ,python-networkx)
5924 ("python-pyyaml" ,python-pyyaml)
5925 ("python-ratelimiter" ,python-ratelimiter)))
5926 (home-page "https://snakemake.readthedocs.io")
5927 (synopsis "Python-based execution environment for make-like workflows")
5928 (description
5929 "Snakemake aims to reduce the complexity of creating workflows by
5930providing a clean and modern domain specific specification language (DSL) in
5931Python style, together with a fast and comfortable execution environment.")
5932 (license license:expat)))
5933
5934;; This is currently needed for the pigx-* packages.
5935(define-public snakemake-4
5936 (package (inherit snakemake)
5937 (version "4.4.0")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (pypi-uri "snakemake" version))
5942 (sha256
5943 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5944 (propagated-inputs
5945 `(("python-wrapt" ,python-wrapt)
5946 ("python-requests" ,python-requests)
5947 ("python-appdirs" ,python-appdirs)
5948 ("python-configargparse" ,python-configargparse)
5949 ("python-pyyaml" ,python-pyyaml)
5950 ("python-ratelimiter" ,python-ratelimiter)))))
5951
5952(define-public python-pyqrcode
5953 (package
5954 (name "python-pyqrcode")
5955 (version "1.2.1")
5956 (source
5957 (origin
5958 (method url-fetch)
5959 (uri (pypi-uri "PyQRCode" version))
5960 (sha256
5961 (base32
5962 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5963 (build-system python-build-system)
5964 (home-page
5965 "https://github.com/mnooner256/pyqrcode")
5966 (synopsis "QR code generator")
5967 (description
5968 "Pyqrcode is a QR code generator written purely in Python with
5969SVG, EPS, PNG and terminal output.")
5970 (license license:bsd-3)))
5971
5972(define-public python-seaborn
5973 (package
5974 (name "python-seaborn")
5975 (version "0.9.0")
5976 (source
5977 (origin
5978 (method url-fetch)
5979 (uri (pypi-uri "seaborn" version))
5980 (sha256
5981 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5982 (build-system python-build-system)
5983 (arguments
5984 `(#:phases
5985 (modify-phases %standard-phases
5986 (add-before 'check 'start-xserver
5987 (lambda* (#:key inputs #:allow-other-keys)
5988 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5989 ;; There must be a running X server and make check doesn't
5990 ;; start one. Therefore we must do it.
5991 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5992 (setenv "DISPLAY" ":1")
5993 #t)))
5994 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5995 (propagated-inputs
5996 `(("python-pandas" ,python-pandas)
5997 ("python-matplotlib" ,python-matplotlib)
5998 ("python-numpy" ,python-numpy)
5999 ("python-scipy" ,python-scipy)))
6000 (native-inputs
6001 `(("python-pytest" ,python-pytest)
6002 ("xorg-server" ,xorg-server)))
6003 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6004 (synopsis "Statistical data visualization")
6005 (description
6006 "Seaborn is a library for making attractive and informative statistical
6007graphics in Python. It is built on top of matplotlib and tightly integrated
6008with the PyData stack, including support for numpy and pandas data structures
6009and statistical routines from scipy and statsmodels.")
6010 (license license:bsd-3)))
6011
6012(define-public python2-seaborn
6013 (package-with-python2 python-seaborn))
6014
6015(define-public python-mpmath
6016 (package
6017 (name "python-mpmath")
6018 (version "0.19")
6019 (source (origin
6020 (method url-fetch)
6021 (uri (string-append "http://mpmath.org/files/mpmath-"
6022 version ".tar.gz"))
6023 (sha256
6024 (base32
6025 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6026 (build-system python-build-system)
6027 (arguments
6028 '(#:phases
6029 (modify-phases %standard-phases
6030 (replace 'check
6031 (lambda _
5d7a6f1c 6032 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6033 (home-page "http://mpmath.org")
6034 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6035 (description
6036 "@code{mpmath} can be used as an arbitrary-precision substitute for
6037Python's float/complex types and math/cmath modules, but also does much
6038more advanced mathematics.")
6039 (license license:bsd-3)))
6040
6041(define-public python2-mpmath
6042 (package-with-python2 python-mpmath))
6043
6044(define-public python-bigfloat
6045 (package
6046 (name "python-bigfloat")
6047 (version "0.3.0")
6048 (source
6049 (origin
6050 (method url-fetch)
6051 (uri (pypi-uri "bigfloat" version))
6052 (sha256
6053 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6054 (build-system python-build-system)
6055 (inputs
6056 `(("mpfr" ,mpfr)))
6057 (home-page "https://github.com/mdickinson/bigfloat")
6058 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6059 (description
e36de31b 6060 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6061multiprecision arithmetic.")
6062 (license license:lgpl3+)))
6063
6064(define-public python2-bigfloat
6065 (package-with-python2 python-bigfloat))
6066
6067(define-public python-sympy
6068 (package
6069 (name "python-sympy")
6070 (version "1.1.1")
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (string-append
6075 "https://github.com/sympy/sympy/releases/download/sympy-"
6076 version "/sympy-" version ".tar.gz"))
6077 (sha256
6078 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6079 (build-system python-build-system)
6080 (arguments
6081 `(#:phases
6082 (modify-phases %standard-phases
6083 ;; Run the core tests after installation. By default it would run
6084 ;; *all* tests, which take a very long time to complete and are known
6085 ;; to be flaky.
6086 (delete 'check)
6087 (add-after 'install 'check
6088 (lambda* (#:key outputs #:allow-other-keys)
6089 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6090 #t)))))
6091 (propagated-inputs
6092 `(("python-mpmath" ,python-mpmath)))
6093 (home-page "http://www.sympy.org/")
6094 (synopsis "Python library for symbolic mathematics")
6095 (description
6096 "SymPy is a Python library for symbolic mathematics. It aims to become a
6097full-featured computer algebra system (CAS) while keeping the code as simple
6098as possible in order to be comprehensible and easily extensible.")
6099 (license license:bsd-3)))
6100
6101(define-public python2-sympy
6102 (package
6103 (inherit (package-with-python2 python-sympy))
6104 (arguments
6105 `(#:phases
6106 (modify-phases %standard-phases
6107 ;; Run the core tests after installation. By default it would run
6108 ;; *all* tests, which take a very long time to complete and are known
6109 ;; to be flaky.
6110 (delete 'check)
6111 (add-after 'install 'check
6112 (lambda* (#:key outputs #:allow-other-keys)
6113 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6114 #t)))))))
6115
6116(define-public python-q
6117 (package
6118 (name "python-q")
6119 (version "2.6")
6120 (source
6121 (origin
6122 (method url-fetch)
6123 (uri (pypi-uri "q" version))
6124 (sha256
6125 (base32
6126 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6127 (build-system python-build-system)
6128 (home-page "https://github.com/zestyping/q")
6129 (synopsis "Quick-and-dirty debugging output for tired programmers")
6130 (description
6131 "q is a Python module for \"print\" style of debugging Python code. It
6132provides convenient short API for print out of values, tracebacks, and
6133falling into the Python interpreter.")
6134 (license license:asl2.0)))
6135
6136(define-public python2-q
6137 (package-with-python2 python-q))
6138
6139(define-public python2-xlib
6140 (package
6141 (name "python2-xlib")
6142 (version "0.14")
6143 (source (origin
6144 (method url-fetch)
6145 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6146 "/" version "/"
6147 "python-xlib-" version ".tar.gz"))
6148 (sha256
6149 (base32
6150 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6151 (build-system python-build-system)
6152 (arguments
6153 `(#:python ,python-2 ;Python 2 only
6154 #:tests? #f)) ;no tests
6155 (home-page "http://python-xlib.sourceforge.net/")
6156 (synopsis "Python X11 client library")
6157 (description
6158 "The Python X Library is intended to be a fully functional X client
6159library for Python programs. It is useful to implement low-level X clients.
6160It is written entirely in Python.")
6161 (license license:gpl2+)))
6162
6163(define-public python-singledispatch
6164 (package
6165 (name "python-singledispatch")
6166 (version "3.4.0.3")
6167 (source
6168 (origin
6169 (method url-fetch)
6170 (uri (pypi-uri "singledispatch" version))
6171 (sha256
6172 (base32
6173 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6174 (build-system python-build-system)
6175 (native-inputs
6176 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6177 (home-page
6178 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6179 (synopsis "Backport of singledispatch feature from Python 3.4")
6180 (description
6181 "This library brings functools.singledispatch from Python 3.4 to Python
61822.6-3.3.")
6183 (license license:expat)))
6184
6185(define-public python2-singledispatch
6186 (package-with-python2 python-singledispatch))
6187
6188;; the python- version can be removed with python-3.5
6189(define-public python-backports-abc
6190 (package
6191 (name "python-backports-abc")
6192 (version "0.5")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "backports_abc" version))
6197 (sha256
6198 (base32
6199 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6200 (build-system python-build-system)
6201 (home-page "https://github.com/cython/backports_abc")
6202 (synopsis "Backport of additions to the 'collections.abc' module")
6203 (description
6204 "Python-backports-abc provides a backport of additions to the
36a4366d 6205@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6206 (license license:psfl)))
6207
6208(define-public python2-backports-abc
6209 (package-with-python2 python-backports-abc))
6210
6211(define-public python-backports-csv
6212 (package
6213 (name "python-backports-csv")
6214 (version "1.0.5")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "backports.csv" version))
6219 (sha256
6220 (base32
6221 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6222 (build-system python-build-system)
6223 (home-page "https://github.com/ryanhiebert/backports.csv")
6224 (synopsis "Backport of Python 3's csv module for Python 2")
6225 (description
6226 "Provides a backport of Python 3's @code{csv} module for parsing
6227comma separated values. The API of the @code{csv} module in Python 2
6228is drastically different from the @code{csv} module in Python 3.
6229This is due, for the most part, to the difference between str in
6230Python 2 and Python 3.")
6231 (license license:psfl)))
6232
6233(define-public python2-backports-csv
6234 (package-with-python2 python-backports-csv))
6235
6236(define-public python2-backports-shutil-get-terminal-size
6237 (package
6238 (name "python2-backports-shutil-get-terminal-size")
6239 (version "1.0.0")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6244 (sha256
6245 (base32
6246 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6247 (build-system python-build-system)
6248 (arguments
6249 `(#:python ,python-2
6250 #:phases
6251 (modify-phases %standard-phases
6252 (replace 'check
6253 (lambda _
4a4a7d9a 6254 (invoke "py.test" "-v"))))))
44d10b1f
RW
6255 (native-inputs
6256 `(("python2-pytest" ,python2-pytest)))
6257 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6258 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6259 (description
6260 "This package provides a backport of the @code{get_terminal_size
6261function} from Python 3.3's @code{shutil}.
6262Unlike the original version it is written in pure Python rather than C,
6263so it might be a tiny bit slower.")
6264 (license license:expat)))
6265
6266(define-public python-waf
6267 (package
6268 (name "python-waf")
6269 (version "2.0.11")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "https://waf.io/"
6273 "waf-" version ".tar.bz2"))
6274 (sha256
6275 (base32
6276 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6277 (build-system python-build-system)
6278 (arguments
6279 '(#:phases
6280 (modify-phases %standard-phases
6281 (replace 'build
6282 (lambda _
6283 (invoke "python" "waf-light" "configure" "build")))
6284 (replace 'check
6285 (lambda _
6286 (invoke "python" "waf" "--version")))
6287 (replace 'install
6288 (lambda* (#:key outputs #:allow-other-keys)
6289 (let ((out (assoc-ref outputs "out")))
6290 (install-file "waf" (string-append out "/bin")))
6291 #t))
6292 ;; waf breaks when it is wrapped.
6293 (delete 'wrap))))
6294 (home-page "https://waf.io/")
6295 (synopsis "Python-based build system")
6296 (description
6297 "Waf is a Python-based framework for configuring, compiling and installing
6298applications.")
6299 (license license:bsd-3)))
6300
6301(define-public python2-waf
6302 (package-with-python2 python-waf))
6303
6304(define-public python-pyzmq
6305 (package
6306 (name "python-pyzmq")
6307 (version "17.1.2")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "pyzmq" version))
6312 (sha256
6313 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6314 (build-system python-build-system)
6315 (arguments
6316 `(#:configure-flags
6317 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6318 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6319 ;; --inplace' for 'python setup.py test' to work.
6320 #:tests? #f))
6321 (inputs
6322 `(("zeromq" ,zeromq)))
6323 (native-inputs
6324 `(("pkg-config" ,pkg-config)
6325 ("python-nose" ,python-nose)))
6326 (home-page "https://github.com/zeromq/pyzmq")
6327 (synopsis "Python bindings for 0MQ")
6328 (description
6329 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6330 (license license:bsd-4)))
6331
6332(define-public python2-pyzmq
6333 (package-with-python2 python-pyzmq))
6334
6335(define-public python-pep8
6336 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6337 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6338 ;; some dependents' test suites, and nothing more.
6339 (package
6340 (name "python-pep8")
6341 (version "1.7.0")
6342 (source
6343 (origin
6344 (method url-fetch)
6345 (uri (pypi-uri "pep8" version))
6346 (sha256
6347 (base32
6348 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6349 (build-system python-build-system)
6350 (home-page "https://pep8.readthedocs.org/")
6351 (synopsis "Python style guide checker")
6352 (description
6353 "This tools checks Python code against some of the style conventions in
6354PEP 8.")
6355 (license license:expat)))
6356
6357(define-public python2-pep8
6358 (package-with-python2 python-pep8))
6359
6360(define-public python-pyflakes
6361 (package
6362 (name "python-pyflakes")
d0cba11b 6363 (version "2.1.1")
44d10b1f
RW
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "pyflakes" version))
6368 (sha256
6369 (base32
d0cba11b 6370 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6371 (build-system python-build-system)
6372 (home-page
6373 "https://github.com/pyflakes/pyflakes")
6374 (synopsis "Passive checker of Python programs")
6375 (description
6376 "Pyflakes statically checks Python source code for common errors.")
6377 (license license:expat)))
6378
6379(define-public python2-pyflakes
6380 (package-with-python2 python-pyflakes))
6381
6382(define-public python-mccabe
6383 (package
6384 (name "python-mccabe")
6385 (version "0.6.1")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (pypi-uri "mccabe" version))
6390 (sha256
6391 (base32
6392 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6393 (build-system python-build-system)
6394 (native-inputs
6395 `(("python-pytest" ,python-pytest-bootstrap)
6396 ("python-pytest-runner" ,python-pytest-runner)))
6397 (home-page "https://github.com/flintwork/mccabe")
6398 (synopsis "McCabe checker, plugin for flake8")
6399 (description
6400 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6401complexity of Python source code.")
6402 (license license:expat)))
6403
6404(define-public python2-mccabe
6405 (package-with-python2 python-mccabe))
6406
6407(define-public python-mccabe-0.2.1
6408 (package (inherit python-mccabe)
6409 (version "0.2.1")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (pypi-uri "mccabe" version))
6414 (sha256
6415 (base32
6416 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6417
6418(define-public python2-mccabe-0.2.1
6419 (package-with-python2 python-mccabe-0.2.1))
6420
6421;; Flake8 2.4.1 requires an older version of pep8.
6422;; This should be removed ASAP.
6423(define-public python-pep8-1.5.7
6424 (package (inherit python-pep8)
6425 (version "1.5.7")
6426 (source
f3576970
RW
6427 (origin
6428 (method url-fetch)
6429 (uri (pypi-uri "pep8" version))
6430 (sha256
6431 (base32
6432 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6433 (arguments
6434 ;; XXX Tests not compatible with Python 3.5.
6435 '(#:tests? #f))))
6436
6437(define-public python2-pep8-1.5.7
6438 (package-with-python2 python-pep8-1.5.7))
6439
6440;; Flake8 2.4.1 requires an older version of pyflakes.
6441;; This should be removed ASAP.
6442(define-public python-pyflakes-0.8.1
6443 (package (inherit python-pyflakes)
6444 (version "0.8.1")
6445 (source
8c4dffb5
RW
6446 (origin
6447 (method url-fetch)
6448 (uri (pypi-uri "pyflakes" version))
6449 (sha256
6450 (base32
6451 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6452 (arguments
6453 ;; XXX Tests not compatible with Python 3.5.
6454 '(#:tests? #f))))
6455
6456(define-public python2-pyflakes-0.8.1
6457 (package-with-python2 python-pyflakes-0.8.1))
6458
ac63cf0a 6459(define-public python-flake8
44d10b1f
RW
6460 (package
6461 (name "python-flake8")
beaff4a8 6462 (version "3.7.7")
ac63cf0a
MB
6463 (source (origin
6464 (method url-fetch)
6465 (uri (pypi-uri "flake8" version))
6466 (sha256
6467 (base32
beaff4a8 6468 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6469 (build-system python-build-system)
6470 (arguments
6471 `(#:phases
6472 (modify-phases %standard-phases
44d10b1f
RW
6473 (delete 'check)
6474 (add-after 'install 'check
6475 (lambda* (#:key inputs outputs #:allow-other-keys)
6476 (add-installed-pythonpath inputs outputs)
6477 (invoke "pytest" "-v")
6478 #t)))))
6479 (propagated-inputs
6480 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6481 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6482 ("python-pyflakes" ,python-pyflakes)
6483 ("python-mccabe" ,python-mccabe)))
6484 (native-inputs
6485 `(("python-mock" ,python-mock)
6486 ("python-pytest" ,python-pytest-bootstrap)
6487 ("python-pytest-runner" ,python-pytest-runner)))
6488 (home-page "https://gitlab.com/pycqa/flake8")
6489 (synopsis
6490 "The modular source code checker: pep8, pyflakes and co")
6491 (description
6492 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6493 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6494 (license license:expat)))
6495
ac63cf0a
MB
6496(define-public python2-flake8
6497 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6498 (package (inherit base)
6499 (propagated-inputs
6500 `(("python2-configparser" ,python2-configparser)
6501 ("python2-enum34" ,python2-enum34)
beaff4a8 6502 ("python2-typing" ,python2-typing)
44d10b1f
RW
6503 ,@(package-propagated-inputs base))))))
6504
44d10b1f
RW
6505;; python-hacking requires flake8 <2.6.0.
6506(define-public python-flake8-2.5
6507 (package
6508 (inherit python-flake8)
6509 (version "2.5.5")
6510 (source (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "flake8" version))
6513 (sha256
6514 (base32
6515 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6516 (propagated-inputs
6517 `(("python-pep8" ,python-pep8)
6518 ,@(package-propagated-inputs python-flake8)))
6519 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6520
6521(define-public python2-flake8-2.5
6522 (package
6523 (inherit python2-flake8)
6524 (version (package-version python-flake8-2.5))
6525 (source (origin
6526 (inherit (package-source python-flake8-2.5))))
6527 (propagated-inputs
6528 `(("python2-pep8" ,python2-pep8)
6529 ,@(package-propagated-inputs python2-flake8)))))
6530
6531(define-public python-flake8-polyfill
6532 (package
6533 (name "python-flake8-polyfill")
6534 (version "1.0.2")
6535 (source
6536 (origin
6537 (method url-fetch)
6538 (uri (pypi-uri "flake8-polyfill" version))
6539 (sha256
6540 (base32
6541 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6542 (build-system python-build-system)
6543 (arguments
6544 '(#:phases
6545 (modify-phases %standard-phases
6546 (replace 'check
6547 (lambda _
6548 (setenv "PYTHONPATH"
6549 (string-append (getcwd) "/build/lib:"
6550 (getenv "PYTHONPATH")))
4f0a0894 6551 (invoke "py.test" "-v"))))))
44d10b1f
RW
6552 (native-inputs
6553 `(("python-flake8" ,python-flake8)
6554 ("python-mock" ,python-mock)
6555 ("python-pep8" ,python-pep8)
6556 ("python-pycodestyle" ,python-pycodestyle)
6557 ("python-pytest" ,python-pytest)))
6558 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6559 (synopsis "Polyfill package for Flake8 plugins")
6560 (description
6561 "This package that provides some compatibility helpers for Flake8
6562plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6563 (license license:expat)))
6564
6565(define-public python2-flake8-polyfill
6566 (package-with-python2 python-flake8-polyfill))
6567
6568(define-public python-mistune
6569 (package
6570 (name "python-mistune")
6571 (version "0.8.4")
6572 (source
6573 (origin
6574 (method url-fetch)
6575 (uri (pypi-uri "mistune" version))
6576 (sha256
6577 (base32
6578 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6579 (build-system python-build-system)
6580 (native-inputs
6581 `(("python-nose" ,python-nose)
6582 ("python-cython" ,python-cython)))
6583 (home-page "https://github.com/lepture/mistune")
6584 (synopsis "Markdown parser in pure Python")
6585 (description "This package provides a fast markdown parser in pure
6586Python.")
6587 (license license:bsd-3)))
6588
6589(define-public python2-mistune
6590 (package-with-python2 python-mistune))
6591
6592(define-public python-markdown
6593 (package
6594 (name "python-markdown")
ceb1936a 6595 (version "3.1.1")
44d10b1f
RW
6596 (source
6597 (origin
6598 (method url-fetch)
6599 (uri (pypi-uri "Markdown" version))
6600 (sha256
6601 (base32
ceb1936a 6602 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6603 (build-system python-build-system)
6604 (native-inputs
6605 `(("python-nose" ,python-nose)
6606 ("python-pyyaml" ,python-pyyaml)))
6607 (home-page "https://python-markdown.github.io/")
6608 (synopsis "Python implementation of Markdown")
6609 (description
6610 "This package provides a Python implementation of John Gruber's
6611Markdown. The library features international input, various Markdown
6612extensions, and several HTML output formats. A command line wrapper
6613markdown_py is also provided to convert Markdown files to HTML.")
6614 (license license:bsd-3)))
6615
6616(define-public python2-markdown
6617 (package-with-python2 python-markdown))
6618
6619(define-public python-ptyprocess
6620 (package
6621 (name "python-ptyprocess")
6622 (version "0.5.2")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (pypi-uri "ptyprocess" version))
6627 (sha256
6628 (base32
6629 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6630 (build-system python-build-system)
6631 (native-inputs
6632 `(("python-nose" ,python-nose)))
6633 (arguments
6634 `(#:phases
6635 (modify-phases %standard-phases
6636 (replace 'check
7904d6fa 6637 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6638 (home-page "https://github.com/pexpect/ptyprocess")
6639 (synopsis "Run a subprocess in a pseudo terminal")
6640 (description
6641 "This package provides a Python library used to launch a subprocess in a
6642pseudo terminal (pty), and interact with both the process and its pty.")
6643 (license license:isc)))
6644
6645(define-public python2-ptyprocess
6646 (package-with-python2 python-ptyprocess))
6647
6648(define-public python-cram
6649 (package
6650 (name "python-cram")
6651 (version "0.7")
6652 (home-page "https://bitheap.org/cram/")
6653 (source (origin
6654 (method url-fetch)
6655 (uri (list (string-append home-page "cram-"
6656 version ".tar.gz")
6657 (pypi-uri "cram" version)))
6658 (sha256
6659 (base32
6660 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6661 (arguments
6662 '(#:phases
6663 (modify-phases %standard-phases
6664 (add-after 'unpack 'patch-source
6665 (lambda _
6666 (substitute* (find-files "cram" ".*\\.py$")
6667 ;; Replace default shell path.
6668 (("/bin/sh") (which "sh")))
6669 (substitute* (find-files "tests" ".*\\.t$")
6670 (("md5") "md5sum")
6671 (("/bin/bash") (which "bash"))
6672 (("/bin/sh") (which "sh")))
6673 (substitute* "cram/_test.py"
6674 ;; This hack works around a bug triggered by substituting
6675 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6676 ;; "cram -h", which breaks the output at 80 characters. This
6677 ;; causes the line showing the default shell to break into two
6678 ;; lines, but the test expects a single line...
6679 (("env\\['COLUMNS'\\] = '80'")
6680 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6681
6682 (substitute* "Makefile"
6683 ;; Recent versions of python-coverage have caused the test
6684 ;; coverage to decrease (as of version 0.7). Allow that.
6685 (("--fail-under=100")
6686 "--fail-under=90"))
6687
44d10b1f 6688 #t))
ff1e80d7 6689 (replace 'check
44d10b1f 6690 ;; The test phase uses the built library and executable.
44d10b1f
RW
6691 (lambda* (#:key inputs outputs #:allow-other-keys)
6692 (add-installed-pythonpath inputs outputs)
6693 (setenv "PATH" (string-append (getenv "PATH") ":"
6694 (assoc-ref outputs "out") "/bin"))
2d7db192 6695 (invoke "make" "test"))))))
44d10b1f
RW
6696 (build-system python-build-system)
6697 (native-inputs
6698 `(("python-coverage" ,python-coverage)
6699 ("which" ,which)))
6700 (synopsis "Simple testing framework for command line applications")
6701 (description
6702 "Cram is a functional testing framework for command line applications.
6703Cram tests look like snippets of interactive shell sessions. Cram runs each
6704command and compares the command output in the test with the command’s actual
6705output.")
6706 (license license:gpl2+)))
6707
6708(define-public python2-cram
6709 (package-with-python2 python-cram))
6710
6711(define-public python-straight-plugin
6712 (package
6713 (name "python-straight-plugin")
6714 (version "1.4.1")
6715 (source
6716 (origin
6717 (method url-fetch)
6718 (uri (pypi-uri "straight.plugin" version))
6719 (sha256
6720 (base32
6721 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6722 (build-system python-build-system)
6723 (home-page "https://github.com/ironfroggy/straight.plugin")
6724 (synopsis "Simple namespaced plugin facility")
6725 (description "Straight Plugin provides a type of plugin you can create from
6726almost any existing Python modules, and an easy way for outside developers to
6727add functionality and customization to your projects with their own plugins.")
6728 (license license:expat)))
6729
6730(define-public python2-straight-plugin
6731 (package-with-python2 python-straight-plugin))
6732
6733(define-public python-fonttools
6734 (package
6735 (name "python-fonttools")
1a4bb420 6736 (version "3.38.0")
44d10b1f
RW
6737 (source (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "fonttools" version ".zip"))
6740 (sha256
6741 (base32
1a4bb420 6742 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6743 (build-system python-build-system)
6744 (native-inputs
6745 `(("unzip" ,unzip)
6746 ("python-pytest" ,python-pytest)
6747 ("python-pytest-runner" ,python-pytest-runner)))
6748 (home-page "https://github.com/behdad/fonttools")
6749 (synopsis "Tools to manipulate font files")
6750 (description
6751 "FontTools/TTX is a library to manipulate font files from Python. It
6752supports reading and writing of TrueType/OpenType fonts, reading and writing
6753of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6754also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6755from an XML-based format.")
6756 (license license:expat)))
6757
6758(define-public python2-fonttools
6759 (package-with-python2 python-fonttools))
6760
6761(define-public python-ly
6762 (package
6763 (name "python-ly")
6764 (version "0.9.5")
6765 (source
6766 (origin
6767 (method url-fetch)
6768 (uri (pypi-uri name version))
6769 (sha256
6770 (base32
6771 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6772 (build-system python-build-system)
6773 (arguments
6774 ;; FIXME: Some tests need network access.
6775 '(#:tests? #f))
6776 (synopsis "Tool and library for manipulating LilyPond files")
6777 (description "This package provides a Python library to parse, manipulate
6778or create documents in LilyPond format. A command line program ly is also
6779provided that can be used to do various manipulations with LilyPond files.")
6780 (home-page "https://pypi.python.org/pypi/python-ly")
6781 (license license:gpl2+)))
6782
6783(define-public python-appdirs
6784 (package
6785 (name "python-appdirs")
6786 (version "1.4.3")
6787 (source
6788 (origin
6789 (method url-fetch)
6790 (uri (pypi-uri "appdirs" version))
6791 (sha256
6792 (base32
6793 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6794 (build-system python-build-system)
6795 (home-page "https://github.com/ActiveState/appdirs")
6796 (synopsis
6797 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6798 (description
6799 "This module provides a portable way of finding out where user data
6800should be stored on various operating systems.")
6801 (license license:expat)))
6802
6803(define-public python2-appdirs
6804 (package-with-python2 python-appdirs))
6805
6806(define-public python-llfuse
6807 (package
6808 (name "python-llfuse")
6809 (version "1.3.5")
6810 (source (origin
6811 (method url-fetch)
6812 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6813 (sha256
6814 (base32
6815 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6816 (build-system python-build-system)
6817 (inputs
6818 `(("fuse" ,fuse)
6819 ("attr" ,attr)))
6820 (native-inputs
6821 `(("pkg-config" ,pkg-config)))
6822 (synopsis "Python bindings for FUSE")
6823 (description
6824 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6825 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6826 (license license:lgpl2.0+)
6827 (properties `((python2-variant . ,(delay python2-llfuse))))))
6828
6829(define-public python2-llfuse
6830 (package (inherit (package-with-python2
6831 (strip-python2-variant python-llfuse)))
6832 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6833
6834;; For attic-0.16
6835(define-public python-llfuse-0.41
6836 (package (inherit python-llfuse)
6837 (version "0.41.1")
6838 (source (origin
6839 (method url-fetch)
6840 (uri (string-append
6841 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6842 "llfuse-" version ".tar.bz2"))
6843 (sha256
6844 (base32
6845 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6846 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6847 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6848 (license (list license:expat license:lgpl2.0+))))
6849
6850(define-public python-msgpack
6851 (package
6852 (name "python-msgpack")
6853 (version "0.5.6")
6854 (source (origin
6855 (method url-fetch)
6856 (uri (pypi-uri "msgpack" version))
6857 (sha256
6858 (base32
6859 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6860 (build-system python-build-system)
6861 (arguments
6862 `(#:modules ((guix build utils)
6863 (guix build python-build-system)
6864 (ice-9 ftw)
6865 (srfi srfi-1)
6866 (srfi srfi-26))
6867 #:phases
6868 (modify-phases %standard-phases
6869 (replace 'check
6870 (lambda _
6871 (let ((cwd (getcwd)))
6872 (setenv "PYTHONPATH"
6873 (string-append cwd "/build/"
6874 (find (cut string-prefix? "lib" <>)
6875 (scandir (string-append cwd "/build")))
6876 ":"
6877 (getenv "PYTHONPATH")))
6878 (invoke "pytest" "-v" "test")))))))
6879 (native-inputs
6880 `(("python-pytest" ,python-pytest)))
6881 (synopsis "MessagePack (de)serializer")
6882 (description "MessagePack is a fast, compact binary serialization format,
6883suitable for similar data to JSON. This package provides CPython bindings for
6884reading and writing MessagePack data.")
6885 (home-page "https://pypi.python.org/pypi/msgpack/")
6886 (license license:asl2.0)))
6887
6888;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6889;; release 0.5. Some packages like borg still call it by the old name for now.
6890;; <https://bugs.gnu.org/30662>
6891(define-public python-msgpack-transitional
6892 (package
6893 (inherit python-msgpack)
6894 (name "python-msgpack-transitional")
6895 (arguments
6896 (substitute-keyword-arguments (package-arguments python-msgpack)
6897 ((#:phases phases)
6898 `(modify-phases ,phases
6899 (add-after 'unpack 'configure-transitional
6900 (lambda _
6901 ;; Keep using the old name.
6902 (substitute* "setup.py"
6903 (("TRANSITIONAL = False")
6904 "TRANSITIONAL = 1"))
6905 #t))))))))
6906
6907(define-public python2-msgpack
6908 (package-with-python2 python-msgpack))
6909
6910(define-public python-netaddr
6911 (package
6912 (name "python-netaddr")
6913 (version "0.7.19")
6914 (source
6915 (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "netaddr" version))
6918 (sha256
6919 (base32
6920 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6921 (build-system python-build-system)
6922 (arguments `(#:tests? #f)) ;; No tests.
6923 (home-page "https://github.com/drkjam/netaddr/")
6924 (synopsis "Pythonic manipulation of network addresses")
6925 (description
6926 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6927and MAC network addresses.")
6928 (license license:bsd-3)))
6929
6930(define-public python2-netaddr
6931 (package-with-python2 python-netaddr))
6932
dd85eca0
AG
6933(define-public python2-pyroute2
6934 (package
6935 (name "python2-pyroute2")
6936 (version "0.5.6")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (pypi-uri "pyroute2" version))
6941 (sha256
6942 (base32
6943 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
6944 (build-system python-build-system)
6945 (arguments
6946 `(#:python ,python-2)) ;Python 3.x is not supported
6947 (home-page "https://github.com/svinota/pyroute2")
6948 (synopsis "Python netlink library")
6949 (description
6950 "Pyroute2 is a pure Python netlink library with minimal dependencies.
6951Supported netlink families and protocols include:
6952@itemize
6953@item rtnl, network settings - addresses, routes, traffic controls
6954@item nfnetlink - netfilter API: ipset, nftables, ...
6955@item ipq - simplest userspace packet filtering, iptables QUEUE target
6956@item devlink - manage and monitor devlink-enabled hardware
6957@item generic - generic netlink families
6958 @itemize
6959 @item nl80211 - wireless functions API (basic support)
6960 @item taskstats - extended process statistics
6961 @item acpi_events - ACPI events monitoring
6962 @item thermal_events - thermal events monitoring
6963 @item VFS_DQUOT - disk quota events monitoring
6964 @end itemize
6965@end itemize")
6966 (license license:gpl2+)))
6967
44d10b1f
RW
6968(define-public python-wrapt
6969 (package
6970 (name "python-wrapt")
dddd7a75 6971 (version "1.11.1")
44d10b1f
RW
6972 (source
6973 (origin
6974 (method url-fetch)
6975 (uri (pypi-uri "wrapt" version))
6976 (sha256
6977 (base32
dddd7a75 6978 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6979 (build-system python-build-system)
6980 (arguments
6981 ;; Tests are not included in the tarball, they are only available in the
6982 ;; git repository.
6983 `(#:tests? #f))
6984 (home-page "https://github.com/GrahamDumpleton/wrapt")
6985 (synopsis "Module for decorators, wrappers and monkey patching")
6986 (description
6987 "The aim of the wrapt module is to provide a transparent object proxy for
6988 Python, which can be used as the basis for the construction of function
6989 wrappers and decorator functions.")
6990 (license license:bsd-2)))
6991
6992(define-public python2-wrapt
6993 (package-with-python2 python-wrapt))
6994
6995(define-public python-xlrd
6996 (package
6997 (name "python-xlrd")
6998 (version "1.0.0")
6999 (source (origin
7000 (method url-fetch)
7001 (uri (pypi-uri "xlrd" version))
7002 (sha256
7003 (base32
7004 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7005 (build-system python-build-system)
7006 (arguments
7007 `(#:phases
7008 (modify-phases %standard-phases
7009 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7010 ;; run tests instead for now.
45fd0081 7011 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7012 (native-inputs `(("python-nose" ,python-nose)))
7013 (home-page "http://www.python-excel.org/")
7014 (synopsis "Library for extracting data from Excel files")
a0909286 7015 (description "This package provides a library to extract data from
44d10b1f
RW
7016spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7017@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7018Unicode-aware. It is not intended as an end-user tool.")
7019 (license license:bsd-3)))
7020
7021(define-public python2-xlrd
7022 (package-with-python2 python-xlrd))
7023
7024(define-public python-prettytable
7025 (package
7026 (name "python-prettytable")
7027 (version "0.7.2")
7028 (source
7029 (origin
7030 (method url-fetch)
337c3a1e 7031 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7032 (sha256
7033 (base32
7034 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7035 (build-system python-build-system)
7036 (home-page "http://code.google.com/p/prettytable/")
7037 (synopsis "Display tabular data in an ASCII table format")
7038 (description
7039 "A library designed to represent tabular data in visually appealing ASCII
7040tables. PrettyTable allows for selection of which columns are to be printed,
7041independent alignment of columns (left or right justified or centred) and
7042printing of sub-tables by specifying a row range.")
7043 (license license:bsd-3)))
7044
7045(define-public python2-prettytable
7046 (package-with-python2 python-prettytable))
7047
7048(define-public python-tables
7049 (package
7050 (name "python-tables")
7051 (version "3.4.4")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (pypi-uri "tables" version))
7056 (sha256
7057 (base32
7058 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7059 (modules '((guix build utils)))
7060 (snippet
7061 '(begin
7062 ;; Remove pre-compiled .pyc files from source.
7063 (for-each delete-file-recursively
7064 (find-files "." "__pycache__" #:directories? #t))
7065 (for-each delete-file (find-files "." "\\.pyc$"))
7066 #t))))
7067 (build-system python-build-system)
7068 (arguments
7069 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7070 ;; or "check", so we must override the build and check phases.
7071 #:phases
7072 (modify-phases %standard-phases
7073 (add-after 'unpack 'use-gcc
7074 (lambda _
7075 (substitute* "setup.py"
7076 (("compiler = new_compiler\\(\\)" line)
7077 (string-append line
7078 "\ncompiler.set_executables(compiler='gcc',"
7079 "compiler_so='gcc',"
7080 "linker_exe='gcc',"
7081 "linker_so='gcc -shared')")))
7082 #t))
7083 (replace 'build
7084 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7085 (invoke "python" "setup.py" "build"
7086 (string-append "--hdf5="
7087 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7088 (replace 'check
7089 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7090 (invoke "python" "setup.py" "check"
7091 (string-append "--hdf5="
7092 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7093 (propagated-inputs
7094 `(("python-numexpr" ,python-numexpr)
7095 ("python-numpy" ,python-numpy)))
7096 (native-inputs
7097 `(("python-cython" ,python-cython)
7098 ("pkg-config" ,pkg-config)))
7099 (inputs
7100 `(("hdf5" ,hdf5)
7101 ("bzip2" ,bzip2)
7102 ("zlib" ,zlib)))
7103 (home-page "http://www.pytables.org/")
7104 (synopsis "Hierarchical datasets for Python")
7105 (description "PyTables is a package for managing hierarchical datasets and
7106designed to efficiently cope with extremely large amounts of data.")
7107 (license license:bsd-3)))
7108
7109(define-public python2-tables
7110 (package-with-python2 python-tables))
7111
7112(define-public python-pyasn1
7113 (package
7114 (name "python-pyasn1")
7115 (version "0.4.3")
7116 (source
7117 (origin
7118 (method url-fetch)
7119 (uri (pypi-uri "pyasn1" version))
7120 (sha256
7121 (base32
7122 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7123 (build-system python-build-system)
7124 (home-page "http://pyasn1.sourceforge.net/")
7125 (synopsis "ASN.1 types and codecs")
7126 (description
7127 "This is an implementation of ASN.1 types and codecs in Python. It is
7128suitable for a wide range of protocols based on the ASN.1 specification.")
7129 (license license:bsd-2)))
7130
7131(define-public python2-pyasn1
7132 (package-with-python2 python-pyasn1))
7133
7134(define-public python-pyasn1-modules
7135 (package
7136 (name "python-pyasn1-modules")
7137 (version "0.2.2")
7138 (source
7139 (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "pyasn1-modules" version))
7142 (sha256
7143 (base32
7144 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7145 (build-system python-build-system)
7146 (propagated-inputs
7147 `(("python-pyasn1" ,python-pyasn1)))
7148 (home-page "https://sourceforge.net/projects/pyasn1/")
7149 (synopsis "ASN.1 codec implementations")
7150 (description
7151 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7152implementations of ASN.1-based codecs and protocols.")
7153 (license license:bsd-3)))
7154
7155(define-public python2-pyasn1-modules
7156 (package-with-python2 python-pyasn1-modules))
7157
7158(define-public python-ipaddress
7159 (package
7160 (name "python-ipaddress")
7161 (version "1.0.22")
7162 (source (origin
7163 (method url-fetch)
7164 (uri (pypi-uri "ipaddress" version))
7165 (sha256
7166 (base32
7167 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7168 (build-system python-build-system)
7169 (home-page "https://github.com/phihag/ipaddress")
7170 (synopsis "IP address manipulation library")
7171 (description
7172 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7173 in Python. This library is used to create, poke at, and manipulate IPv4 and
7174 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7175 module to older versions of Python.")
7176 (license license:psfl)))
7177
7178(define-public python2-ipaddress
7179 (package-with-python2 python-ipaddress))
7180
7181(define-public python2-ipaddr
7182 (package
7183 (name "python2-ipaddr")
7184 (version "2.1.11")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "ipaddr" version))
7189 (sha256
7190 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7191 (build-system python-build-system)
7192 (arguments
7193 `(#:python ,python-2 ;version 2 only
7194 #:phases
7195 (modify-phases %standard-phases
7196 (replace 'check
40b8c4e3 7197 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7198 (home-page "https://github.com/google/ipaddr-py")
7199 (synopsis "IP address manipulation library")
7200 (description
7201 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7202IPv6 addresses and networks.
7203
7204For new implementations you may prefer to use the standard module
7205@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7206versions of Python.")
7207 (license license:asl2.0)))
7208
7209(define-public python-idna
7210 (package
7211 (name "python-idna")
e95c9837 7212 (version "2.8")
44d10b1f
RW
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (pypi-uri "idna" version))
7217 (sha256
7218 (base32
e95c9837 7219 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7220 (build-system python-build-system)
7221 (home-page "https://github.com/kjd/idna")
7222 (synopsis "Internationalized domain names in applications")
7223 (description
7224 "This is a library to support the Internationalised Domain Names in
7225Applications (IDNA) protocol as specified in RFC 5891. This version of the
7226protocol is often referred to as “IDNA2008” and can produce different results
7227from the earlier standard from 2003. The library is also intended to act as a
7228suitable drop-in replacement for the “encodings.idna” module that comes with
7229the Python standard library but currently only supports the older 2003
7230specification.")
7231 (license license:bsd-4)))
7232
7233(define-public python2-idna
7234 (package-with-python2 python-idna))
7235
7236(define-public python-idna-ssl
7237 (package
7238 (name "python-idna-ssl")
7239 (version "1.0.1")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "idna-ssl" version))
7244 (sha256
7245 (base32
7246 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7247 (build-system python-build-system)
7248 (arguments
7249 `(#:tests? #f)) ;circular dependency with python-aiohttp
7250 (home-page "https://github.com/aio-libs/idna-ssl")
7251 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7252 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7253domains support.")
7254 (license license:expat)))
7255
7256(define-public python-pretend
7257 (package
7258 (name "python-pretend")
7259 (version "1.0.9")
7260 (source
7261 (origin
7262 (method url-fetch)
9f1f22ee 7263 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7264 (sha256
7265 (base32
7266 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7267 (build-system python-build-system)
7268 (home-page "https://github.com/alex/pretend")
7269 (synopsis "Library for stubbing in Python")
7270 (description
7271 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7272technique for writing tests. You may hear the term mixed up with mocks,
7273fakes, or doubles. Basically, a stub is an object that returns pre-canned
7274responses, rather than doing any computation.")
7275 (license license:bsd-3)))
7276
7277(define-public python2-pretend
7278 (package-with-python2 python-pretend))
7279
7280(define-public python-pip
7281 (package
7282 (name "python-pip")
7283 (version "18.1")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "pip" version))
7288 (sha256
7289 (base32
7290 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
7291 (build-system python-build-system)
7292 (arguments
7293 '(#:tests? #f)) ; there are no tests in the pypi archive.
7294 (home-page "https://pip.pypa.io/")
7295 (synopsis "Package manager for Python software")
7296 (description
7297 "Pip is a package manager for Python software, that finds packages on the
7298Python Package Index (PyPI).")
7299 (license license:expat)))
7300
7301(define-public python2-pip
7302 (package-with-python2 python-pip))
7303
7304(define-public python-tlsh
7305 (package
7306 (name "python-tlsh")
7307 (version "3.4.5")
7308 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7309 (source
7310 (origin
7311 (method git-fetch)
7312 (uri (git-reference
7313 (url "https://github.com/trendmicro/tlsh.git")
7314 (commit (string-append "v" version))))
7315 (file-name (git-file-name name version))
7316 (sha256
7317 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7318 (build-system cmake-build-system)
7319 (arguments
7320 '(#:out-of-source? #f
7321 #:phases (modify-phases %standard-phases
7322 (replace
7323 'install
7324 (lambda* (#:key outputs #:allow-other-keys)
7325 ;; Build and install the Python bindings. The underlying
7326 ;; C++ library is apparently not meant to be installed.
7327 (let ((out (assoc-ref outputs "out")))
7328 (with-directory-excursion "py_ext"
7329 (and (system* "python" "setup.py" "build")
7330 (system* "python" "setup.py" "install"
7331 (string-append "--prefix=" out))))))))))
7332 (inputs `(("python" ,python-wrapper))) ;for the bindings
7333 (synopsis "Fuzzy matching library for Python")
7334 (description
7335 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7336Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7337value which can be used for similarity comparisons. Similar objects have
7338similar hash values, which allows for the detection of similar objects by
7339comparing their hash values. The byte stream should have a sufficient amount
7340of complexity; for example, a byte stream of identical bytes will not generate
7341a hash value.")
7342 (license license:asl2.0)))
7343
7344(define-public python2-tlsh
7345 (package
7346 (inherit python-tlsh)
7347 (name "python2-tlsh")
7348 (inputs `(("python" ,python-2)))))
7349
7350(define-public python-termcolor
7351 (package
7352 (name "python-termcolor")
7353 (version "1.1.0")
7354 (source
7355 (origin
7356 (method url-fetch)
7357 (uri (pypi-uri "termcolor" version))
7358 (sha256
7359 (base32
7360 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7361 (build-system python-build-system)
7362 (arguments
7363 ;; There are no tests.
7364 `(#:tests? #f))
7365 (home-page "https://pypi.python.org/pypi/termcolor")
7366 (synopsis "ANSII Color formatting for terminal output")
7367 (description
7368 "This package provides ANSII Color formatting for output in terminals.")
7369 (license license:expat)))
7370
7371(define-public python2-termcolor
7372 (package-with-python2 python-termcolor))
7373
7374(define-public python-libarchive-c
7375 (package
7376 (name "python-libarchive-c")
7377 (version "2.8")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "libarchive-c" version))
7381 (sha256
7382 (base32
7383 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7384 (build-system python-build-system)
7385 (arguments
7386 '(#:phases (modify-phases %standard-phases
7387 (add-before
7388 'build 'reference-libarchive
7389 (lambda* (#:key inputs #:allow-other-keys)
7390 ;; Retain the absolute file name of libarchive.so.
7391 (let ((libarchive (assoc-ref inputs "libarchive")))
7392 (substitute* "libarchive/ffi.py"
7393 (("find_library\\('archive'\\)")
7394 (string-append "'" libarchive
7395 "/lib/libarchive.so'"))))))
7396 (replace 'check
7397 (lambda _ (invoke "pytest" "-vv"))))))
7398 (native-inputs
7399 `(("python-mock" ,python-mock)
7400 ("python-pytest" ,python-pytest)))
7401 (inputs
7402 `(("libarchive" ,libarchive)))
7403 (home-page "https://github.com/Changaco/python-libarchive-c")
7404 (synopsis "Python interface to libarchive")
7405 (description
7406 "This package provides Python bindings to libarchive, a C library to
7407access possibly compressed archives in many different formats. It uses
7408Python's @code{ctypes} foreign function interface (FFI).")
7409 (license license:lgpl2.0+)))
7410
7411(define-public python2-libarchive-c
7412 (package-with-python2 python-libarchive-c))
7413
7414(define-public python-file
7415 (package
7416 (inherit file)
7417 (name "python-file")
7418 (build-system python-build-system)
7419 (arguments
7420 '(#:tests? #f ;no tests
7421 #:configure-flags '("--single-version-externally-managed" "--root=/")
7422 #:phases (modify-phases %standard-phases
7423 (add-before 'build 'change-directory
7424 (lambda _
7425 (chdir "python")
7426 #t))
7427 (add-before 'build 'set-library-file-name
7428 (lambda* (#:key inputs #:allow-other-keys)
7429 (let ((file (assoc-ref inputs "file")))
7430 (substitute* "magic.py"
7431 (("find_library\\('magic'\\)")
7432 (string-append "'" file "/lib/libmagic.so'")))
7433 #t))))))
7434 (inputs `(("file" ,file)))
528ea990
LC
7435 (native-inputs (if (%current-target-system)
7436 `(("self" ,this-package))
7437 '()))
44d10b1f
RW
7438 (synopsis "Python bindings to the libmagic file type guesser. Note that
7439this module and the python-magic module both provide a \"magic.py\" file;
7440these two modules, which are different and were developed separately, both
7441serve the same purpose: provide Python bindings for libmagic.")))
7442
7443(define-public python2-file
7444 (package-with-python2 python-file))
7445
7446(define-public python-debian
7447 (package
7448 (name "python-debian")
7449 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7450 (version "0.1.28")
7451 (source
7452 (origin
7453 (method url-fetch)
7454 (uri (pypi-uri name version))
7455 (sha256
7456 (base32
7457 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7458 (build-system python-build-system)
7459 (propagated-inputs
7460 `(("python-six" ,python-six)))
7461 (synopsis "Debian package related modules")
7462 (description
7463 ;; XXX: Use @enumerate instead of @itemize to work around
7464 ;; <http://bugs.gnu.org/21772>.
7465 "This package provides Python modules that abstract many formats of
7466Debian-related files, such as:
7467
7468@enumerate
7469@item Debtags information;
7470@item @file{debian/changelog} files;
7471@item packages files, pdiffs;
7472@item control files of single or multiple RFC822-style paragraphs---e.g.
7473 @file{debian/control}, @file{.changes}, @file{.dsc};
7474@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7475 contained files and meta-information.
7476@end enumerate\n")
7477
7478 ;; Modules are either GPLv2+ or GPLv3+.
7479 (license license:gpl3+)))
7480
7481(define-public python2-debian
7482 (package-with-python2 python-debian))
7483
7484(define-public python-nbformat
7485 (package
7486 (name "python-nbformat")
7487 (version "4.4.0")
7488 (source
7489 (origin
7490 (method url-fetch)
7491 (uri (pypi-uri "nbformat" version))
7492 (sha256
7493 (base32
7494 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7495 (build-system python-build-system)
7496 (arguments `(#:tests? #f)) ; no test target
7497 (propagated-inputs
7498 `(("python-ipython-genutils" ,python-ipython-genutils)
7499 ("python-jsonschema" ,python-jsonschema)
7500 ("python-jupyter-core" ,python-jupyter-core)
7501 ("python-traitlets" ,python-traitlets)))
7502 (home-page "http://jupyter.org")
7503 (synopsis "Jupyter Notebook format")
7504 (description "This package provides the reference implementation of the
7505Jupyter Notebook format and Python APIs for working with notebooks.")
7506 (license license:bsd-3)))
7507
7508(define-public python2-nbformat
7509 (package-with-python2 python-nbformat))
7510
7511(define-public python-bleach
7512 (package
7513 (name "python-bleach")
7514 (version "1.4.3")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "bleach" version))
7519 (sha256
7520 (base32
7521 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7522 (build-system python-build-system)
7523 (propagated-inputs
7524 `(("python-html5lib" ,python-html5lib-0.9)
7525 ("python-six" ,python-six)))
7526 (native-inputs
7527 `(("python-nose" ,python-nose)))
7528 (home-page "https://github.com/jsocol/bleach")
7529 (synopsis "Whitelist-based HTML-sanitizing tool")
7530 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7531 (license license:asl2.0)))
7532
7533(define-public python2-bleach
7534 (package-with-python2 python-bleach))
7535
7536(define-public python-entrypoints
7537 (package
7538 (name "python-entrypoints")
a7f1b718 7539 (version "0.3")
44d10b1f
RW
7540 (source
7541 (origin
7542 (method url-fetch)
a7f1b718 7543 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7544 (sha256
7545 (base32
a7f1b718 7546 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7547 (build-system python-build-system)
7548 ;; The package does not come with a setup.py file, so we have to generate
7549 ;; one ourselves.
7550 (arguments
7551 `(#:tests? #f
7552 #:phases
7553 (modify-phases %standard-phases
7554 (add-after 'unpack 'create-setup.py
7555 (lambda _
7556 (call-with-output-file "setup.py"
7557 (lambda (port)
7558 (format port "\
7559from setuptools import setup
7560setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7561" ,version))))))))
7562 (home-page "https://github.com/takluyver/entrypoints")
7563 (synopsis "Discover and load entry points from installed Python packages")
7564 (description "Entry points are a way for Python packages to advertise
7565objects with some common interface. The most common examples are
7566@code{console_scripts} entry points, which define shell commands by
7567identifying a Python function to run. The @code{entrypoints} module contains
7568functions to find and load entry points.")
7569 (license license:expat)))
7570
7571(define-public python2-entrypoints
7572 (package-with-python2 python-entrypoints))
7573
7574(define-public python-nbconvert
7575 (package
7576 (name "python-nbconvert")
7577 (version "5.0.0b1")
7578 (source
7579 (origin
7580 (method url-fetch)
7581 (uri (pypi-uri "nbconvert" version))
7582 (sha256
7583 (base32
7584 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7585 (build-system python-build-system)
7586 (arguments
7587 `(;; The "bdist_egg" target is disabled by default, causing the installation
7588 ;; to fail.
7589 #:configure-flags (list "bdist_egg")
7590 ;; FIXME: 5 failures, 40 errors.
7591 #:tests? #f))
7592 ;; #:phases
7593 ;; (modify-phases %standard-phases
7594 ;; (replace 'check
7595 ;; (lambda _
7596 ;; (zero? (system* "py.test" "-v")))))
7597 (native-inputs
7598 `(("python-pytest" ,python-pytest)))
7599 (propagated-inputs
7600 `(("python-bleach" ,python-bleach)
7601 ("python-entrypoints" ,python-entrypoints)
7602 ("python-jinja2" ,python-jinja2)
7603 ("python-jupyter-core" ,python-jupyter-core)
7604 ("python-mistune" ,python-mistune)
7605 ("python-nbformat" ,python-nbformat)
7606 ("python-pygments" ,python-pygments)
7607 ("python-traitlets" ,python-traitlets)))
7608 (home-page "http://jupyter.org")
7609 (synopsis "Converting Jupyter Notebooks")
7610 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7611notebooks to various other formats via Jinja templates. It allows you to
7612convert an @code{.ipynb} notebook file into various static formats including:
7613
7614@enumerate
7615@item HTML
7616@item LaTeX
7617@item PDF
7618@item Reveal JS
7619@item Markdown (md)
7620@item ReStructured Text (rst)
7621@item executable script
7622@end enumerate\n")
7623 (license license:bsd-3)))
7624
7625(define-public python2-nbconvert
7626 (package-with-python2 python-nbconvert))
7627
44d10b1f
RW
7628(define-public python-notebook
7629 (package
7630 (name "python-notebook")
7631 (version "5.7.4")
7632 (source (origin
7633 (method url-fetch)
7634 (uri (pypi-uri "notebook" version))
7635 (sha256
7636 (base32
7637 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7638 (build-system python-build-system)
7639 (arguments
7640 `(#:phases
7641 (modify-phases %standard-phases
7642 (replace 'check
7643 (lambda _
7644 ;; These tests require a browser
7645 (delete-file-recursively "notebook/tests/selenium")
7646 ;; Some tests need HOME
7647 (setenv "HOME" "/tmp")
7648 ;; This file contains "warningfilters", which are not supported
7649 ;; by this version of nose.
7650 (delete-file "setup.cfg")
7651 (with-directory-excursion "/tmp"
7652 (invoke "nosetests" "-v"))
7653 #t)))))
7654 (propagated-inputs
7655 `(("python-jupyter-core" ,python-jupyter-core)
7656 ("python-nbformat" ,python-nbformat)
7657 ("python-nbconvert" ,python-nbconvert)
7658 ("python-prometheus-client" ,python-prometheus-client)
7659 ("python-send2trash" ,python-send2trash)
7660 ("python-terminado" ,python-terminado)))
7661 (native-inputs
7662 `(("python-nose" ,python-nose)
7663 ("python-sphinx" ,python-sphinx)
7664 ("python-requests" ,python-requests)))
7665 (home-page "http://jupyter.org/")
7666 (synopsis "Web-based notebook environment for interactive computing")
7667 (description
7668 "The Jupyter HTML notebook is a web-based notebook environment for
7669interactive computing.")
7670 (properties `((python2-variant . ,(delay python2-notebook))))
7671 (license license:bsd-3)))
7672
7673(define-public python2-notebook
7674 (let ((base (package-with-python2
7675 (strip-python2-variant python-notebook))))
7676 (package (inherit base)
7677 (native-inputs
7678 `(("python2-mock" ,python2-mock)
7679 ,@(package-native-inputs base)))
7680 (arguments
7681 (substitute-keyword-arguments (package-arguments base)
7682 ((#:phases phases)
7683 `(modify-phases ,phases
7684 (add-before 'check 'disable-test-case
7685 ;; The test requires network access to localhost. Curiously it
7686 ;; fails with Python 2 only. Simply make the test-case return
7687 ;; immediately.
7688 (lambda _
7689 (substitute*
7690 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7691 (("formats = self.nbconvert_api") "return #")))))))))))
7692
7693(define-public python-widgetsnbextension
7694 (package
7695 (name "python-widgetsnbextension")
7696 (version "3.4.2")
7697 (source
7698 (origin
7699 (method url-fetch)
7700 (uri (pypi-uri "widgetsnbextension" version))
7701 (sha256
7702 (base32
7703 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7704 (build-system python-build-system)
7705 (propagated-inputs
7706 `(("python-ipykernel" ,python-ipykernel)
7707 ("python-notebook" ,python-notebook)))
7708 (native-inputs
7709 `(("python-certifi" ,python-certifi)
7710 ("python-nose" ,python-nose)))
7711 (home-page "https://ipython.org")
7712 (synopsis "IPython HTML widgets for Jupyter")
7713 (description "This package provides interactive HTML widgets for Jupyter
7714notebooks.")
7715 (license license:bsd-3)))
7716
7717(define-public python2-widgetsnbextension
7718 (package-with-python2 python-widgetsnbextension))
7719
7720(define-public python-ipywidgets
7721 (package
7722 (name "python-ipywidgets")
7723 (version "5.2.2")
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "ipywidgets" version))
7728 (sha256
7729 (base32
7730 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7731 (build-system python-build-system)
7732 (propagated-inputs
7733 `(("python-ipython" ,python-ipython)
7734 ("python-traitlets" ,python-traitlets)
7735 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7736 (native-inputs
7737 `(("python-nose" ,python-nose)
7738 ("python-pytest" ,python-pytest)))
7739 (home-page "https://ipython.org")
7740 (synopsis "IPython HTML widgets for Jupyter")
7741 (description "Ipywidgets are interactive HTML widgets for Jupyter
7742notebooks and the IPython kernel. Notebooks come alive when interactive
7743widgets are used. Users gain control of their data and can visualize changes
7744in the data.")
7745 (license license:bsd-3)))
7746
7747(define-public python2-ipywidgets
7748 (package-with-python2 python-ipywidgets))
7749
7750(define-public python-jupyter-console
7751 (package
7752 (name "python-jupyter-console")
becb9cbf 7753 (version "6.0.0")
44d10b1f
RW
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "jupyter_console" version))
7758 (sha256
7759 (base32
becb9cbf 7760 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7761 (build-system python-build-system)
44d10b1f
RW
7762 (propagated-inputs
7763 `(("python-ipykernel" ,python-ipykernel)
7764 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7765 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7766 ("python-pygments" ,python-pygments)))
7767 (native-inputs
7768 `(("python-nose" ,python-nose)))
7769 (home-page "https://jupyter.org")
7770 (synopsis "Jupyter terminal console")
7771 (description "This package provides a terminal-based console frontend for
7772Jupyter kernels. It also allows for console-based interaction with non-Python
7773Jupyter kernels such as IJulia and IRKernel.")
7774 (license license:bsd-3)))
7775
7776(define-public python2-jupyter-console
8e590c81
RW
7777 (package
7778 (name "python2-jupyter-console")
7779 (version "5.2.0")
7780 (source
7781 (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "jupyter_console" version))
7784 (sha256
7785 (base32
7786 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7787 (build-system python-build-system)
7788 ;; Tests only run in an TTY.
7789 (arguments `(#:tests? #f))
7790 (propagated-inputs
7791 `(("python2-ipykernel" ,python2-ipykernel)
7792 ("python2-jupyter-client" ,python2-jupyter-client)
7793 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7794 ("python2-pygments" ,python2-pygments)))
7795 (native-inputs
7796 `(("python2-nose" ,python2-nose)))
7797 (home-page "https://jupyter.org")
7798 (synopsis "Jupyter terminal console")
7799 (description "This package provides a terminal-based console frontend for
7800Jupyter kernels. It also allows for console-based interaction with non-Python
7801Jupyter kernels such as IJulia and IRKernel.")
7802 (license license:bsd-3)))
44d10b1f
RW
7803
7804;; The python-ipython and python-jupyter-console require each other. To get
7805;; the functionality in both packages working, strip down the
7806;; python-jupyter-console package when using it as an input to python-ipython.
7807(define python-jupyter-console-minimal
7808 (package
7809 (inherit python-jupyter-console)
7810 (name "python-jupyter-console-minimal")
7811 (arguments
7812 (substitute-keyword-arguments
7813 (package-arguments python-jupyter-console)
7814 ((#:phases phases)
7815 `(modify-phases ,phases
7816 (add-after 'install 'delete-bin
7817 (lambda* (#:key outputs #:allow-other-keys)
7818 ;; Delete the bin files, to avoid conflicts in profiles
7819 ;; where python-ipython and python-jupyter-console are
7820 ;; both present.
7821 (delete-file-recursively
7822 (string-append
7823 (assoc-ref outputs "out") "/bin"))))))))
7824 ;; Remove the python-ipython propagated input, to avoid the cycle
7825 (propagated-inputs
7826 (alist-delete
7827 "python-ipython"
7828 (package-propagated-inputs python-jupyter-console)))))
7829
7830(define-public python-qtconsole
7831 (package
7832 (name "python-qtconsole")
7833 (version "4.4.3")
7834 (source
7835 (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "qtconsole" version))
7838 (sha256
7839 (base32
7840 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7841 (build-system python-build-system)
7842 (arguments
7843 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7844 ;; but we only have the LTS version 5.x. This means that there might be
7845 ;; runtime errors, but since this is a dependency of the Jupyter package,
7846 ;; and Jupyter can be used without the qtconsole we can overlook this for
7847 ;; now.
7848 `(#:tests? #f
7849 #:phases
7850 (modify-phases %standard-phases
7851 (add-before 'check 'pre-check
7852 (lambda _
7853 (setenv "QT_QPA_PLATFORM" "offscreen")
7854 #t)))))
7855 (propagated-inputs
7856 `(("python-ipykernel" ,python-ipykernel)
7857 ("python-ipython" ,python-ipython)))
7858 (native-inputs
7859 `(("python-pytest" ,python-pytest)))
7860 (home-page "http://jupyter.org")
7861 (synopsis "Jupyter Qt console")
7862 (description "This package provides a Qt-based console for Jupyter with
7863support for rich media output.")
7864 (license license:bsd-3)))
7865
7866(define-public jupyter
7867 (package
7868 (name "jupyter")
7869 (version "1.0.0")
7870 (source
7871 (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "jupyter" version))
7874 (sha256
7875 (base32
7876 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7877 (build-system python-build-system)
7878 (arguments '(#:tests? #f)) ; there are none.
7879 (propagated-inputs
7880 `(("python-ipykernel" ,python-ipykernel)
7881 ("python-ipywidgets" ,python-ipywidgets)
7882 ("python-jupyter-console" ,python-jupyter-console)
7883 ("python-nbconvert" ,python-nbconvert)
7884 ("python-notebook" ,python-notebook)
7885 ("python-qtconsole" ,python-qtconsole)))
7886 (native-search-paths
7887 (list (search-path-specification
7888 (variable "JUPYTER_PATH")
7889 (files '("share/jupyter")))))
7890 (home-page "https://jupyter.org")
7891 (synopsis "Web application for interactive documents")
7892 (description
7893 "The Jupyter Notebook is a web application that allows you to create and
7894share documents that contain live code, equations, visualizations and
7895explanatory text. Uses include: data cleaning and transformation, numerical
7896simulation, statistical modeling, machine learning and much more.")
7897 (license license:bsd-3)))
7898
7899(define-public python-chardet
7900 (package
7901 (name "python-chardet")
7902 (version "3.0.4")
7903 (source
7904 (origin
7905 (method url-fetch)
7906 (uri (pypi-uri "chardet" version))
7907 (sha256
7908 (base32
7909 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7910 (native-inputs
7911 `(("python-hypothesis" ,python-hypothesis)
7912 ("python-pytest" ,python-pytest)
7913 ("python-pytest-runner" ,python-pytest-runner)))
7914 (build-system python-build-system)
3d369407
MB
7915 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7916 (arguments `(#:tests? #f))
44d10b1f
RW
7917 (home-page "https://github.com/chardet/chardet")
7918 (synopsis "Universal encoding detector for Python 2 and 3")
7919 (description
7920 "This package provides @code{chardet}, a Python module that can
7921automatically detect a wide range of file encodings.")
7922 (license license:lgpl2.1+)))
7923
7924(define-public python2-chardet
7925 (package-with-python2 python-chardet))
7926
7927(define-public python-docopt
7928 (package
7929 (name "python-docopt")
7930 (version "0.6.2")
7931 (source
7932 (origin
7933 (method url-fetch)
7934 ;; The release on PyPI does not include tests.
7935 (uri (string-append
7936 "https://github.com/docopt/docopt/archive/"
7937 version ".tar.gz"))
7938 (file-name (string-append name "-" version ".tar.gz"))
7939 (sha256
7940 (base32
7941 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7942 (build-system python-build-system)
7943 (native-inputs
7944 `(("python-pytest" ,python-pytest)))
7945 (arguments
7946 `(#:phases
7947 (modify-phases %standard-phases
7948 (replace 'check
7949 (lambda _ (invoke "py.test"))))))
7950 (home-page "http://docopt.org")
7951 (synopsis "Command-line interface description language for Python")
7952 (description "This library allows the user to define a command-line
7953interface from a program's help message rather than specifying it
4ca7207b 7954programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
7955@code{argparse}.")
7956 (license license:expat)))
7957
7958(define-public python2-docopt
7959 (package-with-python2 python-docopt))
7960
7961(define-public python-pythondialog
7962 (package
7963 (name "python-pythondialog")
7964 (version "3.4.0")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "pythondialog" version))
7969 (sha256
7970 (base32
7971 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7972 (build-system python-build-system)
7973 (arguments
7974 `(#:phases
7975 (modify-phases %standard-phases
7976 (add-after 'unpack 'patch-path
7977 (lambda* (#:key inputs #:allow-other-keys)
7978 (let* ((dialog (assoc-ref inputs "dialog")))
7979 ;; Since this library really wants to grovel the search path, we
7980 ;; must hardcode dialog's store path into it.
7981 (substitute* "dialog.py"
7982 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7983 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7984 #t))))
7985 #:tests? #f)) ; no test suite
7986 (propagated-inputs
7987 `(("dialog" ,dialog)))
7988 (home-page "http://pythondialog.sourceforge.net/")
7989 (synopsis "Python interface to the UNIX dialog utility")
7990 (description "A Python wrapper for the dialog utility. Its purpose is to
7991provide an easy to use, pythonic and comprehensive Python interface to dialog.
7992This allows one to make simple text-mode user interfaces on Unix-like systems")
7993 (license license:lgpl2.1)
7994 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7995
7996(define-public python2-pythondialog
7997 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7998 (package
7999 (inherit base)
8000 (version (package-version python-pythondialog))
8001 (source (origin
8002 (method url-fetch)
8003 (uri (pypi-uri "python2-pythondialog" version))
8004 (sha256
8005 (base32
8006 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8007
8008(define-public python-configobj
8009 (package
8010 (name "python-configobj")
8011 (version "5.0.6")
8012 (source (origin
8013 (method url-fetch)
b0758fbb 8014 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8015 (sha256
8016 (base32
8017 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8018 ;; Patch setup.py so it looks for python-setuptools, which is
8019 ;; required to parse the keyword 'install_requires' in setup.py.
8020 (patches (search-patches "python-configobj-setuptools.patch"))))
8021 (build-system python-build-system)
8022 (propagated-inputs
8023 `(("python-six" ,python-six)))
8024 (synopsis "Config file reading, writing and validation")
8025 (description "ConfigObj is a simple but powerful config file reader and
8026writer: an ini file round tripper. Its main feature is that it is very easy to
8027use, with a straightforward programmer’s interface and a simple syntax for
8028config files.")
8029 (home-page "https://github.com/DiffSK/configobj")
8030 (license license:bsd-3)))
8031
8032(define-public python2-configobj
8033 (package-with-python2 python-configobj))
8034
8035(define-public python-configargparse
8036 (package
8037 (name "python-configargparse")
86ae491f 8038 (version "0.14.0")
44d10b1f
RW
8039 (source (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "ConfigArgParse" version))
8042 (sha256
8043 (base32
86ae491f 8044 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8045 (build-system python-build-system)
8046 (native-inputs
8047 `(("python-pyyaml" ,python-pyyaml)))
8048 (arguments
8049 `(#:phases
8050 (modify-phases %standard-phases
8051 (replace 'check
8052 (lambda _
8053 ;; Bypass setuptools-shim because one test relies on "setup.py"
8054 ;; being the first argument passed to the python call.
8055 ;;
8056 ;; NOTE: Many tests do not run because they rely on Python's
8057 ;; built-in test.test_argparse, but we remove the unit tests from
8058 ;; our Python installation.
8059 (invoke "python" "setup.py" "test"))))))
8060 (synopsis "Replacement for argparse")
8061 (description "A drop-in replacement for argparse that allows options to also
8062be set via config files and/or environment variables.")
8063 (home-page "https://github.com/bw2/ConfigArgParse")
8064 (license license:expat)))
8065
8066(define-public python2-configargparse
8067 (package-with-python2 python-configargparse))
8068
8069(define-public python-argparse-manpage
8070 (package
8071 (name "python-argparse-manpage")
8072 (version "1.1")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "argparse-manpage" version))
8077 (sha256
8078 (base32
8079 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8080 (build-system python-build-system)
8081 (home-page "https://github.com/praiskup/argparse-manpage")
8082 (synopsis "Build manual page from Python's ArgumentParser object")
8083 (description
8084 "This package provides tools to build manual pages from Python's
8085@code{ArgumentParser} object.")
8086 (license license:asl2.0)))
8087
3e8f76d8
RW
8088(define-public python-contextlib2
8089 (package
8090 (name "python-contextlib2")
8091 (version "0.5.5")
8092 (source
8093 (origin
8094 (method url-fetch)
8095 (uri (pypi-uri "contextlib2" version))
8096 (sha256
8097 (base32
8098 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8099 (build-system python-build-system)
8100 (home-page "http://contextlib2.readthedocs.org/")
8101 (synopsis "Tools for decorators and context managers")
8102 (description "This module is primarily a backport of the Python
81033.2 contextlib to earlier Python versions. Like contextlib, it
8104provides utilities for common tasks involving decorators and context
8105managers. It also contains additional features that are not part of
8106the standard library.")
8107 (license license:psfl)))
8108
44d10b1f
RW
8109(define-public python2-contextlib2
8110 (package
8111 (name "python2-contextlib2")
8112 (version "0.5.5")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "contextlib2" version))
8117 (sha256
8118 (base32
8119 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8120 (build-system python-build-system)
8121 (arguments
8122 `(#:python ,python-2
8123 #:phases
8124 (modify-phases %standard-phases
8125 (replace 'check
8126 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8127 (native-inputs
8128 `(("python2-unittest2" ,python2-unittest2)))
8129 (home-page "http://contextlib2.readthedocs.org/")
8130 (synopsis "Tools for decorators and context managers")
8131 (description "This module is primarily a backport of the Python
81323.2 contextlib to earlier Python versions. Like contextlib, it
8133provides utilities for common tasks involving decorators and context
8134managers. It also contains additional features that are not part of
8135the standard library.")
8136 (license license:psfl)))
8137
8138(define-public python-texttable
8139 (package
8140 (name "python-texttable")
8141 (version "0.8.7")
8142 (source
8143 (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "texttable" version))
8146 (sha256
8147 (base32
8148 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8149 (build-system python-build-system)
8150 (arguments '(#:tests? #f)) ; no tests
8151 (home-page "https://github.com/foutaise/texttable/")
8152 (synopsis "Python module for creating simple ASCII tables")
8153 (description "Texttable is a Python module for creating simple ASCII
8154tables.")
8155 (license license:lgpl2.1+)))
8156
8157(define-public python2-texttable
8158 (package-with-python2 python-texttable))
8159
8160(define-public python-atomicwrites
8161 (package
8162 (name "python-atomicwrites")
14f10479 8163 (version "1.3.0")
44d10b1f
RW
8164 (source (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "atomicwrites" version))
8167 (sha256
8168 (base32
14f10479 8169 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8170 (build-system python-build-system)
8171 (synopsis "Atomic file writes in Python")
8172 (description "Library for atomic file writes using platform dependent tools
8173for atomic file system operations.")
8174 (home-page "https://github.com/untitaker/python-atomicwrites")
8175 (license license:expat)))
8176
8177(define-public python2-atomicwrites
8178 (package-with-python2 python-atomicwrites))
8179
8180(define-public python-click-threading
8181 (package
8182 (name "python-click-threading")
8183 (version "0.4.4")
8184 (source (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "click-threading" version))
8187 (sha256
8188 (base32
8189 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8190 (build-system python-build-system)
8191 (propagated-inputs
8192 `(("python-click" ,python-click)))
8193 (synopsis "Utilities for multithreading in Click")
8194 (description "This package provides utilities for multithreading in Click
8195applications.")
8196 (home-page "https://github.com/click-contrib/click-threading")
8197 (license license:expat)))
8198
8199(define-public python-click-log
8200 (package
8201 (name "python-click-log")
8202 (version "0.3.2")
8203 (source (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "click-log" version))
8206 (sha256
8207 (base32
8208 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8209 (build-system python-build-system)
8210 (propagated-inputs
8211 `(("python-click" ,python-click)))
8212 (synopsis "Logging for click applications")
8213 (description "This package provides a Python library for logging Click
8214applications.")
8215 (home-page "https://github.com/click-contrib/click-log")
8216 (license license:expat)))
8217
8218(define-public python-apipkg
8219 (package
8220 (name "python-apipkg")
8221 (version "1.4")
8222 (source (origin
8223 (method url-fetch)
8224 (uri (pypi-uri "apipkg" version))
8225 (sha256
8226 (base32
8227 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8228 (build-system python-build-system)
8229 (native-inputs
8230 `(("python-pytest" ,python-pytest)))
8231 (synopsis "Namespace control and lazy-import mechanism")
8232 (description "With apipkg you can control the exported namespace of a Python
8233package and greatly reduce the number of imports for your users. It is a small
8234pure Python module that works on virtually all Python versions.")
8235 (home-page "https://github.com/pytest-dev/apipkg")
8236 (license license:expat)))
8237
8238(define-public python2-apipkg
8239 (package-with-python2 python-apipkg))
8240
8241(define-public python-execnet
8242 (package
8243 (name "python-execnet")
8244 (version "1.4.1")
8245 (source (origin
8246 (method url-fetch)
8247 (uri (pypi-uri "execnet" version))
8248 (sha256
8249 (base32
8250 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8251 (build-system python-build-system)
8252 (arguments
8253 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8254 ;; The two test failures are caused by the lack of an `ssh` executable.
8255 ;; The test suite can be run with pytest after the 'install' phase.
8256 #:tests? #f))
8257 (native-inputs
8258 `(("python-pytest" ,python-pytest)
8259 ("python-setuptools-scm" ,python-setuptools-scm)))
8260 (propagated-inputs
8261 `(("python-apipkg" ,python-apipkg)))
8262 (synopsis "Rapid multi-Python deployment")
8263 (description "Execnet provides a share-nothing model with
8264channel-send/receive communication for distributing execution across many
8265Python interpreters across version, platform and network barriers. It has a
8266minimal and fast API targeting the following uses:
8267@enumerate
8268@item distribute tasks to (many) local or remote CPUs
8269@item write and deploy hybrid multi-process applications
8270@item write scripts to administer multiple environments
8271@end enumerate")
8272 (home-page "http://codespeak.net/execnet/")
8273 (license license:expat)))
8274
8275(define-public python2-execnet
8276 (package-with-python2 python-execnet))
8277
8278(define-public python-icalendar
8279 (package
8280 (name "python-icalendar")
8281 (version "4.0.3")
8282 (source (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "icalendar" version))
8285 (sha256
8286 (base32
8287 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8288 (build-system python-build-system)
8289 (propagated-inputs
8290 `(("python-dateutil" ,python-dateutil)
8291 ("python-pytz" ,python-pytz)))
8292 (synopsis "Python library for parsing iCalendar files")
8293 (description "The icalendar package is a parser/generator of iCalendar
8294files for use with Python.")
8295 (home-page "https://github.com/collective/icalendar")
8296 (license license:bsd-2)))
8297
44d10b1f
RW
8298(define-public python-args
8299 (package
8300 (name "python-args")
8301 (version "0.1.0")
8302 (source (origin
8303 (method url-fetch)
8304 (uri (pypi-uri "args" version))
8305 (sha256
8306 (base32
8307 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8308 (build-system python-build-system)
8309 (home-page "https://github.com/kennethreitz/args")
8310 (synopsis "Command-line argument parser")
8311 (description
8312 "This library provides a Python module to parse command-line arguments.")
8313 (license license:bsd-3)))
8314
8315(define-public python2-args
8316 (package-with-python2 python-args))
8317
8318(define-public python-clint
8319 (package
8320 (name "python-clint")
8321 (version "0.5.1")
8322 (source (origin
8323 (method url-fetch)
8324 (uri (pypi-uri "clint" version))
8325 (sha256
8326 (base32
8327 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8328 (build-system python-build-system)
8329 (arguments
8330 '(#:phases
8331 (modify-phases %standard-phases
8332 (replace 'check
8333 (lambda _ (invoke "py.test" "-v"))))))
8334 (native-inputs
8335 `(("python-pytest" ,python-pytest)))
8336 (propagated-inputs
8337 `(("python-args" ,python-args)))
8338 (home-page "https://github.com/kennethreitz/clint")
8339 (synopsis "Command-line interface tools")
8340 (description
8341 "Clint is a Python module filled with a set of tools for developing
8342command-line applications, including tools for colored and indented
8343output, progress bar display, and pipes.")
8344 (license license:isc)))
8345
8346(define-public python2-clint
8347 (package-with-python2 python-clint))
8348
44d10b1f
RW
8349(define-public python-rply
8350 (package
8351 (name "python-rply")
8352 (version "0.7.5")
8353 (source (origin
8354 (method url-fetch)
8355 (uri (pypi-uri "rply" version))
8356 (sha256
8357 (base32
8358 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8359 (build-system python-build-system)
8360 (propagated-inputs
8361 `(("python-appdirs" ,python-appdirs)))
8362 (home-page "https://github.com/alex/rply")
8363 (synopsis "Parser generator for Python")
8364 (description
8365 "This package provides a pure Python based parser generator, that also
8366works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8367with a new public API, and RPython support.")
8368 (license license:bsd-3)))
8369
8370(define-public python2-rply
8371 (package-with-python2 python-rply))
8372
8373(define-public python-hy
8374 (package
8375 (name "python-hy")
8376 (version "0.13.0")
8377 (source (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "hy" version))
8380 (sha256
8381 (base32
8382 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8383 (build-system python-build-system)
8384 (arguments
8385 '(#:phases
8386 (modify-phases %standard-phases
8387 (replace 'check
8388 (lambda _
8389 ;; Tests require write access to HOME.
8390 (setenv "HOME" "/tmp")
8391 (invoke "nosetests"))))))
8392 (native-inputs
8393 `(("python-coverage" ,python-coverage)
8394 ("python-nose" ,python-nose)))
8395 (propagated-inputs
8396 `(("python-astor" ,python-astor)
8397 ("python-clint" ,python-clint)
8398 ("python-rply" ,python-rply)))
8399 (home-page "http://hylang.org/")
8400 (synopsis "Lisp frontend to Python")
8401 (description
8402 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8403its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8404Python at your fingertips, in Lisp form.")
8405 (license license:expat)))
8406
8407(define-public python2-hy
8408 (package-with-python2 python-hy))
8409
8410(define-public python2-functools32
8411 (package
8412 (name "python2-functools32")
8413 (version "3.2.3-2")
8414 (source
8415 (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "functools32" version))
8418 (sha256
8419 (base32
8420 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8421 (build-system python-build-system)
8422 (arguments
8423 `(#:python ,python-2
8424 #:tests? #f)) ; no test target
8425 (home-page "https://github.com/MiCHiLU/python-functools32")
8426 (synopsis
8427 "Backport of the functools module from Python 3.2.3")
8428 (description
8429 "This package is a backport of the @code{functools} module from Python
84303.2.3 for use with older versions of Python and PyPy.")
8431 (license license:expat)))
8432
8433(define-public python2-subprocess32
8434 (package
8435 (name "python2-subprocess32")
8436 (version "3.2.7")
8437 (source (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "subprocess32" version))
8440 (sha256
8441 (base32
8442 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8443 (patches
8444 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8445 (build-system python-build-system)
8446 (arguments
8447 `(#:python ,python-2
8448 ;; The test suite fails with Python > 2.7.13:
8449 ;; import test.support
8450 ;; ImportError: No module named support
8451 #:tests? #f
8452 #:phases
8453 (modify-phases %standard-phases
8454 (add-after 'unpack 'patch-/bin/sh
8455 (lambda _
8456 (substitute* '("subprocess32.py"
8457 "test_subprocess32.py")
8458 (("/bin/sh") (which "sh")))
8459 #t)))))
8460 (home-page "https://github.com/google/python-subprocess32")
8461 (synopsis "Backport of the subprocess module from Python 3.2")
8462 (description
8463 "This is a backport of the @code{subprocess} standard library module
8464from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8465new features. On POSIX systems it is guaranteed to be reliable when used
8466in threaded applications. It includes timeout support from Python 3.3 but
8467otherwise matches 3.2’s API.")
8468 (license license:psfl)))
8469
8470(define-public python2-futures
8471 (package
8472 (name "python2-futures")
8473 (version "3.2.0")
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "futures" version))
8478 (sha256
8479 (base32
8480 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8481 (build-system python-build-system)
ba88eea2
RW
8482 (arguments
8483 `(#:python ,python-2
8484 #:phases
8485 (modify-phases %standard-phases
8486 (replace 'check
8487 (lambda _
8488 (invoke "python" "test_futures.py")
8489 #t)))))
44d10b1f
RW
8490 (home-page "https://github.com/agronholm/pythonfutures")
8491 (synopsis
8492 "Backport of the concurrent.futures package from Python 3.2")
8493 (description
8494 "The concurrent.futures module provides a high-level interface for
8495asynchronously executing callables. This package backports the
8496concurrent.futures package from Python 3.2")
8497 (license license:bsd-3)))
8498
8499(define-public python-promise
8500 (package
8501 (name "python-promise")
8502 (version "0.4.2")
8503 (source
8504 (origin
8505 (method url-fetch)
8506 (uri (pypi-uri "promise" version))
8507 (sha256
8508 (base32
8509 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8510 (build-system python-build-system)
8511 ;; Tests wants python-futures, which is a python2 only program, and
8512 ;; can't be found by python-promise at test time.
8513 (arguments `(#:tests? #f))
8514 (home-page "https://github.com/syrusakbary/promise")
8515 (synopsis "Promises/A+ implementation for Python")
8516 (description
8517 "Promises/A+ implementation for Python")
8518 (properties `((python2-variant . ,(delay python2-promise))))
8519 (license license:expat)))
8520
8521(define-public python2-promise
8522 (let ((promise (package-with-python2
8523 (strip-python2-variant python-promise))))
8524 (package (inherit promise)
8525 (arguments (substitute-keyword-arguments (package-arguments promise)
8526 ((#:tests? _) #t)))
8527 (native-inputs
8528 `(("python2-futures" ,python2-futures)
8529 ("python2-pytest" ,python2-pytest)
8530 ,@(package-native-inputs promise))))))
8531
8532(define-public python-colorama
8533 (package
8534 (name "python-colorama")
8535 (version "0.3.9")
8536 (source
8537 (origin
8538 (method url-fetch)
8539 (uri (pypi-uri "colorama" version))
8540 (sha256
8541 (base32
8542 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8543 (build-system python-build-system)
8544 (synopsis "Colored terminal text rendering for Python")
8545 (description "Colorama is a Python library for rendering colored terminal
8546text.")
8547 (home-page "https://pypi.python.org/pypi/colorama")
8548 (license license:bsd-3)))
8549
8550(define-public python2-colorama
8551 (package-with-python2 python-colorama))
8552
8553(define-public python-rsa
8554 (package
8555 (name "python-rsa")
8556 (version "3.4.2")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "rsa" version))
8561 (sha256
8562 (base32
8563 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8564 (build-system python-build-system)
8565 (propagated-inputs
8566 `(("python-pyasn1" ,python-pyasn1)))
8567 (synopsis "Pure-Python RSA implementation")
8568 (description "Python-RSA is a pure-Python RSA implementation. It supports
8569encryption and decryption, signing and verifying signatures, and key
8570generation according to PKCS#1 version 1.5. It can be used as a Python
8571library as well as on the command line.")
8572 (home-page "https://stuvel.eu/rsa")
8573 (license license:asl2.0)))
8574
8575(define-public python2-rsa
8576 (package-with-python2 python-rsa))
8577
8578(define-public python-pluggy
8579 (package
8580 (name "python-pluggy")
e5731c03 8581 (version "0.11.0")
44d10b1f
RW
8582 (source
8583 (origin
8584 (method url-fetch)
8585 (uri (pypi-uri "pluggy" version))
8586 (sha256
8587 (base32
e5731c03 8588 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8589 (build-system python-build-system)
8590 (native-inputs
8591 `(("python-setuptools-scm" ,python-setuptools-scm)))
8592 (synopsis "Plugin and hook calling mechanism for Python")
8593 (description "Pluggy is an extraction of the plugin manager as used by
8594Pytest but stripped of Pytest specific details.")
8595 (home-page "https://pypi.python.org/pypi/pluggy")
8596 (license license:expat)))
8597
8598(define-public python2-pluggy
8599 (package-with-python2 python-pluggy))
8600
8601(define-public python-tox
8602 (package
8603 (name "python-tox")
8604 (version "2.8.1")
8605 (source
8606 (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "tox" version))
8609 (sha256
8610 (base32
8611 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8612 (build-system python-build-system)
8613 (arguments
8614 ;; FIXME: Tests require pytest-timeout, which itself requires
8615 ;; pytest>=2.8.0 for installation.
8616 '(#:tests? #f))
8617 (propagated-inputs
8618 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8619 ("python-py" ,python-py)
8620 ("python-virtualenv" ,python-virtualenv)))
8621 (native-inputs
8622 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8623 ("python-pytest" ,python-pytest) ; >= 2.3.5
8624 ("python-setuptools-scm" ,python-setuptools-scm)))
8625 (home-page "http://tox.testrun.org/")
8626 (synopsis "Virtualenv-based automation of test activities")
8627 (description "Tox is a generic virtualenv management and test command line
8628tool. It can be used to check that a package installs correctly with
8629different Python versions and interpreters, or run tests in each type of
8630supported environment, or act as a frontend to continuous integration
8631servers.")
8632 (license license:expat)))
8633
8634(define-public python2-tox
8635 (package-with-python2 python-tox))
8636
8637(define-public python-jmespath
8638 (package
8639 (name "python-jmespath")
8640 (version "0.9.3")
8641 (source
8642 (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "jmespath" version))
8645 (sha256
8646 (base32
8647 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8648 (build-system python-build-system)
8649 (native-inputs
8650 `(("python-nose" ,python-nose)))
8651 (synopsis "JSON Matching Expressions")
8652 (description "JMESPath (pronounced “james path”) is a Python library that
8653allows one to declaratively specify how to extract elements from a JSON
8654document.")
8655 (home-page "https://github.com/jmespath/jmespath.py")
8656 (license license:expat)))
8657
8658(define-public python2-jmespath
8659 (package-with-python2 python-jmespath))
8660
8661(define-public python-botocore
8662 (package
7bcf827c
RW
8663 (name "python-botocore")
8664 (version "1.12.149")
8665 (source
8666 (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "botocore" version))
8669 (sha256
8670 (base32
8671 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8672 (build-system python-build-system)
8673 (arguments
8674 ;; FIXME: Many tests are failing.
8675 '(#:tests? #f))
8676 (propagated-inputs
8677 `(("python-dateutil" ,python-dateutil)
8678 ("python-docutils" ,python-docutils)
8679 ("python-jmespath" ,python-jmespath)))
8680 (native-inputs
8681 `(("python-mock" ,python-mock)
8682 ("python-nose" ,python-nose)
8683 ("behave" ,behave)
8684 ("python-tox" ,python-tox)
8685 ("python-urllib3" ,python-urllib3)
8686 ("python-wheel" ,python-wheel)))
8687 (home-page "https://github.com/boto/botocore")
8688 (synopsis "Low-level interface to AWS")
8689 (description "Botocore is a Python library that provides a low-level
44d10b1f 8690interface to the Amazon Web Services (AWS) API.")
7bcf827c 8691 (license license:asl2.0)))
44d10b1f
RW
8692
8693(define-public python2-botocore
8694 (package-with-python2 python-botocore))
8695
8696(define-public python-xdo
8697 (package
8698 (name "python-xdo")
8699 (version "0.3")
8700 (source (origin
8701 (method url-fetch)
8702 (uri (string-append
8703 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8704 "python-xdo_" version ".orig.tar.gz"))
8705 (sha256
8706 (base32
8707 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8708 (build-system python-build-system)
8709 (arguments
8710 '(#:phases
8711 (modify-phases %standard-phases
8712 (add-before 'install 'patch-libxdo-path
8713 ;; Hardcode the path of dynamically loaded libxdo library.
8714 (lambda* (#:key inputs #:allow-other-keys)
8715 (let ((libxdo (string-append
8716 (assoc-ref inputs "xdotool")
8717 "/lib/libxdo.so")))
8718 (substitute* "xdo/_xdo.py"
8719 (("find_library\\(\"xdo\"\\)")
8720 (simple-format #f "\"~a\"" libxdo)))
8721 #t))))
8722 #:tests? #f)) ; no tests provided
8723 (propagated-inputs
8724 `(("python-six" ,python-six)))
8725 (inputs
8726 `(("xdotool" ,xdotool)
8727 ("libX11" ,libx11)))
8728 (home-page "https://tracker.debian.org/pkg/python-xdo")
8729 (synopsis "Python library for simulating X11 keyboard/mouse input")
8730 (description "Provides bindings to libxdo for manipulating X11 via simulated
8731input. (Note that this is mostly a legacy library; you may wish to look at
8732python-xdo for newer bindings.)")
8733 (license license:bsd-3)))
8734
8735(define-public python2-xdo
8736 (package-with-python2 python-xdo))
8737
8738(define-public python-mako
8739 (package
8740 (name "python-mako")
6dc7a193 8741 (version "1.0.13")
44d10b1f
RW
8742 (source
8743 (origin
8744 (method url-fetch)
8745 (uri (pypi-uri "Mako" version))
8746 (sha256
8747 (base32
6dc7a193 8748 "0h95n0g0k1jwxiqarr09navpfajarvbmpm8mhmw66c25qc675vlm"))))
44d10b1f
RW
8749 (build-system python-build-system)
8750 (propagated-inputs
8751 `(("python-markupsafe" ,python-markupsafe)))
8752 (native-inputs
8753 `(("python-mock" ,python-mock)
8754 ("python-nose" ,python-nose)
8755 ("python-pytest" ,python-pytest)))
7016e620 8756 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8757 (synopsis "Templating language for Python")
8758 (description "Mako is a templating language for Python that compiles
8759templates into Python modules.")
8760 (license license:expat)))
8761
8762(define-public python2-mako
8763 (package-with-python2 python-mako))
8764
8765(define-public python-waitress
8766 (package
8767 (name "python-waitress")
8768 (version "1.1.0")
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "waitress" version))
8773 (patches (search-patches "python-waitress-fix-tests.patch"))
8774 (sha256
8775 (base32
8776 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8777 (build-system python-build-system)
8778 (home-page "https://github.com/Pylons/waitress")
8779 (synopsis "Waitress WSGI server")
8780 (description "Waitress is meant to be a production-quality pure-Python WSGI
8781server with very acceptable performance.")
8782 (license license:zpl2.1)))
8783
8784(define-public python2-waitress
8785 (package-with-python2 python-waitress))
8786
8787(define-public python-pyquery
8788 (package
8789 (name "python-pyquery")
8790 (version "1.2.17")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "pyquery" version))
8795 (sha256
8796 (base32
8797 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8798 (build-system python-build-system)
8799 (native-inputs
8800 `(("python-webob" ,python-webob)
8801 ("python-webtest" ,python-webtest)))
8802 (propagated-inputs
8803 `(("python-lxml" ,python-lxml)
8804 ("python-cssselect" ,python-cssselect)))
8805 (home-page "https://github.com/gawel/pyquery")
8806 (synopsis "Make jQuery-like queries on xml documents")
8807 (description "pyquery allows you to make jQuery queries on xml documents.
8808The API is as much as possible the similar to jQuery. pyquery uses lxml for
8809fast xml and html manipulation.")
8810 (license license:bsd-3)))
8811
44d10b1f
RW
8812(define-public python-anyjson
8813 (package
8814 (name "python-anyjson")
8815 (version "0.3.3")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "anyjson" version))
8820 (sha256
8821 (base32
8822 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8823 (build-system python-build-system)
8824 (arguments
8825 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8826 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8827 ;; whatever) so this transformation needs to be done before the tests
8828 ;; can be run. Maybe we could add a build step to transform beforehand
8829 ;; but it could be annoying/difficult.
8830 ;; We can enable tests for the Python 2 version, though, and do below.
8831 #:tests? #f))
8832 (home-page "https://bitbucket.org/runeh/anyjson/")
8833 (synopsis
8834 "Wraps best available JSON implementation in a common interface")
8835 (description
8836 "Anyjson loads whichever is the fastest JSON module installed
8837and provides a uniform API regardless of which JSON implementation is used.")
8838 (license license:bsd-3)
8839 (properties `((python2-variant . ,(delay python2-anyjson))))))
8840
8841(define-public python2-anyjson
8842 (let ((anyjson (package-with-python2
8843 (strip-python2-variant python-anyjson))))
8844 (package
8845 (inherit anyjson)
8846 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8847 #:tests? #t
8848 ,@(package-arguments anyjson)))
8849 (native-inputs `(("python2-nose" ,python2-nose))))))
8850
8851(define-public python-amqp
8852 (package
8853 (name "python-amqp")
8854 (version "2.3.2")
8855 (source
8856 (origin
8857 (method url-fetch)
8858 (uri (pypi-uri "amqp" version))
8859 (sha256
8860 (base32
8861 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8862 (build-system python-build-system)
8863 (native-inputs
8864 `(("python-case" ,python-case)
8865 ("python-pytest-sugar" ,python-pytest-sugar)
8866 ("python-mock" ,python-mock)))
8867 (propagated-inputs
8868 `(("python-vine" ,python-vine)))
8869 (home-page "https://github.com/celery/py-amqp")
8870 (synopsis
8871 "Low-level AMQP client for Python (fork of amqplib)")
8872 (description
8873 "This is a fork of amqplib which was originally written by Barry Pederson.
8874It is maintained by the Celery project, and used by kombu as a pure python
8875alternative when librabbitmq is not available.")
8876 (license license:lgpl2.1+)
8877 (properties `((python2-variant . ,(delay python2-amqp))))))
8878
8879(define-public python2-amqp
8880 (let ((amqp (package-with-python2
8881 (strip-python2-variant python-amqp))))
8882 (package
8883 (inherit amqp)
8884 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8885 ;; unmaintained. Weirdly, does not do this on the python 3
8886 ;; version?
8887 #:tests? #f
8888 ,@(package-arguments amqp))))))
8889
8890(define-public python-txamqp
8891 (package
8892 (name "python-txamqp")
8893 (version "0.8.2")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "txAMQP" version))
8898 (sha256
8899 (base32
8900 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8901 (build-system python-build-system)
8902 (propagated-inputs
8903 `(("python-six" ,python-six)
8904 ("python-twisted" ,python-twisted)))
8905 (home-page "https://github.com/txamqp/txamqp")
8906 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8907 (description
8908 "This package provides a Python library for communicating with AMQP peers
8909and brokers using the asynchronous networking framework Twisted. It contains
8910all the necessary code to connect, send and receive messages to/from an
8911AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8912also includes support for using Thrift RPC over AMQP in Twisted
8913applications.")
8914 (license license:asl2.0)))
8915
8916(define-public python2-txamqp
8917 (package-with-python2 python-txamqp))
8918
8919(define-public python-kombu
8920 (package
8921 (name "python-kombu")
8922 (version "4.2.2")
8923 (source
8924 (origin
8925 (method url-fetch)
8926 (uri (pypi-uri "kombu" version))
8927 (sha256
8928 (base32
8929 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8930 (build-system python-build-system)
8931 (native-inputs
8932 `(("python-mock" ,python-mock)
8933 ("python-case" ,python-case)
8934 ("python-pyro4" ,python-pyro4)
8935 ("python-pytest-sugar" ,python-pytest-sugar)
8936 ("python-pytz" ,python-pytz)))
8937 (propagated-inputs
8938 `(("python-anyjson" ,python-anyjson)
8939 ("python-amqp" ,python-amqp)
8940 ("python-redis" ,python-redis)))
8941 (home-page "https://kombu.readthedocs.io")
8942 (synopsis "Message passing library for Python")
8943 (description "The aim of Kombu is to make messaging in Python as easy as
8944possible by providing an idiomatic high-level interface for the AMQ protocol,
8945and also provide proven and tested solutions to common messaging problems.
8946AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8947message orientation, queuing, routing, reliability and security, for which the
8948RabbitMQ messaging server is the most popular implementation.")
8949 (license license:bsd-3)
8950 (properties `((python2-variant . ,(delay python2-kombu))))))
8951
8952(define-public python2-kombu
8953 (let ((kombu (package-with-python2
8954 (strip-python2-variant python-kombu))))
8955 (package
8956 (inherit kombu)
8957 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8958 ;; It works fine on the python3 variant.
8959 #:tests? #f
8960 ,@(package-arguments kombu)))
8961 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8962 ,@(package-native-inputs kombu))))))
8963
8964(define-public python-billiard
8965 (package
8966 (name "python-billiard")
8967 (version "3.5.0.5")
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "billiard" version))
8972 (sha256
8973 (base32
8974 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8975 (build-system python-build-system)
8976 (native-inputs
8977 `(("python-case" ,python-case)
8978 ("python-pytest" ,python-pytest)))
8979 (home-page "https://github.com/celery/billiard")
8980 (synopsis
8981 "Python multiprocessing fork with improvements and bugfixes")
8982 (description
8983 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8984multiprocessing package itself is a renamed and updated version of R Oudkerk's
8985pyprocessing package. This standalone variant is intended to be compatible with
8986Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8987 (license license:bsd-3)
8988 (properties `((python2-variant . ,(delay python2-billiard))))))
8989
8990(define-public python2-billiard
8991 (let ((billiard (package-with-python2
8992 (strip-python2-variant python-billiard))))
8993 (package
8994 (inherit billiard)
8995 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8996 ("python2-mock" ,python2-mock)
8997 ,@(package-native-inputs billiard))))))
8998
8999(define-public python-celery
9000 (package
9001 (name "python-celery")
9002 (version "4.2.1")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "celery" version))
9007 (sha256
9008 (base32
9009 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9010 (build-system python-build-system)
9011 (arguments
9012 '(;; TODO The tests fail with Python 3.7
9013 ;; https://github.com/celery/celery/issues/4849
9014 #:tests? #f
9015 #:phases
9016 (modify-phases %standard-phases
9017 (add-after 'unpack 'patch-requirements
9018 (lambda _
9019 (substitute* "requirements/test.txt"
9020 (("pytest>=3\\.0,<3\\.3")
9021 "pytest>=3.0"))
9022 #t)))))
9023 (native-inputs
9024 `(("python-case" ,python-case)
9025 ("python-pytest" ,python-pytest)))
9026 (propagated-inputs
9027 `(("python-pytz" ,python-pytz)
9028 ("python-billiard" ,python-billiard)
9029 ("python-kombu" ,python-kombu)))
9030 (home-page "https://celeryproject.org")
9031 (synopsis "Distributed Task Queue")
9032 (description "Celery is an asynchronous task queue/job queue based on
9033distributed message passing. It is focused on real-time operation, but
9034supports scheduling as well. The execution units, called tasks, are executed
9035concurrently on a single or more worker servers using multiprocessing,
9036Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9037synchronously (wait until ready).")
9038 (license license:bsd-3)
9039 (properties `((python2-variant . ,(delay python2-celery))))))
9040
9041(define-public python2-celery
9042 (let ((celery (package-with-python2
9043 (strip-python2-variant python-celery))))
9044 (package
9045 (inherit celery)
9046 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9047 ("python2-mock" ,python2-mock)
9048 ,@(package-native-inputs celery))))))
9049
9050(define-public python-translitcodec
9051 (package
9052 (name "python-translitcodec")
9053 (version "0.4.0")
9054 (source
9055 (origin
9056 (method url-fetch)
9057 (uri (pypi-uri "translitcodec" version))
9058 (sha256
9059 (base32
9060 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9061 (build-system python-build-system)
9062 (arguments
9063 `(#:tests? #f)) ; no tests provided
9064 (home-page
9065 "https://github.com/claudep/translitcodec")
9066 (synopsis
9067 "Unicode to 8-bit charset transliteration codec")
9068 (description
9069 "This package contains codecs for transliterating ISO 10646 texts into
9070best-effort representations using smaller coded character sets (ASCII,
9071ISO 8859, etc.).")
9072 (license license:expat)))
9073
9074(define-public python2-translitcodec
9075 (package-with-python2 python-translitcodec))
9076
9077(define-public python-editor
9078 (package
9079 (name "python-editor")
9080 (version "0.5")
9081 (source
9082 (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "python-editor" version))
9085 (sha256
9086 (base32
9087 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9088 (build-system python-build-system)
9089 (home-page
9090 "https://github.com/fmoo/python-editor")
9091 (synopsis
9092 "Programmatically open an editor, capture the result")
9093 (description
9094 "python-editor is a library that provides the editor module for
9095programmatically interfacing with your system's $EDITOR.")
9096 (license license:asl2.0)))
9097
9098(define-public python2-editor
9099 (package-with-python2 python-editor))
9100
44d10b1f
RW
9101(define-public python-vobject
9102 (package
9103 (name "python-vobject")
9104 (version "0.9.5")
9105 (source (origin
9106 (method url-fetch)
9107 (uri (pypi-uri "vobject" version))
9108 (sha256
9109 (base32
9110 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9111 (build-system python-build-system)
9112 (arguments
9113 '(;; The test suite relies on some non-portable Windows interfaces.
9114 #:tests? #f))
9115 (propagated-inputs
9116 `(("python-dateutil" ,python-dateutil)
9117 ("python-pyicu" ,python-pyicu)))
9118 (synopsis "Parse and generate vCard and vCalendar files")
9119 (description "Vobject is intended to be a full featured Python package for
9120parsing and generating vCard and vCalendar files. Currently, iCalendar files
9121are supported and well tested. vCard 3.0 files are supported, and all data
9122should be imported, but only a few components are understood in a sophisticated
9123way.")
9124 (home-page "http://eventable.github.io/vobject/")
9125 (license license:asl2.0)))
9126
9127(define-public python2-vobject
9128 (package-with-python2 python-vobject))
9129
9130(define-public python-munkres
9131 (package
9132 (name "python-munkres")
9133 (version "1.0.8")
9134 (source (origin
9135 (method url-fetch)
9136 (uri (pypi-uri "munkres" version))
9137 (sha256
9138 (base32
9139 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9140 (build-system python-build-system)
9141 (arguments
9142 '(#:tests? #f)) ; no test suite
9143 (home-page "http://software.clapper.org/munkres/")
9144 (synopsis "Implementation of the Munkres algorithm")
9145 (description "The Munkres module provides an implementation of the Munkres
9146algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9147useful for solving the Assignment Problem.")
9148 (license license:bsd-3)))
9149
9150(define-public python2-munkres
9151 (package-with-python2 python-munkres))
9152
9153(define-public python-whoosh
9154 (package
9155 (name "python-whoosh")
9156 (version "2.7.4")
9157 (source
9158 (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "Whoosh" version))
9161 (sha256
9162 (base32
9163 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9164 (build-system python-build-system)
9165 (native-inputs
9166 `(("python-pytest" ,python-pytest)))
9167 (home-page "https://bitbucket.org/mchaput/whoosh")
9168 (synopsis "Full text indexing, search, and spell checking library")
9169 (description
9170 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9171checking library.")
9172 (license license:bsd-2)))
9173
9174(define-public python2-whoosh
9175 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9176 (package (inherit whoosh)
9177 (propagated-inputs
9178 `(("python2-backport-ssl-match-hostname"
9179 ,python2-backport-ssl-match-hostname)
9180 ,@(package-propagated-inputs whoosh))))))
9181
9182(define-public python-pathlib
9183 (package
9184 (name "python-pathlib")
9185 (version "1.0.1")
9186 (source (origin
9187 (method url-fetch)
9188 (uri (pypi-uri "pathlib" version))
9189 (sha256
9190 (base32
9191 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9192 (build-system python-build-system)
9193 ;; The tests depend on the internal "test" module, which does not provide
9194 ;; a stable interface.
9195 (arguments `(#:tests? #f))
9196 (home-page "https://pathlib.readthedocs.org/")
9197 (synopsis "Object-oriented file system paths")
9198 (description "Pathlib offers a set of classes to handle file system paths.
9199It offers the following advantages over using string objects:
9200
9201@enumerate
9202@item No more cumbersome use of os and os.path functions. Everything can
9203be done easily through operators, attribute accesses, and method calls.
9204@item Embodies the semantics of different path types. For example,
9205comparing Windows paths ignores casing.
9206@item Well-defined semantics, eliminating any inconsistencies or
9207ambiguities (forward vs. backward slashes, etc.).
9208@end enumerate
9209
9210Note: In Python 3.4, pathlib is now part of the standard library. For other
9211Python versions please consider python-pathlib2 instead, which tracks the
9212standard library module. This module (python-pathlib) isn't maintained
9213anymore.")
9214 (license license:expat)))
9215
9216(define-public python2-pathlib
9217 (package-with-python2 python-pathlib))
9218
9219(define-public python2-pathlib2
9220 (package
9221 (name "python2-pathlib2")
54da6f9f 9222 (version "2.3.3")
44d10b1f
RW
9223 (source (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "pathlib2" version))
9226 (sha256
9227 (base32
54da6f9f 9228 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9229 (build-system python-build-system)
9230 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9231 ;; version is 3.4 which already includes this package as part of the
9232 ;; standard library.
9233 (arguments
9234 `(#:python ,python-2))
9235 (propagated-inputs
9236 `(("python2-scandir" ,python2-scandir)
9237 ("python2-six" ,python2-six)))
9238 (home-page "https://pypi.python.org/pypi/pathlib2/")
9239 (synopsis "Object-oriented file system paths - backport of standard
9240pathlib module")
9241 (description "The goal of pathlib2 is to provide a backport of standard
9242pathlib module which tracks the standard library module, so all the newest
9243features of the standard pathlib can be used also on older Python versions.
9244
9245Pathlib offers a set of classes to handle file system paths. It offers the
9246following advantages over using string objects:
9247
9248@enumerate
9249@item No more cumbersome use of os and os.path functions. Everything can
9250be done easily through operators, attribute accesses, and method calls.
9251@item Embodies the semantics of different path types. For example,
9252comparing Windows paths ignores casing.
9253@item Well-defined semantics, eliminating any inconsistencies or
9254ambiguities (forward vs. backward slashes, etc.).
9255@end enumerate")
9256 (license license:expat)))
9257
9258(define-public python2-pathlib2-bootstrap
9259 (hidden-package
9260 (package
9261 (inherit python2-pathlib2)
9262 (name "python2-pathlib2-bootstrap")
9263 (propagated-inputs
9264 `(("python2-scandir" ,python2-scandir)
9265 ("python2-six" ,python2-six-bootstrap))))))
9266
9267(define-public python-jellyfish
9268 (package
9269 (name "python-jellyfish")
9270 (version "0.5.6")
9271 (source (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "jellyfish" version))
9274 (sha256
9275 (base32
9276 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9277 (build-system python-build-system)
9278 (native-inputs
9279 `(("python-pytest" ,python-pytest)))
9280 (home-page "https://github.com/jamesturk/jellyfish")
9281 (synopsis "Approximate and phonetic matching of strings")
9282 (description "Jellyfish uses a variety of string comparison and phonetic
9283encoding algorithms to do fuzzy string matching.")
9284 (license license:bsd-2)
9285 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9286
9287(define-public python2-jellyfish
9288 (let ((jellyfish (package-with-python2
9289 (strip-python2-variant python-jellyfish))))
9290 (package (inherit jellyfish)
9291 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9292 ,@(package-native-inputs jellyfish))))))
9293
9294(define-public python2-unicodecsv
9295 (package
9296 (name "python2-unicodecsv")
9297 (version "0.14.1")
9298 (source (origin
9299 (method url-fetch)
9300 ;; The test suite is not included in the PyPi release.
9301 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9302 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9303 "archive/" version ".tar.gz"))
9304 (file-name (string-append name "-" version ".tar.gz"))
9305 (sha256
9306 (base32
9307 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9308 (build-system python-build-system)
9309 (arguments
9310 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9311 #:python ,python-2))
9312 (native-inputs
9313 `(("python2-unittest2" ,python2-unittest2)))
9314 (home-page "https://github.com/jdunck/python-unicodecsv")
9315 (synopsis "Unicode CSV module for Python 2")
9316 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9317module, adding support for Unicode strings.")
9318 (license license:bsd-2)))
9319
9320(define-public python-rarfile
9321 (package
9322 (name "python-rarfile")
9323 (version "2.8")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "rarfile" version))
9327 (sha256
9328 (base32
9329 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9330 (build-system python-build-system)
9331 (arguments
9332 '(#:phases
9333 (modify-phases %standard-phases
9334 (replace 'check
9335 ;; Many tests fail, but the installation proceeds.
e59dd341 9336 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9337 (native-inputs
9338 `(("which" ,which))) ; required for tests
9339 (propagated-inputs
9340 `(("libarchive" ,libarchive)))
9341 (home-page "https://github.com/markokr/rarfile")
9342 (synopsis "RAR archive reader for Python")
9343 (description "This is Python module for RAR archive reading. The interface
9344is made as zipfile like as possible.")
9345 (license license:isc)))
9346
9347(define-public python2-rarfile
9348 (package-with-python2 python-rarfile))
9349
9350(define-public python-magic
9351 (package
9352 (name "python-magic")
9353 (version "0.4.15")
9354 (source
9355 (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "python-magic" version))
9358 (sha256
9359 (base32
9360 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9361 (file-name (string-append name "-" version "-checkout"))))
9362 (build-system python-build-system)
9363 (arguments
9364 ;; The tests are unreliable, so don't run them. The tests fail
9365 ;; under Python3 because they were written for Python2 and
9366 ;; contain import statements that do not work in Python3. One of
9367 ;; the tests fails under Python2 because its assertions are
9368 ;; overly stringent; it relies on comparing output strings which
9369 ;; are brittle and can change depending on the version of
9370 ;; libmagic being used and the system on which the test is
9371 ;; running. In my case, under GuixSD 0.10.0, only one test
9372 ;; failed, and it seems to have failed only because the version
9373 ;; of libmagic that is packaged in Guix outputs a slightly
9374 ;; different (but not wrong) string than the one that the test
9375 ;; expected.
9376 '(#:tests? #f
9377 #:phases (modify-phases %standard-phases
9378 ;; Replace a specific method call with a hard-coded
9379 ;; path to the necessary libmagic.so file in the
9380 ;; store. If we don't do this, then the method call
9381 ;; will fail to find the libmagic.so file, which in
9382 ;; turn will cause any application using
9383 ;; python-magic to fail.
9384 (add-before 'build 'hard-code-path-to-libmagic
9385 (lambda* (#:key inputs #:allow-other-keys)
9386 (let ((file (assoc-ref inputs "file")))
9387 (substitute* "magic.py"
9388 (("ctypes.util.find_library\\('magic'\\)")
9389 (string-append "'" file "/lib/libmagic.so'")))
9390 #t)))
9391 (add-before 'install 'disable-egg-compression
9392 (lambda _
9393 (let ((port (open-file "setup.cfg" "a")))
9394 (display "\n[easy_install]\nzip_ok = 0\n"
9395 port)
9396 (close-port port)
9397 #t))))))
9398 (inputs
9399 ;; python-magic needs to be able to find libmagic.so.
9400 `(("file" ,file)))
9401 (home-page
9402 "https://github.com/ahupp/python-magic")
9403 (synopsis
9404 "File type identification using libmagic")
9405 (description
9406 "This module uses ctypes to access the libmagic file type
9407identification library. It makes use of the local magic database and
9408supports both textual and MIME-type output. Note that this module and
9409the python-file module both provide a \"magic.py\" file; these two
9410modules, which are different and were developed separately, both serve
9411the same purpose: to provide Python bindings for libmagic.")
9412 (license license:expat)))
9413
9414(define-public python2-magic
9415 (package-with-python2 python-magic))
9416
9417(define-public python2-s3cmd
9418 (package
9419 (name "python2-s3cmd")
9420 (version "1.6.1")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9425 "s3cmd-" version ".tar.gz"))
9426 (sha256
9427 (base32
9428 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9429 (build-system python-build-system)
9430 (arguments
9431 ;; s3cmd is written for python2 only and contains no tests.
9432 `(#:python ,python-2
9433 #:tests? #f))
9434 (propagated-inputs
9435 `(("python2-dateutil" ,python2-dateutil)
9436 ;; The python-file package also provides a magic.py module.
9437 ;; This is an unfortunate state of affairs; however, s3cmd
9438 ;; fails to install if it cannot find specifically the
9439 ;; python-magic package. Thus we include it, instead of using
9440 ;; python-file. Ironically, s3cmd sometimes works better
9441 ;; without libmagic bindings at all:
9442 ;; https://github.com/s3tools/s3cmd/issues/198
9443 ("python2-magic" ,python2-magic)))
9444 (home-page "http://s3tools.org/s3cmd")
9445 (synopsis "Command line tool for S3-compatible storage services")
9446 (description
9447 "S3cmd is a command line tool for uploading, retrieving and managing data
9448in storage services that are compatible with the Amazon Simple Storage
9449Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9450GnuPG encryption, and more. It also supports management of Amazon's
9451CloudFront content delivery network.")
9452 (license license:gpl2+)))
9453
9454(define-public python-pkgconfig
9455 (package
9456 (name "python-pkgconfig")
9457 (version "1.3.1")
9458 (source
9459 (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "pkgconfig" version))
9462 (sha256
9463 (base32
9464 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9465 (build-system python-build-system)
9466 (native-inputs
9467 `(("python-nose" ,python-nose)))
9468 (inputs
9469 `(("pkg-config" ,pkg-config)))
9470 (arguments
9471 `(#:phases
9472 (modify-phases %standard-phases
9473 (add-before 'build 'patch
9474 ;; Hard-code the path to pkg-config.
9475 (lambda _
9476 (substitute* "pkgconfig/pkgconfig.py"
9477 (("cmd = 'pkg-config")
9478 (string-append "cmd = '" (which "pkg-config"))))
9479 #t))
9480 (replace 'check
9481 (lambda _
9482 (invoke "nosetests" "test.py"))))))
9483 (home-page "https://github.com/matze/pkgconfig")
9484 (synopsis "Python interface for pkg-config")
9485 (description "This module provides a Python interface to pkg-config. It
9486can be used to find all pkg-config packages, check if a package exists,
9487check if a package meets certain version requirements, query CFLAGS and
9488LDFLAGS and parse the output to build extensions with setup.py.")
9489 (license license:expat)))
9490
9491(define-public python2-pkgconfig
9492 (package-with-python2 python-pkgconfig))
9493
9494(define-public python-bz2file
9495 (package
9496 (name "python-bz2file")
9497 (version "0.98")
9498 (source
9499 (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "bz2file" version))
9502 (sha256
9503 (base32
9504 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9505 (build-system python-build-system)
9506 (arguments
9507 `(#:tests? #f)) ; Tests use deprecated python modules.
9508 (home-page "https://github.com/nvawda/bz2file")
9509 (synopsis "Read and write bzip2-compressed files")
9510 (description
9511 "Bz2file is a Python library for reading and writing bzip2-compressed
9512files. It contains a drop-in replacement for the I/O interface in the
9513standard library's @code{bz2} module, including features from the latest
9514development version of CPython that are not available in older releases.")
9515 (license license:asl2.0)))
9516
9517(define-public python2-bz2file
9518 (package-with-python2 python-bz2file))
9519
9520(define-public python-future
9521 (package
9522 (name "python-future")
d5d54030 9523 (version "0.17.1")
44d10b1f
RW
9524 (source
9525 (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "future" version))
9528 (sha256
9529 (base32
d5d54030 9530 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9531 (build-system python-build-system)
9532 ;; Many tests connect to the network or are otherwise flawed.
9533 ;; https://github.com/PythonCharmers/python-future/issues/210
9534 (arguments
9535 `(#:tests? #f))
9536 (home-page "http://python-future.org")
9537 (synopsis "Single-source support for Python 3 and 2")
9538 (description
9539 "@code{python-future} is the missing compatibility layer between Python 2 and
9540Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9541to support both Python 2 and Python 3 with minimal overhead.")
9542 (license license:expat)))
9543
9544(define-public python2-future
9545 (package-with-python2 python-future))
9546
9547(define-public python-cysignals
9548 (package
9549 (name "python-cysignals")
8e3e51df 9550 (version "1.9.0")
44d10b1f
RW
9551 (source
9552 (origin
9553 (method url-fetch)
8e3e51df 9554 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9555 (sha256
9556 (base32
8e3e51df 9557 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9558 (build-system python-build-system)
9559 (native-inputs
9560 `(("python-cython" ,python-cython)
9561 ("python-sphinx" ,python-sphinx)))
9562 (inputs
9563 `(("pari-gp" ,pari-gp)))
9564 (arguments
9565 `(#:modules ((guix build python-build-system)
9566 ((guix build gnu-build-system) #:prefix gnu:)
9567 (guix build utils))
9568 ;; FIXME: Tests are executed after installation and currently fail
9569 ;; when not installing into standard locations; the author is working
9570 ;; on a fix.
9571 #:tests? #f
9572 #:phases
9573 (modify-phases %standard-phases
9574 (add-before
9575 'build 'configure
9576 (assoc-ref gnu:%standard-phases 'configure)))))
9577 (home-page
9578 "https://github.com/sagemath/cysignals")
9579 (synopsis
9580 "Handling of interrupts and signals for Cython")
9581 (description
9582 "The cysignals package provides mechanisms to handle interrupts (and
9583other signals and errors) in Cython code, using two related approaches,
9584for mixed Cython/Python code or external C libraries and pure Cython code,
9585respectively.")
9586 (license license:lgpl3+)))
9587
9588(define-public python2-cysignals
9589 (package-with-python2 python-cysignals))
9590
9591(define-public python2-shedskin
9592 (package
9593 (name "python2-shedskin")
9594 (version "0.9.4")
9595 (source
9596 (origin
9597 (method url-fetch)
9598 (uri (string-append "https://github.com/shedskin/shedskin/"
9599 "releases/download/v" version
9600 "/shedskin-" version ".tgz"))
9601 (sha256
9602 (base32
9603 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9604 (build-system python-build-system)
9605 (arguments
9606 `(#:python ,python-2
9607 #:phases (modify-phases %standard-phases
9608 (add-after 'unpack 'fix-resulting-include-libs
9609 (lambda* (#:key inputs #:allow-other-keys)
9610 (let ((libgc (assoc-ref inputs "libgc"))
9611 (pcre (assoc-ref inputs "pcre")))
9612 (substitute* "shedskin/makefile.py"
9613 (("variable == 'CCFLAGS':[ ]*")
9614 (string-append "variable == 'CCFLAGS':\n"
9615 " line += ' -I " pcre "/include"
9616 " -I " libgc "/include'"))
9617 (("variable == 'LFLAGS':[ ]*")
9618 (string-append "variable == 'LFLAGS':\n"
9619 " line += ' -L" pcre "/lib"
9620 " -L " libgc "/lib'")))
9621 #t))))))
9622 (inputs `(("pcre" ,pcre)
9623 ("libgc" ,libgc)))
9624 (home-page "https://shedskin.github.io/")
9625 (synopsis "Experimental Python-2 to C++ Compiler")
9626 (description (string-append "This is an experimental compiler for a subset of
9627Python. It generates C++ code and a Makefile."))
9628 (license (list license:gpl3 license:bsd-3 license:expat))))
9629
9630(define-public python2-rope
9631 (package
9632 (name "python2-rope")
a9ba0a31 9633 (version "0.11.0")
44d10b1f
RW
9634 (source
9635 (origin
9636 (method url-fetch)
9637 (uri (pypi-uri "rope" version))
9638 (sha256
9639 (base32
a9ba0a31 9640 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9641 (arguments
afb29715 9642 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9643 `(#:python ,python-2))
9644 (build-system python-build-system)
9645 (native-inputs
9646 `(("python2-unittest2" ,python2-unittest2)))
9647 (home-page "https://github.com/python-rope/rope")
9648 (synopsis "Refactoring library for Python")
9649 (description "Rope is a refactoring library for Python. It facilitates
9650the renaming, moving and extracting of attributes, functions, modules, fields
9651and parameters in Python 2 source code. These refactorings can also be applied
9652to occurrences in strings and comments.")
9653 (license license:gpl2)))
9654
2c880ef4
LC
9655(define-public python-rope
9656 (package
9657 (inherit python2-rope)
9658 (name "python-rope")
9659 (arguments `(#:python ,python-wrapper
9660 ;; XXX: Only partial python3 support, results in some failing
9661 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9662 #:tests? #f))
9663 (properties `((python2-variant . ,(delay python2-rope))))))
9664
44d10b1f
RW
9665(define-public python-py3status
9666 (package
9667 (name "python-py3status")
77f3d303 9668 (version "3.16")
44d10b1f
RW
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "py3status" version))
9673 (sha256
9674 (base32
77f3d303 9675 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9676 (build-system python-build-system)
9677 (inputs
9678 `(("file" ,file)))
9679 (arguments
9680 '(#:phases
9681 (modify-phases %standard-phases
9682 ;; 'file' is used for detection of configuration file encoding
9683 ;; let's make link the dependency to particular input
9684 (add-before 'build 'patch-file-path
9685 (lambda* (#:key inputs #:allow-other-keys)
9686 (let ((file-path (assoc-ref inputs "file")))
9687 (substitute* "py3status/parse_config.py"
9688 (("\\['file', '-b'")
9689 (string-append "['" file-path "/bin/file', '-b'")))
9690 #t))))
9691 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9692 (home-page "https://github.com/ultrabug/py3status")
9693 (synopsis "Extensible i3status wrapper written in Python")
9694 (description "py3status is an i3status wrapper which extends i3status
9695functionality in a modular way, allowing you to extend your panel with your
9696own code, responding to click events and updating clock every second.")
9697 (license license:bsd-3)))
9698
9699(define-public python-tblib
9700 (package
9701 (name "python-tblib")
9702 (version "1.3.2")
9703 (source (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "tblib" version))
9706 (sha256 (base32
9707 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9708 (build-system python-build-system)
9709 (arguments
9710 `(#:phases
9711 (modify-phases %standard-phases
9712 (add-before 'check 'adjust-tests
9713 (lambda _
9714 (when (which "python3")
9715 ;; Adjust the example output to match that of Python 3.7:
9716 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9717 (substitute* "README.rst"
9718 (("Exception\\('fail',") "Exception('fail'"))
9719 #t)))
9720 (replace 'check
9721 (lambda _
9722 ;; Upstream runs tests after installation and the package itself
9723 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9724 ;; found.
9725 (setenv "PYTHONPATH"
9726 (string-append (getcwd) "/build/lib:"
9727 (getenv "PYTHONPATH")))
9728 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9729 (native-inputs
9730 `(("python-pytest" ,python-pytest)
9731 ("python-six" ,python-six)))
9732 (home-page "https://github.com/ionelmc/python-tblib")
9733 (synopsis "Traceback serialization library")
9734 (description
9735 "Traceback serialization allows you to:
9736
9737@enumerate
9738@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9739different processes. This allows better error handling when running code over
9740multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9741
9742@item Parse traceback strings and raise with the parsed tracebacks.
9743@end enumerate\n")
9744 (license license:bsd-3)))
9745
9746(define-public python2-tblib
9747 (package-with-python2 python-tblib))
9748
9749(define-public python-greenlet
9750 (package
9751 (name "python-greenlet")
9752 (version "0.4.15")
9753 (source (origin
9754 (method url-fetch)
9755 (uri (pypi-uri "greenlet" version))
9756 (sha256
9757 (base32
9758 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9759 (build-system python-build-system)
9760 (home-page "https://greenlet.readthedocs.io/")
9761 (synopsis "Lightweight in-process concurrent programming")
9762 (description
9763 "Greenlet package is a spin-off of Stackless, a version of CPython
9764that supports micro-threads called \"tasklets\". Tasklets run
9765pseudo-concurrently (typically in a single or a few OS-level threads) and
9766are synchronized with data exchanges on \"channels\".")
9767 (license (list license:psfl license:expat))))
9768
9769(define-public python2-greenlet
9770 (package-with-python2 python-greenlet))
9771
9772(define-public python-objgraph
9773 (package
9774 (name "python-objgraph")
9775 (version "3.4.0")
9776 (source
9777 (origin
9778 (method url-fetch)
9779 (uri (pypi-uri "objgraph" version))
9780 (sha256
9781 (base32
9782 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9783 (build-system python-build-system)
9784 (propagated-inputs
9785 `(("python-graphviz" ,python-graphviz)))
9786 (native-inputs
9787 `(("python-mock" ,python-mock)
9788 ("graphviz" ,graphviz)))
9789 (home-page "https://mg.pov.lt/objgraph/")
9790 (synopsis "Draw Python object reference graphs with graphviz")
9791 (description
9792 "This package provides tools to draw Python object reference graphs with
9793graphviz.")
9794 (license license:expat)))
9795
9796(define-public python-gevent
9797 (package
9798 (name "python-gevent")
9799 (version "1.3.7")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "gevent" version))
9803 (sha256
9804 (base32
9805 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9806 (modules '((guix build utils)))
9807 (snippet
9808 '(begin
9809 ;; unbunding libev and c-ares
9810 (delete-file-recursively "deps")
9811 #t))))
9812 (build-system python-build-system)
9813 (arguments
9814 `(#:modules ((ice-9 ftw)
9815 (ice-9 match)
9816 (srfi srfi-26)
9817 (guix build utils)
9818 (guix build python-build-system))
9819 #:phases (modify-phases %standard-phases
9820 (add-after 'unpack 'unpack-libev
9821 (lambda* (#:key inputs #:allow-other-keys)
9822 (mkdir-p "deps/libev")
9823 ;; FIXME: gevent requires building libev, even though
9824 ;; it only links against the proper one.
9825 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9826 "--strip-components=1" "-C" "deps/libev")))
9827 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9828 (lambda _
9829 (substitute* "src/gevent/subprocess.py"
9830 (("/bin/sh") (which "sh")))
9831 (for-each (lambda (file)
9832 (substitute* file
9833 (("/bin/sh") (which "sh"))
9834 (("/bin/true") (which "true"))))
9835 (find-files "src/greentest" "\\.py$"))
9836 #t))
9837 (add-before 'build 'do-not-use-bundled-sources
9838 (lambda* (#:key inputs #:allow-other-keys)
9839 (setenv "CONFIG_SHELL" (which "bash"))
9840 (setenv "LIBEV_EMBED" "false")
9841 (setenv "CARES_EMBED" "false")
9842 (setenv "EMBED" "false")
9843
9844 (let ((greenlet (string-append
9845 (assoc-ref inputs "python-greenlet")
9846 "/include")))
9847 (match (scandir greenlet
9848 (lambda (item)
9849 (string-prefix? "python" item)))
9850 ((python)
9851 (setenv "CPATH"
9852 (string-append greenlet "/" python)))))
9853 #t))
9854 (add-before 'check 'skip-timer-test
9855 (lambda _
9856 ;; XXX: Skip 'TestTimerResolution', which appears to be
9857 ;; unreliable.
9858 (substitute* "src/greentest/test__core_timer.py"
9859 (("not greentest.RUNNING_ON_CI") "False"))
9860 #t))
9861 (replace 'check
9862 (lambda _
9863 ;; Make sure the build directory is on PYTHONPATH.
9864 (setenv "PYTHONPATH"
9865 (string-append
9866 (getenv "PYTHONPATH") ":"
9867 (getcwd) "/build/"
9868 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9869 (with-directory-excursion "src/greentest"
9870 ;; XXX: Many tests require network access. Instead we only
9871 ;; run known-good tests. Unfortunately we cannot use
9872 ;; recursion here since this directory also contains
9873 ;; Python-version-specific subfolders.
9874 (apply invoke "python" "testrunner.py" "--config"
9875 "known_failures.py"
9876 (scandir "." (cut regexp-exec
9877 (make-regexp "test_+(subprocess|core)")
9878 <>)))))))))
9879 (propagated-inputs
9880 `(("python-greenlet" ,python-greenlet)
9881 ("python-objgraph" ,python-objgraph)))
9882 (native-inputs
9883 `(("libev-source" ,(package-source libev))
9884 ("python-six" ,python-six)))
9885 (inputs
9886 `(("c-ares" ,c-ares)
9887 ("libev" ,libev)))
9888 (home-page "http://www.gevent.org/")
9889 (synopsis "Coroutine-based network library")
9890 (description
9891 "gevent is a coroutine-based Python networking library that uses greenlet
9892to provide a high-level synchronous API on top of the libev event loop.")
9893 (license license:expat)
9894 (properties `((python2-variant . ,(delay python2-gevent))))))
9895
9896(define-public python2-gevent
9897 (let ((base (package-with-python2
9898 (strip-python2-variant python-gevent))))
9899 (package
9900 (inherit base)
9901 (native-inputs `(,@(package-native-inputs python-gevent)
9902 ("python-mock" ,python2-mock))))))
9903
9904(define-public python-fastimport
9905 (package
9906 (name "python-fastimport")
9907 (version "0.9.6")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "fastimport" version))
9912 (sha256
9913 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9914 (build-system python-build-system)
9915 (home-page "https://github.com/jelmer/python-fastimport")
9916 (synopsis "VCS fastimport parser and generator in Python")
9917 (description "This package provides a parser for and generator of the Git
9918@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9919format.")
9920 (license license:gpl2+)))
9921
9922(define-public python2-fastimport
9923 (package-with-python2 python-fastimport))
9924
9925(define-public python-twisted
9926 (package
9927 (name "python-twisted")
0107c9b8 9928 (version "19.2.1")
44d10b1f
RW
9929 (source (origin
9930 (method url-fetch)
9931 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9932 (sha256
9933 (base32
0107c9b8 9934 "0liymyd4pzphizjlpwkncxjpm9akyr3lkfkm77yfg6wasv108b7s"))))
44d10b1f
RW
9935 (build-system python-build-system)
9936 (arguments
0107c9b8 9937 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
9938 (propagated-inputs
9939 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 9940 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 9941 ("python-incremental" ,python-incremental)
e5ba2fe3 9942 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9943 ("python-constantly" ,python-constantly)
9944 ("python-automat" ,python-automat)))
9945 (home-page "https://twistedmatrix.com/")
9946 (synopsis "Asynchronous networking framework written in Python")
9947 (description
9948 "Twisted is an extensible framework for Python programming, with special
9949focus on event-based network programming and multiprotocol integration.")
9950 (license license:expat)))
9951
9952(define-public python2-twisted
9953 (package-with-python2 python-twisted))
9954
9955(define-public python-pika
9956 (package
9957 (name "python-pika")
9958 (version "0.12.0")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "pika" version))
9963 (sha256
9964 (base32
9965 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9966 (build-system python-build-system)
9967 (native-inputs
9968 `(("python-pyev" ,python-pyev)
9969 ("python-tornado" ,python-tornado)
9970 ("python-twisted" ,python-twisted)))
9971 (home-page "https://pika.readthedocs.org")
9972 (synopsis "Pure Python AMQP Client Library")
9973 (description
9974 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9975Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9976network support library.")
9977 (license license:bsd-3)))
9978
9979(define-public python2-pika
9980 (package-with-python2 python-pika))
9981
9982(define-public python-ply
9983 (package
9984 (name "python-ply")
9985 (version "3.10")
9986 (source
9987 (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "ply" version))
9990 (sha256
9991 (base32
9992 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9993 (build-system python-build-system)
9994 (home-page "http://www.dabeaz.com/ply/")
9995 (synopsis "Python Lex & Yacc")
9996 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9997It uses LR parsing and does extensive error checking.")
9998 (license license:bsd-3)))
9999
10000(define-public python2-ply
10001 (package-with-python2 python-ply))
10002
10003(define-public python-tabulate
10004 (package
10005 (name "python-tabulate")
10006 (version "0.7.7")
10007 (source (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "tabulate" version))
10010 (sha256
10011 (base32
10012 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10013 (build-system python-build-system)
10014 (arguments
10015 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10016 ;; and the latest release is not tagged in the upstream repository.
10017 '(#:tests? #f))
10018 (home-page "https://bitbucket.org/astanin/python-tabulate")
10019 (synopsis "Pretty-print tabular data")
10020 (description
10021 "Tabulate is a library and command-line utility to pretty-print tabular
10022data in Python.")
10023 (license license:expat)))
10024
10025(define-public python2-tabulate
10026 (package-with-python2 python-tabulate))
10027
10028(define-public python-kazoo
10029 (package
10030 (name "python-kazoo")
10031 (version "2.4.0")
10032 (source
10033 (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "kazoo" version))
10036 (sha256
10037 (base32
10038 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10039 (build-system python-build-system)
10040 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10041 (propagated-inputs
10042 `(("python-six" ,python-six)))
10043 (home-page "https://kazoo.readthedocs.org")
10044 (synopsis "High-level Zookeeper client library")
10045 (description
10046 "Kazoo is a Python client library for the Apache Zookeeper distributed
10047application service. It is designed to be easy to use and to avoid common
10048programming errors.")
10049 (license license:asl2.0)))
10050
10051(define-public python2-kazoo
10052 (package-with-python2 python-kazoo))
10053
10054(define-public python-pykafka
10055 (package
10056 (name "python-pykafka")
10057 (version "2.4.0")
10058 (source (origin
10059 (method url-fetch)
0ca1d040 10060 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10061 (sha256
10062 (base32
10063 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10064 (build-system python-build-system)
10065 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10066 (propagated-inputs
10067 `(("python-gevent" ,python-gevent)
10068 ("python-kazoo" ,python-kazoo)
10069 ("python-tabulate" ,python-tabulate)))
10070 (inputs
10071 `(("librdkafka" ,librdkafka)))
10072 (home-page "https://pykafka.readthedocs.io/")
10073 (synopsis "Apache Kafka client for Python")
10074 (description
10075 "PyKafka is a client for the Apache Kafka distributed messaging system.
10076It includes Python implementations of Kafka producers and consumers, which
10077are optionally backed by a C extension built on librdkafka.")
10078 (license license:asl2.0)))
10079
10080(define-public python2-pykafka
10081 (package-with-python2 python-pykafka))
10082
10083(define-public python-wcwidth
10084 (package
10085 (name "python-wcwidth")
10086 (version "0.1.7")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "wcwidth" version))
10091 (sha256
10092 (base32
10093 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10094 (build-system python-build-system)
10095 (home-page "https://github.com/jquast/wcwidth")
10096 (synopsis "Measure number of terminal column cells of wide-character codes")
10097 (description "Wcwidth measures the number of terminal column cells of
10098wide-character codes. It is useful for those implementing a terminal emulator,
10099or programs that carefully produce output to be interpreted by one. It is a
10100Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10101specified in POSIX.1-2001 and POSIX.1-2008.")
10102 (license license:expat)))
10103
10104(define-public python2-wcwidth
10105 (package-with-python2 python-wcwidth))
10106
10107(define-public python2-jsonrpclib
10108 (package
10109 (name "python2-jsonrpclib")
10110 (version "0.1.7")
10111 (source (origin
10112 (method url-fetch)
6571bba0 10113 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10114 (sha256
10115 (base32
10116 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10117 (build-system python-build-system)
10118 (arguments
10119 `(#:tests? #f
10120 #:python ,python-2))
10121 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10122 (synopsis "Implementation of JSON-RPC specification for Python")
10123 (description
10124 "This library is an implementation of the JSON-RPC specification.
10125It supports both the original 1.0 specification, as well as the
10126new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10127etc.")
10128 (license license:asl2.0)))
10129
10130(define-public python-chai
10131 (package
10132 (name "python-chai")
10133 (version "1.1.2")
10134 (source (origin
10135 (method url-fetch)
10136 (uri (pypi-uri "chai" version))
10137 (sha256
10138 (base32
10139 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10140 (build-system python-build-system)
10141 (home-page "https://github.com/agoragames/chai")
10142 (synopsis "Mocking framework for Python")
10143 (description
10144 "Chai provides an api for mocking, stubbing and spying your python
10145objects, patterned after the Mocha library for Ruby.")
10146 (license license:bsd-3)))
10147
10148(define-public python2-chai
10149 (package-with-python2 python-chai))
10150
10151(define-public python-inflection
10152 (package
10153 (name "python-inflection")
10154 (version "0.3.1")
10155 (source
10156 (origin (method url-fetch)
10157 (uri (pypi-uri "inflection" version))
10158 (sha256
10159 (base32
10160 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10161 (build-system python-build-system)
10162 (native-inputs
10163 `(("python-pytest" ,python-pytest)))
10164 (home-page "https://github.com/jpvanhal/inflection")
10165 (synopsis "Python string transformation library")
10166 (description
10167 "Inflection is a string transformation library. It singularizes
10168and pluralizes English words, and transforms strings from CamelCase to
10169underscored string.")
10170 (license license:expat)))
10171
10172(define-public python2-inflection
10173 (package-with-python2 python-inflection))
10174
10175(define-public python-pylev
10176 (package
10177 (name "python-pylev")
10178 (version "1.3.0")
10179 (source (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "pylev" version))
10182 (sha256
10183 (base32
10184 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10185 (build-system python-build-system)
10186 (home-page "https://github.com/toastdriven/pylev")
10187 (synopsis "Levenshtein distance implementation in Python")
10188 (description "Pure Python Levenshtein implementation, based off the
10189Wikipedia code samples at
10190@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10191 (license license:bsd-3)))
10192
10193(define-public python2-pylev
10194 (package-with-python2 python-pylev))
10195
10196(define-public python-cleo
10197 (package
10198 (name "python-cleo")
10199 (version "0.6.1")
10200 (source (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "cleo" version))
10203 (sha256
10204 (base32
10205 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10206 (build-system python-build-system)
10207 (native-inputs
10208 `(;; For testing
10209 ("python-mock" ,python-mock)
10210 ("python-pytest-mock" ,python-pytest-mock)
10211 ("python-pytest" ,python-pytest)))
10212 (propagated-inputs
10213 `(("python-backpack" ,python-backpack)
10214 ("python-pastel" ,python-pastel)
10215 ("python-pylev" ,python-pylev)))
10216 (home-page "https://github.com/sdispater/cleo")
10217 (synopsis "Command-line arguments library for Python")
10218 (description
10219 "Cleo allows you to create command-line commands with signature in
10220docstring and colored output.")
10221 (license license:expat)))
10222
10223(define-public python2-cleo
10224 (package-with-python2 python-cleo))
10225
10226(define-public python-lazy-object-proxy
10227 (package
10228 (name "python-lazy-object-proxy")
10229 (version "1.3.1")
10230 (source (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "lazy-object-proxy" version))
10233 (sha256
10234 (base32
10235 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10236 (build-system python-build-system)
10237 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10238 (synopsis "Lazy object proxy for python")
10239 (description
10240 "Lazy object proxy is an object that wraps a callable but defers the call
10241until the object is actually required, and caches the result of said call.")
10242 (license license:bsd-2)))
10243
10244(define-public python2-lazy-object-proxy
10245 (package-with-python2 python-lazy-object-proxy))
10246
10247(define-public python-dnspython
10248 (package
10249 (name "python-dnspython")
10250 (version "1.15.0")
10251 (source (origin
10252 (method url-fetch)
10253 (uri (string-append "http://www.dnspython.org/kits/"
10254 version "/dnspython-" version ".tar.gz"))
10255 (sha256
10256 (base32
10257 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10258 (build-system python-build-system)
10259 (arguments '(#:tests? #f)) ; XXX: requires internet access
10260 (home-page "http://www.dnspython.org")
10261 (synopsis "DNS toolkit for Python")
10262 (description
10263 "dnspython is a DNS toolkit for Python. It supports almost all record
10264types. It can be used for queries, zone transfers, and dynamic updates.
10265It supports TSIG authenticated messages and EDNS0.")
10266 (license license:expat)))
10267
10268(define-public python2-dnspython
10269 (package-with-python2 python-dnspython))
10270
10271(define-public python-email-validator
10272 (package
10273 (name "python-email-validator")
10274 (version "1.0.2")
10275 (source
10276 (origin (method url-fetch)
10277 (uri (pypi-uri "email_validator" version))
10278 (sha256
10279 (base32
10280 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10281 (build-system python-build-system)
10282 (arguments
10283 '(#:phases
10284 (modify-phases %standard-phases
10285 (add-before 'build 'use-dnspython
10286 (lambda _
10287 (substitute* "setup.py"
10288 (("dnspython3") "dnspython"))
10289 #t)))))
10290 (propagated-inputs
10291 `(("python-dnspython" ,python-dnspython)
10292 ("python-idna" ,python-idna)))
10293 (home-page "https://github.com/JoshData/python-email-validator")
10294 (synopsis "Email address validation library for Python")
10295 (description
10296 "This library validates email address syntax and deliverability.")
10297 (license license:cc0)))
10298
10299(define-public python2-email-validator
10300 (package-with-python2 python-email-validator))
10301
10302(define-public python-ukpostcodeparser
10303 (package
10304 (name "python-ukpostcodeparser")
10305 (version "1.0.3")
10306 (source (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "UkPostcodeParser" version))
10309 (sha256
10310 (base32
10311 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10312 (build-system python-build-system)
10313 (home-page "https://github.com/hamstah/ukpostcodeparser")
10314 (synopsis "UK Postcode parser for Python")
10315 (description
10316 "This library provides the @code{parse_uk_postcode} function for
10317parsing UK postcodes.")
10318 (license license:expat)))
10319
10320(define-public python2-ukpostcodeparser
10321 (package-with-python2 python-ukpostcodeparser))
10322
10323(define-public python-faker
10324 (package
10325 (name "python-faker")
10326 (version "0.7.9")
10327 (source (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "Faker" version))
10330 (sha256
10331 (base32
10332 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10333 (patches
10334 (search-patches "python-faker-fix-build-32bit.patch"))
10335 (modules '((guix build utils)))
10336 (snippet
10337 '(begin
10338 (for-each delete-file (find-files "." "\\.pyc$"))
10339 #t))))
10340 (build-system python-build-system)
10341 (arguments
10342 '(#:phases
10343 (modify-phases %standard-phases
10344 (replace 'check
49ff8827 10345 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10346 (native-inputs
10347 `(;; For testing
10348 ("python-email-validator" ,python-email-validator)
10349 ("python-mock" ,python-mock)
10350 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10351 (propagated-inputs
10352 `(("python-dateutil" ,python-dateutil)
10353 ("python-six" ,python-six)))
10354 (home-page "https://github.com/joke2k/faker")
10355 (synopsis "Python package that generates fake data")
10356 (description
10357 "Faker is a Python package that generates fake data such as names,
10358addresses, and phone numbers.")
10359 (license license:expat)
10360 (properties `((python2-variant . ,(delay python2-faker))))))
10361
10362(define-public python2-faker
10363 (let ((base (package-with-python2 (strip-python2-variant
10364 python-faker))))
10365 (package
10366 (inherit base)
10367 (propagated-inputs
10368 `(("python2-ipaddress" ,python2-ipaddress)
10369 ,@(package-propagated-inputs base))))))
10370
10371(define-public python-pyaml
10372 (package
10373 (name "python-pyaml")
10374 (version "18.11.0")
10375 (source (origin
10376 (method url-fetch)
10377 (uri (pypi-uri "pyaml" version))
10378 (sha256
10379 (base32
10380 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10381 (build-system python-build-system)
10382 (native-inputs
10383 `(("python-unidecode" ,python-unidecode)))
10384 (propagated-inputs
10385 `(("python-pyyaml" ,python-pyyaml)))
10386 (home-page "https://github.com/mk-fg/pretty-yaml")
10387 (synopsis "YAML pretty-print library for Python")
10388 (description
10389 "pyaml is a PyYAML based python module to produce pretty and readable
10390YAML-serialized data.")
492e3a7a 10391 (license license:wtfpl2)))
44d10b1f
RW
10392
10393(define-public python2-pyaml
10394 (package-with-python2 python-pyaml))
10395
10396(define-public python-backpack
10397 (package
10398 (name "python-backpack")
10399 (version "0.1")
10400 (source
10401 (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "backpack" version))
10404 (sha256
10405 (base32
10406 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10407 (build-system python-build-system)
10408 (native-inputs
10409 `(("python-pytest" ,python-pytest)
10410 ("python-nose" ,python-nose)))
10411 (propagated-inputs
10412 `(("python-simplejson" ,python-simplejson)))
10413 (home-page "https://github.com/sdispater/backpack")
10414 (synopsis "Utilities for working with Python collections")
10415 (description "Backpack provides some useful utilities for working with
10416collections of data.")
10417 (license license:expat)))
10418
10419(define-public python2-backpack
10420 (package-with-python2 python-backpack))
10421
10422(define-public python-prompt-toolkit
10423 (package
10424 (name "python-prompt-toolkit")
10425 (version "2.0.7")
10426 (source
10427 (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10430 (sha256
10431 (base32
10432 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10433 (build-system python-build-system)
10434 (arguments
10435 `(#:phases
10436 (modify-phases %standard-phases
10437 (delete 'check)
10438 (add-after 'install 'post-install-check
10439 (lambda* (#:key inputs outputs #:allow-other-keys)
10440 ;; HOME is needed for the test
10441 ;; "test_pathcompleter_can_expanduser".
10442 (setenv "HOME" "/tmp")
10443 (add-installed-pythonpath inputs outputs)
10444 (invoke "py.test"))))))
10445 (propagated-inputs
10446 `(("python-wcwidth" ,python-wcwidth)
10447 ("python-six" ,python-six)
10448 ("python-pygments" ,python-pygments)))
10449 (native-inputs
10450 `(("python-pytest" ,python-pytest)))
10451 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10452 (synopsis "Library for building command line interfaces in Python")
10453 (description
10454 "Prompt-Toolkit is a library for building interactive command line
10455interfaces in Python. It's like GNU Readline but it also features syntax
10456highlighting while typing, out-of-the-box multi-line input editing, advanced
10457code completion, incremental search, support for Chinese double-width
10458characters, mouse support, and auto suggestions.")
10459 (license license:bsd-3)))
10460
10461(define-public python2-prompt-toolkit
10462 (package-with-python2 python-prompt-toolkit))
10463
10464(define-public python-prompt-toolkit-1
10465 (package (inherit python-prompt-toolkit)
10466 (version "1.0.15")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10471 (sha256
10472 (base32
10473 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10474
10475(define-public python2-prompt-toolkit-1
10476 (package-with-python2 python-prompt-toolkit-1))
10477
10478(define-public python-jedi
10479 (package
10480 (name "python-jedi")
b8e5de56 10481 (version "0.13.3")
44d10b1f
RW
10482 (source
10483 (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "jedi" version))
10486 (sha256
10487 (base32
b8e5de56 10488 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b"))))
44d10b1f
RW
10489 (build-system python-build-system)
10490 (arguments
b8e5de56 10491 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see:
44d10b1f
RW
10492 ;; https://github.com/davidhalter/jedi/issues/1263)
10493 #:tests? #f
10494 #:phases
10495 (modify-phases %standard-phases
10496 (replace 'check
10497 (lambda* (#:key tests? #:allow-other-keys)
10498 (when tests?
10499 (invoke "py.test" "-vv")))))))
10500 (native-inputs
10501 `(("python-pytest" ,python-pytest)
10502 ("python-docopt" ,python-docopt)))
10503 (propagated-inputs
10504 `(("python-parso" ,python-parso)))
10505 (home-page "https://github.com/davidhalter/jedi")
10506 (synopsis "Autocompletion and static analysis library for Python")
10507 (description
10508 "Jedi is a static analysis tool for Python that can be used in Integrated
10509Development Environments (@dfn{IDE}s) and text editors. It understands Python
10510on a deeper level than many other static analysis frameworks for Python.
10511
10512Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10513well.")
10514 (license license:expat)))
10515
10516(define-public python2-jedi
b8e5de56
MC
10517 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10518 (package
10519 (inherit base)
10520 (arguments (substitute-keyword-arguments (package-arguments base)
10521 ((#:tests? _) #t))))))
44d10b1f
RW
10522
10523(define-public ptpython
10524 (package
10525 (name "ptpython")
10526 (version "0.34")
10527 (source (origin
10528 (method url-fetch)
10529 (uri (pypi-uri "ptpython" version))
10530 (sha256
10531 (base32
10532 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10533 (build-system python-build-system)
10534 (arguments
10535 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10536 (propagated-inputs
10537 `(("python-docopt" ,python-docopt)
10538 ("python-jedi" ,python-jedi)
10539 ("python-prompt-toolkit" ,python-prompt-toolkit)
10540 ("python-pygments" ,python-pygments)))
10541 (home-page "https://github.com/jonathanslenders/ptpython")
10542 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10543 (description
10544 "ptpython is a Python read-eval-print loop with IDE-like features.
10545It supports syntax highlighting, multiline editing, autocompletion, mouse,
10546color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10547etc.")
10548 (license license:bsd-3)
10549 (properties `((python2-variant . ,(delay ptpython-2))))))
10550
10551(define-public ptpython-2
10552 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10553 (package
10554 (inherit base)
10555 (name "ptpython2"))))
10556
10557(define-public python-stem
10558 (package
10559 (name "python-stem")
e746d1c3 10560 (version "1.7.1")
44d10b1f
RW
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "stem" version))
10565 (sha256
10566 (base32
e746d1c3 10567 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10568 (build-system python-build-system)
10569 (arguments
10570 `(#:phases
10571 (modify-phases %standard-phases
10572 (replace 'check
10573 (lambda _
10574 (invoke "./run_tests.py" "--unit")
10575 #t)))))
10576 (native-inputs
10577 `(("python-mock" ,python-mock)
10578 ("python-pycodestyle" ,python-pycodestyle)
10579 ("python-pyflakes" ,python-pyflakes)))
10580 (home-page "https://stem.torproject.org/")
10581 (synopsis
10582 "Python controller library that allows applications to interact with Tor")
10583 (description
10584 "Stem is a Python controller library for Tor. With it you can use Tor's
10585control protocol to script against the Tor process and read descriptor data
10586relays publish about themselves.")
10587 (license license:lgpl3)))
10588
10589(define-public python2-stem
10590 (package-with-python2 python-stem))
10591
10592(define-public python-pyserial
10593 (package
10594 (name "python-pyserial")
10595 (version "3.1.1")
10596 (source
10597 (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "pyserial" version))
10600 (sha256
10601 (base32
10602 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10603 (build-system python-build-system)
10604 (arguments
10605 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10606 ;; #:phases
10607 ;; (modify-phases %standard-phases
10608 ;; (replace 'check
10609 ;; (lambda _
10610 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10611 (home-page
10612 "https://github.com/pyserial/pyserial")
10613 (synopsis "Python Serial Port Bindings")
10614 (description "@code{pyserial} provide serial port bindings for Python. It
10615supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10616and/or Xon/Xoff. The port is accessed in RAW mode.")
10617 (license license:bsd-3)))
10618
10619(define-public python2-pyserial
10620 (package-with-python2 python-pyserial))
10621
10622(define-public python-kivy
10623 (package
10624 (name "python-kivy")
10625 (version "1.10.1")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "Kivy" version))
10630 (file-name (string-append name "-" version ".tar.gz"))
10631 (sha256
10632 (base32
10633 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10634 (build-system python-build-system)
10635 (arguments
10636 `(#:tests? #f ; Tests require many optional packages
10637 #:phases
10638 (modify-phases %standard-phases
10639 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10640 (lambda* (#:key inputs #:allow-other-keys)
10641 (setenv "KIVY_SDL2_PATH"
10642 (string-append (assoc-ref inputs "sdl-union")
10643 "/include/SDL2"))
10644 #t)))))
10645 (native-inputs
10646 `(("git" ,git)
10647 ("pkg-config" ,pkg-config)
10648 ("python-cython" ,python-cython)))
10649 (inputs
10650 `(("gstreamer" ,gstreamer)
10651 ("mesa" ,mesa)
10652 ("sdl-union"
10653 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10654 (home-page "http://kivy.org")
10655 (synopsis
10656 "Multitouch application framework")
10657 (description
10658 "A software library for rapid development of
10659hardware-accelerated multitouch applications.")
10660 (license license:expat)))
10661
10662(define-public python2-kivy
10663 (package-with-python2 python-kivy))
10664
10665(define-public python-kivy-next
10666 (deprecated-package "python-kivy-next" python-kivy))
10667
10668(define-public python2-kivy-next
10669 (deprecated-package "python2-kivy-next" python2-kivy))
10670
10671(define-public python-binaryornot
10672 (package
10673 (name "python-binaryornot")
10674 (version "0.4.4")
10675 (source (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "binaryornot" version))
10678 (sha256
10679 (base32
10680 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10681 (build-system python-build-system)
10682 (propagated-inputs
10683 `(("python-chardet" ,python-chardet)
10684 ("python-hypothesis" ,python-hypothesis)))
10685 (home-page "https://github.com/audreyr/binaryornot")
10686 (synopsis "Package to check if a file is binary or text")
10687 (description "Ultra-lightweight pure Python package to check if a file is
10688binary or text.")
10689 (license license:bsd-3)
10690 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10691
10692(define-public python2-binaryornot
10693 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10694 (package (inherit base)
10695 (propagated-inputs
10696 `(("python2-enum34" ,python2-enum34)
10697 ,@(package-propagated-inputs base))))))
10698
10699(define-public python-nltk
10700 (package
10701 (name "python-nltk")
10702 (version "3.2.1")
10703 (source (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "nltk" version))
10706 (sha256
10707 (base32
10708 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10709 (build-system python-build-system)
10710 (arguments
10711 '(;; The tests require some extra resources to be downloaded.
10712 ;; TODO Try packaging these resources.
10713 #:tests? #f))
10714 (home-page "http://nltk.org/")
10715 (synopsis "Natural Language Toolkit")
10716 (description "It provides interfaces to over 50 corpora and lexical
10717resources such as WordNet, along with a suite of text processing libraries
10718for classification, tokenization, stemming, tagging, parsing, and semantic
10719reasoning, wrappers for natural language processing libraries.")
10720 (license license:asl2.0)))
10721
10722(define-public python2-nltk
10723 (package-with-python2 python-nltk))
10724
10725(define-public python-pymongo
10726 (package
10727 (name "python-pymongo")
10728 (version "3.7.2")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "pymongo" version))
10732 (sha256
10733 (base32
10734 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10735 (build-system python-build-system)
10736 (propagated-inputs
10737 `(("python-certifi" ,python-certifi)))
10738 (home-page "https://github.com/mongodb/mongo-python-driver")
10739 (synopsis "Python driver for MongoDB")
10740 (description "Python driver for MongoDB.")
10741 (license license:asl2.0)))
10742
10743(define-public python2-pymongo
10744 (package-with-python2 python-pymongo))
10745
44d10b1f
RW
10746(define-public python-consul
10747 (package
10748 (name "python-consul")
10749 (version "0.6.1")
10750 (source
10751 (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "python-consul" version))
10754 (sha256
10755 (base32
10756 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10757 (build-system python-build-system)
10758 (arguments
10759 '(#:tests? #f)) ; The tests are not distributed
10760 (propagated-inputs
10761 `(("python-requests" ,python-requests)
10762 ("python-six" ,python-six)))
10763 (home-page "https://github.com/cablehead/python-consul")
10764 (synopsis "Python client for Consul")
10765 (description
10766 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10767discovery, monitoring and configuration.")
10768 (license license:expat)))
10769
10770(define-public python2-consul
10771 (package-with-python2 python-consul))
10772
10773(define-public python-schematics
10774 (package
10775 (name "python-schematics")
10776 (version "1.1.1")
10777 (source
1961d187
TGR
10778 (origin
10779 (method git-fetch)
10780 (uri (git-reference
10781 (url "https://github.com/schematics/schematics.git")
10782 (commit (string-append "v" version))))
10783 (file-name (git-file-name name version))
10784 (sha256
10785 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
10786 (build-system python-build-system)
10787 (propagated-inputs
10788 `(("python-six" ,python-six)))
10789 (arguments
1961d187
TGR
10790 ;; The tests require a bunch of not very nice packages with fixed
10791 ;; version requirements (e.g. python-coveralls).
10792 `(#:tests? #f))
44d10b1f
RW
10793 (home-page "https://github.com/schematics/schematics")
10794 (synopsis "Python Data Structures for Humans")
10795 (description "Python Data Structures for Humans.")
10796 (license license:bsd-3)))
10797
10798(define-public python2-schematics
10799 (package-with-python2 python-schematics))
10800
10801(define-public python-odfpy
10802 (package
10803 (name "python-odfpy")
10804 (version "1.3.3")
10805 (source (origin
10806 (method url-fetch)
10807 (uri (pypi-uri "odfpy" version))
10808 (sha256
10809 (base32
10810 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10811 (arguments
10812 `(#:modules ((srfi srfi-1)
10813 (guix build python-build-system)
10814 (guix build utils))
10815 #:phases
10816 (modify-phases %standard-phases
10817 (replace 'check
10818 ;; The test runner invokes python2 and python3 for test*.py.
10819 ;; To avoid having both in inputs, we replicate it here.
10820 (lambda _
21ccc01d
RW
10821 (for-each (lambda (test-file) (invoke "python" test-file))
10822 (find-files "tests" "^test.*\\.py$"))
10823 #t)))))
44d10b1f
RW
10824 (build-system python-build-system)
10825 (home-page "https://github.com/eea/odfpy")
10826 (synopsis "Python API and tools to manipulate OpenDocument files")
10827 (description "Collection of libraries and utility programs written in
10828Python to manipulate OpenDocument 1.2 files.")
10829 (license
10830 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10831 ;; number of files with other licenses.
10832 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10833
10834(define-public python2-odfpy
10835 (package-with-python2 python-odfpy))
10836
10837(define-public python-natsort
10838 (package
10839 (name "python-natsort")
10840 (version "5.4.1")
10841 (source (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "natsort" version))
10844 (sha256
10845 (base32
10846 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10847 (build-system python-build-system)
10848 (arguments
10849 `(#:modules ((guix build utils)
10850 (guix build python-build-system)
10851 (srfi srfi-1)
10852 (srfi srfi-26)
10853 (ice-9 ftw))
10854 #:phases
10855 (modify-phases %standard-phases
10856 (add-before 'check 'set-cachedir
10857 ;; Tests require write access to $HOME by default
10858 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10859 (replace 'check
10860 (lambda _
10861 (let ((cwd (getcwd)))
10862 (setenv "PYTHONPATH"
10863 (string-append
10864 cwd "/build/"
10865 (find (cut string-prefix? "lib" <>)
10866 (scandir (string-append cwd "/build")))
10867 ":"
10868 (getenv "PYTHONPATH")))
10869 (invoke "pytest" "-v")))))))
10870 (native-inputs
10871 `(("python-hypothesis" ,python-hypothesis)
10872 ("python-pytest-cov" ,python-pytest-cov)
10873 ("python-pytest-mock" ,python-pytest-mock)
10874 ("python-pytest" ,python-pytest)))
10875 (propagated-inputs ; TODO: Add python-fastnumbers.
10876 `(("python-pyicu" ,python-pyicu)))
10877 (home-page "https://github.com/SethMMorton/natsort")
10878 (synopsis "Natural sorting for python and shell")
10879 (description
10880 "Natsort lets you apply natural sorting on lists instead of
10881lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
10882on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
10883@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
10884@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
10885identifies numbers and sorts them separately from strings. It can also sort
10886version numbers, real numbers, mixed types and more, and comes with a shell
10887command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
10888 (license license:expat)
10889 (properties `((python2-variant . ,(delay python2-natsort))))))
10890
10891(define-public python2-natsort
10892 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10893 (package (inherit base)
10894 (native-inputs
10895 `(("python2-pathlib" ,python2-pathlib)
10896 ,@(package-native-inputs base))))))
10897
10898(define-public python-glances
10899 (package
10900 (name "python-glances")
10901 (version "3.0.2")
10902 (source
10903 (origin
10904 (method url-fetch)
10905 (uri (pypi-uri "Glances" version))
10906 (sha256
10907 (base32
10908 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10909 (build-system python-build-system)
10910 (propagated-inputs
10911 `(("python-psutil" ,python-psutil)))
10912 (home-page
10913 "https://github.com/nicolargo/glances")
10914 (synopsis
10915 "A cross-platform curses-based monitoring tool")
10916 (description
10917 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10918Glances uses the PsUtil library to get information from your system. It monitors
10919CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10920 (license license:lgpl3+)))
10921
10922(define-public python2-glances
10923 (package-with-python2 python-glances))
10924
10925(define-public python-graphql-core
10926 (package
10927 (name "python-graphql-core")
10928 (version "0.5.3")
10929 (source
10930 (origin
10931 (method url-fetch)
10932 (uri (pypi-uri "graphql-core" version))
10933 (sha256
10934 (base32
10935 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10936 (build-system python-build-system)
10937 (arguments
10938 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10939 #:phases
10940 (modify-phases %standard-phases
10941 (add-after 'unpack 'patch-hardcoded-version
10942 (lambda _ (substitute*
10943 "setup.py"
10944 (("'gevent==1.1rc1'") "'gevent'"))
10945 #t)))))
10946 (native-inputs
10947 `(("python-gevent" ,python-gevent)
10948 ("python-mock" ,python-mock)
10949 ("python-pytest-mock" ,python-pytest-mock)))
10950 (propagated-inputs
10951 `(("python-promise" ,python-promise)
10952 ("python-six" ,python-six)))
10953 (home-page "https://github.com/graphql-python/graphql-core")
10954 (synopsis "GraphQL implementation for Python")
10955 (description
10956 "GraphQL implementation for Python. GraphQL is a data query language and
10957runtime designed and used to request and deliver data to mobile and web apps.
10958This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10959to Python.")
10960 (license license:expat)))
10961
10962(define-public python2-graphql-core
10963 (package-with-python2 python-graphql-core))
10964
10965(define-public python-graphql-relay
10966 (package
10967 (name "python-graphql-relay")
10968 (version "0.4.5")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "graphql-relay" version))
10973 (sha256
10974 (base32
10975 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10976 (build-system python-build-system)
10977 (arguments
10978 '(#:tests? #f)) ; The tests are not distributed
10979 (propagated-inputs
10980 `(("python-graphql-core" ,python-graphql-core)
10981 ("python-promise" ,python-promise)
10982 ("python-six" ,python-six)))
10983 (home-page "https://github.com/graphql-python/graphql-relay-py")
10984 (synopsis "Relay implementation for Python")
10985 (description
10986 "This is a library to allow the easy creation of Relay-compliant servers
10987using the GraphQL Python reference implementation of a GraphQL server. It
10988should be noted that the code is a exact port of the original
10989@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10990from Facebook.")
10991 (license license:expat)))
10992
10993(define-public python2-graphql-relay
10994 (package-with-python2 python-graphql-relay))
10995
10996(define-public python-graphene
10997 (package
10998 (name "python-graphene")
10999 (version "0.10.2")
11000 (source
11001 (origin
11002 (method url-fetch)
11003 (uri (pypi-uri "graphene" version))
11004 (sha256
11005 (base32
11006 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11007 (build-system python-build-system)
11008 (propagated-inputs
11009 `(("python-graphql-core" ,python-graphql-core)
11010 ("python-graphql-relay" ,python-graphql-relay)
11011 ("python-iso8601" ,python-iso8601)
11012 ("python-promise" ,python-promise)
11013 ("python-six" ,python-six)))
11014 (arguments
11015 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11016 (home-page "http://graphene-python.org/")
11017 (synopsis "GraphQL Framework for Python")
11018 (description
11019 "Graphene is a Python library for building GraphQL schemas/types.
11020A GraphQL schema describes your data model, and provides a GraphQL server
11021with an associated set of resolve methods that know how to fetch data.")
11022 (properties `((python2-variant . ,(delay python2-graphene))))
11023 (license license:expat)))
11024
11025(define-public python2-graphene
11026 (let ((base (package-with-python2
11027 (strip-python2-variant python-graphene))))
11028 (package (inherit base)
11029 (native-inputs
11030 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11031 ,@(package-native-inputs base))))))
11032
11033(define-public python-nautilus
11034 (package
11035 (name "python-nautilus")
11036 (version "0.4.9")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "nautilus" version))
11041 (sha256
11042 (base32
11043 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11044 (build-system python-build-system)
11045 (arguments `(#:tests? #f)) ; fails to import test modules
11046 (propagated-inputs
11047 `(("python-bcrypt" ,python-bcrypt)
11048 ("python-click" ,python-click)
11049 ("python-consul" ,python-consul)
11050 ("python-graphene" ,python-graphene)
11051 ("python-jinja2" ,python-jinja2)
11052 ("python-peewee" ,python-peewee)
11053 ("python-pika" ,python-pika)
11054 ("python-tornado" ,python-tornado)
11055 ("python-wtforms" ,python-wtforms)))
11056 (native-inputs
11057 `(("python-nose2" ,python-nose2)))
11058 (home-page "https://github.com/AlecAivazis/nautilus")
11059 (synopsis "Library for creating microservice applications")
11060 (description
11061 "Nautilus is a framework for flux based microservices that looks to
11062provide extendible implementations of common aspects of a cloud so that you can
11063focus on building massively scalable web applications.")
11064 (license license:expat)))
11065
11066(define-public python-snowballstemmer
11067 (package
11068 (name "python-snowballstemmer")
11069 (version "1.2.1")
11070 (source (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "snowballstemmer" version))
11073 (sha256
11074 (base32
11075 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11076 (build-system python-build-system)
11077 (arguments
11078 `(;; No tests exist
11079 #:tests? #f))
11080 (home-page "https://github.com/shibukawa/snowball_py")
11081 (synopsis "Snowball stemming library collection for Python")
11082 (description "This package provides 16 word stemmer algorithms generated
11083from Snowball algorithms. It includes the 15 original ones plus the Poerter
11084English stemmer.")
11085 (license license:bsd-3)))
11086
11087(define-public python2-snowballstemmer
11088 (package-with-python2 python-snowballstemmer))
11089
44d10b1f
RW
11090(define-public python-setproctitle
11091(package
11092 (name "python-setproctitle")
11093 (version "1.1.10")
11094 (source
11095 (origin
11096 (method url-fetch)
11097 (uri (pypi-uri "setproctitle" version))
11098 (sha256
11099 (base32
11100 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11101 (build-system python-build-system)
11102 (arguments
11103 '(#:phases
11104 (modify-phases %standard-phases
11105 (add-before 'check 'patch-Makefile
11106 ;; Stricly this is only required for the python2 variant.
11107 ;; But adding a phase in an inherited package seems to be
11108 ;; cumbersum. So we patch even for python3.
11109 (lambda _
11110 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11111 (when nose
11112 (substitute* "Makefile"
11113 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11114 (string-append nose "/bin/nosetests "))))
11115 #t)))
11116 (replace 'check
11117 (lambda _
11118 (setenv "PYTHON" (or (which "python3") (which "python")))
11119 (setenv "PYCONFIG" (or (which "python3-config")
11120 (which "python-config")))
11121 (setenv "CC" "gcc")
11122 ;; No need to extend PYTHONPATH to find the built package, since
11123 ;; the Makefile will build anyway
11124 (invoke "make" "check"))))))
11125 (native-inputs
11126 `(("procps" ,procps))) ; required for tests
11127 (home-page
11128 "https://github.com/dvarrazzo/py-setproctitle")
11129 (synopsis
11130 "Setproctitle implementation for Python to customize the process title")
11131 (description "The library allows a process to change its title (as displayed
11132by system tools such as ps and top).
11133
11134Changing the title is mostly useful in multi-process systems, for
11135example when a master process is forked: changing the children's title
11136allows to identify the task each process is busy with. The technique
11137is used by PostgreSQL and the OpenSSH Server for example.")
11138 (license license:bsd-3)
11139 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11140
11141(define-public python2-setproctitle
11142 (let ((base (package-with-python2
11143 (strip-python2-variant python-setproctitle))))
11144 (package
11145 (inherit base)
11146 (native-inputs `(("python2-nose" ,python2-nose)
11147 ,@(package-native-inputs base))))))
11148
11149(define-public python-validictory
11150 (package
11151 (name "python-validictory")
11152 (version "1.0.1")
11153 (source
11154 (origin
11155 (method url-fetch)
11156 (uri (pypi-uri "validictory" version))
11157 (sha256
11158 (base32
11159 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11160 (build-system python-build-system)
11161 (arguments
11162 '(#:phases
11163 (modify-phases %standard-phases
11164 (add-after 'unpack 'bootstrap
11165 ;; Move the tests out of the package directory to avoid
11166 ;; packaging them.
11167 (lambda* _
11168 (rename-file "validictory/tests" "tests")
11169 (delete-file "tests/__init__.py")))
11170 (replace 'check
11171 (lambda _
11172 ;; Extend PYTHONPATH so the built package will be found.
11173 (setenv "PYTHONPATH"
11174 (string-append (getcwd) "/build/lib:"
11175 (getenv "PYTHONPATH")))
6568bd5d 11176 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11177 (native-inputs
11178 `(("python-pytest" ,python-pytest)))
11179 (home-page
11180 "https://github.com/jamesturk/validictory")
11181 (synopsis "General purpose Python data validator")
11182 (description "It allows validation of arbitrary Python data structures.
11183
11184The schema format is based on the JSON Schema
11185proposal (http://json-schema.org), so combined with json the library is also
11186useful as a validator for JSON data.")
11187 (license license:expat)))
11188
11189(define-public python2-validictory
11190 (package-with-python2 python-validictory))
11191
11192(define-public python-pyelftools
11193 (package
11194 (name "python-pyelftools")
11195 (version "0.25")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "pyelftools" version))
11200 (sha256
11201 (base32
11202 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11203 (build-system python-build-system)
11204 (arguments
11205 `(#:phases
11206 (modify-phases %standard-phases
11207 (add-before 'check 'set-pythonpath
11208 (lambda _
11209 (setenv "PYTHONPATH"
11210 (string-append
11211 (getcwd) "/test/"
11212 ":" (getenv "PYTHONPATH")))
11213 #t)))))
11214 (home-page
11215 "https://github.com/eliben/pyelftools")
11216 (synopsis
11217 "Analyze binary and library file information")
11218 (description "This Python library provides interfaces for parsing and
11219analyzing two binary and library file formats; the Executable and Linking
11220Format (ELF), and debugging information in the Debugging With Attributed
11221Record Format (DWARF).")
11222 (license license:public-domain)))
11223
11224(define-public python-pyev
11225 (package
11226 (name "python-pyev")
11227 (version "0.9.0")
11228 (source
11229 (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "pyev" version))
11232 (sha256
11233 (base32
11234 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:tests? #f ; no test suite
11238 #:phases
11239 (modify-phases %standard-phases
11240 (add-after 'unpack 'patch
11241 (lambda* (#:key inputs #:allow-other-keys)
11242 (let ((libev (string-append (assoc-ref inputs "libev")
11243 "/lib/libev.so.4")))
11244 (substitute* "setup.py"
11245 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11246 (string-append "libev_dll_name = \"" libev "\"")))))))))
11247 (inputs
11248 `(("libev" ,libev)))
11249 (home-page "http://pythonhosted.org/pyev/")
11250 (synopsis "Python libev interface")
11251 (description "Pyev provides a Python interface to libev.")
11252 (license license:gpl3)))
11253
11254(define-public python2-pyev
11255 (package-with-python2 python-pyev))
11256
11257(define-public python-imagesize
11258 (package
11259 (name "python-imagesize")
11260 (version "1.1.0")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (pypi-uri "imagesize" version))
11265 (sha256
11266 (base32
11267 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11268 (build-system python-build-system)
11269 (home-page "https://github.com/shibukawa/imagesize_py")
11270 (synopsis "Gets image size of files in various formats in Python")
11271 (description
11272 "This package allows determination of image size from
11273PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11274 (license license:expat)))
11275
11276(define-public python2-imagesize
11277 (package-with-python2 python-imagesize))
11278
11279(define-public python-termstyle
11280 (package
11281 (name "python-termstyle")
11282 (version "0.1.11")
11283 (source
11284 (origin
11285 (method url-fetch)
11286 (uri (pypi-uri "termstyle" version))
11287 (sha256
11288 (base32
11289 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11290 (build-system python-build-system)
11291 (arguments
11292 '(#:phases
11293 (modify-phases %standard-phases
11294 (replace 'check
11295 (lambda _
831080a6 11296 (invoke "python" "test3.py"))))))
44d10b1f
RW
11297 (home-page "https://github.com/gfxmonk/termstyle")
11298 (synopsis "Console text coloring for Python")
11299 (description "This package provides console text coloring for Python.")
11300 (license license:bsd-3)))
11301
11302(define-public python-argcomplete
11303 (package
11304 (name "python-argcomplete")
11305 (version "1.7.0")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "argcomplete" version))
11310 (sha256
11311 (base32
11312 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11313 (build-system python-build-system)
11314 (native-inputs
11315 `(("python-pexpect" ,python-pexpect)
11316 ("tcsh" ,tcsh)
11317 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11318 (home-page "https://github.com/kislyuk/argcomplete")
11319 (synopsis "Shell tab completion for Python argparse")
11320 (description "argcomplete provides extensible command line tab completion
11321of arguments and options for Python scripts using @code{argparse}. It's
11322particularly useful for programs with many options or sub-parsers that can
11323dynamically suggest completions; for example, when browsing resources over the
11324network.")
11325 (license license:asl2.0)))
11326
11327(define-public python2-argcomplete
11328 (package-with-python2 python-argcomplete))
11329
11330(define-public python-xopen
11331 (package
11332 (name "python-xopen")
24d64989 11333 (version "0.5.0")
44d10b1f
RW
11334 (source
11335 (origin
11336 (method url-fetch)
11337 (uri (pypi-uri "xopen" version))
11338 (sha256
11339 (base32
24d64989 11340 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11341 (build-system python-build-system)
24d64989
RW
11342 (propagated-inputs
11343 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11344 (home-page "https://github.com/marcelm/xopen/")
11345 (synopsis "Open compressed files transparently")
11346 (description "This module provides an @code{xopen} function that works like
11347Python's built-in @code{open} function, but can also deal with compressed files.
11348Supported compression formats are gzip, bzip2 and, xz, and are automatically
11349recognized by their file extensions. The focus is on being as efficient as
11350possible on all supported Python versions.")
11351 (license license:expat)))
11352
11353(define-public python2-xopen
11354 (let ((base (package-with-python2
11355 (strip-python2-variant python-xopen))))
11356 (package
11357 (inherit base)
11358 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11359 ,@(package-propagated-inputs base))))))
11360
11361(define-public python-cheetah
11362 (package
11363 (name "python-cheetah")
11364 (version "3.1.0")
11365 (source
11366 (origin
11367 (method url-fetch)
11368 (uri (pypi-uri "Cheetah3" version))
11369 (sha256
11370 (base32
11371 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11372 (build-system python-build-system)
11373 (arguments
11374 `(#:modules ((guix build utils)
11375 (guix build python-build-system)
11376 (ice-9 ftw)
11377 (srfi srfi-1)
11378 (srfi srfi-26))
11379 #:phases (modify-phases %standard-phases
11380 (add-after 'unpack 'use-absolute-python
11381 (lambda _
11382 (substitute* "Cheetah/CheetahWrapper.py"
11383 (("#!/usr/bin/env python")
11384 (string-append "#!" (which "python"))))
11385 #t))
11386 (replace 'check
11387 (lambda _
11388 (let ((cwd (getcwd)))
11389 (setenv "PYTHONPATH"
11390 (string-append
11391 cwd "/build/"
11392 (find (cut string-prefix? "lib" <>)
11393 (scandir (string-append cwd "/build")))
11394 ":" (getenv "PYTHONPATH")))
11395 (setenv "PATH"
11396 (string-append (getenv "PATH")
11397 ":" cwd "/bin"))
11398 (setenv "TMPDIR" "/tmp")
11399
11400 (substitute* "Cheetah/Tests/Test.py"
11401 (("unittest.TextTestRunner\\(\\)")
11402 "unittest.TextTestRunner(verbosity=2)"))
11403
11404 (invoke "python" "Cheetah/Tests/Test.py")))))))
11405 (propagated-inputs
11406 `(("python-markdown" ,python-markdown))) ;optional
11407 (home-page "http://cheetahtemplate.org/")
11408 (synopsis "Template engine")
11409 (description "Cheetah is a text-based template engine and Python code
11410generator.
11411
11412Cheetah can be used as a standalone templating utility or referenced as
11413a library from other Python applications. It has many potential uses,
11414but web developers looking for a viable alternative to ASP, JSP, PHP and
11415PSP are expected to be its principle user group.
11416
11417Features:
11418@enumerate
11419@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11420 text-based format.
11421@item Cleanly separates content, graphic design, and program code.
11422@item Blends the power and flexibility of Python with a simple template language
11423 that non-programmers can understand.
11424@item Gives template writers full access to any Python data structure, module,
11425 function, object, or method in their templates.
11426@item Makes code reuse easy by providing an object-orientated interface to
11427 templates that is accessible from Python code or other Cheetah templates.
11428 One template can subclass another and selectively reimplement sections of it.
11429@item Provides a simple, yet powerful, caching mechanism that can dramatically
11430 improve the performance of a dynamic website.
11431@item Compiles templates into optimized, yet readable, Python code.
11432@end enumerate")
11433 (license (license:x11-style "file://LICENSE"))))
11434
11435(define-public python2-cheetah
11436 (package-with-python2 python-cheetah))
11437
11438(define-public python-dulwich
11439 (package
11440 (name "python-dulwich")
11441 (version "0.18.6")
11442 (source
11443 (origin
11444 (method url-fetch)
11445 (uri (list (string-append "https://www.dulwich.io/releases/"
11446 "dulwich-" version ".tar.gz")
11447 (pypi-uri "dulwich" version)))
11448 (sha256
11449 (base32
11450 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11451 (build-system python-build-system)
11452 (arguments
11453 `(#:phases
11454 (modify-phases %standard-phases
11455 (add-before 'check 'fix-tests
11456 (lambda* (#:key inputs #:allow-other-keys)
11457 ;; The tests use Popen with a custom environment which doesn't
11458 ;; include PATH.
11459 (substitute* "dulwich/tests/compat/utils.py"
11460 (("'git'") (string-append "'"
11461 (which "git")
11462 "'")))
11463 (substitute* '("dulwich/tests/test_repository.py"
11464 "dulwich/tests/test_hooks.py")
11465 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11466 (setenv "TEST_RUNNER" "unittest")
11467 (setenv "PYTHONHASHSEED" "random")
11468 #t)))))
11469 (propagated-inputs
11470 `(("python-fastimport" ,python-fastimport)))
11471 (native-inputs
11472 `(("python-mock" ,python-mock)
11473 ("python-geventhttpclient" ,python-geventhttpclient)
11474 ("git" ,git)))
11475 (home-page "https://www.dulwich.io/")
11476 (synopsis "Git implementation in Python")
11477 (description "Dulwich is an implementation of the Git file formats and
11478protocols written in pure Python.")
11479 ;; Can be used with either license.
11480 (license (list license:asl2.0 license:gpl2+))))
11481
11482(define-public python2-dulwich
11483 (package-with-python2 python-dulwich))
11484
11485(define-public python-pbkdf2
11486 (package
11487 (name "python-pbkdf2")
11488 (version "1.3")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "pbkdf2" version))
11493 (sha256
11494 (base32
11495 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11496 (build-system python-build-system)
11497 (arguments
11498 '(#:phases
11499 (modify-phases %standard-phases
11500 (replace 'check
11501 (lambda _
11502 (setenv "PYTHONPATH"
11503 (string-append (getcwd) "/build/lib:"
11504 (getenv "PYTHONPATH")))
ee2bb944 11505 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11506 (propagated-inputs
11507 `(("python-pycrypto" ,python-pycrypto))) ; optional
11508 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11509 (synopsis "Password-based key derivation")
11510 (description "This module implements the password-based key derivation
11511function, PBKDF2, specified in RSA PKCS#5 v2.0.
11512
11513PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11514is part of the RSA Public Key Cryptography Standards series. The provided
11515implementation takes a password or a passphrase and a salt value (and
11516optionally a iteration count, a digest module, and a MAC module) and provides
11517a file-like object from which an arbitrarly-sized key can be read.")
11518 (license license:expat)))
11519
11520(define-public python2-pbkdf2
11521 (package-with-python2 python-pbkdf2))
11522
11523(define-public python-qrcode
11524 (package
11525 (name "python-qrcode")
217ea1a1 11526 (version "6.1")
44d10b1f
RW
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "qrcode" version))
11531 (sha256
217ea1a1 11532 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11533 (build-system python-build-system)
11534 (arguments
11535 ;; FIXME: Tests require packaging 'pymaging'.
11536 '(#:tests? #f))
11537 (propagated-inputs
11538 `(("python-lxml" ,python-lxml) ; for SVG output
11539 ("python-pillow" ,python-pillow) ; for PNG output
11540 ("python-six" ,python-six)))
44d10b1f
RW
11541 (home-page "https://github.com/lincolnloop/python-qrcode")
11542 (synopsis "QR Code image generator")
11543 (description "This package provides a pure Python QR Code generator
11544module. It uses the Python Imaging Library (PIL) to allow for the generation
11545of QR Codes.
11546
11547In addition this package provides a command line tool to generate QR codes and
11548either write these QR codes to a file or do the output as ascii art at the
11549console.")
11550 (license license:bsd-3)))
11551
11552(define-public python2-qrcode
11553 (package-with-python2 python-qrcode))
11554
11555(define-public python-rst2ansi
11556 (package
11557 (name "python-rst2ansi")
11558 (version "0.1.5")
11559 (source
11560 (origin
11561 (method url-fetch)
11562 (uri (pypi-uri "rst2ansi" version))
11563 (sha256
11564 (base32
11565 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11566 (build-system python-build-system)
11567 (propagated-inputs
11568 `(("python-docutils" ,python-docutils)))
11569 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11570 (synopsis "Convert RST to ANSI-decorated console output")
11571 (description
11572 "Python module dedicated to rendering RST (reStructuredText) documents
11573to ansi-escaped strings suitable for display in a terminal.")
11574 (license license:expat)))
11575
11576(define-public python-ansi2html
11577 (package
11578 (name "python-ansi2html")
11579 (version "1.2.0")
11580 (source
11581 (origin
11582 (method url-fetch)
11583 (uri (pypi-uri "ansi2html" version))
11584 (sha256
11585 (base32
11586 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11587 (build-system python-build-system)
11588 (native-inputs
11589 `(("python-mock" ,python-mock)
11590 ("python-nose" ,python-nose)))
11591 (propagated-inputs
11592 `(("python-six" ,python-six)))
11593 (home-page "https://github.com/ralphbean/ansi2html")
11594 (synopsis "Convert ANSI-decorated console output to HTML")
11595 (description
11596 "@command{ansi2html} is a Python library and command line utility for
11597convering text with ANSI color codes to HTML or LaTeX.")
11598 (license license:gpl3+)))
11599
11600(define-public python2-ansi2html
11601 (package-with-python2 python-ansi2html))
11602
11603(define-public python-ddt
11604 (package
11605 (name "python-ddt")
11606 (version "1.1.3")
11607 (source
11608 (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "ddt" version))
11611 (sha256
11612 (base32
11613 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11614 (build-system python-build-system)
11615 (native-inputs
11616 `(("python-mock" ,python-mock)
11617 ("python-nose" ,python-nose)))
11618 (propagated-inputs
11619 `(("python-six" ,python-six)
11620 ("python-pyyaml" ,python-pyyaml)))
11621 (home-page "https://github.com/txels/ddt")
11622 (synopsis "Data-Driven Tests")
11623 (description
11624 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11625running it with different test data, and make it appear as multiple test
11626cases.")
11627 (license license:expat)))
11628
11629(define-public python2-ddt
11630 (package-with-python2 python-ddt))
11631
11632(define-public python-pycountry
11633 (package
11634 (name "python-pycountry")
11635 (version "18.5.26")
11636 (source
11637 (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "pycountry" version))
11640 (sha256
11641 (base32
11642 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11643 (build-system python-build-system)
11644 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11645 (synopsis "ISO databases for languages, countries, currencies, etc.")
11646 (description
11647 "@code{pycountry} provides the ISO databases for the standards:
11648@enumerate
11649@item 639-3 (Languages)
11650@item 3166 (Countries)
11651@item 3166-3 (Deleted Countries)
11652@item 3166-2 (Subdivisions of countries)
11653@item 4217 (Currencies)
11654@item 15924 (Scripts)
11655@end enumerate
11656It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11657through a Python API.")
11658 (license license:lgpl2.1+)))
11659
11660(define-public python2-pycountry
11661 (package-with-python2 python-pycountry))
11662
11663(define-public python-pycosat
11664 (package
11665 (name "python-pycosat")
11666 (version "0.6.1")
11667 (source
11668 (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "pycosat" version))
11671 (sha256
11672 (base32
11673 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11674 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11675 (build-system python-build-system)
11676 (home-page "https://github.com/ContinuumIO/pycosat")
11677 (synopsis "Bindings to picosat (a SAT solver)")
11678 (description
11679 "This package provides efficient Python bindings to @code{picosat} on
11680the C level. When importing pycosat, the @code{picosat} solver becomes part
11681of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11682Problem} (SAT) solver.")
11683 (license license:expat)))
11684
11685(define-public python2-pycosat
11686 (package-with-python2 python-pycosat))
11687
11688(define-public python2-ruamel.ordereddict
11689 (package
11690 (name "python2-ruamel.ordereddict")
11691 (version "0.4.9")
11692 (source
11693 (origin
11694 (method url-fetch)
11695 (uri (pypi-uri "ruamel.ordereddict" version))
11696 (sha256
11697 (base32
11698 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11699 (build-system python-build-system)
11700 (arguments
11701 `(#:python ,python-2
11702 #:phases
11703 (modify-phases %standard-phases
11704 (delete 'check)
11705 (add-after 'install 'check
11706 (lambda* (#:key inputs outputs #:allow-other-keys)
11707 (add-installed-pythonpath inputs outputs)
f987ac30 11708 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11709 (home-page "https://bitbucket.org/ruamel/ordereddict")
11710 (synopsis "Version of dict that keeps keys in insertion order")
11711 (description
11712 "This is an implementation of an ordered dictionary with @dfn{Key
11713Insertion Order} (KIO: updates of values do not affect the position of the
11714key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11715removed and put at the back). The standard library module @code{OrderedDict},
11716implemented later, implements a subset of @code{ordereddict} functionality.
11717Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11718Order} (KSO, no sorting function can be specified, but a transform can be
11719specified to apply on the key before comparison (e.g. @code{string.lower})).")
11720 (license license:expat)))
11721
11722(define-public python-pypeg2
11723 (package
11724 (name "python-pypeg2")
11725 (version "2.15.2")
11726 (source
11727 (origin
11728 (method url-fetch)
11729 (uri (pypi-uri "pyPEG2" version))
11730 (sha256
11731 (base32
11732 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11733 (build-system python-build-system)
11734 (propagated-inputs `(("python-lxml" ,python-lxml)))
11735 (arguments
11736 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11737 '(#:tests? #f))
11738 (home-page "https://fdik.org/pyPEG/")
11739 (synopsis "Parsering Expression Grammars in Python")
11740 (description "PyPEG is an intrinsic parser interpreter framework for
11741Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11742parse many formal languages.")
11743 (license license:gpl2)))
11744
11745(define-public python-incremental
11746 (package
11747 (name "python-incremental")
11748 (version "17.5.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "incremental" version))
11753 (sha256
11754 (base32
11755 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11756 (build-system python-build-system)
11757 (home-page "https://github.com/hawkowl/incremental")
11758 (synopsis "Library for versioning Python projects")
11759 (description "Incremental is a small library that versions your Python
11760projects.")
11761 (license license:expat)))
11762
11763(define-public python2-incremental
11764 (package-with-python2 python-incremental))
11765
11766(define-public python-invoke
11767 (package
11768 (name "python-invoke")
11769 (home-page "http://www.pyinvoke.org/")
11770 (version "1.1.0")
11771 (source (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "invoke" version))
11774 (sha256
11775 (base32
11776 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11777 (build-system python-build-system)
11778 (arguments
11779 ;; XXX: Requires many dependencies that are not yet in Guix.
11780 `(#:tests? #f))
11781 (synopsis "Pythonic task execution")
11782 (description
11783 "Invoke is a Python task execution tool and library, drawing inspiration
11784from various sources to arrive at a powerful and clean feature set. It is
11785evolved from the Fabric project, but focuses on local and abstract concerns
11786instead of servers and network commands.")
11787 (license license:bsd-3)))
11788
11789(define-public python2-invoke
11790 (package-with-python2 python-invoke))
11791
11792(define-public python-automat
11793 (package
11794 (name "python-automat")
919d80a0 11795 (version "0.7.0")
44d10b1f
RW
11796 (source (origin
11797 (method url-fetch)
11798 (uri (pypi-uri "Automat" version))
11799 (sha256
11800 (base32
919d80a0 11801 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
11802 (build-system python-build-system)
11803 ;; We disable the tests because they require python-twisted, while
11804 ;; python-twisted depends on python-automat. Twisted is optional, but the
11805 ;; tests fail if it is not available. Also see
11806 ;; <https://github.com/glyph/automat/issues/71>.
11807 (arguments '(#:tests? #f))
11808 (native-inputs
11809 `(("python-m2r" ,python-m2r)
11810 ("python-setuptools-scm" ,python-setuptools-scm)
11811 ("python-graphviz" ,python-graphviz)))
11812 (propagated-inputs
11813 `(("python-six" ,python-six)
11814 ("python-attrs" ,python-attrs)))
11815 (home-page "https://github.com/glyph/Automat")
11816 (synopsis "Self-service finite-state machines")
11817 (description "Automat is a library for concise, idiomatic Python
11818expression of finite-state automata (particularly deterministic finite-state
11819transducers).")
11820 (license license:expat)))
11821
11822(define-public python2-automat
11823 (package-with-python2 python-automat))
11824
11825(define-public python-m2r
11826 (package
11827 (name "python-m2r")
bcfb8fac 11828 (version "0.2.1")
44d10b1f
RW
11829 (source (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "m2r" version))
11832 (sha256
11833 (base32
bcfb8fac 11834 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
11835 (build-system python-build-system)
11836 (propagated-inputs
11837 `(("python-docutils" ,python-docutils)
11838 ("python-mistune" ,python-mistune)))
11839 (native-inputs
11840 `(("python-pygments" ,python-pygments)
11841 ("python-mock" ,python-mock)))
11842 (home-page "https://github.com/miyakogi/m2r")
11843 (synopsis "Markdown to reStructuredText converter")
11844 (description "M2R converts a markdown file including reST markups to valid
11845reST format.")
11846 (license license:expat)))
11847
11848(define-public python2-m2r
11849 (package-with-python2 python-m2r))
11850
11851(define-public python-constantly
11852 (package
11853 (name "python-constantly")
11854 (version "15.1.0")
11855 (source (origin
11856 (method url-fetch)
11857 (uri (pypi-uri "constantly" version))
11858 (sha256
11859 (base32
11860 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11861 (build-system python-build-system)
11862 (home-page "https://github.com/twisted/constantly")
11863 (synopsis "Symbolic constants in Python")
11864 (description "Constantly is a Python library that provides symbolic
11865constant support. It includes collections and constants with text, numeric,
11866and bit flag values.")
11867 (license license:expat)))
11868
11869(define-public python2-constantly
11870 (package-with-python2 python-constantly))
11871
11872(define-public python-attrs
11873 (package
11874 (name "python-attrs")
c41d5144 11875 (version "19.1.0")
44d10b1f
RW
11876 (source (origin
11877 (method url-fetch)
11878 (uri (pypi-uri "attrs" version))
11879 (sha256
11880 (base32
c41d5144 11881 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11882 (build-system python-build-system)
11883 (arguments
11884 `(#:modules ((guix build utils)
11885 (guix build python-build-system)
11886 (ice-9 ftw)
11887 (srfi srfi-1)
11888 (srfi srfi-26))
11889 #:phases (modify-phases %standard-phases
11890 (replace 'check
11891 (lambda _
11892 (let ((cwd (getcwd)))
11893 (setenv "PYTHONPATH"
11894 (string-append
11895 cwd "/build/"
11896 (find (cut string-prefix? "lib" <>)
11897 (scandir (string-append cwd "/build")))
11898 ":"
11899 (getenv "PYTHONPATH")))
11900 (invoke "python" "-m" "pytest")))))))
11901 (native-inputs
11902 `(("python-coverage" ,python-coverage)
11903 ("python-hypothesis" ,python-hypothesis)
11904 ("python-pympler" ,python-pympler)
11905 ("python-pytest" ,python-pytest)
11906 ("python-six" ,python-six)
11907 ("python-sphinx" ,python-sphinx)
11908 ("python-zope-interface" ,python-zope-interface)))
11909 (home-page "https://github.com/python-attrs/attrs/")
11910 (synopsis "Attributes without boilerplate")
11911 (description "@code{attrs} is a Python package with class decorators that
11912ease the chores of implementing the most common attribute-related object
11913protocols.")
11914 (license license:expat)))
11915
11916(define-public python2-attrs
11917 (package-with-python2 python-attrs))
11918
11919(define-public python-attrs-bootstrap
11920 (package
11921 (inherit python-attrs)
11922 (name "python-attrs-bootstrap")
44d10b1f
RW
11923 (native-inputs `())
11924 (arguments `(#:tests? #f))))
11925
11926(define-public python2-attrs-bootstrap
11927 (package-with-python2 python-attrs-bootstrap))
11928
11929(define-public python2-cliapp
11930 (package
11931 (name "python2-cliapp")
9064b84e 11932 (version "1.20180812.1")
44d10b1f
RW
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (string-append
11937 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11938 version ".tar.gz"))
11939 (sha256
11940 (base32
9064b84e 11941 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11942 (build-system python-build-system)
11943 (arguments
11944 `(#:python ,python-2
11945 #:phases
11946 (modify-phases %standard-phases
11947 ;; check phase needs to be run before the build phase. If not,
11948 ;; coverage-test-runner looks for tests for the built source files,
11949 ;; and fails.
11950 (delete 'check)
11951 (add-before 'build 'check
11952 (lambda _
11953 ;; Disable python3 tests
11954 (substitute* "check"
11955 (("python3") "# python3"))
6c826d32 11956 (invoke "./check"))))))
44d10b1f
RW
11957 (native-inputs
11958 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11959 ("python2-pep8" ,python2-pep8)))
11960 (propagated-inputs
11961 `(("python2-pyaml" ,python2-pyaml)))
11962 (home-page "https://liw.fi/cliapp/")
11963 (synopsis "Python framework for command line programs")
11964 (description "@code{python2-cliapp} is a python framework for
11965command line programs. It contains the typical stuff such programs
11966need to do, such as parsing the command line for options, and
11967iterating over input files.")
11968 (license license:gpl2+)))
11969
11970(define-public python2-ttystatus
11971 (package
11972 (name "python2-ttystatus")
e516a9c2 11973 (version "0.36")
44d10b1f
RW
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (string-append
11978 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11979 version ".tar.gz"))
11980 (sha256
11981 (base32
e516a9c2 11982 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11983 (build-system python-build-system)
11984 (native-inputs
11985 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11986 ("python2-pep8" ,python2-pep8)))
11987 (arguments
11988 `(#:python ,python-2
11989 #:phases
11990 (modify-phases %standard-phases
11991 ;; check phase needs to be run before the build phase. If not,
11992 ;; coverage-test-runner looks for tests for the built source files,
11993 ;; and fails.
11994 (delete 'check)
11995 (add-before 'build 'check
cbeee881 11996 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11997 (home-page "https://liw.fi/ttystatus/")
11998 (synopsis "Python library for showing progress reporting and
11999status updates on terminals")
12000 (description "@code{python2-ttystatus} is a python library for
12001showing progress reporting and status updates on terminals, for
12002command line programs. Output is automatically adapted to the width
12003of the terminal: truncated if it does not fit, and resized if the
12004terminal size changes.")
12005 (license license:gpl3+)))
12006
12007(define-public python2-tracing
12008 (package
12009 (name "python2-tracing")
12010 (version "0.10")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (string-append
12015 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12016 version ".tar.gz"))
12017 (sha256
12018 (base32
12019 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12020 (build-system python-build-system)
12021 (arguments
12022 `(#:python ,python-2))
12023 (home-page "https://liw.fi/tracing/")
12024 (synopsis "Python debug logging helper")
12025 (description "@code{python2-tracing} is a python library for
12026logging debug messages. It provides a way to turn debugging messages
12027on and off, based on the filename they occur in. It is much faster
12028than using @code{logging.Filter} to accomplish the same thing, which
12029matters when code is run in production mode. The actual logging still
12030happens using the @code{logging} library.")
12031 (license license:gpl3+)))
12032
12033(define-public python2-larch
12034 (package
12035 (name "python2-larch")
12036 (version "1.20151025")
12037 (source
12038 (origin
12039 (method url-fetch)
12040 (uri (string-append
12041 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12042 version ".tar.gz"))
12043 (patches (search-patches
12044 "python2-larch-coverage-4.0a6-compatibility.patch"))
12045 (sha256
12046 (base32
12047 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12048 (build-system python-build-system)
12049 (arguments
12050 `(#:python ,python-2
12051 #:phases
12052 (modify-phases %standard-phases
12053 ;; check phase needs to be run before the build phase. If not,
12054 ;; coverage-test-runner looks for tests for the built source files,
12055 ;; and fails.
12056 (delete 'check)
12057 (add-before 'build 'check
204ad455 12058 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12059 (native-inputs
12060 `(("cmdtest" ,cmdtest)
12061 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12062 (propagated-inputs
12063 `(("python2-tracing" ,python2-tracing)))
12064 (home-page "https://liw.fi/larch/")
12065 (synopsis "Python copy-on-write B-tree library")
12066 (description "@code{python2-larch} is an implementation of
12067particular kind of B-tree, based on research by Ohad Rodeh. See
12068@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12069on the data structure.
12070
12071The distinctive feature of this B-tree is that a node is never
12072(conceptually) modified. Instead, all updates are done by
12073copy-on-write. This makes it easy to clone a tree, and modify only the
12074clone, while other processes access the original tree.")
12075 (license license:gpl3+)))
12076
12077(define-public python-astroid
12078 (package
12079 (name "python-astroid")
12080 (version "2.1.0")
12081 (source
12082 (origin
12083 (method url-fetch)
12084 (uri (pypi-uri "astroid" version))
12085 (sha256
12086 (base32
12087 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12088 (build-system python-build-system)
12089 (propagated-inputs
12090 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12091 ("python-six" ,python-six)
12092 ("python-wrapt" ,python-wrapt)))
12093 (native-inputs
12094 `(("python-dateutil" ,python-dateutil)
12095 ("python-nose" ,python-nose)
12096 ("python-pytest" ,python-pytest)
12097 ("python-pytest-runner" ,python-pytest-runner)))
12098 (arguments
12099 `(#:phases
12100 (modify-phases %standard-phases
12101 (add-after 'unpack 'remove-spurious-test
12102 (lambda _
12103 ;; This can be removed after upgrading from python-3.7
12104 ;; https://github.com/PyCQA/astroid/issues/593
12105 ;; https://bugs.python.org/issue34056
12106 (delete-file "astroid/tests/unittest_modutils.py")
12107 #t))
12108 (replace 'check
12109 (lambda _
12110 (invoke "pytest" "astroid"))))))
12111 (home-page "https://github.com/PyCQA/astroid")
12112 (synopsis "Common base representation of python source code for pylint and
12113other projects")
12114 (description "@code{python-astroid} provides a common base representation
12115of python source code for projects such as pychecker, pyreverse, pylint, etc.
12116
12117It provides a compatible representation which comes from the _ast module. It
12118rebuilds the tree generated by the builtin _ast module by recursively walking
12119down the AST and building an extended ast. The new node classes have
12120additional methods and attributes for different usages. They include some
12121support for static inference and local name scopes. Furthermore, astroid
12122builds partial trees by inspecting living objects.")
12123 (license license:lgpl2.1+)
12124 (properties `((python2-variant . ,(delay python2-astroid))))))
12125
12126(define-public python2-astroid
12127 (let ((base (package-with-python2
12128 (strip-python2-variant python-astroid))))
12129 (package (inherit base)
12130 ;; Version 2.x removes python2 support.
12131 (version "1.6.5")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "astroid" version))
12136 (sha256
12137 (base32
12138 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12139 (arguments
12140 (substitute-keyword-arguments (package-arguments base)
12141 ((#:phases phases)
12142 `(modify-phases ,phases
12143 (add-after 'unpack 'remove-spurious-test
12144 (lambda _
12145 ;; https://github.com/PyCQA/astroid/issues/276
12146 (delete-file "astroid/tests/unittest_brain.py")
12147 #t))
12148 (replace 'check
12149 (lambda _
12150 (invoke"python" "-m" "unittest" "discover"
12151 "-p" "unittest*.py")))))))
12152 (native-inputs `())
12153 (propagated-inputs
12154 `(("python2-backports-functools-lru-cache"
12155 ,python2-backports-functools-lru-cache)
12156 ("python2-enum34" ,python2-enum34)
12157 ("python2-singledispatch" ,python2-singledispatch)
12158 ,@(package-propagated-inputs base))))))
12159
12160(define-public python-isort
12161 (package
12162 (name "python-isort")
e2227b6a 12163 (version "4.3.4")
44d10b1f
RW
12164 (source
12165 (origin
e2227b6a
EF
12166 (method git-fetch)
12167 (uri (git-reference
12168 ;; Tests pass only from the Github sources
12169 (url "https://github.com/timothycrosley/isort")
12170 (commit version)))
12171 (file-name (git-file-name name version))
44d10b1f
RW
12172 (sha256
12173 (base32
e2227b6a 12174 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12175 (build-system python-build-system)
12176 (native-inputs
12177 `(("python-mock" ,python-mock)
12178 ("python-pytest" ,python-pytest)))
12179 (home-page "https://github.com/timothycrosley/isort")
12180 (synopsis "Python utility/library to sort python imports")
12181 (description "@code{python-isort} is a python utility/library to sort
12182imports alphabetically, and automatically separated into sections. It
12183provides a command line utility, a python library and plugins for various
12184editors.")
e2227b6a
EF
12185 (license license:expat)
12186 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12187
12188(define-public python2-isort
e2227b6a
EF
12189 (let ((base (package-with-python2
12190 (strip-python2-variant python-isort))))
12191 (package (inherit base)
12192 (native-inputs
12193 `(("python2-futures" ,python2-futures)
12194 ,@(package-native-inputs base))))))
44d10b1f
RW
12195
12196(define-public python2-backports-functools-lru-cache
12197 (package
12198 (name "python2-backports-functools-lru-cache")
12199 (version "1.5")
12200 (source
12201 (origin
12202 (method url-fetch)
12203 ;; only the pypi tarballs contain the necessary metadata
12204 (uri (pypi-uri "backports.functools_lru_cache" version))
12205 (sha256
12206 (base32
12207 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12208 (build-system python-build-system)
12209 (native-inputs
12210 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12211 (arguments
12212 `(#:python ,python-2))
12213 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12214 (synopsis "Backport of functools.lru_cache from Python 3.3")
12215 (description "@code{python2-backports-functools-lru-cache} is a backport
12216of @code{functools.lru_cache} from python 3.3.")
12217 (license license:expat)))
12218
12219(define-public python-configparser
12220 (package
12221 (name "python-configparser")
84127f8c 12222 (version "3.7.1")
44d10b1f
RW
12223 (source
12224 (origin
12225 (method url-fetch)
84127f8c 12226 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12227 (sha256
12228 (base32
84127f8c 12229 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12230 (build-system python-build-system)
809f003f 12231 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12232 (synopsis "Backport of configparser from python 3.5")
12233 (description "@code{python-configparser} is a backport of
12234@code{configparser} from Python 3.5 so that it can be used directly
12235in other versions.")
12236 (license license:expat)))
12237
12238(define-public python2-configparser
12239 (package-with-python2 python-configparser))
12240
12241(define-public python-mando
12242 (package
12243 (name "python-mando")
12244 (version "0.6.4")
12245 (source (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "mando" version))
12248 (sha256
12249 (base32
12250 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12251 (build-system python-build-system)
12252 (propagated-inputs
12253 `(("python-rst2ansi" ,python-rst2ansi)
12254 ("python-six" ,python-six)))
12255 (native-inputs
12256 `(("python-pytest" ,python-pytest)))
12257 (home-page "https://mando.readthedocs.org/")
12258 (synopsis
12259 "Wrapper around argparse, allowing creation of complete CLI applications")
12260 (description
12261 "This package is a wrapper around argparse, allowing you to write complete CLI
12262applications in seconds while maintaining all the flexibility.")
12263 (license license:expat)))
12264
12265(define-public python2-mando
12266 (package-with-python2 python-mando))
12267
70daf82f
RW
12268(define-public python2-argparse
12269 (package
12270 (name "python2-argparse")
12271 (version "1.4.0")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (pypi-uri "argparse" version))
12276 (sha256
12277 (base32
12278 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12279 (build-system python-build-system)
12280 (arguments
12281 `(#:python ,python-2))
12282 (home-page "https://github.com/ThomasWaldmann/argparse/")
12283 (synopsis "Python command-line parsing library")
12284 (description
12285 "This package is mostly for people who want to have @code{argparse} on
12286older Pythons because it was not part of the standard library back then.")
12287 (license license:psfl)))
12288
44d10b1f
RW
12289(define-public python-fudge
12290 (package
12291 (name "python-fudge")
12292 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12293 ;; package, which is currently the only use of this package.
12294 (version "0.9.6")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "fudge" version))
12299 (sha256
12300 (base32
12301 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12302 (build-system python-build-system)
12303 (arguments
12304 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12305 (home-page "https://github.com/fudge-py/fudge")
12306 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12307 (description
12308 "Fudge is a Python module for using fake objects (mocks and stubs) to
12309test real ones.
12310
12311In readable Python code, you declare the methods available on your fake object
12312and how they should be called. Then you inject that into your application and
12313start testing. This declarative approach means you don’t have to record and
12314playback actions and you don’t have to inspect your fakes after running code.
12315If the fake object was used incorrectly then you’ll see an informative
12316exception message with a traceback that points to the culprit.")
12317 (license license:expat)))
12318
12319(define-public python2-fudge
12320 (package-with-python2 python-fudge))
12321
12322(define-public python-mwclient
12323 (package
12324 (name "python-mwclient")
12325 (version "0.8.4")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 ;; The PyPI version wouldn't contain tests.
12330 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12331 "v" version ".tar.gz"))
12332 (file-name (string-append name "-" version ".tar.gz"))
12333 (sha256
12334 (base32
12335 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12336 (build-system python-build-system)
12337 (propagated-inputs
12338 `(("python-requests" ,python-requests)
12339 ("python-requests-oauthlib"
12340 ,python-requests-oauthlib)
12341 ("python-six" ,python-six)))
12342 (native-inputs
12343 `(("python-mock" ,python-mock)
12344 ("python-pytest" ,python-pytest)
12345 ("python-pytest-pep8" ,python-pytest-pep8)
12346 ("python-pytest-cache" ,python-pytest-cache)
12347 ("python-pytest-cov" ,python-pytest-cov)
12348 ("python-responses" ,python-responses)))
12349 (home-page "https://github.com/btongminh/mwclient")
12350 (synopsis "MediaWiki API client")
12351 (description "This package provides a MediaWiki API client.")
12352 (license license:expat)))
12353
12354(define-public python2-mwclient
12355 (package-with-python2 python-mwclient))
12356
12357(define-public python-utils
12358 (package
12359 (name "python-utils")
12360 (version "2.1.0")
12361 (source (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "python-utils" version))
12364 (sha256
12365 (base32
12366 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12367 (build-system python-build-system)
12368 (native-inputs
12369 `(("pytest-runner" ,python-pytest-runner)
12370 ("pytest" ,python-pytest)
12371 ("six" ,python-six)))
12372 (home-page "https://github.com/WoLpH/python-utils")
12373 (synopsis "Convenient utilities not included with the standard Python install")
12374 (description
12375 "Python Utils is a collection of small Python functions and classes which
12376make common patterns shorter and easier.")
12377 (license license:bsd-2)))
12378
12379(define-public python2-utils
12380 (package-with-python2 python-utils))
12381
44d10b1f
RW
12382(define-public python-diff-match-patch
12383 (package
12384 (name "python-diff-match-patch")
12385 (version "20121119")
12386 (source
12387 (origin
12388 (method url-fetch)
12389 (uri (pypi-uri "diff-match-patch" version))
12390 (sha256
12391 (base32
12392 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12393 (build-system python-build-system)
12394 (home-page "https://code.google.com/p/google-diff-match-patch")
12395 (synopsis "Synchronize plain text")
12396 (description "Diff Match and Patch libraries offer robust algorithms to
12397perform the operations required for synchronizing plain text.")
12398 (license license:asl2.0)))
12399
12400(define-public python2-diff-match-patch
12401 (package-with-python2 python-diff-match-patch))
12402
12403(define-public python-dirsync
12404 (package
12405 (name "python-dirsync")
12406 (version "2.2.3")
12407 (source
12408 (origin
12409 (method url-fetch)
12410 (uri (pypi-uri "dirsync" version))
12411 (sha256
12412 (base32
12413 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12414 (build-system python-build-system)
12415 (propagated-inputs
12416 `(("six" ,python-six)))
12417 (home-page "https://bitbucket.org/tkhyn/dirsync")
12418 (synopsis "Advanced directory tree synchronisation tool")
12419 (description "Advanced directory tree synchronisation tool.")
12420 (license license:expat)))
12421
12422(define-public python2-dirsync
12423 (package-with-python2 python-dirsync))
12424
12425(define-public python-levenshtein
12426 (package
12427 (name "python-levenshtein")
12428 (version "0.12.0")
12429 (source
12430 (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "python-Levenshtein" version))
12433 (sha256
12434 (base32
12435 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12436 (build-system python-build-system)
12437 (home-page "https://github.com/ztane/python-Levenshtein")
12438 (synopsis "Fast computation of Levenshtein distance and string similarity")
12439 (description
12440 "The Levenshtein Python C extension module contains functions for fast computation of
12441@enumerate
12442@item Levenshtein (edit) distance, and edit operations
12443@item string similarity
12444@item approximate median strings, and generally string averaging
12445@item string sequence and set similarity
12446@end enumerate
12447It supports both normal and Unicode strings.")
12448 (license license:gpl2+)))
12449
12450(define-public python2-levenshtein
12451 (package-with-python2 python-levenshtein))
12452
12453(define-public python-scandir
12454 (package
12455 (name "python-scandir")
12456 (version "1.9.0")
12457 (source
12458 (origin
12459 (method url-fetch)
12460 (uri (pypi-uri "scandir" version))
12461 (sha256
12462 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12463 (build-system python-build-system)
12464 (arguments
12465 `(#:phases (modify-phases %standard-phases
12466 (replace 'check
12467 (lambda _
12468 (invoke "python" "test/run_tests.py"))))))
12469 (home-page "https://github.com/benhoyt/scandir")
12470 (synopsis "Directory iteration function")
12471 (description
12472 "Directory iteration function like os.listdir(), except that instead of
12473returning a list of bare filenames, it yields DirEntry objects that include
12474file type and stat information along with the name. Using scandir() increases
12475the speed of os.walk() by 2-20 times (depending on the platform and file
12476system) by avoiding unnecessary calls to os.stat() in most cases.
12477
12478This package is part of the Python standard library since version 3.5.")
12479 (license license:bsd-3)))
12480
12481(define-public python2-scandir
12482 (package-with-python2 python-scandir))
12483
12484(define-public python2-stemming
12485 (package
12486 (name "python2-stemming")
12487 (version "1.0.1")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "stemming" version))
12492 (sha256
12493 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12494 (build-system python-build-system)
12495 (arguments
12496 `(#:python ,python-2))
12497 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12498 (synopsis "Python implementations of various stemming algorithms")
12499 (description
12500 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12501stemming algorithms for English. These implementations are straightforward and
12502efficient, unlike some Python versions of the same algorithms available on the
12503Web. This package is an extraction of the stemming code included in the Whoosh
12504search engine.")
12505 (license license:public-domain)))
12506
12507(define-public python-factory-boy
12508 (package
12509 (name "python-factory-boy")
12510 (version "2.8.1")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (pypi-uri "factory_boy" version))
12515 (sha256
12516 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12517 (build-system python-build-system)
12518 (arguments
12519 ;; Tests are not included in the tarball.
12520 `(#:tests? #f))
12521 (propagated-inputs
12522 `(("faker" ,python-faker)))
12523 (home-page "https://github.com/benhoyt/scandir")
12524 (synopsis "Versatile test fixtures replacement")
12525 (description
12526 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12527
12528As a fixtures replacement tool, it aims to replace static, hard to maintain
12529fixtures with easy-to-use factories for complex object.
12530
12531Instead of building an exhaustive test setup with every possible combination
12532of corner cases, factory_boy allows you to use objects customized for the
12533current test, while only declaring the test-specific fields")
12534 (license license:expat)))
12535
12536(define-public python2-factory-boy
12537 (package-with-python2 python-factory-boy))
12538
12539(define-public python-translate-toolkit
12540 (package
12541 (name "python-translate-toolkit")
12542 (version "2.1.0")
12543 (source
12544 (origin
12545 (method url-fetch)
12546 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12547 (sha256
12548 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12549 (build-system python-build-system)
12550 (native-inputs
12551 `(("python-pytest" ,python-pytest)
12552 ("python-sphinx" ,python-sphinx)))
12553 (propagated-inputs
12554 `(("python-babel" ,python-babel)
12555 ("python-beautifulsoup4" ,python-beautifulsoup4)
12556 ("python-chardet" ,python-chardet)
12557 ("python-diff-match-patch" ,python-diff-match-patch)
12558 ("python-levenshtein" ,python-levenshtein)
12559 ("python-lxml" ,python-lxml)
12560 ("python-six" ,python-six)
12561 ("python-vobject" ,python-vobject)
12562 ("python-pyyaml" ,python-pyyaml)))
12563 (arguments
12564 ;; TODO: tests are not run, because they end with
12565 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12566 ;; 'parse_funcs'
12567 ;; during test setup.
12568 `(#:tests? #f))
18919cf9 12569 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
12570 (synopsis "Tools and API for translation and localization engineering")
12571 (description
12572 "Tools and API for translation and localization engineering. It contains
12573several utilities, as well as an API for building localization tools.")
12574 (license license:gpl2+)))
12575
12576(define-public python2-translate-toolkit
12577 (package-with-python2 python-translate-toolkit))
12578
12579(define-public python-packaging
12580 (package
12581 (name "python-packaging")
94295903 12582 (version "19.0")
44d10b1f
RW
12583 (source
12584 (origin
12585 (method url-fetch)
12586 (uri (pypi-uri "packaging" version))
12587 (sha256
12588 (base32
94295903 12589 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
12590 (build-system python-build-system)
12591 (arguments
12592 `(#:phases (modify-phases %standard-phases
12593 (replace 'check
12594 (lambda _ (invoke "py.test" "-vv"))))))
12595 (native-inputs
12596 `(("python-pretend" ,python-pretend)
12597 ("python-pytest" ,python-pytest)))
12598 (propagated-inputs
12599 `(("python-pyparsing" ,python-pyparsing)
12600 ("python-six" ,python-six)))
12601 (home-page "https://github.com/pypa/packaging")
12602 (synopsis "Core utilities for Python packages")
12603 (description "Packaging is a Python module for dealing with Python packages.
12604It offers an interface for working with package versions, names, and dependency
12605information.")
12606 ;; From 'LICENSE': This software is made available under the terms of
12607 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12608 ;; Contributions to this software is made under the terms of *both* these
12609 ;; licenses.
12610 (license (list license:asl2.0 license:bsd-2))))
12611
12612(define-public python2-packaging
12613 (package-with-python2 python-packaging))
12614
12615(define-public python-relatorio
12616 (package
12617 (name "python-relatorio")
12618 (version "0.8.0")
12619 (source
12620 (origin
12621 (method url-fetch)
12622 (uri (pypi-uri "relatorio" version))
12623 (sha256
12624 (base32
12625 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12626 (build-system python-build-system)
12627 (propagated-inputs
12628 `(("python-lxml" ,python-lxml)
12629 ("python-genshi" ,python-genshi)))
12630 (native-inputs
12631 `(("python-magic" ,python-magic)))
12632 (home-page "https://relatorio.tryton.org/")
12633 (synopsis "Templating library able to output ODT and PDF files")
12634 (description "Relatorio is a templating library which provides a way to
12635easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12636for more filetypes can be easily added by creating plugins for them.")
12637 (license license:gpl3+)))
12638
12639(define-public python2-relatorio
12640 (package-with-python2 python-relatorio))
12641
12642(define-public python-radon
12643 (package
12644 (name "python-radon")
12645 (version "2.2.0")
12646 (source
12647 (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "radon" version))
12650 (sha256
12651 (base32
12652 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12653 (build-system python-build-system)
12654 (arguments
12655 `(#:phases (modify-phases %standard-phases
12656 (replace 'check
12657 (lambda _
12658 (invoke "python" "radon/tests/run.py"))))))
12659 (propagated-inputs
12660 `(("python-colorama" ,python-colorama)
12661 ("python-flake8-polyfill" ,python-flake8-polyfill)
12662 ("python-mando" ,python-mando)))
12663 (native-inputs
12664 `(("python-pytest" ,python-pytest)
12665 ("python-pytest-mock" ,python-pytest-mock)))
12666 (home-page "https://radon.readthedocs.org/")
12667 (synopsis "Code Metrics in Python")
12668 (description "Radon is a Python tool which computes various code metrics.
12669Supported metrics are:
12670@itemize @bullet
12671@item raw metrics: SLOC, comment lines, blank lines, &c.
12672@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12673@item Halstead metrics (all of them)
12674@item the Maintainability Index (a Visual Studio metric)
12675@end itemize")
12676 (license license:expat)))
12677
12678(define-public python2-radon
12679 (package-with-python2 python-radon))
12680
12681(define-public python-sure
12682 (package
12683 (name "python-sure")
12684 (version "1.4.11")
12685 (source
12686 (origin
12687 (method url-fetch)
12688 (uri (pypi-uri "sure" version))
12689 (sha256
12690 (base32
12691 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12692 (build-system python-build-system)
12693 (propagated-inputs
12694 `(("python-mock" ,python-mock)
12695 ("python-six" ,python-six)))
12696 (native-inputs
12697 `(("python-nose" ,python-nose)))
12698 (home-page "https://github.com/gabrielfalcao/sure")
12699 (synopsis "Automated testing library in python for python")
12700 (description
12701 "Sure is a python library that leverages a DSL for writing assertions.
12702Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12703 (license license:gpl3+)))
12704
12705(define-public python2-sure
12706 (package-with-python2 python-sure))
12707
12708(define-public python2-couleur
12709 ;; This package does not seem to support python3 at all, hence,
12710 ;; only the python2 variant definition is provided.
12711 (package
12712 (name "python2-couleur")
12713 (version "0.6.2")
12714 (source
12715 (origin
12716 (method url-fetch)
12717 (uri (pypi-uri "couleur" version))
12718 (sha256
12719 (base32
12720 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12721 (build-system python-build-system)
12722 (arguments
12723 `(#:python ,python-2))
12724 (home-page "https://github.com/gabrielfalcao/couleur")
12725 (synopsis
12726 "ANSI terminal tool for python, colored shell and other handy fancy features")
12727 (description
12728 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12729terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12730 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12731 ;; https://github.com/gabrielfalcao/couleur/issues/11
12732 (license license:lgpl3+)))
12733
12734(define-public python-misaka
12735 (package
12736 (name "python-misaka")
0dcb3412 12737 (version "2.1.1")
44d10b1f
RW
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "misaka" version))
12742 (sha256
12743 (base32
0dcb3412 12744 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12745 (build-system python-build-system)
12746 (arguments
12747 `(;; Line 37 of setup.py calls self.run_command('develop')
12748 ;; in the 'check' phase. This command seems to be trying
12749 ;; to write to
12750 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12751 ;; for which it does not have the permission to write.
12752 #:tests? #f))
12753 (propagated-inputs
12754 `(("python-cffi" ,python-cffi)))
12755 (home-page "https://github.com/FSX/misaka")
12756 (synopsis "Python binding for Hoedown")
12757 (description
12758 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12759library written in C. It features a fast HTML renderer and functionality to make custom
12760renderers (e.g. man pages or LaTeX).")
12761 (license license:expat)))
12762
12763(define-public python2-misaka
12764 (package-with-python2 python-misaka))
12765
12766(define-public python2-steadymark
12767 ;; This is forced into being a python2 only variant
12768 ;; due to its dependence on couleur that has no support
12769 ;; for python3
12770 (package
12771 (name "python2-steadymark")
12772 (version "0.7.3")
12773 (source
12774 (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "steadymark" version))
12777 (sha256
12778 (base32
12779 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12780 (build-system python-build-system)
12781 (native-inputs
12782 `(("python-couleur" ,python2-couleur)
12783 ("python-sure" ,python2-sure)
12784 ("python-misaka" ,python2-misaka)))
12785 (arguments
12786 `(#:python ,python-2
12787 #:phases
12788 (modify-phases %standard-phases
12789 (add-before 'build 'patch-setup-py
12790 (lambda _
12791 ;; Update requirements from dependency==version
12792 ;; to dependency>=version
12793 (substitute* "setup.py"
12794 (("==") ">="))
12795 #t)))))
12796 (home-page "https://github.com/gabrielfalcao/steadymark")
12797 (synopsis "Markdown-based test runner for python")
12798 (description
12799 "@code{Steadymark} allows documentation to be written in github-flavoured
12800markdown. The documentation may contain snippets of code surrounded by python
12801code blocks and @code{Steadymark} will find these snippets and run them, making
12802sure that there are no old malfunctional examples in the documentation examples.")
12803 (license license:expat)))
12804
12805(define-public python-jsonpointer
12806 (package
12807 (name "python-jsonpointer")
12808 (version "1.10")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "jsonpointer" version))
12813 (sha256
12814 (base32
12815 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12816 (build-system python-build-system)
12817 (home-page "https://github.com/stefankoegl/python-json-pointer")
12818 (synopsis "Identify specific nodes in a JSON document")
12819 (description "@code{jsonpointer} allows you to access specific nodes
12820by path in a JSON document (see RFC 6901).")
12821 (license license:bsd-3)))
12822
12823(define-public python2-jsonpointer
12824 (package-with-python2 python-jsonpointer))
12825
12826(define-public python-jsonpatch
12827 (package
12828 (name "python-jsonpatch")
12829 (version "1.16")
12830 (source
12831 (origin
12832 (method url-fetch)
12833 ;; pypi version lacks tests.js
12834 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12835 "archive/v" version ".tar.gz"))
12836 (file-name (string-append name "-" version ".tar.gz"))
12837 (sha256
12838 (base32
12839 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12840 (build-system python-build-system)
12841 (native-inputs
12842 `(("python-jsonpointer" ,python-jsonpointer)))
12843 (home-page "https://github.com/stefankoegl/python-json-patch")
12844 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12845 (description "@code{jsonpatch} is a library and program that allows
12846applying JSON Patches according to RFC 6902.")
12847 (license license:bsd-3)))
12848
12849(define-public python2-jsonpatch
12850 (package-with-python2 python-jsonpatch))
12851
12852(define-public python-jsonpatch-0.4
12853 (package (inherit python-jsonpatch)
12854 (name "python-jsonpatch")
12855 (version "0.4")
12856 (source
12857 (origin
12858 (method url-fetch)
12859 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12860 "archive/v" version ".tar.gz"))
12861 (file-name (string-append name "-" version ".tar.gz"))
12862 (sha256
12863 (base32
12864 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12865
12866(define-public python2-jsonpatch-0.4
12867 (package-with-python2 python-jsonpatch-0.4))
12868
12869(define-public python-rfc3986
12870 (package
12871 (name "python-rfc3986")
12872 (version "1.1.0")
12873 (source (origin
12874 (method url-fetch)
12875 (uri (pypi-uri "rfc3986" version))
12876 (sha256
12877 (base32
12878 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12879 (build-system python-build-system)
12880 (arguments
12881 `(#:modules ((guix build utils)
12882 (guix build python-build-system)
12883 (ice-9 ftw)
12884 (srfi srfi-1)
12885 (srfi srfi-26))
12886 #:phases
12887 (modify-phases %standard-phases
12888 (replace 'check
12889 (lambda _
12890 (let ((cwd (getcwd)))
12891 (setenv "PYTHONPATH"
12892 (string-append cwd "/build/"
12893 (find (cut string-prefix? "lib" <>)
12894 (scandir (string-append cwd "/build")))
12895 ":"
12896 (getenv "PYTHONPATH")))
12897 (invoke "pytest" "-v")))))))
12898 (native-inputs
12899 `(("python-pytest" ,python-pytest)))
12900 (home-page "https://rfc3986.readthedocs.io/")
12901 (synopsis "Parse and validate URI references")
12902 (description
12903 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12904validation and authority parsing. This module also supports RFC@tie{}6874
12905which adds support for zone identifiers to IPv6 addresses.")
12906 (license license:asl2.0)))
12907
12908(define-public python2-rfc3986
12909 (package-with-python2 python-rfc3986))
12910
12911(define-public python-rfc3987
12912 (package
12913 (name "python-rfc3987")
12914 (version "1.3.7")
12915 (source
12916 (origin
12917 (method url-fetch)
12918 (uri (pypi-uri "rfc3987" version))
12919 (sha256
12920 (base32
12921 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12922 (build-system python-build-system)
12923 (home-page "https://pypi.python.org/pypi/rfc3987")
12924 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12925 (description "@code{rfc3987} provides routines for parsing and
12926validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12927 (license license:gpl3+)))
12928
12929(define-public python2-rfc3987
12930 (package-with-python2 python-rfc3987))
12931
12932(define-public python-validate-email
12933 (package
12934 (name "python-validate-email")
12935 (version "1.3")
12936 (source
12937 (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "validate_email" version))
12940 (sha256
12941 (base32
12942 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12943 (build-system python-build-system)
12944 (home-page "https://github.com/syrusakbary/validate_email")
12945 (synopsis "Verifies if an email address is valid and really exists")
12946 (description "@code{validate_email} can be used to verify if an email
12947address is valid and really exists.")
12948 (license license:lgpl3+)))
12949
12950(define-public python2-validate-email
12951 (package-with-python2 python-validate-email))
12952
12953(define-public python-flex
12954 (package
12955 (name "python-flex")
12956 (version "6.10.0")
12957 (source
12958 (origin
12959 (method url-fetch)
12960 (uri (pypi-uri "flex" version))
12961 (sha256
12962 (base32
12963 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12964 (build-system python-build-system)
12965 (propagated-inputs
12966 `(("python-click" ,python-click)
12967 ("python-iso8601" ,python-iso8601)
12968 ("python-jsonpointer" ,python-jsonpointer)
12969 ("python-pyyaml" ,python-pyyaml)
12970 ("python-requests" ,python-requests)
12971 ("python-rfc3987" ,python-rfc3987)
12972 ("python-six" ,python-six)
12973 ("python-validate-email" ,python-validate-email)))
12974 (home-page "https://github.com/pipermerriam/flex")
12975 (synopsis "Validates Swagger schemata")
12976 (description "@code{flex} can be used to validate Swagger schemata.")
12977 (license license:bsd-3)))
12978
12979(define-public python2-flex
12980 (package-with-python2 python-flex))
12981
12982(define-public python-marshmallow
12983 (package
12984 (name "python-marshmallow")
12985 (version "3.0.0b14")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "marshmallow" version))
12990 (sha256
12991 (base32
12992 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12993 (build-system python-build-system)
12994 (propagated-inputs
12995 `(("python-dateutil" ,python-dateutil)
12996 ("python-simplejson" ,python-simplejson)))
12997 (native-inputs
12998 `(("python-pytest" ,python-pytest)
12999 ("python-pytz" ,python-pytz)))
13000 (home-page "https://github.com/marshmallow-code/marshmallow")
13001 (synopsis "Convert complex datatypes to and from native
13002Python datatypes.")
13003 (description "@code{marshmallow} provides a library for converting
13004complex datatypes to and from native Python datatypes.")
13005 (license license:expat)))
13006
13007(define-public python2-marshmallow
13008 (package-with-python2 python-marshmallow))
13009
13010(define-public python-apispec
13011 (package
13012 (name "python-apispec")
13013 (version "0.25.3")
13014 (source
13015 (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "apispec" version))
13018 (sha256
13019 (base32
13020 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13021 (build-system python-build-system)
13022 (propagated-inputs
13023 `(("python-pyyaml" ,python-pyyaml)))
13024 (native-inputs
13025 `(("python-pytest" ,python-pytest)
13026 ("python-flask" ,python-flask)
13027 ("python-marshmallow" ,python-marshmallow)
13028 ("python-tornado" ,python-tornado)
13029 ("python-bottle" ,python-bottle)
13030 ("python-mock" ,python-mock)))
13031 (home-page "https://github.com/marshmallow-code/apispec")
13032 (synopsis "Swagger 2.0 API specification generator")
13033 (description "@code{python-apispec} is a pluggable API specification
13034generator. Currently supports the OpenAPI specification (f.k.a.
13035Swagger 2.0).")
13036 (license license:expat)))
13037
13038(define-public python2-apispec
13039 (package-with-python2 python-apispec))
13040
13041(define-public python-flasgger
13042 (package
13043 (name "python-flasgger")
13044 (version "0.6.3")
13045 (source
13046 (origin
1a04d421
TGR
13047 (method git-fetch)
13048 (uri (git-reference
13049 (url "https://github.com/rochacbruno/flasgger.git")
13050 (commit version)))
13051 (file-name (git-file-name name version))
44d10b1f 13052 (sha256
1a04d421 13053 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13054 (build-system python-build-system)
13055 (arguments
13056 `(#:phases
13057 (modify-phases %standard-phases
13058 (replace 'check
13059 (lambda* (#:key inputs outputs #:allow-other-keys)
13060 (substitute* "Makefile"
13061 (("flake8 flasgger --ignore=F403")
13062 "flake8 flasgger --ignore=E731,F403"))
13063 (setenv "PYTHONPATH" (string-append (getcwd)
13064 ":"
13065 (getenv "PYTHONPATH")))
ac599a09 13066 (invoke "py.test"))))))
44d10b1f
RW
13067 (propagated-inputs
13068 `(("python-flask" ,python-flask)
13069 ("python-pyyaml" ,python-pyyaml)
13070 ("python-jsonschema" ,python-jsonschema)
13071 ("python-mistune" ,python-mistune)
13072 ("python-six" ,python-six)))
13073 (native-inputs
13074 `(("python-decorator" ,python-decorator)
13075 ("python-flake8" ,python-flake8)
13076 ("python-flask-restful" ,python-flask-restful)
13077 ("python-flex" ,python-flex)
13078 ("python-pytest" ,python-pytest)
13079 ("python-pytest-cov" ,python-pytest-cov)
13080 ("python-marshmallow" ,python-marshmallow)
13081 ("python-apispec" ,python-apispec)))
13082 (home-page "https://github.com/rochacbruno/flasgger/")
13083 (synopsis "Extract Swagger specs from your Flask project")
13084 (description "@code{python-flasgger} allows extracting Swagger specs
13085from your Flask project. It is a fork of Flask-Swagger.")
13086 (license license:expat)))
13087
13088(define-public python2-flasgger
13089 (package-with-python2 python-flasgger))
13090
13091(define-public python-swagger-spec-validator
13092 (package
13093 (name "python-swagger-spec-validator")
13094 (version "2.1.0")
13095 (source
13096 (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "swagger-spec-validator" version))
13099 (sha256
13100 (base32
13101 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
13102 (build-system python-build-system)
13103 (propagated-inputs
13104 `(("python-jsonschema" ,python-jsonschema)
13105 ("python-six" ,python-six)))
13106 (home-page
13107 "https://github.com/Yelp/swagger_spec_validator")
13108 (synopsis "Validation of Swagger specifications")
13109 (description "@code{swagger_spec_validator} provides a library for
13110validating Swagger API specifications.")
13111 (license license:asl2.0)))
13112
13113(define-public python2-swagger-spec-validator
13114 (package-with-python2 python-swagger-spec-validator))
13115
13116(define-public python-apache-libcloud
13117 (package
13118 (name "python-apache-libcloud")
13119 (version "2.4.0")
13120 (source
13121 (origin
13122 (method url-fetch)
13123 (uri (pypi-uri "apache-libcloud" version))
13124 (sha256
13125 (base32
13126 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13127 (build-system python-build-system)
13128 (arguments
13129 `(#:phases
13130 (modify-phases %standard-phases
13131 (add-after 'unpack 'patch-ssh
13132 (lambda* (#:key inputs #:allow-other-keys)
13133 (substitute* "libcloud/compute/ssh.py"
13134 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13135 "/bin/ssh" "'")))
13136 #t))
13137 (add-after 'unpack 'patch-tests
13138 (lambda _
13139 (substitute* "./libcloud/test/test_file_fixtures.py"
13140 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13141 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13142 return (httplib.OK,
13143 \"1234abcd\",
13144 {\"test\": \"value\"},
13145 httplib.responses[httplib.OK])
13146 def _ascii"))
13147 (substitute* "libcloud/test/compute/test_ssh_client.py"
13148 (("class ShellOutSSHClientTests")
13149 "@unittest.skip(\"Guix container doesn't have ssh service\")
13150class ShellOutSSHClientTests")
13151 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13152 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13153 (("'.xF0', '.x90', '.x8D', '.x88'")
13154 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13155 #t))
13156 (add-before 'check 'copy-secret
13157 (lambda _
13158 (copy-file "libcloud/test/secrets.py-dist"
13159 "libcloud/test/secrets.py")
13160 #t)))))
13161 (inputs
13162 `(("openssh" ,openssh)))
13163 (propagated-inputs
13164 `(("python-paramiko" ,python-paramiko)
13165 ("python-requests" ,python-requests)))
13166 (native-inputs
13167 `(("python-lockfile" ,python-lockfile)
13168 ("python-mock" ,python-mock)
13169 ("python-pytest" ,python-pytest)
13170 ("python-pytest-runner" ,python-pytest-runner)
13171 ("python-requests-mock" ,python-requests-mock)))
13172 (home-page "https://libcloud.apache.org/")
13173 (synopsis "Unified Cloud API")
13174 (description "@code{libcloud} is a Python library for interacting with
13175many of the popular cloud service providers using a unified API.")
13176 (license license:asl2.0)))
13177
13178(define-public python2-apache-libcloud
13179 (package-with-python2 python-apache-libcloud))
13180
13181(define-public python-smmap2
13182 (package
13183 (name "python-smmap2")
13184 (version "2.0.3")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "smmap2" version))
13189 (sha256
13190 (base32
13191 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13192 (build-system python-build-system)
13193 (native-inputs
13194 `(("python-nosexcover" ,python-nosexcover)))
13195 (home-page "https://github.com/Byron/smmap")
13196 (synopsis "Python sliding window memory map manager")
13197 (description "@code{smmap2} is a pure Python implementation of a sliding
13198window memory map manager.")
13199 (license license:bsd-3)))
13200
13201(define-public python2-smmap2
13202 (package-with-python2 python-smmap2))
13203
13204(define-public python-regex
13205 (package
13206 (name "python-regex")
c187c9d7 13207 (version "2019.04.14")
44d10b1f
RW
13208 (source (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "regex" version))
13211 (sha256
13212 (base32
c187c9d7
BT
13213 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13214 ;; TODO: Fix and enable regex_test.py tests that complain about the
13215 ;; test.support module not existing.
44d10b1f
RW
13216 (build-system python-build-system)
13217 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13218 (synopsis "Alternative regular expression module")
13219 (description "This regular expression implementation is backwards-
13220compatible with the standard @code{re} module, but offers additional
13221functionality like full case-folding for case-insensitive matches in Unicode.")
13222 (license license:psfl)))
13223
13224(define-public python2-regex
13225 (package-with-python2 python-regex))
13226
13227(define-public python2-pyopengl
13228 (package
13229 (name "python2-pyopengl")
13230 (version "3.1.0")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "PyOpenGL" version))
13235 (sha256
13236 (base32
13237 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13238 (arguments
13239 `(#:python ,python-2))
13240 (build-system python-build-system)
13241 (home-page "http://pyopengl.sourceforge.net")
13242 (synopsis "Standard OpenGL bindings for Python")
13243 (description
13244 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13245related APIs. The binding is created using the standard @code{ctypes}
13246library.")
13247 (license license:bsd-3)))
13248
13249(define-public python2-pyopengl-accelerate
13250 (package
13251 (inherit python2-pyopengl)
13252 (name "python2-pyopengl-accelerate")
13253 (version "3.1.0")
13254 (source
13255 (origin
13256 (method url-fetch)
13257 (uri (pypi-uri "PyOpenGL-accelerate" version))
13258 (sha256
13259 (base32
13260 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13261 (synopsis "Acceleration code for PyOpenGL")
13262 (description
13263 "This is the Cython-coded accelerator module for PyOpenGL.")))
13264
13265(define-public python-rencode
13266 (package
13267 (name "python-rencode")
13268 (version "1.0.5")
13269 (source
13270 (origin
13271 (method url-fetch)
13272 (uri (pypi-uri "rencode" version))
13273 (sha256
13274 (base32
13275 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13276 (build-system python-build-system)
13277 (arguments
13278 `(#:phases
13279 (modify-phases %standard-phases
13280 (add-before 'check 'delete-bogus-test
13281 ;; This test requires /home/aresch/Downloads, which is not provided by
13282 ;; the build environment.
13283 (lambda _
13284 (delete-file "rencode/t.py")
13285 #t)))))
13286 (native-inputs `(("pkg-config" ,pkg-config)
13287 ("python-cython" ,python-cython)))
13288 (home-page "https://github.com/aresch/rencode")
13289 (synopsis "Serialization of heterogeneous data structures")
13290 (description
13291 "The @code{rencode} module is a data structure serialization library,
13292similar to @code{bencode} from the BitTorrent project. For complex,
13293heterogeneous data structures with many small elements, r-encoding stake up
13294significantly less space than b-encodings. This version of rencode is a
13295complete rewrite in Cython to attempt to increase the performance over the
13296pure Python module.")
13297 (license license:bsd-3)))
13298
13299(define-public python2-rencode
13300 (package-with-python2 python-rencode))
13301
13302(define-public python-xenon
13303 (package
13304 (name "python-xenon")
13305 (version "0.5.4")
13306 (source
13307 (origin
13308 (method url-fetch)
13309 (uri (pypi-uri "xenon" version))
13310 (sha256
13311 (base32
13312 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13313 (build-system python-build-system)
13314 (native-inputs
13315 `(("python-pyyaml" ,python-pyyaml)
13316 ("python-radon" ,python-radon)
13317 ("python-requests" ,python-requests)
13318 ("python-flake8" ,python-flake8)
13319 ("python-tox" ,python-tox)))
13320 (arguments
13321 `(#:phases
13322 (modify-phases %standard-phases
13323 (add-before 'build 'patch-test-requirements
13324 (lambda _
13325 ;; Remove httpretty dependency for tests.
13326 (substitute* "setup.py"
13327 (("httpretty") ""))
13328 #t)))))
13329 (home-page "https://xenon.readthedocs.org/")
13330 (synopsis "Monitor code metrics for Python on your CI server")
13331 (description
13332 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13333Ideally, @code{xenon} is run every time code is committed. Through command
13334line options, various thresholds can be set for the complexity of code. It
13335will fail (i.e. it will exit with a non-zero exit code) when any of these
13336requirements is not met.")
13337 (license license:expat)))
13338
13339(define-public python2-xenon
13340 (package-with-python2 python-xenon))
13341
13342(define-public python-pysocks
13343 (package
13344 (name "python-pysocks")
b8725cdf 13345 (version "1.7.0")
44d10b1f
RW
13346 (source
13347 (origin
13348 (method url-fetch)
13349 (uri (pypi-uri "PySocks" version))
13350 (sha256
13351 (base32
b8725cdf 13352 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13353 (build-system python-build-system)
13354 (arguments `(#:tests? #f))
13355 (home-page "https://github.com/Anorov/PySocks")
13356 (synopsis "SOCKS client module")
13357 (description "@code{pysocks} is an updated and semi-actively maintained
13358version of @code{SocksiPy} with bug fixes and extra features.")
13359 (license license:bsd-3)))
13360
13361(define-public python2-pysocks
13362 (package-with-python2 python-pysocks))
13363
13364(define-public python-pydiff
13365 (package
13366 (name "python-pydiff")
13367 (version "0.2")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "pydiff" version))
13372 (sha256
13373 (base32
13374 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13375 (build-system python-build-system)
13376 (home-page "https://github.com/myint/pydiff")
13377 (synopsis "Library to diff two Python files at the bytecode level")
13378 (description
13379 "@code{pydiff} makes it easy to look for actual code changes while
13380ignoring formatting changes.")
13381 (license license:expat)))
13382
13383(define-public python2-pydiff
13384 (package-with-python2 python-pydiff))
13385
13386(define-public python-tqdm
13387 (package
13388 (name "python-tqdm")
13389 (version "4.19.6")
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "tqdm" version))
13394 (sha256
13395 (base32
13396 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13397 (build-system python-build-system)
13398 (native-inputs
13399 `(("python-flake8" ,python-flake8)
13400 ("python-nose" ,python-nose)
13401 ("python-coverage" ,python-coverage)))
13402 (home-page "https://github.com/tqdm/tqdm")
13403 (synopsis "Fast, extensible progress meter")
13404 (description
13405 "Make loops show a progress bar on the console by just wrapping any
13406iterable with @code{|tqdm(iterable)|}. Offers many options to define
13407design and layout.")
13408 (license (list license:mpl2.0 license:expat))))
13409
13410(define-public python2-tqdm
13411 (package-with-python2 python-tqdm))
13412
13413(define-public python-pkginfo
13414 (package
13415 (name "python-pkginfo")
13416 (version "1.4.2")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "pkginfo" version))
13421 (sha256
13422 (base32
13423 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13424 (build-system python-build-system)
13425 (arguments
13426 ;; The tests are broken upstream.
13427 '(#:tests? #f))
13428 (home-page
13429 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13430 (synopsis
13431 "Query metadatdata from sdists, bdists, and installed packages")
13432 (description
13433 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13434source distriubtion (an sdist) or a binary distribution (e.g., created by
13435running bdist_egg). It can also query the EGG-INFO directory of an installed
13436distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13437created by running @code{python setup.py develop}).")
13438 (license license:expat)))
13439
13440(define-public python2-pkginfo
13441 (package-with-python2 python-pkginfo))
13442
13443(define-public python-twine
13444 (package
13445 (name "python-twine")
13446 (version "1.9.1")
13447 (source
13448 (origin
13449 (method url-fetch)
13450 (uri (pypi-uri "twine" version))
13451 (sha256
13452 (base32
13453 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13454 (build-system python-build-system)
13455 (propagated-inputs
13456 `(("python-tqdm" ,python-tqdm)
13457 ("python-pkginfo" ,python-pkginfo)
13458 ("python-requests" ,python-requests)
13459 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13460 (home-page "https://github.com/pypa/twine")
13461 (synopsis "Collection of utilities for interacting with PyPI")
13462 (description
13463 "@code{twine} currently supports registering projects and uploading
13464distributions. It authenticates the user over HTTPS, allows them to pre-sign
13465their files and supports any packaging format (including wheels).")
13466 (license license:asl2.0)))
13467
13468(define-public python2-twine
13469 (package-with-python2 python-twine))
13470
13471(define-public python-linecache2
13472 (package
13473 (name "python-linecache2")
13474 (version "1.0.0")
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "linecache2" version))
13479 (sha256
13480 (base32
13481 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13482 (build-system python-build-system)
13483 (arguments
13484 `(;; The tests depend on unittest2, and our version is a bit too old.
13485 #:tests? #f))
13486 (native-inputs
13487 `(("python-pbr" ,python-pbr-minimal)))
13488 (home-page
13489 "https://github.com/testing-cabal/linecache2")
13490 (synopsis "Backports of the linecache module")
13491 (description
13492 "The linecache module allows one to get any line from any file, while
13493attempting to optimize internally, using a cache, the common case where many
13494lines are read from a single file.")
13495 (license license:psfl)))
13496
13497(define-public python2-linecache2
13498 (package-with-python2 python-linecache2))
13499
13500(define-public python-traceback2
13501 (package
13502 (name "python-traceback2")
13503 (version "1.4.0")
13504 (source
13505 (origin
13506 (method url-fetch)
13507 (uri (pypi-uri "traceback2" version))
13508 (sha256
13509 (base32
13510 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13511 (build-system python-build-system)
13512 (arguments
13513 `(;; python-traceback2 and python-unittest2 depend on one another.
13514 #:tests? #f))
13515 (native-inputs
13516 `(("python-pbr" ,python-pbr-minimal)))
13517 (propagated-inputs
13518 `(("python-linecache2" ,python-linecache2)))
13519 (home-page
13520 "https://github.com/testing-cabal/traceback2")
13521 (synopsis "Backports of the traceback module")
13522 (description
13523 "This module provides a standard interface to extract, format and print
13524stack traces of Python programs. It exactly mimics the behavior of the Python
13525interpreter when it prints a stack trace.")
13526 (license license:psfl)))
13527
13528(define-public python2-traceback2
13529 (package-with-python2 python-traceback2))
13530
13531(define-public python-ratelimiter
13532 (package
13533 (name "python-ratelimiter")
13534 (version "1.2.0")
13535 (source
13536 (origin
13537 (method url-fetch)
13538 (uri (pypi-uri "ratelimiter" version))
13539 (sha256
13540 (base32
13541 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13542 (build-system python-build-system)
13543 (arguments
13544 '(#:tests? #f)) ; There are no tests in the pypi archive.
13545 (home-page "https://github.com/RazerM/ratelimiter")
13546 (synopsis "Simple rate limiting object")
13547 (description
13548 "The @code{ratelimiter} module ensures that an operation will not be
13549executed more than a given number of times during a given period.")
13550 (license license:asl2.0)))
13551
13552(define-public python2-ratelimiter
13553 (package-with-python2 python-ratelimiter))
13554
13555(define-public python-dukpy
13556 (package
13557 (name "python-dukpy")
13558 (version "0.3")
13559 (source
13560 (origin
5b77ebe1
TGR
13561 (method git-fetch)
13562 (uri (git-reference
13563 (url "https://github.com/kovidgoyal/dukpy.git")
13564 (commit (string-append "v" version))))
13565 (file-name (git-file-name name version))
44d10b1f 13566 (sha256
5b77ebe1 13567 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
13568 (build-system python-build-system)
13569 (home-page "https://github.com/kovidgoyal/dukpy")
13570 (synopsis "Run JavaScript in python")
13571 (description
13572 "dukpy is a JavaScript runtime environment for Python using the duktape
13573embeddable JavaScript engine.")
13574 ;; Dukpy is licensed under MIT like the embedded duktape library,
13575 ;; with 'errors.c' as GPL3.
13576 (license (list license:expat license:gpl3))))
13577
13578(define-public python2-dukpy
13579 (package-with-python2 python-dukpy))
13580
13581(define-public python-jsonrpclib-pelix
13582 (package
13583 (name "python-jsonrpclib-pelix")
13584 (version "0.3.2")
13585 (source
13586 (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "jsonrpclib-pelix" version))
13589 (sha256
13590 (base32
13591 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13592 (build-system python-build-system)
13593 (arguments
13594 `(#:tests? #f)) ; no tests in PyPI tarball
13595 (home-page "https://github.com/tcalmant/jsonrpclib/")
13596 (synopsis "JSON-RPC 2.0 client library for Python")
13597 (description
13598 "This library implements the JSON-RPC v2.0
13599specification (backwards-compatible) as a client library for Python. This
13600version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13601services.")
13602 (license license:asl2.0)))
13603
13604(define-public python2-jsonrpclib-pelix
13605 (package-with-python2 python-jsonrpclib-pelix))
13606
13607(define-public python-setuptools-scm-git-archive
13608 (package
13609 (name "python-setuptools-scm-git-archive")
13610 (version "1.0")
13611 (source
13612 (origin
13613 (method url-fetch)
13614 (uri (pypi-uri "setuptools_scm_git_archive" version))
13615 (sha256
13616 (base32
13617 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13618 (build-system python-build-system)
13619 (native-inputs
13620 `(("python-pytest" ,python-pytest)))
13621 (propagated-inputs
13622 `(("python-setuptools-scm" ,python-setuptools-scm)))
13623 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13624 (synopsis "Setuptools_scm plugin for git archives")
13625 (description
13626 "The setuptools_scm_git_archive package is a plugin to
13627setuptools_scm, which supports obtaining versions from git archives that
13628belong to tagged versions.")
13629 (license license:expat)))
13630
13631(define-public python2-setuptools-scm-git-archive
13632 (package-with-python2 python-setuptools-scm-git-archive))
13633
724a350c
RW
13634(define-public python-setuptools-git
13635 (package
13636 (name "python-setuptools-git")
13637 (version "1.2")
13638 (source
13639 (origin
13640 (method url-fetch)
13641 (uri (pypi-uri "setuptools-git" version))
13642 (sha256
13643 (base32
13644 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
13645 (build-system python-build-system)
13646 (arguments
13647 `(#:phases
13648 (modify-phases %standard-phases
13649 ;; This is needed for tests.
13650 (add-after 'unpack 'configure-git
13651 (lambda _
13652 (setenv "HOME" "/tmp")
13653 (invoke "git" "config" "--global" "user.email" "guix")
13654 (invoke "git" "config" "--global" "user.name" "guix")
13655 #t)))))
13656 (native-inputs
13657 `(("git" ,git-minimal)))
13658 (home-page "https://github.com/msabramo/setuptools-git")
13659 (synopsis "Setuptools revision control system plugin for Git")
13660 (description
13661 "This package provides a plugin for Setuptools for revision control with
13662Git.")
13663 (license license:bsd-3)))
13664
44d10b1f
RW
13665(define-public python-pyclipper
13666 (package
13667 (name "python-pyclipper")
13668 (version "1.1.0.post1")
13669 (source
13670 (origin
13671 (method url-fetch)
13672 (uri (pypi-uri "pyclipper" version ".zip"))
13673 (sha256
13674 (base32
13675 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13676 (modules '((guix build utils)))
13677 (snippet
13678 '(begin
13679 ;; This file is generated by Cython.
13680 (delete-file "pyclipper/pyclipper.cpp") #t))))
13681 (build-system python-build-system)
13682 (arguments
13683 `(#:phases
13684 (modify-phases %standard-phases
13685 (add-before 'build 'cythonize-sources
13686 (lambda _
13687 (with-directory-excursion "pyclipper"
13688 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13689 (propagated-inputs
13690 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13691 (native-inputs
13692 `(("python-cython" ,python-cython)
13693 ("python-pytest" ,python-pytest)
13694 ("python-pytest-runner" ,python-pytest-runner)
13695 ("python-unittest2" ,python-unittest2)
13696 ("unzip" ,unzip)))
13697 (home-page "https://github.com/greginvm/pyclipper")
13698 (synopsis "Wrapper for Angus Johnson's Clipper library")
13699 (description
13700 "Pyclipper is a Cython wrapper for the C++ translation of the
13701Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13702 (license license:expat)))
13703
13704(define-public python2-pyclipper
13705 (package-with-python2 python-pyclipper))
13706
13707(define-public python2-booleanoperations
13708 (package
13709 (name "python2-booleanoperations")
13710 (version "0.7.1")
13711 (source
13712 (origin
13713 (method url-fetch)
13714 (uri (pypi-uri "booleanOperations" version ".zip"))
13715 (sha256
13716 (base32
13717 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13718 (build-system python-build-system)
13719 (arguments
13720 `(#:python ,python-2))
13721 (native-inputs
13722 `(("unzip" ,unzip)
13723 ("python2-pytest" ,python2-pytest)
13724 ("python2-pytest-runner" ,python2-pytest-runner)))
13725 (propagated-inputs
13726 `(("python-fonttools" ,python2-fonttools)
13727 ("python-pyclipper" ,python2-pyclipper)
13728 ("python-ufolib" ,python2-ufolib)))
13729 (home-page "https://github.com/typemytype/booleanOperations")
13730 (synopsis "Boolean operations on paths")
13731 (description
13732 "BooleanOperations provides a Python library that enables
13733boolean operations on paths.")
13734 (license license:expat)))
13735
13736(define-public python-tempdir
13737 (package
13738 (name "python-tempdir")
13739 (version "0.7.1")
13740 (source
13741 (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "tempdir" version))
13744 (sha256
13745 (base32
13746 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13747 (build-system python-build-system)
13748 (home-page "https://pypi.org/project/tempdir/")
13749 (arguments
13750 ;; the package has no tests
13751 '(#:tests? #f))
13752 (synopsis "Python library for managing temporary directories")
13753 (description
13754 "This library manages temporary directories that are automatically
13755deleted with all their contents when they are no longer needed. It is
13756particularly convenient for use in tests.")
13757 (license license:expat)))
13758
13759(define-public python2-tempdir
13760 (package-with-python2 python-tempdir))
13761
13762(define-public python-activepapers
13763 (package
13764 (name "python-activepapers")
13765 (version "0.2.2")
13766 (source
13767 (origin
13768 (method url-fetch)
13769 (uri (pypi-uri "ActivePapers.Py" version))
13770 (sha256
13771 (base32
13772 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13773 (build-system python-build-system)
13774 (arguments
13775 `(#:modules ((ice-9 ftw)
13776 (srfi srfi-1)
13777 (guix build utils)
13778 (guix build python-build-system))
13779
13780 #:phases
13781 (modify-phases %standard-phases
13782 (add-after 'unpack 'delete-python2-code
13783 (lambda _
13784 (for-each delete-file
13785 '("lib/activepapers/builtins2.py"
13786 "lib/activepapers/standardlib2.py"
13787 "lib/activepapers/utility2.py"))))
13788 (replace 'check
13789 (lambda _
13790 ;; Deactivate the test cases that download files
13791 (setenv "NO_NETWORK_ACCESS" "1")
13792 ;; For some strange reason, some tests fail if nosetests runs all
13793 ;; test modules in a single execution. They pass if each test
13794 ;; module is run individually.
13795 (for-each (lambda (filename)
13796 (invoke "nosetests"
13797 (string-append "tests/" filename)))
13798 (scandir "tests"
13799 (lambda (filename)
13800 (string-suffix? ".py" filename)))))))))
13801 (native-inputs
13802 `(("python-tempdir" ,python-tempdir)
13803 ("python-nose" ,python-nose)))
13804 (propagated-inputs
13805 `(("python-h5py" ,python-h5py)))
13806 (home-page "http://www.activepapers.org/")
13807 (synopsis "Executable papers for scientific computing")
13808 (description
13809 "ActivePapers is a tool for working with executable papers, which
13810combine data, code, and documentation in single-file packages,
13811suitable for publication as supplementary material or on repositories
13812such as figshare or Zenodo.")
13813 (properties `((python2-variant . ,(delay python2-activepapers))))
13814 (license license:bsd-3)))
13815
13816(define-public python2-activepapers
13817 (let ((base (package-with-python2
13818 (strip-python2-variant python-activepapers))))
13819 (package
13820 (inherit base)
13821 (arguments
13822 (substitute-keyword-arguments (package-arguments base)
13823 ((#:phases phases)
13824 `(modify-phases ,phases
13825 (delete 'delete-python2-code)
13826 (add-after 'unpack 'delete-python3-code
13827 (lambda _
13828 (for-each delete-file
13829 '("lib/activepapers/builtins3.py"
13830 "lib/activepapers/standardlib3.py"
13831 "lib/activepapers/utility3.py")))))))))))
13832
13833(define-public python-semver
13834 (package
13835 (name "python-semver")
13836 (version "2.7.9")
13837 (source
13838 (origin
13839 (method url-fetch)
13840 (uri (pypi-uri "semver" version))
13841 (sha256
13842 (base32
13843 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13844 (build-system python-build-system)
13845 (arguments
13846 `(#:phases
13847 (modify-phases %standard-phases
13848 (add-after 'unpack 'patch-test-requirements
13849 (lambda _
13850 (substitute* "setup.py"
13851 ;; Our Python is new enough.
13852 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13853 #t)))))
13854 (native-inputs
13855 `(("python-tox" ,python-tox)
13856 ("python-virtualenv" ,python-virtualenv)))
13857 (home-page "https://github.com/k-bx/python-semver")
13858 (synopsis "Python helper for Semantic Versioning")
13859 (description "This package provides a Python library for
13860@url{Semantic Versioning, http://semver.org/}.")
13861 (license license:bsd-3)))
13862
13863(define-public python2-semver
13864 (package-with-python2 python-semver))
13865
13866(define-public python-pyro4
13867 (package
13868 (name "python-pyro4")
ad1acb81 13869 (version "4.75")
44d10b1f
RW
13870 (source
13871 (origin
13872 (method url-fetch)
13873 (uri (pypi-uri "Pyro4" version))
13874 (sha256
ad1acb81 13875 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
13876 (build-system python-build-system)
13877 (propagated-inputs
13878 `(("python-serpent" ,python-serpent)))
13879 (home-page "https://pyro4.readthedocs.io")
13880 (synopsis "Distributed object middleware for Python")
13881 (description
13882 "Pyro enables you to build applications in which objects can talk to each
13883other over the network. You can just use normal Python method calls to call
13884objects on other machines, also known as remote procedure calls (RPC).")
13885 (license license:expat)))
13886
13887(define-public python2-pyro
13888 (package
13889 (name "python2-pyro")
13890 (version "3.16")
13891 (source
13892 (origin
13893 (method url-fetch)
13894 (uri (pypi-uri "Pyro" version))
13895 (file-name (string-append "Pyro-" version ".tar.gz"))
13896 (sha256
13897 (base32
13898 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13899 (build-system python-build-system)
13900 (arguments
13901 ;; Pyro is not compatible with Python 3
13902 `(#:python ,python-2
13903 ;; Pyro has no test cases for automatic execution
13904 #:tests? #f))
13905 (home-page "http://pythonhosted.org/Pyro/")
13906 (synopsis "Distributed object manager for Python")
13907 (description "Pyro is a Distributed Object Technology system
13908written in Python that is designed to be easy to use. It resembles
13909Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13910which is a system and language independent Distributed Object Technology
13911and has much more to offer than Pyro or RMI. Pyro 3.x is no
13912longer maintained. New projects should use Pyro4 instead, which
13913is the new Pyro version that is actively developed.")
13914 (license license:expat)))
13915
13916(define-public python2-scientific
13917 (package
13918 (name "python2-scientific")
13919 (version "2.9.4")
13920 (source
13921 (origin
13922 (method url-fetch)
13923 (uri (string-append "https://bitbucket.org/khinsen/"
13924 "scientificpython/downloads/ScientificPython-"
13925 version ".tar.gz"))
13926 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13927 (sha256
13928 (base32
13929 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13930 (build-system python-build-system)
13931 (inputs
13932 `(("netcdf" ,netcdf)))
13933 (propagated-inputs
13934 `(("python-numpy" ,python2-numpy-1.8)
13935 ("python-pyro" ,python2-pyro)))
13936 (arguments
13937 ;; ScientificPython is not compatible with Python 3
13938 `(#:python ,python-2
13939 #:tests? #f ; No test suite
13940 #:phases
13941 (modify-phases %standard-phases
13942 (replace 'build
13943 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13944 (invoke "python" "setup.py" "build"
13945 (string-append "--netcdf_prefix="
13946 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13947 (home-page "https://bitbucket.org/khinsen/scientificpython")
13948 (synopsis "Python modules for scientific computing")
13949 (description "ScientificPython is a collection of Python modules that are
13950useful for scientific computing. Most modules are rather general (Geometry,
13951physical units, automatic derivatives, ...) whereas others are more
13952domain-specific (e.g. netCDF and PDB support). The library is currently
13953not actively maintained and works only with Python 2 and NumPy < 1.9.")
13954 (license license:cecill-c)))
13955
13956(define-public python2-mmtk
13957 (package
13958 (name "python2-mmtk")
13959 (version "2.7.11")
13960 (source
13961 (origin
13962 (method url-fetch)
13963 (uri (string-append "https://bitbucket.org/khinsen/"
13964 "mmtk/downloads/MMTK-" version ".tar.gz"))
13965 (file-name (string-append "MMTK-" version ".tar.gz"))
13966 (sha256
13967 (base32
13968 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13969 (build-system python-build-system)
13970 (native-inputs
13971 `(("netcdf" ,netcdf)))
13972 (propagated-inputs
13973 `(("python-scientific" ,python2-scientific)
13974 ("python-tkinter" ,python-2 "tk")))
13975 (arguments
13976 `(#:python ,python-2
13977 #:tests? #f
13978 #:phases
13979 (modify-phases %standard-phases
13980 (add-before 'build 'includes-from-scientific
13981 (lambda* (#:key inputs #:allow-other-keys)
13982 (mkdir-p "Include/Scientific")
13983 (copy-recursively
13984 (string-append
13985 (assoc-ref inputs "python-scientific")
13986 "/include/python2.7/Scientific")
13987 "Include/Scientific"))))))
13988 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13989 (synopsis "Python library for molecular simulation")
13990 (description "MMTK is a library for molecular simulations with an emphasis
13991on biomolecules. It provides widely used methods such as Molecular Dynamics
13992and normal mode analysis, but also basic routines for implementing new methods
13993for simulation and analysis. The library is currently not actively maintained
13994and works only with Python 2 and NumPy < 1.9.")
13995 (license license:cecill-c)))
13996
13997(define-public python-phonenumbers
13998 (package
13999 (name "python-phonenumbers")
14000 (version "8.9.1")
14001 (source
14002 (origin
14003 (method url-fetch)
14004 (uri (pypi-uri "phonenumbers" version))
14005 (sha256
14006 (base32
14007 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14008 (build-system python-build-system)
14009 (home-page
14010 "https://github.com/daviddrysdale/python-phonenumbers")
14011 (synopsis
14012 "Python library for dealing with international phone numbers")
14013 (description
14014 "This package provides a Python port of Google's libphonenumber library.")
14015 (license license:asl2.0)))
14016
14017(define-public python2-phonenumbers
14018 (package-with-python2 python-phonenumbers))
14019
14020(define-public python-send2trash
14021 (package
14022 (name "python-send2trash")
d9b0216b 14023 (version "1.5.0")
44d10b1f 14024 (source
d9b0216b 14025 (origin (method git-fetch)
44d10b1f 14026 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14027 (uri (git-reference
14028 (url "https://github.com/hsoft/send2trash.git")
14029 (commit version)))
14030 (file-name (git-file-name name version))
44d10b1f
RW
14031 (sha256
14032 (base32
d9b0216b 14033 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14034 (build-system python-build-system)
14035 (arguments
14036 '(#:phases
14037 (modify-phases %standard-phases
14038 (add-before 'check 'pre-check
14039 (lambda _
14040 (mkdir-p "/tmp/foo")
14041 (setenv "HOME" "/tmp/foo")
14042 #t)))))
14043 (home-page "https://github.com/hsoft/send2trash")
14044 (synopsis "Send files to the user's @file{~/Trash} directory")
14045 (description "This package provides a Python library to send files to the
14046user's @file{~/Trash} directory.")
20b3fde7 14047 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14048 (license license:bsd-3)))
14049
14050(define-public python2-send2trash
14051 (package
f32164ab 14052 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14053 (arguments
14054 (substitute-keyword-arguments (package-arguments python-send2trash)
14055 ((#:phases phases)
14056 `(modify-phases ,phases
14057 (add-before 'check 'setenv
14058 (lambda _
14059 (setenv "PYTHONPATH"
14060 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14061 #t))))))))
44d10b1f
RW
14062
14063(define-public python-yapf
14064 (package
14065 (name "python-yapf")
14066 (version "0.24.0")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "yapf" version))
14071 (sha256
14072 (base32
14073 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14074 (build-system python-build-system)
14075 (home-page "https://github.com/google/yapf")
14076 (synopsis "Formatter for Python code")
14077 (description "YAPF is a formatter for Python code. It's based off of
14078@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14079takes the code and reformats it to the best formatting that conforms to the
14080style guide, even if the original code didn't violate the style guide.")
14081 (license license:asl2.0)))
14082
14083(define-public python2-yapf
14084 (package-with-python2 python-yapf))
14085
14086(define-public python-gyp
14087 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14088 (revision "0"))
14089 (package
14090 (name "python-gyp")
14091 ;; Google does not release versions,
14092 ;; based on second most recent commit date.
14093 (version (git-version "0.0.0" revision commit))
14094 (source
14095 (origin
14096 ;; Google does not release tarballs,
14097 ;; git checkout is needed.
14098 (method git-fetch)
14099 (uri (git-reference
14100 (url "https://chromium.googlesource.com/external/gyp")
14101 (commit commit)))
14102 (file-name (git-file-name name version))
14103 (sha256
14104 (base32
14105 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14106 (build-system python-build-system)
14107 (home-page "https://gyp.gsrc.io/")
14108 (synopsis "GYP is a Meta-Build system")
14109 (description
14110 "GYP builds build systems for large, cross platform applications.
14111It can be used to generate XCode projects, Visual Studio projects, Ninja build
14112files, and Makefiles.")
14113 (license license:bsd-3))))
14114
14115(define-public python2-gyp
14116 (package-with-python2 python-gyp))
14117
14118(define-public python-whatever
14119 (package
14120 (name "python-whatever")
14121 (version "0.5")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14126 ".tar.gz"))
14127 (sha256
14128 (base32
14129 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14130 (file-name (string-append name "-" version ".tar.gz"))))
14131 (build-system python-build-system)
14132 (arguments
14133 `(#:phases
14134 (modify-phases %standard-phases
14135 (replace 'check
14136 (lambda _
14137 (invoke "py.test"))))))
14138 (native-inputs
14139 `(("python-pytest" ,python-pytest)))
14140 (home-page "http://github.com/Suor/whatever")
14141 (synopsis "Make anonymous functions by partial application of operators")
14142 (description "@code{whatever} provides an easy way to make anonymous
14143functions by partial application of operators.")
14144 (license license:bsd-3)))
14145
14146(define-public python2-whatever
14147 (package-with-python2 python-whatever))
14148
14149(define-public python-funcy
14150 (package
14151 (name "python-funcy")
9e396ab8 14152 (version "1.11")
44d10b1f
RW
14153 (source
14154 (origin
a85c6027
TGR
14155 (method git-fetch)
14156 (uri (git-reference
14157 (url "https://github.com/Suor/funcy.git")
14158 (commit version)))
44d10b1f 14159 (sha256
a85c6027
TGR
14160 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14161 (file-name (git-file-name name version))))
44d10b1f
RW
14162 (build-system python-build-system)
14163 (arguments
14164 `(#:phases
14165 (modify-phases %standard-phases
14166 (replace 'check
14167 (lambda _
14168 (invoke "py.test"))))))
14169 (native-inputs
14170 `(("python-pytest" ,python-pytest)
14171 ("python-whatever" ,python-whatever)))
14172 (home-page "http://github.com/Suor/funcy")
14173 (synopsis "Functional tools")
14174 (description "@code{funcy} is a library that provides functional tools.
14175Examples are:
14176@enumerate
14177@item merge - Merges collections of the same type
14178@item walk - Type-preserving map
14179@item select - Selects a part of a collection
14180@item take - Takes the first n items of a collection
14181@item first - Takes the first item of a collection
14182@item remove - Predicated-removes items of a collection
14183@item concat - Concatenates two collections
14184@item flatten - Flattens a collection with subcollections
14185@item distinct - Returns only distinct items
14186@item split - Predicated-splits a collection
14187@item split_at - Splits a collection at a given item
14188@item group_by - Groups items by group
14189@item pairwise - Pairs off adjacent items
14190@item partial - Partially-applies a function
14191@item curry - Curries a function
14192@item compose - Composes functions
14193@item complement - Complements a predicate
14194@item all_fn - \"all\" with predicate
14195@end enumerate")
14196 (license license:bsd-3)))
14197
14198(define-public python2-funcy
14199 (package-with-python2 python-funcy))
14200
14201(define-public python-isoweek
14202 (package
14203 (name "python-isoweek")
14204 (version "1.3.3")
14205 (source
14206 (origin
14207 (method url-fetch)
14208 (uri (pypi-uri "isoweek" version))
14209 (sha256
14210 (base32
14211 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14212 (build-system python-build-system)
14213 (home-page "https://github.com/gisle/isoweek")
14214 (synopsis "Objects representing a week")
14215 (description "The @code{isoweek} module provide the class Week that
14216implements the week definition of ISO 8601. This standard also defines
14217a notation for identifying weeks; yyyyWww (where the W is a literal).
14218Week instances stringify to this form.")
14219 (license license:bsd-3)))
14220
14221(define-public python2-isoweek
14222 (package-with-python2 python-isoweek))
14223
14224(define-public python-tokenize-rt
14225 (package
14226 (name "python-tokenize-rt")
14227 (version "2.0.1")
14228 (source
14229 (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "tokenize-rt" version))
14232 (sha256
14233 (base32
14234 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14235 (build-system python-build-system)
14236 (home-page "https://github.com/asottile/tokenize-rt")
14237 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14238 (description
14239 "This Python library is a wrapper around @code{tokenize} from the Python
14240standard library. It provides two additional tokens @code{ESCAPED_NL} and
14241@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14242and @code{tokens_to_src} to roundtrip.")
14243 (license license:expat)))
14244
14245(define-public python-future-fstrings
14246 (package
14247 (name "python-future-fstrings")
14248 (version "0.4.1")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "future_fstrings" version))
14253 (sha256
14254 (base32
14255 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14256 (build-system python-build-system)
14257 (propagated-inputs
14258 `(("python-tokenize-rt" ,python-tokenize-rt)))
14259 (home-page "https://github.com/asottile/future-fstrings")
14260 (synopsis "Backport of fstrings to Python < 3.6")
14261 (description
14262 "This package provides a UTF-8 compatible encoding
14263@code{future_fstrings}, which performs source manipulation. It decodes the
14264source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14265@code{f} strings.")
14266 (license license:expat)))
14267
dae2eb1c
MC
14268(define-public python-typed-ast
14269 (package
14270 (name "python-typed-ast")
14271 (version "1.3.5")
14272 (source
14273 (origin
14274 (method url-fetch)
14275 (uri (pypi-uri "typed-ast" version))
14276 (sha256
14277 (base32
14278 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14279 (build-system python-build-system)
14280 (arguments
14281 `(#:modules ((guix build utils)
14282 (guix build python-build-system)
14283 (ice-9 ftw)
14284 (srfi srfi-1)
14285 (srfi srfi-26))
14286 #:phases
14287 (modify-phases %standard-phases
14288 (replace 'check
14289 (lambda _
14290 (let ((cwd (getcwd)))
14291 (setenv "PYTHONPATH"
14292 (string-append cwd "/build/"
14293 (find (cut string-prefix? "lib" <>)
14294 (scandir (string-append cwd "/build")))
14295 ":"
14296 (getenv "PYTHONPATH"))))
14297 (invoke "pytest")
14298 #t)))))
14299 (native-inputs `(("python-pytest" ,python-pytest)))
14300 (home-page "https://github.com/python/typed_ast")
14301 (synopsis "Fork of Python @code{ast} modules with type comment support")
14302 (description "This package provides a parser similar to the standard
14303@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14304include PEP 484 type comments and are independent of the version of Python
14305under which they are run. The @code{typed_ast} parsers produce the standard
14306Python AST (plus type comments), and are both fast and correct, as they are
14307based on the CPython 2.7 and 3.7 parsers.")
14308 ;; See the file "LICENSE" for the details.
14309 (license (list license:psfl
14310 license:asl2.0
14311 license:expat)))) ;ast27/Parser/spark.py
14312
44d10b1f
RW
14313(define-public python-typing
14314 (package
14315 (name "python-typing")
14316 (version "3.6.6")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "typing" version))
14321 (sha256
14322 (base32
14323 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14324 (build-system python-build-system)
14325 (home-page "https://docs.python.org/3/library/typing.html")
14326 (synopsis "Type hints for Python")
14327 (description "This is a backport of the standard library @code{typing}
14328module to Python versions older than 3.5. Typing defines a standard notation
14329for Python function and variable type annotations. The notation can be used
14330for documenting code in a concise, standard format, and it has been designed
14331to also be used by static and runtime type checkers, static analyzers, IDEs
14332and other tools.")
14333 (license license:psfl)))
14334
14335(define-public python2-typing
14336 (package-with-python2 python-typing))
14337
f89d443b
VC
14338(define-public python-typing-extensions
14339 (package
14340 (name "python-typing-extensions")
14341 (version "3.7.2")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "typing_extensions" version))
14346 (sha256
14347 (base32
14348 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14349 (build-system python-build-system)
14350 (home-page
14351 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14352 (synopsis "Experimental type hints for Python")
14353 (description
14354 "The typing_extensions module contains additional @code{typing} hints not
14355yet present in the of the @code{typing} standard library.
14356Included are implementations of:
14357@enumerate
14358@item ClassVar
14359@item ContextManager
14360@item Counter
14361@item DefaultDict
14362@item Deque
14363@item NewType
14364@item NoReturn
14365@item overload
14366@item Protocol
14367@item runtime
14368@item Text
14369@item Type
14370@item TYPE_CHECKING
14371@item AsyncGenerator
14372@end enumerate\n")
14373 (license license:psfl)))
14374
44d10b1f
RW
14375(define-public bpython
14376 (package
14377 (name "bpython")
14378 (version "0.17.1")
14379 (source
14380 (origin
14381 (method url-fetch)
14382 (uri (pypi-uri "bpython" version))
14383 (sha256
14384 (base32
14385 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14386 (build-system python-build-system)
14387 (arguments
14388 `(#:phases
14389 (modify-phases %standard-phases
14390 (add-after 'unpack 'remove-failing-test
14391 (lambda _
14392 ;; Remove failing test. FIXME: make it pass
14393 (delete-file "bpython/test/test_args.py")
14394 #t))
14395 (add-after 'wrap 'add-aliases
14396 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14397 (lambda* (#:key outputs #:allow-other-keys)
14398 (let ((out (assoc-ref outputs "out")))
14399 (for-each
14400 (lambda (old new)
14401 (symlink old (string-append out "/bin/" new)))
14402 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14403 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14404 #t)))))
14405 (propagated-inputs
14406 `(("python-pygments" ,python-pygments)
14407 ("python-requests" ,python-requests)
14408 ("python-babel" ,python-babel) ; optional, for internationalization
14409 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14410 ("python-greenlet" ,python-greenlet)
14411 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14412 ("python-six" ,python-six)))
14413 (native-inputs
14414 `(("python-sphinx" ,python-sphinx)
14415 ("python-mock" ,python-mock)))
14416 (home-page "https://bpython-interpreter.org/")
14417 (synopsis "Fancy interface to the Python interpreter")
14418 (description "Bpython is a fancy interface to the Python
14419interpreter. bpython's main features are
14420
14421@enumerate
14422@item in-line syntax highlighting,
14423@item readline-like autocomplete with suggestions displayed as you type,
14424@item expected parameter list for any Python function,
14425@item \"rewind\" function to pop the last line of code from memory and
14426 re-evaluate,
14427@item send the code you've entered off to a pastebin,
14428@item save the code you've entered to a file, and
14429@item auto-indentation.
14430@end enumerate")
14431 (license license:expat)))
14432
14433(define-public bpython2
14434 (let ((base (package-with-python2
14435 (strip-python2-variant bpython))))
14436 (package (inherit base)
14437 (name "bpython2")
14438 (arguments
14439 `(#:python ,python-2
14440 #:phases
14441 (modify-phases %standard-phases
14442 (add-after 'unpack 'remove-failing-test
14443 (lambda _
14444 ;; Remove failing test. FIXME: make it pass
14445 (delete-file "bpython/test/test_args.py")
14446 ;; Disable failing test-cases (renaming inhibits they are
14447 ;; discovered)
14448 (substitute* "bpython/test/test_curtsies_repl.py"
14449 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14450 (string-append a "xxx_off_" b))
14451 (("^(\\s*def )(test_complex\\W)" _ a b)
14452 (string-append a "xxx_off_" b)))
14453 #t))
14454 (add-before 'build 'rename-scripts
14455 ;; rename the scripts to bypthon2, bpdb2, etc.
14456 (lambda _
14457 (substitute* "setup.py"
14458 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14459 (string-append name "2" rest "\n"))
14460 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14461 (string-append name "2" (or sub "") rest "\n")))
14462 #t))))))))
14463
14464(define-public python-pyinotify
14465 (package
14466 (name "python-pyinotify")
14467 (version "0.9.6")
14468 (source (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "pyinotify" version))
14471 (sha256
14472 (base32
14473 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14474 (build-system python-build-system)
14475 (arguments `(#:tests? #f)) ;no tests
14476 (home-page "https://github.com/seb-m/pyinotify")
14477 (synopsis "Python library for monitoring inotify events")
14478 (description
14479 "@code{pyinotify} provides a Python interface for monitoring
14480file system events on Linux.")
14481 (license license:expat)))
14482
14483(define-public python2-pyinotify
14484 (package-with-python2 python-pyinotify))
14485
14486;; Ada parser uses this version.
14487(define-public python2-quex-0.67.3
14488 (package
14489 (name "python2-quex")
14490 (version "0.67.3")
14491 (source
14492 (origin
14493 (method url-fetch)
14494 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14495 (version-major+minor version)
14496 "/quex-" version ".zip"))
14497 (sha256
14498 (base32
14499 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14500 (build-system python-build-system)
14501 (native-inputs
14502 `(("unzip" ,unzip)))
14503 (arguments
14504 `(#:python ,python-2
14505 #:tests? #f
14506 #:phases
14507 (modify-phases %standard-phases
14508 (delete 'configure)
14509 (delete 'build)
14510 (replace 'install
14511 (lambda* (#:key outputs #:allow-other-keys)
14512 (let* ((out (assoc-ref outputs "out"))
14513 (share/quex (string-append out "/share/quex"))
14514 (bin (string-append out "/bin")))
14515 (copy-recursively "." share/quex)
14516 (mkdir-p bin)
14517 (symlink (string-append share/quex "/quex-exe.py")
14518 (string-append bin "/quex"))
14519 #t))))))
14520 (native-search-paths
14521 (list (search-path-specification
14522 (variable "QUEX_PATH")
14523 (files '("share/quex")))))
14524 (home-page "http://quex.sourceforge.net/")
14525 (synopsis "Lexical analyzer generator in Python")
14526 (description "@code{quex} is a lexical analyzer generator in Python.")
14527 (license license:lgpl2.1+))) ; Non-military
14528
14529(define-public python2-quex
14530 (package (inherit python2-quex-0.67.3)
14531 (name "python2-quex")
14532 (version "0.68.1")
14533 (source
14534 (origin
14535 (method url-fetch)
14536 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14537 (sha256
14538 (base32
14539 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14540 (file-name (string-append name "-" version ".tar.gz"))))))
14541
14542(define-public python-more-itertools
14543 (package
14544 (name "python-more-itertools")
1b066827 14545 (version "7.1.0")
44d10b1f
RW
14546 (source
14547 (origin
14548 (method url-fetch)
14549 (uri (pypi-uri "more-itertools" version))
14550 (sha256
14551 (base32
1b066827 14552 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 14553 (build-system python-build-system)
44d10b1f
RW
14554 (home-page "https://github.com/erikrose/more-itertools")
14555 (synopsis "More routines for operating on iterables, beyond itertools")
14556 (description "Python's built-in @code{itertools} module implements a
14557number of iterator building blocks inspired by constructs from APL, Haskell,
14558and SML. @code{more-itertools} includes additional building blocks for
14559working with iterables.")
47f66348 14560 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
14561 (license license:expat)))
14562
47f66348 14563;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 14564(define-public python2-more-itertools
47f66348
MB
14565 (package
14566 (inherit python-more-itertools)
14567 (name "python2-more-itertools")
14568 (version "5.0.0")
14569 (source (origin
14570 (method url-fetch)
14571 (uri (pypi-uri "more-itertools" version))
14572 (sha256
14573 (base32
14574 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14575 (arguments
14576 `(#:python ,python2-minimal))
14577 (propagated-inputs
14578 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
14579
14580(define-public python-latexcodec
14581 (package
14582 (name "python-latexcodec")
91b61f02 14583 (version "1.0.6")
44d10b1f
RW
14584 (source
14585 (origin
14586 (method url-fetch)
14587 (uri (pypi-uri "latexcodec" version))
14588 (sha256
91b61f02 14589 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
14590 (build-system python-build-system)
14591 (inputs
14592 `(("python-six" ,python-six)))
14593 (home-page "https://readthedocs.org/projects/latexcodec/")
14594 (synopsis "Work with LaTeX code in Python")
14595 (description "Lexer and codec to work with LaTeX code in Python.")
14596 (license license:expat)))
14597
14598(define-public python-pybtex
14599 (package
14600 (name "python-pybtex")
14601 (version "0.21")
14602 (source
14603 (origin
14604 (method url-fetch)
14605 (uri (pypi-uri "pybtex" version))
14606 (sha256
14607 (base32
14608 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
14609 (build-system python-build-system)
14610 (native-inputs
14611 `(("python-nose" ,python-nose)))
14612 (inputs
14613 `(("python-latexcodec" ,python-latexcodec)
14614 ("python-pyyaml" ,python-pyyaml)
14615 ("python-six" ,python-six)))
14616 (arguments
14617 `(#:test-target "nosetests"))
14618 (home-page "https://pybtex.org/")
14619 (synopsis "BibTeX-compatible bibliography processor")
14620 (description "Pybtex is a BibTeX-compatible bibliography processor written
14621in Python. You can simply type pybtex instead of bibtex.")
14622 (license license:expat)))
14623
14624(define-public python-onetimepass
14625 (package
14626 (name "python-onetimepass")
14627 (version "1.0.1")
14628 (source
14629 (origin
14630 (method url-fetch)
14631 (uri (pypi-uri "onetimepass" version))
14632 (sha256
14633 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14634 (build-system python-build-system)
14635 (propagated-inputs `(("python-six" ,python-six)))
14636 (home-page "https://github.com/tadeck/onetimepass/")
14637 (synopsis "One-time password library")
14638 (description "Python one-time password library for HMAC-based (HOTP) and
14639time-based (TOTP) passwords.")
14640 (license license:expat)))
14641
14642(define-public python-parso
14643 (package
14644 (name "python-parso")
14645 (version "0.3.1")
14646 (source
14647 (origin
14648 (method url-fetch)
14649 (uri (pypi-uri "parso" version))
14650 (sha256
14651 (base32
14652 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
14653 (native-inputs
14654 `(("python-pytest" ,python-pytest)))
14655 (build-system python-build-system)
14656 (home-page "https://github.com/davidhalter/parso")
14657 (synopsis "Python Parser")
14658 (description "Parso is a Python parser that supports error recovery and
14659round-trip parsing for different Python versions (in multiple Python versions).
14660Parso is also able to list multiple syntax errors in your Python file.")
14661 (license license:expat)))
14662
14663(define-public python2-parso
14664 (package-with-python2 python-parso))
14665
14666(define-public python-async-generator
14667 (package
14668 (name "python-async-generator")
94fcbf8d 14669 (version "1.10")
44d10b1f
RW
14670 (source
14671 (origin
14672 (method url-fetch)
14673 (uri (pypi-uri "async_generator" version))
14674 (sha256
14675 (base32
94fcbf8d 14676 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14677 (build-system python-build-system)
14678 (native-inputs
14679 `(("python-pytest" ,python-pytest)))
14680 (home-page "https://github.com/python-trio/async_generator")
14681 (synopsis "Async generators and context managers for Python 3.5+")
14682 (description "@code{async_generator} back-ports Python 3.6's native async
14683generators and Python 3.7's context managers into Python 3.5.")
14684 ;; Dual licensed.
14685 (license (list license:expat license:asl2.0))))
14686
14687(define-public python-async-timeout
14688 (package
14689 (name "python-async-timeout")
14690 (version "3.0.1")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "async-timeout" version))
14695 (sha256
14696 (base32
14697 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14698 (build-system python-build-system)
14699 (home-page "https://github.com/aio-libs/async_timeout/")
14700 (synopsis "Timeout context manager for asyncio programs")
14701 (description "@code{async-timeout} provides a timeout timeout context
14702manager compatible with @code{asyncio}.")
14703 (license license:asl2.0)))
14704
14705(define-public python-glob2
14706 (package
14707 (name "python-glob2")
14708 (version "0.6")
8fa2bcc7
TGR
14709 (source
14710 (origin
14711 (method git-fetch)
14712 (uri (git-reference
14713 (url "https://github.com/miracle2k/python-glob2.git")
14714 (commit version)))
14715 (file-name (git-file-name name version))
14716 (sha256
14717 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
44d10b1f
RW
14718 (build-system python-build-system)
14719 (home-page "https://github.com/miracle2k/python-glob2/")
14720 (synopsis "Extended Version of the python buildin glob module")
14721 (description "This is an extended version of the Python
14722@url{http://docs.python.org/library/glob.html, built-in glob module} which
14723adds:
14724
14725@itemize
14726@item The ability to capture the text matched by glob patterns, and return
14727those matches alongside the file names.
14728@item A recursive @code{**} globbing syntax, akin for example to the
14729@code{globstar} option of Bash.
14730@item The ability to replace the file system functions used, in order to glob
14731on virtual file systems.
14732@item Compatible with Python 2 and Python 3 (tested with 3.3).
14733@end itemize
14734
14735Glob2 currently based on the glob code from Python 3.3.1.")
14736 (license license:bsd-2)))
14737
14738(define-public python2-glob2
14739 (package-with-python2 python-glob2))
14740
14741(define-public python-gipc
14742 (package
14743 (name "python-gipc")
14744 (version "0.6.0")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "gipc" version ".zip"))
14749 (sha256
14750 (base32
14751 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14752 (build-system python-build-system)
14753 (native-inputs
14754 `(("unzip" ,unzip)))
14755 (propagated-inputs
14756 `(("python-gevent" ,python-gevent)))
14757 (home-page "http://gehrcke.de/gipc")
14758 (synopsis "Child process management in the context of gevent")
14759 (description "Usage of Python's multiprocessing package in a
14760gevent-powered application may raise problems. With @code{gipc},
14761process-based child processes can safely be created anywhere within a
14762gevent-powered application.")
14763 (license license:expat)))
14764
14765(define-public python2-gipc
14766 (package-with-python2 python-gipc))
14767
14768(define-public python-fusepy
14769 (package
14770 (name "python-fusepy")
14771 (version "2.0.4")
14772 (source
14773 (origin
14774 (method url-fetch)
14775 (uri (pypi-uri "fusepy" version))
14776 (sha256
14777 (base32
14778 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14779 (build-system python-build-system)
14780 (arguments
14781 `(#:phases
14782 (modify-phases %standard-phases
14783 (add-before 'build 'set-library-file-name
14784 (lambda* (#:key inputs #:allow-other-keys)
14785 (let ((fuse (assoc-ref inputs "fuse")))
14786 (substitute* "fuse.py"
14787 (("find_library\\('fuse'\\)")
14788 (string-append "'" fuse "/lib/libfuse.so'")))
14789 #t))))))
14790 (propagated-inputs
14791 `(("fuse" ,fuse)))
14792 (home-page "https://github.com/fusepy/fusepy")
14793 (synopsis "Simple ctypes bindings for FUSE")
14794 (description "Python module that provides a simple interface to FUSE and
14795MacFUSE. The binding is created using the standard @code{ctypes} library.")
14796 (license license:isc)))
14797
14798(define-public python2-fusepy
14799 (package-with-python2 python-fusepy))
14800
14801(define-public python2-gdrivefs
14802 (package
14803 (name "python2-gdrivefs")
14804 (version "0.14.9")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "gdrivefs" version))
14809 (sha256
14810 (base32
14811 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14812 (build-system python-build-system)
14813 (arguments
14814 `(#:python ,python-2
14815 #:phases
14816 (modify-phases %standard-phases
14817 (add-before 'build 'patch-setup-py
14818 (lambda _
14819 ;; Update requirements from dependency==version
14820 ;; to dependency>=version
14821 (substitute* "gdrivefs/resources/requirements.txt"
14822 (("==") ">="))
14823 #t)))))
14824 (native-inputs
14825 `(("python2-gipc" ,python2-gipc)
14826 ("python2-gevent" ,python2-gevent)
14827 ("python2-greenlet" ,python2-greenlet)
14828 ("python2-httplib2" ,python2-httplib2)
14829 ("python2-uritemplate" ,python2-uritemplate)
14830 ("python2-oauth2client" ,python2-oauth2client)
14831 ("python2-six" ,python2-six)))
14832 (propagated-inputs
14833 `(("python2-dateutil" ,python2-dateutil)
14834 ("python2-fusepy" ,python2-fusepy)
14835 ("python2-google-api-client" ,python2-google-api-client)))
14836 (home-page "https://github.com/dsoprea/GDriveFS")
14837 (synopsis "Mount Google Drive as a local file system")
14838 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14839under Python 2.7.")
14840 (license license:gpl2)))
14841
14842(define-public pybind11
14843 (package
14844 (name "pybind11")
14845 (version "2.2.4")
14846 (source (origin
14847 (method git-fetch)
14848 (uri (git-reference
14849 (url "https://github.com/pybind/pybind11.git")
14850 (commit (string-append "v" version))))
14851 (sha256
14852 (base32
14853 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14854 (file-name (git-file-name name version))))
14855 (build-system cmake-build-system)
14856 (native-inputs
14857 `(("python" ,python)
14858 ("python-pytest" ,python-pytest)))
14859 (arguments
14860 `(#:test-target "check"))
14861 (home-page "https://github.com/pybind/pybind11/")
14862 (synopsis "Seamless operability between C++11 and Python")
14863 (description "pybind11 is a lightweight header-only library that exposes
14864C++ types in Python and vice versa, mainly to create Python bindings of
14865existing C++ code. Its goals and syntax are similar to the excellent
14866Boost.Python library by David Abrahams: to minimize boilerplate code in
14867traditional extension modules by inferring type information using compile-time
14868introspection.")
14869 (license license:expat)))
14870
14871(define-public python-fasteners
14872 (package
14873 (name "python-fasteners")
14874 (version "0.14.1")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "fasteners" version))
14879 (sha256
14880 (base32
14881 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14882 (build-system python-build-system)
14883 (propagated-inputs
14884 `(("python-monotonic" ,python-monotonic)
14885 ("python-six" ,python-six)
14886 ("python-testtools" ,python-testtools)))
14887 (home-page "https://github.com/harlowja/fasteners")
14888 (synopsis "Python package that provides useful locks")
14889 (description
14890 "This package provides a Python program that provides following locks:
14891
14892@itemize
14893@item Locking decorator
14894@item Reader-writer locks
14895@item Inter-process locks
14896@item Generic helpers
14897@end itemize\n")
14898 (properties `((python2-variant . ,(delay python2-fasteners))))
14899 (license license:asl2.0)))
14900
14901(define-public python2-fasteners
14902 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14903 (package
14904 (inherit base)
14905 (propagated-inputs
14906 `(("python2-futures" ,python2-futures)
14907 ,@(package-propagated-inputs base))))))
14908
14909(define-public python-requests-file
14910 (package
14911 (name "python-requests-file")
14912 (version "1.4.3")
14913 (source
14914 (origin
14915 (method url-fetch)
14916 (uri (pypi-uri "requests-file" version))
14917 (sha256
14918 (base32
14919 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14920 (build-system python-build-system)
14921 (propagated-inputs
14922 `(("python-requests" ,python-requests)
14923 ("python-six" ,python-six)))
14924 (home-page
14925 "https://github.com/dashea/requests-file")
14926 (synopsis "File transport adapter for Requests")
14927 (description
14928 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 14929library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
14930 (license license:asl2.0)))
14931
14932(define-public python2-requests-file
14933 (package-with-python2 python-requests-file))
14934
14935(define-public python-tldextract
14936 (package
14937 (name "python-tldextract")
14938 (version "2.2.0")
14939 (source
14940 (origin
14941 (method url-fetch)
14942 (uri (pypi-uri "tldextract" version))
14943 (sha256
14944 (base32
14945 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14946 (build-system python-build-system)
14947 (native-inputs
14948 `(("python-pytest" ,python-pytest)
14949 ("python-responses" ,python-responses)))
14950 (propagated-inputs
14951 `(("python-idna" ,python-idna)
14952 ("python-requests" ,python-requests)
14953 ("python-requests-file" ,python-requests-file)))
14954 (home-page
14955 "https://github.com/john-kurkowski/tldextract")
14956 (synopsis
14957 "Separate the TLD from the registered domain and subdomains of a URL")
14958 (description
14959 "TLDExtract accurately separates the TLD from the registered domain and
14960subdomains of a URL, using the Public Suffix List. By default, this includes
14961the public ICANN TLDs and their exceptions. It can optionally support the
14962Public Suffix List's private domains as well.")
14963 (license license:bsd-3)))
14964
14965(define-public python2-tldextract
14966 (package-with-python2 python-tldextract))
14967
14968(define-public python-pynamecheap
14969 (package
14970 (name "python-pynamecheap")
14971 (version "0.0.3")
14972 (source
14973 (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "PyNamecheap" version))
14976 (sha256
14977 (base32
14978 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14979 (build-system python-build-system)
14980 (propagated-inputs
14981 `(("python-requests" ,python-requests)))
14982 (home-page
14983 "https://github.com/Bemmu/PyNamecheap")
14984 (synopsis
14985 "Namecheap API client in Python")
14986 (description
14987 "PyNamecheap is a Namecheap API client in Python.")
14988 (license license:expat)))
14989
14990(define-public python2-pynamecheap
14991 (package-with-python2 python-pynamecheap))
14992
14993(define-public python-dns-lexicon
14994 (package
14995 (name "python-dns-lexicon")
14996 (version "2.4.0")
14997 (source
14998 (origin
14999 (method url-fetch)
15000 (uri (pypi-uri "dns-lexicon" version))
15001 (sha256
15002 (base32
15003 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15004 (build-system python-build-system)
15005 (arguments
15006 `(#:tests? #f)) ;requires internet access
15007 (propagated-inputs
15008 `(("python-future" ,python-future)
15009 ("python-pynamecheap" ,python-pynamecheap)
15010 ("python-requests" ,python-requests)
15011 ("python-tldextract" ,python-tldextract)
15012 ("python-urllib3" ,python-urllib3)))
15013 (home-page "https://github.com/AnalogJ/lexicon")
15014 (synopsis
15015 "Manipulate DNS records on various DNS providers")
15016 (description
15017 "Lexicon provides a way to manipulate DNS records on multiple DNS
15018providers in a standardized way. It has a CLI but it can also be used as a
15019Python library. It was designed to be used in automation, specifically with
15020Let's Encrypt.")
15021 (license license:expat)))
15022
15023(define-public python2-dns-lexicon
15024 (package-with-python2 python-dns-lexicon))
15025
15026(define-public python-commandlines
15027 (package
15028 (name "python-commandlines")
15029 (version "0.4.1")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "commandlines" version))
15034 (sha256
15035 (base32
15036 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15037 (build-system python-build-system)
15038 (home-page "https://github.com/chrissimpkins/commandlines")
15039 (synopsis "Command line argument to object parsing library")
15040 (description
15041 "@code{Commandlines} is a Python library for command line application
15042development that supports command line argument parsing, command string
15043validation testing and application logic.")
15044 (license license:expat)))
15045
15046;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15047;; python-numba. They have a very unflexible relationship.
15048(define-public python-numba
15049 (package
15050 (name "python-numba")
7757e6d8 15051 (version "0.42.0")
44d10b1f
RW
15052 (source
15053 (origin
15054 (method url-fetch)
15055 (uri (pypi-uri "numba" version))
15056 (sha256
15057 (base32
7757e6d8 15058 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15059 (build-system python-build-system)
15060 (arguments
15061 `(#:modules ((guix build utils)
15062 (guix build python-build-system)
15063 (ice-9 ftw)
15064 (srfi srfi-1)
15065 (srfi srfi-26))
15066 #:phases
15067 (modify-phases %standard-phases
15068 (add-after 'unpack 'disable-proprietary-features
15069 (lambda _
15070 (setenv "NUMBA_DISABLE_HSA" "1")
15071 (setenv "NUMBA_DISABLE_CUDA" "1")
15072 #t))
15073 (add-after 'unpack 'remove-failing-tests
15074 (lambda _
15075 ;; FIXME: these tests fail for unknown reasons:
15076 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15077 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15078 (substitute* "numba/tests/test_dispatcher.py"
15079 (("def test(_non_writable_pycache)" _ m)
15080 (string-append "def guix_skip" m))
15081 (("def test(_non_creatable_pycache)" _ m)
15082 (string-append "def guix_skip" m))
15083 (("def test(_frozen)" _ m)
15084 (string-append "def guix_skip" m)))
15085
15086 ;; These tests fail because we don't run the tests from the build
15087 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15088 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15089 (substitute* "numba/tests/test_pycc.py"
15090 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15091 (string-append "def guix_skip" m)))
15092 #t))
15093 (replace 'check
15094 (lambda _
15095 (let ((cwd (getcwd)))
15096 (setenv "PYTHONPATH"
15097 (string-append cwd "/build/"
15098 (find (cut string-prefix? "lib" <>)
15099 (scandir (string-append cwd "/build")))
15100 ":"
15101 (getenv "PYTHONPATH")))
15102 ;; Something is wrong with the PYTHONPATH when running the
15103 ;; tests from the build directory, as it complains about not being
15104 ;; able to import certain modules.
15105 (with-directory-excursion "/tmp"
15106 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15107 #t)))))
15108 (propagated-inputs
15109 `(("python-llvmlite" ,python-llvmlite)
15110 ("python-numpy" ,python-numpy)
15111 ("python-singledispatch" ,python-singledispatch)))
15112 ;; Needed for tests.
15113 (inputs
15114 `(("python-jinja2" ,python-jinja2)
15115 ("python-pygments" ,python-pygments)))
15116 (home-page "https://numba.pydata.org")
15117 (synopsis "Compile Python code using LLVM")
15118 (description "Numba gives you the power to speed up your applications with
15119high performance functions written directly in Python. With a few
15120annotations, array-oriented and math-heavy Python code can be just-in-time
15121compiled to native machine instructions, similar in performance to C, C++ and
15122Fortran, without having to switch languages or Python interpreters.
15123
15124Numba works by generating optimized machine code using the LLVM compiler
15125infrastructure at import time, runtime, or statically (using the included pycc
15126tool).")
15127 (license license:bsd-3)))
15128
15129(define-public python-anndata
15130 (package
15131 (name "python-anndata")
8c9372c1 15132 (version "0.6.18")
44d10b1f
RW
15133 (source
15134 (origin
15135 (method url-fetch)
15136 (uri (pypi-uri "anndata" version))
15137 (sha256
15138 (base32
8c9372c1 15139 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15140 (build-system python-build-system)
15141 (propagated-inputs
15142 `(("python-h5py" ,python-h5py)
15143 ("python-natsort" ,python-natsort)
15144 ("python-pandas" ,python-pandas)
15145 ("python-scipy" ,python-scipy)))
15146 (home-page "https://github.com/theislab/anndata")
15147 (synopsis "Annotated data for data analysis pipelines")
15148 (description "Anndata is a package for simple (functional) high-level APIs
15149for data analysis pipelines. In this context, it provides an efficient,
15150scalable way of keeping track of data together with learned annotations and
15151reduces the code overhead typically encountered when using a mostly
15152object-oriented library such as @code{scikit-learn}.")
15153 (license license:bsd-3)))
15154
15155(define-public python-dill
15156 (package
15157 (name "python-dill")
c60b15cc 15158 (version "0.2.9")
44d10b1f
RW
15159 (source
15160 (origin
15161 (method url-fetch)
15162 (uri (pypi-uri "dill" version))
15163 (sha256
c60b15cc 15164 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15165 (build-system python-build-system)
c60b15cc 15166 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15167 (arguments '(#:tests? #f))
15168 (home-page "https://pypi.org/project/dill")
15169 (synopsis "Serialize all of Python")
15170 (description "Dill extends Python's @code{pickle} module for serializing
15171and de-serializing Python objects to the majority of the built-in Python
15172types. Dill provides the user the same interface as the @code{pickle} module,
15173and also includes some additional features. In addition to pickling Python
15174objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15175session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15176interpreter session, close the interpreter, ship the pickled file to another
15177computer, open a new interpreter, unpickle the session and thus continue from
15178the saved state of the original interpreter session.")
15179 (license license:bsd-3)))
15180
15181(define-public python-multiprocess
15182 (package
15183 (name "python-multiprocess")
15184 (version "0.70.6.1")
15185 (source
15186 (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "multiprocess" version))
15189 (sha256
15190 (base32
15191 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15192 (build-system python-build-system)
15193 (propagated-inputs
15194 `(("python-dill" ,python-dill)))
15195 (home-page "https://pypi.org/project/multiprocess")
15196 (synopsis "Multiprocessing and multithreading in Python")
15197 (description
15198 "This package is a fork of the multiprocessing Python package, a package
15199which supports the spawning of processes using the API of the standard
15200library's @code{threading} module.")
15201 (license license:bsd-3)))
15202
15203(define-public python-toolz
15204 (package
15205 (name "python-toolz")
15206 (version "0.9.0")
15207 (source
15208 (origin
15209 (method url-fetch)
15210 (uri (pypi-uri "toolz" version))
15211 (sha256
15212 (base32
15213 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15214 (build-system python-build-system)
15215 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15216 ;; unregistered loader type"
15217 (arguments '(#:tests? #f))
15218 (home-page "https://github.com/pytoolz/toolz/")
15219 (synopsis "List processing tools and functional utilities")
15220 (description
15221 "This package provides a set of utility functions for iterators,
15222functions, and dictionaries.")
15223 (license license:bsd-3)))
15224
15225(define-public python2-toolz
15226 (package-with-python2 python-toolz))
15227
15228(define-public python-cytoolz
15229 (package
15230 (name "python-cytoolz")
15231 (version "0.9.0.1")
15232 (source
15233 (origin
15234 (method url-fetch)
15235 (uri (pypi-uri "cytoolz" version))
15236 (sha256
15237 (base32
15238 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15239 (build-system python-build-system)
15240 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15241 ;; 'exceptions'"
15242 (arguments '(#:tests? #f))
15243 (propagated-inputs
15244 `(("python-toolz" ,python-toolz)))
15245 (native-inputs
15246 `(("python-cython" ,python-cython)))
15247 (home-page "https://github.com/pytoolz/cytoolz")
15248 (synopsis "High performance functional utilities")
15249 (description
15250 "The cytoolz package implements the same API as provided by toolz. The
15251main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15252that is accessible to other projects developed in Cython.")
15253 (license license:bsd-3)))
15254
15255(define-public python-sortedcontainers
15256 (package
15257 (name "python-sortedcontainers")
15258 (version "2.0.4")
15259 (source
15260 (origin
15261 (method url-fetch)
15262 (uri (pypi-uri "sortedcontainers" version))
15263 (sha256
15264 (base32
15265 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15266 (build-system python-build-system)
15267 (native-inputs
15268 `(("python-tox" ,python-tox)))
15269 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15270 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15271 (description
15272 "This package provides a sorted collections library, written in
15273pure-Python.")
15274 (license license:asl2.0)))
15275
15276(define-public python-cloudpickle
15277 (package
15278 (name "python-cloudpickle")
15279 (version "0.6.1")
15280 (source
15281 (origin
15282 (method url-fetch)
15283 (uri (pypi-uri "cloudpickle" version))
15284 (sha256
15285 (base32
15286 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15287 (build-system python-build-system)
15288 ;; FIXME: there are 5 errors in 122 tests:
15289 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15290 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15291 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15292 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15293 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15294 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15295 (arguments '(#:tests? #f))
15296 (native-inputs
15297 `(("python-pytest" ,python-pytest)
15298 ("python-mock" ,python-mock)
15299 ("python-tornado" ,python-tornado)))
15300 (home-page "https://github.com/cloudpipe/cloudpickle")
15301 (synopsis "Extended pickling support for Python objects")
15302 (description
15303 "Cloudpickle makes it possible to serialize Python constructs not
15304supported by the default pickle module from the Python standard library. It
15305is especially useful for cluster computing where Python expressions are
15306shipped over the network to execute on remote hosts, possibly close to the
15307data.")
15308 (license license:bsd-3)))
15309
15310(define-public python2-cloudpickle
15311 (package-with-python2 python-cloudpickle))
15312
15313(define-public python-locket
15314 (package
15315 (name "python-locket")
15316 (version "0.2.0")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "locket" version))
15321 (sha256
15322 (base32
15323 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15324 (build-system python-build-system)
15325 (home-page "https://github.com/mwilliamson/locket.py")
15326 (synopsis "File-based locks for Python")
15327 (description
15328 "Locket implements a lock that can be used by multiple processes provided
15329they use the same path.")
15330 (license license:bsd-2)))
15331
15332(define-public python2-locket
15333 (package-with-python2 python-locket))
15334
15335(define-public python-blosc
15336 (package
15337 (name "python-blosc")
15338 (version "1.5.1")
15339 (source
15340 (origin
15341 (method url-fetch)
15342 (uri (pypi-uri "blosc" version))
15343 (sha256
15344 (base32
15345 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15346 (build-system python-build-system)
15347 ;; FIXME: all tests pass, but then this error is printed:
15348 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15349 (arguments '(#:tests? #f))
15350 (propagated-inputs
15351 `(("python-numpy" ,python-numpy)))
15352 (home-page "https://github.com/blosc/python-blosc")
15353 (synopsis "Python wrapper for the Blosc data compressor library")
15354 (description "Blosc is a high performance compressor optimized for binary
15355data. It has been designed to transmit data to the processor cache faster
15356than the traditional, non-compressed, direct memory fetch approach via a
15357@code{memcpy()} system call.
15358
15359Blosc works well for compressing numerical arrays that contains data with
15360relatively low entropy, like sparse data, time series, grids with
15361regular-spaced values, etc.
15362
15363This Python package wraps the Blosc library.")
15364 (license license:bsd-3)))
15365
15366(define-public python2-blosc
15367 (package-with-python2 python-blosc))
15368
15369(define-public python-partd
15370 (package
15371 (name "python-partd")
15372 (version "0.3.9")
15373 (source
15374 (origin
15375 (method url-fetch)
15376 (uri (pypi-uri "partd" version))
15377 (sha256
15378 (base32
15379 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15380 (build-system python-build-system)
15381 (propagated-inputs
15382 `(("python-blosc" ,python-blosc)
15383 ("python-locket" ,python-locket)
15384 ("python-numpy" ,python-numpy)
15385 ("python-pandas" ,python-pandas)
15386 ("python-pyzmq" ,python-pyzmq)
15387 ("python-toolz" ,python-toolz)))
15388 (home-page "https://github.com/dask/partd/")
15389 (synopsis "Appendable key-value storage")
15390 (description "Partd stores key-value pairs. Values are raw bytes. We
15391append on old values. Partd excels at shuffling operations.")
15392 (license license:bsd-3)))
15393
15394(define-public python2-partd
15395 (package-with-python2 python-partd))
15396
15397(define-public python-dask
15398 (package
15399 (name "python-dask")
0998175f 15400 (version "1.2.2")
44d10b1f
RW
15401 (source
15402 (origin
15403 (method url-fetch)
15404 (uri (pypi-uri "dask" version))
15405 (sha256
0998175f 15406 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15407 (build-system python-build-system)
15408 ;; A single test out of 5000+ fails. This test is marked as xfail when
15409 ;; pytest-xdist is used.
15410 (arguments
15411 `(#:phases
15412 (modify-phases %standard-phases
15413 (add-after 'unpack 'disable-broken-test
15414 (lambda _
15415 (substitute* "dask/tests/test_threaded.py"
15416 (("def test_interrupt\\(\\)" m)
15417 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15418 m)))
15419 (when (which "python2")
15420 ;; This test fails with recent Pandas:
15421 ;; <https://github.com/dask/dask/issues/3794>.
15422 (substitute* "dask/dataframe/tests/test_dataframe.py"
15423 (("def test_info\\(\\)" m)
15424 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15425 m))))
15426 #t))
15427 (replace 'check
15428 (lambda _ (invoke "pytest" "-vv"))))))
15429 (propagated-inputs
15430 `(("python-cloudpickle" ,python-cloudpickle)
15431 ("python-numpy" ,python-numpy)
15432 ("python-pandas" ,python-pandas)
15433 ("python-partd" ,python-partd)
15434 ("python-toolz" ,python-toolz)
15435 ("python-pyyaml" ,python-pyyaml)))
15436 (native-inputs
15437 `(("python-pytest" ,python-pytest)
15438 ("python-pytest-runner" ,python-pytest-runner)))
15439 (home-page "https://github.com/dask/dask/")
15440 (synopsis "Parallel computing with task scheduling")
15441 (description
15442 "Dask is a flexible parallel computing library for analytics. It
15443consists of two components: dynamic task scheduling optimized for computation,
15444and large data collections like parallel arrays, dataframes, and lists that
15445extend common interfaces like NumPy, Pandas, or Python iterators to
15446larger-than-memory or distributed environments. These parallel collections
15447run on top of the dynamic task schedulers. ")
15448 (license license:bsd-3)))
15449
15450(define-public python2-dask
15451 (package-with-python2 python-dask))
15452
15453(define-public python-ilinkedlist
15454 (package
15455 (name "python-ilinkedlist")
15456 (version "0.4.0")
15457 (source
15458 (origin
15459 (method url-fetch)
15460 (uri (pypi-uri "ilinkedlist" version))
15461 (sha256
15462 (base32
15463 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15464 (build-system python-build-system)
15465 (native-inputs `(("python-pytest" ,python-pytest)))
15466 (inputs `(("python" ,python)))
15467 (home-page "https://github.com/luther9/ilinkedlist-py")
15468 (synopsis "Immutable linked list library")
15469 (description
15470 "This is a implementation of immutable linked lists for Python. It
15471contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15472Since a linked list is treated as immutable, it is hashable, and its length
15473can be retrieved in constant time. Some of the terminology is inspired by
15474LISP. It is possible to create an improper list by creating a @code{Pair}
15475with a non-list @code{cdr}.")
15476 (license license:gpl3+)))
15477
15478(define-public python-readlike
15479 (package
15480 (name "python-readlike")
15481 (version "0.1.3")
15482 (source
15483 (origin
15484 (method url-fetch)
15485 (uri (pypi-uri "readlike" version))
15486 (sha256
15487 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15488 (build-system python-build-system)
15489 (home-page "https://github.com/jangler/readlike")
15490 (synopsis "GNU Readline-like line editing module")
15491 (description
15492 "This Python module provides line editing functions similar to the default
15493Emacs-style ones of GNU Readline. Unlike the Python standard library's
15494@code{readline} package, this one allows access to those capabilties in settings
15495outside of a standard command-line interface. It is especially well-suited to
15496interfacing with Urwid, due to a shared syntax for describing key inputs.
15497
15498Currently, all stateless Readline commands are implemented. Yanking and history
15499are not supported.")
15500 (license license:expat)))
15501
15502(define-public python2-readlike
15503 (package-with-python2 python-readlike))
15504
15505(define-public python-reparser
15506 (package
15507 (name "python-reparser")
15508 (version "1.4.3")
15509 (source
15510 (origin
15511 (method url-fetch)
15512 (uri (pypi-uri "ReParser" version))
15513 (sha256
15514 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15515 (build-system python-build-system)
15516 (home-page "https://github.com/xmikos/reparser")
15517 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15518 (description
15519 "This Python library provides a simple lexer/parser for inline markup based
15520on regular expressions.")
15521 (license license:expat)))
15522
15523(define-public python2-reparser
15524 (let ((reparser (package-with-python2
15525 (strip-python2-variant python-reparser))))
15526 (package (inherit reparser)
15527 (propagated-inputs
15528 `(("python2-enum34" ,python2-enum34)
15529 ,@(package-propagated-inputs reparser))))))
15530
15531(define-public python-precis-i18n
15532 (package
15533 (name "python-precis-i18n")
15534 (version "1.0.0")
15535 (source
15536 (origin
15537 (method url-fetch)
15538 (uri (pypi-uri "precis_i18n" version))
15539 (sha256
15540 (base32
15541 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15542 (build-system python-build-system)
15543 (home-page "https://github.com/byllyfish/precis_i18n")
15544 (synopsis "Implementation of the PRECIS framework")
15545 (description
15546 "This module implements the PRECIS Framework as described in RFC 8264,
15547RFC 8265 and RFC 8266.")
15548 (license license:expat)))
15549
d0446c4b
RW
15550(define-public python-absl-py
15551 (package
15552 (name "python-absl-py")
15553 (version "0.6.1")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 (uri (pypi-uri "absl-py" version))
15558 (sha256
15559 (base32
15560 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15561 (build-system python-build-system)
15562 (propagated-inputs
15563 `(("python-six" ,python-six)))
15564 (home-page "https://github.com/abseil/abseil-py")
15565 (synopsis "Abseil Python common libraries")
15566 (description
15567 "This package provides the Abseil Python Common Libraries, a collection
15568of Python libraries for building Python applications.")
15569 (license license:asl2.0)))
15570
81bed4e9
RW
15571(define-public python-astor
15572 (package
15573 (name "python-astor")
15574 (version "0.7.1")
15575 (source
15576 (origin
15577 (method url-fetch)
15578 (uri (pypi-uri "astor" version))
15579 (sha256
15580 (base32
15581 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15582 (build-system python-build-system)
15583 ;; FIXME: There are two errors and two test failures.
15584 (arguments `(#:tests? #f))
15585 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 15586 (synopsis "Read and write Python ASTs")
81bed4e9 15587 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 15588source via the Abstract Syntax Tree.")
81bed4e9
RW
15589 (license license:bsd-3)))
15590
39ee82ff
RW
15591(define-public python2-astor
15592 (package-with-python2 python-astor))
15593
22e623ae
RW
15594(define-public python-grpcio
15595 (package
15596 (name "python-grpcio")
15597 (version "1.17.1")
15598 (source
15599 (origin
15600 (method url-fetch)
15601 (uri (pypi-uri "grpcio" version))
15602 (sha256
15603 (base32
15604 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15605 (build-system python-build-system)
15606 (propagated-inputs
15607 `(("python-six" ,python-six)))
15608 (home-page "https://grpc.io")
15609 (synopsis "HTTP/2-based RPC framework")
15610 (description "This package provides a Python library for communicating
15611with the HTTP/2-based RPC framework gRPC.")
15612 (license license:asl2.0)))
15613
79869f80
RW
15614(define-public python-astunparse
15615 (package
15616 (name "python-astunparse")
47d79541 15617 (version "1.6.2")
79869f80
RW
15618 (source
15619 (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "astunparse" version))
15622 (sha256
47d79541 15623 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 15624 (build-system python-build-system)
47d79541 15625 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
15626 (propagated-inputs
15627 `(("python-six" ,python-six)
15628 ("python-wheel" ,python-wheel)))
15629 (home-page "https://github.com/simonpercivall/astunparse")
15630 (synopsis "AST unparser for Python")
15631 (description "This package provides an AST unparser for Python. It is a
15632factored out version of @code{unparse} found in the Python source
15633distribution.")
15634 (license license:bsd-3)))
15635
2884aac0
RW
15636(define-public python-gast
15637 (package
15638 (name "python-gast")
bd300261 15639 (version "0.2.2")
2884aac0
RW
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (pypi-uri "gast" version))
15644 (sha256
bd300261 15645 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
15646 (build-system python-build-system)
15647 (propagated-inputs
15648 `(("python-astunparse" ,python-astunparse)))
15649 (home-page "https://pypi.org/project/gast/")
15650 (synopsis "Generic Python AST that abstracts the underlying Python version")
15651 (description
15652 "GAST provides a compatibility layer between the AST of various Python
15653versions, as produced by @code{ast.parse} from the standard @code{ast}
15654module.")
15655 (license license:bsd-3)))
15656
44d10b1f
RW
15657(define-public python-wikidata
15658 (package
15659 (name "python-wikidata")
15660 (version "0.6.1")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "Wikidata" version))
15665 (sha256
15666 (base32
15667 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15668 (build-system python-build-system)
15669 (propagated-inputs
15670 `(("python-babel" ,python-babel)))
15671 (home-page "https://github.com/dahlia/wikidata")
15672 (synopsis "Wikidata client library")
15673 (description
15674 "This package provides a Python interface to
15675@url{https://www.wikidata.org/, Wikidata}.")
15676 (properties '((upstream-name . "Wikidata")))
15677 (license license:gpl3+)))
15678
15679(define-public python-doctest-ignore-unicode
15680 (package
15681 (name "python-doctest-ignore-unicode")
15682 (version "0.1.2")
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "doctest-ignore-unicode" version))
15687 (sha256
15688 (base32
15689 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15690 (build-system python-build-system)
15691 (native-inputs
15692 `(("python-nose" ,python-nose)))
15693 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15694 (synopsis "Ignore Unicode literal prefixes in doctests")
15695 (description
15696 "This package adds support for a flag to ignore Unicode literal prefixes
15697in doctests.")
15698 (license license:asl2.0)))
15699
15700(define-public python-attr
15701 (package
15702 (name "python-attr")
15703 (version "0.3.1")
15704 (source
15705 (origin
15706 (method url-fetch)
15707 (uri (pypi-uri "attr" version))
15708 (sha256
15709 (base32
15710 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15711 (build-system python-build-system)
15712 (home-page "https://github.com/denis-ryzhkov/attr")
15713 (synopsis "Decorator for attributes of target function or class")
15714 (description "Simple decorator to set attributes of target function or
15715class in a @acronym{DRY, Don't Repeat Yourself} way.")
15716 (license license:expat)))
f98232a3
VC
15717
15718(define-public python-construct
15719 (package
15720 (name "python-construct")
15721 (version "2.9.45")
15722 (source
15723 (origin
15724 (method url-fetch)
15725 (uri (pypi-uri "construct" version))
15726 (sha256
15727 (base32
15728 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15729 (build-system python-build-system)
15730 (arguments
15731 `(#:tests? #f)) ; No tests exist.
15732 (propagated-inputs
15733 `(("python-extras" ,python-extras)
15734 ("python-arrow" ,python-arrow)
15735 ("python-numpy" ,python-numpy)
15736 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15737 (home-page "http://construct.readthedocs.io")
15738 (synopsis "Declarative and symmetrical parser and builder for binary data")
15739 (description
15740 "This package provides both simple, atomic constructs (such as
15741integers of various sizes), as well as composite ones which allow you
15742form hierarchical and sequential structures of increasing complexity.
15743It features bit and byte granularity, easy debugging and testing, an
15744easy-to-extend subclass system, and lots of primitive constructs to
15745make your work easier.")
15746 (license license:expat)))
b742c006
LF
15747
15748(define-public python-humanize
15749 (package
15750 (name "python-humanize")
15751 (version "0.5.1")
15752 (source
15753 (origin
15754 (method url-fetch)
15755 (uri (pypi-uri "humanize" version))
15756 (sha256
15757 (base32
15758 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15759 (arguments
15760 '(#:tests? #f)) ; tests not in pypi archive
15761 (build-system python-build-system)
15762 (home-page "https://github.com/jmoiron/humanize")
15763 (synopsis "Print numerical information in a human-readable form")
15764 (description "This package provides a Python module that displays numbers
15765and dates in \"human readable\" forms. For example, it would display
15766\"12345591313\" as \"12.3 billion\".")
15767 (license license:expat)))
d5bbf66d
LF
15768
15769(define-public python-txaio
15770 (package
15771 (name "python-txaio")
15772 (version "18.8.1")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "txaio" version))
15777 (sha256
15778 (base32
15779 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15780 (build-system python-build-system)
15781 (propagated-inputs
15782 `(("python-twisted" ,python-twisted)
15783 ("python-six" ,python-six)))
15784 (home-page "https://github.com/crossbario/txaio")
15785 (synopsis "Compatibility layer between Python asyncio and Twisted")
15786 (description "Txaio provides a compatibility layer between the Python
15787@code{asyncio} module and @code{Twisted}.")
15788 (license license:expat)))
963dfd3a
RW
15789
15790(define-public python-toolshed
15791 (package
15792 (name "python-toolshed")
15793 (version "0.4.6")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "toolshed" version))
15798 (sha256
15799 (base32
15800 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
15801 (build-system python-build-system)
15802 (native-inputs
15803 `(("python-nose" ,python-nose)))
15804 (home-page "https://github.com/brentp/toolshed/")
15805 (synopsis "Collection of modules and functions for working with data")
15806 (description "This is a collection of well-tested, simple modules and
15807functions that aim to reduce boilerplate when working with data.")
15808 (license license:bsd-2)))
c91ecf2d
RW
15809
15810(define-public python-annoy
15811 (package
15812 (name "python-annoy")
15813 (version "1.15.1")
15814 (source
15815 (origin
15816 (method url-fetch)
15817 (uri (pypi-uri "annoy" version))
15818 (sha256
15819 (base32
15820 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
15821 (build-system python-build-system)
15822 (native-inputs
15823 `(("python-nose" ,python-nose)))
15824 (home-page "https://github.com/spotify/annoy/")
15825 (synopsis "Approximate nearest neighbors library")
15826 (description
15827 "Annoy is a C++ library with Python bindings to search for points in
15828space that are close to a given query point. It also creates large read-only
15829file-based data structures that are @code{mmap}ped into memory so that many
15830processes may share the same data.")
15831 (license license:asl2.0)))
412342d1 15832
79bfa422 15833(define-public python-pylzma
412342d1 15834 (package
79bfa422
DM
15835 (name "python-pylzma")
15836 (version "0.5.0")
15837 (source
15838 (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "pylzma" version))
15841 (sha256
15842 (base32
15843 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 15844 (build-system python-build-system)
79bfa422
DM
15845 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
15846 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
15847 (description "This package provides Python bindings for the LZMA library
15848by Igor Pavlov.")
15849 (license license:lgpl2.1+)))
15850
15851(define-public python2-pylzma
15852 (package-with-python2 python-pylzma))
f825e605 15853
6609ebe7
AG
15854(define-public python2-zeroconf
15855 (package
15856 (name "python2-zeroconf")
15857
15858 ;; This is the last version that supports Python 2.x.
15859 (version "0.19.1")
15860 (source
15861 (origin
15862 (method url-fetch)
15863 (uri (pypi-uri "zeroconf" version))
15864 (sha256
15865 (base32
15866 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
15867 (build-system python-build-system)
15868 (arguments
15869 `(#:python ,python-2
15870 #:phases
15871 (modify-phases %standard-phases
15872 (add-after 'unpack 'patch-requires
15873 (lambda* (#:key inputs #:allow-other-keys)
15874 (substitute* "setup.py"
15875 (("enum-compat")
15876 "enum34"))
15877 #t)))))
15878 (native-inputs
15879 `(("python2-six" ,python2-six)
15880 ("python2-enum32" ,python2-enum34)
15881 ("python2-netifaces" ,python2-netifaces)
15882 ("python2-typing" ,python2-typing)))
15883 (home-page "https://github.com/jstasiak/python-zeroconf")
15884 (synopsis "Pure Python mDNS service discovery")
15885 (description
15886 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
15887compatible).")
15888 (license license:lgpl2.1+)))
15889
f825e605
GLV
15890(define-public python-bsddb3
15891 (package
15892 (name "python-bsddb3")
15893 (version "6.2.6")
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "bsddb3" version))
15898 (sha256
15899 (base32
15900 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
15901 (build-system python-build-system)
15902 (inputs
15903 `(("bdb" ,bdb)))
15904 (arguments
15905 '(#:phases
15906 (modify-phases %standard-phases
15907 (add-after 'unpack 'configure-locations
15908 (lambda* (#:key inputs #:allow-other-keys)
15909 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
15910 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
15911 #t))
15912 (replace 'check
15913 (lambda _
15914 (invoke "python3" "test3.py" "-v"))))))
15915 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
15916 (synopsis "Python bindings for Oracle Berkeley DB")
15917 (description
15918 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
15919C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
15920Transaction objects, and each of these is exposed as a Python type in the
15921bsddb3.db module. The database objects can use various access methods: btree,
15922hash, recno, and queue. Complete support of Berkeley DB distributed
15923transactions. Complete support for Berkeley DB Replication Manager.
15924Complete support for Berkeley DB Base Replication. Support for RPC.")
15925 (license license:bsd-3)))
edeb04bf
PL
15926
15927(define-public python-dbfread
15928 (package
15929 (name "python-dbfread")
15930 (version "2.0.7")
15931 (source (origin
15932 (method url-fetch)
15933 (uri (pypi-uri "dbfread" version))
15934 (sha256
15935 (base32
15936 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
15937 (build-system python-build-system)
15938 (native-inputs
15939 `(("python-pytest" ,python-pytest)))
15940 (home-page "https://dbfread.readthedocs.io")
15941 (synopsis "Read DBF Files with Python")
15942 (description
15943 "This library reads DBF files and returns the data as native Python data
15944types for further processing. It is primarily intended for batch jobs and
15945one-off scripts.")
15946 (license license:expat)))