gnu: python-babel: Disable tests that are incompatible with Pytest 4.
[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>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
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>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
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>
47;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
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>
44d10b1f
RW
61;;;
62;;; This file is part of GNU Guix.
63;;;
64;;; GNU Guix is free software; you can redistribute it and/or modify it
65;;; under the terms of the GNU General Public License as published by
66;;; the Free Software Foundation; either version 3 of the License, or (at
67;;; your option) any later version.
68;;;
69;;; GNU Guix is distributed in the hope that it will be useful, but
70;;; WITHOUT ANY WARRANTY; without even the implied warranty of
71;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72;;; GNU General Public License for more details.
73;;;
74;;; You should have received a copy of the GNU General Public License
75;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
76
77(define-module (gnu packages python-xyz)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (gnu packages)
80 #:use-module (gnu packages algebra)
81 #:use-module (gnu packages adns)
82 #:use-module (gnu packages attr)
83 #:use-module (gnu packages backup)
84 #:use-module (gnu packages bash)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages crypto)
88 #:use-module (gnu packages databases)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages fontutils)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages geo)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages gl)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages graphviz)
97 #:use-module (gnu packages graphics)
98 #:use-module (gnu packages gstreamer)
99 #:use-module (gnu packages gtk)
100 #:use-module (gnu packages icu4c)
101 #:use-module (gnu packages image)
102 #:use-module (gnu packages imagemagick)
103 #:use-module (gnu packages libevent)
104 #:use-module (gnu packages libffi)
105 #:use-module (gnu packages linux)
106 #:use-module (gnu packages llvm)
107 #:use-module (gnu packages man)
108 #:use-module (gnu packages maths)
42f0b0c2 109 #:use-module (gnu packages monitoring)
44d10b1f
RW
110 #:use-module (gnu packages multiprecision)
111 #:use-module (gnu packages networking)
112 #:use-module (gnu packages ncurses)
113 #:use-module (gnu packages openstack)
114 #:use-module (gnu packages pcre)
115 #:use-module (gnu packages perl)
116 #:use-module (gnu packages pkg-config)
117 #:use-module (gnu packages python)
d362b11d 118 #:use-module (gnu packages python-check)
44d10b1f
RW
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages qt)
122 #:use-module (gnu packages readline)
123 #:use-module (gnu packages sdl)
124 #:use-module (gnu packages search)
125 #:use-module (gnu packages shells)
126 #:use-module (gnu packages ssh)
127 #:use-module (gnu packages terminals)
128 #:use-module (gnu packages tex)
129 #:use-module (gnu packages texinfo)
130 #:use-module (gnu packages time)
131 #:use-module (gnu packages tls)
132 #:use-module (gnu packages version-control)
133 #:use-module (gnu packages video)
134 #:use-module (gnu packages web)
135 #:use-module (gnu packages base)
136 #:use-module (gnu packages xml)
137 #:use-module (gnu packages xorg)
138 #:use-module (gnu packages xdisorg)
139 #:use-module (gnu packages tcl)
140 #:use-module (gnu packages bdw-gc)
f98232a3 141 #:use-module (gnu packages serialization)
44d10b1f
RW
142 #:use-module (guix packages)
143 #:use-module (guix download)
144 #:use-module (guix git-download)
145 #:use-module (guix utils)
146 #:use-module (guix build-system gnu)
147 #:use-module (guix build-system cmake)
148 #:use-module (guix build-system python)
149 #:use-module (guix build-system trivial)
150 #:use-module (srfi srfi-1)
151 #:use-module (srfi srfi-26))
152
153(define-public python-psutil
154 (package
155 (name "python-psutil")
156 (version "5.4.3")
157 (source
158 (origin
159 (method url-fetch)
160 (uri (pypi-uri "psutil" version))
161 (sha256
162 (base32
163 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
164 (build-system python-build-system)
165 (arguments
166 ;; FIXME: some tests does not return and times out.
167 '(#:tests? #f))
168 (home-page "https://www.github.com/giampaolo/psutil")
169 (synopsis "Library for retrieving information on running processes")
170 (description
171 "psutil (Python system and process utilities) is a library for retrieving
172information on running processes and system utilization (CPU, memory, disks,
173network) in Python. It is useful mainly for system monitoring, profiling and
174limiting process resources and management of running processes. It implements
175many functionalities offered by command line tools such as: ps, top, lsof,
176netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
177pidof, tty, taskset, pmap.")
178 (properties `((python2-variant . ,(delay python2-psutil))))
179 (license license:bsd-3)))
180
181(define-public python2-psutil
182 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
183 (package
184 (inherit base)
185 (propagated-inputs
186 `(("python2-enum34" ,python2-enum34) ;optional
187 ,@(package-propagated-inputs base))))))
188
189(define-public python-shapely
190 (package
191 (name "python-shapely")
192 (version "1.6.3")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (pypi-uri "Shapely" version))
197 (sha256
198 (base32
199 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
200 (build-system python-build-system)
201 (native-inputs
202 `(("python-cython" ,python-cython)
203 ("python-matplotlib" ,python-matplotlib)
204 ("python-pytest" ,python-pytest)
205 ("python-pytest-cov" ,python-pytest-cov)))
206 (inputs
207 `(("geos" ,geos)))
208 (propagated-inputs
209 `(("python-numpy" ,python-numpy)))
210 (arguments
211 `(#:phases
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch-geos-path
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let ((geos (assoc-ref inputs "geos"))
216 (glibc (assoc-ref inputs ,(if (%current-target-system)
217 "cross-libc" "libc"))))
218 (substitute* "shapely/geos.py"
219 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
220 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
221 geos "/lib/libgeos_c.so'])"))
222 (("free = load_dll\\('c'\\)\\.free")
223 (string-append "free = load_dll('c', fallbacks=['"
224 glibc "/lib/libc.so.6']).free"))))
225 #t)))))
226 (home-page "https://github.com/Toblerity/Shapely")
227 (synopsis "Library for the manipulation and analysis of geometric objects")
228 (description "Shapely is a Python package for manipulation and analysis of
229planar geometric objects. It is based on the @code{GEOS} library.")
230 (license license:bsd-3)))
231
232(define-public python-logwrap
233 (package
234 (name "python-logwrap")
235 (version "3.2.1")
236 (source
237 (origin
238 (method url-fetch)
239 (uri (pypi-uri "logwrap" version ".zip"))
240 (sha256
241 (base32
242 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-six" ,python-six)
246 ("python-typing" ,python-typing)))
247 (native-inputs
248 `(("unzip" ,unzip)
249 ("python-cython" ,python-cython)
250 ("python-pytest" ,python-pytest)
251 ("python-pytest-cov" ,python-pytest-cov)
252 ("python-pytest-runner" ,python-pytest-runner)))
253 (home-page "https://github.com/penguinolog/logwrap")
254 (synopsis "Decorator for logging function arguments")
255 (description "This package provides a decorator to log function arguments
256and function call return values in a human-readable way.")
257 (license license:asl2.0)))
258
259(define-public python2-shapely
260 (package-with-python2 python-shapely))
261
262(define-public python-clyent
263 (package
264 (name "python-clyent")
265 (version "1.2.1")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (pypi-uri "clyent" version))
270 (sha256
271 (base32
272 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
273 (build-system python-build-system)
274 (native-inputs
275 `(("python-mock" ,python-mock)))
276 (home-page "https://github.com/binstar/clyent")
277 (synopsis "Command line client library")
278 (description "Clyent is a Python command line utiliy library. It is used
279by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
280 (license license:bsd-3)))
281
282(define-public python2-clyent
283 (package-with-python2 python-clyent))
284
285(define-public python-babel
286 (package
287 (name "python-babel")
288 (version "2.6.0")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (pypi-uri "Babel" version))
293 (sha256
294 (base32
295 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
296 (build-system python-build-system)
297 (native-inputs
298 `(("python-freezegun" ,python-freezegun)
299 ("python-pytest" ,python-pytest)))
300 (propagated-inputs
301 `(("python-pytz" ,python-pytz)))
302 (arguments
303 `(#:phases (modify-phases %standard-phases
304 (replace 'check
8acd1e90
MB
305 (lambda _
306 (invoke "pytest" "-vv" "-k"
307 (string-append
308 ;; XXX: These tests fail when using Pytest 4.x and
309 ;; Babel 2.6.0. Try removing this for later versions.
310 "not test_no_inherit_metazone_marker_never_in_output"
311 " and not test_smoke_dates"
312 " and not test_smoke_numbers")))))))
44d10b1f
RW
313 (home-page "http://babel.pocoo.org/")
314 (synopsis
315 "Tools for internationalizing Python applications")
316 (description
317 "Babel is composed of two major parts:
318- tools to build and work with gettext message catalogs
319- a Python interface to the CLDR (Common Locale Data Repository), providing
320access to various locale display names, localized number and date formatting,
321etc. ")
322 (license license:bsd-3)))
323
324(define-public python2-babel
325 (package-with-python2 python-babel))
326
327(define-public python2-backport-ssl-match-hostname
328 (package
329 (name "python2-backport-ssl-match-hostname")
330 (version "3.5.0.1")
331 (source
332 (origin
333 (method url-fetch)
2c1f0d09 334 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
335 (sha256
336 (base32
337 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
338 (build-system python-build-system)
339 (arguments
340 `(#:python ,python-2
341 #:tests? #f)) ; no test target
342 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
343 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
344 (description
345 "This backport brings the ssl.match_hostname() function to users of
346earlier versions of Python. The function checks the hostname in the
347certificate returned by the server to which a connection has been established,
348and verifies that it matches the intended target hostname.")
349 (license license:psfl)))
350
351(define-public python-hdf4
352 (package
353 (name "python-hdf4")
354 (version "0.9")
355 (source
356 (origin
357 (method url-fetch)
358 (uri (pypi-uri name version))
359 (sha256
360 (base32
361 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
362 (build-system python-build-system)
363 (native-inputs `(("nose" ,python-nose)))
364 (propagated-inputs `(("numpy" ,python-numpy)))
365 (inputs
366 `(("hdf4" ,hdf4)
367 ("libjpeg" ,libjpeg)
368 ("zlib" ,zlib)))
369 (arguments
370 `(#:phases
371 (modify-phases %standard-phases
372 (replace 'check
373 (lambda _
374 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
375 ;; on to import numpy. Somehow this works on their CI system.
376 ;; Let's just manage PYTHONPATH here instead.
377 (substitute* "runexamples.sh"
378 (("export PYTHONPATH=.*") ""))
379 (setenv "PYTHONPATH"
380 (string-append (getcwd) ":"
381 (getenv "PYTHONPATH")))
382 (invoke "./runexamples.sh")
383 (invoke "nosetests" "-v"))))))
384 (home-page "https://github.com/fhs/python-hdf4")
385 (synopsis "Python interface to the NCSA HDF4 library")
386 (description
387 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
388which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
389NetCDF files can also be read and modified. Python-HDF4 is a fork of
390@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
391 (license license:expat)))
392
393(define-public python2-hdf4
394 (package-with-python2 python-hdf4))
395
396(define-public python-h5py
397 (package
398 (name "python-h5py")
399 (version "2.8.0")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (pypi-uri "h5py" version))
404 (sha256
405 (base32
406 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
407 (build-system python-build-system)
408 (arguments
409 `(#:tests? #f ; no test target
410 #:phases
411 (modify-phases %standard-phases
412 (add-after 'unpack 'fix-hdf5-paths
413 (lambda* (#:key inputs #:allow-other-keys)
414 (let ((prefix (assoc-ref inputs "hdf5")))
415 (substitute* "setup_build.py"
416 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
417 (string-append "['" prefix "/lib" "']"))
418 (("'/opt/local/include', '/usr/local/include'")
419 (string-append "'" prefix "/include" "'")))
420 (substitute* "setup_configure.py"
421 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
422 (string-append "['" prefix "/lib" "']")))
423 #t))))))
424 (propagated-inputs
425 `(("python-six" ,python-six)
426 ("python-numpy" ,python-numpy)))
427 (inputs
428 `(("hdf5" ,hdf5)))
429 (native-inputs
430 `(("python-cython" ,python-cython)
431 ("python-pkgconfig" ,python-pkgconfig)))
432 (home-page "http://www.h5py.org/")
433 (synopsis "Read and write HDF5 files from Python")
434 (description
435 "The h5py package provides both a high- and low-level interface to the
436HDF5 library from Python. The low-level interface is intended to be a
437complete wrapping of the HDF5 API, while the high-level component supports
438access to HDF5 files, datasets and groups using established Python and NumPy
439concepts.")
440 (license license:bsd-3)))
441
442(define-public python2-h5py
443 (package-with-python2 python-h5py))
444
8b89dedc
RW
445(define-public python-sh
446 (package
447 (name "python-sh")
448 (version "1.12.14")
449 (source
450 (origin
451 (method url-fetch)
452 (uri (pypi-uri "sh" version))
453 (sha256
454 (base32
455 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
456 (build-system python-build-system)
fd3638d8
EF
457 (arguments
458 '(#:phases
459 (modify-phases %standard-phases
460 (replace 'check
461 (lambda _
462 (invoke "python" "sh.py" "test"))))))
463 (native-inputs
464 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
465 (home-page "https://github.com/amoffat/sh")
466 (synopsis "Python subprocess replacement")
467 (description "This package provides a replacement for Python's
468@code{subprocess} feature.")
469 (license license:expat)))
470
3869effd
RW
471(define-public python2-sh
472 (package-with-python2 python-sh))
473
d362b11d
RW
474(define-public python-cftime
475 (package
476 (name "python-cftime")
477 (version "1.0.3.4")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (pypi-uri "cftime" version))
482 (sha256
483 (base32
484 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
485 (build-system python-build-system)
486 (propagated-inputs
487 `(("python-numpy" ,python-numpy)))
488 (native-inputs
489 `(("python-coveralls" ,python-coveralls)
490 ("python-cython" ,python-cython)
491 ("python-pytest-cov" ,python-pytest-cov)))
492 (home-page "https://github.com/Unidata/cftime")
493 (synopsis "Library for time handling")
494 (description
495 "This package provides time-handling functionality that used to be part
496of the netcdf4 package before.")
497 ;; This package claims to include code under the GPLv3 but is released
498 ;; under ISC.
499 (license (list license:isc license:gpl3+))))
500
44d10b1f
RW
501(define-public python-netcdf4
502 (package
503 (name "python-netcdf4")
93e7b209 504 (version "1.4.2")
44d10b1f
RW
505 (source
506 (origin
507 (method url-fetch)
508 (uri (pypi-uri "netCDF4" version))
509 (sha256
510 (base32
93e7b209 511 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 512 (build-system python-build-system)
93e7b209
RW
513 (arguments
514 '(#:phases
515 (modify-phases %standard-phases
516 (add-after 'unpack 'configure-locations
517 (lambda* (#:key inputs #:allow-other-keys)
518 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
519 #t)))))
44d10b1f
RW
520 (native-inputs
521 `(("python-cython" ,python-cython)))
522 (propagated-inputs
93e7b209
RW
523 `(("python-numpy" ,python-numpy)
524 ("python-cftime" ,python-cftime)))
44d10b1f
RW
525 (inputs
526 `(("netcdf" ,netcdf)
527 ("hdf4" ,hdf4)
528 ("hdf5" ,hdf5)))
93e7b209 529 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
530 (synopsis "Python/numpy interface to the netCDF library")
531 (description "Netcdf4-python is a Python interface to the netCDF C
532library. netCDF version 4 has many features not found in earlier
533versions of the library and is implemented on top of HDF5. This module
534can read and write files in both the new netCDF 4 and the old netCDF 3
535format, and can create files that are readable by HDF5 clients. The
536API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
537to users of that module.")
538 ;; The software is mainly ISC, but includes some files covered
539 ;; by the Expat license.
540 (license (list license:isc license:expat))))
541
542(define-public python2-netcdf4
543 (package-with-python2 python-netcdf4))
544
545(define-public python-lockfile
546 (package
547 (name "python-lockfile")
548 (version "0.12.2")
549 (source
550 (origin
551 (method url-fetch)
8318bf07 552 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
553 (sha256
554 (base32
555 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
556 (build-system python-build-system)
557 (arguments '(#:test-target "check"))
558 (native-inputs
559 `(("python-pbr" ,python-pbr)))
560 (home-page "https://launchpad.net/pylockfile")
561 (synopsis "Platform-independent file locking module")
562 (description
563 "The lockfile package exports a LockFile class which provides a simple
564API for locking files.")
565 (license license:expat)))
566
567(define-public python2-lockfile
568 (package-with-python2 python-lockfile))
569
570(define-public python-semantic-version
571 (package
572 (name "python-semantic-version")
573 (version "2.6.0")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (pypi-uri "semantic_version" version))
578 (sha256
579 (base32
580 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
581 (build-system python-build-system)
582 (arguments
583 `(#:tests? #f)) ; PyPI tarball lacks tests
584 (home-page "https://github.com/rbarrois/python-semanticversion")
585 (synopsis "Semantic versioning module for Python")
586 (description
587 "The @code{semantic_version} class is a small library for handling
588@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
589
590It can compare versions, generate a new version that represents a bump in one of
591the version levels, and check whether any given string is a proper semantic
592version identifier.")
593 (license license:bsd-3)))
594
595(define-public python2-semantic-version
596 (package-with-python2 python-semantic-version))
597
598(define-public python-serpent
599 (package
600 (name "python-serpent")
601 (version "1.27")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (pypi-uri "serpent" version))
606 (sha256
607 (base32
608 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
609 (build-system python-build-system)
610 (home-page "https://github.com/irmen/Serpent")
611 (synopsis "Serializer for literal Python expressions")
612 (description
613 "Serpent provides ast.literal_eval() compatible object tree
614serialization. It serializes an object tree into bytes (utf-8 encoded string)
615that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
616as the original object tree. As such it is safe to send serpent data to other
617machines over the network for instance (because only safe literals are
618encoded).")
619 (license license:expat)))
620
621(define-public python-setuptools
622 (package
623 (name "python-setuptools")
b3ca2b45 624 (version "40.8.0")
44d10b1f
RW
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "setuptools" version ".zip"))
629 (sha256
630 (base32
b3ca2b45 631 "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf"))
44d10b1f
RW
632 (modules '((guix build utils)))
633 (snippet
634 '(begin
635 ;; Remove included binaries which are used to build self-extracting
636 ;; installers for Windows.
637 ;; TODO: Find some way to build them ourself so we can include them.
638 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
639 #t))))
640 (build-system python-build-system)
641 ;; FIXME: Tests require pytest, which itself relies on setuptools.
642 ;; One could bootstrap with an internal untested setuptools.
643 (arguments
644 `(#:tests? #f))
645 (home-page "https://pypi.python.org/pypi/setuptools")
646 (synopsis
647 "Library designed to facilitate packaging Python projects")
648 (description
649 "Setuptools is a fully-featured, stable library designed to facilitate
650packaging Python projects, where packaging includes:
651Python package and module definitions,
652distribution package metadata,
653test hooks,
654project installation,
655platform-specific details,
656Python 3 support.")
657 ;; TODO: setuptools now bundles the following libraries:
658 ;; packaging, pyparsing, six and appdirs. How to unbundle?
659 (license (list license:psfl ; setuptools itself
660 license:expat ; six, appdirs, pyparsing
661 license:asl2.0 ; packaging is dual ASL2/BSD-2
662 license:bsd-2))))
663
664(define-public python2-setuptools
665 (package-with-python2 python-setuptools))
666
667(define-public python-uniseg
668 (package
669 (name "python-uniseg")
670 (version "0.7.1")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "uniseg" version ".zip"))
675 (sha256
676 (base32
677 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
678 (build-system python-build-system)
679 (arguments
680 '(#:tests? #f)) ; The test suite requires network access.
681 (native-inputs
682 `(("unzip" ,unzip)))
683 (home-page
684 "https://bitbucket.org/emptypage/uniseg-python")
685 (synopsis
686 "Python library to determine Unicode text segmentations")
687 (description
688 "Uniseg is a Python package used to determine Unicode text segmentations.
689Supported segmentations include:
690@enumerate
691@item @dfn{Code point} (any value in the Unicode codespace)
692@item @dfn{Grapheme cluster} (user-perceived character made of a single or
693multiple Unicode code points, e.g. \"G\" + acute-accent)
694@item Word break
695@item Sentence break
696@item Line break
697@end enumerate")
698 (license license:expat)))
699
700(define-public python2-uniseg
701 (package-with-python2 python-uniseg))
702
703(define-public python-humanfriendly
704 (package
705 (name "python-humanfriendly")
706 (version "4.4.1")
707 (source
708 (origin
709 (method url-fetch)
710 (uri (pypi-uri "humanfriendly" version))
711 (sha256
712 (base32
713 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
714 (build-system python-build-system)
715 (arguments
716 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
717 #:tests? #f))
718 (propagated-inputs
719 `(("python-monotonic" ,python-monotonic)))
720 (home-page "https://humanfriendly.readthedocs.io")
721 (synopsis "Human-friendly input and output in Python")
722 (description
723 "The functions and classes in @code{humanfriendly} can be used to make
724text interfaces more user-friendly. It includes tools to parse and format
725numbers, file sizes, and timespans, timers for long-running operations, menus
726to allow the user to choose from a list of options, and terminal interaction
727helpers.")
728 (license license:expat)))
729
730(define-public python2-humanfriendly
731 (package-with-python2 python-humanfriendly))
732
733(define-public python-capturer
734 (package
735 (name "python-capturer")
736 (version "2.4")
737 (source
738 (origin
739 (method url-fetch)
740 (uri (pypi-uri "capturer" version))
741 (sha256
742 (base32
743 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
744 (build-system python-build-system)
745 (arguments
746 `(#:tests? #f))
747 (propagated-inputs
748 `(("python-humanfriendly" ,python-humanfriendly)))
749 (home-page "https://capturer.readthedocs.io")
750 (synopsis "Capture stdout and stderr streams of the current process")
751 (description
752 "The capturer package makes it easy to capture the stdout and stderr
753streams of the current process and subprocesses. Output can be relayed
754to the terminal in real time but is also available to the Python program
755for additional processing.")
756 (license license:expat)))
757
758(define-public python2-capturer
759 (package-with-python2 python-capturer))
760
761(define-public python-case
762 (package
763 (name "python-case")
764 (version "1.5.3")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (pypi-uri "case" version))
769 (sha256
770 (base32
771 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
772 (build-system python-build-system)
773 (propagated-inputs
774 `(("python-mock" ,python-mock)
775 ("python-nose" ,python-nose)
776 ("python-six" ,python-six)
777 ("python-unittest2" ,python-unittest2)))
778 (native-inputs
779 `(("python-coverage" ,python-coverage)))
780 (home-page "https://github.com/celery/case")
781 (synopsis "Unittest utilities and convenience methods")
782 (description
783 "The @code{case} package provides utilities on top of unittest, including
784some helpful Python 2 compatibility convenience methods.")
785 (license license:bsd-3)))
786
787(define-public python-verboselogs
788 (package
789 (name "python-verboselogs")
790 (version "1.7")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (pypi-uri "verboselogs" version))
795 (sha256
796 (base32
797 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
798 (build-system python-build-system)
799 (native-inputs
800 `(("python-mock" ,python-mock)
801 ("python-astroid" ,python-astroid)
802 ("python-pylint" ,python-pylint)))
803 (home-page "https://verboselogs.readthedocs.io")
804 (synopsis "Verbose logging level for Python's logging module")
805 (description
806 "The @code{verboselogs} package extends Python's @code{logging} module to
807add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
808 (license license:expat)))
809
810(define-public python2-verboselogs
811 (package-with-python2 python-verboselogs))
812
813(define-public python-coloredlogs
814 (package
815 (name "python-coloredlogs")
816 (version "7.3")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "coloredlogs" version))
821 (sha256
822 (base32
823 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
824 (build-system python-build-system)
825 (arguments
826 `(;Tests require some updated modules
827 #:tests? #f))
828 (propagated-inputs
829 `(("python-capturer" ,python-capturer)))
830 (home-page "https://coloredlogs.readthedocs.io")
831 (synopsis "Colored stream handler for Python's logging module")
832 (description
833 "The @code{coloredlogs} package enables colored terminal output for
834Python's logging module. The @code{ColoredFormatter} class inherits from
835@code{logging.Formatter} and uses ANSI escape sequences to render your logging
836messages in color.")
837 (license license:expat)))
838
839(define-public python2-coloredlogs
840 (package-with-python2 python-coloredlogs))
841
842(define-public python-eventlet
843 (package
844 (name "python-eventlet")
845 (version "0.20.1")
846 (source
847 (origin
848 (method url-fetch)
849 (uri (pypi-uri "eventlet" version))
850 (sha256
851 (base32
852 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
853 (build-system python-build-system)
854 (propagated-inputs
855 `(("python-greenlet" ,python-greenlet)))
856 (arguments
857 ;; TODO: Requires unpackaged 'enum-compat'.
858 '(#:tests? #f))
859 (home-page "http://eventlet.net")
860 (synopsis "Concurrent networking library for Python")
861 (description
862 "Eventlet is a concurrent networking library for Python that
863allows you to change how you run your code, not how you write it.
864It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
865Coroutines ensure that the developer uses a blocking style of programming
866that is similar to threading, but provide the benefits of non-blocking I/O.
867The event dispatch is implicit, which means you can easily use @code{Eventlet}
868from the Python interpreter, or as a small part of a larger application.")
869 (license license:expat)))
870
871(define-public python2-eventlet
872 (let ((base (package-with-python2
873 (strip-python2-variant python-eventlet))))
874 (package (inherit base)
875 (propagated-inputs
876 `(("python2-enum34" ,python2-enum34)
877 ,@(package-propagated-inputs base))))))
878
879(define-public python-six
880 (package
881 (name "python-six")
6c58a06e 882 (version "1.12.0")
44d10b1f
RW
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "six" version))
887 (sha256
888 (base32
6c58a06e 889 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
890 (build-system python-build-system)
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda _
896 (invoke "py.test" "-v"))))))
897 (native-inputs
898 `(("python-py" ,python-py)
899 ("python-pytest" ,python-pytest-bootstrap)))
900 (home-page "https://pypi.python.org/pypi/six/")
901 (synopsis "Python 2 and 3 compatibility utilities")
902 (description
903 "Six is a Python 2 and 3 compatibility library. It provides utility
904functions for smoothing over the differences between the Python versions with
905the goal of writing Python code that is compatible on both Python versions.
906Six supports every Python version since 2.5. It is contained in only one
907Python file, so it can be easily copied into your project.")
908 (license license:x11)))
909
910(define-public python2-six
911 (package-with-python2 python-six))
912
913(define-public python-six-bootstrap
914 (package
915 (inherit python-six)
916 (name "python-six-bootstrap")
917 (native-inputs `())
918 (arguments `(#:tests? #f))))
919
920(define-public python2-six-bootstrap
921 (package-with-python2 python-six-bootstrap))
922
923(define-public python-schedule
924 (package
925 (name "python-schedule")
926 (version "0.4.3")
927 (source
928 (origin
929 (method url-fetch)
930 (uri (pypi-uri "schedule" version))
931 (sha256
932 (base32
933 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
934 (build-system python-build-system)
935 (native-inputs
936 `(("python-pytest" ,python-pytest)
937 ("python-mock" ,python-mock)))
938 (home-page "https://github.com/dbader/schedule")
939 (synopsis "Schedule periodic function calls in Python")
940 (description
941 "Schedule is an in-process scheduler for periodic jobs that uses the
942builder pattern for configuration. Schedule lets you run Python functions (or
943any other callable) periodically at pre-determined intervals using a simple,
944human-friendly syntax.")
945 (license license:expat)))
946
947(define-public python2-schedule
948 (package-with-python2 python-schedule))
949
950(define-public python-pandas
951 (package
952 (name "python-pandas")
953 (version "0.23.4")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (pypi-uri "pandas" version))
958 (sha256
959 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
960 (build-system python-build-system)
961 (arguments
962 `(#:modules ((guix build utils)
963 (guix build python-build-system)
964 (ice-9 ftw)
965 (srfi srfi-26))
966 #:phases (modify-phases %standard-phases
967 (replace 'check
968 (lambda _
969 (let ((build-directory
970 (string-append
971 (getcwd) "/build/"
972 (car (scandir "build"
973 (cut string-prefix? "lib." <>))))))
974 ;; Disable the "strict data files" option which causes
975 ;; the build to error out if required data files are not
976 ;; available (as is the case with PyPI archives).
977 (substitute* "setup.cfg"
978 (("addopts = --strict-data-files") "addopts = "))
979 (with-directory-excursion build-directory
980 ;; Delete tests that require "moto" which is not yet in Guix.
981 (for-each delete-file
982 '("pandas/tests/io/conftest.py"
983 "pandas/tests/io/json/test_compression.py"
984 "pandas/tests/io/parser/test_network.py"
985 "pandas/tests/io/test_excel.py"
986 "pandas/tests/io/test_parquet.py"))
987 (invoke "pytest" "-vv" "pandas" "--skip-slow"
988 "--skip-network" "-k"
989 ;; XXX: Due to the deleted tests above.
990 "not test_read_s3_jsonl"))))))))
991 (propagated-inputs
992 `(("python-numpy" ,python-numpy)
993 ("python-pytz" ,python-pytz)
994 ("python-dateutil" ,python-dateutil)))
995 (native-inputs
996 `(("python-cython" ,python-cython)
997 ("python-beautifulsoup4" ,python-beautifulsoup4)
998 ("python-lxml" ,python-lxml)
999 ("python-html5lib" ,python-html5lib)
1000 ("python-nose" ,python-nose)
1001 ("python-pytest" ,python-pytest)))
1002 (home-page "https://pandas.pydata.org")
1003 (synopsis "Data structures for data analysis, time series, and statistics")
1004 (description
1005 "Pandas is a Python package providing fast, flexible, and expressive data
1006structures designed to make working with structured (tabular,
1007multidimensional, potentially heterogeneous) and time series data both easy
1008and intuitive. It aims to be the fundamental high-level building block for
1009doing practical, real world data analysis in Python.")
1010 (license license:bsd-3)))
1011
1012(define-public python2-pandas
1013 (package-with-python2 python-pandas))
1014
1015(define-public python2-mechanize
1016 (package
1017 (name "python2-mechanize")
1018 (version "0.2.5")
1019 (source
1020 (origin
1021 (method url-fetch)
1cc184e6 1022 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1023 (sha256
1024 (base32
1025 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1026 (build-system python-build-system)
1027 (arguments
1028 `(#:python ,python-2 ; apparently incompatible with Python 3
1029 #:tests? #f))
1030 ;; test fails with message
1031 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1032 ;; (python-3.3.2) or
1033 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1034 ;; (python-2.7.5).
1035 ;; The source code is from March 2011 and probably not up-to-date
1036 ;; with respect to python unit tests.
1037 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1038 (synopsis
1039 "Stateful programmatic web browsing in Python")
1040 (description
1041 "Mechanize implements stateful programmatic web browsing in Python,
1042after Andy Lester’s Perl module WWW::Mechanize.")
1043 (license (license:non-copyleft
1044 "file://COPYING"
1045 "See COPYING in the distribution."))))
1046
1047
1048(define-public python-simplejson
1049 (package
1050 (name "python-simplejson")
1051 (version "3.14.0")
1052 (source
1053 (origin
1054 (method url-fetch)
1055 (uri (pypi-uri "simplejson" version))
1056 (sha256
1057 (base32
1058 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1059 (build-system python-build-system)
1060 (home-page "http://simplejson.readthedocs.org/en/latest/")
1061 (synopsis
1062 "Json library for Python")
1063 (description
1064 "JSON (JavaScript Object Notation) is a subset of JavaScript
1065syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1066format.
1067
1068Simplejson exposes an API familiar to users of the standard library marshal
1069and pickle modules. It is the externally maintained version of the json
1070library contained in Python 2.6, but maintains compatibility with Python 2.5
1071and (currently) has significant performance advantages, even without using
1072the optional C extension for speedups. Simplejson is also supported on
1073Python 3.3+.")
1074 (license license:x11)))
1075
1076(define-public python2-simplejson
1077 (package-with-python2 python-simplejson))
1078
1079
1080(define-public python-pyicu
1081 (package
1082 (name "python-pyicu")
1083 (version "2.2")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (pypi-uri "PyICU" version))
1088 (sha256
1089 (base32
1090 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1091 (build-system python-build-system)
1092 (inputs
1093 `(("icu4c" ,icu4c)))
1094 (native-inputs
1095 `(("python-pytest" ,python-pytest)
1096 ("python-six" ,python-six)))
1097 (home-page "https://github.com/ovalhub/pyicu")
1098 (synopsis "Python extension wrapping the ICU C++ API")
1099 (description
1100 "PyICU is a python extension wrapping the ICU C++ API.")
1101 (properties `((python2-variant . ,(delay python2-pyicu))))
1102 (license license:x11)))
1103
1104(define-public python2-pyicu
1105 (let ((base (package-with-python2
1106 (strip-python2-variant python-pyicu))))
1107 (package
1108 (inherit base)
1109 (arguments
1110 `(,@(package-arguments base)
1111 #:phases
1112 (modify-phases %standard-phases
1113 (add-before 'check 'delete-failing-test
1114 (λ _
1115 ;; XXX: This fails due to Unicode issues unique to Python 2,
1116 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1117 (delete-file "test/test_Script.py")
1118 #t))))))))
1119
1120(define-public python2-dogtail
1121 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1122 ;; spaces in indentation" with Python 3.
1123 (package
1124 (name "python2-dogtail")
1125 (version "0.9.9")
1126 (source (origin
1127 (method url-fetch)
1128 (uri (pypi-uri "dogtail" version))
1129 (sha256
1130 (base32
1131 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1132 (build-system python-build-system)
1133 (arguments `(#:python ,python-2
1134 #:tests? #f)) ; invalid command "test"
1135 ;; Currently no offical homepage.
1136 (home-page "https://pypi.python.org/pypi/dogtail/")
1137 (synopsis "GUI test tool and automation framework written in Python")
1138 (description
1139 "Dogtail is a GUI test tool and automation framework written in Python.
1140It uses Accessibility (a11y) technologies to communicate with desktop
1141applications. dogtail scripts are written in Python and executed like any
1142other Python program.")
1143 (license license:gpl2+)))
1144
1145(define-public python-empy
1146 (package
1147 (name "python-empy")
0f6d5115 1148 (version "3.3.3")
44d10b1f
RW
1149 (source (origin
1150 (method url-fetch)
1151 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1152 version ".tar.gz"))
1153 (sha256
1154 (base32
0f6d5115 1155 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1156 (build-system python-build-system)
1157 (arguments
0f6d5115 1158 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1159 (home-page "http://www.alcyone.com/software/empy/")
1160 (synopsis "Templating system for Python")
1161 (description
1162 "EmPy is a system for embedding Python expressions and statements in
1163template text; it takes an EmPy source file, processes it, and produces
1164output. This is accomplished via expansions, which are special signals to the
1165EmPy system and are set off by a special prefix (by default the at sign, @@).
1166EmPy can expand arbitrary Python expressions and statements in this way, as
1167well as a variety of special forms. Textual data not explicitly delimited in
1168this way is sent unaffected to the output, allowing Python to be used in
1169effect as a markup language. Also supported are callbacks via hooks,
1170recording and playback via diversions, and dynamic, chainable filters. The
1171system is highly configurable via command line options and embedded
1172commands.")
1173 (license license:lgpl2.1+)))
1174
1175(define-public python2-empy
0f064242
TGR
1176 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1177 (package
1178 (inherit base)
1179 (arguments `(,@(package-arguments base)
1180 #:tests? #t)))))
44d10b1f
RW
1181
1182(define-public python2-element-tree
1183 (package
1184 (name "python2-element-tree")
1185 (version "1.2.6")
1186 (source (origin
1187 (method url-fetch)
1188 (uri (string-append
1189 "http://effbot.org/media/downloads/elementtree-"
1190 version "-20050316.tar.gz"))
1191 (sha256
1192 (base32
1193 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1194 (build-system python-build-system)
1195 (arguments
1196 `(#:python ,python-2 ; seems to be part of Python 3
1197 #:tests? #f)) ; no 'test' sub-command
1198 (synopsis "Toolkit for XML processing in Python")
1199 (description
1200 "ElementTree is a Python library supporting lightweight XML processing.")
1201 (home-page "http://effbot.org/zone/element-index.htm")
1202 (license (license:x11-style
1203 "http://docs.python.org/2/license.html"
1204 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1205
1206(define-public python2-pybugz
1207 (package
1208 (name "python2-pybugz")
1209 (version "0.6.11")
1210 (source (origin
1211 (method url-fetch)
1212 (uri (string-append
1213 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1214 version ".tar.gz"))
1215 (sha256
1216 (base32
1217 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1218 (patches (search-patches "pybugz-stty.patch"
1219 "pybugz-encode-error.patch"))))
1220 (build-system python-build-system)
1221 (arguments
1222 `(#:python ,python-2 ; SyntaxError with Python 3
1223 #:tests? #f)) ; no 'test' sub-command
1224 (propagated-inputs
1225 `(("element-tree" ,python2-element-tree)))
1226 (synopsis "Python and command-line interface to Bugzilla")
1227 (description
1228 "PyBugz is a Python library and command-line tool to query the Bugzilla
1229bug tracking system. It is meant as an aid to speed up interaction with the
1230bug tracker.")
1231 (home-page "http://www.liquidx.net/pybugz/")
1232 (license license:gpl2)))
1233
1234(define-public python2-enum
1235 (package
1236 (name "python2-enum")
1237 (version "0.4.6")
1238 (source (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "enum" version))
1241 (sha256
1242 (base32
1243 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1244 (build-system python-build-system)
1245 (arguments
1246 `(#:python ,python-2))
1247 (home-page "http://pypi.python.org/pypi/enum/")
1248 (synopsis "Robust enumerated type support in Python")
1249 (description
1250 "This provides a module for robust enumerations in Python. It has
1251been superseded by the Python standard library and is provided only for
1252compatibility.")
1253 ;; Choice of either license.
1254 (license (list license:gpl3+ license:psfl))))
1255
1256(define-public python-enum34
1257 (package
1258 (name "python-enum34")
1259 (version "1.1.6")
1260 (source
1261 (origin
1262 (method url-fetch)
1263 (uri (pypi-uri "enum34" version))
1264 (sha256
1265 (base32
1266 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1267 (build-system python-build-system)
1268 (home-page "https://pypi.python.org/pypi/enum34")
1269 (synopsis "Backported Python 3.4 Enum")
1270 (description
1271 "Enum34 is the new Python stdlib enum module available in Python 3.4
1272backported for previous versions of Python from 2.4 to 3.3.")
1273 (license license:bsd-3)))
1274
1275(define-public python2-enum34
1276 (package-with-python2 python-enum34))
1277
1278(define-public python-parse-type
1279 (package
1280 (name "python-parse-type")
1281 (version "0.4.2")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (pypi-uri "parse_type" version))
1286 (sha256
1287 (base32
1288 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1289 (build-system python-build-system)
1290 (propagated-inputs
1291 `(("python-six" ,python-six)
1292 ("python-parse" ,python-parse)))
1293 (native-inputs
1294 `(("python-pytest" ,python-pytest)
1295 ("python-pytest-runner" ,python-pytest-runner)))
1296 (home-page "https://github.com/jenisys/parse_type")
1297 (synopsis "Extended parse module")
1298 (description
1299 "Parse_type extends the python parse module.")
1300 (properties
1301 `((python2-variant . ,(delay python2-parse-type))))
1302 (license license:bsd-3)))
1303
1304(define-public python2-parse-type
1305 (let ((base (package-with-python2
1306 (strip-python2-variant python-parse-type))))
1307 (package (inherit base)
1308 (propagated-inputs
1309 `(("python2-enum34" ,python2-enum34)
1310 ,@(package-propagated-inputs base))))))
1311
1312(define-public python-parse
1313 (package
1314 (name "python-parse")
1315 (version "1.8.4")
1316 (source
1317 (origin
1318 (method url-fetch)
1319 (uri (pypi-uri "parse" version))
1320 (sha256
1321 (base32
1322 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1323 (build-system python-build-system)
1324 (arguments
1325 `(#:phases
1326 (modify-phases %standard-phases
1327 (replace 'check
1328 (lambda _ (invoke "python" "test_parse.py"))))))
1329 (home-page "https://github.com/r1chardj0n3s/parse")
1330 (synopsis "Parse strings")
1331 (description
1332 "Parse strings using a specification based on the Python @code{format()}
1333syntax.")
1334 (license license:x11)))
1335
1336(define-public python-polib
1337 (package
1338 (name "python-polib")
1339 (version "1.0.8")
1340 (source (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "polib" version))
1343 (sha256
1344 (base32
1345 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1346 (build-system python-build-system)
1347 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1348 (synopsis "Manipulate, create and modify gettext files")
1349 (description "Polib can manipulate any gettext format (po, pot and mo)
1350files. It can be used to create po files from scratch or to modify
1351existing ones.")
1352 (license license:expat)))
1353
1354(define-public python2-polib
1355 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1356 (package
1357 (inherit base)
1358 (arguments `(,@(package-arguments base)
1359 ;; Tests don't work with python2.
1360 #:tests? #f)))))
1361
1362(define-public scons
1363 (package
1364 (name "scons")
05487ed8 1365 (version "3.0.4")
44d10b1f 1366 (source (origin
ad34338d
RW
1367 (method git-fetch)
1368 (uri (git-reference
1369 (url "https://github.com/SCons/scons.git")
1370 (commit version)))
1371 (file-name (git-file-name name version))
44d10b1f
RW
1372 (sha256
1373 (base32
05487ed8 1374 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1375 (build-system python-build-system)
1376 (arguments
1377 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1378 #:tests? #f ; no 'python setup.py test' command
1379 #:phases
1380 (modify-phases %standard-phases
1381 (add-before 'build 'bootstrap
1382 (lambda _
1383 (substitute* "src/engine/SCons/compat/__init__.py"
1384 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1385 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1386 (substitute* "src/engine/SCons/Platform/__init__.py"
1387 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1388 "mod = __import__(full_name)"))
ad34338d
RW
1389 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1390 (chdir "build/scons")
1391 #t)))))
44d10b1f
RW
1392 (home-page "http://scons.org/")
1393 (synopsis "Software construction tool written in Python")
1394 (description
1395 "SCons is a software construction tool. Think of SCons as an improved,
1396cross-platform substitute for the classic Make utility with integrated
1397functionality similar to autoconf/automake and compiler caches such as ccache.
1398In short, SCons is an easier, more reliable and faster way to build
1399software.")
1400 (license license:x11)))
1401
1402(define-public scons-python2
1403 (package
1404 (inherit (package-with-python2 scons))
1405 (name "scons-python2")))
1406
1407(define-public python-extras
1408 (package
1409 (name "python-extras")
1410 (version "1.0.0")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "extras" version))
1415 (sha256
1416 (base32
1417 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1418 (build-system python-build-system)
1419 (arguments
1420 ;; FIXME: Circular dependency on testtools.
1421 '(#:tests? #f))
1422 (home-page "https://github.com/testing-cabal/extras")
1423 (synopsis "Useful extensions to the Python standard library")
1424 (description
1425 "Extras is a set of extensions to the Python standard library.")
1426 (license license:expat)))
1427
1428(define-public python2-extras
1429 (package-with-python2 python-extras))
1430
1431(define-public python-mimeparse
1432 (package
1433 (name "python-mimeparse")
1434 (version "1.6.0")
1435 (source
1436 (origin
1437 (method url-fetch)
89bf667c 1438 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1439 (sha256
1440 (base32
1441 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1442 (build-system python-build-system)
1443 (arguments
1444 '(#:phases
1445 (modify-phases %standard-phases
1446 (replace 'check
1447 (lambda _
1448 (invoke "./mimeparse_test.py"))))))
1449 (home-page
1450 "https://github.com/dbtsai/python-mimeparse")
1451 (synopsis "Python library for parsing MIME types")
1452 (description
1453 "Mimeparse provides basic functions for parsing MIME type names and
1454matching them against a list of media-ranges.")
1455 (license license:expat)))
1456
1457(define-public python2-mimeparse
1458 (package-with-python2 python-mimeparse))
1459
1460(define-public python-miniboa
1461 (package
1462 (name "python-miniboa")
1463 (version "1.0.7")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "miniboa" version))
1468 (sha256
1469 (base32
1470 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1471 (build-system python-build-system)
1472 (home-page "https://github.com/shmup/miniboa")
1473 (synopsis "Simple, single-threaded Telnet server")
1474 (description
1475 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1476server.")
1477 (license license:asl2.0)))
1478
1479(define-public python2-miniboa
1480 (package-with-python2 python-miniboa))
1481
1482(define-public python-pafy
1483 (package
1484 (name "python-pafy")
1485 (version "0.5.3.1")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "pafy" version))
1490 (sha256
1491 (base32
1492 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1496 (propagated-inputs
1497 ;; Youtube-dl is a python package which is imported in the file
1498 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1499 `(("youtube-dl" ,youtube-dl)))
1500 (home-page "https://np1.github.io/pafy/")
1501 (synopsis "Retrieve YouTube content and metadata")
1502 (description
1503 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1504 (license license:lgpl3+)))
1505
1506(define-public python2-funcsigs
1507 (package
1508 (name "python2-funcsigs")
1509 (version "1.0.2")
1510 (source (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "funcsigs" version))
1513 (sha256
1514 (base32
1515 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1516 (build-system python-build-system)
1517 (arguments
1518 `(#:python ,python-2))
1519 (native-inputs
1520 `(("python2-unittest2" ,python2-unittest2)))
1521 (home-page "http://funcsigs.readthedocs.org")
1522 (synopsis "Python function signatures from PEP362")
1523 (description
1524 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1525 (license license:asl2.0)))
1526
1527(define-public python2-funcsigs-bootstrap
1528 (package
1529 (inherit python2-funcsigs)
1530 (name "python2-funcsigs-bootstrap")
1531 (native-inputs `())
1532 (arguments
1533 `(#:tests? #f
1534 ,@(package-arguments python2-funcsigs)))))
1535
1536(define-public python-py
1537 (package
1538 (name "python-py")
08eba545 1539 (version "1.8.0")
44d10b1f
RW
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (pypi-uri "py" version))
1544 (sha256
1545 (base32
08eba545 1546 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1547 (build-system python-build-system)
1548 (arguments
1549 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1550 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1551 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1552 ;; Is this module globally installed?"
1553 '(#:tests? #f))
1554 (native-inputs
1555 `(("python-setuptools-scm" ,python-setuptools-scm)))
1556 (home-page "https://github.com/pytest-dev/py")
1557 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1558 (description
1559 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1560code introspection, and logging.")
1561 (license license:expat)))
1562
1563(define-public python2-py
1564 (package-with-python2 python-py))
1565
1566;; Recent versions of python-fixtures and python-testrepository need
1567;; python-pbr for packaging, which itself needs these two packages for
1568;; testing.
1569;; To fix this circular dependency, we use a build of python-pbr, based on the
1570;; same source, just without any test dependencies and with tests disabled.
1571;; python-pbr-minmal is then used to package python-fixtures and
1572;; python-testrepository.
1573;; Strictly speaking we currently could remove the test-requirements from the
1574;; normal python-pbr package (and save this package) since test are disabled
1575;; there anyway. But this may change in future.
1576(define-public python-pbr-minimal
1577 (package
1578 (name "python-pbr-minimal")
1579 (version "3.0.1")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "pbr" version))
1584 (sha256
1585 (base32
1586 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1587 (build-system python-build-system)
1588 (arguments
1589 `(#:tests? #f))
1590 (home-page "http://docs.openstack.org/developer/pbr/")
1591 (synopsis "Minimal build of python-pbr used for bootstrapping")
1592 (description
1593 "Used only for bootstrapping python2-pbr, you should not need this.")
1594 (license license:asl2.0)))
1595
1596(define-public python2-pbr-minimal
1597 (package-with-python2 python-pbr-minimal))
1598
1599(define-public python-pbr
1600 (package
1601 (inherit python-pbr-minimal)
1602 (name "python-pbr")
1603 (arguments
1604 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1605 (propagated-inputs
1606 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1607 (native-inputs
1608 `(("python-fixtures" ,python-fixtures-bootstrap)
1609 ;; discover, coverage, hacking, subunit
1610 ("python-mock" ,python-mock)
1611 ("python-six" ,python-six)
1612 ("python-sphinx" ,python-sphinx)
1613 ("python-testrepository" ,python-testrepository-bootstrap)
1614 ("python-testresources" ,python-testresources-bootstrap)
1615 ("python-testscenarios" ,python-testscenarios-bootstrap)
1616 ("python-testtools" ,python-testtools-bootstrap)
1617 ("python-virtualenv" ,python-virtualenv)))
1618 (synopsis "Enhance the default behavior of Python’s setuptools")
1619 (description
1620 "Python Build Reasonableness (PBR) is a library that injects some useful
1621and sensible default behaviors into your setuptools run. It will set
1622versions, process requirements files and generate AUTHORS and ChangeLog file
1623from git information.
1624")))
1625
1626(define-public python2-pbr
1627 (package-with-python2 python-pbr))
1628
1629(define-public python-exif-read
1630 (package
1631 (name "python-exif-read")
1632 (version "2.1.2")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (pypi-uri "ExifRead" version))
1636 (sha256
1637 (base32
1638 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1639 (build-system python-build-system)
1640 (arguments `(#:tests? #f)) ; no tests
1641 (home-page "https://github.com/ianare/exif-py")
1642 (synopsis "Python library to extract EXIF data from image files")
1643 (description
1644 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1645files.")
1646 (license license:bsd-3)))
1647
1648(define-public python2-exif-read
1649 (package-with-python2 python-exif-read))
1650
1651(define-public python-pyld
1652 (package
1653 (name "python-pyld")
1654 (version "1.0.3")
1655 (source (origin
1656 (method url-fetch)
1657 (uri (pypi-uri "PyLD" version))
1658 (sha256
1659 (base32
1660 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1661 (build-system python-build-system)
1662 (home-page "https://github.com/digitalbazaar/pyld")
1663 (synopsis "Python implementation of the JSON-LD specification")
1664 (description
1665 "PyLD is an implementation of the JSON-LD specification.")
1666 (license license:bsd-3)))
1667
1668(define-public python2-pyld
1669 (package-with-python2 python-pyld))
1670
1671(define-public python-click
1672 (package
1673 (name "python-click")
61984855 1674 (version "7.0")
44d10b1f
RW
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "click" version))
1679 (sha256
1680 (base32
61984855 1681 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1682 (build-system python-build-system)
1683 (arguments
8d7e7ca6 1684 `(#:phases
44d10b1f
RW
1685 (modify-phases %standard-phases
1686 (add-after 'unpack 'fix-paths
1687 (lambda* (#:key inputs #:allow-other-keys)
1688 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1689 "cross-libc" "libc"))))
1690 (substitute* "click/_unicodefun.py"
1691 (("'locale'")
1692 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1693 #t))
1694 (replace 'check
1695 (lambda _
1696 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1697 (native-inputs
1698 `(("python-pytest" ,python-pytest)))
61984855 1699 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1700 (synopsis "Command line library for Python")
1701 (description
1702 "Click is a Python package for creating command line interfaces in a
1703composable way with as little code as necessary. Its name stands for
1704\"Command Line Interface Creation Kit\". It's highly configurable but comes
1705with sensible defaults out of the box.")
1706 (license license:bsd-3)))
1707
1708(define-public python2-click
1709 (package-with-python2 python-click))
1710
1711(define-public python-wheel
1712 (package
1713 (name "python-wheel")
746c074b 1714 (version "0.32.3")
44d10b1f
RW
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (pypi-uri "wheel" version))
1719 (sha256
1720 (base32
746c074b 1721 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1722 (build-system python-build-system)
1723 (native-inputs
1724 `(("python-jsonschema" ,python-jsonschema)
1725 ("python-pytest-cov" ,python-pytest-cov)))
1726 (home-page "https://bitbucket.org/pypa/wheel/")
1727 (synopsis "Format for built Python packages")
1728 (description
1729 "A wheel is a ZIP-format archive with a specially formatted filename and
1730the @code{.whl} extension. It is designed to contain all the files for a PEP
1731376 compatible install in a way that is very close to the on-disk format. Many
1732packages will be properly installed with only the @code{Unpack} step and the
1733unpacked archive preserves enough information to @code{Spread} (copy data and
1734scripts to their final locations) at any later time. Wheel files can be
1735installed with a newer @code{pip} or with wheel's own command line utility.")
1736 (license license:expat)
1737 (properties `((python2-variant . ,(delay python2-wheel))))))
1738
1739(define-public python2-wheel
1740 (let ((wheel (package-with-python2
1741 (strip-python2-variant python-wheel))))
1742 (package (inherit wheel)
1743 (native-inputs `(("python2-functools32" ,python2-functools32)
1744 ,@(package-native-inputs wheel))))))
1745
1746(define-public python-vcversioner
1747 (package
1748 (name "python-vcversioner")
1749 (version "2.16.0.0")
1750 (source
1751 (origin
1752 (method url-fetch)
1753 (uri (pypi-uri "vcversioner" version))
1754 (sha256
1755 (base32
1756 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1757 (build-system python-build-system)
1758 (synopsis "Python library for version number discovery")
1759 (description "Vcversioner is a Python library that inspects tagging
1760information in a variety of version control systems in order to discover
1761version numbers.")
1762 (home-page "https://github.com/habnabit/vcversioner")
1763 (license license:isc)))
1764
1765(define-public python2-vcversioner
1766 (package-with-python2 python-vcversioner))
1767
1768(define-public python-jsonschema
1769 (package
1770 (name "python-jsonschema")
1771 (version "2.6.0")
1772 (source (origin
1773 (method url-fetch)
786ccb87 1774 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1775 (sha256
1776 (base32
1777 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1778 (build-system python-build-system)
1779 (arguments
1780 '(#:phases
1781 (modify-phases %standard-phases
8d466799 1782 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1783 (native-inputs
1784 `(("python-nose" ,python-nose)
1785 ("python-vcversioner" ,python-vcversioner)))
1786 (home-page "https://github.com/Julian/jsonschema")
1787 (synopsis "Implementation of JSON Schema for Python")
1788 (description
1789 "Jsonschema is an implementation of JSON Schema for Python.")
1790 (license license:expat)
1791 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1792
1793(define-public python2-jsonschema
1794 (let ((jsonschema (package-with-python2
1795 (strip-python2-variant python-jsonschema))))
1796 (package (inherit jsonschema)
1797 (native-inputs
1798 `(("python2-mock" ,python2-mock)
1799 ,@(package-native-inputs jsonschema)))
1800 (propagated-inputs
1801 `(("python2-functools32" ,python2-functools32))))))
1802
1803(define-public python-schema
1804 (package
1805 (name "python-schema")
1806 (version "0.6.6")
1807 (source
1808 (origin
1809 (method url-fetch)
1810 (uri (pypi-uri "schema" version))
1811 (sha256
1812 (base32
1813 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1814 (build-system python-build-system)
1815 (native-inputs
1816 `(("python-pytest" ,python-pytest)))
1817 (home-page "https://github.com/keleshev/schema")
1818 (synopsis "Simple data validation library")
1819 (description
1820 "@code{python-schema} is a library for validating Python data
1821structures, such as those obtained from config-files, forms, external
1822services or command-line parsing, converted from JSON/YAML (or
1823something else) to Python data-types.")
1824 (license license:psfl)))
1825
1826(define-public python2-schema
1827 (package-with-python2 python-schema))
1828
1829(define-public python-schema-0.5
1830 (package (inherit python-schema)
1831 (version "0.5.0")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "schema" version))
1836 (sha256
1837 (base32
1838 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1839
1840(define-public python2-schema-0.5
1841 (package-with-python2 python-schema-0.5))
1842
1843(define-public python-kitchen
1844 (package
1845 (name "python-kitchen")
1846 (version "1.2.5")
1847 (source
1848 (origin
1849 (method url-fetch)
1850 (uri (pypi-uri "kitchen" version))
1851 (sha256
1852 (base32
1853 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1854 (build-system python-build-system)
1855 (propagated-inputs
1856 `(("python-chardet" ,python-chardet)))
1857 (home-page "https://github.com/fedora-infra/kitchen")
1858 (synopsis "Python API for snippets")
1859 (description "@code{kitchen} module provides a python API for all sorts of
1860little useful snippets of code that everybody ends up writing for their projects
1861but never seem big enough to build an independent release. Use kitchen and stop
1862cutting and pasting that code over and over.")
1863 (license (list license:lgpl2.1+
1864 ;; subprocess.py, test_subprocess.py,
1865 ;; kitchen/pycompat25/defaultdict.py:
1866 license:psfl))))
1867
1868(define-public python2-kitchen
1869 (package-with-python2 python-kitchen))
1870
1871(define-public python-unidecode
1872 (package
1873 (name "python-unidecode")
1874 (version "1.0.23")
1875 (source (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "Unidecode" version))
1878 (sha256
1879 (base32
1880 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1881 (build-system python-build-system)
1882 (home-page "https://pypi.python.org/pypi/Unidecode")
1883 (synopsis "ASCII transliterations of Unicode text")
1884 (description
1885 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1886useful when integrating with legacy code that doesn't support Unicode, or for
1887ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1888machine identifiers from human-readable Unicode strings that should still be
1889somewhat intelligible.")
1890 (license license:gpl2+)))
1891
1892(define-public python2-unidecode
1893 (package-with-python2 python-unidecode))
1894
1895(define-public python-pyjwt
1896 (package
1897 (name "python-pyjwt")
1898 (version "1.5.3")
1899 (source
1900 (origin
1901 (method url-fetch)
1902 (uri (pypi-uri "PyJWT" version))
1903 (sha256
1904 (base32
1905 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1906 (modules '((guix build utils)))
1907 (snippet
1908 '(begin
1909 (for-each delete-file-recursively
1910 (find-files "." "\\.pyc$"))
1911 #t))))
1912 (build-system python-build-system)
1913 (native-inputs
1914 `(("python-pytest" ,python-pytest)
1915 ("python-pytest-cov" ,python-pytest-cov)
1916 ("python-pytest-runner" ,python-pytest-runner)))
1917 (home-page "https://github.com/progrium/pyjwt")
1918 (synopsis "JSON Web Token implementation in Python")
1919 (description
1920 "PyJWT is a JSON Web Token implementation written in Python.")
1921 (license license:expat)))
1922
1923(define-public python2-pyjwt
1924 (package-with-python2 python-pyjwt))
1925
1926(define-public python-pykka
1927 (package
1928 (name "python-pykka")
1929 (version "1.2.1")
1930 (source
1931 (origin
1932 (method url-fetch)
1933 (uri (pypi-uri "Pykka" version))
1934 (sha256
1935 (base32
1936 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1937 (build-system python-build-system)
1938 (native-inputs
1939 `(("python-mock" ,python-mock)
1940 ("python-nose" ,python-nose)
1941 ("python-gevent" ,python-gevent)
1942 ("python-eventlet" ,python-eventlet)))
1943 (home-page "https://www.pykka.org/")
1944 (synopsis "Pykka is a Python implementation of the actor model")
1945 (description
1946 "Pykka is a Python implementation of the actor model.
1947The actor model introduces some simple rules to control the sharing
1948of state and cooperation between execution units, which makes it
1949easier to build concurrent applications.")
1950 (license license:asl2.0)))
1951
1952(define-public python2-pykka
1953 (package-with-python2 python-pykka))
1954
8d22f7e3
VC
1955(define-public python-pymsgbox
1956 (package
1957 (name "python-pymsgbox")
1958 (version "1.0.6")
1959 (source
1960 (origin
1961 (method git-fetch)
1962 (uri (git-reference
1963 ;; LICENSE.txt is not present on pypi
1964 (url "https://github.com/asweigart/PyMsgBox")
1965 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1966 (file-name (git-file-name name version))
1967 (sha256
1968 (base32
1969 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1970 (arguments
1971 ;; Circular dependency to run tests:
1972 ;; Tests need pyautogui, which depends on pymsgbox.
1973 '(#:tests? #f))
1974 (build-system python-build-system)
1975 (home-page "https://github.com/asweigart/PyMsgBox")
1976 (synopsis "Python module for JavaScript-like message boxes")
1977 (description
1978 "PyMsgBox is a simple, cross-platform, pure Python module for
1979JavaScript-like message boxes. Types of dialog boxes include:
1980@enumerate
1981@item alert
1982@item confirm
1983@item prompt
1984@item password
1985@end enumerate
1986")
1987 (license license:bsd-3)))
1988
44d10b1f
RW
1989(define-public python-pympler
1990 (package
1991 (name "python-pympler")
1992 (home-page "https://pythonhosted.org/Pympler/")
ce1706b1 1993 (version "0.6")
44d10b1f
RW
1994 (source (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "Pympler" version))
1997 (sha256
1998 (base32
ce1706b1 1999 "19qkpaw5icwhb4c0f6ijqfmhwhj34k2k6s4m4fsvhrxc9p5cwqn2"))))
44d10b1f
RW
2000 (build-system python-build-system)
2001 (arguments
2002 `(#:phases (modify-phases %standard-phases
2003 (delete 'check)
2004 (add-after 'install 'check
2005 (lambda* (#:key inputs outputs #:allow-other-keys)
2006 (add-installed-pythonpath inputs outputs)
2007 (invoke "python" "setup.py" "test"))))))
2008 (synopsis "Measure, monitor and analyze memory behavior")
2009 (description
2010 "Pympler is a development tool to measure, monitor and analyze
2011the memory behavior of Python objects in a running Python application.
2012
2013By pympling a Python application, detailed insight in the size and the
2014lifetime of Python objects can be obtained. Undesirable or unexpected
2015runtime behavior like memory bloat and other @samp{pymples} can easily
2016be identified.
2017
2018A web profiling frontend exposes process statistics, garbage
2019visualisation and class tracker statistics.")
2020 (license license:asl2.0)))
2021
2022(define-public python2-pympler
2023 (package-with-python2 python-pympler))
2024
2025(define-public python-itsdangerous
2026 (package
2027 (name "python-itsdangerous")
acfcf2ed 2028 (version "1.1.0")
44d10b1f
RW
2029 (source
2030 (origin
2031 (method url-fetch)
acfcf2ed 2032 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2033 (sha256
2034 (base32
acfcf2ed 2035 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2036 (build-system python-build-system)
acfcf2ed 2037 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2038 (synopsis "Python library for passing data to/from untrusted environments")
2039 (description
2040 "Itsdangerous provides various helpers to pass trusted data to untrusted
2041environments and back.")
2042 (license license:bsd-3)))
2043
2044(define-public python2-itsdangerous
2045 (package-with-python2 python-itsdangerous))
2046
2047(define-public python-pyyaml
2048 (package
2049 (name "python-pyyaml")
2050 (version "3.13")
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (pypi-uri "PyYAML" version))
2055 (sha256
2056 (base32
2057 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2058 (build-system python-build-system)
2059 (inputs
2060 `(("libyaml" ,libyaml)))
2061 (home-page "http://pyyaml.org/wiki/PyYAML")
2062 (synopsis "YAML parser and emitter for Python")
2063 (description
2064 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2065complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2066API, and sensible error messages. PyYAML supports standard YAML tags and
2067provides Python-specific tags that allow to represent an arbitrary Python
2068object.")
2069 (license license:expat)))
2070
2071(define-public python2-pyyaml
2072 (package-with-python2 python-pyyaml))
2073
2074(define-public python-vine
2075 (package
2076 (name "python-vine")
2077 (version "1.1.4")
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri (pypi-uri "vine" version))
2082 (sha256
2083 (base32
2084 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2085 (build-system python-build-system)
2086 (native-inputs
2087 `(("python-pytest" ,python-pytest)
2088 ("python-case" ,python-case)))
2089 (home-page "https://github.com/celery/vine")
2090 (synopsis "Promises for Python")
2091 (description
2092 "@code{vine} provides a special implementation of promises in that it can
2093be used both for \"promise of a value\" and lazy evaluation. The biggest
2094upside for this is that everything in a promise can also be a promise,
2095e.g. filters, callbacks and errbacks can all be promises.")
2096 (license license:bsd-3)))
2097
2098(define-public python-virtualenv
2099 (package
2100 (name "python-virtualenv")
2782bd51 2101 (version "16.1.0")
44d10b1f
RW
2102 (source
2103 (origin
2104 (method url-fetch)
2105 (uri (pypi-uri "virtualenv" version))
2106 (sha256
2107 (base32
2782bd51 2108 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2109 (build-system python-build-system)
2110 (arguments
2111 `(#:phases
2112 (modify-phases %standard-phases
2782bd51 2113 (add-before 'check 'disable-failing-test
44d10b1f
RW
2114 (lambda _
2115 ;; Disable failing test. See upstream bug report
2116 ;; https://github.com/pypa/virtualenv/issues/957
2117 (substitute* "tests/test_virtualenv.py"
2118 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2119 #t)))))
44d10b1f
RW
2120 (native-inputs
2121 `(("python-mock" ,python-mock)
2122 ("python-pytest" ,python-pytest)))
2123 (home-page "https://virtualenv.pypa.io/")
2124 (synopsis "Virtual Python environment builder")
2125 (description
2126 "Virtualenv is a tool to create isolated Python environments.")
2127 (license license:expat)))
2128
2129(define-public python2-virtualenv
2130 (package-with-python2 python-virtualenv))
2131
2132(define-public python-markupsafe
2133 (package
2134 (name "python-markupsafe")
2135 (version "1.0")
2136 (source
2137 (origin
2138 (method url-fetch)
5182927c 2139 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2140 (sha256
2141 (base32
2142 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2143 (build-system python-build-system)
2144 (home-page "https://github.com/mitsuhiko/markupsafe")
2145 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2146 (description
2147 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2148for Python.")
2149 (license license:bsd-3)))
2150
2151(define-public python2-markupsafe
2152 (package-with-python2 python-markupsafe))
2153
2154(define-public python-jinja2
2155 (package
2156 (name "python-jinja2")
2157 (version "2.10")
2158 (source
2159 (origin
2160 (method url-fetch)
2161 (uri (pypi-uri "Jinja2" version))
2162 (sha256
2163 (base32
2164 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2165 (build-system python-build-system)
2166 (propagated-inputs
2167 `(("python-markupsafe" ,python-markupsafe)))
2168 (home-page "http://jinja.pocoo.org/")
2169 (synopsis "Python template engine")
2170 (description
2171 "Jinja2 is a small but fast and easy to use stand-alone template engine
2172written in pure Python.")
2173 (license license:bsd-3)))
2174
2175(define-public python2-jinja2
2176 (package-with-python2 python-jinja2))
2177
2178(define-public python-pystache
2179 (package
2180 (name "python-pystache")
2181 (version "0.5.4")
2182 (source (origin
2183 (method url-fetch)
2184 (uri (pypi-uri "pystache" version))
2185 (sha256
2186 (base32
2187 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2188 (build-system python-build-system)
2189 (arguments
2190 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2191 (home-page "http://defunkt.io/pystache/")
2192 (synopsis "Python logic-less template engine")
2193 (description
2194 "Pystache is a Python implementation of the framework agnostic,
2195logic-free templating system Mustache.")
2196 (license license:expat)
2197 (properties `((python2-variant . ,(delay python2-pystache))))))
2198
2199(define-public python2-pystache
2200 (package (inherit (package-with-python2
2201 (strip-python2-variant python-pystache)))
2202 (arguments
2203 `(#:python ,python-2
2204 #:phases
2205 (modify-phases %standard-phases
2206 (replace 'check
2207 (lambda _
dfafc29b 2208 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2209
2210(define-public python-joblib
2211 (package
2212 (name "python-joblib")
2213 (version "0.13.0")
2214 (source (origin
2215 (method url-fetch)
2216 (uri (pypi-uri "joblib" version))
2217 (sha256
2218 (base32
2219 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2220 (build-system python-build-system)
2221 (arguments
2222 `(#:phases
2223 (modify-phases %standard-phases
2224 (replace 'check
2225 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2226 (native-inputs
2227 `(("python-pytest" ,python-pytest)))
2228 (home-page "https://joblib.readthedocs.io/")
2229 (synopsis "Using Python functions as pipeline jobs")
2230 (description
2231 "Joblib is a set of tools to provide lightweight pipelining in Python.
2232In particular, joblib offers: transparent disk-caching of the output values
2233and lazy re-evaluation (memoize pattern), easy simple parallel computing
2234logging and tracing of the execution.")
2235 (license license:bsd-3)))
2236
2237(define-public python2-joblib
2238 (package-with-python2 python-joblib))
2239
a3363341
VC
2240(define-public python-daemon
2241 (package
2242 (name "python-daemon")
2243 (version "2.2.3")
2244 (source
2245 (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "python-daemon" version))
2248 (sha256
2249 (base32
2250 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2251 (build-system python-build-system)
2252 (arguments
2253 `(#:phases
2254 (modify-phases %standard-phases
2255 (add-before 'check 'disable-tests
2256 (lambda _
2257 ;; FIXME: Determine why test fails
2258 (substitute* "test/test_daemon.py"
2259 (("test_detaches_process_context")
2260 "skip_test_detaches_process_context"))
2261 #t)))))
2262 (propagated-inputs
2263 `(("python-lockfile" ,python-lockfile)))
2264 (native-inputs
2265 `(("python-unittest2" ,python-unittest2)
2266 ("python-testtools" ,python-testtools)
2267 ("python-testscenarios" ,python-testscenarios)
2268 ("python-mock" ,python-mock)
2269 ("python-docutils" ,python-docutils)))
2270 (home-page "https://pagure.io/python-daemon/")
2271 (synopsis "Python library for making a Unix daemon process")
2272 (description "Python-daemon is a library that assists a Python program to
2273turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2274
2275This library provides a @code{DaemonContext} class that manages the following
2276important tasks for becoming a daemon process:
2277@enumerate
2278@item Detach the process into its own process group.
2279@item Set process environment appropriate for running inside a chroot.
2280@item Renounce suid and sgid privileges.
2281@item Close all open file descriptors.
2282@item Change the working directory, uid, gid, and umask.
2283@item Set appropriate signal handlers.
2284@item Open new file descriptors for stdin, stdout, and stderr.
2285@item Manage a specified PID lock file.
2286@item Register cleanup functions for at-exit processing.
2287@end enumerate")
2288 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2289 (license (list license:asl2.0 license:gpl3+))))
2290
44d10b1f
RW
2291(define-public python-docutils
2292 (package
2293 (name "python-docutils")
2294 (version "0.14")
2295 (source
2296 (origin
2297 (method url-fetch)
2298 (uri (pypi-uri "docutils" version))
2299 (sha256
2300 (base32
2301 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2302 (build-system python-build-system)
2303 (arguments
2304 '(#:tests? #f)) ; no setup.py test command
2305 (home-page "http://docutils.sourceforge.net/")
2306 (synopsis "Python Documentation Utilities")
2307 (description
2308 "Docutils is a modular system for processing documentation into useful
2309formats, such as HTML, XML, and LaTeX. For input Docutils supports
2310reStructuredText.")
2311 ;; Most of the source code is public domain, but some source files are
2312 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2313 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2314
2315(define-public python2-docutils
2316 (package-with-python2 python-docutils))
2317
2318(define-public python-pygments
2319 (package
2320 (name "python-pygments")
2321 (version "2.2.0")
2322 (source
2323 (origin
2324 (method url-fetch)
2325 (uri (pypi-uri "Pygments" version))
2326 (sha256
2327 (base32
2328 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2329 (build-system python-build-system)
2330 (arguments
2331 ;; FIXME: Tests require sphinx, which depends on this.
2332 '(#:tests? #f))
2333 (home-page "http://pygments.org/")
2334 (synopsis "Syntax highlighting")
2335 (description
2336 "Pygments is a syntax highlighting package written in Python.")
2337 (license license:bsd-2)))
2338
2339(define-public python2-pygments
2340 (package-with-python2 python-pygments))
2341
2342(define-public python-sphinxcontrib-websupport
2343 (package
2344 (name "python-sphinxcontrib-websupport")
2345 (version "1.1.0")
2346 (source (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "sphinxcontrib-websupport" version))
2349 (sha256
2350 (base32
2351 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2352 (build-system python-build-system)
2353 (arguments
2354 ;; FIXME: Tests depend on Sphinx, which depends on this.
2355 `(#:tests? #f))
2356 (home-page "http://sphinx-doc.org/")
2357 (synopsis "Sphinx API for web applications")
2358 (description "This package provides a Python API to easily integrate
2359Sphinx documentation into your web application. It provides tools to
2360integrate Sphinx documents in web templates and to handle searches.")
2361 (license license:bsd-3)))
2362
2363(define-public python2-sphinxcontrib-websupport
2364 (package-with-python2 python-sphinxcontrib-websupport))
2365
2366(define-public python-sphinx
2367 (package
2368 (name "python-sphinx")
2369 (version "1.7.7")
2370 (source
2371 (origin
2372 (method url-fetch)
2373 (uri (pypi-uri "Sphinx" version))
2374 (sha256
2375 (base32
2376 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2377 (build-system python-build-system)
2378 (arguments
2379 `(#:phases
2380 (modify-phases %standard-phases
2381 (replace 'check
2382 (lambda _
2383 ;; Requires Internet access.
2384 (delete-file "tests/test_build_linkcheck.py")
2385 (substitute* "tests/test_build_latex.py"
2386 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2387 "@pytest.mark.skip()"))
2388 (when (which "python")
2389 ;; XXX: These tests are broken when using Python2:
2390 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2391 (delete-file "tests/test_api_translator.py")
2392 (delete-file "tests/test_setup_command.py"))
2393 (invoke "make" "test"))))))
2394 (propagated-inputs
2395 `(("python-imagesize" ,python-imagesize)
2396 ("python-sphinx-alabaster-theme"
2397 ,python-sphinx-alabaster-theme)
2398 ("python-babel" ,python-babel)
2399 ("python-snowballstemmer" ,python-snowballstemmer)
2400 ("python-docutils" ,python-docutils)
2401 ("python-jinja2" ,python-jinja2)
2402 ("python-packaging" ,python-packaging)
2403 ("python-pygments" ,python-pygments)
2404 ("python-requests" ,python-requests)
2405 ("python-six" ,python-six)
2406 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2407 (native-inputs
2408 `(("graphviz" ,graphviz)
2409 ("imagemagick" ,imagemagick) ;for "convert"
2410 ("python-html5lib" ,python-html5lib)
2411 ("python-mock" ,python-mock)
2412 ("python-nose" ,python-nose)
2413 ("python-pytest" ,python-pytest)))
2414 (home-page "http://sphinx-doc.org/")
2415 (synopsis "Python documentation generator")
2416 (description "Sphinx is a tool that makes it easy to create documentation
2417for Python projects or other documents consisting of multiple reStructuredText
2418sources.")
2419 (license license:bsd-3)
2420 (properties `((python2-variant . ,(delay python2-sphinx))))))
2421
2422(define-public python2-sphinx
2423 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2424 (package
2425 (inherit base)
2426 (native-inputs `(("python2-mock" ,python2-mock)
2427 ("python2-enum34" ,python2-enum34)
2428 ,@(package-native-inputs base)))
2429 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2430 ("python2-typing" ,python2-typing)
2431 ,@(package-propagated-inputs base))))))
2432
2433(define-public python-sphinx-gallery
2434 (package
2435 (name "python-sphinx-gallery")
2436 (version "0.1.13")
2437 (source (origin
2438 (method url-fetch)
2439 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2440 "/archive/v" version ".tar.gz"))
2441 (file-name (string-append name "-" version ".tar.gz"))
2442 (sha256
2443 (base32
2444 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2445 (build-system python-build-system)
2446 (arguments
2447 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2448 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2449 ;; <https://matplotlib.org/objects.inv>.
2450 `(#:tests? #f))
2451 (native-inputs
2452 `(("python-pytest-runner" ,python-pytest-runner)))
2453 (home-page "https://sphinx-gallery.github.io/")
2454 (synopsis "Generate an examples gallery automatically")
2455 (description
2456 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2457from any set of Python scripts and puts it into an examples gallery.")
2458 (license license:bsd-3)))
2459
2460(define-public python2-sphinx-gallery
2461 (package-with-python2 python-sphinx-gallery))
2462
2463(define-public python-sphinx-rtd-theme
2464 (package
2465 (name "python-sphinx-rtd-theme")
2466 (version "0.2.4")
2467 (source
2468 (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "sphinx_rtd_theme" version))
2471 (sha256
2472 (base32
2473 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2474 (build-system python-build-system)
2475 (arguments '(#:tests? #f)) ; No tests.
2476 (propagated-inputs
2477 `(("python-sphinx" ,python-sphinx)))
2478 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2479 (synopsis "ReadTheDocs.org theme for Sphinx")
2480 (description "A theme for Sphinx used by ReadTheDocs.org.")
2481 (license license:expat)))
2482
2483(define-public python2-sphinx-rtd-theme
2484 (package-with-python2 python-sphinx-rtd-theme))
2485
2486(define-public python-guzzle-sphinx-theme
2487 (package
2488 (name "python-guzzle-sphinx-theme")
2489 (version "0.7.11")
2490 (source
2491 (origin
2492 (method url-fetch)
2493 (uri (pypi-uri "guzzle_sphinx_theme" version))
2494 (sha256
2495 (base32
2496 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2497 (build-system python-build-system)
2498 (propagated-inputs
2499 `(("python-sphinx" ,python-sphinx)))
2500 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2501 (synopsis "Sphinx theme used by Guzzle")
2502 (description "This package provides guzzle_sphinx_theme, a theme for the
2503Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2504and several other projects.")
2505 (license license:expat)))
2506
2507(define-public python2-guzzle-sphinx-theme
2508 (package-with-python2 python-guzzle-sphinx-theme))
2509
2510(define-public python-rst.linker
2511 (package
2512 (name "python-rst.linker")
2513 (version "1.10")
2514 (source
2515 (origin
2516 (method url-fetch)
2517 (uri (pypi-uri "rst.linker" version))
2518 (sha256
2519 (base32
2520 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2521 (build-system python-build-system)
2522 (propagated-inputs
2523 `(("python-dateutil" ,python-dateutil)
2524 ("python-six" ,python-six)))
2525 (native-inputs
2526 `(("python-setuptools-scm" ,python-setuptools-scm)))
2527 ;; Test would require path.py, which would introduce a cyclic dependence.
2528 (arguments `(#:tests? #f))
2529 ;; Note: As of version 1.7 the documentation is not worth building.
2530 (home-page "https://github.com/jaraco/rst.linker")
2531 (synopsis "Sphinx plugin to add links and timestamps")
2532 (description "rst.linker allows to automatically replace text by a
2533reStructuredText external reference or timestamps. It's primary purpose is to
2534augment the changelog, but it can be used for other documents, too.")
2535 (license license:expat)))
2536
2537(define-public python2-rst.linker
2538 (package-with-python2 python-rst.linker))
2539
2540(define-public python-feedgenerator
2541 (package
2542 (name "python-feedgenerator")
2543 (version "1.9")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "feedgenerator" version))
2548 (sha256
2549 (base32
2550 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2551 (modules '((guix build utils)))
2552 (snippet
2553 '(begin
2554 ;; Remove pre-compiled .pyc files from source.
2555 (for-each delete-file-recursively
2556 (find-files "." "__pycache__" #:directories? #t))
2557 (for-each delete-file (find-files "." "\\.pyc$"))
2558 #t))))
2559 (build-system python-build-system)
2560 (propagated-inputs
2561 `(("python-pytz" ,python-pytz)
2562 ("python-six" ,python-six)))
2563 (home-page "https://github.com/getpelican/feedgenerator")
2564 (synopsis
2565 "Standalone version of Django's Atom/RSS feed generator")
2566 (description
2567 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2568which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2569 (license license:bsd-3)))
2570
2571(define-public python2-feedgenerator
2572 (package-with-python2 python-feedgenerator))
2573
2574(define-public python-toml
2575 (package
2576 (name "python-toml")
2577 (version "0.9.4")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "toml" version))
2582 (sha256
2583 (base32
2584 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2585 (build-system python-build-system)
2586 (arguments
2587 `(#:tests? #f)) ;no tests suite in release
2588 (home-page "https://github.com/uiri/toml")
2589 (synopsis "Library for TOML")
2590 (description
2591 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2592Language (TOML) configuration files.")
2593 (license license:expat)))
2594
346c8752
BG
2595(define-public python-jsonrpc-server
2596 (package
2597 (name "python-jsonrpc-server")
2598 (version "0.1.2")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "python-jsonrpc-server" version))
2603 (sha256
2604 (base32
2605 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2606 (build-system python-build-system)
2607 (propagated-inputs
2608 `(("python-future" ,python-future)
2609 ("python-mock" ,python-mock)
2610 ("python-pytest" ,python-pytest)))
2611 (home-page
2612 "https://github.com/palantir/python-jsonrpc-server")
2613 (synopsis "JSON RPC 2.0 server library")
2614 (description
2615 "This packages provides a JSON RPC 2.0 server library for Python.")
2616 (license license:expat)))
2617
56f4ad47
BG
2618(define-public python-pydocstyle
2619 (package
2620 (name "python-pydocstyle")
2621 (version "3.0.0")
2622 (source
2623 (origin
2624 (method url-fetch)
2625 (uri (pypi-uri "pydocstyle" version))
2626 (sha256
2627 (base32
2628 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2629 (build-system python-build-system)
2630 (propagated-inputs
2631 `(("python-six" ,python-six)
2632 ("python-snowballstemmer" ,python-snowballstemmer)))
2633 (home-page
2634 "https://github.com/PyCQA/pydocstyle/")
2635 (synopsis "Python docstring style checker")
2636 (description
2637 "This package provides a style checker for the Python Language
2638Server (PLS).")
2639 (license license:expat)))
2640
be4d840c
BG
2641(define-public python-language-server
2642 (package
2643 (name "python-language-server")
9c7226df 2644 (version "0.24.0")
be4d840c
BG
2645 (source
2646 (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "python-language-server" version))
2649 (sha256
2650 (base32
9c7226df 2651 "05zmv6jr7qbgnkz0lqh5pr7kr4lm12i8ljm2k5h5kz3q9m8d4mm0"))))
be4d840c
BG
2652 (build-system python-build-system)
2653 (propagated-inputs
2654 `(("python-pluggy" ,python-pluggy)
2655 ("python-jsonrpc-server" ,python-jsonrpc-server)
2656 ("python-jedi" ,python-jedi)
2657 ("python-yapf" ,python-yapf)
2658 ("python-pyflakes" ,python-pyflakes)
2659 ("python-pydocstyle" ,python-pydocstyle)
2660 ("python-pycodestyle" ,python-pycodestyle)
2661 ("python-mccabe" ,python-mccabe)
2662 ("python-rope" ,python-rope)
2663 ("python-autopep8" ,python-autopep8)))
2664 (home-page "https://github.com/palantir/python-language-server")
2665 (synopsis "Python implementation of the Language Server Protocol")
2666 (description
2667 "The Python Language Server (pyls) is an implementation of the Python 3
2668language specification for the Language Server Protocol (LSP). This tool is
2669used in text editing environments to provide a complete and integrated
2670feature-set for programming Python effectively.")
2671 (license license:expat)))
2672
44d10b1f
RW
2673(define-public python-black
2674 (package
2675 (name "python-black")
2676 (version "18.6b4")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (pypi-uri "black" version))
2681 (sha256
2682 (base32
2683 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2684 (build-system python-build-system)
2685 (arguments
2686 `(#:phases
2687 (modify-phases %standard-phases
2688 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2689 (lambda _
2690 (let ((python3 (which "python3")))
2691 (substitute* '("tests/data/fmtonoff.py"
2692 "tests/data/string_prefixes.py"
2693 "tests/data/function.py")
2694 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2695 (string-append "#!" python3 (if (string? minor-version)
2696 minor-version
2697 ""))))))))))
2698 (propagated-inputs
2699 `(("python-click" ,python-click)
2700 ("python-attrs" ,python-attrs)
2701 ("python-appdirs" ,python-appdirs)
2702 ("python-toml" ,python-toml)))
2703 (home-page "https://github.com/ambv/black")
2704 (synopsis "The uncompromising code formatter")
2705 (description "Black is the uncompromising Python code formatter.")
2706 (license license:expat)))
2707
2708(define-public python-blinker
2709 (package
2710 (name "python-blinker")
2711 (version "1.4")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "blinker" version))
2716 (sha256
2717 (base32
2718 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2719 (build-system python-build-system)
2720 (home-page "http://pythonhosted.org/blinker/")
2721 (synopsis "Fast, simple object-to-object and broadcast signaling")
2722 (description
2723 "Blinker provides a fast dispatching system that allows any number of
2724interested parties to subscribe to events, or \"signals\".")
2725 (license license:expat)))
2726
2727(define-public python2-blinker
2728 (package-with-python2 python-blinker))
2729
2730(define-public pelican
2731 (package
2732 (name "pelican")
aa71b690 2733 (version "4.0.1")
44d10b1f
RW
2734 (source
2735 (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "pelican" version))
2738 (sha256
2739 (base32
aa71b690 2740 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2741 (build-system python-build-system)
2742 (propagated-inputs
2743 `(("python-feedgenerator" ,python-feedgenerator)
2744 ("python-jinja2" ,python-jinja2)
2745 ("python-pygments" ,python-pygments)
2746 ("python-docutils" ,python-docutils)
2747 ("python-pytz" ,python-pytz)
2748 ("python-blinker" ,python-blinker)
2749 ("python-unidecode" ,python-unidecode)
2750 ("python-six" ,python-six)
2751 ("python-dateutil" ,python-dateutil)
2752 ("python-markdown" ,python-markdown)))
2753 (home-page "https://getpelican.com/")
2754 (arguments
2755 `(;; XXX Requires a lot more packages to do unit tests :P
2756 #:tests? #f
2757 #:phases (modify-phases %standard-phases
2758 (add-before
2759 'install 'adjust-requires
2760 ;; Since feedgenerator is installed from git, it doesn't
2761 ;; conform to the version requirements.
2762 ;;
2763 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2764 ;; version requirement so setuptools doesn't get confused.
2765 (lambda _
2766 (substitute* "setup.py"
2767 (("['\"]feedgenerator.*?['\"]")
2768 "'feedgenerator'")))))))
2769 (synopsis "Python-based static site publishing system")
2770 (description
2771 "Pelican is a tool to generate a static blog from reStructuredText,
2772Markdown input files, and more. Pelican uses Jinja2 for templating
2773and is very extensible.")
2774 (license license:agpl3+)))
2775
2776(define-public python-scikit-image
2777 (package
2778 (name "python-scikit-image")
9ff04084 2779 (version "0.14.2")
44d10b1f
RW
2780 (source
2781 (origin
2782 (method url-fetch)
2783 (uri (pypi-uri "scikit-image" version))
2784 (sha256
9ff04084 2785 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2786 (build-system python-build-system)
2787 (arguments
2788 ;; TODO: Some tests require running X11 server. Disable them?
2789 '(#:tests? #f))
2790 ;; See DEPENDS.txt for the list of build and run time requiremnts
2791 (propagated-inputs
2792 `(("python-cloudpickle" ,python-cloudpickle)
2793 ("python-dask" ,python-dask)
2794 ("python-matplotlib" ,python-matplotlib)
2795 ("python-networkx" ,python-networkx)
2796 ("python-numpy" ,python-numpy)
2797 ("python-pillow" ,python-pillow)
2798 ("python-pywavelets" ,python-pywavelets)
2799 ("python-scipy" ,python-scipy)
2800 ("python-six" ,python-six)))
2801 (native-inputs
2802 `(("python-cython" ,python-cython)))
2803 (home-page "http://scikit-image.org/")
2804 (synopsis "Image processing in Python")
2805 (description
2806 "Scikit-image is a collection of algorithms for image processing.")
2807 (license license:bsd-3)))
2808
2809(define-public python2-scikit-image
2810 (package-with-python2 python-scikit-image))
2811
2812(define-public python-cython
2813 (package
2814 (name "python-cython")
c6a2fd24 2815 (version "0.29.6")
44d10b1f
RW
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "Cython" version))
2820 (sha256
2821 (base32
c6a2fd24 2822 "1bp7cn0pp5qy63k9hbp4ka34fm01kvysh478phpkhr68npqk6pbc"))))
44d10b1f
RW
2823 (build-system python-build-system)
2824 ;; we need the full python package and not just the python-wrapper
2825 ;; because we need libpython3.3m.so
2826 (inputs
2827 `(("python" ,python)))
2828 (arguments
2829 `(#:phases
2830 (modify-phases %standard-phases
2831 (add-before 'check 'set-HOME
2832 ;; some tests require access to "$HOME/.cython"
2833 (lambda _ (setenv "HOME" "/tmp") #t))
2834
2835 ;; FIXME: These tests started failing on armhf after the 0.28 update
2836 ;; (commit c69d11c5930), both with an error such as this:
2837 ;; compiling (cpp) and running dictcomp ...
2838 ;; === C/C++ compiler error output: ===
2839 ;; ‘
2840 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2841 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2842 ,@(if (target-arm32?)
2843 `((add-before 'check 'disable-failing-tests
2844 (lambda _
2845 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2846 (for-each (lambda (test)
2847 (format disabled-tests "~a\n" test))
2848 '("memslice" "dictcomp"))
2849 (close-port disabled-tests)))))
2850 '())
2851
2852 (replace 'check
2853 (lambda _
44d10b1f
RW
2854 (invoke "python" "runtests.py" "-vv"))))))
2855 (home-page "http://cython.org/")
2856 (synopsis "C extensions for Python")
2857 (description "Cython is an optimising static compiler for both the Python
2858programming language and the extended Cython programming language. It makes
2859writing C extensions for Python as easy as Python itself.")
2860 (license license:asl2.0)
2861 (properties `((python2-variant . ,(delay python2-cython))))))
2862
2863(define-public python2-cython
2864 (package (inherit (package-with-python2
2865 (strip-python2-variant python-cython)))
2866 (name "python2-cython")
2867 (inputs
2868 `(("python-2" ,python-2))))) ; this is not automatically changed
2869
2870;; The RPython toolchain currently does not support Python 3.
2871(define-public python2-rpython
2872 (package
2873 (name "python2-rpython")
2874 (version "0.2.1")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (pypi-uri "rpython" version))
2879 (sha256
2880 (base32
2881 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2882 (build-system python-build-system)
2883 (arguments `(#:python ,python-2))
2884 (native-inputs
2885 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2886 (home-page "https://rpython.readthedocs.org")
2887 (synopsis "Framework for implementing interpreters and virtual machines")
2888 (description "RPython is a translation and support framework for
2889producing implementations of dynamic languages, emphasizing a clean separation
2890between language specification and implementation aspects.")
2891 (license license:expat)))
2892
2893;; NOTE: when upgrading numpy please make sure that python-pandas and
2894;; python-scipy still build, as these three packages are often used together.
2895(define-public python-numpy
2896 (package
2897 (name "python-numpy")
2898 (version "1.15.4")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (string-append
2903 "https://github.com/numpy/numpy/releases/download/v"
2904 version "/numpy-" version ".tar.gz"))
2905 (sha256
2906 (base32
2907 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2908 (build-system python-build-system)
2909 (inputs
2910 `(("openblas" ,openblas)
2911 ("lapack" ,lapack)))
2912 (native-inputs
2913 `(("python-cython" ,python-cython)
2914 ("python-pytest" ,python-pytest)
2915 ("gfortran" ,gfortran)))
2916 (arguments
2917 `(#:phases
2918 (modify-phases %standard-phases
2919 (add-before 'build 'configure-blas-lapack
2920 (lambda* (#:key inputs #:allow-other-keys)
2921 (call-with-output-file "site.cfg"
2922 (lambda (port)
2923 (format port
2924 "[openblas]
2925libraries = openblas
2926library_dirs = ~a/lib
2927include_dirs = ~a/include
2928
2929# backslash-n to make emacs happy
2930\n[lapack]
2931lapack_libs = lapack
2932library_dirs = ~a/lib
2933include_dirs = ~a/include
2934"
2935 (assoc-ref inputs "openblas")
2936 (assoc-ref inputs "openblas")
2937 (assoc-ref inputs "lapack")
2938 (assoc-ref inputs "lapack"))))
2939 #t))
2940 (add-before 'build 'fix-executable-paths
2941 (lambda* (#:key inputs #:allow-other-keys)
2942 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2943 ;; instead of /bin/sh.
2944 (substitute* "numpy/distutils/exec_command.py"
2945 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2946 (string-append match-start (assoc-ref inputs "bash") match-end)))
2947 ;; Use "gcc" executable, not "cc".
2948 (substitute* "numpy/distutils/system_info.py"
2949 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2950 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2951 #t))
2952 ;; Tests can only be run after the library has been installed and not
2953 ;; within the source directory.
2954 (delete 'check)
2955 (add-after 'install 'check
2956 (lambda* (#:key outputs inputs #:allow-other-keys)
2957 ;; Make installed package available for running the tests
2958 (add-installed-pythonpath inputs outputs)
2959 ;; Make sure "f2py" etc is found.
2960 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2961 ":" (getenv "PATH")))
2962 (with-directory-excursion "/tmp"
2963 (invoke "python" "-c"
2964 "import numpy; numpy.test(verbose=2)")))))))
2965 (home-page "http://www.numpy.org/")
2966 (synopsis "Fundamental package for scientific computing with Python")
2967 (description "NumPy is the fundamental package for scientific computing
2968with Python. It contains among other things: a powerful N-dimensional array
2969object, sophisticated (broadcasting) functions, tools for integrating C/C++
2970and Fortran code, useful linear algebra, Fourier transform, and random number
2971capabilities.")
2972 (license license:bsd-3)))
2973
2974(define-public python2-numpy
2975 (package-with-python2 python-numpy))
2976
2977;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2978;; interest only for legacy code going back to NumPy's predecessor
2979;; Numeric.
2980(define-public python2-numpy-1.8
2981 (package (inherit python2-numpy)
2982 (version "1.8.2")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 (uri (string-append
2987 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2988 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2989 (sha256
2990 (base32
2991 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2992 (arguments
2993 (substitute-keyword-arguments (package-arguments python2-numpy)
2994 ((#:phases phases)
2995 `(modify-phases ,phases
2996 (replace 'configure-blas-lapack
2997 (lambda* (#:key inputs #:allow-other-keys)
2998 (call-with-output-file "site.cfg"
2999 (lambda (port)
3000 (format port
3001 "[openblas]
3002libraries = openblas,lapack
3003library_dirs = ~a/lib:~a/lib
3004include_dirs = ~a/include:~a/include
3005"
3006 (assoc-ref inputs "openblas")
3007 (assoc-ref inputs "lapack")
3008 (assoc-ref inputs "openblas")
3009 (assoc-ref inputs "lapack"))))
3010 #t))))))
3011 (native-inputs
3012 `(("python2-nose" ,python2-nose)))
3013 (description "NumPy is the fundamental package for scientific computing
3014with Python. It contains among other things: a powerful N-dimensional array
3015object, sophisticated (broadcasting) functions, tools for integrating C/C++
3016and Fortran code, useful linear algebra, Fourier transform, and random number
3017capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3018that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3019Numeric.")
3020 (license license:bsd-3)))
3021
3022(define-public python-munch
3023 (package
3024 (name "python-munch")
3025 (version "2.0.4")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "munch" version))
3030 (sha256
3031 (base32
3032 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3033 (build-system python-build-system)
3034 (home-page "https://github.com/Infinidat/munch")
3035 (synopsis "Dot-accessible dictionary")
3036 (description "Munch is a dot-accessible dictionary similar to JavaScript
3037objects.")
3038 (license license:expat)))
3039
3040(define-public python2-munch
3041 (package-with-python2 python-munch))
3042
3043(define-public python-colormath
3044 (package
3045 (name "python-colormath")
3046 (version "3.0.0")
3047 (source
3048 (origin
3049 (method url-fetch)
3050 (uri (pypi-uri "colormath" version))
3051 (sha256
3052 (base32
3053 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3054 (build-system python-build-system)
3055 (propagated-inputs
3056 `(("python-networkx" ,python-networkx)
3057 ("python-numpy" ,python-numpy)))
3058 (home-page "https://github.com/gtaylor/python-colormath")
3059 (synopsis "Color math and conversion library")
3060 (description
3061 "This is a Python library for color math and conversions.")
3062 (license license:bsd-3)))
3063
3064(define-public python2-colormath
3065 (package-with-python2 python-colormath))
3066
3067(define-public python-spectra
3068 (package
3069 (name "python-spectra")
3070 (version "0.0.11")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (pypi-uri "spectra" version))
3075 (sha256
3076 (base32
3077 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3078 (build-system python-build-system)
3079 (arguments
3080 `(#:phases
3081 (modify-phases %standard-phases
3082 (replace 'check
38ec0f6a 3083 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3084 (propagated-inputs
3085 `(("python-colormath" ,python-colormath)))
3086 (native-inputs
3087 `(("python-nose" ,python-nose)))
3088 (home-page "https://github.com/jsvine/spectra")
3089 (synopsis "Color scales and color conversion")
3090 (description
3091 "This package provides a Python library intended to make color math,
3092color scales, and color space conversion easy. It has support for:
3093
3094@enumerate
3095@item Color scales
3096@item Color ranges
3097@item Color blending
3098@item Brightening/darkening colors
3099@item Saturating/desaturating colors
3100@item Conversion to/from multiple color spaces.
3101@end enumerate\n")
3102 (license license:expat)))
3103
3104(define-public python2-spectra
3105 (package-with-python2 python-spectra))
3106
3107(define-public python-numpy-documentation
3108 (package
3109 (name "python-numpy-documentation")
3110 (version (package-version python-numpy))
3111 (source (package-source python-numpy))
3112 (build-system python-build-system)
3113 (native-inputs
3114 `(("python-matplotlib" ,python-matplotlib)
3115 ("python-numpy" ,python-numpy)
3116 ("pkg-config" ,pkg-config)
3117 ("python-sphinx" ,python-sphinx)
3118 ("python-numpydoc" ,python-numpydoc)
3119 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3120 texlive-fonts-cm-super
3121 texlive-fonts-ec
3122 texlive-generic-ifxetex
3123 texlive-generic-pdftex
3124 texlive-latex-amsfonts
3125 texlive-latex-capt-of
3126 texlive-latex-cmap
3127 texlive-latex-environ
3128 texlive-latex-eqparbox
3129 texlive-latex-etoolbox
3130 texlive-latex-expdlist
3131 texlive-latex-fancyhdr
3132 texlive-latex-fancyvrb
3133 texlive-latex-fncychap
3134 texlive-latex-float
3135 texlive-latex-framed
3136 texlive-latex-geometry
3137 texlive-latex-graphics
3138 texlive-latex-hyperref
3139 texlive-latex-mdwtools
3140 texlive-latex-multirow
3141 texlive-latex-needspace
3142 texlive-latex-oberdiek
3143 texlive-latex-parskip
3144 texlive-latex-preview
3145 texlive-latex-tabulary
3146 texlive-latex-threeparttable
3147 texlive-latex-titlesec
3148 texlive-latex-trimspaces
3149 texlive-latex-ucs
3150 texlive-latex-upquote
3151 texlive-latex-url
3152 texlive-latex-varwidth
3153 texlive-latex-wrapfig)))
3154 ("texinfo" ,texinfo)
3155 ("perl" ,perl)
3156 ("scipy-sphinx-theme"
3157 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3158 (method git-fetch)
3159 (uri (git-reference
3160 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3161 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3162 (sha256
3163 (base32
3164 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3165 ,@(package-native-inputs python-numpy)))
3166 (arguments
3167 `(#:tests? #f ; we're only generating the documentation
3168 #:phases
3169 (modify-phases %standard-phases
3170 (delete 'build)
3171 (replace 'install
3172 (lambda* (#:key inputs outputs #:allow-other-keys)
3173 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3174 (doc (string-append
3175 data "/doc/" ,name "-"
3176 ,(package-version python-numpy)))
3177 (info-reader (string-append data "/info"))
3178 (html (string-append doc "/html"))
3179 (scipy-sphinx-theme "scipy-sphinx-theme")
3180 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3181 (pyver ,(string-append "PYVER=")))
3182
3183 ;; FIXME: this is needed to for texlive-union to generate
3184 ;; fonts, which are not found.
3185 (setenv "HOME" "/tmp")
3186
3187 (with-directory-excursion "doc"
3188 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3189 (mkdir-p html)
4fc898da
RW
3190 (invoke "make" "html" pyver)
3191 (invoke "make" "latex" "PAPER=a4" pyver)
3192 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3193 "all-pdf" "PAPER=a4" pyver)
3194 ;; FIXME: Generation of the info file fails.
4fc898da 3195 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3196 ;; (mkdir-p info)
3197 ;; (copy-file "build/texinfo/numpy.info"
3198 ;; (string-append info "/numpy.info"))
3199 (for-each (lambda (file)
3200 (copy-file (string-append "build/latex" file)
3201 (string-append doc file)))
3202 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3203 (with-directory-excursion "build/html"
3204 (for-each (lambda (file)
3205 (let* ((dir (dirname file))
3206 (tgt-dir (string-append html "/" dir)))
3207 (unless (equal? "." dir)
3208 (mkdir-p tgt-dir))
3209 (install-file file html)))
3210 (find-files "." ".*")))))
3211 #t)))))
3212 (home-page (package-home-page python-numpy))
3213 (synopsis "Documentation for the python-numpy package")
3214 (description (package-description python-numpy))
3215 (license (package-license python-numpy))))
3216
3217(define-public python2-numpy-documentation
3218 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3219 (package
3220 (inherit numpy-documentation)
3221 (native-inputs `(("python2-functools32" ,python2-functools32)
3222 ,@(package-native-inputs numpy-documentation))))))
3223
3224(define-public python-pygit2
3225 (package
3226 (name "python-pygit2")
3227 (version "0.27.3")
3228 (source
3229 (origin
3230 (method url-fetch)
3231 (uri (pypi-uri "pygit2" version))
3232 (sha256
3233 (base32
3234 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3235 (build-system python-build-system)
3236 (arguments
3237 '(#:phases
3238 (modify-phases %standard-phases
3239 ;; Remove after the next update. See:
3240 ;; https://github.com/libgit2/pygit2/pull/851
3241 (add-after 'unpack 'compile-with-cffi
3242 (lambda _
3243 (substitute* "setup.py"
3244 (("install_requires")
3245 "setup_requires=['cffi'],\n install_requires"))
3246 #t))
3247 (add-after 'unpack 'fix-dependency-versioning
3248 (lambda _
3249 (substitute* "setup.py"
3250 (("<") "<="))
3251 #t)))))
3252 (propagated-inputs
3253 `(("python-six" ,python-six)
3254 ("python-cffi" ,python-cffi)
3255 ("libgit2" ,libgit2)
3256 ("python-tox" ,python-tox)))
3257 (native-inputs
3258 `(("python-pytest" ,python-pytest)))
3259 (home-page "https://github.com/libgit2/pygit2")
3260 (synopsis "Python bindings for libgit2")
3261 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3262library, libgit2 implements Git plumbing.")
3263 ;; GPL2.0 only, with linking exception.
3264 (license license:gpl2)))
3265
3266(define-public python2-pygit2
3267 (package-with-python2 python-pygit2))
3268
3269(define-public python-pyparsing
3270 (package
3271 (name "python-pyparsing")
6d3cff5a 3272 (version "2.3.1")
44d10b1f
RW
3273 (source
3274 (origin
3275 (method url-fetch)
3276 (uri (pypi-uri "pyparsing" version))
3277 (sha256
6d3cff5a 3278 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3279 (build-system python-build-system)
3280 (outputs '("out" "doc"))
3281 (arguments
3282 `(#:tests? #f ; no test target
3283 #:phases
3284 (modify-phases %standard-phases
3285 (add-after 'install 'install-doc
3286 (lambda* (#:key outputs #:allow-other-keys)
3287 (let* ((doc (string-append (assoc-ref outputs "doc")
3288 "/share/doc/" ,name "-" ,version))
3289 (html-doc (string-append doc "/html"))
3290 (examples (string-append doc "/examples")))
3291 (mkdir-p html-doc)
3292 (mkdir-p examples)
3293 (for-each
3294 (lambda (dir tgt)
3295 (map (lambda (file)
3296 (install-file file tgt))
3297 (find-files dir ".*")))
3298 (list "docs" "htmldoc" "examples")
3299 (list doc html-doc examples))
3300 #t))))))
3301 (home-page "https://github.com/pyparsing/pyparsing")
3302 (synopsis "Python parsing class library")
3303 (description
3304 "The pyparsing module is an alternative approach to creating and
3305executing simple grammars, vs. the traditional lex/yacc approach, or the use
3306of regular expressions. The pyparsing module provides a library of classes
3307that client code uses to construct the grammar directly in Python code.")
3308 (license license:expat)))
3309
3310(define-public python2-pyparsing
3311 (package-with-python2 python-pyparsing))
3312
3313(define-public python-numpydoc
3314 (package
3315 (name "python-numpydoc")
3316 (version "0.8.0")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (pypi-uri "numpydoc" version))
3321 (sha256
3322 (base32
3323 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3324 (build-system python-build-system)
3325 (propagated-inputs
3326 `(("python-sphinx" ,python-sphinx)))
3327 (native-inputs
3328 `(("python-nose" ,python-nose)))
3329 (home-page "https://pypi.python.org/pypi/numpydoc")
3330 (synopsis
3331 "Numpy's Sphinx extensions")
3332 (description
3333 "Sphinx extension to support docstrings in Numpy format.")
3334 (license license:bsd-2)))
3335
3336(define-public python2-numpydoc
3337 (package-with-python2 python-numpydoc))
3338
3339(define-public python-numexpr
3340 (package
3341 (name "python-numexpr")
3342 (version "2.6.5")
3343 (source
3344 (origin
3345 (method url-fetch)
3346 (uri (pypi-uri "numexpr" version))
3347 (sha256
3348 (base32
3349 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3350 (build-system python-build-system)
3351 (arguments `(#:tests? #f)) ; no tests included
3352 (propagated-inputs
3353 `(("python-numpy" ,python-numpy)))
3354 (home-page "https://github.com/pydata/numexpr")
3355 (synopsis "Fast numerical expression evaluator for NumPy")
3356 (description
3357 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3358expressions that operate on arrays are accelerated and use less memory than
3359doing the same calculation in Python. In addition, its multi-threaded
3360capabilities can make use of all your cores, which may accelerate
3361computations, most specially if they are not memory-bounded (e.g. those using
3362transcendental functions).")
3363 (license license:expat)))
3364
3365(define-public python2-numexpr
3366 (package-with-python2 python-numexpr))
3367
3368(define-public python-cycler
3369 (package
3370 (name "python-cycler")
3371 (version "0.10.0")
3372 (source (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "cycler" version))
3375 (sha256
3376 (base32
3377 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3378 (build-system python-build-system)
3379 (arguments
3380 ;; XXX: The current version requires 'coveralls' which we don't have.
3381 ;; Enable this for the next release which uses 'python-pytest'.
3382 '(#:tests? #f))
3383 (propagated-inputs
3384 `(("python-six" ,python-six)))
3385 (home-page "http://matplotlib.org/cycler/")
3386 (synopsis "Composable keyword argument iterator")
3387 (description
3388 "When using @code{matplotlib} and plotting more than one line, it is
3389common to want to be able to want to be able to cycle over one or more artist
3390styles; but the plotting logic can quickly become involved.
3391To address this and enable easy cycling over arbitrary @code{kwargs}, the
3392@code{Cycler} class was developed.")
3393 (license license:bsd-3)))
3394
3395(define-public python2-cycler
3396 (package-with-python2 python-cycler))
3397
3398(define-public python-colorspacious
3399 (package
3400 (name "python-colorspacious")
3401 (version "1.1.0")
3402 (source
3403 (origin
3404 (method url-fetch)
3405 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3406 version ".tar.gz"))
3407 (file-name (string-append name "-" version))
3408 (sha256
3409 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3410 (build-system python-build-system)
3411 (propagated-inputs
3412 `(("python-numpy" ,python-numpy)))
3413 (native-inputs
3414 `(("python-nose" ,python-nose)))
3415 (arguments
3416 `(#:phases
3417 (modify-phases %standard-phases
3418 (replace 'check
3419 (lambda _
c988afda 3420 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3421 (home-page "https://github.com/njsmith/colorspacious")
3422 (synopsis "Python library for colorspace conversions")
3423 (description "@code{colorspacious} is a Python library that lets you
3424convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3425 (license license:expat)))
3426
3427(define-public python2-colorspacious
3428 (package-with-python2 python-colorspacious))
3429
3430(define-public python-matplotlib
3431 (package
3432 (name "python-matplotlib")
3433 (version "2.2.3")
3434 (source
3435 (origin
3436 (method url-fetch)
3437 (uri (pypi-uri "matplotlib" version))
3438 (sha256
3439 (base32
3440 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3441 (build-system python-build-system)
3442 (propagated-inputs ; the following packages are all needed at run time
3443 `(("python-cycler" ,python-cycler)
3444 ("python-kiwisolver" ,python-kiwisolver)
3445 ("python-pyparsing" ,python-pyparsing)
3446 ("python-pygobject" ,python-pygobject)
3447 ("gobject-introspection" ,gobject-introspection)
3448 ("python-tkinter" ,python "tk")
3449 ("python-dateutil" ,python-dateutil)
3450 ("python-numpy" ,python-numpy)
3451 ("python-pillow" ,python-pillow)
3452 ("python-pytz" ,python-pytz)
3453 ("python-six" ,python-six)
3454 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3455 ;; from 'gtk+') provides the required 'typelib' files used by
3456 ;; 'gobject-introspection'. The location of these files is set with the
3457 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3458 ;; is done automatically by a 'native-search-path' procedure. However,
3459 ;; at run-time the user must set this variable as follows:
3460 ;;
3461 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3462 ("gtk+" ,gtk+)
3463 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3464 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3465 ;; object. For this reason we need to import both libraries.
3466 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3467 ("python-pycairo" ,python-pycairo)
3468 ;; XXX: qtwebkit cannot be built reliably.
3469 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3470 ("python-cairocffi" ,python-cairocffi)))
3471 (inputs
3472 `(("libpng" ,libpng)
3473 ("imagemagick" ,imagemagick)
3474 ("freetype" ,freetype)
3475 ("cairo" ,cairo)
3476 ("glib" ,glib)
3477 ;; FIXME: Add backends when available.
3478 ;("python-wxpython" ,python-wxpython)
3479 ("tcl" ,tcl)
3480 ("tk" ,tk)))
3481 (native-inputs
3482 `(("pkg-config" ,pkg-config)
3483 ("python-nose" ,python-nose)
3484 ("python-mock" ,python-mock)))
3485 (arguments
3486 `(#:phases
3487 (modify-phases %standard-phases
3488 (add-before 'build 'configure-environment
3489 (lambda* (#:key outputs inputs #:allow-other-keys)
3490 (let ((cairo (assoc-ref inputs "cairo"))
3491 (gtk+ (assoc-ref inputs "gtk+")))
3492 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3493 ;; has not effect.
3494 (setenv "LD_LIBRARY_PATH"
3495 (string-append cairo "/lib:" gtk+ "/lib"))
3496 (setenv "HOME" (getcwd))
3497 (call-with-output-file "setup.cfg"
3498 (lambda (port)
3499 (format port "[directories]~%
3500basedirlist = ~a,~a~%
3501 [rc_options]~%
3502backend = TkAgg~%"
3503 (assoc-ref inputs "tcl")
3504 (assoc-ref inputs "tk")))))
3505 #t)))))
3506 (home-page "http://matplotlib.org")
3507 (synopsis "2D plotting library for Python")
3508 (description
3509 "Matplotlib is a Python 2D plotting library which produces publication
3510quality figures in a variety of hardcopy formats and interactive environments
3511across platforms. Matplotlib can be used in Python scripts, the python and
3512ipython shell, web application servers, and six graphical user interface
3513toolkits.")
3514 (license license:psfl)
3515 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3516
3517(define-public python2-matplotlib
3518 (let ((matplotlib (package-with-python2
3519 (strip-python2-variant python-matplotlib))))
3520 (package (inherit matplotlib)
3521 ;; Make sure to use special packages for Python 2 instead
3522 ;; of those automatically rewritten by package-with-python2.
3523 (propagated-inputs
3524 `(("python2-pycairo" ,python2-pycairo)
3525 ("python2-backports-functools-lru-cache"
3526 ,python2-backports-functools-lru-cache)
3527 ("python2-functools32" ,python2-functools32)
3528 ("python2-pygobject-2" ,python2-pygobject-2)
3529 ("python2-subprocess32" ,python2-subprocess32)
3530 ("python2-tkinter" ,python-2 "tk")
3531 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3532 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3533
3534(define-public python-matplotlib-documentation
3535 (package
3536 (name "python-matplotlib-documentation")
3537 (version (package-version python-matplotlib))
3538 (source (package-source python-matplotlib))
3539 (build-system python-build-system)
3540 (native-inputs
3541 `(("python-matplotlib" ,python-matplotlib)
3542 ("python-colorspacious" ,python-colorspacious)
3543 ("python-sphinx" ,python-sphinx)
3544 ("python-sphinx-gallery" ,python-sphinx-gallery)
3545 ("python-numpydoc" ,python-numpydoc)
3546 ("python-ipython" ,python-ipython)
e7a53914 3547 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3548 ("python-mock" ,python-mock)
3549 ("graphviz" ,graphviz)
e7a53914
RW
3550 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3551 texlive-latex-amsmath
3552 texlive-latex-enumitem
3553 texlive-latex-expdlist
3554 texlive-latex-geometry
3555 texlive-latex-preview
3556 texlive-latex-type1cm
3557 texlive-latex-ucs
3558
3559 texlive-generic-pdftex
3560
3561 texlive-fonts-amsfonts
3562 texlive-fonts-ec
3563 texlive-fonts-adobe-times
3564 texlive-fonts-txfonts)))
44d10b1f
RW
3565 ("texinfo" ,texinfo)
3566 ,@(package-native-inputs python-matplotlib)))
3567 (arguments
3568 `(#:tests? #f ; we're only generating documentation
3569 #:phases
3570 (modify-phases %standard-phases
3571 (replace 'build
3572 (lambda _
3573 (chdir "doc")
e7a53914
RW
3574 (setenv "PYTHONPATH"
3575 (string-append (getenv "PYTHONPATH")
3576 ":" (getcwd) "/../examples/units"))
44d10b1f 3577 (substitute* "conf.py"
e7a53914
RW
3578 ;; Don't use git.
3579 (("^SHA = check_output.*")
3580 (string-append "SHA = \"" ,version "\"\n"))
3581 ;; Don't fetch intersphinx files from the Internet
3582 (("^explicit_order_folders" m)
3583 (string-append "intersphinx_mapping = {}\n" m))
3584 (("'sphinx.ext.intersphinx',") "")
3585 ;; Disable URL embedding which requires internet access.
3586 (("'https://docs.scipy.org/doc/numpy'") "None")
3587 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3588 (invoke "make"
3589 "SPHINXBUILD=sphinx-build"
3590 "SPHINXOPTS=" ; don't abort on warnings
3591 "html" "texinfo")))
44d10b1f
RW
3592 (replace 'install
3593 (lambda* (#:key inputs outputs #:allow-other-keys)
3594 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3595 (doc (string-append data "/doc/python-matplotlib-" ,version))
3596 (info (string-append data "/info"))
3597 (html (string-append doc "/html")))
3598 (mkdir-p html)
3599 (mkdir-p info)
3600 (copy-recursively "build/html" html)
3601 (symlink (string-append html "/_images")
3602 (string-append info "/matplotlib-figures"))
3603 (with-directory-excursion "build/texinfo"
3604 (substitute* "matplotlib.texi"
3605 (("@image\\{([^,]*)" all file)
3606 (string-append "@image{matplotlib-figures/" file)))
3607 (symlink (string-append html "/_images")
3608 "./matplotlib-figures")
e7a53914
RW
3609 (invoke "makeinfo" "--no-split"
3610 "-o" "matplotlib.info" "matplotlib.texi"))
3611 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3612 #t)))))
3613 (home-page (package-home-page python-matplotlib))
3614 (synopsis "Documentation for the python-matplotlib package")
3615 (description (package-description python-matplotlib))
3616 (license (package-license python-matplotlib))))
3617
3618(define-public python2-matplotlib-documentation
3619 (package-with-python2 python-matplotlib-documentation))
3620
3621(define-public python2-pysnptools
3622 (package
3623 (name "python2-pysnptools")
5d1ade85 3624 (version "0.3.13")
44d10b1f
RW
3625 (source
3626 (origin
3627 (method url-fetch)
5d1ade85 3628 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3629 (sha256
3630 (base32
5d1ade85 3631 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3632 (build-system python-build-system)
3633 (arguments
5d1ade85
RW
3634 `(#:python ,python-2 ; only Python 2.7 is supported
3635 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3636 (propagated-inputs
3637 `(("python2-numpy" ,python2-numpy)
3638 ("python2-scipy" ,python2-scipy)
3639 ("python2-pandas" ,python2-pandas)))
44d10b1f 3640 (native-inputs
5d1ade85 3641 `(("python2-cython" ,python2-cython)))
1b66989b 3642 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3643 (synopsis "Library for reading and manipulating genetic data")
3644 (description
3645 "PySnpTools is a library for reading and manipulating genetic data. It
3646can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3647those files. It can also efficiently manipulate ranges of integers using set
3648operators such as union, intersection, and difference.")
3649 (license license:asl2.0)))
3650
3651(define-public python-scipy
3652 (package
3653 (name "python-scipy")
3654 (version "1.1.0")
3655 (source
3656 (origin
3657 (method url-fetch)
3658 (uri (pypi-uri "scipy" version))
3659 (sha256
3660 (base32
3661 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3662 (build-system python-build-system)
3663 (propagated-inputs
3664 `(("python-numpy" ,python-numpy)
3665 ("python-matplotlib" ,python-matplotlib)
3666 ("python-pyparsing" ,python-pyparsing)))
3667 (inputs
3668 `(("lapack" ,lapack)
3669 ("openblas" ,openblas)))
3670 (native-inputs
3671 `(("python-cython" ,python-cython)
3672 ("python-pytest" ,python-pytest)
3673 ("python-sphinx" ,python-sphinx)
3674 ("python-numpydoc" ,python-numpydoc)
3675 ("gfortran" ,gfortran)
3676 ("perl" ,perl)
3677 ("which" ,which)))
3678 (outputs '("out" "doc"))
3679 (arguments
3680 `(#:phases
3681 (modify-phases %standard-phases
3682 (add-after 'unpack 'disable-broken-tests
3683 (lambda _
3684 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3685 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3686 (string-append indent
3687 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3688 m)))
3689 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3690 (("^def test_parallel_threads\\(\\):" m)
3691 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3692 m)))
3693 #t))
3694 (add-before 'build 'configure-openblas
3695 (lambda* (#:key inputs #:allow-other-keys)
3696 (call-with-output-file "site.cfg"
3697 (lambda (port)
3698 (format port
3699 "[blas]
3700libraries = openblas
3701library_dirs = ~a/lib
3702include_dirs = ~a/include
3703
3704# backslash-n to make emacs happy
3705\n[atlas]
3706library_dirs = ~a/lib
3707atlas_libs = openblas
3708"
3709 (assoc-ref inputs "openblas")
3710 (assoc-ref inputs "openblas")
3711 (assoc-ref inputs "openblas"))))
3712 #t))
3713 (add-after 'install 'install-doc
3714 (lambda* (#:key inputs outputs #:allow-other-keys)
3715 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3716 (doc (string-append data "/doc/" ,name "-" ,version))
3717 (html (string-append doc "/html"))
3718 (pyver ,(string-append "PYVER=" (version-major+minor
3719 (package-version python))))
3720 ;; By default it tries to run sphinx-build through the Python
3721 ;; interpreter which won't work with our shell wrapper.
3722 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3723 ;; Make installed package available for building the
3724 ;; documentation
3725 (add-installed-pythonpath inputs outputs)
3726 (with-directory-excursion "doc"
3727 ;; Fix generation of images for mathematical expressions.
3728 (substitute* (find-files "source" "conf\\.py")
3729 (("pngmath_use_preview = True")
3730 "pngmath_use_preview = False"))
3731 (mkdir-p html)
3732 (invoke "make" "html" pyver sphinxbuild)
3733 (with-directory-excursion "build/html"
3734 (for-each (lambda (file)
3735 (let* ((dir (dirname file))
3736 (tgt-dir (string-append html "/" dir)))
3737 (install-file file html)))
3738 (find-files "." ".*")))))
3739 #t))
3740 ;; Tests can only be run after the library has been installed and not
3741 ;; within the source directory.
3742 (delete 'check)
3743 (add-after 'install 'check
3744 (lambda* (#:key inputs outputs #:allow-other-keys)
3745 (add-installed-pythonpath inputs outputs)
3746 (with-directory-excursion "/tmp"
3747 (invoke "python" "-c"
3748 "import scipy; scipy.test(verbose=2)")))))))
3749 (home-page "https://www.scipy.org/")
3750 (synopsis "The Scipy library provides efficient numerical routines")
3751 (description "The SciPy library is one of the core packages that make up
3752the SciPy stack. It provides many user-friendly and efficient numerical
3753routines such as routines for numerical integration and optimization.")
3754 (properties `((python2-variant . ,(delay python2-scipy))))
3755 (license license:bsd-3)))
3756
3757(define-public python2-scipy
3758 (package-with-python2
3759 (strip-python2-variant python-scipy)))
3760
3761(define-public python-socksipy-branch
3762 (package
3763 (name "python-socksipy-branch")
3764 (version "1.01")
3765 (source
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "SocksiPy-branch" version))
3769 (sha256
3770 (base32
3771 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3772 (build-system python-build-system)
3773 (arguments
3774 `(#:tests? #f)) ; There are no tests
3775 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3776 (synopsis "Python SOCKS module")
3777 (description
3778 "SocksiPy - A Python SOCKS client module. It provides a
3779socket-like interface that supports connections to any TCP
3780service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3781The original version was developed by Dan Haim, this is a
3782branch created by Mario Vilas to address some open issues,
3783as the original project seems to have been abandoned circa 2007.")
3784 (license license:bsd-3)))
3785
3786(define-public python2-socksipy-branch
3787 (package-with-python2 python-socksipy-branch))
3788
3789(define-public python-pycodestyle
3790 (package
3791 (name "python-pycodestyle")
d16ef28b 3792 (version "2.5.0")
44d10b1f 3793 (source
ba88eea2
RW
3794 (origin
3795 (method url-fetch)
3796 (uri (pypi-uri "pycodestyle" version))
3797 (sha256
3798 (base32
d16ef28b 3799 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
3800 (build-system python-build-system)
3801 (home-page "https://pycodestyle.readthedocs.io/")
3802 (synopsis "Python style guide checker")
3803 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3804Python code against some of the style conventions in
3805@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3806 (license license:expat)))
3807
3808(define-public python2-pycodestyle
3809 (package-with-python2 python-pycodestyle))
3810
3811(define-public python-multidict
3812 (package
3813 (name "python-multidict")
3814 (version "4.2.0")
3815 (source
3816 (origin
3817 (method url-fetch)
3818 (uri (pypi-uri "multidict" version))
3819 (sha256
3820 (base32
3821 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3822 (build-system python-build-system)
3823 (native-inputs
3824 `(("python-pytest" ,python-pytest)
3825 ("python-pytest-runner" ,python-pytest-runner)))
3826 (home-page "https://github.com/aio-libs/multidict/")
3827 (synopsis "Multidict implementation")
3828 (description "Multidict is dict-like collection of key-value pairs
3829where key might be occurred more than once in the container.")
3830 (license license:asl2.0)))
3831
3832(define-public python-orderedmultidict
3833 (package
3834 (name "python-orderedmultidict")
3835 (version "0.7.11")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "orderedmultidict" version))
3840 (sha256
3841 (base32
3842 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3843 (build-system python-build-system)
3844 (arguments
3845 `(#:phases
3846 (modify-phases %standard-phases
3847 (add-after 'unpack 'fix-tests
3848 (lambda _
3849 ;; The package uses nosetest for running the tests.
3850 ;; Adding this initfile allows to run the test suite
3851 ;; without requiring nosetest.
d1c4f329
RW
3852 (with-output-to-file "tests/__init__.py" newline)
3853 #t)))))
44d10b1f
RW
3854 (propagated-inputs
3855 `(("python-six" ,python-six)))
3856 (native-inputs
3857 `(("python-pycodestyle" ,python-pycodestyle)))
3858 (home-page "https://github.com/gruns/orderedmultidict")
3859 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3860 (description "This package contains a library for ordered multivalue
3861dictionaries. A multivalue dictionary is a dictionary that can store
3862multiple values for the same key. An ordered multivalue dictionary is a
3863multivalue dictionary that retains the order of insertions and deletions.")
3864 (license license:unlicense)))
3865
3866(define-public python2-orderedmultidict
3867 (package-with-python2 python-orderedmultidict))
3868
3869(define-public python-autopep8
3870 (package
3871 (name "python-autopep8")
3872 (version "1.3.5")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "autopep8" version))
3877 (sha256
3878 (base32
3879 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3880 (build-system python-build-system)
3881 (propagated-inputs
3882 `(("python-pycodestyle" ,python-pycodestyle)))
3883 (home-page "https://github.com/hhatto/autopep8")
3884 (synopsis "Format Python code according to the PEP 8 style guide")
3885 (description
3886 "@code{autopep8} automatically formats Python code to conform to
3887the PEP 8 style guide. It uses the pycodestyle utility to determine
3888what parts of the code needs to be formatted. @code{autopep8} is
3889capable of fixing most of the formatting issues that can be reported
3890by pycodestyle.")
3891 (license (license:non-copyleft
3892 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3893
3894(define-public python2-autopep8
3895 (package-with-python2 python-autopep8))
3896
3897(define-public python-distutils-extra
3898 (package
3899 (name "python-distutils-extra")
3900 (version "2.38")
3901 (source
3902 (origin
3903 (method url-fetch)
3904 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3905 version "/+download/python-distutils-extra-"
3906 version ".tar.gz"))
3907 (sha256
3908 (base32
3909 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3910 (build-system python-build-system)
3911 (home-page "https://launchpad.net/python-distutils-extra/")
3912 (synopsis "Enhancements to Python's distutils")
3913 (description
3914 "The python-distutils-extra module enables you to easily integrate
3915gettext support, themed icons, and scrollkeeper-based documentation into
3916Python's distutils.")
3917 (license license:gpl2)))
3918
3919(define-public python2-distutils-extra
3920 (package-with-python2 python-distutils-extra))
3921
3922(define-public python2-elib.intl
3923 (package
3924 (name "python2-elib.intl")
3925 (version "0.0.3")
3926 (source
3927 (origin
3928 ;; This project doesn't tag releases or publish tarballs, so we take
3929 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3930 (method git-fetch)
3931 (uri (git-reference
3932 (url "https://github.com/dieterv/elib.intl.git")
3933 (commit "d09997cfef")))
3934 (file-name (string-append name "-" version "-checkout"))
3935 (sha256
3936 (base32
3937 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3938 (build-system python-build-system)
3939 (arguments
3940 ;; incompatible with Python 3 (exception syntax)
3941 `(#:python ,python-2
3942 #:tests? #f))
3943 (home-page "https://github.com/dieterv/elib.intl")
3944 (synopsis "Enhanced internationalization for Python")
3945 (description
3946 "The elib.intl module provides enhanced internationalization (I18N)
3947services for your Python modules and applications.")
3948 (license license:lgpl3+)))
3949
3950(define-public python-olefile
3951 (package
3952 (name "python-olefile")
3953 (version "0.45.1")
3954 (source
3955 (origin
3956 (method url-fetch)
3957 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3958 version ".tar.gz"))
3959 (file-name (string-append name "-" version ".tar.gz"))
3960 (sha256
3961 (base32
3962 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3963 (build-system python-build-system)
3964 (home-page
3965 "https://www.decalage.info/python/olefileio")
3966 (synopsis "Read and write Microsoft OLE2 files.")
3967 (description
3968 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3969Storage or Compound Document, Microsoft Office). It is an improved version of
3970the OleFileIO module from PIL, the Python Image Library.")
3971 (license license:bsd-3)))
3972
3973(define-public python2-olefile
3974 (package-with-python2 python-olefile))
3975
3976(define-public python-pillow
3977 (package
3978 (name "python-pillow")
3979 (version "5.4.1")
3980 (source
3981 (origin
3982 (method url-fetch)
3983 (uri (pypi-uri "Pillow" version))
3984 (sha256
3985 (base32
3986 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3987 (build-system python-build-system)
3988 (native-inputs
3989 `(("python-pytest" ,python-pytest)))
3990 (inputs
3991 `(("freetype" ,freetype)
3992 ("lcms" ,lcms)
3993 ("zlib" ,zlib)
3994 ("libjpeg" ,libjpeg)
3995 ("openjpeg" ,openjpeg)
3996 ("libtiff" ,libtiff)
3997 ("libwebp" ,libwebp)))
3998 (propagated-inputs
3999 `(("python-olefile" ,python-olefile)))
4000 (arguments
4001 `(#:phases
4002 (modify-phases %standard-phases
4003 (add-after 'unpack 'patch-ldconfig
4004 (lambda _
4005 (substitute* "setup.py"
4006 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4007 (delete 'check) ; We must run checks after python-pillow is installed.
4008 (add-after 'install 'check-installed
4009 (lambda* (#:key outputs inputs #:allow-other-keys)
4010 (begin
4011 (setenv "HOME" (getcwd))
4012 ;; Make installed package available for running the tests.
4013 (add-installed-pythonpath inputs outputs)
4014 (invoke "python" "selftest.py" "--installed")
4015 (invoke "python" "-m" "pytest" "-vv")))))))
4016 (home-page "https://python-pillow.org")
4017 (synopsis "Fork of the Python Imaging Library")
4018 (description
4019 "The Python Imaging Library adds image processing capabilities to your
4020Python interpreter. This library provides extensive file format support, an
4021efficient internal representation, and fairly powerful image processing
4022capabilities. The core image library is designed for fast access to data
4023stored in a few basic pixel formats. It should provide a solid foundation for
4024a general image processing tool.")
4025 (license (license:x11-style
4026 "http://www.pythonware.com/products/pil/license.htm"
4027 "The PIL Software License"))))
4028
4029(define-public python2-pillow
4030 (package-with-python2 python-pillow))
4031
4032(define-public python-pycparser
4033 (package
4034 (name "python-pycparser")
4035 (version "2.18")
4036 (source
4037 (origin
4038 (method url-fetch)
4039 (uri (pypi-uri "pycparser" version))
4040 (sha256
4041 (base32
4042 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4043 (outputs '("out" "doc"))
4044 (build-system python-build-system)
4045 (native-inputs
4046 `(("pkg-config" ,pkg-config)))
4047 (arguments
4048 `(#:phases
4049 (modify-phases %standard-phases
4050 (replace 'check
4051 (lambda _
4052 (with-directory-excursion "tests"
acb75c03
RW
4053 (invoke "python" "all_tests.py"))
4054 #t))
44d10b1f
RW
4055 (add-after 'install 'install-doc
4056 (lambda* (#:key outputs #:allow-other-keys)
4057 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4058 (doc (string-append data "/doc/" ,name "-" ,version))
4059 (examples (string-append doc "/examples")))
4060 (mkdir-p examples)
4061 (for-each (lambda (file)
4062 (copy-file (string-append "." file)
4063 (string-append doc file)))
4064 '("/README.rst" "/CHANGES" "/LICENSE"))
4065 (copy-recursively "examples" examples)))))))
4066 (home-page "https://github.com/eliben/pycparser")
4067 (synopsis "C parser in Python")
4068 (description
4069 "Pycparser is a complete parser of the C language, written in pure Python
4070using the PLY parsing library. It parses C code into an AST and can serve as
4071a front-end for C compilers or analysis tools.")
4072 (license license:bsd-3)))
4073
4074(define-public python2-pycparser
4075 (package-with-python2 python-pycparser))
4076
4077(define-public python-pywavelets
4078 (package
4079 (name "python-pywavelets")
4080 (version "1.0.1")
4081 (home-page "https://github.com/PyWavelets/pywt")
4082 (source (origin
4083 (method url-fetch)
4084 (uri (pypi-uri "PyWavelets" version))
4085 (sha256
4086 (base32
4087 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4088 (build-system python-build-system)
4089 (arguments
4090 '(#:modules ((ice-9 ftw)
4091 (srfi srfi-1)
4092 (srfi srfi-26)
4093 (guix build utils)
4094 (guix build python-build-system))
4095 #:phases (modify-phases %standard-phases
4096 (replace 'check
4097 (lambda _
4098 (let ((cwd (getcwd))
4099 (libdir (find (cut string-prefix? "lib." <>)
4100 (scandir "build"))))
4101 (with-directory-excursion (string-append cwd "/build/" libdir)
4102 (invoke "nosetests" "-v" "."))))))))
4103 (native-inputs
4104 `(("python-matplotlib" ,python-matplotlib) ;for tests
4105 ("python-nose" ,python-nose)))
4106 (propagated-inputs
4107 `(("python-numpy" ,python-numpy)))
4108 (synopsis "Wavelet transforms in Python")
4109 (description
4110 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4111mathematical basis functions that are localized in both time and frequency.
4112Wavelet transforms are time-frequency transforms employing wavelets. They are
4113similar to Fourier transforms, the difference being that Fourier transforms are
4114localized only in frequency instead of in time and frequency.")
4115 (license license:expat)))
4116
4117(define-public python2-pywavelets
4118 (package-with-python2 python-pywavelets))
4119
4120(define-public python-xcffib
4121 (package
4122 (name "python-xcffib")
4123 (version "0.6.0")
4124 (source
4125 (origin
4126 (method url-fetch)
4127 (uri (pypi-uri "xcffib" version))
4128 (sha256
4129 (base32
4130 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4131 (build-system python-build-system)
4132 (inputs
4133 `(("libxcb" ,libxcb)))
4134 (propagated-inputs
4135 `(("python-cffi" ,python-cffi) ; used at run time
4136 ("python-six" ,python-six)))
4137 (arguments
4138 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4139 #:tests? #f
4140 #:phases
4141 (modify-phases %standard-phases
4142 (add-after 'unpack 'fix-libxcb-path
4143 (lambda* (#:key inputs #:allow-other-keys)
4144 (let ((libxcb (assoc-ref inputs "libxcb")))
4145 (substitute* '("xcffib/__init__.py")
4146 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4147 #t)))
4148 (add-after 'install 'install-doc
4149 (lambda* (#:key outputs #:allow-other-keys)
4150 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4151 "/doc/" ,name "-" ,version)))
4152 (mkdir-p doc)
4153 (copy-file "README.md"
4154 (string-append doc "/README.md"))
4155 #t))))))
4156 (home-page "https://github.com/tych0/xcffib")
4157 (synopsis "XCB Python bindings")
4158 (description
4159 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4160support for Python 3 and PyPy. It is based on cffi.")
4161 (license license:expat)))
4162
4163(define-public python2-xcffib
4164 (package-with-python2 python-xcffib))
4165
4166(define-public python-cairocffi
4167 (package
4168 (name "python-cairocffi")
4169 (version "0.9.0")
4170 (source
4171 (origin
4172 (method url-fetch)
4173 (uri (pypi-uri "cairocffi" version))
4174 (sha256
4175 (base32
4176 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4177 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4178 (build-system python-build-system)
4179 (outputs '("out" "doc"))
4180 (inputs
4181 `(("glib" ,glib)
4182 ("gtk+" ,gtk+)
4183 ("gdk-pixbuf" ,gdk-pixbuf)
4184 ("cairo" ,cairo)
4185 ("pango" ,pango)))
4186 (native-inputs
4187 `(("pkg-config" ,pkg-config)
4188 ("python-pytest" ,python-pytest)
4189 ("python-pytest-cov" ,python-pytest-cov)
4190 ("python-pytest-runner" ,python-pytest-runner)
4191 ("python-sphinx" ,python-sphinx)
4192 ("python-docutils" ,python-docutils)))
4193 (propagated-inputs
4194 `(("python-xcffib" ,python-xcffib))) ; used at run time
4195 (arguments
4196 `(#:phases
4197 (modify-phases %standard-phases
4198 (add-after 'unpack 'patch-paths
4199 (lambda* (#:key inputs outputs #:allow-other-keys)
4200 (substitute* (find-files "." "\\.py$")
4201 (("dlopen\\(ffi, 'cairo'")
4202 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4203 "/lib/libcairo.so.2'"))
4204 (("dlopen\\(ffi, 'gdk-3'")
4205 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4206 "/lib/libgtk-3.so.0'"))
4207 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4208 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4209 "/lib/libgdk_pixbuf-2.0.so.0'"))
4210 (("dlopen\\(ffi, 'glib-2.0'")
4211 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4212 "/lib/libglib-2.0.so.0'"))
4213 (("dlopen\\(ffi, 'gobject-2.0'")
4214 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4215 "/lib/libgobject-2.0.so.0'"))
4216 (("dlopen\\(ffi, 'pangocairo-1.0'")
4217 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4218 "/lib/libpangocairo-1.0.so.0'"))
4219 (("dlopen\\(ffi, 'pango-1.0'")
4220 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4221 "/lib/libpango-1.0.so.0'")))
4222 #t))
4223 (add-after 'install 'install-doc
4224 (lambda* (#:key inputs outputs #:allow-other-keys)
4225 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4226 (doc (string-append data "/doc/" ,name "-" ,version))
4227 (html (string-append doc "/html")))
4228 (setenv "LD_LIBRARY_PATH"
4229 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4230 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4231 (setenv "LANG" "en_US.UTF-8")
4232 (mkdir-p html)
4233 (for-each (lambda (file)
4234 (copy-file (string-append "." file)
4235 (string-append doc file)))
4236 '("/README.rst" "/CHANGES" "/LICENSE"))
4237 (system* "python" "setup.py" "build_sphinx")
4238 (copy-recursively "docs/_build/html" html)
4239 #t))))))
4240 (home-page "https://github.com/Kozea/cairocffi")
4241 (synopsis "Python bindings and object-oriented API for Cairo")
4242 (description
4243 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4244Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4245graphics library with support for multiple backends including image buffers,
4246PNG, PostScript, PDF, and SVG file output.")
4247 (license license:bsd-3)))
4248
4249(define-public python2-cairocffi
4250 (package-with-python2 python-cairocffi))
4251
4252(define-public python-decorator
4253 (package
4254 (name "python-decorator")
4255 (version "4.3.0")
4256 (source
4257 (origin
4258 (method url-fetch)
4259 (uri (pypi-uri "decorator" version))
4260 (sha256
4261 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4262 (build-system python-build-system)
4263 (home-page "https://pypi.python.org/pypi/decorator/")
4264 (synopsis "Python module to simplify usage of decorators")
4265 (description
4266 "The aim of the decorator module is to simplify the usage of decorators
4267for the average programmer, and to popularize decorators usage giving examples
4268of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4269etc. The core of this module is a decorator factory.")
4270 (license license:expat)))
4271
4272(define-public python2-decorator
4273 (package-with-python2 python-decorator))
4274
4275(define-public python-drmaa
4276 (package
4277 (name "python-drmaa")
4278 (version "0.7.7")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (pypi-uri "drmaa" version))
4283 (sha256
4284 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4285 (build-system python-build-system)
4286 ;; The test suite requires libdrmaa which is provided by the cluster
4287 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4288 ;; should be set to the path of the libdrmaa library.
4289 (arguments '(#:tests? #f))
4290 (native-inputs
4291 `(("python-nose" ,python-nose)))
4292 (home-page "https://pypi.python.org/pypi/drmaa")
4293 (synopsis "Python bindings for the DRMAA library")
4294 (description
4295 "A Python package for Distributed Resource Management (DRM) job
4296submission and control. This package is an implementation of the DRMAA 1.0
4297Python language binding specification.")
4298 (license license:bsd-3)))
4299
4300(define-public python2-drmaa
4301 (package-with-python2 python-drmaa))
4302
4303(define-public python-grako
4304 (package
4305 (name "python-grako")
4306 (version "3.99.9")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri
4311 (pypi-uri "grako" version ".zip"))
4312 (sha256
4313 (base32
4314 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4315 (build-system python-build-system)
4316 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4317 (native-inputs
4318 `(("unzip" ,unzip)
4319 ("python-pytest" ,python-pytest)
4320 ("python-pytest-runner" ,python-pytest-runner)))
4321 (home-page "https://bitbucket.org/neogeny/grako")
4322 (synopsis "EBNF parser generator")
4323 (description
4324 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4325memoizing PEG/Packrat parser in Python.")
4326 (license license:bsd-3)))
4327
4328(define-public python2-grako
4329 (package-with-python2 python-grako))
4330
4331(define-public python-gridmap
4332 (package
4333 (name "python-gridmap")
4334 (version "0.13.0")
4335 (source
4336 (origin
4337 (method url-fetch)
4338 (uri (string-append
4339 "https://github.com/pygridtools/gridmap/archive/v"
4340 version ".tar.gz"))
4341 (file-name (string-append name "-" version ".tar.gz"))
4342 (sha256
4343 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4344 (build-system python-build-system)
4345 (arguments
4346 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4347 (propagated-inputs
4348 `(("python-psutil" ,python-psutil)
4349 ("python-drmaa" ,python-drmaa)
4350 ("python-pyzmq" ,python-pyzmq)))
4351 (home-page "https://github.com/pygridtools/gridmap")
4352 (synopsis "Create jobs on a cluster directly from Python")
4353 (description
4354 "Gridmap is a Python package to allow you to easily create jobs on the
4355cluster directly from Python. You can directly map Python functions onto the
4356cluster without needing to write any wrapper code yourself.")
4357 (license license:gpl3+)))
4358
4359(define-public python2-gridmap
4360 (package-with-python2 python-gridmap))
4361
4362(define-public python-honcho
4363 (package
4364 (name "python-honcho")
4365 (version "1.0.1")
4366 (source
4367 (origin
4368 (method url-fetch)
4369 (uri (string-append
4370 "https://github.com/nickstenning/honcho/archive/v"
4371 version ".tar.gz"))
4372 (file-name (string-append name "-" version ".tar.gz"))
4373 (sha256
4374 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4375 (build-system python-build-system)
4376 (native-inputs
4377 `(("python-pytest" ,python-pytest)
4378 ("python-mock" ,python-mock)
4379 ("python-tox" ,python-tox)
4380 ("which" ,which))) ;for tests
4381 (propagated-inputs
4382 `(("python-jinja2" ,python-jinja2)))
4383 (arguments
4384 `(#:phases
4385 (modify-phases %standard-phases
4386 (delete 'check)
4387 (add-after 'install 'check
4388 (lambda* (#:key outputs inputs #:allow-other-keys)
4389 ;; fix honcho path in testsuite
4390 (substitute* "tests/conftest.py"
4391 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4392 "/bin/honcho" "'")))
4393 ;; It's easier to run tests after install.
4394 ;; Make installed package available for running the tests
4395 (add-installed-pythonpath inputs outputs)
95b707fb 4396 (invoke "py.test" "-v"))))))
44d10b1f
RW
4397 (home-page "https://github.com/nickstenning/honcho")
4398 (synopsis "Manage Procfile-based applications")
4399 (description
4400 "A Procfile is a file which describes how to run an application
4401consisting of serveral processes. honcho starts all listed processes.
4402The output of all running processes is collected by honcho and
4403displayed.")
4404 (license license:expat)))
4405
4406(define-public python2-honcho
4407 (package-with-python2 python-honcho))
4408
4409(define-public python-pexpect
4410 (package
4411 (name "python-pexpect")
4412 (version "4.6.0")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "pexpect" version))
4417 (sha256
4418 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4419 (build-system python-build-system)
4420 (arguments
4421 `(#:phases
4422 (modify-phases %standard-phases
4423 (add-before 'check 'prepare-tests
4424 (lambda _
4425 (substitute* (find-files "tests")
4426 (("/bin/ls") (which "ls"))
4427 (("/bin/echo") (which "echo"))
4428 (("/bin/which") (which "which"))
4429 ;; Many tests try to use the /bin directory which
4430 ;; is not present in the build environment.
4431 ;; Use one that's non-empty and unlikely to change.
4432 (("/bin'") "/dev'"))
4433 ;; XXX: Socket connection test gets "Connection reset by peer".
4434 ;; Why does it not work? Delete for now.
4435 (delete-file "tests/test_socket.py")
4436 #t))
4437 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4438 (native-inputs
4439 `(("python-nose" ,python-nose)
4440 ("python-pytest" ,python-pytest)
4441 ("man-db" ,man-db)
4442 ("which" ,which)
4443 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4444 (propagated-inputs
4445 `(("python-ptyprocess" ,python-ptyprocess)))
4446 (home-page "http://pexpect.readthedocs.org/")
4447 (synopsis "Controlling interactive console applications")
4448 (description
4449 "Pexpect is a pure Python module for spawning child applications;
4450controlling them; and responding to expected patterns in their output.
4451Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4452child application and control it as if a human were typing commands.")
4453 (license license:isc)))
4454
4455(define-public python2-pexpect
4456 (package-with-python2 python-pexpect))
4457
4458(define-public python-setuptools-scm
4459 (package
4460 (name "python-setuptools-scm")
85092643 4461 (version "3.2.0")
44d10b1f
RW
4462 (source (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "setuptools_scm" version))
4465 (sha256
4466 (base32
85092643 4467 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4468 (build-system python-build-system)
4469 (home-page "https://github.com/pypa/setuptools_scm/")
4470 (synopsis "Manage Python package versions in SCM metadata")
4471 (description
4472 "Setuptools_scm handles managing your Python package versions in
4473@dfn{software configuration management} (SCM) metadata instead of declaring
4474them as the version argument or in a SCM managed file.")
4475 (license license:expat)))
4476
4477(define-public python2-setuptools-scm
4478 (package-with-python2 python-setuptools-scm))
4479
4480(define-public python-pathpy
4481 (package
4482 (name "python-pathpy")
4483 (version "11.0.1")
4484 (source
4485 (origin
4486 (method url-fetch)
4487 (uri (pypi-uri "path.py" version))
4488 (sha256
4489 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4490 ;; (outputs '("out" "doc"))
4491 (build-system python-build-system)
4492 (propagated-inputs
4493 `(("python-appdirs" ,python-appdirs)))
4494 (native-inputs
4495 `(("python-setuptools-scm" ,python-setuptools-scm)
4496 ("python-sphinx" ,python-sphinx)
4497 ("python-rst.linker" ,python-rst.linker)
4498 ("python-pytest" ,python-pytest)
4499 ("python-pytest-runner" ,python-pytest-runner)))
4500 (arguments
4501 ;; FIXME: Documentation and tests require "jaraco.packaging".
4502 `(#:tests? #f))
4503 ;; #:phases
4504 ;; (modify-phases %standard-phases
4505 ;; (add-after 'build 'build-doc
4506 ;; (lambda _
4507 ;; (setenv "LANG" "en_US.UTF-8")
4508 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4509 ;; (add-after 'install 'install-doc
4510 ;; (lambda* (#:key outputs #:allow-other-keys)
4511 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4512 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4513 ;; (html (string-append doc "/html")))
4514 ;; (mkdir-p html)
4515 ;; (for-each (lambda (file)
4516 ;; (copy-file file (string-append doc "/" file)))
4517 ;; '("README.rst" "CHANGES.rst"))
4518 ;; (copy-recursively "build/sphinx/html" html)))))))
4519 (home-page "https://github.com/jaraco/path.py")
4520 (synopsis "Python module wrapper for built-in os.path")
4521 (description
4522 "@code{path.py} implements path objects as first-class entities, allowing
4523common operations on files to be invoked on those path objects directly.")
4524 (license license:expat)))
4525
4526(define-public python2-pathpy
4527 (package-with-python2 python-pathpy))
4528
4529(define-public python-simplegeneric
4530 (package
4531 (name "python-simplegeneric")
4532 (version "0.8.1")
4533 (source
4534 (origin
4535 (method url-fetch)
6c8c3980 4536 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4537 (sha256
4538 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4539 (build-system python-build-system)
4540 (native-inputs
4541 `(("unzip" ,unzip)))
4542 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4543 (synopsis "Python module for simple generic functions")
4544 (description
4545 "The simplegeneric module lets you define simple single-dispatch generic
4546functions, akin to Python’s built-in generic functions like @code{len()},
4547@code{iter()} and so on. However, instead of using specially-named methods,
4548these generic functions use simple lookup tables, akin to those used by
4549e.g. @code{pickle.dump()} and other generic functions found in the Python
4550standard library.")
4551 (license license:zpl2.1)))
4552
4553(define-public python2-simplegeneric
4554 (package-with-python2 python-simplegeneric))
4555
4556(define-public python-ipython-genutils
4557 ;; TODO: This package is retired, check if can be removed, see description.
4558 (package
4559 (name "python-ipython-genutils")
4560 (version "0.1.0")
4561 (source
4562 (origin
4563 (method url-fetch)
c9671d4b 4564 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4565 (sha256
4566 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4567 (build-system python-build-system)
4568 (arguments `(#:tests? #f)) ; no tests
4569 (home-page "https://ipython.org")
4570 (synopsis "Vestigial utilities from IPython")
4571 (description
4572 "This package provides retired utilities from IPython. No packages
4573outside IPython/Jupyter should depend on it.
4574
4575This package shouldn't exist. It contains some common utilities shared by
4576Jupyter and IPython projects during The Big Split. As soon as possible, those
4577packages will remove their dependency on this, and this package will go
4578away.")
4579 (license license:bsd-3)))
4580
4581(define-public python2-ipython-genutils
4582 (package-with-python2 python-ipython-genutils))
4583
4584(define-public python-traitlets
4585 (package
4586 (name "python-traitlets")
4587 (version "4.3.2")
4588 (source
4589 (origin
4590 (method url-fetch)
4591 (uri (pypi-uri "traitlets" version))
4592 (sha256
4593 (base32
4594 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4595 (build-system python-build-system)
4596 (arguments
4597 `(#:phases
4598 (modify-phases %standard-phases
4599 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4600 (propagated-inputs
4601 `(("python-ipython-genutils" ,python-ipython-genutils)
4602 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4603 (native-inputs
4604 `(("python-pytest" ,python-pytest)))
4605 (properties `((python2-variant . ,(delay python2-traitlets))))
4606 (home-page "https://ipython.org")
4607 (synopsis "Configuration system for Python applications")
4608 (description
4609 "Traitlets is a framework that lets Python classes have attributes with
4610type checking, dynamically calculated default values, and ‘on change’
4611callbacks. The package also includes a mechanism to use traitlets for
4612configuration, loading values from files or from command line arguments. This
4613is a distinct layer on top of traitlets, so you can use traitlets in your code
4614without using the configuration machinery.")
4615 (license license:bsd-3)))
4616
4617(define-public python2-traitlets
4618 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4619 (package
4620 (inherit traitlets)
4621 (propagated-inputs
4622 `(("python2-enum34" ,python2-enum34)
4623 ,@(package-propagated-inputs traitlets))))))
4624
4625(define-public python-jupyter-core
4626 (package
4627 (name "python-jupyter-core")
4628 (version "4.4.0")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (string-append (pypi-uri "jupyter_core" version)))
4633 (sha256
4634 (base32
4635 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4636 (build-system python-build-system)
4637 ;; FIXME: not sure how to run the tests
4638 (arguments `(#:tests? #f))
4639 (propagated-inputs
4640 `(("python-traitlets" ,python-traitlets)))
4641 (home-page "http://jupyter.org/")
4642 (synopsis "Jupyter base package")
4643 (description
4644 "Jupyter core is the base package on which Jupyter projects rely.")
4645 (license license:bsd-3)))
4646
4647(define-public python2-jupyter-core
4648 (package-with-python2 python-jupyter-core))
4649
4650(define-public python-jupyter-client
4651 (package
4652 (name "python-jupyter-client")
4653 (version "5.2.4")
4654 (source
4655 (origin
4656 (method url-fetch)
4657 (uri (pypi-uri "jupyter_client" version))
4658 (sha256
4659 (base32
4660 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4661 (build-system python-build-system)
4662 ;; Tests fail because of missing native python kernel which I assume is
4663 ;; provided by the ipython package, which we cannot use because it would
4664 ;; cause a dependency cycle.
4665 (arguments `(#:tests? #f))
4666 (propagated-inputs
4667 `(("python-pyzmq" ,python-pyzmq)
4668 ("python-traitlets" ,python-traitlets)
4669 ("python-jupyter-core" ,python-jupyter-core)))
4670 (home-page "http://jupyter.org/")
4671 (synopsis "Jupyter protocol implementation and client libraries")
4672 (description
4673 "The @code{jupyter_client} package contains the reference implementation
4674of the Jupyter protocol. It also provides client and kernel management APIs
4675for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4676installing @code{kernelspec}s for use with Jupyter frontends.")
4677 (license license:bsd-3)))
4678
4679(define-public python2-jupyter-client
4680 (package-with-python2 python-jupyter-client))
4681
4682(define-public python-ipykernel
4683 (package
4684 (name "python-ipykernel")
4685 (version "5.1.0")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "ipykernel" version))
4690 (sha256
4691 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4692 (build-system python-build-system)
4693 (arguments
4694 `(#:phases
4695 (modify-phases %standard-phases
4696 (replace 'check
4697 (lambda _
4698 (setenv "HOME" "/tmp")
4699 (invoke "pytest" "-v")
4700 #t)))))
4701 (propagated-inputs
4702 `(("python-ipython" ,python-ipython)
4703 ;; imported at runtime during connect
4704 ("python-jupyter-client" ,python-jupyter-client)))
4705 (native-inputs
4706 `(("python-pytest" ,python-pytest)
4707 ("python-nose" ,python-nose)))
4708 (home-page "https://ipython.org")
4709 (synopsis "IPython Kernel for Jupyter")
4710 (description
4711 "This package provides the IPython kernel for Jupyter.")
4712 (license license:bsd-3)))
4713
4714(define-public python2-ipykernel
4715 (package-with-python2 python-ipykernel))
4716
966aa714
AE
4717(define-public python-pari-jupyter
4718 (package
4719 (name "python-pari-jupyter")
4720 (version "1.3.2")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "pari_jupyter" version))
4725 (sha256
4726 (base32
4727 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4728 (build-system python-build-system)
4729 (propagated-inputs
4730 `(("python-ipykernel" ,python-ipykernel)))
4731 (inputs
4732 `(("pari-gp" ,pari-gp)
4733 ("readline" ,readline)))
4734 (arguments
4735 `(#:tests? #f)) ; no test suite
4736 (home-page
4737 "https://github.com/jdemeyer/pari_jupyter")
4738 (synopsis "A Jupyter kernel for PARI/GP")
4739 (description "The package provides a PARI/GP kernel for Jupyter.")
4740 (license license:gpl3+)))
4741
44d10b1f
RW
4742;; This is the latest release of the LTS version of ipython with support for
4743;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4744;; dropped support for Python 2.7. We may want to rename this package.
4745(define-public python-ipython
4746 (package
4747 (name "python-ipython")
4748 (version "5.8.0")
4749 (source
4750 (origin
4751 (method url-fetch)
4752 (uri (pypi-uri "ipython" version ".tar.gz"))
4753 (sha256
4754 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4755 (build-system python-build-system)
4756 (outputs '("out" "doc"))
4757 (propagated-inputs
4758 `(("python-pyzmq" ,python-pyzmq)
4759 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4760 ("python-terminado" ,python-terminado)
4761 ("python-matplotlib" ,python-matplotlib)
4762 ("python-numpy" ,python-numpy)
4763 ("python-numpydoc" ,python-numpydoc)
4764 ("python-jinja2" ,python-jinja2)
4765 ("python-mistune" ,python-mistune)
4766 ("python-pexpect" ,python-pexpect)
4767 ("python-pickleshare" ,python-pickleshare)
4768 ("python-simplegeneric" ,python-simplegeneric)
4769 ("python-jsonschema" ,python-jsonschema)
4770 ("python-traitlets" ,python-traitlets)
4771 ("python-nbformat" ,python-nbformat)
4772 ("python-pygments" ,python-pygments)))
4773 (inputs
4774 `(("readline" ,readline)
4775 ("which" ,which)))
4776 (native-inputs
4777 `(("graphviz" ,graphviz)
4778 ("pkg-config" ,pkg-config)
4779 ("python-requests" ,python-requests) ;; for tests
4780 ("python-testpath" ,python-testpath)
4781 ("python-nose" ,python-nose)
4782 ("python-sphinx" ,python-sphinx)
4783 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4784 ;; FIXME: It's possible that a smaller union would work just as well.
4785 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4786 texlive-fonts-ec
4787 texlive-generic-ifxetex
4788 texlive-generic-pdftex
4789 texlive-latex-amsfonts
4790 texlive-latex-capt-of
4791 texlive-latex-cmap
4792 texlive-latex-environ
4793 texlive-latex-eqparbox
4794 texlive-latex-etoolbox
4795 texlive-latex-expdlist
4796 texlive-latex-fancyhdr
4797 texlive-latex-fancyvrb
4798 texlive-latex-fncychap
4799 texlive-latex-float
4800 texlive-latex-framed
4801 texlive-latex-geometry
4802 texlive-latex-graphics
4803 texlive-latex-hyperref
4804 texlive-latex-mdwtools
4805 texlive-latex-multirow
4806 texlive-latex-oberdiek
4807 texlive-latex-parskip
4808 texlive-latex-preview
4809 texlive-latex-tabulary
4810 texlive-latex-threeparttable
4811 texlive-latex-titlesec
4812 texlive-latex-trimspaces
4813 texlive-latex-ucs
4814 texlive-latex-upquote
4815 texlive-latex-url
4816 texlive-latex-varwidth
4817 texlive-latex-wrapfig)))
4818 ("texinfo" ,texinfo)))
4819 (arguments
4820 `(#:phases
4821 (modify-phases %standard-phases
4822 (add-after 'install 'install-doc
4823 (lambda* (#:key inputs outputs #:allow-other-keys)
4824 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4825 (doc (string-append data "/doc/" ,name "-" ,version))
4826 (html (string-append doc "/html"))
4827 (man1 (string-append data "/man/man1"))
4828 (info (string-append data "/info"))
4829 (examples (string-append doc "/examples"))
4830 (python-arg (string-append "PYTHON=" (which "python"))))
4831 (setenv "LANG" "en_US.utf8")
4832 ;; Make installed package available for running the tests
4833 (add-installed-pythonpath inputs outputs)
4834 (with-directory-excursion "docs"
4835 ;; FIXME: pdf fails to build
4836 ;;(system* "make" "pdf" "PAPER=a4")
4837 (system* "make" python-arg "html")
4838 (system* "make" python-arg "info"))
4839 (copy-recursively "docs/man" man1)
4840 (copy-recursively "examples" examples)
4841 (copy-recursively "docs/build/html" html)
4842 ;; (copy-file "docs/build/latex/ipython.pdf"
4843 ;; (string-append doc "/ipython.pdf"))
4844 (mkdir-p info)
4845 (copy-file "docs/build/texinfo/ipython.info"
4846 (string-append info "/ipython.info"))
4847 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4848 #t))
4849 ;; Tests can only be run after the library has been installed and not
4850 ;; within the source directory.
4851 (delete 'check)
4852 (add-after 'install 'check
4853 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4854 (if tests?
4855 (begin
4856 ;; Make installed package available for running the tests
4857 (add-installed-pythonpath inputs outputs)
4858 (setenv "HOME" "/tmp/") ;; required by a test
4859 ;; We only test the core because one of the other tests
4860 ;; tries to import ipykernel.
4861 (invoke "python" "IPython/testing/iptest.py"
4862 "-v" "IPython/core/tests"))
4863 #t)))
4864 (add-before 'check 'fix-tests
4865 (lambda* (#:key inputs #:allow-other-keys)
4866 (substitute* "./IPython/utils/_process_posix.py"
4867 (("/usr/bin/env', 'which") (which "which")))
4868 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4869 (("#!/usr/bin/env python")
4870 (string-append "#!" (which "python"))))
4871 ;; Disable 1 failing test
4872 (substitute* "./IPython/core/tests/test_magic.py"
4873 (("def test_dirops\\(\\):" all)
4874 (string-append "@dec.skipif(True)\n" all)))
4875 ;; This test introduces a circular dependency on ipykernel
4876 ;; (which depends on ipython).
4877 (delete-file "IPython/core/tests/test_display.py")
4878 ;; These tests throw errors for unknown reasons.
4879 (delete-file "IPython/extensions/tests/test_storemagic.py")
4880 (delete-file "IPython/core/tests/test_displayhook.py")
4881 (delete-file "IPython/core/tests/test_interactiveshell.py")
4882 (delete-file "IPython/core/tests/test_pylabtools.py")
4883 (delete-file "IPython/core/tests/test_paths.py")
4884 #t)))))
4885 (home-page "https://ipython.org")
4886 (synopsis "IPython is a tool for interactive computing in Python")
4887 (description
4888 "IPython provides a rich architecture for interactive computing with:
4889Powerful interactive shells, a browser-based notebook, support for interactive
4890data visualization, embeddable interpreters and tools for parallel
4891computing.")
4892 (license license:bsd-3)
4893 (properties `((python2-variant . ,(delay python2-ipython))))))
4894
4895(define-public python2-ipython
4896 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4897 (package
4898 (inherit ipython)
4899 ;; FIXME: add pyreadline once available.
4900 (propagated-inputs
4901 `(("python2-backports-shutil-get-terminal-size"
4902 ,python2-backports-shutil-get-terminal-size)
4903 ("python2-pathlib2" ,python2-pathlib2)
4904 ,@(package-propagated-inputs ipython)))
4905 (native-inputs
4906 `(("python2-mock" ,python2-mock)
4907 ,@(package-native-inputs ipython))))))
4908
4909(define-public python-urwid
4910 (package
4911 (name "python-urwid")
4912 (version "2.0.1")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 (uri (pypi-uri "urwid" version))
4917 (sha256
4918 (base32
4919 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4920 (build-system python-build-system)
4921 (home-page "http://urwid.org")
4922 (synopsis "Console user interface library for Python")
4923 (description
4924 "Urwid is a curses-based UI/widget library for Python. It includes many
4925features useful for text console applications.")
4926 (license license:lgpl2.1+)))
4927
4928(define-public python2-urwid
4929 (package-with-python2 python-urwid))
4930
4931(define-public python-urwidtrees
4932 (package
4933 (name "python-urwidtrees")
4934 (version "1.0.2")
4935 (source
4936 (origin
4937 (method url-fetch)
4938 ;; package author intends on distributing via github rather than pypi:
4939 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4940 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4941 version ".tar.gz"))
4942 (file-name (string-append name "-" version ".tar.gz"))
4943 (sha256
4944 (base32
4945 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4946 (build-system python-build-system)
4947 (arguments
4948 '(#:tests? #f)) ; no tests
4949 (propagated-inputs `(("python-urwid" ,python-urwid)))
4950 (home-page "https://github.com/pazz/urwidtrees")
4951 (synopsis "Tree widgets for urwid")
4952 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4953toolkit. Use it to build trees of widgets.")
4954 (license license:gpl3+)))
4955
4956(define-public python2-urwidtrees
4957 (package-with-python2 python-urwidtrees))
4958
4959(define-public python-ua-parser
4960 (package
4961 (name "python-ua-parser")
4962 (version "0.8.0")
4963 (source
4964 (origin
4965 (method url-fetch)
4966 (uri (pypi-uri "ua-parser" version))
4967 (sha256
4968 (base32
4969 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4970 (build-system python-build-system)
4971 (arguments
4972 `(#:tests? #f)) ;no test suite in release
4973 (native-inputs
4974 `(("python-pyyaml" ,python-pyyaml)))
4975 (home-page "https://github.com/ua-parser/uap-python")
4976 (synopsis "User agent parser")
4977 (description
4978 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4979 (license license:asl2.0)))
4980
4981(define-public python2-ua-parser
4982 (package-with-python2 python-ua-parser))
4983
4984(define-public python-user-agents
4985 (package
4986 (name "python-user-agents")
4987 (version "1.1.0")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (pypi-uri "user-agents" version))
4992 (sha256
4993 (base32
4994 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4995 (build-system python-build-system)
4996 (arguments
4997 `(#:tests? #f)) ;missing devices.json test file in release
4998 (propagated-inputs
4999 `(("python-ua-parser" ,python-ua-parser)))
5000 (home-page "https://github.com/selwin/python-user-agents")
5001 (synopsis "User Agent strings parsing library")
5002 (description
5003 "A library to identify devices (phones, tablets) and their capabilities by
5004parsing (browser/HTTP) user agent strings.")
5005 (license license:expat)))
5006
5007(define-public python2-user-agents
5008 (package-with-python2 python-user-agents))
5009
5010(define-public python-dbus
5011 (package
5012 (name "python-dbus")
5013 (version "1.2.8")
5014 (source
5015 (origin
5016 (method url-fetch)
5017 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5018 "dbus-python-" version ".tar.gz"))
5019 (sha256
5020 (base32
5021 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5022 (build-system gnu-build-system)
5023 (arguments
5024 '(#:phases
5025 (modify-phases %standard-phases
5026 (add-before
5027 'check 'pre-check
5028 (lambda _
5029 ;; XXX: For the missing '/etc/machine-id'.
5030 (substitute* "test/run-test.sh"
5031 (("DBUS_FATAL_WARNINGS=1")
5032 "DBUS_FATAL_WARNINGS=0"))
5033 #t)))))
5034 (native-inputs
5035 `(("pkg-config" ,pkg-config)))
5036 (inputs
5037 `(("python" ,python-wrapper)
5038 ("dbus-glib" ,dbus-glib)))
5039 (synopsis "Python bindings for D-bus")
5040 (description "python-dbus provides bindings for libdbus, the reference
5041implementation of D-Bus.")
5042 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5043 (license license:expat)))
5044
5045(define-public python2-dbus
5046 (package (inherit python-dbus)
5047 (name "python2-dbus")
5048 (inputs `(("python" ,python-2)
5049 ,@(alist-delete "python"
5050 (package-inputs python-dbus)
5051 equal?)))
5052 ;; FIXME: on Python 2, the test_utf8 fails with:
5053 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5054 (arguments `(#:tests? #f))))
5055
5056(define-public python-lxml
5057 (package
5058 (name "python-lxml")
5059 (version "4.2.5")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "lxml" version))
5064 (sha256
5065 (base32
5066 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5067 (build-system python-build-system)
5068 (inputs
5069 `(("libxml2" ,libxml2)
5070 ("libxslt" ,libxslt)))
5071 (home-page "http://lxml.de/")
5072 (synopsis
5073 "Python XML processing library")
5074 (description
5075 "The lxml XML toolkit is a Pythonic binding for the C libraries
5076libxml2 and libxslt.")
5077 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5078
5079(define-public python2-lxml
5080 (package-with-python2 python-lxml))
5081
5082;; beautifulsoup4 has a totally different namespace than 3.x,
5083;; and pypi seems to put it under its own name, so I guess we should too
5084(define-public python-beautifulsoup4
5085 (package
5086 (name "python-beautifulsoup4")
5087 (version "4.6.3")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (pypi-uri "beautifulsoup4" version))
5092 (sha256
5093 (base32
5094 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5095 (build-system python-build-system)
5096 (arguments
5097 `(#:phases
5098 (modify-phases %standard-phases
5099 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5100 ;; must use this conversion script when building with Python 3. The
5101 ;; conversion script also runs the tests.
5102 ;; For more information, see the file 'convert-py3k' in the source
5103 ;; distribution.
5104 (replace 'check
dff0197e 5105 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5106 (home-page
5107 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5108 (synopsis
5109 "Python screen-scraping library")
5110 (description
5111 "Beautiful Soup is a Python library designed for rapidly setting up
5112screen-scraping projects. It offers Pythonic idioms for navigating,
5113searching, and modifying a parse tree, providing a toolkit for
5114dissecting a document and extracting what you need. It automatically
5115converts incoming documents to Unicode and outgoing documents to UTF-8.")
5116 (license license:expat)
5117 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5118
5119(define-public python2-beautifulsoup4
5120 (package
5121 (inherit (package-with-python2
5122 (strip-python2-variant python-beautifulsoup4)))
5123 (arguments `(#:python ,python-2))))
5124
5125(define-public python-netifaces
5126 (package
5127 (name "python-netifaces")
5128 (version "0.10.7")
5129 (source
5130 (origin
5131 (method url-fetch)
5132 (uri (pypi-uri "netifaces" version))
5133 (sha256
5134 (base32
5135 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5136 (build-system python-build-system)
5137 (home-page "https://github.com/al45tair/netifaces")
5138 (synopsis
5139 "Python module for portable network interface information")
5140 (description
5141 "Netifaces is a Python module providing information on network
5142interfaces in an easy and portable manner.")
5143 (license license:expat)))
5144
5145(define-public python2-netifaces
5146 (package-with-python2 python-netifaces))
5147
5148(define-public python-networkx
5149 (package
5150 (name "python-networkx")
5151 (version "2.2")
5152 (source
5153 (origin
5154 (method url-fetch)
5155 (uri (pypi-uri "networkx" version ".zip"))
5156 (sha256
5157 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5158 (build-system python-build-system)
5159 ;; python-decorator is needed at runtime.
5160 (propagated-inputs
5161 `(("python-decorator" ,python-decorator)))
5162 (native-inputs
5163 `(("python-nose" ,python-nose)
5164 ("unzip" ,unzip)))
5165 (home-page "https://networkx.github.io/")
5166 (synopsis "Python module for creating and manipulating graphs and networks")
5167 (description
5168 "NetworkX is a Python package for the creation, manipulation, and study
5169of the structure, dynamics, and functions of complex networks.")
5170 (license license:bsd-3)))
5171
5172(define-public python2-networkx
5173 (package-with-python2 python-networkx))
5174
5175(define-public python-datrie
5176 (package
5177 (name "python-datrie")
5178 (version "0.7.1")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "datrie" version))
5183 (sha256
5184 (base32
5185 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5186 (build-system python-build-system)
5187 (arguments
5188 `(#:phases (modify-phases %standard-phases
5189 (add-before 'build 'cythonize
5190 (lambda _
5191 ;; Regenerate Cython classes to solve ABI issues with Python
5192 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5193 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5194 "src/stdio_ext.pxd" "-a"))))))
5195 (native-inputs
5196 `(("python-cython" ,python-cython)
5197 ("python-hypothesis" ,python-hypothesis)
5198 ("python-pytest" ,python-pytest)
5199 ("python-pytest-runner" ,python-pytest-runner)))
5200 (home-page "https://github.com/kmike/datrie")
5201 (synopsis "Fast, efficiently stored trie for Python")
5202 (description
5203 "This package provides a fast, efficiently stored trie implementation for
5204Python.")
5205 (license license:lgpl2.1+)))
5206
5207(define-public snakemake
5208 (package
5209 (name "snakemake")
5210 (version "5.2.4")
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (pypi-uri "snakemake" version))
5215 (sha256
5216 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5217 (build-system python-build-system)
5218 (arguments
5219 ;; TODO: Package missing test dependencies.
5220 '(#:tests? #f
5221 #:phases
5222 (modify-phases %standard-phases
5223 ;; For cluster execution Snakemake will call Python. Since there is
5224 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5225 ;; this by calling the snakemake wrapper instead.
5226 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5227 (lambda* (#:key outputs #:allow-other-keys)
5228 (substitute* "snakemake/executors.py"
5229 (("\\{sys.executable\\} -m snakemake")
5230 (string-append (assoc-ref outputs "out")
5231 "/bin/snakemake")))
5232 #t)))))
5233 (propagated-inputs
5234 `(("python-gitpython" ,python-gitpython)
5235 ("python-wrapt" ,python-wrapt)
5236 ("python-requests" ,python-requests)
5237 ("python-appdirs" ,python-appdirs)
5238 ("python-configargparse" ,python-configargparse)
5239 ("python-datrie" ,python-datrie)
5240 ("python-docutils" ,python-docutils)
5241 ("python-jinja2" ,python-jinja2)
5242 ("python-jsonschema" ,python-jsonschema)
5243 ("python-networkx" ,python-networkx)
5244 ("python-pyyaml" ,python-pyyaml)
5245 ("python-ratelimiter" ,python-ratelimiter)))
5246 (home-page "https://snakemake.readthedocs.io")
5247 (synopsis "Python-based execution environment for make-like workflows")
5248 (description
5249 "Snakemake aims to reduce the complexity of creating workflows by
5250providing a clean and modern domain specific specification language (DSL) in
5251Python style, together with a fast and comfortable execution environment.")
5252 (license license:expat)))
5253
5254;; This is currently needed for the pigx-* packages.
5255(define-public snakemake-4
5256 (package (inherit snakemake)
5257 (version "4.4.0")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (pypi-uri "snakemake" version))
5262 (sha256
5263 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5264 (propagated-inputs
5265 `(("python-wrapt" ,python-wrapt)
5266 ("python-requests" ,python-requests)
5267 ("python-appdirs" ,python-appdirs)
5268 ("python-configargparse" ,python-configargparse)
5269 ("python-pyyaml" ,python-pyyaml)
5270 ("python-ratelimiter" ,python-ratelimiter)))))
5271
5272(define-public python-pyqrcode
5273 (package
5274 (name "python-pyqrcode")
5275 (version "1.2.1")
5276 (source
5277 (origin
5278 (method url-fetch)
5279 (uri (pypi-uri "PyQRCode" version))
5280 (sha256
5281 (base32
5282 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5283 (build-system python-build-system)
5284 (home-page
5285 "https://github.com/mnooner256/pyqrcode")
5286 (synopsis "QR code generator")
5287 (description
5288 "Pyqrcode is a QR code generator written purely in Python with
5289SVG, EPS, PNG and terminal output.")
5290 (license license:bsd-3)))
5291
5292(define-public python-seaborn
5293 (package
5294 (name "python-seaborn")
5295 (version "0.9.0")
5296 (source
5297 (origin
5298 (method url-fetch)
5299 (uri (pypi-uri "seaborn" version))
5300 (sha256
5301 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5302 (build-system python-build-system)
5303 (arguments
5304 `(#:phases
5305 (modify-phases %standard-phases
5306 (add-before 'check 'start-xserver
5307 (lambda* (#:key inputs #:allow-other-keys)
5308 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5309 ;; There must be a running X server and make check doesn't
5310 ;; start one. Therefore we must do it.
5311 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5312 (setenv "DISPLAY" ":1")
5313 #t)))
5314 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5315 (propagated-inputs
5316 `(("python-pandas" ,python-pandas)
5317 ("python-matplotlib" ,python-matplotlib)
5318 ("python-numpy" ,python-numpy)
5319 ("python-scipy" ,python-scipy)))
5320 (native-inputs
5321 `(("python-pytest" ,python-pytest)
5322 ("xorg-server" ,xorg-server)))
5323 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5324 (synopsis "Statistical data visualization")
5325 (description
5326 "Seaborn is a library for making attractive and informative statistical
5327graphics in Python. It is built on top of matplotlib and tightly integrated
5328with the PyData stack, including support for numpy and pandas data structures
5329and statistical routines from scipy and statsmodels.")
5330 (license license:bsd-3)))
5331
5332(define-public python2-seaborn
5333 (package-with-python2 python-seaborn))
5334
5335(define-public python-mpmath
5336 (package
5337 (name "python-mpmath")
5338 (version "0.19")
5339 (source (origin
5340 (method url-fetch)
5341 (uri (string-append "http://mpmath.org/files/mpmath-"
5342 version ".tar.gz"))
5343 (sha256
5344 (base32
5345 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5346 (build-system python-build-system)
5347 (arguments
5348 '(#:phases
5349 (modify-phases %standard-phases
5350 (replace 'check
5351 (lambda _
5d7a6f1c 5352 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5353 (home-page "http://mpmath.org")
5354 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5355 (description
5356 "@code{mpmath} can be used as an arbitrary-precision substitute for
5357Python's float/complex types and math/cmath modules, but also does much
5358more advanced mathematics.")
5359 (license license:bsd-3)))
5360
5361(define-public python2-mpmath
5362 (package-with-python2 python-mpmath))
5363
5364(define-public python-bigfloat
5365 (package
5366 (name "python-bigfloat")
5367 (version "0.3.0")
5368 (source
5369 (origin
5370 (method url-fetch)
5371 (uri (pypi-uri "bigfloat" version))
5372 (sha256
5373 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5374 (build-system python-build-system)
5375 (inputs
5376 `(("mpfr" ,mpfr)))
5377 (home-page "https://github.com/mdickinson/bigfloat")
5378 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5379 (description
5380 "This packages provides a Python interface to the MPFR library for
5381multiprecision arithmetic.")
5382 (license license:lgpl3+)))
5383
5384(define-public python2-bigfloat
5385 (package-with-python2 python-bigfloat))
5386
5387(define-public python-sympy
5388 (package
5389 (name "python-sympy")
5390 (version "1.1.1")
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (string-append
5395 "https://github.com/sympy/sympy/releases/download/sympy-"
5396 version "/sympy-" version ".tar.gz"))
5397 (sha256
5398 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5399 (build-system python-build-system)
5400 (arguments
5401 `(#:phases
5402 (modify-phases %standard-phases
5403 ;; Run the core tests after installation. By default it would run
5404 ;; *all* tests, which take a very long time to complete and are known
5405 ;; to be flaky.
5406 (delete 'check)
5407 (add-after 'install 'check
5408 (lambda* (#:key outputs #:allow-other-keys)
5409 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5410 #t)))))
5411 (propagated-inputs
5412 `(("python-mpmath" ,python-mpmath)))
5413 (home-page "http://www.sympy.org/")
5414 (synopsis "Python library for symbolic mathematics")
5415 (description
5416 "SymPy is a Python library for symbolic mathematics. It aims to become a
5417full-featured computer algebra system (CAS) while keeping the code as simple
5418as possible in order to be comprehensible and easily extensible.")
5419 (license license:bsd-3)))
5420
5421(define-public python2-sympy
5422 (package
5423 (inherit (package-with-python2 python-sympy))
5424 (arguments
5425 `(#:phases
5426 (modify-phases %standard-phases
5427 ;; Run the core tests after installation. By default it would run
5428 ;; *all* tests, which take a very long time to complete and are known
5429 ;; to be flaky.
5430 (delete 'check)
5431 (add-after 'install 'check
5432 (lambda* (#:key outputs #:allow-other-keys)
5433 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5434 #t)))))))
5435
5436(define-public python-q
5437 (package
5438 (name "python-q")
5439 (version "2.6")
5440 (source
5441 (origin
5442 (method url-fetch)
5443 (uri (pypi-uri "q" version))
5444 (sha256
5445 (base32
5446 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5447 (build-system python-build-system)
5448 (home-page "https://github.com/zestyping/q")
5449 (synopsis "Quick-and-dirty debugging output for tired programmers")
5450 (description
5451 "q is a Python module for \"print\" style of debugging Python code. It
5452provides convenient short API for print out of values, tracebacks, and
5453falling into the Python interpreter.")
5454 (license license:asl2.0)))
5455
5456(define-public python2-q
5457 (package-with-python2 python-q))
5458
5459(define-public python2-xlib
5460 (package
5461 (name "python2-xlib")
5462 (version "0.14")
5463 (source (origin
5464 (method url-fetch)
5465 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5466 "/" version "/"
5467 "python-xlib-" version ".tar.gz"))
5468 (sha256
5469 (base32
5470 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5471 (build-system python-build-system)
5472 (arguments
5473 `(#:python ,python-2 ;Python 2 only
5474 #:tests? #f)) ;no tests
5475 (home-page "http://python-xlib.sourceforge.net/")
5476 (synopsis "Python X11 client library")
5477 (description
5478 "The Python X Library is intended to be a fully functional X client
5479library for Python programs. It is useful to implement low-level X clients.
5480It is written entirely in Python.")
5481 (license license:gpl2+)))
5482
5483(define-public python-singledispatch
5484 (package
5485 (name "python-singledispatch")
5486 (version "3.4.0.3")
5487 (source
5488 (origin
5489 (method url-fetch)
5490 (uri (pypi-uri "singledispatch" version))
5491 (sha256
5492 (base32
5493 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5494 (build-system python-build-system)
5495 (native-inputs
5496 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5497 (home-page
5498 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5499 (synopsis "Backport of singledispatch feature from Python 3.4")
5500 (description
5501 "This library brings functools.singledispatch from Python 3.4 to Python
55022.6-3.3.")
5503 (license license:expat)))
5504
5505(define-public python2-singledispatch
5506 (package-with-python2 python-singledispatch))
5507
5508;; the python- version can be removed with python-3.5
5509(define-public python-backports-abc
5510 (package
5511 (name "python-backports-abc")
5512 (version "0.5")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (pypi-uri "backports_abc" version))
5517 (sha256
5518 (base32
5519 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5520 (build-system python-build-system)
5521 (home-page "https://github.com/cython/backports_abc")
5522 (synopsis "Backport of additions to the 'collections.abc' module")
5523 (description
5524 "Python-backports-abc provides a backport of additions to the
5525'collections.abc' module in Python-3.5.")
5526 (license license:psfl)))
5527
5528(define-public python2-backports-abc
5529 (package-with-python2 python-backports-abc))
5530
5531(define-public python-backports-csv
5532 (package
5533 (name "python-backports-csv")
5534 (version "1.0.5")
5535 (source
5536 (origin
5537 (method url-fetch)
5538 (uri (pypi-uri "backports.csv" version))
5539 (sha256
5540 (base32
5541 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5542 (build-system python-build-system)
5543 (home-page "https://github.com/ryanhiebert/backports.csv")
5544 (synopsis "Backport of Python 3's csv module for Python 2")
5545 (description
5546 "Provides a backport of Python 3's @code{csv} module for parsing
5547comma separated values. The API of the @code{csv} module in Python 2
5548is drastically different from the @code{csv} module in Python 3.
5549This is due, for the most part, to the difference between str in
5550Python 2 and Python 3.")
5551 (license license:psfl)))
5552
5553(define-public python2-backports-csv
5554 (package-with-python2 python-backports-csv))
5555
5556(define-public python2-backports-shutil-get-terminal-size
5557 (package
5558 (name "python2-backports-shutil-get-terminal-size")
5559 (version "1.0.0")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5564 (sha256
5565 (base32
5566 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5567 (build-system python-build-system)
5568 (arguments
5569 `(#:python ,python-2
5570 #:phases
5571 (modify-phases %standard-phases
5572 (replace 'check
5573 (lambda _
4a4a7d9a 5574 (invoke "py.test" "-v"))))))
44d10b1f
RW
5575 (native-inputs
5576 `(("python2-pytest" ,python2-pytest)))
5577 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5578 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5579 (description
5580 "This package provides a backport of the @code{get_terminal_size
5581function} from Python 3.3's @code{shutil}.
5582Unlike the original version it is written in pure Python rather than C,
5583so it might be a tiny bit slower.")
5584 (license license:expat)))
5585
5586(define-public python-waf
5587 (package
5588 (name "python-waf")
5589 (version "2.0.11")
5590 (source (origin
5591 (method url-fetch)
5592 (uri (string-append "https://waf.io/"
5593 "waf-" version ".tar.bz2"))
5594 (sha256
5595 (base32
5596 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5597 (build-system python-build-system)
5598 (arguments
5599 '(#:phases
5600 (modify-phases %standard-phases
5601 (replace 'build
5602 (lambda _
5603 (invoke "python" "waf-light" "configure" "build")))
5604 (replace 'check
5605 (lambda _
5606 (invoke "python" "waf" "--version")))
5607 (replace 'install
5608 (lambda* (#:key outputs #:allow-other-keys)
5609 (let ((out (assoc-ref outputs "out")))
5610 (install-file "waf" (string-append out "/bin")))
5611 #t))
5612 ;; waf breaks when it is wrapped.
5613 (delete 'wrap))))
5614 (home-page "https://waf.io/")
5615 (synopsis "Python-based build system")
5616 (description
5617 "Waf is a Python-based framework for configuring, compiling and installing
5618applications.")
5619 (license license:bsd-3)))
5620
5621(define-public python2-waf
5622 (package-with-python2 python-waf))
5623
5624(define-public python-pyzmq
5625 (package
5626 (name "python-pyzmq")
5627 (version "17.1.2")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "pyzmq" version))
5632 (sha256
5633 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5634 (build-system python-build-system)
5635 (arguments
5636 `(#:configure-flags
5637 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5638 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5639 ;; --inplace' for 'python setup.py test' to work.
5640 #:tests? #f))
5641 (inputs
5642 `(("zeromq" ,zeromq)))
5643 (native-inputs
5644 `(("pkg-config" ,pkg-config)
5645 ("python-nose" ,python-nose)))
5646 (home-page "https://github.com/zeromq/pyzmq")
5647 (synopsis "Python bindings for 0MQ")
5648 (description
5649 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5650 (license license:bsd-4)))
5651
5652(define-public python2-pyzmq
5653 (package-with-python2 python-pyzmq))
5654
5655(define-public python-pep8
5656 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5657 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5658 ;; some dependents' test suites, and nothing more.
5659 (package
5660 (name "python-pep8")
5661 (version "1.7.0")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (pypi-uri "pep8" version))
5666 (sha256
5667 (base32
5668 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5669 (build-system python-build-system)
5670 (home-page "https://pep8.readthedocs.org/")
5671 (synopsis "Python style guide checker")
5672 (description
5673 "This tools checks Python code against some of the style conventions in
5674PEP 8.")
5675 (license license:expat)))
5676
5677(define-public python2-pep8
5678 (package-with-python2 python-pep8))
5679
5680(define-public python-pyflakes
5681 (package
5682 (name "python-pyflakes")
d0cba11b 5683 (version "2.1.1")
44d10b1f
RW
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "pyflakes" version))
5688 (sha256
5689 (base32
d0cba11b 5690 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
5691 (build-system python-build-system)
5692 (home-page
5693 "https://github.com/pyflakes/pyflakes")
5694 (synopsis "Passive checker of Python programs")
5695 (description
5696 "Pyflakes statically checks Python source code for common errors.")
5697 (license license:expat)))
5698
5699(define-public python2-pyflakes
5700 (package-with-python2 python-pyflakes))
5701
5702(define-public python-mccabe
5703 (package
5704 (name "python-mccabe")
5705 (version "0.6.1")
5706 (source
5707 (origin
5708 (method url-fetch)
5709 (uri (pypi-uri "mccabe" version))
5710 (sha256
5711 (base32
5712 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5713 (build-system python-build-system)
5714 (native-inputs
5715 `(("python-pytest" ,python-pytest-bootstrap)
5716 ("python-pytest-runner" ,python-pytest-runner)))
5717 (home-page "https://github.com/flintwork/mccabe")
5718 (synopsis "McCabe checker, plugin for flake8")
5719 (description
5720 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5721complexity of Python source code.")
5722 (license license:expat)))
5723
5724(define-public python2-mccabe
5725 (package-with-python2 python-mccabe))
5726
5727(define-public python-mccabe-0.2.1
5728 (package (inherit python-mccabe)
5729 (version "0.2.1")
5730 (source
5731 (origin
5732 (method url-fetch)
5733 (uri (pypi-uri "mccabe" version))
5734 (sha256
5735 (base32
5736 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5737
5738(define-public python2-mccabe-0.2.1
5739 (package-with-python2 python-mccabe-0.2.1))
5740
5741;; Flake8 2.4.1 requires an older version of pep8.
5742;; This should be removed ASAP.
5743(define-public python-pep8-1.5.7
5744 (package (inherit python-pep8)
5745 (version "1.5.7")
5746 (source
f3576970
RW
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "pep8" version))
5750 (sha256
5751 (base32
5752 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5753 (arguments
5754 ;; XXX Tests not compatible with Python 3.5.
5755 '(#:tests? #f))))
5756
5757(define-public python2-pep8-1.5.7
5758 (package-with-python2 python-pep8-1.5.7))
5759
5760;; Flake8 2.4.1 requires an older version of pyflakes.
5761;; This should be removed ASAP.
5762(define-public python-pyflakes-0.8.1
5763 (package (inherit python-pyflakes)
5764 (version "0.8.1")
5765 (source
8c4dffb5
RW
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "pyflakes" version))
5769 (sha256
5770 (base32
5771 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5772 (arguments
5773 ;; XXX Tests not compatible with Python 3.5.
5774 '(#:tests? #f))))
5775
5776(define-public python2-pyflakes-0.8.1
5777 (package-with-python2 python-pyflakes-0.8.1))
5778
ac63cf0a 5779(define-public python-flake8
44d10b1f
RW
5780 (package
5781 (name "python-flake8")
beaff4a8 5782 (version "3.7.7")
ac63cf0a
MB
5783 (source (origin
5784 (method url-fetch)
5785 (uri (pypi-uri "flake8" version))
5786 (sha256
5787 (base32
beaff4a8 5788 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
5789 (build-system python-build-system)
5790 (arguments
5791 `(#:phases
5792 (modify-phases %standard-phases
44d10b1f
RW
5793 (delete 'check)
5794 (add-after 'install 'check
5795 (lambda* (#:key inputs outputs #:allow-other-keys)
5796 (add-installed-pythonpath inputs outputs)
5797 (invoke "pytest" "-v")
5798 #t)))))
5799 (propagated-inputs
5800 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 5801 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
5802 ("python-pyflakes" ,python-pyflakes)
5803 ("python-mccabe" ,python-mccabe)))
5804 (native-inputs
5805 `(("python-mock" ,python-mock)
5806 ("python-pytest" ,python-pytest-bootstrap)
5807 ("python-pytest-runner" ,python-pytest-runner)))
5808 (home-page "https://gitlab.com/pycqa/flake8")
5809 (synopsis
5810 "The modular source code checker: pep8, pyflakes and co")
5811 (description
5812 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 5813 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
5814 (license license:expat)))
5815
ac63cf0a
MB
5816(define-public python2-flake8
5817 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
5818 (package (inherit base)
5819 (propagated-inputs
5820 `(("python2-configparser" ,python2-configparser)
5821 ("python2-enum34" ,python2-enum34)
beaff4a8 5822 ("python2-typing" ,python2-typing)
44d10b1f
RW
5823 ,@(package-propagated-inputs base))))))
5824
44d10b1f
RW
5825;; python-hacking requires flake8 <2.6.0.
5826(define-public python-flake8-2.5
5827 (package
5828 (inherit python-flake8)
5829 (version "2.5.5")
5830 (source (origin
5831 (method url-fetch)
5832 (uri (pypi-uri "flake8" version))
5833 (sha256
5834 (base32
5835 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5836 (propagated-inputs
5837 `(("python-pep8" ,python-pep8)
5838 ,@(package-propagated-inputs python-flake8)))
5839 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5840
5841(define-public python2-flake8-2.5
5842 (package
5843 (inherit python2-flake8)
5844 (version (package-version python-flake8-2.5))
5845 (source (origin
5846 (inherit (package-source python-flake8-2.5))))
5847 (propagated-inputs
5848 `(("python2-pep8" ,python2-pep8)
5849 ,@(package-propagated-inputs python2-flake8)))))
5850
5851(define-public python-flake8-polyfill
5852 (package
5853 (name "python-flake8-polyfill")
5854 (version "1.0.2")
5855 (source
5856 (origin
5857 (method url-fetch)
5858 (uri (pypi-uri "flake8-polyfill" version))
5859 (sha256
5860 (base32
5861 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5862 (build-system python-build-system)
5863 (arguments
5864 '(#:phases
5865 (modify-phases %standard-phases
5866 (replace 'check
5867 (lambda _
5868 (setenv "PYTHONPATH"
5869 (string-append (getcwd) "/build/lib:"
5870 (getenv "PYTHONPATH")))
4f0a0894 5871 (invoke "py.test" "-v"))))))
44d10b1f
RW
5872 (native-inputs
5873 `(("python-flake8" ,python-flake8)
5874 ("python-mock" ,python-mock)
5875 ("python-pep8" ,python-pep8)
5876 ("python-pycodestyle" ,python-pycodestyle)
5877 ("python-pytest" ,python-pytest)))
5878 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5879 (synopsis "Polyfill package for Flake8 plugins")
5880 (description
5881 "This package that provides some compatibility helpers for Flake8
5882plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5883 (license license:expat)))
5884
5885(define-public python2-flake8-polyfill
5886 (package-with-python2 python-flake8-polyfill))
5887
5888(define-public python-mistune
5889 (package
5890 (name "python-mistune")
5891 (version "0.8.4")
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "mistune" version))
5896 (sha256
5897 (base32
5898 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5899 (build-system python-build-system)
5900 (native-inputs
5901 `(("python-nose" ,python-nose)
5902 ("python-cython" ,python-cython)))
5903 (home-page "https://github.com/lepture/mistune")
5904 (synopsis "Markdown parser in pure Python")
5905 (description "This package provides a fast markdown parser in pure
5906Python.")
5907 (license license:bsd-3)))
5908
5909(define-public python2-mistune
5910 (package-with-python2 python-mistune))
5911
5912(define-public python-markdown
5913 (package
5914 (name "python-markdown")
5915 (version "3.0.1")
5916 (source
5917 (origin
5918 (method url-fetch)
5919 (uri (pypi-uri "Markdown" version))
5920 (sha256
5921 (base32
5922 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5923 (build-system python-build-system)
5924 (native-inputs
5925 `(("python-nose" ,python-nose)
5926 ("python-pyyaml" ,python-pyyaml)))
5927 (home-page "https://python-markdown.github.io/")
5928 (synopsis "Python implementation of Markdown")
5929 (description
5930 "This package provides a Python implementation of John Gruber's
5931Markdown. The library features international input, various Markdown
5932extensions, and several HTML output formats. A command line wrapper
5933markdown_py is also provided to convert Markdown files to HTML.")
5934 (license license:bsd-3)))
5935
5936(define-public python2-markdown
5937 (package-with-python2 python-markdown))
5938
5939(define-public python-ptyprocess
5940 (package
5941 (name "python-ptyprocess")
5942 (version "0.5.2")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "ptyprocess" version))
5947 (sha256
5948 (base32
5949 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5950 (build-system python-build-system)
5951 (native-inputs
5952 `(("python-nose" ,python-nose)))
5953 (arguments
5954 `(#:phases
5955 (modify-phases %standard-phases
5956 (replace 'check
7904d6fa 5957 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5958 (home-page "https://github.com/pexpect/ptyprocess")
5959 (synopsis "Run a subprocess in a pseudo terminal")
5960 (description
5961 "This package provides a Python library used to launch a subprocess in a
5962pseudo terminal (pty), and interact with both the process and its pty.")
5963 (license license:isc)))
5964
5965(define-public python2-ptyprocess
5966 (package-with-python2 python-ptyprocess))
5967
5968(define-public python-cram
5969 (package
5970 (name "python-cram")
5971 (version "0.7")
5972 (home-page "https://bitheap.org/cram/")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (list (string-append home-page "cram-"
5976 version ".tar.gz")
5977 (pypi-uri "cram" version)))
5978 (sha256
5979 (base32
5980 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5981 (arguments
5982 '(#:phases
5983 (modify-phases %standard-phases
5984 (add-after 'unpack 'patch-source
5985 (lambda _
5986 (substitute* (find-files "cram" ".*\\.py$")
5987 ;; Replace default shell path.
5988 (("/bin/sh") (which "sh")))
5989 (substitute* (find-files "tests" ".*\\.t$")
5990 (("md5") "md5sum")
5991 (("/bin/bash") (which "bash"))
5992 (("/bin/sh") (which "sh")))
5993 (substitute* "cram/_test.py"
5994 ;; This hack works around a bug triggered by substituting
5995 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5996 ;; "cram -h", which breaks the output at 80 characters. This
5997 ;; causes the line showing the default shell to break into two
5998 ;; lines, but the test expects a single line...
5999 (("env\\['COLUMNS'\\] = '80'")
6000 "env['COLUMNS'] = '160'"))
6001 #t))
6002 (delete 'check)
6003 (add-after 'install 'check
6004 ;; The test phase uses the built library and executable.
6005 ;; It's easier to run it after install since the build
6006 ;; directory contains version-specific PATH.
6007 (lambda* (#:key inputs outputs #:allow-other-keys)
6008 (add-installed-pythonpath inputs outputs)
6009 (setenv "PATH" (string-append (getenv "PATH") ":"
6010 (assoc-ref outputs "out") "/bin"))
2d7db192 6011 (invoke "make" "test"))))))
44d10b1f
RW
6012 (build-system python-build-system)
6013 (native-inputs
6014 `(("python-coverage" ,python-coverage)
6015 ("which" ,which)))
6016 (synopsis "Simple testing framework for command line applications")
6017 (description
6018 "Cram is a functional testing framework for command line applications.
6019Cram tests look like snippets of interactive shell sessions. Cram runs each
6020command and compares the command output in the test with the command’s actual
6021output.")
6022 (license license:gpl2+)))
6023
6024(define-public python2-cram
6025 (package-with-python2 python-cram))
6026
6027(define-public python-straight-plugin
6028 (package
6029 (name "python-straight-plugin")
6030 (version "1.4.1")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "straight.plugin" version))
6035 (sha256
6036 (base32
6037 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6038 (build-system python-build-system)
6039 (home-page "https://github.com/ironfroggy/straight.plugin")
6040 (synopsis "Simple namespaced plugin facility")
6041 (description "Straight Plugin provides a type of plugin you can create from
6042almost any existing Python modules, and an easy way for outside developers to
6043add functionality and customization to your projects with their own plugins.")
6044 (license license:expat)))
6045
6046(define-public python2-straight-plugin
6047 (package-with-python2 python-straight-plugin))
6048
6049(define-public python-fonttools
6050 (package
6051 (name "python-fonttools")
1a4bb420 6052 (version "3.38.0")
44d10b1f
RW
6053 (source (origin
6054 (method url-fetch)
6055 (uri (pypi-uri "fonttools" version ".zip"))
6056 (sha256
6057 (base32
1a4bb420 6058 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6059 (build-system python-build-system)
6060 (native-inputs
6061 `(("unzip" ,unzip)
6062 ("python-pytest" ,python-pytest)
6063 ("python-pytest-runner" ,python-pytest-runner)))
6064 (home-page "https://github.com/behdad/fonttools")
6065 (synopsis "Tools to manipulate font files")
6066 (description
6067 "FontTools/TTX is a library to manipulate font files from Python. It
6068supports reading and writing of TrueType/OpenType fonts, reading and writing
6069of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6070also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6071from an XML-based format.")
6072 (license license:expat)))
6073
6074(define-public python2-fonttools
6075 (package-with-python2 python-fonttools))
6076
6077(define-public python-ly
6078 (package
6079 (name "python-ly")
6080 (version "0.9.5")
6081 (source
6082 (origin
6083 (method url-fetch)
6084 (uri (pypi-uri name version))
6085 (sha256
6086 (base32
6087 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6088 (build-system python-build-system)
6089 (arguments
6090 ;; FIXME: Some tests need network access.
6091 '(#:tests? #f))
6092 (synopsis "Tool and library for manipulating LilyPond files")
6093 (description "This package provides a Python library to parse, manipulate
6094or create documents in LilyPond format. A command line program ly is also
6095provided that can be used to do various manipulations with LilyPond files.")
6096 (home-page "https://pypi.python.org/pypi/python-ly")
6097 (license license:gpl2+)))
6098
6099(define-public python-appdirs
6100 (package
6101 (name "python-appdirs")
6102 (version "1.4.3")
6103 (source
6104 (origin
6105 (method url-fetch)
6106 (uri (pypi-uri "appdirs" version))
6107 (sha256
6108 (base32
6109 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6110 (build-system python-build-system)
6111 (home-page "https://github.com/ActiveState/appdirs")
6112 (synopsis
6113 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6114 (description
6115 "This module provides a portable way of finding out where user data
6116should be stored on various operating systems.")
6117 (license license:expat)))
6118
6119(define-public python2-appdirs
6120 (package-with-python2 python-appdirs))
6121
6122(define-public python-llfuse
6123 (package
6124 (name "python-llfuse")
6125 (version "1.3.5")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6129 (sha256
6130 (base32
6131 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6132 (build-system python-build-system)
6133 (inputs
6134 `(("fuse" ,fuse)
6135 ("attr" ,attr)))
6136 (native-inputs
6137 `(("pkg-config" ,pkg-config)))
6138 (synopsis "Python bindings for FUSE")
6139 (description
6140 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6141 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6142 (license license:lgpl2.0+)
6143 (properties `((python2-variant . ,(delay python2-llfuse))))))
6144
6145(define-public python2-llfuse
6146 (package (inherit (package-with-python2
6147 (strip-python2-variant python-llfuse)))
6148 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6149
6150;; For attic-0.16
6151(define-public python-llfuse-0.41
6152 (package (inherit python-llfuse)
6153 (version "0.41.1")
6154 (source (origin
6155 (method url-fetch)
6156 (uri (string-append
6157 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6158 "llfuse-" version ".tar.bz2"))
6159 (sha256
6160 (base32
6161 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6162 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6163 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6164 (license (list license:expat license:lgpl2.0+))))
6165
6166(define-public python-msgpack
6167 (package
6168 (name "python-msgpack")
6169 (version "0.5.6")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (pypi-uri "msgpack" version))
6173 (sha256
6174 (base32
6175 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6176 (build-system python-build-system)
6177 (arguments
6178 `(#:modules ((guix build utils)
6179 (guix build python-build-system)
6180 (ice-9 ftw)
6181 (srfi srfi-1)
6182 (srfi srfi-26))
6183 #:phases
6184 (modify-phases %standard-phases
6185 (replace 'check
6186 (lambda _
6187 (let ((cwd (getcwd)))
6188 (setenv "PYTHONPATH"
6189 (string-append cwd "/build/"
6190 (find (cut string-prefix? "lib" <>)
6191 (scandir (string-append cwd "/build")))
6192 ":"
6193 (getenv "PYTHONPATH")))
6194 (invoke "pytest" "-v" "test")))))))
6195 (native-inputs
6196 `(("python-pytest" ,python-pytest)))
6197 (synopsis "MessagePack (de)serializer")
6198 (description "MessagePack is a fast, compact binary serialization format,
6199suitable for similar data to JSON. This package provides CPython bindings for
6200reading and writing MessagePack data.")
6201 (home-page "https://pypi.python.org/pypi/msgpack/")
6202 (license license:asl2.0)))
6203
6204;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6205;; release 0.5. Some packages like borg still call it by the old name for now.
6206;; <https://bugs.gnu.org/30662>
6207(define-public python-msgpack-transitional
6208 (package
6209 (inherit python-msgpack)
6210 (name "python-msgpack-transitional")
6211 (arguments
6212 (substitute-keyword-arguments (package-arguments python-msgpack)
6213 ((#:phases phases)
6214 `(modify-phases ,phases
6215 (add-after 'unpack 'configure-transitional
6216 (lambda _
6217 ;; Keep using the old name.
6218 (substitute* "setup.py"
6219 (("TRANSITIONAL = False")
6220 "TRANSITIONAL = 1"))
6221 #t))))))))
6222
6223(define-public python2-msgpack
6224 (package-with-python2 python-msgpack))
6225
6226(define-public python-netaddr
6227 (package
6228 (name "python-netaddr")
6229 (version "0.7.19")
6230 (source
6231 (origin
6232 (method url-fetch)
6233 (uri (pypi-uri "netaddr" version))
6234 (sha256
6235 (base32
6236 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6237 (build-system python-build-system)
6238 (arguments `(#:tests? #f)) ;; No tests.
6239 (home-page "https://github.com/drkjam/netaddr/")
6240 (synopsis "Pythonic manipulation of network addresses")
6241 (description
6242 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6243and MAC network addresses.")
6244 (license license:bsd-3)))
6245
6246(define-public python2-netaddr
6247 (package-with-python2 python-netaddr))
6248
6249(define-public python-wrapt
6250 (package
6251 (name "python-wrapt")
dddd7a75 6252 (version "1.11.1")
44d10b1f
RW
6253 (source
6254 (origin
6255 (method url-fetch)
6256 (uri (pypi-uri "wrapt" version))
6257 (sha256
6258 (base32
dddd7a75 6259 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6260 (build-system python-build-system)
6261 (arguments
6262 ;; Tests are not included in the tarball, they are only available in the
6263 ;; git repository.
6264 `(#:tests? #f))
6265 (home-page "https://github.com/GrahamDumpleton/wrapt")
6266 (synopsis "Module for decorators, wrappers and monkey patching")
6267 (description
6268 "The aim of the wrapt module is to provide a transparent object proxy for
6269 Python, which can be used as the basis for the construction of function
6270 wrappers and decorator functions.")
6271 (license license:bsd-2)))
6272
6273(define-public python2-wrapt
6274 (package-with-python2 python-wrapt))
6275
6276(define-public python-xlrd
6277 (package
6278 (name "python-xlrd")
6279 (version "1.0.0")
6280 (source (origin
6281 (method url-fetch)
6282 (uri (pypi-uri "xlrd" version))
6283 (sha256
6284 (base32
6285 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6286 (build-system python-build-system)
6287 (arguments
6288 `(#:phases
6289 (modify-phases %standard-phases
6290 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6291 ;; run tests instead for now.
45fd0081 6292 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6293 (native-inputs `(("python-nose" ,python-nose)))
6294 (home-page "http://www.python-excel.org/")
6295 (synopsis "Library for extracting data from Excel files")
6296 (description "This packages provides a library to extract data from
6297spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6298@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6299Unicode-aware. It is not intended as an end-user tool.")
6300 (license license:bsd-3)))
6301
6302(define-public python2-xlrd
6303 (package-with-python2 python-xlrd))
6304
6305(define-public python-prettytable
6306 (package
6307 (name "python-prettytable")
6308 (version "0.7.2")
6309 (source
6310 (origin
6311 (method url-fetch)
337c3a1e 6312 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6313 (sha256
6314 (base32
6315 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6316 (build-system python-build-system)
6317 (home-page "http://code.google.com/p/prettytable/")
6318 (synopsis "Display tabular data in an ASCII table format")
6319 (description
6320 "A library designed to represent tabular data in visually appealing ASCII
6321tables. PrettyTable allows for selection of which columns are to be printed,
6322independent alignment of columns (left or right justified or centred) and
6323printing of sub-tables by specifying a row range.")
6324 (license license:bsd-3)))
6325
6326(define-public python2-prettytable
6327 (package-with-python2 python-prettytable))
6328
6329(define-public python-tables
6330 (package
6331 (name "python-tables")
6332 (version "3.4.4")
6333 (source
6334 (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "tables" version))
6337 (sha256
6338 (base32
6339 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6340 (modules '((guix build utils)))
6341 (snippet
6342 '(begin
6343 ;; Remove pre-compiled .pyc files from source.
6344 (for-each delete-file-recursively
6345 (find-files "." "__pycache__" #:directories? #t))
6346 (for-each delete-file (find-files "." "\\.pyc$"))
6347 #t))))
6348 (build-system python-build-system)
6349 (arguments
6350 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6351 ;; or "check", so we must override the build and check phases.
6352 #:phases
6353 (modify-phases %standard-phases
6354 (add-after 'unpack 'use-gcc
6355 (lambda _
6356 (substitute* "setup.py"
6357 (("compiler = new_compiler\\(\\)" line)
6358 (string-append line
6359 "\ncompiler.set_executables(compiler='gcc',"
6360 "compiler_so='gcc',"
6361 "linker_exe='gcc',"
6362 "linker_so='gcc -shared')")))
6363 #t))
6364 (replace 'build
6365 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6366 (invoke "python" "setup.py" "build"
6367 (string-append "--hdf5="
6368 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6369 (replace 'check
6370 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6371 (invoke "python" "setup.py" "check"
6372 (string-append "--hdf5="
6373 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6374 (propagated-inputs
6375 `(("python-numexpr" ,python-numexpr)
6376 ("python-numpy" ,python-numpy)))
6377 (native-inputs
6378 `(("python-cython" ,python-cython)
6379 ("pkg-config" ,pkg-config)))
6380 (inputs
6381 `(("hdf5" ,hdf5)
6382 ("bzip2" ,bzip2)
6383 ("zlib" ,zlib)))
6384 (home-page "http://www.pytables.org/")
6385 (synopsis "Hierarchical datasets for Python")
6386 (description "PyTables is a package for managing hierarchical datasets and
6387designed to efficiently cope with extremely large amounts of data.")
6388 (license license:bsd-3)))
6389
6390(define-public python2-tables
6391 (package-with-python2 python-tables))
6392
6393(define-public python-pyasn1
6394 (package
6395 (name "python-pyasn1")
6396 (version "0.4.3")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (pypi-uri "pyasn1" version))
6401 (sha256
6402 (base32
6403 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6404 (build-system python-build-system)
6405 (home-page "http://pyasn1.sourceforge.net/")
6406 (synopsis "ASN.1 types and codecs")
6407 (description
6408 "This is an implementation of ASN.1 types and codecs in Python. It is
6409suitable for a wide range of protocols based on the ASN.1 specification.")
6410 (license license:bsd-2)))
6411
6412(define-public python2-pyasn1
6413 (package-with-python2 python-pyasn1))
6414
6415(define-public python-pyasn1-modules
6416 (package
6417 (name "python-pyasn1-modules")
6418 (version "0.2.2")
6419 (source
6420 (origin
6421 (method url-fetch)
6422 (uri (pypi-uri "pyasn1-modules" version))
6423 (sha256
6424 (base32
6425 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6426 (build-system python-build-system)
6427 (propagated-inputs
6428 `(("python-pyasn1" ,python-pyasn1)))
6429 (home-page "https://sourceforge.net/projects/pyasn1/")
6430 (synopsis "ASN.1 codec implementations")
6431 (description
6432 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6433implementations of ASN.1-based codecs and protocols.")
6434 (license license:bsd-3)))
6435
6436(define-public python2-pyasn1-modules
6437 (package-with-python2 python-pyasn1-modules))
6438
6439(define-public python-ipaddress
6440 (package
6441 (name "python-ipaddress")
6442 (version "1.0.22")
6443 (source (origin
6444 (method url-fetch)
6445 (uri (pypi-uri "ipaddress" version))
6446 (sha256
6447 (base32
6448 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6449 (build-system python-build-system)
6450 (home-page "https://github.com/phihag/ipaddress")
6451 (synopsis "IP address manipulation library")
6452 (description
6453 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6454 in Python. This library is used to create, poke at, and manipulate IPv4 and
6455 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6456 module to older versions of Python.")
6457 (license license:psfl)))
6458
6459(define-public python2-ipaddress
6460 (package-with-python2 python-ipaddress))
6461
6462(define-public python2-ipaddr
6463 (package
6464 (name "python2-ipaddr")
6465 (version "2.1.11")
6466 (source
6467 (origin
6468 (method url-fetch)
6469 (uri (pypi-uri "ipaddr" version))
6470 (sha256
6471 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6472 (build-system python-build-system)
6473 (arguments
6474 `(#:python ,python-2 ;version 2 only
6475 #:phases
6476 (modify-phases %standard-phases
6477 (replace 'check
40b8c4e3 6478 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6479 (home-page "https://github.com/google/ipaddr-py")
6480 (synopsis "IP address manipulation library")
6481 (description
6482 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6483IPv6 addresses and networks.
6484
6485For new implementations you may prefer to use the standard module
6486@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6487versions of Python.")
6488 (license license:asl2.0)))
6489
6490(define-public python-idna
6491 (package
6492 (name "python-idna")
6493 (version "2.7")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (pypi-uri "idna" version))
6498 (sha256
6499 (base32
6500 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6501 (build-system python-build-system)
6502 (home-page "https://github.com/kjd/idna")
6503 (synopsis "Internationalized domain names in applications")
6504 (description
6505 "This is a library to support the Internationalised Domain Names in
6506Applications (IDNA) protocol as specified in RFC 5891. This version of the
6507protocol is often referred to as “IDNA2008” and can produce different results
6508from the earlier standard from 2003. The library is also intended to act as a
6509suitable drop-in replacement for the “encodings.idna” module that comes with
6510the Python standard library but currently only supports the older 2003
6511specification.")
6512 (license license:bsd-4)))
6513
6514(define-public python2-idna
6515 (package-with-python2 python-idna))
6516
6517(define-public python-idna-ssl
6518 (package
6519 (name "python-idna-ssl")
6520 (version "1.0.1")
6521 (source
6522 (origin
6523 (method url-fetch)
6524 (uri (pypi-uri "idna-ssl" version))
6525 (sha256
6526 (base32
6527 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6528 (build-system python-build-system)
6529 (arguments
6530 `(#:tests? #f)) ;circular dependency with python-aiohttp
6531 (home-page "https://github.com/aio-libs/idna-ssl")
6532 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6533 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6534domains support.")
6535 (license license:expat)))
6536
6537(define-public python-pretend
6538 (package
6539 (name "python-pretend")
6540 (version "1.0.9")
6541 (source
6542 (origin
6543 (method url-fetch)
9f1f22ee 6544 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6545 (sha256
6546 (base32
6547 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6548 (build-system python-build-system)
6549 (home-page "https://github.com/alex/pretend")
6550 (synopsis "Library for stubbing in Python")
6551 (description
6552 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6553technique for writing tests. You may hear the term mixed up with mocks,
6554fakes, or doubles. Basically, a stub is an object that returns pre-canned
6555responses, rather than doing any computation.")
6556 (license license:bsd-3)))
6557
6558(define-public python2-pretend
6559 (package-with-python2 python-pretend))
6560
6561(define-public python-pip
6562 (package
6563 (name "python-pip")
6564 (version "18.1")
6565 (source
6566 (origin
6567 (method url-fetch)
6568 (uri (pypi-uri "pip" version))
6569 (sha256
6570 (base32
6571 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6572 (build-system python-build-system)
6573 (arguments
6574 '(#:tests? #f)) ; there are no tests in the pypi archive.
6575 (home-page "https://pip.pypa.io/")
6576 (synopsis "Package manager for Python software")
6577 (description
6578 "Pip is a package manager for Python software, that finds packages on the
6579Python Package Index (PyPI).")
6580 (license license:expat)))
6581
6582(define-public python2-pip
6583 (package-with-python2 python-pip))
6584
6585(define-public python-tlsh
6586 (package
6587 (name "python-tlsh")
6588 (version "3.4.5")
6589 (home-page "https://github.com/trendmicro/tlsh")
6590 (source (origin
6591 (method url-fetch)
6592 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6593 version ".tar.gz"))
6594 (sha256
6595 (base32
6596 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6597 (file-name (string-append name "-" version ".tar.gz"))))
6598 (build-system cmake-build-system)
6599 (arguments
6600 '(#:out-of-source? #f
6601 #:phases (modify-phases %standard-phases
6602 (replace
6603 'install
6604 (lambda* (#:key outputs #:allow-other-keys)
6605 ;; Build and install the Python bindings. The underlying
6606 ;; C++ library is apparently not meant to be installed.
6607 (let ((out (assoc-ref outputs "out")))
6608 (with-directory-excursion "py_ext"
6609 (and (system* "python" "setup.py" "build")
6610 (system* "python" "setup.py" "install"
6611 (string-append "--prefix=" out))))))))))
6612 (inputs `(("python" ,python-wrapper))) ;for the bindings
6613 (synopsis "Fuzzy matching library for Python")
6614 (description
6615 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6616Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6617value which can be used for similarity comparisons. Similar objects have
6618similar hash values, which allows for the detection of similar objects by
6619comparing their hash values. The byte stream should have a sufficient amount
6620of complexity; for example, a byte stream of identical bytes will not generate
6621a hash value.")
6622 (license license:asl2.0)))
6623
6624(define-public python2-tlsh
6625 (package
6626 (inherit python-tlsh)
6627 (name "python2-tlsh")
6628 (inputs `(("python" ,python-2)))))
6629
6630(define-public python-termcolor
6631 (package
6632 (name "python-termcolor")
6633 (version "1.1.0")
6634 (source
6635 (origin
6636 (method url-fetch)
6637 (uri (pypi-uri "termcolor" version))
6638 (sha256
6639 (base32
6640 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6641 (build-system python-build-system)
6642 (arguments
6643 ;; There are no tests.
6644 `(#:tests? #f))
6645 (home-page "https://pypi.python.org/pypi/termcolor")
6646 (synopsis "ANSII Color formatting for terminal output")
6647 (description
6648 "This package provides ANSII Color formatting for output in terminals.")
6649 (license license:expat)))
6650
6651(define-public python2-termcolor
6652 (package-with-python2 python-termcolor))
6653
6654(define-public python-libarchive-c
6655 (package
6656 (name "python-libarchive-c")
6657 (version "2.8")
6658 (source (origin
6659 (method url-fetch)
6660 (uri (pypi-uri "libarchive-c" version))
6661 (sha256
6662 (base32
6663 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6664 (build-system python-build-system)
6665 (arguments
6666 '(#:phases (modify-phases %standard-phases
6667 (add-before
6668 'build 'reference-libarchive
6669 (lambda* (#:key inputs #:allow-other-keys)
6670 ;; Retain the absolute file name of libarchive.so.
6671 (let ((libarchive (assoc-ref inputs "libarchive")))
6672 (substitute* "libarchive/ffi.py"
6673 (("find_library\\('archive'\\)")
6674 (string-append "'" libarchive
6675 "/lib/libarchive.so'"))))))
6676 (replace 'check
6677 (lambda _ (invoke "pytest" "-vv"))))))
6678 (native-inputs
6679 `(("python-mock" ,python-mock)
6680 ("python-pytest" ,python-pytest)))
6681 (inputs
6682 `(("libarchive" ,libarchive)))
6683 (home-page "https://github.com/Changaco/python-libarchive-c")
6684 (synopsis "Python interface to libarchive")
6685 (description
6686 "This package provides Python bindings to libarchive, a C library to
6687access possibly compressed archives in many different formats. It uses
6688Python's @code{ctypes} foreign function interface (FFI).")
6689 (license license:lgpl2.0+)))
6690
6691(define-public python2-libarchive-c
6692 (package-with-python2 python-libarchive-c))
6693
6694(define-public python-file
6695 (package
6696 (inherit file)
6697 (name "python-file")
6698 (build-system python-build-system)
6699 (arguments
6700 '(#:tests? #f ;no tests
6701 #:configure-flags '("--single-version-externally-managed" "--root=/")
6702 #:phases (modify-phases %standard-phases
6703 (add-before 'build 'change-directory
6704 (lambda _
6705 (chdir "python")
6706 #t))
6707 (add-before 'build 'set-library-file-name
6708 (lambda* (#:key inputs #:allow-other-keys)
6709 (let ((file (assoc-ref inputs "file")))
6710 (substitute* "magic.py"
6711 (("find_library\\('magic'\\)")
6712 (string-append "'" file "/lib/libmagic.so'")))
6713 #t))))))
6714 (inputs `(("file" ,file)))
6715 (self-native-input? #f)
6716 (synopsis "Python bindings to the libmagic file type guesser. Note that
6717this module and the python-magic module both provide a \"magic.py\" file;
6718these two modules, which are different and were developed separately, both
6719serve the same purpose: provide Python bindings for libmagic.")))
6720
6721(define-public python2-file
6722 (package-with-python2 python-file))
6723
6724(define-public python-debian
6725 (package
6726 (name "python-debian")
6727 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6728 (version "0.1.28")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (pypi-uri name version))
6733 (sha256
6734 (base32
6735 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6736 (build-system python-build-system)
6737 (propagated-inputs
6738 `(("python-six" ,python-six)))
6739 (synopsis "Debian package related modules")
6740 (description
6741 ;; XXX: Use @enumerate instead of @itemize to work around
6742 ;; <http://bugs.gnu.org/21772>.
6743 "This package provides Python modules that abstract many formats of
6744Debian-related files, such as:
6745
6746@enumerate
6747@item Debtags information;
6748@item @file{debian/changelog} files;
6749@item packages files, pdiffs;
6750@item control files of single or multiple RFC822-style paragraphs---e.g.
6751 @file{debian/control}, @file{.changes}, @file{.dsc};
6752@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6753 contained files and meta-information.
6754@end enumerate\n")
6755
6756 ;; Modules are either GPLv2+ or GPLv3+.
6757 (license license:gpl3+)))
6758
6759(define-public python2-debian
6760 (package-with-python2 python-debian))
6761
6762(define-public python-nbformat
6763 (package
6764 (name "python-nbformat")
6765 (version "4.4.0")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "nbformat" version))
6770 (sha256
6771 (base32
6772 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6773 (build-system python-build-system)
6774 (arguments `(#:tests? #f)) ; no test target
6775 (propagated-inputs
6776 `(("python-ipython-genutils" ,python-ipython-genutils)
6777 ("python-jsonschema" ,python-jsonschema)
6778 ("python-jupyter-core" ,python-jupyter-core)
6779 ("python-traitlets" ,python-traitlets)))
6780 (home-page "http://jupyter.org")
6781 (synopsis "Jupyter Notebook format")
6782 (description "This package provides the reference implementation of the
6783Jupyter Notebook format and Python APIs for working with notebooks.")
6784 (license license:bsd-3)))
6785
6786(define-public python2-nbformat
6787 (package-with-python2 python-nbformat))
6788
6789(define-public python-bleach
6790 (package
6791 (name "python-bleach")
6792 (version "1.4.3")
6793 (source
6794 (origin
6795 (method url-fetch)
6796 (uri (pypi-uri "bleach" version))
6797 (sha256
6798 (base32
6799 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6800 (build-system python-build-system)
6801 (propagated-inputs
6802 `(("python-html5lib" ,python-html5lib-0.9)
6803 ("python-six" ,python-six)))
6804 (native-inputs
6805 `(("python-nose" ,python-nose)))
6806 (home-page "https://github.com/jsocol/bleach")
6807 (synopsis "Whitelist-based HTML-sanitizing tool")
6808 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6809 (license license:asl2.0)))
6810
6811(define-public python2-bleach
6812 (package-with-python2 python-bleach))
6813
6814(define-public python-entrypoints
6815 (package
6816 (name "python-entrypoints")
a7f1b718 6817 (version "0.3")
44d10b1f
RW
6818 (source
6819 (origin
6820 (method url-fetch)
a7f1b718 6821 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6822 (sha256
6823 (base32
a7f1b718 6824 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6825 (build-system python-build-system)
6826 ;; The package does not come with a setup.py file, so we have to generate
6827 ;; one ourselves.
6828 (arguments
6829 `(#:tests? #f
6830 #:phases
6831 (modify-phases %standard-phases
6832 (add-after 'unpack 'create-setup.py
6833 (lambda _
6834 (call-with-output-file "setup.py"
6835 (lambda (port)
6836 (format port "\
6837from setuptools import setup
6838setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6839" ,version))))))))
6840 (home-page "https://github.com/takluyver/entrypoints")
6841 (synopsis "Discover and load entry points from installed Python packages")
6842 (description "Entry points are a way for Python packages to advertise
6843objects with some common interface. The most common examples are
6844@code{console_scripts} entry points, which define shell commands by
6845identifying a Python function to run. The @code{entrypoints} module contains
6846functions to find and load entry points.")
6847 (license license:expat)))
6848
6849(define-public python2-entrypoints
6850 (package-with-python2 python-entrypoints))
6851
6852(define-public python-nbconvert
6853 (package
6854 (name "python-nbconvert")
6855 (version "5.0.0b1")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "nbconvert" version))
6860 (sha256
6861 (base32
6862 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6863 (build-system python-build-system)
6864 (arguments
6865 `(;; The "bdist_egg" target is disabled by default, causing the installation
6866 ;; to fail.
6867 #:configure-flags (list "bdist_egg")
6868 ;; FIXME: 5 failures, 40 errors.
6869 #:tests? #f))
6870 ;; #:phases
6871 ;; (modify-phases %standard-phases
6872 ;; (replace 'check
6873 ;; (lambda _
6874 ;; (zero? (system* "py.test" "-v")))))
6875 (native-inputs
6876 `(("python-pytest" ,python-pytest)))
6877 (propagated-inputs
6878 `(("python-bleach" ,python-bleach)
6879 ("python-entrypoints" ,python-entrypoints)
6880 ("python-jinja2" ,python-jinja2)
6881 ("python-jupyter-core" ,python-jupyter-core)
6882 ("python-mistune" ,python-mistune)
6883 ("python-nbformat" ,python-nbformat)
6884 ("python-pygments" ,python-pygments)
6885 ("python-traitlets" ,python-traitlets)))
6886 (home-page "http://jupyter.org")
6887 (synopsis "Converting Jupyter Notebooks")
6888 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6889notebooks to various other formats via Jinja templates. It allows you to
6890convert an @code{.ipynb} notebook file into various static formats including:
6891
6892@enumerate
6893@item HTML
6894@item LaTeX
6895@item PDF
6896@item Reveal JS
6897@item Markdown (md)
6898@item ReStructured Text (rst)
6899@item executable script
6900@end enumerate\n")
6901 (license license:bsd-3)))
6902
6903(define-public python2-nbconvert
6904 (package-with-python2 python-nbconvert))
6905
44d10b1f
RW
6906(define-public python-notebook
6907 (package
6908 (name "python-notebook")
6909 (version "5.7.4")
6910 (source (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "notebook" version))
6913 (sha256
6914 (base32
6915 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6916 (build-system python-build-system)
6917 (arguments
6918 `(#:phases
6919 (modify-phases %standard-phases
6920 (replace 'check
6921 (lambda _
6922 ;; These tests require a browser
6923 (delete-file-recursively "notebook/tests/selenium")
6924 ;; Some tests need HOME
6925 (setenv "HOME" "/tmp")
6926 ;; This file contains "warningfilters", which are not supported
6927 ;; by this version of nose.
6928 (delete-file "setup.cfg")
6929 (with-directory-excursion "/tmp"
6930 (invoke "nosetests" "-v"))
6931 #t)))))
6932 (propagated-inputs
6933 `(("python-jupyter-core" ,python-jupyter-core)
6934 ("python-nbformat" ,python-nbformat)
6935 ("python-nbconvert" ,python-nbconvert)
6936 ("python-prometheus-client" ,python-prometheus-client)
6937 ("python-send2trash" ,python-send2trash)
6938 ("python-terminado" ,python-terminado)))
6939 (native-inputs
6940 `(("python-nose" ,python-nose)
6941 ("python-sphinx" ,python-sphinx)
6942 ("python-requests" ,python-requests)))
6943 (home-page "http://jupyter.org/")
6944 (synopsis "Web-based notebook environment for interactive computing")
6945 (description
6946 "The Jupyter HTML notebook is a web-based notebook environment for
6947interactive computing.")
6948 (properties `((python2-variant . ,(delay python2-notebook))))
6949 (license license:bsd-3)))
6950
6951(define-public python2-notebook
6952 (let ((base (package-with-python2
6953 (strip-python2-variant python-notebook))))
6954 (package (inherit base)
6955 (native-inputs
6956 `(("python2-mock" ,python2-mock)
6957 ,@(package-native-inputs base)))
6958 (arguments
6959 (substitute-keyword-arguments (package-arguments base)
6960 ((#:phases phases)
6961 `(modify-phases ,phases
6962 (add-before 'check 'disable-test-case
6963 ;; The test requires network access to localhost. Curiously it
6964 ;; fails with Python 2 only. Simply make the test-case return
6965 ;; immediately.
6966 (lambda _
6967 (substitute*
6968 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6969 (("formats = self.nbconvert_api") "return #")))))))))))
6970
6971(define-public python-widgetsnbextension
6972 (package
6973 (name "python-widgetsnbextension")
6974 (version "3.4.2")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "widgetsnbextension" version))
6979 (sha256
6980 (base32
6981 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6982 (build-system python-build-system)
6983 (propagated-inputs
6984 `(("python-ipykernel" ,python-ipykernel)
6985 ("python-notebook" ,python-notebook)))
6986 (native-inputs
6987 `(("python-certifi" ,python-certifi)
6988 ("python-nose" ,python-nose)))
6989 (home-page "https://ipython.org")
6990 (synopsis "IPython HTML widgets for Jupyter")
6991 (description "This package provides interactive HTML widgets for Jupyter
6992notebooks.")
6993 (license license:bsd-3)))
6994
6995(define-public python2-widgetsnbextension
6996 (package-with-python2 python-widgetsnbextension))
6997
6998(define-public python-ipywidgets
6999 (package
7000 (name "python-ipywidgets")
7001 (version "5.2.2")
7002 (source
7003 (origin
7004 (method url-fetch)
7005 (uri (pypi-uri "ipywidgets" version))
7006 (sha256
7007 (base32
7008 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7009 (build-system python-build-system)
7010 (propagated-inputs
7011 `(("python-ipython" ,python-ipython)
7012 ("python-traitlets" ,python-traitlets)
7013 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7014 (native-inputs
7015 `(("python-nose" ,python-nose)
7016 ("python-pytest" ,python-pytest)))
7017 (home-page "https://ipython.org")
7018 (synopsis "IPython HTML widgets for Jupyter")
7019 (description "Ipywidgets are interactive HTML widgets for Jupyter
7020notebooks and the IPython kernel. Notebooks come alive when interactive
7021widgets are used. Users gain control of their data and can visualize changes
7022in the data.")
7023 (license license:bsd-3)))
7024
7025(define-public python2-ipywidgets
7026 (package-with-python2 python-ipywidgets))
7027
7028(define-public python-jupyter-console
7029 (package
7030 (name "python-jupyter-console")
7031 (version "5.2.0")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 (uri (pypi-uri "jupyter_console" version))
7036 (sha256
7037 (base32
7038 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7039 (build-system python-build-system)
7040 ;; Tests only run in an TTY.
7041 (arguments `(#:tests? #f))
7042 (propagated-inputs
7043 `(("python-ipykernel" ,python-ipykernel)
7044 ("python-jupyter-client" ,python-jupyter-client)
7045 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7046 ("python-pygments" ,python-pygments)))
7047 (native-inputs
7048 `(("python-nose" ,python-nose)))
7049 (home-page "https://jupyter.org")
7050 (synopsis "Jupyter terminal console")
7051 (description "This package provides a terminal-based console frontend for
7052Jupyter kernels. It also allows for console-based interaction with non-Python
7053Jupyter kernels such as IJulia and IRKernel.")
7054 (license license:bsd-3)))
7055
7056(define-public python2-jupyter-console
7057 (package-with-python2 python-jupyter-console))
7058
7059;; The python-ipython and python-jupyter-console require each other. To get
7060;; the functionality in both packages working, strip down the
7061;; python-jupyter-console package when using it as an input to python-ipython.
7062(define python-jupyter-console-minimal
7063 (package
7064 (inherit python-jupyter-console)
7065 (name "python-jupyter-console-minimal")
7066 (arguments
7067 (substitute-keyword-arguments
7068 (package-arguments python-jupyter-console)
7069 ((#:phases phases)
7070 `(modify-phases ,phases
7071 (add-after 'install 'delete-bin
7072 (lambda* (#:key outputs #:allow-other-keys)
7073 ;; Delete the bin files, to avoid conflicts in profiles
7074 ;; where python-ipython and python-jupyter-console are
7075 ;; both present.
7076 (delete-file-recursively
7077 (string-append
7078 (assoc-ref outputs "out") "/bin"))))))))
7079 ;; Remove the python-ipython propagated input, to avoid the cycle
7080 (propagated-inputs
7081 (alist-delete
7082 "python-ipython"
7083 (package-propagated-inputs python-jupyter-console)))))
7084
7085(define-public python-qtconsole
7086 (package
7087 (name "python-qtconsole")
7088 (version "4.4.3")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (pypi-uri "qtconsole" version))
7093 (sha256
7094 (base32
7095 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7096 (build-system python-build-system)
7097 (arguments
7098 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7099 ;; but we only have the LTS version 5.x. This means that there might be
7100 ;; runtime errors, but since this is a dependency of the Jupyter package,
7101 ;; and Jupyter can be used without the qtconsole we can overlook this for
7102 ;; now.
7103 `(#:tests? #f
7104 #:phases
7105 (modify-phases %standard-phases
7106 (add-before 'check 'pre-check
7107 (lambda _
7108 (setenv "QT_QPA_PLATFORM" "offscreen")
7109 #t)))))
7110 (propagated-inputs
7111 `(("python-ipykernel" ,python-ipykernel)
7112 ("python-ipython" ,python-ipython)))
7113 (native-inputs
7114 `(("python-pytest" ,python-pytest)))
7115 (home-page "http://jupyter.org")
7116 (synopsis "Jupyter Qt console")
7117 (description "This package provides a Qt-based console for Jupyter with
7118support for rich media output.")
7119 (license license:bsd-3)))
7120
7121(define-public jupyter
7122 (package
7123 (name "jupyter")
7124 (version "1.0.0")
7125 (source
7126 (origin
7127 (method url-fetch)
7128 (uri (pypi-uri "jupyter" version))
7129 (sha256
7130 (base32
7131 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7132 (build-system python-build-system)
7133 (arguments '(#:tests? #f)) ; there are none.
7134 (propagated-inputs
7135 `(("python-ipykernel" ,python-ipykernel)
7136 ("python-ipywidgets" ,python-ipywidgets)
7137 ("python-jupyter-console" ,python-jupyter-console)
7138 ("python-nbconvert" ,python-nbconvert)
7139 ("python-notebook" ,python-notebook)
7140 ("python-qtconsole" ,python-qtconsole)))
7141 (native-search-paths
7142 (list (search-path-specification
7143 (variable "JUPYTER_PATH")
7144 (files '("share/jupyter")))))
7145 (home-page "https://jupyter.org")
7146 (synopsis "Web application for interactive documents")
7147 (description
7148 "The Jupyter Notebook is a web application that allows you to create and
7149share documents that contain live code, equations, visualizations and
7150explanatory text. Uses include: data cleaning and transformation, numerical
7151simulation, statistical modeling, machine learning and much more.")
7152 (license license:bsd-3)))
7153
7154(define-public python-chardet
7155 (package
7156 (name "python-chardet")
7157 (version "3.0.4")
7158 (source
7159 (origin
7160 (method url-fetch)
7161 (uri (pypi-uri "chardet" version))
7162 (sha256
7163 (base32
7164 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7165 (native-inputs
7166 `(("python-hypothesis" ,python-hypothesis)
7167 ("python-pytest" ,python-pytest)
7168 ("python-pytest-runner" ,python-pytest-runner)))
7169 (build-system python-build-system)
3d369407
MB
7170 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
7171 (arguments `(#:tests? #f))
44d10b1f
RW
7172 (home-page "https://github.com/chardet/chardet")
7173 (synopsis "Universal encoding detector for Python 2 and 3")
7174 (description
7175 "This package provides @code{chardet}, a Python module that can
7176automatically detect a wide range of file encodings.")
7177 (license license:lgpl2.1+)))
7178
7179(define-public python2-chardet
7180 (package-with-python2 python-chardet))
7181
7182(define-public python-docopt
7183 (package
7184 (name "python-docopt")
7185 (version "0.6.2")
7186 (source
7187 (origin
7188 (method url-fetch)
7189 ;; The release on PyPI does not include tests.
7190 (uri (string-append
7191 "https://github.com/docopt/docopt/archive/"
7192 version ".tar.gz"))
7193 (file-name (string-append name "-" version ".tar.gz"))
7194 (sha256
7195 (base32
7196 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7197 (build-system python-build-system)
7198 (native-inputs
7199 `(("python-pytest" ,python-pytest)))
7200 (arguments
7201 `(#:phases
7202 (modify-phases %standard-phases
7203 (replace 'check
7204 (lambda _ (invoke "py.test"))))))
7205 (home-page "http://docopt.org")
7206 (synopsis "Command-line interface description language for Python")
7207 (description "This library allows the user to define a command-line
7208interface from a program's help message rather than specifying it
7209programatically with command-line parsers like @code{getopt} and
7210@code{argparse}.")
7211 (license license:expat)))
7212
7213(define-public python2-docopt
7214 (package-with-python2 python-docopt))
7215
7216(define-public python-pythondialog
7217 (package
7218 (name "python-pythondialog")
7219 (version "3.4.0")
7220 (source
7221 (origin
7222 (method url-fetch)
7223 (uri (pypi-uri "pythondialog" version))
7224 (sha256
7225 (base32
7226 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7227 (build-system python-build-system)
7228 (arguments
7229 `(#:phases
7230 (modify-phases %standard-phases
7231 (add-after 'unpack 'patch-path
7232 (lambda* (#:key inputs #:allow-other-keys)
7233 (let* ((dialog (assoc-ref inputs "dialog")))
7234 ;; Since this library really wants to grovel the search path, we
7235 ;; must hardcode dialog's store path into it.
7236 (substitute* "dialog.py"
7237 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7238 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7239 #t))))
7240 #:tests? #f)) ; no test suite
7241 (propagated-inputs
7242 `(("dialog" ,dialog)))
7243 (home-page "http://pythondialog.sourceforge.net/")
7244 (synopsis "Python interface to the UNIX dialog utility")
7245 (description "A Python wrapper for the dialog utility. Its purpose is to
7246provide an easy to use, pythonic and comprehensive Python interface to dialog.
7247This allows one to make simple text-mode user interfaces on Unix-like systems")
7248 (license license:lgpl2.1)
7249 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7250
7251(define-public python2-pythondialog
7252 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7253 (package
7254 (inherit base)
7255 (version (package-version python-pythondialog))
7256 (source (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "python2-pythondialog" version))
7259 (sha256
7260 (base32
7261 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7262
7263(define-public python-configobj
7264 (package
7265 (name "python-configobj")
7266 (version "5.0.6")
7267 (source (origin
7268 (method url-fetch)
b0758fbb 7269 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7270 (sha256
7271 (base32
7272 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7273 ;; Patch setup.py so it looks for python-setuptools, which is
7274 ;; required to parse the keyword 'install_requires' in setup.py.
7275 (patches (search-patches "python-configobj-setuptools.patch"))))
7276 (build-system python-build-system)
7277 (propagated-inputs
7278 `(("python-six" ,python-six)))
7279 (synopsis "Config file reading, writing and validation")
7280 (description "ConfigObj is a simple but powerful config file reader and
7281writer: an ini file round tripper. Its main feature is that it is very easy to
7282use, with a straightforward programmer’s interface and a simple syntax for
7283config files.")
7284 (home-page "https://github.com/DiffSK/configobj")
7285 (license license:bsd-3)))
7286
7287(define-public python2-configobj
7288 (package-with-python2 python-configobj))
7289
7290(define-public python-configargparse
7291 (package
7292 (name "python-configargparse")
86ae491f 7293 (version "0.14.0")
44d10b1f
RW
7294 (source (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "ConfigArgParse" version))
7297 (sha256
7298 (base32
86ae491f 7299 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7300 (build-system python-build-system)
7301 (native-inputs
7302 `(("python-pyyaml" ,python-pyyaml)))
7303 (arguments
7304 `(#:phases
7305 (modify-phases %standard-phases
7306 (replace 'check
7307 (lambda _
7308 ;; Bypass setuptools-shim because one test relies on "setup.py"
7309 ;; being the first argument passed to the python call.
7310 ;;
7311 ;; NOTE: Many tests do not run because they rely on Python's
7312 ;; built-in test.test_argparse, but we remove the unit tests from
7313 ;; our Python installation.
7314 (invoke "python" "setup.py" "test"))))))
7315 (synopsis "Replacement for argparse")
7316 (description "A drop-in replacement for argparse that allows options to also
7317be set via config files and/or environment variables.")
7318 (home-page "https://github.com/bw2/ConfigArgParse")
7319 (license license:expat)))
7320
7321(define-public python2-configargparse
7322 (package-with-python2 python-configargparse))
7323
7324(define-public python-argparse-manpage
7325 (package
7326 (name "python-argparse-manpage")
7327 (version "1.1")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "argparse-manpage" version))
7332 (sha256
7333 (base32
7334 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7335 (build-system python-build-system)
7336 (home-page "https://github.com/praiskup/argparse-manpage")
7337 (synopsis "Build manual page from Python's ArgumentParser object")
7338 (description
7339 "This package provides tools to build manual pages from Python's
7340@code{ArgumentParser} object.")
7341 (license license:asl2.0)))
7342
7343(define-public python2-contextlib2
7344 (package
7345 (name "python2-contextlib2")
7346 (version "0.5.5")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "contextlib2" version))
7351 (sha256
7352 (base32
7353 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7354 (build-system python-build-system)
7355 (arguments
7356 `(#:python ,python-2
7357 #:phases
7358 (modify-phases %standard-phases
7359 (replace 'check
7360 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7361 (native-inputs
7362 `(("python2-unittest2" ,python2-unittest2)))
7363 (home-page "http://contextlib2.readthedocs.org/")
7364 (synopsis "Tools for decorators and context managers")
7365 (description "This module is primarily a backport of the Python
73663.2 contextlib to earlier Python versions. Like contextlib, it
7367provides utilities for common tasks involving decorators and context
7368managers. It also contains additional features that are not part of
7369the standard library.")
7370 (license license:psfl)))
7371
7372(define-public python-texttable
7373 (package
7374 (name "python-texttable")
7375 (version "0.8.7")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "texttable" version))
7380 (sha256
7381 (base32
7382 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7383 (build-system python-build-system)
7384 (arguments '(#:tests? #f)) ; no tests
7385 (home-page "https://github.com/foutaise/texttable/")
7386 (synopsis "Python module for creating simple ASCII tables")
7387 (description "Texttable is a Python module for creating simple ASCII
7388tables.")
7389 (license license:lgpl2.1+)))
7390
7391(define-public python2-texttable
7392 (package-with-python2 python-texttable))
7393
7394(define-public python-atomicwrites
7395 (package
7396 (name "python-atomicwrites")
14f10479 7397 (version "1.3.0")
44d10b1f
RW
7398 (source (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "atomicwrites" version))
7401 (sha256
7402 (base32
14f10479 7403 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
7404 (build-system python-build-system)
7405 (synopsis "Atomic file writes in Python")
7406 (description "Library for atomic file writes using platform dependent tools
7407for atomic file system operations.")
7408 (home-page "https://github.com/untitaker/python-atomicwrites")
7409 (license license:expat)))
7410
7411(define-public python2-atomicwrites
7412 (package-with-python2 python-atomicwrites))
7413
7414(define-public python-click-threading
7415 (package
7416 (name "python-click-threading")
7417 (version "0.4.4")
7418 (source (origin
7419 (method url-fetch)
7420 (uri (pypi-uri "click-threading" version))
7421 (sha256
7422 (base32
7423 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7424 (build-system python-build-system)
7425 (propagated-inputs
7426 `(("python-click" ,python-click)))
7427 (synopsis "Utilities for multithreading in Click")
7428 (description "This package provides utilities for multithreading in Click
7429applications.")
7430 (home-page "https://github.com/click-contrib/click-threading")
7431 (license license:expat)))
7432
7433(define-public python-click-log
7434 (package
7435 (name "python-click-log")
7436 (version "0.3.2")
7437 (source (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "click-log" version))
7440 (sha256
7441 (base32
7442 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7443 (build-system python-build-system)
7444 (propagated-inputs
7445 `(("python-click" ,python-click)))
7446 (synopsis "Logging for click applications")
7447 (description "This package provides a Python library for logging Click
7448applications.")
7449 (home-page "https://github.com/click-contrib/click-log")
7450 (license license:expat)))
7451
7452(define-public python-apipkg
7453 (package
7454 (name "python-apipkg")
7455 (version "1.4")
7456 (source (origin
7457 (method url-fetch)
7458 (uri (pypi-uri "apipkg" version))
7459 (sha256
7460 (base32
7461 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7462 (build-system python-build-system)
7463 (native-inputs
7464 `(("python-pytest" ,python-pytest)))
7465 (synopsis "Namespace control and lazy-import mechanism")
7466 (description "With apipkg you can control the exported namespace of a Python
7467package and greatly reduce the number of imports for your users. It is a small
7468pure Python module that works on virtually all Python versions.")
7469 (home-page "https://github.com/pytest-dev/apipkg")
7470 (license license:expat)))
7471
7472(define-public python2-apipkg
7473 (package-with-python2 python-apipkg))
7474
7475(define-public python-execnet
7476 (package
7477 (name "python-execnet")
7478 (version "1.4.1")
7479 (source (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "execnet" version))
7482 (sha256
7483 (base32
7484 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7485 (build-system python-build-system)
7486 (arguments
7487 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7488 ;; The two test failures are caused by the lack of an `ssh` executable.
7489 ;; The test suite can be run with pytest after the 'install' phase.
7490 #:tests? #f))
7491 (native-inputs
7492 `(("python-pytest" ,python-pytest)
7493 ("python-setuptools-scm" ,python-setuptools-scm)))
7494 (propagated-inputs
7495 `(("python-apipkg" ,python-apipkg)))
7496 (synopsis "Rapid multi-Python deployment")
7497 (description "Execnet provides a share-nothing model with
7498channel-send/receive communication for distributing execution across many
7499Python interpreters across version, platform and network barriers. It has a
7500minimal and fast API targeting the following uses:
7501@enumerate
7502@item distribute tasks to (many) local or remote CPUs
7503@item write and deploy hybrid multi-process applications
7504@item write scripts to administer multiple environments
7505@end enumerate")
7506 (home-page "http://codespeak.net/execnet/")
7507 (license license:expat)))
7508
7509(define-public python2-execnet
7510 (package-with-python2 python-execnet))
7511
7512(define-public python-icalendar
7513 (package
7514 (name "python-icalendar")
7515 (version "4.0.3")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "icalendar" version))
7519 (sha256
7520 (base32
7521 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7522 (build-system python-build-system)
7523 (propagated-inputs
7524 `(("python-dateutil" ,python-dateutil)
7525 ("python-pytz" ,python-pytz)))
7526 (synopsis "Python library for parsing iCalendar files")
7527 (description "The icalendar package is a parser/generator of iCalendar
7528files for use with Python.")
7529 (home-page "https://github.com/collective/icalendar")
7530 (license license:bsd-2)))
7531
7532(define-public python-sphinxcontrib-newsfeed
7533 (package
7534 (name "python-sphinxcontrib-newsfeed")
7535 (version "0.1.4")
7536 (source (origin
7537 (method url-fetch)
7538 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7539 (sha256
7540 (base32
7541 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7542 (arguments '(#:tests? #f)) ; No tests.
7543 (build-system python-build-system)
7544 (propagated-inputs
7545 `(("python-sphinx" ,python-sphinx)))
7546 (synopsis "News Feed extension for Sphinx")
7547 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7548Blog, News or Announcements section to a Sphinx website.")
7549 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7550 (license license:bsd-2)))
7551
7552(define-public python-args
7553 (package
7554 (name "python-args")
7555 (version "0.1.0")
7556 (source (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "args" version))
7559 (sha256
7560 (base32
7561 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7562 (build-system python-build-system)
7563 (home-page "https://github.com/kennethreitz/args")
7564 (synopsis "Command-line argument parser")
7565 (description
7566 "This library provides a Python module to parse command-line arguments.")
7567 (license license:bsd-3)))
7568
7569(define-public python2-args
7570 (package-with-python2 python-args))
7571
7572(define-public python-clint
7573 (package
7574 (name "python-clint")
7575 (version "0.5.1")
7576 (source (origin
7577 (method url-fetch)
7578 (uri (pypi-uri "clint" version))
7579 (sha256
7580 (base32
7581 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7582 (build-system python-build-system)
7583 (arguments
7584 '(#:phases
7585 (modify-phases %standard-phases
7586 (replace 'check
7587 (lambda _ (invoke "py.test" "-v"))))))
7588 (native-inputs
7589 `(("python-pytest" ,python-pytest)))
7590 (propagated-inputs
7591 `(("python-args" ,python-args)))
7592 (home-page "https://github.com/kennethreitz/clint")
7593 (synopsis "Command-line interface tools")
7594 (description
7595 "Clint is a Python module filled with a set of tools for developing
7596command-line applications, including tools for colored and indented
7597output, progress bar display, and pipes.")
7598 (license license:isc)))
7599
7600(define-public python2-clint
7601 (package-with-python2 python-clint))
7602
44d10b1f
RW
7603(define-public python-rply
7604 (package
7605 (name "python-rply")
7606 (version "0.7.5")
7607 (source (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "rply" version))
7610 (sha256
7611 (base32
7612 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7613 (build-system python-build-system)
7614 (propagated-inputs
7615 `(("python-appdirs" ,python-appdirs)))
7616 (home-page "https://github.com/alex/rply")
7617 (synopsis "Parser generator for Python")
7618 (description
7619 "This package provides a pure Python based parser generator, that also
7620works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7621with a new public API, and RPython support.")
7622 (license license:bsd-3)))
7623
7624(define-public python2-rply
7625 (package-with-python2 python-rply))
7626
7627(define-public python-hy
7628 (package
7629 (name "python-hy")
7630 (version "0.13.0")
7631 (source (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "hy" version))
7634 (sha256
7635 (base32
7636 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7637 (build-system python-build-system)
7638 (arguments
7639 '(#:phases
7640 (modify-phases %standard-phases
7641 (replace 'check
7642 (lambda _
7643 ;; Tests require write access to HOME.
7644 (setenv "HOME" "/tmp")
7645 (invoke "nosetests"))))))
7646 (native-inputs
7647 `(("python-coverage" ,python-coverage)
7648 ("python-nose" ,python-nose)))
7649 (propagated-inputs
7650 `(("python-astor" ,python-astor)
7651 ("python-clint" ,python-clint)
7652 ("python-rply" ,python-rply)))
7653 (home-page "http://hylang.org/")
7654 (synopsis "Lisp frontend to Python")
7655 (description
7656 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7657its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7658Python at your fingertips, in Lisp form.")
7659 (license license:expat)))
7660
7661(define-public python2-hy
7662 (package-with-python2 python-hy))
7663
7664(define-public python2-functools32
7665 (package
7666 (name "python2-functools32")
7667 (version "3.2.3-2")
7668 (source
7669 (origin
7670 (method url-fetch)
7671 (uri (pypi-uri "functools32" version))
7672 (sha256
7673 (base32
7674 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7675 (build-system python-build-system)
7676 (arguments
7677 `(#:python ,python-2
7678 #:tests? #f)) ; no test target
7679 (home-page "https://github.com/MiCHiLU/python-functools32")
7680 (synopsis
7681 "Backport of the functools module from Python 3.2.3")
7682 (description
7683 "This package is a backport of the @code{functools} module from Python
76843.2.3 for use with older versions of Python and PyPy.")
7685 (license license:expat)))
7686
7687(define-public python2-subprocess32
7688 (package
7689 (name "python2-subprocess32")
7690 (version "3.2.7")
7691 (source (origin
7692 (method url-fetch)
7693 (uri (pypi-uri "subprocess32" version))
7694 (sha256
7695 (base32
7696 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7697 (patches
7698 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7699 (build-system python-build-system)
7700 (arguments
7701 `(#:python ,python-2
7702 ;; The test suite fails with Python > 2.7.13:
7703 ;; import test.support
7704 ;; ImportError: No module named support
7705 #:tests? #f
7706 #:phases
7707 (modify-phases %standard-phases
7708 (add-after 'unpack 'patch-/bin/sh
7709 (lambda _
7710 (substitute* '("subprocess32.py"
7711 "test_subprocess32.py")
7712 (("/bin/sh") (which "sh")))
7713 #t)))))
7714 (home-page "https://github.com/google/python-subprocess32")
7715 (synopsis "Backport of the subprocess module from Python 3.2")
7716 (description
7717 "This is a backport of the @code{subprocess} standard library module
7718from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7719new features. On POSIX systems it is guaranteed to be reliable when used
7720in threaded applications. It includes timeout support from Python 3.3 but
7721otherwise matches 3.2’s API.")
7722 (license license:psfl)))
7723
7724(define-public python2-futures
7725 (package
7726 (name "python2-futures")
7727 (version "3.2.0")
7728 (source
7729 (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "futures" version))
7732 (sha256
7733 (base32
7734 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7735 (build-system python-build-system)
ba88eea2
RW
7736 (arguments
7737 `(#:python ,python-2
7738 #:phases
7739 (modify-phases %standard-phases
7740 (replace 'check
7741 (lambda _
7742 (invoke "python" "test_futures.py")
7743 #t)))))
44d10b1f
RW
7744 (home-page "https://github.com/agronholm/pythonfutures")
7745 (synopsis
7746 "Backport of the concurrent.futures package from Python 3.2")
7747 (description
7748 "The concurrent.futures module provides a high-level interface for
7749asynchronously executing callables. This package backports the
7750concurrent.futures package from Python 3.2")
7751 (license license:bsd-3)))
7752
7753(define-public python-promise
7754 (package
7755 (name "python-promise")
7756 (version "0.4.2")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "promise" version))
7761 (sha256
7762 (base32
7763 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7764 (build-system python-build-system)
7765 ;; Tests wants python-futures, which is a python2 only program, and
7766 ;; can't be found by python-promise at test time.
7767 (arguments `(#:tests? #f))
7768 (home-page "https://github.com/syrusakbary/promise")
7769 (synopsis "Promises/A+ implementation for Python")
7770 (description
7771 "Promises/A+ implementation for Python")
7772 (properties `((python2-variant . ,(delay python2-promise))))
7773 (license license:expat)))
7774
7775(define-public python2-promise
7776 (let ((promise (package-with-python2
7777 (strip-python2-variant python-promise))))
7778 (package (inherit promise)
7779 (arguments (substitute-keyword-arguments (package-arguments promise)
7780 ((#:tests? _) #t)))
7781 (native-inputs
7782 `(("python2-futures" ,python2-futures)
7783 ("python2-pytest" ,python2-pytest)
7784 ,@(package-native-inputs promise))))))
7785
7786(define-public python-colorama
7787 (package
7788 (name "python-colorama")
7789 (version "0.3.9")
7790 (source
7791 (origin
7792 (method url-fetch)
7793 (uri (pypi-uri "colorama" version))
7794 (sha256
7795 (base32
7796 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7797 (build-system python-build-system)
7798 (synopsis "Colored terminal text rendering for Python")
7799 (description "Colorama is a Python library for rendering colored terminal
7800text.")
7801 (home-page "https://pypi.python.org/pypi/colorama")
7802 (license license:bsd-3)))
7803
7804(define-public python2-colorama
7805 (package-with-python2 python-colorama))
7806
7807(define-public python-rsa
7808 (package
7809 (name "python-rsa")
7810 (version "3.4.2")
7811 (source
7812 (origin
7813 (method url-fetch)
7814 (uri (pypi-uri "rsa" version))
7815 (sha256
7816 (base32
7817 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7818 (build-system python-build-system)
7819 (propagated-inputs
7820 `(("python-pyasn1" ,python-pyasn1)))
7821 (synopsis "Pure-Python RSA implementation")
7822 (description "Python-RSA is a pure-Python RSA implementation. It supports
7823encryption and decryption, signing and verifying signatures, and key
7824generation according to PKCS#1 version 1.5. It can be used as a Python
7825library as well as on the command line.")
7826 (home-page "https://stuvel.eu/rsa")
7827 (license license:asl2.0)))
7828
7829(define-public python2-rsa
7830 (package-with-python2 python-rsa))
7831
7832(define-public python-pluggy
7833 (package
7834 (name "python-pluggy")
b86b7996 7835 (version "0.9.0")
44d10b1f
RW
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "pluggy" version))
7840 (sha256
7841 (base32
b86b7996 7842 "13yg2q0wgcb4l8lgdvcnzqa8db5lrw3nwn50lxjy1z5jkp7gkv0r"))))
44d10b1f
RW
7843 (build-system python-build-system)
7844 (native-inputs
7845 `(("python-setuptools-scm" ,python-setuptools-scm)))
7846 (synopsis "Plugin and hook calling mechanism for Python")
7847 (description "Pluggy is an extraction of the plugin manager as used by
7848Pytest but stripped of Pytest specific details.")
7849 (home-page "https://pypi.python.org/pypi/pluggy")
7850 (license license:expat)))
7851
7852(define-public python2-pluggy
7853 (package-with-python2 python-pluggy))
7854
7855(define-public python-tox
7856 (package
7857 (name "python-tox")
7858 (version "2.8.1")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "tox" version))
7863 (sha256
7864 (base32
7865 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7866 (build-system python-build-system)
7867 (arguments
7868 ;; FIXME: Tests require pytest-timeout, which itself requires
7869 ;; pytest>=2.8.0 for installation.
7870 '(#:tests? #f))
7871 (propagated-inputs
7872 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7873 ("python-py" ,python-py)
7874 ("python-virtualenv" ,python-virtualenv)))
7875 (native-inputs
7876 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7877 ("python-pytest" ,python-pytest) ; >= 2.3.5
7878 ("python-setuptools-scm" ,python-setuptools-scm)))
7879 (home-page "http://tox.testrun.org/")
7880 (synopsis "Virtualenv-based automation of test activities")
7881 (description "Tox is a generic virtualenv management and test command line
7882tool. It can be used to check that a package installs correctly with
7883different Python versions and interpreters, or run tests in each type of
7884supported environment, or act as a frontend to continuous integration
7885servers.")
7886 (license license:expat)))
7887
7888(define-public python2-tox
7889 (package-with-python2 python-tox))
7890
7891(define-public python-jmespath
7892 (package
7893 (name "python-jmespath")
7894 (version "0.9.3")
7895 (source
7896 (origin
7897 (method url-fetch)
7898 (uri (pypi-uri "jmespath" version))
7899 (sha256
7900 (base32
7901 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7902 (build-system python-build-system)
7903 (native-inputs
7904 `(("python-nose" ,python-nose)))
7905 (synopsis "JSON Matching Expressions")
7906 (description "JMESPath (pronounced “james path”) is a Python library that
7907allows one to declaratively specify how to extract elements from a JSON
7908document.")
7909 (home-page "https://github.com/jmespath/jmespath.py")
7910 (license license:expat)))
7911
7912(define-public python2-jmespath
7913 (package-with-python2 python-jmespath))
7914
7915(define-public python-botocore
7916 (package
7917 (name "python-botocore")
7918 (version "1.8.43")
7919 (source
7920 (origin
7921 (method url-fetch)
7922 (uri (pypi-uri "botocore" version))
7923 (sha256
7924 (base32
7925 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7926 (build-system python-build-system)
7927 (arguments
7928 ;; FIXME: Many tests are failing.
7929 '(#:tests? #f))
7930 (propagated-inputs
7931 `(("python-dateutil" ,python-dateutil)
7932 ("python-docutils" ,python-docutils)
7933 ("python-jmespath" ,python-jmespath)))
7934 (native-inputs
7935 `(("python-mock" ,python-mock)
7936 ("python-nose" ,python-nose)
7937 ("behave" ,behave)
7938 ("python-tox" ,python-tox)
7939 ("python-wheel" ,python-wheel)))
7940 (home-page "https://github.com/boto/botocore")
7941 (synopsis "Low-level interface to AWS")
7942 (description "Botocore is a Python library that provides a low-level
7943interface to the Amazon Web Services (AWS) API.")
7944 (license license:asl2.0)))
7945
7946(define-public python2-botocore
7947 (package-with-python2 python-botocore))
7948
7949(define-public python-xdo
7950 (package
7951 (name "python-xdo")
7952 (version "0.3")
7953 (source (origin
7954 (method url-fetch)
7955 (uri (string-append
7956 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7957 "python-xdo_" version ".orig.tar.gz"))
7958 (sha256
7959 (base32
7960 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7961 (build-system python-build-system)
7962 (arguments
7963 '(#:phases
7964 (modify-phases %standard-phases
7965 (add-before 'install 'patch-libxdo-path
7966 ;; Hardcode the path of dynamically loaded libxdo library.
7967 (lambda* (#:key inputs #:allow-other-keys)
7968 (let ((libxdo (string-append
7969 (assoc-ref inputs "xdotool")
7970 "/lib/libxdo.so")))
7971 (substitute* "xdo/_xdo.py"
7972 (("find_library\\(\"xdo\"\\)")
7973 (simple-format #f "\"~a\"" libxdo)))
7974 #t))))
7975 #:tests? #f)) ; no tests provided
7976 (propagated-inputs
7977 `(("python-six" ,python-six)))
7978 (inputs
7979 `(("xdotool" ,xdotool)
7980 ("libX11" ,libx11)))
7981 (home-page "https://tracker.debian.org/pkg/python-xdo")
7982 (synopsis "Python library for simulating X11 keyboard/mouse input")
7983 (description "Provides bindings to libxdo for manipulating X11 via simulated
7984input. (Note that this is mostly a legacy library; you may wish to look at
7985python-xdo for newer bindings.)")
7986 (license license:bsd-3)))
7987
7988(define-public python2-xdo
7989 (package-with-python2 python-xdo))
7990
7991(define-public python-mako
7992 (package
7993 (name "python-mako")
7994 (version "1.0.7")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "Mako" version))
7999 (sha256
8000 (base32
8001 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8002 (build-system python-build-system)
8003 (propagated-inputs
8004 `(("python-markupsafe" ,python-markupsafe)))
8005 (native-inputs
8006 `(("python-mock" ,python-mock)
8007 ("python-nose" ,python-nose)
8008 ("python-pytest" ,python-pytest)))
7016e620 8009 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8010 (synopsis "Templating language for Python")
8011 (description "Mako is a templating language for Python that compiles
8012templates into Python modules.")
8013 (license license:expat)))
8014
8015(define-public python2-mako
8016 (package-with-python2 python-mako))
8017
8018(define-public python-waitress
8019 (package
8020 (name "python-waitress")
8021 (version "1.1.0")
8022 (source
8023 (origin
8024 (method url-fetch)
8025 (uri (pypi-uri "waitress" version))
8026 (patches (search-patches "python-waitress-fix-tests.patch"))
8027 (sha256
8028 (base32
8029 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8030 (build-system python-build-system)
8031 (home-page "https://github.com/Pylons/waitress")
8032 (synopsis "Waitress WSGI server")
8033 (description "Waitress is meant to be a production-quality pure-Python WSGI
8034server with very acceptable performance.")
8035 (license license:zpl2.1)))
8036
8037(define-public python2-waitress
8038 (package-with-python2 python-waitress))
8039
8040(define-public python-pyquery
8041 (package
8042 (name "python-pyquery")
8043 (version "1.2.17")
8044 (source
8045 (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "pyquery" version))
8048 (sha256
8049 (base32
8050 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8051 (build-system python-build-system)
8052 (native-inputs
8053 `(("python-webob" ,python-webob)
8054 ("python-webtest" ,python-webtest)))
8055 (propagated-inputs
8056 `(("python-lxml" ,python-lxml)
8057 ("python-cssselect" ,python-cssselect)))
8058 (home-page "https://github.com/gawel/pyquery")
8059 (synopsis "Make jQuery-like queries on xml documents")
8060 (description "pyquery allows you to make jQuery queries on xml documents.
8061The API is as much as possible the similar to jQuery. pyquery uses lxml for
8062fast xml and html manipulation.")
8063 (license license:bsd-3)))
8064
44d10b1f
RW
8065(define-public python-anyjson
8066 (package
8067 (name "python-anyjson")
8068 (version "0.3.3")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 (uri (pypi-uri "anyjson" version))
8073 (sha256
8074 (base32
8075 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8076 (build-system python-build-system)
8077 (arguments
8078 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8079 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8080 ;; whatever) so this transformation needs to be done before the tests
8081 ;; can be run. Maybe we could add a build step to transform beforehand
8082 ;; but it could be annoying/difficult.
8083 ;; We can enable tests for the Python 2 version, though, and do below.
8084 #:tests? #f))
8085 (home-page "https://bitbucket.org/runeh/anyjson/")
8086 (synopsis
8087 "Wraps best available JSON implementation in a common interface")
8088 (description
8089 "Anyjson loads whichever is the fastest JSON module installed
8090and provides a uniform API regardless of which JSON implementation is used.")
8091 (license license:bsd-3)
8092 (properties `((python2-variant . ,(delay python2-anyjson))))))
8093
8094(define-public python2-anyjson
8095 (let ((anyjson (package-with-python2
8096 (strip-python2-variant python-anyjson))))
8097 (package
8098 (inherit anyjson)
8099 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8100 #:tests? #t
8101 ,@(package-arguments anyjson)))
8102 (native-inputs `(("python2-nose" ,python2-nose))))))
8103
8104(define-public python-amqp
8105 (package
8106 (name "python-amqp")
8107 (version "2.3.2")
8108 (source
8109 (origin
8110 (method url-fetch)
8111 (uri (pypi-uri "amqp" version))
8112 (sha256
8113 (base32
8114 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8115 (build-system python-build-system)
8116 (native-inputs
8117 `(("python-case" ,python-case)
8118 ("python-pytest-sugar" ,python-pytest-sugar)
8119 ("python-mock" ,python-mock)))
8120 (propagated-inputs
8121 `(("python-vine" ,python-vine)))
8122 (home-page "https://github.com/celery/py-amqp")
8123 (synopsis
8124 "Low-level AMQP client for Python (fork of amqplib)")
8125 (description
8126 "This is a fork of amqplib which was originally written by Barry Pederson.
8127It is maintained by the Celery project, and used by kombu as a pure python
8128alternative when librabbitmq is not available.")
8129 (license license:lgpl2.1+)
8130 (properties `((python2-variant . ,(delay python2-amqp))))))
8131
8132(define-public python2-amqp
8133 (let ((amqp (package-with-python2
8134 (strip-python2-variant python-amqp))))
8135 (package
8136 (inherit amqp)
8137 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8138 ;; unmaintained. Weirdly, does not do this on the python 3
8139 ;; version?
8140 #:tests? #f
8141 ,@(package-arguments amqp))))))
8142
8143(define-public python-txamqp
8144 (package
8145 (name "python-txamqp")
8146 (version "0.8.2")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "txAMQP" version))
8151 (sha256
8152 (base32
8153 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8154 (build-system python-build-system)
8155 (propagated-inputs
8156 `(("python-six" ,python-six)
8157 ("python-twisted" ,python-twisted)))
8158 (home-page "https://github.com/txamqp/txamqp")
8159 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8160 (description
8161 "This package provides a Python library for communicating with AMQP peers
8162and brokers using the asynchronous networking framework Twisted. It contains
8163all the necessary code to connect, send and receive messages to/from an
8164AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8165also includes support for using Thrift RPC over AMQP in Twisted
8166applications.")
8167 (license license:asl2.0)))
8168
8169(define-public python2-txamqp
8170 (package-with-python2 python-txamqp))
8171
8172(define-public python-kombu
8173 (package
8174 (name "python-kombu")
8175 (version "4.2.2")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "kombu" version))
8180 (sha256
8181 (base32
8182 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8183 (build-system python-build-system)
8184 (native-inputs
8185 `(("python-mock" ,python-mock)
8186 ("python-case" ,python-case)
8187 ("python-pyro4" ,python-pyro4)
8188 ("python-pytest-sugar" ,python-pytest-sugar)
8189 ("python-pytz" ,python-pytz)))
8190 (propagated-inputs
8191 `(("python-anyjson" ,python-anyjson)
8192 ("python-amqp" ,python-amqp)
8193 ("python-redis" ,python-redis)))
8194 (home-page "https://kombu.readthedocs.io")
8195 (synopsis "Message passing library for Python")
8196 (description "The aim of Kombu is to make messaging in Python as easy as
8197possible by providing an idiomatic high-level interface for the AMQ protocol,
8198and also provide proven and tested solutions to common messaging problems.
8199AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8200message orientation, queuing, routing, reliability and security, for which the
8201RabbitMQ messaging server is the most popular implementation.")
8202 (license license:bsd-3)
8203 (properties `((python2-variant . ,(delay python2-kombu))))))
8204
8205(define-public python2-kombu
8206 (let ((kombu (package-with-python2
8207 (strip-python2-variant python-kombu))))
8208 (package
8209 (inherit kombu)
8210 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8211 ;; It works fine on the python3 variant.
8212 #:tests? #f
8213 ,@(package-arguments kombu)))
8214 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8215 ,@(package-native-inputs kombu))))))
8216
8217(define-public python-billiard
8218 (package
8219 (name "python-billiard")
8220 (version "3.5.0.5")
8221 (source
8222 (origin
8223 (method url-fetch)
8224 (uri (pypi-uri "billiard" version))
8225 (sha256
8226 (base32
8227 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8228 (build-system python-build-system)
8229 (native-inputs
8230 `(("python-case" ,python-case)
8231 ("python-pytest" ,python-pytest)))
8232 (home-page "https://github.com/celery/billiard")
8233 (synopsis
8234 "Python multiprocessing fork with improvements and bugfixes")
8235 (description
8236 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8237multiprocessing package itself is a renamed and updated version of R Oudkerk's
8238pyprocessing package. This standalone variant is intended to be compatible with
8239Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8240 (license license:bsd-3)
8241 (properties `((python2-variant . ,(delay python2-billiard))))))
8242
8243(define-public python2-billiard
8244 (let ((billiard (package-with-python2
8245 (strip-python2-variant python-billiard))))
8246 (package
8247 (inherit billiard)
8248 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8249 ("python2-mock" ,python2-mock)
8250 ,@(package-native-inputs billiard))))))
8251
8252(define-public python-celery
8253 (package
8254 (name "python-celery")
8255 (version "4.2.1")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "celery" version))
8260 (sha256
8261 (base32
8262 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8263 (build-system python-build-system)
8264 (arguments
8265 '(;; TODO The tests fail with Python 3.7
8266 ;; https://github.com/celery/celery/issues/4849
8267 #:tests? #f
8268 #:phases
8269 (modify-phases %standard-phases
8270 (add-after 'unpack 'patch-requirements
8271 (lambda _
8272 (substitute* "requirements/test.txt"
8273 (("pytest>=3\\.0,<3\\.3")
8274 "pytest>=3.0"))
8275 #t)))))
8276 (native-inputs
8277 `(("python-case" ,python-case)
8278 ("python-pytest" ,python-pytest)))
8279 (propagated-inputs
8280 `(("python-pytz" ,python-pytz)
8281 ("python-billiard" ,python-billiard)
8282 ("python-kombu" ,python-kombu)))
8283 (home-page "https://celeryproject.org")
8284 (synopsis "Distributed Task Queue")
8285 (description "Celery is an asynchronous task queue/job queue based on
8286distributed message passing. It is focused on real-time operation, but
8287supports scheduling as well. The execution units, called tasks, are executed
8288concurrently on a single or more worker servers using multiprocessing,
8289Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8290synchronously (wait until ready).")
8291 (license license:bsd-3)
8292 (properties `((python2-variant . ,(delay python2-celery))))))
8293
8294(define-public python2-celery
8295 (let ((celery (package-with-python2
8296 (strip-python2-variant python-celery))))
8297 (package
8298 (inherit celery)
8299 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8300 ("python2-mock" ,python2-mock)
8301 ,@(package-native-inputs celery))))))
8302
8303(define-public python-translitcodec
8304 (package
8305 (name "python-translitcodec")
8306 (version "0.4.0")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "translitcodec" version))
8311 (sha256
8312 (base32
8313 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8314 (build-system python-build-system)
8315 (arguments
8316 `(#:tests? #f)) ; no tests provided
8317 (home-page
8318 "https://github.com/claudep/translitcodec")
8319 (synopsis
8320 "Unicode to 8-bit charset transliteration codec")
8321 (description
8322 "This package contains codecs for transliterating ISO 10646 texts into
8323best-effort representations using smaller coded character sets (ASCII,
8324ISO 8859, etc.).")
8325 (license license:expat)))
8326
8327(define-public python2-translitcodec
8328 (package-with-python2 python-translitcodec))
8329
8330(define-public python-editor
8331 (package
8332 (name "python-editor")
8333 (version "0.5")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "python-editor" version))
8338 (sha256
8339 (base32
8340 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8341 (build-system python-build-system)
8342 (home-page
8343 "https://github.com/fmoo/python-editor")
8344 (synopsis
8345 "Programmatically open an editor, capture the result")
8346 (description
8347 "python-editor is a library that provides the editor module for
8348programmatically interfacing with your system's $EDITOR.")
8349 (license license:asl2.0)))
8350
8351(define-public python2-editor
8352 (package-with-python2 python-editor))
8353
8354(define-public python-sphinxcontrib-programoutput
8355 (package
8356 (name "python-sphinxcontrib-programoutput")
8357 (version "0.10")
8358 (source (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8361 (sha256
8362 (base32
8363 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8364 (build-system python-build-system)
8365 (arguments
8366 ;; FIXME: Many tests are failing and the upstream is gone.
8367 '(#:tests? #f))
8368 (propagated-inputs
8369 `(("python-sphinx" ,python-sphinx)))
8370 (synopsis "Sphinx extension to include program output")
8371 (description "A Sphinx extension to literally insert the output of arbitrary
8372commands into documents, helping you to keep your command examples up to date.")
8373 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8374 (license license:bsd-2)))
8375
8376(define-public python2-sphinxcontrib-programoutput
8377 (package-with-python2 python-sphinxcontrib-programoutput))
8378
8379(define-public python-sphinx-repoze-autointerface
8380 (package
8381 (name "python-sphinx-repoze-autointerface")
8382 (version "0.8")
8383 (source (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8386 (sha256
8387 (base32
8388 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8389 (build-system python-build-system)
8390 (arguments '(#:tests? #f)) ; No tests.
8391 (propagated-inputs
8392 `(("python-sphinx" ,python-sphinx)
8393 ("python-zope-interface" ,python-zope-interface)))
8394 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8395 (description "This package defines an extension for the Sphinx documentation
8396system. The extension allows generation of API documentation by
8397introspection of @code{zope.interface} instances in code.")
8398 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8399 (license license:repoze)))
8400
8401(define-public python2-sphinx-repoze-autointerface
8402 (package-with-python2 python-sphinx-repoze-autointerface))
8403
8404(define-public python-vobject
8405 (package
8406 (name "python-vobject")
8407 (version "0.9.5")
8408 (source (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "vobject" version))
8411 (sha256
8412 (base32
8413 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8414 (build-system python-build-system)
8415 (arguments
8416 '(;; The test suite relies on some non-portable Windows interfaces.
8417 #:tests? #f))
8418 (propagated-inputs
8419 `(("python-dateutil" ,python-dateutil)
8420 ("python-pyicu" ,python-pyicu)))
8421 (synopsis "Parse and generate vCard and vCalendar files")
8422 (description "Vobject is intended to be a full featured Python package for
8423parsing and generating vCard and vCalendar files. Currently, iCalendar files
8424are supported and well tested. vCard 3.0 files are supported, and all data
8425should be imported, but only a few components are understood in a sophisticated
8426way.")
8427 (home-page "http://eventable.github.io/vobject/")
8428 (license license:asl2.0)))
8429
8430(define-public python2-vobject
8431 (package-with-python2 python-vobject))
8432
8433(define-public python-munkres
8434 (package
8435 (name "python-munkres")
8436 (version "1.0.8")
8437 (source (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "munkres" version))
8440 (sha256
8441 (base32
8442 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8443 (build-system python-build-system)
8444 (arguments
8445 '(#:tests? #f)) ; no test suite
8446 (home-page "http://software.clapper.org/munkres/")
8447 (synopsis "Implementation of the Munkres algorithm")
8448 (description "The Munkres module provides an implementation of the Munkres
8449algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8450useful for solving the Assignment Problem.")
8451 (license license:bsd-3)))
8452
8453(define-public python2-munkres
8454 (package-with-python2 python-munkres))
8455
8456(define-public python-whoosh
8457 (package
8458 (name "python-whoosh")
8459 (version "2.7.4")
8460 (source
8461 (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "Whoosh" version))
8464 (sha256
8465 (base32
8466 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8467 (build-system python-build-system)
8468 (native-inputs
8469 `(("python-pytest" ,python-pytest)))
8470 (home-page "https://bitbucket.org/mchaput/whoosh")
8471 (synopsis "Full text indexing, search, and spell checking library")
8472 (description
8473 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8474checking library.")
8475 (license license:bsd-2)))
8476
8477(define-public python2-whoosh
8478 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8479 (package (inherit whoosh)
8480 (propagated-inputs
8481 `(("python2-backport-ssl-match-hostname"
8482 ,python2-backport-ssl-match-hostname)
8483 ,@(package-propagated-inputs whoosh))))))
8484
8485(define-public python-pathlib
8486 (package
8487 (name "python-pathlib")
8488 (version "1.0.1")
8489 (source (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "pathlib" version))
8492 (sha256
8493 (base32
8494 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8495 (build-system python-build-system)
8496 ;; The tests depend on the internal "test" module, which does not provide
8497 ;; a stable interface.
8498 (arguments `(#:tests? #f))
8499 (home-page "https://pathlib.readthedocs.org/")
8500 (synopsis "Object-oriented file system paths")
8501 (description "Pathlib offers a set of classes to handle file system paths.
8502It offers the following advantages over using string objects:
8503
8504@enumerate
8505@item No more cumbersome use of os and os.path functions. Everything can
8506be done easily through operators, attribute accesses, and method calls.
8507@item Embodies the semantics of different path types. For example,
8508comparing Windows paths ignores casing.
8509@item Well-defined semantics, eliminating any inconsistencies or
8510ambiguities (forward vs. backward slashes, etc.).
8511@end enumerate
8512
8513Note: In Python 3.4, pathlib is now part of the standard library. For other
8514Python versions please consider python-pathlib2 instead, which tracks the
8515standard library module. This module (python-pathlib) isn't maintained
8516anymore.")
8517 (license license:expat)))
8518
8519(define-public python2-pathlib
8520 (package-with-python2 python-pathlib))
8521
8522(define-public python2-pathlib2
8523 (package
8524 (name "python2-pathlib2")
54da6f9f 8525 (version "2.3.3")
44d10b1f
RW
8526 (source (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "pathlib2" version))
8529 (sha256
8530 (base32
54da6f9f 8531 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
8532 (build-system python-build-system)
8533 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8534 ;; version is 3.4 which already includes this package as part of the
8535 ;; standard library.
8536 (arguments
8537 `(#:python ,python-2))
8538 (propagated-inputs
8539 `(("python2-scandir" ,python2-scandir)
8540 ("python2-six" ,python2-six)))
8541 (home-page "https://pypi.python.org/pypi/pathlib2/")
8542 (synopsis "Object-oriented file system paths - backport of standard
8543pathlib module")
8544 (description "The goal of pathlib2 is to provide a backport of standard
8545pathlib module which tracks the standard library module, so all the newest
8546features of the standard pathlib can be used also on older Python versions.
8547
8548Pathlib offers a set of classes to handle file system paths. It offers the
8549following advantages over using string objects:
8550
8551@enumerate
8552@item No more cumbersome use of os and os.path functions. Everything can
8553be done easily through operators, attribute accesses, and method calls.
8554@item Embodies the semantics of different path types. For example,
8555comparing Windows paths ignores casing.
8556@item Well-defined semantics, eliminating any inconsistencies or
8557ambiguities (forward vs. backward slashes, etc.).
8558@end enumerate")
8559 (license license:expat)))
8560
8561(define-public python2-pathlib2-bootstrap
8562 (hidden-package
8563 (package
8564 (inherit python2-pathlib2)
8565 (name "python2-pathlib2-bootstrap")
8566 (propagated-inputs
8567 `(("python2-scandir" ,python2-scandir)
8568 ("python2-six" ,python2-six-bootstrap))))))
8569
8570(define-public python-jellyfish
8571 (package
8572 (name "python-jellyfish")
8573 (version "0.5.6")
8574 (source (origin
8575 (method url-fetch)
8576 (uri (pypi-uri "jellyfish" version))
8577 (sha256
8578 (base32
8579 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8580 (build-system python-build-system)
8581 (native-inputs
8582 `(("python-pytest" ,python-pytest)))
8583 (home-page "https://github.com/jamesturk/jellyfish")
8584 (synopsis "Approximate and phonetic matching of strings")
8585 (description "Jellyfish uses a variety of string comparison and phonetic
8586encoding algorithms to do fuzzy string matching.")
8587 (license license:bsd-2)
8588 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8589
8590(define-public python2-jellyfish
8591 (let ((jellyfish (package-with-python2
8592 (strip-python2-variant python-jellyfish))))
8593 (package (inherit jellyfish)
8594 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8595 ,@(package-native-inputs jellyfish))))))
8596
8597(define-public python2-unicodecsv
8598 (package
8599 (name "python2-unicodecsv")
8600 (version "0.14.1")
8601 (source (origin
8602 (method url-fetch)
8603 ;; The test suite is not included in the PyPi release.
8604 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8605 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8606 "archive/" version ".tar.gz"))
8607 (file-name (string-append name "-" version ".tar.gz"))
8608 (sha256
8609 (base32
8610 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8611 (build-system python-build-system)
8612 (arguments
8613 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8614 #:python ,python-2))
8615 (native-inputs
8616 `(("python2-unittest2" ,python2-unittest2)))
8617 (home-page "https://github.com/jdunck/python-unicodecsv")
8618 (synopsis "Unicode CSV module for Python 2")
8619 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8620module, adding support for Unicode strings.")
8621 (license license:bsd-2)))
8622
8623(define-public python-rarfile
8624 (package
8625 (name "python-rarfile")
8626 (version "2.8")
8627 (source (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "rarfile" version))
8630 (sha256
8631 (base32
8632 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8633 (build-system python-build-system)
8634 (arguments
8635 '(#:phases
8636 (modify-phases %standard-phases
8637 (replace 'check
8638 ;; Many tests fail, but the installation proceeds.
e59dd341 8639 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8640 (native-inputs
8641 `(("which" ,which))) ; required for tests
8642 (propagated-inputs
8643 `(("libarchive" ,libarchive)))
8644 (home-page "https://github.com/markokr/rarfile")
8645 (synopsis "RAR archive reader for Python")
8646 (description "This is Python module for RAR archive reading. The interface
8647is made as zipfile like as possible.")
8648 (license license:isc)))
8649
8650(define-public python2-rarfile
8651 (package-with-python2 python-rarfile))
8652
8653(define-public python-magic
8654 (package
8655 (name "python-magic")
8656 (version "0.4.15")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "python-magic" version))
8661 (sha256
8662 (base32
8663 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8664 (file-name (string-append name "-" version "-checkout"))))
8665 (build-system python-build-system)
8666 (arguments
8667 ;; The tests are unreliable, so don't run them. The tests fail
8668 ;; under Python3 because they were written for Python2 and
8669 ;; contain import statements that do not work in Python3. One of
8670 ;; the tests fails under Python2 because its assertions are
8671 ;; overly stringent; it relies on comparing output strings which
8672 ;; are brittle and can change depending on the version of
8673 ;; libmagic being used and the system on which the test is
8674 ;; running. In my case, under GuixSD 0.10.0, only one test
8675 ;; failed, and it seems to have failed only because the version
8676 ;; of libmagic that is packaged in Guix outputs a slightly
8677 ;; different (but not wrong) string than the one that the test
8678 ;; expected.
8679 '(#:tests? #f
8680 #:phases (modify-phases %standard-phases
8681 ;; Replace a specific method call with a hard-coded
8682 ;; path to the necessary libmagic.so file in the
8683 ;; store. If we don't do this, then the method call
8684 ;; will fail to find the libmagic.so file, which in
8685 ;; turn will cause any application using
8686 ;; python-magic to fail.
8687 (add-before 'build 'hard-code-path-to-libmagic
8688 (lambda* (#:key inputs #:allow-other-keys)
8689 (let ((file (assoc-ref inputs "file")))
8690 (substitute* "magic.py"
8691 (("ctypes.util.find_library\\('magic'\\)")
8692 (string-append "'" file "/lib/libmagic.so'")))
8693 #t)))
8694 (add-before 'install 'disable-egg-compression
8695 (lambda _
8696 (let ((port (open-file "setup.cfg" "a")))
8697 (display "\n[easy_install]\nzip_ok = 0\n"
8698 port)
8699 (close-port port)
8700 #t))))))
8701 (inputs
8702 ;; python-magic needs to be able to find libmagic.so.
8703 `(("file" ,file)))
8704 (home-page
8705 "https://github.com/ahupp/python-magic")
8706 (synopsis
8707 "File type identification using libmagic")
8708 (description
8709 "This module uses ctypes to access the libmagic file type
8710identification library. It makes use of the local magic database and
8711supports both textual and MIME-type output. Note that this module and
8712the python-file module both provide a \"magic.py\" file; these two
8713modules, which are different and were developed separately, both serve
8714the same purpose: to provide Python bindings for libmagic.")
8715 (license license:expat)))
8716
8717(define-public python2-magic
8718 (package-with-python2 python-magic))
8719
8720(define-public python2-s3cmd
8721 (package
8722 (name "python2-s3cmd")
8723 (version "1.6.1")
8724 (source
8725 (origin
8726 (method url-fetch)
8727 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8728 "s3cmd-" version ".tar.gz"))
8729 (sha256
8730 (base32
8731 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8732 (build-system python-build-system)
8733 (arguments
8734 ;; s3cmd is written for python2 only and contains no tests.
8735 `(#:python ,python-2
8736 #:tests? #f))
8737 (propagated-inputs
8738 `(("python2-dateutil" ,python2-dateutil)
8739 ;; The python-file package also provides a magic.py module.
8740 ;; This is an unfortunate state of affairs; however, s3cmd
8741 ;; fails to install if it cannot find specifically the
8742 ;; python-magic package. Thus we include it, instead of using
8743 ;; python-file. Ironically, s3cmd sometimes works better
8744 ;; without libmagic bindings at all:
8745 ;; https://github.com/s3tools/s3cmd/issues/198
8746 ("python2-magic" ,python2-magic)))
8747 (home-page "http://s3tools.org/s3cmd")
8748 (synopsis "Command line tool for S3-compatible storage services")
8749 (description
8750 "S3cmd is a command line tool for uploading, retrieving and managing data
8751in storage services that are compatible with the Amazon Simple Storage
8752Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8753GnuPG encryption, and more. It also supports management of Amazon's
8754CloudFront content delivery network.")
8755 (license license:gpl2+)))
8756
8757(define-public python-pkgconfig
8758 (package
8759 (name "python-pkgconfig")
8760 (version "1.3.1")
8761 (source
8762 (origin
8763 (method url-fetch)
8764 (uri (pypi-uri "pkgconfig" version))
8765 (sha256
8766 (base32
8767 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8768 (build-system python-build-system)
8769 (native-inputs
8770 `(("python-nose" ,python-nose)))
8771 (inputs
8772 `(("pkg-config" ,pkg-config)))
8773 (arguments
8774 `(#:phases
8775 (modify-phases %standard-phases
8776 (add-before 'build 'patch
8777 ;; Hard-code the path to pkg-config.
8778 (lambda _
8779 (substitute* "pkgconfig/pkgconfig.py"
8780 (("cmd = 'pkg-config")
8781 (string-append "cmd = '" (which "pkg-config"))))
8782 #t))
8783 (replace 'check
8784 (lambda _
8785 (invoke "nosetests" "test.py"))))))
8786 (home-page "https://github.com/matze/pkgconfig")
8787 (synopsis "Python interface for pkg-config")
8788 (description "This module provides a Python interface to pkg-config. It
8789can be used to find all pkg-config packages, check if a package exists,
8790check if a package meets certain version requirements, query CFLAGS and
8791LDFLAGS and parse the output to build extensions with setup.py.")
8792 (license license:expat)))
8793
8794(define-public python2-pkgconfig
8795 (package-with-python2 python-pkgconfig))
8796
8797(define-public python-bz2file
8798 (package
8799 (name "python-bz2file")
8800 (version "0.98")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "bz2file" version))
8805 (sha256
8806 (base32
8807 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8808 (build-system python-build-system)
8809 (arguments
8810 `(#:tests? #f)) ; Tests use deprecated python modules.
8811 (home-page "https://github.com/nvawda/bz2file")
8812 (synopsis "Read and write bzip2-compressed files")
8813 (description
8814 "Bz2file is a Python library for reading and writing bzip2-compressed
8815files. It contains a drop-in replacement for the I/O interface in the
8816standard library's @code{bz2} module, including features from the latest
8817development version of CPython that are not available in older releases.")
8818 (license license:asl2.0)))
8819
8820(define-public python2-bz2file
8821 (package-with-python2 python-bz2file))
8822
8823(define-public python-future
8824 (package
8825 (name "python-future")
8826 (version "0.16.0")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "future" version))
8831 (sha256
8832 (base32
8833 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8834 (build-system python-build-system)
8835 ;; Many tests connect to the network or are otherwise flawed.
8836 ;; https://github.com/PythonCharmers/python-future/issues/210
8837 (arguments
8838 `(#:tests? #f))
8839 (home-page "http://python-future.org")
8840 (synopsis "Single-source support for Python 3 and 2")
8841 (description
8842 "@code{python-future} is the missing compatibility layer between Python 2 and
8843Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8844to support both Python 2 and Python 3 with minimal overhead.")
8845 (license license:expat)))
8846
8847(define-public python2-future
8848 (package-with-python2 python-future))
8849
8850(define-public python-cysignals
8851 (package
8852 (name "python-cysignals")
8e3e51df 8853 (version "1.9.0")
44d10b1f
RW
8854 (source
8855 (origin
8856 (method url-fetch)
8e3e51df 8857 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8858 (sha256
8859 (base32
8e3e51df 8860 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8861 (build-system python-build-system)
8862 (native-inputs
8863 `(("python-cython" ,python-cython)
8864 ("python-sphinx" ,python-sphinx)))
8865 (inputs
8866 `(("pari-gp" ,pari-gp)))
8867 (arguments
8868 `(#:modules ((guix build python-build-system)
8869 ((guix build gnu-build-system) #:prefix gnu:)
8870 (guix build utils))
8871 ;; FIXME: Tests are executed after installation and currently fail
8872 ;; when not installing into standard locations; the author is working
8873 ;; on a fix.
8874 #:tests? #f
8875 #:phases
8876 (modify-phases %standard-phases
8877 (add-before
8878 'build 'configure
8879 (assoc-ref gnu:%standard-phases 'configure)))))
8880 (home-page
8881 "https://github.com/sagemath/cysignals")
8882 (synopsis
8883 "Handling of interrupts and signals for Cython")
8884 (description
8885 "The cysignals package provides mechanisms to handle interrupts (and
8886other signals and errors) in Cython code, using two related approaches,
8887for mixed Cython/Python code or external C libraries and pure Cython code,
8888respectively.")
8889 (license license:lgpl3+)))
8890
8891(define-public python2-cysignals
8892 (package-with-python2 python-cysignals))
8893
8894(define-public python2-shedskin
8895 (package
8896 (name "python2-shedskin")
8897 (version "0.9.4")
8898 (source
8899 (origin
8900 (method url-fetch)
8901 (uri (string-append "https://github.com/shedskin/shedskin/"
8902 "releases/download/v" version
8903 "/shedskin-" version ".tgz"))
8904 (sha256
8905 (base32
8906 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8907 (build-system python-build-system)
8908 (arguments
8909 `(#:python ,python-2
8910 #:phases (modify-phases %standard-phases
8911 (add-after 'unpack 'fix-resulting-include-libs
8912 (lambda* (#:key inputs #:allow-other-keys)
8913 (let ((libgc (assoc-ref inputs "libgc"))
8914 (pcre (assoc-ref inputs "pcre")))
8915 (substitute* "shedskin/makefile.py"
8916 (("variable == 'CCFLAGS':[ ]*")
8917 (string-append "variable == 'CCFLAGS':\n"
8918 " line += ' -I " pcre "/include"
8919 " -I " libgc "/include'"))
8920 (("variable == 'LFLAGS':[ ]*")
8921 (string-append "variable == 'LFLAGS':\n"
8922 " line += ' -L" pcre "/lib"
8923 " -L " libgc "/lib'")))
8924 #t))))))
8925 (inputs `(("pcre" ,pcre)
8926 ("libgc" ,libgc)))
8927 (home-page "https://shedskin.github.io/")
8928 (synopsis "Experimental Python-2 to C++ Compiler")
8929 (description (string-append "This is an experimental compiler for a subset of
8930Python. It generates C++ code and a Makefile."))
8931 (license (list license:gpl3 license:bsd-3 license:expat))))
8932
8933(define-public python2-rope
8934 (package
8935 (name "python2-rope")
a9ba0a31 8936 (version "0.11.0")
44d10b1f
RW
8937 (source
8938 (origin
8939 (method url-fetch)
8940 (uri (pypi-uri "rope" version))
8941 (sha256
8942 (base32
a9ba0a31 8943 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8944 (arguments
afb29715 8945 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8946 `(#:python ,python-2))
8947 (build-system python-build-system)
8948 (native-inputs
8949 `(("python2-unittest2" ,python2-unittest2)))
8950 (home-page "https://github.com/python-rope/rope")
8951 (synopsis "Refactoring library for Python")
8952 (description "Rope is a refactoring library for Python. It facilitates
8953the renaming, moving and extracting of attributes, functions, modules, fields
8954and parameters in Python 2 source code. These refactorings can also be applied
8955to occurrences in strings and comments.")
8956 (license license:gpl2)))
8957
2c880ef4
LC
8958(define-public python-rope
8959 (package
8960 (inherit python2-rope)
8961 (name "python-rope")
8962 (arguments `(#:python ,python-wrapper
8963 ;; XXX: Only partial python3 support, results in some failing
8964 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8965 #:tests? #f))
8966 (properties `((python2-variant . ,(delay python2-rope))))))
8967
44d10b1f
RW
8968(define-public python-py3status
8969 (package
8970 (name "python-py3status")
8971 (version "3.7")
8972 (source
8973 (origin
8974 (method url-fetch)
8975 (uri (pypi-uri "py3status" version))
8976 (sha256
8977 (base32
8978 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8979 (build-system python-build-system)
8980 (inputs
8981 `(("file" ,file)))
8982 (arguments
8983 '(#:phases
8984 (modify-phases %standard-phases
8985 ;; 'file' is used for detection of configuration file encoding
8986 ;; let's make link the dependency to particular input
8987 (add-before 'build 'patch-file-path
8988 (lambda* (#:key inputs #:allow-other-keys)
8989 (let ((file-path (assoc-ref inputs "file")))
8990 (substitute* "py3status/parse_config.py"
8991 (("\\['file', '-b'")
8992 (string-append "['" file-path "/bin/file', '-b'")))
8993 #t))))
8994 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8995 (home-page "https://github.com/ultrabug/py3status")
8996 (synopsis "Extensible i3status wrapper written in Python")
8997 (description "py3status is an i3status wrapper which extends i3status
8998functionality in a modular way, allowing you to extend your panel with your
8999own code, responding to click events and updating clock every second.")
9000 (license license:bsd-3)))
9001
9002(define-public python-tblib
9003 (package
9004 (name "python-tblib")
9005 (version "1.3.2")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "tblib" version))
9009 (sha256 (base32
9010 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9011 (build-system python-build-system)
9012 (arguments
9013 `(#:phases
9014 (modify-phases %standard-phases
9015 (add-before 'check 'adjust-tests
9016 (lambda _
9017 (when (which "python3")
9018 ;; Adjust the example output to match that of Python 3.7:
9019 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9020 (substitute* "README.rst"
9021 (("Exception\\('fail',") "Exception('fail'"))
9022 #t)))
9023 (replace 'check
9024 (lambda _
9025 ;; Upstream runs tests after installation and the package itself
9026 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9027 ;; found.
9028 (setenv "PYTHONPATH"
9029 (string-append (getcwd) "/build/lib:"
9030 (getenv "PYTHONPATH")))
9031 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9032 (native-inputs
9033 `(("python-pytest" ,python-pytest)
9034 ("python-six" ,python-six)))
9035 (home-page "https://github.com/ionelmc/python-tblib")
9036 (synopsis "Traceback serialization library")
9037 (description
9038 "Traceback serialization allows you to:
9039
9040@enumerate
9041@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9042different processes. This allows better error handling when running code over
9043multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9044
9045@item Parse traceback strings and raise with the parsed tracebacks.
9046@end enumerate\n")
9047 (license license:bsd-3)))
9048
9049(define-public python2-tblib
9050 (package-with-python2 python-tblib))
9051
9052(define-public python-greenlet
9053 (package
9054 (name "python-greenlet")
9055 (version "0.4.15")
9056 (source (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "greenlet" version))
9059 (sha256
9060 (base32
9061 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9062 (build-system python-build-system)
9063 (home-page "https://greenlet.readthedocs.io/")
9064 (synopsis "Lightweight in-process concurrent programming")
9065 (description
9066 "Greenlet package is a spin-off of Stackless, a version of CPython
9067that supports micro-threads called \"tasklets\". Tasklets run
9068pseudo-concurrently (typically in a single or a few OS-level threads) and
9069are synchronized with data exchanges on \"channels\".")
9070 (license (list license:psfl license:expat))))
9071
9072(define-public python2-greenlet
9073 (package-with-python2 python-greenlet))
9074
9075(define-public python-objgraph
9076 (package
9077 (name "python-objgraph")
9078 (version "3.4.0")
9079 (source
9080 (origin
9081 (method url-fetch)
9082 (uri (pypi-uri "objgraph" version))
9083 (sha256
9084 (base32
9085 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9086 (build-system python-build-system)
9087 (propagated-inputs
9088 `(("python-graphviz" ,python-graphviz)))
9089 (native-inputs
9090 `(("python-mock" ,python-mock)
9091 ("graphviz" ,graphviz)))
9092 (home-page "https://mg.pov.lt/objgraph/")
9093 (synopsis "Draw Python object reference graphs with graphviz")
9094 (description
9095 "This package provides tools to draw Python object reference graphs with
9096graphviz.")
9097 (license license:expat)))
9098
9099(define-public python-gevent
9100 (package
9101 (name "python-gevent")
9102 (version "1.3.7")
9103 (source (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "gevent" version))
9106 (sha256
9107 (base32
9108 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9109 (modules '((guix build utils)))
9110 (snippet
9111 '(begin
9112 ;; unbunding libev and c-ares
9113 (delete-file-recursively "deps")
9114 #t))))
9115 (build-system python-build-system)
9116 (arguments
9117 `(#:modules ((ice-9 ftw)
9118 (ice-9 match)
9119 (srfi srfi-26)
9120 (guix build utils)
9121 (guix build python-build-system))
9122 #:phases (modify-phases %standard-phases
9123 (add-after 'unpack 'unpack-libev
9124 (lambda* (#:key inputs #:allow-other-keys)
9125 (mkdir-p "deps/libev")
9126 ;; FIXME: gevent requires building libev, even though
9127 ;; it only links against the proper one.
9128 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9129 "--strip-components=1" "-C" "deps/libev")))
9130 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9131 (lambda _
9132 (substitute* "src/gevent/subprocess.py"
9133 (("/bin/sh") (which "sh")))
9134 (for-each (lambda (file)
9135 (substitute* file
9136 (("/bin/sh") (which "sh"))
9137 (("/bin/true") (which "true"))))
9138 (find-files "src/greentest" "\\.py$"))
9139 #t))
9140 (add-before 'build 'do-not-use-bundled-sources
9141 (lambda* (#:key inputs #:allow-other-keys)
9142 (setenv "CONFIG_SHELL" (which "bash"))
9143 (setenv "LIBEV_EMBED" "false")
9144 (setenv "CARES_EMBED" "false")
9145 (setenv "EMBED" "false")
9146
9147 (let ((greenlet (string-append
9148 (assoc-ref inputs "python-greenlet")
9149 "/include")))
9150 (match (scandir greenlet
9151 (lambda (item)
9152 (string-prefix? "python" item)))
9153 ((python)
9154 (setenv "CPATH"
9155 (string-append greenlet "/" python)))))
9156 #t))
9157 (add-before 'check 'skip-timer-test
9158 (lambda _
9159 ;; XXX: Skip 'TestTimerResolution', which appears to be
9160 ;; unreliable.
9161 (substitute* "src/greentest/test__core_timer.py"
9162 (("not greentest.RUNNING_ON_CI") "False"))
9163 #t))
9164 (replace 'check
9165 (lambda _
9166 ;; Make sure the build directory is on PYTHONPATH.
9167 (setenv "PYTHONPATH"
9168 (string-append
9169 (getenv "PYTHONPATH") ":"
9170 (getcwd) "/build/"
9171 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9172 (with-directory-excursion "src/greentest"
9173 ;; XXX: Many tests require network access. Instead we only
9174 ;; run known-good tests. Unfortunately we cannot use
9175 ;; recursion here since this directory also contains
9176 ;; Python-version-specific subfolders.
9177 (apply invoke "python" "testrunner.py" "--config"
9178 "known_failures.py"
9179 (scandir "." (cut regexp-exec
9180 (make-regexp "test_+(subprocess|core)")
9181 <>)))))))))
9182 (propagated-inputs
9183 `(("python-greenlet" ,python-greenlet)
9184 ("python-objgraph" ,python-objgraph)))
9185 (native-inputs
9186 `(("libev-source" ,(package-source libev))
9187 ("python-six" ,python-six)))
9188 (inputs
9189 `(("c-ares" ,c-ares)
9190 ("libev" ,libev)))
9191 (home-page "http://www.gevent.org/")
9192 (synopsis "Coroutine-based network library")
9193 (description
9194 "gevent is a coroutine-based Python networking library that uses greenlet
9195to provide a high-level synchronous API on top of the libev event loop.")
9196 (license license:expat)
9197 (properties `((python2-variant . ,(delay python2-gevent))))))
9198
9199(define-public python2-gevent
9200 (let ((base (package-with-python2
9201 (strip-python2-variant python-gevent))))
9202 (package
9203 (inherit base)
9204 (native-inputs `(,@(package-native-inputs python-gevent)
9205 ("python-mock" ,python2-mock))))))
9206
9207(define-public python-fastimport
9208 (package
9209 (name "python-fastimport")
9210 (version "0.9.6")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "fastimport" version))
9215 (sha256
9216 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9217 (build-system python-build-system)
9218 (home-page "https://github.com/jelmer/python-fastimport")
9219 (synopsis "VCS fastimport parser and generator in Python")
9220 (description "This package provides a parser for and generator of the Git
9221@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9222format.")
9223 (license license:gpl2+)))
9224
9225(define-public python2-fastimport
9226 (package-with-python2 python-fastimport))
9227
9228(define-public python-twisted
9229 (package
9230 (name "python-twisted")
e5ba2fe3 9231 (version "17.5.0")
44d10b1f
RW
9232 (source (origin
9233 (method url-fetch)
9234 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9235 (sha256
9236 (base32
e5ba2fe3 9237 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9238 (build-system python-build-system)
9239 (arguments
9240 '(#:tests? #f)) ; FIXME: Some tests are failing.
9241 ;; #:phases
9242 ;; (modify-phases %standard-phases
9243 ;; (replace 'check
9244 ;; (lambda _
9245 ;; (zero? (system* "./bin/trial" "twisted")))))
9246 (propagated-inputs
9247 `(("python-zope-interface" ,python-zope-interface)
9248 ("python-incremental" ,python-incremental)
e5ba2fe3 9249 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9250 ("python-constantly" ,python-constantly)
9251 ("python-automat" ,python-automat)))
9252 (home-page "https://twistedmatrix.com/")
9253 (synopsis "Asynchronous networking framework written in Python")
9254 (description
9255 "Twisted is an extensible framework for Python programming, with special
9256focus on event-based network programming and multiprotocol integration.")
9257 (license license:expat)))
9258
9259(define-public python2-twisted
9260 (package-with-python2 python-twisted))
9261
9262(define-public python-pika
9263 (package
9264 (name "python-pika")
9265 (version "0.12.0")
9266 (source
9267 (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "pika" version))
9270 (sha256
9271 (base32
9272 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9273 (build-system python-build-system)
9274 (native-inputs
9275 `(("python-pyev" ,python-pyev)
9276 ("python-tornado" ,python-tornado)
9277 ("python-twisted" ,python-twisted)))
9278 (home-page "https://pika.readthedocs.org")
9279 (synopsis "Pure Python AMQP Client Library")
9280 (description
9281 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9282Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9283network support library.")
9284 (license license:bsd-3)))
9285
9286(define-public python2-pika
9287 (package-with-python2 python-pika))
9288
9289(define-public python-ply
9290 (package
9291 (name "python-ply")
9292 (version "3.10")
9293 (source
9294 (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "ply" version))
9297 (sha256
9298 (base32
9299 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9300 (build-system python-build-system)
9301 (home-page "http://www.dabeaz.com/ply/")
9302 (synopsis "Python Lex & Yacc")
9303 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9304It uses LR parsing and does extensive error checking.")
9305 (license license:bsd-3)))
9306
9307(define-public python2-ply
9308 (package-with-python2 python-ply))
9309
9310(define-public python-tabulate
9311 (package
9312 (name "python-tabulate")
9313 (version "0.7.7")
9314 (source (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "tabulate" version))
9317 (sha256
9318 (base32
9319 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9320 (build-system python-build-system)
9321 (arguments
9322 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9323 ;; and the latest release is not tagged in the upstream repository.
9324 '(#:tests? #f))
9325 (home-page "https://bitbucket.org/astanin/python-tabulate")
9326 (synopsis "Pretty-print tabular data")
9327 (description
9328 "Tabulate is a library and command-line utility to pretty-print tabular
9329data in Python.")
9330 (license license:expat)))
9331
9332(define-public python2-tabulate
9333 (package-with-python2 python-tabulate))
9334
9335(define-public python-kazoo
9336 (package
9337 (name "python-kazoo")
9338 (version "2.4.0")
9339 (source
9340 (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "kazoo" version))
9343 (sha256
9344 (base32
9345 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9346 (build-system python-build-system)
9347 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9348 (propagated-inputs
9349 `(("python-six" ,python-six)))
9350 (home-page "https://kazoo.readthedocs.org")
9351 (synopsis "High-level Zookeeper client library")
9352 (description
9353 "Kazoo is a Python client library for the Apache Zookeeper distributed
9354application service. It is designed to be easy to use and to avoid common
9355programming errors.")
9356 (license license:asl2.0)))
9357
9358(define-public python2-kazoo
9359 (package-with-python2 python-kazoo))
9360
9361(define-public python-pykafka
9362 (package
9363 (name "python-pykafka")
9364 (version "2.4.0")
9365 (source (origin
9366 (method url-fetch)
0ca1d040 9367 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9368 (sha256
9369 (base32
9370 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9371 (build-system python-build-system)
9372 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9373 (propagated-inputs
9374 `(("python-gevent" ,python-gevent)
9375 ("python-kazoo" ,python-kazoo)
9376 ("python-tabulate" ,python-tabulate)))
9377 (inputs
9378 `(("librdkafka" ,librdkafka)))
9379 (home-page "https://pykafka.readthedocs.io/")
9380 (synopsis "Apache Kafka client for Python")
9381 (description
9382 "PyKafka is a client for the Apache Kafka distributed messaging system.
9383It includes Python implementations of Kafka producers and consumers, which
9384are optionally backed by a C extension built on librdkafka.")
9385 (license license:asl2.0)))
9386
9387(define-public python2-pykafka
9388 (package-with-python2 python-pykafka))
9389
9390(define-public python-wcwidth
9391 (package
9392 (name "python-wcwidth")
9393 (version "0.1.7")
9394 (source
9395 (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "wcwidth" version))
9398 (sha256
9399 (base32
9400 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9401 (build-system python-build-system)
9402 (home-page "https://github.com/jquast/wcwidth")
9403 (synopsis "Measure number of terminal column cells of wide-character codes")
9404 (description "Wcwidth measures the number of terminal column cells of
9405wide-character codes. It is useful for those implementing a terminal emulator,
9406or programs that carefully produce output to be interpreted by one. It is a
9407Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9408specified in POSIX.1-2001 and POSIX.1-2008.")
9409 (license license:expat)))
9410
9411(define-public python2-wcwidth
9412 (package-with-python2 python-wcwidth))
9413
9414(define-public python2-jsonrpclib
9415 (package
9416 (name "python2-jsonrpclib")
9417 (version "0.1.7")
9418 (source (origin
9419 (method url-fetch)
6571bba0 9420 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9421 (sha256
9422 (base32
9423 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9424 (build-system python-build-system)
9425 (arguments
9426 `(#:tests? #f
9427 #:python ,python-2))
9428 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9429 (synopsis "Implementation of JSON-RPC specification for Python")
9430 (description
9431 "This library is an implementation of the JSON-RPC specification.
9432It supports both the original 1.0 specification, as well as the
9433new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9434etc.")
9435 (license license:asl2.0)))
9436
9437(define-public python-chai
9438 (package
9439 (name "python-chai")
9440 (version "1.1.2")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (pypi-uri "chai" version))
9444 (sha256
9445 (base32
9446 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9447 (build-system python-build-system)
9448 (home-page "https://github.com/agoragames/chai")
9449 (synopsis "Mocking framework for Python")
9450 (description
9451 "Chai provides an api for mocking, stubbing and spying your python
9452objects, patterned after the Mocha library for Ruby.")
9453 (license license:bsd-3)))
9454
9455(define-public python2-chai
9456 (package-with-python2 python-chai))
9457
9458(define-public python-inflection
9459 (package
9460 (name "python-inflection")
9461 (version "0.3.1")
9462 (source
9463 (origin (method url-fetch)
9464 (uri (pypi-uri "inflection" version))
9465 (sha256
9466 (base32
9467 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9468 (build-system python-build-system)
9469 (native-inputs
9470 `(("python-pytest" ,python-pytest)))
9471 (home-page "https://github.com/jpvanhal/inflection")
9472 (synopsis "Python string transformation library")
9473 (description
9474 "Inflection is a string transformation library. It singularizes
9475and pluralizes English words, and transforms strings from CamelCase to
9476underscored string.")
9477 (license license:expat)))
9478
9479(define-public python2-inflection
9480 (package-with-python2 python-inflection))
9481
9482(define-public python-pylev
9483 (package
9484 (name "python-pylev")
9485 (version "1.3.0")
9486 (source (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "pylev" version))
9489 (sha256
9490 (base32
9491 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9492 (build-system python-build-system)
9493 (home-page "https://github.com/toastdriven/pylev")
9494 (synopsis "Levenshtein distance implementation in Python")
9495 (description "Pure Python Levenshtein implementation, based off the
9496Wikipedia code samples at
9497@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9498 (license license:bsd-3)))
9499
9500(define-public python2-pylev
9501 (package-with-python2 python-pylev))
9502
9503(define-public python-cleo
9504 (package
9505 (name "python-cleo")
9506 (version "0.6.1")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "cleo" version))
9510 (sha256
9511 (base32
9512 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9513 (build-system python-build-system)
9514 (native-inputs
9515 `(;; For testing
9516 ("python-mock" ,python-mock)
9517 ("python-pytest-mock" ,python-pytest-mock)
9518 ("python-pytest" ,python-pytest)))
9519 (propagated-inputs
9520 `(("python-backpack" ,python-backpack)
9521 ("python-pastel" ,python-pastel)
9522 ("python-pylev" ,python-pylev)))
9523 (home-page "https://github.com/sdispater/cleo")
9524 (synopsis "Command-line arguments library for Python")
9525 (description
9526 "Cleo allows you to create command-line commands with signature in
9527docstring and colored output.")
9528 (license license:expat)))
9529
9530(define-public python2-cleo
9531 (package-with-python2 python-cleo))
9532
9533(define-public python-lazy-object-proxy
9534 (package
9535 (name "python-lazy-object-proxy")
9536 (version "1.3.1")
9537 (source (origin
9538 (method url-fetch)
9539 (uri (pypi-uri "lazy-object-proxy" version))
9540 (sha256
9541 (base32
9542 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9543 (build-system python-build-system)
9544 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9545 (synopsis "Lazy object proxy for python")
9546 (description
9547 "Lazy object proxy is an object that wraps a callable but defers the call
9548until the object is actually required, and caches the result of said call.")
9549 (license license:bsd-2)))
9550
9551(define-public python2-lazy-object-proxy
9552 (package-with-python2 python-lazy-object-proxy))
9553
9554(define-public python-dnspython
9555 (package
9556 (name "python-dnspython")
9557 (version "1.15.0")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (string-append "http://www.dnspython.org/kits/"
9561 version "/dnspython-" version ".tar.gz"))
9562 (sha256
9563 (base32
9564 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9565 (build-system python-build-system)
9566 (arguments '(#:tests? #f)) ; XXX: requires internet access
9567 (home-page "http://www.dnspython.org")
9568 (synopsis "DNS toolkit for Python")
9569 (description
9570 "dnspython is a DNS toolkit for Python. It supports almost all record
9571types. It can be used for queries, zone transfers, and dynamic updates.
9572It supports TSIG authenticated messages and EDNS0.")
9573 (license license:expat)))
9574
9575(define-public python2-dnspython
9576 (package-with-python2 python-dnspython))
9577
9578(define-public python-email-validator
9579 (package
9580 (name "python-email-validator")
9581 (version "1.0.2")
9582 (source
9583 (origin (method url-fetch)
9584 (uri (pypi-uri "email_validator" version))
9585 (sha256
9586 (base32
9587 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9588 (build-system python-build-system)
9589 (arguments
9590 '(#:phases
9591 (modify-phases %standard-phases
9592 (add-before 'build 'use-dnspython
9593 (lambda _
9594 (substitute* "setup.py"
9595 (("dnspython3") "dnspython"))
9596 #t)))))
9597 (propagated-inputs
9598 `(("python-dnspython" ,python-dnspython)
9599 ("python-idna" ,python-idna)))
9600 (home-page "https://github.com/JoshData/python-email-validator")
9601 (synopsis "Email address validation library for Python")
9602 (description
9603 "This library validates email address syntax and deliverability.")
9604 (license license:cc0)))
9605
9606(define-public python2-email-validator
9607 (package-with-python2 python-email-validator))
9608
9609(define-public python-ukpostcodeparser
9610 (package
9611 (name "python-ukpostcodeparser")
9612 (version "1.0.3")
9613 (source (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "UkPostcodeParser" version))
9616 (sha256
9617 (base32
9618 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9619 (build-system python-build-system)
9620 (home-page "https://github.com/hamstah/ukpostcodeparser")
9621 (synopsis "UK Postcode parser for Python")
9622 (description
9623 "This library provides the @code{parse_uk_postcode} function for
9624parsing UK postcodes.")
9625 (license license:expat)))
9626
9627(define-public python2-ukpostcodeparser
9628 (package-with-python2 python-ukpostcodeparser))
9629
9630(define-public python-faker
9631 (package
9632 (name "python-faker")
9633 (version "0.7.9")
9634 (source (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "Faker" version))
9637 (sha256
9638 (base32
9639 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9640 (patches
9641 (search-patches "python-faker-fix-build-32bit.patch"))
9642 (modules '((guix build utils)))
9643 (snippet
9644 '(begin
9645 (for-each delete-file (find-files "." "\\.pyc$"))
9646 #t))))
9647 (build-system python-build-system)
9648 (arguments
9649 '(#:phases
9650 (modify-phases %standard-phases
9651 (replace 'check
49ff8827 9652 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9653 (native-inputs
9654 `(;; For testing
9655 ("python-email-validator" ,python-email-validator)
9656 ("python-mock" ,python-mock)
9657 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9658 (propagated-inputs
9659 `(("python-dateutil" ,python-dateutil)
9660 ("python-six" ,python-six)))
9661 (home-page "https://github.com/joke2k/faker")
9662 (synopsis "Python package that generates fake data")
9663 (description
9664 "Faker is a Python package that generates fake data such as names,
9665addresses, and phone numbers.")
9666 (license license:expat)
9667 (properties `((python2-variant . ,(delay python2-faker))))))
9668
9669(define-public python2-faker
9670 (let ((base (package-with-python2 (strip-python2-variant
9671 python-faker))))
9672 (package
9673 (inherit base)
9674 (propagated-inputs
9675 `(("python2-ipaddress" ,python2-ipaddress)
9676 ,@(package-propagated-inputs base))))))
9677
9678(define-public python-pyaml
9679 (package
9680 (name "python-pyaml")
9681 (version "18.11.0")
9682 (source (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "pyaml" version))
9685 (sha256
9686 (base32
9687 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9688 (build-system python-build-system)
9689 (native-inputs
9690 `(("python-unidecode" ,python-unidecode)))
9691 (propagated-inputs
9692 `(("python-pyyaml" ,python-pyyaml)))
9693 (home-page "https://github.com/mk-fg/pretty-yaml")
9694 (synopsis "YAML pretty-print library for Python")
9695 (description
9696 "pyaml is a PyYAML based python module to produce pretty and readable
9697YAML-serialized data.")
9698 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9699
9700(define-public python2-pyaml
9701 (package-with-python2 python-pyaml))
9702
9703(define-public python-backpack
9704 (package
9705 (name "python-backpack")
9706 (version "0.1")
9707 (source
9708 (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "backpack" version))
9711 (sha256
9712 (base32
9713 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9714 (build-system python-build-system)
9715 (native-inputs
9716 `(("python-pytest" ,python-pytest)
9717 ("python-nose" ,python-nose)))
9718 (propagated-inputs
9719 `(("python-simplejson" ,python-simplejson)))
9720 (home-page "https://github.com/sdispater/backpack")
9721 (synopsis "Utilities for working with Python collections")
9722 (description "Backpack provides some useful utilities for working with
9723collections of data.")
9724 (license license:expat)))
9725
9726(define-public python2-backpack
9727 (package-with-python2 python-backpack))
9728
9729(define-public python-prompt-toolkit
9730 (package
9731 (name "python-prompt-toolkit")
9732 (version "2.0.7")
9733 (source
9734 (origin
9735 (method url-fetch)
9736 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9737 (sha256
9738 (base32
9739 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9740 (build-system python-build-system)
9741 (arguments
9742 `(#:phases
9743 (modify-phases %standard-phases
9744 (delete 'check)
9745 (add-after 'install 'post-install-check
9746 (lambda* (#:key inputs outputs #:allow-other-keys)
9747 ;; HOME is needed for the test
9748 ;; "test_pathcompleter_can_expanduser".
9749 (setenv "HOME" "/tmp")
9750 (add-installed-pythonpath inputs outputs)
9751 (invoke "py.test"))))))
9752 (propagated-inputs
9753 `(("python-wcwidth" ,python-wcwidth)
9754 ("python-six" ,python-six)
9755 ("python-pygments" ,python-pygments)))
9756 (native-inputs
9757 `(("python-pytest" ,python-pytest)))
9758 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9759 (synopsis "Library for building command line interfaces in Python")
9760 (description
9761 "Prompt-Toolkit is a library for building interactive command line
9762interfaces in Python. It's like GNU Readline but it also features syntax
9763highlighting while typing, out-of-the-box multi-line input editing, advanced
9764code completion, incremental search, support for Chinese double-width
9765characters, mouse support, and auto suggestions.")
9766 (license license:bsd-3)))
9767
9768(define-public python2-prompt-toolkit
9769 (package-with-python2 python-prompt-toolkit))
9770
9771(define-public python-prompt-toolkit-1
9772 (package (inherit python-prompt-toolkit)
9773 (version "1.0.15")
9774 (source
9775 (origin
9776 (method url-fetch)
9777 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9778 (sha256
9779 (base32
9780 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9781
9782(define-public python2-prompt-toolkit-1
9783 (package-with-python2 python-prompt-toolkit-1))
9784
9785(define-public python-jedi
9786 (package
9787 (name "python-jedi")
40bd0aa3 9788 (version "0.13.2")
44d10b1f
RW
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (pypi-uri "jedi" version))
9793 (sha256
9794 (base32
40bd0aa3 9795 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9796 (build-system python-build-system)
9797 (arguments
40bd0aa3 9798 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9799 ;; https://github.com/davidhalter/jedi/issues/1263)
9800 #:tests? #f
9801 #:phases
9802 (modify-phases %standard-phases
9803 (replace 'check
9804 (lambda* (#:key tests? #:allow-other-keys)
9805 (when tests?
9806 (invoke "py.test" "-vv")))))))
9807 (native-inputs
9808 `(("python-pytest" ,python-pytest)
9809 ("python-docopt" ,python-docopt)))
9810 (propagated-inputs
9811 `(("python-parso" ,python-parso)))
9812 (home-page "https://github.com/davidhalter/jedi")
9813 (synopsis "Autocompletion and static analysis library for Python")
9814 (description
9815 "Jedi is a static analysis tool for Python that can be used in Integrated
9816Development Environments (@dfn{IDE}s) and text editors. It understands Python
9817on a deeper level than many other static analysis frameworks for Python.
9818
9819Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9820well.")
9821 (license license:expat)))
9822
9823(define-public python2-jedi
9824 (package-with-python2 python-jedi))
9825
9826(define-public ptpython
9827 (package
9828 (name "ptpython")
9829 (version "0.34")
9830 (source (origin
9831 (method url-fetch)
9832 (uri (pypi-uri "ptpython" version))
9833 (sha256
9834 (base32
9835 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9836 (build-system python-build-system)
9837 (arguments
9838 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9839 (propagated-inputs
9840 `(("python-docopt" ,python-docopt)
9841 ("python-jedi" ,python-jedi)
9842 ("python-prompt-toolkit" ,python-prompt-toolkit)
9843 ("python-pygments" ,python-pygments)))
9844 (home-page "https://github.com/jonathanslenders/ptpython")
9845 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9846 (description
9847 "ptpython is a Python read-eval-print loop with IDE-like features.
9848It supports syntax highlighting, multiline editing, autocompletion, mouse,
9849color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9850etc.")
9851 (license license:bsd-3)
9852 (properties `((python2-variant . ,(delay ptpython-2))))))
9853
9854(define-public ptpython-2
9855 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9856 (package
9857 (inherit base)
9858 (name "ptpython2"))))
9859
9860(define-public python-stem
9861 (package
9862 (name "python-stem")
9863 (version "1.7.0")
9864 (source
9865 (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "stem" version))
9868 (sha256
9869 (base32
9870 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9871 (build-system python-build-system)
9872 (arguments
9873 `(#:phases
9874 (modify-phases %standard-phases
9875 (replace 'check
9876 (lambda _
9877 (invoke "./run_tests.py" "--unit")
9878 #t)))))
9879 (native-inputs
9880 `(("python-mock" ,python-mock)
9881 ("python-pycodestyle" ,python-pycodestyle)
9882 ("python-pyflakes" ,python-pyflakes)))
9883 (home-page "https://stem.torproject.org/")
9884 (synopsis
9885 "Python controller library that allows applications to interact with Tor")
9886 (description
9887 "Stem is a Python controller library for Tor. With it you can use Tor's
9888control protocol to script against the Tor process and read descriptor data
9889relays publish about themselves.")
9890 (license license:lgpl3)))
9891
9892(define-public python2-stem
9893 (package-with-python2 python-stem))
9894
9895(define-public python-pyserial
9896 (package
9897 (name "python-pyserial")
9898 (version "3.1.1")
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "pyserial" version))
9903 (sha256
9904 (base32
9905 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9906 (build-system python-build-system)
9907 (arguments
9908 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9909 ;; #:phases
9910 ;; (modify-phases %standard-phases
9911 ;; (replace 'check
9912 ;; (lambda _
9913 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9914 (home-page
9915 "https://github.com/pyserial/pyserial")
9916 (synopsis "Python Serial Port Bindings")
9917 (description "@code{pyserial} provide serial port bindings for Python. It
9918supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9919and/or Xon/Xoff. The port is accessed in RAW mode.")
9920 (license license:bsd-3)))
9921
9922(define-public python2-pyserial
9923 (package-with-python2 python-pyserial))
9924
9925(define-public python-kivy
9926 (package
9927 (name "python-kivy")
9928 (version "1.10.1")
9929 (source
9930 (origin
9931 (method url-fetch)
9932 (uri (pypi-uri "Kivy" version))
9933 (file-name (string-append name "-" version ".tar.gz"))
9934 (sha256
9935 (base32
9936 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9937 (build-system python-build-system)
9938 (arguments
9939 `(#:tests? #f ; Tests require many optional packages
9940 #:phases
9941 (modify-phases %standard-phases
9942 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9943 (lambda* (#:key inputs #:allow-other-keys)
9944 (setenv "KIVY_SDL2_PATH"
9945 (string-append (assoc-ref inputs "sdl-union")
9946 "/include/SDL2"))
9947 #t)))))
9948 (native-inputs
9949 `(("git" ,git)
9950 ("pkg-config" ,pkg-config)
9951 ("python-cython" ,python-cython)))
9952 (inputs
9953 `(("gstreamer" ,gstreamer)
9954 ("mesa" ,mesa)
9955 ("sdl-union"
9956 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9957 (home-page "http://kivy.org")
9958 (synopsis
9959 "Multitouch application framework")
9960 (description
9961 "A software library for rapid development of
9962hardware-accelerated multitouch applications.")
9963 (license license:expat)))
9964
9965(define-public python2-kivy
9966 (package-with-python2 python-kivy))
9967
9968(define-public python-kivy-next
9969 (deprecated-package "python-kivy-next" python-kivy))
9970
9971(define-public python2-kivy-next
9972 (deprecated-package "python2-kivy-next" python2-kivy))
9973
9974(define-public python-binaryornot
9975 (package
9976 (name "python-binaryornot")
9977 (version "0.4.4")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "binaryornot" version))
9981 (sha256
9982 (base32
9983 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9984 (build-system python-build-system)
9985 (propagated-inputs
9986 `(("python-chardet" ,python-chardet)
9987 ("python-hypothesis" ,python-hypothesis)))
9988 (home-page "https://github.com/audreyr/binaryornot")
9989 (synopsis "Package to check if a file is binary or text")
9990 (description "Ultra-lightweight pure Python package to check if a file is
9991binary or text.")
9992 (license license:bsd-3)
9993 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9994
9995(define-public python2-binaryornot
9996 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9997 (package (inherit base)
9998 (propagated-inputs
9999 `(("python2-enum34" ,python2-enum34)
10000 ,@(package-propagated-inputs base))))))
10001
10002(define-public python-nltk
10003 (package
10004 (name "python-nltk")
10005 (version "3.2.1")
10006 (source (origin
10007 (method url-fetch)
10008 (uri (pypi-uri "nltk" version))
10009 (sha256
10010 (base32
10011 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10012 (build-system python-build-system)
10013 (arguments
10014 '(;; The tests require some extra resources to be downloaded.
10015 ;; TODO Try packaging these resources.
10016 #:tests? #f))
10017 (home-page "http://nltk.org/")
10018 (synopsis "Natural Language Toolkit")
10019 (description "It provides interfaces to over 50 corpora and lexical
10020resources such as WordNet, along with a suite of text processing libraries
10021for classification, tokenization, stemming, tagging, parsing, and semantic
10022reasoning, wrappers for natural language processing libraries.")
10023 (license license:asl2.0)))
10024
10025(define-public python2-nltk
10026 (package-with-python2 python-nltk))
10027
10028(define-public python-pymongo
10029 (package
10030 (name "python-pymongo")
10031 (version "3.7.2")
10032 (source (origin
10033 (method url-fetch)
10034 (uri (pypi-uri "pymongo" version))
10035 (sha256
10036 (base32
10037 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10038 (build-system python-build-system)
10039 (propagated-inputs
10040 `(("python-certifi" ,python-certifi)))
10041 (home-page "https://github.com/mongodb/mongo-python-driver")
10042 (synopsis "Python driver for MongoDB")
10043 (description "Python driver for MongoDB.")
10044 (license license:asl2.0)))
10045
10046(define-public python2-pymongo
10047 (package-with-python2 python-pymongo))
10048
44d10b1f
RW
10049(define-public python-consul
10050 (package
10051 (name "python-consul")
10052 (version "0.6.1")
10053 (source
10054 (origin
10055 (method url-fetch)
10056 (uri (pypi-uri "python-consul" version))
10057 (sha256
10058 (base32
10059 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10060 (build-system python-build-system)
10061 (arguments
10062 '(#:tests? #f)) ; The tests are not distributed
10063 (propagated-inputs
10064 `(("python-requests" ,python-requests)
10065 ("python-six" ,python-six)))
10066 (home-page "https://github.com/cablehead/python-consul")
10067 (synopsis "Python client for Consul")
10068 (description
10069 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10070discovery, monitoring and configuration.")
10071 (license license:expat)))
10072
10073(define-public python2-consul
10074 (package-with-python2 python-consul))
10075
10076(define-public python-schematics
10077 (package
10078 (name "python-schematics")
10079 (version "1.1.1")
10080 (source
10081 (origin
10082 (method url-fetch)
10083 (uri (string-append
10084 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10085 (file-name (string-append name "-" version ".tar.gz"))
10086 (sha256
10087 (base32
10088 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10089 (build-system python-build-system)
10090 (propagated-inputs
10091 `(("python-six" ,python-six)))
10092 (arguments
10093 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10094 ; version requirements (eg python-coveralls)
10095 (home-page "https://github.com/schematics/schematics")
10096 (synopsis "Python Data Structures for Humans")
10097 (description "Python Data Structures for Humans.")
10098 (license license:bsd-3)))
10099
10100(define-public python2-schematics
10101 (package-with-python2 python-schematics))
10102
10103(define-public python-odfpy
10104 (package
10105 (name "python-odfpy")
10106 (version "1.3.3")
10107 (source (origin
10108 (method url-fetch)
10109 (uri (pypi-uri "odfpy" version))
10110 (sha256
10111 (base32
10112 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10113 (arguments
10114 `(#:modules ((srfi srfi-1)
10115 (guix build python-build-system)
10116 (guix build utils))
10117 #:phases
10118 (modify-phases %standard-phases
10119 (replace 'check
10120 ;; The test runner invokes python2 and python3 for test*.py.
10121 ;; To avoid having both in inputs, we replicate it here.
10122 (lambda _
21ccc01d
RW
10123 (for-each (lambda (test-file) (invoke "python" test-file))
10124 (find-files "tests" "^test.*\\.py$"))
10125 #t)))))
44d10b1f
RW
10126 (build-system python-build-system)
10127 (home-page "https://github.com/eea/odfpy")
10128 (synopsis "Python API and tools to manipulate OpenDocument files")
10129 (description "Collection of libraries and utility programs written in
10130Python to manipulate OpenDocument 1.2 files.")
10131 (license
10132 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10133 ;; number of files with other licenses.
10134 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10135
10136(define-public python2-odfpy
10137 (package-with-python2 python-odfpy))
10138
10139(define-public python-natsort
10140 (package
10141 (name "python-natsort")
10142 (version "5.4.1")
10143 (source (origin
10144 (method url-fetch)
10145 (uri (pypi-uri "natsort" version))
10146 (sha256
10147 (base32
10148 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10149 (build-system python-build-system)
10150 (arguments
10151 `(#:modules ((guix build utils)
10152 (guix build python-build-system)
10153 (srfi srfi-1)
10154 (srfi srfi-26)
10155 (ice-9 ftw))
10156 #:phases
10157 (modify-phases %standard-phases
10158 (add-before 'check 'set-cachedir
10159 ;; Tests require write access to $HOME by default
10160 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10161 (replace 'check
10162 (lambda _
10163 (let ((cwd (getcwd)))
10164 (setenv "PYTHONPATH"
10165 (string-append
10166 cwd "/build/"
10167 (find (cut string-prefix? "lib" <>)
10168 (scandir (string-append cwd "/build")))
10169 ":"
10170 (getenv "PYTHONPATH")))
10171 (invoke "pytest" "-v")))))))
10172 (native-inputs
10173 `(("python-hypothesis" ,python-hypothesis)
10174 ("python-pytest-cov" ,python-pytest-cov)
10175 ("python-pytest-mock" ,python-pytest-mock)
10176 ("python-pytest" ,python-pytest)))
10177 (propagated-inputs ; TODO: Add python-fastnumbers.
10178 `(("python-pyicu" ,python-pyicu)))
10179 (home-page "https://github.com/SethMMorton/natsort")
10180 (synopsis "Natural sorting for python and shell")
10181 (description
10182 "Natsort lets you apply natural sorting on lists instead of
10183lexicographical. If you use the built-in @code{sorted} method in python
10184on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10185returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10186function @code{natsorted} that identifies numbers and sorts them separately
10187from strings. It can also sort version numbers, real numbers, mixed types
10188and more, and comes with a shell command @command{natsort} that exposes this
10189functionality in the command line.")
10190 (license license:expat)
10191 (properties `((python2-variant . ,(delay python2-natsort))))))
10192
10193(define-public python2-natsort
10194 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10195 (package (inherit base)
10196 (native-inputs
10197 `(("python2-pathlib" ,python2-pathlib)
10198 ,@(package-native-inputs base))))))
10199
10200(define-public python-glances
10201 (package
10202 (name "python-glances")
10203 (version "3.0.2")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "Glances" version))
10208 (sha256
10209 (base32
10210 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10211 (build-system python-build-system)
10212 (propagated-inputs
10213 `(("python-psutil" ,python-psutil)))
10214 (home-page
10215 "https://github.com/nicolargo/glances")
10216 (synopsis
10217 "A cross-platform curses-based monitoring tool")
10218 (description
10219 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10220Glances uses the PsUtil library to get information from your system. It monitors
10221CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10222 (license license:lgpl3+)))
10223
10224(define-public python2-glances
10225 (package-with-python2 python-glances))
10226
10227(define-public python-graphql-core
10228 (package
10229 (name "python-graphql-core")
10230 (version "0.5.3")
10231 (source
10232 (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "graphql-core" version))
10235 (sha256
10236 (base32
10237 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10238 (build-system python-build-system)
10239 (arguments
10240 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10241 #:phases
10242 (modify-phases %standard-phases
10243 (add-after 'unpack 'patch-hardcoded-version
10244 (lambda _ (substitute*
10245 "setup.py"
10246 (("'gevent==1.1rc1'") "'gevent'"))
10247 #t)))))
10248 (native-inputs
10249 `(("python-gevent" ,python-gevent)
10250 ("python-mock" ,python-mock)
10251 ("python-pytest-mock" ,python-pytest-mock)))
10252 (propagated-inputs
10253 `(("python-promise" ,python-promise)
10254 ("python-six" ,python-six)))
10255 (home-page "https://github.com/graphql-python/graphql-core")
10256 (synopsis "GraphQL implementation for Python")
10257 (description
10258 "GraphQL implementation for Python. GraphQL is a data query language and
10259runtime designed and used to request and deliver data to mobile and web apps.
10260This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10261to Python.")
10262 (license license:expat)))
10263
10264(define-public python2-graphql-core
10265 (package-with-python2 python-graphql-core))
10266
10267(define-public python-graphql-relay
10268 (package
10269 (name "python-graphql-relay")
10270 (version "0.4.5")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "graphql-relay" version))
10275 (sha256
10276 (base32
10277 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10278 (build-system python-build-system)
10279 (arguments
10280 '(#:tests? #f)) ; The tests are not distributed
10281 (propagated-inputs
10282 `(("python-graphql-core" ,python-graphql-core)
10283 ("python-promise" ,python-promise)
10284 ("python-six" ,python-six)))
10285 (home-page "https://github.com/graphql-python/graphql-relay-py")
10286 (synopsis "Relay implementation for Python")
10287 (description
10288 "This is a library to allow the easy creation of Relay-compliant servers
10289using the GraphQL Python reference implementation of a GraphQL server. It
10290should be noted that the code is a exact port of the original
10291@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10292from Facebook.")
10293 (license license:expat)))
10294
10295(define-public python2-graphql-relay
10296 (package-with-python2 python-graphql-relay))
10297
10298(define-public python-graphene
10299 (package
10300 (name "python-graphene")
10301 (version "0.10.2")
10302 (source
10303 (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "graphene" version))
10306 (sha256
10307 (base32
10308 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10309 (build-system python-build-system)
10310 (propagated-inputs
10311 `(("python-graphql-core" ,python-graphql-core)
10312 ("python-graphql-relay" ,python-graphql-relay)
10313 ("python-iso8601" ,python-iso8601)
10314 ("python-promise" ,python-promise)
10315 ("python-six" ,python-six)))
10316 (arguments
10317 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10318 (home-page "http://graphene-python.org/")
10319 (synopsis "GraphQL Framework for Python")
10320 (description
10321 "Graphene is a Python library for building GraphQL schemas/types.
10322A GraphQL schema describes your data model, and provides a GraphQL server
10323with an associated set of resolve methods that know how to fetch data.")
10324 (properties `((python2-variant . ,(delay python2-graphene))))
10325 (license license:expat)))
10326
10327(define-public python2-graphene
10328 (let ((base (package-with-python2
10329 (strip-python2-variant python-graphene))))
10330 (package (inherit base)
10331 (native-inputs
10332 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10333 ,@(package-native-inputs base))))))
10334
10335(define-public python-nautilus
10336 (package
10337 (name "python-nautilus")
10338 (version "0.4.9")
10339 (source
10340 (origin
10341 (method url-fetch)
10342 (uri (pypi-uri "nautilus" version))
10343 (sha256
10344 (base32
10345 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10346 (build-system python-build-system)
10347 (arguments `(#:tests? #f)) ; fails to import test modules
10348 (propagated-inputs
10349 `(("python-bcrypt" ,python-bcrypt)
10350 ("python-click" ,python-click)
10351 ("python-consul" ,python-consul)
10352 ("python-graphene" ,python-graphene)
10353 ("python-jinja2" ,python-jinja2)
10354 ("python-peewee" ,python-peewee)
10355 ("python-pika" ,python-pika)
10356 ("python-tornado" ,python-tornado)
10357 ("python-wtforms" ,python-wtforms)))
10358 (native-inputs
10359 `(("python-nose2" ,python-nose2)))
10360 (home-page "https://github.com/AlecAivazis/nautilus")
10361 (synopsis "Library for creating microservice applications")
10362 (description
10363 "Nautilus is a framework for flux based microservices that looks to
10364provide extendible implementations of common aspects of a cloud so that you can
10365focus on building massively scalable web applications.")
10366 (license license:expat)))
10367
10368(define-public python-snowballstemmer
10369 (package
10370 (name "python-snowballstemmer")
10371 (version "1.2.1")
10372 (source (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "snowballstemmer" version))
10375 (sha256
10376 (base32
10377 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10378 (build-system python-build-system)
10379 (arguments
10380 `(;; No tests exist
10381 #:tests? #f))
10382 (home-page "https://github.com/shibukawa/snowball_py")
10383 (synopsis "Snowball stemming library collection for Python")
10384 (description "This package provides 16 word stemmer algorithms generated
10385from Snowball algorithms. It includes the 15 original ones plus the Poerter
10386English stemmer.")
10387 (license license:bsd-3)))
10388
10389(define-public python2-snowballstemmer
10390 (package-with-python2 python-snowballstemmer))
10391
10392(define-public python-sphinx-cloud-sptheme
10393 (package
10394 (name "python-sphinx-cloud-sptheme")
10395 (version "1.8.0")
10396 (source (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "cloud_sptheme" version))
10399 (sha256
10400 (base32
10401 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10402 (build-system python-build-system)
10403 ;; FIXME: The 'pypi' release archive does not contain tests.
10404 (arguments '(#:tests? #f))
10405 (native-inputs
10406 `(("python-sphinx" ,python-sphinx)))
10407 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10408 (synopsis "'Cloud' theme for Sphinx documenter")
10409 (description "This package contains the \"Cloud\" theme for Sphinx and some
10410related extensions.")
10411 (license license:bsd-3)))
10412
10413(define-public python2-sphinx-cloud-sptheme
10414 (package-with-python2 python-sphinx-cloud-sptheme))
10415
10416(define-public python-sphinx-alabaster-theme
10417 (package
10418 (name "python-sphinx-alabaster-theme")
10419 (version "0.7.12")
10420 (source (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "alabaster" version))
10423 (sha256
10424 (base32
10425 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10426 (build-system python-build-system)
10427 (propagated-inputs
10428 `(("python-pygments" ,python-pygments)))
10429 (home-page "https://alabaster.readthedocs.io/")
10430 (synopsis "Configurable sidebar-enabled Sphinx theme")
10431 (description "Alabaster is a visually (c)lean, responsive, configurable
10432theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10433 (license license:bsd-3)))
10434
10435(define-public python2-sphinx-alabaster-theme
10436 (package-with-python2 python-sphinx-alabaster-theme))
10437
10438(define-public python-setproctitle
10439(package
10440 (name "python-setproctitle")
10441 (version "1.1.10")
10442 (source
10443 (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "setproctitle" version))
10446 (sha256
10447 (base32
10448 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10449 (build-system python-build-system)
10450 (arguments
10451 '(#:phases
10452 (modify-phases %standard-phases
10453 (add-before 'check 'patch-Makefile
10454 ;; Stricly this is only required for the python2 variant.
10455 ;; But adding a phase in an inherited package seems to be
10456 ;; cumbersum. So we patch even for python3.
10457 (lambda _
10458 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10459 (when nose
10460 (substitute* "Makefile"
10461 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10462 (string-append nose "/bin/nosetests "))))
10463 #t)))
10464 (replace 'check
10465 (lambda _
10466 (setenv "PYTHON" (or (which "python3") (which "python")))
10467 (setenv "PYCONFIG" (or (which "python3-config")
10468 (which "python-config")))
10469 (setenv "CC" "gcc")
10470 ;; No need to extend PYTHONPATH to find the built package, since
10471 ;; the Makefile will build anyway
10472 (invoke "make" "check"))))))
10473 (native-inputs
10474 `(("procps" ,procps))) ; required for tests
10475 (home-page
10476 "https://github.com/dvarrazzo/py-setproctitle")
10477 (synopsis
10478 "Setproctitle implementation for Python to customize the process title")
10479 (description "The library allows a process to change its title (as displayed
10480by system tools such as ps and top).
10481
10482Changing the title is mostly useful in multi-process systems, for
10483example when a master process is forked: changing the children's title
10484allows to identify the task each process is busy with. The technique
10485is used by PostgreSQL and the OpenSSH Server for example.")
10486 (license license:bsd-3)
10487 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10488
10489(define-public python2-setproctitle
10490 (let ((base (package-with-python2
10491 (strip-python2-variant python-setproctitle))))
10492 (package
10493 (inherit base)
10494 (native-inputs `(("python2-nose" ,python2-nose)
10495 ,@(package-native-inputs base))))))
10496
10497(define-public python-validictory
10498 (package
10499 (name "python-validictory")
10500 (version "1.0.1")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "validictory" version))
10505 (sha256
10506 (base32
10507 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10508 (build-system python-build-system)
10509 (arguments
10510 '(#:phases
10511 (modify-phases %standard-phases
10512 (add-after 'unpack 'bootstrap
10513 ;; Move the tests out of the package directory to avoid
10514 ;; packaging them.
10515 (lambda* _
10516 (rename-file "validictory/tests" "tests")
10517 (delete-file "tests/__init__.py")))
10518 (replace 'check
10519 (lambda _
10520 ;; Extend PYTHONPATH so the built package will be found.
10521 (setenv "PYTHONPATH"
10522 (string-append (getcwd) "/build/lib:"
10523 (getenv "PYTHONPATH")))
6568bd5d 10524 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10525 (native-inputs
10526 `(("python-pytest" ,python-pytest)))
10527 (home-page
10528 "https://github.com/jamesturk/validictory")
10529 (synopsis "General purpose Python data validator")
10530 (description "It allows validation of arbitrary Python data structures.
10531
10532The schema format is based on the JSON Schema
10533proposal (http://json-schema.org), so combined with json the library is also
10534useful as a validator for JSON data.")
10535 (license license:expat)))
10536
10537(define-public python2-validictory
10538 (package-with-python2 python-validictory))
10539
10540(define-public python-pyelftools
10541 (package
10542 (name "python-pyelftools")
10543 (version "0.25")
10544 (source
10545 (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "pyelftools" version))
10548 (sha256
10549 (base32
10550 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10551 (build-system python-build-system)
10552 (arguments
10553 `(#:phases
10554 (modify-phases %standard-phases
10555 (add-before 'check 'set-pythonpath
10556 (lambda _
10557 (setenv "PYTHONPATH"
10558 (string-append
10559 (getcwd) "/test/"
10560 ":" (getenv "PYTHONPATH")))
10561 #t)))))
10562 (home-page
10563 "https://github.com/eliben/pyelftools")
10564 (synopsis
10565 "Analyze binary and library file information")
10566 (description "This Python library provides interfaces for parsing and
10567analyzing two binary and library file formats; the Executable and Linking
10568Format (ELF), and debugging information in the Debugging With Attributed
10569Record Format (DWARF).")
10570 (license license:public-domain)))
10571
10572(define-public python-pyev
10573 (package
10574 (name "python-pyev")
10575 (version "0.9.0")
10576 (source
10577 (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "pyev" version))
10580 (sha256
10581 (base32
10582 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10583 (build-system python-build-system)
10584 (arguments
10585 `(#:tests? #f ; no test suite
10586 #:phases
10587 (modify-phases %standard-phases
10588 (add-after 'unpack 'patch
10589 (lambda* (#:key inputs #:allow-other-keys)
10590 (let ((libev (string-append (assoc-ref inputs "libev")
10591 "/lib/libev.so.4")))
10592 (substitute* "setup.py"
10593 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10594 (string-append "libev_dll_name = \"" libev "\"")))))))))
10595 (inputs
10596 `(("libev" ,libev)))
10597 (home-page "http://pythonhosted.org/pyev/")
10598 (synopsis "Python libev interface")
10599 (description "Pyev provides a Python interface to libev.")
10600 (license license:gpl3)))
10601
10602(define-public python2-pyev
10603 (package-with-python2 python-pyev))
10604
10605(define-public python-imagesize
10606 (package
10607 (name "python-imagesize")
10608 (version "1.1.0")
10609 (source
10610 (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "imagesize" version))
10613 (sha256
10614 (base32
10615 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10616 (build-system python-build-system)
10617 (home-page "https://github.com/shibukawa/imagesize_py")
10618 (synopsis "Gets image size of files in various formats in Python")
10619 (description
10620 "This package allows determination of image size from
10621PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10622 (license license:expat)))
10623
10624(define-public python2-imagesize
10625 (package-with-python2 python-imagesize))
10626
10627(define-public python-termstyle
10628 (package
10629 (name "python-termstyle")
10630 (version "0.1.11")
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "termstyle" version))
10635 (sha256
10636 (base32
10637 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10638 (build-system python-build-system)
10639 (arguments
10640 '(#:phases
10641 (modify-phases %standard-phases
10642 (replace 'check
10643 (lambda _
831080a6 10644 (invoke "python" "test3.py"))))))
44d10b1f
RW
10645 (home-page "https://github.com/gfxmonk/termstyle")
10646 (synopsis "Console text coloring for Python")
10647 (description "This package provides console text coloring for Python.")
10648 (license license:bsd-3)))
10649
10650(define-public python-argcomplete
10651 (package
10652 (name "python-argcomplete")
10653 (version "1.7.0")
10654 (source
10655 (origin
10656 (method url-fetch)
10657 (uri (pypi-uri "argcomplete" version))
10658 (sha256
10659 (base32
10660 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10661 (build-system python-build-system)
10662 (native-inputs
10663 `(("python-pexpect" ,python-pexpect)
10664 ("tcsh" ,tcsh)
10665 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10666 (home-page "https://github.com/kislyuk/argcomplete")
10667 (synopsis "Shell tab completion for Python argparse")
10668 (description "argcomplete provides extensible command line tab completion
10669of arguments and options for Python scripts using @code{argparse}. It's
10670particularly useful for programs with many options or sub-parsers that can
10671dynamically suggest completions; for example, when browsing resources over the
10672network.")
10673 (license license:asl2.0)))
10674
10675(define-public python2-argcomplete
10676 (package-with-python2 python-argcomplete))
10677
10678(define-public python-xopen
10679 (package
10680 (name "python-xopen")
10681 (version "0.3.3")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "xopen" version))
10686 (sha256
10687 (base32
10688 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10689 (file-name (string-append name "-" version ".tar.gz"))))
10690 (build-system python-build-system)
10691 (home-page "https://github.com/marcelm/xopen/")
10692 (synopsis "Open compressed files transparently")
10693 (description "This module provides an @code{xopen} function that works like
10694Python's built-in @code{open} function, but can also deal with compressed files.
10695Supported compression formats are gzip, bzip2 and, xz, and are automatically
10696recognized by their file extensions. The focus is on being as efficient as
10697possible on all supported Python versions.")
10698 (license license:expat)))
10699
10700(define-public python2-xopen
10701 (let ((base (package-with-python2
10702 (strip-python2-variant python-xopen))))
10703 (package
10704 (inherit base)
10705 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10706 ,@(package-propagated-inputs base))))))
10707
10708(define-public python-cheetah
10709 (package
10710 (name "python-cheetah")
10711 (version "3.1.0")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "Cheetah3" version))
10716 (sha256
10717 (base32
10718 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10719 (build-system python-build-system)
10720 (arguments
10721 `(#:modules ((guix build utils)
10722 (guix build python-build-system)
10723 (ice-9 ftw)
10724 (srfi srfi-1)
10725 (srfi srfi-26))
10726 #:phases (modify-phases %standard-phases
10727 (add-after 'unpack 'use-absolute-python
10728 (lambda _
10729 (substitute* "Cheetah/CheetahWrapper.py"
10730 (("#!/usr/bin/env python")
10731 (string-append "#!" (which "python"))))
10732 #t))
10733 (replace 'check
10734 (lambda _
10735 (let ((cwd (getcwd)))
10736 (setenv "PYTHONPATH"
10737 (string-append
10738 cwd "/build/"
10739 (find (cut string-prefix? "lib" <>)
10740 (scandir (string-append cwd "/build")))
10741 ":" (getenv "PYTHONPATH")))
10742 (setenv "PATH"
10743 (string-append (getenv "PATH")
10744 ":" cwd "/bin"))
10745 (setenv "TMPDIR" "/tmp")
10746
10747 (substitute* "Cheetah/Tests/Test.py"
10748 (("unittest.TextTestRunner\\(\\)")
10749 "unittest.TextTestRunner(verbosity=2)"))
10750
10751 (invoke "python" "Cheetah/Tests/Test.py")))))))
10752 (propagated-inputs
10753 `(("python-markdown" ,python-markdown))) ;optional
10754 (home-page "http://cheetahtemplate.org/")
10755 (synopsis "Template engine")
10756 (description "Cheetah is a text-based template engine and Python code
10757generator.
10758
10759Cheetah can be used as a standalone templating utility or referenced as
10760a library from other Python applications. It has many potential uses,
10761but web developers looking for a viable alternative to ASP, JSP, PHP and
10762PSP are expected to be its principle user group.
10763
10764Features:
10765@enumerate
10766@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10767 text-based format.
10768@item Cleanly separates content, graphic design, and program code.
10769@item Blends the power and flexibility of Python with a simple template language
10770 that non-programmers can understand.
10771@item Gives template writers full access to any Python data structure, module,
10772 function, object, or method in their templates.
10773@item Makes code reuse easy by providing an object-orientated interface to
10774 templates that is accessible from Python code or other Cheetah templates.
10775 One template can subclass another and selectively reimplement sections of it.
10776@item Provides a simple, yet powerful, caching mechanism that can dramatically
10777 improve the performance of a dynamic website.
10778@item Compiles templates into optimized, yet readable, Python code.
10779@end enumerate")
10780 (license (license:x11-style "file://LICENSE"))))
10781
10782(define-public python2-cheetah
10783 (package-with-python2 python-cheetah))
10784
10785(define-public python-dulwich
10786 (package
10787 (name "python-dulwich")
10788 (version "0.18.6")
10789 (source
10790 (origin
10791 (method url-fetch)
10792 (uri (list (string-append "https://www.dulwich.io/releases/"
10793 "dulwich-" version ".tar.gz")
10794 (pypi-uri "dulwich" version)))
10795 (sha256
10796 (base32
10797 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10798 (build-system python-build-system)
10799 (arguments
10800 `(#:phases
10801 (modify-phases %standard-phases
10802 (add-before 'check 'fix-tests
10803 (lambda* (#:key inputs #:allow-other-keys)
10804 ;; The tests use Popen with a custom environment which doesn't
10805 ;; include PATH.
10806 (substitute* "dulwich/tests/compat/utils.py"
10807 (("'git'") (string-append "'"
10808 (which "git")
10809 "'")))
10810 (substitute* '("dulwich/tests/test_repository.py"
10811 "dulwich/tests/test_hooks.py")
10812 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10813 (setenv "TEST_RUNNER" "unittest")
10814 (setenv "PYTHONHASHSEED" "random")
10815 #t)))))
10816 (propagated-inputs
10817 `(("python-fastimport" ,python-fastimport)))
10818 (native-inputs
10819 `(("python-mock" ,python-mock)
10820 ("python-geventhttpclient" ,python-geventhttpclient)
10821 ("git" ,git)))
10822 (home-page "https://www.dulwich.io/")
10823 (synopsis "Git implementation in Python")
10824 (description "Dulwich is an implementation of the Git file formats and
10825protocols written in pure Python.")
10826 ;; Can be used with either license.
10827 (license (list license:asl2.0 license:gpl2+))))
10828
10829(define-public python2-dulwich
10830 (package-with-python2 python-dulwich))
10831
10832(define-public python-pbkdf2
10833 (package
10834 (name "python-pbkdf2")
10835 (version "1.3")
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "pbkdf2" version))
10840 (sha256
10841 (base32
10842 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10843 (build-system python-build-system)
10844 (arguments
10845 '(#:phases
10846 (modify-phases %standard-phases
10847 (replace 'check
10848 (lambda _
10849 (setenv "PYTHONPATH"
10850 (string-append (getcwd) "/build/lib:"
10851 (getenv "PYTHONPATH")))
ee2bb944 10852 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10853 (propagated-inputs
10854 `(("python-pycrypto" ,python-pycrypto))) ; optional
10855 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10856 (synopsis "Password-based key derivation")
10857 (description "This module implements the password-based key derivation
10858function, PBKDF2, specified in RSA PKCS#5 v2.0.
10859
10860PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10861is part of the RSA Public Key Cryptography Standards series. The provided
10862implementation takes a password or a passphrase and a salt value (and
10863optionally a iteration count, a digest module, and a MAC module) and provides
10864a file-like object from which an arbitrarly-sized key can be read.")
10865 (license license:expat)))
10866
10867(define-public python2-pbkdf2
10868 (package-with-python2 python-pbkdf2))
10869
10870(define-public python-qrcode
10871 (package
10872 (name "python-qrcode")
217ea1a1 10873 (version "6.1")
44d10b1f
RW
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "qrcode" version))
10878 (sha256
217ea1a1 10879 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10880 (build-system python-build-system)
10881 (arguments
10882 ;; FIXME: Tests require packaging 'pymaging'.
10883 '(#:tests? #f))
10884 (propagated-inputs
10885 `(("python-lxml" ,python-lxml) ; for SVG output
10886 ("python-pillow" ,python-pillow) ; for PNG output
10887 ("python-six" ,python-six)))
44d10b1f
RW
10888 (home-page "https://github.com/lincolnloop/python-qrcode")
10889 (synopsis "QR Code image generator")
10890 (description "This package provides a pure Python QR Code generator
10891module. It uses the Python Imaging Library (PIL) to allow for the generation
10892of QR Codes.
10893
10894In addition this package provides a command line tool to generate QR codes and
10895either write these QR codes to a file or do the output as ascii art at the
10896console.")
10897 (license license:bsd-3)))
10898
10899(define-public python2-qrcode
10900 (package-with-python2 python-qrcode))
10901
10902(define-public python-rst2ansi
10903 (package
10904 (name "python-rst2ansi")
10905 (version "0.1.5")
10906 (source
10907 (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "rst2ansi" version))
10910 (sha256
10911 (base32
10912 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10913 (build-system python-build-system)
10914 (propagated-inputs
10915 `(("python-docutils" ,python-docutils)))
10916 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10917 (synopsis "Convert RST to ANSI-decorated console output")
10918 (description
10919 "Python module dedicated to rendering RST (reStructuredText) documents
10920to ansi-escaped strings suitable for display in a terminal.")
10921 (license license:expat)))
10922
10923(define-public python-ansi2html
10924 (package
10925 (name "python-ansi2html")
10926 (version "1.2.0")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "ansi2html" version))
10931 (sha256
10932 (base32
10933 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10934 (build-system python-build-system)
10935 (native-inputs
10936 `(("python-mock" ,python-mock)
10937 ("python-nose" ,python-nose)))
10938 (propagated-inputs
10939 `(("python-six" ,python-six)))
10940 (home-page "https://github.com/ralphbean/ansi2html")
10941 (synopsis "Convert ANSI-decorated console output to HTML")
10942 (description
10943 "@command{ansi2html} is a Python library and command line utility for
10944convering text with ANSI color codes to HTML or LaTeX.")
10945 (license license:gpl3+)))
10946
10947(define-public python2-ansi2html
10948 (package-with-python2 python-ansi2html))
10949
10950(define-public python-ddt
10951 (package
10952 (name "python-ddt")
10953 (version "1.1.3")
10954 (source
10955 (origin
10956 (method url-fetch)
10957 (uri (pypi-uri "ddt" version))
10958 (sha256
10959 (base32
10960 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10961 (build-system python-build-system)
10962 (native-inputs
10963 `(("python-mock" ,python-mock)
10964 ("python-nose" ,python-nose)))
10965 (propagated-inputs
10966 `(("python-six" ,python-six)
10967 ("python-pyyaml" ,python-pyyaml)))
10968 (home-page "https://github.com/txels/ddt")
10969 (synopsis "Data-Driven Tests")
10970 (description
10971 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10972running it with different test data, and make it appear as multiple test
10973cases.")
10974 (license license:expat)))
10975
10976(define-public python2-ddt
10977 (package-with-python2 python-ddt))
10978
10979(define-public python-pycountry
10980 (package
10981 (name "python-pycountry")
10982 (version "18.5.26")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "pycountry" version))
10987 (sha256
10988 (base32
10989 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10990 (build-system python-build-system)
10991 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10992 (synopsis "ISO databases for languages, countries, currencies, etc.")
10993 (description
10994 "@code{pycountry} provides the ISO databases for the standards:
10995@enumerate
10996@item 639-3 (Languages)
10997@item 3166 (Countries)
10998@item 3166-3 (Deleted Countries)
10999@item 3166-2 (Subdivisions of countries)
11000@item 4217 (Currencies)
11001@item 15924 (Scripts)
11002@end enumerate
11003It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11004through a Python API.")
11005 (license license:lgpl2.1+)))
11006
11007(define-public python2-pycountry
11008 (package-with-python2 python-pycountry))
11009
11010(define-public python-pycosat
11011 (package
11012 (name "python-pycosat")
11013 (version "0.6.1")
11014 (source
11015 (origin
11016 (method url-fetch)
11017 (uri (pypi-uri "pycosat" version))
11018 (sha256
11019 (base32
11020 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11021 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11022 (build-system python-build-system)
11023 (home-page "https://github.com/ContinuumIO/pycosat")
11024 (synopsis "Bindings to picosat (a SAT solver)")
11025 (description
11026 "This package provides efficient Python bindings to @code{picosat} on
11027the C level. When importing pycosat, the @code{picosat} solver becomes part
11028of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11029Problem} (SAT) solver.")
11030 (license license:expat)))
11031
11032(define-public python2-pycosat
11033 (package-with-python2 python-pycosat))
11034
11035(define-public python2-ruamel.ordereddict
11036 (package
11037 (name "python2-ruamel.ordereddict")
11038 (version "0.4.9")
11039 (source
11040 (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "ruamel.ordereddict" version))
11043 (sha256
11044 (base32
11045 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11046 (build-system python-build-system)
11047 (arguments
11048 `(#:python ,python-2
11049 #:phases
11050 (modify-phases %standard-phases
11051 (delete 'check)
11052 (add-after 'install 'check
11053 (lambda* (#:key inputs outputs #:allow-other-keys)
11054 (add-installed-pythonpath inputs outputs)
f987ac30 11055 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11056 (home-page "https://bitbucket.org/ruamel/ordereddict")
11057 (synopsis "Version of dict that keeps keys in insertion order")
11058 (description
11059 "This is an implementation of an ordered dictionary with @dfn{Key
11060Insertion Order} (KIO: updates of values do not affect the position of the
11061key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11062removed and put at the back). The standard library module @code{OrderedDict},
11063implemented later, implements a subset of @code{ordereddict} functionality.
11064Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11065Order} (KSO, no sorting function can be specified, but a transform can be
11066specified to apply on the key before comparison (e.g. @code{string.lower})).")
11067 (license license:expat)))
11068
11069(define-public python-pypeg2
11070 (package
11071 (name "python-pypeg2")
11072 (version "2.15.2")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "pyPEG2" version))
11077 (sha256
11078 (base32
11079 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11080 (build-system python-build-system)
11081 (propagated-inputs `(("python-lxml" ,python-lxml)))
11082 (arguments
11083 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11084 '(#:tests? #f))
11085 (home-page "https://fdik.org/pyPEG/")
11086 (synopsis "Parsering Expression Grammars in Python")
11087 (description "PyPEG is an intrinsic parser interpreter framework for
11088Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11089parse many formal languages.")
11090 (license license:gpl2)))
11091
11092(define-public python-incremental
11093 (package
11094 (name "python-incremental")
11095 (version "17.5.0")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "incremental" version))
11100 (sha256
11101 (base32
11102 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11103 (build-system python-build-system)
11104 (home-page "https://github.com/hawkowl/incremental")
11105 (synopsis "Library for versioning Python projects")
11106 (description "Incremental is a small library that versions your Python
11107projects.")
11108 (license license:expat)))
11109
11110(define-public python2-incremental
11111 (package-with-python2 python-incremental))
11112
11113(define-public python-invoke
11114 (package
11115 (name "python-invoke")
11116 (home-page "http://www.pyinvoke.org/")
11117 (version "1.1.0")
11118 (source (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "invoke" version))
11121 (sha256
11122 (base32
11123 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11124 (build-system python-build-system)
11125 (arguments
11126 ;; XXX: Requires many dependencies that are not yet in Guix.
11127 `(#:tests? #f))
11128 (synopsis "Pythonic task execution")
11129 (description
11130 "Invoke is a Python task execution tool and library, drawing inspiration
11131from various sources to arrive at a powerful and clean feature set. It is
11132evolved from the Fabric project, but focuses on local and abstract concerns
11133instead of servers and network commands.")
11134 (license license:bsd-3)))
11135
11136(define-public python2-invoke
11137 (package-with-python2 python-invoke))
11138
11139(define-public python-automat
11140 (package
11141 (name "python-automat")
11142 (version "0.6.0")
11143 (source (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "Automat" version))
11146 (sha256
11147 (base32
11148 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11149 (build-system python-build-system)
11150 ;; We disable the tests because they require python-twisted, while
11151 ;; python-twisted depends on python-automat. Twisted is optional, but the
11152 ;; tests fail if it is not available. Also see
11153 ;; <https://github.com/glyph/automat/issues/71>.
11154 (arguments '(#:tests? #f))
11155 (native-inputs
11156 `(("python-m2r" ,python-m2r)
11157 ("python-setuptools-scm" ,python-setuptools-scm)
11158 ("python-graphviz" ,python-graphviz)))
11159 (propagated-inputs
11160 `(("python-six" ,python-six)
11161 ("python-attrs" ,python-attrs)))
11162 (home-page "https://github.com/glyph/Automat")
11163 (synopsis "Self-service finite-state machines")
11164 (description "Automat is a library for concise, idiomatic Python
11165expression of finite-state automata (particularly deterministic finite-state
11166transducers).")
11167 (license license:expat)))
11168
11169(define-public python2-automat
11170 (package-with-python2 python-automat))
11171
11172(define-public python-m2r
11173 (package
11174 (name "python-m2r")
11175 (version "0.1.12")
11176 (source (origin
11177 (method url-fetch)
11178 (uri (pypi-uri "m2r" version))
11179 (sha256
11180 (base32
11181 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11182 (build-system python-build-system)
11183 (propagated-inputs
11184 `(("python-docutils" ,python-docutils)
11185 ("python-mistune" ,python-mistune)))
11186 (native-inputs
11187 `(("python-pygments" ,python-pygments)
11188 ("python-mock" ,python-mock)))
11189 (home-page "https://github.com/miyakogi/m2r")
11190 (synopsis "Markdown to reStructuredText converter")
11191 (description "M2R converts a markdown file including reST markups to valid
11192reST format.")
11193 (license license:expat)))
11194
11195(define-public python2-m2r
11196 (package-with-python2 python-m2r))
11197
11198(define-public python-constantly
11199 (package
11200 (name "python-constantly")
11201 (version "15.1.0")
11202 (source (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "constantly" version))
11205 (sha256
11206 (base32
11207 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11208 (build-system python-build-system)
11209 (home-page "https://github.com/twisted/constantly")
11210 (synopsis "Symbolic constants in Python")
11211 (description "Constantly is a Python library that provides symbolic
11212constant support. It includes collections and constants with text, numeric,
11213and bit flag values.")
11214 (license license:expat)))
11215
11216(define-public python2-constantly
11217 (package-with-python2 python-constantly))
11218
11219(define-public python-attrs
11220 (package
11221 (name "python-attrs")
c41d5144 11222 (version "19.1.0")
44d10b1f
RW
11223 (source (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "attrs" version))
11226 (sha256
11227 (base32
c41d5144 11228 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
11229 (build-system python-build-system)
11230 (arguments
11231 `(#:modules ((guix build utils)
11232 (guix build python-build-system)
11233 (ice-9 ftw)
11234 (srfi srfi-1)
11235 (srfi srfi-26))
11236 #:phases (modify-phases %standard-phases
11237 (replace 'check
11238 (lambda _
11239 (let ((cwd (getcwd)))
11240 (setenv "PYTHONPATH"
11241 (string-append
11242 cwd "/build/"
11243 (find (cut string-prefix? "lib" <>)
11244 (scandir (string-append cwd "/build")))
11245 ":"
11246 (getenv "PYTHONPATH")))
11247 (invoke "python" "-m" "pytest")))))))
11248 (native-inputs
11249 `(("python-coverage" ,python-coverage)
11250 ("python-hypothesis" ,python-hypothesis)
11251 ("python-pympler" ,python-pympler)
11252 ("python-pytest" ,python-pytest)
11253 ("python-six" ,python-six)
11254 ("python-sphinx" ,python-sphinx)
11255 ("python-zope-interface" ,python-zope-interface)))
11256 (home-page "https://github.com/python-attrs/attrs/")
11257 (synopsis "Attributes without boilerplate")
11258 (description "@code{attrs} is a Python package with class decorators that
11259ease the chores of implementing the most common attribute-related object
11260protocols.")
11261 (license license:expat)))
11262
11263(define-public python2-attrs
11264 (package-with-python2 python-attrs))
11265
11266(define-public python-attrs-bootstrap
11267 (package
11268 (inherit python-attrs)
11269 (name "python-attrs-bootstrap")
44d10b1f
RW
11270 (native-inputs `())
11271 (arguments `(#:tests? #f))))
11272
11273(define-public python2-attrs-bootstrap
11274 (package-with-python2 python-attrs-bootstrap))
11275
11276(define-public python2-cliapp
11277 (package
11278 (name "python2-cliapp")
9064b84e 11279 (version "1.20180812.1")
44d10b1f
RW
11280 (source
11281 (origin
11282 (method url-fetch)
11283 (uri (string-append
11284 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11285 version ".tar.gz"))
11286 (sha256
11287 (base32
9064b84e 11288 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11289 (build-system python-build-system)
11290 (arguments
11291 `(#:python ,python-2
11292 #:phases
11293 (modify-phases %standard-phases
11294 ;; check phase needs to be run before the build phase. If not,
11295 ;; coverage-test-runner looks for tests for the built source files,
11296 ;; and fails.
11297 (delete 'check)
11298 (add-before 'build 'check
11299 (lambda _
11300 ;; Disable python3 tests
11301 (substitute* "check"
11302 (("python3") "# python3"))
6c826d32 11303 (invoke "./check"))))))
44d10b1f
RW
11304 (native-inputs
11305 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11306 ("python2-pep8" ,python2-pep8)))
11307 (propagated-inputs
11308 `(("python2-pyaml" ,python2-pyaml)))
11309 (home-page "https://liw.fi/cliapp/")
11310 (synopsis "Python framework for command line programs")
11311 (description "@code{python2-cliapp} is a python framework for
11312command line programs. It contains the typical stuff such programs
11313need to do, such as parsing the command line for options, and
11314iterating over input files.")
11315 (license license:gpl2+)))
11316
11317(define-public python2-ttystatus
11318 (package
11319 (name "python2-ttystatus")
e516a9c2 11320 (version "0.36")
44d10b1f
RW
11321 (source
11322 (origin
11323 (method url-fetch)
11324 (uri (string-append
11325 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11326 version ".tar.gz"))
11327 (sha256
11328 (base32
e516a9c2 11329 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11330 (build-system python-build-system)
11331 (native-inputs
11332 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11333 ("python2-pep8" ,python2-pep8)))
11334 (arguments
11335 `(#:python ,python-2
11336 #:phases
11337 (modify-phases %standard-phases
11338 ;; check phase needs to be run before the build phase. If not,
11339 ;; coverage-test-runner looks for tests for the built source files,
11340 ;; and fails.
11341 (delete 'check)
11342 (add-before 'build 'check
cbeee881 11343 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11344 (home-page "https://liw.fi/ttystatus/")
11345 (synopsis "Python library for showing progress reporting and
11346status updates on terminals")
11347 (description "@code{python2-ttystatus} is a python library for
11348showing progress reporting and status updates on terminals, for
11349command line programs. Output is automatically adapted to the width
11350of the terminal: truncated if it does not fit, and resized if the
11351terminal size changes.")
11352 (license license:gpl3+)))
11353
11354(define-public python2-tracing
11355 (package
11356 (name "python2-tracing")
11357 (version "0.10")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (string-append
11362 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11363 version ".tar.gz"))
11364 (sha256
11365 (base32
11366 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11367 (build-system python-build-system)
11368 (arguments
11369 `(#:python ,python-2))
11370 (home-page "https://liw.fi/tracing/")
11371 (synopsis "Python debug logging helper")
11372 (description "@code{python2-tracing} is a python library for
11373logging debug messages. It provides a way to turn debugging messages
11374on and off, based on the filename they occur in. It is much faster
11375than using @code{logging.Filter} to accomplish the same thing, which
11376matters when code is run in production mode. The actual logging still
11377happens using the @code{logging} library.")
11378 (license license:gpl3+)))
11379
11380(define-public python2-larch
11381 (package
11382 (name "python2-larch")
11383 (version "1.20151025")
11384 (source
11385 (origin
11386 (method url-fetch)
11387 (uri (string-append
11388 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11389 version ".tar.gz"))
11390 (patches (search-patches
11391 "python2-larch-coverage-4.0a6-compatibility.patch"))
11392 (sha256
11393 (base32
11394 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11395 (build-system python-build-system)
11396 (arguments
11397 `(#:python ,python-2
11398 #:phases
11399 (modify-phases %standard-phases
11400 ;; check phase needs to be run before the build phase. If not,
11401 ;; coverage-test-runner looks for tests for the built source files,
11402 ;; and fails.
11403 (delete 'check)
11404 (add-before 'build 'check
204ad455 11405 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11406 (native-inputs
11407 `(("cmdtest" ,cmdtest)
11408 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11409 (propagated-inputs
11410 `(("python2-tracing" ,python2-tracing)))
11411 (home-page "https://liw.fi/larch/")
11412 (synopsis "Python copy-on-write B-tree library")
11413 (description "@code{python2-larch} is an implementation of
11414particular kind of B-tree, based on research by Ohad Rodeh. See
11415@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11416on the data structure.
11417
11418The distinctive feature of this B-tree is that a node is never
11419(conceptually) modified. Instead, all updates are done by
11420copy-on-write. This makes it easy to clone a tree, and modify only the
11421clone, while other processes access the original tree.")
11422 (license license:gpl3+)))
11423
11424(define-public python-astroid
11425 (package
11426 (name "python-astroid")
11427 (version "2.1.0")
11428 (source
11429 (origin
11430 (method url-fetch)
11431 (uri (pypi-uri "astroid" version))
11432 (sha256
11433 (base32
11434 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11435 (build-system python-build-system)
11436 (propagated-inputs
11437 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11438 ("python-six" ,python-six)
11439 ("python-wrapt" ,python-wrapt)))
11440 (native-inputs
11441 `(("python-dateutil" ,python-dateutil)
11442 ("python-nose" ,python-nose)
11443 ("python-pytest" ,python-pytest)
11444 ("python-pytest-runner" ,python-pytest-runner)))
11445 (arguments
11446 `(#:phases
11447 (modify-phases %standard-phases
11448 (add-after 'unpack 'remove-spurious-test
11449 (lambda _
11450 ;; This can be removed after upgrading from python-3.7
11451 ;; https://github.com/PyCQA/astroid/issues/593
11452 ;; https://bugs.python.org/issue34056
11453 (delete-file "astroid/tests/unittest_modutils.py")
11454 #t))
11455 (replace 'check
11456 (lambda _
11457 (invoke "pytest" "astroid"))))))
11458 (home-page "https://github.com/PyCQA/astroid")
11459 (synopsis "Common base representation of python source code for pylint and
11460other projects")
11461 (description "@code{python-astroid} provides a common base representation
11462of python source code for projects such as pychecker, pyreverse, pylint, etc.
11463
11464It provides a compatible representation which comes from the _ast module. It
11465rebuilds the tree generated by the builtin _ast module by recursively walking
11466down the AST and building an extended ast. The new node classes have
11467additional methods and attributes for different usages. They include some
11468support for static inference and local name scopes. Furthermore, astroid
11469builds partial trees by inspecting living objects.")
11470 (license license:lgpl2.1+)
11471 (properties `((python2-variant . ,(delay python2-astroid))))))
11472
11473(define-public python2-astroid
11474 (let ((base (package-with-python2
11475 (strip-python2-variant python-astroid))))
11476 (package (inherit base)
11477 ;; Version 2.x removes python2 support.
11478 (version "1.6.5")
11479 (source
11480 (origin
11481 (method url-fetch)
11482 (uri (pypi-uri "astroid" version))
11483 (sha256
11484 (base32
11485 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11486 (arguments
11487 (substitute-keyword-arguments (package-arguments base)
11488 ((#:phases phases)
11489 `(modify-phases ,phases
11490 (add-after 'unpack 'remove-spurious-test
11491 (lambda _
11492 ;; https://github.com/PyCQA/astroid/issues/276
11493 (delete-file "astroid/tests/unittest_brain.py")
11494 #t))
11495 (replace 'check
11496 (lambda _
11497 (invoke"python" "-m" "unittest" "discover"
11498 "-p" "unittest*.py")))))))
11499 (native-inputs `())
11500 (propagated-inputs
11501 `(("python2-backports-functools-lru-cache"
11502 ,python2-backports-functools-lru-cache)
11503 ("python2-enum34" ,python2-enum34)
11504 ("python2-singledispatch" ,python2-singledispatch)
11505 ,@(package-propagated-inputs base))))))
11506
11507(define-public python-isort
11508 (package
11509 (name "python-isort")
e2227b6a 11510 (version "4.3.4")
44d10b1f
RW
11511 (source
11512 (origin
e2227b6a
EF
11513 (method git-fetch)
11514 (uri (git-reference
11515 ;; Tests pass only from the Github sources
11516 (url "https://github.com/timothycrosley/isort")
11517 (commit version)))
11518 (file-name (git-file-name name version))
44d10b1f
RW
11519 (sha256
11520 (base32
e2227b6a 11521 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11522 (build-system python-build-system)
11523 (native-inputs
11524 `(("python-mock" ,python-mock)
11525 ("python-pytest" ,python-pytest)))
11526 (home-page "https://github.com/timothycrosley/isort")
11527 (synopsis "Python utility/library to sort python imports")
11528 (description "@code{python-isort} is a python utility/library to sort
11529imports alphabetically, and automatically separated into sections. It
11530provides a command line utility, a python library and plugins for various
11531editors.")
e2227b6a
EF
11532 (license license:expat)
11533 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11534
11535(define-public python2-isort
e2227b6a
EF
11536 (let ((base (package-with-python2
11537 (strip-python2-variant python-isort))))
11538 (package (inherit base)
11539 (native-inputs
11540 `(("python2-futures" ,python2-futures)
11541 ,@(package-native-inputs base))))))
44d10b1f
RW
11542
11543(define-public python2-backports-functools-lru-cache
11544 (package
11545 (name "python2-backports-functools-lru-cache")
11546 (version "1.5")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 ;; only the pypi tarballs contain the necessary metadata
11551 (uri (pypi-uri "backports.functools_lru_cache" version))
11552 (sha256
11553 (base32
11554 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11555 (build-system python-build-system)
11556 (native-inputs
11557 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11558 (arguments
11559 `(#:python ,python-2))
11560 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11561 (synopsis "Backport of functools.lru_cache from Python 3.3")
11562 (description "@code{python2-backports-functools-lru-cache} is a backport
11563of @code{functools.lru_cache} from python 3.3.")
11564 (license license:expat)))
11565
11566(define-public python-configparser
11567 (package
11568 (name "python-configparser")
84127f8c 11569 (version "3.7.1")
44d10b1f
RW
11570 (source
11571 (origin
11572 (method url-fetch)
84127f8c 11573 (uri (pypi-uri "configparser" version))
44d10b1f
RW
11574 (sha256
11575 (base32
84127f8c 11576 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 11577 (build-system python-build-system)
809f003f 11578 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11579 (synopsis "Backport of configparser from python 3.5")
11580 (description "@code{python-configparser} is a backport of
11581@code{configparser} from Python 3.5 so that it can be used directly
11582in other versions.")
11583 (license license:expat)))
11584
11585(define-public python2-configparser
11586 (package-with-python2 python-configparser))
11587
11588(define-public python-mando
11589 (package
11590 (name "python-mando")
11591 (version "0.6.4")
11592 (source (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "mando" version))
11595 (sha256
11596 (base32
11597 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11598 (build-system python-build-system)
11599 (propagated-inputs
11600 `(("python-rst2ansi" ,python-rst2ansi)
11601 ("python-six" ,python-six)))
11602 (native-inputs
11603 `(("python-pytest" ,python-pytest)))
11604 (home-page "https://mando.readthedocs.org/")
11605 (synopsis
11606 "Wrapper around argparse, allowing creation of complete CLI applications")
11607 (description
11608 "This package is a wrapper around argparse, allowing you to write complete CLI
11609applications in seconds while maintaining all the flexibility.")
11610 (license license:expat)))
11611
11612(define-public python2-mando
11613 (package-with-python2 python-mando))
11614
11615(define-public python-fudge
11616 (package
11617 (name "python-fudge")
11618 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11619 ;; package, which is currently the only use of this package.
11620 (version "0.9.6")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "fudge" version))
11625 (sha256
11626 (base32
11627 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11628 (build-system python-build-system)
11629 (arguments
11630 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11631 (home-page "https://github.com/fudge-py/fudge")
11632 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11633 (description
11634 "Fudge is a Python module for using fake objects (mocks and stubs) to
11635test real ones.
11636
11637In readable Python code, you declare the methods available on your fake object
11638and how they should be called. Then you inject that into your application and
11639start testing. This declarative approach means you don’t have to record and
11640playback actions and you don’t have to inspect your fakes after running code.
11641If the fake object was used incorrectly then you’ll see an informative
11642exception message with a traceback that points to the culprit.")
11643 (license license:expat)))
11644
11645(define-public python2-fudge
11646 (package-with-python2 python-fudge))
11647
11648(define-public python-mwclient
11649 (package
11650 (name "python-mwclient")
11651 (version "0.8.4")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 ;; The PyPI version wouldn't contain tests.
11656 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11657 "v" version ".tar.gz"))
11658 (file-name (string-append name "-" version ".tar.gz"))
11659 (sha256
11660 (base32
11661 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11662 (build-system python-build-system)
11663 (propagated-inputs
11664 `(("python-requests" ,python-requests)
11665 ("python-requests-oauthlib"
11666 ,python-requests-oauthlib)
11667 ("python-six" ,python-six)))
11668 (native-inputs
11669 `(("python-mock" ,python-mock)
11670 ("python-pytest" ,python-pytest)
11671 ("python-pytest-pep8" ,python-pytest-pep8)
11672 ("python-pytest-cache" ,python-pytest-cache)
11673 ("python-pytest-cov" ,python-pytest-cov)
11674 ("python-responses" ,python-responses)))
11675 (home-page "https://github.com/btongminh/mwclient")
11676 (synopsis "MediaWiki API client")
11677 (description "This package provides a MediaWiki API client.")
11678 (license license:expat)))
11679
11680(define-public python2-mwclient
11681 (package-with-python2 python-mwclient))
11682
11683(define-public python-utils
11684 (package
11685 (name "python-utils")
11686 (version "2.1.0")
11687 (source (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "python-utils" version))
11690 (sha256
11691 (base32
11692 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11693 (build-system python-build-system)
11694 (native-inputs
11695 `(("pytest-runner" ,python-pytest-runner)
11696 ("pytest" ,python-pytest)
11697 ("six" ,python-six)))
11698 (home-page "https://github.com/WoLpH/python-utils")
11699 (synopsis "Convenient utilities not included with the standard Python install")
11700 (description
11701 "Python Utils is a collection of small Python functions and classes which
11702make common patterns shorter and easier.")
11703 (license license:bsd-2)))
11704
11705(define-public python2-utils
11706 (package-with-python2 python-utils))
11707
11708(define-public python-sphinx-me
11709 (package
11710 (name "python-sphinx-me")
11711 (version "0.3")
11712 (source
11713 (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "sphinx-me" version))
11716 (sha256
11717 (base32
11718 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11719 (build-system python-build-system)
11720 (home-page "https://github.com/stephenmcd/sphinx-me")
11721 (synopsis "Create a Sphinx documentation shell")
11722 (description
11723 "Create a Sphinx documentation shell for your project and include the
11724README file as the documentation index. It handles extracting the required
11725meta data such as the project name, author and version from your project for
11726use in your Sphinx docs.")
11727 (license license:bsd-2)))
11728
11729(define-public python2-sphinx-me
11730 (package-with-python2 python-sphinx-me))
11731
11732(define-public python-diff-match-patch
11733 (package
11734 (name "python-diff-match-patch")
11735 (version "20121119")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "diff-match-patch" version))
11740 (sha256
11741 (base32
11742 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11743 (build-system python-build-system)
11744 (home-page "https://code.google.com/p/google-diff-match-patch")
11745 (synopsis "Synchronize plain text")
11746 (description "Diff Match and Patch libraries offer robust algorithms to
11747perform the operations required for synchronizing plain text.")
11748 (license license:asl2.0)))
11749
11750(define-public python2-diff-match-patch
11751 (package-with-python2 python-diff-match-patch))
11752
11753(define-public python-dirsync
11754 (package
11755 (name "python-dirsync")
11756 (version "2.2.3")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "dirsync" version))
11761 (sha256
11762 (base32
11763 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11764 (build-system python-build-system)
11765 (propagated-inputs
11766 `(("six" ,python-six)))
11767 (home-page "https://bitbucket.org/tkhyn/dirsync")
11768 (synopsis "Advanced directory tree synchronisation tool")
11769 (description "Advanced directory tree synchronisation tool.")
11770 (license license:expat)))
11771
11772(define-public python2-dirsync
11773 (package-with-python2 python-dirsync))
11774
11775(define-public python-levenshtein
11776 (package
11777 (name "python-levenshtein")
11778 (version "0.12.0")
11779 (source
11780 (origin
11781 (method url-fetch)
11782 (uri (pypi-uri "python-Levenshtein" version))
11783 (sha256
11784 (base32
11785 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11786 (build-system python-build-system)
11787 (home-page "https://github.com/ztane/python-Levenshtein")
11788 (synopsis "Fast computation of Levenshtein distance and string similarity")
11789 (description
11790 "The Levenshtein Python C extension module contains functions for fast computation of
11791@enumerate
11792@item Levenshtein (edit) distance, and edit operations
11793@item string similarity
11794@item approximate median strings, and generally string averaging
11795@item string sequence and set similarity
11796@end enumerate
11797It supports both normal and Unicode strings.")
11798 (license license:gpl2+)))
11799
11800(define-public python2-levenshtein
11801 (package-with-python2 python-levenshtein))
11802
11803(define-public python-scandir
11804 (package
11805 (name "python-scandir")
11806 (version "1.9.0")
11807 (source
11808 (origin
11809 (method url-fetch)
11810 (uri (pypi-uri "scandir" version))
11811 (sha256
11812 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11813 (build-system python-build-system)
11814 (arguments
11815 `(#:phases (modify-phases %standard-phases
11816 (replace 'check
11817 (lambda _
11818 (invoke "python" "test/run_tests.py"))))))
11819 (home-page "https://github.com/benhoyt/scandir")
11820 (synopsis "Directory iteration function")
11821 (description
11822 "Directory iteration function like os.listdir(), except that instead of
11823returning a list of bare filenames, it yields DirEntry objects that include
11824file type and stat information along with the name. Using scandir() increases
11825the speed of os.walk() by 2-20 times (depending on the platform and file
11826system) by avoiding unnecessary calls to os.stat() in most cases.
11827
11828This package is part of the Python standard library since version 3.5.")
11829 (license license:bsd-3)))
11830
11831(define-public python2-scandir
11832 (package-with-python2 python-scandir))
11833
11834(define-public python2-stemming
11835 (package
11836 (name "python2-stemming")
11837 (version "1.0.1")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "stemming" version))
11842 (sha256
11843 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11844 (build-system python-build-system)
11845 (arguments
11846 `(#:python ,python-2))
11847 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11848 (synopsis "Python implementations of various stemming algorithms")
11849 (description
11850 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11851stemming algorithms for English. These implementations are straightforward and
11852efficient, unlike some Python versions of the same algorithms available on the
11853Web. This package is an extraction of the stemming code included in the Whoosh
11854search engine.")
11855 (license license:public-domain)))
11856
11857(define-public python-factory-boy
11858 (package
11859 (name "python-factory-boy")
11860 (version "2.8.1")
11861 (source
11862 (origin
11863 (method url-fetch)
11864 (uri (pypi-uri "factory_boy" version))
11865 (sha256
11866 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11867 (build-system python-build-system)
11868 (arguments
11869 ;; Tests are not included in the tarball.
11870 `(#:tests? #f))
11871 (propagated-inputs
11872 `(("faker" ,python-faker)))
11873 (home-page "https://github.com/benhoyt/scandir")
11874 (synopsis "Versatile test fixtures replacement")
11875 (description
11876 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11877
11878As a fixtures replacement tool, it aims to replace static, hard to maintain
11879fixtures with easy-to-use factories for complex object.
11880
11881Instead of building an exhaustive test setup with every possible combination
11882of corner cases, factory_boy allows you to use objects customized for the
11883current test, while only declaring the test-specific fields")
11884 (license license:expat)))
11885
11886(define-public python2-factory-boy
11887 (package-with-python2 python-factory-boy))
11888
11889(define-public python-translate-toolkit
11890 (package
11891 (name "python-translate-toolkit")
11892 (version "2.1.0")
11893 (source
11894 (origin
11895 (method url-fetch)
11896 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11897 (sha256
11898 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11899 (build-system python-build-system)
11900 (native-inputs
11901 `(("python-pytest" ,python-pytest)
11902 ("python-sphinx" ,python-sphinx)))
11903 (propagated-inputs
11904 `(("python-babel" ,python-babel)
11905 ("python-beautifulsoup4" ,python-beautifulsoup4)
11906 ("python-chardet" ,python-chardet)
11907 ("python-diff-match-patch" ,python-diff-match-patch)
11908 ("python-levenshtein" ,python-levenshtein)
11909 ("python-lxml" ,python-lxml)
11910 ("python-six" ,python-six)
11911 ("python-vobject" ,python-vobject)
11912 ("python-pyyaml" ,python-pyyaml)))
11913 (arguments
11914 ;; TODO: tests are not run, because they end with
11915 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11916 ;; 'parse_funcs'
11917 ;; during test setup.
11918 `(#:tests? #f))
11919 (home-page "http://toolkit.translatehouse.org")
11920 (synopsis "Tools and API for translation and localization engineering")
11921 (description
11922 "Tools and API for translation and localization engineering. It contains
11923several utilities, as well as an API for building localization tools.")
11924 (license license:gpl2+)))
11925
11926(define-public python2-translate-toolkit
11927 (package-with-python2 python-translate-toolkit))
11928
11929(define-public python-packaging
11930 (package
11931 (name "python-packaging")
94295903 11932 (version "19.0")
44d10b1f
RW
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (pypi-uri "packaging" version))
11937 (sha256
11938 (base32
94295903 11939 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
11940 (build-system python-build-system)
11941 (arguments
11942 `(#:phases (modify-phases %standard-phases
11943 (replace 'check
11944 (lambda _ (invoke "py.test" "-vv"))))))
11945 (native-inputs
11946 `(("python-pretend" ,python-pretend)
11947 ("python-pytest" ,python-pytest)))
11948 (propagated-inputs
11949 `(("python-pyparsing" ,python-pyparsing)
11950 ("python-six" ,python-six)))
11951 (home-page "https://github.com/pypa/packaging")
11952 (synopsis "Core utilities for Python packages")
11953 (description "Packaging is a Python module for dealing with Python packages.
11954It offers an interface for working with package versions, names, and dependency
11955information.")
11956 ;; From 'LICENSE': This software is made available under the terms of
11957 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11958 ;; Contributions to this software is made under the terms of *both* these
11959 ;; licenses.
11960 (license (list license:asl2.0 license:bsd-2))))
11961
11962(define-public python2-packaging
11963 (package-with-python2 python-packaging))
11964
11965(define-public python-relatorio
11966 (package
11967 (name "python-relatorio")
11968 (version "0.8.0")
11969 (source
11970 (origin
11971 (method url-fetch)
11972 (uri (pypi-uri "relatorio" version))
11973 (sha256
11974 (base32
11975 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11976 (build-system python-build-system)
11977 (propagated-inputs
11978 `(("python-lxml" ,python-lxml)
11979 ("python-genshi" ,python-genshi)))
11980 (native-inputs
11981 `(("python-magic" ,python-magic)))
11982 (home-page "https://relatorio.tryton.org/")
11983 (synopsis "Templating library able to output ODT and PDF files")
11984 (description "Relatorio is a templating library which provides a way to
11985easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11986for more filetypes can be easily added by creating plugins for them.")
11987 (license license:gpl3+)))
11988
11989(define-public python2-relatorio
11990 (package-with-python2 python-relatorio))
11991
11992(define-public python-radon
11993 (package
11994 (name "python-radon")
11995 (version "2.2.0")
11996 (source
11997 (origin
11998 (method url-fetch)
11999 (uri (pypi-uri "radon" version))
12000 (sha256
12001 (base32
12002 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12003 (build-system python-build-system)
12004 (arguments
12005 `(#:phases (modify-phases %standard-phases
12006 (replace 'check
12007 (lambda _
12008 (invoke "python" "radon/tests/run.py"))))))
12009 (propagated-inputs
12010 `(("python-colorama" ,python-colorama)
12011 ("python-flake8-polyfill" ,python-flake8-polyfill)
12012 ("python-mando" ,python-mando)))
12013 (native-inputs
12014 `(("python-pytest" ,python-pytest)
12015 ("python-pytest-mock" ,python-pytest-mock)))
12016 (home-page "https://radon.readthedocs.org/")
12017 (synopsis "Code Metrics in Python")
12018 (description "Radon is a Python tool which computes various code metrics.
12019Supported metrics are:
12020@itemize @bullet
12021@item raw metrics: SLOC, comment lines, blank lines, &c.
12022@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12023@item Halstead metrics (all of them)
12024@item the Maintainability Index (a Visual Studio metric)
12025@end itemize")
12026 (license license:expat)))
12027
12028(define-public python2-radon
12029 (package-with-python2 python-radon))
12030
12031(define-public python-sure
12032 (package
12033 (name "python-sure")
12034 (version "1.4.11")
12035 (source
12036 (origin
12037 (method url-fetch)
12038 (uri (pypi-uri "sure" version))
12039 (sha256
12040 (base32
12041 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12042 (build-system python-build-system)
12043 (propagated-inputs
12044 `(("python-mock" ,python-mock)
12045 ("python-six" ,python-six)))
12046 (native-inputs
12047 `(("python-nose" ,python-nose)))
12048 (home-page "https://github.com/gabrielfalcao/sure")
12049 (synopsis "Automated testing library in python for python")
12050 (description
12051 "Sure is a python library that leverages a DSL for writing assertions.
12052Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12053 (license license:gpl3+)))
12054
12055(define-public python2-sure
12056 (package-with-python2 python-sure))
12057
12058(define-public python2-couleur
12059 ;; This package does not seem to support python3 at all, hence,
12060 ;; only the python2 variant definition is provided.
12061 (package
12062 (name "python2-couleur")
12063 (version "0.6.2")
12064 (source
12065 (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "couleur" version))
12068 (sha256
12069 (base32
12070 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12071 (build-system python-build-system)
12072 (arguments
12073 `(#:python ,python-2))
12074 (home-page "https://github.com/gabrielfalcao/couleur")
12075 (synopsis
12076 "ANSI terminal tool for python, colored shell and other handy fancy features")
12077 (description
12078 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12079terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12080 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12081 ;; https://github.com/gabrielfalcao/couleur/issues/11
12082 (license license:lgpl3+)))
12083
12084(define-public python-misaka
12085 (package
12086 (name "python-misaka")
0dcb3412 12087 (version "2.1.1")
44d10b1f
RW
12088 (source
12089 (origin
12090 (method url-fetch)
12091 (uri (pypi-uri "misaka" version))
12092 (sha256
12093 (base32
0dcb3412 12094 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12095 (build-system python-build-system)
12096 (arguments
12097 `(;; Line 37 of setup.py calls self.run_command('develop')
12098 ;; in the 'check' phase. This command seems to be trying
12099 ;; to write to
12100 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12101 ;; for which it does not have the permission to write.
12102 #:tests? #f))
12103 (propagated-inputs
12104 `(("python-cffi" ,python-cffi)))
12105 (home-page "https://github.com/FSX/misaka")
12106 (synopsis "Python binding for Hoedown")
12107 (description
12108 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12109library written in C. It features a fast HTML renderer and functionality to make custom
12110renderers (e.g. man pages or LaTeX).")
12111 (license license:expat)))
12112
12113(define-public python2-misaka
12114 (package-with-python2 python-misaka))
12115
12116(define-public python2-steadymark
12117 ;; This is forced into being a python2 only variant
12118 ;; due to its dependence on couleur that has no support
12119 ;; for python3
12120 (package
12121 (name "python2-steadymark")
12122 (version "0.7.3")
12123 (source
12124 (origin
12125 (method url-fetch)
12126 (uri (pypi-uri "steadymark" version))
12127 (sha256
12128 (base32
12129 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12130 (build-system python-build-system)
12131 (native-inputs
12132 `(("python-couleur" ,python2-couleur)
12133 ("python-sure" ,python2-sure)
12134 ("python-misaka" ,python2-misaka)))
12135 (arguments
12136 `(#:python ,python-2
12137 #:phases
12138 (modify-phases %standard-phases
12139 (add-before 'build 'patch-setup-py
12140 (lambda _
12141 ;; Update requirements from dependency==version
12142 ;; to dependency>=version
12143 (substitute* "setup.py"
12144 (("==") ">="))
12145 #t)))))
12146 (home-page "https://github.com/gabrielfalcao/steadymark")
12147 (synopsis "Markdown-based test runner for python")
12148 (description
12149 "@code{Steadymark} allows documentation to be written in github-flavoured
12150markdown. The documentation may contain snippets of code surrounded by python
12151code blocks and @code{Steadymark} will find these snippets and run them, making
12152sure that there are no old malfunctional examples in the documentation examples.")
12153 (license license:expat)))
12154
12155(define-public python-jsonpointer
12156 (package
12157 (name "python-jsonpointer")
12158 (version "1.10")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 (uri (pypi-uri "jsonpointer" version))
12163 (sha256
12164 (base32
12165 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12166 (build-system python-build-system)
12167 (home-page "https://github.com/stefankoegl/python-json-pointer")
12168 (synopsis "Identify specific nodes in a JSON document")
12169 (description "@code{jsonpointer} allows you to access specific nodes
12170by path in a JSON document (see RFC 6901).")
12171 (license license:bsd-3)))
12172
12173(define-public python2-jsonpointer
12174 (package-with-python2 python-jsonpointer))
12175
12176(define-public python-jsonpatch
12177 (package
12178 (name "python-jsonpatch")
12179 (version "1.16")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 ;; pypi version lacks tests.js
12184 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12185 "archive/v" version ".tar.gz"))
12186 (file-name (string-append name "-" version ".tar.gz"))
12187 (sha256
12188 (base32
12189 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12190 (build-system python-build-system)
12191 (native-inputs
12192 `(("python-jsonpointer" ,python-jsonpointer)))
12193 (home-page "https://github.com/stefankoegl/python-json-patch")
12194 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12195 (description "@code{jsonpatch} is a library and program that allows
12196applying JSON Patches according to RFC 6902.")
12197 (license license:bsd-3)))
12198
12199(define-public python2-jsonpatch
12200 (package-with-python2 python-jsonpatch))
12201
12202(define-public python-jsonpatch-0.4
12203 (package (inherit python-jsonpatch)
12204 (name "python-jsonpatch")
12205 (version "0.4")
12206 (source
12207 (origin
12208 (method url-fetch)
12209 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12210 "archive/v" version ".tar.gz"))
12211 (file-name (string-append name "-" version ".tar.gz"))
12212 (sha256
12213 (base32
12214 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12215
12216(define-public python2-jsonpatch-0.4
12217 (package-with-python2 python-jsonpatch-0.4))
12218
12219(define-public python-rfc3986
12220 (package
12221 (name "python-rfc3986")
12222 (version "1.1.0")
12223 (source (origin
12224 (method url-fetch)
12225 (uri (pypi-uri "rfc3986" version))
12226 (sha256
12227 (base32
12228 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12229 (build-system python-build-system)
12230 (arguments
12231 `(#:modules ((guix build utils)
12232 (guix build python-build-system)
12233 (ice-9 ftw)
12234 (srfi srfi-1)
12235 (srfi srfi-26))
12236 #:phases
12237 (modify-phases %standard-phases
12238 (replace 'check
12239 (lambda _
12240 (let ((cwd (getcwd)))
12241 (setenv "PYTHONPATH"
12242 (string-append cwd "/build/"
12243 (find (cut string-prefix? "lib" <>)
12244 (scandir (string-append cwd "/build")))
12245 ":"
12246 (getenv "PYTHONPATH")))
12247 (invoke "pytest" "-v")))))))
12248 (native-inputs
12249 `(("python-pytest" ,python-pytest)))
12250 (home-page "https://rfc3986.readthedocs.io/")
12251 (synopsis "Parse and validate URI references")
12252 (description
12253 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12254validation and authority parsing. This module also supports RFC@tie{}6874
12255which adds support for zone identifiers to IPv6 addresses.")
12256 (license license:asl2.0)))
12257
12258(define-public python2-rfc3986
12259 (package-with-python2 python-rfc3986))
12260
12261(define-public python-rfc3987
12262 (package
12263 (name "python-rfc3987")
12264 (version "1.3.7")
12265 (source
12266 (origin
12267 (method url-fetch)
12268 (uri (pypi-uri "rfc3987" version))
12269 (sha256
12270 (base32
12271 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12272 (build-system python-build-system)
12273 (home-page "https://pypi.python.org/pypi/rfc3987")
12274 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12275 (description "@code{rfc3987} provides routines for parsing and
12276validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12277 (license license:gpl3+)))
12278
12279(define-public python2-rfc3987
12280 (package-with-python2 python-rfc3987))
12281
12282(define-public python-validate-email
12283 (package
12284 (name "python-validate-email")
12285 (version "1.3")
12286 (source
12287 (origin
12288 (method url-fetch)
12289 (uri (pypi-uri "validate_email" version))
12290 (sha256
12291 (base32
12292 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12293 (build-system python-build-system)
12294 (home-page "https://github.com/syrusakbary/validate_email")
12295 (synopsis "Verifies if an email address is valid and really exists")
12296 (description "@code{validate_email} can be used to verify if an email
12297address is valid and really exists.")
12298 (license license:lgpl3+)))
12299
12300(define-public python2-validate-email
12301 (package-with-python2 python-validate-email))
12302
12303(define-public python-flex
12304 (package
12305 (name "python-flex")
12306 (version "6.10.0")
12307 (source
12308 (origin
12309 (method url-fetch)
12310 (uri (pypi-uri "flex" version))
12311 (sha256
12312 (base32
12313 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12314 (build-system python-build-system)
12315 (propagated-inputs
12316 `(("python-click" ,python-click)
12317 ("python-iso8601" ,python-iso8601)
12318 ("python-jsonpointer" ,python-jsonpointer)
12319 ("python-pyyaml" ,python-pyyaml)
12320 ("python-requests" ,python-requests)
12321 ("python-rfc3987" ,python-rfc3987)
12322 ("python-six" ,python-six)
12323 ("python-validate-email" ,python-validate-email)))
12324 (home-page "https://github.com/pipermerriam/flex")
12325 (synopsis "Validates Swagger schemata")
12326 (description "@code{flex} can be used to validate Swagger schemata.")
12327 (license license:bsd-3)))
12328
12329(define-public python2-flex
12330 (package-with-python2 python-flex))
12331
12332(define-public python-marshmallow
12333 (package
12334 (name "python-marshmallow")
12335 (version "3.0.0b14")
12336 (source
12337 (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "marshmallow" version))
12340 (sha256
12341 (base32
12342 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12343 (build-system python-build-system)
12344 (propagated-inputs
12345 `(("python-dateutil" ,python-dateutil)
12346 ("python-simplejson" ,python-simplejson)))
12347 (native-inputs
12348 `(("python-pytest" ,python-pytest)
12349 ("python-pytz" ,python-pytz)))
12350 (home-page "https://github.com/marshmallow-code/marshmallow")
12351 (synopsis "Convert complex datatypes to and from native
12352Python datatypes.")
12353 (description "@code{marshmallow} provides a library for converting
12354complex datatypes to and from native Python datatypes.")
12355 (license license:expat)))
12356
12357(define-public python2-marshmallow
12358 (package-with-python2 python-marshmallow))
12359
12360(define-public python-apispec
12361 (package
12362 (name "python-apispec")
12363 (version "0.25.3")
12364 (source
12365 (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "apispec" version))
12368 (sha256
12369 (base32
12370 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12371 (build-system python-build-system)
12372 (propagated-inputs
12373 `(("python-pyyaml" ,python-pyyaml)))
12374 (native-inputs
12375 `(("python-pytest" ,python-pytest)
12376 ("python-flask" ,python-flask)
12377 ("python-marshmallow" ,python-marshmallow)
12378 ("python-tornado" ,python-tornado)
12379 ("python-bottle" ,python-bottle)
12380 ("python-mock" ,python-mock)))
12381 (home-page "https://github.com/marshmallow-code/apispec")
12382 (synopsis "Swagger 2.0 API specification generator")
12383 (description "@code{python-apispec} is a pluggable API specification
12384generator. Currently supports the OpenAPI specification (f.k.a.
12385Swagger 2.0).")
12386 (license license:expat)))
12387
12388(define-public python2-apispec
12389 (package-with-python2 python-apispec))
12390
12391(define-public python-flasgger
12392 (package
12393 (name "python-flasgger")
12394 (version "0.6.3")
12395 (source
12396 (origin
12397 (method url-fetch)
12398 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12399 version ".tar.gz"))
12400 (file-name (string-append name "-" version ".tar.gz"))
12401 (sha256
12402 (base32
12403 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12404 (build-system python-build-system)
12405 (arguments
12406 `(#:phases
12407 (modify-phases %standard-phases
12408 (replace 'check
12409 (lambda* (#:key inputs outputs #:allow-other-keys)
12410 (substitute* "Makefile"
12411 (("flake8 flasgger --ignore=F403")
12412 "flake8 flasgger --ignore=E731,F403"))
12413 (setenv "PYTHONPATH" (string-append (getcwd)
12414 ":"
12415 (getenv "PYTHONPATH")))
ac599a09 12416 (invoke "py.test"))))))
44d10b1f
RW
12417 (propagated-inputs
12418 `(("python-flask" ,python-flask)
12419 ("python-pyyaml" ,python-pyyaml)
12420 ("python-jsonschema" ,python-jsonschema)
12421 ("python-mistune" ,python-mistune)
12422 ("python-six" ,python-six)))
12423 (native-inputs
12424 `(("python-decorator" ,python-decorator)
12425 ("python-flake8" ,python-flake8)
12426 ("python-flask-restful" ,python-flask-restful)
12427 ("python-flex" ,python-flex)
12428 ("python-pytest" ,python-pytest)
12429 ("python-pytest-cov" ,python-pytest-cov)
12430 ("python-marshmallow" ,python-marshmallow)
12431 ("python-apispec" ,python-apispec)))
12432 (home-page "https://github.com/rochacbruno/flasgger/")
12433 (synopsis "Extract Swagger specs from your Flask project")
12434 (description "@code{python-flasgger} allows extracting Swagger specs
12435from your Flask project. It is a fork of Flask-Swagger.")
12436 (license license:expat)))
12437
12438(define-public python2-flasgger
12439 (package-with-python2 python-flasgger))
12440
12441(define-public python-swagger-spec-validator
12442 (package
12443 (name "python-swagger-spec-validator")
12444 (version "2.1.0")
12445 (source
12446 (origin
12447 (method url-fetch)
12448 (uri (pypi-uri "swagger-spec-validator" version))
12449 (sha256
12450 (base32
12451 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12452 (build-system python-build-system)
12453 (propagated-inputs
12454 `(("python-jsonschema" ,python-jsonschema)
12455 ("python-six" ,python-six)))
12456 (home-page
12457 "https://github.com/Yelp/swagger_spec_validator")
12458 (synopsis "Validation of Swagger specifications")
12459 (description "@code{swagger_spec_validator} provides a library for
12460validating Swagger API specifications.")
12461 (license license:asl2.0)))
12462
12463(define-public python2-swagger-spec-validator
12464 (package-with-python2 python-swagger-spec-validator))
12465
12466(define-public python-apache-libcloud
12467 (package
12468 (name "python-apache-libcloud")
12469 (version "2.4.0")
12470 (source
12471 (origin
12472 (method url-fetch)
12473 (uri (pypi-uri "apache-libcloud" version))
12474 (sha256
12475 (base32
12476 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12477 (build-system python-build-system)
12478 (arguments
12479 `(#:phases
12480 (modify-phases %standard-phases
12481 (add-after 'unpack 'patch-ssh
12482 (lambda* (#:key inputs #:allow-other-keys)
12483 (substitute* "libcloud/compute/ssh.py"
12484 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12485 "/bin/ssh" "'")))
12486 #t))
12487 (add-after 'unpack 'patch-tests
12488 (lambda _
12489 (substitute* "./libcloud/test/test_file_fixtures.py"
12490 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12491 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12492 return (httplib.OK,
12493 \"1234abcd\",
12494 {\"test\": \"value\"},
12495 httplib.responses[httplib.OK])
12496 def _ascii"))
12497 (substitute* "libcloud/test/compute/test_ssh_client.py"
12498 (("class ShellOutSSHClientTests")
12499 "@unittest.skip(\"Guix container doesn't have ssh service\")
12500class ShellOutSSHClientTests")
12501 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12502 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12503 (("'.xF0', '.x90', '.x8D', '.x88'")
12504 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12505 #t))
12506 (add-before 'check 'copy-secret
12507 (lambda _
12508 (copy-file "libcloud/test/secrets.py-dist"
12509 "libcloud/test/secrets.py")
12510 #t)))))
12511 (inputs
12512 `(("openssh" ,openssh)))
12513 (propagated-inputs
12514 `(("python-paramiko" ,python-paramiko)
12515 ("python-requests" ,python-requests)))
12516 (native-inputs
12517 `(("python-lockfile" ,python-lockfile)
12518 ("python-mock" ,python-mock)
12519 ("python-pytest" ,python-pytest)
12520 ("python-pytest-runner" ,python-pytest-runner)
12521 ("python-requests-mock" ,python-requests-mock)))
12522 (home-page "https://libcloud.apache.org/")
12523 (synopsis "Unified Cloud API")
12524 (description "@code{libcloud} is a Python library for interacting with
12525many of the popular cloud service providers using a unified API.")
12526 (license license:asl2.0)))
12527
12528(define-public python2-apache-libcloud
12529 (package-with-python2 python-apache-libcloud))
12530
12531(define-public python-smmap2
12532 (package
12533 (name "python-smmap2")
12534 (version "2.0.3")
12535 (source
12536 (origin
12537 (method url-fetch)
12538 (uri (pypi-uri "smmap2" version))
12539 (sha256
12540 (base32
12541 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12542 (build-system python-build-system)
12543 (native-inputs
12544 `(("python-nosexcover" ,python-nosexcover)))
12545 (home-page "https://github.com/Byron/smmap")
12546 (synopsis "Python sliding window memory map manager")
12547 (description "@code{smmap2} is a pure Python implementation of a sliding
12548window memory map manager.")
12549 (license license:bsd-3)))
12550
12551(define-public python2-smmap2
12552 (package-with-python2 python-smmap2))
12553
12554(define-public python-regex
12555 (package
12556 (name "python-regex")
12557 (version "2017.06.07")
12558 (source (origin
12559 (method url-fetch)
12560 (uri (pypi-uri "regex" version))
12561 (sha256
12562 (base32
12563 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12564 (build-system python-build-system)
12565 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12566 (synopsis "Alternative regular expression module")
12567 (description "This regular expression implementation is backwards-
12568compatible with the standard @code{re} module, but offers additional
12569functionality like full case-folding for case-insensitive matches in Unicode.")
12570 (license license:psfl)))
12571
12572(define-public python2-regex
12573 (package-with-python2 python-regex))
12574
12575(define-public python2-pyopengl
12576 (package
12577 (name "python2-pyopengl")
12578 (version "3.1.0")
12579 (source
12580 (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "PyOpenGL" version))
12583 (sha256
12584 (base32
12585 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12586 (arguments
12587 `(#:python ,python-2))
12588 (build-system python-build-system)
12589 (home-page "http://pyopengl.sourceforge.net")
12590 (synopsis "Standard OpenGL bindings for Python")
12591 (description
12592 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12593related APIs. The binding is created using the standard @code{ctypes}
12594library.")
12595 (license license:bsd-3)))
12596
12597(define-public python2-pyopengl-accelerate
12598 (package
12599 (inherit python2-pyopengl)
12600 (name "python2-pyopengl-accelerate")
12601 (version "3.1.0")
12602 (source
12603 (origin
12604 (method url-fetch)
12605 (uri (pypi-uri "PyOpenGL-accelerate" version))
12606 (sha256
12607 (base32
12608 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12609 (synopsis "Acceleration code for PyOpenGL")
12610 (description
12611 "This is the Cython-coded accelerator module for PyOpenGL.")))
12612
12613(define-public python-rencode
12614 (package
12615 (name "python-rencode")
12616 (version "1.0.5")
12617 (source
12618 (origin
12619 (method url-fetch)
12620 (uri (pypi-uri "rencode" version))
12621 (sha256
12622 (base32
12623 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12624 (build-system python-build-system)
12625 (arguments
12626 `(#:phases
12627 (modify-phases %standard-phases
12628 (add-before 'check 'delete-bogus-test
12629 ;; This test requires /home/aresch/Downloads, which is not provided by
12630 ;; the build environment.
12631 (lambda _
12632 (delete-file "rencode/t.py")
12633 #t)))))
12634 (native-inputs `(("pkg-config" ,pkg-config)
12635 ("python-cython" ,python-cython)))
12636 (home-page "https://github.com/aresch/rencode")
12637 (synopsis "Serialization of heterogeneous data structures")
12638 (description
12639 "The @code{rencode} module is a data structure serialization library,
12640similar to @code{bencode} from the BitTorrent project. For complex,
12641heterogeneous data structures with many small elements, r-encoding stake up
12642significantly less space than b-encodings. This version of rencode is a
12643complete rewrite in Cython to attempt to increase the performance over the
12644pure Python module.")
12645 (license license:bsd-3)))
12646
12647(define-public python2-rencode
12648 (package-with-python2 python-rencode))
12649
12650(define-public python-xenon
12651 (package
12652 (name "python-xenon")
12653 (version "0.5.4")
12654 (source
12655 (origin
12656 (method url-fetch)
12657 (uri (pypi-uri "xenon" version))
12658 (sha256
12659 (base32
12660 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12661 (build-system python-build-system)
12662 (native-inputs
12663 `(("python-pyyaml" ,python-pyyaml)
12664 ("python-radon" ,python-radon)
12665 ("python-requests" ,python-requests)
12666 ("python-flake8" ,python-flake8)
12667 ("python-tox" ,python-tox)))
12668 (arguments
12669 `(#:phases
12670 (modify-phases %standard-phases
12671 (add-before 'build 'patch-test-requirements
12672 (lambda _
12673 ;; Remove httpretty dependency for tests.
12674 (substitute* "setup.py"
12675 (("httpretty") ""))
12676 #t)))))
12677 (home-page "https://xenon.readthedocs.org/")
12678 (synopsis "Monitor code metrics for Python on your CI server")
12679 (description
12680 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12681Ideally, @code{xenon} is run every time code is committed. Through command
12682line options, various thresholds can be set for the complexity of code. It
12683will fail (i.e. it will exit with a non-zero exit code) when any of these
12684requirements is not met.")
12685 (license license:expat)))
12686
12687(define-public python2-xenon
12688 (package-with-python2 python-xenon))
12689
12690(define-public python-pysocks
12691 (package
12692 (name "python-pysocks")
12693 (version "1.6.8")
12694 (source
12695 (origin
12696 (method url-fetch)
12697 (uri (pypi-uri "PySocks" version))
12698 (sha256
12699 (base32
12700 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12701 (build-system python-build-system)
12702 (arguments `(#:tests? #f))
12703 (home-page "https://github.com/Anorov/PySocks")
12704 (synopsis "SOCKS client module")
12705 (description "@code{pysocks} is an updated and semi-actively maintained
12706version of @code{SocksiPy} with bug fixes and extra features.")
12707 (license license:bsd-3)))
12708
12709(define-public python2-pysocks
12710 (package-with-python2 python-pysocks))
12711
12712(define-public python-pydiff
12713 (package
12714 (name "python-pydiff")
12715 (version "0.2")
12716 (source
12717 (origin
12718 (method url-fetch)
12719 (uri (pypi-uri "pydiff" version))
12720 (sha256
12721 (base32
12722 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12723 (build-system python-build-system)
12724 (home-page "https://github.com/myint/pydiff")
12725 (synopsis "Library to diff two Python files at the bytecode level")
12726 (description
12727 "@code{pydiff} makes it easy to look for actual code changes while
12728ignoring formatting changes.")
12729 (license license:expat)))
12730
12731(define-public python2-pydiff
12732 (package-with-python2 python-pydiff))
12733
12734(define-public python-tqdm
12735 (package
12736 (name "python-tqdm")
12737 (version "4.19.6")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "tqdm" version))
12742 (sha256
12743 (base32
12744 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12745 (build-system python-build-system)
12746 (native-inputs
12747 `(("python-flake8" ,python-flake8)
12748 ("python-nose" ,python-nose)
12749 ("python-coverage" ,python-coverage)))
12750 (home-page "https://github.com/tqdm/tqdm")
12751 (synopsis "Fast, extensible progress meter")
12752 (description
12753 "Make loops show a progress bar on the console by just wrapping any
12754iterable with @code{|tqdm(iterable)|}. Offers many options to define
12755design and layout.")
12756 (license (list license:mpl2.0 license:expat))))
12757
12758(define-public python2-tqdm
12759 (package-with-python2 python-tqdm))
12760
12761(define-public python-pkginfo
12762 (package
12763 (name "python-pkginfo")
12764 (version "1.4.2")
12765 (source
12766 (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "pkginfo" version))
12769 (sha256
12770 (base32
12771 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12772 (build-system python-build-system)
12773 (arguments
12774 ;; The tests are broken upstream.
12775 '(#:tests? #f))
12776 (home-page
12777 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12778 (synopsis
12779 "Query metadatdata from sdists, bdists, and installed packages")
12780 (description
12781 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12782source distriubtion (an sdist) or a binary distribution (e.g., created by
12783running bdist_egg). It can also query the EGG-INFO directory of an installed
12784distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12785created by running @code{python setup.py develop}).")
12786 (license license:expat)))
12787
12788(define-public python2-pkginfo
12789 (package-with-python2 python-pkginfo))
12790
12791(define-public python-twine
12792 (package
12793 (name "python-twine")
12794 (version "1.9.1")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (pypi-uri "twine" version))
12799 (sha256
12800 (base32
12801 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12802 (build-system python-build-system)
12803 (propagated-inputs
12804 `(("python-tqdm" ,python-tqdm)
12805 ("python-pkginfo" ,python-pkginfo)
12806 ("python-requests" ,python-requests)
12807 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12808 (home-page "https://github.com/pypa/twine")
12809 (synopsis "Collection of utilities for interacting with PyPI")
12810 (description
12811 "@code{twine} currently supports registering projects and uploading
12812distributions. It authenticates the user over HTTPS, allows them to pre-sign
12813their files and supports any packaging format (including wheels).")
12814 (license license:asl2.0)))
12815
12816(define-public python2-twine
12817 (package-with-python2 python-twine))
12818
12819(define-public python-linecache2
12820 (package
12821 (name "python-linecache2")
12822 (version "1.0.0")
12823 (source
12824 (origin
12825 (method url-fetch)
12826 (uri (pypi-uri "linecache2" version))
12827 (sha256
12828 (base32
12829 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12830 (build-system python-build-system)
12831 (arguments
12832 `(;; The tests depend on unittest2, and our version is a bit too old.
12833 #:tests? #f))
12834 (native-inputs
12835 `(("python-pbr" ,python-pbr-minimal)))
12836 (home-page
12837 "https://github.com/testing-cabal/linecache2")
12838 (synopsis "Backports of the linecache module")
12839 (description
12840 "The linecache module allows one to get any line from any file, while
12841attempting to optimize internally, using a cache, the common case where many
12842lines are read from a single file.")
12843 (license license:psfl)))
12844
12845(define-public python2-linecache2
12846 (package-with-python2 python-linecache2))
12847
12848(define-public python-traceback2
12849 (package
12850 (name "python-traceback2")
12851 (version "1.4.0")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "traceback2" version))
12856 (sha256
12857 (base32
12858 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12859 (build-system python-build-system)
12860 (arguments
12861 `(;; python-traceback2 and python-unittest2 depend on one another.
12862 #:tests? #f))
12863 (native-inputs
12864 `(("python-pbr" ,python-pbr-minimal)))
12865 (propagated-inputs
12866 `(("python-linecache2" ,python-linecache2)))
12867 (home-page
12868 "https://github.com/testing-cabal/traceback2")
12869 (synopsis "Backports of the traceback module")
12870 (description
12871 "This module provides a standard interface to extract, format and print
12872stack traces of Python programs. It exactly mimics the behavior of the Python
12873interpreter when it prints a stack trace.")
12874 (license license:psfl)))
12875
12876(define-public python2-traceback2
12877 (package-with-python2 python-traceback2))
12878
12879(define-public python-ratelimiter
12880 (package
12881 (name "python-ratelimiter")
12882 (version "1.2.0")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "ratelimiter" version))
12887 (sha256
12888 (base32
12889 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12890 (build-system python-build-system)
12891 (arguments
12892 '(#:tests? #f)) ; There are no tests in the pypi archive.
12893 (home-page "https://github.com/RazerM/ratelimiter")
12894 (synopsis "Simple rate limiting object")
12895 (description
12896 "The @code{ratelimiter} module ensures that an operation will not be
12897executed more than a given number of times during a given period.")
12898 (license license:asl2.0)))
12899
12900(define-public python2-ratelimiter
12901 (package-with-python2 python-ratelimiter))
12902
12903(define-public python-dukpy
12904 (package
12905 (name "python-dukpy")
12906 (version "0.3")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12911 version ".tar.gz"))
12912 (file-name (string-append name "-" version ".tar.gz"))
12913 (sha256
12914 (base32
12915 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12916 (build-system python-build-system)
12917 (home-page "https://github.com/kovidgoyal/dukpy")
12918 (synopsis "Run JavaScript in python")
12919 (description
12920 "dukpy is a JavaScript runtime environment for Python using the duktape
12921embeddable JavaScript engine.")
12922 ;; Dukpy is licensed under MIT like the embedded duktape library,
12923 ;; with 'errors.c' as GPL3.
12924 (license (list license:expat license:gpl3))))
12925
12926(define-public python2-dukpy
12927 (package-with-python2 python-dukpy))
12928
12929(define-public python-jsonrpclib-pelix
12930 (package
12931 (name "python-jsonrpclib-pelix")
12932 (version "0.3.2")
12933 (source
12934 (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "jsonrpclib-pelix" version))
12937 (sha256
12938 (base32
12939 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12940 (build-system python-build-system)
12941 (arguments
12942 `(#:tests? #f)) ; no tests in PyPI tarball
12943 (home-page "https://github.com/tcalmant/jsonrpclib/")
12944 (synopsis "JSON-RPC 2.0 client library for Python")
12945 (description
12946 "This library implements the JSON-RPC v2.0
12947specification (backwards-compatible) as a client library for Python. This
12948version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12949services.")
12950 (license license:asl2.0)))
12951
12952(define-public python2-jsonrpclib-pelix
12953 (package-with-python2 python-jsonrpclib-pelix))
12954
12955(define-public python-setuptools-scm-git-archive
12956 (package
12957 (name "python-setuptools-scm-git-archive")
12958 (version "1.0")
12959 (source
12960 (origin
12961 (method url-fetch)
12962 (uri (pypi-uri "setuptools_scm_git_archive" version))
12963 (sha256
12964 (base32
12965 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12966 (build-system python-build-system)
12967 (native-inputs
12968 `(("python-pytest" ,python-pytest)))
12969 (propagated-inputs
12970 `(("python-setuptools-scm" ,python-setuptools-scm)))
12971 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12972 (synopsis "Setuptools_scm plugin for git archives")
12973 (description
12974 "The setuptools_scm_git_archive package is a plugin to
12975setuptools_scm, which supports obtaining versions from git archives that
12976belong to tagged versions.")
12977 (license license:expat)))
12978
12979(define-public python2-setuptools-scm-git-archive
12980 (package-with-python2 python-setuptools-scm-git-archive))
12981
12982(define-public python-pyclipper
12983 (package
12984 (name "python-pyclipper")
12985 (version "1.1.0.post1")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "pyclipper" version ".zip"))
12990 (sha256
12991 (base32
12992 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12993 (modules '((guix build utils)))
12994 (snippet
12995 '(begin
12996 ;; This file is generated by Cython.
12997 (delete-file "pyclipper/pyclipper.cpp") #t))))
12998 (build-system python-build-system)
12999 (arguments
13000 `(#:phases
13001 (modify-phases %standard-phases
13002 (add-before 'build 'cythonize-sources
13003 (lambda _
13004 (with-directory-excursion "pyclipper"
13005 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13006 (propagated-inputs
13007 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13008 (native-inputs
13009 `(("python-cython" ,python-cython)
13010 ("python-pytest" ,python-pytest)
13011 ("python-pytest-runner" ,python-pytest-runner)
13012 ("python-unittest2" ,python-unittest2)
13013 ("unzip" ,unzip)))
13014 (home-page "https://github.com/greginvm/pyclipper")
13015 (synopsis "Wrapper for Angus Johnson's Clipper library")
13016 (description
13017 "Pyclipper is a Cython wrapper for the C++ translation of the
13018Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13019 (license license:expat)))
13020
13021(define-public python2-pyclipper
13022 (package-with-python2 python-pyclipper))
13023
13024(define-public python2-booleanoperations
13025 (package
13026 (name "python2-booleanoperations")
13027 (version "0.7.1")
13028 (source
13029 (origin
13030 (method url-fetch)
13031 (uri (pypi-uri "booleanOperations" version ".zip"))
13032 (sha256
13033 (base32
13034 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13035 (build-system python-build-system)
13036 (arguments
13037 `(#:python ,python-2))
13038 (native-inputs
13039 `(("unzip" ,unzip)
13040 ("python2-pytest" ,python2-pytest)
13041 ("python2-pytest-runner" ,python2-pytest-runner)))
13042 (propagated-inputs
13043 `(("python-fonttools" ,python2-fonttools)
13044 ("python-pyclipper" ,python2-pyclipper)
13045 ("python-ufolib" ,python2-ufolib)))
13046 (home-page "https://github.com/typemytype/booleanOperations")
13047 (synopsis "Boolean operations on paths")
13048 (description
13049 "BooleanOperations provides a Python library that enables
13050boolean operations on paths.")
13051 (license license:expat)))
13052
13053(define-public python-tempdir
13054 (package
13055 (name "python-tempdir")
13056 (version "0.7.1")
13057 (source
13058 (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "tempdir" version))
13061 (sha256
13062 (base32
13063 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13064 (build-system python-build-system)
13065 (home-page "https://pypi.org/project/tempdir/")
13066 (arguments
13067 ;; the package has no tests
13068 '(#:tests? #f))
13069 (synopsis "Python library for managing temporary directories")
13070 (description
13071 "This library manages temporary directories that are automatically
13072deleted with all their contents when they are no longer needed. It is
13073particularly convenient for use in tests.")
13074 (license license:expat)))
13075
13076(define-public python2-tempdir
13077 (package-with-python2 python-tempdir))
13078
13079(define-public python-activepapers
13080 (package
13081 (name "python-activepapers")
13082 (version "0.2.2")
13083 (source
13084 (origin
13085 (method url-fetch)
13086 (uri (pypi-uri "ActivePapers.Py" version))
13087 (sha256
13088 (base32
13089 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13090 (build-system python-build-system)
13091 (arguments
13092 `(#:modules ((ice-9 ftw)
13093 (srfi srfi-1)
13094 (guix build utils)
13095 (guix build python-build-system))
13096
13097 #:phases
13098 (modify-phases %standard-phases
13099 (add-after 'unpack 'delete-python2-code
13100 (lambda _
13101 (for-each delete-file
13102 '("lib/activepapers/builtins2.py"
13103 "lib/activepapers/standardlib2.py"
13104 "lib/activepapers/utility2.py"))))
13105 (replace 'check
13106 (lambda _
13107 ;; Deactivate the test cases that download files
13108 (setenv "NO_NETWORK_ACCESS" "1")
13109 ;; For some strange reason, some tests fail if nosetests runs all
13110 ;; test modules in a single execution. They pass if each test
13111 ;; module is run individually.
13112 (for-each (lambda (filename)
13113 (invoke "nosetests"
13114 (string-append "tests/" filename)))
13115 (scandir "tests"
13116 (lambda (filename)
13117 (string-suffix? ".py" filename)))))))))
13118 (native-inputs
13119 `(("python-tempdir" ,python-tempdir)
13120 ("python-nose" ,python-nose)))
13121 (propagated-inputs
13122 `(("python-h5py" ,python-h5py)))
13123 (home-page "http://www.activepapers.org/")
13124 (synopsis "Executable papers for scientific computing")
13125 (description
13126 "ActivePapers is a tool for working with executable papers, which
13127combine data, code, and documentation in single-file packages,
13128suitable for publication as supplementary material or on repositories
13129such as figshare or Zenodo.")
13130 (properties `((python2-variant . ,(delay python2-activepapers))))
13131 (license license:bsd-3)))
13132
13133(define-public python2-activepapers
13134 (let ((base (package-with-python2
13135 (strip-python2-variant python-activepapers))))
13136 (package
13137 (inherit base)
13138 (arguments
13139 (substitute-keyword-arguments (package-arguments base)
13140 ((#:phases phases)
13141 `(modify-phases ,phases
13142 (delete 'delete-python2-code)
13143 (add-after 'unpack 'delete-python3-code
13144 (lambda _
13145 (for-each delete-file
13146 '("lib/activepapers/builtins3.py"
13147 "lib/activepapers/standardlib3.py"
13148 "lib/activepapers/utility3.py")))))))))))
13149
13150(define-public python-semver
13151 (package
13152 (name "python-semver")
13153 (version "2.7.9")
13154 (source
13155 (origin
13156 (method url-fetch)
13157 (uri (pypi-uri "semver" version))
13158 (sha256
13159 (base32
13160 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13161 (build-system python-build-system)
13162 (arguments
13163 `(#:phases
13164 (modify-phases %standard-phases
13165 (add-after 'unpack 'patch-test-requirements
13166 (lambda _
13167 (substitute* "setup.py"
13168 ;; Our Python is new enough.
13169 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13170 #t)))))
13171 (native-inputs
13172 `(("python-tox" ,python-tox)
13173 ("python-virtualenv" ,python-virtualenv)))
13174 (home-page "https://github.com/k-bx/python-semver")
13175 (synopsis "Python helper for Semantic Versioning")
13176 (description "This package provides a Python library for
13177@url{Semantic Versioning, http://semver.org/}.")
13178 (license license:bsd-3)))
13179
13180(define-public python2-semver
13181 (package-with-python2 python-semver))
13182
13183(define-public python-pyro4
13184 (package
13185 (name "python-pyro4")
13186 (version "4.74")
13187 (source
13188 (origin
13189 (method url-fetch)
13190 (uri (pypi-uri "Pyro4" version))
13191 (sha256
13192 (base32
13193 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13194 (build-system python-build-system)
13195 (propagated-inputs
13196 `(("python-serpent" ,python-serpent)))
13197 (home-page "https://pyro4.readthedocs.io")
13198 (synopsis "Distributed object middleware for Python")
13199 (description
13200 "Pyro enables you to build applications in which objects can talk to each
13201other over the network. You can just use normal Python method calls to call
13202objects on other machines, also known as remote procedure calls (RPC).")
13203 (license license:expat)))
13204
13205(define-public python2-pyro
13206 (package
13207 (name "python2-pyro")
13208 (version "3.16")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "Pyro" version))
13213 (file-name (string-append "Pyro-" version ".tar.gz"))
13214 (sha256
13215 (base32
13216 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13217 (build-system python-build-system)
13218 (arguments
13219 ;; Pyro is not compatible with Python 3
13220 `(#:python ,python-2
13221 ;; Pyro has no test cases for automatic execution
13222 #:tests? #f))
13223 (home-page "http://pythonhosted.org/Pyro/")
13224 (synopsis "Distributed object manager for Python")
13225 (description "Pyro is a Distributed Object Technology system
13226written in Python that is designed to be easy to use. It resembles
13227Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13228which is a system and language independent Distributed Object Technology
13229and has much more to offer than Pyro or RMI. Pyro 3.x is no
13230longer maintained. New projects should use Pyro4 instead, which
13231is the new Pyro version that is actively developed.")
13232 (license license:expat)))
13233
13234(define-public python2-scientific
13235 (package
13236 (name "python2-scientific")
13237 (version "2.9.4")
13238 (source
13239 (origin
13240 (method url-fetch)
13241 (uri (string-append "https://bitbucket.org/khinsen/"
13242 "scientificpython/downloads/ScientificPython-"
13243 version ".tar.gz"))
13244 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13245 (sha256
13246 (base32
13247 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13248 (build-system python-build-system)
13249 (inputs
13250 `(("netcdf" ,netcdf)))
13251 (propagated-inputs
13252 `(("python-numpy" ,python2-numpy-1.8)
13253 ("python-pyro" ,python2-pyro)))
13254 (arguments
13255 ;; ScientificPython is not compatible with Python 3
13256 `(#:python ,python-2
13257 #:tests? #f ; No test suite
13258 #:phases
13259 (modify-phases %standard-phases
13260 (replace 'build
13261 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13262 (invoke "python" "setup.py" "build"
13263 (string-append "--netcdf_prefix="
13264 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13265 (home-page "https://bitbucket.org/khinsen/scientificpython")
13266 (synopsis "Python modules for scientific computing")
13267 (description "ScientificPython is a collection of Python modules that are
13268useful for scientific computing. Most modules are rather general (Geometry,
13269physical units, automatic derivatives, ...) whereas others are more
13270domain-specific (e.g. netCDF and PDB support). The library is currently
13271not actively maintained and works only with Python 2 and NumPy < 1.9.")
13272 (license license:cecill-c)))
13273
13274(define-public python2-mmtk
13275 (package
13276 (name "python2-mmtk")
13277 (version "2.7.11")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 (uri (string-append "https://bitbucket.org/khinsen/"
13282 "mmtk/downloads/MMTK-" version ".tar.gz"))
13283 (file-name (string-append "MMTK-" version ".tar.gz"))
13284 (sha256
13285 (base32
13286 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13287 (build-system python-build-system)
13288 (native-inputs
13289 `(("netcdf" ,netcdf)))
13290 (propagated-inputs
13291 `(("python-scientific" ,python2-scientific)
13292 ("python-tkinter" ,python-2 "tk")))
13293 (arguments
13294 `(#:python ,python-2
13295 #:tests? #f
13296 #:phases
13297 (modify-phases %standard-phases
13298 (add-before 'build 'includes-from-scientific
13299 (lambda* (#:key inputs #:allow-other-keys)
13300 (mkdir-p "Include/Scientific")
13301 (copy-recursively
13302 (string-append
13303 (assoc-ref inputs "python-scientific")
13304 "/include/python2.7/Scientific")
13305 "Include/Scientific"))))))
13306 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13307 (synopsis "Python library for molecular simulation")
13308 (description "MMTK is a library for molecular simulations with an emphasis
13309on biomolecules. It provides widely used methods such as Molecular Dynamics
13310and normal mode analysis, but also basic routines for implementing new methods
13311for simulation and analysis. The library is currently not actively maintained
13312and works only with Python 2 and NumPy < 1.9.")
13313 (license license:cecill-c)))
13314
13315(define-public python-phonenumbers
13316 (package
13317 (name "python-phonenumbers")
13318 (version "8.9.1")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 (uri (pypi-uri "phonenumbers" version))
13323 (sha256
13324 (base32
13325 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13326 (build-system python-build-system)
13327 (home-page
13328 "https://github.com/daviddrysdale/python-phonenumbers")
13329 (synopsis
13330 "Python library for dealing with international phone numbers")
13331 (description
13332 "This package provides a Python port of Google's libphonenumber library.")
13333 (license license:asl2.0)))
13334
13335(define-public python2-phonenumbers
13336 (package-with-python2 python-phonenumbers))
13337
13338(define-public python-send2trash
13339 (package
13340 (name "python-send2trash")
d9b0216b 13341 (version "1.5.0")
44d10b1f 13342 (source
d9b0216b 13343 (origin (method git-fetch)
44d10b1f 13344 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13345 (uri (git-reference
13346 (url "https://github.com/hsoft/send2trash.git")
13347 (commit version)))
13348 (file-name (git-file-name name version))
44d10b1f
RW
13349 (sha256
13350 (base32
d9b0216b 13351 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13352 (build-system python-build-system)
13353 (arguments
13354 '(#:phases
13355 (modify-phases %standard-phases
13356 (add-before 'check 'pre-check
13357 (lambda _
13358 (mkdir-p "/tmp/foo")
13359 (setenv "HOME" "/tmp/foo")
13360 #t)))))
13361 (home-page "https://github.com/hsoft/send2trash")
13362 (synopsis "Send files to the user's @file{~/Trash} directory")
13363 (description "This package provides a Python library to send files to the
13364user's @file{~/Trash} directory.")
13365 (license license:bsd-3)))
13366
13367(define-public python2-send2trash
13368 (package
13369 (inherit (package-with-python2 python-send2trash))
13370 (arguments
13371 (substitute-keyword-arguments (package-arguments python-send2trash)
13372 ((#:phases phases)
13373 `(modify-phases ,phases
13374 (add-before 'check 'setenv
13375 (lambda _
13376 (setenv "PYTHONPATH"
13377 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13378 #t))))))
13379 (properties `((python2-variant . ,(delay python-send2trash))))))
13380
13381(define-public python-yapf
13382 (package
13383 (name "python-yapf")
13384 (version "0.24.0")
13385 (source
13386 (origin
13387 (method url-fetch)
13388 (uri (pypi-uri "yapf" version))
13389 (sha256
13390 (base32
13391 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13392 (build-system python-build-system)
13393 (home-page "https://github.com/google/yapf")
13394 (synopsis "Formatter for Python code")
13395 (description "YAPF is a formatter for Python code. It's based off of
13396@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13397takes the code and reformats it to the best formatting that conforms to the
13398style guide, even if the original code didn't violate the style guide.")
13399 (license license:asl2.0)))
13400
13401(define-public python2-yapf
13402 (package-with-python2 python-yapf))
13403
13404(define-public python-gyp
13405 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13406 (revision "0"))
13407 (package
13408 (name "python-gyp")
13409 ;; Google does not release versions,
13410 ;; based on second most recent commit date.
13411 (version (git-version "0.0.0" revision commit))
13412 (source
13413 (origin
13414 ;; Google does not release tarballs,
13415 ;; git checkout is needed.
13416 (method git-fetch)
13417 (uri (git-reference
13418 (url "https://chromium.googlesource.com/external/gyp")
13419 (commit commit)))
13420 (file-name (git-file-name name version))
13421 (sha256
13422 (base32
13423 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13424 (build-system python-build-system)
13425 (home-page "https://gyp.gsrc.io/")
13426 (synopsis "GYP is a Meta-Build system")
13427 (description
13428 "GYP builds build systems for large, cross platform applications.
13429It can be used to generate XCode projects, Visual Studio projects, Ninja build
13430files, and Makefiles.")
13431 (license license:bsd-3))))
13432
13433(define-public python2-gyp
13434 (package-with-python2 python-gyp))
13435
13436(define-public python-whatever
13437 (package
13438 (name "python-whatever")
13439 (version "0.5")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13444 ".tar.gz"))
13445 (sha256
13446 (base32
13447 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13448 (file-name (string-append name "-" version ".tar.gz"))))
13449 (build-system python-build-system)
13450 (arguments
13451 `(#:phases
13452 (modify-phases %standard-phases
13453 (replace 'check
13454 (lambda _
13455 (invoke "py.test"))))))
13456 (native-inputs
13457 `(("python-pytest" ,python-pytest)))
13458 (home-page "http://github.com/Suor/whatever")
13459 (synopsis "Make anonymous functions by partial application of operators")
13460 (description "@code{whatever} provides an easy way to make anonymous
13461functions by partial application of operators.")
13462 (license license:bsd-3)))
13463
13464(define-public python2-whatever
13465 (package-with-python2 python-whatever))
13466
13467(define-public python-funcy
13468 (package
13469 (name "python-funcy")
9e396ab8 13470 (version "1.11")
44d10b1f
RW
13471 (source
13472 (origin
a85c6027
TGR
13473 (method git-fetch)
13474 (uri (git-reference
13475 (url "https://github.com/Suor/funcy.git")
13476 (commit version)))
44d10b1f 13477 (sha256
a85c6027
TGR
13478 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13479 (file-name (git-file-name name version))))
44d10b1f
RW
13480 (build-system python-build-system)
13481 (arguments
13482 `(#:phases
13483 (modify-phases %standard-phases
13484 (replace 'check
13485 (lambda _
13486 (invoke "py.test"))))))
13487 (native-inputs
13488 `(("python-pytest" ,python-pytest)
13489 ("python-whatever" ,python-whatever)))
13490 (home-page "http://github.com/Suor/funcy")
13491 (synopsis "Functional tools")
13492 (description "@code{funcy} is a library that provides functional tools.
13493Examples are:
13494@enumerate
13495@item merge - Merges collections of the same type
13496@item walk - Type-preserving map
13497@item select - Selects a part of a collection
13498@item take - Takes the first n items of a collection
13499@item first - Takes the first item of a collection
13500@item remove - Predicated-removes items of a collection
13501@item concat - Concatenates two collections
13502@item flatten - Flattens a collection with subcollections
13503@item distinct - Returns only distinct items
13504@item split - Predicated-splits a collection
13505@item split_at - Splits a collection at a given item
13506@item group_by - Groups items by group
13507@item pairwise - Pairs off adjacent items
13508@item partial - Partially-applies a function
13509@item curry - Curries a function
13510@item compose - Composes functions
13511@item complement - Complements a predicate
13512@item all_fn - \"all\" with predicate
13513@end enumerate")
13514 (license license:bsd-3)))
13515
13516(define-public python2-funcy
13517 (package-with-python2 python-funcy))
13518
13519(define-public python-isoweek
13520 (package
13521 (name "python-isoweek")
13522 (version "1.3.3")
13523 (source
13524 (origin
13525 (method url-fetch)
13526 (uri (pypi-uri "isoweek" version))
13527 (sha256
13528 (base32
13529 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13530 (build-system python-build-system)
13531 (home-page "https://github.com/gisle/isoweek")
13532 (synopsis "Objects representing a week")
13533 (description "The @code{isoweek} module provide the class Week that
13534implements the week definition of ISO 8601. This standard also defines
13535a notation for identifying weeks; yyyyWww (where the W is a literal).
13536Week instances stringify to this form.")
13537 (license license:bsd-3)))
13538
13539(define-public python2-isoweek
13540 (package-with-python2 python-isoweek))
13541
13542(define-public python-tokenize-rt
13543 (package
13544 (name "python-tokenize-rt")
13545 (version "2.0.1")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "tokenize-rt" version))
13550 (sha256
13551 (base32
13552 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13553 (build-system python-build-system)
13554 (home-page "https://github.com/asottile/tokenize-rt")
13555 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13556 (description
13557 "This Python library is a wrapper around @code{tokenize} from the Python
13558standard library. It provides two additional tokens @code{ESCAPED_NL} and
13559@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13560and @code{tokens_to_src} to roundtrip.")
13561 (license license:expat)))
13562
13563(define-public python-future-fstrings
13564 (package
13565 (name "python-future-fstrings")
13566 (version "0.4.1")
13567 (source
13568 (origin
13569 (method url-fetch)
13570 (uri (pypi-uri "future_fstrings" version))
13571 (sha256
13572 (base32
13573 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13574 (build-system python-build-system)
13575 (propagated-inputs
13576 `(("python-tokenize-rt" ,python-tokenize-rt)))
13577 (home-page "https://github.com/asottile/future-fstrings")
13578 (synopsis "Backport of fstrings to Python < 3.6")
13579 (description
13580 "This package provides a UTF-8 compatible encoding
13581@code{future_fstrings}, which performs source manipulation. It decodes the
13582source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13583@code{f} strings.")
13584 (license license:expat)))
13585
13586(define-public python-typing
13587 (package
13588 (name "python-typing")
13589 (version "3.6.6")
13590 (source
13591 (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "typing" version))
13594 (sha256
13595 (base32
13596 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13597 (build-system python-build-system)
13598 (home-page "https://docs.python.org/3/library/typing.html")
13599 (synopsis "Type hints for Python")
13600 (description "This is a backport of the standard library @code{typing}
13601module to Python versions older than 3.5. Typing defines a standard notation
13602for Python function and variable type annotations. The notation can be used
13603for documenting code in a concise, standard format, and it has been designed
13604to also be used by static and runtime type checkers, static analyzers, IDEs
13605and other tools.")
13606 (license license:psfl)))
13607
13608(define-public python2-typing
13609 (package-with-python2 python-typing))
13610
f89d443b
VC
13611(define-public python-typing-extensions
13612 (package
13613 (name "python-typing-extensions")
13614 (version "3.7.2")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "typing_extensions" version))
13619 (sha256
13620 (base32
13621 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13622 (build-system python-build-system)
13623 (home-page
13624 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13625 (synopsis "Experimental type hints for Python")
13626 (description
13627 "The typing_extensions module contains additional @code{typing} hints not
13628yet present in the of the @code{typing} standard library.
13629Included are implementations of:
13630@enumerate
13631@item ClassVar
13632@item ContextManager
13633@item Counter
13634@item DefaultDict
13635@item Deque
13636@item NewType
13637@item NoReturn
13638@item overload
13639@item Protocol
13640@item runtime
13641@item Text
13642@item Type
13643@item TYPE_CHECKING
13644@item AsyncGenerator
13645@end enumerate\n")
13646 (license license:psfl)))
13647
44d10b1f
RW
13648(define-public bpython
13649 (package
13650 (name "bpython")
13651 (version "0.17.1")
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "bpython" version))
13656 (sha256
13657 (base32
13658 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13659 (build-system python-build-system)
13660 (arguments
13661 `(#:phases
13662 (modify-phases %standard-phases
13663 (add-after 'unpack 'remove-failing-test
13664 (lambda _
13665 ;; Remove failing test. FIXME: make it pass
13666 (delete-file "bpython/test/test_args.py")
13667 #t))
13668 (add-after 'wrap 'add-aliases
13669 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13670 (lambda* (#:key outputs #:allow-other-keys)
13671 (let ((out (assoc-ref outputs "out")))
13672 (for-each
13673 (lambda (old new)
13674 (symlink old (string-append out "/bin/" new)))
13675 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13676 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13677 #t)))))
13678 (propagated-inputs
13679 `(("python-pygments" ,python-pygments)
13680 ("python-requests" ,python-requests)
13681 ("python-babel" ,python-babel) ; optional, for internationalization
13682 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13683 ("python-greenlet" ,python-greenlet)
13684 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13685 ("python-six" ,python-six)))
13686 (native-inputs
13687 `(("python-sphinx" ,python-sphinx)
13688 ("python-mock" ,python-mock)))
13689 (home-page "https://bpython-interpreter.org/")
13690 (synopsis "Fancy interface to the Python interpreter")
13691 (description "Bpython is a fancy interface to the Python
13692interpreter. bpython's main features are
13693
13694@enumerate
13695@item in-line syntax highlighting,
13696@item readline-like autocomplete with suggestions displayed as you type,
13697@item expected parameter list for any Python function,
13698@item \"rewind\" function to pop the last line of code from memory and
13699 re-evaluate,
13700@item send the code you've entered off to a pastebin,
13701@item save the code you've entered to a file, and
13702@item auto-indentation.
13703@end enumerate")
13704 (license license:expat)))
13705
13706(define-public bpython2
13707 (let ((base (package-with-python2
13708 (strip-python2-variant bpython))))
13709 (package (inherit base)
13710 (name "bpython2")
13711 (arguments
13712 `(#:python ,python-2
13713 #:phases
13714 (modify-phases %standard-phases
13715 (add-after 'unpack 'remove-failing-test
13716 (lambda _
13717 ;; Remove failing test. FIXME: make it pass
13718 (delete-file "bpython/test/test_args.py")
13719 ;; Disable failing test-cases (renaming inhibits they are
13720 ;; discovered)
13721 (substitute* "bpython/test/test_curtsies_repl.py"
13722 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13723 (string-append a "xxx_off_" b))
13724 (("^(\\s*def )(test_complex\\W)" _ a b)
13725 (string-append a "xxx_off_" b)))
13726 #t))
13727 (add-before 'build 'rename-scripts
13728 ;; rename the scripts to bypthon2, bpdb2, etc.
13729 (lambda _
13730 (substitute* "setup.py"
13731 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13732 (string-append name "2" rest "\n"))
13733 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13734 (string-append name "2" (or sub "") rest "\n")))
13735 #t))))))))
13736
13737(define-public python-pyinotify
13738 (package
13739 (name "python-pyinotify")
13740 (version "0.9.6")
13741 (source (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "pyinotify" version))
13744 (sha256
13745 (base32
13746 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13747 (build-system python-build-system)
13748 (arguments `(#:tests? #f)) ;no tests
13749 (home-page "https://github.com/seb-m/pyinotify")
13750 (synopsis "Python library for monitoring inotify events")
13751 (description
13752 "@code{pyinotify} provides a Python interface for monitoring
13753file system events on Linux.")
13754 (license license:expat)))
13755
13756(define-public python2-pyinotify
13757 (package-with-python2 python-pyinotify))
13758
13759;; Ada parser uses this version.
13760(define-public python2-quex-0.67.3
13761 (package
13762 (name "python2-quex")
13763 (version "0.67.3")
13764 (source
13765 (origin
13766 (method url-fetch)
13767 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13768 (version-major+minor version)
13769 "/quex-" version ".zip"))
13770 (sha256
13771 (base32
13772 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13773 (build-system python-build-system)
13774 (native-inputs
13775 `(("unzip" ,unzip)))
13776 (arguments
13777 `(#:python ,python-2
13778 #:tests? #f
13779 #:phases
13780 (modify-phases %standard-phases
13781 (delete 'configure)
13782 (delete 'build)
13783 (replace 'install
13784 (lambda* (#:key outputs #:allow-other-keys)
13785 (let* ((out (assoc-ref outputs "out"))
13786 (share/quex (string-append out "/share/quex"))
13787 (bin (string-append out "/bin")))
13788 (copy-recursively "." share/quex)
13789 (mkdir-p bin)
13790 (symlink (string-append share/quex "/quex-exe.py")
13791 (string-append bin "/quex"))
13792 #t))))))
13793 (native-search-paths
13794 (list (search-path-specification
13795 (variable "QUEX_PATH")
13796 (files '("share/quex")))))
13797 (home-page "http://quex.sourceforge.net/")
13798 (synopsis "Lexical analyzer generator in Python")
13799 (description "@code{quex} is a lexical analyzer generator in Python.")
13800 (license license:lgpl2.1+))) ; Non-military
13801
13802(define-public python2-quex
13803 (package (inherit python2-quex-0.67.3)
13804 (name "python2-quex")
13805 (version "0.68.1")
13806 (source
13807 (origin
13808 (method url-fetch)
13809 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13810 (sha256
13811 (base32
13812 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13813 (file-name (string-append name "-" version ".tar.gz"))))))
13814
13815(define-public python-more-itertools
13816 (package
13817 (name "python-more-itertools")
47f66348 13818 (version "6.0.0")
44d10b1f
RW
13819 (source
13820 (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "more-itertools" version))
13823 (sha256
13824 (base32
47f66348 13825 "1lfrx2ndnilla3a5lhpjc1wjgkplkxrhp5nyn6ys2l93jkil802r"))))
44d10b1f 13826 (build-system python-build-system)
44d10b1f
RW
13827 (home-page "https://github.com/erikrose/more-itertools")
13828 (synopsis "More routines for operating on iterables, beyond itertools")
13829 (description "Python's built-in @code{itertools} module implements a
13830number of iterator building blocks inspired by constructs from APL, Haskell,
13831and SML. @code{more-itertools} includes additional building blocks for
13832working with iterables.")
47f66348 13833 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
13834 (license license:expat)))
13835
47f66348 13836;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 13837(define-public python2-more-itertools
47f66348
MB
13838 (package
13839 (inherit python-more-itertools)
13840 (name "python2-more-itertools")
13841 (version "5.0.0")
13842 (source (origin
13843 (method url-fetch)
13844 (uri (pypi-uri "more-itertools" version))
13845 (sha256
13846 (base32
13847 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
13848 (arguments
13849 `(#:python ,python2-minimal))
13850 (propagated-inputs
13851 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
13852
13853(define-public python-latexcodec
13854 (package
13855 (name "python-latexcodec")
13856 (version "1.0.5")
13857 (source
13858 (origin
13859 (method url-fetch)
13860 (uri (pypi-uri "latexcodec" version))
13861 (sha256
13862 (base32
13863 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13864 (build-system python-build-system)
13865 (inputs
13866 `(("python-six" ,python-six)))
13867 (home-page "https://readthedocs.org/projects/latexcodec/")
13868 (synopsis "Work with LaTeX code in Python")
13869 (description "Lexer and codec to work with LaTeX code in Python.")
13870 (license license:expat)))
13871
13872(define-public python-pybtex
13873 (package
13874 (name "python-pybtex")
13875 (version "0.21")
13876 (source
13877 (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "pybtex" version))
13880 (sha256
13881 (base32
13882 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13883 (build-system python-build-system)
13884 (native-inputs
13885 `(("python-nose" ,python-nose)))
13886 (inputs
13887 `(("python-latexcodec" ,python-latexcodec)
13888 ("python-pyyaml" ,python-pyyaml)
13889 ("python-six" ,python-six)))
13890 (arguments
13891 `(#:test-target "nosetests"))
13892 (home-page "https://pybtex.org/")
13893 (synopsis "BibTeX-compatible bibliography processor")
13894 (description "Pybtex is a BibTeX-compatible bibliography processor written
13895in Python. You can simply type pybtex instead of bibtex.")
13896 (license license:expat)))
13897
13898(define-public python-onetimepass
13899 (package
13900 (name "python-onetimepass")
13901 (version "1.0.1")
13902 (source
13903 (origin
13904 (method url-fetch)
13905 (uri (pypi-uri "onetimepass" version))
13906 (sha256
13907 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13908 (build-system python-build-system)
13909 (propagated-inputs `(("python-six" ,python-six)))
13910 (home-page "https://github.com/tadeck/onetimepass/")
13911 (synopsis "One-time password library")
13912 (description "Python one-time password library for HMAC-based (HOTP) and
13913time-based (TOTP) passwords.")
13914 (license license:expat)))
13915
13916(define-public python-parso
13917 (package
13918 (name "python-parso")
13919 (version "0.3.1")
13920 (source
13921 (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "parso" version))
13924 (sha256
13925 (base32
13926 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13927 (native-inputs
13928 `(("python-pytest" ,python-pytest)))
13929 (build-system python-build-system)
13930 (home-page "https://github.com/davidhalter/parso")
13931 (synopsis "Python Parser")
13932 (description "Parso is a Python parser that supports error recovery and
13933round-trip parsing for different Python versions (in multiple Python versions).
13934Parso is also able to list multiple syntax errors in your Python file.")
13935 (license license:expat)))
13936
13937(define-public python2-parso
13938 (package-with-python2 python-parso))
13939
13940(define-public python-async-generator
13941 (package
13942 (name "python-async-generator")
94fcbf8d 13943 (version "1.10")
44d10b1f
RW
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "async_generator" version))
13948 (sha256
13949 (base32
94fcbf8d 13950 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
13951 (build-system python-build-system)
13952 (native-inputs
13953 `(("python-pytest" ,python-pytest)))
13954 (home-page "https://github.com/python-trio/async_generator")
13955 (synopsis "Async generators and context managers for Python 3.5+")
13956 (description "@code{async_generator} back-ports Python 3.6's native async
13957generators and Python 3.7's context managers into Python 3.5.")
13958 ;; Dual licensed.
13959 (license (list license:expat license:asl2.0))))
13960
13961(define-public python-async-timeout
13962 (package
13963 (name "python-async-timeout")
13964 (version "3.0.1")
13965 (source
13966 (origin
13967 (method url-fetch)
13968 (uri (pypi-uri "async-timeout" version))
13969 (sha256
13970 (base32
13971 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13972 (build-system python-build-system)
13973 (home-page "https://github.com/aio-libs/async_timeout/")
13974 (synopsis "Timeout context manager for asyncio programs")
13975 (description "@code{async-timeout} provides a timeout timeout context
13976manager compatible with @code{asyncio}.")
13977 (license license:asl2.0)))
13978
13979(define-public python-glob2
13980 (package
13981 (name "python-glob2")
13982 (version "0.6")
13983 (source (origin
13984 (method url-fetch)
13985 (uri (string-append
13986 "https://github.com/miracle2k/python-glob2/archive/"
13987 version
13988 ".tar.gz"))
13989 (sha256
13990 (base32
13991 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13992 (file-name (string-append name "-" version ".tar.gz"))))
13993 (build-system python-build-system)
13994 (home-page "https://github.com/miracle2k/python-glob2/")
13995 (synopsis "Extended Version of the python buildin glob module")
13996 (description "This is an extended version of the Python
13997@url{http://docs.python.org/library/glob.html, built-in glob module} which
13998adds:
13999
14000@itemize
14001@item The ability to capture the text matched by glob patterns, and return
14002those matches alongside the file names.
14003@item A recursive @code{**} globbing syntax, akin for example to the
14004@code{globstar} option of Bash.
14005@item The ability to replace the file system functions used, in order to glob
14006on virtual file systems.
14007@item Compatible with Python 2 and Python 3 (tested with 3.3).
14008@end itemize
14009
14010Glob2 currently based on the glob code from Python 3.3.1.")
14011 (license license:bsd-2)))
14012
14013(define-public python2-glob2
14014 (package-with-python2 python-glob2))
14015
14016(define-public python-gipc
14017 (package
14018 (name "python-gipc")
14019 (version "0.6.0")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "gipc" version ".zip"))
14024 (sha256
14025 (base32
14026 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14027 (build-system python-build-system)
14028 (native-inputs
14029 `(("unzip" ,unzip)))
14030 (propagated-inputs
14031 `(("python-gevent" ,python-gevent)))
14032 (home-page "http://gehrcke.de/gipc")
14033 (synopsis "Child process management in the context of gevent")
14034 (description "Usage of Python's multiprocessing package in a
14035gevent-powered application may raise problems. With @code{gipc},
14036process-based child processes can safely be created anywhere within a
14037gevent-powered application.")
14038 (license license:expat)))
14039
14040(define-public python2-gipc
14041 (package-with-python2 python-gipc))
14042
14043(define-public python-fusepy
14044 (package
14045 (name "python-fusepy")
14046 (version "2.0.4")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "fusepy" version))
14051 (sha256
14052 (base32
14053 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14054 (build-system python-build-system)
14055 (arguments
14056 `(#:phases
14057 (modify-phases %standard-phases
14058 (add-before 'build 'set-library-file-name
14059 (lambda* (#:key inputs #:allow-other-keys)
14060 (let ((fuse (assoc-ref inputs "fuse")))
14061 (substitute* "fuse.py"
14062 (("find_library\\('fuse'\\)")
14063 (string-append "'" fuse "/lib/libfuse.so'")))
14064 #t))))))
14065 (propagated-inputs
14066 `(("fuse" ,fuse)))
14067 (home-page "https://github.com/fusepy/fusepy")
14068 (synopsis "Simple ctypes bindings for FUSE")
14069 (description "Python module that provides a simple interface to FUSE and
14070MacFUSE. The binding is created using the standard @code{ctypes} library.")
14071 (license license:isc)))
14072
14073(define-public python2-fusepy
14074 (package-with-python2 python-fusepy))
14075
14076(define-public python2-gdrivefs
14077 (package
14078 (name "python2-gdrivefs")
14079 (version "0.14.9")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "gdrivefs" version))
14084 (sha256
14085 (base32
14086 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14087 (build-system python-build-system)
14088 (arguments
14089 `(#:python ,python-2
14090 #:phases
14091 (modify-phases %standard-phases
14092 (add-before 'build 'patch-setup-py
14093 (lambda _
14094 ;; Update requirements from dependency==version
14095 ;; to dependency>=version
14096 (substitute* "gdrivefs/resources/requirements.txt"
14097 (("==") ">="))
14098 #t)))))
14099 (native-inputs
14100 `(("python2-gipc" ,python2-gipc)
14101 ("python2-gevent" ,python2-gevent)
14102 ("python2-greenlet" ,python2-greenlet)
14103 ("python2-httplib2" ,python2-httplib2)
14104 ("python2-uritemplate" ,python2-uritemplate)
14105 ("python2-oauth2client" ,python2-oauth2client)
14106 ("python2-six" ,python2-six)))
14107 (propagated-inputs
14108 `(("python2-dateutil" ,python2-dateutil)
14109 ("python2-fusepy" ,python2-fusepy)
14110 ("python2-google-api-client" ,python2-google-api-client)))
14111 (home-page "https://github.com/dsoprea/GDriveFS")
14112 (synopsis "Mount Google Drive as a local file system")
14113 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14114under Python 2.7.")
14115 (license license:gpl2)))
14116
14117(define-public pybind11
14118 (package
14119 (name "pybind11")
14120 (version "2.2.4")
14121 (source (origin
14122 (method git-fetch)
14123 (uri (git-reference
14124 (url "https://github.com/pybind/pybind11.git")
14125 (commit (string-append "v" version))))
14126 (sha256
14127 (base32
14128 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14129 (file-name (git-file-name name version))))
14130 (build-system cmake-build-system)
14131 (native-inputs
14132 `(("python" ,python)
14133 ("python-pytest" ,python-pytest)))
14134 (arguments
14135 `(#:test-target "check"))
14136 (home-page "https://github.com/pybind/pybind11/")
14137 (synopsis "Seamless operability between C++11 and Python")
14138 (description "pybind11 is a lightweight header-only library that exposes
14139C++ types in Python and vice versa, mainly to create Python bindings of
14140existing C++ code. Its goals and syntax are similar to the excellent
14141Boost.Python library by David Abrahams: to minimize boilerplate code in
14142traditional extension modules by inferring type information using compile-time
14143introspection.")
14144 (license license:expat)))
14145
14146(define-public python-fasteners
14147 (package
14148 (name "python-fasteners")
14149 (version "0.14.1")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 (uri (pypi-uri "fasteners" version))
14154 (sha256
14155 (base32
14156 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14157 (build-system python-build-system)
14158 (propagated-inputs
14159 `(("python-monotonic" ,python-monotonic)
14160 ("python-six" ,python-six)
14161 ("python-testtools" ,python-testtools)))
14162 (home-page "https://github.com/harlowja/fasteners")
14163 (synopsis "Python package that provides useful locks")
14164 (description
14165 "This package provides a Python program that provides following locks:
14166
14167@itemize
14168@item Locking decorator
14169@item Reader-writer locks
14170@item Inter-process locks
14171@item Generic helpers
14172@end itemize\n")
14173 (properties `((python2-variant . ,(delay python2-fasteners))))
14174 (license license:asl2.0)))
14175
14176(define-public python2-fasteners
14177 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14178 (package
14179 (inherit base)
14180 (propagated-inputs
14181 `(("python2-futures" ,python2-futures)
14182 ,@(package-propagated-inputs base))))))
14183
14184(define-public python-requests-file
14185 (package
14186 (name "python-requests-file")
14187 (version "1.4.3")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "requests-file" version))
14192 (sha256
14193 (base32
14194 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14195 (build-system python-build-system)
14196 (propagated-inputs
14197 `(("python-requests" ,python-requests)
14198 ("python-six" ,python-six)))
14199 (home-page
14200 "https://github.com/dashea/requests-file")
14201 (synopsis "File transport adapter for Requests")
14202 (description
14203 "Requests-File is a transport adapter for use with the Requests Python
14204library to allow local filesystem access via file:// URLs.")
14205 (license license:asl2.0)))
14206
14207(define-public python2-requests-file
14208 (package-with-python2 python-requests-file))
14209
14210(define-public python-tldextract
14211 (package
14212 (name "python-tldextract")
14213 (version "2.2.0")
14214 (source
14215 (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "tldextract" version))
14218 (sha256
14219 (base32
14220 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14221 (build-system python-build-system)
14222 (native-inputs
14223 `(("python-pytest" ,python-pytest)
14224 ("python-responses" ,python-responses)))
14225 (propagated-inputs
14226 `(("python-idna" ,python-idna)
14227 ("python-requests" ,python-requests)
14228 ("python-requests-file" ,python-requests-file)))
14229 (home-page
14230 "https://github.com/john-kurkowski/tldextract")
14231 (synopsis
14232 "Separate the TLD from the registered domain and subdomains of a URL")
14233 (description
14234 "TLDExtract accurately separates the TLD from the registered domain and
14235subdomains of a URL, using the Public Suffix List. By default, this includes
14236the public ICANN TLDs and their exceptions. It can optionally support the
14237Public Suffix List's private domains as well.")
14238 (license license:bsd-3)))
14239
14240(define-public python2-tldextract
14241 (package-with-python2 python-tldextract))
14242
14243(define-public python-pynamecheap
14244 (package
14245 (name "python-pynamecheap")
14246 (version "0.0.3")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "PyNamecheap" version))
14251 (sha256
14252 (base32
14253 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14254 (build-system python-build-system)
14255 (propagated-inputs
14256 `(("python-requests" ,python-requests)))
14257 (home-page
14258 "https://github.com/Bemmu/PyNamecheap")
14259 (synopsis
14260 "Namecheap API client in Python")
14261 (description
14262 "PyNamecheap is a Namecheap API client in Python.")
14263 (license license:expat)))
14264
14265(define-public python2-pynamecheap
14266 (package-with-python2 python-pynamecheap))
14267
14268(define-public python-dns-lexicon
14269 (package
14270 (name "python-dns-lexicon")
14271 (version "2.4.0")
14272 (source
14273 (origin
14274 (method url-fetch)
14275 (uri (pypi-uri "dns-lexicon" version))
14276 (sha256
14277 (base32
14278 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14279 (build-system python-build-system)
14280 (arguments
14281 `(#:tests? #f)) ;requires internet access
14282 (propagated-inputs
14283 `(("python-future" ,python-future)
14284 ("python-pynamecheap" ,python-pynamecheap)
14285 ("python-requests" ,python-requests)
14286 ("python-tldextract" ,python-tldextract)
14287 ("python-urllib3" ,python-urllib3)))
14288 (home-page "https://github.com/AnalogJ/lexicon")
14289 (synopsis
14290 "Manipulate DNS records on various DNS providers")
14291 (description
14292 "Lexicon provides a way to manipulate DNS records on multiple DNS
14293providers in a standardized way. It has a CLI but it can also be used as a
14294Python library. It was designed to be used in automation, specifically with
14295Let's Encrypt.")
14296 (license license:expat)))
14297
14298(define-public python2-dns-lexicon
14299 (package-with-python2 python-dns-lexicon))
14300
14301(define-public python-commandlines
14302 (package
14303 (name "python-commandlines")
14304 (version "0.4.1")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "commandlines" version))
14309 (sha256
14310 (base32
14311 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14312 (build-system python-build-system)
14313 (home-page "https://github.com/chrissimpkins/commandlines")
14314 (synopsis "Command line argument to object parsing library")
14315 (description
14316 "@code{Commandlines} is a Python library for command line application
14317development that supports command line argument parsing, command string
14318validation testing and application logic.")
14319 (license license:expat)))
14320
14321;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14322;; python-numba. They have a very unflexible relationship.
14323(define-public python-numba
14324 (package
14325 (name "python-numba")
14326 (version "0.39.0")
14327 (source
14328 (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "numba" version))
14331 (sha256
14332 (base32
14333 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14334 (build-system python-build-system)
14335 (arguments
14336 `(#:modules ((guix build utils)
14337 (guix build python-build-system)
14338 (ice-9 ftw)
14339 (srfi srfi-1)
14340 (srfi srfi-26))
14341 #:phases
14342 (modify-phases %standard-phases
14343 (add-after 'unpack 'disable-proprietary-features
14344 (lambda _
14345 (setenv "NUMBA_DISABLE_HSA" "1")
14346 (setenv "NUMBA_DISABLE_CUDA" "1")
14347 #t))
14348 (add-after 'unpack 'remove-failing-tests
14349 (lambda _
14350 ;; FIXME: these tests fail for unknown reasons:
14351 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14352 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14353 (substitute* "numba/tests/test_dispatcher.py"
14354 (("def test(_non_writable_pycache)" _ m)
14355 (string-append "def guix_skip" m))
14356 (("def test(_non_creatable_pycache)" _ m)
14357 (string-append "def guix_skip" m))
14358 (("def test(_frozen)" _ m)
14359 (string-append "def guix_skip" m)))
14360
14361 ;; These tests fail because we don't run the tests from the build
14362 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14363 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14364 (substitute* "numba/tests/test_pycc.py"
14365 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14366 (string-append "def guix_skip" m)))
14367 #t))
14368 (replace 'check
14369 (lambda _
14370 (let ((cwd (getcwd)))
14371 (setenv "PYTHONPATH"
14372 (string-append cwd "/build/"
14373 (find (cut string-prefix? "lib" <>)
14374 (scandir (string-append cwd "/build")))
14375 ":"
14376 (getenv "PYTHONPATH")))
14377 ;; Something is wrong with the PYTHONPATH when running the
14378 ;; tests from the build directory, as it complains about not being
14379 ;; able to import certain modules.
14380 (with-directory-excursion "/tmp"
14381 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14382 #t)))))
14383 (propagated-inputs
14384 `(("python-llvmlite" ,python-llvmlite)
14385 ("python-numpy" ,python-numpy)
14386 ("python-singledispatch" ,python-singledispatch)))
14387 ;; Needed for tests.
14388 (inputs
14389 `(("python-jinja2" ,python-jinja2)
14390 ("python-pygments" ,python-pygments)))
14391 (home-page "https://numba.pydata.org")
14392 (synopsis "Compile Python code using LLVM")
14393 (description "Numba gives you the power to speed up your applications with
14394high performance functions written directly in Python. With a few
14395annotations, array-oriented and math-heavy Python code can be just-in-time
14396compiled to native machine instructions, similar in performance to C, C++ and
14397Fortran, without having to switch languages or Python interpreters.
14398
14399Numba works by generating optimized machine code using the LLVM compiler
14400infrastructure at import time, runtime, or statically (using the included pycc
14401tool).")
14402 (license license:bsd-3)))
14403
14404(define-public python-anndata
14405 (package
14406 (name "python-anndata")
14407 (version "0.6.9")
14408 (source
14409 (origin
14410 (method url-fetch)
14411 (uri (pypi-uri "anndata" version))
14412 (sha256
14413 (base32
14414 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14415 (build-system python-build-system)
14416 (propagated-inputs
14417 `(("python-h5py" ,python-h5py)
14418 ("python-natsort" ,python-natsort)
14419 ("python-pandas" ,python-pandas)
14420 ("python-scipy" ,python-scipy)))
14421 (home-page "https://github.com/theislab/anndata")
14422 (synopsis "Annotated data for data analysis pipelines")
14423 (description "Anndata is a package for simple (functional) high-level APIs
14424for data analysis pipelines. In this context, it provides an efficient,
14425scalable way of keeping track of data together with learned annotations and
14426reduces the code overhead typically encountered when using a mostly
14427object-oriented library such as @code{scikit-learn}.")
14428 (license license:bsd-3)))
14429
14430(define-public python-dill
14431 (package
14432 (name "python-dill")
14433 (version "0.2.8.2")
14434 (source
14435 (origin
14436 (method url-fetch)
14437 (uri (pypi-uri "dill" version))
14438 (sha256
14439 (base32
14440 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14441 (build-system python-build-system)
14442 ;; FIXME: The check phase fails with "don't know how to make test".
14443 (arguments '(#:tests? #f))
14444 (home-page "https://pypi.org/project/dill")
14445 (synopsis "Serialize all of Python")
14446 (description "Dill extends Python's @code{pickle} module for serializing
14447and de-serializing Python objects to the majority of the built-in Python
14448types. Dill provides the user the same interface as the @code{pickle} module,
14449and also includes some additional features. In addition to pickling Python
14450objects, @code{dill} provides the ability to save the state of an interpreter
14451session in a single command. Hence, it would be feasable to save a
14452interpreter session, close the interpreter, ship the pickled file to another
14453computer, open a new interpreter, unpickle the session and thus continue from
14454the saved state of the original interpreter session.")
14455 (license license:bsd-3)))
14456
14457(define-public python-multiprocess
14458 (package
14459 (name "python-multiprocess")
14460 (version "0.70.6.1")
14461 (source
14462 (origin
14463 (method url-fetch)
14464 (uri (pypi-uri "multiprocess" version))
14465 (sha256
14466 (base32
14467 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14468 (build-system python-build-system)
14469 (propagated-inputs
14470 `(("python-dill" ,python-dill)))
14471 (home-page "https://pypi.org/project/multiprocess")
14472 (synopsis "Multiprocessing and multithreading in Python")
14473 (description
14474 "This package is a fork of the multiprocessing Python package, a package
14475which supports the spawning of processes using the API of the standard
14476library's @code{threading} module.")
14477 (license license:bsd-3)))
14478
14479(define-public python-toolz
14480 (package
14481 (name "python-toolz")
14482 (version "0.9.0")
14483 (source
14484 (origin
14485 (method url-fetch)
14486 (uri (pypi-uri "toolz" version))
14487 (sha256
14488 (base32
14489 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14490 (build-system python-build-system)
14491 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14492 ;; unregistered loader type"
14493 (arguments '(#:tests? #f))
14494 (home-page "https://github.com/pytoolz/toolz/")
14495 (synopsis "List processing tools and functional utilities")
14496 (description
14497 "This package provides a set of utility functions for iterators,
14498functions, and dictionaries.")
14499 (license license:bsd-3)))
14500
14501(define-public python2-toolz
14502 (package-with-python2 python-toolz))
14503
14504(define-public python-cytoolz
14505 (package
14506 (name "python-cytoolz")
14507 (version "0.9.0.1")
14508 (source
14509 (origin
14510 (method url-fetch)
14511 (uri (pypi-uri "cytoolz" version))
14512 (sha256
14513 (base32
14514 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14515 (build-system python-build-system)
14516 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14517 ;; 'exceptions'"
14518 (arguments '(#:tests? #f))
14519 (propagated-inputs
14520 `(("python-toolz" ,python-toolz)))
14521 (native-inputs
14522 `(("python-cython" ,python-cython)))
14523 (home-page "https://github.com/pytoolz/cytoolz")
14524 (synopsis "High performance functional utilities")
14525 (description
14526 "The cytoolz package implements the same API as provided by toolz. The
14527main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14528that is accessible to other projects developed in Cython.")
14529 (license license:bsd-3)))
14530
14531(define-public python-sortedcontainers
14532 (package
14533 (name "python-sortedcontainers")
14534 (version "2.0.4")
14535 (source
14536 (origin
14537 (method url-fetch)
14538 (uri (pypi-uri "sortedcontainers" version))
14539 (sha256
14540 (base32
14541 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14542 (build-system python-build-system)
14543 (native-inputs
14544 `(("python-tox" ,python-tox)))
14545 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14546 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14547 (description
14548 "This package provides a sorted collections library, written in
14549pure-Python.")
14550 (license license:asl2.0)))
14551
14552(define-public python-cloudpickle
14553 (package
14554 (name "python-cloudpickle")
14555 (version "0.6.1")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "cloudpickle" version))
14560 (sha256
14561 (base32
14562 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14563 (build-system python-build-system)
14564 ;; FIXME: there are 5 errors in 122 tests:
14565 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14566 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14567 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14568 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14569 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14570 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14571 (arguments '(#:tests? #f))
14572 (native-inputs
14573 `(("python-pytest" ,python-pytest)
14574 ("python-mock" ,python-mock)
14575 ("python-tornado" ,python-tornado)))
14576 (home-page "https://github.com/cloudpipe/cloudpickle")
14577 (synopsis "Extended pickling support for Python objects")
14578 (description
14579 "Cloudpickle makes it possible to serialize Python constructs not
14580supported by the default pickle module from the Python standard library. It
14581is especially useful for cluster computing where Python expressions are
14582shipped over the network to execute on remote hosts, possibly close to the
14583data.")
14584 (license license:bsd-3)))
14585
14586(define-public python2-cloudpickle
14587 (package-with-python2 python-cloudpickle))
14588
14589(define-public python-locket
14590 (package
14591 (name "python-locket")
14592 (version "0.2.0")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (pypi-uri "locket" version))
14597 (sha256
14598 (base32
14599 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14600 (build-system python-build-system)
14601 (home-page "https://github.com/mwilliamson/locket.py")
14602 (synopsis "File-based locks for Python")
14603 (description
14604 "Locket implements a lock that can be used by multiple processes provided
14605they use the same path.")
14606 (license license:bsd-2)))
14607
14608(define-public python2-locket
14609 (package-with-python2 python-locket))
14610
14611(define-public python-blosc
14612 (package
14613 (name "python-blosc")
14614 (version "1.5.1")
14615 (source
14616 (origin
14617 (method url-fetch)
14618 (uri (pypi-uri "blosc" version))
14619 (sha256
14620 (base32
14621 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14622 (build-system python-build-system)
14623 ;; FIXME: all tests pass, but then this error is printed:
14624 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14625 (arguments '(#:tests? #f))
14626 (propagated-inputs
14627 `(("python-numpy" ,python-numpy)))
14628 (home-page "https://github.com/blosc/python-blosc")
14629 (synopsis "Python wrapper for the Blosc data compressor library")
14630 (description "Blosc is a high performance compressor optimized for binary
14631data. It has been designed to transmit data to the processor cache faster
14632than the traditional, non-compressed, direct memory fetch approach via a
14633@code{memcpy()} system call.
14634
14635Blosc works well for compressing numerical arrays that contains data with
14636relatively low entropy, like sparse data, time series, grids with
14637regular-spaced values, etc.
14638
14639This Python package wraps the Blosc library.")
14640 (license license:bsd-3)))
14641
14642(define-public python2-blosc
14643 (package-with-python2 python-blosc))
14644
14645(define-public python-partd
14646 (package
14647 (name "python-partd")
14648 (version "0.3.9")
14649 (source
14650 (origin
14651 (method url-fetch)
14652 (uri (pypi-uri "partd" version))
14653 (sha256
14654 (base32
14655 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14656 (build-system python-build-system)
14657 (propagated-inputs
14658 `(("python-blosc" ,python-blosc)
14659 ("python-locket" ,python-locket)
14660 ("python-numpy" ,python-numpy)
14661 ("python-pandas" ,python-pandas)
14662 ("python-pyzmq" ,python-pyzmq)
14663 ("python-toolz" ,python-toolz)))
14664 (home-page "https://github.com/dask/partd/")
14665 (synopsis "Appendable key-value storage")
14666 (description "Partd stores key-value pairs. Values are raw bytes. We
14667append on old values. Partd excels at shuffling operations.")
14668 (license license:bsd-3)))
14669
14670(define-public python2-partd
14671 (package-with-python2 python-partd))
14672
14673(define-public python-dask
14674 (package
14675 (name "python-dask")
755226e9 14676 (version "1.1.4")
44d10b1f
RW
14677 (source
14678 (origin
14679 (method url-fetch)
14680 (uri (pypi-uri "dask" version))
14681 (sha256
14682 (base32
755226e9 14683 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14684 (build-system python-build-system)
14685 ;; A single test out of 5000+ fails. This test is marked as xfail when
14686 ;; pytest-xdist is used.
14687 (arguments
14688 `(#:phases
14689 (modify-phases %standard-phases
14690 (add-after 'unpack 'disable-broken-test
14691 (lambda _
14692 (substitute* "dask/tests/test_threaded.py"
14693 (("def test_interrupt\\(\\)" m)
14694 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14695 m)))
14696 (when (which "python2")
14697 ;; This test fails with recent Pandas:
14698 ;; <https://github.com/dask/dask/issues/3794>.
14699 (substitute* "dask/dataframe/tests/test_dataframe.py"
14700 (("def test_info\\(\\)" m)
14701 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14702 m))))
14703 #t))
14704 (replace 'check
14705 (lambda _ (invoke "pytest" "-vv"))))))
14706 (propagated-inputs
14707 `(("python-cloudpickle" ,python-cloudpickle)
14708 ("python-numpy" ,python-numpy)
14709 ("python-pandas" ,python-pandas)
14710 ("python-partd" ,python-partd)
14711 ("python-toolz" ,python-toolz)
14712 ("python-pyyaml" ,python-pyyaml)))
14713 (native-inputs
14714 `(("python-pytest" ,python-pytest)
14715 ("python-pytest-runner" ,python-pytest-runner)))
14716 (home-page "https://github.com/dask/dask/")
14717 (synopsis "Parallel computing with task scheduling")
14718 (description
14719 "Dask is a flexible parallel computing library for analytics. It
14720consists of two components: dynamic task scheduling optimized for computation,
14721and large data collections like parallel arrays, dataframes, and lists that
14722extend common interfaces like NumPy, Pandas, or Python iterators to
14723larger-than-memory or distributed environments. These parallel collections
14724run on top of the dynamic task schedulers. ")
14725 (license license:bsd-3)))
14726
14727(define-public python2-dask
14728 (package-with-python2 python-dask))
14729
14730(define-public python-ilinkedlist
14731 (package
14732 (name "python-ilinkedlist")
14733 (version "0.4.0")
14734 (source
14735 (origin
14736 (method url-fetch)
14737 (uri (pypi-uri "ilinkedlist" version))
14738 (sha256
14739 (base32
14740 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14741 (build-system python-build-system)
14742 (native-inputs `(("python-pytest" ,python-pytest)))
14743 (inputs `(("python" ,python)))
14744 (home-page "https://github.com/luther9/ilinkedlist-py")
14745 (synopsis "Immutable linked list library")
14746 (description
14747 "This is a implementation of immutable linked lists for Python. It
14748contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14749Since a linked list is treated as immutable, it is hashable, and its length
14750can be retrieved in constant time. Some of the terminology is inspired by
14751LISP. It is possible to create an improper list by creating a @code{Pair}
14752with a non-list @code{cdr}.")
14753 (license license:gpl3+)))
14754
14755(define-public python-readlike
14756 (package
14757 (name "python-readlike")
14758 (version "0.1.3")
14759 (source
14760 (origin
14761 (method url-fetch)
14762 (uri (pypi-uri "readlike" version))
14763 (sha256
14764 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14765 (build-system python-build-system)
14766 (home-page "https://github.com/jangler/readlike")
14767 (synopsis "GNU Readline-like line editing module")
14768 (description
14769 "This Python module provides line editing functions similar to the default
14770Emacs-style ones of GNU Readline. Unlike the Python standard library's
14771@code{readline} package, this one allows access to those capabilties in settings
14772outside of a standard command-line interface. It is especially well-suited to
14773interfacing with Urwid, due to a shared syntax for describing key inputs.
14774
14775Currently, all stateless Readline commands are implemented. Yanking and history
14776are not supported.")
14777 (license license:expat)))
14778
14779(define-public python2-readlike
14780 (package-with-python2 python-readlike))
14781
14782(define-public python-reparser
14783 (package
14784 (name "python-reparser")
14785 (version "1.4.3")
14786 (source
14787 (origin
14788 (method url-fetch)
14789 (uri (pypi-uri "ReParser" version))
14790 (sha256
14791 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14792 (build-system python-build-system)
14793 (home-page "https://github.com/xmikos/reparser")
14794 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14795 (description
14796 "This Python library provides a simple lexer/parser for inline markup based
14797on regular expressions.")
14798 (license license:expat)))
14799
14800(define-public python2-reparser
14801 (let ((reparser (package-with-python2
14802 (strip-python2-variant python-reparser))))
14803 (package (inherit reparser)
14804 (propagated-inputs
14805 `(("python2-enum34" ,python2-enum34)
14806 ,@(package-propagated-inputs reparser))))))
14807
14808(define-public python-precis-i18n
14809 (package
14810 (name "python-precis-i18n")
14811 (version "1.0.0")
14812 (source
14813 (origin
14814 (method url-fetch)
14815 (uri (pypi-uri "precis_i18n" version))
14816 (sha256
14817 (base32
14818 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14819 (build-system python-build-system)
14820 (home-page "https://github.com/byllyfish/precis_i18n")
14821 (synopsis "Implementation of the PRECIS framework")
14822 (description
14823 "This module implements the PRECIS Framework as described in RFC 8264,
14824RFC 8265 and RFC 8266.")
14825 (license license:expat)))
14826
d0446c4b
RW
14827(define-public python-absl-py
14828 (package
14829 (name "python-absl-py")
14830 (version "0.6.1")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "absl-py" version))
14835 (sha256
14836 (base32
14837 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14838 (build-system python-build-system)
14839 (propagated-inputs
14840 `(("python-six" ,python-six)))
14841 (home-page "https://github.com/abseil/abseil-py")
14842 (synopsis "Abseil Python common libraries")
14843 (description
14844 "This package provides the Abseil Python Common Libraries, a collection
14845of Python libraries for building Python applications.")
14846 (license license:asl2.0)))
14847
81bed4e9
RW
14848(define-public python-astor
14849 (package
14850 (name "python-astor")
14851 (version "0.7.1")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "astor" version))
14856 (sha256
14857 (base32
14858 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14859 (build-system python-build-system)
14860 ;; FIXME: There are two errors and two test failures.
14861 (arguments `(#:tests? #f))
14862 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14863 (synopsis "Read and write Python ASTs")
81bed4e9 14864 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14865source via the Abstract Syntax Tree.")
81bed4e9
RW
14866 (license license:bsd-3)))
14867
39ee82ff
RW
14868(define-public python2-astor
14869 (package-with-python2 python-astor))
14870
22e623ae
RW
14871(define-public python-grpcio
14872 (package
14873 (name "python-grpcio")
14874 (version "1.17.1")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "grpcio" version))
14879 (sha256
14880 (base32
14881 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14882 (build-system python-build-system)
14883 (propagated-inputs
14884 `(("python-six" ,python-six)))
14885 (home-page "https://grpc.io")
14886 (synopsis "HTTP/2-based RPC framework")
14887 (description "This package provides a Python library for communicating
14888with the HTTP/2-based RPC framework gRPC.")
14889 (license license:asl2.0)))
14890
79869f80
RW
14891(define-public python-astunparse
14892 (package
14893 (name "python-astunparse")
14894 (version "1.6.1")
14895 (source
14896 (origin
14897 (method url-fetch)
14898 (uri (pypi-uri "astunparse" version))
14899 (sha256
14900 (base32
14901 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14902 (build-system python-build-system)
14903 (arguments '(#:tests? #f)) ; there are none
14904 (propagated-inputs
14905 `(("python-six" ,python-six)
14906 ("python-wheel" ,python-wheel)))
14907 (home-page "https://github.com/simonpercivall/astunparse")
14908 (synopsis "AST unparser for Python")
14909 (description "This package provides an AST unparser for Python. It is a
14910factored out version of @code{unparse} found in the Python source
14911distribution.")
14912 (license license:bsd-3)))
14913
2884aac0
RW
14914(define-public python-gast
14915 (package
14916 (name "python-gast")
14917 (version "0.2.0")
14918 (source
14919 (origin
14920 (method url-fetch)
14921 (uri (pypi-uri "gast" version))
14922 (sha256
14923 (base32
14924 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14925 (build-system python-build-system)
14926 (propagated-inputs
14927 `(("python-astunparse" ,python-astunparse)))
14928 (home-page "https://pypi.org/project/gast/")
14929 (synopsis "Generic Python AST that abstracts the underlying Python version")
14930 (description
14931 "GAST provides a compatibility layer between the AST of various Python
14932versions, as produced by @code{ast.parse} from the standard @code{ast}
14933module.")
14934 (license license:bsd-3)))
14935
44d10b1f
RW
14936(define-public python-wikidata
14937 (package
14938 (name "python-wikidata")
14939 (version "0.6.1")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "Wikidata" version))
14944 (sha256
14945 (base32
14946 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14947 (build-system python-build-system)
14948 (propagated-inputs
14949 `(("python-babel" ,python-babel)))
14950 (home-page "https://github.com/dahlia/wikidata")
14951 (synopsis "Wikidata client library")
14952 (description
14953 "This package provides a Python interface to
14954@url{https://www.wikidata.org/, Wikidata}.")
14955 (properties '((upstream-name . "Wikidata")))
14956 (license license:gpl3+)))
14957
14958(define-public python-doctest-ignore-unicode
14959 (package
14960 (name "python-doctest-ignore-unicode")
14961 (version "0.1.2")
14962 (source
14963 (origin
14964 (method url-fetch)
14965 (uri (pypi-uri "doctest-ignore-unicode" version))
14966 (sha256
14967 (base32
14968 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14969 (build-system python-build-system)
14970 (native-inputs
14971 `(("python-nose" ,python-nose)))
14972 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14973 (synopsis "Ignore Unicode literal prefixes in doctests")
14974 (description
14975 "This package adds support for a flag to ignore Unicode literal prefixes
14976in doctests.")
14977 (license license:asl2.0)))
14978
14979(define-public python-attr
14980 (package
14981 (name "python-attr")
14982 (version "0.3.1")
14983 (source
14984 (origin
14985 (method url-fetch)
14986 (uri (pypi-uri "attr" version))
14987 (sha256
14988 (base32
14989 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14990 (build-system python-build-system)
14991 (home-page "https://github.com/denis-ryzhkov/attr")
14992 (synopsis "Decorator for attributes of target function or class")
14993 (description "Simple decorator to set attributes of target function or
14994class in a @acronym{DRY, Don't Repeat Yourself} way.")
14995 (license license:expat)))
f98232a3
VC
14996
14997(define-public python-construct
14998 (package
14999 (name "python-construct")
15000 (version "2.9.45")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 (uri (pypi-uri "construct" version))
15005 (sha256
15006 (base32
15007 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15008 (build-system python-build-system)
15009 (arguments
15010 `(#:tests? #f)) ; No tests exist.
15011 (propagated-inputs
15012 `(("python-extras" ,python-extras)
15013 ("python-arrow" ,python-arrow)
15014 ("python-numpy" ,python-numpy)
15015 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15016 (home-page "http://construct.readthedocs.io")
15017 (synopsis "Declarative and symmetrical parser and builder for binary data")
15018 (description
15019 "This package provides both simple, atomic constructs (such as
15020integers of various sizes), as well as composite ones which allow you
15021form hierarchical and sequential structures of increasing complexity.
15022It features bit and byte granularity, easy debugging and testing, an
15023easy-to-extend subclass system, and lots of primitive constructs to
15024make your work easier.")
15025 (license license:expat)))
b742c006
LF
15026
15027(define-public python-humanize
15028 (package
15029 (name "python-humanize")
15030 (version "0.5.1")
15031 (source
15032 (origin
15033 (method url-fetch)
15034 (uri (pypi-uri "humanize" version))
15035 (sha256
15036 (base32
15037 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15038 (arguments
15039 '(#:tests? #f)) ; tests not in pypi archive
15040 (build-system python-build-system)
15041 (home-page "https://github.com/jmoiron/humanize")
15042 (synopsis "Print numerical information in a human-readable form")
15043 (description "This package provides a Python module that displays numbers
15044and dates in \"human readable\" forms. For example, it would display
15045\"12345591313\" as \"12.3 billion\".")
15046 (license license:expat)))
d5bbf66d
LF
15047
15048(define-public python-txaio
15049 (package
15050 (name "python-txaio")
15051 (version "18.8.1")
15052 (source
15053 (origin
15054 (method url-fetch)
15055 (uri (pypi-uri "txaio" version))
15056 (sha256
15057 (base32
15058 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15059 (build-system python-build-system)
15060 (propagated-inputs
15061 `(("python-twisted" ,python-twisted)
15062 ("python-six" ,python-six)))
15063 (home-page "https://github.com/crossbario/txaio")
15064 (synopsis "Compatibility layer between Python asyncio and Twisted")
15065 (description "Txaio provides a compatibility layer between the Python
15066@code{asyncio} module and @code{Twisted}.")
15067 (license license:expat)))