gnu: elogind: Update to 239.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>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 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
305 (lambda _ (invoke "pytest" "-vv"))))))
306 (home-page "http://babel.pocoo.org/")
307 (synopsis
308 "Tools for internationalizing Python applications")
309 (description
310 "Babel is composed of two major parts:
311- tools to build and work with gettext message catalogs
312- a Python interface to the CLDR (Common Locale Data Repository), providing
313access to various locale display names, localized number and date formatting,
314etc. ")
315 (license license:bsd-3)))
316
317(define-public python2-babel
318 (package-with-python2 python-babel))
319
320(define-public python2-backport-ssl-match-hostname
321 (package
322 (name "python2-backport-ssl-match-hostname")
323 (version "3.5.0.1")
324 (source
325 (origin
326 (method url-fetch)
2c1f0d09 327 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
328 (sha256
329 (base32
330 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
331 (build-system python-build-system)
332 (arguments
333 `(#:python ,python-2
334 #:tests? #f)) ; no test target
335 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
336 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
337 (description
338 "This backport brings the ssl.match_hostname() function to users of
339earlier versions of Python. The function checks the hostname in the
340certificate returned by the server to which a connection has been established,
341and verifies that it matches the intended target hostname.")
342 (license license:psfl)))
343
344(define-public python-hdf4
345 (package
346 (name "python-hdf4")
347 (version "0.9")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (pypi-uri name version))
352 (sha256
353 (base32
354 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
355 (build-system python-build-system)
356 (native-inputs `(("nose" ,python-nose)))
357 (propagated-inputs `(("numpy" ,python-numpy)))
358 (inputs
359 `(("hdf4" ,hdf4)
360 ("libjpeg" ,libjpeg)
361 ("zlib" ,zlib)))
362 (arguments
363 `(#:phases
364 (modify-phases %standard-phases
365 (replace 'check
366 (lambda _
367 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
368 ;; on to import numpy. Somehow this works on their CI system.
369 ;; Let's just manage PYTHONPATH here instead.
370 (substitute* "runexamples.sh"
371 (("export PYTHONPATH=.*") ""))
372 (setenv "PYTHONPATH"
373 (string-append (getcwd) ":"
374 (getenv "PYTHONPATH")))
375 (invoke "./runexamples.sh")
376 (invoke "nosetests" "-v"))))))
377 (home-page "https://github.com/fhs/python-hdf4")
378 (synopsis "Python interface to the NCSA HDF4 library")
379 (description
380 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
381which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
382NetCDF files can also be read and modified. Python-HDF4 is a fork of
383@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
384 (license license:expat)))
385
386(define-public python2-hdf4
387 (package-with-python2 python-hdf4))
388
389(define-public python-h5py
390 (package
391 (name "python-h5py")
392 (version "2.8.0")
393 (source
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri "h5py" version))
397 (sha256
398 (base32
399 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
400 (build-system python-build-system)
401 (arguments
402 `(#:tests? #f ; no test target
403 #:phases
404 (modify-phases %standard-phases
405 (add-after 'unpack 'fix-hdf5-paths
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((prefix (assoc-ref inputs "hdf5")))
408 (substitute* "setup_build.py"
409 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
410 (string-append "['" prefix "/lib" "']"))
411 (("'/opt/local/include', '/usr/local/include'")
412 (string-append "'" prefix "/include" "'")))
413 (substitute* "setup_configure.py"
414 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
415 (string-append "['" prefix "/lib" "']")))
416 #t))))))
417 (propagated-inputs
418 `(("python-six" ,python-six)
419 ("python-numpy" ,python-numpy)))
420 (inputs
421 `(("hdf5" ,hdf5)))
422 (native-inputs
423 `(("python-cython" ,python-cython)
424 ("python-pkgconfig" ,python-pkgconfig)))
425 (home-page "http://www.h5py.org/")
426 (synopsis "Read and write HDF5 files from Python")
427 (description
428 "The h5py package provides both a high- and low-level interface to the
429HDF5 library from Python. The low-level interface is intended to be a
430complete wrapping of the HDF5 API, while the high-level component supports
431access to HDF5 files, datasets and groups using established Python and NumPy
432concepts.")
433 (license license:bsd-3)))
434
435(define-public python2-h5py
436 (package-with-python2 python-h5py))
437
8b89dedc
RW
438(define-public python-sh
439 (package
440 (name "python-sh")
441 (version "1.12.14")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "sh" version))
446 (sha256
447 (base32
448 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
449 (build-system python-build-system)
fd3638d8
EF
450 (arguments
451 '(#:phases
452 (modify-phases %standard-phases
453 (replace 'check
454 (lambda _
455 (invoke "python" "sh.py" "test"))))))
456 (native-inputs
457 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
458 (home-page "https://github.com/amoffat/sh")
459 (synopsis "Python subprocess replacement")
460 (description "This package provides a replacement for Python's
461@code{subprocess} feature.")
462 (license license:expat)))
463
3869effd
RW
464(define-public python2-sh
465 (package-with-python2 python-sh))
466
d362b11d
RW
467(define-public python-cftime
468 (package
469 (name "python-cftime")
470 (version "1.0.3.4")
471 (source
472 (origin
473 (method url-fetch)
474 (uri (pypi-uri "cftime" version))
475 (sha256
476 (base32
477 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
478 (build-system python-build-system)
479 (propagated-inputs
480 `(("python-numpy" ,python-numpy)))
481 (native-inputs
482 `(("python-coveralls" ,python-coveralls)
483 ("python-cython" ,python-cython)
484 ("python-pytest-cov" ,python-pytest-cov)))
485 (home-page "https://github.com/Unidata/cftime")
486 (synopsis "Library for time handling")
487 (description
488 "This package provides time-handling functionality that used to be part
489of the netcdf4 package before.")
490 ;; This package claims to include code under the GPLv3 but is released
491 ;; under ISC.
492 (license (list license:isc license:gpl3+))))
493
44d10b1f
RW
494(define-public python-netcdf4
495 (package
496 (name "python-netcdf4")
93e7b209 497 (version "1.4.2")
44d10b1f
RW
498 (source
499 (origin
500 (method url-fetch)
501 (uri (pypi-uri "netCDF4" version))
502 (sha256
503 (base32
93e7b209 504 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 505 (build-system python-build-system)
93e7b209
RW
506 (arguments
507 '(#:phases
508 (modify-phases %standard-phases
509 (add-after 'unpack 'configure-locations
510 (lambda* (#:key inputs #:allow-other-keys)
511 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
512 #t)))))
44d10b1f
RW
513 (native-inputs
514 `(("python-cython" ,python-cython)))
515 (propagated-inputs
93e7b209
RW
516 `(("python-numpy" ,python-numpy)
517 ("python-cftime" ,python-cftime)))
44d10b1f
RW
518 (inputs
519 `(("netcdf" ,netcdf)
520 ("hdf4" ,hdf4)
521 ("hdf5" ,hdf5)))
93e7b209 522 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
523 (synopsis "Python/numpy interface to the netCDF library")
524 (description "Netcdf4-python is a Python interface to the netCDF C
525library. netCDF version 4 has many features not found in earlier
526versions of the library and is implemented on top of HDF5. This module
527can read and write files in both the new netCDF 4 and the old netCDF 3
528format, and can create files that are readable by HDF5 clients. The
529API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
530to users of that module.")
531 ;; The software is mainly ISC, but includes some files covered
532 ;; by the Expat license.
533 (license (list license:isc license:expat))))
534
535(define-public python2-netcdf4
536 (package-with-python2 python-netcdf4))
537
538(define-public python-lockfile
539 (package
540 (name "python-lockfile")
541 (version "0.12.2")
542 (source
543 (origin
544 (method url-fetch)
8318bf07 545 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
546 (sha256
547 (base32
548 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
549 (build-system python-build-system)
550 (arguments '(#:test-target "check"))
551 (native-inputs
552 `(("python-pbr" ,python-pbr)))
553 (home-page "https://launchpad.net/pylockfile")
554 (synopsis "Platform-independent file locking module")
555 (description
556 "The lockfile package exports a LockFile class which provides a simple
557API for locking files.")
558 (license license:expat)))
559
560(define-public python2-lockfile
561 (package-with-python2 python-lockfile))
562
563(define-public python-semantic-version
564 (package
565 (name "python-semantic-version")
566 (version "2.6.0")
567 (source
568 (origin
569 (method url-fetch)
570 (uri (pypi-uri "semantic_version" version))
571 (sha256
572 (base32
573 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
574 (build-system python-build-system)
575 (arguments
576 `(#:tests? #f)) ; PyPI tarball lacks tests
577 (home-page "https://github.com/rbarrois/python-semanticversion")
578 (synopsis "Semantic versioning module for Python")
579 (description
580 "The @code{semantic_version} class is a small library for handling
581@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
582
583It can compare versions, generate a new version that represents a bump in one of
584the version levels, and check whether any given string is a proper semantic
585version identifier.")
586 (license license:bsd-3)))
587
588(define-public python2-semantic-version
589 (package-with-python2 python-semantic-version))
590
591(define-public python-serpent
592 (package
593 (name "python-serpent")
594 (version "1.27")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "serpent" version))
599 (sha256
600 (base32
601 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
602 (build-system python-build-system)
603 (home-page "https://github.com/irmen/Serpent")
604 (synopsis "Serializer for literal Python expressions")
605 (description
606 "Serpent provides ast.literal_eval() compatible object tree
607serialization. It serializes an object tree into bytes (utf-8 encoded string)
608that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
609as the original object tree. As such it is safe to send serpent data to other
610machines over the network for instance (because only safe literals are
611encoded).")
612 (license license:expat)))
613
614(define-public python-setuptools
615 (package
616 (name "python-setuptools")
617 (version "40.0.0")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "setuptools" version ".zip"))
622 (sha256
623 (base32
624 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
625 (modules '((guix build utils)))
626 (snippet
627 '(begin
628 ;; Remove included binaries which are used to build self-extracting
629 ;; installers for Windows.
630 ;; TODO: Find some way to build them ourself so we can include them.
631 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
632 #t))))
633 (build-system python-build-system)
634 ;; FIXME: Tests require pytest, which itself relies on setuptools.
635 ;; One could bootstrap with an internal untested setuptools.
636 (arguments
637 `(#:tests? #f))
638 (home-page "https://pypi.python.org/pypi/setuptools")
639 (synopsis
640 "Library designed to facilitate packaging Python projects")
641 (description
642 "Setuptools is a fully-featured, stable library designed to facilitate
643packaging Python projects, where packaging includes:
644Python package and module definitions,
645distribution package metadata,
646test hooks,
647project installation,
648platform-specific details,
649Python 3 support.")
650 ;; TODO: setuptools now bundles the following libraries:
651 ;; packaging, pyparsing, six and appdirs. How to unbundle?
652 (license (list license:psfl ; setuptools itself
653 license:expat ; six, appdirs, pyparsing
654 license:asl2.0 ; packaging is dual ASL2/BSD-2
655 license:bsd-2))))
656
657(define-public python2-setuptools
658 (package-with-python2 python-setuptools))
659
660(define-public python-uniseg
661 (package
662 (name "python-uniseg")
663 (version "0.7.1")
664 (source
665 (origin
666 (method url-fetch)
667 (uri (pypi-uri "uniseg" version ".zip"))
668 (sha256
669 (base32
670 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
671 (build-system python-build-system)
672 (arguments
673 '(#:tests? #f)) ; The test suite requires network access.
674 (native-inputs
675 `(("unzip" ,unzip)))
676 (home-page
677 "https://bitbucket.org/emptypage/uniseg-python")
678 (synopsis
679 "Python library to determine Unicode text segmentations")
680 (description
681 "Uniseg is a Python package used to determine Unicode text segmentations.
682Supported segmentations include:
683@enumerate
684@item @dfn{Code point} (any value in the Unicode codespace)
685@item @dfn{Grapheme cluster} (user-perceived character made of a single or
686multiple Unicode code points, e.g. \"G\" + acute-accent)
687@item Word break
688@item Sentence break
689@item Line break
690@end enumerate")
691 (license license:expat)))
692
693(define-public python2-uniseg
694 (package-with-python2 python-uniseg))
695
696(define-public python-humanfriendly
697 (package
698 (name "python-humanfriendly")
699 (version "4.4.1")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "humanfriendly" version))
704 (sha256
705 (base32
706 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
707 (build-system python-build-system)
708 (arguments
709 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
710 #:tests? #f))
711 (propagated-inputs
712 `(("python-monotonic" ,python-monotonic)))
713 (home-page "https://humanfriendly.readthedocs.io")
714 (synopsis "Human-friendly input and output in Python")
715 (description
716 "The functions and classes in @code{humanfriendly} can be used to make
717text interfaces more user-friendly. It includes tools to parse and format
718numbers, file sizes, and timespans, timers for long-running operations, menus
719to allow the user to choose from a list of options, and terminal interaction
720helpers.")
721 (license license:expat)))
722
723(define-public python2-humanfriendly
724 (package-with-python2 python-humanfriendly))
725
726(define-public python-capturer
727 (package
728 (name "python-capturer")
729 (version "2.4")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "capturer" version))
734 (sha256
735 (base32
736 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
737 (build-system python-build-system)
738 (arguments
739 `(#:tests? #f))
740 (propagated-inputs
741 `(("python-humanfriendly" ,python-humanfriendly)))
742 (home-page "https://capturer.readthedocs.io")
743 (synopsis "Capture stdout and stderr streams of the current process")
744 (description
745 "The capturer package makes it easy to capture the stdout and stderr
746streams of the current process and subprocesses. Output can be relayed
747to the terminal in real time but is also available to the Python program
748for additional processing.")
749 (license license:expat)))
750
751(define-public python2-capturer
752 (package-with-python2 python-capturer))
753
754(define-public python-case
755 (package
756 (name "python-case")
757 (version "1.5.3")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (pypi-uri "case" version))
762 (sha256
763 (base32
764 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
765 (build-system python-build-system)
766 (propagated-inputs
767 `(("python-mock" ,python-mock)
768 ("python-nose" ,python-nose)
769 ("python-six" ,python-six)
770 ("python-unittest2" ,python-unittest2)))
771 (native-inputs
772 `(("python-coverage" ,python-coverage)))
773 (home-page "https://github.com/celery/case")
774 (synopsis "Unittest utilities and convenience methods")
775 (description
776 "The @code{case} package provides utilities on top of unittest, including
777some helpful Python 2 compatibility convenience methods.")
778 (license license:bsd-3)))
779
780(define-public python-verboselogs
781 (package
782 (name "python-verboselogs")
783 (version "1.7")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "verboselogs" version))
788 (sha256
789 (base32
790 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
791 (build-system python-build-system)
792 (native-inputs
793 `(("python-mock" ,python-mock)
794 ("python-astroid" ,python-astroid)
795 ("python-pylint" ,python-pylint)))
796 (home-page "https://verboselogs.readthedocs.io")
797 (synopsis "Verbose logging level for Python's logging module")
798 (description
799 "The @code{verboselogs} package extends Python's @code{logging} module to
800add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
801 (license license:expat)))
802
803(define-public python2-verboselogs
804 (package-with-python2 python-verboselogs))
805
806(define-public python-coloredlogs
807 (package
808 (name "python-coloredlogs")
809 (version "7.3")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "coloredlogs" version))
814 (sha256
815 (base32
816 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
817 (build-system python-build-system)
818 (arguments
819 `(;Tests require some updated modules
820 #:tests? #f))
821 (propagated-inputs
822 `(("python-capturer" ,python-capturer)))
823 (home-page "https://coloredlogs.readthedocs.io")
824 (synopsis "Colored stream handler for Python's logging module")
825 (description
826 "The @code{coloredlogs} package enables colored terminal output for
827Python's logging module. The @code{ColoredFormatter} class inherits from
828@code{logging.Formatter} and uses ANSI escape sequences to render your logging
829messages in color.")
830 (license license:expat)))
831
832(define-public python2-coloredlogs
833 (package-with-python2 python-coloredlogs))
834
835(define-public python-eventlet
836 (package
837 (name "python-eventlet")
838 (version "0.20.1")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "eventlet" version))
843 (sha256
844 (base32
845 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
846 (build-system python-build-system)
847 (propagated-inputs
848 `(("python-greenlet" ,python-greenlet)))
849 (arguments
850 ;; TODO: Requires unpackaged 'enum-compat'.
851 '(#:tests? #f))
852 (home-page "http://eventlet.net")
853 (synopsis "Concurrent networking library for Python")
854 (description
855 "Eventlet is a concurrent networking library for Python that
856allows you to change how you run your code, not how you write it.
857It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
858Coroutines ensure that the developer uses a blocking style of programming
859that is similar to threading, but provide the benefits of non-blocking I/O.
860The event dispatch is implicit, which means you can easily use @code{Eventlet}
861from the Python interpreter, or as a small part of a larger application.")
862 (license license:expat)))
863
864(define-public python2-eventlet
865 (let ((base (package-with-python2
866 (strip-python2-variant python-eventlet))))
867 (package (inherit base)
868 (propagated-inputs
869 `(("python2-enum34" ,python2-enum34)
870 ,@(package-propagated-inputs base))))))
871
872(define-public python-six
873 (package
874 (name "python-six")
875 (version "1.11.0")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri "six" version))
880 (sha256
881 (base32
882 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
883 (build-system python-build-system)
884 (arguments
885 `(#:phases
886 (modify-phases %standard-phases
887 (replace 'check
888 (lambda _
889 (invoke "py.test" "-v"))))))
890 (native-inputs
891 `(("python-py" ,python-py)
892 ("python-pytest" ,python-pytest-bootstrap)))
893 (home-page "https://pypi.python.org/pypi/six/")
894 (synopsis "Python 2 and 3 compatibility utilities")
895 (description
896 "Six is a Python 2 and 3 compatibility library. It provides utility
897functions for smoothing over the differences between the Python versions with
898the goal of writing Python code that is compatible on both Python versions.
899Six supports every Python version since 2.5. It is contained in only one
900Python file, so it can be easily copied into your project.")
901 (license license:x11)))
902
903(define-public python2-six
904 (package-with-python2 python-six))
905
906(define-public python-six-bootstrap
907 (package
908 (inherit python-six)
909 (name "python-six-bootstrap")
910 (native-inputs `())
911 (arguments `(#:tests? #f))))
912
913(define-public python2-six-bootstrap
914 (package-with-python2 python-six-bootstrap))
915
916(define-public python-schedule
917 (package
918 (name "python-schedule")
919 (version "0.4.3")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (pypi-uri "schedule" version))
924 (sha256
925 (base32
926 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
927 (build-system python-build-system)
928 (native-inputs
929 `(("python-pytest" ,python-pytest)
930 ("python-mock" ,python-mock)))
931 (home-page "https://github.com/dbader/schedule")
932 (synopsis "Schedule periodic function calls in Python")
933 (description
934 "Schedule is an in-process scheduler for periodic jobs that uses the
935builder pattern for configuration. Schedule lets you run Python functions (or
936any other callable) periodically at pre-determined intervals using a simple,
937human-friendly syntax.")
938 (license license:expat)))
939
940(define-public python2-schedule
941 (package-with-python2 python-schedule))
942
943(define-public python-pandas
944 (package
945 (name "python-pandas")
946 (version "0.23.4")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (pypi-uri "pandas" version))
951 (sha256
952 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
953 (build-system python-build-system)
954 (arguments
955 `(#:modules ((guix build utils)
956 (guix build python-build-system)
957 (ice-9 ftw)
958 (srfi srfi-26))
959 #:phases (modify-phases %standard-phases
960 (replace 'check
961 (lambda _
962 (let ((build-directory
963 (string-append
964 (getcwd) "/build/"
965 (car (scandir "build"
966 (cut string-prefix? "lib." <>))))))
967 ;; Disable the "strict data files" option which causes
968 ;; the build to error out if required data files are not
969 ;; available (as is the case with PyPI archives).
970 (substitute* "setup.cfg"
971 (("addopts = --strict-data-files") "addopts = "))
972 (with-directory-excursion build-directory
973 ;; Delete tests that require "moto" which is not yet in Guix.
974 (for-each delete-file
975 '("pandas/tests/io/conftest.py"
976 "pandas/tests/io/json/test_compression.py"
977 "pandas/tests/io/parser/test_network.py"
978 "pandas/tests/io/test_excel.py"
979 "pandas/tests/io/test_parquet.py"))
980 (invoke "pytest" "-vv" "pandas" "--skip-slow"
981 "--skip-network" "-k"
982 ;; XXX: Due to the deleted tests above.
983 "not test_read_s3_jsonl"))))))))
984 (propagated-inputs
985 `(("python-numpy" ,python-numpy)
986 ("python-pytz" ,python-pytz)
987 ("python-dateutil" ,python-dateutil)))
988 (native-inputs
989 `(("python-cython" ,python-cython)
990 ("python-beautifulsoup4" ,python-beautifulsoup4)
991 ("python-lxml" ,python-lxml)
992 ("python-html5lib" ,python-html5lib)
993 ("python-nose" ,python-nose)
994 ("python-pytest" ,python-pytest)))
995 (home-page "https://pandas.pydata.org")
996 (synopsis "Data structures for data analysis, time series, and statistics")
997 (description
998 "Pandas is a Python package providing fast, flexible, and expressive data
999structures designed to make working with structured (tabular,
1000multidimensional, potentially heterogeneous) and time series data both easy
1001and intuitive. It aims to be the fundamental high-level building block for
1002doing practical, real world data analysis in Python.")
1003 (license license:bsd-3)))
1004
1005(define-public python2-pandas
1006 (package-with-python2 python-pandas))
1007
1008(define-public python2-mechanize
1009 (package
1010 (name "python2-mechanize")
1011 (version "0.2.5")
1012 (source
1013 (origin
1014 (method url-fetch)
1cc184e6 1015 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1016 (sha256
1017 (base32
1018 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1019 (build-system python-build-system)
1020 (arguments
1021 `(#:python ,python-2 ; apparently incompatible with Python 3
1022 #:tests? #f))
1023 ;; test fails with message
1024 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1025 ;; (python-3.3.2) or
1026 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1027 ;; (python-2.7.5).
1028 ;; The source code is from March 2011 and probably not up-to-date
1029 ;; with respect to python unit tests.
1030 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1031 (synopsis
1032 "Stateful programmatic web browsing in Python")
1033 (description
1034 "Mechanize implements stateful programmatic web browsing in Python,
1035after Andy Lester’s Perl module WWW::Mechanize.")
1036 (license (license:non-copyleft
1037 "file://COPYING"
1038 "See COPYING in the distribution."))))
1039
1040
1041(define-public python-simplejson
1042 (package
1043 (name "python-simplejson")
1044 (version "3.14.0")
1045 (source
1046 (origin
1047 (method url-fetch)
1048 (uri (pypi-uri "simplejson" version))
1049 (sha256
1050 (base32
1051 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1052 (build-system python-build-system)
1053 (home-page "http://simplejson.readthedocs.org/en/latest/")
1054 (synopsis
1055 "Json library for Python")
1056 (description
1057 "JSON (JavaScript Object Notation) is a subset of JavaScript
1058syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1059format.
1060
1061Simplejson exposes an API familiar to users of the standard library marshal
1062and pickle modules. It is the externally maintained version of the json
1063library contained in Python 2.6, but maintains compatibility with Python 2.5
1064and (currently) has significant performance advantages, even without using
1065the optional C extension for speedups. Simplejson is also supported on
1066Python 3.3+.")
1067 (license license:x11)))
1068
1069(define-public python2-simplejson
1070 (package-with-python2 python-simplejson))
1071
1072
1073(define-public python-pyicu
1074 (package
1075 (name "python-pyicu")
1076 (version "2.2")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "PyICU" version))
1081 (sha256
1082 (base32
1083 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("icu4c" ,icu4c)))
1087 (native-inputs
1088 `(("python-pytest" ,python-pytest)
1089 ("python-six" ,python-six)))
1090 (home-page "https://github.com/ovalhub/pyicu")
1091 (synopsis "Python extension wrapping the ICU C++ API")
1092 (description
1093 "PyICU is a python extension wrapping the ICU C++ API.")
1094 (properties `((python2-variant . ,(delay python2-pyicu))))
1095 (license license:x11)))
1096
1097(define-public python2-pyicu
1098 (let ((base (package-with-python2
1099 (strip-python2-variant python-pyicu))))
1100 (package
1101 (inherit base)
1102 (arguments
1103 `(,@(package-arguments base)
1104 #:phases
1105 (modify-phases %standard-phases
1106 (add-before 'check 'delete-failing-test
1107 (λ _
1108 ;; XXX: This fails due to Unicode issues unique to Python 2,
1109 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1110 (delete-file "test/test_Script.py")
1111 #t))))))))
1112
1113(define-public python2-dogtail
1114 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1115 ;; spaces in indentation" with Python 3.
1116 (package
1117 (name "python2-dogtail")
1118 (version "0.9.9")
1119 (source (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "dogtail" version))
1122 (sha256
1123 (base32
1124 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1125 (build-system python-build-system)
1126 (arguments `(#:python ,python-2
1127 #:tests? #f)) ; invalid command "test"
1128 ;; Currently no offical homepage.
1129 (home-page "https://pypi.python.org/pypi/dogtail/")
1130 (synopsis "GUI test tool and automation framework written in Python")
1131 (description
1132 "Dogtail is a GUI test tool and automation framework written in Python.
1133It uses Accessibility (a11y) technologies to communicate with desktop
1134applications. dogtail scripts are written in Python and executed like any
1135other Python program.")
1136 (license license:gpl2+)))
1137
1138(define-public python-empy
1139 (package
1140 (name "python-empy")
0f6d5115 1141 (version "3.3.3")
44d10b1f
RW
1142 (source (origin
1143 (method url-fetch)
1144 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1145 version ".tar.gz"))
1146 (sha256
1147 (base32
0f6d5115 1148 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1149 (build-system python-build-system)
1150 (arguments
0f6d5115 1151 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1152 (home-page "http://www.alcyone.com/software/empy/")
1153 (synopsis "Templating system for Python")
1154 (description
1155 "EmPy is a system for embedding Python expressions and statements in
1156template text; it takes an EmPy source file, processes it, and produces
1157output. This is accomplished via expansions, which are special signals to the
1158EmPy system and are set off by a special prefix (by default the at sign, @@).
1159EmPy can expand arbitrary Python expressions and statements in this way, as
1160well as a variety of special forms. Textual data not explicitly delimited in
1161this way is sent unaffected to the output, allowing Python to be used in
1162effect as a markup language. Also supported are callbacks via hooks,
1163recording and playback via diversions, and dynamic, chainable filters. The
1164system is highly configurable via command line options and embedded
1165commands.")
1166 (license license:lgpl2.1+)))
1167
1168(define-public python2-empy
0f064242
TGR
1169 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1170 (package
1171 (inherit base)
1172 (arguments `(,@(package-arguments base)
1173 #:tests? #t)))))
44d10b1f
RW
1174
1175(define-public python2-element-tree
1176 (package
1177 (name "python2-element-tree")
1178 (version "1.2.6")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (string-append
1182 "http://effbot.org/media/downloads/elementtree-"
1183 version "-20050316.tar.gz"))
1184 (sha256
1185 (base32
1186 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1187 (build-system python-build-system)
1188 (arguments
1189 `(#:python ,python-2 ; seems to be part of Python 3
1190 #:tests? #f)) ; no 'test' sub-command
1191 (synopsis "Toolkit for XML processing in Python")
1192 (description
1193 "ElementTree is a Python library supporting lightweight XML processing.")
1194 (home-page "http://effbot.org/zone/element-index.htm")
1195 (license (license:x11-style
1196 "http://docs.python.org/2/license.html"
1197 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1198
1199(define-public python2-pybugz
1200 (package
1201 (name "python2-pybugz")
1202 (version "0.6.11")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append
1206 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1207 version ".tar.gz"))
1208 (sha256
1209 (base32
1210 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1211 (patches (search-patches "pybugz-stty.patch"
1212 "pybugz-encode-error.patch"))))
1213 (build-system python-build-system)
1214 (arguments
1215 `(#:python ,python-2 ; SyntaxError with Python 3
1216 #:tests? #f)) ; no 'test' sub-command
1217 (propagated-inputs
1218 `(("element-tree" ,python2-element-tree)))
1219 (synopsis "Python and command-line interface to Bugzilla")
1220 (description
1221 "PyBugz is a Python library and command-line tool to query the Bugzilla
1222bug tracking system. It is meant as an aid to speed up interaction with the
1223bug tracker.")
1224 (home-page "http://www.liquidx.net/pybugz/")
1225 (license license:gpl2)))
1226
1227(define-public python2-enum
1228 (package
1229 (name "python2-enum")
1230 (version "0.4.6")
1231 (source (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "enum" version))
1234 (sha256
1235 (base32
1236 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1237 (build-system python-build-system)
1238 (arguments
1239 `(#:python ,python-2))
1240 (home-page "http://pypi.python.org/pypi/enum/")
1241 (synopsis "Robust enumerated type support in Python")
1242 (description
1243 "This provides a module for robust enumerations in Python. It has
1244been superseded by the Python standard library and is provided only for
1245compatibility.")
1246 ;; Choice of either license.
1247 (license (list license:gpl3+ license:psfl))))
1248
1249(define-public python-enum34
1250 (package
1251 (name "python-enum34")
1252 (version "1.1.6")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (pypi-uri "enum34" version))
1257 (sha256
1258 (base32
1259 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1260 (build-system python-build-system)
1261 (home-page "https://pypi.python.org/pypi/enum34")
1262 (synopsis "Backported Python 3.4 Enum")
1263 (description
1264 "Enum34 is the new Python stdlib enum module available in Python 3.4
1265backported for previous versions of Python from 2.4 to 3.3.")
1266 (license license:bsd-3)))
1267
1268(define-public python2-enum34
1269 (package-with-python2 python-enum34))
1270
1271(define-public python-parse-type
1272 (package
1273 (name "python-parse-type")
1274 (version "0.4.2")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "parse_type" version))
1279 (sha256
1280 (base32
1281 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1282 (build-system python-build-system)
1283 (propagated-inputs
1284 `(("python-six" ,python-six)
1285 ("python-parse" ,python-parse)))
1286 (native-inputs
1287 `(("python-pytest" ,python-pytest)
1288 ("python-pytest-runner" ,python-pytest-runner)))
1289 (home-page "https://github.com/jenisys/parse_type")
1290 (synopsis "Extended parse module")
1291 (description
1292 "Parse_type extends the python parse module.")
1293 (properties
1294 `((python2-variant . ,(delay python2-parse-type))))
1295 (license license:bsd-3)))
1296
1297(define-public python2-parse-type
1298 (let ((base (package-with-python2
1299 (strip-python2-variant python-parse-type))))
1300 (package (inherit base)
1301 (propagated-inputs
1302 `(("python2-enum34" ,python2-enum34)
1303 ,@(package-propagated-inputs base))))))
1304
1305(define-public python-parse
1306 (package
1307 (name "python-parse")
1308 (version "1.8.4")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "parse" version))
1313 (sha256
1314 (base32
1315 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1316 (build-system python-build-system)
1317 (arguments
1318 `(#:phases
1319 (modify-phases %standard-phases
1320 (replace 'check
1321 (lambda _ (invoke "python" "test_parse.py"))))))
1322 (home-page "https://github.com/r1chardj0n3s/parse")
1323 (synopsis "Parse strings")
1324 (description
1325 "Parse strings using a specification based on the Python @code{format()}
1326syntax.")
1327 (license license:x11)))
1328
1329(define-public python-polib
1330 (package
1331 (name "python-polib")
1332 (version "1.0.8")
1333 (source (origin
1334 (method url-fetch)
1335 (uri (pypi-uri "polib" version))
1336 (sha256
1337 (base32
1338 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1339 (build-system python-build-system)
1340 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1341 (synopsis "Manipulate, create and modify gettext files")
1342 (description "Polib can manipulate any gettext format (po, pot and mo)
1343files. It can be used to create po files from scratch or to modify
1344existing ones.")
1345 (license license:expat)))
1346
1347(define-public python2-polib
1348 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1349 (package
1350 (inherit base)
1351 (arguments `(,@(package-arguments base)
1352 ;; Tests don't work with python2.
1353 #:tests? #f)))))
1354
1355(define-public scons
1356 (package
1357 (name "scons")
05487ed8 1358 (version "3.0.4")
44d10b1f 1359 (source (origin
ad34338d
RW
1360 (method git-fetch)
1361 (uri (git-reference
1362 (url "https://github.com/SCons/scons.git")
1363 (commit version)))
1364 (file-name (git-file-name name version))
44d10b1f
RW
1365 (sha256
1366 (base32
05487ed8 1367 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1371 #:tests? #f ; no 'python setup.py test' command
1372 #:phases
1373 (modify-phases %standard-phases
1374 (add-before 'build 'bootstrap
1375 (lambda _
1376 (substitute* "src/engine/SCons/compat/__init__.py"
1377 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1378 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1379 (substitute* "src/engine/SCons/Platform/__init__.py"
1380 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1381 "mod = __import__(full_name)"))
ad34338d
RW
1382 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1383 (chdir "build/scons")
1384 #t)))))
44d10b1f
RW
1385 (home-page "http://scons.org/")
1386 (synopsis "Software construction tool written in Python")
1387 (description
1388 "SCons is a software construction tool. Think of SCons as an improved,
1389cross-platform substitute for the classic Make utility with integrated
1390functionality similar to autoconf/automake and compiler caches such as ccache.
1391In short, SCons is an easier, more reliable and faster way to build
1392software.")
1393 (license license:x11)))
1394
1395(define-public scons-python2
1396 (package
1397 (inherit (package-with-python2 scons))
1398 (name "scons-python2")))
1399
1400(define-public python-extras
1401 (package
1402 (name "python-extras")
1403 (version "1.0.0")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "extras" version))
1408 (sha256
1409 (base32
1410 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1411 (build-system python-build-system)
1412 (arguments
1413 ;; FIXME: Circular dependency on testtools.
1414 '(#:tests? #f))
1415 (home-page "https://github.com/testing-cabal/extras")
1416 (synopsis "Useful extensions to the Python standard library")
1417 (description
1418 "Extras is a set of extensions to the Python standard library.")
1419 (license license:expat)))
1420
1421(define-public python2-extras
1422 (package-with-python2 python-extras))
1423
1424(define-public python-mimeparse
1425 (package
1426 (name "python-mimeparse")
1427 (version "1.6.0")
1428 (source
1429 (origin
1430 (method url-fetch)
89bf667c 1431 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1432 (sha256
1433 (base32
1434 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1435 (build-system python-build-system)
1436 (arguments
1437 '(#:phases
1438 (modify-phases %standard-phases
1439 (replace 'check
1440 (lambda _
1441 (invoke "./mimeparse_test.py"))))))
1442 (home-page
1443 "https://github.com/dbtsai/python-mimeparse")
1444 (synopsis "Python library for parsing MIME types")
1445 (description
1446 "Mimeparse provides basic functions for parsing MIME type names and
1447matching them against a list of media-ranges.")
1448 (license license:expat)))
1449
1450(define-public python2-mimeparse
1451 (package-with-python2 python-mimeparse))
1452
1453(define-public python-miniboa
1454 (package
1455 (name "python-miniboa")
1456 (version "1.0.7")
1457 (source
1458 (origin
1459 (method url-fetch)
1460 (uri (pypi-uri "miniboa" version))
1461 (sha256
1462 (base32
1463 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1464 (build-system python-build-system)
1465 (home-page "https://github.com/shmup/miniboa")
1466 (synopsis "Simple, single-threaded Telnet server")
1467 (description
1468 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1469server.")
1470 (license license:asl2.0)))
1471
1472(define-public python2-miniboa
1473 (package-with-python2 python-miniboa))
1474
1475(define-public python-pafy
1476 (package
1477 (name "python-pafy")
1478 (version "0.5.3.1")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "pafy" version))
1483 (sha256
1484 (base32
1485 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1486 (build-system python-build-system)
1487 (arguments
1488 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1489 (propagated-inputs
1490 ;; Youtube-dl is a python package which is imported in the file
1491 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1492 `(("youtube-dl" ,youtube-dl)))
1493 (home-page "https://np1.github.io/pafy/")
1494 (synopsis "Retrieve YouTube content and metadata")
1495 (description
1496 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1497 (license license:lgpl3+)))
1498
1499(define-public python2-funcsigs
1500 (package
1501 (name "python2-funcsigs")
1502 (version "1.0.2")
1503 (source (origin
1504 (method url-fetch)
1505 (uri (pypi-uri "funcsigs" version))
1506 (sha256
1507 (base32
1508 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1509 (build-system python-build-system)
1510 (arguments
1511 `(#:python ,python-2))
1512 (native-inputs
1513 `(("python2-unittest2" ,python2-unittest2)))
1514 (home-page "http://funcsigs.readthedocs.org")
1515 (synopsis "Python function signatures from PEP362")
1516 (description
1517 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1518 (license license:asl2.0)))
1519
1520(define-public python2-funcsigs-bootstrap
1521 (package
1522 (inherit python2-funcsigs)
1523 (name "python2-funcsigs-bootstrap")
1524 (native-inputs `())
1525 (arguments
1526 `(#:tests? #f
1527 ,@(package-arguments python2-funcsigs)))))
1528
1529(define-public python-py
1530 (package
1531 (name "python-py")
1532 (version "1.5.4")
1533 (source
1534 (origin
1535 (method url-fetch)
1536 (uri (pypi-uri "py" version))
1537 (sha256
1538 (base32
1539 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1540 (build-system python-build-system)
1541 (arguments
1542 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1543 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1544 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1545 ;; Is this module globally installed?"
1546 '(#:tests? #f))
1547 (native-inputs
1548 `(("python-setuptools-scm" ,python-setuptools-scm)))
1549 (home-page "https://github.com/pytest-dev/py")
1550 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1551 (description
1552 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1553code introspection, and logging.")
1554 (license license:expat)))
1555
1556(define-public python2-py
1557 (package-with-python2 python-py))
1558
1559;; Recent versions of python-fixtures and python-testrepository need
1560;; python-pbr for packaging, which itself needs these two packages for
1561;; testing.
1562;; To fix this circular dependency, we use a build of python-pbr, based on the
1563;; same source, just without any test dependencies and with tests disabled.
1564;; python-pbr-minmal is then used to package python-fixtures and
1565;; python-testrepository.
1566;; Strictly speaking we currently could remove the test-requirements from the
1567;; normal python-pbr package (and save this package) since test are disabled
1568;; there anyway. But this may change in future.
1569(define-public python-pbr-minimal
1570 (package
1571 (name "python-pbr-minimal")
1572 (version "3.0.1")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "pbr" version))
1577 (sha256
1578 (base32
1579 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1580 (build-system python-build-system)
1581 (arguments
1582 `(#:tests? #f))
1583 (home-page "http://docs.openstack.org/developer/pbr/")
1584 (synopsis "Minimal build of python-pbr used for bootstrapping")
1585 (description
1586 "Used only for bootstrapping python2-pbr, you should not need this.")
1587 (license license:asl2.0)))
1588
1589(define-public python2-pbr-minimal
1590 (package-with-python2 python-pbr-minimal))
1591
1592(define-public python-pbr
1593 (package
1594 (inherit python-pbr-minimal)
1595 (name "python-pbr")
1596 (arguments
1597 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1598 (propagated-inputs
1599 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1600 (native-inputs
1601 `(("python-fixtures" ,python-fixtures-bootstrap)
1602 ;; discover, coverage, hacking, subunit
1603 ("python-mock" ,python-mock)
1604 ("python-six" ,python-six)
1605 ("python-sphinx" ,python-sphinx)
1606 ("python-testrepository" ,python-testrepository-bootstrap)
1607 ("python-testresources" ,python-testresources-bootstrap)
1608 ("python-testscenarios" ,python-testscenarios-bootstrap)
1609 ("python-testtools" ,python-testtools-bootstrap)
1610 ("python-virtualenv" ,python-virtualenv)))
1611 (synopsis "Enhance the default behavior of Python’s setuptools")
1612 (description
1613 "Python Build Reasonableness (PBR) is a library that injects some useful
1614and sensible default behaviors into your setuptools run. It will set
1615versions, process requirements files and generate AUTHORS and ChangeLog file
1616from git information.
1617")))
1618
1619(define-public python2-pbr
1620 (package-with-python2 python-pbr))
1621
1622(define-public python-exif-read
1623 (package
1624 (name "python-exif-read")
1625 (version "2.1.2")
1626 (source (origin
1627 (method url-fetch)
1628 (uri (pypi-uri "ExifRead" version))
1629 (sha256
1630 (base32
1631 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1632 (build-system python-build-system)
1633 (arguments `(#:tests? #f)) ; no tests
1634 (home-page "https://github.com/ianare/exif-py")
1635 (synopsis "Python library to extract EXIF data from image files")
1636 (description
1637 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1638files.")
1639 (license license:bsd-3)))
1640
1641(define-public python2-exif-read
1642 (package-with-python2 python-exif-read))
1643
1644(define-public python-pyld
1645 (package
1646 (name "python-pyld")
1647 (version "1.0.3")
1648 (source (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "PyLD" version))
1651 (sha256
1652 (base32
1653 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1654 (build-system python-build-system)
1655 (home-page "https://github.com/digitalbazaar/pyld")
1656 (synopsis "Python implementation of the JSON-LD specification")
1657 (description
1658 "PyLD is an implementation of the JSON-LD specification.")
1659 (license license:bsd-3)))
1660
1661(define-public python2-pyld
1662 (package-with-python2 python-pyld))
1663
1664(define-public python-click
1665 (package
1666 (name "python-click")
61984855 1667 (version "7.0")
44d10b1f
RW
1668 (source
1669 (origin
1670 (method url-fetch)
1671 (uri (pypi-uri "click" version))
1672 (sha256
1673 (base32
61984855 1674 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1675 (build-system python-build-system)
1676 (arguments
8d7e7ca6 1677 `(#:phases
44d10b1f
RW
1678 (modify-phases %standard-phases
1679 (add-after 'unpack 'fix-paths
1680 (lambda* (#:key inputs #:allow-other-keys)
1681 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1682 "cross-libc" "libc"))))
1683 (substitute* "click/_unicodefun.py"
1684 (("'locale'")
1685 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1686 #t))
1687 (replace 'check
1688 (lambda _
1689 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1690 (native-inputs
1691 `(("python-pytest" ,python-pytest)))
61984855 1692 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1693 (synopsis "Command line library for Python")
1694 (description
1695 "Click is a Python package for creating command line interfaces in a
1696composable way with as little code as necessary. Its name stands for
1697\"Command Line Interface Creation Kit\". It's highly configurable but comes
1698with sensible defaults out of the box.")
1699 (license license:bsd-3)))
1700
1701(define-public python2-click
1702 (package-with-python2 python-click))
1703
1704(define-public python-wheel
1705 (package
1706 (name "python-wheel")
746c074b 1707 (version "0.32.3")
44d10b1f
RW
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (pypi-uri "wheel" version))
1712 (sha256
1713 (base32
746c074b 1714 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1715 (build-system python-build-system)
1716 (native-inputs
1717 `(("python-jsonschema" ,python-jsonschema)
1718 ("python-pytest-cov" ,python-pytest-cov)))
1719 (home-page "https://bitbucket.org/pypa/wheel/")
1720 (synopsis "Format for built Python packages")
1721 (description
1722 "A wheel is a ZIP-format archive with a specially formatted filename and
1723the @code{.whl} extension. It is designed to contain all the files for a PEP
1724376 compatible install in a way that is very close to the on-disk format. Many
1725packages will be properly installed with only the @code{Unpack} step and the
1726unpacked archive preserves enough information to @code{Spread} (copy data and
1727scripts to their final locations) at any later time. Wheel files can be
1728installed with a newer @code{pip} or with wheel's own command line utility.")
1729 (license license:expat)
1730 (properties `((python2-variant . ,(delay python2-wheel))))))
1731
1732(define-public python2-wheel
1733 (let ((wheel (package-with-python2
1734 (strip-python2-variant python-wheel))))
1735 (package (inherit wheel)
1736 (native-inputs `(("python2-functools32" ,python2-functools32)
1737 ,@(package-native-inputs wheel))))))
1738
1739(define-public python-vcversioner
1740 (package
1741 (name "python-vcversioner")
1742 (version "2.16.0.0")
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (pypi-uri "vcversioner" version))
1747 (sha256
1748 (base32
1749 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1750 (build-system python-build-system)
1751 (synopsis "Python library for version number discovery")
1752 (description "Vcversioner is a Python library that inspects tagging
1753information in a variety of version control systems in order to discover
1754version numbers.")
1755 (home-page "https://github.com/habnabit/vcversioner")
1756 (license license:isc)))
1757
1758(define-public python2-vcversioner
1759 (package-with-python2 python-vcversioner))
1760
1761(define-public python-jsonschema
1762 (package
1763 (name "python-jsonschema")
1764 (version "2.6.0")
1765 (source (origin
1766 (method url-fetch)
786ccb87 1767 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1768 (sha256
1769 (base32
1770 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1771 (build-system python-build-system)
1772 (arguments
1773 '(#:phases
1774 (modify-phases %standard-phases
8d466799 1775 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1776 (native-inputs
1777 `(("python-nose" ,python-nose)
1778 ("python-vcversioner" ,python-vcversioner)))
1779 (home-page "https://github.com/Julian/jsonschema")
1780 (synopsis "Implementation of JSON Schema for Python")
1781 (description
1782 "Jsonschema is an implementation of JSON Schema for Python.")
1783 (license license:expat)
1784 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1785
1786(define-public python2-jsonschema
1787 (let ((jsonschema (package-with-python2
1788 (strip-python2-variant python-jsonschema))))
1789 (package (inherit jsonschema)
1790 (native-inputs
1791 `(("python2-mock" ,python2-mock)
1792 ,@(package-native-inputs jsonschema)))
1793 (propagated-inputs
1794 `(("python2-functools32" ,python2-functools32))))))
1795
1796(define-public python-schema
1797 (package
1798 (name "python-schema")
1799 (version "0.6.6")
1800 (source
1801 (origin
1802 (method url-fetch)
1803 (uri (pypi-uri "schema" version))
1804 (sha256
1805 (base32
1806 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1807 (build-system python-build-system)
1808 (native-inputs
1809 `(("python-pytest" ,python-pytest)))
1810 (home-page "https://github.com/keleshev/schema")
1811 (synopsis "Simple data validation library")
1812 (description
1813 "@code{python-schema} is a library for validating Python data
1814structures, such as those obtained from config-files, forms, external
1815services or command-line parsing, converted from JSON/YAML (or
1816something else) to Python data-types.")
1817 (license license:psfl)))
1818
1819(define-public python2-schema
1820 (package-with-python2 python-schema))
1821
1822(define-public python-schema-0.5
1823 (package (inherit python-schema)
1824 (version "0.5.0")
1825 (source
1826 (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "schema" version))
1829 (sha256
1830 (base32
1831 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1832
1833(define-public python2-schema-0.5
1834 (package-with-python2 python-schema-0.5))
1835
1836(define-public python-kitchen
1837 (package
1838 (name "python-kitchen")
1839 (version "1.2.5")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (pypi-uri "kitchen" version))
1844 (sha256
1845 (base32
1846 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1847 (build-system python-build-system)
1848 (propagated-inputs
1849 `(("python-chardet" ,python-chardet)))
1850 (home-page "https://github.com/fedora-infra/kitchen")
1851 (synopsis "Python API for snippets")
1852 (description "@code{kitchen} module provides a python API for all sorts of
1853little useful snippets of code that everybody ends up writing for their projects
1854but never seem big enough to build an independent release. Use kitchen and stop
1855cutting and pasting that code over and over.")
1856 (license (list license:lgpl2.1+
1857 ;; subprocess.py, test_subprocess.py,
1858 ;; kitchen/pycompat25/defaultdict.py:
1859 license:psfl))))
1860
1861(define-public python2-kitchen
1862 (package-with-python2 python-kitchen))
1863
1864(define-public python-unidecode
1865 (package
1866 (name "python-unidecode")
1867 (version "1.0.23")
1868 (source (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "Unidecode" version))
1871 (sha256
1872 (base32
1873 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1874 (build-system python-build-system)
1875 (home-page "https://pypi.python.org/pypi/Unidecode")
1876 (synopsis "ASCII transliterations of Unicode text")
1877 (description
1878 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1879useful when integrating with legacy code that doesn't support Unicode, or for
1880ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1881machine identifiers from human-readable Unicode strings that should still be
1882somewhat intelligible.")
1883 (license license:gpl2+)))
1884
1885(define-public python2-unidecode
1886 (package-with-python2 python-unidecode))
1887
1888(define-public python-pyjwt
1889 (package
1890 (name "python-pyjwt")
1891 (version "1.5.3")
1892 (source
1893 (origin
1894 (method url-fetch)
1895 (uri (pypi-uri "PyJWT" version))
1896 (sha256
1897 (base32
1898 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1899 (modules '((guix build utils)))
1900 (snippet
1901 '(begin
1902 (for-each delete-file-recursively
1903 (find-files "." "\\.pyc$"))
1904 #t))))
1905 (build-system python-build-system)
1906 (native-inputs
1907 `(("python-pytest" ,python-pytest)
1908 ("python-pytest-cov" ,python-pytest-cov)
1909 ("python-pytest-runner" ,python-pytest-runner)))
1910 (home-page "https://github.com/progrium/pyjwt")
1911 (synopsis "JSON Web Token implementation in Python")
1912 (description
1913 "PyJWT is a JSON Web Token implementation written in Python.")
1914 (license license:expat)))
1915
1916(define-public python2-pyjwt
1917 (package-with-python2 python-pyjwt))
1918
1919(define-public python-pykka
1920 (package
1921 (name "python-pykka")
1922 (version "1.2.1")
1923 (source
1924 (origin
1925 (method url-fetch)
1926 (uri (pypi-uri "Pykka" version))
1927 (sha256
1928 (base32
1929 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1930 (build-system python-build-system)
1931 (native-inputs
1932 `(("python-mock" ,python-mock)
1933 ("python-nose" ,python-nose)
1934 ("python-gevent" ,python-gevent)
1935 ("python-eventlet" ,python-eventlet)))
1936 (home-page "https://www.pykka.org/")
1937 (synopsis "Pykka is a Python implementation of the actor model")
1938 (description
1939 "Pykka is a Python implementation of the actor model.
1940The actor model introduces some simple rules to control the sharing
1941of state and cooperation between execution units, which makes it
1942easier to build concurrent applications.")
1943 (license license:asl2.0)))
1944
1945(define-public python2-pykka
1946 (package-with-python2 python-pykka))
1947
8d22f7e3
VC
1948(define-public python-pymsgbox
1949 (package
1950 (name "python-pymsgbox")
1951 (version "1.0.6")
1952 (source
1953 (origin
1954 (method git-fetch)
1955 (uri (git-reference
1956 ;; LICENSE.txt is not present on pypi
1957 (url "https://github.com/asweigart/PyMsgBox")
1958 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
1959 (file-name (git-file-name name version))
1960 (sha256
1961 (base32
1962 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
1963 (arguments
1964 ;; Circular dependency to run tests:
1965 ;; Tests need pyautogui, which depends on pymsgbox.
1966 '(#:tests? #f))
1967 (build-system python-build-system)
1968 (home-page "https://github.com/asweigart/PyMsgBox")
1969 (synopsis "Python module for JavaScript-like message boxes")
1970 (description
1971 "PyMsgBox is a simple, cross-platform, pure Python module for
1972JavaScript-like message boxes. Types of dialog boxes include:
1973@enumerate
1974@item alert
1975@item confirm
1976@item prompt
1977@item password
1978@end enumerate
1979")
1980 (license license:bsd-3)))
1981
44d10b1f
RW
1982(define-public python-pympler
1983 (package
1984 (name "python-pympler")
1985 (home-page "https://pythonhosted.org/Pympler/")
1986 (version "0.5")
1987 (source (origin
1988 (method url-fetch)
1989 (uri (pypi-uri "Pympler" version))
1990 (sha256
1991 (base32
1992 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1993 (build-system python-build-system)
1994 (arguments
1995 `(#:phases (modify-phases %standard-phases
1996 (delete 'check)
1997 (add-after 'install 'check
1998 (lambda* (#:key inputs outputs #:allow-other-keys)
1999 (add-installed-pythonpath inputs outputs)
2000 (invoke "python" "setup.py" "test"))))))
2001 (synopsis "Measure, monitor and analyze memory behavior")
2002 (description
2003 "Pympler is a development tool to measure, monitor and analyze
2004the memory behavior of Python objects in a running Python application.
2005
2006By pympling a Python application, detailed insight in the size and the
2007lifetime of Python objects can be obtained. Undesirable or unexpected
2008runtime behavior like memory bloat and other @samp{pymples} can easily
2009be identified.
2010
2011A web profiling frontend exposes process statistics, garbage
2012visualisation and class tracker statistics.")
2013 (license license:asl2.0)))
2014
2015(define-public python2-pympler
2016 (package-with-python2 python-pympler))
2017
2018(define-public python-itsdangerous
2019 (package
2020 (name "python-itsdangerous")
acfcf2ed 2021 (version "1.1.0")
44d10b1f
RW
2022 (source
2023 (origin
2024 (method url-fetch)
acfcf2ed 2025 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2026 (sha256
2027 (base32
acfcf2ed 2028 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2029 (build-system python-build-system)
acfcf2ed 2030 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2031 (synopsis "Python library for passing data to/from untrusted environments")
2032 (description
2033 "Itsdangerous provides various helpers to pass trusted data to untrusted
2034environments and back.")
2035 (license license:bsd-3)))
2036
2037(define-public python2-itsdangerous
2038 (package-with-python2 python-itsdangerous))
2039
2040(define-public python-pyyaml
2041 (package
2042 (name "python-pyyaml")
2043 (version "3.13")
2044 (source
2045 (origin
2046 (method url-fetch)
2047 (uri (pypi-uri "PyYAML" version))
2048 (sha256
2049 (base32
2050 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2051 (build-system python-build-system)
2052 (inputs
2053 `(("libyaml" ,libyaml)))
2054 (home-page "http://pyyaml.org/wiki/PyYAML")
2055 (synopsis "YAML parser and emitter for Python")
2056 (description
2057 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2058complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2059API, and sensible error messages. PyYAML supports standard YAML tags and
2060provides Python-specific tags that allow to represent an arbitrary Python
2061object.")
2062 (license license:expat)))
2063
2064(define-public python2-pyyaml
2065 (package-with-python2 python-pyyaml))
2066
2067(define-public python-vine
2068 (package
2069 (name "python-vine")
2070 (version "1.1.4")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (pypi-uri "vine" version))
2075 (sha256
2076 (base32
2077 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2078 (build-system python-build-system)
2079 (native-inputs
2080 `(("python-pytest" ,python-pytest)
2081 ("python-case" ,python-case)))
2082 (home-page "https://github.com/celery/vine")
2083 (synopsis "Promises for Python")
2084 (description
2085 "@code{vine} provides a special implementation of promises in that it can
2086be used both for \"promise of a value\" and lazy evaluation. The biggest
2087upside for this is that everything in a promise can also be a promise,
2088e.g. filters, callbacks and errbacks can all be promises.")
2089 (license license:bsd-3)))
2090
2091(define-public python-virtualenv
2092 (package
2093 (name "python-virtualenv")
2782bd51 2094 (version "16.1.0")
44d10b1f
RW
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (pypi-uri "virtualenv" version))
2099 (sha256
2100 (base32
2782bd51 2101 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2102 (build-system python-build-system)
2103 (arguments
2104 `(#:phases
2105 (modify-phases %standard-phases
2782bd51 2106 (add-before 'check 'disable-failing-test
44d10b1f
RW
2107 (lambda _
2108 ;; Disable failing test. See upstream bug report
2109 ;; https://github.com/pypa/virtualenv/issues/957
2110 (substitute* "tests/test_virtualenv.py"
2111 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2112 #t)))))
44d10b1f
RW
2113 (native-inputs
2114 `(("python-mock" ,python-mock)
2115 ("python-pytest" ,python-pytest)))
2116 (home-page "https://virtualenv.pypa.io/")
2117 (synopsis "Virtual Python environment builder")
2118 (description
2119 "Virtualenv is a tool to create isolated Python environments.")
2120 (license license:expat)))
2121
2122(define-public python2-virtualenv
2123 (package-with-python2 python-virtualenv))
2124
2125(define-public python-markupsafe
2126 (package
2127 (name "python-markupsafe")
2128 (version "1.0")
2129 (source
2130 (origin
2131 (method url-fetch)
5182927c 2132 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2133 (sha256
2134 (base32
2135 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2136 (build-system python-build-system)
2137 (home-page "https://github.com/mitsuhiko/markupsafe")
2138 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2139 (description
2140 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2141for Python.")
2142 (license license:bsd-3)))
2143
2144(define-public python2-markupsafe
2145 (package-with-python2 python-markupsafe))
2146
2147(define-public python-jinja2
2148 (package
2149 (name "python-jinja2")
2150 (version "2.10")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (pypi-uri "Jinja2" version))
2155 (sha256
2156 (base32
2157 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2158 (build-system python-build-system)
2159 (propagated-inputs
2160 `(("python-markupsafe" ,python-markupsafe)))
2161 (home-page "http://jinja.pocoo.org/")
2162 (synopsis "Python template engine")
2163 (description
2164 "Jinja2 is a small but fast and easy to use stand-alone template engine
2165written in pure Python.")
2166 (license license:bsd-3)))
2167
2168(define-public python2-jinja2
2169 (package-with-python2 python-jinja2))
2170
2171(define-public python-pystache
2172 (package
2173 (name "python-pystache")
2174 (version "0.5.4")
2175 (source (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "pystache" version))
2178 (sha256
2179 (base32
2180 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2181 (build-system python-build-system)
2182 (arguments
2183 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2184 (home-page "http://defunkt.io/pystache/")
2185 (synopsis "Python logic-less template engine")
2186 (description
2187 "Pystache is a Python implementation of the framework agnostic,
2188logic-free templating system Mustache.")
2189 (license license:expat)
2190 (properties `((python2-variant . ,(delay python2-pystache))))))
2191
2192(define-public python2-pystache
2193 (package (inherit (package-with-python2
2194 (strip-python2-variant python-pystache)))
2195 (arguments
2196 `(#:python ,python-2
2197 #:phases
2198 (modify-phases %standard-phases
2199 (replace 'check
2200 (lambda _
dfafc29b 2201 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2202
2203(define-public python-joblib
2204 (package
2205 (name "python-joblib")
2206 (version "0.13.0")
2207 (source (origin
2208 (method url-fetch)
2209 (uri (pypi-uri "joblib" version))
2210 (sha256
2211 (base32
2212 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2213 (build-system python-build-system)
2214 (arguments
2215 `(#:phases
2216 (modify-phases %standard-phases
2217 (replace 'check
2218 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2219 (native-inputs
2220 `(("python-pytest" ,python-pytest)))
2221 (home-page "https://joblib.readthedocs.io/")
2222 (synopsis "Using Python functions as pipeline jobs")
2223 (description
2224 "Joblib is a set of tools to provide lightweight pipelining in Python.
2225In particular, joblib offers: transparent disk-caching of the output values
2226and lazy re-evaluation (memoize pattern), easy simple parallel computing
2227logging and tracing of the execution.")
2228 (license license:bsd-3)))
2229
2230(define-public python2-joblib
2231 (package-with-python2 python-joblib))
2232
a3363341
VC
2233(define-public python-daemon
2234 (package
2235 (name "python-daemon")
2236 (version "2.2.3")
2237 (source
2238 (origin
2239 (method url-fetch)
2240 (uri (pypi-uri "python-daemon" version))
2241 (sha256
2242 (base32
2243 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2244 (build-system python-build-system)
2245 (arguments
2246 `(#:phases
2247 (modify-phases %standard-phases
2248 (add-before 'check 'disable-tests
2249 (lambda _
2250 ;; FIXME: Determine why test fails
2251 (substitute* "test/test_daemon.py"
2252 (("test_detaches_process_context")
2253 "skip_test_detaches_process_context"))
2254 #t)))))
2255 (propagated-inputs
2256 `(("python-lockfile" ,python-lockfile)))
2257 (native-inputs
2258 `(("python-unittest2" ,python-unittest2)
2259 ("python-testtools" ,python-testtools)
2260 ("python-testscenarios" ,python-testscenarios)
2261 ("python-mock" ,python-mock)
2262 ("python-docutils" ,python-docutils)))
2263 (home-page "https://pagure.io/python-daemon/")
2264 (synopsis "Python library for making a Unix daemon process")
2265 (description "Python-daemon is a library that assists a Python program to
2266turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2267
2268This library provides a @code{DaemonContext} class that manages the following
2269important tasks for becoming a daemon process:
2270@enumerate
2271@item Detach the process into its own process group.
2272@item Set process environment appropriate for running inside a chroot.
2273@item Renounce suid and sgid privileges.
2274@item Close all open file descriptors.
2275@item Change the working directory, uid, gid, and umask.
2276@item Set appropriate signal handlers.
2277@item Open new file descriptors for stdin, stdout, and stderr.
2278@item Manage a specified PID lock file.
2279@item Register cleanup functions for at-exit processing.
2280@end enumerate")
2281 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2282 (license (list license:asl2.0 license:gpl3+))))
2283
44d10b1f
RW
2284(define-public python-docutils
2285 (package
2286 (name "python-docutils")
2287 (version "0.14")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "docutils" version))
2292 (sha256
2293 (base32
2294 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2295 (build-system python-build-system)
2296 (arguments
2297 '(#:tests? #f)) ; no setup.py test command
2298 (home-page "http://docutils.sourceforge.net/")
2299 (synopsis "Python Documentation Utilities")
2300 (description
2301 "Docutils is a modular system for processing documentation into useful
2302formats, such as HTML, XML, and LaTeX. For input Docutils supports
2303reStructuredText.")
2304 ;; Most of the source code is public domain, but some source files are
2305 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2306 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2307
2308(define-public python2-docutils
2309 (package-with-python2 python-docutils))
2310
2311(define-public python-pygments
2312 (package
2313 (name "python-pygments")
2314 (version "2.2.0")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "Pygments" version))
2319 (sha256
2320 (base32
2321 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2322 (build-system python-build-system)
2323 (arguments
2324 ;; FIXME: Tests require sphinx, which depends on this.
2325 '(#:tests? #f))
2326 (home-page "http://pygments.org/")
2327 (synopsis "Syntax highlighting")
2328 (description
2329 "Pygments is a syntax highlighting package written in Python.")
2330 (license license:bsd-2)))
2331
2332(define-public python2-pygments
2333 (package-with-python2 python-pygments))
2334
2335(define-public python-sphinxcontrib-websupport
2336 (package
2337 (name "python-sphinxcontrib-websupport")
2338 (version "1.1.0")
2339 (source (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "sphinxcontrib-websupport" version))
2342 (sha256
2343 (base32
2344 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2345 (build-system python-build-system)
2346 (arguments
2347 ;; FIXME: Tests depend on Sphinx, which depends on this.
2348 `(#:tests? #f))
2349 (home-page "http://sphinx-doc.org/")
2350 (synopsis "Sphinx API for web applications")
2351 (description "This package provides a Python API to easily integrate
2352Sphinx documentation into your web application. It provides tools to
2353integrate Sphinx documents in web templates and to handle searches.")
2354 (license license:bsd-3)))
2355
2356(define-public python2-sphinxcontrib-websupport
2357 (package-with-python2 python-sphinxcontrib-websupport))
2358
2359(define-public python-sphinx
2360 (package
2361 (name "python-sphinx")
2362 (version "1.7.7")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "Sphinx" version))
2367 (sha256
2368 (base32
2369 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2370 (build-system python-build-system)
2371 (arguments
2372 `(#:phases
2373 (modify-phases %standard-phases
2374 (replace 'check
2375 (lambda _
2376 ;; Requires Internet access.
2377 (delete-file "tests/test_build_linkcheck.py")
2378 (substitute* "tests/test_build_latex.py"
2379 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2380 "@pytest.mark.skip()"))
2381 (when (which "python")
2382 ;; XXX: These tests are broken when using Python2:
2383 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2384 (delete-file "tests/test_api_translator.py")
2385 (delete-file "tests/test_setup_command.py"))
2386 (invoke "make" "test"))))))
2387 (propagated-inputs
2388 `(("python-imagesize" ,python-imagesize)
2389 ("python-sphinx-alabaster-theme"
2390 ,python-sphinx-alabaster-theme)
2391 ("python-babel" ,python-babel)
2392 ("python-snowballstemmer" ,python-snowballstemmer)
2393 ("python-docutils" ,python-docutils)
2394 ("python-jinja2" ,python-jinja2)
2395 ("python-packaging" ,python-packaging)
2396 ("python-pygments" ,python-pygments)
2397 ("python-requests" ,python-requests)
2398 ("python-six" ,python-six)
2399 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2400 (native-inputs
2401 `(("graphviz" ,graphviz)
2402 ("imagemagick" ,imagemagick) ;for "convert"
2403 ("python-html5lib" ,python-html5lib)
2404 ("python-mock" ,python-mock)
2405 ("python-nose" ,python-nose)
2406 ("python-pytest" ,python-pytest)))
2407 (home-page "http://sphinx-doc.org/")
2408 (synopsis "Python documentation generator")
2409 (description "Sphinx is a tool that makes it easy to create documentation
2410for Python projects or other documents consisting of multiple reStructuredText
2411sources.")
2412 (license license:bsd-3)
2413 (properties `((python2-variant . ,(delay python2-sphinx))))))
2414
2415(define-public python2-sphinx
2416 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2417 (package
2418 (inherit base)
2419 (native-inputs `(("python2-mock" ,python2-mock)
2420 ("python2-enum34" ,python2-enum34)
2421 ,@(package-native-inputs base)))
2422 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2423 ("python2-typing" ,python2-typing)
2424 ,@(package-propagated-inputs base))))))
2425
2426(define-public python-sphinx-gallery
2427 (package
2428 (name "python-sphinx-gallery")
2429 (version "0.1.13")
2430 (source (origin
2431 (method url-fetch)
2432 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2433 "/archive/v" version ".tar.gz"))
2434 (file-name (string-append name "-" version ".tar.gz"))
2435 (sha256
2436 (base32
2437 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2438 (build-system python-build-system)
2439 (arguments
2440 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2441 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2442 ;; <https://matplotlib.org/objects.inv>.
2443 `(#:tests? #f))
2444 (native-inputs
2445 `(("python-pytest-runner" ,python-pytest-runner)))
2446 (home-page "https://sphinx-gallery.github.io/")
2447 (synopsis "Generate an examples gallery automatically")
2448 (description
2449 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2450from any set of Python scripts and puts it into an examples gallery.")
2451 (license license:bsd-3)))
2452
2453(define-public python2-sphinx-gallery
2454 (package-with-python2 python-sphinx-gallery))
2455
2456(define-public python-sphinx-rtd-theme
2457 (package
2458 (name "python-sphinx-rtd-theme")
2459 (version "0.2.4")
2460 (source
2461 (origin
2462 (method url-fetch)
2463 (uri (pypi-uri "sphinx_rtd_theme" version))
2464 (sha256
2465 (base32
2466 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2467 (build-system python-build-system)
2468 (arguments '(#:tests? #f)) ; No tests.
2469 (propagated-inputs
2470 `(("python-sphinx" ,python-sphinx)))
2471 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2472 (synopsis "ReadTheDocs.org theme for Sphinx")
2473 (description "A theme for Sphinx used by ReadTheDocs.org.")
2474 (license license:expat)))
2475
2476(define-public python2-sphinx-rtd-theme
2477 (package-with-python2 python-sphinx-rtd-theme))
2478
2479(define-public python-guzzle-sphinx-theme
2480 (package
2481 (name "python-guzzle-sphinx-theme")
2482 (version "0.7.11")
2483 (source
2484 (origin
2485 (method url-fetch)
2486 (uri (pypi-uri "guzzle_sphinx_theme" version))
2487 (sha256
2488 (base32
2489 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2490 (build-system python-build-system)
2491 (propagated-inputs
2492 `(("python-sphinx" ,python-sphinx)))
2493 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2494 (synopsis "Sphinx theme used by Guzzle")
2495 (description "This package provides guzzle_sphinx_theme, a theme for the
2496Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2497and several other projects.")
2498 (license license:expat)))
2499
2500(define-public python2-guzzle-sphinx-theme
2501 (package-with-python2 python-guzzle-sphinx-theme))
2502
2503(define-public python-rst.linker
2504 (package
2505 (name "python-rst.linker")
2506 (version "1.10")
2507 (source
2508 (origin
2509 (method url-fetch)
2510 (uri (pypi-uri "rst.linker" version))
2511 (sha256
2512 (base32
2513 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2514 (build-system python-build-system)
2515 (propagated-inputs
2516 `(("python-dateutil" ,python-dateutil)
2517 ("python-six" ,python-six)))
2518 (native-inputs
2519 `(("python-setuptools-scm" ,python-setuptools-scm)))
2520 ;; Test would require path.py, which would introduce a cyclic dependence.
2521 (arguments `(#:tests? #f))
2522 ;; Note: As of version 1.7 the documentation is not worth building.
2523 (home-page "https://github.com/jaraco/rst.linker")
2524 (synopsis "Sphinx plugin to add links and timestamps")
2525 (description "rst.linker allows to automatically replace text by a
2526reStructuredText external reference or timestamps. It's primary purpose is to
2527augment the changelog, but it can be used for other documents, too.")
2528 (license license:expat)))
2529
2530(define-public python2-rst.linker
2531 (package-with-python2 python-rst.linker))
2532
2533(define-public python-feedgenerator
2534 (package
2535 (name "python-feedgenerator")
2536 (version "1.9")
2537 (source
2538 (origin
2539 (method url-fetch)
2540 (uri (pypi-uri "feedgenerator" version))
2541 (sha256
2542 (base32
2543 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2544 (modules '((guix build utils)))
2545 (snippet
2546 '(begin
2547 ;; Remove pre-compiled .pyc files from source.
2548 (for-each delete-file-recursively
2549 (find-files "." "__pycache__" #:directories? #t))
2550 (for-each delete-file (find-files "." "\\.pyc$"))
2551 #t))))
2552 (build-system python-build-system)
2553 (propagated-inputs
2554 `(("python-pytz" ,python-pytz)
2555 ("python-six" ,python-six)))
2556 (home-page "https://github.com/getpelican/feedgenerator")
2557 (synopsis
2558 "Standalone version of Django's Atom/RSS feed generator")
2559 (description
2560 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2561which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2562 (license license:bsd-3)))
2563
2564(define-public python2-feedgenerator
2565 (package-with-python2 python-feedgenerator))
2566
2567(define-public python-toml
2568 (package
2569 (name "python-toml")
2570 (version "0.9.4")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "toml" version))
2575 (sha256
2576 (base32
2577 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2578 (build-system python-build-system)
2579 (arguments
2580 `(#:tests? #f)) ;no tests suite in release
2581 (home-page "https://github.com/uiri/toml")
2582 (synopsis "Library for TOML")
2583 (description
2584 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2585Language (TOML) configuration files.")
2586 (license license:expat)))
2587
346c8752
BG
2588(define-public python-jsonrpc-server
2589 (package
2590 (name "python-jsonrpc-server")
2591 (version "0.1.2")
2592 (source
2593 (origin
2594 (method url-fetch)
2595 (uri (pypi-uri "python-jsonrpc-server" version))
2596 (sha256
2597 (base32
2598 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
2599 (build-system python-build-system)
2600 (propagated-inputs
2601 `(("python-future" ,python-future)
2602 ("python-mock" ,python-mock)
2603 ("python-pytest" ,python-pytest)))
2604 (home-page
2605 "https://github.com/palantir/python-jsonrpc-server")
2606 (synopsis "JSON RPC 2.0 server library")
2607 (description
2608 "This packages provides a JSON RPC 2.0 server library for Python.")
2609 (license license:expat)))
2610
56f4ad47
BG
2611(define-public python-pydocstyle
2612 (package
2613 (name "python-pydocstyle")
2614 (version "3.0.0")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "pydocstyle" version))
2619 (sha256
2620 (base32
2621 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
2622 (build-system python-build-system)
2623 (propagated-inputs
2624 `(("python-six" ,python-six)
2625 ("python-snowballstemmer" ,python-snowballstemmer)))
2626 (home-page
2627 "https://github.com/PyCQA/pydocstyle/")
2628 (synopsis "Python docstring style checker")
2629 (description
2630 "This package provides a style checker for the Python Language
2631Server (PLS).")
2632 (license license:expat)))
2633
be4d840c
BG
2634(define-public python-language-server
2635 (package
2636 (name "python-language-server")
9c7226df 2637 (version "0.24.0")
be4d840c
BG
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "python-language-server" version))
2642 (sha256
2643 (base32
9c7226df 2644 "05zmv6jr7qbgnkz0lqh5pr7kr4lm12i8ljm2k5h5kz3q9m8d4mm0"))))
be4d840c
BG
2645 (build-system python-build-system)
2646 (propagated-inputs
2647 `(("python-pluggy" ,python-pluggy)
2648 ("python-jsonrpc-server" ,python-jsonrpc-server)
2649 ("python-jedi" ,python-jedi)
2650 ("python-yapf" ,python-yapf)
2651 ("python-pyflakes" ,python-pyflakes)
2652 ("python-pydocstyle" ,python-pydocstyle)
2653 ("python-pycodestyle" ,python-pycodestyle)
2654 ("python-mccabe" ,python-mccabe)
2655 ("python-rope" ,python-rope)
2656 ("python-autopep8" ,python-autopep8)))
2657 (home-page "https://github.com/palantir/python-language-server")
2658 (synopsis "Python implementation of the Language Server Protocol")
2659 (description
2660 "The Python Language Server (pyls) is an implementation of the Python 3
2661language specification for the Language Server Protocol (LSP). This tool is
2662used in text editing environments to provide a complete and integrated
2663feature-set for programming Python effectively.")
2664 (license license:expat)))
2665
44d10b1f
RW
2666(define-public python-black
2667 (package
2668 (name "python-black")
2669 (version "18.6b4")
2670 (source
2671 (origin
2672 (method url-fetch)
2673 (uri (pypi-uri "black" version))
2674 (sha256
2675 (base32
2676 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2677 (build-system python-build-system)
2678 (arguments
2679 `(#:phases
2680 (modify-phases %standard-phases
2681 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2682 (lambda _
2683 (let ((python3 (which "python3")))
2684 (substitute* '("tests/data/fmtonoff.py"
2685 "tests/data/string_prefixes.py"
2686 "tests/data/function.py")
2687 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2688 (string-append "#!" python3 (if (string? minor-version)
2689 minor-version
2690 ""))))))))))
2691 (propagated-inputs
2692 `(("python-click" ,python-click)
2693 ("python-attrs" ,python-attrs)
2694 ("python-appdirs" ,python-appdirs)
2695 ("python-toml" ,python-toml)))
2696 (home-page "https://github.com/ambv/black")
2697 (synopsis "The uncompromising code formatter")
2698 (description "Black is the uncompromising Python code formatter.")
2699 (license license:expat)))
2700
2701(define-public python-blinker
2702 (package
2703 (name "python-blinker")
2704 (version "1.4")
2705 (source
2706 (origin
2707 (method url-fetch)
2708 (uri (pypi-uri "blinker" version))
2709 (sha256
2710 (base32
2711 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2712 (build-system python-build-system)
2713 (home-page "http://pythonhosted.org/blinker/")
2714 (synopsis "Fast, simple object-to-object and broadcast signaling")
2715 (description
2716 "Blinker provides a fast dispatching system that allows any number of
2717interested parties to subscribe to events, or \"signals\".")
2718 (license license:expat)))
2719
2720(define-public python2-blinker
2721 (package-with-python2 python-blinker))
2722
2723(define-public pelican
2724 (package
2725 (name "pelican")
aa71b690 2726 (version "4.0.1")
44d10b1f
RW
2727 (source
2728 (origin
2729 (method url-fetch)
2730 (uri (pypi-uri "pelican" version))
2731 (sha256
2732 (base32
aa71b690 2733 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
2734 (build-system python-build-system)
2735 (propagated-inputs
2736 `(("python-feedgenerator" ,python-feedgenerator)
2737 ("python-jinja2" ,python-jinja2)
2738 ("python-pygments" ,python-pygments)
2739 ("python-docutils" ,python-docutils)
2740 ("python-pytz" ,python-pytz)
2741 ("python-blinker" ,python-blinker)
2742 ("python-unidecode" ,python-unidecode)
2743 ("python-six" ,python-six)
2744 ("python-dateutil" ,python-dateutil)
2745 ("python-markdown" ,python-markdown)))
2746 (home-page "https://getpelican.com/")
2747 (arguments
2748 `(;; XXX Requires a lot more packages to do unit tests :P
2749 #:tests? #f
2750 #:phases (modify-phases %standard-phases
2751 (add-before
2752 'install 'adjust-requires
2753 ;; Since feedgenerator is installed from git, it doesn't
2754 ;; conform to the version requirements.
2755 ;;
2756 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2757 ;; version requirement so setuptools doesn't get confused.
2758 (lambda _
2759 (substitute* "setup.py"
2760 (("['\"]feedgenerator.*?['\"]")
2761 "'feedgenerator'")))))))
2762 (synopsis "Python-based static site publishing system")
2763 (description
2764 "Pelican is a tool to generate a static blog from reStructuredText,
2765Markdown input files, and more. Pelican uses Jinja2 for templating
2766and is very extensible.")
2767 (license license:agpl3+)))
2768
2769(define-public python-scikit-image
2770 (package
2771 (name "python-scikit-image")
9ff04084 2772 (version "0.14.2")
44d10b1f
RW
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (pypi-uri "scikit-image" version))
2777 (sha256
9ff04084 2778 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
2779 (build-system python-build-system)
2780 (arguments
2781 ;; TODO: Some tests require running X11 server. Disable them?
2782 '(#:tests? #f))
2783 ;; See DEPENDS.txt for the list of build and run time requiremnts
2784 (propagated-inputs
2785 `(("python-cloudpickle" ,python-cloudpickle)
2786 ("python-dask" ,python-dask)
2787 ("python-matplotlib" ,python-matplotlib)
2788 ("python-networkx" ,python-networkx)
2789 ("python-numpy" ,python-numpy)
2790 ("python-pillow" ,python-pillow)
2791 ("python-pywavelets" ,python-pywavelets)
2792 ("python-scipy" ,python-scipy)
2793 ("python-six" ,python-six)))
2794 (native-inputs
2795 `(("python-cython" ,python-cython)))
2796 (home-page "http://scikit-image.org/")
2797 (synopsis "Image processing in Python")
2798 (description
2799 "Scikit-image is a collection of algorithms for image processing.")
2800 (license license:bsd-3)))
2801
2802(define-public python2-scikit-image
2803 (package-with-python2 python-scikit-image))
2804
2805(define-public python-cython
2806 (package
2807 (name "python-cython")
fa8ffaa0 2808 (version "0.29.5")
44d10b1f
RW
2809 (source
2810 (origin
2811 (method url-fetch)
2812 (uri (pypi-uri "Cython" version))
2813 (sha256
2814 (base32
fa8ffaa0 2815 "1wfb68g115gmf3mv23w0hh972b0ll85gpb92ci28x6h997br0llx"))))
44d10b1f
RW
2816 (build-system python-build-system)
2817 ;; we need the full python package and not just the python-wrapper
2818 ;; because we need libpython3.3m.so
2819 (inputs
2820 `(("python" ,python)))
2821 (arguments
2822 `(#:phases
2823 (modify-phases %standard-phases
2824 (add-before 'check 'set-HOME
2825 ;; some tests require access to "$HOME/.cython"
2826 (lambda _ (setenv "HOME" "/tmp") #t))
2827
2828 ;; FIXME: These tests started failing on armhf after the 0.28 update
2829 ;; (commit c69d11c5930), both with an error such as this:
2830 ;; compiling (cpp) and running dictcomp ...
2831 ;; === C/C++ compiler error output: ===
2832 ;; ‘
2833 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2834 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2835 ,@(if (target-arm32?)
2836 `((add-before 'check 'disable-failing-tests
2837 (lambda _
2838 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2839 (for-each (lambda (test)
2840 (format disabled-tests "~a\n" test))
2841 '("memslice" "dictcomp"))
2842 (close-port disabled-tests)))))
2843 '())
2844
2845 (replace 'check
2846 (lambda _
2847 ;; The "with_outer_raising" test fails with Python 3.7. See
2848 ;; https://github.com/cython/cython/issues/2454
2849 (delete-file "tests/run/generators_py.py")
2850 (invoke "python" "runtests.py" "-vv"))))))
2851 (home-page "http://cython.org/")
2852 (synopsis "C extensions for Python")
2853 (description "Cython is an optimising static compiler for both the Python
2854programming language and the extended Cython programming language. It makes
2855writing C extensions for Python as easy as Python itself.")
2856 (license license:asl2.0)
2857 (properties `((python2-variant . ,(delay python2-cython))))))
2858
2859(define-public python2-cython
2860 (package (inherit (package-with-python2
2861 (strip-python2-variant python-cython)))
2862 (name "python2-cython")
2863 (inputs
2864 `(("python-2" ,python-2))))) ; this is not automatically changed
2865
2866;; The RPython toolchain currently does not support Python 3.
2867(define-public python2-rpython
2868 (package
2869 (name "python2-rpython")
2870 (version "0.2.1")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "rpython" version))
2875 (sha256
2876 (base32
2877 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2878 (build-system python-build-system)
2879 (arguments `(#:python ,python-2))
2880 (native-inputs
2881 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2882 (home-page "https://rpython.readthedocs.org")
2883 (synopsis "Framework for implementing interpreters and virtual machines")
2884 (description "RPython is a translation and support framework for
2885producing implementations of dynamic languages, emphasizing a clean separation
2886between language specification and implementation aspects.")
2887 (license license:expat)))
2888
2889;; NOTE: when upgrading numpy please make sure that python-pandas and
2890;; python-scipy still build, as these three packages are often used together.
2891(define-public python-numpy
2892 (package
2893 (name "python-numpy")
2894 (version "1.15.4")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (string-append
2899 "https://github.com/numpy/numpy/releases/download/v"
2900 version "/numpy-" version ".tar.gz"))
2901 (sha256
2902 (base32
2903 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2904 (build-system python-build-system)
2905 (inputs
2906 `(("openblas" ,openblas)
2907 ("lapack" ,lapack)))
2908 (native-inputs
2909 `(("python-cython" ,python-cython)
2910 ("python-pytest" ,python-pytest)
2911 ("gfortran" ,gfortran)))
2912 (arguments
2913 `(#:phases
2914 (modify-phases %standard-phases
2915 (add-before 'build 'configure-blas-lapack
2916 (lambda* (#:key inputs #:allow-other-keys)
2917 (call-with-output-file "site.cfg"
2918 (lambda (port)
2919 (format port
2920 "[openblas]
2921libraries = openblas
2922library_dirs = ~a/lib
2923include_dirs = ~a/include
2924
2925# backslash-n to make emacs happy
2926\n[lapack]
2927lapack_libs = lapack
2928library_dirs = ~a/lib
2929include_dirs = ~a/include
2930"
2931 (assoc-ref inputs "openblas")
2932 (assoc-ref inputs "openblas")
2933 (assoc-ref inputs "lapack")
2934 (assoc-ref inputs "lapack"))))
2935 #t))
2936 (add-before 'build 'fix-executable-paths
2937 (lambda* (#:key inputs #:allow-other-keys)
2938 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2939 ;; instead of /bin/sh.
2940 (substitute* "numpy/distutils/exec_command.py"
2941 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2942 (string-append match-start (assoc-ref inputs "bash") match-end)))
2943 ;; Use "gcc" executable, not "cc".
2944 (substitute* "numpy/distutils/system_info.py"
2945 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2946 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2947 #t))
2948 ;; Tests can only be run after the library has been installed and not
2949 ;; within the source directory.
2950 (delete 'check)
2951 (add-after 'install 'check
2952 (lambda* (#:key outputs inputs #:allow-other-keys)
2953 ;; Make installed package available for running the tests
2954 (add-installed-pythonpath inputs outputs)
2955 ;; Make sure "f2py" etc is found.
2956 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2957 ":" (getenv "PATH")))
2958 (with-directory-excursion "/tmp"
2959 (invoke "python" "-c"
2960 "import numpy; numpy.test(verbose=2)")))))))
2961 (home-page "http://www.numpy.org/")
2962 (synopsis "Fundamental package for scientific computing with Python")
2963 (description "NumPy is the fundamental package for scientific computing
2964with Python. It contains among other things: a powerful N-dimensional array
2965object, sophisticated (broadcasting) functions, tools for integrating C/C++
2966and Fortran code, useful linear algebra, Fourier transform, and random number
2967capabilities.")
2968 (license license:bsd-3)))
2969
2970(define-public python2-numpy
2971 (package-with-python2 python-numpy))
2972
2973;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2974;; interest only for legacy code going back to NumPy's predecessor
2975;; Numeric.
2976(define-public python2-numpy-1.8
2977 (package (inherit python2-numpy)
2978 (version "1.8.2")
2979 (source
2980 (origin
2981 (method url-fetch)
2982 (uri (string-append
2983 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2984 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2985 (sha256
2986 (base32
2987 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2988 (arguments
2989 (substitute-keyword-arguments (package-arguments python2-numpy)
2990 ((#:phases phases)
2991 `(modify-phases ,phases
2992 (replace 'configure-blas-lapack
2993 (lambda* (#:key inputs #:allow-other-keys)
2994 (call-with-output-file "site.cfg"
2995 (lambda (port)
2996 (format port
2997 "[openblas]
2998libraries = openblas,lapack
2999library_dirs = ~a/lib:~a/lib
3000include_dirs = ~a/include:~a/include
3001"
3002 (assoc-ref inputs "openblas")
3003 (assoc-ref inputs "lapack")
3004 (assoc-ref inputs "openblas")
3005 (assoc-ref inputs "lapack"))))
3006 #t))))))
3007 (native-inputs
3008 `(("python2-nose" ,python2-nose)))
3009 (description "NumPy is the fundamental package for scientific computing
3010with Python. It contains among other things: a powerful N-dimensional array
3011object, sophisticated (broadcasting) functions, tools for integrating C/C++
3012and Fortran code, useful linear algebra, Fourier transform, and random number
3013capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3014that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3015Numeric.")
3016 (license license:bsd-3)))
3017
3018(define-public python-munch
3019 (package
3020 (name "python-munch")
3021 (version "2.0.4")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (pypi-uri "munch" version))
3026 (sha256
3027 (base32
3028 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3029 (build-system python-build-system)
3030 (home-page "https://github.com/Infinidat/munch")
3031 (synopsis "Dot-accessible dictionary")
3032 (description "Munch is a dot-accessible dictionary similar to JavaScript
3033objects.")
3034 (license license:expat)))
3035
3036(define-public python2-munch
3037 (package-with-python2 python-munch))
3038
3039(define-public python-colormath
3040 (package
3041 (name "python-colormath")
3042 (version "3.0.0")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "colormath" version))
3047 (sha256
3048 (base32
3049 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3050 (build-system python-build-system)
3051 (propagated-inputs
3052 `(("python-networkx" ,python-networkx)
3053 ("python-numpy" ,python-numpy)))
3054 (home-page "https://github.com/gtaylor/python-colormath")
3055 (synopsis "Color math and conversion library")
3056 (description
3057 "This is a Python library for color math and conversions.")
3058 (license license:bsd-3)))
3059
3060(define-public python2-colormath
3061 (package-with-python2 python-colormath))
3062
3063(define-public python-spectra
3064 (package
3065 (name "python-spectra")
3066 (version "0.0.11")
3067 (source
3068 (origin
3069 (method url-fetch)
3070 (uri (pypi-uri "spectra" version))
3071 (sha256
3072 (base32
3073 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3074 (build-system python-build-system)
3075 (arguments
3076 `(#:phases
3077 (modify-phases %standard-phases
3078 (replace 'check
38ec0f6a 3079 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3080 (propagated-inputs
3081 `(("python-colormath" ,python-colormath)))
3082 (native-inputs
3083 `(("python-nose" ,python-nose)))
3084 (home-page "https://github.com/jsvine/spectra")
3085 (synopsis "Color scales and color conversion")
3086 (description
3087 "This package provides a Python library intended to make color math,
3088color scales, and color space conversion easy. It has support for:
3089
3090@enumerate
3091@item Color scales
3092@item Color ranges
3093@item Color blending
3094@item Brightening/darkening colors
3095@item Saturating/desaturating colors
3096@item Conversion to/from multiple color spaces.
3097@end enumerate\n")
3098 (license license:expat)))
3099
3100(define-public python2-spectra
3101 (package-with-python2 python-spectra))
3102
3103(define-public python-numpy-documentation
3104 (package
3105 (name "python-numpy-documentation")
3106 (version (package-version python-numpy))
3107 (source (package-source python-numpy))
3108 (build-system python-build-system)
3109 (native-inputs
3110 `(("python-matplotlib" ,python-matplotlib)
3111 ("python-numpy" ,python-numpy)
3112 ("pkg-config" ,pkg-config)
3113 ("python-sphinx" ,python-sphinx)
3114 ("python-numpydoc" ,python-numpydoc)
3115 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3116 texlive-fonts-cm-super
3117 texlive-fonts-ec
3118 texlive-generic-ifxetex
3119 texlive-generic-pdftex
3120 texlive-latex-amsfonts
3121 texlive-latex-capt-of
3122 texlive-latex-cmap
3123 texlive-latex-environ
3124 texlive-latex-eqparbox
3125 texlive-latex-etoolbox
3126 texlive-latex-expdlist
3127 texlive-latex-fancyhdr
3128 texlive-latex-fancyvrb
3129 texlive-latex-fncychap
3130 texlive-latex-float
3131 texlive-latex-framed
3132 texlive-latex-geometry
3133 texlive-latex-graphics
3134 texlive-latex-hyperref
3135 texlive-latex-mdwtools
3136 texlive-latex-multirow
3137 texlive-latex-needspace
3138 texlive-latex-oberdiek
3139 texlive-latex-parskip
3140 texlive-latex-preview
3141 texlive-latex-tabulary
3142 texlive-latex-threeparttable
3143 texlive-latex-titlesec
3144 texlive-latex-trimspaces
3145 texlive-latex-ucs
3146 texlive-latex-upquote
3147 texlive-latex-url
3148 texlive-latex-varwidth
3149 texlive-latex-wrapfig)))
3150 ("texinfo" ,texinfo)
3151 ("perl" ,perl)
3152 ("scipy-sphinx-theme"
3153 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3154 (method git-fetch)
3155 (uri (git-reference
3156 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3157 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3158 (sha256
3159 (base32
3160 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3161 ,@(package-native-inputs python-numpy)))
3162 (arguments
3163 `(#:tests? #f ; we're only generating the documentation
3164 #:phases
3165 (modify-phases %standard-phases
3166 (delete 'build)
3167 (replace 'install
3168 (lambda* (#:key inputs outputs #:allow-other-keys)
3169 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3170 (doc (string-append
3171 data "/doc/" ,name "-"
3172 ,(package-version python-numpy)))
3173 (info-reader (string-append data "/info"))
3174 (html (string-append doc "/html"))
3175 (scipy-sphinx-theme "scipy-sphinx-theme")
3176 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3177 (pyver ,(string-append "PYVER=")))
3178
3179 ;; FIXME: this is needed to for texlive-union to generate
3180 ;; fonts, which are not found.
3181 (setenv "HOME" "/tmp")
3182
3183 (with-directory-excursion "doc"
3184 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3185 (mkdir-p html)
4fc898da
RW
3186 (invoke "make" "html" pyver)
3187 (invoke "make" "latex" "PAPER=a4" pyver)
3188 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3189 "all-pdf" "PAPER=a4" pyver)
3190 ;; FIXME: Generation of the info file fails.
4fc898da 3191 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3192 ;; (mkdir-p info)
3193 ;; (copy-file "build/texinfo/numpy.info"
3194 ;; (string-append info "/numpy.info"))
3195 (for-each (lambda (file)
3196 (copy-file (string-append "build/latex" file)
3197 (string-append doc file)))
3198 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3199 (with-directory-excursion "build/html"
3200 (for-each (lambda (file)
3201 (let* ((dir (dirname file))
3202 (tgt-dir (string-append html "/" dir)))
3203 (unless (equal? "." dir)
3204 (mkdir-p tgt-dir))
3205 (install-file file html)))
3206 (find-files "." ".*")))))
3207 #t)))))
3208 (home-page (package-home-page python-numpy))
3209 (synopsis "Documentation for the python-numpy package")
3210 (description (package-description python-numpy))
3211 (license (package-license python-numpy))))
3212
3213(define-public python2-numpy-documentation
3214 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3215 (package
3216 (inherit numpy-documentation)
3217 (native-inputs `(("python2-functools32" ,python2-functools32)
3218 ,@(package-native-inputs numpy-documentation))))))
3219
3220(define-public python-pygit2
3221 (package
3222 (name "python-pygit2")
3223 (version "0.27.3")
3224 (source
3225 (origin
3226 (method url-fetch)
3227 (uri (pypi-uri "pygit2" version))
3228 (sha256
3229 (base32
3230 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3231 (build-system python-build-system)
3232 (arguments
3233 '(#:phases
3234 (modify-phases %standard-phases
3235 ;; Remove after the next update. See:
3236 ;; https://github.com/libgit2/pygit2/pull/851
3237 (add-after 'unpack 'compile-with-cffi
3238 (lambda _
3239 (substitute* "setup.py"
3240 (("install_requires")
3241 "setup_requires=['cffi'],\n install_requires"))
3242 #t))
3243 (add-after 'unpack 'fix-dependency-versioning
3244 (lambda _
3245 (substitute* "setup.py"
3246 (("<") "<="))
3247 #t)))))
3248 (propagated-inputs
3249 `(("python-six" ,python-six)
3250 ("python-cffi" ,python-cffi)
3251 ("libgit2" ,libgit2)
3252 ("python-tox" ,python-tox)))
3253 (native-inputs
3254 `(("python-pytest" ,python-pytest)))
3255 (home-page "https://github.com/libgit2/pygit2")
3256 (synopsis "Python bindings for libgit2")
3257 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3258library, libgit2 implements Git plumbing.")
3259 ;; GPL2.0 only, with linking exception.
3260 (license license:gpl2)))
3261
3262(define-public python2-pygit2
3263 (package-with-python2 python-pygit2))
3264
3265(define-public python-pyparsing
3266 (package
3267 (name "python-pyparsing")
3268 (version "2.2.1")
3269 (source
3270 (origin
3271 (method url-fetch)
3272 (uri (pypi-uri "pyparsing" version))
3273 (sha256
3274 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3275 (build-system python-build-system)
3276 (outputs '("out" "doc"))
3277 (arguments
3278 `(#:tests? #f ; no test target
3279 #:phases
3280 (modify-phases %standard-phases
3281 (add-after 'install 'install-doc
3282 (lambda* (#:key outputs #:allow-other-keys)
3283 (let* ((doc (string-append (assoc-ref outputs "doc")
3284 "/share/doc/" ,name "-" ,version))
3285 (html-doc (string-append doc "/html"))
3286 (examples (string-append doc "/examples")))
3287 (mkdir-p html-doc)
3288 (mkdir-p examples)
3289 (for-each
3290 (lambda (dir tgt)
3291 (map (lambda (file)
3292 (install-file file tgt))
3293 (find-files dir ".*")))
3294 (list "docs" "htmldoc" "examples")
3295 (list doc html-doc examples))
3296 #t))))))
3297 (home-page "https://github.com/pyparsing/pyparsing")
3298 (synopsis "Python parsing class library")
3299 (description
3300 "The pyparsing module is an alternative approach to creating and
3301executing simple grammars, vs. the traditional lex/yacc approach, or the use
3302of regular expressions. The pyparsing module provides a library of classes
3303that client code uses to construct the grammar directly in Python code.")
3304 (license license:expat)))
3305
3306(define-public python2-pyparsing
3307 (package-with-python2 python-pyparsing))
3308
3309(define-public python-numpydoc
3310 (package
3311 (name "python-numpydoc")
3312 (version "0.8.0")
3313 (source
3314 (origin
3315 (method url-fetch)
3316 (uri (pypi-uri "numpydoc" version))
3317 (sha256
3318 (base32
3319 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3320 (build-system python-build-system)
3321 (propagated-inputs
3322 `(("python-sphinx" ,python-sphinx)))
3323 (native-inputs
3324 `(("python-nose" ,python-nose)))
3325 (home-page "https://pypi.python.org/pypi/numpydoc")
3326 (synopsis
3327 "Numpy's Sphinx extensions")
3328 (description
3329 "Sphinx extension to support docstrings in Numpy format.")
3330 (license license:bsd-2)))
3331
3332(define-public python2-numpydoc
3333 (package-with-python2 python-numpydoc))
3334
3335(define-public python-numexpr
3336 (package
3337 (name "python-numexpr")
3338 (version "2.6.5")
3339 (source
3340 (origin
3341 (method url-fetch)
3342 (uri (pypi-uri "numexpr" version))
3343 (sha256
3344 (base32
3345 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3346 (build-system python-build-system)
3347 (arguments `(#:tests? #f)) ; no tests included
3348 (propagated-inputs
3349 `(("python-numpy" ,python-numpy)))
3350 (home-page "https://github.com/pydata/numexpr")
3351 (synopsis "Fast numerical expression evaluator for NumPy")
3352 (description
3353 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3354expressions that operate on arrays are accelerated and use less memory than
3355doing the same calculation in Python. In addition, its multi-threaded
3356capabilities can make use of all your cores, which may accelerate
3357computations, most specially if they are not memory-bounded (e.g. those using
3358transcendental functions).")
3359 (license license:expat)))
3360
3361(define-public python2-numexpr
3362 (package-with-python2 python-numexpr))
3363
3364(define-public python-cycler
3365 (package
3366 (name "python-cycler")
3367 (version "0.10.0")
3368 (source (origin
3369 (method url-fetch)
3370 (uri (pypi-uri "cycler" version))
3371 (sha256
3372 (base32
3373 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3374 (build-system python-build-system)
3375 (arguments
3376 ;; XXX: The current version requires 'coveralls' which we don't have.
3377 ;; Enable this for the next release which uses 'python-pytest'.
3378 '(#:tests? #f))
3379 (propagated-inputs
3380 `(("python-six" ,python-six)))
3381 (home-page "http://matplotlib.org/cycler/")
3382 (synopsis "Composable keyword argument iterator")
3383 (description
3384 "When using @code{matplotlib} and plotting more than one line, it is
3385common to want to be able to want to be able to cycle over one or more artist
3386styles; but the plotting logic can quickly become involved.
3387To address this and enable easy cycling over arbitrary @code{kwargs}, the
3388@code{Cycler} class was developed.")
3389 (license license:bsd-3)))
3390
3391(define-public python2-cycler
3392 (package-with-python2 python-cycler))
3393
3394(define-public python-colorspacious
3395 (package
3396 (name "python-colorspacious")
3397 (version "1.1.0")
3398 (source
3399 (origin
3400 (method url-fetch)
3401 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3402 version ".tar.gz"))
3403 (file-name (string-append name "-" version))
3404 (sha256
3405 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3406 (build-system python-build-system)
3407 (propagated-inputs
3408 `(("python-numpy" ,python-numpy)))
3409 (native-inputs
3410 `(("python-nose" ,python-nose)))
3411 (arguments
3412 `(#:phases
3413 (modify-phases %standard-phases
3414 (replace 'check
3415 (lambda _
c988afda 3416 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3417 (home-page "https://github.com/njsmith/colorspacious")
3418 (synopsis "Python library for colorspace conversions")
3419 (description "@code{colorspacious} is a Python library that lets you
3420convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3421 (license license:expat)))
3422
3423(define-public python2-colorspacious
3424 (package-with-python2 python-colorspacious))
3425
3426(define-public python-matplotlib
3427 (package
3428 (name "python-matplotlib")
3429 (version "2.2.3")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "matplotlib" version))
3434 (sha256
3435 (base32
3436 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3437 (build-system python-build-system)
3438 (propagated-inputs ; the following packages are all needed at run time
3439 `(("python-cycler" ,python-cycler)
3440 ("python-kiwisolver" ,python-kiwisolver)
3441 ("python-pyparsing" ,python-pyparsing)
3442 ("python-pygobject" ,python-pygobject)
3443 ("gobject-introspection" ,gobject-introspection)
3444 ("python-tkinter" ,python "tk")
3445 ("python-dateutil" ,python-dateutil)
3446 ("python-numpy" ,python-numpy)
3447 ("python-pillow" ,python-pillow)
3448 ("python-pytz" ,python-pytz)
3449 ("python-six" ,python-six)
3450 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3451 ;; from 'gtk+') provides the required 'typelib' files used by
3452 ;; 'gobject-introspection'. The location of these files is set with the
3453 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3454 ;; is done automatically by a 'native-search-path' procedure. However,
3455 ;; at run-time the user must set this variable as follows:
3456 ;;
3457 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3458 ("gtk+" ,gtk+)
3459 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3460 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3461 ;; object. For this reason we need to import both libraries.
3462 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3463 ("python-pycairo" ,python-pycairo)
3464 ;; XXX: qtwebkit cannot be built reliably.
3465 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3466 ("python-cairocffi" ,python-cairocffi)))
3467 (inputs
3468 `(("libpng" ,libpng)
3469 ("imagemagick" ,imagemagick)
3470 ("freetype" ,freetype)
3471 ("cairo" ,cairo)
3472 ("glib" ,glib)
3473 ;; FIXME: Add backends when available.
3474 ;("python-wxpython" ,python-wxpython)
3475 ("tcl" ,tcl)
3476 ("tk" ,tk)))
3477 (native-inputs
3478 `(("pkg-config" ,pkg-config)
3479 ("python-nose" ,python-nose)
3480 ("python-mock" ,python-mock)))
3481 (arguments
3482 `(#:phases
3483 (modify-phases %standard-phases
3484 (add-before 'build 'configure-environment
3485 (lambda* (#:key outputs inputs #:allow-other-keys)
3486 (let ((cairo (assoc-ref inputs "cairo"))
3487 (gtk+ (assoc-ref inputs "gtk+")))
3488 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3489 ;; has not effect.
3490 (setenv "LD_LIBRARY_PATH"
3491 (string-append cairo "/lib:" gtk+ "/lib"))
3492 (setenv "HOME" (getcwd))
3493 (call-with-output-file "setup.cfg"
3494 (lambda (port)
3495 (format port "[directories]~%
3496basedirlist = ~a,~a~%
3497 [rc_options]~%
3498backend = TkAgg~%"
3499 (assoc-ref inputs "tcl")
3500 (assoc-ref inputs "tk")))))
3501 #t)))))
3502 (home-page "http://matplotlib.org")
3503 (synopsis "2D plotting library for Python")
3504 (description
3505 "Matplotlib is a Python 2D plotting library which produces publication
3506quality figures in a variety of hardcopy formats and interactive environments
3507across platforms. Matplotlib can be used in Python scripts, the python and
3508ipython shell, web application servers, and six graphical user interface
3509toolkits.")
3510 (license license:psfl)
3511 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3512
3513(define-public python2-matplotlib
3514 (let ((matplotlib (package-with-python2
3515 (strip-python2-variant python-matplotlib))))
3516 (package (inherit matplotlib)
3517 ;; Make sure to use special packages for Python 2 instead
3518 ;; of those automatically rewritten by package-with-python2.
3519 (propagated-inputs
3520 `(("python2-pycairo" ,python2-pycairo)
3521 ("python2-backports-functools-lru-cache"
3522 ,python2-backports-functools-lru-cache)
3523 ("python2-functools32" ,python2-functools32)
3524 ("python2-pygobject-2" ,python2-pygobject-2)
3525 ("python2-subprocess32" ,python2-subprocess32)
3526 ("python2-tkinter" ,python-2 "tk")
3527 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3528 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3529
3530(define-public python-matplotlib-documentation
3531 (package
3532 (name "python-matplotlib-documentation")
3533 (version (package-version python-matplotlib))
3534 (source (package-source python-matplotlib))
3535 (build-system python-build-system)
3536 (native-inputs
3537 `(("python-matplotlib" ,python-matplotlib)
3538 ("python-colorspacious" ,python-colorspacious)
3539 ("python-sphinx" ,python-sphinx)
3540 ("python-sphinx-gallery" ,python-sphinx-gallery)
3541 ("python-numpydoc" ,python-numpydoc)
3542 ("python-ipython" ,python-ipython)
e7a53914 3543 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3544 ("python-mock" ,python-mock)
3545 ("graphviz" ,graphviz)
e7a53914
RW
3546 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3547 texlive-latex-amsmath
3548 texlive-latex-enumitem
3549 texlive-latex-expdlist
3550 texlive-latex-geometry
3551 texlive-latex-preview
3552 texlive-latex-type1cm
3553 texlive-latex-ucs
3554
3555 texlive-generic-pdftex
3556
3557 texlive-fonts-amsfonts
3558 texlive-fonts-ec
3559 texlive-fonts-adobe-times
3560 texlive-fonts-txfonts)))
44d10b1f
RW
3561 ("texinfo" ,texinfo)
3562 ,@(package-native-inputs python-matplotlib)))
3563 (arguments
3564 `(#:tests? #f ; we're only generating documentation
3565 #:phases
3566 (modify-phases %standard-phases
3567 (replace 'build
3568 (lambda _
3569 (chdir "doc")
e7a53914
RW
3570 (setenv "PYTHONPATH"
3571 (string-append (getenv "PYTHONPATH")
3572 ":" (getcwd) "/../examples/units"))
44d10b1f 3573 (substitute* "conf.py"
e7a53914
RW
3574 ;; Don't use git.
3575 (("^SHA = check_output.*")
3576 (string-append "SHA = \"" ,version "\"\n"))
3577 ;; Don't fetch intersphinx files from the Internet
3578 (("^explicit_order_folders" m)
3579 (string-append "intersphinx_mapping = {}\n" m))
3580 (("'sphinx.ext.intersphinx',") "")
3581 ;; Disable URL embedding which requires internet access.
3582 (("'https://docs.scipy.org/doc/numpy'") "None")
3583 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3584 (invoke "make"
3585 "SPHINXBUILD=sphinx-build"
3586 "SPHINXOPTS=" ; don't abort on warnings
3587 "html" "texinfo")))
44d10b1f
RW
3588 (replace 'install
3589 (lambda* (#:key inputs outputs #:allow-other-keys)
3590 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3591 (doc (string-append data "/doc/python-matplotlib-" ,version))
3592 (info (string-append data "/info"))
3593 (html (string-append doc "/html")))
3594 (mkdir-p html)
3595 (mkdir-p info)
3596 (copy-recursively "build/html" html)
3597 (symlink (string-append html "/_images")
3598 (string-append info "/matplotlib-figures"))
3599 (with-directory-excursion "build/texinfo"
3600 (substitute* "matplotlib.texi"
3601 (("@image\\{([^,]*)" all file)
3602 (string-append "@image{matplotlib-figures/" file)))
3603 (symlink (string-append html "/_images")
3604 "./matplotlib-figures")
e7a53914
RW
3605 (invoke "makeinfo" "--no-split"
3606 "-o" "matplotlib.info" "matplotlib.texi"))
3607 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3608 #t)))))
3609 (home-page (package-home-page python-matplotlib))
3610 (synopsis "Documentation for the python-matplotlib package")
3611 (description (package-description python-matplotlib))
3612 (license (package-license python-matplotlib))))
3613
3614(define-public python2-matplotlib-documentation
3615 (package-with-python2 python-matplotlib-documentation))
3616
3617(define-public python2-pysnptools
3618 (package
3619 (name "python2-pysnptools")
5d1ade85 3620 (version "0.3.13")
44d10b1f
RW
3621 (source
3622 (origin
3623 (method url-fetch)
5d1ade85 3624 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3625 (sha256
3626 (base32
5d1ade85 3627 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3628 (build-system python-build-system)
3629 (arguments
5d1ade85
RW
3630 `(#:python ,python-2 ; only Python 2.7 is supported
3631 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3632 (propagated-inputs
3633 `(("python2-numpy" ,python2-numpy)
3634 ("python2-scipy" ,python2-scipy)
3635 ("python2-pandas" ,python2-pandas)))
44d10b1f 3636 (native-inputs
5d1ade85 3637 `(("python2-cython" ,python2-cython)))
1b66989b 3638 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3639 (synopsis "Library for reading and manipulating genetic data")
3640 (description
3641 "PySnpTools is a library for reading and manipulating genetic data. It
3642can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3643those files. It can also efficiently manipulate ranges of integers using set
3644operators such as union, intersection, and difference.")
3645 (license license:asl2.0)))
3646
3647(define-public python-scipy
3648 (package
3649 (name "python-scipy")
3650 (version "1.1.0")
3651 (source
3652 (origin
3653 (method url-fetch)
3654 (uri (pypi-uri "scipy" version))
3655 (sha256
3656 (base32
3657 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3658 (build-system python-build-system)
3659 (propagated-inputs
3660 `(("python-numpy" ,python-numpy)
3661 ("python-matplotlib" ,python-matplotlib)
3662 ("python-pyparsing" ,python-pyparsing)))
3663 (inputs
3664 `(("lapack" ,lapack)
3665 ("openblas" ,openblas)))
3666 (native-inputs
3667 `(("python-cython" ,python-cython)
3668 ("python-pytest" ,python-pytest)
3669 ("python-sphinx" ,python-sphinx)
3670 ("python-numpydoc" ,python-numpydoc)
3671 ("gfortran" ,gfortran)
3672 ("perl" ,perl)
3673 ("which" ,which)))
3674 (outputs '("out" "doc"))
3675 (arguments
3676 `(#:phases
3677 (modify-phases %standard-phases
3678 (add-after 'unpack 'disable-broken-tests
3679 (lambda _
3680 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3681 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3682 (string-append indent
3683 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3684 m)))
3685 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3686 (("^def test_parallel_threads\\(\\):" m)
3687 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3688 m)))
3689 #t))
3690 (add-before 'build 'configure-openblas
3691 (lambda* (#:key inputs #:allow-other-keys)
3692 (call-with-output-file "site.cfg"
3693 (lambda (port)
3694 (format port
3695 "[blas]
3696libraries = openblas
3697library_dirs = ~a/lib
3698include_dirs = ~a/include
3699
3700# backslash-n to make emacs happy
3701\n[atlas]
3702library_dirs = ~a/lib
3703atlas_libs = openblas
3704"
3705 (assoc-ref inputs "openblas")
3706 (assoc-ref inputs "openblas")
3707 (assoc-ref inputs "openblas"))))
3708 #t))
3709 (add-after 'install 'install-doc
3710 (lambda* (#:key inputs outputs #:allow-other-keys)
3711 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3712 (doc (string-append data "/doc/" ,name "-" ,version))
3713 (html (string-append doc "/html"))
3714 (pyver ,(string-append "PYVER=" (version-major+minor
3715 (package-version python))))
3716 ;; By default it tries to run sphinx-build through the Python
3717 ;; interpreter which won't work with our shell wrapper.
3718 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3719 ;; Make installed package available for building the
3720 ;; documentation
3721 (add-installed-pythonpath inputs outputs)
3722 (with-directory-excursion "doc"
3723 ;; Fix generation of images for mathematical expressions.
3724 (substitute* (find-files "source" "conf\\.py")
3725 (("pngmath_use_preview = True")
3726 "pngmath_use_preview = False"))
3727 (mkdir-p html)
3728 (invoke "make" "html" pyver sphinxbuild)
3729 (with-directory-excursion "build/html"
3730 (for-each (lambda (file)
3731 (let* ((dir (dirname file))
3732 (tgt-dir (string-append html "/" dir)))
3733 (install-file file html)))
3734 (find-files "." ".*")))))
3735 #t))
3736 ;; Tests can only be run after the library has been installed and not
3737 ;; within the source directory.
3738 (delete 'check)
3739 (add-after 'install 'check
3740 (lambda* (#:key inputs outputs #:allow-other-keys)
3741 (add-installed-pythonpath inputs outputs)
3742 (with-directory-excursion "/tmp"
3743 (invoke "python" "-c"
3744 "import scipy; scipy.test(verbose=2)")))))))
3745 (home-page "https://www.scipy.org/")
3746 (synopsis "The Scipy library provides efficient numerical routines")
3747 (description "The SciPy library is one of the core packages that make up
3748the SciPy stack. It provides many user-friendly and efficient numerical
3749routines such as routines for numerical integration and optimization.")
3750 (properties `((python2-variant . ,(delay python2-scipy))))
3751 (license license:bsd-3)))
3752
3753(define-public python2-scipy
3754 (package-with-python2
3755 (strip-python2-variant python-scipy)))
3756
3757(define-public python-socksipy-branch
3758 (package
3759 (name "python-socksipy-branch")
3760 (version "1.01")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "SocksiPy-branch" version))
3765 (sha256
3766 (base32
3767 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3768 (build-system python-build-system)
3769 (arguments
3770 `(#:tests? #f)) ; There are no tests
3771 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3772 (synopsis "Python SOCKS module")
3773 (description
3774 "SocksiPy - A Python SOCKS client module. It provides a
3775socket-like interface that supports connections to any TCP
3776service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3777The original version was developed by Dan Haim, this is a
3778branch created by Mario Vilas to address some open issues,
3779as the original project seems to have been abandoned circa 2007.")
3780 (license license:bsd-3)))
3781
3782(define-public python2-socksipy-branch
3783 (package-with-python2 python-socksipy-branch))
3784
3785(define-public python-pycodestyle
3786 (package
3787 (name "python-pycodestyle")
3788 (version "2.4.0")
3789 (source
3790 (origin
3791 (method url-fetch)
3792 (uri (pypi-uri "pycodestyle" version))
3793 (sha256
3794 (base32
3795 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3796 (build-system python-build-system)
3797 (home-page "https://pycodestyle.readthedocs.io/")
3798 (synopsis "Python style guide checker")
3799 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3800Python code against some of the style conventions in
3801@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3802 (license license:expat)))
3803
3804(define-public python2-pycodestyle
3805 (package-with-python2 python-pycodestyle))
3806
3807(define-public python-multidict
3808 (package
3809 (name "python-multidict")
3810 (version "4.2.0")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "multidict" version))
3815 (sha256
3816 (base32
3817 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3818 (build-system python-build-system)
3819 (native-inputs
3820 `(("python-pytest" ,python-pytest)
3821 ("python-pytest-runner" ,python-pytest-runner)))
3822 (home-page "https://github.com/aio-libs/multidict/")
3823 (synopsis "Multidict implementation")
3824 (description "Multidict is dict-like collection of key-value pairs
3825where key might be occurred more than once in the container.")
3826 (license license:asl2.0)))
3827
3828(define-public python-orderedmultidict
3829 (package
3830 (name "python-orderedmultidict")
3831 (version "0.7.11")
3832 (source
3833 (origin
3834 (method url-fetch)
3835 (uri (pypi-uri "orderedmultidict" version))
3836 (sha256
3837 (base32
3838 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3839 (build-system python-build-system)
3840 (arguments
3841 `(#:phases
3842 (modify-phases %standard-phases
3843 (add-after 'unpack 'fix-tests
3844 (lambda _
3845 ;; The package uses nosetest for running the tests.
3846 ;; Adding this initfile allows to run the test suite
3847 ;; without requiring nosetest.
d1c4f329
RW
3848 (with-output-to-file "tests/__init__.py" newline)
3849 #t)))))
44d10b1f
RW
3850 (propagated-inputs
3851 `(("python-six" ,python-six)))
3852 (native-inputs
3853 `(("python-pycodestyle" ,python-pycodestyle)))
3854 (home-page "https://github.com/gruns/orderedmultidict")
3855 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3856 (description "This package contains a library for ordered multivalue
3857dictionaries. A multivalue dictionary is a dictionary that can store
3858multiple values for the same key. An ordered multivalue dictionary is a
3859multivalue dictionary that retains the order of insertions and deletions.")
3860 (license license:unlicense)))
3861
3862(define-public python2-orderedmultidict
3863 (package-with-python2 python-orderedmultidict))
3864
3865(define-public python-autopep8
3866 (package
3867 (name "python-autopep8")
3868 (version "1.3.5")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "autopep8" version))
3873 (sha256
3874 (base32
3875 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3876 (build-system python-build-system)
3877 (propagated-inputs
3878 `(("python-pycodestyle" ,python-pycodestyle)))
3879 (home-page "https://github.com/hhatto/autopep8")
3880 (synopsis "Format Python code according to the PEP 8 style guide")
3881 (description
3882 "@code{autopep8} automatically formats Python code to conform to
3883the PEP 8 style guide. It uses the pycodestyle utility to determine
3884what parts of the code needs to be formatted. @code{autopep8} is
3885capable of fixing most of the formatting issues that can be reported
3886by pycodestyle.")
3887 (license (license:non-copyleft
3888 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3889
3890(define-public python2-autopep8
3891 (package-with-python2 python-autopep8))
3892
3893(define-public python-distutils-extra
3894 (package
3895 (name "python-distutils-extra")
3896 (version "2.38")
3897 (source
3898 (origin
3899 (method url-fetch)
3900 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3901 version "/+download/python-distutils-extra-"
3902 version ".tar.gz"))
3903 (sha256
3904 (base32
3905 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3906 (build-system python-build-system)
3907 (home-page "https://launchpad.net/python-distutils-extra/")
3908 (synopsis "Enhancements to Python's distutils")
3909 (description
3910 "The python-distutils-extra module enables you to easily integrate
3911gettext support, themed icons, and scrollkeeper-based documentation into
3912Python's distutils.")
3913 (license license:gpl2)))
3914
3915(define-public python2-distutils-extra
3916 (package-with-python2 python-distutils-extra))
3917
3918(define-public python2-elib.intl
3919 (package
3920 (name "python2-elib.intl")
3921 (version "0.0.3")
3922 (source
3923 (origin
3924 ;; This project doesn't tag releases or publish tarballs, so we take
3925 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3926 (method git-fetch)
3927 (uri (git-reference
3928 (url "https://github.com/dieterv/elib.intl.git")
3929 (commit "d09997cfef")))
3930 (file-name (string-append name "-" version "-checkout"))
3931 (sha256
3932 (base32
3933 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3934 (build-system python-build-system)
3935 (arguments
3936 ;; incompatible with Python 3 (exception syntax)
3937 `(#:python ,python-2
3938 #:tests? #f))
3939 (home-page "https://github.com/dieterv/elib.intl")
3940 (synopsis "Enhanced internationalization for Python")
3941 (description
3942 "The elib.intl module provides enhanced internationalization (I18N)
3943services for your Python modules and applications.")
3944 (license license:lgpl3+)))
3945
3946(define-public python-olefile
3947 (package
3948 (name "python-olefile")
3949 (version "0.45.1")
3950 (source
3951 (origin
3952 (method url-fetch)
3953 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3954 version ".tar.gz"))
3955 (file-name (string-append name "-" version ".tar.gz"))
3956 (sha256
3957 (base32
3958 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3959 (build-system python-build-system)
3960 (home-page
3961 "https://www.decalage.info/python/olefileio")
3962 (synopsis "Read and write Microsoft OLE2 files.")
3963 (description
3964 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3965Storage or Compound Document, Microsoft Office). It is an improved version of
3966the OleFileIO module from PIL, the Python Image Library.")
3967 (license license:bsd-3)))
3968
3969(define-public python2-olefile
3970 (package-with-python2 python-olefile))
3971
3972(define-public python-pillow
3973 (package
3974 (name "python-pillow")
3975 (version "5.4.1")
3976 (source
3977 (origin
3978 (method url-fetch)
3979 (uri (pypi-uri "Pillow" version))
3980 (sha256
3981 (base32
3982 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3983 (build-system python-build-system)
3984 (native-inputs
3985 `(("python-pytest" ,python-pytest)))
3986 (inputs
3987 `(("freetype" ,freetype)
3988 ("lcms" ,lcms)
3989 ("zlib" ,zlib)
3990 ("libjpeg" ,libjpeg)
3991 ("openjpeg" ,openjpeg)
3992 ("libtiff" ,libtiff)
3993 ("libwebp" ,libwebp)))
3994 (propagated-inputs
3995 `(("python-olefile" ,python-olefile)))
3996 (arguments
3997 `(#:phases
3998 (modify-phases %standard-phases
3999 (add-after 'unpack 'patch-ldconfig
4000 (lambda _
4001 (substitute* "setup.py"
4002 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4003 (delete 'check) ; We must run checks after python-pillow is installed.
4004 (add-after 'install 'check-installed
4005 (lambda* (#:key outputs inputs #:allow-other-keys)
4006 (begin
4007 (setenv "HOME" (getcwd))
4008 ;; Make installed package available for running the tests.
4009 (add-installed-pythonpath inputs outputs)
4010 (invoke "python" "selftest.py" "--installed")
4011 (invoke "python" "-m" "pytest" "-vv")))))))
4012 (home-page "https://python-pillow.org")
4013 (synopsis "Fork of the Python Imaging Library")
4014 (description
4015 "The Python Imaging Library adds image processing capabilities to your
4016Python interpreter. This library provides extensive file format support, an
4017efficient internal representation, and fairly powerful image processing
4018capabilities. The core image library is designed for fast access to data
4019stored in a few basic pixel formats. It should provide a solid foundation for
4020a general image processing tool.")
4021 (license (license:x11-style
4022 "http://www.pythonware.com/products/pil/license.htm"
4023 "The PIL Software License"))))
4024
4025(define-public python2-pillow
4026 (package-with-python2 python-pillow))
4027
4028(define-public python-pycparser
4029 (package
4030 (name "python-pycparser")
4031 (version "2.18")
4032 (source
4033 (origin
4034 (method url-fetch)
4035 (uri (pypi-uri "pycparser" version))
4036 (sha256
4037 (base32
4038 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4039 (outputs '("out" "doc"))
4040 (build-system python-build-system)
4041 (native-inputs
4042 `(("pkg-config" ,pkg-config)))
4043 (arguments
4044 `(#:phases
4045 (modify-phases %standard-phases
4046 (replace 'check
4047 (lambda _
4048 (with-directory-excursion "tests"
acb75c03
RW
4049 (invoke "python" "all_tests.py"))
4050 #t))
44d10b1f
RW
4051 (add-after 'install 'install-doc
4052 (lambda* (#:key outputs #:allow-other-keys)
4053 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4054 (doc (string-append data "/doc/" ,name "-" ,version))
4055 (examples (string-append doc "/examples")))
4056 (mkdir-p examples)
4057 (for-each (lambda (file)
4058 (copy-file (string-append "." file)
4059 (string-append doc file)))
4060 '("/README.rst" "/CHANGES" "/LICENSE"))
4061 (copy-recursively "examples" examples)))))))
4062 (home-page "https://github.com/eliben/pycparser")
4063 (synopsis "C parser in Python")
4064 (description
4065 "Pycparser is a complete parser of the C language, written in pure Python
4066using the PLY parsing library. It parses C code into an AST and can serve as
4067a front-end for C compilers or analysis tools.")
4068 (license license:bsd-3)))
4069
4070(define-public python2-pycparser
4071 (package-with-python2 python-pycparser))
4072
4073(define-public python-pywavelets
4074 (package
4075 (name "python-pywavelets")
4076 (version "1.0.1")
4077 (home-page "https://github.com/PyWavelets/pywt")
4078 (source (origin
4079 (method url-fetch)
4080 (uri (pypi-uri "PyWavelets" version))
4081 (sha256
4082 (base32
4083 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4084 (build-system python-build-system)
4085 (arguments
4086 '(#:modules ((ice-9 ftw)
4087 (srfi srfi-1)
4088 (srfi srfi-26)
4089 (guix build utils)
4090 (guix build python-build-system))
4091 #:phases (modify-phases %standard-phases
4092 (replace 'check
4093 (lambda _
4094 (let ((cwd (getcwd))
4095 (libdir (find (cut string-prefix? "lib." <>)
4096 (scandir "build"))))
4097 (with-directory-excursion (string-append cwd "/build/" libdir)
4098 (invoke "nosetests" "-v" "."))))))))
4099 (native-inputs
4100 `(("python-matplotlib" ,python-matplotlib) ;for tests
4101 ("python-nose" ,python-nose)))
4102 (propagated-inputs
4103 `(("python-numpy" ,python-numpy)))
4104 (synopsis "Wavelet transforms in Python")
4105 (description
4106 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4107mathematical basis functions that are localized in both time and frequency.
4108Wavelet transforms are time-frequency transforms employing wavelets. They are
4109similar to Fourier transforms, the difference being that Fourier transforms are
4110localized only in frequency instead of in time and frequency.")
4111 (license license:expat)))
4112
4113(define-public python2-pywavelets
4114 (package-with-python2 python-pywavelets))
4115
4116(define-public python-xcffib
4117 (package
4118 (name "python-xcffib")
4119 (version "0.6.0")
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (pypi-uri "xcffib" version))
4124 (sha256
4125 (base32
4126 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4127 (build-system python-build-system)
4128 (inputs
4129 `(("libxcb" ,libxcb)))
4130 (propagated-inputs
4131 `(("python-cffi" ,python-cffi) ; used at run time
4132 ("python-six" ,python-six)))
4133 (arguments
4134 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4135 #:tests? #f
4136 #:phases
4137 (modify-phases %standard-phases
4138 (add-after 'unpack 'fix-libxcb-path
4139 (lambda* (#:key inputs #:allow-other-keys)
4140 (let ((libxcb (assoc-ref inputs "libxcb")))
4141 (substitute* '("xcffib/__init__.py")
4142 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4143 #t)))
4144 (add-after 'install 'install-doc
4145 (lambda* (#:key outputs #:allow-other-keys)
4146 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4147 "/doc/" ,name "-" ,version)))
4148 (mkdir-p doc)
4149 (copy-file "README.md"
4150 (string-append doc "/README.md"))
4151 #t))))))
4152 (home-page "https://github.com/tych0/xcffib")
4153 (synopsis "XCB Python bindings")
4154 (description
4155 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4156support for Python 3 and PyPy. It is based on cffi.")
4157 (license license:expat)))
4158
4159(define-public python2-xcffib
4160 (package-with-python2 python-xcffib))
4161
4162(define-public python-cairocffi
4163 (package
4164 (name "python-cairocffi")
4165 (version "0.9.0")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (pypi-uri "cairocffi" version))
4170 (sha256
4171 (base32
4172 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4173 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4174 (build-system python-build-system)
4175 (outputs '("out" "doc"))
4176 (inputs
4177 `(("glib" ,glib)
4178 ("gtk+" ,gtk+)
4179 ("gdk-pixbuf" ,gdk-pixbuf)
4180 ("cairo" ,cairo)
4181 ("pango" ,pango)))
4182 (native-inputs
4183 `(("pkg-config" ,pkg-config)
4184 ("python-pytest" ,python-pytest)
4185 ("python-pytest-cov" ,python-pytest-cov)
4186 ("python-pytest-runner" ,python-pytest-runner)
4187 ("python-sphinx" ,python-sphinx)
4188 ("python-docutils" ,python-docutils)))
4189 (propagated-inputs
4190 `(("python-xcffib" ,python-xcffib))) ; used at run time
4191 (arguments
4192 `(#:phases
4193 (modify-phases %standard-phases
4194 (add-after 'unpack 'patch-paths
4195 (lambda* (#:key inputs outputs #:allow-other-keys)
4196 (substitute* (find-files "." "\\.py$")
4197 (("dlopen\\(ffi, 'cairo'")
4198 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4199 "/lib/libcairo.so.2'"))
4200 (("dlopen\\(ffi, 'gdk-3'")
4201 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4202 "/lib/libgtk-3.so.0'"))
4203 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4204 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4205 "/lib/libgdk_pixbuf-2.0.so.0'"))
4206 (("dlopen\\(ffi, 'glib-2.0'")
4207 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4208 "/lib/libglib-2.0.so.0'"))
4209 (("dlopen\\(ffi, 'gobject-2.0'")
4210 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4211 "/lib/libgobject-2.0.so.0'"))
4212 (("dlopen\\(ffi, 'pangocairo-1.0'")
4213 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4214 "/lib/libpangocairo-1.0.so.0'"))
4215 (("dlopen\\(ffi, 'pango-1.0'")
4216 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4217 "/lib/libpango-1.0.so.0'")))
4218 #t))
4219 (add-after 'install 'install-doc
4220 (lambda* (#:key inputs outputs #:allow-other-keys)
4221 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4222 (doc (string-append data "/doc/" ,name "-" ,version))
4223 (html (string-append doc "/html")))
4224 (setenv "LD_LIBRARY_PATH"
4225 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4226 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4227 (setenv "LANG" "en_US.UTF-8")
4228 (mkdir-p html)
4229 (for-each (lambda (file)
4230 (copy-file (string-append "." file)
4231 (string-append doc file)))
4232 '("/README.rst" "/CHANGES" "/LICENSE"))
4233 (system* "python" "setup.py" "build_sphinx")
4234 (copy-recursively "docs/_build/html" html)
4235 #t))))))
4236 (home-page "https://github.com/Kozea/cairocffi")
4237 (synopsis "Python bindings and object-oriented API for Cairo")
4238 (description
4239 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4240Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4241graphics library with support for multiple backends including image buffers,
4242PNG, PostScript, PDF, and SVG file output.")
4243 (license license:bsd-3)))
4244
4245(define-public python2-cairocffi
4246 (package-with-python2 python-cairocffi))
4247
4248(define-public python-decorator
4249 (package
4250 (name "python-decorator")
4251 (version "4.3.0")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "decorator" version))
4256 (sha256
4257 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4258 (build-system python-build-system)
4259 (home-page "https://pypi.python.org/pypi/decorator/")
4260 (synopsis "Python module to simplify usage of decorators")
4261 (description
4262 "The aim of the decorator module is to simplify the usage of decorators
4263for the average programmer, and to popularize decorators usage giving examples
4264of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4265etc. The core of this module is a decorator factory.")
4266 (license license:expat)))
4267
4268(define-public python2-decorator
4269 (package-with-python2 python-decorator))
4270
4271(define-public python-drmaa
4272 (package
4273 (name "python-drmaa")
4274 (version "0.7.7")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (pypi-uri "drmaa" version))
4279 (sha256
4280 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4281 (build-system python-build-system)
4282 ;; The test suite requires libdrmaa which is provided by the cluster
4283 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4284 ;; should be set to the path of the libdrmaa library.
4285 (arguments '(#:tests? #f))
4286 (native-inputs
4287 `(("python-nose" ,python-nose)))
4288 (home-page "https://pypi.python.org/pypi/drmaa")
4289 (synopsis "Python bindings for the DRMAA library")
4290 (description
4291 "A Python package for Distributed Resource Management (DRM) job
4292submission and control. This package is an implementation of the DRMAA 1.0
4293Python language binding specification.")
4294 (license license:bsd-3)))
4295
4296(define-public python2-drmaa
4297 (package-with-python2 python-drmaa))
4298
4299(define-public python-grako
4300 (package
4301 (name "python-grako")
4302 (version "3.99.9")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri
4307 (pypi-uri "grako" version ".zip"))
4308 (sha256
4309 (base32
4310 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4311 (build-system python-build-system)
4312 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4313 (native-inputs
4314 `(("unzip" ,unzip)
4315 ("python-pytest" ,python-pytest)
4316 ("python-pytest-runner" ,python-pytest-runner)))
4317 (home-page "https://bitbucket.org/neogeny/grako")
4318 (synopsis "EBNF parser generator")
4319 (description
4320 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4321memoizing PEG/Packrat parser in Python.")
4322 (license license:bsd-3)))
4323
4324(define-public python2-grako
4325 (package-with-python2 python-grako))
4326
4327(define-public python-gridmap
4328 (package
4329 (name "python-gridmap")
4330 (version "0.13.0")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (string-append
4335 "https://github.com/pygridtools/gridmap/archive/v"
4336 version ".tar.gz"))
4337 (file-name (string-append name "-" version ".tar.gz"))
4338 (sha256
4339 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4340 (build-system python-build-system)
4341 (arguments
4342 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4343 (propagated-inputs
4344 `(("python-psutil" ,python-psutil)
4345 ("python-drmaa" ,python-drmaa)
4346 ("python-pyzmq" ,python-pyzmq)))
4347 (home-page "https://github.com/pygridtools/gridmap")
4348 (synopsis "Create jobs on a cluster directly from Python")
4349 (description
4350 "Gridmap is a Python package to allow you to easily create jobs on the
4351cluster directly from Python. You can directly map Python functions onto the
4352cluster without needing to write any wrapper code yourself.")
4353 (license license:gpl3+)))
4354
4355(define-public python2-gridmap
4356 (package-with-python2 python-gridmap))
4357
4358(define-public python-honcho
4359 (package
4360 (name "python-honcho")
4361 (version "1.0.1")
4362 (source
4363 (origin
4364 (method url-fetch)
4365 (uri (string-append
4366 "https://github.com/nickstenning/honcho/archive/v"
4367 version ".tar.gz"))
4368 (file-name (string-append name "-" version ".tar.gz"))
4369 (sha256
4370 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4371 (build-system python-build-system)
4372 (native-inputs
4373 `(("python-pytest" ,python-pytest)
4374 ("python-mock" ,python-mock)
4375 ("python-tox" ,python-tox)
4376 ("which" ,which))) ;for tests
4377 (propagated-inputs
4378 `(("python-jinja2" ,python-jinja2)))
4379 (arguments
4380 `(#:phases
4381 (modify-phases %standard-phases
4382 (delete 'check)
4383 (add-after 'install 'check
4384 (lambda* (#:key outputs inputs #:allow-other-keys)
4385 ;; fix honcho path in testsuite
4386 (substitute* "tests/conftest.py"
4387 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4388 "/bin/honcho" "'")))
4389 ;; It's easier to run tests after install.
4390 ;; Make installed package available for running the tests
4391 (add-installed-pythonpath inputs outputs)
95b707fb 4392 (invoke "py.test" "-v"))))))
44d10b1f
RW
4393 (home-page "https://github.com/nickstenning/honcho")
4394 (synopsis "Manage Procfile-based applications")
4395 (description
4396 "A Procfile is a file which describes how to run an application
4397consisting of serveral processes. honcho starts all listed processes.
4398The output of all running processes is collected by honcho and
4399displayed.")
4400 (license license:expat)))
4401
4402(define-public python2-honcho
4403 (package-with-python2 python-honcho))
4404
4405(define-public python-pexpect
4406 (package
4407 (name "python-pexpect")
4408 (version "4.6.0")
4409 (source
4410 (origin
4411 (method url-fetch)
4412 (uri (pypi-uri "pexpect" version))
4413 (sha256
4414 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4415 (build-system python-build-system)
4416 (arguments
4417 `(#:phases
4418 (modify-phases %standard-phases
4419 (add-before 'check 'prepare-tests
4420 (lambda _
4421 (substitute* (find-files "tests")
4422 (("/bin/ls") (which "ls"))
4423 (("/bin/echo") (which "echo"))
4424 (("/bin/which") (which "which"))
4425 ;; Many tests try to use the /bin directory which
4426 ;; is not present in the build environment.
4427 ;; Use one that's non-empty and unlikely to change.
4428 (("/bin'") "/dev'"))
4429 ;; XXX: Socket connection test gets "Connection reset by peer".
4430 ;; Why does it not work? Delete for now.
4431 (delete-file "tests/test_socket.py")
4432 #t))
4433 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4434 (native-inputs
4435 `(("python-nose" ,python-nose)
4436 ("python-pytest" ,python-pytest)
4437 ("man-db" ,man-db)
4438 ("which" ,which)
4439 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4440 (propagated-inputs
4441 `(("python-ptyprocess" ,python-ptyprocess)))
4442 (home-page "http://pexpect.readthedocs.org/")
4443 (synopsis "Controlling interactive console applications")
4444 (description
4445 "Pexpect is a pure Python module for spawning child applications;
4446controlling them; and responding to expected patterns in their output.
4447Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4448child application and control it as if a human were typing commands.")
4449 (license license:isc)))
4450
4451(define-public python2-pexpect
4452 (package-with-python2 python-pexpect))
4453
4454(define-public python-setuptools-scm
4455 (package
4456 (name "python-setuptools-scm")
4457 (version "3.1.0")
4458 (source (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "setuptools_scm" version))
4461 (sha256
4462 (base32
4463 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4464 (build-system python-build-system)
4465 (home-page "https://github.com/pypa/setuptools_scm/")
4466 (synopsis "Manage Python package versions in SCM metadata")
4467 (description
4468 "Setuptools_scm handles managing your Python package versions in
4469@dfn{software configuration management} (SCM) metadata instead of declaring
4470them as the version argument or in a SCM managed file.")
4471 (license license:expat)))
4472
4473(define-public python2-setuptools-scm
4474 (package-with-python2 python-setuptools-scm))
4475
4476(define-public python-pathpy
4477 (package
4478 (name "python-pathpy")
4479 (version "11.0.1")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 (uri (pypi-uri "path.py" version))
4484 (sha256
4485 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4486 ;; (outputs '("out" "doc"))
4487 (build-system python-build-system)
4488 (propagated-inputs
4489 `(("python-appdirs" ,python-appdirs)))
4490 (native-inputs
4491 `(("python-setuptools-scm" ,python-setuptools-scm)
4492 ("python-sphinx" ,python-sphinx)
4493 ("python-rst.linker" ,python-rst.linker)
4494 ("python-pytest" ,python-pytest)
4495 ("python-pytest-runner" ,python-pytest-runner)))
4496 (arguments
4497 ;; FIXME: Documentation and tests require "jaraco.packaging".
4498 `(#:tests? #f))
4499 ;; #:phases
4500 ;; (modify-phases %standard-phases
4501 ;; (add-after 'build 'build-doc
4502 ;; (lambda _
4503 ;; (setenv "LANG" "en_US.UTF-8")
4504 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4505 ;; (add-after 'install 'install-doc
4506 ;; (lambda* (#:key outputs #:allow-other-keys)
4507 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4508 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4509 ;; (html (string-append doc "/html")))
4510 ;; (mkdir-p html)
4511 ;; (for-each (lambda (file)
4512 ;; (copy-file file (string-append doc "/" file)))
4513 ;; '("README.rst" "CHANGES.rst"))
4514 ;; (copy-recursively "build/sphinx/html" html)))))))
4515 (home-page "https://github.com/jaraco/path.py")
4516 (synopsis "Python module wrapper for built-in os.path")
4517 (description
4518 "@code{path.py} implements path objects as first-class entities, allowing
4519common operations on files to be invoked on those path objects directly.")
4520 (license license:expat)))
4521
4522(define-public python2-pathpy
4523 (package-with-python2 python-pathpy))
4524
4525(define-public python-simplegeneric
4526 (package
4527 (name "python-simplegeneric")
4528 (version "0.8.1")
4529 (source
4530 (origin
4531 (method url-fetch)
6c8c3980 4532 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4533 (sha256
4534 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4535 (build-system python-build-system)
4536 (native-inputs
4537 `(("unzip" ,unzip)))
4538 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4539 (synopsis "Python module for simple generic functions")
4540 (description
4541 "The simplegeneric module lets you define simple single-dispatch generic
4542functions, akin to Python’s built-in generic functions like @code{len()},
4543@code{iter()} and so on. However, instead of using specially-named methods,
4544these generic functions use simple lookup tables, akin to those used by
4545e.g. @code{pickle.dump()} and other generic functions found in the Python
4546standard library.")
4547 (license license:zpl2.1)))
4548
4549(define-public python2-simplegeneric
4550 (package-with-python2 python-simplegeneric))
4551
4552(define-public python-ipython-genutils
4553 ;; TODO: This package is retired, check if can be removed, see description.
4554 (package
4555 (name "python-ipython-genutils")
4556 (version "0.1.0")
4557 (source
4558 (origin
4559 (method url-fetch)
c9671d4b 4560 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4561 (sha256
4562 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4563 (build-system python-build-system)
4564 (arguments `(#:tests? #f)) ; no tests
4565 (home-page "https://ipython.org")
4566 (synopsis "Vestigial utilities from IPython")
4567 (description
4568 "This package provides retired utilities from IPython. No packages
4569outside IPython/Jupyter should depend on it.
4570
4571This package shouldn't exist. It contains some common utilities shared by
4572Jupyter and IPython projects during The Big Split. As soon as possible, those
4573packages will remove their dependency on this, and this package will go
4574away.")
4575 (license license:bsd-3)))
4576
4577(define-public python2-ipython-genutils
4578 (package-with-python2 python-ipython-genutils))
4579
4580(define-public python-traitlets
4581 (package
4582 (name "python-traitlets")
4583 (version "4.3.2")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (pypi-uri "traitlets" version))
4588 (sha256
4589 (base32
4590 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4591 (build-system python-build-system)
4592 (arguments
4593 `(#:phases
4594 (modify-phases %standard-phases
4595 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4596 (propagated-inputs
4597 `(("python-ipython-genutils" ,python-ipython-genutils)
4598 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4599 (native-inputs
4600 `(("python-pytest" ,python-pytest)))
4601 (properties `((python2-variant . ,(delay python2-traitlets))))
4602 (home-page "https://ipython.org")
4603 (synopsis "Configuration system for Python applications")
4604 (description
4605 "Traitlets is a framework that lets Python classes have attributes with
4606type checking, dynamically calculated default values, and ‘on change’
4607callbacks. The package also includes a mechanism to use traitlets for
4608configuration, loading values from files or from command line arguments. This
4609is a distinct layer on top of traitlets, so you can use traitlets in your code
4610without using the configuration machinery.")
4611 (license license:bsd-3)))
4612
4613(define-public python2-traitlets
4614 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4615 (package
4616 (inherit traitlets)
4617 (propagated-inputs
4618 `(("python2-enum34" ,python2-enum34)
4619 ,@(package-propagated-inputs traitlets))))))
4620
4621(define-public python-jupyter-core
4622 (package
4623 (name "python-jupyter-core")
4624 (version "4.4.0")
4625 (source
4626 (origin
4627 (method url-fetch)
4628 (uri (string-append (pypi-uri "jupyter_core" version)))
4629 (sha256
4630 (base32
4631 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4632 (build-system python-build-system)
4633 ;; FIXME: not sure how to run the tests
4634 (arguments `(#:tests? #f))
4635 (propagated-inputs
4636 `(("python-traitlets" ,python-traitlets)))
4637 (home-page "http://jupyter.org/")
4638 (synopsis "Jupyter base package")
4639 (description
4640 "Jupyter core is the base package on which Jupyter projects rely.")
4641 (license license:bsd-3)))
4642
4643(define-public python2-jupyter-core
4644 (package-with-python2 python-jupyter-core))
4645
4646(define-public python-jupyter-client
4647 (package
4648 (name "python-jupyter-client")
4649 (version "5.2.4")
4650 (source
4651 (origin
4652 (method url-fetch)
4653 (uri (pypi-uri "jupyter_client" version))
4654 (sha256
4655 (base32
4656 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4657 (build-system python-build-system)
4658 ;; Tests fail because of missing native python kernel which I assume is
4659 ;; provided by the ipython package, which we cannot use because it would
4660 ;; cause a dependency cycle.
4661 (arguments `(#:tests? #f))
4662 (propagated-inputs
4663 `(("python-pyzmq" ,python-pyzmq)
4664 ("python-traitlets" ,python-traitlets)
4665 ("python-jupyter-core" ,python-jupyter-core)))
4666 (home-page "http://jupyter.org/")
4667 (synopsis "Jupyter protocol implementation and client libraries")
4668 (description
4669 "The @code{jupyter_client} package contains the reference implementation
4670of the Jupyter protocol. It also provides client and kernel management APIs
4671for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4672installing @code{kernelspec}s for use with Jupyter frontends.")
4673 (license license:bsd-3)))
4674
4675(define-public python2-jupyter-client
4676 (package-with-python2 python-jupyter-client))
4677
4678(define-public python-ipykernel
4679 (package
4680 (name "python-ipykernel")
4681 (version "5.1.0")
4682 (source
4683 (origin
4684 (method url-fetch)
4685 (uri (pypi-uri "ipykernel" version))
4686 (sha256
4687 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4688 (build-system python-build-system)
4689 (arguments
4690 `(#:phases
4691 (modify-phases %standard-phases
4692 (replace 'check
4693 (lambda _
4694 (setenv "HOME" "/tmp")
4695 (invoke "pytest" "-v")
4696 #t)))))
4697 (propagated-inputs
4698 `(("python-ipython" ,python-ipython)
4699 ;; imported at runtime during connect
4700 ("python-jupyter-client" ,python-jupyter-client)))
4701 (native-inputs
4702 `(("python-pytest" ,python-pytest)
4703 ("python-nose" ,python-nose)))
4704 (home-page "https://ipython.org")
4705 (synopsis "IPython Kernel for Jupyter")
4706 (description
4707 "This package provides the IPython kernel for Jupyter.")
4708 (license license:bsd-3)))
4709
4710(define-public python2-ipykernel
4711 (package-with-python2 python-ipykernel))
4712
966aa714
AE
4713(define-public python-pari-jupyter
4714 (package
4715 (name "python-pari-jupyter")
4716 (version "1.3.2")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 (uri (pypi-uri "pari_jupyter" version))
4721 (sha256
4722 (base32
4723 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4724 (build-system python-build-system)
4725 (propagated-inputs
4726 `(("python-ipykernel" ,python-ipykernel)))
4727 (inputs
4728 `(("pari-gp" ,pari-gp)
4729 ("readline" ,readline)))
4730 (arguments
4731 `(#:tests? #f)) ; no test suite
4732 (home-page
4733 "https://github.com/jdemeyer/pari_jupyter")
4734 (synopsis "A Jupyter kernel for PARI/GP")
4735 (description "The package provides a PARI/GP kernel for Jupyter.")
4736 (license license:gpl3+)))
4737
44d10b1f
RW
4738;; This is the latest release of the LTS version of ipython with support for
4739;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4740;; dropped support for Python 2.7. We may want to rename this package.
4741(define-public python-ipython
4742 (package
4743 (name "python-ipython")
4744 (version "5.8.0")
4745 (source
4746 (origin
4747 (method url-fetch)
4748 (uri (pypi-uri "ipython" version ".tar.gz"))
4749 (sha256
4750 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4751 (build-system python-build-system)
4752 (outputs '("out" "doc"))
4753 (propagated-inputs
4754 `(("python-pyzmq" ,python-pyzmq)
4755 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4756 ("python-terminado" ,python-terminado)
4757 ("python-matplotlib" ,python-matplotlib)
4758 ("python-numpy" ,python-numpy)
4759 ("python-numpydoc" ,python-numpydoc)
4760 ("python-jinja2" ,python-jinja2)
4761 ("python-mistune" ,python-mistune)
4762 ("python-pexpect" ,python-pexpect)
4763 ("python-pickleshare" ,python-pickleshare)
4764 ("python-simplegeneric" ,python-simplegeneric)
4765 ("python-jsonschema" ,python-jsonschema)
4766 ("python-traitlets" ,python-traitlets)
4767 ("python-nbformat" ,python-nbformat)
4768 ("python-pygments" ,python-pygments)))
4769 (inputs
4770 `(("readline" ,readline)
4771 ("which" ,which)))
4772 (native-inputs
4773 `(("graphviz" ,graphviz)
4774 ("pkg-config" ,pkg-config)
4775 ("python-requests" ,python-requests) ;; for tests
4776 ("python-testpath" ,python-testpath)
4777 ("python-nose" ,python-nose)
4778 ("python-sphinx" ,python-sphinx)
4779 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4780 ;; FIXME: It's possible that a smaller union would work just as well.
4781 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4782 texlive-fonts-ec
4783 texlive-generic-ifxetex
4784 texlive-generic-pdftex
4785 texlive-latex-amsfonts
4786 texlive-latex-capt-of
4787 texlive-latex-cmap
4788 texlive-latex-environ
4789 texlive-latex-eqparbox
4790 texlive-latex-etoolbox
4791 texlive-latex-expdlist
4792 texlive-latex-fancyhdr
4793 texlive-latex-fancyvrb
4794 texlive-latex-fncychap
4795 texlive-latex-float
4796 texlive-latex-framed
4797 texlive-latex-geometry
4798 texlive-latex-graphics
4799 texlive-latex-hyperref
4800 texlive-latex-mdwtools
4801 texlive-latex-multirow
4802 texlive-latex-oberdiek
4803 texlive-latex-parskip
4804 texlive-latex-preview
4805 texlive-latex-tabulary
4806 texlive-latex-threeparttable
4807 texlive-latex-titlesec
4808 texlive-latex-trimspaces
4809 texlive-latex-ucs
4810 texlive-latex-upquote
4811 texlive-latex-url
4812 texlive-latex-varwidth
4813 texlive-latex-wrapfig)))
4814 ("texinfo" ,texinfo)))
4815 (arguments
4816 `(#:phases
4817 (modify-phases %standard-phases
4818 (add-after 'install 'install-doc
4819 (lambda* (#:key inputs outputs #:allow-other-keys)
4820 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4821 (doc (string-append data "/doc/" ,name "-" ,version))
4822 (html (string-append doc "/html"))
4823 (man1 (string-append data "/man/man1"))
4824 (info (string-append data "/info"))
4825 (examples (string-append doc "/examples"))
4826 (python-arg (string-append "PYTHON=" (which "python"))))
4827 (setenv "LANG" "en_US.utf8")
4828 ;; Make installed package available for running the tests
4829 (add-installed-pythonpath inputs outputs)
4830 (with-directory-excursion "docs"
4831 ;; FIXME: pdf fails to build
4832 ;;(system* "make" "pdf" "PAPER=a4")
4833 (system* "make" python-arg "html")
4834 (system* "make" python-arg "info"))
4835 (copy-recursively "docs/man" man1)
4836 (copy-recursively "examples" examples)
4837 (copy-recursively "docs/build/html" html)
4838 ;; (copy-file "docs/build/latex/ipython.pdf"
4839 ;; (string-append doc "/ipython.pdf"))
4840 (mkdir-p info)
4841 (copy-file "docs/build/texinfo/ipython.info"
4842 (string-append info "/ipython.info"))
4843 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4844 #t))
4845 ;; Tests can only be run after the library has been installed and not
4846 ;; within the source directory.
4847 (delete 'check)
4848 (add-after 'install 'check
4849 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4850 (if tests?
4851 (begin
4852 ;; Make installed package available for running the tests
4853 (add-installed-pythonpath inputs outputs)
4854 (setenv "HOME" "/tmp/") ;; required by a test
4855 ;; We only test the core because one of the other tests
4856 ;; tries to import ipykernel.
4857 (invoke "python" "IPython/testing/iptest.py"
4858 "-v" "IPython/core/tests"))
4859 #t)))
4860 (add-before 'check 'fix-tests
4861 (lambda* (#:key inputs #:allow-other-keys)
4862 (substitute* "./IPython/utils/_process_posix.py"
4863 (("/usr/bin/env', 'which") (which "which")))
4864 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4865 (("#!/usr/bin/env python")
4866 (string-append "#!" (which "python"))))
4867 ;; Disable 1 failing test
4868 (substitute* "./IPython/core/tests/test_magic.py"
4869 (("def test_dirops\\(\\):" all)
4870 (string-append "@dec.skipif(True)\n" all)))
4871 ;; This test introduces a circular dependency on ipykernel
4872 ;; (which depends on ipython).
4873 (delete-file "IPython/core/tests/test_display.py")
4874 ;; These tests throw errors for unknown reasons.
4875 (delete-file "IPython/extensions/tests/test_storemagic.py")
4876 (delete-file "IPython/core/tests/test_displayhook.py")
4877 (delete-file "IPython/core/tests/test_interactiveshell.py")
4878 (delete-file "IPython/core/tests/test_pylabtools.py")
4879 (delete-file "IPython/core/tests/test_paths.py")
4880 #t)))))
4881 (home-page "https://ipython.org")
4882 (synopsis "IPython is a tool for interactive computing in Python")
4883 (description
4884 "IPython provides a rich architecture for interactive computing with:
4885Powerful interactive shells, a browser-based notebook, support for interactive
4886data visualization, embeddable interpreters and tools for parallel
4887computing.")
4888 (license license:bsd-3)
4889 (properties `((python2-variant . ,(delay python2-ipython))))))
4890
4891(define-public python2-ipython
4892 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4893 (package
4894 (inherit ipython)
4895 ;; FIXME: add pyreadline once available.
4896 (propagated-inputs
4897 `(("python2-backports-shutil-get-terminal-size"
4898 ,python2-backports-shutil-get-terminal-size)
4899 ("python2-pathlib2" ,python2-pathlib2)
4900 ,@(package-propagated-inputs ipython)))
4901 (native-inputs
4902 `(("python2-mock" ,python2-mock)
4903 ,@(package-native-inputs ipython))))))
4904
4905(define-public python-urwid
4906 (package
4907 (name "python-urwid")
4908 (version "2.0.1")
4909 (source
4910 (origin
4911 (method url-fetch)
4912 (uri (pypi-uri "urwid" version))
4913 (sha256
4914 (base32
4915 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4916 (build-system python-build-system)
4917 (home-page "http://urwid.org")
4918 (synopsis "Console user interface library for Python")
4919 (description
4920 "Urwid is a curses-based UI/widget library for Python. It includes many
4921features useful for text console applications.")
4922 (license license:lgpl2.1+)))
4923
4924(define-public python2-urwid
4925 (package-with-python2 python-urwid))
4926
4927(define-public python-urwidtrees
4928 (package
4929 (name "python-urwidtrees")
4930 (version "1.0.2")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 ;; package author intends on distributing via github rather than pypi:
4935 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4936 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4937 version ".tar.gz"))
4938 (file-name (string-append name "-" version ".tar.gz"))
4939 (sha256
4940 (base32
4941 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4942 (build-system python-build-system)
4943 (arguments
4944 '(#:tests? #f)) ; no tests
4945 (propagated-inputs `(("python-urwid" ,python-urwid)))
4946 (home-page "https://github.com/pazz/urwidtrees")
4947 (synopsis "Tree widgets for urwid")
4948 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4949toolkit. Use it to build trees of widgets.")
4950 (license license:gpl3+)))
4951
4952(define-public python2-urwidtrees
4953 (package-with-python2 python-urwidtrees))
4954
4955(define-public python-ua-parser
4956 (package
4957 (name "python-ua-parser")
4958 (version "0.8.0")
4959 (source
4960 (origin
4961 (method url-fetch)
4962 (uri (pypi-uri "ua-parser" version))
4963 (sha256
4964 (base32
4965 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4966 (build-system python-build-system)
4967 (arguments
4968 `(#:tests? #f)) ;no test suite in release
4969 (native-inputs
4970 `(("python-pyyaml" ,python-pyyaml)))
4971 (home-page "https://github.com/ua-parser/uap-python")
4972 (synopsis "User agent parser")
4973 (description
4974 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4975 (license license:asl2.0)))
4976
4977(define-public python2-ua-parser
4978 (package-with-python2 python-ua-parser))
4979
4980(define-public python-user-agents
4981 (package
4982 (name "python-user-agents")
4983 (version "1.1.0")
4984 (source
4985 (origin
4986 (method url-fetch)
4987 (uri (pypi-uri "user-agents" version))
4988 (sha256
4989 (base32
4990 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4991 (build-system python-build-system)
4992 (arguments
4993 `(#:tests? #f)) ;missing devices.json test file in release
4994 (propagated-inputs
4995 `(("python-ua-parser" ,python-ua-parser)))
4996 (home-page "https://github.com/selwin/python-user-agents")
4997 (synopsis "User Agent strings parsing library")
4998 (description
4999 "A library to identify devices (phones, tablets) and their capabilities by
5000parsing (browser/HTTP) user agent strings.")
5001 (license license:expat)))
5002
5003(define-public python2-user-agents
5004 (package-with-python2 python-user-agents))
5005
5006(define-public python-dbus
5007 (package
5008 (name "python-dbus")
5009 (version "1.2.8")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5014 "dbus-python-" version ".tar.gz"))
5015 (sha256
5016 (base32
5017 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5018 (build-system gnu-build-system)
5019 (arguments
5020 '(#:phases
5021 (modify-phases %standard-phases
5022 (add-before
5023 'check 'pre-check
5024 (lambda _
5025 ;; XXX: For the missing '/etc/machine-id'.
5026 (substitute* "test/run-test.sh"
5027 (("DBUS_FATAL_WARNINGS=1")
5028 "DBUS_FATAL_WARNINGS=0"))
5029 #t)))))
5030 (native-inputs
5031 `(("pkg-config" ,pkg-config)))
5032 (inputs
5033 `(("python" ,python-wrapper)
5034 ("dbus-glib" ,dbus-glib)))
5035 (synopsis "Python bindings for D-bus")
5036 (description "python-dbus provides bindings for libdbus, the reference
5037implementation of D-Bus.")
5038 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5039 (license license:expat)))
5040
5041(define-public python2-dbus
5042 (package (inherit python-dbus)
5043 (name "python2-dbus")
5044 (inputs `(("python" ,python-2)
5045 ,@(alist-delete "python"
5046 (package-inputs python-dbus)
5047 equal?)))
5048 ;; FIXME: on Python 2, the test_utf8 fails with:
5049 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5050 (arguments `(#:tests? #f))))
5051
5052(define-public python-lxml
5053 (package
5054 (name "python-lxml")
5055 (version "4.2.5")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "lxml" version))
5060 (sha256
5061 (base32
5062 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5063 (build-system python-build-system)
5064 (inputs
5065 `(("libxml2" ,libxml2)
5066 ("libxslt" ,libxslt)))
5067 (home-page "http://lxml.de/")
5068 (synopsis
5069 "Python XML processing library")
5070 (description
5071 "The lxml XML toolkit is a Pythonic binding for the C libraries
5072libxml2 and libxslt.")
5073 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5074
5075(define-public python2-lxml
5076 (package-with-python2 python-lxml))
5077
5078;; beautifulsoup4 has a totally different namespace than 3.x,
5079;; and pypi seems to put it under its own name, so I guess we should too
5080(define-public python-beautifulsoup4
5081 (package
5082 (name "python-beautifulsoup4")
5083 (version "4.6.3")
5084 (source
5085 (origin
5086 (method url-fetch)
5087 (uri (pypi-uri "beautifulsoup4" version))
5088 (sha256
5089 (base32
5090 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5091 (build-system python-build-system)
5092 (arguments
5093 `(#:phases
5094 (modify-phases %standard-phases
5095 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5096 ;; must use this conversion script when building with Python 3. The
5097 ;; conversion script also runs the tests.
5098 ;; For more information, see the file 'convert-py3k' in the source
5099 ;; distribution.
5100 (replace 'check
dff0197e 5101 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5102 (home-page
5103 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5104 (synopsis
5105 "Python screen-scraping library")
5106 (description
5107 "Beautiful Soup is a Python library designed for rapidly setting up
5108screen-scraping projects. It offers Pythonic idioms for navigating,
5109searching, and modifying a parse tree, providing a toolkit for
5110dissecting a document and extracting what you need. It automatically
5111converts incoming documents to Unicode and outgoing documents to UTF-8.")
5112 (license license:expat)
5113 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5114
5115(define-public python2-beautifulsoup4
5116 (package
5117 (inherit (package-with-python2
5118 (strip-python2-variant python-beautifulsoup4)))
5119 (arguments `(#:python ,python-2))))
5120
5121(define-public python-netifaces
5122 (package
5123 (name "python-netifaces")
5124 (version "0.10.7")
5125 (source
5126 (origin
5127 (method url-fetch)
5128 (uri (pypi-uri "netifaces" version))
5129 (sha256
5130 (base32
5131 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5132 (build-system python-build-system)
5133 (home-page "https://github.com/al45tair/netifaces")
5134 (synopsis
5135 "Python module for portable network interface information")
5136 (description
5137 "Netifaces is a Python module providing information on network
5138interfaces in an easy and portable manner.")
5139 (license license:expat)))
5140
5141(define-public python2-netifaces
5142 (package-with-python2 python-netifaces))
5143
5144(define-public python-networkx
5145 (package
5146 (name "python-networkx")
5147 (version "2.2")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (pypi-uri "networkx" version ".zip"))
5152 (sha256
5153 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5154 (build-system python-build-system)
5155 ;; python-decorator is needed at runtime.
5156 (propagated-inputs
5157 `(("python-decorator" ,python-decorator)))
5158 (native-inputs
5159 `(("python-nose" ,python-nose)
5160 ("unzip" ,unzip)))
5161 (home-page "https://networkx.github.io/")
5162 (synopsis "Python module for creating and manipulating graphs and networks")
5163 (description
5164 "NetworkX is a Python package for the creation, manipulation, and study
5165of the structure, dynamics, and functions of complex networks.")
5166 (license license:bsd-3)))
5167
5168(define-public python2-networkx
5169 (package-with-python2 python-networkx))
5170
5171(define-public python-datrie
5172 (package
5173 (name "python-datrie")
5174 (version "0.7.1")
5175 (source
5176 (origin
5177 (method url-fetch)
5178 (uri (pypi-uri "datrie" version))
5179 (sha256
5180 (base32
5181 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5182 (build-system python-build-system)
5183 (arguments
5184 `(#:phases (modify-phases %standard-phases
5185 (add-before 'build 'cythonize
5186 (lambda _
5187 ;; Regenerate Cython classes to solve ABI issues with Python
5188 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5189 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5190 "src/stdio_ext.pxd" "-a"))))))
5191 (native-inputs
5192 `(("python-cython" ,python-cython)
5193 ("python-hypothesis" ,python-hypothesis)
5194 ("python-pytest" ,python-pytest)
5195 ("python-pytest-runner" ,python-pytest-runner)))
5196 (home-page "https://github.com/kmike/datrie")
5197 (synopsis "Fast, efficiently stored trie for Python")
5198 (description
5199 "This package provides a fast, efficiently stored trie implementation for
5200Python.")
5201 (license license:lgpl2.1+)))
5202
5203(define-public snakemake
5204 (package
5205 (name "snakemake")
5206 (version "5.2.4")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "snakemake" version))
5211 (sha256
5212 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5213 (build-system python-build-system)
5214 (arguments
5215 ;; TODO: Package missing test dependencies.
5216 '(#:tests? #f
5217 #:phases
5218 (modify-phases %standard-phases
5219 ;; For cluster execution Snakemake will call Python. Since there is
5220 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5221 ;; this by calling the snakemake wrapper instead.
5222 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5223 (lambda* (#:key outputs #:allow-other-keys)
5224 (substitute* "snakemake/executors.py"
5225 (("\\{sys.executable\\} -m snakemake")
5226 (string-append (assoc-ref outputs "out")
5227 "/bin/snakemake")))
5228 #t)))))
5229 (propagated-inputs
5230 `(("python-gitpython" ,python-gitpython)
5231 ("python-wrapt" ,python-wrapt)
5232 ("python-requests" ,python-requests)
5233 ("python-appdirs" ,python-appdirs)
5234 ("python-configargparse" ,python-configargparse)
5235 ("python-datrie" ,python-datrie)
5236 ("python-docutils" ,python-docutils)
5237 ("python-jinja2" ,python-jinja2)
5238 ("python-jsonschema" ,python-jsonschema)
5239 ("python-networkx" ,python-networkx)
5240 ("python-pyyaml" ,python-pyyaml)
5241 ("python-ratelimiter" ,python-ratelimiter)))
5242 (home-page "https://snakemake.readthedocs.io")
5243 (synopsis "Python-based execution environment for make-like workflows")
5244 (description
5245 "Snakemake aims to reduce the complexity of creating workflows by
5246providing a clean and modern domain specific specification language (DSL) in
5247Python style, together with a fast and comfortable execution environment.")
5248 (license license:expat)))
5249
5250;; This is currently needed for the pigx-* packages.
5251(define-public snakemake-4
5252 (package (inherit snakemake)
5253 (version "4.4.0")
5254 (source
5255 (origin
5256 (method url-fetch)
5257 (uri (pypi-uri "snakemake" version))
5258 (sha256
5259 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5260 (propagated-inputs
5261 `(("python-wrapt" ,python-wrapt)
5262 ("python-requests" ,python-requests)
5263 ("python-appdirs" ,python-appdirs)
5264 ("python-configargparse" ,python-configargparse)
5265 ("python-pyyaml" ,python-pyyaml)
5266 ("python-ratelimiter" ,python-ratelimiter)))))
5267
5268(define-public python-pyqrcode
5269 (package
5270 (name "python-pyqrcode")
5271 (version "1.2.1")
5272 (source
5273 (origin
5274 (method url-fetch)
5275 (uri (pypi-uri "PyQRCode" version))
5276 (sha256
5277 (base32
5278 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5279 (build-system python-build-system)
5280 (home-page
5281 "https://github.com/mnooner256/pyqrcode")
5282 (synopsis "QR code generator")
5283 (description
5284 "Pyqrcode is a QR code generator written purely in Python with
5285SVG, EPS, PNG and terminal output.")
5286 (license license:bsd-3)))
5287
5288(define-public python-seaborn
5289 (package
5290 (name "python-seaborn")
5291 (version "0.9.0")
5292 (source
5293 (origin
5294 (method url-fetch)
5295 (uri (pypi-uri "seaborn" version))
5296 (sha256
5297 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5298 (build-system python-build-system)
5299 (arguments
5300 `(#:phases
5301 (modify-phases %standard-phases
5302 (add-before 'check 'start-xserver
5303 (lambda* (#:key inputs #:allow-other-keys)
5304 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5305 ;; There must be a running X server and make check doesn't
5306 ;; start one. Therefore we must do it.
5307 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5308 (setenv "DISPLAY" ":1")
5309 #t)))
5310 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5311 (propagated-inputs
5312 `(("python-pandas" ,python-pandas)
5313 ("python-matplotlib" ,python-matplotlib)
5314 ("python-numpy" ,python-numpy)
5315 ("python-scipy" ,python-scipy)))
5316 (native-inputs
5317 `(("python-pytest" ,python-pytest)
5318 ("xorg-server" ,xorg-server)))
5319 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5320 (synopsis "Statistical data visualization")
5321 (description
5322 "Seaborn is a library for making attractive and informative statistical
5323graphics in Python. It is built on top of matplotlib and tightly integrated
5324with the PyData stack, including support for numpy and pandas data structures
5325and statistical routines from scipy and statsmodels.")
5326 (license license:bsd-3)))
5327
5328(define-public python2-seaborn
5329 (package-with-python2 python-seaborn))
5330
5331(define-public python-mpmath
5332 (package
5333 (name "python-mpmath")
5334 (version "0.19")
5335 (source (origin
5336 (method url-fetch)
5337 (uri (string-append "http://mpmath.org/files/mpmath-"
5338 version ".tar.gz"))
5339 (sha256
5340 (base32
5341 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5342 (build-system python-build-system)
5343 (arguments
5344 '(#:phases
5345 (modify-phases %standard-phases
5346 (replace 'check
5347 (lambda _
5d7a6f1c 5348 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5349 (home-page "http://mpmath.org")
5350 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5351 (description
5352 "@code{mpmath} can be used as an arbitrary-precision substitute for
5353Python's float/complex types and math/cmath modules, but also does much
5354more advanced mathematics.")
5355 (license license:bsd-3)))
5356
5357(define-public python2-mpmath
5358 (package-with-python2 python-mpmath))
5359
5360(define-public python-bigfloat
5361 (package
5362 (name "python-bigfloat")
5363 (version "0.3.0")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri (pypi-uri "bigfloat" version))
5368 (sha256
5369 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5370 (build-system python-build-system)
5371 (inputs
5372 `(("mpfr" ,mpfr)))
5373 (home-page "https://github.com/mdickinson/bigfloat")
5374 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5375 (description
5376 "This packages provides a Python interface to the MPFR library for
5377multiprecision arithmetic.")
5378 (license license:lgpl3+)))
5379
5380(define-public python2-bigfloat
5381 (package-with-python2 python-bigfloat))
5382
5383(define-public python-sympy
5384 (package
5385 (name "python-sympy")
5386 (version "1.1.1")
5387 (source
5388 (origin
5389 (method url-fetch)
5390 (uri (string-append
5391 "https://github.com/sympy/sympy/releases/download/sympy-"
5392 version "/sympy-" version ".tar.gz"))
5393 (sha256
5394 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5395 (build-system python-build-system)
5396 (arguments
5397 `(#:phases
5398 (modify-phases %standard-phases
5399 ;; Run the core tests after installation. By default it would run
5400 ;; *all* tests, which take a very long time to complete and are known
5401 ;; to be flaky.
5402 (delete 'check)
5403 (add-after 'install 'check
5404 (lambda* (#:key outputs #:allow-other-keys)
5405 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5406 #t)))))
5407 (propagated-inputs
5408 `(("python-mpmath" ,python-mpmath)))
5409 (home-page "http://www.sympy.org/")
5410 (synopsis "Python library for symbolic mathematics")
5411 (description
5412 "SymPy is a Python library for symbolic mathematics. It aims to become a
5413full-featured computer algebra system (CAS) while keeping the code as simple
5414as possible in order to be comprehensible and easily extensible.")
5415 (license license:bsd-3)))
5416
5417(define-public python2-sympy
5418 (package
5419 (inherit (package-with-python2 python-sympy))
5420 (arguments
5421 `(#:phases
5422 (modify-phases %standard-phases
5423 ;; Run the core tests after installation. By default it would run
5424 ;; *all* tests, which take a very long time to complete and are known
5425 ;; to be flaky.
5426 (delete 'check)
5427 (add-after 'install 'check
5428 (lambda* (#:key outputs #:allow-other-keys)
5429 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5430 #t)))))))
5431
5432(define-public python-q
5433 (package
5434 (name "python-q")
5435 (version "2.6")
5436 (source
5437 (origin
5438 (method url-fetch)
5439 (uri (pypi-uri "q" version))
5440 (sha256
5441 (base32
5442 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5443 (build-system python-build-system)
5444 (home-page "https://github.com/zestyping/q")
5445 (synopsis "Quick-and-dirty debugging output for tired programmers")
5446 (description
5447 "q is a Python module for \"print\" style of debugging Python code. It
5448provides convenient short API for print out of values, tracebacks, and
5449falling into the Python interpreter.")
5450 (license license:asl2.0)))
5451
5452(define-public python2-q
5453 (package-with-python2 python-q))
5454
5455(define-public python2-xlib
5456 (package
5457 (name "python2-xlib")
5458 (version "0.14")
5459 (source (origin
5460 (method url-fetch)
5461 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5462 "/" version "/"
5463 "python-xlib-" version ".tar.gz"))
5464 (sha256
5465 (base32
5466 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5467 (build-system python-build-system)
5468 (arguments
5469 `(#:python ,python-2 ;Python 2 only
5470 #:tests? #f)) ;no tests
5471 (home-page "http://python-xlib.sourceforge.net/")
5472 (synopsis "Python X11 client library")
5473 (description
5474 "The Python X Library is intended to be a fully functional X client
5475library for Python programs. It is useful to implement low-level X clients.
5476It is written entirely in Python.")
5477 (license license:gpl2+)))
5478
5479(define-public python-singledispatch
5480 (package
5481 (name "python-singledispatch")
5482 (version "3.4.0.3")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (pypi-uri "singledispatch" version))
5487 (sha256
5488 (base32
5489 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5490 (build-system python-build-system)
5491 (native-inputs
5492 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5493 (home-page
5494 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5495 (synopsis "Backport of singledispatch feature from Python 3.4")
5496 (description
5497 "This library brings functools.singledispatch from Python 3.4 to Python
54982.6-3.3.")
5499 (license license:expat)))
5500
5501(define-public python2-singledispatch
5502 (package-with-python2 python-singledispatch))
5503
5504;; the python- version can be removed with python-3.5
5505(define-public python-backports-abc
5506 (package
5507 (name "python-backports-abc")
5508 (version "0.5")
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "backports_abc" version))
5513 (sha256
5514 (base32
5515 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5516 (build-system python-build-system)
5517 (home-page "https://github.com/cython/backports_abc")
5518 (synopsis "Backport of additions to the 'collections.abc' module")
5519 (description
5520 "Python-backports-abc provides a backport of additions to the
5521'collections.abc' module in Python-3.5.")
5522 (license license:psfl)))
5523
5524(define-public python2-backports-abc
5525 (package-with-python2 python-backports-abc))
5526
5527(define-public python-backports-csv
5528 (package
5529 (name "python-backports-csv")
5530 (version "1.0.5")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (pypi-uri "backports.csv" version))
5535 (sha256
5536 (base32
5537 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5538 (build-system python-build-system)
5539 (home-page "https://github.com/ryanhiebert/backports.csv")
5540 (synopsis "Backport of Python 3's csv module for Python 2")
5541 (description
5542 "Provides a backport of Python 3's @code{csv} module for parsing
5543comma separated values. The API of the @code{csv} module in Python 2
5544is drastically different from the @code{csv} module in Python 3.
5545This is due, for the most part, to the difference between str in
5546Python 2 and Python 3.")
5547 (license license:psfl)))
5548
5549(define-public python2-backports-csv
5550 (package-with-python2 python-backports-csv))
5551
5552(define-public python2-backports-shutil-get-terminal-size
5553 (package
5554 (name "python2-backports-shutil-get-terminal-size")
5555 (version "1.0.0")
5556 (source
5557 (origin
5558 (method url-fetch)
5559 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5560 (sha256
5561 (base32
5562 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5563 (build-system python-build-system)
5564 (arguments
5565 `(#:python ,python-2
5566 #:phases
5567 (modify-phases %standard-phases
5568 (replace 'check
5569 (lambda _
4a4a7d9a 5570 (invoke "py.test" "-v"))))))
44d10b1f
RW
5571 (native-inputs
5572 `(("python2-pytest" ,python2-pytest)))
5573 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5574 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5575 (description
5576 "This package provides a backport of the @code{get_terminal_size
5577function} from Python 3.3's @code{shutil}.
5578Unlike the original version it is written in pure Python rather than C,
5579so it might be a tiny bit slower.")
5580 (license license:expat)))
5581
5582(define-public python-waf
5583 (package
5584 (name "python-waf")
5585 (version "2.0.11")
5586 (source (origin
5587 (method url-fetch)
5588 (uri (string-append "https://waf.io/"
5589 "waf-" version ".tar.bz2"))
5590 (sha256
5591 (base32
5592 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5593 (build-system python-build-system)
5594 (arguments
5595 '(#:phases
5596 (modify-phases %standard-phases
5597 (replace 'build
5598 (lambda _
5599 (invoke "python" "waf-light" "configure" "build")))
5600 (replace 'check
5601 (lambda _
5602 (invoke "python" "waf" "--version")))
5603 (replace 'install
5604 (lambda* (#:key outputs #:allow-other-keys)
5605 (let ((out (assoc-ref outputs "out")))
5606 (install-file "waf" (string-append out "/bin")))
5607 #t))
5608 ;; waf breaks when it is wrapped.
5609 (delete 'wrap))))
5610 (home-page "https://waf.io/")
5611 (synopsis "Python-based build system")
5612 (description
5613 "Waf is a Python-based framework for configuring, compiling and installing
5614applications.")
5615 (license license:bsd-3)))
5616
5617(define-public python2-waf
5618 (package-with-python2 python-waf))
5619
5620(define-public python-pyzmq
5621 (package
5622 (name "python-pyzmq")
5623 (version "17.1.2")
5624 (source
5625 (origin
5626 (method url-fetch)
5627 (uri (pypi-uri "pyzmq" version))
5628 (sha256
5629 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5630 (build-system python-build-system)
5631 (arguments
5632 `(#:configure-flags
5633 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5634 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5635 ;; --inplace' for 'python setup.py test' to work.
5636 #:tests? #f))
5637 (inputs
5638 `(("zeromq" ,zeromq)))
5639 (native-inputs
5640 `(("pkg-config" ,pkg-config)
5641 ("python-nose" ,python-nose)))
5642 (home-page "https://github.com/zeromq/pyzmq")
5643 (synopsis "Python bindings for 0MQ")
5644 (description
5645 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5646 (license license:bsd-4)))
5647
5648(define-public python2-pyzmq
5649 (package-with-python2 python-pyzmq))
5650
5651(define-public python-pep8
5652 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5653 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5654 ;; some dependents' test suites, and nothing more.
5655 (package
5656 (name "python-pep8")
5657 (version "1.7.0")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "pep8" version))
5662 (sha256
5663 (base32
5664 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5665 (build-system python-build-system)
5666 (home-page "https://pep8.readthedocs.org/")
5667 (synopsis "Python style guide checker")
5668 (description
5669 "This tools checks Python code against some of the style conventions in
5670PEP 8.")
5671 (license license:expat)))
5672
5673(define-public python2-pep8
5674 (package-with-python2 python-pep8))
5675
5676(define-public python-pyflakes
5677 (package
5678 (name "python-pyflakes")
5679 (version "2.0.0")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (pypi-uri "pyflakes" version))
5684 (sha256
5685 (base32
5686 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5687 (build-system python-build-system)
5688 (home-page
5689 "https://github.com/pyflakes/pyflakes")
5690 (synopsis "Passive checker of Python programs")
5691 (description
5692 "Pyflakes statically checks Python source code for common errors.")
5693 (license license:expat)))
5694
5695(define-public python2-pyflakes
5696 (package-with-python2 python-pyflakes))
5697
5698(define-public python-mccabe
5699 (package
5700 (name "python-mccabe")
5701 (version "0.6.1")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "mccabe" version))
5706 (sha256
5707 (base32
5708 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5709 (build-system python-build-system)
5710 (native-inputs
5711 `(("python-pytest" ,python-pytest-bootstrap)
5712 ("python-pytest-runner" ,python-pytest-runner)))
5713 (home-page "https://github.com/flintwork/mccabe")
5714 (synopsis "McCabe checker, plugin for flake8")
5715 (description
5716 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5717complexity of Python source code.")
5718 (license license:expat)))
5719
5720(define-public python2-mccabe
5721 (package-with-python2 python-mccabe))
5722
5723(define-public python-mccabe-0.2.1
5724 (package (inherit python-mccabe)
5725 (version "0.2.1")
5726 (source
5727 (origin
5728 (method url-fetch)
5729 (uri (pypi-uri "mccabe" version))
5730 (sha256
5731 (base32
5732 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5733
5734(define-public python2-mccabe-0.2.1
5735 (package-with-python2 python-mccabe-0.2.1))
5736
5737;; Flake8 2.4.1 requires an older version of pep8.
5738;; This should be removed ASAP.
5739(define-public python-pep8-1.5.7
5740 (package (inherit python-pep8)
5741 (version "1.5.7")
5742 (source
f3576970
RW
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "pep8" version))
5746 (sha256
5747 (base32
5748 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5749 (arguments
5750 ;; XXX Tests not compatible with Python 3.5.
5751 '(#:tests? #f))))
5752
5753(define-public python2-pep8-1.5.7
5754 (package-with-python2 python-pep8-1.5.7))
5755
5756;; Flake8 2.4.1 requires an older version of pyflakes.
5757;; This should be removed ASAP.
5758(define-public python-pyflakes-0.8.1
5759 (package (inherit python-pyflakes)
5760 (version "0.8.1")
5761 (source
8c4dffb5
RW
5762 (origin
5763 (method url-fetch)
5764 (uri (pypi-uri "pyflakes" version))
5765 (sha256
5766 (base32
5767 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5768 (arguments
5769 ;; XXX Tests not compatible with Python 3.5.
5770 '(#:tests? #f))))
5771
5772(define-public python2-pyflakes-0.8.1
5773 (package-with-python2 python-pyflakes-0.8.1))
5774
5775;; This package is used by hypothesis which has thousands of dependent packages.
5776;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5777(define-public python-flake8-3.5
5778 (package
5779 (name "python-flake8")
5780 (version "3.5.0")
5781 (source
5782 (origin
5783 (method url-fetch)
5784 (uri (pypi-uri "flake8" version))
5785 (sha256
5786 (base32
5787 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5788 (build-system python-build-system)
5789 (arguments
5790 `(#:phases
5791 (modify-phases %standard-phases
5792 ;; Two errors don't seem to have assigned codes.
5793 (add-after 'unpack 'delete-broken-test
5794 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5795 (add-after 'unpack 'fix-problem-with-pycodestyle
5796 (lambda _
5797 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5798 ;; This should no longer be needed with the next release.
5799 (substitute* "setup.py"
5800 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5801 "PEP8_PLUGIN('break_after_binary_operator'),\
5802PEP8_PLUGIN('break_before_binary_operator'),"))
5803 #t))
5804 (delete 'check)
5805 (add-after 'install 'check
5806 (lambda* (#:key inputs outputs #:allow-other-keys)
5807 (add-installed-pythonpath inputs outputs)
5808 (invoke "pytest" "-v")
5809 #t)))))
5810 (propagated-inputs
5811 `(("python-pycodestyle" ,python-pycodestyle)
5812 ("python-pyflakes" ,python-pyflakes)
5813 ("python-mccabe" ,python-mccabe)))
5814 (native-inputs
5815 `(("python-mock" ,python-mock)
5816 ("python-pytest" ,python-pytest-bootstrap)
5817 ("python-pytest-runner" ,python-pytest-runner)))
5818 (home-page "https://gitlab.com/pycqa/flake8")
5819 (synopsis
5820 "The modular source code checker: pep8, pyflakes and co")
5821 (description
5822 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5823 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5824 (license license:expat)))
5825
5826(define-public python2-flake8-3.5
5827 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5828 (package (inherit base)
5829 (propagated-inputs
5830 `(("python2-configparser" ,python2-configparser)
5831 ("python2-enum34" ,python2-enum34)
5832 ,@(package-propagated-inputs base))))))
5833
5834;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5835;; this newer version. Keep it as a separate variable for now to avoid
5836;; rebuilding "python-hypothesis"; this should be removed in the next
5837;; rebuild cycle.
5838(define-public python-flake8
5839 (package
5840 (inherit python-flake8-3.5)
5841 (version "3.6.0")
5842 (source (origin
5843 (method url-fetch)
5844 (uri (pypi-uri "flake8" version))
5845 (sha256
5846 (base32
5847 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5848 (arguments
5849 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5850 ((#:phases phases)
5851 `(modify-phases ,phases
5852 (delete 'delete-broken-test)
5853 (delete 'fix-problem-with-pycodestyle)))))
5854 (properties `((python2-variant . ,(delay python2-flake8))))))
5855
5856(define-public python2-flake8
5857 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5858 (package (inherit base)
5859 (propagated-inputs
5860 (package-propagated-inputs python2-flake8-3.5)))))
5861
5862;; python-hacking requires flake8 <2.6.0.
5863(define-public python-flake8-2.5
5864 (package
5865 (inherit python-flake8)
5866 (version "2.5.5")
5867 (source (origin
5868 (method url-fetch)
5869 (uri (pypi-uri "flake8" version))
5870 (sha256
5871 (base32
5872 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5873 (propagated-inputs
5874 `(("python-pep8" ,python-pep8)
5875 ,@(package-propagated-inputs python-flake8)))
5876 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5877
5878(define-public python2-flake8-2.5
5879 (package
5880 (inherit python2-flake8)
5881 (version (package-version python-flake8-2.5))
5882 (source (origin
5883 (inherit (package-source python-flake8-2.5))))
5884 (propagated-inputs
5885 `(("python2-pep8" ,python2-pep8)
5886 ,@(package-propagated-inputs python2-flake8)))))
5887
5888(define-public python-flake8-polyfill
5889 (package
5890 (name "python-flake8-polyfill")
5891 (version "1.0.2")
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "flake8-polyfill" version))
5896 (sha256
5897 (base32
5898 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5899 (build-system python-build-system)
5900 (arguments
5901 '(#:phases
5902 (modify-phases %standard-phases
5903 (replace 'check
5904 (lambda _
5905 (setenv "PYTHONPATH"
5906 (string-append (getcwd) "/build/lib:"
5907 (getenv "PYTHONPATH")))
4f0a0894 5908 (invoke "py.test" "-v"))))))
44d10b1f
RW
5909 (native-inputs
5910 `(("python-flake8" ,python-flake8)
5911 ("python-mock" ,python-mock)
5912 ("python-pep8" ,python-pep8)
5913 ("python-pycodestyle" ,python-pycodestyle)
5914 ("python-pytest" ,python-pytest)))
5915 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5916 (synopsis "Polyfill package for Flake8 plugins")
5917 (description
5918 "This package that provides some compatibility helpers for Flake8
5919plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5920 (license license:expat)))
5921
5922(define-public python2-flake8-polyfill
5923 (package-with-python2 python-flake8-polyfill))
5924
5925(define-public python-mistune
5926 (package
5927 (name "python-mistune")
5928 (version "0.8.4")
5929 (source
5930 (origin
5931 (method url-fetch)
5932 (uri (pypi-uri "mistune" version))
5933 (sha256
5934 (base32
5935 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5936 (build-system python-build-system)
5937 (native-inputs
5938 `(("python-nose" ,python-nose)
5939 ("python-cython" ,python-cython)))
5940 (home-page "https://github.com/lepture/mistune")
5941 (synopsis "Markdown parser in pure Python")
5942 (description "This package provides a fast markdown parser in pure
5943Python.")
5944 (license license:bsd-3)))
5945
5946(define-public python2-mistune
5947 (package-with-python2 python-mistune))
5948
5949(define-public python-markdown
5950 (package
5951 (name "python-markdown")
5952 (version "3.0.1")
5953 (source
5954 (origin
5955 (method url-fetch)
5956 (uri (pypi-uri "Markdown" version))
5957 (sha256
5958 (base32
5959 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5960 (build-system python-build-system)
5961 (native-inputs
5962 `(("python-nose" ,python-nose)
5963 ("python-pyyaml" ,python-pyyaml)))
5964 (home-page "https://python-markdown.github.io/")
5965 (synopsis "Python implementation of Markdown")
5966 (description
5967 "This package provides a Python implementation of John Gruber's
5968Markdown. The library features international input, various Markdown
5969extensions, and several HTML output formats. A command line wrapper
5970markdown_py is also provided to convert Markdown files to HTML.")
5971 (license license:bsd-3)))
5972
5973(define-public python2-markdown
5974 (package-with-python2 python-markdown))
5975
5976(define-public python-ptyprocess
5977 (package
5978 (name "python-ptyprocess")
5979 (version "0.5.2")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "ptyprocess" version))
5984 (sha256
5985 (base32
5986 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5987 (build-system python-build-system)
5988 (native-inputs
5989 `(("python-nose" ,python-nose)))
5990 (arguments
5991 `(#:phases
5992 (modify-phases %standard-phases
5993 (replace 'check
7904d6fa 5994 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5995 (home-page "https://github.com/pexpect/ptyprocess")
5996 (synopsis "Run a subprocess in a pseudo terminal")
5997 (description
5998 "This package provides a Python library used to launch a subprocess in a
5999pseudo terminal (pty), and interact with both the process and its pty.")
6000 (license license:isc)))
6001
6002(define-public python2-ptyprocess
6003 (package-with-python2 python-ptyprocess))
6004
6005(define-public python-cram
6006 (package
6007 (name "python-cram")
6008 (version "0.7")
6009 (home-page "https://bitheap.org/cram/")
6010 (source (origin
6011 (method url-fetch)
6012 (uri (list (string-append home-page "cram-"
6013 version ".tar.gz")
6014 (pypi-uri "cram" version)))
6015 (sha256
6016 (base32
6017 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6018 (arguments
6019 '(#:phases
6020 (modify-phases %standard-phases
6021 (add-after 'unpack 'patch-source
6022 (lambda _
6023 (substitute* (find-files "cram" ".*\\.py$")
6024 ;; Replace default shell path.
6025 (("/bin/sh") (which "sh")))
6026 (substitute* (find-files "tests" ".*\\.t$")
6027 (("md5") "md5sum")
6028 (("/bin/bash") (which "bash"))
6029 (("/bin/sh") (which "sh")))
6030 (substitute* "cram/_test.py"
6031 ;; This hack works around a bug triggered by substituting
6032 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6033 ;; "cram -h", which breaks the output at 80 characters. This
6034 ;; causes the line showing the default shell to break into two
6035 ;; lines, but the test expects a single line...
6036 (("env\\['COLUMNS'\\] = '80'")
6037 "env['COLUMNS'] = '160'"))
6038 #t))
6039 (delete 'check)
6040 (add-after 'install 'check
6041 ;; The test phase uses the built library and executable.
6042 ;; It's easier to run it after install since the build
6043 ;; directory contains version-specific PATH.
6044 (lambda* (#:key inputs outputs #:allow-other-keys)
6045 (add-installed-pythonpath inputs outputs)
6046 (setenv "PATH" (string-append (getenv "PATH") ":"
6047 (assoc-ref outputs "out") "/bin"))
2d7db192 6048 (invoke "make" "test"))))))
44d10b1f
RW
6049 (build-system python-build-system)
6050 (native-inputs
6051 `(("python-coverage" ,python-coverage)
6052 ("which" ,which)))
6053 (synopsis "Simple testing framework for command line applications")
6054 (description
6055 "Cram is a functional testing framework for command line applications.
6056Cram tests look like snippets of interactive shell sessions. Cram runs each
6057command and compares the command output in the test with the command’s actual
6058output.")
6059 (license license:gpl2+)))
6060
6061(define-public python2-cram
6062 (package-with-python2 python-cram))
6063
6064(define-public python-straight-plugin
6065 (package
6066 (name "python-straight-plugin")
6067 (version "1.4.1")
6068 (source
6069 (origin
6070 (method url-fetch)
6071 (uri (pypi-uri "straight.plugin" version))
6072 (sha256
6073 (base32
6074 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6075 (build-system python-build-system)
6076 (home-page "https://github.com/ironfroggy/straight.plugin")
6077 (synopsis "Simple namespaced plugin facility")
6078 (description "Straight Plugin provides a type of plugin you can create from
6079almost any existing Python modules, and an easy way for outside developers to
6080add functionality and customization to your projects with their own plugins.")
6081 (license license:expat)))
6082
6083(define-public python2-straight-plugin
6084 (package-with-python2 python-straight-plugin))
6085
6086(define-public python-fonttools
6087 (package
6088 (name "python-fonttools")
6089 (version "3.28.0")
6090 (source (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "fonttools" version ".zip"))
6093 (sha256
6094 (base32
6095 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6096 (build-system python-build-system)
6097 (native-inputs
6098 `(("unzip" ,unzip)
6099 ("python-pytest" ,python-pytest)
6100 ("python-pytest-runner" ,python-pytest-runner)))
6101 (home-page "https://github.com/behdad/fonttools")
6102 (synopsis "Tools to manipulate font files")
6103 (description
6104 "FontTools/TTX is a library to manipulate font files from Python. It
6105supports reading and writing of TrueType/OpenType fonts, reading and writing
6106of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6107also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6108from an XML-based format.")
6109 (license license:expat)))
6110
6111(define-public python2-fonttools
6112 (package-with-python2 python-fonttools))
6113
6114(define-public python-ly
6115 (package
6116 (name "python-ly")
6117 (version "0.9.5")
6118 (source
6119 (origin
6120 (method url-fetch)
6121 (uri (pypi-uri name version))
6122 (sha256
6123 (base32
6124 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6125 (build-system python-build-system)
6126 (arguments
6127 ;; FIXME: Some tests need network access.
6128 '(#:tests? #f))
6129 (synopsis "Tool and library for manipulating LilyPond files")
6130 (description "This package provides a Python library to parse, manipulate
6131or create documents in LilyPond format. A command line program ly is also
6132provided that can be used to do various manipulations with LilyPond files.")
6133 (home-page "https://pypi.python.org/pypi/python-ly")
6134 (license license:gpl2+)))
6135
6136(define-public python-appdirs
6137 (package
6138 (name "python-appdirs")
6139 (version "1.4.3")
6140 (source
6141 (origin
6142 (method url-fetch)
6143 (uri (pypi-uri "appdirs" version))
6144 (sha256
6145 (base32
6146 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6147 (build-system python-build-system)
6148 (home-page "https://github.com/ActiveState/appdirs")
6149 (synopsis
6150 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6151 (description
6152 "This module provides a portable way of finding out where user data
6153should be stored on various operating systems.")
6154 (license license:expat)))
6155
6156(define-public python2-appdirs
6157 (package-with-python2 python-appdirs))
6158
6159(define-public python-llfuse
6160 (package
6161 (name "python-llfuse")
6162 (version "1.3.5")
6163 (source (origin
6164 (method url-fetch)
6165 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6166 (sha256
6167 (base32
6168 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6169 (build-system python-build-system)
6170 (inputs
6171 `(("fuse" ,fuse)
6172 ("attr" ,attr)))
6173 (native-inputs
6174 `(("pkg-config" ,pkg-config)))
6175 (synopsis "Python bindings for FUSE")
6176 (description
6177 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6178 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6179 (license license:lgpl2.0+)
6180 (properties `((python2-variant . ,(delay python2-llfuse))))))
6181
6182(define-public python2-llfuse
6183 (package (inherit (package-with-python2
6184 (strip-python2-variant python-llfuse)))
6185 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6186
6187;; For attic-0.16
6188(define-public python-llfuse-0.41
6189 (package (inherit python-llfuse)
6190 (version "0.41.1")
6191 (source (origin
6192 (method url-fetch)
6193 (uri (string-append
6194 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6195 "llfuse-" version ".tar.bz2"))
6196 (sha256
6197 (base32
6198 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6199 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6200 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6201 (license (list license:expat license:lgpl2.0+))))
6202
6203(define-public python-msgpack
6204 (package
6205 (name "python-msgpack")
6206 (version "0.5.6")
6207 (source (origin
6208 (method url-fetch)
6209 (uri (pypi-uri "msgpack" version))
6210 (sha256
6211 (base32
6212 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6213 (build-system python-build-system)
6214 (arguments
6215 `(#:modules ((guix build utils)
6216 (guix build python-build-system)
6217 (ice-9 ftw)
6218 (srfi srfi-1)
6219 (srfi srfi-26))
6220 #:phases
6221 (modify-phases %standard-phases
6222 (replace 'check
6223 (lambda _
6224 (let ((cwd (getcwd)))
6225 (setenv "PYTHONPATH"
6226 (string-append cwd "/build/"
6227 (find (cut string-prefix? "lib" <>)
6228 (scandir (string-append cwd "/build")))
6229 ":"
6230 (getenv "PYTHONPATH")))
6231 (invoke "pytest" "-v" "test")))))))
6232 (native-inputs
6233 `(("python-pytest" ,python-pytest)))
6234 (synopsis "MessagePack (de)serializer")
6235 (description "MessagePack is a fast, compact binary serialization format,
6236suitable for similar data to JSON. This package provides CPython bindings for
6237reading and writing MessagePack data.")
6238 (home-page "https://pypi.python.org/pypi/msgpack/")
6239 (license license:asl2.0)))
6240
6241;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6242;; release 0.5. Some packages like borg still call it by the old name for now.
6243;; <https://bugs.gnu.org/30662>
6244(define-public python-msgpack-transitional
6245 (package
6246 (inherit python-msgpack)
6247 (name "python-msgpack-transitional")
6248 (arguments
6249 (substitute-keyword-arguments (package-arguments python-msgpack)
6250 ((#:phases phases)
6251 `(modify-phases ,phases
6252 (add-after 'unpack 'configure-transitional
6253 (lambda _
6254 ;; Keep using the old name.
6255 (substitute* "setup.py"
6256 (("TRANSITIONAL = False")
6257 "TRANSITIONAL = 1"))
6258 #t))))))))
6259
6260(define-public python2-msgpack
6261 (package-with-python2 python-msgpack))
6262
6263(define-public python-netaddr
6264 (package
6265 (name "python-netaddr")
6266 (version "0.7.19")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "netaddr" version))
6271 (sha256
6272 (base32
6273 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6274 (build-system python-build-system)
6275 (arguments `(#:tests? #f)) ;; No tests.
6276 (home-page "https://github.com/drkjam/netaddr/")
6277 (synopsis "Pythonic manipulation of network addresses")
6278 (description
6279 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6280and MAC network addresses.")
6281 (license license:bsd-3)))
6282
6283(define-public python2-netaddr
6284 (package-with-python2 python-netaddr))
6285
6286(define-public python-wrapt
6287 (package
6288 (name "python-wrapt")
dddd7a75 6289 (version "1.11.1")
44d10b1f
RW
6290 (source
6291 (origin
6292 (method url-fetch)
6293 (uri (pypi-uri "wrapt" version))
6294 (sha256
6295 (base32
dddd7a75 6296 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6297 (build-system python-build-system)
6298 (arguments
6299 ;; Tests are not included in the tarball, they are only available in the
6300 ;; git repository.
6301 `(#:tests? #f))
6302 (home-page "https://github.com/GrahamDumpleton/wrapt")
6303 (synopsis "Module for decorators, wrappers and monkey patching")
6304 (description
6305 "The aim of the wrapt module is to provide a transparent object proxy for
6306 Python, which can be used as the basis for the construction of function
6307 wrappers and decorator functions.")
6308 (license license:bsd-2)))
6309
6310(define-public python2-wrapt
6311 (package-with-python2 python-wrapt))
6312
6313(define-public python-xlrd
6314 (package
6315 (name "python-xlrd")
6316 (version "1.0.0")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (pypi-uri "xlrd" version))
6320 (sha256
6321 (base32
6322 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6323 (build-system python-build-system)
6324 (arguments
6325 `(#:phases
6326 (modify-phases %standard-phases
6327 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6328 ;; run tests instead for now.
45fd0081 6329 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6330 (native-inputs `(("python-nose" ,python-nose)))
6331 (home-page "http://www.python-excel.org/")
6332 (synopsis "Library for extracting data from Excel files")
6333 (description "This packages provides a library to extract data from
6334spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6335@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6336Unicode-aware. It is not intended as an end-user tool.")
6337 (license license:bsd-3)))
6338
6339(define-public python2-xlrd
6340 (package-with-python2 python-xlrd))
6341
6342(define-public python-prettytable
6343 (package
6344 (name "python-prettytable")
6345 (version "0.7.2")
6346 (source
6347 (origin
6348 (method url-fetch)
337c3a1e 6349 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6350 (sha256
6351 (base32
6352 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6353 (build-system python-build-system)
6354 (home-page "http://code.google.com/p/prettytable/")
6355 (synopsis "Display tabular data in an ASCII table format")
6356 (description
6357 "A library designed to represent tabular data in visually appealing ASCII
6358tables. PrettyTable allows for selection of which columns are to be printed,
6359independent alignment of columns (left or right justified or centred) and
6360printing of sub-tables by specifying a row range.")
6361 (license license:bsd-3)))
6362
6363(define-public python2-prettytable
6364 (package-with-python2 python-prettytable))
6365
6366(define-public python-tables
6367 (package
6368 (name "python-tables")
6369 (version "3.4.4")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "tables" version))
6374 (sha256
6375 (base32
6376 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6377 (modules '((guix build utils)))
6378 (snippet
6379 '(begin
6380 ;; Remove pre-compiled .pyc files from source.
6381 (for-each delete-file-recursively
6382 (find-files "." "__pycache__" #:directories? #t))
6383 (for-each delete-file (find-files "." "\\.pyc$"))
6384 #t))))
6385 (build-system python-build-system)
6386 (arguments
6387 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6388 ;; or "check", so we must override the build and check phases.
6389 #:phases
6390 (modify-phases %standard-phases
6391 (add-after 'unpack 'use-gcc
6392 (lambda _
6393 (substitute* "setup.py"
6394 (("compiler = new_compiler\\(\\)" line)
6395 (string-append line
6396 "\ncompiler.set_executables(compiler='gcc',"
6397 "compiler_so='gcc',"
6398 "linker_exe='gcc',"
6399 "linker_so='gcc -shared')")))
6400 #t))
6401 (replace 'build
6402 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6403 (invoke "python" "setup.py" "build"
6404 (string-append "--hdf5="
6405 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6406 (replace 'check
6407 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6408 (invoke "python" "setup.py" "check"
6409 (string-append "--hdf5="
6410 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6411 (propagated-inputs
6412 `(("python-numexpr" ,python-numexpr)
6413 ("python-numpy" ,python-numpy)))
6414 (native-inputs
6415 `(("python-cython" ,python-cython)
6416 ("pkg-config" ,pkg-config)))
6417 (inputs
6418 `(("hdf5" ,hdf5)
6419 ("bzip2" ,bzip2)
6420 ("zlib" ,zlib)))
6421 (home-page "http://www.pytables.org/")
6422 (synopsis "Hierarchical datasets for Python")
6423 (description "PyTables is a package for managing hierarchical datasets and
6424designed to efficiently cope with extremely large amounts of data.")
6425 (license license:bsd-3)))
6426
6427(define-public python2-tables
6428 (package-with-python2 python-tables))
6429
6430(define-public python-pyasn1
6431 (package
6432 (name "python-pyasn1")
6433 (version "0.4.3")
6434 (source
6435 (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "pyasn1" version))
6438 (sha256
6439 (base32
6440 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6441 (build-system python-build-system)
6442 (home-page "http://pyasn1.sourceforge.net/")
6443 (synopsis "ASN.1 types and codecs")
6444 (description
6445 "This is an implementation of ASN.1 types and codecs in Python. It is
6446suitable for a wide range of protocols based on the ASN.1 specification.")
6447 (license license:bsd-2)))
6448
6449(define-public python2-pyasn1
6450 (package-with-python2 python-pyasn1))
6451
6452(define-public python-pyasn1-modules
6453 (package
6454 (name "python-pyasn1-modules")
6455 (version "0.2.2")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "pyasn1-modules" version))
6460 (sha256
6461 (base32
6462 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6463 (build-system python-build-system)
6464 (propagated-inputs
6465 `(("python-pyasn1" ,python-pyasn1)))
6466 (home-page "https://sourceforge.net/projects/pyasn1/")
6467 (synopsis "ASN.1 codec implementations")
6468 (description
6469 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6470implementations of ASN.1-based codecs and protocols.")
6471 (license license:bsd-3)))
6472
6473(define-public python2-pyasn1-modules
6474 (package-with-python2 python-pyasn1-modules))
6475
6476(define-public python-ipaddress
6477 (package
6478 (name "python-ipaddress")
6479 (version "1.0.22")
6480 (source (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "ipaddress" version))
6483 (sha256
6484 (base32
6485 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6486 (build-system python-build-system)
6487 (home-page "https://github.com/phihag/ipaddress")
6488 (synopsis "IP address manipulation library")
6489 (description
6490 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6491 in Python. This library is used to create, poke at, and manipulate IPv4 and
6492 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6493 module to older versions of Python.")
6494 (license license:psfl)))
6495
6496(define-public python2-ipaddress
6497 (package-with-python2 python-ipaddress))
6498
6499(define-public python2-ipaddr
6500 (package
6501 (name "python2-ipaddr")
6502 (version "2.1.11")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "ipaddr" version))
6507 (sha256
6508 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6509 (build-system python-build-system)
6510 (arguments
6511 `(#:python ,python-2 ;version 2 only
6512 #:phases
6513 (modify-phases %standard-phases
6514 (replace 'check
40b8c4e3 6515 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6516 (home-page "https://github.com/google/ipaddr-py")
6517 (synopsis "IP address manipulation library")
6518 (description
6519 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6520IPv6 addresses and networks.
6521
6522For new implementations you may prefer to use the standard module
6523@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6524versions of Python.")
6525 (license license:asl2.0)))
6526
6527(define-public python-idna
6528 (package
6529 (name "python-idna")
6530 (version "2.7")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "idna" version))
6535 (sha256
6536 (base32
6537 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6538 (build-system python-build-system)
6539 (home-page "https://github.com/kjd/idna")
6540 (synopsis "Internationalized domain names in applications")
6541 (description
6542 "This is a library to support the Internationalised Domain Names in
6543Applications (IDNA) protocol as specified in RFC 5891. This version of the
6544protocol is often referred to as “IDNA2008” and can produce different results
6545from the earlier standard from 2003. The library is also intended to act as a
6546suitable drop-in replacement for the “encodings.idna” module that comes with
6547the Python standard library but currently only supports the older 2003
6548specification.")
6549 (license license:bsd-4)))
6550
6551(define-public python2-idna
6552 (package-with-python2 python-idna))
6553
6554(define-public python-idna-ssl
6555 (package
6556 (name "python-idna-ssl")
6557 (version "1.0.1")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (pypi-uri "idna-ssl" version))
6562 (sha256
6563 (base32
6564 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6565 (build-system python-build-system)
6566 (arguments
6567 `(#:tests? #f)) ;circular dependency with python-aiohttp
6568 (home-page "https://github.com/aio-libs/idna-ssl")
6569 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6570 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6571domains support.")
6572 (license license:expat)))
6573
6574(define-public python-pretend
6575 (package
6576 (name "python-pretend")
6577 (version "1.0.9")
6578 (source
6579 (origin
6580 (method url-fetch)
9f1f22ee 6581 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6582 (sha256
6583 (base32
6584 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6585 (build-system python-build-system)
6586 (home-page "https://github.com/alex/pretend")
6587 (synopsis "Library for stubbing in Python")
6588 (description
6589 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6590technique for writing tests. You may hear the term mixed up with mocks,
6591fakes, or doubles. Basically, a stub is an object that returns pre-canned
6592responses, rather than doing any computation.")
6593 (license license:bsd-3)))
6594
6595(define-public python2-pretend
6596 (package-with-python2 python-pretend))
6597
6598(define-public python-pip
6599 (package
6600 (name "python-pip")
6601 (version "18.1")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (pypi-uri "pip" version))
6606 (sha256
6607 (base32
6608 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6609 (build-system python-build-system)
6610 (arguments
6611 '(#:tests? #f)) ; there are no tests in the pypi archive.
6612 (home-page "https://pip.pypa.io/")
6613 (synopsis "Package manager for Python software")
6614 (description
6615 "Pip is a package manager for Python software, that finds packages on the
6616Python Package Index (PyPI).")
6617 (license license:expat)))
6618
6619(define-public python2-pip
6620 (package-with-python2 python-pip))
6621
6622(define-public python-tlsh
6623 (package
6624 (name "python-tlsh")
6625 (version "3.4.5")
6626 (home-page "https://github.com/trendmicro/tlsh")
6627 (source (origin
6628 (method url-fetch)
6629 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6630 version ".tar.gz"))
6631 (sha256
6632 (base32
6633 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6634 (file-name (string-append name "-" version ".tar.gz"))))
6635 (build-system cmake-build-system)
6636 (arguments
6637 '(#:out-of-source? #f
6638 #:phases (modify-phases %standard-phases
6639 (replace
6640 'install
6641 (lambda* (#:key outputs #:allow-other-keys)
6642 ;; Build and install the Python bindings. The underlying
6643 ;; C++ library is apparently not meant to be installed.
6644 (let ((out (assoc-ref outputs "out")))
6645 (with-directory-excursion "py_ext"
6646 (and (system* "python" "setup.py" "build")
6647 (system* "python" "setup.py" "install"
6648 (string-append "--prefix=" out))))))))))
6649 (inputs `(("python" ,python-wrapper))) ;for the bindings
6650 (synopsis "Fuzzy matching library for Python")
6651 (description
6652 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6653Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6654value which can be used for similarity comparisons. Similar objects have
6655similar hash values, which allows for the detection of similar objects by
6656comparing their hash values. The byte stream should have a sufficient amount
6657of complexity; for example, a byte stream of identical bytes will not generate
6658a hash value.")
6659 (license license:asl2.0)))
6660
6661(define-public python2-tlsh
6662 (package
6663 (inherit python-tlsh)
6664 (name "python2-tlsh")
6665 (inputs `(("python" ,python-2)))))
6666
6667(define-public python-termcolor
6668 (package
6669 (name "python-termcolor")
6670 (version "1.1.0")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "termcolor" version))
6675 (sha256
6676 (base32
6677 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6678 (build-system python-build-system)
6679 (arguments
6680 ;; There are no tests.
6681 `(#:tests? #f))
6682 (home-page "https://pypi.python.org/pypi/termcolor")
6683 (synopsis "ANSII Color formatting for terminal output")
6684 (description
6685 "This package provides ANSII Color formatting for output in terminals.")
6686 (license license:expat)))
6687
6688(define-public python2-termcolor
6689 (package-with-python2 python-termcolor))
6690
6691(define-public python-libarchive-c
6692 (package
6693 (name "python-libarchive-c")
6694 (version "2.8")
6695 (source (origin
6696 (method url-fetch)
6697 (uri (pypi-uri "libarchive-c" version))
6698 (sha256
6699 (base32
6700 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6701 (build-system python-build-system)
6702 (arguments
6703 '(#:phases (modify-phases %standard-phases
6704 (add-before
6705 'build 'reference-libarchive
6706 (lambda* (#:key inputs #:allow-other-keys)
6707 ;; Retain the absolute file name of libarchive.so.
6708 (let ((libarchive (assoc-ref inputs "libarchive")))
6709 (substitute* "libarchive/ffi.py"
6710 (("find_library\\('archive'\\)")
6711 (string-append "'" libarchive
6712 "/lib/libarchive.so'"))))))
6713 (replace 'check
6714 (lambda _ (invoke "pytest" "-vv"))))))
6715 (native-inputs
6716 `(("python-mock" ,python-mock)
6717 ("python-pytest" ,python-pytest)))
6718 (inputs
6719 `(("libarchive" ,libarchive)))
6720 (home-page "https://github.com/Changaco/python-libarchive-c")
6721 (synopsis "Python interface to libarchive")
6722 (description
6723 "This package provides Python bindings to libarchive, a C library to
6724access possibly compressed archives in many different formats. It uses
6725Python's @code{ctypes} foreign function interface (FFI).")
6726 (license license:lgpl2.0+)))
6727
6728(define-public python2-libarchive-c
6729 (package-with-python2 python-libarchive-c))
6730
6731(define-public python-file
6732 (package
6733 (inherit file)
6734 (name "python-file")
6735 (build-system python-build-system)
6736 (arguments
6737 '(#:tests? #f ;no tests
6738 #:configure-flags '("--single-version-externally-managed" "--root=/")
6739 #:phases (modify-phases %standard-phases
6740 (add-before 'build 'change-directory
6741 (lambda _
6742 (chdir "python")
6743 #t))
6744 (add-before 'build 'set-library-file-name
6745 (lambda* (#:key inputs #:allow-other-keys)
6746 (let ((file (assoc-ref inputs "file")))
6747 (substitute* "magic.py"
6748 (("find_library\\('magic'\\)")
6749 (string-append "'" file "/lib/libmagic.so'")))
6750 #t))))))
6751 (inputs `(("file" ,file)))
6752 (self-native-input? #f)
6753 (synopsis "Python bindings to the libmagic file type guesser. Note that
6754this module and the python-magic module both provide a \"magic.py\" file;
6755these two modules, which are different and were developed separately, both
6756serve the same purpose: provide Python bindings for libmagic.")))
6757
6758(define-public python2-file
6759 (package-with-python2 python-file))
6760
6761(define-public python-debian
6762 (package
6763 (name "python-debian")
6764 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6765 (version "0.1.28")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri name version))
6770 (sha256
6771 (base32
6772 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6773 (build-system python-build-system)
6774 (propagated-inputs
6775 `(("python-six" ,python-six)))
6776 (synopsis "Debian package related modules")
6777 (description
6778 ;; XXX: Use @enumerate instead of @itemize to work around
6779 ;; <http://bugs.gnu.org/21772>.
6780 "This package provides Python modules that abstract many formats of
6781Debian-related files, such as:
6782
6783@enumerate
6784@item Debtags information;
6785@item @file{debian/changelog} files;
6786@item packages files, pdiffs;
6787@item control files of single or multiple RFC822-style paragraphs---e.g.
6788 @file{debian/control}, @file{.changes}, @file{.dsc};
6789@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6790 contained files and meta-information.
6791@end enumerate\n")
6792
6793 ;; Modules are either GPLv2+ or GPLv3+.
6794 (license license:gpl3+)))
6795
6796(define-public python2-debian
6797 (package-with-python2 python-debian))
6798
6799(define-public python-nbformat
6800 (package
6801 (name "python-nbformat")
6802 (version "4.4.0")
6803 (source
6804 (origin
6805 (method url-fetch)
6806 (uri (pypi-uri "nbformat" version))
6807 (sha256
6808 (base32
6809 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6810 (build-system python-build-system)
6811 (arguments `(#:tests? #f)) ; no test target
6812 (propagated-inputs
6813 `(("python-ipython-genutils" ,python-ipython-genutils)
6814 ("python-jsonschema" ,python-jsonschema)
6815 ("python-jupyter-core" ,python-jupyter-core)
6816 ("python-traitlets" ,python-traitlets)))
6817 (home-page "http://jupyter.org")
6818 (synopsis "Jupyter Notebook format")
6819 (description "This package provides the reference implementation of the
6820Jupyter Notebook format and Python APIs for working with notebooks.")
6821 (license license:bsd-3)))
6822
6823(define-public python2-nbformat
6824 (package-with-python2 python-nbformat))
6825
6826(define-public python-bleach
6827 (package
6828 (name "python-bleach")
6829 (version "1.4.3")
6830 (source
6831 (origin
6832 (method url-fetch)
6833 (uri (pypi-uri "bleach" version))
6834 (sha256
6835 (base32
6836 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6837 (build-system python-build-system)
6838 (propagated-inputs
6839 `(("python-html5lib" ,python-html5lib-0.9)
6840 ("python-six" ,python-six)))
6841 (native-inputs
6842 `(("python-nose" ,python-nose)))
6843 (home-page "https://github.com/jsocol/bleach")
6844 (synopsis "Whitelist-based HTML-sanitizing tool")
6845 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6846 (license license:asl2.0)))
6847
6848(define-public python2-bleach
6849 (package-with-python2 python-bleach))
6850
6851(define-public python-entrypoints
6852 (package
6853 (name "python-entrypoints")
a7f1b718 6854 (version "0.3")
44d10b1f
RW
6855 (source
6856 (origin
6857 (method url-fetch)
a7f1b718 6858 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6859 (sha256
6860 (base32
a7f1b718 6861 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6862 (build-system python-build-system)
6863 ;; The package does not come with a setup.py file, so we have to generate
6864 ;; one ourselves.
6865 (arguments
6866 `(#:tests? #f
6867 #:phases
6868 (modify-phases %standard-phases
6869 (add-after 'unpack 'create-setup.py
6870 (lambda _
6871 (call-with-output-file "setup.py"
6872 (lambda (port)
6873 (format port "\
6874from setuptools import setup
6875setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6876" ,version))))))))
6877 (home-page "https://github.com/takluyver/entrypoints")
6878 (synopsis "Discover and load entry points from installed Python packages")
6879 (description "Entry points are a way for Python packages to advertise
6880objects with some common interface. The most common examples are
6881@code{console_scripts} entry points, which define shell commands by
6882identifying a Python function to run. The @code{entrypoints} module contains
6883functions to find and load entry points.")
6884 (license license:expat)))
6885
6886(define-public python2-entrypoints
6887 (package-with-python2 python-entrypoints))
6888
6889(define-public python-nbconvert
6890 (package
6891 (name "python-nbconvert")
6892 (version "5.0.0b1")
6893 (source
6894 (origin
6895 (method url-fetch)
6896 (uri (pypi-uri "nbconvert" version))
6897 (sha256
6898 (base32
6899 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6900 (build-system python-build-system)
6901 (arguments
6902 `(;; The "bdist_egg" target is disabled by default, causing the installation
6903 ;; to fail.
6904 #:configure-flags (list "bdist_egg")
6905 ;; FIXME: 5 failures, 40 errors.
6906 #:tests? #f))
6907 ;; #:phases
6908 ;; (modify-phases %standard-phases
6909 ;; (replace 'check
6910 ;; (lambda _
6911 ;; (zero? (system* "py.test" "-v")))))
6912 (native-inputs
6913 `(("python-pytest" ,python-pytest)))
6914 (propagated-inputs
6915 `(("python-bleach" ,python-bleach)
6916 ("python-entrypoints" ,python-entrypoints)
6917 ("python-jinja2" ,python-jinja2)
6918 ("python-jupyter-core" ,python-jupyter-core)
6919 ("python-mistune" ,python-mistune)
6920 ("python-nbformat" ,python-nbformat)
6921 ("python-pygments" ,python-pygments)
6922 ("python-traitlets" ,python-traitlets)))
6923 (home-page "http://jupyter.org")
6924 (synopsis "Converting Jupyter Notebooks")
6925 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6926notebooks to various other formats via Jinja templates. It allows you to
6927convert an @code{.ipynb} notebook file into various static formats including:
6928
6929@enumerate
6930@item HTML
6931@item LaTeX
6932@item PDF
6933@item Reveal JS
6934@item Markdown (md)
6935@item ReStructured Text (rst)
6936@item executable script
6937@end enumerate\n")
6938 (license license:bsd-3)))
6939
6940(define-public python2-nbconvert
6941 (package-with-python2 python-nbconvert))
6942
44d10b1f
RW
6943(define-public python-notebook
6944 (package
6945 (name "python-notebook")
6946 (version "5.7.4")
6947 (source (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "notebook" version))
6950 (sha256
6951 (base32
6952 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6953 (build-system python-build-system)
6954 (arguments
6955 `(#:phases
6956 (modify-phases %standard-phases
6957 (replace 'check
6958 (lambda _
6959 ;; These tests require a browser
6960 (delete-file-recursively "notebook/tests/selenium")
6961 ;; Some tests need HOME
6962 (setenv "HOME" "/tmp")
6963 ;; This file contains "warningfilters", which are not supported
6964 ;; by this version of nose.
6965 (delete-file "setup.cfg")
6966 (with-directory-excursion "/tmp"
6967 (invoke "nosetests" "-v"))
6968 #t)))))
6969 (propagated-inputs
6970 `(("python-jupyter-core" ,python-jupyter-core)
6971 ("python-nbformat" ,python-nbformat)
6972 ("python-nbconvert" ,python-nbconvert)
6973 ("python-prometheus-client" ,python-prometheus-client)
6974 ("python-send2trash" ,python-send2trash)
6975 ("python-terminado" ,python-terminado)))
6976 (native-inputs
6977 `(("python-nose" ,python-nose)
6978 ("python-sphinx" ,python-sphinx)
6979 ("python-requests" ,python-requests)))
6980 (home-page "http://jupyter.org/")
6981 (synopsis "Web-based notebook environment for interactive computing")
6982 (description
6983 "The Jupyter HTML notebook is a web-based notebook environment for
6984interactive computing.")
6985 (properties `((python2-variant . ,(delay python2-notebook))))
6986 (license license:bsd-3)))
6987
6988(define-public python2-notebook
6989 (let ((base (package-with-python2
6990 (strip-python2-variant python-notebook))))
6991 (package (inherit base)
6992 (native-inputs
6993 `(("python2-mock" ,python2-mock)
6994 ,@(package-native-inputs base)))
6995 (arguments
6996 (substitute-keyword-arguments (package-arguments base)
6997 ((#:phases phases)
6998 `(modify-phases ,phases
6999 (add-before 'check 'disable-test-case
7000 ;; The test requires network access to localhost. Curiously it
7001 ;; fails with Python 2 only. Simply make the test-case return
7002 ;; immediately.
7003 (lambda _
7004 (substitute*
7005 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7006 (("formats = self.nbconvert_api") "return #")))))))))))
7007
7008(define-public python-widgetsnbextension
7009 (package
7010 (name "python-widgetsnbextension")
7011 (version "3.4.2")
7012 (source
7013 (origin
7014 (method url-fetch)
7015 (uri (pypi-uri "widgetsnbextension" version))
7016 (sha256
7017 (base32
7018 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7019 (build-system python-build-system)
7020 (propagated-inputs
7021 `(("python-ipykernel" ,python-ipykernel)
7022 ("python-notebook" ,python-notebook)))
7023 (native-inputs
7024 `(("python-certifi" ,python-certifi)
7025 ("python-nose" ,python-nose)))
7026 (home-page "https://ipython.org")
7027 (synopsis "IPython HTML widgets for Jupyter")
7028 (description "This package provides interactive HTML widgets for Jupyter
7029notebooks.")
7030 (license license:bsd-3)))
7031
7032(define-public python2-widgetsnbextension
7033 (package-with-python2 python-widgetsnbextension))
7034
7035(define-public python-ipywidgets
7036 (package
7037 (name "python-ipywidgets")
7038 (version "5.2.2")
7039 (source
7040 (origin
7041 (method url-fetch)
7042 (uri (pypi-uri "ipywidgets" version))
7043 (sha256
7044 (base32
7045 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7046 (build-system python-build-system)
7047 (propagated-inputs
7048 `(("python-ipython" ,python-ipython)
7049 ("python-traitlets" ,python-traitlets)
7050 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7051 (native-inputs
7052 `(("python-nose" ,python-nose)
7053 ("python-pytest" ,python-pytest)))
7054 (home-page "https://ipython.org")
7055 (synopsis "IPython HTML widgets for Jupyter")
7056 (description "Ipywidgets are interactive HTML widgets for Jupyter
7057notebooks and the IPython kernel. Notebooks come alive when interactive
7058widgets are used. Users gain control of their data and can visualize changes
7059in the data.")
7060 (license license:bsd-3)))
7061
7062(define-public python2-ipywidgets
7063 (package-with-python2 python-ipywidgets))
7064
7065(define-public python-jupyter-console
7066 (package
7067 (name "python-jupyter-console")
7068 (version "5.2.0")
7069 (source
7070 (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "jupyter_console" version))
7073 (sha256
7074 (base32
7075 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7076 (build-system python-build-system)
7077 ;; Tests only run in an TTY.
7078 (arguments `(#:tests? #f))
7079 (propagated-inputs
7080 `(("python-ipykernel" ,python-ipykernel)
7081 ("python-jupyter-client" ,python-jupyter-client)
7082 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7083 ("python-pygments" ,python-pygments)))
7084 (native-inputs
7085 `(("python-nose" ,python-nose)))
7086 (home-page "https://jupyter.org")
7087 (synopsis "Jupyter terminal console")
7088 (description "This package provides a terminal-based console frontend for
7089Jupyter kernels. It also allows for console-based interaction with non-Python
7090Jupyter kernels such as IJulia and IRKernel.")
7091 (license license:bsd-3)))
7092
7093(define-public python2-jupyter-console
7094 (package-with-python2 python-jupyter-console))
7095
7096;; The python-ipython and python-jupyter-console require each other. To get
7097;; the functionality in both packages working, strip down the
7098;; python-jupyter-console package when using it as an input to python-ipython.
7099(define python-jupyter-console-minimal
7100 (package
7101 (inherit python-jupyter-console)
7102 (name "python-jupyter-console-minimal")
7103 (arguments
7104 (substitute-keyword-arguments
7105 (package-arguments python-jupyter-console)
7106 ((#:phases phases)
7107 `(modify-phases ,phases
7108 (add-after 'install 'delete-bin
7109 (lambda* (#:key outputs #:allow-other-keys)
7110 ;; Delete the bin files, to avoid conflicts in profiles
7111 ;; where python-ipython and python-jupyter-console are
7112 ;; both present.
7113 (delete-file-recursively
7114 (string-append
7115 (assoc-ref outputs "out") "/bin"))))))))
7116 ;; Remove the python-ipython propagated input, to avoid the cycle
7117 (propagated-inputs
7118 (alist-delete
7119 "python-ipython"
7120 (package-propagated-inputs python-jupyter-console)))))
7121
7122(define-public python-qtconsole
7123 (package
7124 (name "python-qtconsole")
7125 (version "4.4.3")
7126 (source
7127 (origin
7128 (method url-fetch)
7129 (uri (pypi-uri "qtconsole" version))
7130 (sha256
7131 (base32
7132 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7133 (build-system python-build-system)
7134 (arguments
7135 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7136 ;; but we only have the LTS version 5.x. This means that there might be
7137 ;; runtime errors, but since this is a dependency of the Jupyter package,
7138 ;; and Jupyter can be used without the qtconsole we can overlook this for
7139 ;; now.
7140 `(#:tests? #f
7141 #:phases
7142 (modify-phases %standard-phases
7143 (add-before 'check 'pre-check
7144 (lambda _
7145 (setenv "QT_QPA_PLATFORM" "offscreen")
7146 #t)))))
7147 (propagated-inputs
7148 `(("python-ipykernel" ,python-ipykernel)
7149 ("python-ipython" ,python-ipython)))
7150 (native-inputs
7151 `(("python-pytest" ,python-pytest)))
7152 (home-page "http://jupyter.org")
7153 (synopsis "Jupyter Qt console")
7154 (description "This package provides a Qt-based console for Jupyter with
7155support for rich media output.")
7156 (license license:bsd-3)))
7157
7158(define-public jupyter
7159 (package
7160 (name "jupyter")
7161 (version "1.0.0")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "jupyter" version))
7166 (sha256
7167 (base32
7168 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7169 (build-system python-build-system)
7170 (arguments '(#:tests? #f)) ; there are none.
7171 (propagated-inputs
7172 `(("python-ipykernel" ,python-ipykernel)
7173 ("python-ipywidgets" ,python-ipywidgets)
7174 ("python-jupyter-console" ,python-jupyter-console)
7175 ("python-nbconvert" ,python-nbconvert)
7176 ("python-notebook" ,python-notebook)
7177 ("python-qtconsole" ,python-qtconsole)))
7178 (native-search-paths
7179 (list (search-path-specification
7180 (variable "JUPYTER_PATH")
7181 (files '("share/jupyter")))))
7182 (home-page "https://jupyter.org")
7183 (synopsis "Web application for interactive documents")
7184 (description
7185 "The Jupyter Notebook is a web application that allows you to create and
7186share documents that contain live code, equations, visualizations and
7187explanatory text. Uses include: data cleaning and transformation, numerical
7188simulation, statistical modeling, machine learning and much more.")
7189 (license license:bsd-3)))
7190
7191(define-public python-chardet
7192 (package
7193 (name "python-chardet")
7194 (version "3.0.4")
7195 (source
7196 (origin
7197 (method url-fetch)
7198 (uri (pypi-uri "chardet" version))
7199 (sha256
7200 (base32
7201 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7202 (native-inputs
7203 `(("python-hypothesis" ,python-hypothesis)
7204 ("python-pytest" ,python-pytest)
7205 ("python-pytest-runner" ,python-pytest-runner)))
7206 (build-system python-build-system)
7207 (home-page "https://github.com/chardet/chardet")
7208 (synopsis "Universal encoding detector for Python 2 and 3")
7209 (description
7210 "This package provides @code{chardet}, a Python module that can
7211automatically detect a wide range of file encodings.")
7212 (license license:lgpl2.1+)))
7213
7214(define-public python2-chardet
7215 (package-with-python2 python-chardet))
7216
7217(define-public python-docopt
7218 (package
7219 (name "python-docopt")
7220 (version "0.6.2")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 ;; The release on PyPI does not include tests.
7225 (uri (string-append
7226 "https://github.com/docopt/docopt/archive/"
7227 version ".tar.gz"))
7228 (file-name (string-append name "-" version ".tar.gz"))
7229 (sha256
7230 (base32
7231 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7232 (build-system python-build-system)
7233 (native-inputs
7234 `(("python-pytest" ,python-pytest)))
7235 (arguments
7236 `(#:phases
7237 (modify-phases %standard-phases
7238 (replace 'check
7239 (lambda _ (invoke "py.test"))))))
7240 (home-page "http://docopt.org")
7241 (synopsis "Command-line interface description language for Python")
7242 (description "This library allows the user to define a command-line
7243interface from a program's help message rather than specifying it
7244programatically with command-line parsers like @code{getopt} and
7245@code{argparse}.")
7246 (license license:expat)))
7247
7248(define-public python2-docopt
7249 (package-with-python2 python-docopt))
7250
7251(define-public python-pythondialog
7252 (package
7253 (name "python-pythondialog")
7254 (version "3.4.0")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "pythondialog" version))
7259 (sha256
7260 (base32
7261 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:phases
7265 (modify-phases %standard-phases
7266 (add-after 'unpack 'patch-path
7267 (lambda* (#:key inputs #:allow-other-keys)
7268 (let* ((dialog (assoc-ref inputs "dialog")))
7269 ;; Since this library really wants to grovel the search path, we
7270 ;; must hardcode dialog's store path into it.
7271 (substitute* "dialog.py"
7272 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7273 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7274 #t))))
7275 #:tests? #f)) ; no test suite
7276 (propagated-inputs
7277 `(("dialog" ,dialog)))
7278 (home-page "http://pythondialog.sourceforge.net/")
7279 (synopsis "Python interface to the UNIX dialog utility")
7280 (description "A Python wrapper for the dialog utility. Its purpose is to
7281provide an easy to use, pythonic and comprehensive Python interface to dialog.
7282This allows one to make simple text-mode user interfaces on Unix-like systems")
7283 (license license:lgpl2.1)
7284 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7285
7286(define-public python2-pythondialog
7287 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7288 (package
7289 (inherit base)
7290 (version (package-version python-pythondialog))
7291 (source (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "python2-pythondialog" version))
7294 (sha256
7295 (base32
7296 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7297
7298(define-public python-configobj
7299 (package
7300 (name "python-configobj")
7301 (version "5.0.6")
7302 (source (origin
7303 (method url-fetch)
b0758fbb 7304 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7305 (sha256
7306 (base32
7307 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7308 ;; Patch setup.py so it looks for python-setuptools, which is
7309 ;; required to parse the keyword 'install_requires' in setup.py.
7310 (patches (search-patches "python-configobj-setuptools.patch"))))
7311 (build-system python-build-system)
7312 (propagated-inputs
7313 `(("python-six" ,python-six)))
7314 (synopsis "Config file reading, writing and validation")
7315 (description "ConfigObj is a simple but powerful config file reader and
7316writer: an ini file round tripper. Its main feature is that it is very easy to
7317use, with a straightforward programmer’s interface and a simple syntax for
7318config files.")
7319 (home-page "https://github.com/DiffSK/configobj")
7320 (license license:bsd-3)))
7321
7322(define-public python2-configobj
7323 (package-with-python2 python-configobj))
7324
7325(define-public python-configargparse
7326 (package
7327 (name "python-configargparse")
86ae491f 7328 (version "0.14.0")
44d10b1f
RW
7329 (source (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "ConfigArgParse" version))
7332 (sha256
7333 (base32
86ae491f 7334 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7335 (build-system python-build-system)
7336 (native-inputs
7337 `(("python-pyyaml" ,python-pyyaml)))
7338 (arguments
7339 `(#:phases
7340 (modify-phases %standard-phases
7341 (replace 'check
7342 (lambda _
7343 ;; Bypass setuptools-shim because one test relies on "setup.py"
7344 ;; being the first argument passed to the python call.
7345 ;;
7346 ;; NOTE: Many tests do not run because they rely on Python's
7347 ;; built-in test.test_argparse, but we remove the unit tests from
7348 ;; our Python installation.
7349 (invoke "python" "setup.py" "test"))))))
7350 (synopsis "Replacement for argparse")
7351 (description "A drop-in replacement for argparse that allows options to also
7352be set via config files and/or environment variables.")
7353 (home-page "https://github.com/bw2/ConfigArgParse")
7354 (license license:expat)))
7355
7356(define-public python2-configargparse
7357 (package-with-python2 python-configargparse))
7358
7359(define-public python-argparse-manpage
7360 (package
7361 (name "python-argparse-manpage")
7362 (version "1.1")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "argparse-manpage" version))
7367 (sha256
7368 (base32
7369 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7370 (build-system python-build-system)
7371 (home-page "https://github.com/praiskup/argparse-manpage")
7372 (synopsis "Build manual page from Python's ArgumentParser object")
7373 (description
7374 "This package provides tools to build manual pages from Python's
7375@code{ArgumentParser} object.")
7376 (license license:asl2.0)))
7377
7378(define-public python2-contextlib2
7379 (package
7380 (name "python2-contextlib2")
7381 (version "0.5.5")
7382 (source
7383 (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "contextlib2" version))
7386 (sha256
7387 (base32
7388 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7389 (build-system python-build-system)
7390 (arguments
7391 `(#:python ,python-2
7392 #:phases
7393 (modify-phases %standard-phases
7394 (replace 'check
7395 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7396 (native-inputs
7397 `(("python2-unittest2" ,python2-unittest2)))
7398 (home-page "http://contextlib2.readthedocs.org/")
7399 (synopsis "Tools for decorators and context managers")
7400 (description "This module is primarily a backport of the Python
74013.2 contextlib to earlier Python versions. Like contextlib, it
7402provides utilities for common tasks involving decorators and context
7403managers. It also contains additional features that are not part of
7404the standard library.")
7405 (license license:psfl)))
7406
7407(define-public python-texttable
7408 (package
7409 (name "python-texttable")
7410 (version "0.8.7")
7411 (source
7412 (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "texttable" version))
7415 (sha256
7416 (base32
7417 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7418 (build-system python-build-system)
7419 (arguments '(#:tests? #f)) ; no tests
7420 (home-page "https://github.com/foutaise/texttable/")
7421 (synopsis "Python module for creating simple ASCII tables")
7422 (description "Texttable is a Python module for creating simple ASCII
7423tables.")
7424 (license license:lgpl2.1+)))
7425
7426(define-public python2-texttable
7427 (package-with-python2 python-texttable))
7428
7429(define-public python-atomicwrites
7430 (package
7431 (name "python-atomicwrites")
7432 (version "1.1.5")
7433 (source (origin
7434 (method url-fetch)
7435 (uri (pypi-uri "atomicwrites" version))
7436 (sha256
7437 (base32
7438 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7439 (build-system python-build-system)
7440 (synopsis "Atomic file writes in Python")
7441 (description "Library for atomic file writes using platform dependent tools
7442for atomic file system operations.")
7443 (home-page "https://github.com/untitaker/python-atomicwrites")
7444 (license license:expat)))
7445
7446(define-public python2-atomicwrites
7447 (package-with-python2 python-atomicwrites))
7448
7449(define-public python-click-threading
7450 (package
7451 (name "python-click-threading")
7452 (version "0.4.4")
7453 (source (origin
7454 (method url-fetch)
7455 (uri (pypi-uri "click-threading" version))
7456 (sha256
7457 (base32
7458 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7459 (build-system python-build-system)
7460 (propagated-inputs
7461 `(("python-click" ,python-click)))
7462 (synopsis "Utilities for multithreading in Click")
7463 (description "This package provides utilities for multithreading in Click
7464applications.")
7465 (home-page "https://github.com/click-contrib/click-threading")
7466 (license license:expat)))
7467
7468(define-public python-click-log
7469 (package
7470 (name "python-click-log")
7471 (version "0.3.2")
7472 (source (origin
7473 (method url-fetch)
7474 (uri (pypi-uri "click-log" version))
7475 (sha256
7476 (base32
7477 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7478 (build-system python-build-system)
7479 (propagated-inputs
7480 `(("python-click" ,python-click)))
7481 (synopsis "Logging for click applications")
7482 (description "This package provides a Python library for logging Click
7483applications.")
7484 (home-page "https://github.com/click-contrib/click-log")
7485 (license license:expat)))
7486
7487(define-public python-apipkg
7488 (package
7489 (name "python-apipkg")
7490 (version "1.4")
7491 (source (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "apipkg" version))
7494 (sha256
7495 (base32
7496 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7497 (build-system python-build-system)
7498 (native-inputs
7499 `(("python-pytest" ,python-pytest)))
7500 (synopsis "Namespace control and lazy-import mechanism")
7501 (description "With apipkg you can control the exported namespace of a Python
7502package and greatly reduce the number of imports for your users. It is a small
7503pure Python module that works on virtually all Python versions.")
7504 (home-page "https://github.com/pytest-dev/apipkg")
7505 (license license:expat)))
7506
7507(define-public python2-apipkg
7508 (package-with-python2 python-apipkg))
7509
7510(define-public python-execnet
7511 (package
7512 (name "python-execnet")
7513 (version "1.4.1")
7514 (source (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "execnet" version))
7517 (sha256
7518 (base32
7519 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7520 (build-system python-build-system)
7521 (arguments
7522 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7523 ;; The two test failures are caused by the lack of an `ssh` executable.
7524 ;; The test suite can be run with pytest after the 'install' phase.
7525 #:tests? #f))
7526 (native-inputs
7527 `(("python-pytest" ,python-pytest)
7528 ("python-setuptools-scm" ,python-setuptools-scm)))
7529 (propagated-inputs
7530 `(("python-apipkg" ,python-apipkg)))
7531 (synopsis "Rapid multi-Python deployment")
7532 (description "Execnet provides a share-nothing model with
7533channel-send/receive communication for distributing execution across many
7534Python interpreters across version, platform and network barriers. It has a
7535minimal and fast API targeting the following uses:
7536@enumerate
7537@item distribute tasks to (many) local or remote CPUs
7538@item write and deploy hybrid multi-process applications
7539@item write scripts to administer multiple environments
7540@end enumerate")
7541 (home-page "http://codespeak.net/execnet/")
7542 (license license:expat)))
7543
7544(define-public python2-execnet
7545 (package-with-python2 python-execnet))
7546
7547(define-public python-icalendar
7548 (package
7549 (name "python-icalendar")
7550 (version "4.0.3")
7551 (source (origin
7552 (method url-fetch)
7553 (uri (pypi-uri "icalendar" version))
7554 (sha256
7555 (base32
7556 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7557 (build-system python-build-system)
7558 (propagated-inputs
7559 `(("python-dateutil" ,python-dateutil)
7560 ("python-pytz" ,python-pytz)))
7561 (synopsis "Python library for parsing iCalendar files")
7562 (description "The icalendar package is a parser/generator of iCalendar
7563files for use with Python.")
7564 (home-page "https://github.com/collective/icalendar")
7565 (license license:bsd-2)))
7566
7567(define-public python-sphinxcontrib-newsfeed
7568 (package
7569 (name "python-sphinxcontrib-newsfeed")
7570 (version "0.1.4")
7571 (source (origin
7572 (method url-fetch)
7573 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7574 (sha256
7575 (base32
7576 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7577 (arguments '(#:tests? #f)) ; No tests.
7578 (build-system python-build-system)
7579 (propagated-inputs
7580 `(("python-sphinx" ,python-sphinx)))
7581 (synopsis "News Feed extension for Sphinx")
7582 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7583Blog, News or Announcements section to a Sphinx website.")
7584 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7585 (license license:bsd-2)))
7586
7587(define-public python-args
7588 (package
7589 (name "python-args")
7590 (version "0.1.0")
7591 (source (origin
7592 (method url-fetch)
7593 (uri (pypi-uri "args" version))
7594 (sha256
7595 (base32
7596 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7597 (build-system python-build-system)
7598 (home-page "https://github.com/kennethreitz/args")
7599 (synopsis "Command-line argument parser")
7600 (description
7601 "This library provides a Python module to parse command-line arguments.")
7602 (license license:bsd-3)))
7603
7604(define-public python2-args
7605 (package-with-python2 python-args))
7606
7607(define-public python-clint
7608 (package
7609 (name "python-clint")
7610 (version "0.5.1")
7611 (source (origin
7612 (method url-fetch)
7613 (uri (pypi-uri "clint" version))
7614 (sha256
7615 (base32
7616 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7617 (build-system python-build-system)
7618 (arguments
7619 '(#:phases
7620 (modify-phases %standard-phases
7621 (replace 'check
7622 (lambda _ (invoke "py.test" "-v"))))))
7623 (native-inputs
7624 `(("python-pytest" ,python-pytest)))
7625 (propagated-inputs
7626 `(("python-args" ,python-args)))
7627 (home-page "https://github.com/kennethreitz/clint")
7628 (synopsis "Command-line interface tools")
7629 (description
7630 "Clint is a Python module filled with a set of tools for developing
7631command-line applications, including tools for colored and indented
7632output, progress bar display, and pipes.")
7633 (license license:isc)))
7634
7635(define-public python2-clint
7636 (package-with-python2 python-clint))
7637
44d10b1f
RW
7638(define-public python-rply
7639 (package
7640 (name "python-rply")
7641 (version "0.7.5")
7642 (source (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "rply" version))
7645 (sha256
7646 (base32
7647 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7648 (build-system python-build-system)
7649 (propagated-inputs
7650 `(("python-appdirs" ,python-appdirs)))
7651 (home-page "https://github.com/alex/rply")
7652 (synopsis "Parser generator for Python")
7653 (description
7654 "This package provides a pure Python based parser generator, that also
7655works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7656with a new public API, and RPython support.")
7657 (license license:bsd-3)))
7658
7659(define-public python2-rply
7660 (package-with-python2 python-rply))
7661
7662(define-public python-hy
7663 (package
7664 (name "python-hy")
7665 (version "0.13.0")
7666 (source (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "hy" version))
7669 (sha256
7670 (base32
7671 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7672 (build-system python-build-system)
7673 (arguments
7674 '(#:phases
7675 (modify-phases %standard-phases
7676 (replace 'check
7677 (lambda _
7678 ;; Tests require write access to HOME.
7679 (setenv "HOME" "/tmp")
7680 (invoke "nosetests"))))))
7681 (native-inputs
7682 `(("python-coverage" ,python-coverage)
7683 ("python-nose" ,python-nose)))
7684 (propagated-inputs
7685 `(("python-astor" ,python-astor)
7686 ("python-clint" ,python-clint)
7687 ("python-rply" ,python-rply)))
7688 (home-page "http://hylang.org/")
7689 (synopsis "Lisp frontend to Python")
7690 (description
7691 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7692its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7693Python at your fingertips, in Lisp form.")
7694 (license license:expat)))
7695
7696(define-public python2-hy
7697 (package-with-python2 python-hy))
7698
7699(define-public python2-functools32
7700 (package
7701 (name "python2-functools32")
7702 (version "3.2.3-2")
7703 (source
7704 (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "functools32" version))
7707 (sha256
7708 (base32
7709 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7710 (build-system python-build-system)
7711 (arguments
7712 `(#:python ,python-2
7713 #:tests? #f)) ; no test target
7714 (home-page "https://github.com/MiCHiLU/python-functools32")
7715 (synopsis
7716 "Backport of the functools module from Python 3.2.3")
7717 (description
7718 "This package is a backport of the @code{functools} module from Python
77193.2.3 for use with older versions of Python and PyPy.")
7720 (license license:expat)))
7721
7722(define-public python2-subprocess32
7723 (package
7724 (name "python2-subprocess32")
7725 (version "3.2.7")
7726 (source (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "subprocess32" version))
7729 (sha256
7730 (base32
7731 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7732 (patches
7733 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7734 (build-system python-build-system)
7735 (arguments
7736 `(#:python ,python-2
7737 ;; The test suite fails with Python > 2.7.13:
7738 ;; import test.support
7739 ;; ImportError: No module named support
7740 #:tests? #f
7741 #:phases
7742 (modify-phases %standard-phases
7743 (add-after 'unpack 'patch-/bin/sh
7744 (lambda _
7745 (substitute* '("subprocess32.py"
7746 "test_subprocess32.py")
7747 (("/bin/sh") (which "sh")))
7748 #t)))))
7749 (home-page "https://github.com/google/python-subprocess32")
7750 (synopsis "Backport of the subprocess module from Python 3.2")
7751 (description
7752 "This is a backport of the @code{subprocess} standard library module
7753from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7754new features. On POSIX systems it is guaranteed to be reliable when used
7755in threaded applications. It includes timeout support from Python 3.3 but
7756otherwise matches 3.2’s API.")
7757 (license license:psfl)))
7758
7759(define-public python2-futures
7760 (package
7761 (name "python2-futures")
7762 (version "3.2.0")
7763 (source
7764 (origin
7765 (method url-fetch)
7766 (uri (pypi-uri "futures" version))
7767 (sha256
7768 (base32
7769 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7770 (build-system python-build-system)
7771 (arguments `(#:python ,python-2
7772 ;; FIXME: Python 2.7.14 moved the test.support library,
7773 ;; but our package has not yet been adjusted. Enable
7774 ;; tests when the python2 package has been fixed.
7775 #:tests? #f))
7776 (home-page "https://github.com/agronholm/pythonfutures")
7777 (synopsis
7778 "Backport of the concurrent.futures package from Python 3.2")
7779 (description
7780 "The concurrent.futures module provides a high-level interface for
7781asynchronously executing callables. This package backports the
7782concurrent.futures package from Python 3.2")
7783 (license license:bsd-3)))
7784
7785(define-public python-promise
7786 (package
7787 (name "python-promise")
7788 (version "0.4.2")
7789 (source
7790 (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "promise" version))
7793 (sha256
7794 (base32
7795 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7796 (build-system python-build-system)
7797 ;; Tests wants python-futures, which is a python2 only program, and
7798 ;; can't be found by python-promise at test time.
7799 (arguments `(#:tests? #f))
7800 (home-page "https://github.com/syrusakbary/promise")
7801 (synopsis "Promises/A+ implementation for Python")
7802 (description
7803 "Promises/A+ implementation for Python")
7804 (properties `((python2-variant . ,(delay python2-promise))))
7805 (license license:expat)))
7806
7807(define-public python2-promise
7808 (let ((promise (package-with-python2
7809 (strip-python2-variant python-promise))))
7810 (package (inherit promise)
7811 (arguments (substitute-keyword-arguments (package-arguments promise)
7812 ((#:tests? _) #t)))
7813 (native-inputs
7814 `(("python2-futures" ,python2-futures)
7815 ("python2-pytest" ,python2-pytest)
7816 ,@(package-native-inputs promise))))))
7817
7818(define-public python-colorama
7819 (package
7820 (name "python-colorama")
7821 (version "0.3.9")
7822 (source
7823 (origin
7824 (method url-fetch)
7825 (uri (pypi-uri "colorama" version))
7826 (sha256
7827 (base32
7828 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7829 (build-system python-build-system)
7830 (synopsis "Colored terminal text rendering for Python")
7831 (description "Colorama is a Python library for rendering colored terminal
7832text.")
7833 (home-page "https://pypi.python.org/pypi/colorama")
7834 (license license:bsd-3)))
7835
7836(define-public python2-colorama
7837 (package-with-python2 python-colorama))
7838
7839(define-public python-rsa
7840 (package
7841 (name "python-rsa")
7842 (version "3.4.2")
7843 (source
7844 (origin
7845 (method url-fetch)
7846 (uri (pypi-uri "rsa" version))
7847 (sha256
7848 (base32
7849 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7850 (build-system python-build-system)
7851 (propagated-inputs
7852 `(("python-pyasn1" ,python-pyasn1)))
7853 (synopsis "Pure-Python RSA implementation")
7854 (description "Python-RSA is a pure-Python RSA implementation. It supports
7855encryption and decryption, signing and verifying signatures, and key
7856generation according to PKCS#1 version 1.5. It can be used as a Python
7857library as well as on the command line.")
7858 (home-page "https://stuvel.eu/rsa")
7859 (license license:asl2.0)))
7860
7861(define-public python2-rsa
7862 (package-with-python2 python-rsa))
7863
7864(define-public python-pluggy
7865 (package
7866 (name "python-pluggy")
7867 (version "0.7.1")
7868 (source
7869 (origin
7870 (method url-fetch)
7871 (uri (pypi-uri "pluggy" version))
7872 (sha256
7873 (base32
7874 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7875 (build-system python-build-system)
7876 (native-inputs
7877 `(("python-setuptools-scm" ,python-setuptools-scm)))
7878 (synopsis "Plugin and hook calling mechanism for Python")
7879 (description "Pluggy is an extraction of the plugin manager as used by
7880Pytest but stripped of Pytest specific details.")
7881 (home-page "https://pypi.python.org/pypi/pluggy")
7882 (license license:expat)))
7883
7884(define-public python2-pluggy
7885 (package-with-python2 python-pluggy))
7886
7887(define-public python-tox
7888 (package
7889 (name "python-tox")
7890 (version "2.8.1")
7891 (source
7892 (origin
7893 (method url-fetch)
7894 (uri (pypi-uri "tox" version))
7895 (sha256
7896 (base32
7897 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7898 (build-system python-build-system)
7899 (arguments
7900 ;; FIXME: Tests require pytest-timeout, which itself requires
7901 ;; pytest>=2.8.0 for installation.
7902 '(#:tests? #f))
7903 (propagated-inputs
7904 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7905 ("python-py" ,python-py)
7906 ("python-virtualenv" ,python-virtualenv)))
7907 (native-inputs
7908 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7909 ("python-pytest" ,python-pytest) ; >= 2.3.5
7910 ("python-setuptools-scm" ,python-setuptools-scm)))
7911 (home-page "http://tox.testrun.org/")
7912 (synopsis "Virtualenv-based automation of test activities")
7913 (description "Tox is a generic virtualenv management and test command line
7914tool. It can be used to check that a package installs correctly with
7915different Python versions and interpreters, or run tests in each type of
7916supported environment, or act as a frontend to continuous integration
7917servers.")
7918 (license license:expat)))
7919
7920(define-public python2-tox
7921 (package-with-python2 python-tox))
7922
7923(define-public python-jmespath
7924 (package
7925 (name "python-jmespath")
7926 (version "0.9.3")
7927 (source
7928 (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "jmespath" version))
7931 (sha256
7932 (base32
7933 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7934 (build-system python-build-system)
7935 (native-inputs
7936 `(("python-nose" ,python-nose)))
7937 (synopsis "JSON Matching Expressions")
7938 (description "JMESPath (pronounced “james path”) is a Python library that
7939allows one to declaratively specify how to extract elements from a JSON
7940document.")
7941 (home-page "https://github.com/jmespath/jmespath.py")
7942 (license license:expat)))
7943
7944(define-public python2-jmespath
7945 (package-with-python2 python-jmespath))
7946
7947(define-public python-botocore
7948 (package
7949 (name "python-botocore")
7950 (version "1.8.43")
7951 (source
7952 (origin
7953 (method url-fetch)
7954 (uri (pypi-uri "botocore" version))
7955 (sha256
7956 (base32
7957 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7958 (build-system python-build-system)
7959 (arguments
7960 ;; FIXME: Many tests are failing.
7961 '(#:tests? #f))
7962 (propagated-inputs
7963 `(("python-dateutil" ,python-dateutil)
7964 ("python-docutils" ,python-docutils)
7965 ("python-jmespath" ,python-jmespath)))
7966 (native-inputs
7967 `(("python-mock" ,python-mock)
7968 ("python-nose" ,python-nose)
7969 ("behave" ,behave)
7970 ("python-tox" ,python-tox)
7971 ("python-wheel" ,python-wheel)))
7972 (home-page "https://github.com/boto/botocore")
7973 (synopsis "Low-level interface to AWS")
7974 (description "Botocore is a Python library that provides a low-level
7975interface to the Amazon Web Services (AWS) API.")
7976 (license license:asl2.0)))
7977
7978(define-public python2-botocore
7979 (package-with-python2 python-botocore))
7980
7981(define-public python-xdo
7982 (package
7983 (name "python-xdo")
7984 (version "0.3")
7985 (source (origin
7986 (method url-fetch)
7987 (uri (string-append
7988 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7989 "python-xdo_" version ".orig.tar.gz"))
7990 (sha256
7991 (base32
7992 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7993 (build-system python-build-system)
7994 (arguments
7995 '(#:phases
7996 (modify-phases %standard-phases
7997 (add-before 'install 'patch-libxdo-path
7998 ;; Hardcode the path of dynamically loaded libxdo library.
7999 (lambda* (#:key inputs #:allow-other-keys)
8000 (let ((libxdo (string-append
8001 (assoc-ref inputs "xdotool")
8002 "/lib/libxdo.so")))
8003 (substitute* "xdo/_xdo.py"
8004 (("find_library\\(\"xdo\"\\)")
8005 (simple-format #f "\"~a\"" libxdo)))
8006 #t))))
8007 #:tests? #f)) ; no tests provided
8008 (propagated-inputs
8009 `(("python-six" ,python-six)))
8010 (inputs
8011 `(("xdotool" ,xdotool)
8012 ("libX11" ,libx11)))
8013 (home-page "https://tracker.debian.org/pkg/python-xdo")
8014 (synopsis "Python library for simulating X11 keyboard/mouse input")
8015 (description "Provides bindings to libxdo for manipulating X11 via simulated
8016input. (Note that this is mostly a legacy library; you may wish to look at
8017python-xdo for newer bindings.)")
8018 (license license:bsd-3)))
8019
8020(define-public python2-xdo
8021 (package-with-python2 python-xdo))
8022
8023(define-public python-mako
8024 (package
8025 (name "python-mako")
8026 (version "1.0.7")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "Mako" version))
8031 (sha256
8032 (base32
8033 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8034 (build-system python-build-system)
8035 (propagated-inputs
8036 `(("python-markupsafe" ,python-markupsafe)))
8037 (native-inputs
8038 `(("python-mock" ,python-mock)
8039 ("python-nose" ,python-nose)
8040 ("python-pytest" ,python-pytest)))
7016e620 8041 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8042 (synopsis "Templating language for Python")
8043 (description "Mako is a templating language for Python that compiles
8044templates into Python modules.")
8045 (license license:expat)))
8046
8047(define-public python2-mako
8048 (package-with-python2 python-mako))
8049
8050(define-public python-waitress
8051 (package
8052 (name "python-waitress")
8053 (version "1.1.0")
8054 (source
8055 (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "waitress" version))
8058 (patches (search-patches "python-waitress-fix-tests.patch"))
8059 (sha256
8060 (base32
8061 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8062 (build-system python-build-system)
8063 (home-page "https://github.com/Pylons/waitress")
8064 (synopsis "Waitress WSGI server")
8065 (description "Waitress is meant to be a production-quality pure-Python WSGI
8066server with very acceptable performance.")
8067 (license license:zpl2.1)))
8068
8069(define-public python2-waitress
8070 (package-with-python2 python-waitress))
8071
8072(define-public python-pyquery
8073 (package
8074 (name "python-pyquery")
8075 (version "1.2.17")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "pyquery" version))
8080 (sha256
8081 (base32
8082 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8083 (build-system python-build-system)
8084 (native-inputs
8085 `(("python-webob" ,python-webob)
8086 ("python-webtest" ,python-webtest)))
8087 (propagated-inputs
8088 `(("python-lxml" ,python-lxml)
8089 ("python-cssselect" ,python-cssselect)))
8090 (home-page "https://github.com/gawel/pyquery")
8091 (synopsis "Make jQuery-like queries on xml documents")
8092 (description "pyquery allows you to make jQuery queries on xml documents.
8093The API is as much as possible the similar to jQuery. pyquery uses lxml for
8094fast xml and html manipulation.")
8095 (license license:bsd-3)))
8096
44d10b1f
RW
8097(define-public python-anyjson
8098 (package
8099 (name "python-anyjson")
8100 (version "0.3.3")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "anyjson" version))
8105 (sha256
8106 (base32
8107 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8108 (build-system python-build-system)
8109 (arguments
8110 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8111 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8112 ;; whatever) so this transformation needs to be done before the tests
8113 ;; can be run. Maybe we could add a build step to transform beforehand
8114 ;; but it could be annoying/difficult.
8115 ;; We can enable tests for the Python 2 version, though, and do below.
8116 #:tests? #f))
8117 (home-page "https://bitbucket.org/runeh/anyjson/")
8118 (synopsis
8119 "Wraps best available JSON implementation in a common interface")
8120 (description
8121 "Anyjson loads whichever is the fastest JSON module installed
8122and provides a uniform API regardless of which JSON implementation is used.")
8123 (license license:bsd-3)
8124 (properties `((python2-variant . ,(delay python2-anyjson))))))
8125
8126(define-public python2-anyjson
8127 (let ((anyjson (package-with-python2
8128 (strip-python2-variant python-anyjson))))
8129 (package
8130 (inherit anyjson)
8131 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8132 #:tests? #t
8133 ,@(package-arguments anyjson)))
8134 (native-inputs `(("python2-nose" ,python2-nose))))))
8135
8136(define-public python-amqp
8137 (package
8138 (name "python-amqp")
8139 (version "2.3.2")
8140 (source
8141 (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "amqp" version))
8144 (sha256
8145 (base32
8146 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8147 (build-system python-build-system)
8148 (native-inputs
8149 `(("python-case" ,python-case)
8150 ("python-pytest-sugar" ,python-pytest-sugar)
8151 ("python-mock" ,python-mock)))
8152 (propagated-inputs
8153 `(("python-vine" ,python-vine)))
8154 (home-page "https://github.com/celery/py-amqp")
8155 (synopsis
8156 "Low-level AMQP client for Python (fork of amqplib)")
8157 (description
8158 "This is a fork of amqplib which was originally written by Barry Pederson.
8159It is maintained by the Celery project, and used by kombu as a pure python
8160alternative when librabbitmq is not available.")
8161 (license license:lgpl2.1+)
8162 (properties `((python2-variant . ,(delay python2-amqp))))))
8163
8164(define-public python2-amqp
8165 (let ((amqp (package-with-python2
8166 (strip-python2-variant python-amqp))))
8167 (package
8168 (inherit amqp)
8169 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8170 ;; unmaintained. Weirdly, does not do this on the python 3
8171 ;; version?
8172 #:tests? #f
8173 ,@(package-arguments amqp))))))
8174
8175(define-public python-txamqp
8176 (package
8177 (name "python-txamqp")
8178 (version "0.8.2")
8179 (source
8180 (origin
8181 (method url-fetch)
8182 (uri (pypi-uri "txAMQP" version))
8183 (sha256
8184 (base32
8185 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8186 (build-system python-build-system)
8187 (propagated-inputs
8188 `(("python-six" ,python-six)
8189 ("python-twisted" ,python-twisted)))
8190 (home-page "https://github.com/txamqp/txamqp")
8191 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8192 (description
8193 "This package provides a Python library for communicating with AMQP peers
8194and brokers using the asynchronous networking framework Twisted. It contains
8195all the necessary code to connect, send and receive messages to/from an
8196AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8197also includes support for using Thrift RPC over AMQP in Twisted
8198applications.")
8199 (license license:asl2.0)))
8200
8201(define-public python2-txamqp
8202 (package-with-python2 python-txamqp))
8203
8204(define-public python-kombu
8205 (package
8206 (name "python-kombu")
8207 (version "4.2.2")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "kombu" version))
8212 (sha256
8213 (base32
8214 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8215 (build-system python-build-system)
8216 (native-inputs
8217 `(("python-mock" ,python-mock)
8218 ("python-case" ,python-case)
8219 ("python-pyro4" ,python-pyro4)
8220 ("python-pytest-sugar" ,python-pytest-sugar)
8221 ("python-pytz" ,python-pytz)))
8222 (propagated-inputs
8223 `(("python-anyjson" ,python-anyjson)
8224 ("python-amqp" ,python-amqp)
8225 ("python-redis" ,python-redis)))
8226 (home-page "https://kombu.readthedocs.io")
8227 (synopsis "Message passing library for Python")
8228 (description "The aim of Kombu is to make messaging in Python as easy as
8229possible by providing an idiomatic high-level interface for the AMQ protocol,
8230and also provide proven and tested solutions to common messaging problems.
8231AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8232message orientation, queuing, routing, reliability and security, for which the
8233RabbitMQ messaging server is the most popular implementation.")
8234 (license license:bsd-3)
8235 (properties `((python2-variant . ,(delay python2-kombu))))))
8236
8237(define-public python2-kombu
8238 (let ((kombu (package-with-python2
8239 (strip-python2-variant python-kombu))))
8240 (package
8241 (inherit kombu)
8242 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8243 ;; It works fine on the python3 variant.
8244 #:tests? #f
8245 ,@(package-arguments kombu)))
8246 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8247 ,@(package-native-inputs kombu))))))
8248
8249(define-public python-billiard
8250 (package
8251 (name "python-billiard")
8252 (version "3.5.0.5")
8253 (source
8254 (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "billiard" version))
8257 (sha256
8258 (base32
8259 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8260 (build-system python-build-system)
8261 (native-inputs
8262 `(("python-case" ,python-case)
8263 ("python-pytest" ,python-pytest)))
8264 (home-page "https://github.com/celery/billiard")
8265 (synopsis
8266 "Python multiprocessing fork with improvements and bugfixes")
8267 (description
8268 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8269multiprocessing package itself is a renamed and updated version of R Oudkerk's
8270pyprocessing package. This standalone variant is intended to be compatible with
8271Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8272 (license license:bsd-3)
8273 (properties `((python2-variant . ,(delay python2-billiard))))))
8274
8275(define-public python2-billiard
8276 (let ((billiard (package-with-python2
8277 (strip-python2-variant python-billiard))))
8278 (package
8279 (inherit billiard)
8280 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8281 ("python2-mock" ,python2-mock)
8282 ,@(package-native-inputs billiard))))))
8283
8284(define-public python-celery
8285 (package
8286 (name "python-celery")
8287 (version "4.2.1")
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "celery" version))
8292 (sha256
8293 (base32
8294 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8295 (build-system python-build-system)
8296 (arguments
8297 '(;; TODO The tests fail with Python 3.7
8298 ;; https://github.com/celery/celery/issues/4849
8299 #:tests? #f
8300 #:phases
8301 (modify-phases %standard-phases
8302 (add-after 'unpack 'patch-requirements
8303 (lambda _
8304 (substitute* "requirements/test.txt"
8305 (("pytest>=3\\.0,<3\\.3")
8306 "pytest>=3.0"))
8307 #t)))))
8308 (native-inputs
8309 `(("python-case" ,python-case)
8310 ("python-pytest" ,python-pytest)))
8311 (propagated-inputs
8312 `(("python-pytz" ,python-pytz)
8313 ("python-billiard" ,python-billiard)
8314 ("python-kombu" ,python-kombu)))
8315 (home-page "https://celeryproject.org")
8316 (synopsis "Distributed Task Queue")
8317 (description "Celery is an asynchronous task queue/job queue based on
8318distributed message passing. It is focused on real-time operation, but
8319supports scheduling as well. The execution units, called tasks, are executed
8320concurrently on a single or more worker servers using multiprocessing,
8321Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8322synchronously (wait until ready).")
8323 (license license:bsd-3)
8324 (properties `((python2-variant . ,(delay python2-celery))))))
8325
8326(define-public python2-celery
8327 (let ((celery (package-with-python2
8328 (strip-python2-variant python-celery))))
8329 (package
8330 (inherit celery)
8331 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8332 ("python2-mock" ,python2-mock)
8333 ,@(package-native-inputs celery))))))
8334
8335(define-public python-translitcodec
8336 (package
8337 (name "python-translitcodec")
8338 (version "0.4.0")
8339 (source
8340 (origin
8341 (method url-fetch)
8342 (uri (pypi-uri "translitcodec" version))
8343 (sha256
8344 (base32
8345 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8346 (build-system python-build-system)
8347 (arguments
8348 `(#:tests? #f)) ; no tests provided
8349 (home-page
8350 "https://github.com/claudep/translitcodec")
8351 (synopsis
8352 "Unicode to 8-bit charset transliteration codec")
8353 (description
8354 "This package contains codecs for transliterating ISO 10646 texts into
8355best-effort representations using smaller coded character sets (ASCII,
8356ISO 8859, etc.).")
8357 (license license:expat)))
8358
8359(define-public python2-translitcodec
8360 (package-with-python2 python-translitcodec))
8361
8362(define-public python-editor
8363 (package
8364 (name "python-editor")
8365 (version "0.5")
8366 (source
8367 (origin
8368 (method url-fetch)
8369 (uri (pypi-uri "python-editor" version))
8370 (sha256
8371 (base32
8372 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8373 (build-system python-build-system)
8374 (home-page
8375 "https://github.com/fmoo/python-editor")
8376 (synopsis
8377 "Programmatically open an editor, capture the result")
8378 (description
8379 "python-editor is a library that provides the editor module for
8380programmatically interfacing with your system's $EDITOR.")
8381 (license license:asl2.0)))
8382
8383(define-public python2-editor
8384 (package-with-python2 python-editor))
8385
8386(define-public python-sphinxcontrib-programoutput
8387 (package
8388 (name "python-sphinxcontrib-programoutput")
8389 (version "0.10")
8390 (source (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8393 (sha256
8394 (base32
8395 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8396 (build-system python-build-system)
8397 (arguments
8398 ;; FIXME: Many tests are failing and the upstream is gone.
8399 '(#:tests? #f))
8400 (propagated-inputs
8401 `(("python-sphinx" ,python-sphinx)))
8402 (synopsis "Sphinx extension to include program output")
8403 (description "A Sphinx extension to literally insert the output of arbitrary
8404commands into documents, helping you to keep your command examples up to date.")
8405 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8406 (license license:bsd-2)))
8407
8408(define-public python2-sphinxcontrib-programoutput
8409 (package-with-python2 python-sphinxcontrib-programoutput))
8410
8411(define-public python-sphinx-repoze-autointerface
8412 (package
8413 (name "python-sphinx-repoze-autointerface")
8414 (version "0.8")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8418 (sha256
8419 (base32
8420 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8421 (build-system python-build-system)
8422 (arguments '(#:tests? #f)) ; No tests.
8423 (propagated-inputs
8424 `(("python-sphinx" ,python-sphinx)
8425 ("python-zope-interface" ,python-zope-interface)))
8426 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8427 (description "This package defines an extension for the Sphinx documentation
8428system. The extension allows generation of API documentation by
8429introspection of @code{zope.interface} instances in code.")
8430 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8431 (license license:repoze)))
8432
8433(define-public python2-sphinx-repoze-autointerface
8434 (package-with-python2 python-sphinx-repoze-autointerface))
8435
8436(define-public python-vobject
8437 (package
8438 (name "python-vobject")
8439 (version "0.9.5")
8440 (source (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "vobject" version))
8443 (sha256
8444 (base32
8445 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8446 (build-system python-build-system)
8447 (arguments
8448 '(;; The test suite relies on some non-portable Windows interfaces.
8449 #:tests? #f))
8450 (propagated-inputs
8451 `(("python-dateutil" ,python-dateutil)
8452 ("python-pyicu" ,python-pyicu)))
8453 (synopsis "Parse and generate vCard and vCalendar files")
8454 (description "Vobject is intended to be a full featured Python package for
8455parsing and generating vCard and vCalendar files. Currently, iCalendar files
8456are supported and well tested. vCard 3.0 files are supported, and all data
8457should be imported, but only a few components are understood in a sophisticated
8458way.")
8459 (home-page "http://eventable.github.io/vobject/")
8460 (license license:asl2.0)))
8461
8462(define-public python2-vobject
8463 (package-with-python2 python-vobject))
8464
8465(define-public python-munkres
8466 (package
8467 (name "python-munkres")
8468 (version "1.0.8")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "munkres" version))
8472 (sha256
8473 (base32
8474 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8475 (build-system python-build-system)
8476 (arguments
8477 '(#:tests? #f)) ; no test suite
8478 (home-page "http://software.clapper.org/munkres/")
8479 (synopsis "Implementation of the Munkres algorithm")
8480 (description "The Munkres module provides an implementation of the Munkres
8481algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8482useful for solving the Assignment Problem.")
8483 (license license:bsd-3)))
8484
8485(define-public python2-munkres
8486 (package-with-python2 python-munkres))
8487
8488(define-public python-whoosh
8489 (package
8490 (name "python-whoosh")
8491 (version "2.7.4")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "Whoosh" version))
8496 (sha256
8497 (base32
8498 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8499 (build-system python-build-system)
8500 (native-inputs
8501 `(("python-pytest" ,python-pytest)))
8502 (home-page "https://bitbucket.org/mchaput/whoosh")
8503 (synopsis "Full text indexing, search, and spell checking library")
8504 (description
8505 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8506checking library.")
8507 (license license:bsd-2)))
8508
8509(define-public python2-whoosh
8510 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8511 (package (inherit whoosh)
8512 (propagated-inputs
8513 `(("python2-backport-ssl-match-hostname"
8514 ,python2-backport-ssl-match-hostname)
8515 ,@(package-propagated-inputs whoosh))))))
8516
8517(define-public python-pathlib
8518 (package
8519 (name "python-pathlib")
8520 (version "1.0.1")
8521 (source (origin
8522 (method url-fetch)
8523 (uri (pypi-uri "pathlib" version))
8524 (sha256
8525 (base32
8526 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8527 (build-system python-build-system)
8528 ;; The tests depend on the internal "test" module, which does not provide
8529 ;; a stable interface.
8530 (arguments `(#:tests? #f))
8531 (home-page "https://pathlib.readthedocs.org/")
8532 (synopsis "Object-oriented file system paths")
8533 (description "Pathlib offers a set of classes to handle file system paths.
8534It offers the following advantages over using string objects:
8535
8536@enumerate
8537@item No more cumbersome use of os and os.path functions. Everything can
8538be done easily through operators, attribute accesses, and method calls.
8539@item Embodies the semantics of different path types. For example,
8540comparing Windows paths ignores casing.
8541@item Well-defined semantics, eliminating any inconsistencies or
8542ambiguities (forward vs. backward slashes, etc.).
8543@end enumerate
8544
8545Note: In Python 3.4, pathlib is now part of the standard library. For other
8546Python versions please consider python-pathlib2 instead, which tracks the
8547standard library module. This module (python-pathlib) isn't maintained
8548anymore.")
8549 (license license:expat)))
8550
8551(define-public python2-pathlib
8552 (package-with-python2 python-pathlib))
8553
8554(define-public python2-pathlib2
8555 (package
8556 (name "python2-pathlib2")
8557 (version "2.3.2")
8558 (source (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "pathlib2" version))
8561 (sha256
8562 (base32
8563 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8564 (build-system python-build-system)
8565 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8566 ;; version is 3.4 which already includes this package as part of the
8567 ;; standard library.
8568 (arguments
8569 `(#:python ,python-2))
8570 (propagated-inputs
8571 `(("python2-scandir" ,python2-scandir)
8572 ("python2-six" ,python2-six)))
8573 (home-page "https://pypi.python.org/pypi/pathlib2/")
8574 (synopsis "Object-oriented file system paths - backport of standard
8575pathlib module")
8576 (description "The goal of pathlib2 is to provide a backport of standard
8577pathlib module which tracks the standard library module, so all the newest
8578features of the standard pathlib can be used also on older Python versions.
8579
8580Pathlib offers a set of classes to handle file system paths. It offers the
8581following advantages over using string objects:
8582
8583@enumerate
8584@item No more cumbersome use of os and os.path functions. Everything can
8585be done easily through operators, attribute accesses, and method calls.
8586@item Embodies the semantics of different path types. For example,
8587comparing Windows paths ignores casing.
8588@item Well-defined semantics, eliminating any inconsistencies or
8589ambiguities (forward vs. backward slashes, etc.).
8590@end enumerate")
8591 (license license:expat)))
8592
8593(define-public python2-pathlib2-bootstrap
8594 (hidden-package
8595 (package
8596 (inherit python2-pathlib2)
8597 (name "python2-pathlib2-bootstrap")
8598 (propagated-inputs
8599 `(("python2-scandir" ,python2-scandir)
8600 ("python2-six" ,python2-six-bootstrap))))))
8601
8602(define-public python-jellyfish
8603 (package
8604 (name "python-jellyfish")
8605 (version "0.5.6")
8606 (source (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "jellyfish" version))
8609 (sha256
8610 (base32
8611 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8612 (build-system python-build-system)
8613 (native-inputs
8614 `(("python-pytest" ,python-pytest)))
8615 (home-page "https://github.com/jamesturk/jellyfish")
8616 (synopsis "Approximate and phonetic matching of strings")
8617 (description "Jellyfish uses a variety of string comparison and phonetic
8618encoding algorithms to do fuzzy string matching.")
8619 (license license:bsd-2)
8620 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8621
8622(define-public python2-jellyfish
8623 (let ((jellyfish (package-with-python2
8624 (strip-python2-variant python-jellyfish))))
8625 (package (inherit jellyfish)
8626 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8627 ,@(package-native-inputs jellyfish))))))
8628
8629(define-public python2-unicodecsv
8630 (package
8631 (name "python2-unicodecsv")
8632 (version "0.14.1")
8633 (source (origin
8634 (method url-fetch)
8635 ;; The test suite is not included in the PyPi release.
8636 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8637 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8638 "archive/" version ".tar.gz"))
8639 (file-name (string-append name "-" version ".tar.gz"))
8640 (sha256
8641 (base32
8642 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8643 (build-system python-build-system)
8644 (arguments
8645 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8646 #:python ,python-2))
8647 (native-inputs
8648 `(("python2-unittest2" ,python2-unittest2)))
8649 (home-page "https://github.com/jdunck/python-unicodecsv")
8650 (synopsis "Unicode CSV module for Python 2")
8651 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8652module, adding support for Unicode strings.")
8653 (license license:bsd-2)))
8654
8655(define-public python-rarfile
8656 (package
8657 (name "python-rarfile")
8658 (version "2.8")
8659 (source (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "rarfile" version))
8662 (sha256
8663 (base32
8664 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8665 (build-system python-build-system)
8666 (arguments
8667 '(#:phases
8668 (modify-phases %standard-phases
8669 (replace 'check
8670 ;; Many tests fail, but the installation proceeds.
e59dd341 8671 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8672 (native-inputs
8673 `(("which" ,which))) ; required for tests
8674 (propagated-inputs
8675 `(("libarchive" ,libarchive)))
8676 (home-page "https://github.com/markokr/rarfile")
8677 (synopsis "RAR archive reader for Python")
8678 (description "This is Python module for RAR archive reading. The interface
8679is made as zipfile like as possible.")
8680 (license license:isc)))
8681
8682(define-public python2-rarfile
8683 (package-with-python2 python-rarfile))
8684
8685(define-public python-magic
8686 (package
8687 (name "python-magic")
8688 (version "0.4.15")
8689 (source
8690 (origin
8691 (method url-fetch)
8692 (uri (pypi-uri "python-magic" version))
8693 (sha256
8694 (base32
8695 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8696 (file-name (string-append name "-" version "-checkout"))))
8697 (build-system python-build-system)
8698 (arguments
8699 ;; The tests are unreliable, so don't run them. The tests fail
8700 ;; under Python3 because they were written for Python2 and
8701 ;; contain import statements that do not work in Python3. One of
8702 ;; the tests fails under Python2 because its assertions are
8703 ;; overly stringent; it relies on comparing output strings which
8704 ;; are brittle and can change depending on the version of
8705 ;; libmagic being used and the system on which the test is
8706 ;; running. In my case, under GuixSD 0.10.0, only one test
8707 ;; failed, and it seems to have failed only because the version
8708 ;; of libmagic that is packaged in Guix outputs a slightly
8709 ;; different (but not wrong) string than the one that the test
8710 ;; expected.
8711 '(#:tests? #f
8712 #:phases (modify-phases %standard-phases
8713 ;; Replace a specific method call with a hard-coded
8714 ;; path to the necessary libmagic.so file in the
8715 ;; store. If we don't do this, then the method call
8716 ;; will fail to find the libmagic.so file, which in
8717 ;; turn will cause any application using
8718 ;; python-magic to fail.
8719 (add-before 'build 'hard-code-path-to-libmagic
8720 (lambda* (#:key inputs #:allow-other-keys)
8721 (let ((file (assoc-ref inputs "file")))
8722 (substitute* "magic.py"
8723 (("ctypes.util.find_library\\('magic'\\)")
8724 (string-append "'" file "/lib/libmagic.so'")))
8725 #t)))
8726 (add-before 'install 'disable-egg-compression
8727 (lambda _
8728 (let ((port (open-file "setup.cfg" "a")))
8729 (display "\n[easy_install]\nzip_ok = 0\n"
8730 port)
8731 (close-port port)
8732 #t))))))
8733 (inputs
8734 ;; python-magic needs to be able to find libmagic.so.
8735 `(("file" ,file)))
8736 (home-page
8737 "https://github.com/ahupp/python-magic")
8738 (synopsis
8739 "File type identification using libmagic")
8740 (description
8741 "This module uses ctypes to access the libmagic file type
8742identification library. It makes use of the local magic database and
8743supports both textual and MIME-type output. Note that this module and
8744the python-file module both provide a \"magic.py\" file; these two
8745modules, which are different and were developed separately, both serve
8746the same purpose: to provide Python bindings for libmagic.")
8747 (license license:expat)))
8748
8749(define-public python2-magic
8750 (package-with-python2 python-magic))
8751
8752(define-public python2-s3cmd
8753 (package
8754 (name "python2-s3cmd")
8755 (version "1.6.1")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8760 "s3cmd-" version ".tar.gz"))
8761 (sha256
8762 (base32
8763 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8764 (build-system python-build-system)
8765 (arguments
8766 ;; s3cmd is written for python2 only and contains no tests.
8767 `(#:python ,python-2
8768 #:tests? #f))
8769 (propagated-inputs
8770 `(("python2-dateutil" ,python2-dateutil)
8771 ;; The python-file package also provides a magic.py module.
8772 ;; This is an unfortunate state of affairs; however, s3cmd
8773 ;; fails to install if it cannot find specifically the
8774 ;; python-magic package. Thus we include it, instead of using
8775 ;; python-file. Ironically, s3cmd sometimes works better
8776 ;; without libmagic bindings at all:
8777 ;; https://github.com/s3tools/s3cmd/issues/198
8778 ("python2-magic" ,python2-magic)))
8779 (home-page "http://s3tools.org/s3cmd")
8780 (synopsis "Command line tool for S3-compatible storage services")
8781 (description
8782 "S3cmd is a command line tool for uploading, retrieving and managing data
8783in storage services that are compatible with the Amazon Simple Storage
8784Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8785GnuPG encryption, and more. It also supports management of Amazon's
8786CloudFront content delivery network.")
8787 (license license:gpl2+)))
8788
8789(define-public python-pkgconfig
8790 (package
8791 (name "python-pkgconfig")
8792 (version "1.3.1")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "pkgconfig" version))
8797 (sha256
8798 (base32
8799 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python-nose" ,python-nose)))
8803 (inputs
8804 `(("pkg-config" ,pkg-config)))
8805 (arguments
8806 `(#:phases
8807 (modify-phases %standard-phases
8808 (add-before 'build 'patch
8809 ;; Hard-code the path to pkg-config.
8810 (lambda _
8811 (substitute* "pkgconfig/pkgconfig.py"
8812 (("cmd = 'pkg-config")
8813 (string-append "cmd = '" (which "pkg-config"))))
8814 #t))
8815 (replace 'check
8816 (lambda _
8817 (invoke "nosetests" "test.py"))))))
8818 (home-page "https://github.com/matze/pkgconfig")
8819 (synopsis "Python interface for pkg-config")
8820 (description "This module provides a Python interface to pkg-config. It
8821can be used to find all pkg-config packages, check if a package exists,
8822check if a package meets certain version requirements, query CFLAGS and
8823LDFLAGS and parse the output to build extensions with setup.py.")
8824 (license license:expat)))
8825
8826(define-public python2-pkgconfig
8827 (package-with-python2 python-pkgconfig))
8828
8829(define-public python-bz2file
8830 (package
8831 (name "python-bz2file")
8832 (version "0.98")
8833 (source
8834 (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "bz2file" version))
8837 (sha256
8838 (base32
8839 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8840 (build-system python-build-system)
8841 (arguments
8842 `(#:tests? #f)) ; Tests use deprecated python modules.
8843 (home-page "https://github.com/nvawda/bz2file")
8844 (synopsis "Read and write bzip2-compressed files")
8845 (description
8846 "Bz2file is a Python library for reading and writing bzip2-compressed
8847files. It contains a drop-in replacement for the I/O interface in the
8848standard library's @code{bz2} module, including features from the latest
8849development version of CPython that are not available in older releases.")
8850 (license license:asl2.0)))
8851
8852(define-public python2-bz2file
8853 (package-with-python2 python-bz2file))
8854
8855(define-public python-future
8856 (package
8857 (name "python-future")
8858 (version "0.16.0")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "future" version))
8863 (sha256
8864 (base32
8865 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8866 (build-system python-build-system)
8867 ;; Many tests connect to the network or are otherwise flawed.
8868 ;; https://github.com/PythonCharmers/python-future/issues/210
8869 (arguments
8870 `(#:tests? #f))
8871 (home-page "http://python-future.org")
8872 (synopsis "Single-source support for Python 3 and 2")
8873 (description
8874 "@code{python-future} is the missing compatibility layer between Python 2 and
8875Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8876to support both Python 2 and Python 3 with minimal overhead.")
8877 (license license:expat)))
8878
8879(define-public python2-future
8880 (package-with-python2 python-future))
8881
8882(define-public python-cysignals
8883 (package
8884 (name "python-cysignals")
8e3e51df 8885 (version "1.9.0")
44d10b1f
RW
8886 (source
8887 (origin
8888 (method url-fetch)
8e3e51df 8889 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8890 (sha256
8891 (base32
8e3e51df 8892 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8893 (build-system python-build-system)
8894 (native-inputs
8895 `(("python-cython" ,python-cython)
8896 ("python-sphinx" ,python-sphinx)))
8897 (inputs
8898 `(("pari-gp" ,pari-gp)))
8899 (arguments
8900 `(#:modules ((guix build python-build-system)
8901 ((guix build gnu-build-system) #:prefix gnu:)
8902 (guix build utils))
8903 ;; FIXME: Tests are executed after installation and currently fail
8904 ;; when not installing into standard locations; the author is working
8905 ;; on a fix.
8906 #:tests? #f
8907 #:phases
8908 (modify-phases %standard-phases
8909 (add-before
8910 'build 'configure
8911 (assoc-ref gnu:%standard-phases 'configure)))))
8912 (home-page
8913 "https://github.com/sagemath/cysignals")
8914 (synopsis
8915 "Handling of interrupts and signals for Cython")
8916 (description
8917 "The cysignals package provides mechanisms to handle interrupts (and
8918other signals and errors) in Cython code, using two related approaches,
8919for mixed Cython/Python code or external C libraries and pure Cython code,
8920respectively.")
8921 (license license:lgpl3+)))
8922
8923(define-public python2-cysignals
8924 (package-with-python2 python-cysignals))
8925
8926(define-public python2-shedskin
8927 (package
8928 (name "python2-shedskin")
8929 (version "0.9.4")
8930 (source
8931 (origin
8932 (method url-fetch)
8933 (uri (string-append "https://github.com/shedskin/shedskin/"
8934 "releases/download/v" version
8935 "/shedskin-" version ".tgz"))
8936 (sha256
8937 (base32
8938 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8939 (build-system python-build-system)
8940 (arguments
8941 `(#:python ,python-2
8942 #:phases (modify-phases %standard-phases
8943 (add-after 'unpack 'fix-resulting-include-libs
8944 (lambda* (#:key inputs #:allow-other-keys)
8945 (let ((libgc (assoc-ref inputs "libgc"))
8946 (pcre (assoc-ref inputs "pcre")))
8947 (substitute* "shedskin/makefile.py"
8948 (("variable == 'CCFLAGS':[ ]*")
8949 (string-append "variable == 'CCFLAGS':\n"
8950 " line += ' -I " pcre "/include"
8951 " -I " libgc "/include'"))
8952 (("variable == 'LFLAGS':[ ]*")
8953 (string-append "variable == 'LFLAGS':\n"
8954 " line += ' -L" pcre "/lib"
8955 " -L " libgc "/lib'")))
8956 #t))))))
8957 (inputs `(("pcre" ,pcre)
8958 ("libgc" ,libgc)))
8959 (home-page "https://shedskin.github.io/")
8960 (synopsis "Experimental Python-2 to C++ Compiler")
8961 (description (string-append "This is an experimental compiler for a subset of
8962Python. It generates C++ code and a Makefile."))
8963 (license (list license:gpl3 license:bsd-3 license:expat))))
8964
8965(define-public python2-rope
8966 (package
8967 (name "python2-rope")
a9ba0a31 8968 (version "0.11.0")
44d10b1f
RW
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "rope" version))
8973 (sha256
8974 (base32
a9ba0a31 8975 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8976 (arguments
afb29715 8977 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8978 `(#:python ,python-2))
8979 (build-system python-build-system)
8980 (native-inputs
8981 `(("python2-unittest2" ,python2-unittest2)))
8982 (home-page "https://github.com/python-rope/rope")
8983 (synopsis "Refactoring library for Python")
8984 (description "Rope is a refactoring library for Python. It facilitates
8985the renaming, moving and extracting of attributes, functions, modules, fields
8986and parameters in Python 2 source code. These refactorings can also be applied
8987to occurrences in strings and comments.")
8988 (license license:gpl2)))
8989
2c880ef4
LC
8990(define-public python-rope
8991 (package
8992 (inherit python2-rope)
8993 (name "python-rope")
8994 (arguments `(#:python ,python-wrapper
8995 ;; XXX: Only partial python3 support, results in some failing
8996 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8997 #:tests? #f))
8998 (properties `((python2-variant . ,(delay python2-rope))))))
8999
44d10b1f
RW
9000(define-public python-py3status
9001 (package
9002 (name "python-py3status")
9003 (version "3.7")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "py3status" version))
9008 (sha256
9009 (base32
9010 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9011 (build-system python-build-system)
9012 (inputs
9013 `(("file" ,file)))
9014 (arguments
9015 '(#:phases
9016 (modify-phases %standard-phases
9017 ;; 'file' is used for detection of configuration file encoding
9018 ;; let's make link the dependency to particular input
9019 (add-before 'build 'patch-file-path
9020 (lambda* (#:key inputs #:allow-other-keys)
9021 (let ((file-path (assoc-ref inputs "file")))
9022 (substitute* "py3status/parse_config.py"
9023 (("\\['file', '-b'")
9024 (string-append "['" file-path "/bin/file', '-b'")))
9025 #t))))
9026 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9027 (home-page "https://github.com/ultrabug/py3status")
9028 (synopsis "Extensible i3status wrapper written in Python")
9029 (description "py3status is an i3status wrapper which extends i3status
9030functionality in a modular way, allowing you to extend your panel with your
9031own code, responding to click events and updating clock every second.")
9032 (license license:bsd-3)))
9033
9034(define-public python-tblib
9035 (package
9036 (name "python-tblib")
9037 (version "1.3.2")
9038 (source (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "tblib" version))
9041 (sha256 (base32
9042 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9043 (build-system python-build-system)
9044 (arguments
9045 `(#:phases
9046 (modify-phases %standard-phases
9047 (add-before 'check 'adjust-tests
9048 (lambda _
9049 (when (which "python3")
9050 ;; Adjust the example output to match that of Python 3.7:
9051 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9052 (substitute* "README.rst"
9053 (("Exception\\('fail',") "Exception('fail'"))
9054 #t)))
9055 (replace 'check
9056 (lambda _
9057 ;; Upstream runs tests after installation and the package itself
9058 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9059 ;; found.
9060 (setenv "PYTHONPATH"
9061 (string-append (getcwd) "/build/lib:"
9062 (getenv "PYTHONPATH")))
9063 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9064 (native-inputs
9065 `(("python-pytest" ,python-pytest)
9066 ("python-six" ,python-six)))
9067 (home-page "https://github.com/ionelmc/python-tblib")
9068 (synopsis "Traceback serialization library")
9069 (description
9070 "Traceback serialization allows you to:
9071
9072@enumerate
9073@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9074different processes. This allows better error handling when running code over
9075multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9076
9077@item Parse traceback strings and raise with the parsed tracebacks.
9078@end enumerate\n")
9079 (license license:bsd-3)))
9080
9081(define-public python2-tblib
9082 (package-with-python2 python-tblib))
9083
9084(define-public python-greenlet
9085 (package
9086 (name "python-greenlet")
9087 (version "0.4.15")
9088 (source (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "greenlet" version))
9091 (sha256
9092 (base32
9093 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9094 (build-system python-build-system)
9095 (home-page "https://greenlet.readthedocs.io/")
9096 (synopsis "Lightweight in-process concurrent programming")
9097 (description
9098 "Greenlet package is a spin-off of Stackless, a version of CPython
9099that supports micro-threads called \"tasklets\". Tasklets run
9100pseudo-concurrently (typically in a single or a few OS-level threads) and
9101are synchronized with data exchanges on \"channels\".")
9102 (license (list license:psfl license:expat))))
9103
9104(define-public python2-greenlet
9105 (package-with-python2 python-greenlet))
9106
9107(define-public python-objgraph
9108 (package
9109 (name "python-objgraph")
9110 (version "3.4.0")
9111 (source
9112 (origin
9113 (method url-fetch)
9114 (uri (pypi-uri "objgraph" version))
9115 (sha256
9116 (base32
9117 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9118 (build-system python-build-system)
9119 (propagated-inputs
9120 `(("python-graphviz" ,python-graphviz)))
9121 (native-inputs
9122 `(("python-mock" ,python-mock)
9123 ("graphviz" ,graphviz)))
9124 (home-page "https://mg.pov.lt/objgraph/")
9125 (synopsis "Draw Python object reference graphs with graphviz")
9126 (description
9127 "This package provides tools to draw Python object reference graphs with
9128graphviz.")
9129 (license license:expat)))
9130
9131(define-public python-gevent
9132 (package
9133 (name "python-gevent")
9134 (version "1.3.7")
9135 (source (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "gevent" version))
9138 (sha256
9139 (base32
9140 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9141 (modules '((guix build utils)))
9142 (snippet
9143 '(begin
9144 ;; unbunding libev and c-ares
9145 (delete-file-recursively "deps")
9146 #t))))
9147 (build-system python-build-system)
9148 (arguments
9149 `(#:modules ((ice-9 ftw)
9150 (ice-9 match)
9151 (srfi srfi-26)
9152 (guix build utils)
9153 (guix build python-build-system))
9154 #:phases (modify-phases %standard-phases
9155 (add-after 'unpack 'unpack-libev
9156 (lambda* (#:key inputs #:allow-other-keys)
9157 (mkdir-p "deps/libev")
9158 ;; FIXME: gevent requires building libev, even though
9159 ;; it only links against the proper one.
9160 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9161 "--strip-components=1" "-C" "deps/libev")))
9162 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9163 (lambda _
9164 (substitute* "src/gevent/subprocess.py"
9165 (("/bin/sh") (which "sh")))
9166 (for-each (lambda (file)
9167 (substitute* file
9168 (("/bin/sh") (which "sh"))
9169 (("/bin/true") (which "true"))))
9170 (find-files "src/greentest" "\\.py$"))
9171 #t))
9172 (add-before 'build 'do-not-use-bundled-sources
9173 (lambda* (#:key inputs #:allow-other-keys)
9174 (setenv "CONFIG_SHELL" (which "bash"))
9175 (setenv "LIBEV_EMBED" "false")
9176 (setenv "CARES_EMBED" "false")
9177 (setenv "EMBED" "false")
9178
9179 (let ((greenlet (string-append
9180 (assoc-ref inputs "python-greenlet")
9181 "/include")))
9182 (match (scandir greenlet
9183 (lambda (item)
9184 (string-prefix? "python" item)))
9185 ((python)
9186 (setenv "CPATH"
9187 (string-append greenlet "/" python)))))
9188 #t))
9189 (add-before 'check 'skip-timer-test
9190 (lambda _
9191 ;; XXX: Skip 'TestTimerResolution', which appears to be
9192 ;; unreliable.
9193 (substitute* "src/greentest/test__core_timer.py"
9194 (("not greentest.RUNNING_ON_CI") "False"))
9195 #t))
9196 (replace 'check
9197 (lambda _
9198 ;; Make sure the build directory is on PYTHONPATH.
9199 (setenv "PYTHONPATH"
9200 (string-append
9201 (getenv "PYTHONPATH") ":"
9202 (getcwd) "/build/"
9203 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9204 (with-directory-excursion "src/greentest"
9205 ;; XXX: Many tests require network access. Instead we only
9206 ;; run known-good tests. Unfortunately we cannot use
9207 ;; recursion here since this directory also contains
9208 ;; Python-version-specific subfolders.
9209 (apply invoke "python" "testrunner.py" "--config"
9210 "known_failures.py"
9211 (scandir "." (cut regexp-exec
9212 (make-regexp "test_+(subprocess|core)")
9213 <>)))))))))
9214 (propagated-inputs
9215 `(("python-greenlet" ,python-greenlet)
9216 ("python-objgraph" ,python-objgraph)))
9217 (native-inputs
9218 `(("libev-source" ,(package-source libev))
9219 ("python-six" ,python-six)))
9220 (inputs
9221 `(("c-ares" ,c-ares)
9222 ("libev" ,libev)))
9223 (home-page "http://www.gevent.org/")
9224 (synopsis "Coroutine-based network library")
9225 (description
9226 "gevent is a coroutine-based Python networking library that uses greenlet
9227to provide a high-level synchronous API on top of the libev event loop.")
9228 (license license:expat)
9229 (properties `((python2-variant . ,(delay python2-gevent))))))
9230
9231(define-public python2-gevent
9232 (let ((base (package-with-python2
9233 (strip-python2-variant python-gevent))))
9234 (package
9235 (inherit base)
9236 (native-inputs `(,@(package-native-inputs python-gevent)
9237 ("python-mock" ,python2-mock))))))
9238
9239(define-public python-fastimport
9240 (package
9241 (name "python-fastimport")
9242 (version "0.9.6")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "fastimport" version))
9247 (sha256
9248 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9249 (build-system python-build-system)
9250 (home-page "https://github.com/jelmer/python-fastimport")
9251 (synopsis "VCS fastimport parser and generator in Python")
9252 (description "This package provides a parser for and generator of the Git
9253@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9254format.")
9255 (license license:gpl2+)))
9256
9257(define-public python2-fastimport
9258 (package-with-python2 python-fastimport))
9259
9260(define-public python-twisted
9261 (package
9262 (name "python-twisted")
e5ba2fe3 9263 (version "17.5.0")
44d10b1f
RW
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9267 (sha256
9268 (base32
e5ba2fe3 9269 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9270 (build-system python-build-system)
9271 (arguments
9272 '(#:tests? #f)) ; FIXME: Some tests are failing.
9273 ;; #:phases
9274 ;; (modify-phases %standard-phases
9275 ;; (replace 'check
9276 ;; (lambda _
9277 ;; (zero? (system* "./bin/trial" "twisted")))))
9278 (propagated-inputs
9279 `(("python-zope-interface" ,python-zope-interface)
9280 ("python-incremental" ,python-incremental)
e5ba2fe3 9281 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9282 ("python-constantly" ,python-constantly)
9283 ("python-automat" ,python-automat)))
9284 (home-page "https://twistedmatrix.com/")
9285 (synopsis "Asynchronous networking framework written in Python")
9286 (description
9287 "Twisted is an extensible framework for Python programming, with special
9288focus on event-based network programming and multiprotocol integration.")
9289 (license license:expat)))
9290
9291(define-public python2-twisted
9292 (package-with-python2 python-twisted))
9293
9294(define-public python-pika
9295 (package
9296 (name "python-pika")
9297 (version "0.12.0")
9298 (source
9299 (origin
9300 (method url-fetch)
9301 (uri (pypi-uri "pika" version))
9302 (sha256
9303 (base32
9304 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9305 (build-system python-build-system)
9306 (native-inputs
9307 `(("python-pyev" ,python-pyev)
9308 ("python-tornado" ,python-tornado)
9309 ("python-twisted" ,python-twisted)))
9310 (home-page "https://pika.readthedocs.org")
9311 (synopsis "Pure Python AMQP Client Library")
9312 (description
9313 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9314Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9315network support library.")
9316 (license license:bsd-3)))
9317
9318(define-public python2-pika
9319 (package-with-python2 python-pika))
9320
9321(define-public python-ply
9322 (package
9323 (name "python-ply")
9324 (version "3.10")
9325 (source
9326 (origin
9327 (method url-fetch)
9328 (uri (pypi-uri "ply" version))
9329 (sha256
9330 (base32
9331 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9332 (build-system python-build-system)
9333 (home-page "http://www.dabeaz.com/ply/")
9334 (synopsis "Python Lex & Yacc")
9335 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9336It uses LR parsing and does extensive error checking.")
9337 (license license:bsd-3)))
9338
9339(define-public python2-ply
9340 (package-with-python2 python-ply))
9341
9342(define-public python-tabulate
9343 (package
9344 (name "python-tabulate")
9345 (version "0.7.7")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "tabulate" version))
9349 (sha256
9350 (base32
9351 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9352 (build-system python-build-system)
9353 (arguments
9354 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9355 ;; and the latest release is not tagged in the upstream repository.
9356 '(#:tests? #f))
9357 (home-page "https://bitbucket.org/astanin/python-tabulate")
9358 (synopsis "Pretty-print tabular data")
9359 (description
9360 "Tabulate is a library and command-line utility to pretty-print tabular
9361data in Python.")
9362 (license license:expat)))
9363
9364(define-public python2-tabulate
9365 (package-with-python2 python-tabulate))
9366
9367(define-public python-kazoo
9368 (package
9369 (name "python-kazoo")
9370 (version "2.4.0")
9371 (source
9372 (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "kazoo" version))
9375 (sha256
9376 (base32
9377 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9378 (build-system python-build-system)
9379 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9380 (propagated-inputs
9381 `(("python-six" ,python-six)))
9382 (home-page "https://kazoo.readthedocs.org")
9383 (synopsis "High-level Zookeeper client library")
9384 (description
9385 "Kazoo is a Python client library for the Apache Zookeeper distributed
9386application service. It is designed to be easy to use and to avoid common
9387programming errors.")
9388 (license license:asl2.0)))
9389
9390(define-public python2-kazoo
9391 (package-with-python2 python-kazoo))
9392
9393(define-public python-pykafka
9394 (package
9395 (name "python-pykafka")
9396 (version "2.4.0")
9397 (source (origin
9398 (method url-fetch)
0ca1d040 9399 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9400 (sha256
9401 (base32
9402 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9403 (build-system python-build-system)
9404 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9405 (propagated-inputs
9406 `(("python-gevent" ,python-gevent)
9407 ("python-kazoo" ,python-kazoo)
9408 ("python-tabulate" ,python-tabulate)))
9409 (inputs
9410 `(("librdkafka" ,librdkafka)))
9411 (home-page "https://pykafka.readthedocs.io/")
9412 (synopsis "Apache Kafka client for Python")
9413 (description
9414 "PyKafka is a client for the Apache Kafka distributed messaging system.
9415It includes Python implementations of Kafka producers and consumers, which
9416are optionally backed by a C extension built on librdkafka.")
9417 (license license:asl2.0)))
9418
9419(define-public python2-pykafka
9420 (package-with-python2 python-pykafka))
9421
9422(define-public python-wcwidth
9423 (package
9424 (name "python-wcwidth")
9425 (version "0.1.7")
9426 (source
9427 (origin
9428 (method url-fetch)
9429 (uri (pypi-uri "wcwidth" version))
9430 (sha256
9431 (base32
9432 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9433 (build-system python-build-system)
9434 (home-page "https://github.com/jquast/wcwidth")
9435 (synopsis "Measure number of terminal column cells of wide-character codes")
9436 (description "Wcwidth measures the number of terminal column cells of
9437wide-character codes. It is useful for those implementing a terminal emulator,
9438or programs that carefully produce output to be interpreted by one. It is a
9439Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9440specified in POSIX.1-2001 and POSIX.1-2008.")
9441 (license license:expat)))
9442
9443(define-public python2-wcwidth
9444 (package-with-python2 python-wcwidth))
9445
9446(define-public python2-jsonrpclib
9447 (package
9448 (name "python2-jsonrpclib")
9449 (version "0.1.7")
9450 (source (origin
9451 (method url-fetch)
6571bba0 9452 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9453 (sha256
9454 (base32
9455 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9456 (build-system python-build-system)
9457 (arguments
9458 `(#:tests? #f
9459 #:python ,python-2))
9460 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9461 (synopsis "Implementation of JSON-RPC specification for Python")
9462 (description
9463 "This library is an implementation of the JSON-RPC specification.
9464It supports both the original 1.0 specification, as well as the
9465new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9466etc.")
9467 (license license:asl2.0)))
9468
9469(define-public python-chai
9470 (package
9471 (name "python-chai")
9472 (version "1.1.2")
9473 (source (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "chai" version))
9476 (sha256
9477 (base32
9478 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9479 (build-system python-build-system)
9480 (home-page "https://github.com/agoragames/chai")
9481 (synopsis "Mocking framework for Python")
9482 (description
9483 "Chai provides an api for mocking, stubbing and spying your python
9484objects, patterned after the Mocha library for Ruby.")
9485 (license license:bsd-3)))
9486
9487(define-public python2-chai
9488 (package-with-python2 python-chai))
9489
9490(define-public python-inflection
9491 (package
9492 (name "python-inflection")
9493 (version "0.3.1")
9494 (source
9495 (origin (method url-fetch)
9496 (uri (pypi-uri "inflection" version))
9497 (sha256
9498 (base32
9499 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9500 (build-system python-build-system)
9501 (native-inputs
9502 `(("python-pytest" ,python-pytest)))
9503 (home-page "https://github.com/jpvanhal/inflection")
9504 (synopsis "Python string transformation library")
9505 (description
9506 "Inflection is a string transformation library. It singularizes
9507and pluralizes English words, and transforms strings from CamelCase to
9508underscored string.")
9509 (license license:expat)))
9510
9511(define-public python2-inflection
9512 (package-with-python2 python-inflection))
9513
9514(define-public python-pylev
9515 (package
9516 (name "python-pylev")
9517 (version "1.3.0")
9518 (source (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "pylev" version))
9521 (sha256
9522 (base32
9523 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9524 (build-system python-build-system)
9525 (home-page "https://github.com/toastdriven/pylev")
9526 (synopsis "Levenshtein distance implementation in Python")
9527 (description "Pure Python Levenshtein implementation, based off the
9528Wikipedia code samples at
9529@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9530 (license license:bsd-3)))
9531
9532(define-public python2-pylev
9533 (package-with-python2 python-pylev))
9534
9535(define-public python-cleo
9536 (package
9537 (name "python-cleo")
9538 (version "0.6.1")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "cleo" version))
9542 (sha256
9543 (base32
9544 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9545 (build-system python-build-system)
9546 (native-inputs
9547 `(;; For testing
9548 ("python-mock" ,python-mock)
9549 ("python-pytest-mock" ,python-pytest-mock)
9550 ("python-pytest" ,python-pytest)))
9551 (propagated-inputs
9552 `(("python-backpack" ,python-backpack)
9553 ("python-pastel" ,python-pastel)
9554 ("python-pylev" ,python-pylev)))
9555 (home-page "https://github.com/sdispater/cleo")
9556 (synopsis "Command-line arguments library for Python")
9557 (description
9558 "Cleo allows you to create command-line commands with signature in
9559docstring and colored output.")
9560 (license license:expat)))
9561
9562(define-public python2-cleo
9563 (package-with-python2 python-cleo))
9564
9565(define-public python-lazy-object-proxy
9566 (package
9567 (name "python-lazy-object-proxy")
9568 (version "1.3.1")
9569 (source (origin
9570 (method url-fetch)
9571 (uri (pypi-uri "lazy-object-proxy" version))
9572 (sha256
9573 (base32
9574 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9575 (build-system python-build-system)
9576 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9577 (synopsis "Lazy object proxy for python")
9578 (description
9579 "Lazy object proxy is an object that wraps a callable but defers the call
9580until the object is actually required, and caches the result of said call.")
9581 (license license:bsd-2)))
9582
9583(define-public python2-lazy-object-proxy
9584 (package-with-python2 python-lazy-object-proxy))
9585
9586(define-public python-dnspython
9587 (package
9588 (name "python-dnspython")
9589 (version "1.15.0")
9590 (source (origin
9591 (method url-fetch)
9592 (uri (string-append "http://www.dnspython.org/kits/"
9593 version "/dnspython-" version ".tar.gz"))
9594 (sha256
9595 (base32
9596 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9597 (build-system python-build-system)
9598 (arguments '(#:tests? #f)) ; XXX: requires internet access
9599 (home-page "http://www.dnspython.org")
9600 (synopsis "DNS toolkit for Python")
9601 (description
9602 "dnspython is a DNS toolkit for Python. It supports almost all record
9603types. It can be used for queries, zone transfers, and dynamic updates.
9604It supports TSIG authenticated messages and EDNS0.")
9605 (license license:expat)))
9606
9607(define-public python2-dnspython
9608 (package-with-python2 python-dnspython))
9609
9610(define-public python-email-validator
9611 (package
9612 (name "python-email-validator")
9613 (version "1.0.2")
9614 (source
9615 (origin (method url-fetch)
9616 (uri (pypi-uri "email_validator" version))
9617 (sha256
9618 (base32
9619 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9620 (build-system python-build-system)
9621 (arguments
9622 '(#:phases
9623 (modify-phases %standard-phases
9624 (add-before 'build 'use-dnspython
9625 (lambda _
9626 (substitute* "setup.py"
9627 (("dnspython3") "dnspython"))
9628 #t)))))
9629 (propagated-inputs
9630 `(("python-dnspython" ,python-dnspython)
9631 ("python-idna" ,python-idna)))
9632 (home-page "https://github.com/JoshData/python-email-validator")
9633 (synopsis "Email address validation library for Python")
9634 (description
9635 "This library validates email address syntax and deliverability.")
9636 (license license:cc0)))
9637
9638(define-public python2-email-validator
9639 (package-with-python2 python-email-validator))
9640
9641(define-public python-ukpostcodeparser
9642 (package
9643 (name "python-ukpostcodeparser")
9644 (version "1.0.3")
9645 (source (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "UkPostcodeParser" version))
9648 (sha256
9649 (base32
9650 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9651 (build-system python-build-system)
9652 (home-page "https://github.com/hamstah/ukpostcodeparser")
9653 (synopsis "UK Postcode parser for Python")
9654 (description
9655 "This library provides the @code{parse_uk_postcode} function for
9656parsing UK postcodes.")
9657 (license license:expat)))
9658
9659(define-public python2-ukpostcodeparser
9660 (package-with-python2 python-ukpostcodeparser))
9661
9662(define-public python-faker
9663 (package
9664 (name "python-faker")
9665 (version "0.7.9")
9666 (source (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "Faker" version))
9669 (sha256
9670 (base32
9671 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9672 (patches
9673 (search-patches "python-faker-fix-build-32bit.patch"))
9674 (modules '((guix build utils)))
9675 (snippet
9676 '(begin
9677 (for-each delete-file (find-files "." "\\.pyc$"))
9678 #t))))
9679 (build-system python-build-system)
9680 (arguments
9681 '(#:phases
9682 (modify-phases %standard-phases
9683 (replace 'check
49ff8827 9684 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9685 (native-inputs
9686 `(;; For testing
9687 ("python-email-validator" ,python-email-validator)
9688 ("python-mock" ,python-mock)
9689 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9690 (propagated-inputs
9691 `(("python-dateutil" ,python-dateutil)
9692 ("python-six" ,python-six)))
9693 (home-page "https://github.com/joke2k/faker")
9694 (synopsis "Python package that generates fake data")
9695 (description
9696 "Faker is a Python package that generates fake data such as names,
9697addresses, and phone numbers.")
9698 (license license:expat)
9699 (properties `((python2-variant . ,(delay python2-faker))))))
9700
9701(define-public python2-faker
9702 (let ((base (package-with-python2 (strip-python2-variant
9703 python-faker))))
9704 (package
9705 (inherit base)
9706 (propagated-inputs
9707 `(("python2-ipaddress" ,python2-ipaddress)
9708 ,@(package-propagated-inputs base))))))
9709
9710(define-public python-pyaml
9711 (package
9712 (name "python-pyaml")
9713 (version "18.11.0")
9714 (source (origin
9715 (method url-fetch)
9716 (uri (pypi-uri "pyaml" version))
9717 (sha256
9718 (base32
9719 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9720 (build-system python-build-system)
9721 (native-inputs
9722 `(("python-unidecode" ,python-unidecode)))
9723 (propagated-inputs
9724 `(("python-pyyaml" ,python-pyyaml)))
9725 (home-page "https://github.com/mk-fg/pretty-yaml")
9726 (synopsis "YAML pretty-print library for Python")
9727 (description
9728 "pyaml is a PyYAML based python module to produce pretty and readable
9729YAML-serialized data.")
9730 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9731
9732(define-public python2-pyaml
9733 (package-with-python2 python-pyaml))
9734
9735(define-public python-backpack
9736 (package
9737 (name "python-backpack")
9738 (version "0.1")
9739 (source
9740 (origin
9741 (method url-fetch)
9742 (uri (pypi-uri "backpack" version))
9743 (sha256
9744 (base32
9745 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9746 (build-system python-build-system)
9747 (native-inputs
9748 `(("python-pytest" ,python-pytest)
9749 ("python-nose" ,python-nose)))
9750 (propagated-inputs
9751 `(("python-simplejson" ,python-simplejson)))
9752 (home-page "https://github.com/sdispater/backpack")
9753 (synopsis "Utilities for working with Python collections")
9754 (description "Backpack provides some useful utilities for working with
9755collections of data.")
9756 (license license:expat)))
9757
9758(define-public python2-backpack
9759 (package-with-python2 python-backpack))
9760
9761(define-public python-prompt-toolkit
9762 (package
9763 (name "python-prompt-toolkit")
9764 (version "2.0.7")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9769 (sha256
9770 (base32
9771 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9772 (build-system python-build-system)
9773 (arguments
9774 `(#:phases
9775 (modify-phases %standard-phases
9776 (delete 'check)
9777 (add-after 'install 'post-install-check
9778 (lambda* (#:key inputs outputs #:allow-other-keys)
9779 ;; HOME is needed for the test
9780 ;; "test_pathcompleter_can_expanduser".
9781 (setenv "HOME" "/tmp")
9782 (add-installed-pythonpath inputs outputs)
9783 (invoke "py.test"))))))
9784 (propagated-inputs
9785 `(("python-wcwidth" ,python-wcwidth)
9786 ("python-six" ,python-six)
9787 ("python-pygments" ,python-pygments)))
9788 (native-inputs
9789 `(("python-pytest" ,python-pytest)))
9790 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9791 (synopsis "Library for building command line interfaces in Python")
9792 (description
9793 "Prompt-Toolkit is a library for building interactive command line
9794interfaces in Python. It's like GNU Readline but it also features syntax
9795highlighting while typing, out-of-the-box multi-line input editing, advanced
9796code completion, incremental search, support for Chinese double-width
9797characters, mouse support, and auto suggestions.")
9798 (license license:bsd-3)))
9799
9800(define-public python2-prompt-toolkit
9801 (package-with-python2 python-prompt-toolkit))
9802
9803(define-public python-prompt-toolkit-1
9804 (package (inherit python-prompt-toolkit)
9805 (version "1.0.15")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9810 (sha256
9811 (base32
9812 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9813
9814(define-public python2-prompt-toolkit-1
9815 (package-with-python2 python-prompt-toolkit-1))
9816
9817(define-public python-jedi
9818 (package
9819 (name "python-jedi")
40bd0aa3 9820 (version "0.13.2")
44d10b1f
RW
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "jedi" version))
9825 (sha256
9826 (base32
40bd0aa3 9827 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9828 (build-system python-build-system)
9829 (arguments
40bd0aa3 9830 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9831 ;; https://github.com/davidhalter/jedi/issues/1263)
9832 #:tests? #f
9833 #:phases
9834 (modify-phases %standard-phases
9835 (replace 'check
9836 (lambda* (#:key tests? #:allow-other-keys)
9837 (when tests?
9838 (invoke "py.test" "-vv")))))))
9839 (native-inputs
9840 `(("python-pytest" ,python-pytest)
9841 ("python-docopt" ,python-docopt)))
9842 (propagated-inputs
9843 `(("python-parso" ,python-parso)))
9844 (home-page "https://github.com/davidhalter/jedi")
9845 (synopsis "Autocompletion and static analysis library for Python")
9846 (description
9847 "Jedi is a static analysis tool for Python that can be used in Integrated
9848Development Environments (@dfn{IDE}s) and text editors. It understands Python
9849on a deeper level than many other static analysis frameworks for Python.
9850
9851Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9852well.")
9853 (license license:expat)))
9854
9855(define-public python2-jedi
9856 (package-with-python2 python-jedi))
9857
9858(define-public ptpython
9859 (package
9860 (name "ptpython")
9861 (version "0.34")
9862 (source (origin
9863 (method url-fetch)
9864 (uri (pypi-uri "ptpython" version))
9865 (sha256
9866 (base32
9867 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9868 (build-system python-build-system)
9869 (arguments
9870 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9871 (propagated-inputs
9872 `(("python-docopt" ,python-docopt)
9873 ("python-jedi" ,python-jedi)
9874 ("python-prompt-toolkit" ,python-prompt-toolkit)
9875 ("python-pygments" ,python-pygments)))
9876 (home-page "https://github.com/jonathanslenders/ptpython")
9877 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9878 (description
9879 "ptpython is a Python read-eval-print loop with IDE-like features.
9880It supports syntax highlighting, multiline editing, autocompletion, mouse,
9881color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9882etc.")
9883 (license license:bsd-3)
9884 (properties `((python2-variant . ,(delay ptpython-2))))))
9885
9886(define-public ptpython-2
9887 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9888 (package
9889 (inherit base)
9890 (name "ptpython2"))))
9891
9892(define-public python-stem
9893 (package
9894 (name "python-stem")
9895 (version "1.7.0")
9896 (source
9897 (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "stem" version))
9900 (sha256
9901 (base32
9902 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9903 (build-system python-build-system)
9904 (arguments
9905 `(#:phases
9906 (modify-phases %standard-phases
9907 (replace 'check
9908 (lambda _
9909 (invoke "./run_tests.py" "--unit")
9910 #t)))))
9911 (native-inputs
9912 `(("python-mock" ,python-mock)
9913 ("python-pycodestyle" ,python-pycodestyle)
9914 ("python-pyflakes" ,python-pyflakes)))
9915 (home-page "https://stem.torproject.org/")
9916 (synopsis
9917 "Python controller library that allows applications to interact with Tor")
9918 (description
9919 "Stem is a Python controller library for Tor. With it you can use Tor's
9920control protocol to script against the Tor process and read descriptor data
9921relays publish about themselves.")
9922 (license license:lgpl3)))
9923
9924(define-public python2-stem
9925 (package-with-python2 python-stem))
9926
9927(define-public python-pyserial
9928 (package
9929 (name "python-pyserial")
9930 (version "3.1.1")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "pyserial" version))
9935 (sha256
9936 (base32
9937 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9938 (build-system python-build-system)
9939 (arguments
9940 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9941 ;; #:phases
9942 ;; (modify-phases %standard-phases
9943 ;; (replace 'check
9944 ;; (lambda _
9945 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9946 (home-page
9947 "https://github.com/pyserial/pyserial")
9948 (synopsis "Python Serial Port Bindings")
9949 (description "@code{pyserial} provide serial port bindings for Python. It
9950supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9951and/or Xon/Xoff. The port is accessed in RAW mode.")
9952 (license license:bsd-3)))
9953
9954(define-public python2-pyserial
9955 (package-with-python2 python-pyserial))
9956
9957(define-public python-kivy
9958 (package
9959 (name "python-kivy")
9960 (version "1.10.1")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "Kivy" version))
9965 (file-name (string-append name "-" version ".tar.gz"))
9966 (sha256
9967 (base32
9968 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9969 (build-system python-build-system)
9970 (arguments
9971 `(#:tests? #f ; Tests require many optional packages
9972 #:phases
9973 (modify-phases %standard-phases
9974 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9975 (lambda* (#:key inputs #:allow-other-keys)
9976 (setenv "KIVY_SDL2_PATH"
9977 (string-append (assoc-ref inputs "sdl-union")
9978 "/include/SDL2"))
9979 #t)))))
9980 (native-inputs
9981 `(("git" ,git)
9982 ("pkg-config" ,pkg-config)
9983 ("python-cython" ,python-cython)))
9984 (inputs
9985 `(("gstreamer" ,gstreamer)
9986 ("mesa" ,mesa)
9987 ("sdl-union"
9988 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9989 (home-page "http://kivy.org")
9990 (synopsis
9991 "Multitouch application framework")
9992 (description
9993 "A software library for rapid development of
9994hardware-accelerated multitouch applications.")
9995 (license license:expat)))
9996
9997(define-public python2-kivy
9998 (package-with-python2 python-kivy))
9999
10000(define-public python-kivy-next
10001 (deprecated-package "python-kivy-next" python-kivy))
10002
10003(define-public python2-kivy-next
10004 (deprecated-package "python2-kivy-next" python2-kivy))
10005
10006(define-public python-binaryornot
10007 (package
10008 (name "python-binaryornot")
10009 (version "0.4.4")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "binaryornot" version))
10013 (sha256
10014 (base32
10015 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10016 (build-system python-build-system)
10017 (propagated-inputs
10018 `(("python-chardet" ,python-chardet)
10019 ("python-hypothesis" ,python-hypothesis)))
10020 (home-page "https://github.com/audreyr/binaryornot")
10021 (synopsis "Package to check if a file is binary or text")
10022 (description "Ultra-lightweight pure Python package to check if a file is
10023binary or text.")
10024 (license license:bsd-3)
10025 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10026
10027(define-public python2-binaryornot
10028 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10029 (package (inherit base)
10030 (propagated-inputs
10031 `(("python2-enum34" ,python2-enum34)
10032 ,@(package-propagated-inputs base))))))
10033
10034(define-public python-nltk
10035 (package
10036 (name "python-nltk")
10037 (version "3.2.1")
10038 (source (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "nltk" version))
10041 (sha256
10042 (base32
10043 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10044 (build-system python-build-system)
10045 (arguments
10046 '(;; The tests require some extra resources to be downloaded.
10047 ;; TODO Try packaging these resources.
10048 #:tests? #f))
10049 (home-page "http://nltk.org/")
10050 (synopsis "Natural Language Toolkit")
10051 (description "It provides interfaces to over 50 corpora and lexical
10052resources such as WordNet, along with a suite of text processing libraries
10053for classification, tokenization, stemming, tagging, parsing, and semantic
10054reasoning, wrappers for natural language processing libraries.")
10055 (license license:asl2.0)))
10056
10057(define-public python2-nltk
10058 (package-with-python2 python-nltk))
10059
10060(define-public python-pymongo
10061 (package
10062 (name "python-pymongo")
10063 (version "3.7.2")
10064 (source (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "pymongo" version))
10067 (sha256
10068 (base32
10069 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10070 (build-system python-build-system)
10071 (propagated-inputs
10072 `(("python-certifi" ,python-certifi)))
10073 (home-page "https://github.com/mongodb/mongo-python-driver")
10074 (synopsis "Python driver for MongoDB")
10075 (description "Python driver for MongoDB.")
10076 (license license:asl2.0)))
10077
10078(define-public python2-pymongo
10079 (package-with-python2 python-pymongo))
10080
44d10b1f
RW
10081(define-public python-consul
10082 (package
10083 (name "python-consul")
10084 (version "0.6.1")
10085 (source
10086 (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "python-consul" version))
10089 (sha256
10090 (base32
10091 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10092 (build-system python-build-system)
10093 (arguments
10094 '(#:tests? #f)) ; The tests are not distributed
10095 (propagated-inputs
10096 `(("python-requests" ,python-requests)
10097 ("python-six" ,python-six)))
10098 (home-page "https://github.com/cablehead/python-consul")
10099 (synopsis "Python client for Consul")
10100 (description
10101 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10102discovery, monitoring and configuration.")
10103 (license license:expat)))
10104
10105(define-public python2-consul
10106 (package-with-python2 python-consul))
10107
10108(define-public python-schematics
10109 (package
10110 (name "python-schematics")
10111 (version "1.1.1")
10112 (source
10113 (origin
10114 (method url-fetch)
10115 (uri (string-append
10116 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10117 (file-name (string-append name "-" version ".tar.gz"))
10118 (sha256
10119 (base32
10120 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10121 (build-system python-build-system)
10122 (propagated-inputs
10123 `(("python-six" ,python-six)))
10124 (arguments
10125 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10126 ; version requirements (eg python-coveralls)
10127 (home-page "https://github.com/schematics/schematics")
10128 (synopsis "Python Data Structures for Humans")
10129 (description "Python Data Structures for Humans.")
10130 (license license:bsd-3)))
10131
10132(define-public python2-schematics
10133 (package-with-python2 python-schematics))
10134
10135(define-public python-odfpy
10136 (package
10137 (name "python-odfpy")
10138 (version "1.3.3")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "odfpy" version))
10142 (sha256
10143 (base32
10144 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10145 (arguments
10146 `(#:modules ((srfi srfi-1)
10147 (guix build python-build-system)
10148 (guix build utils))
10149 #:phases
10150 (modify-phases %standard-phases
10151 (replace 'check
10152 ;; The test runner invokes python2 and python3 for test*.py.
10153 ;; To avoid having both in inputs, we replicate it here.
10154 (lambda _
21ccc01d
RW
10155 (for-each (lambda (test-file) (invoke "python" test-file))
10156 (find-files "tests" "^test.*\\.py$"))
10157 #t)))))
44d10b1f
RW
10158 (build-system python-build-system)
10159 (home-page "https://github.com/eea/odfpy")
10160 (synopsis "Python API and tools to manipulate OpenDocument files")
10161 (description "Collection of libraries and utility programs written in
10162Python to manipulate OpenDocument 1.2 files.")
10163 (license
10164 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10165 ;; number of files with other licenses.
10166 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10167
10168(define-public python2-odfpy
10169 (package-with-python2 python-odfpy))
10170
10171(define-public python-natsort
10172 (package
10173 (name "python-natsort")
10174 (version "5.4.1")
10175 (source (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "natsort" version))
10178 (sha256
10179 (base32
10180 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10181 (build-system python-build-system)
10182 (arguments
10183 `(#:modules ((guix build utils)
10184 (guix build python-build-system)
10185 (srfi srfi-1)
10186 (srfi srfi-26)
10187 (ice-9 ftw))
10188 #:phases
10189 (modify-phases %standard-phases
10190 (add-before 'check 'set-cachedir
10191 ;; Tests require write access to $HOME by default
10192 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10193 (replace 'check
10194 (lambda _
10195 (let ((cwd (getcwd)))
10196 (setenv "PYTHONPATH"
10197 (string-append
10198 cwd "/build/"
10199 (find (cut string-prefix? "lib" <>)
10200 (scandir (string-append cwd "/build")))
10201 ":"
10202 (getenv "PYTHONPATH")))
10203 (invoke "pytest" "-v")))))))
10204 (native-inputs
10205 `(("python-hypothesis" ,python-hypothesis)
10206 ("python-pytest-cov" ,python-pytest-cov)
10207 ("python-pytest-mock" ,python-pytest-mock)
10208 ("python-pytest" ,python-pytest)))
10209 (propagated-inputs ; TODO: Add python-fastnumbers.
10210 `(("python-pyicu" ,python-pyicu)))
10211 (home-page "https://github.com/SethMMorton/natsort")
10212 (synopsis "Natural sorting for python and shell")
10213 (description
10214 "Natsort lets you apply natural sorting on lists instead of
10215lexicographical. If you use the built-in @code{sorted} method in python
10216on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10217returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10218function @code{natsorted} that identifies numbers and sorts them separately
10219from strings. It can also sort version numbers, real numbers, mixed types
10220and more, and comes with a shell command @command{natsort} that exposes this
10221functionality in the command line.")
10222 (license license:expat)
10223 (properties `((python2-variant . ,(delay python2-natsort))))))
10224
10225(define-public python2-natsort
10226 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10227 (package (inherit base)
10228 (native-inputs
10229 `(("python2-pathlib" ,python2-pathlib)
10230 ,@(package-native-inputs base))))))
10231
10232(define-public python-glances
10233 (package
10234 (name "python-glances")
10235 (version "3.0.2")
10236 (source
10237 (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "Glances" version))
10240 (sha256
10241 (base32
10242 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10243 (build-system python-build-system)
10244 (propagated-inputs
10245 `(("python-psutil" ,python-psutil)))
10246 (home-page
10247 "https://github.com/nicolargo/glances")
10248 (synopsis
10249 "A cross-platform curses-based monitoring tool")
10250 (description
10251 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10252Glances uses the PsUtil library to get information from your system. It monitors
10253CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10254 (license license:lgpl3+)))
10255
10256(define-public python2-glances
10257 (package-with-python2 python-glances))
10258
10259(define-public python-graphql-core
10260 (package
10261 (name "python-graphql-core")
10262 (version "0.5.3")
10263 (source
10264 (origin
10265 (method url-fetch)
10266 (uri (pypi-uri "graphql-core" version))
10267 (sha256
10268 (base32
10269 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10270 (build-system python-build-system)
10271 (arguments
10272 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10273 #:phases
10274 (modify-phases %standard-phases
10275 (add-after 'unpack 'patch-hardcoded-version
10276 (lambda _ (substitute*
10277 "setup.py"
10278 (("'gevent==1.1rc1'") "'gevent'"))
10279 #t)))))
10280 (native-inputs
10281 `(("python-gevent" ,python-gevent)
10282 ("python-mock" ,python-mock)
10283 ("python-pytest-mock" ,python-pytest-mock)))
10284 (propagated-inputs
10285 `(("python-promise" ,python-promise)
10286 ("python-six" ,python-six)))
10287 (home-page "https://github.com/graphql-python/graphql-core")
10288 (synopsis "GraphQL implementation for Python")
10289 (description
10290 "GraphQL implementation for Python. GraphQL is a data query language and
10291runtime designed and used to request and deliver data to mobile and web apps.
10292This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10293to Python.")
10294 (license license:expat)))
10295
10296(define-public python2-graphql-core
10297 (package-with-python2 python-graphql-core))
10298
10299(define-public python-graphql-relay
10300 (package
10301 (name "python-graphql-relay")
10302 (version "0.4.5")
10303 (source
10304 (origin
10305 (method url-fetch)
10306 (uri (pypi-uri "graphql-relay" version))
10307 (sha256
10308 (base32
10309 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10310 (build-system python-build-system)
10311 (arguments
10312 '(#:tests? #f)) ; The tests are not distributed
10313 (propagated-inputs
10314 `(("python-graphql-core" ,python-graphql-core)
10315 ("python-promise" ,python-promise)
10316 ("python-six" ,python-six)))
10317 (home-page "https://github.com/graphql-python/graphql-relay-py")
10318 (synopsis "Relay implementation for Python")
10319 (description
10320 "This is a library to allow the easy creation of Relay-compliant servers
10321using the GraphQL Python reference implementation of a GraphQL server. It
10322should be noted that the code is a exact port of the original
10323@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10324from Facebook.")
10325 (license license:expat)))
10326
10327(define-public python2-graphql-relay
10328 (package-with-python2 python-graphql-relay))
10329
10330(define-public python-graphene
10331 (package
10332 (name "python-graphene")
10333 (version "0.10.2")
10334 (source
10335 (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "graphene" version))
10338 (sha256
10339 (base32
10340 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10341 (build-system python-build-system)
10342 (propagated-inputs
10343 `(("python-graphql-core" ,python-graphql-core)
10344 ("python-graphql-relay" ,python-graphql-relay)
10345 ("python-iso8601" ,python-iso8601)
10346 ("python-promise" ,python-promise)
10347 ("python-six" ,python-six)))
10348 (arguments
10349 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10350 (home-page "http://graphene-python.org/")
10351 (synopsis "GraphQL Framework for Python")
10352 (description
10353 "Graphene is a Python library for building GraphQL schemas/types.
10354A GraphQL schema describes your data model, and provides a GraphQL server
10355with an associated set of resolve methods that know how to fetch data.")
10356 (properties `((python2-variant . ,(delay python2-graphene))))
10357 (license license:expat)))
10358
10359(define-public python2-graphene
10360 (let ((base (package-with-python2
10361 (strip-python2-variant python-graphene))))
10362 (package (inherit base)
10363 (native-inputs
10364 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10365 ,@(package-native-inputs base))))))
10366
10367(define-public python-nautilus
10368 (package
10369 (name "python-nautilus")
10370 (version "0.4.9")
10371 (source
10372 (origin
10373 (method url-fetch)
10374 (uri (pypi-uri "nautilus" version))
10375 (sha256
10376 (base32
10377 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10378 (build-system python-build-system)
10379 (arguments `(#:tests? #f)) ; fails to import test modules
10380 (propagated-inputs
10381 `(("python-bcrypt" ,python-bcrypt)
10382 ("python-click" ,python-click)
10383 ("python-consul" ,python-consul)
10384 ("python-graphene" ,python-graphene)
10385 ("python-jinja2" ,python-jinja2)
10386 ("python-peewee" ,python-peewee)
10387 ("python-pika" ,python-pika)
10388 ("python-tornado" ,python-tornado)
10389 ("python-wtforms" ,python-wtforms)))
10390 (native-inputs
10391 `(("python-nose2" ,python-nose2)))
10392 (home-page "https://github.com/AlecAivazis/nautilus")
10393 (synopsis "Library for creating microservice applications")
10394 (description
10395 "Nautilus is a framework for flux based microservices that looks to
10396provide extendible implementations of common aspects of a cloud so that you can
10397focus on building massively scalable web applications.")
10398 (license license:expat)))
10399
10400(define-public python-snowballstemmer
10401 (package
10402 (name "python-snowballstemmer")
10403 (version "1.2.1")
10404 (source (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "snowballstemmer" version))
10407 (sha256
10408 (base32
10409 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10410 (build-system python-build-system)
10411 (arguments
10412 `(;; No tests exist
10413 #:tests? #f))
10414 (home-page "https://github.com/shibukawa/snowball_py")
10415 (synopsis "Snowball stemming library collection for Python")
10416 (description "This package provides 16 word stemmer algorithms generated
10417from Snowball algorithms. It includes the 15 original ones plus the Poerter
10418English stemmer.")
10419 (license license:bsd-3)))
10420
10421(define-public python2-snowballstemmer
10422 (package-with-python2 python-snowballstemmer))
10423
10424(define-public python-sphinx-cloud-sptheme
10425 (package
10426 (name "python-sphinx-cloud-sptheme")
10427 (version "1.8.0")
10428 (source (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "cloud_sptheme" version))
10431 (sha256
10432 (base32
10433 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10434 (build-system python-build-system)
10435 ;; FIXME: The 'pypi' release archive does not contain tests.
10436 (arguments '(#:tests? #f))
10437 (native-inputs
10438 `(("python-sphinx" ,python-sphinx)))
10439 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10440 (synopsis "'Cloud' theme for Sphinx documenter")
10441 (description "This package contains the \"Cloud\" theme for Sphinx and some
10442related extensions.")
10443 (license license:bsd-3)))
10444
10445(define-public python2-sphinx-cloud-sptheme
10446 (package-with-python2 python-sphinx-cloud-sptheme))
10447
10448(define-public python-sphinx-alabaster-theme
10449 (package
10450 (name "python-sphinx-alabaster-theme")
10451 (version "0.7.12")
10452 (source (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "alabaster" version))
10455 (sha256
10456 (base32
10457 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10458 (build-system python-build-system)
10459 (propagated-inputs
10460 `(("python-pygments" ,python-pygments)))
10461 (home-page "https://alabaster.readthedocs.io/")
10462 (synopsis "Configurable sidebar-enabled Sphinx theme")
10463 (description "Alabaster is a visually (c)lean, responsive, configurable
10464theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10465 (license license:bsd-3)))
10466
10467(define-public python2-sphinx-alabaster-theme
10468 (package-with-python2 python-sphinx-alabaster-theme))
10469
10470(define-public python-setproctitle
10471(package
10472 (name "python-setproctitle")
10473 (version "1.1.10")
10474 (source
10475 (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "setproctitle" version))
10478 (sha256
10479 (base32
10480 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10481 (build-system python-build-system)
10482 (arguments
10483 '(#:phases
10484 (modify-phases %standard-phases
10485 (add-before 'check 'patch-Makefile
10486 ;; Stricly this is only required for the python2 variant.
10487 ;; But adding a phase in an inherited package seems to be
10488 ;; cumbersum. So we patch even for python3.
10489 (lambda _
10490 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10491 (when nose
10492 (substitute* "Makefile"
10493 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10494 (string-append nose "/bin/nosetests "))))
10495 #t)))
10496 (replace 'check
10497 (lambda _
10498 (setenv "PYTHON" (or (which "python3") (which "python")))
10499 (setenv "PYCONFIG" (or (which "python3-config")
10500 (which "python-config")))
10501 (setenv "CC" "gcc")
10502 ;; No need to extend PYTHONPATH to find the built package, since
10503 ;; the Makefile will build anyway
10504 (invoke "make" "check"))))))
10505 (native-inputs
10506 `(("procps" ,procps))) ; required for tests
10507 (home-page
10508 "https://github.com/dvarrazzo/py-setproctitle")
10509 (synopsis
10510 "Setproctitle implementation for Python to customize the process title")
10511 (description "The library allows a process to change its title (as displayed
10512by system tools such as ps and top).
10513
10514Changing the title is mostly useful in multi-process systems, for
10515example when a master process is forked: changing the children's title
10516allows to identify the task each process is busy with. The technique
10517is used by PostgreSQL and the OpenSSH Server for example.")
10518 (license license:bsd-3)
10519 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10520
10521(define-public python2-setproctitle
10522 (let ((base (package-with-python2
10523 (strip-python2-variant python-setproctitle))))
10524 (package
10525 (inherit base)
10526 (native-inputs `(("python2-nose" ,python2-nose)
10527 ,@(package-native-inputs base))))))
10528
10529(define-public python-validictory
10530 (package
10531 (name "python-validictory")
10532 (version "1.0.1")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "validictory" version))
10537 (sha256
10538 (base32
10539 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10540 (build-system python-build-system)
10541 (arguments
10542 '(#:phases
10543 (modify-phases %standard-phases
10544 (add-after 'unpack 'bootstrap
10545 ;; Move the tests out of the package directory to avoid
10546 ;; packaging them.
10547 (lambda* _
10548 (rename-file "validictory/tests" "tests")
10549 (delete-file "tests/__init__.py")))
10550 (replace 'check
10551 (lambda _
10552 ;; Extend PYTHONPATH so the built package will be found.
10553 (setenv "PYTHONPATH"
10554 (string-append (getcwd) "/build/lib:"
10555 (getenv "PYTHONPATH")))
6568bd5d 10556 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10557 (native-inputs
10558 `(("python-pytest" ,python-pytest)))
10559 (home-page
10560 "https://github.com/jamesturk/validictory")
10561 (synopsis "General purpose Python data validator")
10562 (description "It allows validation of arbitrary Python data structures.
10563
10564The schema format is based on the JSON Schema
10565proposal (http://json-schema.org), so combined with json the library is also
10566useful as a validator for JSON data.")
10567 (license license:expat)))
10568
10569(define-public python2-validictory
10570 (package-with-python2 python-validictory))
10571
10572(define-public python-pyelftools
10573 (package
10574 (name "python-pyelftools")
10575 (version "0.25")
10576 (source
10577 (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "pyelftools" version))
10580 (sha256
10581 (base32
10582 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10583 (build-system python-build-system)
10584 (arguments
10585 `(#:phases
10586 (modify-phases %standard-phases
10587 (add-before 'check 'set-pythonpath
10588 (lambda _
10589 (setenv "PYTHONPATH"
10590 (string-append
10591 (getcwd) "/test/"
10592 ":" (getenv "PYTHONPATH")))
10593 #t)))))
10594 (home-page
10595 "https://github.com/eliben/pyelftools")
10596 (synopsis
10597 "Analyze binary and library file information")
10598 (description "This Python library provides interfaces for parsing and
10599analyzing two binary and library file formats; the Executable and Linking
10600Format (ELF), and debugging information in the Debugging With Attributed
10601Record Format (DWARF).")
10602 (license license:public-domain)))
10603
10604(define-public python-pyev
10605 (package
10606 (name "python-pyev")
10607 (version "0.9.0")
10608 (source
10609 (origin
10610 (method url-fetch)
10611 (uri (pypi-uri "pyev" version))
10612 (sha256
10613 (base32
10614 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10615 (build-system python-build-system)
10616 (arguments
10617 `(#:tests? #f ; no test suite
10618 #:phases
10619 (modify-phases %standard-phases
10620 (add-after 'unpack 'patch
10621 (lambda* (#:key inputs #:allow-other-keys)
10622 (let ((libev (string-append (assoc-ref inputs "libev")
10623 "/lib/libev.so.4")))
10624 (substitute* "setup.py"
10625 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10626 (string-append "libev_dll_name = \"" libev "\"")))))))))
10627 (inputs
10628 `(("libev" ,libev)))
10629 (home-page "http://pythonhosted.org/pyev/")
10630 (synopsis "Python libev interface")
10631 (description "Pyev provides a Python interface to libev.")
10632 (license license:gpl3)))
10633
10634(define-public python2-pyev
10635 (package-with-python2 python-pyev))
10636
10637(define-public python-imagesize
10638 (package
10639 (name "python-imagesize")
10640 (version "1.1.0")
10641 (source
10642 (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "imagesize" version))
10645 (sha256
10646 (base32
10647 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10648 (build-system python-build-system)
10649 (home-page "https://github.com/shibukawa/imagesize_py")
10650 (synopsis "Gets image size of files in various formats in Python")
10651 (description
10652 "This package allows determination of image size from
10653PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10654 (license license:expat)))
10655
10656(define-public python2-imagesize
10657 (package-with-python2 python-imagesize))
10658
10659(define-public python-termstyle
10660 (package
10661 (name "python-termstyle")
10662 (version "0.1.11")
10663 (source
10664 (origin
10665 (method url-fetch)
10666 (uri (pypi-uri "termstyle" version))
10667 (sha256
10668 (base32
10669 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10670 (build-system python-build-system)
10671 (arguments
10672 '(#:phases
10673 (modify-phases %standard-phases
10674 (replace 'check
10675 (lambda _
831080a6 10676 (invoke "python" "test3.py"))))))
44d10b1f
RW
10677 (home-page "https://github.com/gfxmonk/termstyle")
10678 (synopsis "Console text coloring for Python")
10679 (description "This package provides console text coloring for Python.")
10680 (license license:bsd-3)))
10681
10682(define-public python-argcomplete
10683 (package
10684 (name "python-argcomplete")
10685 (version "1.7.0")
10686 (source
10687 (origin
10688 (method url-fetch)
10689 (uri (pypi-uri "argcomplete" version))
10690 (sha256
10691 (base32
10692 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10693 (build-system python-build-system)
10694 (native-inputs
10695 `(("python-pexpect" ,python-pexpect)
10696 ("tcsh" ,tcsh)
10697 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10698 (home-page "https://github.com/kislyuk/argcomplete")
10699 (synopsis "Shell tab completion for Python argparse")
10700 (description "argcomplete provides extensible command line tab completion
10701of arguments and options for Python scripts using @code{argparse}. It's
10702particularly useful for programs with many options or sub-parsers that can
10703dynamically suggest completions; for example, when browsing resources over the
10704network.")
10705 (license license:asl2.0)))
10706
10707(define-public python2-argcomplete
10708 (package-with-python2 python-argcomplete))
10709
10710(define-public python-xopen
10711 (package
10712 (name "python-xopen")
10713 (version "0.3.3")
10714 (source
10715 (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "xopen" version))
10718 (sha256
10719 (base32
10720 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10721 (file-name (string-append name "-" version ".tar.gz"))))
10722 (build-system python-build-system)
10723 (home-page "https://github.com/marcelm/xopen/")
10724 (synopsis "Open compressed files transparently")
10725 (description "This module provides an @code{xopen} function that works like
10726Python's built-in @code{open} function, but can also deal with compressed files.
10727Supported compression formats are gzip, bzip2 and, xz, and are automatically
10728recognized by their file extensions. The focus is on being as efficient as
10729possible on all supported Python versions.")
10730 (license license:expat)))
10731
10732(define-public python2-xopen
10733 (let ((base (package-with-python2
10734 (strip-python2-variant python-xopen))))
10735 (package
10736 (inherit base)
10737 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10738 ,@(package-propagated-inputs base))))))
10739
10740(define-public python-cheetah
10741 (package
10742 (name "python-cheetah")
10743 (version "3.1.0")
10744 (source
10745 (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "Cheetah3" version))
10748 (sha256
10749 (base32
10750 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10751 (build-system python-build-system)
10752 (arguments
10753 `(#:modules ((guix build utils)
10754 (guix build python-build-system)
10755 (ice-9 ftw)
10756 (srfi srfi-1)
10757 (srfi srfi-26))
10758 #:phases (modify-phases %standard-phases
10759 (add-after 'unpack 'use-absolute-python
10760 (lambda _
10761 (substitute* "Cheetah/CheetahWrapper.py"
10762 (("#!/usr/bin/env python")
10763 (string-append "#!" (which "python"))))
10764 #t))
10765 (replace 'check
10766 (lambda _
10767 (let ((cwd (getcwd)))
10768 (setenv "PYTHONPATH"
10769 (string-append
10770 cwd "/build/"
10771 (find (cut string-prefix? "lib" <>)
10772 (scandir (string-append cwd "/build")))
10773 ":" (getenv "PYTHONPATH")))
10774 (setenv "PATH"
10775 (string-append (getenv "PATH")
10776 ":" cwd "/bin"))
10777 (setenv "TMPDIR" "/tmp")
10778
10779 (substitute* "Cheetah/Tests/Test.py"
10780 (("unittest.TextTestRunner\\(\\)")
10781 "unittest.TextTestRunner(verbosity=2)"))
10782
10783 (invoke "python" "Cheetah/Tests/Test.py")))))))
10784 (propagated-inputs
10785 `(("python-markdown" ,python-markdown))) ;optional
10786 (home-page "http://cheetahtemplate.org/")
10787 (synopsis "Template engine")
10788 (description "Cheetah is a text-based template engine and Python code
10789generator.
10790
10791Cheetah can be used as a standalone templating utility or referenced as
10792a library from other Python applications. It has many potential uses,
10793but web developers looking for a viable alternative to ASP, JSP, PHP and
10794PSP are expected to be its principle user group.
10795
10796Features:
10797@enumerate
10798@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10799 text-based format.
10800@item Cleanly separates content, graphic design, and program code.
10801@item Blends the power and flexibility of Python with a simple template language
10802 that non-programmers can understand.
10803@item Gives template writers full access to any Python data structure, module,
10804 function, object, or method in their templates.
10805@item Makes code reuse easy by providing an object-orientated interface to
10806 templates that is accessible from Python code or other Cheetah templates.
10807 One template can subclass another and selectively reimplement sections of it.
10808@item Provides a simple, yet powerful, caching mechanism that can dramatically
10809 improve the performance of a dynamic website.
10810@item Compiles templates into optimized, yet readable, Python code.
10811@end enumerate")
10812 (license (license:x11-style "file://LICENSE"))))
10813
10814(define-public python2-cheetah
10815 (package-with-python2 python-cheetah))
10816
10817(define-public python-dulwich
10818 (package
10819 (name "python-dulwich")
10820 (version "0.18.6")
10821 (source
10822 (origin
10823 (method url-fetch)
10824 (uri (list (string-append "https://www.dulwich.io/releases/"
10825 "dulwich-" version ".tar.gz")
10826 (pypi-uri "dulwich" version)))
10827 (sha256
10828 (base32
10829 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10830 (build-system python-build-system)
10831 (arguments
10832 `(#:phases
10833 (modify-phases %standard-phases
10834 (add-before 'check 'fix-tests
10835 (lambda* (#:key inputs #:allow-other-keys)
10836 ;; The tests use Popen with a custom environment which doesn't
10837 ;; include PATH.
10838 (substitute* "dulwich/tests/compat/utils.py"
10839 (("'git'") (string-append "'"
10840 (which "git")
10841 "'")))
10842 (substitute* '("dulwich/tests/test_repository.py"
10843 "dulwich/tests/test_hooks.py")
10844 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10845 (setenv "TEST_RUNNER" "unittest")
10846 (setenv "PYTHONHASHSEED" "random")
10847 #t)))))
10848 (propagated-inputs
10849 `(("python-fastimport" ,python-fastimport)))
10850 (native-inputs
10851 `(("python-mock" ,python-mock)
10852 ("python-geventhttpclient" ,python-geventhttpclient)
10853 ("git" ,git)))
10854 (home-page "https://www.dulwich.io/")
10855 (synopsis "Git implementation in Python")
10856 (description "Dulwich is an implementation of the Git file formats and
10857protocols written in pure Python.")
10858 ;; Can be used with either license.
10859 (license (list license:asl2.0 license:gpl2+))))
10860
10861(define-public python2-dulwich
10862 (package-with-python2 python-dulwich))
10863
10864(define-public python-pbkdf2
10865 (package
10866 (name "python-pbkdf2")
10867 (version "1.3")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "pbkdf2" version))
10872 (sha256
10873 (base32
10874 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10875 (build-system python-build-system)
10876 (arguments
10877 '(#:phases
10878 (modify-phases %standard-phases
10879 (replace 'check
10880 (lambda _
10881 (setenv "PYTHONPATH"
10882 (string-append (getcwd) "/build/lib:"
10883 (getenv "PYTHONPATH")))
ee2bb944 10884 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10885 (propagated-inputs
10886 `(("python-pycrypto" ,python-pycrypto))) ; optional
10887 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10888 (synopsis "Password-based key derivation")
10889 (description "This module implements the password-based key derivation
10890function, PBKDF2, specified in RSA PKCS#5 v2.0.
10891
10892PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10893is part of the RSA Public Key Cryptography Standards series. The provided
10894implementation takes a password or a passphrase and a salt value (and
10895optionally a iteration count, a digest module, and a MAC module) and provides
10896a file-like object from which an arbitrarly-sized key can be read.")
10897 (license license:expat)))
10898
10899(define-public python2-pbkdf2
10900 (package-with-python2 python-pbkdf2))
10901
10902(define-public python-qrcode
10903 (package
10904 (name "python-qrcode")
217ea1a1 10905 (version "6.1")
44d10b1f
RW
10906 (source
10907 (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "qrcode" version))
10910 (sha256
217ea1a1 10911 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10912 (build-system python-build-system)
10913 (arguments
10914 ;; FIXME: Tests require packaging 'pymaging'.
10915 '(#:tests? #f))
10916 (propagated-inputs
10917 `(("python-lxml" ,python-lxml) ; for SVG output
10918 ("python-pillow" ,python-pillow) ; for PNG output
10919 ("python-six" ,python-six)))
44d10b1f
RW
10920 (home-page "https://github.com/lincolnloop/python-qrcode")
10921 (synopsis "QR Code image generator")
10922 (description "This package provides a pure Python QR Code generator
10923module. It uses the Python Imaging Library (PIL) to allow for the generation
10924of QR Codes.
10925
10926In addition this package provides a command line tool to generate QR codes and
10927either write these QR codes to a file or do the output as ascii art at the
10928console.")
10929 (license license:bsd-3)))
10930
10931(define-public python2-qrcode
10932 (package-with-python2 python-qrcode))
10933
10934(define-public python-rst2ansi
10935 (package
10936 (name "python-rst2ansi")
10937 (version "0.1.5")
10938 (source
10939 (origin
10940 (method url-fetch)
10941 (uri (pypi-uri "rst2ansi" version))
10942 (sha256
10943 (base32
10944 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10945 (build-system python-build-system)
10946 (propagated-inputs
10947 `(("python-docutils" ,python-docutils)))
10948 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10949 (synopsis "Convert RST to ANSI-decorated console output")
10950 (description
10951 "Python module dedicated to rendering RST (reStructuredText) documents
10952to ansi-escaped strings suitable for display in a terminal.")
10953 (license license:expat)))
10954
10955(define-public python-ansi2html
10956 (package
10957 (name "python-ansi2html")
10958 (version "1.2.0")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "ansi2html" version))
10963 (sha256
10964 (base32
10965 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10966 (build-system python-build-system)
10967 (native-inputs
10968 `(("python-mock" ,python-mock)
10969 ("python-nose" ,python-nose)))
10970 (propagated-inputs
10971 `(("python-six" ,python-six)))
10972 (home-page "https://github.com/ralphbean/ansi2html")
10973 (synopsis "Convert ANSI-decorated console output to HTML")
10974 (description
10975 "@command{ansi2html} is a Python library and command line utility for
10976convering text with ANSI color codes to HTML or LaTeX.")
10977 (license license:gpl3+)))
10978
10979(define-public python2-ansi2html
10980 (package-with-python2 python-ansi2html))
10981
10982(define-public python-ddt
10983 (package
10984 (name "python-ddt")
10985 (version "1.1.3")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "ddt" version))
10990 (sha256
10991 (base32
10992 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10993 (build-system python-build-system)
10994 (native-inputs
10995 `(("python-mock" ,python-mock)
10996 ("python-nose" ,python-nose)))
10997 (propagated-inputs
10998 `(("python-six" ,python-six)
10999 ("python-pyyaml" ,python-pyyaml)))
11000 (home-page "https://github.com/txels/ddt")
11001 (synopsis "Data-Driven Tests")
11002 (description
11003 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11004running it with different test data, and make it appear as multiple test
11005cases.")
11006 (license license:expat)))
11007
11008(define-public python2-ddt
11009 (package-with-python2 python-ddt))
11010
11011(define-public python-pycountry
11012 (package
11013 (name "python-pycountry")
11014 (version "18.5.26")
11015 (source
11016 (origin
11017 (method url-fetch)
11018 (uri (pypi-uri "pycountry" version))
11019 (sha256
11020 (base32
11021 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11022 (build-system python-build-system)
11023 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11024 (synopsis "ISO databases for languages, countries, currencies, etc.")
11025 (description
11026 "@code{pycountry} provides the ISO databases for the standards:
11027@enumerate
11028@item 639-3 (Languages)
11029@item 3166 (Countries)
11030@item 3166-3 (Deleted Countries)
11031@item 3166-2 (Subdivisions of countries)
11032@item 4217 (Currencies)
11033@item 15924 (Scripts)
11034@end enumerate
11035It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11036through a Python API.")
11037 (license license:lgpl2.1+)))
11038
11039(define-public python2-pycountry
11040 (package-with-python2 python-pycountry))
11041
11042(define-public python-pycosat
11043 (package
11044 (name "python-pycosat")
11045 (version "0.6.1")
11046 (source
11047 (origin
11048 (method url-fetch)
11049 (uri (pypi-uri "pycosat" version))
11050 (sha256
11051 (base32
11052 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11053 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11054 (build-system python-build-system)
11055 (home-page "https://github.com/ContinuumIO/pycosat")
11056 (synopsis "Bindings to picosat (a SAT solver)")
11057 (description
11058 "This package provides efficient Python bindings to @code{picosat} on
11059the C level. When importing pycosat, the @code{picosat} solver becomes part
11060of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11061Problem} (SAT) solver.")
11062 (license license:expat)))
11063
11064(define-public python2-pycosat
11065 (package-with-python2 python-pycosat))
11066
11067(define-public python2-ruamel.ordereddict
11068 (package
11069 (name "python2-ruamel.ordereddict")
11070 (version "0.4.9")
11071 (source
11072 (origin
11073 (method url-fetch)
11074 (uri (pypi-uri "ruamel.ordereddict" version))
11075 (sha256
11076 (base32
11077 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11078 (build-system python-build-system)
11079 (arguments
11080 `(#:python ,python-2
11081 #:phases
11082 (modify-phases %standard-phases
11083 (delete 'check)
11084 (add-after 'install 'check
11085 (lambda* (#:key inputs outputs #:allow-other-keys)
11086 (add-installed-pythonpath inputs outputs)
f987ac30 11087 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11088 (home-page "https://bitbucket.org/ruamel/ordereddict")
11089 (synopsis "Version of dict that keeps keys in insertion order")
11090 (description
11091 "This is an implementation of an ordered dictionary with @dfn{Key
11092Insertion Order} (KIO: updates of values do not affect the position of the
11093key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11094removed and put at the back). The standard library module @code{OrderedDict},
11095implemented later, implements a subset of @code{ordereddict} functionality.
11096Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11097Order} (KSO, no sorting function can be specified, but a transform can be
11098specified to apply on the key before comparison (e.g. @code{string.lower})).")
11099 (license license:expat)))
11100
11101(define-public python-pypeg2
11102 (package
11103 (name "python-pypeg2")
11104 (version "2.15.2")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "pyPEG2" version))
11109 (sha256
11110 (base32
11111 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11112 (build-system python-build-system)
11113 (propagated-inputs `(("python-lxml" ,python-lxml)))
11114 (arguments
11115 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11116 '(#:tests? #f))
11117 (home-page "https://fdik.org/pyPEG/")
11118 (synopsis "Parsering Expression Grammars in Python")
11119 (description "PyPEG is an intrinsic parser interpreter framework for
11120Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11121parse many formal languages.")
11122 (license license:gpl2)))
11123
11124(define-public python-incremental
11125 (package
11126 (name "python-incremental")
11127 (version "17.5.0")
11128 (source
11129 (origin
11130 (method url-fetch)
11131 (uri (pypi-uri "incremental" version))
11132 (sha256
11133 (base32
11134 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11135 (build-system python-build-system)
11136 (home-page "https://github.com/hawkowl/incremental")
11137 (synopsis "Library for versioning Python projects")
11138 (description "Incremental is a small library that versions your Python
11139projects.")
11140 (license license:expat)))
11141
11142(define-public python2-incremental
11143 (package-with-python2 python-incremental))
11144
11145(define-public python-invoke
11146 (package
11147 (name "python-invoke")
11148 (home-page "http://www.pyinvoke.org/")
11149 (version "1.1.0")
11150 (source (origin
11151 (method url-fetch)
11152 (uri (pypi-uri "invoke" version))
11153 (sha256
11154 (base32
11155 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11156 (build-system python-build-system)
11157 (arguments
11158 ;; XXX: Requires many dependencies that are not yet in Guix.
11159 `(#:tests? #f))
11160 (synopsis "Pythonic task execution")
11161 (description
11162 "Invoke is a Python task execution tool and library, drawing inspiration
11163from various sources to arrive at a powerful and clean feature set. It is
11164evolved from the Fabric project, but focuses on local and abstract concerns
11165instead of servers and network commands.")
11166 (license license:bsd-3)))
11167
11168(define-public python2-invoke
11169 (package-with-python2 python-invoke))
11170
11171(define-public python-automat
11172 (package
11173 (name "python-automat")
11174 (version "0.6.0")
11175 (source (origin
11176 (method url-fetch)
11177 (uri (pypi-uri "Automat" version))
11178 (sha256
11179 (base32
11180 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11181 (build-system python-build-system)
11182 ;; We disable the tests because they require python-twisted, while
11183 ;; python-twisted depends on python-automat. Twisted is optional, but the
11184 ;; tests fail if it is not available. Also see
11185 ;; <https://github.com/glyph/automat/issues/71>.
11186 (arguments '(#:tests? #f))
11187 (native-inputs
11188 `(("python-m2r" ,python-m2r)
11189 ("python-setuptools-scm" ,python-setuptools-scm)
11190 ("python-graphviz" ,python-graphviz)))
11191 (propagated-inputs
11192 `(("python-six" ,python-six)
11193 ("python-attrs" ,python-attrs)))
11194 (home-page "https://github.com/glyph/Automat")
11195 (synopsis "Self-service finite-state machines")
11196 (description "Automat is a library for concise, idiomatic Python
11197expression of finite-state automata (particularly deterministic finite-state
11198transducers).")
11199 (license license:expat)))
11200
11201(define-public python2-automat
11202 (package-with-python2 python-automat))
11203
11204(define-public python-m2r
11205 (package
11206 (name "python-m2r")
11207 (version "0.1.12")
11208 (source (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "m2r" version))
11211 (sha256
11212 (base32
11213 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11214 (build-system python-build-system)
11215 (propagated-inputs
11216 `(("python-docutils" ,python-docutils)
11217 ("python-mistune" ,python-mistune)))
11218 (native-inputs
11219 `(("python-pygments" ,python-pygments)
11220 ("python-mock" ,python-mock)))
11221 (home-page "https://github.com/miyakogi/m2r")
11222 (synopsis "Markdown to reStructuredText converter")
11223 (description "M2R converts a markdown file including reST markups to valid
11224reST format.")
11225 (license license:expat)))
11226
11227(define-public python2-m2r
11228 (package-with-python2 python-m2r))
11229
11230(define-public python-constantly
11231 (package
11232 (name "python-constantly")
11233 (version "15.1.0")
11234 (source (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "constantly" version))
11237 (sha256
11238 (base32
11239 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11240 (build-system python-build-system)
11241 (home-page "https://github.com/twisted/constantly")
11242 (synopsis "Symbolic constants in Python")
11243 (description "Constantly is a Python library that provides symbolic
11244constant support. It includes collections and constants with text, numeric,
11245and bit flag values.")
11246 (license license:expat)))
11247
11248(define-public python2-constantly
11249 (package-with-python2 python-constantly))
11250
11251(define-public python-attrs
11252 (package
11253 (name "python-attrs")
11254 (version "18.2.0")
11255 (source (origin
11256 (method url-fetch)
11257 (uri (pypi-uri "attrs" version))
11258 (sha256
11259 (base32
11260 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11261 (build-system python-build-system)
11262 (arguments
11263 `(#:modules ((guix build utils)
11264 (guix build python-build-system)
11265 (ice-9 ftw)
11266 (srfi srfi-1)
11267 (srfi srfi-26))
11268 #:phases (modify-phases %standard-phases
11269 (replace 'check
11270 (lambda _
11271 (let ((cwd (getcwd)))
11272 (setenv "PYTHONPATH"
11273 (string-append
11274 cwd "/build/"
11275 (find (cut string-prefix? "lib" <>)
11276 (scandir (string-append cwd "/build")))
11277 ":"
11278 (getenv "PYTHONPATH")))
11279 (invoke "python" "-m" "pytest")))))))
11280 (native-inputs
11281 `(("python-coverage" ,python-coverage)
11282 ("python-hypothesis" ,python-hypothesis)
11283 ("python-pympler" ,python-pympler)
11284 ("python-pytest" ,python-pytest)
11285 ("python-six" ,python-six)
11286 ("python-sphinx" ,python-sphinx)
11287 ("python-zope-interface" ,python-zope-interface)))
11288 (home-page "https://github.com/python-attrs/attrs/")
11289 (synopsis "Attributes without boilerplate")
11290 (description "@code{attrs} is a Python package with class decorators that
11291ease the chores of implementing the most common attribute-related object
11292protocols.")
11293 (license license:expat)))
11294
11295(define-public python2-attrs
11296 (package-with-python2 python-attrs))
11297
11298(define-public python-attrs-bootstrap
11299 (package
11300 (inherit python-attrs)
11301 (name "python-attrs-bootstrap")
11302 ;; Keep this on a fixed version so python-attrs can be updated without
11303 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11304 (version "17.4.0")
11305 (source (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "attrs" version))
11308 (sha256
11309 (base32
11310 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11311 (native-inputs `())
11312 (arguments `(#:tests? #f))))
11313
11314(define-public python2-attrs-bootstrap
11315 (package-with-python2 python-attrs-bootstrap))
11316
11317(define-public python2-cliapp
11318 (package
11319 (name "python2-cliapp")
9064b84e 11320 (version "1.20180812.1")
44d10b1f
RW
11321 (source
11322 (origin
11323 (method url-fetch)
11324 (uri (string-append
11325 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11326 version ".tar.gz"))
11327 (sha256
11328 (base32
9064b84e 11329 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11330 (build-system python-build-system)
11331 (arguments
11332 `(#:python ,python-2
11333 #:phases
11334 (modify-phases %standard-phases
11335 ;; check phase needs to be run before the build phase. If not,
11336 ;; coverage-test-runner looks for tests for the built source files,
11337 ;; and fails.
11338 (delete 'check)
11339 (add-before 'build 'check
11340 (lambda _
11341 ;; Disable python3 tests
11342 (substitute* "check"
11343 (("python3") "# python3"))
6c826d32 11344 (invoke "./check"))))))
44d10b1f
RW
11345 (native-inputs
11346 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11347 ("python2-pep8" ,python2-pep8)))
11348 (propagated-inputs
11349 `(("python2-pyaml" ,python2-pyaml)))
11350 (home-page "https://liw.fi/cliapp/")
11351 (synopsis "Python framework for command line programs")
11352 (description "@code{python2-cliapp} is a python framework for
11353command line programs. It contains the typical stuff such programs
11354need to do, such as parsing the command line for options, and
11355iterating over input files.")
11356 (license license:gpl2+)))
11357
11358(define-public python2-ttystatus
11359 (package
11360 (name "python2-ttystatus")
e516a9c2 11361 (version "0.36")
44d10b1f
RW
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (string-append
11366 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11367 version ".tar.gz"))
11368 (sha256
11369 (base32
e516a9c2 11370 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11371 (build-system python-build-system)
11372 (native-inputs
11373 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11374 ("python2-pep8" ,python2-pep8)))
11375 (arguments
11376 `(#:python ,python-2
11377 #:phases
11378 (modify-phases %standard-phases
11379 ;; check phase needs to be run before the build phase. If not,
11380 ;; coverage-test-runner looks for tests for the built source files,
11381 ;; and fails.
11382 (delete 'check)
11383 (add-before 'build 'check
cbeee881 11384 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11385 (home-page "https://liw.fi/ttystatus/")
11386 (synopsis "Python library for showing progress reporting and
11387status updates on terminals")
11388 (description "@code{python2-ttystatus} is a python library for
11389showing progress reporting and status updates on terminals, for
11390command line programs. Output is automatically adapted to the width
11391of the terminal: truncated if it does not fit, and resized if the
11392terminal size changes.")
11393 (license license:gpl3+)))
11394
11395(define-public python2-tracing
11396 (package
11397 (name "python2-tracing")
11398 (version "0.10")
11399 (source
11400 (origin
11401 (method url-fetch)
11402 (uri (string-append
11403 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11404 version ".tar.gz"))
11405 (sha256
11406 (base32
11407 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11408 (build-system python-build-system)
11409 (arguments
11410 `(#:python ,python-2))
11411 (home-page "https://liw.fi/tracing/")
11412 (synopsis "Python debug logging helper")
11413 (description "@code{python2-tracing} is a python library for
11414logging debug messages. It provides a way to turn debugging messages
11415on and off, based on the filename they occur in. It is much faster
11416than using @code{logging.Filter} to accomplish the same thing, which
11417matters when code is run in production mode. The actual logging still
11418happens using the @code{logging} library.")
11419 (license license:gpl3+)))
11420
11421(define-public python2-larch
11422 (package
11423 (name "python2-larch")
11424 (version "1.20151025")
11425 (source
11426 (origin
11427 (method url-fetch)
11428 (uri (string-append
11429 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11430 version ".tar.gz"))
11431 (patches (search-patches
11432 "python2-larch-coverage-4.0a6-compatibility.patch"))
11433 (sha256
11434 (base32
11435 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11436 (build-system python-build-system)
11437 (arguments
11438 `(#:python ,python-2
11439 #:phases
11440 (modify-phases %standard-phases
11441 ;; check phase needs to be run before the build phase. If not,
11442 ;; coverage-test-runner looks for tests for the built source files,
11443 ;; and fails.
11444 (delete 'check)
11445 (add-before 'build 'check
204ad455 11446 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11447 (native-inputs
11448 `(("cmdtest" ,cmdtest)
11449 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11450 (propagated-inputs
11451 `(("python2-tracing" ,python2-tracing)))
11452 (home-page "https://liw.fi/larch/")
11453 (synopsis "Python copy-on-write B-tree library")
11454 (description "@code{python2-larch} is an implementation of
11455particular kind of B-tree, based on research by Ohad Rodeh. See
11456@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11457on the data structure.
11458
11459The distinctive feature of this B-tree is that a node is never
11460(conceptually) modified. Instead, all updates are done by
11461copy-on-write. This makes it easy to clone a tree, and modify only the
11462clone, while other processes access the original tree.")
11463 (license license:gpl3+)))
11464
11465(define-public python-astroid
11466 (package
11467 (name "python-astroid")
11468 (version "2.1.0")
11469 (source
11470 (origin
11471 (method url-fetch)
11472 (uri (pypi-uri "astroid" version))
11473 (sha256
11474 (base32
11475 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11476 (build-system python-build-system)
11477 (propagated-inputs
11478 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11479 ("python-six" ,python-six)
11480 ("python-wrapt" ,python-wrapt)))
11481 (native-inputs
11482 `(("python-dateutil" ,python-dateutil)
11483 ("python-nose" ,python-nose)
11484 ("python-pytest" ,python-pytest)
11485 ("python-pytest-runner" ,python-pytest-runner)))
11486 (arguments
11487 `(#:phases
11488 (modify-phases %standard-phases
11489 (add-after 'unpack 'remove-spurious-test
11490 (lambda _
11491 ;; This can be removed after upgrading from python-3.7
11492 ;; https://github.com/PyCQA/astroid/issues/593
11493 ;; https://bugs.python.org/issue34056
11494 (delete-file "astroid/tests/unittest_modutils.py")
11495 #t))
11496 (replace 'check
11497 (lambda _
11498 (invoke "pytest" "astroid"))))))
11499 (home-page "https://github.com/PyCQA/astroid")
11500 (synopsis "Common base representation of python source code for pylint and
11501other projects")
11502 (description "@code{python-astroid} provides a common base representation
11503of python source code for projects such as pychecker, pyreverse, pylint, etc.
11504
11505It provides a compatible representation which comes from the _ast module. It
11506rebuilds the tree generated by the builtin _ast module by recursively walking
11507down the AST and building an extended ast. The new node classes have
11508additional methods and attributes for different usages. They include some
11509support for static inference and local name scopes. Furthermore, astroid
11510builds partial trees by inspecting living objects.")
11511 (license license:lgpl2.1+)
11512 (properties `((python2-variant . ,(delay python2-astroid))))))
11513
11514(define-public python2-astroid
11515 (let ((base (package-with-python2
11516 (strip-python2-variant python-astroid))))
11517 (package (inherit base)
11518 ;; Version 2.x removes python2 support.
11519 (version "1.6.5")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "astroid" version))
11524 (sha256
11525 (base32
11526 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11527 (arguments
11528 (substitute-keyword-arguments (package-arguments base)
11529 ((#:phases phases)
11530 `(modify-phases ,phases
11531 (add-after 'unpack 'remove-spurious-test
11532 (lambda _
11533 ;; https://github.com/PyCQA/astroid/issues/276
11534 (delete-file "astroid/tests/unittest_brain.py")
11535 #t))
11536 (replace 'check
11537 (lambda _
11538 (invoke"python" "-m" "unittest" "discover"
11539 "-p" "unittest*.py")))))))
11540 (native-inputs `())
11541 (propagated-inputs
11542 `(("python2-backports-functools-lru-cache"
11543 ,python2-backports-functools-lru-cache)
11544 ("python2-enum34" ,python2-enum34)
11545 ("python2-singledispatch" ,python2-singledispatch)
11546 ,@(package-propagated-inputs base))))))
11547
11548(define-public python-isort
11549 (package
11550 (name "python-isort")
e2227b6a 11551 (version "4.3.4")
44d10b1f
RW
11552 (source
11553 (origin
e2227b6a
EF
11554 (method git-fetch)
11555 (uri (git-reference
11556 ;; Tests pass only from the Github sources
11557 (url "https://github.com/timothycrosley/isort")
11558 (commit version)))
11559 (file-name (git-file-name name version))
44d10b1f
RW
11560 (sha256
11561 (base32
e2227b6a 11562 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11563 (build-system python-build-system)
11564 (native-inputs
11565 `(("python-mock" ,python-mock)
11566 ("python-pytest" ,python-pytest)))
11567 (home-page "https://github.com/timothycrosley/isort")
11568 (synopsis "Python utility/library to sort python imports")
11569 (description "@code{python-isort} is a python utility/library to sort
11570imports alphabetically, and automatically separated into sections. It
11571provides a command line utility, a python library and plugins for various
11572editors.")
e2227b6a
EF
11573 (license license:expat)
11574 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11575
11576(define-public python2-isort
e2227b6a
EF
11577 (let ((base (package-with-python2
11578 (strip-python2-variant python-isort))))
11579 (package (inherit base)
11580 (native-inputs
11581 `(("python2-futures" ,python2-futures)
11582 ,@(package-native-inputs base))))))
44d10b1f
RW
11583
11584(define-public python2-backports-functools-lru-cache
11585 (package
11586 (name "python2-backports-functools-lru-cache")
11587 (version "1.5")
11588 (source
11589 (origin
11590 (method url-fetch)
11591 ;; only the pypi tarballs contain the necessary metadata
11592 (uri (pypi-uri "backports.functools_lru_cache" version))
11593 (sha256
11594 (base32
11595 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11596 (build-system python-build-system)
11597 (native-inputs
11598 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11599 (arguments
11600 `(#:python ,python-2))
11601 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11602 (synopsis "Backport of functools.lru_cache from Python 3.3")
11603 (description "@code{python2-backports-functools-lru-cache} is a backport
11604of @code{functools.lru_cache} from python 3.3.")
11605 (license license:expat)))
11606
11607(define-public python-configparser
11608 (package
11609 (name "python-configparser")
11610 (version "3.5.0")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (string-append
11615 "https://bitbucket.org/ambv/configparser/get/"
11616 version ".tar.bz2"))
11617 (file-name (string-append name "-" version ".tar.gz"))
11618 (sha256
11619 (base32
11620 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11621 (build-system python-build-system)
809f003f 11622 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11623 (synopsis "Backport of configparser from python 3.5")
11624 (description "@code{python-configparser} is a backport of
11625@code{configparser} from Python 3.5 so that it can be used directly
11626in other versions.")
11627 (license license:expat)))
11628
11629(define-public python2-configparser
11630 (package-with-python2 python-configparser))
11631
11632(define-public python-mando
11633 (package
11634 (name "python-mando")
11635 (version "0.6.4")
11636 (source (origin
11637 (method url-fetch)
11638 (uri (pypi-uri "mando" version))
11639 (sha256
11640 (base32
11641 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11642 (build-system python-build-system)
11643 (propagated-inputs
11644 `(("python-rst2ansi" ,python-rst2ansi)
11645 ("python-six" ,python-six)))
11646 (native-inputs
11647 `(("python-pytest" ,python-pytest)))
11648 (home-page "https://mando.readthedocs.org/")
11649 (synopsis
11650 "Wrapper around argparse, allowing creation of complete CLI applications")
11651 (description
11652 "This package is a wrapper around argparse, allowing you to write complete CLI
11653applications in seconds while maintaining all the flexibility.")
11654 (license license:expat)))
11655
11656(define-public python2-mando
11657 (package-with-python2 python-mando))
11658
11659(define-public python-fudge
11660 (package
11661 (name "python-fudge")
11662 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11663 ;; package, which is currently the only use of this package.
11664 (version "0.9.6")
11665 (source
11666 (origin
11667 (method url-fetch)
11668 (uri (pypi-uri "fudge" version))
11669 (sha256
11670 (base32
11671 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11672 (build-system python-build-system)
11673 (arguments
11674 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11675 (home-page "https://github.com/fudge-py/fudge")
11676 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11677 (description
11678 "Fudge is a Python module for using fake objects (mocks and stubs) to
11679test real ones.
11680
11681In readable Python code, you declare the methods available on your fake object
11682and how they should be called. Then you inject that into your application and
11683start testing. This declarative approach means you don’t have to record and
11684playback actions and you don’t have to inspect your fakes after running code.
11685If the fake object was used incorrectly then you’ll see an informative
11686exception message with a traceback that points to the culprit.")
11687 (license license:expat)))
11688
11689(define-public python2-fudge
11690 (package-with-python2 python-fudge))
11691
11692(define-public python-mwclient
11693 (package
11694 (name "python-mwclient")
11695 (version "0.8.4")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 ;; The PyPI version wouldn't contain tests.
11700 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11701 "v" version ".tar.gz"))
11702 (file-name (string-append name "-" version ".tar.gz"))
11703 (sha256
11704 (base32
11705 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11706 (build-system python-build-system)
11707 (propagated-inputs
11708 `(("python-requests" ,python-requests)
11709 ("python-requests-oauthlib"
11710 ,python-requests-oauthlib)
11711 ("python-six" ,python-six)))
11712 (native-inputs
11713 `(("python-mock" ,python-mock)
11714 ("python-pytest" ,python-pytest)
11715 ("python-pytest-pep8" ,python-pytest-pep8)
11716 ("python-pytest-cache" ,python-pytest-cache)
11717 ("python-pytest-cov" ,python-pytest-cov)
11718 ("python-responses" ,python-responses)))
11719 (home-page "https://github.com/btongminh/mwclient")
11720 (synopsis "MediaWiki API client")
11721 (description "This package provides a MediaWiki API client.")
11722 (license license:expat)))
11723
11724(define-public python2-mwclient
11725 (package-with-python2 python-mwclient))
11726
11727(define-public python-utils
11728 (package
11729 (name "python-utils")
11730 (version "2.1.0")
11731 (source (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "python-utils" version))
11734 (sha256
11735 (base32
11736 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11737 (build-system python-build-system)
11738 (native-inputs
11739 `(("pytest-runner" ,python-pytest-runner)
11740 ("pytest" ,python-pytest)
11741 ("six" ,python-six)))
11742 (home-page "https://github.com/WoLpH/python-utils")
11743 (synopsis "Convenient utilities not included with the standard Python install")
11744 (description
11745 "Python Utils is a collection of small Python functions and classes which
11746make common patterns shorter and easier.")
11747 (license license:bsd-2)))
11748
11749(define-public python2-utils
11750 (package-with-python2 python-utils))
11751
11752(define-public python-sphinx-me
11753 (package
11754 (name "python-sphinx-me")
11755 (version "0.3")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "sphinx-me" version))
11760 (sha256
11761 (base32
11762 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11763 (build-system python-build-system)
11764 (home-page "https://github.com/stephenmcd/sphinx-me")
11765 (synopsis "Create a Sphinx documentation shell")
11766 (description
11767 "Create a Sphinx documentation shell for your project and include the
11768README file as the documentation index. It handles extracting the required
11769meta data such as the project name, author and version from your project for
11770use in your Sphinx docs.")
11771 (license license:bsd-2)))
11772
11773(define-public python2-sphinx-me
11774 (package-with-python2 python-sphinx-me))
11775
11776(define-public python-diff-match-patch
11777 (package
11778 (name "python-diff-match-patch")
11779 (version "20121119")
11780 (source
11781 (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "diff-match-patch" version))
11784 (sha256
11785 (base32
11786 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11787 (build-system python-build-system)
11788 (home-page "https://code.google.com/p/google-diff-match-patch")
11789 (synopsis "Synchronize plain text")
11790 (description "Diff Match and Patch libraries offer robust algorithms to
11791perform the operations required for synchronizing plain text.")
11792 (license license:asl2.0)))
11793
11794(define-public python2-diff-match-patch
11795 (package-with-python2 python-diff-match-patch))
11796
11797(define-public python-dirsync
11798 (package
11799 (name "python-dirsync")
11800 (version "2.2.3")
11801 (source
11802 (origin
11803 (method url-fetch)
11804 (uri (pypi-uri "dirsync" version))
11805 (sha256
11806 (base32
11807 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11808 (build-system python-build-system)
11809 (propagated-inputs
11810 `(("six" ,python-six)))
11811 (home-page "https://bitbucket.org/tkhyn/dirsync")
11812 (synopsis "Advanced directory tree synchronisation tool")
11813 (description "Advanced directory tree synchronisation tool.")
11814 (license license:expat)))
11815
11816(define-public python2-dirsync
11817 (package-with-python2 python-dirsync))
11818
11819(define-public python-levenshtein
11820 (package
11821 (name "python-levenshtein")
11822 (version "0.12.0")
11823 (source
11824 (origin
11825 (method url-fetch)
11826 (uri (pypi-uri "python-Levenshtein" version))
11827 (sha256
11828 (base32
11829 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11830 (build-system python-build-system)
11831 (home-page "https://github.com/ztane/python-Levenshtein")
11832 (synopsis "Fast computation of Levenshtein distance and string similarity")
11833 (description
11834 "The Levenshtein Python C extension module contains functions for fast computation of
11835@enumerate
11836@item Levenshtein (edit) distance, and edit operations
11837@item string similarity
11838@item approximate median strings, and generally string averaging
11839@item string sequence and set similarity
11840@end enumerate
11841It supports both normal and Unicode strings.")
11842 (license license:gpl2+)))
11843
11844(define-public python2-levenshtein
11845 (package-with-python2 python-levenshtein))
11846
11847(define-public python-scandir
11848 (package
11849 (name "python-scandir")
11850 (version "1.9.0")
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (pypi-uri "scandir" version))
11855 (sha256
11856 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11857 (build-system python-build-system)
11858 (arguments
11859 `(#:phases (modify-phases %standard-phases
11860 (replace 'check
11861 (lambda _
11862 (invoke "python" "test/run_tests.py"))))))
11863 (home-page "https://github.com/benhoyt/scandir")
11864 (synopsis "Directory iteration function")
11865 (description
11866 "Directory iteration function like os.listdir(), except that instead of
11867returning a list of bare filenames, it yields DirEntry objects that include
11868file type and stat information along with the name. Using scandir() increases
11869the speed of os.walk() by 2-20 times (depending on the platform and file
11870system) by avoiding unnecessary calls to os.stat() in most cases.
11871
11872This package is part of the Python standard library since version 3.5.")
11873 (license license:bsd-3)))
11874
11875(define-public python2-scandir
11876 (package-with-python2 python-scandir))
11877
11878(define-public python2-stemming
11879 (package
11880 (name "python2-stemming")
11881 (version "1.0.1")
11882 (source
11883 (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "stemming" version))
11886 (sha256
11887 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11888 (build-system python-build-system)
11889 (arguments
11890 `(#:python ,python-2))
11891 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11892 (synopsis "Python implementations of various stemming algorithms")
11893 (description
11894 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11895stemming algorithms for English. These implementations are straightforward and
11896efficient, unlike some Python versions of the same algorithms available on the
11897Web. This package is an extraction of the stemming code included in the Whoosh
11898search engine.")
11899 (license license:public-domain)))
11900
11901(define-public python-factory-boy
11902 (package
11903 (name "python-factory-boy")
11904 (version "2.8.1")
11905 (source
11906 (origin
11907 (method url-fetch)
11908 (uri (pypi-uri "factory_boy" version))
11909 (sha256
11910 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11911 (build-system python-build-system)
11912 (arguments
11913 ;; Tests are not included in the tarball.
11914 `(#:tests? #f))
11915 (propagated-inputs
11916 `(("faker" ,python-faker)))
11917 (home-page "https://github.com/benhoyt/scandir")
11918 (synopsis "Versatile test fixtures replacement")
11919 (description
11920 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11921
11922As a fixtures replacement tool, it aims to replace static, hard to maintain
11923fixtures with easy-to-use factories for complex object.
11924
11925Instead of building an exhaustive test setup with every possible combination
11926of corner cases, factory_boy allows you to use objects customized for the
11927current test, while only declaring the test-specific fields")
11928 (license license:expat)))
11929
11930(define-public python2-factory-boy
11931 (package-with-python2 python-factory-boy))
11932
11933(define-public python-translate-toolkit
11934 (package
11935 (name "python-translate-toolkit")
11936 (version "2.1.0")
11937 (source
11938 (origin
11939 (method url-fetch)
11940 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11941 (sha256
11942 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11943 (build-system python-build-system)
11944 (native-inputs
11945 `(("python-pytest" ,python-pytest)
11946 ("python-sphinx" ,python-sphinx)))
11947 (propagated-inputs
11948 `(("python-babel" ,python-babel)
11949 ("python-beautifulsoup4" ,python-beautifulsoup4)
11950 ("python-chardet" ,python-chardet)
11951 ("python-diff-match-patch" ,python-diff-match-patch)
11952 ("python-levenshtein" ,python-levenshtein)
11953 ("python-lxml" ,python-lxml)
11954 ("python-six" ,python-six)
11955 ("python-vobject" ,python-vobject)
11956 ("python-pyyaml" ,python-pyyaml)))
11957 (arguments
11958 ;; TODO: tests are not run, because they end with
11959 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11960 ;; 'parse_funcs'
11961 ;; during test setup.
11962 `(#:tests? #f))
11963 (home-page "http://toolkit.translatehouse.org")
11964 (synopsis "Tools and API for translation and localization engineering")
11965 (description
11966 "Tools and API for translation and localization engineering. It contains
11967several utilities, as well as an API for building localization tools.")
11968 (license license:gpl2+)))
11969
11970(define-public python2-translate-toolkit
11971 (package-with-python2 python-translate-toolkit))
11972
11973(define-public python-packaging
11974 (package
11975 (name "python-packaging")
11976 (version "18.0")
11977 (source
11978 (origin
11979 (method url-fetch)
11980 (uri (pypi-uri "packaging" version))
11981 (sha256
11982 (base32
11983 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11984 (build-system python-build-system)
11985 (arguments
11986 `(#:phases (modify-phases %standard-phases
11987 (replace 'check
11988 (lambda _ (invoke "py.test" "-vv"))))))
11989 (native-inputs
11990 `(("python-pretend" ,python-pretend)
11991 ("python-pytest" ,python-pytest)))
11992 (propagated-inputs
11993 `(("python-pyparsing" ,python-pyparsing)
11994 ("python-six" ,python-six)))
11995 (home-page "https://github.com/pypa/packaging")
11996 (synopsis "Core utilities for Python packages")
11997 (description "Packaging is a Python module for dealing with Python packages.
11998It offers an interface for working with package versions, names, and dependency
11999information.")
12000 ;; From 'LICENSE': This software is made available under the terms of
12001 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12002 ;; Contributions to this software is made under the terms of *both* these
12003 ;; licenses.
12004 (license (list license:asl2.0 license:bsd-2))))
12005
12006(define-public python2-packaging
12007 (package-with-python2 python-packaging))
12008
12009(define-public python-relatorio
12010 (package
12011 (name "python-relatorio")
12012 (version "0.8.0")
12013 (source
12014 (origin
12015 (method url-fetch)
12016 (uri (pypi-uri "relatorio" version))
12017 (sha256
12018 (base32
12019 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12020 (build-system python-build-system)
12021 (propagated-inputs
12022 `(("python-lxml" ,python-lxml)
12023 ("python-genshi" ,python-genshi)))
12024 (native-inputs
12025 `(("python-magic" ,python-magic)))
12026 (home-page "https://relatorio.tryton.org/")
12027 (synopsis "Templating library able to output ODT and PDF files")
12028 (description "Relatorio is a templating library which provides a way to
12029easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12030for more filetypes can be easily added by creating plugins for them.")
12031 (license license:gpl3+)))
12032
12033(define-public python2-relatorio
12034 (package-with-python2 python-relatorio))
12035
12036(define-public python-radon
12037 (package
12038 (name "python-radon")
12039 (version "2.2.0")
12040 (source
12041 (origin
12042 (method url-fetch)
12043 (uri (pypi-uri "radon" version))
12044 (sha256
12045 (base32
12046 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12047 (build-system python-build-system)
12048 (arguments
12049 `(#:phases (modify-phases %standard-phases
12050 (replace 'check
12051 (lambda _
12052 (invoke "python" "radon/tests/run.py"))))))
12053 (propagated-inputs
12054 `(("python-colorama" ,python-colorama)
12055 ("python-flake8-polyfill" ,python-flake8-polyfill)
12056 ("python-mando" ,python-mando)))
12057 (native-inputs
12058 `(("python-pytest" ,python-pytest)
12059 ("python-pytest-mock" ,python-pytest-mock)))
12060 (home-page "https://radon.readthedocs.org/")
12061 (synopsis "Code Metrics in Python")
12062 (description "Radon is a Python tool which computes various code metrics.
12063Supported metrics are:
12064@itemize @bullet
12065@item raw metrics: SLOC, comment lines, blank lines, &c.
12066@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12067@item Halstead metrics (all of them)
12068@item the Maintainability Index (a Visual Studio metric)
12069@end itemize")
12070 (license license:expat)))
12071
12072(define-public python2-radon
12073 (package-with-python2 python-radon))
12074
12075(define-public python-sure
12076 (package
12077 (name "python-sure")
12078 (version "1.4.11")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "sure" version))
12083 (sha256
12084 (base32
12085 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12086 (build-system python-build-system)
12087 (propagated-inputs
12088 `(("python-mock" ,python-mock)
12089 ("python-six" ,python-six)))
12090 (native-inputs
12091 `(("python-nose" ,python-nose)))
12092 (home-page "https://github.com/gabrielfalcao/sure")
12093 (synopsis "Automated testing library in python for python")
12094 (description
12095 "Sure is a python library that leverages a DSL for writing assertions.
12096Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12097 (license license:gpl3+)))
12098
12099(define-public python2-sure
12100 (package-with-python2 python-sure))
12101
12102(define-public python2-couleur
12103 ;; This package does not seem to support python3 at all, hence,
12104 ;; only the python2 variant definition is provided.
12105 (package
12106 (name "python2-couleur")
12107 (version "0.6.2")
12108 (source
12109 (origin
12110 (method url-fetch)
12111 (uri (pypi-uri "couleur" version))
12112 (sha256
12113 (base32
12114 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12115 (build-system python-build-system)
12116 (arguments
12117 `(#:python ,python-2))
12118 (home-page "https://github.com/gabrielfalcao/couleur")
12119 (synopsis
12120 "ANSI terminal tool for python, colored shell and other handy fancy features")
12121 (description
12122 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12123terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12124 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12125 ;; https://github.com/gabrielfalcao/couleur/issues/11
12126 (license license:lgpl3+)))
12127
12128(define-public python-misaka
12129 (package
12130 (name "python-misaka")
0dcb3412 12131 (version "2.1.1")
44d10b1f
RW
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "misaka" version))
12136 (sha256
12137 (base32
0dcb3412 12138 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12139 (build-system python-build-system)
12140 (arguments
12141 `(;; Line 37 of setup.py calls self.run_command('develop')
12142 ;; in the 'check' phase. This command seems to be trying
12143 ;; to write to
12144 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12145 ;; for which it does not have the permission to write.
12146 #:tests? #f))
12147 (propagated-inputs
12148 `(("python-cffi" ,python-cffi)))
12149 (home-page "https://github.com/FSX/misaka")
12150 (synopsis "Python binding for Hoedown")
12151 (description
12152 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12153library written in C. It features a fast HTML renderer and functionality to make custom
12154renderers (e.g. man pages or LaTeX).")
12155 (license license:expat)))
12156
12157(define-public python2-misaka
12158 (package-with-python2 python-misaka))
12159
12160(define-public python2-steadymark
12161 ;; This is forced into being a python2 only variant
12162 ;; due to its dependence on couleur that has no support
12163 ;; for python3
12164 (package
12165 (name "python2-steadymark")
12166 (version "0.7.3")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "steadymark" version))
12171 (sha256
12172 (base32
12173 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12174 (build-system python-build-system)
12175 (native-inputs
12176 `(("python-couleur" ,python2-couleur)
12177 ("python-sure" ,python2-sure)
12178 ("python-misaka" ,python2-misaka)))
12179 (arguments
12180 `(#:python ,python-2
12181 #:phases
12182 (modify-phases %standard-phases
12183 (add-before 'build 'patch-setup-py
12184 (lambda _
12185 ;; Update requirements from dependency==version
12186 ;; to dependency>=version
12187 (substitute* "setup.py"
12188 (("==") ">="))
12189 #t)))))
12190 (home-page "https://github.com/gabrielfalcao/steadymark")
12191 (synopsis "Markdown-based test runner for python")
12192 (description
12193 "@code{Steadymark} allows documentation to be written in github-flavoured
12194markdown. The documentation may contain snippets of code surrounded by python
12195code blocks and @code{Steadymark} will find these snippets and run them, making
12196sure that there are no old malfunctional examples in the documentation examples.")
12197 (license license:expat)))
12198
12199(define-public python-jsonpointer
12200 (package
12201 (name "python-jsonpointer")
12202 (version "1.10")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "jsonpointer" version))
12207 (sha256
12208 (base32
12209 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12210 (build-system python-build-system)
12211 (home-page "https://github.com/stefankoegl/python-json-pointer")
12212 (synopsis "Identify specific nodes in a JSON document")
12213 (description "@code{jsonpointer} allows you to access specific nodes
12214by path in a JSON document (see RFC 6901).")
12215 (license license:bsd-3)))
12216
12217(define-public python2-jsonpointer
12218 (package-with-python2 python-jsonpointer))
12219
12220(define-public python-jsonpatch
12221 (package
12222 (name "python-jsonpatch")
12223 (version "1.16")
12224 (source
12225 (origin
12226 (method url-fetch)
12227 ;; pypi version lacks tests.js
12228 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12229 "archive/v" version ".tar.gz"))
12230 (file-name (string-append name "-" version ".tar.gz"))
12231 (sha256
12232 (base32
12233 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12234 (build-system python-build-system)
12235 (native-inputs
12236 `(("python-jsonpointer" ,python-jsonpointer)))
12237 (home-page "https://github.com/stefankoegl/python-json-patch")
12238 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12239 (description "@code{jsonpatch} is a library and program that allows
12240applying JSON Patches according to RFC 6902.")
12241 (license license:bsd-3)))
12242
12243(define-public python2-jsonpatch
12244 (package-with-python2 python-jsonpatch))
12245
12246(define-public python-jsonpatch-0.4
12247 (package (inherit python-jsonpatch)
12248 (name "python-jsonpatch")
12249 (version "0.4")
12250 (source
12251 (origin
12252 (method url-fetch)
12253 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12254 "archive/v" version ".tar.gz"))
12255 (file-name (string-append name "-" version ".tar.gz"))
12256 (sha256
12257 (base32
12258 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12259
12260(define-public python2-jsonpatch-0.4
12261 (package-with-python2 python-jsonpatch-0.4))
12262
12263(define-public python-rfc3986
12264 (package
12265 (name "python-rfc3986")
12266 (version "1.1.0")
12267 (source (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "rfc3986" version))
12270 (sha256
12271 (base32
12272 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12273 (build-system python-build-system)
12274 (arguments
12275 `(#:modules ((guix build utils)
12276 (guix build python-build-system)
12277 (ice-9 ftw)
12278 (srfi srfi-1)
12279 (srfi srfi-26))
12280 #:phases
12281 (modify-phases %standard-phases
12282 (replace 'check
12283 (lambda _
12284 (let ((cwd (getcwd)))
12285 (setenv "PYTHONPATH"
12286 (string-append cwd "/build/"
12287 (find (cut string-prefix? "lib" <>)
12288 (scandir (string-append cwd "/build")))
12289 ":"
12290 (getenv "PYTHONPATH")))
12291 (invoke "pytest" "-v")))))))
12292 (native-inputs
12293 `(("python-pytest" ,python-pytest)))
12294 (home-page "https://rfc3986.readthedocs.io/")
12295 (synopsis "Parse and validate URI references")
12296 (description
12297 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12298validation and authority parsing. This module also supports RFC@tie{}6874
12299which adds support for zone identifiers to IPv6 addresses.")
12300 (license license:asl2.0)))
12301
12302(define-public python2-rfc3986
12303 (package-with-python2 python-rfc3986))
12304
12305(define-public python-rfc3987
12306 (package
12307 (name "python-rfc3987")
12308 (version "1.3.7")
12309 (source
12310 (origin
12311 (method url-fetch)
12312 (uri (pypi-uri "rfc3987" version))
12313 (sha256
12314 (base32
12315 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12316 (build-system python-build-system)
12317 (home-page "https://pypi.python.org/pypi/rfc3987")
12318 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12319 (description "@code{rfc3987} provides routines for parsing and
12320validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12321 (license license:gpl3+)))
12322
12323(define-public python2-rfc3987
12324 (package-with-python2 python-rfc3987))
12325
12326(define-public python-validate-email
12327 (package
12328 (name "python-validate-email")
12329 (version "1.3")
12330 (source
12331 (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "validate_email" version))
12334 (sha256
12335 (base32
12336 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12337 (build-system python-build-system)
12338 (home-page "https://github.com/syrusakbary/validate_email")
12339 (synopsis "Verifies if an email address is valid and really exists")
12340 (description "@code{validate_email} can be used to verify if an email
12341address is valid and really exists.")
12342 (license license:lgpl3+)))
12343
12344(define-public python2-validate-email
12345 (package-with-python2 python-validate-email))
12346
12347(define-public python-flex
12348 (package
12349 (name "python-flex")
12350 (version "6.10.0")
12351 (source
12352 (origin
12353 (method url-fetch)
12354 (uri (pypi-uri "flex" version))
12355 (sha256
12356 (base32
12357 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12358 (build-system python-build-system)
12359 (propagated-inputs
12360 `(("python-click" ,python-click)
12361 ("python-iso8601" ,python-iso8601)
12362 ("python-jsonpointer" ,python-jsonpointer)
12363 ("python-pyyaml" ,python-pyyaml)
12364 ("python-requests" ,python-requests)
12365 ("python-rfc3987" ,python-rfc3987)
12366 ("python-six" ,python-six)
12367 ("python-validate-email" ,python-validate-email)))
12368 (home-page "https://github.com/pipermerriam/flex")
12369 (synopsis "Validates Swagger schemata")
12370 (description "@code{flex} can be used to validate Swagger schemata.")
12371 (license license:bsd-3)))
12372
12373(define-public python2-flex
12374 (package-with-python2 python-flex))
12375
12376(define-public python-marshmallow
12377 (package
12378 (name "python-marshmallow")
12379 (version "3.0.0b14")
12380 (source
12381 (origin
12382 (method url-fetch)
12383 (uri (pypi-uri "marshmallow" version))
12384 (sha256
12385 (base32
12386 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12387 (build-system python-build-system)
12388 (propagated-inputs
12389 `(("python-dateutil" ,python-dateutil)
12390 ("python-simplejson" ,python-simplejson)))
12391 (native-inputs
12392 `(("python-pytest" ,python-pytest)
12393 ("python-pytz" ,python-pytz)))
12394 (home-page "https://github.com/marshmallow-code/marshmallow")
12395 (synopsis "Convert complex datatypes to and from native
12396Python datatypes.")
12397 (description "@code{marshmallow} provides a library for converting
12398complex datatypes to and from native Python datatypes.")
12399 (license license:expat)))
12400
12401(define-public python2-marshmallow
12402 (package-with-python2 python-marshmallow))
12403
12404(define-public python-apispec
12405 (package
12406 (name "python-apispec")
12407 (version "0.25.3")
12408 (source
12409 (origin
12410 (method url-fetch)
12411 (uri (pypi-uri "apispec" version))
12412 (sha256
12413 (base32
12414 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12415 (build-system python-build-system)
12416 (propagated-inputs
12417 `(("python-pyyaml" ,python-pyyaml)))
12418 (native-inputs
12419 `(("python-pytest" ,python-pytest)
12420 ("python-flask" ,python-flask)
12421 ("python-marshmallow" ,python-marshmallow)
12422 ("python-tornado" ,python-tornado)
12423 ("python-bottle" ,python-bottle)
12424 ("python-mock" ,python-mock)))
12425 (home-page "https://github.com/marshmallow-code/apispec")
12426 (synopsis "Swagger 2.0 API specification generator")
12427 (description "@code{python-apispec} is a pluggable API specification
12428generator. Currently supports the OpenAPI specification (f.k.a.
12429Swagger 2.0).")
12430 (license license:expat)))
12431
12432(define-public python2-apispec
12433 (package-with-python2 python-apispec))
12434
12435(define-public python-flasgger
12436 (package
12437 (name "python-flasgger")
12438 (version "0.6.3")
12439 (source
12440 (origin
12441 (method url-fetch)
12442 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12443 version ".tar.gz"))
12444 (file-name (string-append name "-" version ".tar.gz"))
12445 (sha256
12446 (base32
12447 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12448 (build-system python-build-system)
12449 (arguments
12450 `(#:phases
12451 (modify-phases %standard-phases
12452 (replace 'check
12453 (lambda* (#:key inputs outputs #:allow-other-keys)
12454 (substitute* "Makefile"
12455 (("flake8 flasgger --ignore=F403")
12456 "flake8 flasgger --ignore=E731,F403"))
12457 (setenv "PYTHONPATH" (string-append (getcwd)
12458 ":"
12459 (getenv "PYTHONPATH")))
ac599a09 12460 (invoke "py.test"))))))
44d10b1f
RW
12461 (propagated-inputs
12462 `(("python-flask" ,python-flask)
12463 ("python-pyyaml" ,python-pyyaml)
12464 ("python-jsonschema" ,python-jsonschema)
12465 ("python-mistune" ,python-mistune)
12466 ("python-six" ,python-six)))
12467 (native-inputs
12468 `(("python-decorator" ,python-decorator)
12469 ("python-flake8" ,python-flake8)
12470 ("python-flask-restful" ,python-flask-restful)
12471 ("python-flex" ,python-flex)
12472 ("python-pytest" ,python-pytest)
12473 ("python-pytest-cov" ,python-pytest-cov)
12474 ("python-marshmallow" ,python-marshmallow)
12475 ("python-apispec" ,python-apispec)))
12476 (home-page "https://github.com/rochacbruno/flasgger/")
12477 (synopsis "Extract Swagger specs from your Flask project")
12478 (description "@code{python-flasgger} allows extracting Swagger specs
12479from your Flask project. It is a fork of Flask-Swagger.")
12480 (license license:expat)))
12481
12482(define-public python2-flasgger
12483 (package-with-python2 python-flasgger))
12484
12485(define-public python-swagger-spec-validator
12486 (package
12487 (name "python-swagger-spec-validator")
12488 (version "2.1.0")
12489 (source
12490 (origin
12491 (method url-fetch)
12492 (uri (pypi-uri "swagger-spec-validator" version))
12493 (sha256
12494 (base32
12495 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12496 (build-system python-build-system)
12497 (propagated-inputs
12498 `(("python-jsonschema" ,python-jsonschema)
12499 ("python-six" ,python-six)))
12500 (home-page
12501 "https://github.com/Yelp/swagger_spec_validator")
12502 (synopsis "Validation of Swagger specifications")
12503 (description "@code{swagger_spec_validator} provides a library for
12504validating Swagger API specifications.")
12505 (license license:asl2.0)))
12506
12507(define-public python2-swagger-spec-validator
12508 (package-with-python2 python-swagger-spec-validator))
12509
12510(define-public python-apache-libcloud
12511 (package
12512 (name "python-apache-libcloud")
12513 (version "2.4.0")
12514 (source
12515 (origin
12516 (method url-fetch)
12517 (uri (pypi-uri "apache-libcloud" version))
12518 (sha256
12519 (base32
12520 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12521 (build-system python-build-system)
12522 (arguments
12523 `(#:phases
12524 (modify-phases %standard-phases
12525 (add-after 'unpack 'patch-ssh
12526 (lambda* (#:key inputs #:allow-other-keys)
12527 (substitute* "libcloud/compute/ssh.py"
12528 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12529 "/bin/ssh" "'")))
12530 #t))
12531 (add-after 'unpack 'patch-tests
12532 (lambda _
12533 (substitute* "./libcloud/test/test_file_fixtures.py"
12534 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12535 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12536 return (httplib.OK,
12537 \"1234abcd\",
12538 {\"test\": \"value\"},
12539 httplib.responses[httplib.OK])
12540 def _ascii"))
12541 (substitute* "libcloud/test/compute/test_ssh_client.py"
12542 (("class ShellOutSSHClientTests")
12543 "@unittest.skip(\"Guix container doesn't have ssh service\")
12544class ShellOutSSHClientTests")
12545 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12546 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12547 (("'.xF0', '.x90', '.x8D', '.x88'")
12548 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12549 #t))
12550 (add-before 'check 'copy-secret
12551 (lambda _
12552 (copy-file "libcloud/test/secrets.py-dist"
12553 "libcloud/test/secrets.py")
12554 #t)))))
12555 (inputs
12556 `(("openssh" ,openssh)))
12557 (propagated-inputs
12558 `(("python-paramiko" ,python-paramiko)
12559 ("python-requests" ,python-requests)))
12560 (native-inputs
12561 `(("python-lockfile" ,python-lockfile)
12562 ("python-mock" ,python-mock)
12563 ("python-pytest" ,python-pytest)
12564 ("python-pytest-runner" ,python-pytest-runner)
12565 ("python-requests-mock" ,python-requests-mock)))
12566 (home-page "https://libcloud.apache.org/")
12567 (synopsis "Unified Cloud API")
12568 (description "@code{libcloud} is a Python library for interacting with
12569many of the popular cloud service providers using a unified API.")
12570 (license license:asl2.0)))
12571
12572(define-public python2-apache-libcloud
12573 (package-with-python2 python-apache-libcloud))
12574
12575(define-public python-smmap2
12576 (package
12577 (name "python-smmap2")
12578 (version "2.0.3")
12579 (source
12580 (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "smmap2" version))
12583 (sha256
12584 (base32
12585 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12586 (build-system python-build-system)
12587 (native-inputs
12588 `(("python-nosexcover" ,python-nosexcover)))
12589 (home-page "https://github.com/Byron/smmap")
12590 (synopsis "Python sliding window memory map manager")
12591 (description "@code{smmap2} is a pure Python implementation of a sliding
12592window memory map manager.")
12593 (license license:bsd-3)))
12594
12595(define-public python2-smmap2
12596 (package-with-python2 python-smmap2))
12597
12598(define-public python-regex
12599 (package
12600 (name "python-regex")
12601 (version "2017.06.07")
12602 (source (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "regex" version))
12605 (sha256
12606 (base32
12607 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12608 (build-system python-build-system)
12609 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12610 (synopsis "Alternative regular expression module")
12611 (description "This regular expression implementation is backwards-
12612compatible with the standard @code{re} module, but offers additional
12613functionality like full case-folding for case-insensitive matches in Unicode.")
12614 (license license:psfl)))
12615
12616(define-public python2-regex
12617 (package-with-python2 python-regex))
12618
12619(define-public python2-pyopengl
12620 (package
12621 (name "python2-pyopengl")
12622 (version "3.1.0")
12623 (source
12624 (origin
12625 (method url-fetch)
12626 (uri (pypi-uri "PyOpenGL" version))
12627 (sha256
12628 (base32
12629 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12630 (arguments
12631 `(#:python ,python-2))
12632 (build-system python-build-system)
12633 (home-page "http://pyopengl.sourceforge.net")
12634 (synopsis "Standard OpenGL bindings for Python")
12635 (description
12636 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12637related APIs. The binding is created using the standard @code{ctypes}
12638library.")
12639 (license license:bsd-3)))
12640
12641(define-public python2-pyopengl-accelerate
12642 (package
12643 (inherit python2-pyopengl)
12644 (name "python2-pyopengl-accelerate")
12645 (version "3.1.0")
12646 (source
12647 (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "PyOpenGL-accelerate" version))
12650 (sha256
12651 (base32
12652 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12653 (synopsis "Acceleration code for PyOpenGL")
12654 (description
12655 "This is the Cython-coded accelerator module for PyOpenGL.")))
12656
12657(define-public python-rencode
12658 (package
12659 (name "python-rencode")
12660 (version "1.0.5")
12661 (source
12662 (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "rencode" version))
12665 (sha256
12666 (base32
12667 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12668 (build-system python-build-system)
12669 (arguments
12670 `(#:phases
12671 (modify-phases %standard-phases
12672 (add-before 'check 'delete-bogus-test
12673 ;; This test requires /home/aresch/Downloads, which is not provided by
12674 ;; the build environment.
12675 (lambda _
12676 (delete-file "rencode/t.py")
12677 #t)))))
12678 (native-inputs `(("pkg-config" ,pkg-config)
12679 ("python-cython" ,python-cython)))
12680 (home-page "https://github.com/aresch/rencode")
12681 (synopsis "Serialization of heterogeneous data structures")
12682 (description
12683 "The @code{rencode} module is a data structure serialization library,
12684similar to @code{bencode} from the BitTorrent project. For complex,
12685heterogeneous data structures with many small elements, r-encoding stake up
12686significantly less space than b-encodings. This version of rencode is a
12687complete rewrite in Cython to attempt to increase the performance over the
12688pure Python module.")
12689 (license license:bsd-3)))
12690
12691(define-public python2-rencode
12692 (package-with-python2 python-rencode))
12693
12694(define-public python-xenon
12695 (package
12696 (name "python-xenon")
12697 (version "0.5.4")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "xenon" version))
12702 (sha256
12703 (base32
12704 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12705 (build-system python-build-system)
12706 (native-inputs
12707 `(("python-pyyaml" ,python-pyyaml)
12708 ("python-radon" ,python-radon)
12709 ("python-requests" ,python-requests)
12710 ("python-flake8" ,python-flake8)
12711 ("python-tox" ,python-tox)))
12712 (arguments
12713 `(#:phases
12714 (modify-phases %standard-phases
12715 (add-before 'build 'patch-test-requirements
12716 (lambda _
12717 ;; Remove httpretty dependency for tests.
12718 (substitute* "setup.py"
12719 (("httpretty") ""))
12720 #t)))))
12721 (home-page "https://xenon.readthedocs.org/")
12722 (synopsis "Monitor code metrics for Python on your CI server")
12723 (description
12724 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12725Ideally, @code{xenon} is run every time code is committed. Through command
12726line options, various thresholds can be set for the complexity of code. It
12727will fail (i.e. it will exit with a non-zero exit code) when any of these
12728requirements is not met.")
12729 (license license:expat)))
12730
12731(define-public python2-xenon
12732 (package-with-python2 python-xenon))
12733
12734(define-public python-pysocks
12735 (package
12736 (name "python-pysocks")
12737 (version "1.6.8")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "PySocks" version))
12742 (sha256
12743 (base32
12744 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12745 (build-system python-build-system)
12746 (arguments `(#:tests? #f))
12747 (home-page "https://github.com/Anorov/PySocks")
12748 (synopsis "SOCKS client module")
12749 (description "@code{pysocks} is an updated and semi-actively maintained
12750version of @code{SocksiPy} with bug fixes and extra features.")
12751 (license license:bsd-3)))
12752
12753(define-public python2-pysocks
12754 (package-with-python2 python-pysocks))
12755
12756(define-public python-pydiff
12757 (package
12758 (name "python-pydiff")
12759 (version "0.2")
12760 (source
12761 (origin
12762 (method url-fetch)
12763 (uri (pypi-uri "pydiff" version))
12764 (sha256
12765 (base32
12766 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12767 (build-system python-build-system)
12768 (home-page "https://github.com/myint/pydiff")
12769 (synopsis "Library to diff two Python files at the bytecode level")
12770 (description
12771 "@code{pydiff} makes it easy to look for actual code changes while
12772ignoring formatting changes.")
12773 (license license:expat)))
12774
12775(define-public python2-pydiff
12776 (package-with-python2 python-pydiff))
12777
12778(define-public python-tqdm
12779 (package
12780 (name "python-tqdm")
12781 (version "4.19.6")
12782 (source
12783 (origin
12784 (method url-fetch)
12785 (uri (pypi-uri "tqdm" version))
12786 (sha256
12787 (base32
12788 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12789 (build-system python-build-system)
12790 (native-inputs
12791 `(("python-flake8" ,python-flake8)
12792 ("python-nose" ,python-nose)
12793 ("python-coverage" ,python-coverage)))
12794 (home-page "https://github.com/tqdm/tqdm")
12795 (synopsis "Fast, extensible progress meter")
12796 (description
12797 "Make loops show a progress bar on the console by just wrapping any
12798iterable with @code{|tqdm(iterable)|}. Offers many options to define
12799design and layout.")
12800 (license (list license:mpl2.0 license:expat))))
12801
12802(define-public python2-tqdm
12803 (package-with-python2 python-tqdm))
12804
12805(define-public python-pkginfo
12806 (package
12807 (name "python-pkginfo")
12808 (version "1.4.2")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "pkginfo" version))
12813 (sha256
12814 (base32
12815 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12816 (build-system python-build-system)
12817 (arguments
12818 ;; The tests are broken upstream.
12819 '(#:tests? #f))
12820 (home-page
12821 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12822 (synopsis
12823 "Query metadatdata from sdists, bdists, and installed packages")
12824 (description
12825 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12826source distriubtion (an sdist) or a binary distribution (e.g., created by
12827running bdist_egg). It can also query the EGG-INFO directory of an installed
12828distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12829created by running @code{python setup.py develop}).")
12830 (license license:expat)))
12831
12832(define-public python2-pkginfo
12833 (package-with-python2 python-pkginfo))
12834
12835(define-public python-twine
12836 (package
12837 (name "python-twine")
12838 (version "1.9.1")
12839 (source
12840 (origin
12841 (method url-fetch)
12842 (uri (pypi-uri "twine" version))
12843 (sha256
12844 (base32
12845 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12846 (build-system python-build-system)
12847 (propagated-inputs
12848 `(("python-tqdm" ,python-tqdm)
12849 ("python-pkginfo" ,python-pkginfo)
12850 ("python-requests" ,python-requests)
12851 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12852 (home-page "https://github.com/pypa/twine")
12853 (synopsis "Collection of utilities for interacting with PyPI")
12854 (description
12855 "@code{twine} currently supports registering projects and uploading
12856distributions. It authenticates the user over HTTPS, allows them to pre-sign
12857their files and supports any packaging format (including wheels).")
12858 (license license:asl2.0)))
12859
12860(define-public python2-twine
12861 (package-with-python2 python-twine))
12862
12863(define-public python-linecache2
12864 (package
12865 (name "python-linecache2")
12866 (version "1.0.0")
12867 (source
12868 (origin
12869 (method url-fetch)
12870 (uri (pypi-uri "linecache2" version))
12871 (sha256
12872 (base32
12873 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12874 (build-system python-build-system)
12875 (arguments
12876 `(;; The tests depend on unittest2, and our version is a bit too old.
12877 #:tests? #f))
12878 (native-inputs
12879 `(("python-pbr" ,python-pbr-minimal)))
12880 (home-page
12881 "https://github.com/testing-cabal/linecache2")
12882 (synopsis "Backports of the linecache module")
12883 (description
12884 "The linecache module allows one to get any line from any file, while
12885attempting to optimize internally, using a cache, the common case where many
12886lines are read from a single file.")
12887 (license license:psfl)))
12888
12889(define-public python2-linecache2
12890 (package-with-python2 python-linecache2))
12891
12892(define-public python-traceback2
12893 (package
12894 (name "python-traceback2")
12895 (version "1.4.0")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "traceback2" version))
12900 (sha256
12901 (base32
12902 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12903 (build-system python-build-system)
12904 (arguments
12905 `(;; python-traceback2 and python-unittest2 depend on one another.
12906 #:tests? #f))
12907 (native-inputs
12908 `(("python-pbr" ,python-pbr-minimal)))
12909 (propagated-inputs
12910 `(("python-linecache2" ,python-linecache2)))
12911 (home-page
12912 "https://github.com/testing-cabal/traceback2")
12913 (synopsis "Backports of the traceback module")
12914 (description
12915 "This module provides a standard interface to extract, format and print
12916stack traces of Python programs. It exactly mimics the behavior of the Python
12917interpreter when it prints a stack trace.")
12918 (license license:psfl)))
12919
12920(define-public python2-traceback2
12921 (package-with-python2 python-traceback2))
12922
12923(define-public python-ratelimiter
12924 (package
12925 (name "python-ratelimiter")
12926 (version "1.2.0")
12927 (source
12928 (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "ratelimiter" version))
12931 (sha256
12932 (base32
12933 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12934 (build-system python-build-system)
12935 (arguments
12936 '(#:tests? #f)) ; There are no tests in the pypi archive.
12937 (home-page "https://github.com/RazerM/ratelimiter")
12938 (synopsis "Simple rate limiting object")
12939 (description
12940 "The @code{ratelimiter} module ensures that an operation will not be
12941executed more than a given number of times during a given period.")
12942 (license license:asl2.0)))
12943
12944(define-public python2-ratelimiter
12945 (package-with-python2 python-ratelimiter))
12946
12947(define-public python-dukpy
12948 (package
12949 (name "python-dukpy")
12950 (version "0.3")
12951 (source
12952 (origin
12953 (method url-fetch)
12954 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12955 version ".tar.gz"))
12956 (file-name (string-append name "-" version ".tar.gz"))
12957 (sha256
12958 (base32
12959 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12960 (build-system python-build-system)
12961 (home-page "https://github.com/kovidgoyal/dukpy")
12962 (synopsis "Run JavaScript in python")
12963 (description
12964 "dukpy is a JavaScript runtime environment for Python using the duktape
12965embeddable JavaScript engine.")
12966 ;; Dukpy is licensed under MIT like the embedded duktape library,
12967 ;; with 'errors.c' as GPL3.
12968 (license (list license:expat license:gpl3))))
12969
12970(define-public python2-dukpy
12971 (package-with-python2 python-dukpy))
12972
12973(define-public python-jsonrpclib-pelix
12974 (package
12975 (name "python-jsonrpclib-pelix")
12976 (version "0.3.2")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "jsonrpclib-pelix" version))
12981 (sha256
12982 (base32
12983 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12984 (build-system python-build-system)
12985 (arguments
12986 `(#:tests? #f)) ; no tests in PyPI tarball
12987 (home-page "https://github.com/tcalmant/jsonrpclib/")
12988 (synopsis "JSON-RPC 2.0 client library for Python")
12989 (description
12990 "This library implements the JSON-RPC v2.0
12991specification (backwards-compatible) as a client library for Python. This
12992version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12993services.")
12994 (license license:asl2.0)))
12995
12996(define-public python2-jsonrpclib-pelix
12997 (package-with-python2 python-jsonrpclib-pelix))
12998
12999(define-public python-setuptools-scm-git-archive
13000 (package
13001 (name "python-setuptools-scm-git-archive")
13002 (version "1.0")
13003 (source
13004 (origin
13005 (method url-fetch)
13006 (uri (pypi-uri "setuptools_scm_git_archive" version))
13007 (sha256
13008 (base32
13009 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13010 (build-system python-build-system)
13011 (native-inputs
13012 `(("python-pytest" ,python-pytest)))
13013 (propagated-inputs
13014 `(("python-setuptools-scm" ,python-setuptools-scm)))
13015 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13016 (synopsis "Setuptools_scm plugin for git archives")
13017 (description
13018 "The setuptools_scm_git_archive package is a plugin to
13019setuptools_scm, which supports obtaining versions from git archives that
13020belong to tagged versions.")
13021 (license license:expat)))
13022
13023(define-public python2-setuptools-scm-git-archive
13024 (package-with-python2 python-setuptools-scm-git-archive))
13025
13026(define-public python-pyclipper
13027 (package
13028 (name "python-pyclipper")
13029 (version "1.1.0.post1")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "pyclipper" version ".zip"))
13034 (sha256
13035 (base32
13036 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13037 (modules '((guix build utils)))
13038 (snippet
13039 '(begin
13040 ;; This file is generated by Cython.
13041 (delete-file "pyclipper/pyclipper.cpp") #t))))
13042 (build-system python-build-system)
13043 (arguments
13044 `(#:phases
13045 (modify-phases %standard-phases
13046 (add-before 'build 'cythonize-sources
13047 (lambda _
13048 (with-directory-excursion "pyclipper"
13049 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13050 (propagated-inputs
13051 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13052 (native-inputs
13053 `(("python-cython" ,python-cython)
13054 ("python-pytest" ,python-pytest)
13055 ("python-pytest-runner" ,python-pytest-runner)
13056 ("python-unittest2" ,python-unittest2)
13057 ("unzip" ,unzip)))
13058 (home-page "https://github.com/greginvm/pyclipper")
13059 (synopsis "Wrapper for Angus Johnson's Clipper library")
13060 (description
13061 "Pyclipper is a Cython wrapper for the C++ translation of the
13062Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13063 (license license:expat)))
13064
13065(define-public python2-pyclipper
13066 (package-with-python2 python-pyclipper))
13067
13068(define-public python2-booleanoperations
13069 (package
13070 (name "python2-booleanoperations")
13071 (version "0.7.1")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "booleanOperations" version ".zip"))
13076 (sha256
13077 (base32
13078 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13079 (build-system python-build-system)
13080 (arguments
13081 `(#:python ,python-2))
13082 (native-inputs
13083 `(("unzip" ,unzip)
13084 ("python2-pytest" ,python2-pytest)
13085 ("python2-pytest-runner" ,python2-pytest-runner)))
13086 (propagated-inputs
13087 `(("python-fonttools" ,python2-fonttools)
13088 ("python-pyclipper" ,python2-pyclipper)
13089 ("python-ufolib" ,python2-ufolib)))
13090 (home-page "https://github.com/typemytype/booleanOperations")
13091 (synopsis "Boolean operations on paths")
13092 (description
13093 "BooleanOperations provides a Python library that enables
13094boolean operations on paths.")
13095 (license license:expat)))
13096
13097(define-public python-tempdir
13098 (package
13099 (name "python-tempdir")
13100 (version "0.7.1")
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "tempdir" version))
13105 (sha256
13106 (base32
13107 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13108 (build-system python-build-system)
13109 (home-page "https://pypi.org/project/tempdir/")
13110 (arguments
13111 ;; the package has no tests
13112 '(#:tests? #f))
13113 (synopsis "Python library for managing temporary directories")
13114 (description
13115 "This library manages temporary directories that are automatically
13116deleted with all their contents when they are no longer needed. It is
13117particularly convenient for use in tests.")
13118 (license license:expat)))
13119
13120(define-public python2-tempdir
13121 (package-with-python2 python-tempdir))
13122
13123(define-public python-activepapers
13124 (package
13125 (name "python-activepapers")
13126 (version "0.2.2")
13127 (source
13128 (origin
13129 (method url-fetch)
13130 (uri (pypi-uri "ActivePapers.Py" version))
13131 (sha256
13132 (base32
13133 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13134 (build-system python-build-system)
13135 (arguments
13136 `(#:modules ((ice-9 ftw)
13137 (srfi srfi-1)
13138 (guix build utils)
13139 (guix build python-build-system))
13140
13141 #:phases
13142 (modify-phases %standard-phases
13143 (add-after 'unpack 'delete-python2-code
13144 (lambda _
13145 (for-each delete-file
13146 '("lib/activepapers/builtins2.py"
13147 "lib/activepapers/standardlib2.py"
13148 "lib/activepapers/utility2.py"))))
13149 (replace 'check
13150 (lambda _
13151 ;; Deactivate the test cases that download files
13152 (setenv "NO_NETWORK_ACCESS" "1")
13153 ;; For some strange reason, some tests fail if nosetests runs all
13154 ;; test modules in a single execution. They pass if each test
13155 ;; module is run individually.
13156 (for-each (lambda (filename)
13157 (invoke "nosetests"
13158 (string-append "tests/" filename)))
13159 (scandir "tests"
13160 (lambda (filename)
13161 (string-suffix? ".py" filename)))))))))
13162 (native-inputs
13163 `(("python-tempdir" ,python-tempdir)
13164 ("python-nose" ,python-nose)))
13165 (propagated-inputs
13166 `(("python-h5py" ,python-h5py)))
13167 (home-page "http://www.activepapers.org/")
13168 (synopsis "Executable papers for scientific computing")
13169 (description
13170 "ActivePapers is a tool for working with executable papers, which
13171combine data, code, and documentation in single-file packages,
13172suitable for publication as supplementary material or on repositories
13173such as figshare or Zenodo.")
13174 (properties `((python2-variant . ,(delay python2-activepapers))))
13175 (license license:bsd-3)))
13176
13177(define-public python2-activepapers
13178 (let ((base (package-with-python2
13179 (strip-python2-variant python-activepapers))))
13180 (package
13181 (inherit base)
13182 (arguments
13183 (substitute-keyword-arguments (package-arguments base)
13184 ((#:phases phases)
13185 `(modify-phases ,phases
13186 (delete 'delete-python2-code)
13187 (add-after 'unpack 'delete-python3-code
13188 (lambda _
13189 (for-each delete-file
13190 '("lib/activepapers/builtins3.py"
13191 "lib/activepapers/standardlib3.py"
13192 "lib/activepapers/utility3.py")))))))))))
13193
13194(define-public python-semver
13195 (package
13196 (name "python-semver")
13197 (version "2.7.9")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "semver" version))
13202 (sha256
13203 (base32
13204 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13205 (build-system python-build-system)
13206 (arguments
13207 `(#:phases
13208 (modify-phases %standard-phases
13209 (add-after 'unpack 'patch-test-requirements
13210 (lambda _
13211 (substitute* "setup.py"
13212 ;; Our Python is new enough.
13213 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13214 #t)))))
13215 (native-inputs
13216 `(("python-tox" ,python-tox)
13217 ("python-virtualenv" ,python-virtualenv)))
13218 (home-page "https://github.com/k-bx/python-semver")
13219 (synopsis "Python helper for Semantic Versioning")
13220 (description "This package provides a Python library for
13221@url{Semantic Versioning, http://semver.org/}.")
13222 (license license:bsd-3)))
13223
13224(define-public python2-semver
13225 (package-with-python2 python-semver))
13226
13227(define-public python-pyro4
13228 (package
13229 (name "python-pyro4")
13230 (version "4.74")
13231 (source
13232 (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "Pyro4" version))
13235 (sha256
13236 (base32
13237 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13238 (build-system python-build-system)
13239 (propagated-inputs
13240 `(("python-serpent" ,python-serpent)))
13241 (home-page "https://pyro4.readthedocs.io")
13242 (synopsis "Distributed object middleware for Python")
13243 (description
13244 "Pyro enables you to build applications in which objects can talk to each
13245other over the network. You can just use normal Python method calls to call
13246objects on other machines, also known as remote procedure calls (RPC).")
13247 (license license:expat)))
13248
13249(define-public python2-pyro
13250 (package
13251 (name "python2-pyro")
13252 (version "3.16")
13253 (source
13254 (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "Pyro" version))
13257 (file-name (string-append "Pyro-" version ".tar.gz"))
13258 (sha256
13259 (base32
13260 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13261 (build-system python-build-system)
13262 (arguments
13263 ;; Pyro is not compatible with Python 3
13264 `(#:python ,python-2
13265 ;; Pyro has no test cases for automatic execution
13266 #:tests? #f))
13267 (home-page "http://pythonhosted.org/Pyro/")
13268 (synopsis "Distributed object manager for Python")
13269 (description "Pyro is a Distributed Object Technology system
13270written in Python that is designed to be easy to use. It resembles
13271Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13272which is a system and language independent Distributed Object Technology
13273and has much more to offer than Pyro or RMI. Pyro 3.x is no
13274longer maintained. New projects should use Pyro4 instead, which
13275is the new Pyro version that is actively developed.")
13276 (license license:expat)))
13277
13278(define-public python2-scientific
13279 (package
13280 (name "python2-scientific")
13281 (version "2.9.4")
13282 (source
13283 (origin
13284 (method url-fetch)
13285 (uri (string-append "https://bitbucket.org/khinsen/"
13286 "scientificpython/downloads/ScientificPython-"
13287 version ".tar.gz"))
13288 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13289 (sha256
13290 (base32
13291 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13292 (build-system python-build-system)
13293 (inputs
13294 `(("netcdf" ,netcdf)))
13295 (propagated-inputs
13296 `(("python-numpy" ,python2-numpy-1.8)
13297 ("python-pyro" ,python2-pyro)))
13298 (arguments
13299 ;; ScientificPython is not compatible with Python 3
13300 `(#:python ,python-2
13301 #:tests? #f ; No test suite
13302 #:phases
13303 (modify-phases %standard-phases
13304 (replace 'build
13305 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13306 (invoke "python" "setup.py" "build"
13307 (string-append "--netcdf_prefix="
13308 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13309 (home-page "https://bitbucket.org/khinsen/scientificpython")
13310 (synopsis "Python modules for scientific computing")
13311 (description "ScientificPython is a collection of Python modules that are
13312useful for scientific computing. Most modules are rather general (Geometry,
13313physical units, automatic derivatives, ...) whereas others are more
13314domain-specific (e.g. netCDF and PDB support). The library is currently
13315not actively maintained and works only with Python 2 and NumPy < 1.9.")
13316 (license license:cecill-c)))
13317
13318(define-public python2-mmtk
13319 (package
13320 (name "python2-mmtk")
13321 (version "2.7.11")
13322 (source
13323 (origin
13324 (method url-fetch)
13325 (uri (string-append "https://bitbucket.org/khinsen/"
13326 "mmtk/downloads/MMTK-" version ".tar.gz"))
13327 (file-name (string-append "MMTK-" version ".tar.gz"))
13328 (sha256
13329 (base32
13330 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13331 (build-system python-build-system)
13332 (native-inputs
13333 `(("netcdf" ,netcdf)))
13334 (propagated-inputs
13335 `(("python-scientific" ,python2-scientific)
13336 ("python-tkinter" ,python-2 "tk")))
13337 (arguments
13338 `(#:python ,python-2
13339 #:tests? #f
13340 #:phases
13341 (modify-phases %standard-phases
13342 (add-before 'build 'includes-from-scientific
13343 (lambda* (#:key inputs #:allow-other-keys)
13344 (mkdir-p "Include/Scientific")
13345 (copy-recursively
13346 (string-append
13347 (assoc-ref inputs "python-scientific")
13348 "/include/python2.7/Scientific")
13349 "Include/Scientific"))))))
13350 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13351 (synopsis "Python library for molecular simulation")
13352 (description "MMTK is a library for molecular simulations with an emphasis
13353on biomolecules. It provides widely used methods such as Molecular Dynamics
13354and normal mode analysis, but also basic routines for implementing new methods
13355for simulation and analysis. The library is currently not actively maintained
13356and works only with Python 2 and NumPy < 1.9.")
13357 (license license:cecill-c)))
13358
13359(define-public python-phonenumbers
13360 (package
13361 (name "python-phonenumbers")
13362 (version "8.9.1")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (pypi-uri "phonenumbers" version))
13367 (sha256
13368 (base32
13369 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13370 (build-system python-build-system)
13371 (home-page
13372 "https://github.com/daviddrysdale/python-phonenumbers")
13373 (synopsis
13374 "Python library for dealing with international phone numbers")
13375 (description
13376 "This package provides a Python port of Google's libphonenumber library.")
13377 (license license:asl2.0)))
13378
13379(define-public python2-phonenumbers
13380 (package-with-python2 python-phonenumbers))
13381
13382(define-public python-send2trash
13383 (package
13384 (name "python-send2trash")
d9b0216b 13385 (version "1.5.0")
44d10b1f 13386 (source
d9b0216b 13387 (origin (method git-fetch)
44d10b1f 13388 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13389 (uri (git-reference
13390 (url "https://github.com/hsoft/send2trash.git")
13391 (commit version)))
13392 (file-name (git-file-name name version))
44d10b1f
RW
13393 (sha256
13394 (base32
d9b0216b 13395 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13396 (build-system python-build-system)
13397 (arguments
13398 '(#:phases
13399 (modify-phases %standard-phases
13400 (add-before 'check 'pre-check
13401 (lambda _
13402 (mkdir-p "/tmp/foo")
13403 (setenv "HOME" "/tmp/foo")
13404 #t)))))
13405 (home-page "https://github.com/hsoft/send2trash")
13406 (synopsis "Send files to the user's @file{~/Trash} directory")
13407 (description "This package provides a Python library to send files to the
13408user's @file{~/Trash} directory.")
13409 (license license:bsd-3)))
13410
13411(define-public python2-send2trash
13412 (package
13413 (inherit (package-with-python2 python-send2trash))
13414 (arguments
13415 (substitute-keyword-arguments (package-arguments python-send2trash)
13416 ((#:phases phases)
13417 `(modify-phases ,phases
13418 (add-before 'check 'setenv
13419 (lambda _
13420 (setenv "PYTHONPATH"
13421 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13422 #t))))))
13423 (properties `((python2-variant . ,(delay python-send2trash))))))
13424
13425(define-public python-yapf
13426 (package
13427 (name "python-yapf")
13428 (version "0.24.0")
13429 (source
13430 (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "yapf" version))
13433 (sha256
13434 (base32
13435 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13436 (build-system python-build-system)
13437 (home-page "https://github.com/google/yapf")
13438 (synopsis "Formatter for Python code")
13439 (description "YAPF is a formatter for Python code. It's based off of
13440@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13441takes the code and reformats it to the best formatting that conforms to the
13442style guide, even if the original code didn't violate the style guide.")
13443 (license license:asl2.0)))
13444
13445(define-public python2-yapf
13446 (package-with-python2 python-yapf))
13447
13448(define-public python-gyp
13449 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13450 (revision "0"))
13451 (package
13452 (name "python-gyp")
13453 ;; Google does not release versions,
13454 ;; based on second most recent commit date.
13455 (version (git-version "0.0.0" revision commit))
13456 (source
13457 (origin
13458 ;; Google does not release tarballs,
13459 ;; git checkout is needed.
13460 (method git-fetch)
13461 (uri (git-reference
13462 (url "https://chromium.googlesource.com/external/gyp")
13463 (commit commit)))
13464 (file-name (git-file-name name version))
13465 (sha256
13466 (base32
13467 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13468 (build-system python-build-system)
13469 (home-page "https://gyp.gsrc.io/")
13470 (synopsis "GYP is a Meta-Build system")
13471 (description
13472 "GYP builds build systems for large, cross platform applications.
13473It can be used to generate XCode projects, Visual Studio projects, Ninja build
13474files, and Makefiles.")
13475 (license license:bsd-3))))
13476
13477(define-public python2-gyp
13478 (package-with-python2 python-gyp))
13479
13480(define-public python-whatever
13481 (package
13482 (name "python-whatever")
13483 (version "0.5")
13484 (source
13485 (origin
13486 (method url-fetch)
13487 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13488 ".tar.gz"))
13489 (sha256
13490 (base32
13491 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13492 (file-name (string-append name "-" version ".tar.gz"))))
13493 (build-system python-build-system)
13494 (arguments
13495 `(#:phases
13496 (modify-phases %standard-phases
13497 (replace 'check
13498 (lambda _
13499 (invoke "py.test"))))))
13500 (native-inputs
13501 `(("python-pytest" ,python-pytest)))
13502 (home-page "http://github.com/Suor/whatever")
13503 (synopsis "Make anonymous functions by partial application of operators")
13504 (description "@code{whatever} provides an easy way to make anonymous
13505functions by partial application of operators.")
13506 (license license:bsd-3)))
13507
13508(define-public python2-whatever
13509 (package-with-python2 python-whatever))
13510
13511(define-public python-funcy
13512 (package
13513 (name "python-funcy")
9e396ab8 13514 (version "1.11")
44d10b1f
RW
13515 (source
13516 (origin
a85c6027
TGR
13517 (method git-fetch)
13518 (uri (git-reference
13519 (url "https://github.com/Suor/funcy.git")
13520 (commit version)))
44d10b1f 13521 (sha256
a85c6027
TGR
13522 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13523 (file-name (git-file-name name version))))
44d10b1f
RW
13524 (build-system python-build-system)
13525 (arguments
13526 `(#:phases
13527 (modify-phases %standard-phases
13528 (replace 'check
13529 (lambda _
13530 (invoke "py.test"))))))
13531 (native-inputs
13532 `(("python-pytest" ,python-pytest)
13533 ("python-whatever" ,python-whatever)))
13534 (home-page "http://github.com/Suor/funcy")
13535 (synopsis "Functional tools")
13536 (description "@code{funcy} is a library that provides functional tools.
13537Examples are:
13538@enumerate
13539@item merge - Merges collections of the same type
13540@item walk - Type-preserving map
13541@item select - Selects a part of a collection
13542@item take - Takes the first n items of a collection
13543@item first - Takes the first item of a collection
13544@item remove - Predicated-removes items of a collection
13545@item concat - Concatenates two collections
13546@item flatten - Flattens a collection with subcollections
13547@item distinct - Returns only distinct items
13548@item split - Predicated-splits a collection
13549@item split_at - Splits a collection at a given item
13550@item group_by - Groups items by group
13551@item pairwise - Pairs off adjacent items
13552@item partial - Partially-applies a function
13553@item curry - Curries a function
13554@item compose - Composes functions
13555@item complement - Complements a predicate
13556@item all_fn - \"all\" with predicate
13557@end enumerate")
13558 (license license:bsd-3)))
13559
13560(define-public python2-funcy
13561 (package-with-python2 python-funcy))
13562
13563(define-public python-isoweek
13564 (package
13565 (name "python-isoweek")
13566 (version "1.3.3")
13567 (source
13568 (origin
13569 (method url-fetch)
13570 (uri (pypi-uri "isoweek" version))
13571 (sha256
13572 (base32
13573 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13574 (build-system python-build-system)
13575 (home-page "https://github.com/gisle/isoweek")
13576 (synopsis "Objects representing a week")
13577 (description "The @code{isoweek} module provide the class Week that
13578implements the week definition of ISO 8601. This standard also defines
13579a notation for identifying weeks; yyyyWww (where the W is a literal).
13580Week instances stringify to this form.")
13581 (license license:bsd-3)))
13582
13583(define-public python2-isoweek
13584 (package-with-python2 python-isoweek))
13585
13586(define-public python-tokenize-rt
13587 (package
13588 (name "python-tokenize-rt")
13589 (version "2.0.1")
13590 (source
13591 (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "tokenize-rt" version))
13594 (sha256
13595 (base32
13596 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13597 (build-system python-build-system)
13598 (home-page "https://github.com/asottile/tokenize-rt")
13599 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13600 (description
13601 "This Python library is a wrapper around @code{tokenize} from the Python
13602standard library. It provides two additional tokens @code{ESCAPED_NL} and
13603@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13604and @code{tokens_to_src} to roundtrip.")
13605 (license license:expat)))
13606
13607(define-public python-future-fstrings
13608 (package
13609 (name "python-future-fstrings")
13610 (version "0.4.1")
13611 (source
13612 (origin
13613 (method url-fetch)
13614 (uri (pypi-uri "future_fstrings" version))
13615 (sha256
13616 (base32
13617 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13618 (build-system python-build-system)
13619 (propagated-inputs
13620 `(("python-tokenize-rt" ,python-tokenize-rt)))
13621 (home-page "https://github.com/asottile/future-fstrings")
13622 (synopsis "Backport of fstrings to Python < 3.6")
13623 (description
13624 "This package provides a UTF-8 compatible encoding
13625@code{future_fstrings}, which performs source manipulation. It decodes the
13626source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13627@code{f} strings.")
13628 (license license:expat)))
13629
13630(define-public python-typing
13631 (package
13632 (name "python-typing")
13633 (version "3.6.6")
13634 (source
13635 (origin
13636 (method url-fetch)
13637 (uri (pypi-uri "typing" version))
13638 (sha256
13639 (base32
13640 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13641 (build-system python-build-system)
13642 (home-page "https://docs.python.org/3/library/typing.html")
13643 (synopsis "Type hints for Python")
13644 (description "This is a backport of the standard library @code{typing}
13645module to Python versions older than 3.5. Typing defines a standard notation
13646for Python function and variable type annotations. The notation can be used
13647for documenting code in a concise, standard format, and it has been designed
13648to also be used by static and runtime type checkers, static analyzers, IDEs
13649and other tools.")
13650 (license license:psfl)))
13651
13652(define-public python2-typing
13653 (package-with-python2 python-typing))
13654
f89d443b
VC
13655(define-public python-typing-extensions
13656 (package
13657 (name "python-typing-extensions")
13658 (version "3.7.2")
13659 (source
13660 (origin
13661 (method url-fetch)
13662 (uri (pypi-uri "typing_extensions" version))
13663 (sha256
13664 (base32
13665 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13666 (build-system python-build-system)
13667 (home-page
13668 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13669 (synopsis "Experimental type hints for Python")
13670 (description
13671 "The typing_extensions module contains additional @code{typing} hints not
13672yet present in the of the @code{typing} standard library.
13673Included are implementations of:
13674@enumerate
13675@item ClassVar
13676@item ContextManager
13677@item Counter
13678@item DefaultDict
13679@item Deque
13680@item NewType
13681@item NoReturn
13682@item overload
13683@item Protocol
13684@item runtime
13685@item Text
13686@item Type
13687@item TYPE_CHECKING
13688@item AsyncGenerator
13689@end enumerate\n")
13690 (license license:psfl)))
13691
44d10b1f
RW
13692(define-public bpython
13693 (package
13694 (name "bpython")
13695 (version "0.17.1")
13696 (source
13697 (origin
13698 (method url-fetch)
13699 (uri (pypi-uri "bpython" version))
13700 (sha256
13701 (base32
13702 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13703 (build-system python-build-system)
13704 (arguments
13705 `(#:phases
13706 (modify-phases %standard-phases
13707 (add-after 'unpack 'remove-failing-test
13708 (lambda _
13709 ;; Remove failing test. FIXME: make it pass
13710 (delete-file "bpython/test/test_args.py")
13711 #t))
13712 (add-after 'wrap 'add-aliases
13713 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13714 (lambda* (#:key outputs #:allow-other-keys)
13715 (let ((out (assoc-ref outputs "out")))
13716 (for-each
13717 (lambda (old new)
13718 (symlink old (string-append out "/bin/" new)))
13719 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13720 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13721 #t)))))
13722 (propagated-inputs
13723 `(("python-pygments" ,python-pygments)
13724 ("python-requests" ,python-requests)
13725 ("python-babel" ,python-babel) ; optional, for internationalization
13726 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13727 ("python-greenlet" ,python-greenlet)
13728 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13729 ("python-six" ,python-six)))
13730 (native-inputs
13731 `(("python-sphinx" ,python-sphinx)
13732 ("python-mock" ,python-mock)))
13733 (home-page "https://bpython-interpreter.org/")
13734 (synopsis "Fancy interface to the Python interpreter")
13735 (description "Bpython is a fancy interface to the Python
13736interpreter. bpython's main features are
13737
13738@enumerate
13739@item in-line syntax highlighting,
13740@item readline-like autocomplete with suggestions displayed as you type,
13741@item expected parameter list for any Python function,
13742@item \"rewind\" function to pop the last line of code from memory and
13743 re-evaluate,
13744@item send the code you've entered off to a pastebin,
13745@item save the code you've entered to a file, and
13746@item auto-indentation.
13747@end enumerate")
13748 (license license:expat)))
13749
13750(define-public bpython2
13751 (let ((base (package-with-python2
13752 (strip-python2-variant bpython))))
13753 (package (inherit base)
13754 (name "bpython2")
13755 (arguments
13756 `(#:python ,python-2
13757 #:phases
13758 (modify-phases %standard-phases
13759 (add-after 'unpack 'remove-failing-test
13760 (lambda _
13761 ;; Remove failing test. FIXME: make it pass
13762 (delete-file "bpython/test/test_args.py")
13763 ;; Disable failing test-cases (renaming inhibits they are
13764 ;; discovered)
13765 (substitute* "bpython/test/test_curtsies_repl.py"
13766 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13767 (string-append a "xxx_off_" b))
13768 (("^(\\s*def )(test_complex\\W)" _ a b)
13769 (string-append a "xxx_off_" b)))
13770 #t))
13771 (add-before 'build 'rename-scripts
13772 ;; rename the scripts to bypthon2, bpdb2, etc.
13773 (lambda _
13774 (substitute* "setup.py"
13775 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13776 (string-append name "2" rest "\n"))
13777 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13778 (string-append name "2" (or sub "") rest "\n")))
13779 #t))))))))
13780
13781(define-public python-pyinotify
13782 (package
13783 (name "python-pyinotify")
13784 (version "0.9.6")
13785 (source (origin
13786 (method url-fetch)
13787 (uri (pypi-uri "pyinotify" version))
13788 (sha256
13789 (base32
13790 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13791 (build-system python-build-system)
13792 (arguments `(#:tests? #f)) ;no tests
13793 (home-page "https://github.com/seb-m/pyinotify")
13794 (synopsis "Python library for monitoring inotify events")
13795 (description
13796 "@code{pyinotify} provides a Python interface for monitoring
13797file system events on Linux.")
13798 (license license:expat)))
13799
13800(define-public python2-pyinotify
13801 (package-with-python2 python-pyinotify))
13802
13803;; Ada parser uses this version.
13804(define-public python2-quex-0.67.3
13805 (package
13806 (name "python2-quex")
13807 (version "0.67.3")
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13812 (version-major+minor version)
13813 "/quex-" version ".zip"))
13814 (sha256
13815 (base32
13816 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13817 (build-system python-build-system)
13818 (native-inputs
13819 `(("unzip" ,unzip)))
13820 (arguments
13821 `(#:python ,python-2
13822 #:tests? #f
13823 #:phases
13824 (modify-phases %standard-phases
13825 (delete 'configure)
13826 (delete 'build)
13827 (replace 'install
13828 (lambda* (#:key outputs #:allow-other-keys)
13829 (let* ((out (assoc-ref outputs "out"))
13830 (share/quex (string-append out "/share/quex"))
13831 (bin (string-append out "/bin")))
13832 (copy-recursively "." share/quex)
13833 (mkdir-p bin)
13834 (symlink (string-append share/quex "/quex-exe.py")
13835 (string-append bin "/quex"))
13836 #t))))))
13837 (native-search-paths
13838 (list (search-path-specification
13839 (variable "QUEX_PATH")
13840 (files '("share/quex")))))
13841 (home-page "http://quex.sourceforge.net/")
13842 (synopsis "Lexical analyzer generator in Python")
13843 (description "@code{quex} is a lexical analyzer generator in Python.")
13844 (license license:lgpl2.1+))) ; Non-military
13845
13846(define-public python2-quex
13847 (package (inherit python2-quex-0.67.3)
13848 (name "python2-quex")
13849 (version "0.68.1")
13850 (source
13851 (origin
13852 (method url-fetch)
13853 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13854 (sha256
13855 (base32
13856 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13857 (file-name (string-append name "-" version ".tar.gz"))))))
13858
13859(define-public python-more-itertools
13860 (package
13861 (name "python-more-itertools")
13862 (version "4.3.0")
13863 (source
13864 (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "more-itertools" version))
13867 (sha256
13868 (base32
13869 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13870 (build-system python-build-system)
13871 (arguments
13872 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13873 (%current-target-system)))
13874 '("armhf" "i686"))
13875 '(#:phases
13876 (modify-phases %standard-phases
13877 ;; This is required for 32-bit hardware.
13878 ;; TODO: Try to remove this when upgrading.
13879 (add-after 'unpack 'patch-test
13880 (lambda _
13881 (substitute* "more_itertools/tests/test_more.py"
13882 (("10 \\*\\* 10") "9 ** 9"))
13883 #t))))
13884 '())))
13885 (propagated-inputs
13886 `(("python-six" ,python-six-bootstrap)))
13887 (home-page "https://github.com/erikrose/more-itertools")
13888 (synopsis "More routines for operating on iterables, beyond itertools")
13889 (description "Python's built-in @code{itertools} module implements a
13890number of iterator building blocks inspired by constructs from APL, Haskell,
13891and SML. @code{more-itertools} includes additional building blocks for
13892working with iterables.")
13893 (license license:expat)))
13894
13895(define-public python2-more-itertools
13896 (package-with-python2 python-more-itertools))
13897
13898(define-public python-latexcodec
13899 (package
13900 (name "python-latexcodec")
13901 (version "1.0.5")
13902 (source
13903 (origin
13904 (method url-fetch)
13905 (uri (pypi-uri "latexcodec" version))
13906 (sha256
13907 (base32
13908 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13909 (build-system python-build-system)
13910 (inputs
13911 `(("python-six" ,python-six)))
13912 (home-page "https://readthedocs.org/projects/latexcodec/")
13913 (synopsis "Work with LaTeX code in Python")
13914 (description "Lexer and codec to work with LaTeX code in Python.")
13915 (license license:expat)))
13916
13917(define-public python-pybtex
13918 (package
13919 (name "python-pybtex")
13920 (version "0.21")
13921 (source
13922 (origin
13923 (method url-fetch)
13924 (uri (pypi-uri "pybtex" version))
13925 (sha256
13926 (base32
13927 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13928 (build-system python-build-system)
13929 (native-inputs
13930 `(("python-nose" ,python-nose)))
13931 (inputs
13932 `(("python-latexcodec" ,python-latexcodec)
13933 ("python-pyyaml" ,python-pyyaml)
13934 ("python-six" ,python-six)))
13935 (arguments
13936 `(#:test-target "nosetests"))
13937 (home-page "https://pybtex.org/")
13938 (synopsis "BibTeX-compatible bibliography processor")
13939 (description "Pybtex is a BibTeX-compatible bibliography processor written
13940in Python. You can simply type pybtex instead of bibtex.")
13941 (license license:expat)))
13942
13943(define-public python-onetimepass
13944 (package
13945 (name "python-onetimepass")
13946 (version "1.0.1")
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "onetimepass" version))
13951 (sha256
13952 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13953 (build-system python-build-system)
13954 (propagated-inputs `(("python-six" ,python-six)))
13955 (home-page "https://github.com/tadeck/onetimepass/")
13956 (synopsis "One-time password library")
13957 (description "Python one-time password library for HMAC-based (HOTP) and
13958time-based (TOTP) passwords.")
13959 (license license:expat)))
13960
13961(define-public python-parso
13962 (package
13963 (name "python-parso")
13964 (version "0.3.1")
13965 (source
13966 (origin
13967 (method url-fetch)
13968 (uri (pypi-uri "parso" version))
13969 (sha256
13970 (base32
13971 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13972 (native-inputs
13973 `(("python-pytest" ,python-pytest)))
13974 (build-system python-build-system)
13975 (home-page "https://github.com/davidhalter/parso")
13976 (synopsis "Python Parser")
13977 (description "Parso is a Python parser that supports error recovery and
13978round-trip parsing for different Python versions (in multiple Python versions).
13979Parso is also able to list multiple syntax errors in your Python file.")
13980 (license license:expat)))
13981
13982(define-public python2-parso
13983 (package-with-python2 python-parso))
13984
13985(define-public python-async-generator
13986 (package
13987 (name "python-async-generator")
94fcbf8d 13988 (version "1.10")
44d10b1f
RW
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "async_generator" version))
13993 (sha256
13994 (base32
94fcbf8d 13995 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
13996 (build-system python-build-system)
13997 (native-inputs
13998 `(("python-pytest" ,python-pytest)))
13999 (home-page "https://github.com/python-trio/async_generator")
14000 (synopsis "Async generators and context managers for Python 3.5+")
14001 (description "@code{async_generator} back-ports Python 3.6's native async
14002generators and Python 3.7's context managers into Python 3.5.")
14003 ;; Dual licensed.
14004 (license (list license:expat license:asl2.0))))
14005
14006(define-public python-async-timeout
14007 (package
14008 (name "python-async-timeout")
14009 (version "3.0.1")
14010 (source
14011 (origin
14012 (method url-fetch)
14013 (uri (pypi-uri "async-timeout" version))
14014 (sha256
14015 (base32
14016 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14017 (build-system python-build-system)
14018 (home-page "https://github.com/aio-libs/async_timeout/")
14019 (synopsis "Timeout context manager for asyncio programs")
14020 (description "@code{async-timeout} provides a timeout timeout context
14021manager compatible with @code{asyncio}.")
14022 (license license:asl2.0)))
14023
14024(define-public python-glob2
14025 (package
14026 (name "python-glob2")
14027 (version "0.6")
14028 (source (origin
14029 (method url-fetch)
14030 (uri (string-append
14031 "https://github.com/miracle2k/python-glob2/archive/"
14032 version
14033 ".tar.gz"))
14034 (sha256
14035 (base32
14036 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14037 (file-name (string-append name "-" version ".tar.gz"))))
14038 (build-system python-build-system)
14039 (home-page "https://github.com/miracle2k/python-glob2/")
14040 (synopsis "Extended Version of the python buildin glob module")
14041 (description "This is an extended version of the Python
14042@url{http://docs.python.org/library/glob.html, built-in glob module} which
14043adds:
14044
14045@itemize
14046@item The ability to capture the text matched by glob patterns, and return
14047those matches alongside the file names.
14048@item A recursive @code{**} globbing syntax, akin for example to the
14049@code{globstar} option of Bash.
14050@item The ability to replace the file system functions used, in order to glob
14051on virtual file systems.
14052@item Compatible with Python 2 and Python 3 (tested with 3.3).
14053@end itemize
14054
14055Glob2 currently based on the glob code from Python 3.3.1.")
14056 (license license:bsd-2)))
14057
14058(define-public python2-glob2
14059 (package-with-python2 python-glob2))
14060
14061(define-public python-gipc
14062 (package
14063 (name "python-gipc")
14064 (version "0.6.0")
14065 (source
14066 (origin
14067 (method url-fetch)
14068 (uri (pypi-uri "gipc" version ".zip"))
14069 (sha256
14070 (base32
14071 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14072 (build-system python-build-system)
14073 (native-inputs
14074 `(("unzip" ,unzip)))
14075 (propagated-inputs
14076 `(("python-gevent" ,python-gevent)))
14077 (home-page "http://gehrcke.de/gipc")
14078 (synopsis "Child process management in the context of gevent")
14079 (description "Usage of Python's multiprocessing package in a
14080gevent-powered application may raise problems. With @code{gipc},
14081process-based child processes can safely be created anywhere within a
14082gevent-powered application.")
14083 (license license:expat)))
14084
14085(define-public python2-gipc
14086 (package-with-python2 python-gipc))
14087
14088(define-public python-fusepy
14089 (package
14090 (name "python-fusepy")
14091 (version "2.0.4")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "fusepy" version))
14096 (sha256
14097 (base32
14098 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14099 (build-system python-build-system)
14100 (arguments
14101 `(#:phases
14102 (modify-phases %standard-phases
14103 (add-before 'build 'set-library-file-name
14104 (lambda* (#:key inputs #:allow-other-keys)
14105 (let ((fuse (assoc-ref inputs "fuse")))
14106 (substitute* "fuse.py"
14107 (("find_library\\('fuse'\\)")
14108 (string-append "'" fuse "/lib/libfuse.so'")))
14109 #t))))))
14110 (propagated-inputs
14111 `(("fuse" ,fuse)))
14112 (home-page "https://github.com/fusepy/fusepy")
14113 (synopsis "Simple ctypes bindings for FUSE")
14114 (description "Python module that provides a simple interface to FUSE and
14115MacFUSE. The binding is created using the standard @code{ctypes} library.")
14116 (license license:isc)))
14117
14118(define-public python2-fusepy
14119 (package-with-python2 python-fusepy))
14120
14121(define-public python2-gdrivefs
14122 (package
14123 (name "python2-gdrivefs")
14124 (version "0.14.9")
14125 (source
14126 (origin
14127 (method url-fetch)
14128 (uri (pypi-uri "gdrivefs" version))
14129 (sha256
14130 (base32
14131 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14132 (build-system python-build-system)
14133 (arguments
14134 `(#:python ,python-2
14135 #:phases
14136 (modify-phases %standard-phases
14137 (add-before 'build 'patch-setup-py
14138 (lambda _
14139 ;; Update requirements from dependency==version
14140 ;; to dependency>=version
14141 (substitute* "gdrivefs/resources/requirements.txt"
14142 (("==") ">="))
14143 #t)))))
14144 (native-inputs
14145 `(("python2-gipc" ,python2-gipc)
14146 ("python2-gevent" ,python2-gevent)
14147 ("python2-greenlet" ,python2-greenlet)
14148 ("python2-httplib2" ,python2-httplib2)
14149 ("python2-uritemplate" ,python2-uritemplate)
14150 ("python2-oauth2client" ,python2-oauth2client)
14151 ("python2-six" ,python2-six)))
14152 (propagated-inputs
14153 `(("python2-dateutil" ,python2-dateutil)
14154 ("python2-fusepy" ,python2-fusepy)
14155 ("python2-google-api-client" ,python2-google-api-client)))
14156 (home-page "https://github.com/dsoprea/GDriveFS")
14157 (synopsis "Mount Google Drive as a local file system")
14158 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14159under Python 2.7.")
14160 (license license:gpl2)))
14161
14162(define-public pybind11
14163 (package
14164 (name "pybind11")
14165 (version "2.2.4")
14166 (source (origin
14167 (method git-fetch)
14168 (uri (git-reference
14169 (url "https://github.com/pybind/pybind11.git")
14170 (commit (string-append "v" version))))
14171 (sha256
14172 (base32
14173 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14174 (file-name (git-file-name name version))))
14175 (build-system cmake-build-system)
14176 (native-inputs
14177 `(("python" ,python)
14178 ("python-pytest" ,python-pytest)))
14179 (arguments
14180 `(#:test-target "check"))
14181 (home-page "https://github.com/pybind/pybind11/")
14182 (synopsis "Seamless operability between C++11 and Python")
14183 (description "pybind11 is a lightweight header-only library that exposes
14184C++ types in Python and vice versa, mainly to create Python bindings of
14185existing C++ code. Its goals and syntax are similar to the excellent
14186Boost.Python library by David Abrahams: to minimize boilerplate code in
14187traditional extension modules by inferring type information using compile-time
14188introspection.")
14189 (license license:expat)))
14190
14191(define-public python-fasteners
14192 (package
14193 (name "python-fasteners")
14194 (version "0.14.1")
14195 (source
14196 (origin
14197 (method url-fetch)
14198 (uri (pypi-uri "fasteners" version))
14199 (sha256
14200 (base32
14201 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14202 (build-system python-build-system)
14203 (propagated-inputs
14204 `(("python-monotonic" ,python-monotonic)
14205 ("python-six" ,python-six)
14206 ("python-testtools" ,python-testtools)))
14207 (home-page "https://github.com/harlowja/fasteners")
14208 (synopsis "Python package that provides useful locks")
14209 (description
14210 "This package provides a Python program that provides following locks:
14211
14212@itemize
14213@item Locking decorator
14214@item Reader-writer locks
14215@item Inter-process locks
14216@item Generic helpers
14217@end itemize\n")
14218 (properties `((python2-variant . ,(delay python2-fasteners))))
14219 (license license:asl2.0)))
14220
14221(define-public python2-fasteners
14222 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14223 (package
14224 (inherit base)
14225 (propagated-inputs
14226 `(("python2-futures" ,python2-futures)
14227 ,@(package-propagated-inputs base))))))
14228
14229(define-public python-requests-file
14230 (package
14231 (name "python-requests-file")
14232 (version "1.4.3")
14233 (source
14234 (origin
14235 (method url-fetch)
14236 (uri (pypi-uri "requests-file" version))
14237 (sha256
14238 (base32
14239 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14240 (build-system python-build-system)
14241 (propagated-inputs
14242 `(("python-requests" ,python-requests)
14243 ("python-six" ,python-six)))
14244 (home-page
14245 "https://github.com/dashea/requests-file")
14246 (synopsis "File transport adapter for Requests")
14247 (description
14248 "Requests-File is a transport adapter for use with the Requests Python
14249library to allow local filesystem access via file:// URLs.")
14250 (license license:asl2.0)))
14251
14252(define-public python2-requests-file
14253 (package-with-python2 python-requests-file))
14254
14255(define-public python-tldextract
14256 (package
14257 (name "python-tldextract")
14258 (version "2.2.0")
14259 (source
14260 (origin
14261 (method url-fetch)
14262 (uri (pypi-uri "tldextract" version))
14263 (sha256
14264 (base32
14265 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14266 (build-system python-build-system)
14267 (native-inputs
14268 `(("python-pytest" ,python-pytest)
14269 ("python-responses" ,python-responses)))
14270 (propagated-inputs
14271 `(("python-idna" ,python-idna)
14272 ("python-requests" ,python-requests)
14273 ("python-requests-file" ,python-requests-file)))
14274 (home-page
14275 "https://github.com/john-kurkowski/tldextract")
14276 (synopsis
14277 "Separate the TLD from the registered domain and subdomains of a URL")
14278 (description
14279 "TLDExtract accurately separates the TLD from the registered domain and
14280subdomains of a URL, using the Public Suffix List. By default, this includes
14281the public ICANN TLDs and their exceptions. It can optionally support the
14282Public Suffix List's private domains as well.")
14283 (license license:bsd-3)))
14284
14285(define-public python2-tldextract
14286 (package-with-python2 python-tldextract))
14287
14288(define-public python-pynamecheap
14289 (package
14290 (name "python-pynamecheap")
14291 (version "0.0.3")
14292 (source
14293 (origin
14294 (method url-fetch)
14295 (uri (pypi-uri "PyNamecheap" version))
14296 (sha256
14297 (base32
14298 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14299 (build-system python-build-system)
14300 (propagated-inputs
14301 `(("python-requests" ,python-requests)))
14302 (home-page
14303 "https://github.com/Bemmu/PyNamecheap")
14304 (synopsis
14305 "Namecheap API client in Python")
14306 (description
14307 "PyNamecheap is a Namecheap API client in Python.")
14308 (license license:expat)))
14309
14310(define-public python2-pynamecheap
14311 (package-with-python2 python-pynamecheap))
14312
14313(define-public python-dns-lexicon
14314 (package
14315 (name "python-dns-lexicon")
14316 (version "2.4.0")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "dns-lexicon" version))
14321 (sha256
14322 (base32
14323 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:tests? #f)) ;requires internet access
14327 (propagated-inputs
14328 `(("python-future" ,python-future)
14329 ("python-pynamecheap" ,python-pynamecheap)
14330 ("python-requests" ,python-requests)
14331 ("python-tldextract" ,python-tldextract)
14332 ("python-urllib3" ,python-urllib3)))
14333 (home-page "https://github.com/AnalogJ/lexicon")
14334 (synopsis
14335 "Manipulate DNS records on various DNS providers")
14336 (description
14337 "Lexicon provides a way to manipulate DNS records on multiple DNS
14338providers in a standardized way. It has a CLI but it can also be used as a
14339Python library. It was designed to be used in automation, specifically with
14340Let's Encrypt.")
14341 (license license:expat)))
14342
14343(define-public python2-dns-lexicon
14344 (package-with-python2 python-dns-lexicon))
14345
14346(define-public python-commandlines
14347 (package
14348 (name "python-commandlines")
14349 (version "0.4.1")
14350 (source
14351 (origin
14352 (method url-fetch)
14353 (uri (pypi-uri "commandlines" version))
14354 (sha256
14355 (base32
14356 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14357 (build-system python-build-system)
14358 (home-page "https://github.com/chrissimpkins/commandlines")
14359 (synopsis "Command line argument to object parsing library")
14360 (description
14361 "@code{Commandlines} is a Python library for command line application
14362development that supports command line argument parsing, command string
14363validation testing and application logic.")
14364 (license license:expat)))
14365
14366;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14367;; python-numba. They have a very unflexible relationship.
14368(define-public python-numba
14369 (package
14370 (name "python-numba")
14371 (version "0.39.0")
14372 (source
14373 (origin
14374 (method url-fetch)
14375 (uri (pypi-uri "numba" version))
14376 (sha256
14377 (base32
14378 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14379 (build-system python-build-system)
14380 (arguments
14381 `(#:modules ((guix build utils)
14382 (guix build python-build-system)
14383 (ice-9 ftw)
14384 (srfi srfi-1)
14385 (srfi srfi-26))
14386 #:phases
14387 (modify-phases %standard-phases
14388 (add-after 'unpack 'disable-proprietary-features
14389 (lambda _
14390 (setenv "NUMBA_DISABLE_HSA" "1")
14391 (setenv "NUMBA_DISABLE_CUDA" "1")
14392 #t))
14393 (add-after 'unpack 'remove-failing-tests
14394 (lambda _
14395 ;; FIXME: these tests fail for unknown reasons:
14396 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14397 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14398 (substitute* "numba/tests/test_dispatcher.py"
14399 (("def test(_non_writable_pycache)" _ m)
14400 (string-append "def guix_skip" m))
14401 (("def test(_non_creatable_pycache)" _ m)
14402 (string-append "def guix_skip" m))
14403 (("def test(_frozen)" _ m)
14404 (string-append "def guix_skip" m)))
14405
14406 ;; These tests fail because we don't run the tests from the build
14407 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14408 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14409 (substitute* "numba/tests/test_pycc.py"
14410 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14411 (string-append "def guix_skip" m)))
14412 #t))
14413 (replace 'check
14414 (lambda _
14415 (let ((cwd (getcwd)))
14416 (setenv "PYTHONPATH"
14417 (string-append cwd "/build/"
14418 (find (cut string-prefix? "lib" <>)
14419 (scandir (string-append cwd "/build")))
14420 ":"
14421 (getenv "PYTHONPATH")))
14422 ;; Something is wrong with the PYTHONPATH when running the
14423 ;; tests from the build directory, as it complains about not being
14424 ;; able to import certain modules.
14425 (with-directory-excursion "/tmp"
14426 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14427 #t)))))
14428 (propagated-inputs
14429 `(("python-llvmlite" ,python-llvmlite)
14430 ("python-numpy" ,python-numpy)
14431 ("python-singledispatch" ,python-singledispatch)))
14432 ;; Needed for tests.
14433 (inputs
14434 `(("python-jinja2" ,python-jinja2)
14435 ("python-pygments" ,python-pygments)))
14436 (home-page "https://numba.pydata.org")
14437 (synopsis "Compile Python code using LLVM")
14438 (description "Numba gives you the power to speed up your applications with
14439high performance functions written directly in Python. With a few
14440annotations, array-oriented and math-heavy Python code can be just-in-time
14441compiled to native machine instructions, similar in performance to C, C++ and
14442Fortran, without having to switch languages or Python interpreters.
14443
14444Numba works by generating optimized machine code using the LLVM compiler
14445infrastructure at import time, runtime, or statically (using the included pycc
14446tool).")
14447 (license license:bsd-3)))
14448
14449(define-public python-anndata
14450 (package
14451 (name "python-anndata")
14452 (version "0.6.9")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "anndata" version))
14457 (sha256
14458 (base32
14459 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14460 (build-system python-build-system)
14461 (propagated-inputs
14462 `(("python-h5py" ,python-h5py)
14463 ("python-natsort" ,python-natsort)
14464 ("python-pandas" ,python-pandas)
14465 ("python-scipy" ,python-scipy)))
14466 (home-page "https://github.com/theislab/anndata")
14467 (synopsis "Annotated data for data analysis pipelines")
14468 (description "Anndata is a package for simple (functional) high-level APIs
14469for data analysis pipelines. In this context, it provides an efficient,
14470scalable way of keeping track of data together with learned annotations and
14471reduces the code overhead typically encountered when using a mostly
14472object-oriented library such as @code{scikit-learn}.")
14473 (license license:bsd-3)))
14474
14475(define-public python-dill
14476 (package
14477 (name "python-dill")
14478 (version "0.2.8.2")
14479 (source
14480 (origin
14481 (method url-fetch)
14482 (uri (pypi-uri "dill" version))
14483 (sha256
14484 (base32
14485 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14486 (build-system python-build-system)
14487 ;; FIXME: The check phase fails with "don't know how to make test".
14488 (arguments '(#:tests? #f))
14489 (home-page "https://pypi.org/project/dill")
14490 (synopsis "Serialize all of Python")
14491 (description "Dill extends Python's @code{pickle} module for serializing
14492and de-serializing Python objects to the majority of the built-in Python
14493types. Dill provides the user the same interface as the @code{pickle} module,
14494and also includes some additional features. In addition to pickling Python
14495objects, @code{dill} provides the ability to save the state of an interpreter
14496session in a single command. Hence, it would be feasable to save a
14497interpreter session, close the interpreter, ship the pickled file to another
14498computer, open a new interpreter, unpickle the session and thus continue from
14499the saved state of the original interpreter session.")
14500 (license license:bsd-3)))
14501
14502(define-public python-multiprocess
14503 (package
14504 (name "python-multiprocess")
14505 (version "0.70.6.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "multiprocess" version))
14510 (sha256
14511 (base32
14512 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14513 (build-system python-build-system)
14514 (propagated-inputs
14515 `(("python-dill" ,python-dill)))
14516 (home-page "https://pypi.org/project/multiprocess")
14517 (synopsis "Multiprocessing and multithreading in Python")
14518 (description
14519 "This package is a fork of the multiprocessing Python package, a package
14520which supports the spawning of processes using the API of the standard
14521library's @code{threading} module.")
14522 (license license:bsd-3)))
14523
14524(define-public python-toolz
14525 (package
14526 (name "python-toolz")
14527 (version "0.9.0")
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "toolz" version))
14532 (sha256
14533 (base32
14534 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14535 (build-system python-build-system)
14536 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14537 ;; unregistered loader type"
14538 (arguments '(#:tests? #f))
14539 (home-page "https://github.com/pytoolz/toolz/")
14540 (synopsis "List processing tools and functional utilities")
14541 (description
14542 "This package provides a set of utility functions for iterators,
14543functions, and dictionaries.")
14544 (license license:bsd-3)))
14545
14546(define-public python2-toolz
14547 (package-with-python2 python-toolz))
14548
14549(define-public python-cytoolz
14550 (package
14551 (name "python-cytoolz")
14552 (version "0.9.0.1")
14553 (source
14554 (origin
14555 (method url-fetch)
14556 (uri (pypi-uri "cytoolz" version))
14557 (sha256
14558 (base32
14559 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14560 (build-system python-build-system)
14561 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14562 ;; 'exceptions'"
14563 (arguments '(#:tests? #f))
14564 (propagated-inputs
14565 `(("python-toolz" ,python-toolz)))
14566 (native-inputs
14567 `(("python-cython" ,python-cython)))
14568 (home-page "https://github.com/pytoolz/cytoolz")
14569 (synopsis "High performance functional utilities")
14570 (description
14571 "The cytoolz package implements the same API as provided by toolz. The
14572main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14573that is accessible to other projects developed in Cython.")
14574 (license license:bsd-3)))
14575
14576(define-public python-sortedcontainers
14577 (package
14578 (name "python-sortedcontainers")
14579 (version "2.0.4")
14580 (source
14581 (origin
14582 (method url-fetch)
14583 (uri (pypi-uri "sortedcontainers" version))
14584 (sha256
14585 (base32
14586 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14587 (build-system python-build-system)
14588 (native-inputs
14589 `(("python-tox" ,python-tox)))
14590 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14591 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14592 (description
14593 "This package provides a sorted collections library, written in
14594pure-Python.")
14595 (license license:asl2.0)))
14596
14597(define-public python-cloudpickle
14598 (package
14599 (name "python-cloudpickle")
14600 (version "0.6.1")
14601 (source
14602 (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "cloudpickle" version))
14605 (sha256
14606 (base32
14607 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14608 (build-system python-build-system)
14609 ;; FIXME: there are 5 errors in 122 tests:
14610 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14611 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14612 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14613 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14614 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14615 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14616 (arguments '(#:tests? #f))
14617 (native-inputs
14618 `(("python-pytest" ,python-pytest)
14619 ("python-mock" ,python-mock)
14620 ("python-tornado" ,python-tornado)))
14621 (home-page "https://github.com/cloudpipe/cloudpickle")
14622 (synopsis "Extended pickling support for Python objects")
14623 (description
14624 "Cloudpickle makes it possible to serialize Python constructs not
14625supported by the default pickle module from the Python standard library. It
14626is especially useful for cluster computing where Python expressions are
14627shipped over the network to execute on remote hosts, possibly close to the
14628data.")
14629 (license license:bsd-3)))
14630
14631(define-public python2-cloudpickle
14632 (package-with-python2 python-cloudpickle))
14633
14634(define-public python-locket
14635 (package
14636 (name "python-locket")
14637 (version "0.2.0")
14638 (source
14639 (origin
14640 (method url-fetch)
14641 (uri (pypi-uri "locket" version))
14642 (sha256
14643 (base32
14644 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14645 (build-system python-build-system)
14646 (home-page "https://github.com/mwilliamson/locket.py")
14647 (synopsis "File-based locks for Python")
14648 (description
14649 "Locket implements a lock that can be used by multiple processes provided
14650they use the same path.")
14651 (license license:bsd-2)))
14652
14653(define-public python2-locket
14654 (package-with-python2 python-locket))
14655
14656(define-public python-blosc
14657 (package
14658 (name "python-blosc")
14659 (version "1.5.1")
14660 (source
14661 (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "blosc" version))
14664 (sha256
14665 (base32
14666 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14667 (build-system python-build-system)
14668 ;; FIXME: all tests pass, but then this error is printed:
14669 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14670 (arguments '(#:tests? #f))
14671 (propagated-inputs
14672 `(("python-numpy" ,python-numpy)))
14673 (home-page "https://github.com/blosc/python-blosc")
14674 (synopsis "Python wrapper for the Blosc data compressor library")
14675 (description "Blosc is a high performance compressor optimized for binary
14676data. It has been designed to transmit data to the processor cache faster
14677than the traditional, non-compressed, direct memory fetch approach via a
14678@code{memcpy()} system call.
14679
14680Blosc works well for compressing numerical arrays that contains data with
14681relatively low entropy, like sparse data, time series, grids with
14682regular-spaced values, etc.
14683
14684This Python package wraps the Blosc library.")
14685 (license license:bsd-3)))
14686
14687(define-public python2-blosc
14688 (package-with-python2 python-blosc))
14689
14690(define-public python-partd
14691 (package
14692 (name "python-partd")
14693 (version "0.3.9")
14694 (source
14695 (origin
14696 (method url-fetch)
14697 (uri (pypi-uri "partd" version))
14698 (sha256
14699 (base32
14700 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14701 (build-system python-build-system)
14702 (propagated-inputs
14703 `(("python-blosc" ,python-blosc)
14704 ("python-locket" ,python-locket)
14705 ("python-numpy" ,python-numpy)
14706 ("python-pandas" ,python-pandas)
14707 ("python-pyzmq" ,python-pyzmq)
14708 ("python-toolz" ,python-toolz)))
14709 (home-page "https://github.com/dask/partd/")
14710 (synopsis "Appendable key-value storage")
14711 (description "Partd stores key-value pairs. Values are raw bytes. We
14712append on old values. Partd excels at shuffling operations.")
14713 (license license:bsd-3)))
14714
14715(define-public python2-partd
14716 (package-with-python2 python-partd))
14717
14718(define-public python-dask
14719 (package
14720 (name "python-dask")
5a222eba 14721 (version "1.1.3")
44d10b1f
RW
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "dask" version))
14726 (sha256
14727 (base32
5a222eba 14728 "03ykmq46q2hh7mn68vcxkgylybjaj3r0kfspaiymdmqmjzpjivr5"))))
44d10b1f
RW
14729 (build-system python-build-system)
14730 ;; A single test out of 5000+ fails. This test is marked as xfail when
14731 ;; pytest-xdist is used.
14732 (arguments
14733 `(#:phases
14734 (modify-phases %standard-phases
14735 (add-after 'unpack 'disable-broken-test
14736 (lambda _
14737 (substitute* "dask/tests/test_threaded.py"
14738 (("def test_interrupt\\(\\)" m)
14739 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14740 m)))
14741 (when (which "python2")
14742 ;; This test fails with recent Pandas:
14743 ;; <https://github.com/dask/dask/issues/3794>.
14744 (substitute* "dask/dataframe/tests/test_dataframe.py"
14745 (("def test_info\\(\\)" m)
14746 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14747 m))))
14748 #t))
14749 (replace 'check
14750 (lambda _ (invoke "pytest" "-vv"))))))
14751 (propagated-inputs
14752 `(("python-cloudpickle" ,python-cloudpickle)
14753 ("python-numpy" ,python-numpy)
14754 ("python-pandas" ,python-pandas)
14755 ("python-partd" ,python-partd)
14756 ("python-toolz" ,python-toolz)
14757 ("python-pyyaml" ,python-pyyaml)))
14758 (native-inputs
14759 `(("python-pytest" ,python-pytest)
14760 ("python-pytest-runner" ,python-pytest-runner)))
14761 (home-page "https://github.com/dask/dask/")
14762 (synopsis "Parallel computing with task scheduling")
14763 (description
14764 "Dask is a flexible parallel computing library for analytics. It
14765consists of two components: dynamic task scheduling optimized for computation,
14766and large data collections like parallel arrays, dataframes, and lists that
14767extend common interfaces like NumPy, Pandas, or Python iterators to
14768larger-than-memory or distributed environments. These parallel collections
14769run on top of the dynamic task schedulers. ")
14770 (license license:bsd-3)))
14771
14772(define-public python2-dask
14773 (package-with-python2 python-dask))
14774
14775(define-public python-ilinkedlist
14776 (package
14777 (name "python-ilinkedlist")
14778 (version "0.4.0")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "ilinkedlist" version))
14783 (sha256
14784 (base32
14785 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14786 (build-system python-build-system)
14787 (native-inputs `(("python-pytest" ,python-pytest)))
14788 (inputs `(("python" ,python)))
14789 (home-page "https://github.com/luther9/ilinkedlist-py")
14790 (synopsis "Immutable linked list library")
14791 (description
14792 "This is a implementation of immutable linked lists for Python. It
14793contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14794Since a linked list is treated as immutable, it is hashable, and its length
14795can be retrieved in constant time. Some of the terminology is inspired by
14796LISP. It is possible to create an improper list by creating a @code{Pair}
14797with a non-list @code{cdr}.")
14798 (license license:gpl3+)))
14799
14800(define-public python-readlike
14801 (package
14802 (name "python-readlike")
14803 (version "0.1.3")
14804 (source
14805 (origin
14806 (method url-fetch)
14807 (uri (pypi-uri "readlike" version))
14808 (sha256
14809 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14810 (build-system python-build-system)
14811 (home-page "https://github.com/jangler/readlike")
14812 (synopsis "GNU Readline-like line editing module")
14813 (description
14814 "This Python module provides line editing functions similar to the default
14815Emacs-style ones of GNU Readline. Unlike the Python standard library's
14816@code{readline} package, this one allows access to those capabilties in settings
14817outside of a standard command-line interface. It is especially well-suited to
14818interfacing with Urwid, due to a shared syntax for describing key inputs.
14819
14820Currently, all stateless Readline commands are implemented. Yanking and history
14821are not supported.")
14822 (license license:expat)))
14823
14824(define-public python2-readlike
14825 (package-with-python2 python-readlike))
14826
14827(define-public python-reparser
14828 (package
14829 (name "python-reparser")
14830 (version "1.4.3")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "ReParser" version))
14835 (sha256
14836 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14837 (build-system python-build-system)
14838 (home-page "https://github.com/xmikos/reparser")
14839 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14840 (description
14841 "This Python library provides a simple lexer/parser for inline markup based
14842on regular expressions.")
14843 (license license:expat)))
14844
14845(define-public python2-reparser
14846 (let ((reparser (package-with-python2
14847 (strip-python2-variant python-reparser))))
14848 (package (inherit reparser)
14849 (propagated-inputs
14850 `(("python2-enum34" ,python2-enum34)
14851 ,@(package-propagated-inputs reparser))))))
14852
14853(define-public python-precis-i18n
14854 (package
14855 (name "python-precis-i18n")
14856 (version "1.0.0")
14857 (source
14858 (origin
14859 (method url-fetch)
14860 (uri (pypi-uri "precis_i18n" version))
14861 (sha256
14862 (base32
14863 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14864 (build-system python-build-system)
14865 (home-page "https://github.com/byllyfish/precis_i18n")
14866 (synopsis "Implementation of the PRECIS framework")
14867 (description
14868 "This module implements the PRECIS Framework as described in RFC 8264,
14869RFC 8265 and RFC 8266.")
14870 (license license:expat)))
14871
d0446c4b
RW
14872(define-public python-absl-py
14873 (package
14874 (name "python-absl-py")
14875 (version "0.6.1")
14876 (source
14877 (origin
14878 (method url-fetch)
14879 (uri (pypi-uri "absl-py" version))
14880 (sha256
14881 (base32
14882 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14883 (build-system python-build-system)
14884 (propagated-inputs
14885 `(("python-six" ,python-six)))
14886 (home-page "https://github.com/abseil/abseil-py")
14887 (synopsis "Abseil Python common libraries")
14888 (description
14889 "This package provides the Abseil Python Common Libraries, a collection
14890of Python libraries for building Python applications.")
14891 (license license:asl2.0)))
14892
81bed4e9
RW
14893(define-public python-astor
14894 (package
14895 (name "python-astor")
14896 (version "0.7.1")
14897 (source
14898 (origin
14899 (method url-fetch)
14900 (uri (pypi-uri "astor" version))
14901 (sha256
14902 (base32
14903 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14904 (build-system python-build-system)
14905 ;; FIXME: There are two errors and two test failures.
14906 (arguments `(#:tests? #f))
14907 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14908 (synopsis "Read and write Python ASTs")
81bed4e9 14909 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14910source via the Abstract Syntax Tree.")
81bed4e9
RW
14911 (license license:bsd-3)))
14912
39ee82ff
RW
14913(define-public python2-astor
14914 (package-with-python2 python-astor))
14915
22e623ae
RW
14916(define-public python-grpcio
14917 (package
14918 (name "python-grpcio")
14919 (version "1.17.1")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "grpcio" version))
14924 (sha256
14925 (base32
14926 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14927 (build-system python-build-system)
14928 (propagated-inputs
14929 `(("python-six" ,python-six)))
14930 (home-page "https://grpc.io")
14931 (synopsis "HTTP/2-based RPC framework")
14932 (description "This package provides a Python library for communicating
14933with the HTTP/2-based RPC framework gRPC.")
14934 (license license:asl2.0)))
14935
79869f80
RW
14936(define-public python-astunparse
14937 (package
14938 (name "python-astunparse")
14939 (version "1.6.1")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "astunparse" version))
14944 (sha256
14945 (base32
14946 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14947 (build-system python-build-system)
14948 (arguments '(#:tests? #f)) ; there are none
14949 (propagated-inputs
14950 `(("python-six" ,python-six)
14951 ("python-wheel" ,python-wheel)))
14952 (home-page "https://github.com/simonpercivall/astunparse")
14953 (synopsis "AST unparser for Python")
14954 (description "This package provides an AST unparser for Python. It is a
14955factored out version of @code{unparse} found in the Python source
14956distribution.")
14957 (license license:bsd-3)))
14958
2884aac0
RW
14959(define-public python-gast
14960 (package
14961 (name "python-gast")
14962 (version "0.2.0")
14963 (source
14964 (origin
14965 (method url-fetch)
14966 (uri (pypi-uri "gast" version))
14967 (sha256
14968 (base32
14969 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14970 (build-system python-build-system)
14971 (propagated-inputs
14972 `(("python-astunparse" ,python-astunparse)))
14973 (home-page "https://pypi.org/project/gast/")
14974 (synopsis "Generic Python AST that abstracts the underlying Python version")
14975 (description
14976 "GAST provides a compatibility layer between the AST of various Python
14977versions, as produced by @code{ast.parse} from the standard @code{ast}
14978module.")
14979 (license license:bsd-3)))
14980
44d10b1f
RW
14981(define-public python-wikidata
14982 (package
14983 (name "python-wikidata")
14984 (version "0.6.1")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "Wikidata" version))
14989 (sha256
14990 (base32
14991 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14992 (build-system python-build-system)
14993 (propagated-inputs
14994 `(("python-babel" ,python-babel)))
14995 (home-page "https://github.com/dahlia/wikidata")
14996 (synopsis "Wikidata client library")
14997 (description
14998 "This package provides a Python interface to
14999@url{https://www.wikidata.org/, Wikidata}.")
15000 (properties '((upstream-name . "Wikidata")))
15001 (license license:gpl3+)))
15002
15003(define-public python-doctest-ignore-unicode
15004 (package
15005 (name "python-doctest-ignore-unicode")
15006 (version "0.1.2")
15007 (source
15008 (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "doctest-ignore-unicode" version))
15011 (sha256
15012 (base32
15013 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15014 (build-system python-build-system)
15015 (native-inputs
15016 `(("python-nose" ,python-nose)))
15017 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15018 (synopsis "Ignore Unicode literal prefixes in doctests")
15019 (description
15020 "This package adds support for a flag to ignore Unicode literal prefixes
15021in doctests.")
15022 (license license:asl2.0)))
15023
15024(define-public python-attr
15025 (package
15026 (name "python-attr")
15027 (version "0.3.1")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "attr" version))
15032 (sha256
15033 (base32
15034 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15035 (build-system python-build-system)
15036 (home-page "https://github.com/denis-ryzhkov/attr")
15037 (synopsis "Decorator for attributes of target function or class")
15038 (description "Simple decorator to set attributes of target function or
15039class in a @acronym{DRY, Don't Repeat Yourself} way.")
15040 (license license:expat)))
f98232a3
VC
15041
15042(define-public python-construct
15043 (package
15044 (name "python-construct")
15045 (version "2.9.45")
15046 (source
15047 (origin
15048 (method url-fetch)
15049 (uri (pypi-uri "construct" version))
15050 (sha256
15051 (base32
15052 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15053 (build-system python-build-system)
15054 (arguments
15055 `(#:tests? #f)) ; No tests exist.
15056 (propagated-inputs
15057 `(("python-extras" ,python-extras)
15058 ("python-arrow" ,python-arrow)
15059 ("python-numpy" ,python-numpy)
15060 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15061 (home-page "http://construct.readthedocs.io")
15062 (synopsis "Declarative and symmetrical parser and builder for binary data")
15063 (description
15064 "This package provides both simple, atomic constructs (such as
15065integers of various sizes), as well as composite ones which allow you
15066form hierarchical and sequential structures of increasing complexity.
15067It features bit and byte granularity, easy debugging and testing, an
15068easy-to-extend subclass system, and lots of primitive constructs to
15069make your work easier.")
15070 (license license:expat)))
b742c006
LF
15071
15072(define-public python-humanize
15073 (package
15074 (name "python-humanize")
15075 (version "0.5.1")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (pypi-uri "humanize" version))
15080 (sha256
15081 (base32
15082 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15083 (arguments
15084 '(#:tests? #f)) ; tests not in pypi archive
15085 (build-system python-build-system)
15086 (home-page "https://github.com/jmoiron/humanize")
15087 (synopsis "Print numerical information in a human-readable form")
15088 (description "This package provides a Python module that displays numbers
15089and dates in \"human readable\" forms. For example, it would display
15090\"12345591313\" as \"12.3 billion\".")
15091 (license license:expat)))
d5bbf66d
LF
15092
15093(define-public python-txaio
15094 (package
15095 (name "python-txaio")
15096 (version "18.8.1")
15097 (source
15098 (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "txaio" version))
15101 (sha256
15102 (base32
15103 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15104 (build-system python-build-system)
15105 (propagated-inputs
15106 `(("python-twisted" ,python-twisted)
15107 ("python-six" ,python-six)))
15108 (home-page "https://github.com/crossbario/txaio")
15109 (synopsis "Compatibility layer between Python asyncio and Twisted")
15110 (description "Txaio provides a compatibility layer between the Python
15111@code{asyncio} module and @code{Twisted}.")
15112 (license license:expat)))