gnu: meep: Update to 1.8.0.
[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")
2ffec22e 3223 (version "0.27.4")
44d10b1f
RW
3224 (source
3225 (origin
3226 (method url-fetch)
3227 (uri (pypi-uri "pygit2" version))
3228 (sha256
3229 (base32
2ffec22e 3230 "15c1mhwwjc7nr8hn5gm21hcfhw61jmwb0vngpjhlm3y5565wg2pz"))))
44d10b1f
RW
3231 (build-system python-build-system)
3232 (arguments
2ffec22e
JL
3233 '(#:tests? #f; tests don't run correctly in our environment
3234 #:phases
44d10b1f 3235 (modify-phases %standard-phases
44d10b1f
RW
3236 (add-after 'unpack 'fix-dependency-versioning
3237 (lambda _
3238 (substitute* "setup.py"
3239 (("<") "<="))
3240 #t)))))
3241 (propagated-inputs
3242 `(("python-six" ,python-six)
3243 ("python-cffi" ,python-cffi)
3244 ("libgit2" ,libgit2)
3245 ("python-tox" ,python-tox)))
3246 (native-inputs
3247 `(("python-pytest" ,python-pytest)))
3248 (home-page "https://github.com/libgit2/pygit2")
3249 (synopsis "Python bindings for libgit2")
3250 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3251library, libgit2 implements Git plumbing.")
3252 ;; GPL2.0 only, with linking exception.
3253 (license license:gpl2)))
3254
3255(define-public python2-pygit2
3256 (package-with-python2 python-pygit2))
3257
3258(define-public python-pyparsing
3259 (package
3260 (name "python-pyparsing")
3261 (version "2.2.1")
3262 (source
3263 (origin
3264 (method url-fetch)
3265 (uri (pypi-uri "pyparsing" version))
3266 (sha256
3267 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3268 (build-system python-build-system)
3269 (outputs '("out" "doc"))
3270 (arguments
3271 `(#:tests? #f ; no test target
3272 #:phases
3273 (modify-phases %standard-phases
3274 (add-after 'install 'install-doc
3275 (lambda* (#:key outputs #:allow-other-keys)
3276 (let* ((doc (string-append (assoc-ref outputs "doc")
3277 "/share/doc/" ,name "-" ,version))
3278 (html-doc (string-append doc "/html"))
3279 (examples (string-append doc "/examples")))
3280 (mkdir-p html-doc)
3281 (mkdir-p examples)
3282 (for-each
3283 (lambda (dir tgt)
3284 (map (lambda (file)
3285 (install-file file tgt))
3286 (find-files dir ".*")))
3287 (list "docs" "htmldoc" "examples")
3288 (list doc html-doc examples))
3289 #t))))))
3290 (home-page "https://github.com/pyparsing/pyparsing")
3291 (synopsis "Python parsing class library")
3292 (description
3293 "The pyparsing module is an alternative approach to creating and
3294executing simple grammars, vs. the traditional lex/yacc approach, or the use
3295of regular expressions. The pyparsing module provides a library of classes
3296that client code uses to construct the grammar directly in Python code.")
3297 (license license:expat)))
3298
3299(define-public python2-pyparsing
3300 (package-with-python2 python-pyparsing))
3301
3302(define-public python-numpydoc
3303 (package
3304 (name "python-numpydoc")
3305 (version "0.8.0")
3306 (source
3307 (origin
3308 (method url-fetch)
3309 (uri (pypi-uri "numpydoc" version))
3310 (sha256
3311 (base32
3312 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3313 (build-system python-build-system)
3314 (propagated-inputs
3315 `(("python-sphinx" ,python-sphinx)))
3316 (native-inputs
3317 `(("python-nose" ,python-nose)))
3318 (home-page "https://pypi.python.org/pypi/numpydoc")
3319 (synopsis
3320 "Numpy's Sphinx extensions")
3321 (description
3322 "Sphinx extension to support docstrings in Numpy format.")
3323 (license license:bsd-2)))
3324
3325(define-public python2-numpydoc
3326 (package-with-python2 python-numpydoc))
3327
3328(define-public python-numexpr
3329 (package
3330 (name "python-numexpr")
3331 (version "2.6.5")
3332 (source
3333 (origin
3334 (method url-fetch)
3335 (uri (pypi-uri "numexpr" version))
3336 (sha256
3337 (base32
3338 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3339 (build-system python-build-system)
3340 (arguments `(#:tests? #f)) ; no tests included
3341 (propagated-inputs
3342 `(("python-numpy" ,python-numpy)))
3343 (home-page "https://github.com/pydata/numexpr")
3344 (synopsis "Fast numerical expression evaluator for NumPy")
3345 (description
3346 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3347expressions that operate on arrays are accelerated and use less memory than
3348doing the same calculation in Python. In addition, its multi-threaded
3349capabilities can make use of all your cores, which may accelerate
3350computations, most specially if they are not memory-bounded (e.g. those using
3351transcendental functions).")
3352 (license license:expat)))
3353
3354(define-public python2-numexpr
3355 (package-with-python2 python-numexpr))
3356
3357(define-public python-cycler
3358 (package
3359 (name "python-cycler")
3360 (version "0.10.0")
3361 (source (origin
3362 (method url-fetch)
3363 (uri (pypi-uri "cycler" version))
3364 (sha256
3365 (base32
3366 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3367 (build-system python-build-system)
3368 (arguments
3369 ;; XXX: The current version requires 'coveralls' which we don't have.
3370 ;; Enable this for the next release which uses 'python-pytest'.
3371 '(#:tests? #f))
3372 (propagated-inputs
3373 `(("python-six" ,python-six)))
3374 (home-page "http://matplotlib.org/cycler/")
3375 (synopsis "Composable keyword argument iterator")
3376 (description
3377 "When using @code{matplotlib} and plotting more than one line, it is
3378common to want to be able to want to be able to cycle over one or more artist
3379styles; but the plotting logic can quickly become involved.
3380To address this and enable easy cycling over arbitrary @code{kwargs}, the
3381@code{Cycler} class was developed.")
3382 (license license:bsd-3)))
3383
3384(define-public python2-cycler
3385 (package-with-python2 python-cycler))
3386
3387(define-public python-colorspacious
3388 (package
3389 (name "python-colorspacious")
3390 (version "1.1.0")
3391 (source
3392 (origin
3393 (method url-fetch)
3394 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3395 version ".tar.gz"))
3396 (file-name (string-append name "-" version))
3397 (sha256
3398 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3399 (build-system python-build-system)
3400 (propagated-inputs
3401 `(("python-numpy" ,python-numpy)))
3402 (native-inputs
3403 `(("python-nose" ,python-nose)))
3404 (arguments
3405 `(#:phases
3406 (modify-phases %standard-phases
3407 (replace 'check
3408 (lambda _
c988afda 3409 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3410 (home-page "https://github.com/njsmith/colorspacious")
3411 (synopsis "Python library for colorspace conversions")
3412 (description "@code{colorspacious} is a Python library that lets you
3413convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3414 (license license:expat)))
3415
3416(define-public python2-colorspacious
3417 (package-with-python2 python-colorspacious))
3418
3419(define-public python-matplotlib
3420 (package
3421 (name "python-matplotlib")
3422 (version "2.2.3")
3423 (source
3424 (origin
3425 (method url-fetch)
3426 (uri (pypi-uri "matplotlib" version))
3427 (sha256
3428 (base32
3429 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3430 (build-system python-build-system)
3431 (propagated-inputs ; the following packages are all needed at run time
3432 `(("python-cycler" ,python-cycler)
3433 ("python-kiwisolver" ,python-kiwisolver)
3434 ("python-pyparsing" ,python-pyparsing)
3435 ("python-pygobject" ,python-pygobject)
3436 ("gobject-introspection" ,gobject-introspection)
3437 ("python-tkinter" ,python "tk")
3438 ("python-dateutil" ,python-dateutil)
3439 ("python-numpy" ,python-numpy)
3440 ("python-pillow" ,python-pillow)
3441 ("python-pytz" ,python-pytz)
3442 ("python-six" ,python-six)
3443 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3444 ;; from 'gtk+') provides the required 'typelib' files used by
3445 ;; 'gobject-introspection'. The location of these files is set with the
3446 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3447 ;; is done automatically by a 'native-search-path' procedure. However,
3448 ;; at run-time the user must set this variable as follows:
3449 ;;
3450 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3451 ("gtk+" ,gtk+)
3452 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3453 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3454 ;; object. For this reason we need to import both libraries.
3455 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3456 ("python-pycairo" ,python-pycairo)
3457 ;; XXX: qtwebkit cannot be built reliably.
3458 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3459 ("python-cairocffi" ,python-cairocffi)))
3460 (inputs
3461 `(("libpng" ,libpng)
3462 ("imagemagick" ,imagemagick)
3463 ("freetype" ,freetype)
3464 ("cairo" ,cairo)
3465 ("glib" ,glib)
3466 ;; FIXME: Add backends when available.
3467 ;("python-wxpython" ,python-wxpython)
3468 ("tcl" ,tcl)
3469 ("tk" ,tk)))
3470 (native-inputs
3471 `(("pkg-config" ,pkg-config)
3472 ("python-nose" ,python-nose)
3473 ("python-mock" ,python-mock)))
3474 (arguments
3475 `(#:phases
3476 (modify-phases %standard-phases
3477 (add-before 'build 'configure-environment
3478 (lambda* (#:key outputs inputs #:allow-other-keys)
3479 (let ((cairo (assoc-ref inputs "cairo"))
3480 (gtk+ (assoc-ref inputs "gtk+")))
3481 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3482 ;; has not effect.
3483 (setenv "LD_LIBRARY_PATH"
3484 (string-append cairo "/lib:" gtk+ "/lib"))
3485 (setenv "HOME" (getcwd))
3486 (call-with-output-file "setup.cfg"
3487 (lambda (port)
3488 (format port "[directories]~%
3489basedirlist = ~a,~a~%
3490 [rc_options]~%
3491backend = TkAgg~%"
3492 (assoc-ref inputs "tcl")
3493 (assoc-ref inputs "tk")))))
3494 #t)))))
3495 (home-page "http://matplotlib.org")
3496 (synopsis "2D plotting library for Python")
3497 (description
3498 "Matplotlib is a Python 2D plotting library which produces publication
3499quality figures in a variety of hardcopy formats and interactive environments
3500across platforms. Matplotlib can be used in Python scripts, the python and
3501ipython shell, web application servers, and six graphical user interface
3502toolkits.")
3503 (license license:psfl)
3504 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3505
3506(define-public python2-matplotlib
3507 (let ((matplotlib (package-with-python2
3508 (strip-python2-variant python-matplotlib))))
3509 (package (inherit matplotlib)
3510 ;; Make sure to use special packages for Python 2 instead
3511 ;; of those automatically rewritten by package-with-python2.
3512 (propagated-inputs
3513 `(("python2-pycairo" ,python2-pycairo)
3514 ("python2-backports-functools-lru-cache"
3515 ,python2-backports-functools-lru-cache)
3516 ("python2-functools32" ,python2-functools32)
3517 ("python2-pygobject-2" ,python2-pygobject-2)
3518 ("python2-subprocess32" ,python2-subprocess32)
3519 ("python2-tkinter" ,python-2 "tk")
3520 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3521 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3522
3523(define-public python-matplotlib-documentation
3524 (package
3525 (name "python-matplotlib-documentation")
3526 (version (package-version python-matplotlib))
3527 (source (package-source python-matplotlib))
3528 (build-system python-build-system)
3529 (native-inputs
3530 `(("python-matplotlib" ,python-matplotlib)
3531 ("python-colorspacious" ,python-colorspacious)
3532 ("python-sphinx" ,python-sphinx)
3533 ("python-sphinx-gallery" ,python-sphinx-gallery)
3534 ("python-numpydoc" ,python-numpydoc)
3535 ("python-ipython" ,python-ipython)
e7a53914 3536 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
3537 ("python-mock" ,python-mock)
3538 ("graphviz" ,graphviz)
e7a53914
RW
3539 ("texlive" ,(texlive-union (list texlive-latex-amsfonts
3540 texlive-latex-amsmath
3541 texlive-latex-enumitem
3542 texlive-latex-expdlist
3543 texlive-latex-geometry
3544 texlive-latex-preview
3545 texlive-latex-type1cm
3546 texlive-latex-ucs
3547
3548 texlive-generic-pdftex
3549
3550 texlive-fonts-amsfonts
3551 texlive-fonts-ec
3552 texlive-fonts-adobe-times
3553 texlive-fonts-txfonts)))
44d10b1f
RW
3554 ("texinfo" ,texinfo)
3555 ,@(package-native-inputs python-matplotlib)))
3556 (arguments
3557 `(#:tests? #f ; we're only generating documentation
3558 #:phases
3559 (modify-phases %standard-phases
3560 (replace 'build
3561 (lambda _
3562 (chdir "doc")
e7a53914
RW
3563 (setenv "PYTHONPATH"
3564 (string-append (getenv "PYTHONPATH")
3565 ":" (getcwd) "/../examples/units"))
44d10b1f 3566 (substitute* "conf.py"
e7a53914
RW
3567 ;; Don't use git.
3568 (("^SHA = check_output.*")
3569 (string-append "SHA = \"" ,version "\"\n"))
3570 ;; Don't fetch intersphinx files from the Internet
3571 (("^explicit_order_folders" m)
3572 (string-append "intersphinx_mapping = {}\n" m))
3573 (("'sphinx.ext.intersphinx',") "")
3574 ;; Disable URL embedding which requires internet access.
3575 (("'https://docs.scipy.org/doc/numpy'") "None")
3576 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
3577 (invoke "make"
3578 "SPHINXBUILD=sphinx-build"
3579 "SPHINXOPTS=" ; don't abort on warnings
3580 "html" "texinfo")))
44d10b1f
RW
3581 (replace 'install
3582 (lambda* (#:key inputs outputs #:allow-other-keys)
3583 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3584 (doc (string-append data "/doc/python-matplotlib-" ,version))
3585 (info (string-append data "/info"))
3586 (html (string-append doc "/html")))
3587 (mkdir-p html)
3588 (mkdir-p info)
3589 (copy-recursively "build/html" html)
3590 (symlink (string-append html "/_images")
3591 (string-append info "/matplotlib-figures"))
3592 (with-directory-excursion "build/texinfo"
3593 (substitute* "matplotlib.texi"
3594 (("@image\\{([^,]*)" all file)
3595 (string-append "@image{matplotlib-figures/" file)))
3596 (symlink (string-append html "/_images")
3597 "./matplotlib-figures")
e7a53914
RW
3598 (invoke "makeinfo" "--no-split"
3599 "-o" "matplotlib.info" "matplotlib.texi"))
3600 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
3601 #t)))))
3602 (home-page (package-home-page python-matplotlib))
3603 (synopsis "Documentation for the python-matplotlib package")
3604 (description (package-description python-matplotlib))
3605 (license (package-license python-matplotlib))))
3606
3607(define-public python2-matplotlib-documentation
3608 (package-with-python2 python-matplotlib-documentation))
3609
3610(define-public python2-pysnptools
3611 (package
3612 (name "python2-pysnptools")
5d1ade85 3613 (version "0.3.13")
44d10b1f
RW
3614 (source
3615 (origin
3616 (method url-fetch)
5d1ade85 3617 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3618 (sha256
3619 (base32
5d1ade85 3620 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3621 (build-system python-build-system)
3622 (arguments
5d1ade85
RW
3623 `(#:python ,python-2 ; only Python 2.7 is supported
3624 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3625 (propagated-inputs
3626 `(("python2-numpy" ,python2-numpy)
3627 ("python2-scipy" ,python2-scipy)
3628 ("python2-pandas" ,python2-pandas)))
44d10b1f 3629 (native-inputs
5d1ade85 3630 `(("python2-cython" ,python2-cython)))
1b66989b 3631 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3632 (synopsis "Library for reading and manipulating genetic data")
3633 (description
3634 "PySnpTools is a library for reading and manipulating genetic data. It
3635can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3636those files. It can also efficiently manipulate ranges of integers using set
3637operators such as union, intersection, and difference.")
3638 (license license:asl2.0)))
3639
3640(define-public python-scipy
3641 (package
3642 (name "python-scipy")
3643 (version "1.1.0")
3644 (source
3645 (origin
3646 (method url-fetch)
3647 (uri (pypi-uri "scipy" version))
3648 (sha256
3649 (base32
3650 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3651 (build-system python-build-system)
3652 (propagated-inputs
3653 `(("python-numpy" ,python-numpy)
3654 ("python-matplotlib" ,python-matplotlib)
3655 ("python-pyparsing" ,python-pyparsing)))
3656 (inputs
3657 `(("lapack" ,lapack)
3658 ("openblas" ,openblas)))
3659 (native-inputs
3660 `(("python-cython" ,python-cython)
3661 ("python-pytest" ,python-pytest)
3662 ("python-sphinx" ,python-sphinx)
3663 ("python-numpydoc" ,python-numpydoc)
3664 ("gfortran" ,gfortran)
3665 ("perl" ,perl)
3666 ("which" ,which)))
3667 (outputs '("out" "doc"))
3668 (arguments
3669 `(#:phases
3670 (modify-phases %standard-phases
3671 (add-after 'unpack 'disable-broken-tests
3672 (lambda _
3673 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3674 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3675 (string-append indent
3676 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3677 m)))
3678 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3679 (("^def test_parallel_threads\\(\\):" m)
3680 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3681 m)))
3682 #t))
3683 (add-before 'build 'configure-openblas
3684 (lambda* (#:key inputs #:allow-other-keys)
3685 (call-with-output-file "site.cfg"
3686 (lambda (port)
3687 (format port
3688 "[blas]
3689libraries = openblas
3690library_dirs = ~a/lib
3691include_dirs = ~a/include
3692
3693# backslash-n to make emacs happy
3694\n[atlas]
3695library_dirs = ~a/lib
3696atlas_libs = openblas
3697"
3698 (assoc-ref inputs "openblas")
3699 (assoc-ref inputs "openblas")
3700 (assoc-ref inputs "openblas"))))
3701 #t))
3702 (add-after 'install 'install-doc
3703 (lambda* (#:key inputs outputs #:allow-other-keys)
3704 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3705 (doc (string-append data "/doc/" ,name "-" ,version))
3706 (html (string-append doc "/html"))
3707 (pyver ,(string-append "PYVER=" (version-major+minor
3708 (package-version python))))
3709 ;; By default it tries to run sphinx-build through the Python
3710 ;; interpreter which won't work with our shell wrapper.
3711 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3712 ;; Make installed package available for building the
3713 ;; documentation
3714 (add-installed-pythonpath inputs outputs)
3715 (with-directory-excursion "doc"
3716 ;; Fix generation of images for mathematical expressions.
3717 (substitute* (find-files "source" "conf\\.py")
3718 (("pngmath_use_preview = True")
3719 "pngmath_use_preview = False"))
3720 (mkdir-p html)
3721 (invoke "make" "html" pyver sphinxbuild)
3722 (with-directory-excursion "build/html"
3723 (for-each (lambda (file)
3724 (let* ((dir (dirname file))
3725 (tgt-dir (string-append html "/" dir)))
3726 (install-file file html)))
3727 (find-files "." ".*")))))
3728 #t))
3729 ;; Tests can only be run after the library has been installed and not
3730 ;; within the source directory.
3731 (delete 'check)
3732 (add-after 'install 'check
3733 (lambda* (#:key inputs outputs #:allow-other-keys)
3734 (add-installed-pythonpath inputs outputs)
3735 (with-directory-excursion "/tmp"
3736 (invoke "python" "-c"
3737 "import scipy; scipy.test(verbose=2)")))))))
3738 (home-page "https://www.scipy.org/")
3739 (synopsis "The Scipy library provides efficient numerical routines")
3740 (description "The SciPy library is one of the core packages that make up
3741the SciPy stack. It provides many user-friendly and efficient numerical
3742routines such as routines for numerical integration and optimization.")
3743 (properties `((python2-variant . ,(delay python2-scipy))))
3744 (license license:bsd-3)))
3745
3746(define-public python2-scipy
3747 (package-with-python2
3748 (strip-python2-variant python-scipy)))
3749
3750(define-public python-socksipy-branch
3751 (package
3752 (name "python-socksipy-branch")
3753 (version "1.01")
3754 (source
3755 (origin
3756 (method url-fetch)
3757 (uri (pypi-uri "SocksiPy-branch" version))
3758 (sha256
3759 (base32
3760 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3761 (build-system python-build-system)
3762 (arguments
3763 `(#:tests? #f)) ; There are no tests
3764 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3765 (synopsis "Python SOCKS module")
3766 (description
3767 "SocksiPy - A Python SOCKS client module. It provides a
3768socket-like interface that supports connections to any TCP
3769service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3770The original version was developed by Dan Haim, this is a
3771branch created by Mario Vilas to address some open issues,
3772as the original project seems to have been abandoned circa 2007.")
3773 (license license:bsd-3)))
3774
3775(define-public python2-socksipy-branch
3776 (package-with-python2 python-socksipy-branch))
3777
3778(define-public python-pycodestyle
3779 (package
3780 (name "python-pycodestyle")
3781 (version "2.4.0")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "pycodestyle" version))
3786 (sha256
3787 (base32
3788 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3789 (build-system python-build-system)
3790 (home-page "https://pycodestyle.readthedocs.io/")
3791 (synopsis "Python style guide checker")
3792 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3793Python code against some of the style conventions in
3794@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3795 (license license:expat)))
3796
3797(define-public python2-pycodestyle
3798 (package-with-python2 python-pycodestyle))
3799
3800(define-public python-multidict
3801 (package
3802 (name "python-multidict")
3803 (version "4.2.0")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (pypi-uri "multidict" version))
3808 (sha256
3809 (base32
3810 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3811 (build-system python-build-system)
3812 (native-inputs
3813 `(("python-pytest" ,python-pytest)
3814 ("python-pytest-runner" ,python-pytest-runner)))
3815 (home-page "https://github.com/aio-libs/multidict/")
3816 (synopsis "Multidict implementation")
3817 (description "Multidict is dict-like collection of key-value pairs
3818where key might be occurred more than once in the container.")
3819 (license license:asl2.0)))
3820
3821(define-public python-orderedmultidict
3822 (package
3823 (name "python-orderedmultidict")
3824 (version "0.7.11")
3825 (source
3826 (origin
3827 (method url-fetch)
3828 (uri (pypi-uri "orderedmultidict" version))
3829 (sha256
3830 (base32
3831 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3832 (build-system python-build-system)
3833 (arguments
3834 `(#:phases
3835 (modify-phases %standard-phases
3836 (add-after 'unpack 'fix-tests
3837 (lambda _
3838 ;; The package uses nosetest for running the tests.
3839 ;; Adding this initfile allows to run the test suite
3840 ;; without requiring nosetest.
d1c4f329
RW
3841 (with-output-to-file "tests/__init__.py" newline)
3842 #t)))))
44d10b1f
RW
3843 (propagated-inputs
3844 `(("python-six" ,python-six)))
3845 (native-inputs
3846 `(("python-pycodestyle" ,python-pycodestyle)))
3847 (home-page "https://github.com/gruns/orderedmultidict")
3848 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3849 (description "This package contains a library for ordered multivalue
3850dictionaries. A multivalue dictionary is a dictionary that can store
3851multiple values for the same key. An ordered multivalue dictionary is a
3852multivalue dictionary that retains the order of insertions and deletions.")
3853 (license license:unlicense)))
3854
3855(define-public python2-orderedmultidict
3856 (package-with-python2 python-orderedmultidict))
3857
3858(define-public python-autopep8
3859 (package
3860 (name "python-autopep8")
3861 (version "1.3.5")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (pypi-uri "autopep8" version))
3866 (sha256
3867 (base32
3868 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3869 (build-system python-build-system)
3870 (propagated-inputs
3871 `(("python-pycodestyle" ,python-pycodestyle)))
3872 (home-page "https://github.com/hhatto/autopep8")
3873 (synopsis "Format Python code according to the PEP 8 style guide")
3874 (description
3875 "@code{autopep8} automatically formats Python code to conform to
3876the PEP 8 style guide. It uses the pycodestyle utility to determine
3877what parts of the code needs to be formatted. @code{autopep8} is
3878capable of fixing most of the formatting issues that can be reported
3879by pycodestyle.")
3880 (license (license:non-copyleft
3881 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3882
3883(define-public python2-autopep8
3884 (package-with-python2 python-autopep8))
3885
3886(define-public python-distutils-extra
3887 (package
3888 (name "python-distutils-extra")
3889 (version "2.38")
3890 (source
3891 (origin
3892 (method url-fetch)
3893 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3894 version "/+download/python-distutils-extra-"
3895 version ".tar.gz"))
3896 (sha256
3897 (base32
3898 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3899 (build-system python-build-system)
3900 (home-page "https://launchpad.net/python-distutils-extra/")
3901 (synopsis "Enhancements to Python's distutils")
3902 (description
3903 "The python-distutils-extra module enables you to easily integrate
3904gettext support, themed icons, and scrollkeeper-based documentation into
3905Python's distutils.")
3906 (license license:gpl2)))
3907
3908(define-public python2-distutils-extra
3909 (package-with-python2 python-distutils-extra))
3910
3911(define-public python2-elib.intl
3912 (package
3913 (name "python2-elib.intl")
3914 (version "0.0.3")
3915 (source
3916 (origin
3917 ;; This project doesn't tag releases or publish tarballs, so we take
3918 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3919 (method git-fetch)
3920 (uri (git-reference
3921 (url "https://github.com/dieterv/elib.intl.git")
3922 (commit "d09997cfef")))
3923 (file-name (string-append name "-" version "-checkout"))
3924 (sha256
3925 (base32
3926 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3927 (build-system python-build-system)
3928 (arguments
3929 ;; incompatible with Python 3 (exception syntax)
3930 `(#:python ,python-2
3931 #:tests? #f))
3932 (home-page "https://github.com/dieterv/elib.intl")
3933 (synopsis "Enhanced internationalization for Python")
3934 (description
3935 "The elib.intl module provides enhanced internationalization (I18N)
3936services for your Python modules and applications.")
3937 (license license:lgpl3+)))
3938
3939(define-public python-olefile
3940 (package
3941 (name "python-olefile")
3942 (version "0.45.1")
3943 (source
3944 (origin
3945 (method url-fetch)
3946 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3947 version ".tar.gz"))
3948 (file-name (string-append name "-" version ".tar.gz"))
3949 (sha256
3950 (base32
3951 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3952 (build-system python-build-system)
3953 (home-page
3954 "https://www.decalage.info/python/olefileio")
3955 (synopsis "Read and write Microsoft OLE2 files.")
3956 (description
3957 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3958Storage or Compound Document, Microsoft Office). It is an improved version of
3959the OleFileIO module from PIL, the Python Image Library.")
3960 (license license:bsd-3)))
3961
3962(define-public python2-olefile
3963 (package-with-python2 python-olefile))
3964
3965(define-public python-pillow
3966 (package
3967 (name "python-pillow")
3968 (version "5.4.1")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (pypi-uri "Pillow" version))
3973 (sha256
3974 (base32
3975 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3976 (build-system python-build-system)
3977 (native-inputs
3978 `(("python-pytest" ,python-pytest)))
3979 (inputs
3980 `(("freetype" ,freetype)
3981 ("lcms" ,lcms)
3982 ("zlib" ,zlib)
3983 ("libjpeg" ,libjpeg)
3984 ("openjpeg" ,openjpeg)
3985 ("libtiff" ,libtiff)
3986 ("libwebp" ,libwebp)))
3987 (propagated-inputs
3988 `(("python-olefile" ,python-olefile)))
3989 (arguments
3990 `(#:phases
3991 (modify-phases %standard-phases
3992 (add-after 'unpack 'patch-ldconfig
3993 (lambda _
3994 (substitute* "setup.py"
3995 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3996 (delete 'check) ; We must run checks after python-pillow is installed.
3997 (add-after 'install 'check-installed
3998 (lambda* (#:key outputs inputs #:allow-other-keys)
3999 (begin
4000 (setenv "HOME" (getcwd))
4001 ;; Make installed package available for running the tests.
4002 (add-installed-pythonpath inputs outputs)
4003 (invoke "python" "selftest.py" "--installed")
4004 (invoke "python" "-m" "pytest" "-vv")))))))
4005 (home-page "https://python-pillow.org")
4006 (synopsis "Fork of the Python Imaging Library")
4007 (description
4008 "The Python Imaging Library adds image processing capabilities to your
4009Python interpreter. This library provides extensive file format support, an
4010efficient internal representation, and fairly powerful image processing
4011capabilities. The core image library is designed for fast access to data
4012stored in a few basic pixel formats. It should provide a solid foundation for
4013a general image processing tool.")
4014 (license (license:x11-style
4015 "http://www.pythonware.com/products/pil/license.htm"
4016 "The PIL Software License"))))
4017
4018(define-public python2-pillow
4019 (package-with-python2 python-pillow))
4020
4021(define-public python-pycparser
4022 (package
4023 (name "python-pycparser")
4024 (version "2.18")
4025 (source
4026 (origin
4027 (method url-fetch)
4028 (uri (pypi-uri "pycparser" version))
4029 (sha256
4030 (base32
4031 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4032 (outputs '("out" "doc"))
4033 (build-system python-build-system)
4034 (native-inputs
4035 `(("pkg-config" ,pkg-config)))
4036 (arguments
4037 `(#:phases
4038 (modify-phases %standard-phases
4039 (replace 'check
4040 (lambda _
4041 (with-directory-excursion "tests"
acb75c03
RW
4042 (invoke "python" "all_tests.py"))
4043 #t))
44d10b1f
RW
4044 (add-after 'install 'install-doc
4045 (lambda* (#:key outputs #:allow-other-keys)
4046 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4047 (doc (string-append data "/doc/" ,name "-" ,version))
4048 (examples (string-append doc "/examples")))
4049 (mkdir-p examples)
4050 (for-each (lambda (file)
4051 (copy-file (string-append "." file)
4052 (string-append doc file)))
4053 '("/README.rst" "/CHANGES" "/LICENSE"))
4054 (copy-recursively "examples" examples)))))))
4055 (home-page "https://github.com/eliben/pycparser")
4056 (synopsis "C parser in Python")
4057 (description
4058 "Pycparser is a complete parser of the C language, written in pure Python
4059using the PLY parsing library. It parses C code into an AST and can serve as
4060a front-end for C compilers or analysis tools.")
4061 (license license:bsd-3)))
4062
4063(define-public python2-pycparser
4064 (package-with-python2 python-pycparser))
4065
4066(define-public python-pywavelets
4067 (package
4068 (name "python-pywavelets")
4069 (version "1.0.1")
4070 (home-page "https://github.com/PyWavelets/pywt")
4071 (source (origin
4072 (method url-fetch)
4073 (uri (pypi-uri "PyWavelets" version))
4074 (sha256
4075 (base32
4076 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4077 (build-system python-build-system)
4078 (arguments
4079 '(#:modules ((ice-9 ftw)
4080 (srfi srfi-1)
4081 (srfi srfi-26)
4082 (guix build utils)
4083 (guix build python-build-system))
4084 #:phases (modify-phases %standard-phases
4085 (replace 'check
4086 (lambda _
4087 (let ((cwd (getcwd))
4088 (libdir (find (cut string-prefix? "lib." <>)
4089 (scandir "build"))))
4090 (with-directory-excursion (string-append cwd "/build/" libdir)
4091 (invoke "nosetests" "-v" "."))))))))
4092 (native-inputs
4093 `(("python-matplotlib" ,python-matplotlib) ;for tests
4094 ("python-nose" ,python-nose)))
4095 (propagated-inputs
4096 `(("python-numpy" ,python-numpy)))
4097 (synopsis "Wavelet transforms in Python")
4098 (description
4099 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4100mathematical basis functions that are localized in both time and frequency.
4101Wavelet transforms are time-frequency transforms employing wavelets. They are
4102similar to Fourier transforms, the difference being that Fourier transforms are
4103localized only in frequency instead of in time and frequency.")
4104 (license license:expat)))
4105
4106(define-public python2-pywavelets
4107 (package-with-python2 python-pywavelets))
4108
4109(define-public python-xcffib
4110 (package
4111 (name "python-xcffib")
4112 (version "0.6.0")
4113 (source
4114 (origin
4115 (method url-fetch)
4116 (uri (pypi-uri "xcffib" version))
4117 (sha256
4118 (base32
4119 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4120 (build-system python-build-system)
4121 (inputs
4122 `(("libxcb" ,libxcb)))
4123 (propagated-inputs
4124 `(("python-cffi" ,python-cffi) ; used at run time
4125 ("python-six" ,python-six)))
4126 (arguments
4127 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4128 #:tests? #f
4129 #:phases
4130 (modify-phases %standard-phases
4131 (add-after 'unpack 'fix-libxcb-path
4132 (lambda* (#:key inputs #:allow-other-keys)
4133 (let ((libxcb (assoc-ref inputs "libxcb")))
4134 (substitute* '("xcffib/__init__.py")
4135 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4136 #t)))
4137 (add-after 'install 'install-doc
4138 (lambda* (#:key outputs #:allow-other-keys)
4139 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4140 "/doc/" ,name "-" ,version)))
4141 (mkdir-p doc)
4142 (copy-file "README.md"
4143 (string-append doc "/README.md"))
4144 #t))))))
4145 (home-page "https://github.com/tych0/xcffib")
4146 (synopsis "XCB Python bindings")
4147 (description
4148 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4149support for Python 3 and PyPy. It is based on cffi.")
4150 (license license:expat)))
4151
4152(define-public python2-xcffib
4153 (package-with-python2 python-xcffib))
4154
4155(define-public python-cairocffi
4156 (package
4157 (name "python-cairocffi")
4158 (version "0.9.0")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (pypi-uri "cairocffi" version))
4163 (sha256
4164 (base32
4165 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4166 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4167 (build-system python-build-system)
4168 (outputs '("out" "doc"))
4169 (inputs
4170 `(("glib" ,glib)
4171 ("gtk+" ,gtk+)
4172 ("gdk-pixbuf" ,gdk-pixbuf)
4173 ("cairo" ,cairo)
4174 ("pango" ,pango)))
4175 (native-inputs
4176 `(("pkg-config" ,pkg-config)
4177 ("python-pytest" ,python-pytest)
4178 ("python-pytest-cov" ,python-pytest-cov)
4179 ("python-pytest-runner" ,python-pytest-runner)
4180 ("python-sphinx" ,python-sphinx)
4181 ("python-docutils" ,python-docutils)))
4182 (propagated-inputs
4183 `(("python-xcffib" ,python-xcffib))) ; used at run time
4184 (arguments
4185 `(#:phases
4186 (modify-phases %standard-phases
4187 (add-after 'unpack 'patch-paths
4188 (lambda* (#:key inputs outputs #:allow-other-keys)
4189 (substitute* (find-files "." "\\.py$")
4190 (("dlopen\\(ffi, 'cairo'")
4191 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4192 "/lib/libcairo.so.2'"))
4193 (("dlopen\\(ffi, 'gdk-3'")
4194 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4195 "/lib/libgtk-3.so.0'"))
4196 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4197 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4198 "/lib/libgdk_pixbuf-2.0.so.0'"))
4199 (("dlopen\\(ffi, 'glib-2.0'")
4200 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4201 "/lib/libglib-2.0.so.0'"))
4202 (("dlopen\\(ffi, 'gobject-2.0'")
4203 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4204 "/lib/libgobject-2.0.so.0'"))
4205 (("dlopen\\(ffi, 'pangocairo-1.0'")
4206 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4207 "/lib/libpangocairo-1.0.so.0'"))
4208 (("dlopen\\(ffi, 'pango-1.0'")
4209 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4210 "/lib/libpango-1.0.so.0'")))
4211 #t))
4212 (add-after 'install 'install-doc
4213 (lambda* (#:key inputs outputs #:allow-other-keys)
4214 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4215 (doc (string-append data "/doc/" ,name "-" ,version))
4216 (html (string-append doc "/html")))
4217 (setenv "LD_LIBRARY_PATH"
4218 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4219 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4220 (setenv "LANG" "en_US.UTF-8")
4221 (mkdir-p html)
4222 (for-each (lambda (file)
4223 (copy-file (string-append "." file)
4224 (string-append doc file)))
4225 '("/README.rst" "/CHANGES" "/LICENSE"))
4226 (system* "python" "setup.py" "build_sphinx")
4227 (copy-recursively "docs/_build/html" html)
4228 #t))))))
4229 (home-page "https://github.com/Kozea/cairocffi")
4230 (synopsis "Python bindings and object-oriented API for Cairo")
4231 (description
4232 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4233Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4234graphics library with support for multiple backends including image buffers,
4235PNG, PostScript, PDF, and SVG file output.")
4236 (license license:bsd-3)))
4237
4238(define-public python2-cairocffi
4239 (package-with-python2 python-cairocffi))
4240
4241(define-public python-decorator
4242 (package
4243 (name "python-decorator")
4244 (version "4.3.0")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (pypi-uri "decorator" version))
4249 (sha256
4250 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4251 (build-system python-build-system)
4252 (home-page "https://pypi.python.org/pypi/decorator/")
4253 (synopsis "Python module to simplify usage of decorators")
4254 (description
4255 "The aim of the decorator module is to simplify the usage of decorators
4256for the average programmer, and to popularize decorators usage giving examples
4257of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4258etc. The core of this module is a decorator factory.")
4259 (license license:expat)))
4260
4261(define-public python2-decorator
4262 (package-with-python2 python-decorator))
4263
4264(define-public python-drmaa
4265 (package
4266 (name "python-drmaa")
4267 (version "0.7.7")
4268 (source
4269 (origin
4270 (method url-fetch)
4271 (uri (pypi-uri "drmaa" version))
4272 (sha256
4273 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4274 (build-system python-build-system)
4275 ;; The test suite requires libdrmaa which is provided by the cluster
4276 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4277 ;; should be set to the path of the libdrmaa library.
4278 (arguments '(#:tests? #f))
4279 (native-inputs
4280 `(("python-nose" ,python-nose)))
4281 (home-page "https://pypi.python.org/pypi/drmaa")
4282 (synopsis "Python bindings for the DRMAA library")
4283 (description
4284 "A Python package for Distributed Resource Management (DRM) job
4285submission and control. This package is an implementation of the DRMAA 1.0
4286Python language binding specification.")
4287 (license license:bsd-3)))
4288
4289(define-public python2-drmaa
4290 (package-with-python2 python-drmaa))
4291
4292(define-public python-grako
4293 (package
4294 (name "python-grako")
4295 (version "3.99.9")
4296 (source
4297 (origin
4298 (method url-fetch)
4299 (uri
4300 (pypi-uri "grako" version ".zip"))
4301 (sha256
4302 (base32
4303 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4304 (build-system python-build-system)
4305 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4306 (native-inputs
4307 `(("unzip" ,unzip)
4308 ("python-pytest" ,python-pytest)
4309 ("python-pytest-runner" ,python-pytest-runner)))
4310 (home-page "https://bitbucket.org/neogeny/grako")
4311 (synopsis "EBNF parser generator")
4312 (description
4313 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4314memoizing PEG/Packrat parser in Python.")
4315 (license license:bsd-3)))
4316
4317(define-public python2-grako
4318 (package-with-python2 python-grako))
4319
4320(define-public python-gridmap
4321 (package
4322 (name "python-gridmap")
4323 (version "0.13.0")
4324 (source
4325 (origin
4326 (method url-fetch)
4327 (uri (string-append
4328 "https://github.com/pygridtools/gridmap/archive/v"
4329 version ".tar.gz"))
4330 (file-name (string-append name "-" version ".tar.gz"))
4331 (sha256
4332 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4333 (build-system python-build-system)
4334 (arguments
4335 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4336 (propagated-inputs
4337 `(("python-psutil" ,python-psutil)
4338 ("python-drmaa" ,python-drmaa)
4339 ("python-pyzmq" ,python-pyzmq)))
4340 (home-page "https://github.com/pygridtools/gridmap")
4341 (synopsis "Create jobs on a cluster directly from Python")
4342 (description
4343 "Gridmap is a Python package to allow you to easily create jobs on the
4344cluster directly from Python. You can directly map Python functions onto the
4345cluster without needing to write any wrapper code yourself.")
4346 (license license:gpl3+)))
4347
4348(define-public python2-gridmap
4349 (package-with-python2 python-gridmap))
4350
4351(define-public python-honcho
4352 (package
4353 (name "python-honcho")
4354 (version "1.0.1")
4355 (source
4356 (origin
4357 (method url-fetch)
4358 (uri (string-append
4359 "https://github.com/nickstenning/honcho/archive/v"
4360 version ".tar.gz"))
4361 (file-name (string-append name "-" version ".tar.gz"))
4362 (sha256
4363 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4364 (build-system python-build-system)
4365 (native-inputs
4366 `(("python-pytest" ,python-pytest)
4367 ("python-mock" ,python-mock)
4368 ("python-tox" ,python-tox)
4369 ("which" ,which))) ;for tests
4370 (propagated-inputs
4371 `(("python-jinja2" ,python-jinja2)))
4372 (arguments
4373 `(#:phases
4374 (modify-phases %standard-phases
4375 (delete 'check)
4376 (add-after 'install 'check
4377 (lambda* (#:key outputs inputs #:allow-other-keys)
4378 ;; fix honcho path in testsuite
4379 (substitute* "tests/conftest.py"
4380 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4381 "/bin/honcho" "'")))
4382 ;; It's easier to run tests after install.
4383 ;; Make installed package available for running the tests
4384 (add-installed-pythonpath inputs outputs)
95b707fb 4385 (invoke "py.test" "-v"))))))
44d10b1f
RW
4386 (home-page "https://github.com/nickstenning/honcho")
4387 (synopsis "Manage Procfile-based applications")
4388 (description
4389 "A Procfile is a file which describes how to run an application
4390consisting of serveral processes. honcho starts all listed processes.
4391The output of all running processes is collected by honcho and
4392displayed.")
4393 (license license:expat)))
4394
4395(define-public python2-honcho
4396 (package-with-python2 python-honcho))
4397
4398(define-public python-pexpect
4399 (package
4400 (name "python-pexpect")
4401 (version "4.6.0")
4402 (source
4403 (origin
4404 (method url-fetch)
4405 (uri (pypi-uri "pexpect" version))
4406 (sha256
4407 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4408 (build-system python-build-system)
4409 (arguments
4410 `(#:phases
4411 (modify-phases %standard-phases
4412 (add-before 'check 'prepare-tests
4413 (lambda _
4414 (substitute* (find-files "tests")
4415 (("/bin/ls") (which "ls"))
4416 (("/bin/echo") (which "echo"))
4417 (("/bin/which") (which "which"))
4418 ;; Many tests try to use the /bin directory which
4419 ;; is not present in the build environment.
4420 ;; Use one that's non-empty and unlikely to change.
4421 (("/bin'") "/dev'"))
4422 ;; XXX: Socket connection test gets "Connection reset by peer".
4423 ;; Why does it not work? Delete for now.
4424 (delete-file "tests/test_socket.py")
4425 #t))
4426 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4427 (native-inputs
4428 `(("python-nose" ,python-nose)
4429 ("python-pytest" ,python-pytest)
4430 ("man-db" ,man-db)
4431 ("which" ,which)
4432 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4433 (propagated-inputs
4434 `(("python-ptyprocess" ,python-ptyprocess)))
4435 (home-page "http://pexpect.readthedocs.org/")
4436 (synopsis "Controlling interactive console applications")
4437 (description
4438 "Pexpect is a pure Python module for spawning child applications;
4439controlling them; and responding to expected patterns in their output.
4440Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4441child application and control it as if a human were typing commands.")
4442 (license license:isc)))
4443
4444(define-public python2-pexpect
4445 (package-with-python2 python-pexpect))
4446
4447(define-public python-setuptools-scm
4448 (package
4449 (name "python-setuptools-scm")
4450 (version "3.1.0")
4451 (source (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "setuptools_scm" version))
4454 (sha256
4455 (base32
4456 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4457 (build-system python-build-system)
4458 (home-page "https://github.com/pypa/setuptools_scm/")
4459 (synopsis "Manage Python package versions in SCM metadata")
4460 (description
4461 "Setuptools_scm handles managing your Python package versions in
4462@dfn{software configuration management} (SCM) metadata instead of declaring
4463them as the version argument or in a SCM managed file.")
4464 (license license:expat)))
4465
4466(define-public python2-setuptools-scm
4467 (package-with-python2 python-setuptools-scm))
4468
4469(define-public python-pathpy
4470 (package
4471 (name "python-pathpy")
4472 (version "11.0.1")
4473 (source
4474 (origin
4475 (method url-fetch)
4476 (uri (pypi-uri "path.py" version))
4477 (sha256
4478 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4479 ;; (outputs '("out" "doc"))
4480 (build-system python-build-system)
4481 (propagated-inputs
4482 `(("python-appdirs" ,python-appdirs)))
4483 (native-inputs
4484 `(("python-setuptools-scm" ,python-setuptools-scm)
4485 ("python-sphinx" ,python-sphinx)
4486 ("python-rst.linker" ,python-rst.linker)
4487 ("python-pytest" ,python-pytest)
4488 ("python-pytest-runner" ,python-pytest-runner)))
4489 (arguments
4490 ;; FIXME: Documentation and tests require "jaraco.packaging".
4491 `(#:tests? #f))
4492 ;; #:phases
4493 ;; (modify-phases %standard-phases
4494 ;; (add-after 'build 'build-doc
4495 ;; (lambda _
4496 ;; (setenv "LANG" "en_US.UTF-8")
4497 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4498 ;; (add-after 'install 'install-doc
4499 ;; (lambda* (#:key outputs #:allow-other-keys)
4500 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4501 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4502 ;; (html (string-append doc "/html")))
4503 ;; (mkdir-p html)
4504 ;; (for-each (lambda (file)
4505 ;; (copy-file file (string-append doc "/" file)))
4506 ;; '("README.rst" "CHANGES.rst"))
4507 ;; (copy-recursively "build/sphinx/html" html)))))))
4508 (home-page "https://github.com/jaraco/path.py")
4509 (synopsis "Python module wrapper for built-in os.path")
4510 (description
4511 "@code{path.py} implements path objects as first-class entities, allowing
4512common operations on files to be invoked on those path objects directly.")
4513 (license license:expat)))
4514
4515(define-public python2-pathpy
4516 (package-with-python2 python-pathpy))
4517
4518(define-public python-simplegeneric
4519 (package
4520 (name "python-simplegeneric")
4521 (version "0.8.1")
4522 (source
4523 (origin
4524 (method url-fetch)
6c8c3980 4525 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4526 (sha256
4527 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4528 (build-system python-build-system)
4529 (native-inputs
4530 `(("unzip" ,unzip)))
4531 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4532 (synopsis "Python module for simple generic functions")
4533 (description
4534 "The simplegeneric module lets you define simple single-dispatch generic
4535functions, akin to Python’s built-in generic functions like @code{len()},
4536@code{iter()} and so on. However, instead of using specially-named methods,
4537these generic functions use simple lookup tables, akin to those used by
4538e.g. @code{pickle.dump()} and other generic functions found in the Python
4539standard library.")
4540 (license license:zpl2.1)))
4541
4542(define-public python2-simplegeneric
4543 (package-with-python2 python-simplegeneric))
4544
4545(define-public python-ipython-genutils
4546 ;; TODO: This package is retired, check if can be removed, see description.
4547 (package
4548 (name "python-ipython-genutils")
4549 (version "0.1.0")
4550 (source
4551 (origin
4552 (method url-fetch)
c9671d4b 4553 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4554 (sha256
4555 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4556 (build-system python-build-system)
4557 (arguments `(#:tests? #f)) ; no tests
4558 (home-page "https://ipython.org")
4559 (synopsis "Vestigial utilities from IPython")
4560 (description
4561 "This package provides retired utilities from IPython. No packages
4562outside IPython/Jupyter should depend on it.
4563
4564This package shouldn't exist. It contains some common utilities shared by
4565Jupyter and IPython projects during The Big Split. As soon as possible, those
4566packages will remove their dependency on this, and this package will go
4567away.")
4568 (license license:bsd-3)))
4569
4570(define-public python2-ipython-genutils
4571 (package-with-python2 python-ipython-genutils))
4572
4573(define-public python-traitlets
4574 (package
4575 (name "python-traitlets")
4576 (version "4.3.2")
4577 (source
4578 (origin
4579 (method url-fetch)
4580 (uri (pypi-uri "traitlets" version))
4581 (sha256
4582 (base32
4583 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4584 (build-system python-build-system)
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4589 (propagated-inputs
4590 `(("python-ipython-genutils" ,python-ipython-genutils)
4591 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4592 (native-inputs
4593 `(("python-pytest" ,python-pytest)))
4594 (properties `((python2-variant . ,(delay python2-traitlets))))
4595 (home-page "https://ipython.org")
4596 (synopsis "Configuration system for Python applications")
4597 (description
4598 "Traitlets is a framework that lets Python classes have attributes with
4599type checking, dynamically calculated default values, and ‘on change’
4600callbacks. The package also includes a mechanism to use traitlets for
4601configuration, loading values from files or from command line arguments. This
4602is a distinct layer on top of traitlets, so you can use traitlets in your code
4603without using the configuration machinery.")
4604 (license license:bsd-3)))
4605
4606(define-public python2-traitlets
4607 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4608 (package
4609 (inherit traitlets)
4610 (propagated-inputs
4611 `(("python2-enum34" ,python2-enum34)
4612 ,@(package-propagated-inputs traitlets))))))
4613
4614(define-public python-jupyter-core
4615 (package
4616 (name "python-jupyter-core")
4617 (version "4.4.0")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (string-append (pypi-uri "jupyter_core" version)))
4622 (sha256
4623 (base32
4624 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4625 (build-system python-build-system)
4626 ;; FIXME: not sure how to run the tests
4627 (arguments `(#:tests? #f))
4628 (propagated-inputs
4629 `(("python-traitlets" ,python-traitlets)))
4630 (home-page "http://jupyter.org/")
4631 (synopsis "Jupyter base package")
4632 (description
4633 "Jupyter core is the base package on which Jupyter projects rely.")
4634 (license license:bsd-3)))
4635
4636(define-public python2-jupyter-core
4637 (package-with-python2 python-jupyter-core))
4638
4639(define-public python-jupyter-client
4640 (package
4641 (name "python-jupyter-client")
4642 (version "5.2.4")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (pypi-uri "jupyter_client" version))
4647 (sha256
4648 (base32
4649 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4650 (build-system python-build-system)
4651 ;; Tests fail because of missing native python kernel which I assume is
4652 ;; provided by the ipython package, which we cannot use because it would
4653 ;; cause a dependency cycle.
4654 (arguments `(#:tests? #f))
4655 (propagated-inputs
4656 `(("python-pyzmq" ,python-pyzmq)
4657 ("python-traitlets" ,python-traitlets)
4658 ("python-jupyter-core" ,python-jupyter-core)))
4659 (home-page "http://jupyter.org/")
4660 (synopsis "Jupyter protocol implementation and client libraries")
4661 (description
4662 "The @code{jupyter_client} package contains the reference implementation
4663of the Jupyter protocol. It also provides client and kernel management APIs
4664for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4665installing @code{kernelspec}s for use with Jupyter frontends.")
4666 (license license:bsd-3)))
4667
4668(define-public python2-jupyter-client
4669 (package-with-python2 python-jupyter-client))
4670
4671(define-public python-ipykernel
4672 (package
4673 (name "python-ipykernel")
4674 (version "5.1.0")
4675 (source
4676 (origin
4677 (method url-fetch)
4678 (uri (pypi-uri "ipykernel" version))
4679 (sha256
4680 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4681 (build-system python-build-system)
4682 (arguments
4683 `(#:phases
4684 (modify-phases %standard-phases
4685 (replace 'check
4686 (lambda _
4687 (setenv "HOME" "/tmp")
4688 (invoke "pytest" "-v")
4689 #t)))))
4690 (propagated-inputs
4691 `(("python-ipython" ,python-ipython)
4692 ;; imported at runtime during connect
4693 ("python-jupyter-client" ,python-jupyter-client)))
4694 (native-inputs
4695 `(("python-pytest" ,python-pytest)
4696 ("python-nose" ,python-nose)))
4697 (home-page "https://ipython.org")
4698 (synopsis "IPython Kernel for Jupyter")
4699 (description
4700 "This package provides the IPython kernel for Jupyter.")
4701 (license license:bsd-3)))
4702
4703(define-public python2-ipykernel
4704 (package-with-python2 python-ipykernel))
4705
966aa714
AE
4706(define-public python-pari-jupyter
4707 (package
4708 (name "python-pari-jupyter")
4709 (version "1.3.2")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "pari_jupyter" version))
4714 (sha256
4715 (base32
4716 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4717 (build-system python-build-system)
4718 (propagated-inputs
4719 `(("python-ipykernel" ,python-ipykernel)))
4720 (inputs
4721 `(("pari-gp" ,pari-gp)
4722 ("readline" ,readline)))
4723 (arguments
4724 `(#:tests? #f)) ; no test suite
4725 (home-page
4726 "https://github.com/jdemeyer/pari_jupyter")
4727 (synopsis "A Jupyter kernel for PARI/GP")
4728 (description "The package provides a PARI/GP kernel for Jupyter.")
4729 (license license:gpl3+)))
4730
44d10b1f
RW
4731;; This is the latest release of the LTS version of ipython with support for
4732;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4733;; dropped support for Python 2.7. We may want to rename this package.
4734(define-public python-ipython
4735 (package
4736 (name "python-ipython")
4737 (version "5.8.0")
4738 (source
4739 (origin
4740 (method url-fetch)
4741 (uri (pypi-uri "ipython" version ".tar.gz"))
4742 (sha256
4743 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4744 (build-system python-build-system)
4745 (outputs '("out" "doc"))
4746 (propagated-inputs
4747 `(("python-pyzmq" ,python-pyzmq)
4748 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4749 ("python-terminado" ,python-terminado)
4750 ("python-matplotlib" ,python-matplotlib)
4751 ("python-numpy" ,python-numpy)
4752 ("python-numpydoc" ,python-numpydoc)
4753 ("python-jinja2" ,python-jinja2)
4754 ("python-mistune" ,python-mistune)
4755 ("python-pexpect" ,python-pexpect)
4756 ("python-pickleshare" ,python-pickleshare)
4757 ("python-simplegeneric" ,python-simplegeneric)
4758 ("python-jsonschema" ,python-jsonschema)
4759 ("python-traitlets" ,python-traitlets)
4760 ("python-nbformat" ,python-nbformat)
4761 ("python-pygments" ,python-pygments)))
4762 (inputs
4763 `(("readline" ,readline)
4764 ("which" ,which)))
4765 (native-inputs
4766 `(("graphviz" ,graphviz)
4767 ("pkg-config" ,pkg-config)
4768 ("python-requests" ,python-requests) ;; for tests
4769 ("python-testpath" ,python-testpath)
4770 ("python-nose" ,python-nose)
4771 ("python-sphinx" ,python-sphinx)
4772 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4773 ;; FIXME: It's possible that a smaller union would work just as well.
4774 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4775 texlive-fonts-ec
4776 texlive-generic-ifxetex
4777 texlive-generic-pdftex
4778 texlive-latex-amsfonts
4779 texlive-latex-capt-of
4780 texlive-latex-cmap
4781 texlive-latex-environ
4782 texlive-latex-eqparbox
4783 texlive-latex-etoolbox
4784 texlive-latex-expdlist
4785 texlive-latex-fancyhdr
4786 texlive-latex-fancyvrb
4787 texlive-latex-fncychap
4788 texlive-latex-float
4789 texlive-latex-framed
4790 texlive-latex-geometry
4791 texlive-latex-graphics
4792 texlive-latex-hyperref
4793 texlive-latex-mdwtools
4794 texlive-latex-multirow
4795 texlive-latex-oberdiek
4796 texlive-latex-parskip
4797 texlive-latex-preview
4798 texlive-latex-tabulary
4799 texlive-latex-threeparttable
4800 texlive-latex-titlesec
4801 texlive-latex-trimspaces
4802 texlive-latex-ucs
4803 texlive-latex-upquote
4804 texlive-latex-url
4805 texlive-latex-varwidth
4806 texlive-latex-wrapfig)))
4807 ("texinfo" ,texinfo)))
4808 (arguments
4809 `(#:phases
4810 (modify-phases %standard-phases
4811 (add-after 'install 'install-doc
4812 (lambda* (#:key inputs outputs #:allow-other-keys)
4813 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4814 (doc (string-append data "/doc/" ,name "-" ,version))
4815 (html (string-append doc "/html"))
4816 (man1 (string-append data "/man/man1"))
4817 (info (string-append data "/info"))
4818 (examples (string-append doc "/examples"))
4819 (python-arg (string-append "PYTHON=" (which "python"))))
4820 (setenv "LANG" "en_US.utf8")
4821 ;; Make installed package available for running the tests
4822 (add-installed-pythonpath inputs outputs)
4823 (with-directory-excursion "docs"
4824 ;; FIXME: pdf fails to build
4825 ;;(system* "make" "pdf" "PAPER=a4")
4826 (system* "make" python-arg "html")
4827 (system* "make" python-arg "info"))
4828 (copy-recursively "docs/man" man1)
4829 (copy-recursively "examples" examples)
4830 (copy-recursively "docs/build/html" html)
4831 ;; (copy-file "docs/build/latex/ipython.pdf"
4832 ;; (string-append doc "/ipython.pdf"))
4833 (mkdir-p info)
4834 (copy-file "docs/build/texinfo/ipython.info"
4835 (string-append info "/ipython.info"))
4836 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4837 #t))
4838 ;; Tests can only be run after the library has been installed and not
4839 ;; within the source directory.
4840 (delete 'check)
4841 (add-after 'install 'check
4842 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4843 (if tests?
4844 (begin
4845 ;; Make installed package available for running the tests
4846 (add-installed-pythonpath inputs outputs)
4847 (setenv "HOME" "/tmp/") ;; required by a test
4848 ;; We only test the core because one of the other tests
4849 ;; tries to import ipykernel.
4850 (invoke "python" "IPython/testing/iptest.py"
4851 "-v" "IPython/core/tests"))
4852 #t)))
4853 (add-before 'check 'fix-tests
4854 (lambda* (#:key inputs #:allow-other-keys)
4855 (substitute* "./IPython/utils/_process_posix.py"
4856 (("/usr/bin/env', 'which") (which "which")))
4857 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4858 (("#!/usr/bin/env python")
4859 (string-append "#!" (which "python"))))
4860 ;; Disable 1 failing test
4861 (substitute* "./IPython/core/tests/test_magic.py"
4862 (("def test_dirops\\(\\):" all)
4863 (string-append "@dec.skipif(True)\n" all)))
4864 ;; This test introduces a circular dependency on ipykernel
4865 ;; (which depends on ipython).
4866 (delete-file "IPython/core/tests/test_display.py")
4867 ;; These tests throw errors for unknown reasons.
4868 (delete-file "IPython/extensions/tests/test_storemagic.py")
4869 (delete-file "IPython/core/tests/test_displayhook.py")
4870 (delete-file "IPython/core/tests/test_interactiveshell.py")
4871 (delete-file "IPython/core/tests/test_pylabtools.py")
4872 (delete-file "IPython/core/tests/test_paths.py")
4873 #t)))))
4874 (home-page "https://ipython.org")
4875 (synopsis "IPython is a tool for interactive computing in Python")
4876 (description
4877 "IPython provides a rich architecture for interactive computing with:
4878Powerful interactive shells, a browser-based notebook, support for interactive
4879data visualization, embeddable interpreters and tools for parallel
4880computing.")
4881 (license license:bsd-3)
4882 (properties `((python2-variant . ,(delay python2-ipython))))))
4883
4884(define-public python2-ipython
4885 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4886 (package
4887 (inherit ipython)
4888 ;; FIXME: add pyreadline once available.
4889 (propagated-inputs
4890 `(("python2-backports-shutil-get-terminal-size"
4891 ,python2-backports-shutil-get-terminal-size)
4892 ("python2-pathlib2" ,python2-pathlib2)
4893 ,@(package-propagated-inputs ipython)))
4894 (native-inputs
4895 `(("python2-mock" ,python2-mock)
4896 ,@(package-native-inputs ipython))))))
4897
4898(define-public python-urwid
4899 (package
4900 (name "python-urwid")
4901 (version "2.0.1")
4902 (source
4903 (origin
4904 (method url-fetch)
4905 (uri (pypi-uri "urwid" version))
4906 (sha256
4907 (base32
4908 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4909 (build-system python-build-system)
4910 (home-page "http://urwid.org")
4911 (synopsis "Console user interface library for Python")
4912 (description
4913 "Urwid is a curses-based UI/widget library for Python. It includes many
4914features useful for text console applications.")
4915 (license license:lgpl2.1+)))
4916
4917(define-public python2-urwid
4918 (package-with-python2 python-urwid))
4919
4920(define-public python-urwidtrees
4921 (package
4922 (name "python-urwidtrees")
4923 (version "1.0.2")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 ;; package author intends on distributing via github rather than pypi:
4928 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4929 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4930 version ".tar.gz"))
4931 (file-name (string-append name "-" version ".tar.gz"))
4932 (sha256
4933 (base32
4934 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4935 (build-system python-build-system)
4936 (arguments
4937 '(#:tests? #f)) ; no tests
4938 (propagated-inputs `(("python-urwid" ,python-urwid)))
4939 (home-page "https://github.com/pazz/urwidtrees")
4940 (synopsis "Tree widgets for urwid")
4941 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4942toolkit. Use it to build trees of widgets.")
4943 (license license:gpl3+)))
4944
4945(define-public python2-urwidtrees
4946 (package-with-python2 python-urwidtrees))
4947
4948(define-public python-ua-parser
4949 (package
4950 (name "python-ua-parser")
4951 (version "0.8.0")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "ua-parser" version))
4956 (sha256
4957 (base32
4958 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4959 (build-system python-build-system)
4960 (arguments
4961 `(#:tests? #f)) ;no test suite in release
4962 (native-inputs
4963 `(("python-pyyaml" ,python-pyyaml)))
4964 (home-page "https://github.com/ua-parser/uap-python")
4965 (synopsis "User agent parser")
4966 (description
4967 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4968 (license license:asl2.0)))
4969
4970(define-public python2-ua-parser
4971 (package-with-python2 python-ua-parser))
4972
4973(define-public python-user-agents
4974 (package
4975 (name "python-user-agents")
4976 (version "1.1.0")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "user-agents" version))
4981 (sha256
4982 (base32
4983 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4984 (build-system python-build-system)
4985 (arguments
4986 `(#:tests? #f)) ;missing devices.json test file in release
4987 (propagated-inputs
4988 `(("python-ua-parser" ,python-ua-parser)))
4989 (home-page "https://github.com/selwin/python-user-agents")
4990 (synopsis "User Agent strings parsing library")
4991 (description
4992 "A library to identify devices (phones, tablets) and their capabilities by
4993parsing (browser/HTTP) user agent strings.")
4994 (license license:expat)))
4995
4996(define-public python2-user-agents
4997 (package-with-python2 python-user-agents))
4998
4999(define-public python-dbus
5000 (package
5001 (name "python-dbus")
5002 (version "1.2.8")
5003 (source
5004 (origin
5005 (method url-fetch)
5006 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5007 "dbus-python-" version ".tar.gz"))
5008 (sha256
5009 (base32
5010 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5011 (build-system gnu-build-system)
5012 (arguments
5013 '(#:phases
5014 (modify-phases %standard-phases
5015 (add-before
5016 'check 'pre-check
5017 (lambda _
5018 ;; XXX: For the missing '/etc/machine-id'.
5019 (substitute* "test/run-test.sh"
5020 (("DBUS_FATAL_WARNINGS=1")
5021 "DBUS_FATAL_WARNINGS=0"))
5022 #t)))))
5023 (native-inputs
5024 `(("pkg-config" ,pkg-config)))
5025 (inputs
5026 `(("python" ,python-wrapper)
5027 ("dbus-glib" ,dbus-glib)))
5028 (synopsis "Python bindings for D-bus")
5029 (description "python-dbus provides bindings for libdbus, the reference
5030implementation of D-Bus.")
5031 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5032 (license license:expat)))
5033
5034(define-public python2-dbus
5035 (package (inherit python-dbus)
5036 (name "python2-dbus")
5037 (inputs `(("python" ,python-2)
5038 ,@(alist-delete "python"
5039 (package-inputs python-dbus)
5040 equal?)))
5041 ;; FIXME: on Python 2, the test_utf8 fails with:
5042 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5043 (arguments `(#:tests? #f))))
5044
5045(define-public python-lxml
5046 (package
5047 (name "python-lxml")
5048 (version "4.2.5")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "lxml" version))
5053 (sha256
5054 (base32
5055 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5056 (build-system python-build-system)
5057 (inputs
5058 `(("libxml2" ,libxml2)
5059 ("libxslt" ,libxslt)))
5060 (home-page "http://lxml.de/")
5061 (synopsis
5062 "Python XML processing library")
5063 (description
5064 "The lxml XML toolkit is a Pythonic binding for the C libraries
5065libxml2 and libxslt.")
5066 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5067
5068(define-public python2-lxml
5069 (package-with-python2 python-lxml))
5070
5071;; beautifulsoup4 has a totally different namespace than 3.x,
5072;; and pypi seems to put it under its own name, so I guess we should too
5073(define-public python-beautifulsoup4
5074 (package
5075 (name "python-beautifulsoup4")
5076 (version "4.6.3")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (pypi-uri "beautifulsoup4" version))
5081 (sha256
5082 (base32
5083 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5084 (build-system python-build-system)
5085 (arguments
5086 `(#:phases
5087 (modify-phases %standard-phases
5088 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5089 ;; must use this conversion script when building with Python 3. The
5090 ;; conversion script also runs the tests.
5091 ;; For more information, see the file 'convert-py3k' in the source
5092 ;; distribution.
5093 (replace 'check
dff0197e 5094 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5095 (home-page
5096 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5097 (synopsis
5098 "Python screen-scraping library")
5099 (description
5100 "Beautiful Soup is a Python library designed for rapidly setting up
5101screen-scraping projects. It offers Pythonic idioms for navigating,
5102searching, and modifying a parse tree, providing a toolkit for
5103dissecting a document and extracting what you need. It automatically
5104converts incoming documents to Unicode and outgoing documents to UTF-8.")
5105 (license license:expat)
5106 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5107
5108(define-public python2-beautifulsoup4
5109 (package
5110 (inherit (package-with-python2
5111 (strip-python2-variant python-beautifulsoup4)))
5112 (arguments `(#:python ,python-2))))
5113
5114(define-public python-netifaces
5115 (package
5116 (name "python-netifaces")
5117 (version "0.10.7")
5118 (source
5119 (origin
5120 (method url-fetch)
5121 (uri (pypi-uri "netifaces" version))
5122 (sha256
5123 (base32
5124 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5125 (build-system python-build-system)
5126 (home-page "https://github.com/al45tair/netifaces")
5127 (synopsis
5128 "Python module for portable network interface information")
5129 (description
5130 "Netifaces is a Python module providing information on network
5131interfaces in an easy and portable manner.")
5132 (license license:expat)))
5133
5134(define-public python2-netifaces
5135 (package-with-python2 python-netifaces))
5136
5137(define-public python-networkx
5138 (package
5139 (name "python-networkx")
5140 (version "2.2")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "networkx" version ".zip"))
5145 (sha256
5146 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5147 (build-system python-build-system)
5148 ;; python-decorator is needed at runtime.
5149 (propagated-inputs
5150 `(("python-decorator" ,python-decorator)))
5151 (native-inputs
5152 `(("python-nose" ,python-nose)
5153 ("unzip" ,unzip)))
5154 (home-page "https://networkx.github.io/")
5155 (synopsis "Python module for creating and manipulating graphs and networks")
5156 (description
5157 "NetworkX is a Python package for the creation, manipulation, and study
5158of the structure, dynamics, and functions of complex networks.")
5159 (license license:bsd-3)))
5160
5161(define-public python2-networkx
5162 (package-with-python2 python-networkx))
5163
5164(define-public python-datrie
5165 (package
5166 (name "python-datrie")
5167 (version "0.7.1")
5168 (source
5169 (origin
5170 (method url-fetch)
5171 (uri (pypi-uri "datrie" version))
5172 (sha256
5173 (base32
5174 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5175 (build-system python-build-system)
5176 (arguments
5177 `(#:phases (modify-phases %standard-phases
5178 (add-before 'build 'cythonize
5179 (lambda _
5180 ;; Regenerate Cython classes to solve ABI issues with Python
5181 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5182 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5183 "src/stdio_ext.pxd" "-a"))))))
5184 (native-inputs
5185 `(("python-cython" ,python-cython)
5186 ("python-hypothesis" ,python-hypothesis)
5187 ("python-pytest" ,python-pytest)
5188 ("python-pytest-runner" ,python-pytest-runner)))
5189 (home-page "https://github.com/kmike/datrie")
5190 (synopsis "Fast, efficiently stored trie for Python")
5191 (description
5192 "This package provides a fast, efficiently stored trie implementation for
5193Python.")
5194 (license license:lgpl2.1+)))
5195
5196(define-public snakemake
5197 (package
5198 (name "snakemake")
5199 (version "5.2.4")
5200 (source
5201 (origin
5202 (method url-fetch)
5203 (uri (pypi-uri "snakemake" version))
5204 (sha256
5205 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5206 (build-system python-build-system)
5207 (arguments
5208 ;; TODO: Package missing test dependencies.
5209 '(#:tests? #f
5210 #:phases
5211 (modify-phases %standard-phases
5212 ;; For cluster execution Snakemake will call Python. Since there is
5213 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5214 ;; this by calling the snakemake wrapper instead.
5215 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5216 (lambda* (#:key outputs #:allow-other-keys)
5217 (substitute* "snakemake/executors.py"
5218 (("\\{sys.executable\\} -m snakemake")
5219 (string-append (assoc-ref outputs "out")
5220 "/bin/snakemake")))
5221 #t)))))
5222 (propagated-inputs
5223 `(("python-gitpython" ,python-gitpython)
5224 ("python-wrapt" ,python-wrapt)
5225 ("python-requests" ,python-requests)
5226 ("python-appdirs" ,python-appdirs)
5227 ("python-configargparse" ,python-configargparse)
5228 ("python-datrie" ,python-datrie)
5229 ("python-docutils" ,python-docutils)
5230 ("python-jinja2" ,python-jinja2)
5231 ("python-jsonschema" ,python-jsonschema)
5232 ("python-networkx" ,python-networkx)
5233 ("python-pyyaml" ,python-pyyaml)
5234 ("python-ratelimiter" ,python-ratelimiter)))
5235 (home-page "https://snakemake.readthedocs.io")
5236 (synopsis "Python-based execution environment for make-like workflows")
5237 (description
5238 "Snakemake aims to reduce the complexity of creating workflows by
5239providing a clean and modern domain specific specification language (DSL) in
5240Python style, together with a fast and comfortable execution environment.")
5241 (license license:expat)))
5242
5243;; This is currently needed for the pigx-* packages.
5244(define-public snakemake-4
5245 (package (inherit snakemake)
5246 (version "4.4.0")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "snakemake" version))
5251 (sha256
5252 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5253 (propagated-inputs
5254 `(("python-wrapt" ,python-wrapt)
5255 ("python-requests" ,python-requests)
5256 ("python-appdirs" ,python-appdirs)
5257 ("python-configargparse" ,python-configargparse)
5258 ("python-pyyaml" ,python-pyyaml)
5259 ("python-ratelimiter" ,python-ratelimiter)))))
5260
5261(define-public python-pyqrcode
5262 (package
5263 (name "python-pyqrcode")
5264 (version "1.2.1")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (pypi-uri "PyQRCode" version))
5269 (sha256
5270 (base32
5271 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5272 (build-system python-build-system)
5273 (home-page
5274 "https://github.com/mnooner256/pyqrcode")
5275 (synopsis "QR code generator")
5276 (description
5277 "Pyqrcode is a QR code generator written purely in Python with
5278SVG, EPS, PNG and terminal output.")
5279 (license license:bsd-3)))
5280
5281(define-public python-seaborn
5282 (package
5283 (name "python-seaborn")
5284 (version "0.9.0")
5285 (source
5286 (origin
5287 (method url-fetch)
5288 (uri (pypi-uri "seaborn" version))
5289 (sha256
5290 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5291 (build-system python-build-system)
5292 (arguments
5293 `(#:phases
5294 (modify-phases %standard-phases
5295 (add-before 'check 'start-xserver
5296 (lambda* (#:key inputs #:allow-other-keys)
5297 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5298 ;; There must be a running X server and make check doesn't
5299 ;; start one. Therefore we must do it.
5300 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5301 (setenv "DISPLAY" ":1")
5302 #t)))
5303 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5304 (propagated-inputs
5305 `(("python-pandas" ,python-pandas)
5306 ("python-matplotlib" ,python-matplotlib)
5307 ("python-numpy" ,python-numpy)
5308 ("python-scipy" ,python-scipy)))
5309 (native-inputs
5310 `(("python-pytest" ,python-pytest)
5311 ("xorg-server" ,xorg-server)))
5312 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5313 (synopsis "Statistical data visualization")
5314 (description
5315 "Seaborn is a library for making attractive and informative statistical
5316graphics in Python. It is built on top of matplotlib and tightly integrated
5317with the PyData stack, including support for numpy and pandas data structures
5318and statistical routines from scipy and statsmodels.")
5319 (license license:bsd-3)))
5320
5321(define-public python2-seaborn
5322 (package-with-python2 python-seaborn))
5323
5324(define-public python-mpmath
5325 (package
5326 (name "python-mpmath")
5327 (version "0.19")
5328 (source (origin
5329 (method url-fetch)
5330 (uri (string-append "http://mpmath.org/files/mpmath-"
5331 version ".tar.gz"))
5332 (sha256
5333 (base32
5334 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5335 (build-system python-build-system)
5336 (arguments
5337 '(#:phases
5338 (modify-phases %standard-phases
5339 (replace 'check
5340 (lambda _
5d7a6f1c 5341 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5342 (home-page "http://mpmath.org")
5343 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5344 (description
5345 "@code{mpmath} can be used as an arbitrary-precision substitute for
5346Python's float/complex types and math/cmath modules, but also does much
5347more advanced mathematics.")
5348 (license license:bsd-3)))
5349
5350(define-public python2-mpmath
5351 (package-with-python2 python-mpmath))
5352
5353(define-public python-bigfloat
5354 (package
5355 (name "python-bigfloat")
5356 (version "0.3.0")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "bigfloat" version))
5361 (sha256
5362 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5363 (build-system python-build-system)
5364 (inputs
5365 `(("mpfr" ,mpfr)))
5366 (home-page "https://github.com/mdickinson/bigfloat")
5367 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5368 (description
5369 "This packages provides a Python interface to the MPFR library for
5370multiprecision arithmetic.")
5371 (license license:lgpl3+)))
5372
5373(define-public python2-bigfloat
5374 (package-with-python2 python-bigfloat))
5375
5376(define-public python-sympy
5377 (package
5378 (name "python-sympy")
5379 (version "1.1.1")
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (string-append
5384 "https://github.com/sympy/sympy/releases/download/sympy-"
5385 version "/sympy-" version ".tar.gz"))
5386 (sha256
5387 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5388 (build-system python-build-system)
5389 (arguments
5390 `(#:phases
5391 (modify-phases %standard-phases
5392 ;; Run the core tests after installation. By default it would run
5393 ;; *all* tests, which take a very long time to complete and are known
5394 ;; to be flaky.
5395 (delete 'check)
5396 (add-after 'install 'check
5397 (lambda* (#:key outputs #:allow-other-keys)
5398 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5399 #t)))))
5400 (propagated-inputs
5401 `(("python-mpmath" ,python-mpmath)))
5402 (home-page "http://www.sympy.org/")
5403 (synopsis "Python library for symbolic mathematics")
5404 (description
5405 "SymPy is a Python library for symbolic mathematics. It aims to become a
5406full-featured computer algebra system (CAS) while keeping the code as simple
5407as possible in order to be comprehensible and easily extensible.")
5408 (license license:bsd-3)))
5409
5410(define-public python2-sympy
5411 (package
5412 (inherit (package-with-python2 python-sympy))
5413 (arguments
5414 `(#:phases
5415 (modify-phases %standard-phases
5416 ;; Run the core tests after installation. By default it would run
5417 ;; *all* tests, which take a very long time to complete and are known
5418 ;; to be flaky.
5419 (delete 'check)
5420 (add-after 'install 'check
5421 (lambda* (#:key outputs #:allow-other-keys)
5422 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5423 #t)))))))
5424
5425(define-public python-q
5426 (package
5427 (name "python-q")
5428 (version "2.6")
5429 (source
5430 (origin
5431 (method url-fetch)
5432 (uri (pypi-uri "q" version))
5433 (sha256
5434 (base32
5435 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5436 (build-system python-build-system)
5437 (home-page "https://github.com/zestyping/q")
5438 (synopsis "Quick-and-dirty debugging output for tired programmers")
5439 (description
5440 "q is a Python module for \"print\" style of debugging Python code. It
5441provides convenient short API for print out of values, tracebacks, and
5442falling into the Python interpreter.")
5443 (license license:asl2.0)))
5444
5445(define-public python2-q
5446 (package-with-python2 python-q))
5447
5448(define-public python2-xlib
5449 (package
5450 (name "python2-xlib")
5451 (version "0.14")
5452 (source (origin
5453 (method url-fetch)
5454 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5455 "/" version "/"
5456 "python-xlib-" version ".tar.gz"))
5457 (sha256
5458 (base32
5459 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5460 (build-system python-build-system)
5461 (arguments
5462 `(#:python ,python-2 ;Python 2 only
5463 #:tests? #f)) ;no tests
5464 (home-page "http://python-xlib.sourceforge.net/")
5465 (synopsis "Python X11 client library")
5466 (description
5467 "The Python X Library is intended to be a fully functional X client
5468library for Python programs. It is useful to implement low-level X clients.
5469It is written entirely in Python.")
5470 (license license:gpl2+)))
5471
5472(define-public python-singledispatch
5473 (package
5474 (name "python-singledispatch")
5475 (version "3.4.0.3")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "singledispatch" version))
5480 (sha256
5481 (base32
5482 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5483 (build-system python-build-system)
5484 (native-inputs
5485 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5486 (home-page
5487 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5488 (synopsis "Backport of singledispatch feature from Python 3.4")
5489 (description
5490 "This library brings functools.singledispatch from Python 3.4 to Python
54912.6-3.3.")
5492 (license license:expat)))
5493
5494(define-public python2-singledispatch
5495 (package-with-python2 python-singledispatch))
5496
5497;; the python- version can be removed with python-3.5
5498(define-public python-backports-abc
5499 (package
5500 (name "python-backports-abc")
5501 (version "0.5")
5502 (source
5503 (origin
5504 (method url-fetch)
5505 (uri (pypi-uri "backports_abc" version))
5506 (sha256
5507 (base32
5508 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5509 (build-system python-build-system)
5510 (home-page "https://github.com/cython/backports_abc")
5511 (synopsis "Backport of additions to the 'collections.abc' module")
5512 (description
5513 "Python-backports-abc provides a backport of additions to the
5514'collections.abc' module in Python-3.5.")
5515 (license license:psfl)))
5516
5517(define-public python2-backports-abc
5518 (package-with-python2 python-backports-abc))
5519
5520(define-public python-backports-csv
5521 (package
5522 (name "python-backports-csv")
5523 (version "1.0.5")
5524 (source
5525 (origin
5526 (method url-fetch)
5527 (uri (pypi-uri "backports.csv" version))
5528 (sha256
5529 (base32
5530 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5531 (build-system python-build-system)
5532 (home-page "https://github.com/ryanhiebert/backports.csv")
5533 (synopsis "Backport of Python 3's csv module for Python 2")
5534 (description
5535 "Provides a backport of Python 3's @code{csv} module for parsing
5536comma separated values. The API of the @code{csv} module in Python 2
5537is drastically different from the @code{csv} module in Python 3.
5538This is due, for the most part, to the difference between str in
5539Python 2 and Python 3.")
5540 (license license:psfl)))
5541
5542(define-public python2-backports-csv
5543 (package-with-python2 python-backports-csv))
5544
5545(define-public python2-backports-shutil-get-terminal-size
5546 (package
5547 (name "python2-backports-shutil-get-terminal-size")
5548 (version "1.0.0")
5549 (source
5550 (origin
5551 (method url-fetch)
5552 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5553 (sha256
5554 (base32
5555 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5556 (build-system python-build-system)
5557 (arguments
5558 `(#:python ,python-2
5559 #:phases
5560 (modify-phases %standard-phases
5561 (replace 'check
5562 (lambda _
4a4a7d9a 5563 (invoke "py.test" "-v"))))))
44d10b1f
RW
5564 (native-inputs
5565 `(("python2-pytest" ,python2-pytest)))
5566 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5567 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5568 (description
5569 "This package provides a backport of the @code{get_terminal_size
5570function} from Python 3.3's @code{shutil}.
5571Unlike the original version it is written in pure Python rather than C,
5572so it might be a tiny bit slower.")
5573 (license license:expat)))
5574
5575(define-public python-waf
5576 (package
5577 (name "python-waf")
5578 (version "2.0.11")
5579 (source (origin
5580 (method url-fetch)
5581 (uri (string-append "https://waf.io/"
5582 "waf-" version ".tar.bz2"))
5583 (sha256
5584 (base32
5585 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5586 (build-system python-build-system)
5587 (arguments
5588 '(#:phases
5589 (modify-phases %standard-phases
5590 (replace 'build
5591 (lambda _
5592 (invoke "python" "waf-light" "configure" "build")))
5593 (replace 'check
5594 (lambda _
5595 (invoke "python" "waf" "--version")))
5596 (replace 'install
5597 (lambda* (#:key outputs #:allow-other-keys)
5598 (let ((out (assoc-ref outputs "out")))
5599 (install-file "waf" (string-append out "/bin")))
5600 #t))
5601 ;; waf breaks when it is wrapped.
5602 (delete 'wrap))))
5603 (home-page "https://waf.io/")
5604 (synopsis "Python-based build system")
5605 (description
5606 "Waf is a Python-based framework for configuring, compiling and installing
5607applications.")
5608 (license license:bsd-3)))
5609
5610(define-public python2-waf
5611 (package-with-python2 python-waf))
5612
5613(define-public python-pyzmq
5614 (package
5615 (name "python-pyzmq")
5616 (version "17.1.2")
5617 (source
5618 (origin
5619 (method url-fetch)
5620 (uri (pypi-uri "pyzmq" version))
5621 (sha256
5622 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5623 (build-system python-build-system)
5624 (arguments
5625 `(#:configure-flags
5626 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5627 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5628 ;; --inplace' for 'python setup.py test' to work.
5629 #:tests? #f))
5630 (inputs
5631 `(("zeromq" ,zeromq)))
5632 (native-inputs
5633 `(("pkg-config" ,pkg-config)
5634 ("python-nose" ,python-nose)))
5635 (home-page "https://github.com/zeromq/pyzmq")
5636 (synopsis "Python bindings for 0MQ")
5637 (description
5638 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5639 (license license:bsd-4)))
5640
5641(define-public python2-pyzmq
5642 (package-with-python2 python-pyzmq))
5643
5644(define-public python-pep8
5645 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5646 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5647 ;; some dependents' test suites, and nothing more.
5648 (package
5649 (name "python-pep8")
5650 (version "1.7.0")
5651 (source
5652 (origin
5653 (method url-fetch)
5654 (uri (pypi-uri "pep8" version))
5655 (sha256
5656 (base32
5657 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5658 (build-system python-build-system)
5659 (home-page "https://pep8.readthedocs.org/")
5660 (synopsis "Python style guide checker")
5661 (description
5662 "This tools checks Python code against some of the style conventions in
5663PEP 8.")
5664 (license license:expat)))
5665
5666(define-public python2-pep8
5667 (package-with-python2 python-pep8))
5668
5669(define-public python-pyflakes
5670 (package
5671 (name "python-pyflakes")
5672 (version "2.0.0")
5673 (source
5674 (origin
5675 (method url-fetch)
5676 (uri (pypi-uri "pyflakes" version))
5677 (sha256
5678 (base32
5679 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5680 (build-system python-build-system)
5681 (home-page
5682 "https://github.com/pyflakes/pyflakes")
5683 (synopsis "Passive checker of Python programs")
5684 (description
5685 "Pyflakes statically checks Python source code for common errors.")
5686 (license license:expat)))
5687
5688(define-public python2-pyflakes
5689 (package-with-python2 python-pyflakes))
5690
5691(define-public python-mccabe
5692 (package
5693 (name "python-mccabe")
5694 (version "0.6.1")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "mccabe" version))
5699 (sha256
5700 (base32
5701 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5702 (build-system python-build-system)
5703 (native-inputs
5704 `(("python-pytest" ,python-pytest-bootstrap)
5705 ("python-pytest-runner" ,python-pytest-runner)))
5706 (home-page "https://github.com/flintwork/mccabe")
5707 (synopsis "McCabe checker, plugin for flake8")
5708 (description
5709 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5710complexity of Python source code.")
5711 (license license:expat)))
5712
5713(define-public python2-mccabe
5714 (package-with-python2 python-mccabe))
5715
5716(define-public python-mccabe-0.2.1
5717 (package (inherit python-mccabe)
5718 (version "0.2.1")
5719 (source
5720 (origin
5721 (method url-fetch)
5722 (uri (pypi-uri "mccabe" version))
5723 (sha256
5724 (base32
5725 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5726
5727(define-public python2-mccabe-0.2.1
5728 (package-with-python2 python-mccabe-0.2.1))
5729
5730;; Flake8 2.4.1 requires an older version of pep8.
5731;; This should be removed ASAP.
5732(define-public python-pep8-1.5.7
5733 (package (inherit python-pep8)
5734 (version "1.5.7")
5735 (source
f3576970
RW
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "pep8" version))
5739 (sha256
5740 (base32
5741 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5742 (arguments
5743 ;; XXX Tests not compatible with Python 3.5.
5744 '(#:tests? #f))))
5745
5746(define-public python2-pep8-1.5.7
5747 (package-with-python2 python-pep8-1.5.7))
5748
5749;; Flake8 2.4.1 requires an older version of pyflakes.
5750;; This should be removed ASAP.
5751(define-public python-pyflakes-0.8.1
5752 (package (inherit python-pyflakes)
5753 (version "0.8.1")
5754 (source
8c4dffb5
RW
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "pyflakes" version))
5758 (sha256
5759 (base32
5760 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5761 (arguments
5762 ;; XXX Tests not compatible with Python 3.5.
5763 '(#:tests? #f))))
5764
5765(define-public python2-pyflakes-0.8.1
5766 (package-with-python2 python-pyflakes-0.8.1))
5767
5768;; This package is used by hypothesis which has thousands of dependent packages.
5769;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5770(define-public python-flake8-3.5
5771 (package
5772 (name "python-flake8")
5773 (version "3.5.0")
5774 (source
5775 (origin
5776 (method url-fetch)
5777 (uri (pypi-uri "flake8" version))
5778 (sha256
5779 (base32
5780 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5781 (build-system python-build-system)
5782 (arguments
5783 `(#:phases
5784 (modify-phases %standard-phases
5785 ;; Two errors don't seem to have assigned codes.
5786 (add-after 'unpack 'delete-broken-test
5787 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5788 (add-after 'unpack 'fix-problem-with-pycodestyle
5789 (lambda _
5790 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5791 ;; This should no longer be needed with the next release.
5792 (substitute* "setup.py"
5793 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5794 "PEP8_PLUGIN('break_after_binary_operator'),\
5795PEP8_PLUGIN('break_before_binary_operator'),"))
5796 #t))
5797 (delete 'check)
5798 (add-after 'install 'check
5799 (lambda* (#:key inputs outputs #:allow-other-keys)
5800 (add-installed-pythonpath inputs outputs)
5801 (invoke "pytest" "-v")
5802 #t)))))
5803 (propagated-inputs
5804 `(("python-pycodestyle" ,python-pycodestyle)
5805 ("python-pyflakes" ,python-pyflakes)
5806 ("python-mccabe" ,python-mccabe)))
5807 (native-inputs
5808 `(("python-mock" ,python-mock)
5809 ("python-pytest" ,python-pytest-bootstrap)
5810 ("python-pytest-runner" ,python-pytest-runner)))
5811 (home-page "https://gitlab.com/pycqa/flake8")
5812 (synopsis
5813 "The modular source code checker: pep8, pyflakes and co")
5814 (description
5815 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5816 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5817 (license license:expat)))
5818
5819(define-public python2-flake8-3.5
5820 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5821 (package (inherit base)
5822 (propagated-inputs
5823 `(("python2-configparser" ,python2-configparser)
5824 ("python2-enum34" ,python2-enum34)
5825 ,@(package-propagated-inputs base))))))
5826
5827;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5828;; this newer version. Keep it as a separate variable for now to avoid
5829;; rebuilding "python-hypothesis"; this should be removed in the next
5830;; rebuild cycle.
5831(define-public python-flake8
5832 (package
5833 (inherit python-flake8-3.5)
5834 (version "3.6.0")
5835 (source (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "flake8" version))
5838 (sha256
5839 (base32
5840 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5841 (arguments
5842 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5843 ((#:phases phases)
5844 `(modify-phases ,phases
5845 (delete 'delete-broken-test)
5846 (delete 'fix-problem-with-pycodestyle)))))
5847 (properties `((python2-variant . ,(delay python2-flake8))))))
5848
5849(define-public python2-flake8
5850 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5851 (package (inherit base)
5852 (propagated-inputs
5853 (package-propagated-inputs python2-flake8-3.5)))))
5854
5855;; python-hacking requires flake8 <2.6.0.
5856(define-public python-flake8-2.5
5857 (package
5858 (inherit python-flake8)
5859 (version "2.5.5")
5860 (source (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "flake8" version))
5863 (sha256
5864 (base32
5865 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5866 (propagated-inputs
5867 `(("python-pep8" ,python-pep8)
5868 ,@(package-propagated-inputs python-flake8)))
5869 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5870
5871(define-public python2-flake8-2.5
5872 (package
5873 (inherit python2-flake8)
5874 (version (package-version python-flake8-2.5))
5875 (source (origin
5876 (inherit (package-source python-flake8-2.5))))
5877 (propagated-inputs
5878 `(("python2-pep8" ,python2-pep8)
5879 ,@(package-propagated-inputs python2-flake8)))))
5880
5881(define-public python-flake8-polyfill
5882 (package
5883 (name "python-flake8-polyfill")
5884 (version "1.0.2")
5885 (source
5886 (origin
5887 (method url-fetch)
5888 (uri (pypi-uri "flake8-polyfill" version))
5889 (sha256
5890 (base32
5891 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5892 (build-system python-build-system)
5893 (arguments
5894 '(#:phases
5895 (modify-phases %standard-phases
5896 (replace 'check
5897 (lambda _
5898 (setenv "PYTHONPATH"
5899 (string-append (getcwd) "/build/lib:"
5900 (getenv "PYTHONPATH")))
4f0a0894 5901 (invoke "py.test" "-v"))))))
44d10b1f
RW
5902 (native-inputs
5903 `(("python-flake8" ,python-flake8)
5904 ("python-mock" ,python-mock)
5905 ("python-pep8" ,python-pep8)
5906 ("python-pycodestyle" ,python-pycodestyle)
5907 ("python-pytest" ,python-pytest)))
5908 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5909 (synopsis "Polyfill package for Flake8 plugins")
5910 (description
5911 "This package that provides some compatibility helpers for Flake8
5912plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5913 (license license:expat)))
5914
5915(define-public python2-flake8-polyfill
5916 (package-with-python2 python-flake8-polyfill))
5917
5918(define-public python-mistune
5919 (package
5920 (name "python-mistune")
5921 (version "0.8.4")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "mistune" version))
5926 (sha256
5927 (base32
5928 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5929 (build-system python-build-system)
5930 (native-inputs
5931 `(("python-nose" ,python-nose)
5932 ("python-cython" ,python-cython)))
5933 (home-page "https://github.com/lepture/mistune")
5934 (synopsis "Markdown parser in pure Python")
5935 (description "This package provides a fast markdown parser in pure
5936Python.")
5937 (license license:bsd-3)))
5938
5939(define-public python2-mistune
5940 (package-with-python2 python-mistune))
5941
5942(define-public python-markdown
5943 (package
5944 (name "python-markdown")
5945 (version "3.0.1")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (pypi-uri "Markdown" version))
5950 (sha256
5951 (base32
5952 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5953 (build-system python-build-system)
5954 (native-inputs
5955 `(("python-nose" ,python-nose)
5956 ("python-pyyaml" ,python-pyyaml)))
5957 (home-page "https://python-markdown.github.io/")
5958 (synopsis "Python implementation of Markdown")
5959 (description
5960 "This package provides a Python implementation of John Gruber's
5961Markdown. The library features international input, various Markdown
5962extensions, and several HTML output formats. A command line wrapper
5963markdown_py is also provided to convert Markdown files to HTML.")
5964 (license license:bsd-3)))
5965
5966(define-public python2-markdown
5967 (package-with-python2 python-markdown))
5968
5969(define-public python-ptyprocess
5970 (package
5971 (name "python-ptyprocess")
5972 (version "0.5.2")
5973 (source
5974 (origin
5975 (method url-fetch)
5976 (uri (pypi-uri "ptyprocess" version))
5977 (sha256
5978 (base32
5979 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5980 (build-system python-build-system)
5981 (native-inputs
5982 `(("python-nose" ,python-nose)))
5983 (arguments
5984 `(#:phases
5985 (modify-phases %standard-phases
5986 (replace 'check
7904d6fa 5987 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5988 (home-page "https://github.com/pexpect/ptyprocess")
5989 (synopsis "Run a subprocess in a pseudo terminal")
5990 (description
5991 "This package provides a Python library used to launch a subprocess in a
5992pseudo terminal (pty), and interact with both the process and its pty.")
5993 (license license:isc)))
5994
5995(define-public python2-ptyprocess
5996 (package-with-python2 python-ptyprocess))
5997
5998(define-public python-cram
5999 (package
6000 (name "python-cram")
6001 (version "0.7")
6002 (home-page "https://bitheap.org/cram/")
6003 (source (origin
6004 (method url-fetch)
6005 (uri (list (string-append home-page "cram-"
6006 version ".tar.gz")
6007 (pypi-uri "cram" version)))
6008 (sha256
6009 (base32
6010 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6011 (arguments
6012 '(#:phases
6013 (modify-phases %standard-phases
6014 (add-after 'unpack 'patch-source
6015 (lambda _
6016 (substitute* (find-files "cram" ".*\\.py$")
6017 ;; Replace default shell path.
6018 (("/bin/sh") (which "sh")))
6019 (substitute* (find-files "tests" ".*\\.t$")
6020 (("md5") "md5sum")
6021 (("/bin/bash") (which "bash"))
6022 (("/bin/sh") (which "sh")))
6023 (substitute* "cram/_test.py"
6024 ;; This hack works around a bug triggered by substituting
6025 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6026 ;; "cram -h", which breaks the output at 80 characters. This
6027 ;; causes the line showing the default shell to break into two
6028 ;; lines, but the test expects a single line...
6029 (("env\\['COLUMNS'\\] = '80'")
6030 "env['COLUMNS'] = '160'"))
6031 #t))
6032 (delete 'check)
6033 (add-after 'install 'check
6034 ;; The test phase uses the built library and executable.
6035 ;; It's easier to run it after install since the build
6036 ;; directory contains version-specific PATH.
6037 (lambda* (#:key inputs outputs #:allow-other-keys)
6038 (add-installed-pythonpath inputs outputs)
6039 (setenv "PATH" (string-append (getenv "PATH") ":"
6040 (assoc-ref outputs "out") "/bin"))
2d7db192 6041 (invoke "make" "test"))))))
44d10b1f
RW
6042 (build-system python-build-system)
6043 (native-inputs
6044 `(("python-coverage" ,python-coverage)
6045 ("which" ,which)))
6046 (synopsis "Simple testing framework for command line applications")
6047 (description
6048 "Cram is a functional testing framework for command line applications.
6049Cram tests look like snippets of interactive shell sessions. Cram runs each
6050command and compares the command output in the test with the command’s actual
6051output.")
6052 (license license:gpl2+)))
6053
6054(define-public python2-cram
6055 (package-with-python2 python-cram))
6056
6057(define-public python-straight-plugin
6058 (package
6059 (name "python-straight-plugin")
6060 (version "1.4.1")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "straight.plugin" version))
6065 (sha256
6066 (base32
6067 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6068 (build-system python-build-system)
6069 (home-page "https://github.com/ironfroggy/straight.plugin")
6070 (synopsis "Simple namespaced plugin facility")
6071 (description "Straight Plugin provides a type of plugin you can create from
6072almost any existing Python modules, and an easy way for outside developers to
6073add functionality and customization to your projects with their own plugins.")
6074 (license license:expat)))
6075
6076(define-public python2-straight-plugin
6077 (package-with-python2 python-straight-plugin))
6078
6079(define-public python-fonttools
6080 (package
6081 (name "python-fonttools")
6082 (version "3.28.0")
6083 (source (origin
6084 (method url-fetch)
6085 (uri (pypi-uri "fonttools" version ".zip"))
6086 (sha256
6087 (base32
6088 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6089 (build-system python-build-system)
6090 (native-inputs
6091 `(("unzip" ,unzip)
6092 ("python-pytest" ,python-pytest)
6093 ("python-pytest-runner" ,python-pytest-runner)))
6094 (home-page "https://github.com/behdad/fonttools")
6095 (synopsis "Tools to manipulate font files")
6096 (description
6097 "FontTools/TTX is a library to manipulate font files from Python. It
6098supports reading and writing of TrueType/OpenType fonts, reading and writing
6099of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6100also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6101from an XML-based format.")
6102 (license license:expat)))
6103
6104(define-public python2-fonttools
6105 (package-with-python2 python-fonttools))
6106
6107(define-public python-ly
6108 (package
6109 (name "python-ly")
6110 (version "0.9.5")
6111 (source
6112 (origin
6113 (method url-fetch)
6114 (uri (pypi-uri name version))
6115 (sha256
6116 (base32
6117 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6118 (build-system python-build-system)
6119 (arguments
6120 ;; FIXME: Some tests need network access.
6121 '(#:tests? #f))
6122 (synopsis "Tool and library for manipulating LilyPond files")
6123 (description "This package provides a Python library to parse, manipulate
6124or create documents in LilyPond format. A command line program ly is also
6125provided that can be used to do various manipulations with LilyPond files.")
6126 (home-page "https://pypi.python.org/pypi/python-ly")
6127 (license license:gpl2+)))
6128
6129(define-public python-appdirs
6130 (package
6131 (name "python-appdirs")
6132 (version "1.4.3")
6133 (source
6134 (origin
6135 (method url-fetch)
6136 (uri (pypi-uri "appdirs" version))
6137 (sha256
6138 (base32
6139 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6140 (build-system python-build-system)
6141 (home-page "https://github.com/ActiveState/appdirs")
6142 (synopsis
6143 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6144 (description
6145 "This module provides a portable way of finding out where user data
6146should be stored on various operating systems.")
6147 (license license:expat)))
6148
6149(define-public python2-appdirs
6150 (package-with-python2 python-appdirs))
6151
6152(define-public python-llfuse
6153 (package
6154 (name "python-llfuse")
6155 (version "1.3.5")
6156 (source (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6159 (sha256
6160 (base32
6161 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6162 (build-system python-build-system)
6163 (inputs
6164 `(("fuse" ,fuse)
6165 ("attr" ,attr)))
6166 (native-inputs
6167 `(("pkg-config" ,pkg-config)))
6168 (synopsis "Python bindings for FUSE")
6169 (description
6170 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6171 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6172 (license license:lgpl2.0+)
6173 (properties `((python2-variant . ,(delay python2-llfuse))))))
6174
6175(define-public python2-llfuse
6176 (package (inherit (package-with-python2
6177 (strip-python2-variant python-llfuse)))
6178 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6179
6180;; For attic-0.16
6181(define-public python-llfuse-0.41
6182 (package (inherit python-llfuse)
6183 (version "0.41.1")
6184 (source (origin
6185 (method url-fetch)
6186 (uri (string-append
6187 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6188 "llfuse-" version ".tar.bz2"))
6189 (sha256
6190 (base32
6191 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6192 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6193 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6194 (license (list license:expat license:lgpl2.0+))))
6195
6196(define-public python-msgpack
6197 (package
6198 (name "python-msgpack")
6199 (version "0.5.6")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "msgpack" version))
6203 (sha256
6204 (base32
6205 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6206 (build-system python-build-system)
6207 (arguments
6208 `(#:modules ((guix build utils)
6209 (guix build python-build-system)
6210 (ice-9 ftw)
6211 (srfi srfi-1)
6212 (srfi srfi-26))
6213 #:phases
6214 (modify-phases %standard-phases
6215 (replace 'check
6216 (lambda _
6217 (let ((cwd (getcwd)))
6218 (setenv "PYTHONPATH"
6219 (string-append cwd "/build/"
6220 (find (cut string-prefix? "lib" <>)
6221 (scandir (string-append cwd "/build")))
6222 ":"
6223 (getenv "PYTHONPATH")))
6224 (invoke "pytest" "-v" "test")))))))
6225 (native-inputs
6226 `(("python-pytest" ,python-pytest)))
6227 (synopsis "MessagePack (de)serializer")
6228 (description "MessagePack is a fast, compact binary serialization format,
6229suitable for similar data to JSON. This package provides CPython bindings for
6230reading and writing MessagePack data.")
6231 (home-page "https://pypi.python.org/pypi/msgpack/")
6232 (license license:asl2.0)))
6233
6234;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6235;; release 0.5. Some packages like borg still call it by the old name for now.
6236;; <https://bugs.gnu.org/30662>
6237(define-public python-msgpack-transitional
6238 (package
6239 (inherit python-msgpack)
6240 (name "python-msgpack-transitional")
6241 (arguments
6242 (substitute-keyword-arguments (package-arguments python-msgpack)
6243 ((#:phases phases)
6244 `(modify-phases ,phases
6245 (add-after 'unpack 'configure-transitional
6246 (lambda _
6247 ;; Keep using the old name.
6248 (substitute* "setup.py"
6249 (("TRANSITIONAL = False")
6250 "TRANSITIONAL = 1"))
6251 #t))))))))
6252
6253(define-public python2-msgpack
6254 (package-with-python2 python-msgpack))
6255
6256(define-public python-netaddr
6257 (package
6258 (name "python-netaddr")
6259 (version "0.7.19")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (pypi-uri "netaddr" version))
6264 (sha256
6265 (base32
6266 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6267 (build-system python-build-system)
6268 (arguments `(#:tests? #f)) ;; No tests.
6269 (home-page "https://github.com/drkjam/netaddr/")
6270 (synopsis "Pythonic manipulation of network addresses")
6271 (description
6272 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6273and MAC network addresses.")
6274 (license license:bsd-3)))
6275
6276(define-public python2-netaddr
6277 (package-with-python2 python-netaddr))
6278
6279(define-public python-wrapt
6280 (package
6281 (name "python-wrapt")
dddd7a75 6282 (version "1.11.1")
44d10b1f
RW
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (pypi-uri "wrapt" version))
6287 (sha256
6288 (base32
dddd7a75 6289 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6290 (build-system python-build-system)
6291 (arguments
6292 ;; Tests are not included in the tarball, they are only available in the
6293 ;; git repository.
6294 `(#:tests? #f))
6295 (home-page "https://github.com/GrahamDumpleton/wrapt")
6296 (synopsis "Module for decorators, wrappers and monkey patching")
6297 (description
6298 "The aim of the wrapt module is to provide a transparent object proxy for
6299 Python, which can be used as the basis for the construction of function
6300 wrappers and decorator functions.")
6301 (license license:bsd-2)))
6302
6303(define-public python2-wrapt
6304 (package-with-python2 python-wrapt))
6305
6306(define-public python-xlrd
6307 (package
6308 (name "python-xlrd")
6309 (version "1.0.0")
6310 (source (origin
6311 (method url-fetch)
6312 (uri (pypi-uri "xlrd" version))
6313 (sha256
6314 (base32
6315 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6316 (build-system python-build-system)
6317 (arguments
6318 `(#:phases
6319 (modify-phases %standard-phases
6320 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6321 ;; run tests instead for now.
45fd0081 6322 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6323 (native-inputs `(("python-nose" ,python-nose)))
6324 (home-page "http://www.python-excel.org/")
6325 (synopsis "Library for extracting data from Excel files")
6326 (description "This packages provides a library to extract data from
6327spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6328@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6329Unicode-aware. It is not intended as an end-user tool.")
6330 (license license:bsd-3)))
6331
6332(define-public python2-xlrd
6333 (package-with-python2 python-xlrd))
6334
6335(define-public python-prettytable
6336 (package
6337 (name "python-prettytable")
6338 (version "0.7.2")
6339 (source
6340 (origin
6341 (method url-fetch)
337c3a1e 6342 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6343 (sha256
6344 (base32
6345 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6346 (build-system python-build-system)
6347 (home-page "http://code.google.com/p/prettytable/")
6348 (synopsis "Display tabular data in an ASCII table format")
6349 (description
6350 "A library designed to represent tabular data in visually appealing ASCII
6351tables. PrettyTable allows for selection of which columns are to be printed,
6352independent alignment of columns (left or right justified or centred) and
6353printing of sub-tables by specifying a row range.")
6354 (license license:bsd-3)))
6355
6356(define-public python2-prettytable
6357 (package-with-python2 python-prettytable))
6358
6359(define-public python-tables
6360 (package
6361 (name "python-tables")
6362 (version "3.4.4")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (pypi-uri "tables" version))
6367 (sha256
6368 (base32
6369 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6370 (modules '((guix build utils)))
6371 (snippet
6372 '(begin
6373 ;; Remove pre-compiled .pyc files from source.
6374 (for-each delete-file-recursively
6375 (find-files "." "__pycache__" #:directories? #t))
6376 (for-each delete-file (find-files "." "\\.pyc$"))
6377 #t))))
6378 (build-system python-build-system)
6379 (arguments
6380 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6381 ;; or "check", so we must override the build and check phases.
6382 #:phases
6383 (modify-phases %standard-phases
6384 (add-after 'unpack 'use-gcc
6385 (lambda _
6386 (substitute* "setup.py"
6387 (("compiler = new_compiler\\(\\)" line)
6388 (string-append line
6389 "\ncompiler.set_executables(compiler='gcc',"
6390 "compiler_so='gcc',"
6391 "linker_exe='gcc',"
6392 "linker_so='gcc -shared')")))
6393 #t))
6394 (replace 'build
6395 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6396 (invoke "python" "setup.py" "build"
6397 (string-append "--hdf5="
6398 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6399 (replace 'check
6400 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6401 (invoke "python" "setup.py" "check"
6402 (string-append "--hdf5="
6403 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6404 (propagated-inputs
6405 `(("python-numexpr" ,python-numexpr)
6406 ("python-numpy" ,python-numpy)))
6407 (native-inputs
6408 `(("python-cython" ,python-cython)
6409 ("pkg-config" ,pkg-config)))
6410 (inputs
6411 `(("hdf5" ,hdf5)
6412 ("bzip2" ,bzip2)
6413 ("zlib" ,zlib)))
6414 (home-page "http://www.pytables.org/")
6415 (synopsis "Hierarchical datasets for Python")
6416 (description "PyTables is a package for managing hierarchical datasets and
6417designed to efficiently cope with extremely large amounts of data.")
6418 (license license:bsd-3)))
6419
6420(define-public python2-tables
6421 (package-with-python2 python-tables))
6422
6423(define-public python-pyasn1
6424 (package
6425 (name "python-pyasn1")
6426 (version "0.4.3")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "pyasn1" version))
6431 (sha256
6432 (base32
6433 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6434 (build-system python-build-system)
6435 (home-page "http://pyasn1.sourceforge.net/")
6436 (synopsis "ASN.1 types and codecs")
6437 (description
6438 "This is an implementation of ASN.1 types and codecs in Python. It is
6439suitable for a wide range of protocols based on the ASN.1 specification.")
6440 (license license:bsd-2)))
6441
6442(define-public python2-pyasn1
6443 (package-with-python2 python-pyasn1))
6444
6445(define-public python-pyasn1-modules
6446 (package
6447 (name "python-pyasn1-modules")
6448 (version "0.2.2")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "pyasn1-modules" version))
6453 (sha256
6454 (base32
6455 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6456 (build-system python-build-system)
6457 (propagated-inputs
6458 `(("python-pyasn1" ,python-pyasn1)))
6459 (home-page "https://sourceforge.net/projects/pyasn1/")
6460 (synopsis "ASN.1 codec implementations")
6461 (description
6462 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6463implementations of ASN.1-based codecs and protocols.")
6464 (license license:bsd-3)))
6465
6466(define-public python2-pyasn1-modules
6467 (package-with-python2 python-pyasn1-modules))
6468
6469(define-public python-ipaddress
6470 (package
6471 (name "python-ipaddress")
6472 (version "1.0.22")
6473 (source (origin
6474 (method url-fetch)
6475 (uri (pypi-uri "ipaddress" version))
6476 (sha256
6477 (base32
6478 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6479 (build-system python-build-system)
6480 (home-page "https://github.com/phihag/ipaddress")
6481 (synopsis "IP address manipulation library")
6482 (description
6483 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6484 in Python. This library is used to create, poke at, and manipulate IPv4 and
6485 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6486 module to older versions of Python.")
6487 (license license:psfl)))
6488
6489(define-public python2-ipaddress
6490 (package-with-python2 python-ipaddress))
6491
6492(define-public python2-ipaddr
6493 (package
6494 (name "python2-ipaddr")
6495 (version "2.1.11")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "ipaddr" version))
6500 (sha256
6501 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6502 (build-system python-build-system)
6503 (arguments
6504 `(#:python ,python-2 ;version 2 only
6505 #:phases
6506 (modify-phases %standard-phases
6507 (replace 'check
40b8c4e3 6508 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6509 (home-page "https://github.com/google/ipaddr-py")
6510 (synopsis "IP address manipulation library")
6511 (description
6512 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6513IPv6 addresses and networks.
6514
6515For new implementations you may prefer to use the standard module
6516@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6517versions of Python.")
6518 (license license:asl2.0)))
6519
6520(define-public python-idna
6521 (package
6522 (name "python-idna")
6523 (version "2.7")
6524 (source
6525 (origin
6526 (method url-fetch)
6527 (uri (pypi-uri "idna" version))
6528 (sha256
6529 (base32
6530 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6531 (build-system python-build-system)
6532 (home-page "https://github.com/kjd/idna")
6533 (synopsis "Internationalized domain names in applications")
6534 (description
6535 "This is a library to support the Internationalised Domain Names in
6536Applications (IDNA) protocol as specified in RFC 5891. This version of the
6537protocol is often referred to as “IDNA2008” and can produce different results
6538from the earlier standard from 2003. The library is also intended to act as a
6539suitable drop-in replacement for the “encodings.idna” module that comes with
6540the Python standard library but currently only supports the older 2003
6541specification.")
6542 (license license:bsd-4)))
6543
6544(define-public python2-idna
6545 (package-with-python2 python-idna))
6546
6547(define-public python-idna-ssl
6548 (package
6549 (name "python-idna-ssl")
6550 (version "1.0.1")
6551 (source
6552 (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "idna-ssl" version))
6555 (sha256
6556 (base32
6557 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6558 (build-system python-build-system)
6559 (arguments
6560 `(#:tests? #f)) ;circular dependency with python-aiohttp
6561 (home-page "https://github.com/aio-libs/idna-ssl")
6562 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6563 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6564domains support.")
6565 (license license:expat)))
6566
6567(define-public python-pretend
6568 (package
6569 (name "python-pretend")
6570 (version "1.0.9")
6571 (source
6572 (origin
6573 (method url-fetch)
9f1f22ee 6574 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6575 (sha256
6576 (base32
6577 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6578 (build-system python-build-system)
6579 (home-page "https://github.com/alex/pretend")
6580 (synopsis "Library for stubbing in Python")
6581 (description
6582 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6583technique for writing tests. You may hear the term mixed up with mocks,
6584fakes, or doubles. Basically, a stub is an object that returns pre-canned
6585responses, rather than doing any computation.")
6586 (license license:bsd-3)))
6587
6588(define-public python2-pretend
6589 (package-with-python2 python-pretend))
6590
6591(define-public python-pip
6592 (package
6593 (name "python-pip")
6594 (version "18.1")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "pip" version))
6599 (sha256
6600 (base32
6601 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6602 (build-system python-build-system)
6603 (arguments
6604 '(#:tests? #f)) ; there are no tests in the pypi archive.
6605 (home-page "https://pip.pypa.io/")
6606 (synopsis "Package manager for Python software")
6607 (description
6608 "Pip is a package manager for Python software, that finds packages on the
6609Python Package Index (PyPI).")
6610 (license license:expat)))
6611
6612(define-public python2-pip
6613 (package-with-python2 python-pip))
6614
6615(define-public python-tlsh
6616 (package
6617 (name "python-tlsh")
6618 (version "3.4.5")
6619 (home-page "https://github.com/trendmicro/tlsh")
6620 (source (origin
6621 (method url-fetch)
6622 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6623 version ".tar.gz"))
6624 (sha256
6625 (base32
6626 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6627 (file-name (string-append name "-" version ".tar.gz"))))
6628 (build-system cmake-build-system)
6629 (arguments
6630 '(#:out-of-source? #f
6631 #:phases (modify-phases %standard-phases
6632 (replace
6633 'install
6634 (lambda* (#:key outputs #:allow-other-keys)
6635 ;; Build and install the Python bindings. The underlying
6636 ;; C++ library is apparently not meant to be installed.
6637 (let ((out (assoc-ref outputs "out")))
6638 (with-directory-excursion "py_ext"
6639 (and (system* "python" "setup.py" "build")
6640 (system* "python" "setup.py" "install"
6641 (string-append "--prefix=" out))))))))))
6642 (inputs `(("python" ,python-wrapper))) ;for the bindings
6643 (synopsis "Fuzzy matching library for Python")
6644 (description
6645 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6646Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6647value which can be used for similarity comparisons. Similar objects have
6648similar hash values, which allows for the detection of similar objects by
6649comparing their hash values. The byte stream should have a sufficient amount
6650of complexity; for example, a byte stream of identical bytes will not generate
6651a hash value.")
6652 (license license:asl2.0)))
6653
6654(define-public python2-tlsh
6655 (package
6656 (inherit python-tlsh)
6657 (name "python2-tlsh")
6658 (inputs `(("python" ,python-2)))))
6659
6660(define-public python-termcolor
6661 (package
6662 (name "python-termcolor")
6663 (version "1.1.0")
6664 (source
6665 (origin
6666 (method url-fetch)
6667 (uri (pypi-uri "termcolor" version))
6668 (sha256
6669 (base32
6670 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6671 (build-system python-build-system)
6672 (arguments
6673 ;; There are no tests.
6674 `(#:tests? #f))
6675 (home-page "https://pypi.python.org/pypi/termcolor")
6676 (synopsis "ANSII Color formatting for terminal output")
6677 (description
6678 "This package provides ANSII Color formatting for output in terminals.")
6679 (license license:expat)))
6680
6681(define-public python2-termcolor
6682 (package-with-python2 python-termcolor))
6683
6684(define-public python-libarchive-c
6685 (package
6686 (name "python-libarchive-c")
6687 (version "2.8")
6688 (source (origin
6689 (method url-fetch)
6690 (uri (pypi-uri "libarchive-c" version))
6691 (sha256
6692 (base32
6693 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6694 (build-system python-build-system)
6695 (arguments
6696 '(#:phases (modify-phases %standard-phases
6697 (add-before
6698 'build 'reference-libarchive
6699 (lambda* (#:key inputs #:allow-other-keys)
6700 ;; Retain the absolute file name of libarchive.so.
6701 (let ((libarchive (assoc-ref inputs "libarchive")))
6702 (substitute* "libarchive/ffi.py"
6703 (("find_library\\('archive'\\)")
6704 (string-append "'" libarchive
6705 "/lib/libarchive.so'"))))))
6706 (replace 'check
6707 (lambda _ (invoke "pytest" "-vv"))))))
6708 (native-inputs
6709 `(("python-mock" ,python-mock)
6710 ("python-pytest" ,python-pytest)))
6711 (inputs
6712 `(("libarchive" ,libarchive)))
6713 (home-page "https://github.com/Changaco/python-libarchive-c")
6714 (synopsis "Python interface to libarchive")
6715 (description
6716 "This package provides Python bindings to libarchive, a C library to
6717access possibly compressed archives in many different formats. It uses
6718Python's @code{ctypes} foreign function interface (FFI).")
6719 (license license:lgpl2.0+)))
6720
6721(define-public python2-libarchive-c
6722 (package-with-python2 python-libarchive-c))
6723
6724(define-public python-file
6725 (package
6726 (inherit file)
6727 (name "python-file")
6728 (build-system python-build-system)
6729 (arguments
6730 '(#:tests? #f ;no tests
6731 #:configure-flags '("--single-version-externally-managed" "--root=/")
6732 #:phases (modify-phases %standard-phases
6733 (add-before 'build 'change-directory
6734 (lambda _
6735 (chdir "python")
6736 #t))
6737 (add-before 'build 'set-library-file-name
6738 (lambda* (#:key inputs #:allow-other-keys)
6739 (let ((file (assoc-ref inputs "file")))
6740 (substitute* "magic.py"
6741 (("find_library\\('magic'\\)")
6742 (string-append "'" file "/lib/libmagic.so'")))
6743 #t))))))
6744 (inputs `(("file" ,file)))
6745 (self-native-input? #f)
6746 (synopsis "Python bindings to the libmagic file type guesser. Note that
6747this module and the python-magic module both provide a \"magic.py\" file;
6748these two modules, which are different and were developed separately, both
6749serve the same purpose: provide Python bindings for libmagic.")))
6750
6751(define-public python2-file
6752 (package-with-python2 python-file))
6753
6754(define-public python-debian
6755 (package
6756 (name "python-debian")
6757 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6758 (version "0.1.28")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri name version))
6763 (sha256
6764 (base32
6765 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6766 (build-system python-build-system)
6767 (propagated-inputs
6768 `(("python-six" ,python-six)))
6769 (synopsis "Debian package related modules")
6770 (description
6771 ;; XXX: Use @enumerate instead of @itemize to work around
6772 ;; <http://bugs.gnu.org/21772>.
6773 "This package provides Python modules that abstract many formats of
6774Debian-related files, such as:
6775
6776@enumerate
6777@item Debtags information;
6778@item @file{debian/changelog} files;
6779@item packages files, pdiffs;
6780@item control files of single or multiple RFC822-style paragraphs---e.g.
6781 @file{debian/control}, @file{.changes}, @file{.dsc};
6782@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6783 contained files and meta-information.
6784@end enumerate\n")
6785
6786 ;; Modules are either GPLv2+ or GPLv3+.
6787 (license license:gpl3+)))
6788
6789(define-public python2-debian
6790 (package-with-python2 python-debian))
6791
6792(define-public python-nbformat
6793 (package
6794 (name "python-nbformat")
6795 (version "4.4.0")
6796 (source
6797 (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "nbformat" version))
6800 (sha256
6801 (base32
6802 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6803 (build-system python-build-system)
6804 (arguments `(#:tests? #f)) ; no test target
6805 (propagated-inputs
6806 `(("python-ipython-genutils" ,python-ipython-genutils)
6807 ("python-jsonschema" ,python-jsonschema)
6808 ("python-jupyter-core" ,python-jupyter-core)
6809 ("python-traitlets" ,python-traitlets)))
6810 (home-page "http://jupyter.org")
6811 (synopsis "Jupyter Notebook format")
6812 (description "This package provides the reference implementation of the
6813Jupyter Notebook format and Python APIs for working with notebooks.")
6814 (license license:bsd-3)))
6815
6816(define-public python2-nbformat
6817 (package-with-python2 python-nbformat))
6818
6819(define-public python-bleach
6820 (package
6821 (name "python-bleach")
6822 (version "1.4.3")
6823 (source
6824 (origin
6825 (method url-fetch)
6826 (uri (pypi-uri "bleach" version))
6827 (sha256
6828 (base32
6829 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6830 (build-system python-build-system)
6831 (propagated-inputs
6832 `(("python-html5lib" ,python-html5lib-0.9)
6833 ("python-six" ,python-six)))
6834 (native-inputs
6835 `(("python-nose" ,python-nose)))
6836 (home-page "https://github.com/jsocol/bleach")
6837 (synopsis "Whitelist-based HTML-sanitizing tool")
6838 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6839 (license license:asl2.0)))
6840
6841(define-public python2-bleach
6842 (package-with-python2 python-bleach))
6843
6844(define-public python-entrypoints
6845 (package
6846 (name "python-entrypoints")
a7f1b718 6847 (version "0.3")
44d10b1f
RW
6848 (source
6849 (origin
6850 (method url-fetch)
a7f1b718 6851 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6852 (sha256
6853 (base32
a7f1b718 6854 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6855 (build-system python-build-system)
6856 ;; The package does not come with a setup.py file, so we have to generate
6857 ;; one ourselves.
6858 (arguments
6859 `(#:tests? #f
6860 #:phases
6861 (modify-phases %standard-phases
6862 (add-after 'unpack 'create-setup.py
6863 (lambda _
6864 (call-with-output-file "setup.py"
6865 (lambda (port)
6866 (format port "\
6867from setuptools import setup
6868setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6869" ,version))))))))
6870 (home-page "https://github.com/takluyver/entrypoints")
6871 (synopsis "Discover and load entry points from installed Python packages")
6872 (description "Entry points are a way for Python packages to advertise
6873objects with some common interface. The most common examples are
6874@code{console_scripts} entry points, which define shell commands by
6875identifying a Python function to run. The @code{entrypoints} module contains
6876functions to find and load entry points.")
6877 (license license:expat)))
6878
6879(define-public python2-entrypoints
6880 (package-with-python2 python-entrypoints))
6881
6882(define-public python-nbconvert
6883 (package
6884 (name "python-nbconvert")
6885 (version "5.0.0b1")
6886 (source
6887 (origin
6888 (method url-fetch)
6889 (uri (pypi-uri "nbconvert" version))
6890 (sha256
6891 (base32
6892 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6893 (build-system python-build-system)
6894 (arguments
6895 `(;; The "bdist_egg" target is disabled by default, causing the installation
6896 ;; to fail.
6897 #:configure-flags (list "bdist_egg")
6898 ;; FIXME: 5 failures, 40 errors.
6899 #:tests? #f))
6900 ;; #:phases
6901 ;; (modify-phases %standard-phases
6902 ;; (replace 'check
6903 ;; (lambda _
6904 ;; (zero? (system* "py.test" "-v")))))
6905 (native-inputs
6906 `(("python-pytest" ,python-pytest)))
6907 (propagated-inputs
6908 `(("python-bleach" ,python-bleach)
6909 ("python-entrypoints" ,python-entrypoints)
6910 ("python-jinja2" ,python-jinja2)
6911 ("python-jupyter-core" ,python-jupyter-core)
6912 ("python-mistune" ,python-mistune)
6913 ("python-nbformat" ,python-nbformat)
6914 ("python-pygments" ,python-pygments)
6915 ("python-traitlets" ,python-traitlets)))
6916 (home-page "http://jupyter.org")
6917 (synopsis "Converting Jupyter Notebooks")
6918 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6919notebooks to various other formats via Jinja templates. It allows you to
6920convert an @code{.ipynb} notebook file into various static formats including:
6921
6922@enumerate
6923@item HTML
6924@item LaTeX
6925@item PDF
6926@item Reveal JS
6927@item Markdown (md)
6928@item ReStructured Text (rst)
6929@item executable script
6930@end enumerate\n")
6931 (license license:bsd-3)))
6932
6933(define-public python2-nbconvert
6934 (package-with-python2 python-nbconvert))
6935
44d10b1f
RW
6936(define-public python-notebook
6937 (package
6938 (name "python-notebook")
6939 (version "5.7.4")
6940 (source (origin
6941 (method url-fetch)
6942 (uri (pypi-uri "notebook" version))
6943 (sha256
6944 (base32
6945 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6946 (build-system python-build-system)
6947 (arguments
6948 `(#:phases
6949 (modify-phases %standard-phases
6950 (replace 'check
6951 (lambda _
6952 ;; These tests require a browser
6953 (delete-file-recursively "notebook/tests/selenium")
6954 ;; Some tests need HOME
6955 (setenv "HOME" "/tmp")
6956 ;; This file contains "warningfilters", which are not supported
6957 ;; by this version of nose.
6958 (delete-file "setup.cfg")
6959 (with-directory-excursion "/tmp"
6960 (invoke "nosetests" "-v"))
6961 #t)))))
6962 (propagated-inputs
6963 `(("python-jupyter-core" ,python-jupyter-core)
6964 ("python-nbformat" ,python-nbformat)
6965 ("python-nbconvert" ,python-nbconvert)
6966 ("python-prometheus-client" ,python-prometheus-client)
6967 ("python-send2trash" ,python-send2trash)
6968 ("python-terminado" ,python-terminado)))
6969 (native-inputs
6970 `(("python-nose" ,python-nose)
6971 ("python-sphinx" ,python-sphinx)
6972 ("python-requests" ,python-requests)))
6973 (home-page "http://jupyter.org/")
6974 (synopsis "Web-based notebook environment for interactive computing")
6975 (description
6976 "The Jupyter HTML notebook is a web-based notebook environment for
6977interactive computing.")
6978 (properties `((python2-variant . ,(delay python2-notebook))))
6979 (license license:bsd-3)))
6980
6981(define-public python2-notebook
6982 (let ((base (package-with-python2
6983 (strip-python2-variant python-notebook))))
6984 (package (inherit base)
6985 (native-inputs
6986 `(("python2-mock" ,python2-mock)
6987 ,@(package-native-inputs base)))
6988 (arguments
6989 (substitute-keyword-arguments (package-arguments base)
6990 ((#:phases phases)
6991 `(modify-phases ,phases
6992 (add-before 'check 'disable-test-case
6993 ;; The test requires network access to localhost. Curiously it
6994 ;; fails with Python 2 only. Simply make the test-case return
6995 ;; immediately.
6996 (lambda _
6997 (substitute*
6998 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6999 (("formats = self.nbconvert_api") "return #")))))))))))
7000
7001(define-public python-widgetsnbextension
7002 (package
7003 (name "python-widgetsnbextension")
7004 (version "3.4.2")
7005 (source
7006 (origin
7007 (method url-fetch)
7008 (uri (pypi-uri "widgetsnbextension" version))
7009 (sha256
7010 (base32
7011 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7012 (build-system python-build-system)
7013 (propagated-inputs
7014 `(("python-ipykernel" ,python-ipykernel)
7015 ("python-notebook" ,python-notebook)))
7016 (native-inputs
7017 `(("python-certifi" ,python-certifi)
7018 ("python-nose" ,python-nose)))
7019 (home-page "https://ipython.org")
7020 (synopsis "IPython HTML widgets for Jupyter")
7021 (description "This package provides interactive HTML widgets for Jupyter
7022notebooks.")
7023 (license license:bsd-3)))
7024
7025(define-public python2-widgetsnbextension
7026 (package-with-python2 python-widgetsnbextension))
7027
7028(define-public python-ipywidgets
7029 (package
7030 (name "python-ipywidgets")
7031 (version "5.2.2")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 (uri (pypi-uri "ipywidgets" version))
7036 (sha256
7037 (base32
7038 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7039 (build-system python-build-system)
7040 (propagated-inputs
7041 `(("python-ipython" ,python-ipython)
7042 ("python-traitlets" ,python-traitlets)
7043 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7044 (native-inputs
7045 `(("python-nose" ,python-nose)
7046 ("python-pytest" ,python-pytest)))
7047 (home-page "https://ipython.org")
7048 (synopsis "IPython HTML widgets for Jupyter")
7049 (description "Ipywidgets are interactive HTML widgets for Jupyter
7050notebooks and the IPython kernel. Notebooks come alive when interactive
7051widgets are used. Users gain control of their data and can visualize changes
7052in the data.")
7053 (license license:bsd-3)))
7054
7055(define-public python2-ipywidgets
7056 (package-with-python2 python-ipywidgets))
7057
7058(define-public python-jupyter-console
7059 (package
7060 (name "python-jupyter-console")
7061 (version "5.2.0")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (pypi-uri "jupyter_console" version))
7066 (sha256
7067 (base32
7068 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7069 (build-system python-build-system)
7070 ;; Tests only run in an TTY.
7071 (arguments `(#:tests? #f))
7072 (propagated-inputs
7073 `(("python-ipykernel" ,python-ipykernel)
7074 ("python-jupyter-client" ,python-jupyter-client)
7075 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7076 ("python-pygments" ,python-pygments)))
7077 (native-inputs
7078 `(("python-nose" ,python-nose)))
7079 (home-page "https://jupyter.org")
7080 (synopsis "Jupyter terminal console")
7081 (description "This package provides a terminal-based console frontend for
7082Jupyter kernels. It also allows for console-based interaction with non-Python
7083Jupyter kernels such as IJulia and IRKernel.")
7084 (license license:bsd-3)))
7085
7086(define-public python2-jupyter-console
7087 (package-with-python2 python-jupyter-console))
7088
7089;; The python-ipython and python-jupyter-console require each other. To get
7090;; the functionality in both packages working, strip down the
7091;; python-jupyter-console package when using it as an input to python-ipython.
7092(define python-jupyter-console-minimal
7093 (package
7094 (inherit python-jupyter-console)
7095 (name "python-jupyter-console-minimal")
7096 (arguments
7097 (substitute-keyword-arguments
7098 (package-arguments python-jupyter-console)
7099 ((#:phases phases)
7100 `(modify-phases ,phases
7101 (add-after 'install 'delete-bin
7102 (lambda* (#:key outputs #:allow-other-keys)
7103 ;; Delete the bin files, to avoid conflicts in profiles
7104 ;; where python-ipython and python-jupyter-console are
7105 ;; both present.
7106 (delete-file-recursively
7107 (string-append
7108 (assoc-ref outputs "out") "/bin"))))))))
7109 ;; Remove the python-ipython propagated input, to avoid the cycle
7110 (propagated-inputs
7111 (alist-delete
7112 "python-ipython"
7113 (package-propagated-inputs python-jupyter-console)))))
7114
7115(define-public python-qtconsole
7116 (package
7117 (name "python-qtconsole")
7118 (version "4.4.3")
7119 (source
7120 (origin
7121 (method url-fetch)
7122 (uri (pypi-uri "qtconsole" version))
7123 (sha256
7124 (base32
7125 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7126 (build-system python-build-system)
7127 (arguments
7128 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7129 ;; but we only have the LTS version 5.x. This means that there might be
7130 ;; runtime errors, but since this is a dependency of the Jupyter package,
7131 ;; and Jupyter can be used without the qtconsole we can overlook this for
7132 ;; now.
7133 `(#:tests? #f
7134 #:phases
7135 (modify-phases %standard-phases
7136 (add-before 'check 'pre-check
7137 (lambda _
7138 (setenv "QT_QPA_PLATFORM" "offscreen")
7139 #t)))))
7140 (propagated-inputs
7141 `(("python-ipykernel" ,python-ipykernel)
7142 ("python-ipython" ,python-ipython)))
7143 (native-inputs
7144 `(("python-pytest" ,python-pytest)))
7145 (home-page "http://jupyter.org")
7146 (synopsis "Jupyter Qt console")
7147 (description "This package provides a Qt-based console for Jupyter with
7148support for rich media output.")
7149 (license license:bsd-3)))
7150
7151(define-public jupyter
7152 (package
7153 (name "jupyter")
7154 (version "1.0.0")
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (pypi-uri "jupyter" version))
7159 (sha256
7160 (base32
7161 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7162 (build-system python-build-system)
7163 (arguments '(#:tests? #f)) ; there are none.
7164 (propagated-inputs
7165 `(("python-ipykernel" ,python-ipykernel)
7166 ("python-ipywidgets" ,python-ipywidgets)
7167 ("python-jupyter-console" ,python-jupyter-console)
7168 ("python-nbconvert" ,python-nbconvert)
7169 ("python-notebook" ,python-notebook)
7170 ("python-qtconsole" ,python-qtconsole)))
7171 (native-search-paths
7172 (list (search-path-specification
7173 (variable "JUPYTER_PATH")
7174 (files '("share/jupyter")))))
7175 (home-page "https://jupyter.org")
7176 (synopsis "Web application for interactive documents")
7177 (description
7178 "The Jupyter Notebook is a web application that allows you to create and
7179share documents that contain live code, equations, visualizations and
7180explanatory text. Uses include: data cleaning and transformation, numerical
7181simulation, statistical modeling, machine learning and much more.")
7182 (license license:bsd-3)))
7183
7184(define-public python-chardet
7185 (package
7186 (name "python-chardet")
7187 (version "3.0.4")
7188 (source
7189 (origin
7190 (method url-fetch)
7191 (uri (pypi-uri "chardet" version))
7192 (sha256
7193 (base32
7194 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7195 (native-inputs
7196 `(("python-hypothesis" ,python-hypothesis)
7197 ("python-pytest" ,python-pytest)
7198 ("python-pytest-runner" ,python-pytest-runner)))
7199 (build-system python-build-system)
7200 (home-page "https://github.com/chardet/chardet")
7201 (synopsis "Universal encoding detector for Python 2 and 3")
7202 (description
7203 "This package provides @code{chardet}, a Python module that can
7204automatically detect a wide range of file encodings.")
7205 (license license:lgpl2.1+)))
7206
7207(define-public python2-chardet
7208 (package-with-python2 python-chardet))
7209
7210(define-public python-docopt
7211 (package
7212 (name "python-docopt")
7213 (version "0.6.2")
7214 (source
7215 (origin
7216 (method url-fetch)
7217 ;; The release on PyPI does not include tests.
7218 (uri (string-append
7219 "https://github.com/docopt/docopt/archive/"
7220 version ".tar.gz"))
7221 (file-name (string-append name "-" version ".tar.gz"))
7222 (sha256
7223 (base32
7224 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7225 (build-system python-build-system)
7226 (native-inputs
7227 `(("python-pytest" ,python-pytest)))
7228 (arguments
7229 `(#:phases
7230 (modify-phases %standard-phases
7231 (replace 'check
7232 (lambda _ (invoke "py.test"))))))
7233 (home-page "http://docopt.org")
7234 (synopsis "Command-line interface description language for Python")
7235 (description "This library allows the user to define a command-line
7236interface from a program's help message rather than specifying it
7237programatically with command-line parsers like @code{getopt} and
7238@code{argparse}.")
7239 (license license:expat)))
7240
7241(define-public python2-docopt
7242 (package-with-python2 python-docopt))
7243
7244(define-public python-pythondialog
7245 (package
7246 (name "python-pythondialog")
7247 (version "3.4.0")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "pythondialog" version))
7252 (sha256
7253 (base32
7254 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7255 (build-system python-build-system)
7256 (arguments
7257 `(#:phases
7258 (modify-phases %standard-phases
7259 (add-after 'unpack 'patch-path
7260 (lambda* (#:key inputs #:allow-other-keys)
7261 (let* ((dialog (assoc-ref inputs "dialog")))
7262 ;; Since this library really wants to grovel the search path, we
7263 ;; must hardcode dialog's store path into it.
7264 (substitute* "dialog.py"
7265 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7266 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7267 #t))))
7268 #:tests? #f)) ; no test suite
7269 (propagated-inputs
7270 `(("dialog" ,dialog)))
7271 (home-page "http://pythondialog.sourceforge.net/")
7272 (synopsis "Python interface to the UNIX dialog utility")
7273 (description "A Python wrapper for the dialog utility. Its purpose is to
7274provide an easy to use, pythonic and comprehensive Python interface to dialog.
7275This allows one to make simple text-mode user interfaces on Unix-like systems")
7276 (license license:lgpl2.1)
7277 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7278
7279(define-public python2-pythondialog
7280 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7281 (package
7282 (inherit base)
7283 (version (package-version python-pythondialog))
7284 (source (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "python2-pythondialog" version))
7287 (sha256
7288 (base32
7289 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7290
7291(define-public python-configobj
7292 (package
7293 (name "python-configobj")
7294 (version "5.0.6")
7295 (source (origin
7296 (method url-fetch)
b0758fbb 7297 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7298 (sha256
7299 (base32
7300 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7301 ;; Patch setup.py so it looks for python-setuptools, which is
7302 ;; required to parse the keyword 'install_requires' in setup.py.
7303 (patches (search-patches "python-configobj-setuptools.patch"))))
7304 (build-system python-build-system)
7305 (propagated-inputs
7306 `(("python-six" ,python-six)))
7307 (synopsis "Config file reading, writing and validation")
7308 (description "ConfigObj is a simple but powerful config file reader and
7309writer: an ini file round tripper. Its main feature is that it is very easy to
7310use, with a straightforward programmer’s interface and a simple syntax for
7311config files.")
7312 (home-page "https://github.com/DiffSK/configobj")
7313 (license license:bsd-3)))
7314
7315(define-public python2-configobj
7316 (package-with-python2 python-configobj))
7317
7318(define-public python-configargparse
7319 (package
7320 (name "python-configargparse")
86ae491f 7321 (version "0.14.0")
44d10b1f
RW
7322 (source (origin
7323 (method url-fetch)
7324 (uri (pypi-uri "ConfigArgParse" version))
7325 (sha256
7326 (base32
86ae491f 7327 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7328 (build-system python-build-system)
7329 (native-inputs
7330 `(("python-pyyaml" ,python-pyyaml)))
7331 (arguments
7332 `(#:phases
7333 (modify-phases %standard-phases
7334 (replace 'check
7335 (lambda _
7336 ;; Bypass setuptools-shim because one test relies on "setup.py"
7337 ;; being the first argument passed to the python call.
7338 ;;
7339 ;; NOTE: Many tests do not run because they rely on Python's
7340 ;; built-in test.test_argparse, but we remove the unit tests from
7341 ;; our Python installation.
7342 (invoke "python" "setup.py" "test"))))))
7343 (synopsis "Replacement for argparse")
7344 (description "A drop-in replacement for argparse that allows options to also
7345be set via config files and/or environment variables.")
7346 (home-page "https://github.com/bw2/ConfigArgParse")
7347 (license license:expat)))
7348
7349(define-public python2-configargparse
7350 (package-with-python2 python-configargparse))
7351
7352(define-public python-argparse-manpage
7353 (package
7354 (name "python-argparse-manpage")
7355 (version "1.1")
7356 (source
7357 (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "argparse-manpage" version))
7360 (sha256
7361 (base32
7362 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7363 (build-system python-build-system)
7364 (home-page "https://github.com/praiskup/argparse-manpage")
7365 (synopsis "Build manual page from Python's ArgumentParser object")
7366 (description
7367 "This package provides tools to build manual pages from Python's
7368@code{ArgumentParser} object.")
7369 (license license:asl2.0)))
7370
7371(define-public python2-contextlib2
7372 (package
7373 (name "python2-contextlib2")
7374 (version "0.5.5")
7375 (source
7376 (origin
7377 (method url-fetch)
7378 (uri (pypi-uri "contextlib2" version))
7379 (sha256
7380 (base32
7381 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7382 (build-system python-build-system)
7383 (arguments
7384 `(#:python ,python-2
7385 #:phases
7386 (modify-phases %standard-phases
7387 (replace 'check
7388 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7389 (native-inputs
7390 `(("python2-unittest2" ,python2-unittest2)))
7391 (home-page "http://contextlib2.readthedocs.org/")
7392 (synopsis "Tools for decorators and context managers")
7393 (description "This module is primarily a backport of the Python
73943.2 contextlib to earlier Python versions. Like contextlib, it
7395provides utilities for common tasks involving decorators and context
7396managers. It also contains additional features that are not part of
7397the standard library.")
7398 (license license:psfl)))
7399
7400(define-public python-texttable
7401 (package
7402 (name "python-texttable")
7403 (version "0.8.7")
7404 (source
7405 (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "texttable" version))
7408 (sha256
7409 (base32
7410 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7411 (build-system python-build-system)
7412 (arguments '(#:tests? #f)) ; no tests
7413 (home-page "https://github.com/foutaise/texttable/")
7414 (synopsis "Python module for creating simple ASCII tables")
7415 (description "Texttable is a Python module for creating simple ASCII
7416tables.")
7417 (license license:lgpl2.1+)))
7418
7419(define-public python2-texttable
7420 (package-with-python2 python-texttable))
7421
7422(define-public python-atomicwrites
7423 (package
7424 (name "python-atomicwrites")
7425 (version "1.1.5")
7426 (source (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "atomicwrites" version))
7429 (sha256
7430 (base32
7431 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7432 (build-system python-build-system)
7433 (synopsis "Atomic file writes in Python")
7434 (description "Library for atomic file writes using platform dependent tools
7435for atomic file system operations.")
7436 (home-page "https://github.com/untitaker/python-atomicwrites")
7437 (license license:expat)))
7438
7439(define-public python2-atomicwrites
7440 (package-with-python2 python-atomicwrites))
7441
7442(define-public python-click-threading
7443 (package
7444 (name "python-click-threading")
7445 (version "0.4.4")
7446 (source (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "click-threading" version))
7449 (sha256
7450 (base32
7451 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7452 (build-system python-build-system)
7453 (propagated-inputs
7454 `(("python-click" ,python-click)))
7455 (synopsis "Utilities for multithreading in Click")
7456 (description "This package provides utilities for multithreading in Click
7457applications.")
7458 (home-page "https://github.com/click-contrib/click-threading")
7459 (license license:expat)))
7460
7461(define-public python-click-log
7462 (package
7463 (name "python-click-log")
7464 (version "0.3.2")
7465 (source (origin
7466 (method url-fetch)
7467 (uri (pypi-uri "click-log" version))
7468 (sha256
7469 (base32
7470 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7471 (build-system python-build-system)
7472 (propagated-inputs
7473 `(("python-click" ,python-click)))
7474 (synopsis "Logging for click applications")
7475 (description "This package provides a Python library for logging Click
7476applications.")
7477 (home-page "https://github.com/click-contrib/click-log")
7478 (license license:expat)))
7479
7480(define-public python-apipkg
7481 (package
7482 (name "python-apipkg")
7483 (version "1.4")
7484 (source (origin
7485 (method url-fetch)
7486 (uri (pypi-uri "apipkg" version))
7487 (sha256
7488 (base32
7489 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7490 (build-system python-build-system)
7491 (native-inputs
7492 `(("python-pytest" ,python-pytest)))
7493 (synopsis "Namespace control and lazy-import mechanism")
7494 (description "With apipkg you can control the exported namespace of a Python
7495package and greatly reduce the number of imports for your users. It is a small
7496pure Python module that works on virtually all Python versions.")
7497 (home-page "https://github.com/pytest-dev/apipkg")
7498 (license license:expat)))
7499
7500(define-public python2-apipkg
7501 (package-with-python2 python-apipkg))
7502
7503(define-public python-execnet
7504 (package
7505 (name "python-execnet")
7506 (version "1.4.1")
7507 (source (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "execnet" version))
7510 (sha256
7511 (base32
7512 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7513 (build-system python-build-system)
7514 (arguments
7515 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7516 ;; The two test failures are caused by the lack of an `ssh` executable.
7517 ;; The test suite can be run with pytest after the 'install' phase.
7518 #:tests? #f))
7519 (native-inputs
7520 `(("python-pytest" ,python-pytest)
7521 ("python-setuptools-scm" ,python-setuptools-scm)))
7522 (propagated-inputs
7523 `(("python-apipkg" ,python-apipkg)))
7524 (synopsis "Rapid multi-Python deployment")
7525 (description "Execnet provides a share-nothing model with
7526channel-send/receive communication for distributing execution across many
7527Python interpreters across version, platform and network barriers. It has a
7528minimal and fast API targeting the following uses:
7529@enumerate
7530@item distribute tasks to (many) local or remote CPUs
7531@item write and deploy hybrid multi-process applications
7532@item write scripts to administer multiple environments
7533@end enumerate")
7534 (home-page "http://codespeak.net/execnet/")
7535 (license license:expat)))
7536
7537(define-public python2-execnet
7538 (package-with-python2 python-execnet))
7539
7540(define-public python-icalendar
7541 (package
7542 (name "python-icalendar")
7543 (version "4.0.3")
7544 (source (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "icalendar" version))
7547 (sha256
7548 (base32
7549 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7550 (build-system python-build-system)
7551 (propagated-inputs
7552 `(("python-dateutil" ,python-dateutil)
7553 ("python-pytz" ,python-pytz)))
7554 (synopsis "Python library for parsing iCalendar files")
7555 (description "The icalendar package is a parser/generator of iCalendar
7556files for use with Python.")
7557 (home-page "https://github.com/collective/icalendar")
7558 (license license:bsd-2)))
7559
7560(define-public python-sphinxcontrib-newsfeed
7561 (package
7562 (name "python-sphinxcontrib-newsfeed")
7563 (version "0.1.4")
7564 (source (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7567 (sha256
7568 (base32
7569 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7570 (arguments '(#:tests? #f)) ; No tests.
7571 (build-system python-build-system)
7572 (propagated-inputs
7573 `(("python-sphinx" ,python-sphinx)))
7574 (synopsis "News Feed extension for Sphinx")
7575 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7576Blog, News or Announcements section to a Sphinx website.")
7577 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7578 (license license:bsd-2)))
7579
7580(define-public python-args
7581 (package
7582 (name "python-args")
7583 (version "0.1.0")
7584 (source (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "args" version))
7587 (sha256
7588 (base32
7589 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7590 (build-system python-build-system)
7591 (home-page "https://github.com/kennethreitz/args")
7592 (synopsis "Command-line argument parser")
7593 (description
7594 "This library provides a Python module to parse command-line arguments.")
7595 (license license:bsd-3)))
7596
7597(define-public python2-args
7598 (package-with-python2 python-args))
7599
7600(define-public python-clint
7601 (package
7602 (name "python-clint")
7603 (version "0.5.1")
7604 (source (origin
7605 (method url-fetch)
7606 (uri (pypi-uri "clint" version))
7607 (sha256
7608 (base32
7609 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7610 (build-system python-build-system)
7611 (arguments
7612 '(#:phases
7613 (modify-phases %standard-phases
7614 (replace 'check
7615 (lambda _ (invoke "py.test" "-v"))))))
7616 (native-inputs
7617 `(("python-pytest" ,python-pytest)))
7618 (propagated-inputs
7619 `(("python-args" ,python-args)))
7620 (home-page "https://github.com/kennethreitz/clint")
7621 (synopsis "Command-line interface tools")
7622 (description
7623 "Clint is a Python module filled with a set of tools for developing
7624command-line applications, including tools for colored and indented
7625output, progress bar display, and pipes.")
7626 (license license:isc)))
7627
7628(define-public python2-clint
7629 (package-with-python2 python-clint))
7630
44d10b1f
RW
7631(define-public python-rply
7632 (package
7633 (name "python-rply")
7634 (version "0.7.5")
7635 (source (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "rply" version))
7638 (sha256
7639 (base32
7640 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7641 (build-system python-build-system)
7642 (propagated-inputs
7643 `(("python-appdirs" ,python-appdirs)))
7644 (home-page "https://github.com/alex/rply")
7645 (synopsis "Parser generator for Python")
7646 (description
7647 "This package provides a pure Python based parser generator, that also
7648works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7649with a new public API, and RPython support.")
7650 (license license:bsd-3)))
7651
7652(define-public python2-rply
7653 (package-with-python2 python-rply))
7654
7655(define-public python-hy
7656 (package
7657 (name "python-hy")
7658 (version "0.13.0")
7659 (source (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "hy" version))
7662 (sha256
7663 (base32
7664 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7665 (build-system python-build-system)
7666 (arguments
7667 '(#:phases
7668 (modify-phases %standard-phases
7669 (replace 'check
7670 (lambda _
7671 ;; Tests require write access to HOME.
7672 (setenv "HOME" "/tmp")
7673 (invoke "nosetests"))))))
7674 (native-inputs
7675 `(("python-coverage" ,python-coverage)
7676 ("python-nose" ,python-nose)))
7677 (propagated-inputs
7678 `(("python-astor" ,python-astor)
7679 ("python-clint" ,python-clint)
7680 ("python-rply" ,python-rply)))
7681 (home-page "http://hylang.org/")
7682 (synopsis "Lisp frontend to Python")
7683 (description
7684 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7685its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7686Python at your fingertips, in Lisp form.")
7687 (license license:expat)))
7688
7689(define-public python2-hy
7690 (package-with-python2 python-hy))
7691
7692(define-public python2-functools32
7693 (package
7694 (name "python2-functools32")
7695 (version "3.2.3-2")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "functools32" version))
7700 (sha256
7701 (base32
7702 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7703 (build-system python-build-system)
7704 (arguments
7705 `(#:python ,python-2
7706 #:tests? #f)) ; no test target
7707 (home-page "https://github.com/MiCHiLU/python-functools32")
7708 (synopsis
7709 "Backport of the functools module from Python 3.2.3")
7710 (description
7711 "This package is a backport of the @code{functools} module from Python
77123.2.3 for use with older versions of Python and PyPy.")
7713 (license license:expat)))
7714
7715(define-public python2-subprocess32
7716 (package
7717 (name "python2-subprocess32")
7718 (version "3.2.7")
7719 (source (origin
7720 (method url-fetch)
7721 (uri (pypi-uri "subprocess32" version))
7722 (sha256
7723 (base32
7724 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7725 (patches
7726 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7727 (build-system python-build-system)
7728 (arguments
7729 `(#:python ,python-2
7730 ;; The test suite fails with Python > 2.7.13:
7731 ;; import test.support
7732 ;; ImportError: No module named support
7733 #:tests? #f
7734 #:phases
7735 (modify-phases %standard-phases
7736 (add-after 'unpack 'patch-/bin/sh
7737 (lambda _
7738 (substitute* '("subprocess32.py"
7739 "test_subprocess32.py")
7740 (("/bin/sh") (which "sh")))
7741 #t)))))
7742 (home-page "https://github.com/google/python-subprocess32")
7743 (synopsis "Backport of the subprocess module from Python 3.2")
7744 (description
7745 "This is a backport of the @code{subprocess} standard library module
7746from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7747new features. On POSIX systems it is guaranteed to be reliable when used
7748in threaded applications. It includes timeout support from Python 3.3 but
7749otherwise matches 3.2’s API.")
7750 (license license:psfl)))
7751
7752(define-public python2-futures
7753 (package
7754 (name "python2-futures")
7755 (version "3.2.0")
7756 (source
7757 (origin
7758 (method url-fetch)
7759 (uri (pypi-uri "futures" version))
7760 (sha256
7761 (base32
7762 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7763 (build-system python-build-system)
7764 (arguments `(#:python ,python-2
7765 ;; FIXME: Python 2.7.14 moved the test.support library,
7766 ;; but our package has not yet been adjusted. Enable
7767 ;; tests when the python2 package has been fixed.
7768 #:tests? #f))
7769 (home-page "https://github.com/agronholm/pythonfutures")
7770 (synopsis
7771 "Backport of the concurrent.futures package from Python 3.2")
7772 (description
7773 "The concurrent.futures module provides a high-level interface for
7774asynchronously executing callables. This package backports the
7775concurrent.futures package from Python 3.2")
7776 (license license:bsd-3)))
7777
7778(define-public python-promise
7779 (package
7780 (name "python-promise")
7781 (version "0.4.2")
7782 (source
7783 (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "promise" version))
7786 (sha256
7787 (base32
7788 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7789 (build-system python-build-system)
7790 ;; Tests wants python-futures, which is a python2 only program, and
7791 ;; can't be found by python-promise at test time.
7792 (arguments `(#:tests? #f))
7793 (home-page "https://github.com/syrusakbary/promise")
7794 (synopsis "Promises/A+ implementation for Python")
7795 (description
7796 "Promises/A+ implementation for Python")
7797 (properties `((python2-variant . ,(delay python2-promise))))
7798 (license license:expat)))
7799
7800(define-public python2-promise
7801 (let ((promise (package-with-python2
7802 (strip-python2-variant python-promise))))
7803 (package (inherit promise)
7804 (arguments (substitute-keyword-arguments (package-arguments promise)
7805 ((#:tests? _) #t)))
7806 (native-inputs
7807 `(("python2-futures" ,python2-futures)
7808 ("python2-pytest" ,python2-pytest)
7809 ,@(package-native-inputs promise))))))
7810
7811(define-public python-colorama
7812 (package
7813 (name "python-colorama")
7814 (version "0.3.9")
7815 (source
7816 (origin
7817 (method url-fetch)
7818 (uri (pypi-uri "colorama" version))
7819 (sha256
7820 (base32
7821 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7822 (build-system python-build-system)
7823 (synopsis "Colored terminal text rendering for Python")
7824 (description "Colorama is a Python library for rendering colored terminal
7825text.")
7826 (home-page "https://pypi.python.org/pypi/colorama")
7827 (license license:bsd-3)))
7828
7829(define-public python2-colorama
7830 (package-with-python2 python-colorama))
7831
7832(define-public python-rsa
7833 (package
7834 (name "python-rsa")
7835 (version "3.4.2")
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "rsa" version))
7840 (sha256
7841 (base32
7842 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7843 (build-system python-build-system)
7844 (propagated-inputs
7845 `(("python-pyasn1" ,python-pyasn1)))
7846 (synopsis "Pure-Python RSA implementation")
7847 (description "Python-RSA is a pure-Python RSA implementation. It supports
7848encryption and decryption, signing and verifying signatures, and key
7849generation according to PKCS#1 version 1.5. It can be used as a Python
7850library as well as on the command line.")
7851 (home-page "https://stuvel.eu/rsa")
7852 (license license:asl2.0)))
7853
7854(define-public python2-rsa
7855 (package-with-python2 python-rsa))
7856
7857(define-public python-pluggy
7858 (package
7859 (name "python-pluggy")
7860 (version "0.7.1")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (pypi-uri "pluggy" version))
7865 (sha256
7866 (base32
7867 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7868 (build-system python-build-system)
7869 (native-inputs
7870 `(("python-setuptools-scm" ,python-setuptools-scm)))
7871 (synopsis "Plugin and hook calling mechanism for Python")
7872 (description "Pluggy is an extraction of the plugin manager as used by
7873Pytest but stripped of Pytest specific details.")
7874 (home-page "https://pypi.python.org/pypi/pluggy")
7875 (license license:expat)))
7876
7877(define-public python2-pluggy
7878 (package-with-python2 python-pluggy))
7879
7880(define-public python-tox
7881 (package
7882 (name "python-tox")
7883 (version "2.8.1")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "tox" version))
7888 (sha256
7889 (base32
7890 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7891 (build-system python-build-system)
7892 (arguments
7893 ;; FIXME: Tests require pytest-timeout, which itself requires
7894 ;; pytest>=2.8.0 for installation.
7895 '(#:tests? #f))
7896 (propagated-inputs
7897 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7898 ("python-py" ,python-py)
7899 ("python-virtualenv" ,python-virtualenv)))
7900 (native-inputs
7901 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7902 ("python-pytest" ,python-pytest) ; >= 2.3.5
7903 ("python-setuptools-scm" ,python-setuptools-scm)))
7904 (home-page "http://tox.testrun.org/")
7905 (synopsis "Virtualenv-based automation of test activities")
7906 (description "Tox is a generic virtualenv management and test command line
7907tool. It can be used to check that a package installs correctly with
7908different Python versions and interpreters, or run tests in each type of
7909supported environment, or act as a frontend to continuous integration
7910servers.")
7911 (license license:expat)))
7912
7913(define-public python2-tox
7914 (package-with-python2 python-tox))
7915
7916(define-public python-jmespath
7917 (package
7918 (name "python-jmespath")
7919 (version "0.9.3")
7920 (source
7921 (origin
7922 (method url-fetch)
7923 (uri (pypi-uri "jmespath" version))
7924 (sha256
7925 (base32
7926 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7927 (build-system python-build-system)
7928 (native-inputs
7929 `(("python-nose" ,python-nose)))
7930 (synopsis "JSON Matching Expressions")
7931 (description "JMESPath (pronounced “james path”) is a Python library that
7932allows one to declaratively specify how to extract elements from a JSON
7933document.")
7934 (home-page "https://github.com/jmespath/jmespath.py")
7935 (license license:expat)))
7936
7937(define-public python2-jmespath
7938 (package-with-python2 python-jmespath))
7939
7940(define-public python-botocore
7941 (package
7942 (name "python-botocore")
7943 (version "1.8.43")
7944 (source
7945 (origin
7946 (method url-fetch)
7947 (uri (pypi-uri "botocore" version))
7948 (sha256
7949 (base32
7950 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7951 (build-system python-build-system)
7952 (arguments
7953 ;; FIXME: Many tests are failing.
7954 '(#:tests? #f))
7955 (propagated-inputs
7956 `(("python-dateutil" ,python-dateutil)
7957 ("python-docutils" ,python-docutils)
7958 ("python-jmespath" ,python-jmespath)))
7959 (native-inputs
7960 `(("python-mock" ,python-mock)
7961 ("python-nose" ,python-nose)
7962 ("behave" ,behave)
7963 ("python-tox" ,python-tox)
7964 ("python-wheel" ,python-wheel)))
7965 (home-page "https://github.com/boto/botocore")
7966 (synopsis "Low-level interface to AWS")
7967 (description "Botocore is a Python library that provides a low-level
7968interface to the Amazon Web Services (AWS) API.")
7969 (license license:asl2.0)))
7970
7971(define-public python2-botocore
7972 (package-with-python2 python-botocore))
7973
7974(define-public python-xdo
7975 (package
7976 (name "python-xdo")
7977 (version "0.3")
7978 (source (origin
7979 (method url-fetch)
7980 (uri (string-append
7981 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7982 "python-xdo_" version ".orig.tar.gz"))
7983 (sha256
7984 (base32
7985 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7986 (build-system python-build-system)
7987 (arguments
7988 '(#:phases
7989 (modify-phases %standard-phases
7990 (add-before 'install 'patch-libxdo-path
7991 ;; Hardcode the path of dynamically loaded libxdo library.
7992 (lambda* (#:key inputs #:allow-other-keys)
7993 (let ((libxdo (string-append
7994 (assoc-ref inputs "xdotool")
7995 "/lib/libxdo.so")))
7996 (substitute* "xdo/_xdo.py"
7997 (("find_library\\(\"xdo\"\\)")
7998 (simple-format #f "\"~a\"" libxdo)))
7999 #t))))
8000 #:tests? #f)) ; no tests provided
8001 (propagated-inputs
8002 `(("python-six" ,python-six)))
8003 (inputs
8004 `(("xdotool" ,xdotool)
8005 ("libX11" ,libx11)))
8006 (home-page "https://tracker.debian.org/pkg/python-xdo")
8007 (synopsis "Python library for simulating X11 keyboard/mouse input")
8008 (description "Provides bindings to libxdo for manipulating X11 via simulated
8009input. (Note that this is mostly a legacy library; you may wish to look at
8010python-xdo for newer bindings.)")
8011 (license license:bsd-3)))
8012
8013(define-public python2-xdo
8014 (package-with-python2 python-xdo))
8015
8016(define-public python-mako
8017 (package
8018 (name "python-mako")
8019 (version "1.0.7")
8020 (source
8021 (origin
8022 (method url-fetch)
8023 (uri (pypi-uri "Mako" version))
8024 (sha256
8025 (base32
8026 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8027 (build-system python-build-system)
8028 (propagated-inputs
8029 `(("python-markupsafe" ,python-markupsafe)))
8030 (native-inputs
8031 `(("python-mock" ,python-mock)
8032 ("python-nose" ,python-nose)
8033 ("python-pytest" ,python-pytest)))
7016e620 8034 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8035 (synopsis "Templating language for Python")
8036 (description "Mako is a templating language for Python that compiles
8037templates into Python modules.")
8038 (license license:expat)))
8039
8040(define-public python2-mako
8041 (package-with-python2 python-mako))
8042
8043(define-public python-waitress
8044 (package
8045 (name "python-waitress")
8046 (version "1.1.0")
8047 (source
8048 (origin
8049 (method url-fetch)
8050 (uri (pypi-uri "waitress" version))
8051 (patches (search-patches "python-waitress-fix-tests.patch"))
8052 (sha256
8053 (base32
8054 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8055 (build-system python-build-system)
8056 (home-page "https://github.com/Pylons/waitress")
8057 (synopsis "Waitress WSGI server")
8058 (description "Waitress is meant to be a production-quality pure-Python WSGI
8059server with very acceptable performance.")
8060 (license license:zpl2.1)))
8061
8062(define-public python2-waitress
8063 (package-with-python2 python-waitress))
8064
8065(define-public python-pyquery
8066 (package
8067 (name "python-pyquery")
8068 (version "1.2.17")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 (uri (pypi-uri "pyquery" version))
8073 (sha256
8074 (base32
8075 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8076 (build-system python-build-system)
8077 (native-inputs
8078 `(("python-webob" ,python-webob)
8079 ("python-webtest" ,python-webtest)))
8080 (propagated-inputs
8081 `(("python-lxml" ,python-lxml)
8082 ("python-cssselect" ,python-cssselect)))
8083 (home-page "https://github.com/gawel/pyquery")
8084 (synopsis "Make jQuery-like queries on xml documents")
8085 (description "pyquery allows you to make jQuery queries on xml documents.
8086The API is as much as possible the similar to jQuery. pyquery uses lxml for
8087fast xml and html manipulation.")
8088 (license license:bsd-3)))
8089
44d10b1f
RW
8090(define-public python-anyjson
8091 (package
8092 (name "python-anyjson")
8093 (version "0.3.3")
8094 (source
8095 (origin
8096 (method url-fetch)
8097 (uri (pypi-uri "anyjson" version))
8098 (sha256
8099 (base32
8100 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8101 (build-system python-build-system)
8102 (arguments
8103 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8104 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8105 ;; whatever) so this transformation needs to be done before the tests
8106 ;; can be run. Maybe we could add a build step to transform beforehand
8107 ;; but it could be annoying/difficult.
8108 ;; We can enable tests for the Python 2 version, though, and do below.
8109 #:tests? #f))
8110 (home-page "https://bitbucket.org/runeh/anyjson/")
8111 (synopsis
8112 "Wraps best available JSON implementation in a common interface")
8113 (description
8114 "Anyjson loads whichever is the fastest JSON module installed
8115and provides a uniform API regardless of which JSON implementation is used.")
8116 (license license:bsd-3)
8117 (properties `((python2-variant . ,(delay python2-anyjson))))))
8118
8119(define-public python2-anyjson
8120 (let ((anyjson (package-with-python2
8121 (strip-python2-variant python-anyjson))))
8122 (package
8123 (inherit anyjson)
8124 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8125 #:tests? #t
8126 ,@(package-arguments anyjson)))
8127 (native-inputs `(("python2-nose" ,python2-nose))))))
8128
8129(define-public python-amqp
8130 (package
8131 (name "python-amqp")
8132 (version "2.3.2")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "amqp" version))
8137 (sha256
8138 (base32
8139 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8140 (build-system python-build-system)
8141 (native-inputs
8142 `(("python-case" ,python-case)
8143 ("python-pytest-sugar" ,python-pytest-sugar)
8144 ("python-mock" ,python-mock)))
8145 (propagated-inputs
8146 `(("python-vine" ,python-vine)))
8147 (home-page "https://github.com/celery/py-amqp")
8148 (synopsis
8149 "Low-level AMQP client for Python (fork of amqplib)")
8150 (description
8151 "This is a fork of amqplib which was originally written by Barry Pederson.
8152It is maintained by the Celery project, and used by kombu as a pure python
8153alternative when librabbitmq is not available.")
8154 (license license:lgpl2.1+)
8155 (properties `((python2-variant . ,(delay python2-amqp))))))
8156
8157(define-public python2-amqp
8158 (let ((amqp (package-with-python2
8159 (strip-python2-variant python-amqp))))
8160 (package
8161 (inherit amqp)
8162 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8163 ;; unmaintained. Weirdly, does not do this on the python 3
8164 ;; version?
8165 #:tests? #f
8166 ,@(package-arguments amqp))))))
8167
8168(define-public python-txamqp
8169 (package
8170 (name "python-txamqp")
8171 (version "0.8.2")
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "txAMQP" version))
8176 (sha256
8177 (base32
8178 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8179 (build-system python-build-system)
8180 (propagated-inputs
8181 `(("python-six" ,python-six)
8182 ("python-twisted" ,python-twisted)))
8183 (home-page "https://github.com/txamqp/txamqp")
8184 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8185 (description
8186 "This package provides a Python library for communicating with AMQP peers
8187and brokers using the asynchronous networking framework Twisted. It contains
8188all the necessary code to connect, send and receive messages to/from an
8189AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8190also includes support for using Thrift RPC over AMQP in Twisted
8191applications.")
8192 (license license:asl2.0)))
8193
8194(define-public python2-txamqp
8195 (package-with-python2 python-txamqp))
8196
8197(define-public python-kombu
8198 (package
8199 (name "python-kombu")
8200 (version "4.2.2")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "kombu" version))
8205 (sha256
8206 (base32
8207 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8208 (build-system python-build-system)
8209 (native-inputs
8210 `(("python-mock" ,python-mock)
8211 ("python-case" ,python-case)
8212 ("python-pyro4" ,python-pyro4)
8213 ("python-pytest-sugar" ,python-pytest-sugar)
8214 ("python-pytz" ,python-pytz)))
8215 (propagated-inputs
8216 `(("python-anyjson" ,python-anyjson)
8217 ("python-amqp" ,python-amqp)
8218 ("python-redis" ,python-redis)))
8219 (home-page "https://kombu.readthedocs.io")
8220 (synopsis "Message passing library for Python")
8221 (description "The aim of Kombu is to make messaging in Python as easy as
8222possible by providing an idiomatic high-level interface for the AMQ protocol,
8223and also provide proven and tested solutions to common messaging problems.
8224AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8225message orientation, queuing, routing, reliability and security, for which the
8226RabbitMQ messaging server is the most popular implementation.")
8227 (license license:bsd-3)
8228 (properties `((python2-variant . ,(delay python2-kombu))))))
8229
8230(define-public python2-kombu
8231 (let ((kombu (package-with-python2
8232 (strip-python2-variant python-kombu))))
8233 (package
8234 (inherit kombu)
8235 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8236 ;; It works fine on the python3 variant.
8237 #:tests? #f
8238 ,@(package-arguments kombu)))
8239 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8240 ,@(package-native-inputs kombu))))))
8241
8242(define-public python-billiard
8243 (package
8244 (name "python-billiard")
8245 (version "3.5.0.5")
8246 (source
8247 (origin
8248 (method url-fetch)
8249 (uri (pypi-uri "billiard" version))
8250 (sha256
8251 (base32
8252 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8253 (build-system python-build-system)
8254 (native-inputs
8255 `(("python-case" ,python-case)
8256 ("python-pytest" ,python-pytest)))
8257 (home-page "https://github.com/celery/billiard")
8258 (synopsis
8259 "Python multiprocessing fork with improvements and bugfixes")
8260 (description
8261 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8262multiprocessing package itself is a renamed and updated version of R Oudkerk's
8263pyprocessing package. This standalone variant is intended to be compatible with
8264Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8265 (license license:bsd-3)
8266 (properties `((python2-variant . ,(delay python2-billiard))))))
8267
8268(define-public python2-billiard
8269 (let ((billiard (package-with-python2
8270 (strip-python2-variant python-billiard))))
8271 (package
8272 (inherit billiard)
8273 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8274 ("python2-mock" ,python2-mock)
8275 ,@(package-native-inputs billiard))))))
8276
8277(define-public python-celery
8278 (package
8279 (name "python-celery")
8280 (version "4.2.1")
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "celery" version))
8285 (sha256
8286 (base32
8287 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8288 (build-system python-build-system)
8289 (arguments
8290 '(;; TODO The tests fail with Python 3.7
8291 ;; https://github.com/celery/celery/issues/4849
8292 #:tests? #f
8293 #:phases
8294 (modify-phases %standard-phases
8295 (add-after 'unpack 'patch-requirements
8296 (lambda _
8297 (substitute* "requirements/test.txt"
8298 (("pytest>=3\\.0,<3\\.3")
8299 "pytest>=3.0"))
8300 #t)))))
8301 (native-inputs
8302 `(("python-case" ,python-case)
8303 ("python-pytest" ,python-pytest)))
8304 (propagated-inputs
8305 `(("python-pytz" ,python-pytz)
8306 ("python-billiard" ,python-billiard)
8307 ("python-kombu" ,python-kombu)))
8308 (home-page "https://celeryproject.org")
8309 (synopsis "Distributed Task Queue")
8310 (description "Celery is an asynchronous task queue/job queue based on
8311distributed message passing. It is focused on real-time operation, but
8312supports scheduling as well. The execution units, called tasks, are executed
8313concurrently on a single or more worker servers using multiprocessing,
8314Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8315synchronously (wait until ready).")
8316 (license license:bsd-3)
8317 (properties `((python2-variant . ,(delay python2-celery))))))
8318
8319(define-public python2-celery
8320 (let ((celery (package-with-python2
8321 (strip-python2-variant python-celery))))
8322 (package
8323 (inherit celery)
8324 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8325 ("python2-mock" ,python2-mock)
8326 ,@(package-native-inputs celery))))))
8327
8328(define-public python-translitcodec
8329 (package
8330 (name "python-translitcodec")
8331 (version "0.4.0")
8332 (source
8333 (origin
8334 (method url-fetch)
8335 (uri (pypi-uri "translitcodec" version))
8336 (sha256
8337 (base32
8338 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8339 (build-system python-build-system)
8340 (arguments
8341 `(#:tests? #f)) ; no tests provided
8342 (home-page
8343 "https://github.com/claudep/translitcodec")
8344 (synopsis
8345 "Unicode to 8-bit charset transliteration codec")
8346 (description
8347 "This package contains codecs for transliterating ISO 10646 texts into
8348best-effort representations using smaller coded character sets (ASCII,
8349ISO 8859, etc.).")
8350 (license license:expat)))
8351
8352(define-public python2-translitcodec
8353 (package-with-python2 python-translitcodec))
8354
8355(define-public python-editor
8356 (package
8357 (name "python-editor")
8358 (version "0.5")
8359 (source
8360 (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "python-editor" version))
8363 (sha256
8364 (base32
8365 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8366 (build-system python-build-system)
8367 (home-page
8368 "https://github.com/fmoo/python-editor")
8369 (synopsis
8370 "Programmatically open an editor, capture the result")
8371 (description
8372 "python-editor is a library that provides the editor module for
8373programmatically interfacing with your system's $EDITOR.")
8374 (license license:asl2.0)))
8375
8376(define-public python2-editor
8377 (package-with-python2 python-editor))
8378
8379(define-public python-sphinxcontrib-programoutput
8380 (package
8381 (name "python-sphinxcontrib-programoutput")
8382 (version "0.10")
8383 (source (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8386 (sha256
8387 (base32
8388 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8389 (build-system python-build-system)
8390 (arguments
8391 ;; FIXME: Many tests are failing and the upstream is gone.
8392 '(#:tests? #f))
8393 (propagated-inputs
8394 `(("python-sphinx" ,python-sphinx)))
8395 (synopsis "Sphinx extension to include program output")
8396 (description "A Sphinx extension to literally insert the output of arbitrary
8397commands into documents, helping you to keep your command examples up to date.")
8398 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8399 (license license:bsd-2)))
8400
8401(define-public python2-sphinxcontrib-programoutput
8402 (package-with-python2 python-sphinxcontrib-programoutput))
8403
8404(define-public python-sphinx-repoze-autointerface
8405 (package
8406 (name "python-sphinx-repoze-autointerface")
8407 (version "0.8")
8408 (source (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8411 (sha256
8412 (base32
8413 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8414 (build-system python-build-system)
8415 (arguments '(#:tests? #f)) ; No tests.
8416 (propagated-inputs
8417 `(("python-sphinx" ,python-sphinx)
8418 ("python-zope-interface" ,python-zope-interface)))
8419 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8420 (description "This package defines an extension for the Sphinx documentation
8421system. The extension allows generation of API documentation by
8422introspection of @code{zope.interface} instances in code.")
8423 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8424 (license license:repoze)))
8425
8426(define-public python2-sphinx-repoze-autointerface
8427 (package-with-python2 python-sphinx-repoze-autointerface))
8428
8429(define-public python-vobject
8430 (package
8431 (name "python-vobject")
8432 (version "0.9.5")
8433 (source (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "vobject" version))
8436 (sha256
8437 (base32
8438 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8439 (build-system python-build-system)
8440 (arguments
8441 '(;; The test suite relies on some non-portable Windows interfaces.
8442 #:tests? #f))
8443 (propagated-inputs
8444 `(("python-dateutil" ,python-dateutil)
8445 ("python-pyicu" ,python-pyicu)))
8446 (synopsis "Parse and generate vCard and vCalendar files")
8447 (description "Vobject is intended to be a full featured Python package for
8448parsing and generating vCard and vCalendar files. Currently, iCalendar files
8449are supported and well tested. vCard 3.0 files are supported, and all data
8450should be imported, but only a few components are understood in a sophisticated
8451way.")
8452 (home-page "http://eventable.github.io/vobject/")
8453 (license license:asl2.0)))
8454
8455(define-public python2-vobject
8456 (package-with-python2 python-vobject))
8457
8458(define-public python-munkres
8459 (package
8460 (name "python-munkres")
8461 (version "1.0.8")
8462 (source (origin
8463 (method url-fetch)
8464 (uri (pypi-uri "munkres" version))
8465 (sha256
8466 (base32
8467 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8468 (build-system python-build-system)
8469 (arguments
8470 '(#:tests? #f)) ; no test suite
8471 (home-page "http://software.clapper.org/munkres/")
8472 (synopsis "Implementation of the Munkres algorithm")
8473 (description "The Munkres module provides an implementation of the Munkres
8474algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8475useful for solving the Assignment Problem.")
8476 (license license:bsd-3)))
8477
8478(define-public python2-munkres
8479 (package-with-python2 python-munkres))
8480
8481(define-public python-whoosh
8482 (package
8483 (name "python-whoosh")
8484 (version "2.7.4")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "Whoosh" version))
8489 (sha256
8490 (base32
8491 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8492 (build-system python-build-system)
8493 (native-inputs
8494 `(("python-pytest" ,python-pytest)))
8495 (home-page "https://bitbucket.org/mchaput/whoosh")
8496 (synopsis "Full text indexing, search, and spell checking library")
8497 (description
8498 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8499checking library.")
8500 (license license:bsd-2)))
8501
8502(define-public python2-whoosh
8503 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8504 (package (inherit whoosh)
8505 (propagated-inputs
8506 `(("python2-backport-ssl-match-hostname"
8507 ,python2-backport-ssl-match-hostname)
8508 ,@(package-propagated-inputs whoosh))))))
8509
8510(define-public python-pathlib
8511 (package
8512 (name "python-pathlib")
8513 (version "1.0.1")
8514 (source (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "pathlib" version))
8517 (sha256
8518 (base32
8519 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8520 (build-system python-build-system)
8521 ;; The tests depend on the internal "test" module, which does not provide
8522 ;; a stable interface.
8523 (arguments `(#:tests? #f))
8524 (home-page "https://pathlib.readthedocs.org/")
8525 (synopsis "Object-oriented file system paths")
8526 (description "Pathlib offers a set of classes to handle file system paths.
8527It offers the following advantages over using string objects:
8528
8529@enumerate
8530@item No more cumbersome use of os and os.path functions. Everything can
8531be done easily through operators, attribute accesses, and method calls.
8532@item Embodies the semantics of different path types. For example,
8533comparing Windows paths ignores casing.
8534@item Well-defined semantics, eliminating any inconsistencies or
8535ambiguities (forward vs. backward slashes, etc.).
8536@end enumerate
8537
8538Note: In Python 3.4, pathlib is now part of the standard library. For other
8539Python versions please consider python-pathlib2 instead, which tracks the
8540standard library module. This module (python-pathlib) isn't maintained
8541anymore.")
8542 (license license:expat)))
8543
8544(define-public python2-pathlib
8545 (package-with-python2 python-pathlib))
8546
8547(define-public python2-pathlib2
8548 (package
8549 (name "python2-pathlib2")
8550 (version "2.3.2")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (pypi-uri "pathlib2" version))
8554 (sha256
8555 (base32
8556 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8557 (build-system python-build-system)
8558 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8559 ;; version is 3.4 which already includes this package as part of the
8560 ;; standard library.
8561 (arguments
8562 `(#:python ,python-2))
8563 (propagated-inputs
8564 `(("python2-scandir" ,python2-scandir)
8565 ("python2-six" ,python2-six)))
8566 (home-page "https://pypi.python.org/pypi/pathlib2/")
8567 (synopsis "Object-oriented file system paths - backport of standard
8568pathlib module")
8569 (description "The goal of pathlib2 is to provide a backport of standard
8570pathlib module which tracks the standard library module, so all the newest
8571features of the standard pathlib can be used also on older Python versions.
8572
8573Pathlib offers a set of classes to handle file system paths. It offers the
8574following advantages over using string objects:
8575
8576@enumerate
8577@item No more cumbersome use of os and os.path functions. Everything can
8578be done easily through operators, attribute accesses, and method calls.
8579@item Embodies the semantics of different path types. For example,
8580comparing Windows paths ignores casing.
8581@item Well-defined semantics, eliminating any inconsistencies or
8582ambiguities (forward vs. backward slashes, etc.).
8583@end enumerate")
8584 (license license:expat)))
8585
8586(define-public python2-pathlib2-bootstrap
8587 (hidden-package
8588 (package
8589 (inherit python2-pathlib2)
8590 (name "python2-pathlib2-bootstrap")
8591 (propagated-inputs
8592 `(("python2-scandir" ,python2-scandir)
8593 ("python2-six" ,python2-six-bootstrap))))))
8594
8595(define-public python-jellyfish
8596 (package
8597 (name "python-jellyfish")
8598 (version "0.5.6")
8599 (source (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "jellyfish" version))
8602 (sha256
8603 (base32
8604 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8605 (build-system python-build-system)
8606 (native-inputs
8607 `(("python-pytest" ,python-pytest)))
8608 (home-page "https://github.com/jamesturk/jellyfish")
8609 (synopsis "Approximate and phonetic matching of strings")
8610 (description "Jellyfish uses a variety of string comparison and phonetic
8611encoding algorithms to do fuzzy string matching.")
8612 (license license:bsd-2)
8613 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8614
8615(define-public python2-jellyfish
8616 (let ((jellyfish (package-with-python2
8617 (strip-python2-variant python-jellyfish))))
8618 (package (inherit jellyfish)
8619 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8620 ,@(package-native-inputs jellyfish))))))
8621
8622(define-public python2-unicodecsv
8623 (package
8624 (name "python2-unicodecsv")
8625 (version "0.14.1")
8626 (source (origin
8627 (method url-fetch)
8628 ;; The test suite is not included in the PyPi release.
8629 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8630 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8631 "archive/" version ".tar.gz"))
8632 (file-name (string-append name "-" version ".tar.gz"))
8633 (sha256
8634 (base32
8635 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8636 (build-system python-build-system)
8637 (arguments
8638 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8639 #:python ,python-2))
8640 (native-inputs
8641 `(("python2-unittest2" ,python2-unittest2)))
8642 (home-page "https://github.com/jdunck/python-unicodecsv")
8643 (synopsis "Unicode CSV module for Python 2")
8644 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8645module, adding support for Unicode strings.")
8646 (license license:bsd-2)))
8647
8648(define-public python-rarfile
8649 (package
8650 (name "python-rarfile")
8651 (version "2.8")
8652 (source (origin
8653 (method url-fetch)
8654 (uri (pypi-uri "rarfile" version))
8655 (sha256
8656 (base32
8657 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8658 (build-system python-build-system)
8659 (arguments
8660 '(#:phases
8661 (modify-phases %standard-phases
8662 (replace 'check
8663 ;; Many tests fail, but the installation proceeds.
e59dd341 8664 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8665 (native-inputs
8666 `(("which" ,which))) ; required for tests
8667 (propagated-inputs
8668 `(("libarchive" ,libarchive)))
8669 (home-page "https://github.com/markokr/rarfile")
8670 (synopsis "RAR archive reader for Python")
8671 (description "This is Python module for RAR archive reading. The interface
8672is made as zipfile like as possible.")
8673 (license license:isc)))
8674
8675(define-public python2-rarfile
8676 (package-with-python2 python-rarfile))
8677
8678(define-public python-magic
8679 (package
8680 (name "python-magic")
8681 (version "0.4.15")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "python-magic" version))
8686 (sha256
8687 (base32
8688 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8689 (file-name (string-append name "-" version "-checkout"))))
8690 (build-system python-build-system)
8691 (arguments
8692 ;; The tests are unreliable, so don't run them. The tests fail
8693 ;; under Python3 because they were written for Python2 and
8694 ;; contain import statements that do not work in Python3. One of
8695 ;; the tests fails under Python2 because its assertions are
8696 ;; overly stringent; it relies on comparing output strings which
8697 ;; are brittle and can change depending on the version of
8698 ;; libmagic being used and the system on which the test is
8699 ;; running. In my case, under GuixSD 0.10.0, only one test
8700 ;; failed, and it seems to have failed only because the version
8701 ;; of libmagic that is packaged in Guix outputs a slightly
8702 ;; different (but not wrong) string than the one that the test
8703 ;; expected.
8704 '(#:tests? #f
8705 #:phases (modify-phases %standard-phases
8706 ;; Replace a specific method call with a hard-coded
8707 ;; path to the necessary libmagic.so file in the
8708 ;; store. If we don't do this, then the method call
8709 ;; will fail to find the libmagic.so file, which in
8710 ;; turn will cause any application using
8711 ;; python-magic to fail.
8712 (add-before 'build 'hard-code-path-to-libmagic
8713 (lambda* (#:key inputs #:allow-other-keys)
8714 (let ((file (assoc-ref inputs "file")))
8715 (substitute* "magic.py"
8716 (("ctypes.util.find_library\\('magic'\\)")
8717 (string-append "'" file "/lib/libmagic.so'")))
8718 #t)))
8719 (add-before 'install 'disable-egg-compression
8720 (lambda _
8721 (let ((port (open-file "setup.cfg" "a")))
8722 (display "\n[easy_install]\nzip_ok = 0\n"
8723 port)
8724 (close-port port)
8725 #t))))))
8726 (inputs
8727 ;; python-magic needs to be able to find libmagic.so.
8728 `(("file" ,file)))
8729 (home-page
8730 "https://github.com/ahupp/python-magic")
8731 (synopsis
8732 "File type identification using libmagic")
8733 (description
8734 "This module uses ctypes to access the libmagic file type
8735identification library. It makes use of the local magic database and
8736supports both textual and MIME-type output. Note that this module and
8737the python-file module both provide a \"magic.py\" file; these two
8738modules, which are different and were developed separately, both serve
8739the same purpose: to provide Python bindings for libmagic.")
8740 (license license:expat)))
8741
8742(define-public python2-magic
8743 (package-with-python2 python-magic))
8744
8745(define-public python2-s3cmd
8746 (package
8747 (name "python2-s3cmd")
8748 (version "1.6.1")
8749 (source
8750 (origin
8751 (method url-fetch)
8752 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8753 "s3cmd-" version ".tar.gz"))
8754 (sha256
8755 (base32
8756 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8757 (build-system python-build-system)
8758 (arguments
8759 ;; s3cmd is written for python2 only and contains no tests.
8760 `(#:python ,python-2
8761 #:tests? #f))
8762 (propagated-inputs
8763 `(("python2-dateutil" ,python2-dateutil)
8764 ;; The python-file package also provides a magic.py module.
8765 ;; This is an unfortunate state of affairs; however, s3cmd
8766 ;; fails to install if it cannot find specifically the
8767 ;; python-magic package. Thus we include it, instead of using
8768 ;; python-file. Ironically, s3cmd sometimes works better
8769 ;; without libmagic bindings at all:
8770 ;; https://github.com/s3tools/s3cmd/issues/198
8771 ("python2-magic" ,python2-magic)))
8772 (home-page "http://s3tools.org/s3cmd")
8773 (synopsis "Command line tool for S3-compatible storage services")
8774 (description
8775 "S3cmd is a command line tool for uploading, retrieving and managing data
8776in storage services that are compatible with the Amazon Simple Storage
8777Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8778GnuPG encryption, and more. It also supports management of Amazon's
8779CloudFront content delivery network.")
8780 (license license:gpl2+)))
8781
8782(define-public python-pkgconfig
8783 (package
8784 (name "python-pkgconfig")
8785 (version "1.3.1")
8786 (source
8787 (origin
8788 (method url-fetch)
8789 (uri (pypi-uri "pkgconfig" version))
8790 (sha256
8791 (base32
8792 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8793 (build-system python-build-system)
8794 (native-inputs
8795 `(("python-nose" ,python-nose)))
8796 (inputs
8797 `(("pkg-config" ,pkg-config)))
8798 (arguments
8799 `(#:phases
8800 (modify-phases %standard-phases
8801 (add-before 'build 'patch
8802 ;; Hard-code the path to pkg-config.
8803 (lambda _
8804 (substitute* "pkgconfig/pkgconfig.py"
8805 (("cmd = 'pkg-config")
8806 (string-append "cmd = '" (which "pkg-config"))))
8807 #t))
8808 (replace 'check
8809 (lambda _
8810 (invoke "nosetests" "test.py"))))))
8811 (home-page "https://github.com/matze/pkgconfig")
8812 (synopsis "Python interface for pkg-config")
8813 (description "This module provides a Python interface to pkg-config. It
8814can be used to find all pkg-config packages, check if a package exists,
8815check if a package meets certain version requirements, query CFLAGS and
8816LDFLAGS and parse the output to build extensions with setup.py.")
8817 (license license:expat)))
8818
8819(define-public python2-pkgconfig
8820 (package-with-python2 python-pkgconfig))
8821
8822(define-public python-bz2file
8823 (package
8824 (name "python-bz2file")
8825 (version "0.98")
8826 (source
8827 (origin
8828 (method url-fetch)
8829 (uri (pypi-uri "bz2file" version))
8830 (sha256
8831 (base32
8832 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8833 (build-system python-build-system)
8834 (arguments
8835 `(#:tests? #f)) ; Tests use deprecated python modules.
8836 (home-page "https://github.com/nvawda/bz2file")
8837 (synopsis "Read and write bzip2-compressed files")
8838 (description
8839 "Bz2file is a Python library for reading and writing bzip2-compressed
8840files. It contains a drop-in replacement for the I/O interface in the
8841standard library's @code{bz2} module, including features from the latest
8842development version of CPython that are not available in older releases.")
8843 (license license:asl2.0)))
8844
8845(define-public python2-bz2file
8846 (package-with-python2 python-bz2file))
8847
8848(define-public python-future
8849 (package
8850 (name "python-future")
8851 (version "0.16.0")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "future" version))
8856 (sha256
8857 (base32
8858 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8859 (build-system python-build-system)
8860 ;; Many tests connect to the network or are otherwise flawed.
8861 ;; https://github.com/PythonCharmers/python-future/issues/210
8862 (arguments
8863 `(#:tests? #f))
8864 (home-page "http://python-future.org")
8865 (synopsis "Single-source support for Python 3 and 2")
8866 (description
8867 "@code{python-future} is the missing compatibility layer between Python 2 and
8868Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8869to support both Python 2 and Python 3 with minimal overhead.")
8870 (license license:expat)))
8871
8872(define-public python2-future
8873 (package-with-python2 python-future))
8874
8875(define-public python-cysignals
8876 (package
8877 (name "python-cysignals")
8e3e51df 8878 (version "1.9.0")
44d10b1f
RW
8879 (source
8880 (origin
8881 (method url-fetch)
8e3e51df 8882 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8883 (sha256
8884 (base32
8e3e51df 8885 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8886 (build-system python-build-system)
8887 (native-inputs
8888 `(("python-cython" ,python-cython)
8889 ("python-sphinx" ,python-sphinx)))
8890 (inputs
8891 `(("pari-gp" ,pari-gp)))
8892 (arguments
8893 `(#:modules ((guix build python-build-system)
8894 ((guix build gnu-build-system) #:prefix gnu:)
8895 (guix build utils))
8896 ;; FIXME: Tests are executed after installation and currently fail
8897 ;; when not installing into standard locations; the author is working
8898 ;; on a fix.
8899 #:tests? #f
8900 #:phases
8901 (modify-phases %standard-phases
8902 (add-before
8903 'build 'configure
8904 (assoc-ref gnu:%standard-phases 'configure)))))
8905 (home-page
8906 "https://github.com/sagemath/cysignals")
8907 (synopsis
8908 "Handling of interrupts and signals for Cython")
8909 (description
8910 "The cysignals package provides mechanisms to handle interrupts (and
8911other signals and errors) in Cython code, using two related approaches,
8912for mixed Cython/Python code or external C libraries and pure Cython code,
8913respectively.")
8914 (license license:lgpl3+)))
8915
8916(define-public python2-cysignals
8917 (package-with-python2 python-cysignals))
8918
8919(define-public python2-shedskin
8920 (package
8921 (name "python2-shedskin")
8922 (version "0.9.4")
8923 (source
8924 (origin
8925 (method url-fetch)
8926 (uri (string-append "https://github.com/shedskin/shedskin/"
8927 "releases/download/v" version
8928 "/shedskin-" version ".tgz"))
8929 (sha256
8930 (base32
8931 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8932 (build-system python-build-system)
8933 (arguments
8934 `(#:python ,python-2
8935 #:phases (modify-phases %standard-phases
8936 (add-after 'unpack 'fix-resulting-include-libs
8937 (lambda* (#:key inputs #:allow-other-keys)
8938 (let ((libgc (assoc-ref inputs "libgc"))
8939 (pcre (assoc-ref inputs "pcre")))
8940 (substitute* "shedskin/makefile.py"
8941 (("variable == 'CCFLAGS':[ ]*")
8942 (string-append "variable == 'CCFLAGS':\n"
8943 " line += ' -I " pcre "/include"
8944 " -I " libgc "/include'"))
8945 (("variable == 'LFLAGS':[ ]*")
8946 (string-append "variable == 'LFLAGS':\n"
8947 " line += ' -L" pcre "/lib"
8948 " -L " libgc "/lib'")))
8949 #t))))))
8950 (inputs `(("pcre" ,pcre)
8951 ("libgc" ,libgc)))
8952 (home-page "https://shedskin.github.io/")
8953 (synopsis "Experimental Python-2 to C++ Compiler")
8954 (description (string-append "This is an experimental compiler for a subset of
8955Python. It generates C++ code and a Makefile."))
8956 (license (list license:gpl3 license:bsd-3 license:expat))))
8957
8958(define-public python2-rope
8959 (package
8960 (name "python2-rope")
a9ba0a31 8961 (version "0.11.0")
44d10b1f
RW
8962 (source
8963 (origin
8964 (method url-fetch)
8965 (uri (pypi-uri "rope" version))
8966 (sha256
8967 (base32
a9ba0a31 8968 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8969 (arguments
afb29715 8970 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8971 `(#:python ,python-2))
8972 (build-system python-build-system)
8973 (native-inputs
8974 `(("python2-unittest2" ,python2-unittest2)))
8975 (home-page "https://github.com/python-rope/rope")
8976 (synopsis "Refactoring library for Python")
8977 (description "Rope is a refactoring library for Python. It facilitates
8978the renaming, moving and extracting of attributes, functions, modules, fields
8979and parameters in Python 2 source code. These refactorings can also be applied
8980to occurrences in strings and comments.")
8981 (license license:gpl2)))
8982
2c880ef4
LC
8983(define-public python-rope
8984 (package
8985 (inherit python2-rope)
8986 (name "python-rope")
8987 (arguments `(#:python ,python-wrapper
8988 ;; XXX: Only partial python3 support, results in some failing
8989 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8990 #:tests? #f))
8991 (properties `((python2-variant . ,(delay python2-rope))))))
8992
44d10b1f
RW
8993(define-public python-py3status
8994 (package
8995 (name "python-py3status")
77f3d303 8996 (version "3.16")
44d10b1f
RW
8997 (source
8998 (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "py3status" version))
9001 (sha256
9002 (base32
77f3d303 9003 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
44d10b1f
RW
9004 (build-system python-build-system)
9005 (inputs
9006 `(("file" ,file)))
9007 (arguments
9008 '(#:phases
9009 (modify-phases %standard-phases
9010 ;; 'file' is used for detection of configuration file encoding
9011 ;; let's make link the dependency to particular input
9012 (add-before 'build 'patch-file-path
9013 (lambda* (#:key inputs #:allow-other-keys)
9014 (let ((file-path (assoc-ref inputs "file")))
9015 (substitute* "py3status/parse_config.py"
9016 (("\\['file', '-b'")
9017 (string-append "['" file-path "/bin/file', '-b'")))
9018 #t))))
9019 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9020 (home-page "https://github.com/ultrabug/py3status")
9021 (synopsis "Extensible i3status wrapper written in Python")
9022 (description "py3status is an i3status wrapper which extends i3status
9023functionality in a modular way, allowing you to extend your panel with your
9024own code, responding to click events and updating clock every second.")
9025 (license license:bsd-3)))
9026
9027(define-public python-tblib
9028 (package
9029 (name "python-tblib")
9030 (version "1.3.2")
9031 (source (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "tblib" version))
9034 (sha256 (base32
9035 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9036 (build-system python-build-system)
9037 (arguments
9038 `(#:phases
9039 (modify-phases %standard-phases
9040 (add-before 'check 'adjust-tests
9041 (lambda _
9042 (when (which "python3")
9043 ;; Adjust the example output to match that of Python 3.7:
9044 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9045 (substitute* "README.rst"
9046 (("Exception\\('fail',") "Exception('fail'"))
9047 #t)))
9048 (replace 'check
9049 (lambda _
9050 ;; Upstream runs tests after installation and the package itself
9051 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9052 ;; found.
9053 (setenv "PYTHONPATH"
9054 (string-append (getcwd) "/build/lib:"
9055 (getenv "PYTHONPATH")))
9056 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9057 (native-inputs
9058 `(("python-pytest" ,python-pytest)
9059 ("python-six" ,python-six)))
9060 (home-page "https://github.com/ionelmc/python-tblib")
9061 (synopsis "Traceback serialization library")
9062 (description
9063 "Traceback serialization allows you to:
9064
9065@enumerate
9066@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9067different processes. This allows better error handling when running code over
9068multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9069
9070@item Parse traceback strings and raise with the parsed tracebacks.
9071@end enumerate\n")
9072 (license license:bsd-3)))
9073
9074(define-public python2-tblib
9075 (package-with-python2 python-tblib))
9076
9077(define-public python-greenlet
9078 (package
9079 (name "python-greenlet")
9080 (version "0.4.15")
9081 (source (origin
9082 (method url-fetch)
9083 (uri (pypi-uri "greenlet" version))
9084 (sha256
9085 (base32
9086 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9087 (build-system python-build-system)
9088 (home-page "https://greenlet.readthedocs.io/")
9089 (synopsis "Lightweight in-process concurrent programming")
9090 (description
9091 "Greenlet package is a spin-off of Stackless, a version of CPython
9092that supports micro-threads called \"tasklets\". Tasklets run
9093pseudo-concurrently (typically in a single or a few OS-level threads) and
9094are synchronized with data exchanges on \"channels\".")
9095 (license (list license:psfl license:expat))))
9096
9097(define-public python2-greenlet
9098 (package-with-python2 python-greenlet))
9099
9100(define-public python-objgraph
9101 (package
9102 (name "python-objgraph")
9103 (version "3.4.0")
9104 (source
9105 (origin
9106 (method url-fetch)
9107 (uri (pypi-uri "objgraph" version))
9108 (sha256
9109 (base32
9110 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9111 (build-system python-build-system)
9112 (propagated-inputs
9113 `(("python-graphviz" ,python-graphviz)))
9114 (native-inputs
9115 `(("python-mock" ,python-mock)
9116 ("graphviz" ,graphviz)))
9117 (home-page "https://mg.pov.lt/objgraph/")
9118 (synopsis "Draw Python object reference graphs with graphviz")
9119 (description
9120 "This package provides tools to draw Python object reference graphs with
9121graphviz.")
9122 (license license:expat)))
9123
9124(define-public python-gevent
9125 (package
9126 (name "python-gevent")
9127 (version "1.3.7")
9128 (source (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "gevent" version))
9131 (sha256
9132 (base32
9133 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9134 (modules '((guix build utils)))
9135 (snippet
9136 '(begin
9137 ;; unbunding libev and c-ares
9138 (delete-file-recursively "deps")
9139 #t))))
9140 (build-system python-build-system)
9141 (arguments
9142 `(#:modules ((ice-9 ftw)
9143 (ice-9 match)
9144 (srfi srfi-26)
9145 (guix build utils)
9146 (guix build python-build-system))
9147 #:phases (modify-phases %standard-phases
9148 (add-after 'unpack 'unpack-libev
9149 (lambda* (#:key inputs #:allow-other-keys)
9150 (mkdir-p "deps/libev")
9151 ;; FIXME: gevent requires building libev, even though
9152 ;; it only links against the proper one.
9153 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9154 "--strip-components=1" "-C" "deps/libev")))
9155 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9156 (lambda _
9157 (substitute* "src/gevent/subprocess.py"
9158 (("/bin/sh") (which "sh")))
9159 (for-each (lambda (file)
9160 (substitute* file
9161 (("/bin/sh") (which "sh"))
9162 (("/bin/true") (which "true"))))
9163 (find-files "src/greentest" "\\.py$"))
9164 #t))
9165 (add-before 'build 'do-not-use-bundled-sources
9166 (lambda* (#:key inputs #:allow-other-keys)
9167 (setenv "CONFIG_SHELL" (which "bash"))
9168 (setenv "LIBEV_EMBED" "false")
9169 (setenv "CARES_EMBED" "false")
9170 (setenv "EMBED" "false")
9171
9172 (let ((greenlet (string-append
9173 (assoc-ref inputs "python-greenlet")
9174 "/include")))
9175 (match (scandir greenlet
9176 (lambda (item)
9177 (string-prefix? "python" item)))
9178 ((python)
9179 (setenv "CPATH"
9180 (string-append greenlet "/" python)))))
9181 #t))
9182 (add-before 'check 'skip-timer-test
9183 (lambda _
9184 ;; XXX: Skip 'TestTimerResolution', which appears to be
9185 ;; unreliable.
9186 (substitute* "src/greentest/test__core_timer.py"
9187 (("not greentest.RUNNING_ON_CI") "False"))
9188 #t))
9189 (replace 'check
9190 (lambda _
9191 ;; Make sure the build directory is on PYTHONPATH.
9192 (setenv "PYTHONPATH"
9193 (string-append
9194 (getenv "PYTHONPATH") ":"
9195 (getcwd) "/build/"
9196 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9197 (with-directory-excursion "src/greentest"
9198 ;; XXX: Many tests require network access. Instead we only
9199 ;; run known-good tests. Unfortunately we cannot use
9200 ;; recursion here since this directory also contains
9201 ;; Python-version-specific subfolders.
9202 (apply invoke "python" "testrunner.py" "--config"
9203 "known_failures.py"
9204 (scandir "." (cut regexp-exec
9205 (make-regexp "test_+(subprocess|core)")
9206 <>)))))))))
9207 (propagated-inputs
9208 `(("python-greenlet" ,python-greenlet)
9209 ("python-objgraph" ,python-objgraph)))
9210 (native-inputs
9211 `(("libev-source" ,(package-source libev))
9212 ("python-six" ,python-six)))
9213 (inputs
9214 `(("c-ares" ,c-ares)
9215 ("libev" ,libev)))
9216 (home-page "http://www.gevent.org/")
9217 (synopsis "Coroutine-based network library")
9218 (description
9219 "gevent is a coroutine-based Python networking library that uses greenlet
9220to provide a high-level synchronous API on top of the libev event loop.")
9221 (license license:expat)
9222 (properties `((python2-variant . ,(delay python2-gevent))))))
9223
9224(define-public python2-gevent
9225 (let ((base (package-with-python2
9226 (strip-python2-variant python-gevent))))
9227 (package
9228 (inherit base)
9229 (native-inputs `(,@(package-native-inputs python-gevent)
9230 ("python-mock" ,python2-mock))))))
9231
9232(define-public python-fastimport
9233 (package
9234 (name "python-fastimport")
9235 (version "0.9.6")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "fastimport" version))
9240 (sha256
9241 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9242 (build-system python-build-system)
9243 (home-page "https://github.com/jelmer/python-fastimport")
9244 (synopsis "VCS fastimport parser and generator in Python")
9245 (description "This package provides a parser for and generator of the Git
9246@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9247format.")
9248 (license license:gpl2+)))
9249
9250(define-public python2-fastimport
9251 (package-with-python2 python-fastimport))
9252
9253(define-public python-twisted
9254 (package
9255 (name "python-twisted")
e5ba2fe3 9256 (version "17.5.0")
44d10b1f
RW
9257 (source (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9260 (sha256
9261 (base32
e5ba2fe3 9262 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9263 (build-system python-build-system)
9264 (arguments
9265 '(#:tests? #f)) ; FIXME: Some tests are failing.
9266 ;; #:phases
9267 ;; (modify-phases %standard-phases
9268 ;; (replace 'check
9269 ;; (lambda _
9270 ;; (zero? (system* "./bin/trial" "twisted")))))
9271 (propagated-inputs
9272 `(("python-zope-interface" ,python-zope-interface)
9273 ("python-incremental" ,python-incremental)
e5ba2fe3 9274 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9275 ("python-constantly" ,python-constantly)
9276 ("python-automat" ,python-automat)))
9277 (home-page "https://twistedmatrix.com/")
9278 (synopsis "Asynchronous networking framework written in Python")
9279 (description
9280 "Twisted is an extensible framework for Python programming, with special
9281focus on event-based network programming and multiprotocol integration.")
9282 (license license:expat)))
9283
9284(define-public python2-twisted
9285 (package-with-python2 python-twisted))
9286
9287(define-public python-pika
9288 (package
9289 (name "python-pika")
9290 (version "0.12.0")
9291 (source
9292 (origin
9293 (method url-fetch)
9294 (uri (pypi-uri "pika" version))
9295 (sha256
9296 (base32
9297 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9298 (build-system python-build-system)
9299 (native-inputs
9300 `(("python-pyev" ,python-pyev)
9301 ("python-tornado" ,python-tornado)
9302 ("python-twisted" ,python-twisted)))
9303 (home-page "https://pika.readthedocs.org")
9304 (synopsis "Pure Python AMQP Client Library")
9305 (description
9306 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9307Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9308network support library.")
9309 (license license:bsd-3)))
9310
9311(define-public python2-pika
9312 (package-with-python2 python-pika))
9313
9314(define-public python-ply
9315 (package
9316 (name "python-ply")
9317 (version "3.10")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "ply" version))
9322 (sha256
9323 (base32
9324 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9325 (build-system python-build-system)
9326 (home-page "http://www.dabeaz.com/ply/")
9327 (synopsis "Python Lex & Yacc")
9328 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9329It uses LR parsing and does extensive error checking.")
9330 (license license:bsd-3)))
9331
9332(define-public python2-ply
9333 (package-with-python2 python-ply))
9334
9335(define-public python-tabulate
9336 (package
9337 (name "python-tabulate")
9338 (version "0.7.7")
9339 (source (origin
9340 (method url-fetch)
9341 (uri (pypi-uri "tabulate" version))
9342 (sha256
9343 (base32
9344 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9345 (build-system python-build-system)
9346 (arguments
9347 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9348 ;; and the latest release is not tagged in the upstream repository.
9349 '(#:tests? #f))
9350 (home-page "https://bitbucket.org/astanin/python-tabulate")
9351 (synopsis "Pretty-print tabular data")
9352 (description
9353 "Tabulate is a library and command-line utility to pretty-print tabular
9354data in Python.")
9355 (license license:expat)))
9356
9357(define-public python2-tabulate
9358 (package-with-python2 python-tabulate))
9359
9360(define-public python-kazoo
9361 (package
9362 (name "python-kazoo")
9363 (version "2.4.0")
9364 (source
9365 (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "kazoo" version))
9368 (sha256
9369 (base32
9370 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9371 (build-system python-build-system)
9372 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9373 (propagated-inputs
9374 `(("python-six" ,python-six)))
9375 (home-page "https://kazoo.readthedocs.org")
9376 (synopsis "High-level Zookeeper client library")
9377 (description
9378 "Kazoo is a Python client library for the Apache Zookeeper distributed
9379application service. It is designed to be easy to use and to avoid common
9380programming errors.")
9381 (license license:asl2.0)))
9382
9383(define-public python2-kazoo
9384 (package-with-python2 python-kazoo))
9385
9386(define-public python-pykafka
9387 (package
9388 (name "python-pykafka")
9389 (version "2.4.0")
9390 (source (origin
9391 (method url-fetch)
0ca1d040 9392 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9393 (sha256
9394 (base32
9395 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9396 (build-system python-build-system)
9397 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9398 (propagated-inputs
9399 `(("python-gevent" ,python-gevent)
9400 ("python-kazoo" ,python-kazoo)
9401 ("python-tabulate" ,python-tabulate)))
9402 (inputs
9403 `(("librdkafka" ,librdkafka)))
9404 (home-page "https://pykafka.readthedocs.io/")
9405 (synopsis "Apache Kafka client for Python")
9406 (description
9407 "PyKafka is a client for the Apache Kafka distributed messaging system.
9408It includes Python implementations of Kafka producers and consumers, which
9409are optionally backed by a C extension built on librdkafka.")
9410 (license license:asl2.0)))
9411
9412(define-public python2-pykafka
9413 (package-with-python2 python-pykafka))
9414
9415(define-public python-wcwidth
9416 (package
9417 (name "python-wcwidth")
9418 (version "0.1.7")
9419 (source
9420 (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "wcwidth" version))
9423 (sha256
9424 (base32
9425 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9426 (build-system python-build-system)
9427 (home-page "https://github.com/jquast/wcwidth")
9428 (synopsis "Measure number of terminal column cells of wide-character codes")
9429 (description "Wcwidth measures the number of terminal column cells of
9430wide-character codes. It is useful for those implementing a terminal emulator,
9431or programs that carefully produce output to be interpreted by one. It is a
9432Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9433specified in POSIX.1-2001 and POSIX.1-2008.")
9434 (license license:expat)))
9435
9436(define-public python2-wcwidth
9437 (package-with-python2 python-wcwidth))
9438
9439(define-public python2-jsonrpclib
9440 (package
9441 (name "python2-jsonrpclib")
9442 (version "0.1.7")
9443 (source (origin
9444 (method url-fetch)
6571bba0 9445 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9446 (sha256
9447 (base32
9448 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9449 (build-system python-build-system)
9450 (arguments
9451 `(#:tests? #f
9452 #:python ,python-2))
9453 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9454 (synopsis "Implementation of JSON-RPC specification for Python")
9455 (description
9456 "This library is an implementation of the JSON-RPC specification.
9457It supports both the original 1.0 specification, as well as the
9458new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9459etc.")
9460 (license license:asl2.0)))
9461
9462(define-public python-chai
9463 (package
9464 (name "python-chai")
9465 (version "1.1.2")
9466 (source (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "chai" version))
9469 (sha256
9470 (base32
9471 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9472 (build-system python-build-system)
9473 (home-page "https://github.com/agoragames/chai")
9474 (synopsis "Mocking framework for Python")
9475 (description
9476 "Chai provides an api for mocking, stubbing and spying your python
9477objects, patterned after the Mocha library for Ruby.")
9478 (license license:bsd-3)))
9479
9480(define-public python2-chai
9481 (package-with-python2 python-chai))
9482
9483(define-public python-inflection
9484 (package
9485 (name "python-inflection")
9486 (version "0.3.1")
9487 (source
9488 (origin (method url-fetch)
9489 (uri (pypi-uri "inflection" version))
9490 (sha256
9491 (base32
9492 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9493 (build-system python-build-system)
9494 (native-inputs
9495 `(("python-pytest" ,python-pytest)))
9496 (home-page "https://github.com/jpvanhal/inflection")
9497 (synopsis "Python string transformation library")
9498 (description
9499 "Inflection is a string transformation library. It singularizes
9500and pluralizes English words, and transforms strings from CamelCase to
9501underscored string.")
9502 (license license:expat)))
9503
9504(define-public python2-inflection
9505 (package-with-python2 python-inflection))
9506
9507(define-public python-pylev
9508 (package
9509 (name "python-pylev")
9510 (version "1.3.0")
9511 (source (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "pylev" version))
9514 (sha256
9515 (base32
9516 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9517 (build-system python-build-system)
9518 (home-page "https://github.com/toastdriven/pylev")
9519 (synopsis "Levenshtein distance implementation in Python")
9520 (description "Pure Python Levenshtein implementation, based off the
9521Wikipedia code samples at
9522@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9523 (license license:bsd-3)))
9524
9525(define-public python2-pylev
9526 (package-with-python2 python-pylev))
9527
9528(define-public python-cleo
9529 (package
9530 (name "python-cleo")
9531 (version "0.6.1")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (pypi-uri "cleo" version))
9535 (sha256
9536 (base32
9537 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9538 (build-system python-build-system)
9539 (native-inputs
9540 `(;; For testing
9541 ("python-mock" ,python-mock)
9542 ("python-pytest-mock" ,python-pytest-mock)
9543 ("python-pytest" ,python-pytest)))
9544 (propagated-inputs
9545 `(("python-backpack" ,python-backpack)
9546 ("python-pastel" ,python-pastel)
9547 ("python-pylev" ,python-pylev)))
9548 (home-page "https://github.com/sdispater/cleo")
9549 (synopsis "Command-line arguments library for Python")
9550 (description
9551 "Cleo allows you to create command-line commands with signature in
9552docstring and colored output.")
9553 (license license:expat)))
9554
9555(define-public python2-cleo
9556 (package-with-python2 python-cleo))
9557
9558(define-public python-lazy-object-proxy
9559 (package
9560 (name "python-lazy-object-proxy")
9561 (version "1.3.1")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "lazy-object-proxy" version))
9565 (sha256
9566 (base32
9567 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9568 (build-system python-build-system)
9569 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9570 (synopsis "Lazy object proxy for python")
9571 (description
9572 "Lazy object proxy is an object that wraps a callable but defers the call
9573until the object is actually required, and caches the result of said call.")
9574 (license license:bsd-2)))
9575
9576(define-public python2-lazy-object-proxy
9577 (package-with-python2 python-lazy-object-proxy))
9578
9579(define-public python-dnspython
9580 (package
9581 (name "python-dnspython")
9582 (version "1.15.0")
9583 (source (origin
9584 (method url-fetch)
9585 (uri (string-append "http://www.dnspython.org/kits/"
9586 version "/dnspython-" version ".tar.gz"))
9587 (sha256
9588 (base32
9589 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9590 (build-system python-build-system)
9591 (arguments '(#:tests? #f)) ; XXX: requires internet access
9592 (home-page "http://www.dnspython.org")
9593 (synopsis "DNS toolkit for Python")
9594 (description
9595 "dnspython is a DNS toolkit for Python. It supports almost all record
9596types. It can be used for queries, zone transfers, and dynamic updates.
9597It supports TSIG authenticated messages and EDNS0.")
9598 (license license:expat)))
9599
9600(define-public python2-dnspython
9601 (package-with-python2 python-dnspython))
9602
9603(define-public python-email-validator
9604 (package
9605 (name "python-email-validator")
9606 (version "1.0.2")
9607 (source
9608 (origin (method url-fetch)
9609 (uri (pypi-uri "email_validator" version))
9610 (sha256
9611 (base32
9612 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9613 (build-system python-build-system)
9614 (arguments
9615 '(#:phases
9616 (modify-phases %standard-phases
9617 (add-before 'build 'use-dnspython
9618 (lambda _
9619 (substitute* "setup.py"
9620 (("dnspython3") "dnspython"))
9621 #t)))))
9622 (propagated-inputs
9623 `(("python-dnspython" ,python-dnspython)
9624 ("python-idna" ,python-idna)))
9625 (home-page "https://github.com/JoshData/python-email-validator")
9626 (synopsis "Email address validation library for Python")
9627 (description
9628 "This library validates email address syntax and deliverability.")
9629 (license license:cc0)))
9630
9631(define-public python2-email-validator
9632 (package-with-python2 python-email-validator))
9633
9634(define-public python-ukpostcodeparser
9635 (package
9636 (name "python-ukpostcodeparser")
9637 (version "1.0.3")
9638 (source (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "UkPostcodeParser" version))
9641 (sha256
9642 (base32
9643 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/hamstah/ukpostcodeparser")
9646 (synopsis "UK Postcode parser for Python")
9647 (description
9648 "This library provides the @code{parse_uk_postcode} function for
9649parsing UK postcodes.")
9650 (license license:expat)))
9651
9652(define-public python2-ukpostcodeparser
9653 (package-with-python2 python-ukpostcodeparser))
9654
9655(define-public python-faker
9656 (package
9657 (name "python-faker")
9658 (version "0.7.9")
9659 (source (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "Faker" version))
9662 (sha256
9663 (base32
9664 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9665 (patches
9666 (search-patches "python-faker-fix-build-32bit.patch"))
9667 (modules '((guix build utils)))
9668 (snippet
9669 '(begin
9670 (for-each delete-file (find-files "." "\\.pyc$"))
9671 #t))))
9672 (build-system python-build-system)
9673 (arguments
9674 '(#:phases
9675 (modify-phases %standard-phases
9676 (replace 'check
49ff8827 9677 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9678 (native-inputs
9679 `(;; For testing
9680 ("python-email-validator" ,python-email-validator)
9681 ("python-mock" ,python-mock)
9682 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9683 (propagated-inputs
9684 `(("python-dateutil" ,python-dateutil)
9685 ("python-six" ,python-six)))
9686 (home-page "https://github.com/joke2k/faker")
9687 (synopsis "Python package that generates fake data")
9688 (description
9689 "Faker is a Python package that generates fake data such as names,
9690addresses, and phone numbers.")
9691 (license license:expat)
9692 (properties `((python2-variant . ,(delay python2-faker))))))
9693
9694(define-public python2-faker
9695 (let ((base (package-with-python2 (strip-python2-variant
9696 python-faker))))
9697 (package
9698 (inherit base)
9699 (propagated-inputs
9700 `(("python2-ipaddress" ,python2-ipaddress)
9701 ,@(package-propagated-inputs base))))))
9702
9703(define-public python-pyaml
9704 (package
9705 (name "python-pyaml")
9706 (version "18.11.0")
9707 (source (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "pyaml" version))
9710 (sha256
9711 (base32
9712 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9713 (build-system python-build-system)
9714 (native-inputs
9715 `(("python-unidecode" ,python-unidecode)))
9716 (propagated-inputs
9717 `(("python-pyyaml" ,python-pyyaml)))
9718 (home-page "https://github.com/mk-fg/pretty-yaml")
9719 (synopsis "YAML pretty-print library for Python")
9720 (description
9721 "pyaml is a PyYAML based python module to produce pretty and readable
9722YAML-serialized data.")
9723 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9724
9725(define-public python2-pyaml
9726 (package-with-python2 python-pyaml))
9727
9728(define-public python-backpack
9729 (package
9730 (name "python-backpack")
9731 (version "0.1")
9732 (source
9733 (origin
9734 (method url-fetch)
9735 (uri (pypi-uri "backpack" version))
9736 (sha256
9737 (base32
9738 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9739 (build-system python-build-system)
9740 (native-inputs
9741 `(("python-pytest" ,python-pytest)
9742 ("python-nose" ,python-nose)))
9743 (propagated-inputs
9744 `(("python-simplejson" ,python-simplejson)))
9745 (home-page "https://github.com/sdispater/backpack")
9746 (synopsis "Utilities for working with Python collections")
9747 (description "Backpack provides some useful utilities for working with
9748collections of data.")
9749 (license license:expat)))
9750
9751(define-public python2-backpack
9752 (package-with-python2 python-backpack))
9753
9754(define-public python-prompt-toolkit
9755 (package
9756 (name "python-prompt-toolkit")
9757 (version "2.0.7")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9762 (sha256
9763 (base32
9764 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9765 (build-system python-build-system)
9766 (arguments
9767 `(#:phases
9768 (modify-phases %standard-phases
9769 (delete 'check)
9770 (add-after 'install 'post-install-check
9771 (lambda* (#:key inputs outputs #:allow-other-keys)
9772 ;; HOME is needed for the test
9773 ;; "test_pathcompleter_can_expanduser".
9774 (setenv "HOME" "/tmp")
9775 (add-installed-pythonpath inputs outputs)
9776 (invoke "py.test"))))))
9777 (propagated-inputs
9778 `(("python-wcwidth" ,python-wcwidth)
9779 ("python-six" ,python-six)
9780 ("python-pygments" ,python-pygments)))
9781 (native-inputs
9782 `(("python-pytest" ,python-pytest)))
9783 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9784 (synopsis "Library for building command line interfaces in Python")
9785 (description
9786 "Prompt-Toolkit is a library for building interactive command line
9787interfaces in Python. It's like GNU Readline but it also features syntax
9788highlighting while typing, out-of-the-box multi-line input editing, advanced
9789code completion, incremental search, support for Chinese double-width
9790characters, mouse support, and auto suggestions.")
9791 (license license:bsd-3)))
9792
9793(define-public python2-prompt-toolkit
9794 (package-with-python2 python-prompt-toolkit))
9795
9796(define-public python-prompt-toolkit-1
9797 (package (inherit python-prompt-toolkit)
9798 (version "1.0.15")
9799 (source
9800 (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9803 (sha256
9804 (base32
9805 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9806
9807(define-public python2-prompt-toolkit-1
9808 (package-with-python2 python-prompt-toolkit-1))
9809
9810(define-public python-jedi
9811 (package
9812 (name "python-jedi")
40bd0aa3 9813 (version "0.13.2")
44d10b1f
RW
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "jedi" version))
9818 (sha256
9819 (base32
40bd0aa3 9820 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9821 (build-system python-build-system)
9822 (arguments
40bd0aa3 9823 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9824 ;; https://github.com/davidhalter/jedi/issues/1263)
9825 #:tests? #f
9826 #:phases
9827 (modify-phases %standard-phases
9828 (replace 'check
9829 (lambda* (#:key tests? #:allow-other-keys)
9830 (when tests?
9831 (invoke "py.test" "-vv")))))))
9832 (native-inputs
9833 `(("python-pytest" ,python-pytest)
9834 ("python-docopt" ,python-docopt)))
9835 (propagated-inputs
9836 `(("python-parso" ,python-parso)))
9837 (home-page "https://github.com/davidhalter/jedi")
9838 (synopsis "Autocompletion and static analysis library for Python")
9839 (description
9840 "Jedi is a static analysis tool for Python that can be used in Integrated
9841Development Environments (@dfn{IDE}s) and text editors. It understands Python
9842on a deeper level than many other static analysis frameworks for Python.
9843
9844Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9845well.")
9846 (license license:expat)))
9847
9848(define-public python2-jedi
9849 (package-with-python2 python-jedi))
9850
9851(define-public ptpython
9852 (package
9853 (name "ptpython")
9854 (version "0.34")
9855 (source (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "ptpython" version))
9858 (sha256
9859 (base32
9860 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9861 (build-system python-build-system)
9862 (arguments
9863 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9864 (propagated-inputs
9865 `(("python-docopt" ,python-docopt)
9866 ("python-jedi" ,python-jedi)
9867 ("python-prompt-toolkit" ,python-prompt-toolkit)
9868 ("python-pygments" ,python-pygments)))
9869 (home-page "https://github.com/jonathanslenders/ptpython")
9870 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9871 (description
9872 "ptpython is a Python read-eval-print loop with IDE-like features.
9873It supports syntax highlighting, multiline editing, autocompletion, mouse,
9874color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9875etc.")
9876 (license license:bsd-3)
9877 (properties `((python2-variant . ,(delay ptpython-2))))))
9878
9879(define-public ptpython-2
9880 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9881 (package
9882 (inherit base)
9883 (name "ptpython2"))))
9884
9885(define-public python-stem
9886 (package
9887 (name "python-stem")
9888 (version "1.7.0")
9889 (source
9890 (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "stem" version))
9893 (sha256
9894 (base32
9895 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9896 (build-system python-build-system)
9897 (arguments
9898 `(#:phases
9899 (modify-phases %standard-phases
9900 (replace 'check
9901 (lambda _
9902 (invoke "./run_tests.py" "--unit")
9903 #t)))))
9904 (native-inputs
9905 `(("python-mock" ,python-mock)
9906 ("python-pycodestyle" ,python-pycodestyle)
9907 ("python-pyflakes" ,python-pyflakes)))
9908 (home-page "https://stem.torproject.org/")
9909 (synopsis
9910 "Python controller library that allows applications to interact with Tor")
9911 (description
9912 "Stem is a Python controller library for Tor. With it you can use Tor's
9913control protocol to script against the Tor process and read descriptor data
9914relays publish about themselves.")
9915 (license license:lgpl3)))
9916
9917(define-public python2-stem
9918 (package-with-python2 python-stem))
9919
9920(define-public python-pyserial
9921 (package
9922 (name "python-pyserial")
9923 (version "3.1.1")
9924 (source
9925 (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "pyserial" version))
9928 (sha256
9929 (base32
9930 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9931 (build-system python-build-system)
9932 (arguments
9933 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9934 ;; #:phases
9935 ;; (modify-phases %standard-phases
9936 ;; (replace 'check
9937 ;; (lambda _
9938 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9939 (home-page
9940 "https://github.com/pyserial/pyserial")
9941 (synopsis "Python Serial Port Bindings")
9942 (description "@code{pyserial} provide serial port bindings for Python. It
9943supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9944and/or Xon/Xoff. The port is accessed in RAW mode.")
9945 (license license:bsd-3)))
9946
9947(define-public python2-pyserial
9948 (package-with-python2 python-pyserial))
9949
9950(define-public python-kivy
9951 (package
9952 (name "python-kivy")
9953 (version "1.10.1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "Kivy" version))
9958 (file-name (string-append name "-" version ".tar.gz"))
9959 (sha256
9960 (base32
9961 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9962 (build-system python-build-system)
9963 (arguments
9964 `(#:tests? #f ; Tests require many optional packages
9965 #:phases
9966 (modify-phases %standard-phases
9967 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9968 (lambda* (#:key inputs #:allow-other-keys)
9969 (setenv "KIVY_SDL2_PATH"
9970 (string-append (assoc-ref inputs "sdl-union")
9971 "/include/SDL2"))
9972 #t)))))
9973 (native-inputs
9974 `(("git" ,git)
9975 ("pkg-config" ,pkg-config)
9976 ("python-cython" ,python-cython)))
9977 (inputs
9978 `(("gstreamer" ,gstreamer)
9979 ("mesa" ,mesa)
9980 ("sdl-union"
9981 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9982 (home-page "http://kivy.org")
9983 (synopsis
9984 "Multitouch application framework")
9985 (description
9986 "A software library for rapid development of
9987hardware-accelerated multitouch applications.")
9988 (license license:expat)))
9989
9990(define-public python2-kivy
9991 (package-with-python2 python-kivy))
9992
9993(define-public python-kivy-next
9994 (deprecated-package "python-kivy-next" python-kivy))
9995
9996(define-public python2-kivy-next
9997 (deprecated-package "python2-kivy-next" python2-kivy))
9998
9999(define-public python-binaryornot
10000 (package
10001 (name "python-binaryornot")
10002 (version "0.4.4")
10003 (source (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "binaryornot" version))
10006 (sha256
10007 (base32
10008 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10009 (build-system python-build-system)
10010 (propagated-inputs
10011 `(("python-chardet" ,python-chardet)
10012 ("python-hypothesis" ,python-hypothesis)))
10013 (home-page "https://github.com/audreyr/binaryornot")
10014 (synopsis "Package to check if a file is binary or text")
10015 (description "Ultra-lightweight pure Python package to check if a file is
10016binary or text.")
10017 (license license:bsd-3)
10018 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10019
10020(define-public python2-binaryornot
10021 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10022 (package (inherit base)
10023 (propagated-inputs
10024 `(("python2-enum34" ,python2-enum34)
10025 ,@(package-propagated-inputs base))))))
10026
10027(define-public python-nltk
10028 (package
10029 (name "python-nltk")
10030 (version "3.2.1")
10031 (source (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "nltk" version))
10034 (sha256
10035 (base32
10036 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10037 (build-system python-build-system)
10038 (arguments
10039 '(;; The tests require some extra resources to be downloaded.
10040 ;; TODO Try packaging these resources.
10041 #:tests? #f))
10042 (home-page "http://nltk.org/")
10043 (synopsis "Natural Language Toolkit")
10044 (description "It provides interfaces to over 50 corpora and lexical
10045resources such as WordNet, along with a suite of text processing libraries
10046for classification, tokenization, stemming, tagging, parsing, and semantic
10047reasoning, wrappers for natural language processing libraries.")
10048 (license license:asl2.0)))
10049
10050(define-public python2-nltk
10051 (package-with-python2 python-nltk))
10052
10053(define-public python-pymongo
10054 (package
10055 (name "python-pymongo")
10056 (version "3.7.2")
10057 (source (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "pymongo" version))
10060 (sha256
10061 (base32
10062 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10063 (build-system python-build-system)
10064 (propagated-inputs
10065 `(("python-certifi" ,python-certifi)))
10066 (home-page "https://github.com/mongodb/mongo-python-driver")
10067 (synopsis "Python driver for MongoDB")
10068 (description "Python driver for MongoDB.")
10069 (license license:asl2.0)))
10070
10071(define-public python2-pymongo
10072 (package-with-python2 python-pymongo))
10073
44d10b1f
RW
10074(define-public python-consul
10075 (package
10076 (name "python-consul")
10077 (version "0.6.1")
10078 (source
10079 (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "python-consul" version))
10082 (sha256
10083 (base32
10084 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10085 (build-system python-build-system)
10086 (arguments
10087 '(#:tests? #f)) ; The tests are not distributed
10088 (propagated-inputs
10089 `(("python-requests" ,python-requests)
10090 ("python-six" ,python-six)))
10091 (home-page "https://github.com/cablehead/python-consul")
10092 (synopsis "Python client for Consul")
10093 (description
10094 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10095discovery, monitoring and configuration.")
10096 (license license:expat)))
10097
10098(define-public python2-consul
10099 (package-with-python2 python-consul))
10100
10101(define-public python-schematics
10102 (package
10103 (name "python-schematics")
10104 (version "1.1.1")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (string-append
10109 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10110 (file-name (string-append name "-" version ".tar.gz"))
10111 (sha256
10112 (base32
10113 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10114 (build-system python-build-system)
10115 (propagated-inputs
10116 `(("python-six" ,python-six)))
10117 (arguments
10118 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10119 ; version requirements (eg python-coveralls)
10120 (home-page "https://github.com/schematics/schematics")
10121 (synopsis "Python Data Structures for Humans")
10122 (description "Python Data Structures for Humans.")
10123 (license license:bsd-3)))
10124
10125(define-public python2-schematics
10126 (package-with-python2 python-schematics))
10127
10128(define-public python-odfpy
10129 (package
10130 (name "python-odfpy")
10131 (version "1.3.3")
10132 (source (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "odfpy" version))
10135 (sha256
10136 (base32
10137 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10138 (arguments
10139 `(#:modules ((srfi srfi-1)
10140 (guix build python-build-system)
10141 (guix build utils))
10142 #:phases
10143 (modify-phases %standard-phases
10144 (replace 'check
10145 ;; The test runner invokes python2 and python3 for test*.py.
10146 ;; To avoid having both in inputs, we replicate it here.
10147 (lambda _
21ccc01d
RW
10148 (for-each (lambda (test-file) (invoke "python" test-file))
10149 (find-files "tests" "^test.*\\.py$"))
10150 #t)))))
44d10b1f
RW
10151 (build-system python-build-system)
10152 (home-page "https://github.com/eea/odfpy")
10153 (synopsis "Python API and tools to manipulate OpenDocument files")
10154 (description "Collection of libraries and utility programs written in
10155Python to manipulate OpenDocument 1.2 files.")
10156 (license
10157 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10158 ;; number of files with other licenses.
10159 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10160
10161(define-public python2-odfpy
10162 (package-with-python2 python-odfpy))
10163
10164(define-public python-natsort
10165 (package
10166 (name "python-natsort")
10167 (version "5.4.1")
10168 (source (origin
10169 (method url-fetch)
10170 (uri (pypi-uri "natsort" version))
10171 (sha256
10172 (base32
10173 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10174 (build-system python-build-system)
10175 (arguments
10176 `(#:modules ((guix build utils)
10177 (guix build python-build-system)
10178 (srfi srfi-1)
10179 (srfi srfi-26)
10180 (ice-9 ftw))
10181 #:phases
10182 (modify-phases %standard-phases
10183 (add-before 'check 'set-cachedir
10184 ;; Tests require write access to $HOME by default
10185 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10186 (replace 'check
10187 (lambda _
10188 (let ((cwd (getcwd)))
10189 (setenv "PYTHONPATH"
10190 (string-append
10191 cwd "/build/"
10192 (find (cut string-prefix? "lib" <>)
10193 (scandir (string-append cwd "/build")))
10194 ":"
10195 (getenv "PYTHONPATH")))
10196 (invoke "pytest" "-v")))))))
10197 (native-inputs
10198 `(("python-hypothesis" ,python-hypothesis)
10199 ("python-pytest-cov" ,python-pytest-cov)
10200 ("python-pytest-mock" ,python-pytest-mock)
10201 ("python-pytest" ,python-pytest)))
10202 (propagated-inputs ; TODO: Add python-fastnumbers.
10203 `(("python-pyicu" ,python-pyicu)))
10204 (home-page "https://github.com/SethMMorton/natsort")
10205 (synopsis "Natural sorting for python and shell")
10206 (description
10207 "Natsort lets you apply natural sorting on lists instead of
10208lexicographical. If you use the built-in @code{sorted} method in python
10209on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10210returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10211function @code{natsorted} that identifies numbers and sorts them separately
10212from strings. It can also sort version numbers, real numbers, mixed types
10213and more, and comes with a shell command @command{natsort} that exposes this
10214functionality in the command line.")
10215 (license license:expat)
10216 (properties `((python2-variant . ,(delay python2-natsort))))))
10217
10218(define-public python2-natsort
10219 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10220 (package (inherit base)
10221 (native-inputs
10222 `(("python2-pathlib" ,python2-pathlib)
10223 ,@(package-native-inputs base))))))
10224
10225(define-public python-glances
10226 (package
10227 (name "python-glances")
10228 (version "3.0.2")
10229 (source
10230 (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "Glances" version))
10233 (sha256
10234 (base32
10235 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10236 (build-system python-build-system)
10237 (propagated-inputs
10238 `(("python-psutil" ,python-psutil)))
10239 (home-page
10240 "https://github.com/nicolargo/glances")
10241 (synopsis
10242 "A cross-platform curses-based monitoring tool")
10243 (description
10244 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10245Glances uses the PsUtil library to get information from your system. It monitors
10246CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10247 (license license:lgpl3+)))
10248
10249(define-public python2-glances
10250 (package-with-python2 python-glances))
10251
10252(define-public python-graphql-core
10253 (package
10254 (name "python-graphql-core")
10255 (version "0.5.3")
10256 (source
10257 (origin
10258 (method url-fetch)
10259 (uri (pypi-uri "graphql-core" version))
10260 (sha256
10261 (base32
10262 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10263 (build-system python-build-system)
10264 (arguments
10265 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10266 #:phases
10267 (modify-phases %standard-phases
10268 (add-after 'unpack 'patch-hardcoded-version
10269 (lambda _ (substitute*
10270 "setup.py"
10271 (("'gevent==1.1rc1'") "'gevent'"))
10272 #t)))))
10273 (native-inputs
10274 `(("python-gevent" ,python-gevent)
10275 ("python-mock" ,python-mock)
10276 ("python-pytest-mock" ,python-pytest-mock)))
10277 (propagated-inputs
10278 `(("python-promise" ,python-promise)
10279 ("python-six" ,python-six)))
10280 (home-page "https://github.com/graphql-python/graphql-core")
10281 (synopsis "GraphQL implementation for Python")
10282 (description
10283 "GraphQL implementation for Python. GraphQL is a data query language and
10284runtime designed and used to request and deliver data to mobile and web apps.
10285This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10286to Python.")
10287 (license license:expat)))
10288
10289(define-public python2-graphql-core
10290 (package-with-python2 python-graphql-core))
10291
10292(define-public python-graphql-relay
10293 (package
10294 (name "python-graphql-relay")
10295 (version "0.4.5")
10296 (source
10297 (origin
10298 (method url-fetch)
10299 (uri (pypi-uri "graphql-relay" version))
10300 (sha256
10301 (base32
10302 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10303 (build-system python-build-system)
10304 (arguments
10305 '(#:tests? #f)) ; The tests are not distributed
10306 (propagated-inputs
10307 `(("python-graphql-core" ,python-graphql-core)
10308 ("python-promise" ,python-promise)
10309 ("python-six" ,python-six)))
10310 (home-page "https://github.com/graphql-python/graphql-relay-py")
10311 (synopsis "Relay implementation for Python")
10312 (description
10313 "This is a library to allow the easy creation of Relay-compliant servers
10314using the GraphQL Python reference implementation of a GraphQL server. It
10315should be noted that the code is a exact port of the original
10316@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10317from Facebook.")
10318 (license license:expat)))
10319
10320(define-public python2-graphql-relay
10321 (package-with-python2 python-graphql-relay))
10322
10323(define-public python-graphene
10324 (package
10325 (name "python-graphene")
10326 (version "0.10.2")
10327 (source
10328 (origin
10329 (method url-fetch)
10330 (uri (pypi-uri "graphene" version))
10331 (sha256
10332 (base32
10333 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10334 (build-system python-build-system)
10335 (propagated-inputs
10336 `(("python-graphql-core" ,python-graphql-core)
10337 ("python-graphql-relay" ,python-graphql-relay)
10338 ("python-iso8601" ,python-iso8601)
10339 ("python-promise" ,python-promise)
10340 ("python-six" ,python-six)))
10341 (arguments
10342 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10343 (home-page "http://graphene-python.org/")
10344 (synopsis "GraphQL Framework for Python")
10345 (description
10346 "Graphene is a Python library for building GraphQL schemas/types.
10347A GraphQL schema describes your data model, and provides a GraphQL server
10348with an associated set of resolve methods that know how to fetch data.")
10349 (properties `((python2-variant . ,(delay python2-graphene))))
10350 (license license:expat)))
10351
10352(define-public python2-graphene
10353 (let ((base (package-with-python2
10354 (strip-python2-variant python-graphene))))
10355 (package (inherit base)
10356 (native-inputs
10357 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10358 ,@(package-native-inputs base))))))
10359
10360(define-public python-nautilus
10361 (package
10362 (name "python-nautilus")
10363 (version "0.4.9")
10364 (source
10365 (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "nautilus" version))
10368 (sha256
10369 (base32
10370 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10371 (build-system python-build-system)
10372 (arguments `(#:tests? #f)) ; fails to import test modules
10373 (propagated-inputs
10374 `(("python-bcrypt" ,python-bcrypt)
10375 ("python-click" ,python-click)
10376 ("python-consul" ,python-consul)
10377 ("python-graphene" ,python-graphene)
10378 ("python-jinja2" ,python-jinja2)
10379 ("python-peewee" ,python-peewee)
10380 ("python-pika" ,python-pika)
10381 ("python-tornado" ,python-tornado)
10382 ("python-wtforms" ,python-wtforms)))
10383 (native-inputs
10384 `(("python-nose2" ,python-nose2)))
10385 (home-page "https://github.com/AlecAivazis/nautilus")
10386 (synopsis "Library for creating microservice applications")
10387 (description
10388 "Nautilus is a framework for flux based microservices that looks to
10389provide extendible implementations of common aspects of a cloud so that you can
10390focus on building massively scalable web applications.")
10391 (license license:expat)))
10392
10393(define-public python-snowballstemmer
10394 (package
10395 (name "python-snowballstemmer")
10396 (version "1.2.1")
10397 (source (origin
10398 (method url-fetch)
10399 (uri (pypi-uri "snowballstemmer" version))
10400 (sha256
10401 (base32
10402 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10403 (build-system python-build-system)
10404 (arguments
10405 `(;; No tests exist
10406 #:tests? #f))
10407 (home-page "https://github.com/shibukawa/snowball_py")
10408 (synopsis "Snowball stemming library collection for Python")
10409 (description "This package provides 16 word stemmer algorithms generated
10410from Snowball algorithms. It includes the 15 original ones plus the Poerter
10411English stemmer.")
10412 (license license:bsd-3)))
10413
10414(define-public python2-snowballstemmer
10415 (package-with-python2 python-snowballstemmer))
10416
10417(define-public python-sphinx-cloud-sptheme
10418 (package
10419 (name "python-sphinx-cloud-sptheme")
10420 (version "1.8.0")
10421 (source (origin
10422 (method url-fetch)
10423 (uri (pypi-uri "cloud_sptheme" version))
10424 (sha256
10425 (base32
10426 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10427 (build-system python-build-system)
10428 ;; FIXME: The 'pypi' release archive does not contain tests.
10429 (arguments '(#:tests? #f))
10430 (native-inputs
10431 `(("python-sphinx" ,python-sphinx)))
10432 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10433 (synopsis "'Cloud' theme for Sphinx documenter")
10434 (description "This package contains the \"Cloud\" theme for Sphinx and some
10435related extensions.")
10436 (license license:bsd-3)))
10437
10438(define-public python2-sphinx-cloud-sptheme
10439 (package-with-python2 python-sphinx-cloud-sptheme))
10440
10441(define-public python-sphinx-alabaster-theme
10442 (package
10443 (name "python-sphinx-alabaster-theme")
10444 (version "0.7.12")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "alabaster" version))
10448 (sha256
10449 (base32
10450 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10451 (build-system python-build-system)
10452 (propagated-inputs
10453 `(("python-pygments" ,python-pygments)))
10454 (home-page "https://alabaster.readthedocs.io/")
10455 (synopsis "Configurable sidebar-enabled Sphinx theme")
10456 (description "Alabaster is a visually (c)lean, responsive, configurable
10457theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10458 (license license:bsd-3)))
10459
10460(define-public python2-sphinx-alabaster-theme
10461 (package-with-python2 python-sphinx-alabaster-theme))
10462
10463(define-public python-setproctitle
10464(package
10465 (name "python-setproctitle")
10466 (version "1.1.10")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "setproctitle" version))
10471 (sha256
10472 (base32
10473 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10474 (build-system python-build-system)
10475 (arguments
10476 '(#:phases
10477 (modify-phases %standard-phases
10478 (add-before 'check 'patch-Makefile
10479 ;; Stricly this is only required for the python2 variant.
10480 ;; But adding a phase in an inherited package seems to be
10481 ;; cumbersum. So we patch even for python3.
10482 (lambda _
10483 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10484 (when nose
10485 (substitute* "Makefile"
10486 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10487 (string-append nose "/bin/nosetests "))))
10488 #t)))
10489 (replace 'check
10490 (lambda _
10491 (setenv "PYTHON" (or (which "python3") (which "python")))
10492 (setenv "PYCONFIG" (or (which "python3-config")
10493 (which "python-config")))
10494 (setenv "CC" "gcc")
10495 ;; No need to extend PYTHONPATH to find the built package, since
10496 ;; the Makefile will build anyway
10497 (invoke "make" "check"))))))
10498 (native-inputs
10499 `(("procps" ,procps))) ; required for tests
10500 (home-page
10501 "https://github.com/dvarrazzo/py-setproctitle")
10502 (synopsis
10503 "Setproctitle implementation for Python to customize the process title")
10504 (description "The library allows a process to change its title (as displayed
10505by system tools such as ps and top).
10506
10507Changing the title is mostly useful in multi-process systems, for
10508example when a master process is forked: changing the children's title
10509allows to identify the task each process is busy with. The technique
10510is used by PostgreSQL and the OpenSSH Server for example.")
10511 (license license:bsd-3)
10512 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10513
10514(define-public python2-setproctitle
10515 (let ((base (package-with-python2
10516 (strip-python2-variant python-setproctitle))))
10517 (package
10518 (inherit base)
10519 (native-inputs `(("python2-nose" ,python2-nose)
10520 ,@(package-native-inputs base))))))
10521
10522(define-public python-validictory
10523 (package
10524 (name "python-validictory")
10525 (version "1.0.1")
10526 (source
10527 (origin
10528 (method url-fetch)
10529 (uri (pypi-uri "validictory" version))
10530 (sha256
10531 (base32
10532 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10533 (build-system python-build-system)
10534 (arguments
10535 '(#:phases
10536 (modify-phases %standard-phases
10537 (add-after 'unpack 'bootstrap
10538 ;; Move the tests out of the package directory to avoid
10539 ;; packaging them.
10540 (lambda* _
10541 (rename-file "validictory/tests" "tests")
10542 (delete-file "tests/__init__.py")))
10543 (replace 'check
10544 (lambda _
10545 ;; Extend PYTHONPATH so the built package will be found.
10546 (setenv "PYTHONPATH"
10547 (string-append (getcwd) "/build/lib:"
10548 (getenv "PYTHONPATH")))
6568bd5d 10549 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10550 (native-inputs
10551 `(("python-pytest" ,python-pytest)))
10552 (home-page
10553 "https://github.com/jamesturk/validictory")
10554 (synopsis "General purpose Python data validator")
10555 (description "It allows validation of arbitrary Python data structures.
10556
10557The schema format is based on the JSON Schema
10558proposal (http://json-schema.org), so combined with json the library is also
10559useful as a validator for JSON data.")
10560 (license license:expat)))
10561
10562(define-public python2-validictory
10563 (package-with-python2 python-validictory))
10564
10565(define-public python-pyelftools
10566 (package
10567 (name "python-pyelftools")
10568 (version "0.25")
10569 (source
10570 (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "pyelftools" version))
10573 (sha256
10574 (base32
10575 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10576 (build-system python-build-system)
10577 (arguments
10578 `(#:phases
10579 (modify-phases %standard-phases
10580 (add-before 'check 'set-pythonpath
10581 (lambda _
10582 (setenv "PYTHONPATH"
10583 (string-append
10584 (getcwd) "/test/"
10585 ":" (getenv "PYTHONPATH")))
10586 #t)))))
10587 (home-page
10588 "https://github.com/eliben/pyelftools")
10589 (synopsis
10590 "Analyze binary and library file information")
10591 (description "This Python library provides interfaces for parsing and
10592analyzing two binary and library file formats; the Executable and Linking
10593Format (ELF), and debugging information in the Debugging With Attributed
10594Record Format (DWARF).")
10595 (license license:public-domain)))
10596
10597(define-public python-pyev
10598 (package
10599 (name "python-pyev")
10600 (version "0.9.0")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "pyev" version))
10605 (sha256
10606 (base32
10607 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10608 (build-system python-build-system)
10609 (arguments
10610 `(#:tests? #f ; no test suite
10611 #:phases
10612 (modify-phases %standard-phases
10613 (add-after 'unpack 'patch
10614 (lambda* (#:key inputs #:allow-other-keys)
10615 (let ((libev (string-append (assoc-ref inputs "libev")
10616 "/lib/libev.so.4")))
10617 (substitute* "setup.py"
10618 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10619 (string-append "libev_dll_name = \"" libev "\"")))))))))
10620 (inputs
10621 `(("libev" ,libev)))
10622 (home-page "http://pythonhosted.org/pyev/")
10623 (synopsis "Python libev interface")
10624 (description "Pyev provides a Python interface to libev.")
10625 (license license:gpl3)))
10626
10627(define-public python2-pyev
10628 (package-with-python2 python-pyev))
10629
10630(define-public python-imagesize
10631 (package
10632 (name "python-imagesize")
10633 (version "1.1.0")
10634 (source
10635 (origin
10636 (method url-fetch)
10637 (uri (pypi-uri "imagesize" version))
10638 (sha256
10639 (base32
10640 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10641 (build-system python-build-system)
10642 (home-page "https://github.com/shibukawa/imagesize_py")
10643 (synopsis "Gets image size of files in various formats in Python")
10644 (description
10645 "This package allows determination of image size from
10646PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10647 (license license:expat)))
10648
10649(define-public python2-imagesize
10650 (package-with-python2 python-imagesize))
10651
10652(define-public python-termstyle
10653 (package
10654 (name "python-termstyle")
10655 (version "0.1.11")
10656 (source
10657 (origin
10658 (method url-fetch)
10659 (uri (pypi-uri "termstyle" version))
10660 (sha256
10661 (base32
10662 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10663 (build-system python-build-system)
10664 (arguments
10665 '(#:phases
10666 (modify-phases %standard-phases
10667 (replace 'check
10668 (lambda _
831080a6 10669 (invoke "python" "test3.py"))))))
44d10b1f
RW
10670 (home-page "https://github.com/gfxmonk/termstyle")
10671 (synopsis "Console text coloring for Python")
10672 (description "This package provides console text coloring for Python.")
10673 (license license:bsd-3)))
10674
10675(define-public python-argcomplete
10676 (package
10677 (name "python-argcomplete")
10678 (version "1.7.0")
10679 (source
10680 (origin
10681 (method url-fetch)
10682 (uri (pypi-uri "argcomplete" version))
10683 (sha256
10684 (base32
10685 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10686 (build-system python-build-system)
10687 (native-inputs
10688 `(("python-pexpect" ,python-pexpect)
10689 ("tcsh" ,tcsh)
10690 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10691 (home-page "https://github.com/kislyuk/argcomplete")
10692 (synopsis "Shell tab completion for Python argparse")
10693 (description "argcomplete provides extensible command line tab completion
10694of arguments and options for Python scripts using @code{argparse}. It's
10695particularly useful for programs with many options or sub-parsers that can
10696dynamically suggest completions; for example, when browsing resources over the
10697network.")
10698 (license license:asl2.0)))
10699
10700(define-public python2-argcomplete
10701 (package-with-python2 python-argcomplete))
10702
10703(define-public python-xopen
10704 (package
10705 (name "python-xopen")
10706 (version "0.3.3")
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "xopen" version))
10711 (sha256
10712 (base32
10713 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10714 (file-name (string-append name "-" version ".tar.gz"))))
10715 (build-system python-build-system)
10716 (home-page "https://github.com/marcelm/xopen/")
10717 (synopsis "Open compressed files transparently")
10718 (description "This module provides an @code{xopen} function that works like
10719Python's built-in @code{open} function, but can also deal with compressed files.
10720Supported compression formats are gzip, bzip2 and, xz, and are automatically
10721recognized by their file extensions. The focus is on being as efficient as
10722possible on all supported Python versions.")
10723 (license license:expat)))
10724
10725(define-public python2-xopen
10726 (let ((base (package-with-python2
10727 (strip-python2-variant python-xopen))))
10728 (package
10729 (inherit base)
10730 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10731 ,@(package-propagated-inputs base))))))
10732
10733(define-public python-cheetah
10734 (package
10735 (name "python-cheetah")
10736 (version "3.1.0")
10737 (source
10738 (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "Cheetah3" version))
10741 (sha256
10742 (base32
10743 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10744 (build-system python-build-system)
10745 (arguments
10746 `(#:modules ((guix build utils)
10747 (guix build python-build-system)
10748 (ice-9 ftw)
10749 (srfi srfi-1)
10750 (srfi srfi-26))
10751 #:phases (modify-phases %standard-phases
10752 (add-after 'unpack 'use-absolute-python
10753 (lambda _
10754 (substitute* "Cheetah/CheetahWrapper.py"
10755 (("#!/usr/bin/env python")
10756 (string-append "#!" (which "python"))))
10757 #t))
10758 (replace 'check
10759 (lambda _
10760 (let ((cwd (getcwd)))
10761 (setenv "PYTHONPATH"
10762 (string-append
10763 cwd "/build/"
10764 (find (cut string-prefix? "lib" <>)
10765 (scandir (string-append cwd "/build")))
10766 ":" (getenv "PYTHONPATH")))
10767 (setenv "PATH"
10768 (string-append (getenv "PATH")
10769 ":" cwd "/bin"))
10770 (setenv "TMPDIR" "/tmp")
10771
10772 (substitute* "Cheetah/Tests/Test.py"
10773 (("unittest.TextTestRunner\\(\\)")
10774 "unittest.TextTestRunner(verbosity=2)"))
10775
10776 (invoke "python" "Cheetah/Tests/Test.py")))))))
10777 (propagated-inputs
10778 `(("python-markdown" ,python-markdown))) ;optional
10779 (home-page "http://cheetahtemplate.org/")
10780 (synopsis "Template engine")
10781 (description "Cheetah is a text-based template engine and Python code
10782generator.
10783
10784Cheetah can be used as a standalone templating utility or referenced as
10785a library from other Python applications. It has many potential uses,
10786but web developers looking for a viable alternative to ASP, JSP, PHP and
10787PSP are expected to be its principle user group.
10788
10789Features:
10790@enumerate
10791@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10792 text-based format.
10793@item Cleanly separates content, graphic design, and program code.
10794@item Blends the power and flexibility of Python with a simple template language
10795 that non-programmers can understand.
10796@item Gives template writers full access to any Python data structure, module,
10797 function, object, or method in their templates.
10798@item Makes code reuse easy by providing an object-orientated interface to
10799 templates that is accessible from Python code or other Cheetah templates.
10800 One template can subclass another and selectively reimplement sections of it.
10801@item Provides a simple, yet powerful, caching mechanism that can dramatically
10802 improve the performance of a dynamic website.
10803@item Compiles templates into optimized, yet readable, Python code.
10804@end enumerate")
10805 (license (license:x11-style "file://LICENSE"))))
10806
10807(define-public python2-cheetah
10808 (package-with-python2 python-cheetah))
10809
10810(define-public python-dulwich
10811 (package
10812 (name "python-dulwich")
10813 (version "0.18.6")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (list (string-append "https://www.dulwich.io/releases/"
10818 "dulwich-" version ".tar.gz")
10819 (pypi-uri "dulwich" version)))
10820 (sha256
10821 (base32
10822 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10823 (build-system python-build-system)
10824 (arguments
10825 `(#:phases
10826 (modify-phases %standard-phases
10827 (add-before 'check 'fix-tests
10828 (lambda* (#:key inputs #:allow-other-keys)
10829 ;; The tests use Popen with a custom environment which doesn't
10830 ;; include PATH.
10831 (substitute* "dulwich/tests/compat/utils.py"
10832 (("'git'") (string-append "'"
10833 (which "git")
10834 "'")))
10835 (substitute* '("dulwich/tests/test_repository.py"
10836 "dulwich/tests/test_hooks.py")
10837 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10838 (setenv "TEST_RUNNER" "unittest")
10839 (setenv "PYTHONHASHSEED" "random")
10840 #t)))))
10841 (propagated-inputs
10842 `(("python-fastimport" ,python-fastimport)))
10843 (native-inputs
10844 `(("python-mock" ,python-mock)
10845 ("python-geventhttpclient" ,python-geventhttpclient)
10846 ("git" ,git)))
10847 (home-page "https://www.dulwich.io/")
10848 (synopsis "Git implementation in Python")
10849 (description "Dulwich is an implementation of the Git file formats and
10850protocols written in pure Python.")
10851 ;; Can be used with either license.
10852 (license (list license:asl2.0 license:gpl2+))))
10853
10854(define-public python2-dulwich
10855 (package-with-python2 python-dulwich))
10856
10857(define-public python-pbkdf2
10858 (package
10859 (name "python-pbkdf2")
10860 (version "1.3")
10861 (source
10862 (origin
10863 (method url-fetch)
10864 (uri (pypi-uri "pbkdf2" version))
10865 (sha256
10866 (base32
10867 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10868 (build-system python-build-system)
10869 (arguments
10870 '(#:phases
10871 (modify-phases %standard-phases
10872 (replace 'check
10873 (lambda _
10874 (setenv "PYTHONPATH"
10875 (string-append (getcwd) "/build/lib:"
10876 (getenv "PYTHONPATH")))
ee2bb944 10877 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10878 (propagated-inputs
10879 `(("python-pycrypto" ,python-pycrypto))) ; optional
10880 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10881 (synopsis "Password-based key derivation")
10882 (description "This module implements the password-based key derivation
10883function, PBKDF2, specified in RSA PKCS#5 v2.0.
10884
10885PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10886is part of the RSA Public Key Cryptography Standards series. The provided
10887implementation takes a password or a passphrase and a salt value (and
10888optionally a iteration count, a digest module, and a MAC module) and provides
10889a file-like object from which an arbitrarly-sized key can be read.")
10890 (license license:expat)))
10891
10892(define-public python2-pbkdf2
10893 (package-with-python2 python-pbkdf2))
10894
10895(define-public python-qrcode
10896 (package
10897 (name "python-qrcode")
217ea1a1 10898 (version "6.1")
44d10b1f
RW
10899 (source
10900 (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "qrcode" version))
10903 (sha256
217ea1a1 10904 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10905 (build-system python-build-system)
10906 (arguments
10907 ;; FIXME: Tests require packaging 'pymaging'.
10908 '(#:tests? #f))
10909 (propagated-inputs
10910 `(("python-lxml" ,python-lxml) ; for SVG output
10911 ("python-pillow" ,python-pillow) ; for PNG output
10912 ("python-six" ,python-six)))
44d10b1f
RW
10913 (home-page "https://github.com/lincolnloop/python-qrcode")
10914 (synopsis "QR Code image generator")
10915 (description "This package provides a pure Python QR Code generator
10916module. It uses the Python Imaging Library (PIL) to allow for the generation
10917of QR Codes.
10918
10919In addition this package provides a command line tool to generate QR codes and
10920either write these QR codes to a file or do the output as ascii art at the
10921console.")
10922 (license license:bsd-3)))
10923
10924(define-public python2-qrcode
10925 (package-with-python2 python-qrcode))
10926
10927(define-public python-rst2ansi
10928 (package
10929 (name "python-rst2ansi")
10930 (version "0.1.5")
10931 (source
10932 (origin
10933 (method url-fetch)
10934 (uri (pypi-uri "rst2ansi" version))
10935 (sha256
10936 (base32
10937 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10938 (build-system python-build-system)
10939 (propagated-inputs
10940 `(("python-docutils" ,python-docutils)))
10941 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10942 (synopsis "Convert RST to ANSI-decorated console output")
10943 (description
10944 "Python module dedicated to rendering RST (reStructuredText) documents
10945to ansi-escaped strings suitable for display in a terminal.")
10946 (license license:expat)))
10947
10948(define-public python-ansi2html
10949 (package
10950 (name "python-ansi2html")
10951 (version "1.2.0")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "ansi2html" version))
10956 (sha256
10957 (base32
10958 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10959 (build-system python-build-system)
10960 (native-inputs
10961 `(("python-mock" ,python-mock)
10962 ("python-nose" ,python-nose)))
10963 (propagated-inputs
10964 `(("python-six" ,python-six)))
10965 (home-page "https://github.com/ralphbean/ansi2html")
10966 (synopsis "Convert ANSI-decorated console output to HTML")
10967 (description
10968 "@command{ansi2html} is a Python library and command line utility for
10969convering text with ANSI color codes to HTML or LaTeX.")
10970 (license license:gpl3+)))
10971
10972(define-public python2-ansi2html
10973 (package-with-python2 python-ansi2html))
10974
10975(define-public python-ddt
10976 (package
10977 (name "python-ddt")
10978 (version "1.1.3")
10979 (source
10980 (origin
10981 (method url-fetch)
10982 (uri (pypi-uri "ddt" version))
10983 (sha256
10984 (base32
10985 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10986 (build-system python-build-system)
10987 (native-inputs
10988 `(("python-mock" ,python-mock)
10989 ("python-nose" ,python-nose)))
10990 (propagated-inputs
10991 `(("python-six" ,python-six)
10992 ("python-pyyaml" ,python-pyyaml)))
10993 (home-page "https://github.com/txels/ddt")
10994 (synopsis "Data-Driven Tests")
10995 (description
10996 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10997running it with different test data, and make it appear as multiple test
10998cases.")
10999 (license license:expat)))
11000
11001(define-public python2-ddt
11002 (package-with-python2 python-ddt))
11003
11004(define-public python-pycountry
11005 (package
11006 (name "python-pycountry")
11007 (version "18.5.26")
11008 (source
11009 (origin
11010 (method url-fetch)
11011 (uri (pypi-uri "pycountry" version))
11012 (sha256
11013 (base32
11014 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11015 (build-system python-build-system)
11016 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11017 (synopsis "ISO databases for languages, countries, currencies, etc.")
11018 (description
11019 "@code{pycountry} provides the ISO databases for the standards:
11020@enumerate
11021@item 639-3 (Languages)
11022@item 3166 (Countries)
11023@item 3166-3 (Deleted Countries)
11024@item 3166-2 (Subdivisions of countries)
11025@item 4217 (Currencies)
11026@item 15924 (Scripts)
11027@end enumerate
11028It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11029through a Python API.")
11030 (license license:lgpl2.1+)))
11031
11032(define-public python2-pycountry
11033 (package-with-python2 python-pycountry))
11034
11035(define-public python-pycosat
11036 (package
11037 (name "python-pycosat")
11038 (version "0.6.1")
11039 (source
11040 (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "pycosat" version))
11043 (sha256
11044 (base32
11045 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11046 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11047 (build-system python-build-system)
11048 (home-page "https://github.com/ContinuumIO/pycosat")
11049 (synopsis "Bindings to picosat (a SAT solver)")
11050 (description
11051 "This package provides efficient Python bindings to @code{picosat} on
11052the C level. When importing pycosat, the @code{picosat} solver becomes part
11053of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11054Problem} (SAT) solver.")
11055 (license license:expat)))
11056
11057(define-public python2-pycosat
11058 (package-with-python2 python-pycosat))
11059
11060(define-public python2-ruamel.ordereddict
11061 (package
11062 (name "python2-ruamel.ordereddict")
11063 (version "0.4.9")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "ruamel.ordereddict" version))
11068 (sha256
11069 (base32
11070 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11071 (build-system python-build-system)
11072 (arguments
11073 `(#:python ,python-2
11074 #:phases
11075 (modify-phases %standard-phases
11076 (delete 'check)
11077 (add-after 'install 'check
11078 (lambda* (#:key inputs outputs #:allow-other-keys)
11079 (add-installed-pythonpath inputs outputs)
f987ac30 11080 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11081 (home-page "https://bitbucket.org/ruamel/ordereddict")
11082 (synopsis "Version of dict that keeps keys in insertion order")
11083 (description
11084 "This is an implementation of an ordered dictionary with @dfn{Key
11085Insertion Order} (KIO: updates of values do not affect the position of the
11086key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11087removed and put at the back). The standard library module @code{OrderedDict},
11088implemented later, implements a subset of @code{ordereddict} functionality.
11089Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11090Order} (KSO, no sorting function can be specified, but a transform can be
11091specified to apply on the key before comparison (e.g. @code{string.lower})).")
11092 (license license:expat)))
11093
11094(define-public python-pypeg2
11095 (package
11096 (name "python-pypeg2")
11097 (version "2.15.2")
11098 (source
11099 (origin
11100 (method url-fetch)
11101 (uri (pypi-uri "pyPEG2" version))
11102 (sha256
11103 (base32
11104 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11105 (build-system python-build-system)
11106 (propagated-inputs `(("python-lxml" ,python-lxml)))
11107 (arguments
11108 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11109 '(#:tests? #f))
11110 (home-page "https://fdik.org/pyPEG/")
11111 (synopsis "Parsering Expression Grammars in Python")
11112 (description "PyPEG is an intrinsic parser interpreter framework for
11113Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11114parse many formal languages.")
11115 (license license:gpl2)))
11116
11117(define-public python-incremental
11118 (package
11119 (name "python-incremental")
11120 (version "17.5.0")
11121 (source
11122 (origin
11123 (method url-fetch)
11124 (uri (pypi-uri "incremental" version))
11125 (sha256
11126 (base32
11127 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11128 (build-system python-build-system)
11129 (home-page "https://github.com/hawkowl/incremental")
11130 (synopsis "Library for versioning Python projects")
11131 (description "Incremental is a small library that versions your Python
11132projects.")
11133 (license license:expat)))
11134
11135(define-public python2-incremental
11136 (package-with-python2 python-incremental))
11137
11138(define-public python-invoke
11139 (package
11140 (name "python-invoke")
11141 (home-page "http://www.pyinvoke.org/")
11142 (version "1.1.0")
11143 (source (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "invoke" version))
11146 (sha256
11147 (base32
11148 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11149 (build-system python-build-system)
11150 (arguments
11151 ;; XXX: Requires many dependencies that are not yet in Guix.
11152 `(#:tests? #f))
11153 (synopsis "Pythonic task execution")
11154 (description
11155 "Invoke is a Python task execution tool and library, drawing inspiration
11156from various sources to arrive at a powerful and clean feature set. It is
11157evolved from the Fabric project, but focuses on local and abstract concerns
11158instead of servers and network commands.")
11159 (license license:bsd-3)))
11160
11161(define-public python2-invoke
11162 (package-with-python2 python-invoke))
11163
11164(define-public python-automat
11165 (package
11166 (name "python-automat")
11167 (version "0.6.0")
11168 (source (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "Automat" version))
11171 (sha256
11172 (base32
11173 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11174 (build-system python-build-system)
11175 ;; We disable the tests because they require python-twisted, while
11176 ;; python-twisted depends on python-automat. Twisted is optional, but the
11177 ;; tests fail if it is not available. Also see
11178 ;; <https://github.com/glyph/automat/issues/71>.
11179 (arguments '(#:tests? #f))
11180 (native-inputs
11181 `(("python-m2r" ,python-m2r)
11182 ("python-setuptools-scm" ,python-setuptools-scm)
11183 ("python-graphviz" ,python-graphviz)))
11184 (propagated-inputs
11185 `(("python-six" ,python-six)
11186 ("python-attrs" ,python-attrs)))
11187 (home-page "https://github.com/glyph/Automat")
11188 (synopsis "Self-service finite-state machines")
11189 (description "Automat is a library for concise, idiomatic Python
11190expression of finite-state automata (particularly deterministic finite-state
11191transducers).")
11192 (license license:expat)))
11193
11194(define-public python2-automat
11195 (package-with-python2 python-automat))
11196
11197(define-public python-m2r
11198 (package
11199 (name "python-m2r")
11200 (version "0.1.12")
11201 (source (origin
11202 (method url-fetch)
11203 (uri (pypi-uri "m2r" version))
11204 (sha256
11205 (base32
11206 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11207 (build-system python-build-system)
11208 (propagated-inputs
11209 `(("python-docutils" ,python-docutils)
11210 ("python-mistune" ,python-mistune)))
11211 (native-inputs
11212 `(("python-pygments" ,python-pygments)
11213 ("python-mock" ,python-mock)))
11214 (home-page "https://github.com/miyakogi/m2r")
11215 (synopsis "Markdown to reStructuredText converter")
11216 (description "M2R converts a markdown file including reST markups to valid
11217reST format.")
11218 (license license:expat)))
11219
11220(define-public python2-m2r
11221 (package-with-python2 python-m2r))
11222
11223(define-public python-constantly
11224 (package
11225 (name "python-constantly")
11226 (version "15.1.0")
11227 (source (origin
11228 (method url-fetch)
11229 (uri (pypi-uri "constantly" version))
11230 (sha256
11231 (base32
11232 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11233 (build-system python-build-system)
11234 (home-page "https://github.com/twisted/constantly")
11235 (synopsis "Symbolic constants in Python")
11236 (description "Constantly is a Python library that provides symbolic
11237constant support. It includes collections and constants with text, numeric,
11238and bit flag values.")
11239 (license license:expat)))
11240
11241(define-public python2-constantly
11242 (package-with-python2 python-constantly))
11243
11244(define-public python-attrs
11245 (package
11246 (name "python-attrs")
11247 (version "18.2.0")
11248 (source (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "attrs" version))
11251 (sha256
11252 (base32
11253 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11254 (build-system python-build-system)
11255 (arguments
11256 `(#:modules ((guix build utils)
11257 (guix build python-build-system)
11258 (ice-9 ftw)
11259 (srfi srfi-1)
11260 (srfi srfi-26))
11261 #:phases (modify-phases %standard-phases
11262 (replace 'check
11263 (lambda _
11264 (let ((cwd (getcwd)))
11265 (setenv "PYTHONPATH"
11266 (string-append
11267 cwd "/build/"
11268 (find (cut string-prefix? "lib" <>)
11269 (scandir (string-append cwd "/build")))
11270 ":"
11271 (getenv "PYTHONPATH")))
11272 (invoke "python" "-m" "pytest")))))))
11273 (native-inputs
11274 `(("python-coverage" ,python-coverage)
11275 ("python-hypothesis" ,python-hypothesis)
11276 ("python-pympler" ,python-pympler)
11277 ("python-pytest" ,python-pytest)
11278 ("python-six" ,python-six)
11279 ("python-sphinx" ,python-sphinx)
11280 ("python-zope-interface" ,python-zope-interface)))
11281 (home-page "https://github.com/python-attrs/attrs/")
11282 (synopsis "Attributes without boilerplate")
11283 (description "@code{attrs} is a Python package with class decorators that
11284ease the chores of implementing the most common attribute-related object
11285protocols.")
11286 (license license:expat)))
11287
11288(define-public python2-attrs
11289 (package-with-python2 python-attrs))
11290
11291(define-public python-attrs-bootstrap
11292 (package
11293 (inherit python-attrs)
11294 (name "python-attrs-bootstrap")
11295 ;; Keep this on a fixed version so python-attrs can be updated without
11296 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11297 (version "17.4.0")
11298 (source (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "attrs" version))
11301 (sha256
11302 (base32
11303 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11304 (native-inputs `())
11305 (arguments `(#:tests? #f))))
11306
11307(define-public python2-attrs-bootstrap
11308 (package-with-python2 python-attrs-bootstrap))
11309
11310(define-public python2-cliapp
11311 (package
11312 (name "python2-cliapp")
9064b84e 11313 (version "1.20180812.1")
44d10b1f
RW
11314 (source
11315 (origin
11316 (method url-fetch)
11317 (uri (string-append
11318 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11319 version ".tar.gz"))
11320 (sha256
11321 (base32
9064b84e 11322 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11323 (build-system python-build-system)
11324 (arguments
11325 `(#:python ,python-2
11326 #:phases
11327 (modify-phases %standard-phases
11328 ;; check phase needs to be run before the build phase. If not,
11329 ;; coverage-test-runner looks for tests for the built source files,
11330 ;; and fails.
11331 (delete 'check)
11332 (add-before 'build 'check
11333 (lambda _
11334 ;; Disable python3 tests
11335 (substitute* "check"
11336 (("python3") "# python3"))
6c826d32 11337 (invoke "./check"))))))
44d10b1f
RW
11338 (native-inputs
11339 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11340 ("python2-pep8" ,python2-pep8)))
11341 (propagated-inputs
11342 `(("python2-pyaml" ,python2-pyaml)))
11343 (home-page "https://liw.fi/cliapp/")
11344 (synopsis "Python framework for command line programs")
11345 (description "@code{python2-cliapp} is a python framework for
11346command line programs. It contains the typical stuff such programs
11347need to do, such as parsing the command line for options, and
11348iterating over input files.")
11349 (license license:gpl2+)))
11350
11351(define-public python2-ttystatus
11352 (package
11353 (name "python2-ttystatus")
e516a9c2 11354 (version "0.36")
44d10b1f
RW
11355 (source
11356 (origin
11357 (method url-fetch)
11358 (uri (string-append
11359 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11360 version ".tar.gz"))
11361 (sha256
11362 (base32
e516a9c2 11363 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11364 (build-system python-build-system)
11365 (native-inputs
11366 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11367 ("python2-pep8" ,python2-pep8)))
11368 (arguments
11369 `(#:python ,python-2
11370 #:phases
11371 (modify-phases %standard-phases
11372 ;; check phase needs to be run before the build phase. If not,
11373 ;; coverage-test-runner looks for tests for the built source files,
11374 ;; and fails.
11375 (delete 'check)
11376 (add-before 'build 'check
cbeee881 11377 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11378 (home-page "https://liw.fi/ttystatus/")
11379 (synopsis "Python library for showing progress reporting and
11380status updates on terminals")
11381 (description "@code{python2-ttystatus} is a python library for
11382showing progress reporting and status updates on terminals, for
11383command line programs. Output is automatically adapted to the width
11384of the terminal: truncated if it does not fit, and resized if the
11385terminal size changes.")
11386 (license license:gpl3+)))
11387
11388(define-public python2-tracing
11389 (package
11390 (name "python2-tracing")
11391 (version "0.10")
11392 (source
11393 (origin
11394 (method url-fetch)
11395 (uri (string-append
11396 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11397 version ".tar.gz"))
11398 (sha256
11399 (base32
11400 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11401 (build-system python-build-system)
11402 (arguments
11403 `(#:python ,python-2))
11404 (home-page "https://liw.fi/tracing/")
11405 (synopsis "Python debug logging helper")
11406 (description "@code{python2-tracing} is a python library for
11407logging debug messages. It provides a way to turn debugging messages
11408on and off, based on the filename they occur in. It is much faster
11409than using @code{logging.Filter} to accomplish the same thing, which
11410matters when code is run in production mode. The actual logging still
11411happens using the @code{logging} library.")
11412 (license license:gpl3+)))
11413
11414(define-public python2-larch
11415 (package
11416 (name "python2-larch")
11417 (version "1.20151025")
11418 (source
11419 (origin
11420 (method url-fetch)
11421 (uri (string-append
11422 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11423 version ".tar.gz"))
11424 (patches (search-patches
11425 "python2-larch-coverage-4.0a6-compatibility.patch"))
11426 (sha256
11427 (base32
11428 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11429 (build-system python-build-system)
11430 (arguments
11431 `(#:python ,python-2
11432 #:phases
11433 (modify-phases %standard-phases
11434 ;; check phase needs to be run before the build phase. If not,
11435 ;; coverage-test-runner looks for tests for the built source files,
11436 ;; and fails.
11437 (delete 'check)
11438 (add-before 'build 'check
204ad455 11439 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11440 (native-inputs
11441 `(("cmdtest" ,cmdtest)
11442 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11443 (propagated-inputs
11444 `(("python2-tracing" ,python2-tracing)))
11445 (home-page "https://liw.fi/larch/")
11446 (synopsis "Python copy-on-write B-tree library")
11447 (description "@code{python2-larch} is an implementation of
11448particular kind of B-tree, based on research by Ohad Rodeh. See
11449@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11450on the data structure.
11451
11452The distinctive feature of this B-tree is that a node is never
11453(conceptually) modified. Instead, all updates are done by
11454copy-on-write. This makes it easy to clone a tree, and modify only the
11455clone, while other processes access the original tree.")
11456 (license license:gpl3+)))
11457
11458(define-public python-astroid
11459 (package
11460 (name "python-astroid")
11461 (version "2.1.0")
11462 (source
11463 (origin
11464 (method url-fetch)
11465 (uri (pypi-uri "astroid" version))
11466 (sha256
11467 (base32
11468 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11469 (build-system python-build-system)
11470 (propagated-inputs
11471 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11472 ("python-six" ,python-six)
11473 ("python-wrapt" ,python-wrapt)))
11474 (native-inputs
11475 `(("python-dateutil" ,python-dateutil)
11476 ("python-nose" ,python-nose)
11477 ("python-pytest" ,python-pytest)
11478 ("python-pytest-runner" ,python-pytest-runner)))
11479 (arguments
11480 `(#:phases
11481 (modify-phases %standard-phases
11482 (add-after 'unpack 'remove-spurious-test
11483 (lambda _
11484 ;; This can be removed after upgrading from python-3.7
11485 ;; https://github.com/PyCQA/astroid/issues/593
11486 ;; https://bugs.python.org/issue34056
11487 (delete-file "astroid/tests/unittest_modutils.py")
11488 #t))
11489 (replace 'check
11490 (lambda _
11491 (invoke "pytest" "astroid"))))))
11492 (home-page "https://github.com/PyCQA/astroid")
11493 (synopsis "Common base representation of python source code for pylint and
11494other projects")
11495 (description "@code{python-astroid} provides a common base representation
11496of python source code for projects such as pychecker, pyreverse, pylint, etc.
11497
11498It provides a compatible representation which comes from the _ast module. It
11499rebuilds the tree generated by the builtin _ast module by recursively walking
11500down the AST and building an extended ast. The new node classes have
11501additional methods and attributes for different usages. They include some
11502support for static inference and local name scopes. Furthermore, astroid
11503builds partial trees by inspecting living objects.")
11504 (license license:lgpl2.1+)
11505 (properties `((python2-variant . ,(delay python2-astroid))))))
11506
11507(define-public python2-astroid
11508 (let ((base (package-with-python2
11509 (strip-python2-variant python-astroid))))
11510 (package (inherit base)
11511 ;; Version 2.x removes python2 support.
11512 (version "1.6.5")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "astroid" version))
11517 (sha256
11518 (base32
11519 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11520 (arguments
11521 (substitute-keyword-arguments (package-arguments base)
11522 ((#:phases phases)
11523 `(modify-phases ,phases
11524 (add-after 'unpack 'remove-spurious-test
11525 (lambda _
11526 ;; https://github.com/PyCQA/astroid/issues/276
11527 (delete-file "astroid/tests/unittest_brain.py")
11528 #t))
11529 (replace 'check
11530 (lambda _
11531 (invoke"python" "-m" "unittest" "discover"
11532 "-p" "unittest*.py")))))))
11533 (native-inputs `())
11534 (propagated-inputs
11535 `(("python2-backports-functools-lru-cache"
11536 ,python2-backports-functools-lru-cache)
11537 ("python2-enum34" ,python2-enum34)
11538 ("python2-singledispatch" ,python2-singledispatch)
11539 ,@(package-propagated-inputs base))))))
11540
11541(define-public python-isort
11542 (package
11543 (name "python-isort")
e2227b6a 11544 (version "4.3.4")
44d10b1f
RW
11545 (source
11546 (origin
e2227b6a
EF
11547 (method git-fetch)
11548 (uri (git-reference
11549 ;; Tests pass only from the Github sources
11550 (url "https://github.com/timothycrosley/isort")
11551 (commit version)))
11552 (file-name (git-file-name name version))
44d10b1f
RW
11553 (sha256
11554 (base32
e2227b6a 11555 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11556 (build-system python-build-system)
11557 (native-inputs
11558 `(("python-mock" ,python-mock)
11559 ("python-pytest" ,python-pytest)))
11560 (home-page "https://github.com/timothycrosley/isort")
11561 (synopsis "Python utility/library to sort python imports")
11562 (description "@code{python-isort} is a python utility/library to sort
11563imports alphabetically, and automatically separated into sections. It
11564provides a command line utility, a python library and plugins for various
11565editors.")
e2227b6a
EF
11566 (license license:expat)
11567 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11568
11569(define-public python2-isort
e2227b6a
EF
11570 (let ((base (package-with-python2
11571 (strip-python2-variant python-isort))))
11572 (package (inherit base)
11573 (native-inputs
11574 `(("python2-futures" ,python2-futures)
11575 ,@(package-native-inputs base))))))
44d10b1f
RW
11576
11577(define-public python2-backports-functools-lru-cache
11578 (package
11579 (name "python2-backports-functools-lru-cache")
11580 (version "1.5")
11581 (source
11582 (origin
11583 (method url-fetch)
11584 ;; only the pypi tarballs contain the necessary metadata
11585 (uri (pypi-uri "backports.functools_lru_cache" version))
11586 (sha256
11587 (base32
11588 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11589 (build-system python-build-system)
11590 (native-inputs
11591 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11592 (arguments
11593 `(#:python ,python-2))
11594 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11595 (synopsis "Backport of functools.lru_cache from Python 3.3")
11596 (description "@code{python2-backports-functools-lru-cache} is a backport
11597of @code{functools.lru_cache} from python 3.3.")
11598 (license license:expat)))
11599
11600(define-public python-configparser
11601 (package
11602 (name "python-configparser")
11603 (version "3.5.0")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (string-append
11608 "https://bitbucket.org/ambv/configparser/get/"
11609 version ".tar.bz2"))
11610 (file-name (string-append name "-" version ".tar.gz"))
11611 (sha256
11612 (base32
11613 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11614 (build-system python-build-system)
809f003f 11615 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11616 (synopsis "Backport of configparser from python 3.5")
11617 (description "@code{python-configparser} is a backport of
11618@code{configparser} from Python 3.5 so that it can be used directly
11619in other versions.")
11620 (license license:expat)))
11621
11622(define-public python2-configparser
11623 (package-with-python2 python-configparser))
11624
11625(define-public python-mando
11626 (package
11627 (name "python-mando")
11628 (version "0.6.4")
11629 (source (origin
11630 (method url-fetch)
11631 (uri (pypi-uri "mando" version))
11632 (sha256
11633 (base32
11634 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11635 (build-system python-build-system)
11636 (propagated-inputs
11637 `(("python-rst2ansi" ,python-rst2ansi)
11638 ("python-six" ,python-six)))
11639 (native-inputs
11640 `(("python-pytest" ,python-pytest)))
11641 (home-page "https://mando.readthedocs.org/")
11642 (synopsis
11643 "Wrapper around argparse, allowing creation of complete CLI applications")
11644 (description
11645 "This package is a wrapper around argparse, allowing you to write complete CLI
11646applications in seconds while maintaining all the flexibility.")
11647 (license license:expat)))
11648
11649(define-public python2-mando
11650 (package-with-python2 python-mando))
11651
70daf82f
RW
11652(define-public python2-argparse
11653 (package
11654 (name "python2-argparse")
11655 (version "1.4.0")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "argparse" version))
11660 (sha256
11661 (base32
11662 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
11663 (build-system python-build-system)
11664 (arguments
11665 `(#:python ,python-2))
11666 (home-page "https://github.com/ThomasWaldmann/argparse/")
11667 (synopsis "Python command-line parsing library")
11668 (description
11669 "This package is mostly for people who want to have @code{argparse} on
11670older Pythons because it was not part of the standard library back then.")
11671 (license license:psfl)))
11672
44d10b1f
RW
11673(define-public python-fudge
11674 (package
11675 (name "python-fudge")
11676 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11677 ;; package, which is currently the only use of this package.
11678 (version "0.9.6")
11679 (source
11680 (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "fudge" version))
11683 (sha256
11684 (base32
11685 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11686 (build-system python-build-system)
11687 (arguments
11688 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11689 (home-page "https://github.com/fudge-py/fudge")
11690 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11691 (description
11692 "Fudge is a Python module for using fake objects (mocks and stubs) to
11693test real ones.
11694
11695In readable Python code, you declare the methods available on your fake object
11696and how they should be called. Then you inject that into your application and
11697start testing. This declarative approach means you don’t have to record and
11698playback actions and you don’t have to inspect your fakes after running code.
11699If the fake object was used incorrectly then you’ll see an informative
11700exception message with a traceback that points to the culprit.")
11701 (license license:expat)))
11702
11703(define-public python2-fudge
11704 (package-with-python2 python-fudge))
11705
11706(define-public python-mwclient
11707 (package
11708 (name "python-mwclient")
11709 (version "0.8.4")
11710 (source
11711 (origin
11712 (method url-fetch)
11713 ;; The PyPI version wouldn't contain tests.
11714 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11715 "v" version ".tar.gz"))
11716 (file-name (string-append name "-" version ".tar.gz"))
11717 (sha256
11718 (base32
11719 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11720 (build-system python-build-system)
11721 (propagated-inputs
11722 `(("python-requests" ,python-requests)
11723 ("python-requests-oauthlib"
11724 ,python-requests-oauthlib)
11725 ("python-six" ,python-six)))
11726 (native-inputs
11727 `(("python-mock" ,python-mock)
11728 ("python-pytest" ,python-pytest)
11729 ("python-pytest-pep8" ,python-pytest-pep8)
11730 ("python-pytest-cache" ,python-pytest-cache)
11731 ("python-pytest-cov" ,python-pytest-cov)
11732 ("python-responses" ,python-responses)))
11733 (home-page "https://github.com/btongminh/mwclient")
11734 (synopsis "MediaWiki API client")
11735 (description "This package provides a MediaWiki API client.")
11736 (license license:expat)))
11737
11738(define-public python2-mwclient
11739 (package-with-python2 python-mwclient))
11740
11741(define-public python-utils
11742 (package
11743 (name "python-utils")
11744 (version "2.1.0")
11745 (source (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "python-utils" version))
11748 (sha256
11749 (base32
11750 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11751 (build-system python-build-system)
11752 (native-inputs
11753 `(("pytest-runner" ,python-pytest-runner)
11754 ("pytest" ,python-pytest)
11755 ("six" ,python-six)))
11756 (home-page "https://github.com/WoLpH/python-utils")
11757 (synopsis "Convenient utilities not included with the standard Python install")
11758 (description
11759 "Python Utils is a collection of small Python functions and classes which
11760make common patterns shorter and easier.")
11761 (license license:bsd-2)))
11762
11763(define-public python2-utils
11764 (package-with-python2 python-utils))
11765
11766(define-public python-sphinx-me
11767 (package
11768 (name "python-sphinx-me")
11769 (version "0.3")
11770 (source
11771 (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "sphinx-me" version))
11774 (sha256
11775 (base32
11776 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11777 (build-system python-build-system)
11778 (home-page "https://github.com/stephenmcd/sphinx-me")
11779 (synopsis "Create a Sphinx documentation shell")
11780 (description
11781 "Create a Sphinx documentation shell for your project and include the
11782README file as the documentation index. It handles extracting the required
11783meta data such as the project name, author and version from your project for
11784use in your Sphinx docs.")
11785 (license license:bsd-2)))
11786
11787(define-public python2-sphinx-me
11788 (package-with-python2 python-sphinx-me))
11789
11790(define-public python-diff-match-patch
11791 (package
11792 (name "python-diff-match-patch")
11793 (version "20121119")
11794 (source
11795 (origin
11796 (method url-fetch)
11797 (uri (pypi-uri "diff-match-patch" version))
11798 (sha256
11799 (base32
11800 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11801 (build-system python-build-system)
11802 (home-page "https://code.google.com/p/google-diff-match-patch")
11803 (synopsis "Synchronize plain text")
11804 (description "Diff Match and Patch libraries offer robust algorithms to
11805perform the operations required for synchronizing plain text.")
11806 (license license:asl2.0)))
11807
11808(define-public python2-diff-match-patch
11809 (package-with-python2 python-diff-match-patch))
11810
11811(define-public python-dirsync
11812 (package
11813 (name "python-dirsync")
11814 (version "2.2.3")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "dirsync" version))
11819 (sha256
11820 (base32
11821 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11822 (build-system python-build-system)
11823 (propagated-inputs
11824 `(("six" ,python-six)))
11825 (home-page "https://bitbucket.org/tkhyn/dirsync")
11826 (synopsis "Advanced directory tree synchronisation tool")
11827 (description "Advanced directory tree synchronisation tool.")
11828 (license license:expat)))
11829
11830(define-public python2-dirsync
11831 (package-with-python2 python-dirsync))
11832
11833(define-public python-levenshtein
11834 (package
11835 (name "python-levenshtein")
11836 (version "0.12.0")
11837 (source
11838 (origin
11839 (method url-fetch)
11840 (uri (pypi-uri "python-Levenshtein" version))
11841 (sha256
11842 (base32
11843 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11844 (build-system python-build-system)
11845 (home-page "https://github.com/ztane/python-Levenshtein")
11846 (synopsis "Fast computation of Levenshtein distance and string similarity")
11847 (description
11848 "The Levenshtein Python C extension module contains functions for fast computation of
11849@enumerate
11850@item Levenshtein (edit) distance, and edit operations
11851@item string similarity
11852@item approximate median strings, and generally string averaging
11853@item string sequence and set similarity
11854@end enumerate
11855It supports both normal and Unicode strings.")
11856 (license license:gpl2+)))
11857
11858(define-public python2-levenshtein
11859 (package-with-python2 python-levenshtein))
11860
11861(define-public python-scandir
11862 (package
11863 (name "python-scandir")
11864 (version "1.9.0")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "scandir" version))
11869 (sha256
11870 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11871 (build-system python-build-system)
11872 (arguments
11873 `(#:phases (modify-phases %standard-phases
11874 (replace 'check
11875 (lambda _
11876 (invoke "python" "test/run_tests.py"))))))
11877 (home-page "https://github.com/benhoyt/scandir")
11878 (synopsis "Directory iteration function")
11879 (description
11880 "Directory iteration function like os.listdir(), except that instead of
11881returning a list of bare filenames, it yields DirEntry objects that include
11882file type and stat information along with the name. Using scandir() increases
11883the speed of os.walk() by 2-20 times (depending on the platform and file
11884system) by avoiding unnecessary calls to os.stat() in most cases.
11885
11886This package is part of the Python standard library since version 3.5.")
11887 (license license:bsd-3)))
11888
11889(define-public python2-scandir
11890 (package-with-python2 python-scandir))
11891
11892(define-public python2-stemming
11893 (package
11894 (name "python2-stemming")
11895 (version "1.0.1")
11896 (source
11897 (origin
11898 (method url-fetch)
11899 (uri (pypi-uri "stemming" version))
11900 (sha256
11901 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11902 (build-system python-build-system)
11903 (arguments
11904 `(#:python ,python-2))
11905 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11906 (synopsis "Python implementations of various stemming algorithms")
11907 (description
11908 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11909stemming algorithms for English. These implementations are straightforward and
11910efficient, unlike some Python versions of the same algorithms available on the
11911Web. This package is an extraction of the stemming code included in the Whoosh
11912search engine.")
11913 (license license:public-domain)))
11914
11915(define-public python-factory-boy
11916 (package
11917 (name "python-factory-boy")
11918 (version "2.8.1")
11919 (source
11920 (origin
11921 (method url-fetch)
11922 (uri (pypi-uri "factory_boy" version))
11923 (sha256
11924 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11925 (build-system python-build-system)
11926 (arguments
11927 ;; Tests are not included in the tarball.
11928 `(#:tests? #f))
11929 (propagated-inputs
11930 `(("faker" ,python-faker)))
11931 (home-page "https://github.com/benhoyt/scandir")
11932 (synopsis "Versatile test fixtures replacement")
11933 (description
11934 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11935
11936As a fixtures replacement tool, it aims to replace static, hard to maintain
11937fixtures with easy-to-use factories for complex object.
11938
11939Instead of building an exhaustive test setup with every possible combination
11940of corner cases, factory_boy allows you to use objects customized for the
11941current test, while only declaring the test-specific fields")
11942 (license license:expat)))
11943
11944(define-public python2-factory-boy
11945 (package-with-python2 python-factory-boy))
11946
11947(define-public python-translate-toolkit
11948 (package
11949 (name "python-translate-toolkit")
11950 (version "2.1.0")
11951 (source
11952 (origin
11953 (method url-fetch)
11954 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11955 (sha256
11956 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11957 (build-system python-build-system)
11958 (native-inputs
11959 `(("python-pytest" ,python-pytest)
11960 ("python-sphinx" ,python-sphinx)))
11961 (propagated-inputs
11962 `(("python-babel" ,python-babel)
11963 ("python-beautifulsoup4" ,python-beautifulsoup4)
11964 ("python-chardet" ,python-chardet)
11965 ("python-diff-match-patch" ,python-diff-match-patch)
11966 ("python-levenshtein" ,python-levenshtein)
11967 ("python-lxml" ,python-lxml)
11968 ("python-six" ,python-six)
11969 ("python-vobject" ,python-vobject)
11970 ("python-pyyaml" ,python-pyyaml)))
11971 (arguments
11972 ;; TODO: tests are not run, because they end with
11973 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11974 ;; 'parse_funcs'
11975 ;; during test setup.
11976 `(#:tests? #f))
11977 (home-page "http://toolkit.translatehouse.org")
11978 (synopsis "Tools and API for translation and localization engineering")
11979 (description
11980 "Tools and API for translation and localization engineering. It contains
11981several utilities, as well as an API for building localization tools.")
11982 (license license:gpl2+)))
11983
11984(define-public python2-translate-toolkit
11985 (package-with-python2 python-translate-toolkit))
11986
11987(define-public python-packaging
11988 (package
11989 (name "python-packaging")
11990 (version "18.0")
11991 (source
11992 (origin
11993 (method url-fetch)
11994 (uri (pypi-uri "packaging" version))
11995 (sha256
11996 (base32
11997 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11998 (build-system python-build-system)
11999 (arguments
12000 `(#:phases (modify-phases %standard-phases
12001 (replace 'check
12002 (lambda _ (invoke "py.test" "-vv"))))))
12003 (native-inputs
12004 `(("python-pretend" ,python-pretend)
12005 ("python-pytest" ,python-pytest)))
12006 (propagated-inputs
12007 `(("python-pyparsing" ,python-pyparsing)
12008 ("python-six" ,python-six)))
12009 (home-page "https://github.com/pypa/packaging")
12010 (synopsis "Core utilities for Python packages")
12011 (description "Packaging is a Python module for dealing with Python packages.
12012It offers an interface for working with package versions, names, and dependency
12013information.")
12014 ;; From 'LICENSE': This software is made available under the terms of
12015 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12016 ;; Contributions to this software is made under the terms of *both* these
12017 ;; licenses.
12018 (license (list license:asl2.0 license:bsd-2))))
12019
12020(define-public python2-packaging
12021 (package-with-python2 python-packaging))
12022
12023(define-public python-relatorio
12024 (package
12025 (name "python-relatorio")
12026 (version "0.8.0")
12027 (source
12028 (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "relatorio" version))
12031 (sha256
12032 (base32
12033 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12034 (build-system python-build-system)
12035 (propagated-inputs
12036 `(("python-lxml" ,python-lxml)
12037 ("python-genshi" ,python-genshi)))
12038 (native-inputs
12039 `(("python-magic" ,python-magic)))
12040 (home-page "https://relatorio.tryton.org/")
12041 (synopsis "Templating library able to output ODT and PDF files")
12042 (description "Relatorio is a templating library which provides a way to
12043easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12044for more filetypes can be easily added by creating plugins for them.")
12045 (license license:gpl3+)))
12046
12047(define-public python2-relatorio
12048 (package-with-python2 python-relatorio))
12049
12050(define-public python-radon
12051 (package
12052 (name "python-radon")
12053 (version "2.2.0")
12054 (source
12055 (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "radon" version))
12058 (sha256
12059 (base32
12060 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12061 (build-system python-build-system)
12062 (arguments
12063 `(#:phases (modify-phases %standard-phases
12064 (replace 'check
12065 (lambda _
12066 (invoke "python" "radon/tests/run.py"))))))
12067 (propagated-inputs
12068 `(("python-colorama" ,python-colorama)
12069 ("python-flake8-polyfill" ,python-flake8-polyfill)
12070 ("python-mando" ,python-mando)))
12071 (native-inputs
12072 `(("python-pytest" ,python-pytest)
12073 ("python-pytest-mock" ,python-pytest-mock)))
12074 (home-page "https://radon.readthedocs.org/")
12075 (synopsis "Code Metrics in Python")
12076 (description "Radon is a Python tool which computes various code metrics.
12077Supported metrics are:
12078@itemize @bullet
12079@item raw metrics: SLOC, comment lines, blank lines, &c.
12080@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12081@item Halstead metrics (all of them)
12082@item the Maintainability Index (a Visual Studio metric)
12083@end itemize")
12084 (license license:expat)))
12085
12086(define-public python2-radon
12087 (package-with-python2 python-radon))
12088
12089(define-public python-sure
12090 (package
12091 (name "python-sure")
12092 (version "1.4.11")
12093 (source
12094 (origin
12095 (method url-fetch)
12096 (uri (pypi-uri "sure" version))
12097 (sha256
12098 (base32
12099 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12100 (build-system python-build-system)
12101 (propagated-inputs
12102 `(("python-mock" ,python-mock)
12103 ("python-six" ,python-six)))
12104 (native-inputs
12105 `(("python-nose" ,python-nose)))
12106 (home-page "https://github.com/gabrielfalcao/sure")
12107 (synopsis "Automated testing library in python for python")
12108 (description
12109 "Sure is a python library that leverages a DSL for writing assertions.
12110Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12111 (license license:gpl3+)))
12112
12113(define-public python2-sure
12114 (package-with-python2 python-sure))
12115
12116(define-public python2-couleur
12117 ;; This package does not seem to support python3 at all, hence,
12118 ;; only the python2 variant definition is provided.
12119 (package
12120 (name "python2-couleur")
12121 (version "0.6.2")
12122 (source
12123 (origin
12124 (method url-fetch)
12125 (uri (pypi-uri "couleur" version))
12126 (sha256
12127 (base32
12128 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12129 (build-system python-build-system)
12130 (arguments
12131 `(#:python ,python-2))
12132 (home-page "https://github.com/gabrielfalcao/couleur")
12133 (synopsis
12134 "ANSI terminal tool for python, colored shell and other handy fancy features")
12135 (description
12136 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12137terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12138 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12139 ;; https://github.com/gabrielfalcao/couleur/issues/11
12140 (license license:lgpl3+)))
12141
12142(define-public python-misaka
12143 (package
12144 (name "python-misaka")
0dcb3412 12145 (version "2.1.1")
44d10b1f
RW
12146 (source
12147 (origin
12148 (method url-fetch)
12149 (uri (pypi-uri "misaka" version))
12150 (sha256
12151 (base32
0dcb3412 12152 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12153 (build-system python-build-system)
12154 (arguments
12155 `(;; Line 37 of setup.py calls self.run_command('develop')
12156 ;; in the 'check' phase. This command seems to be trying
12157 ;; to write to
12158 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12159 ;; for which it does not have the permission to write.
12160 #:tests? #f))
12161 (propagated-inputs
12162 `(("python-cffi" ,python-cffi)))
12163 (home-page "https://github.com/FSX/misaka")
12164 (synopsis "Python binding for Hoedown")
12165 (description
12166 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12167library written in C. It features a fast HTML renderer and functionality to make custom
12168renderers (e.g. man pages or LaTeX).")
12169 (license license:expat)))
12170
12171(define-public python2-misaka
12172 (package-with-python2 python-misaka))
12173
12174(define-public python2-steadymark
12175 ;; This is forced into being a python2 only variant
12176 ;; due to its dependence on couleur that has no support
12177 ;; for python3
12178 (package
12179 (name "python2-steadymark")
12180 (version "0.7.3")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "steadymark" version))
12185 (sha256
12186 (base32
12187 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12188 (build-system python-build-system)
12189 (native-inputs
12190 `(("python-couleur" ,python2-couleur)
12191 ("python-sure" ,python2-sure)
12192 ("python-misaka" ,python2-misaka)))
12193 (arguments
12194 `(#:python ,python-2
12195 #:phases
12196 (modify-phases %standard-phases
12197 (add-before 'build 'patch-setup-py
12198 (lambda _
12199 ;; Update requirements from dependency==version
12200 ;; to dependency>=version
12201 (substitute* "setup.py"
12202 (("==") ">="))
12203 #t)))))
12204 (home-page "https://github.com/gabrielfalcao/steadymark")
12205 (synopsis "Markdown-based test runner for python")
12206 (description
12207 "@code{Steadymark} allows documentation to be written in github-flavoured
12208markdown. The documentation may contain snippets of code surrounded by python
12209code blocks and @code{Steadymark} will find these snippets and run them, making
12210sure that there are no old malfunctional examples in the documentation examples.")
12211 (license license:expat)))
12212
12213(define-public python-jsonpointer
12214 (package
12215 (name "python-jsonpointer")
12216 (version "1.10")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (pypi-uri "jsonpointer" version))
12221 (sha256
12222 (base32
12223 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12224 (build-system python-build-system)
12225 (home-page "https://github.com/stefankoegl/python-json-pointer")
12226 (synopsis "Identify specific nodes in a JSON document")
12227 (description "@code{jsonpointer} allows you to access specific nodes
12228by path in a JSON document (see RFC 6901).")
12229 (license license:bsd-3)))
12230
12231(define-public python2-jsonpointer
12232 (package-with-python2 python-jsonpointer))
12233
12234(define-public python-jsonpatch
12235 (package
12236 (name "python-jsonpatch")
12237 (version "1.16")
12238 (source
12239 (origin
12240 (method url-fetch)
12241 ;; pypi version lacks tests.js
12242 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12243 "archive/v" version ".tar.gz"))
12244 (file-name (string-append name "-" version ".tar.gz"))
12245 (sha256
12246 (base32
12247 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12248 (build-system python-build-system)
12249 (native-inputs
12250 `(("python-jsonpointer" ,python-jsonpointer)))
12251 (home-page "https://github.com/stefankoegl/python-json-patch")
12252 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12253 (description "@code{jsonpatch} is a library and program that allows
12254applying JSON Patches according to RFC 6902.")
12255 (license license:bsd-3)))
12256
12257(define-public python2-jsonpatch
12258 (package-with-python2 python-jsonpatch))
12259
12260(define-public python-jsonpatch-0.4
12261 (package (inherit python-jsonpatch)
12262 (name "python-jsonpatch")
12263 (version "0.4")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12268 "archive/v" version ".tar.gz"))
12269 (file-name (string-append name "-" version ".tar.gz"))
12270 (sha256
12271 (base32
12272 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12273
12274(define-public python2-jsonpatch-0.4
12275 (package-with-python2 python-jsonpatch-0.4))
12276
12277(define-public python-rfc3986
12278 (package
12279 (name "python-rfc3986")
12280 (version "1.1.0")
12281 (source (origin
12282 (method url-fetch)
12283 (uri (pypi-uri "rfc3986" version))
12284 (sha256
12285 (base32
12286 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12287 (build-system python-build-system)
12288 (arguments
12289 `(#:modules ((guix build utils)
12290 (guix build python-build-system)
12291 (ice-9 ftw)
12292 (srfi srfi-1)
12293 (srfi srfi-26))
12294 #:phases
12295 (modify-phases %standard-phases
12296 (replace 'check
12297 (lambda _
12298 (let ((cwd (getcwd)))
12299 (setenv "PYTHONPATH"
12300 (string-append cwd "/build/"
12301 (find (cut string-prefix? "lib" <>)
12302 (scandir (string-append cwd "/build")))
12303 ":"
12304 (getenv "PYTHONPATH")))
12305 (invoke "pytest" "-v")))))))
12306 (native-inputs
12307 `(("python-pytest" ,python-pytest)))
12308 (home-page "https://rfc3986.readthedocs.io/")
12309 (synopsis "Parse and validate URI references")
12310 (description
12311 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12312validation and authority parsing. This module also supports RFC@tie{}6874
12313which adds support for zone identifiers to IPv6 addresses.")
12314 (license license:asl2.0)))
12315
12316(define-public python2-rfc3986
12317 (package-with-python2 python-rfc3986))
12318
12319(define-public python-rfc3987
12320 (package
12321 (name "python-rfc3987")
12322 (version "1.3.7")
12323 (source
12324 (origin
12325 (method url-fetch)
12326 (uri (pypi-uri "rfc3987" version))
12327 (sha256
12328 (base32
12329 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12330 (build-system python-build-system)
12331 (home-page "https://pypi.python.org/pypi/rfc3987")
12332 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12333 (description "@code{rfc3987} provides routines for parsing and
12334validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12335 (license license:gpl3+)))
12336
12337(define-public python2-rfc3987
12338 (package-with-python2 python-rfc3987))
12339
12340(define-public python-validate-email
12341 (package
12342 (name "python-validate-email")
12343 (version "1.3")
12344 (source
12345 (origin
12346 (method url-fetch)
12347 (uri (pypi-uri "validate_email" version))
12348 (sha256
12349 (base32
12350 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12351 (build-system python-build-system)
12352 (home-page "https://github.com/syrusakbary/validate_email")
12353 (synopsis "Verifies if an email address is valid and really exists")
12354 (description "@code{validate_email} can be used to verify if an email
12355address is valid and really exists.")
12356 (license license:lgpl3+)))
12357
12358(define-public python2-validate-email
12359 (package-with-python2 python-validate-email))
12360
12361(define-public python-flex
12362 (package
12363 (name "python-flex")
12364 (version "6.10.0")
12365 (source
12366 (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "flex" version))
12369 (sha256
12370 (base32
12371 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12372 (build-system python-build-system)
12373 (propagated-inputs
12374 `(("python-click" ,python-click)
12375 ("python-iso8601" ,python-iso8601)
12376 ("python-jsonpointer" ,python-jsonpointer)
12377 ("python-pyyaml" ,python-pyyaml)
12378 ("python-requests" ,python-requests)
12379 ("python-rfc3987" ,python-rfc3987)
12380 ("python-six" ,python-six)
12381 ("python-validate-email" ,python-validate-email)))
12382 (home-page "https://github.com/pipermerriam/flex")
12383 (synopsis "Validates Swagger schemata")
12384 (description "@code{flex} can be used to validate Swagger schemata.")
12385 (license license:bsd-3)))
12386
12387(define-public python2-flex
12388 (package-with-python2 python-flex))
12389
12390(define-public python-marshmallow
12391 (package
12392 (name "python-marshmallow")
12393 (version "3.0.0b14")
12394 (source
12395 (origin
12396 (method url-fetch)
12397 (uri (pypi-uri "marshmallow" version))
12398 (sha256
12399 (base32
12400 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12401 (build-system python-build-system)
12402 (propagated-inputs
12403 `(("python-dateutil" ,python-dateutil)
12404 ("python-simplejson" ,python-simplejson)))
12405 (native-inputs
12406 `(("python-pytest" ,python-pytest)
12407 ("python-pytz" ,python-pytz)))
12408 (home-page "https://github.com/marshmallow-code/marshmallow")
12409 (synopsis "Convert complex datatypes to and from native
12410Python datatypes.")
12411 (description "@code{marshmallow} provides a library for converting
12412complex datatypes to and from native Python datatypes.")
12413 (license license:expat)))
12414
12415(define-public python2-marshmallow
12416 (package-with-python2 python-marshmallow))
12417
12418(define-public python-apispec
12419 (package
12420 (name "python-apispec")
12421 (version "0.25.3")
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "apispec" version))
12426 (sha256
12427 (base32
12428 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12429 (build-system python-build-system)
12430 (propagated-inputs
12431 `(("python-pyyaml" ,python-pyyaml)))
12432 (native-inputs
12433 `(("python-pytest" ,python-pytest)
12434 ("python-flask" ,python-flask)
12435 ("python-marshmallow" ,python-marshmallow)
12436 ("python-tornado" ,python-tornado)
12437 ("python-bottle" ,python-bottle)
12438 ("python-mock" ,python-mock)))
12439 (home-page "https://github.com/marshmallow-code/apispec")
12440 (synopsis "Swagger 2.0 API specification generator")
12441 (description "@code{python-apispec} is a pluggable API specification
12442generator. Currently supports the OpenAPI specification (f.k.a.
12443Swagger 2.0).")
12444 (license license:expat)))
12445
12446(define-public python2-apispec
12447 (package-with-python2 python-apispec))
12448
12449(define-public python-flasgger
12450 (package
12451 (name "python-flasgger")
12452 (version "0.6.3")
12453 (source
12454 (origin
12455 (method url-fetch)
12456 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12457 version ".tar.gz"))
12458 (file-name (string-append name "-" version ".tar.gz"))
12459 (sha256
12460 (base32
12461 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12462 (build-system python-build-system)
12463 (arguments
12464 `(#:phases
12465 (modify-phases %standard-phases
12466 (replace 'check
12467 (lambda* (#:key inputs outputs #:allow-other-keys)
12468 (substitute* "Makefile"
12469 (("flake8 flasgger --ignore=F403")
12470 "flake8 flasgger --ignore=E731,F403"))
12471 (setenv "PYTHONPATH" (string-append (getcwd)
12472 ":"
12473 (getenv "PYTHONPATH")))
ac599a09 12474 (invoke "py.test"))))))
44d10b1f
RW
12475 (propagated-inputs
12476 `(("python-flask" ,python-flask)
12477 ("python-pyyaml" ,python-pyyaml)
12478 ("python-jsonschema" ,python-jsonschema)
12479 ("python-mistune" ,python-mistune)
12480 ("python-six" ,python-six)))
12481 (native-inputs
12482 `(("python-decorator" ,python-decorator)
12483 ("python-flake8" ,python-flake8)
12484 ("python-flask-restful" ,python-flask-restful)
12485 ("python-flex" ,python-flex)
12486 ("python-pytest" ,python-pytest)
12487 ("python-pytest-cov" ,python-pytest-cov)
12488 ("python-marshmallow" ,python-marshmallow)
12489 ("python-apispec" ,python-apispec)))
12490 (home-page "https://github.com/rochacbruno/flasgger/")
12491 (synopsis "Extract Swagger specs from your Flask project")
12492 (description "@code{python-flasgger} allows extracting Swagger specs
12493from your Flask project. It is a fork of Flask-Swagger.")
12494 (license license:expat)))
12495
12496(define-public python2-flasgger
12497 (package-with-python2 python-flasgger))
12498
12499(define-public python-swagger-spec-validator
12500 (package
12501 (name "python-swagger-spec-validator")
12502 (version "2.1.0")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "swagger-spec-validator" version))
12507 (sha256
12508 (base32
12509 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12510 (build-system python-build-system)
12511 (propagated-inputs
12512 `(("python-jsonschema" ,python-jsonschema)
12513 ("python-six" ,python-six)))
12514 (home-page
12515 "https://github.com/Yelp/swagger_spec_validator")
12516 (synopsis "Validation of Swagger specifications")
12517 (description "@code{swagger_spec_validator} provides a library for
12518validating Swagger API specifications.")
12519 (license license:asl2.0)))
12520
12521(define-public python2-swagger-spec-validator
12522 (package-with-python2 python-swagger-spec-validator))
12523
12524(define-public python-apache-libcloud
12525 (package
12526 (name "python-apache-libcloud")
12527 (version "2.4.0")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "apache-libcloud" version))
12532 (sha256
12533 (base32
12534 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12535 (build-system python-build-system)
12536 (arguments
12537 `(#:phases
12538 (modify-phases %standard-phases
12539 (add-after 'unpack 'patch-ssh
12540 (lambda* (#:key inputs #:allow-other-keys)
12541 (substitute* "libcloud/compute/ssh.py"
12542 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12543 "/bin/ssh" "'")))
12544 #t))
12545 (add-after 'unpack 'patch-tests
12546 (lambda _
12547 (substitute* "./libcloud/test/test_file_fixtures.py"
12548 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12549 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12550 return (httplib.OK,
12551 \"1234abcd\",
12552 {\"test\": \"value\"},
12553 httplib.responses[httplib.OK])
12554 def _ascii"))
12555 (substitute* "libcloud/test/compute/test_ssh_client.py"
12556 (("class ShellOutSSHClientTests")
12557 "@unittest.skip(\"Guix container doesn't have ssh service\")
12558class ShellOutSSHClientTests")
12559 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12560 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12561 (("'.xF0', '.x90', '.x8D', '.x88'")
12562 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12563 #t))
12564 (add-before 'check 'copy-secret
12565 (lambda _
12566 (copy-file "libcloud/test/secrets.py-dist"
12567 "libcloud/test/secrets.py")
12568 #t)))))
12569 (inputs
12570 `(("openssh" ,openssh)))
12571 (propagated-inputs
12572 `(("python-paramiko" ,python-paramiko)
12573 ("python-requests" ,python-requests)))
12574 (native-inputs
12575 `(("python-lockfile" ,python-lockfile)
12576 ("python-mock" ,python-mock)
12577 ("python-pytest" ,python-pytest)
12578 ("python-pytest-runner" ,python-pytest-runner)
12579 ("python-requests-mock" ,python-requests-mock)))
12580 (home-page "https://libcloud.apache.org/")
12581 (synopsis "Unified Cloud API")
12582 (description "@code{libcloud} is a Python library for interacting with
12583many of the popular cloud service providers using a unified API.")
12584 (license license:asl2.0)))
12585
12586(define-public python2-apache-libcloud
12587 (package-with-python2 python-apache-libcloud))
12588
12589(define-public python-smmap2
12590 (package
12591 (name "python-smmap2")
12592 (version "2.0.3")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "smmap2" version))
12597 (sha256
12598 (base32
12599 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12600 (build-system python-build-system)
12601 (native-inputs
12602 `(("python-nosexcover" ,python-nosexcover)))
12603 (home-page "https://github.com/Byron/smmap")
12604 (synopsis "Python sliding window memory map manager")
12605 (description "@code{smmap2} is a pure Python implementation of a sliding
12606window memory map manager.")
12607 (license license:bsd-3)))
12608
12609(define-public python2-smmap2
12610 (package-with-python2 python-smmap2))
12611
12612(define-public python-regex
12613 (package
12614 (name "python-regex")
12615 (version "2017.06.07")
12616 (source (origin
12617 (method url-fetch)
12618 (uri (pypi-uri "regex" version))
12619 (sha256
12620 (base32
12621 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12622 (build-system python-build-system)
12623 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12624 (synopsis "Alternative regular expression module")
12625 (description "This regular expression implementation is backwards-
12626compatible with the standard @code{re} module, but offers additional
12627functionality like full case-folding for case-insensitive matches in Unicode.")
12628 (license license:psfl)))
12629
12630(define-public python2-regex
12631 (package-with-python2 python-regex))
12632
12633(define-public python2-pyopengl
12634 (package
12635 (name "python2-pyopengl")
12636 (version "3.1.0")
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (pypi-uri "PyOpenGL" version))
12641 (sha256
12642 (base32
12643 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12644 (arguments
12645 `(#:python ,python-2))
12646 (build-system python-build-system)
12647 (home-page "http://pyopengl.sourceforge.net")
12648 (synopsis "Standard OpenGL bindings for Python")
12649 (description
12650 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12651related APIs. The binding is created using the standard @code{ctypes}
12652library.")
12653 (license license:bsd-3)))
12654
12655(define-public python2-pyopengl-accelerate
12656 (package
12657 (inherit python2-pyopengl)
12658 (name "python2-pyopengl-accelerate")
12659 (version "3.1.0")
12660 (source
12661 (origin
12662 (method url-fetch)
12663 (uri (pypi-uri "PyOpenGL-accelerate" version))
12664 (sha256
12665 (base32
12666 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12667 (synopsis "Acceleration code for PyOpenGL")
12668 (description
12669 "This is the Cython-coded accelerator module for PyOpenGL.")))
12670
12671(define-public python-rencode
12672 (package
12673 (name "python-rencode")
12674 (version "1.0.5")
12675 (source
12676 (origin
12677 (method url-fetch)
12678 (uri (pypi-uri "rencode" version))
12679 (sha256
12680 (base32
12681 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12682 (build-system python-build-system)
12683 (arguments
12684 `(#:phases
12685 (modify-phases %standard-phases
12686 (add-before 'check 'delete-bogus-test
12687 ;; This test requires /home/aresch/Downloads, which is not provided by
12688 ;; the build environment.
12689 (lambda _
12690 (delete-file "rencode/t.py")
12691 #t)))))
12692 (native-inputs `(("pkg-config" ,pkg-config)
12693 ("python-cython" ,python-cython)))
12694 (home-page "https://github.com/aresch/rencode")
12695 (synopsis "Serialization of heterogeneous data structures")
12696 (description
12697 "The @code{rencode} module is a data structure serialization library,
12698similar to @code{bencode} from the BitTorrent project. For complex,
12699heterogeneous data structures with many small elements, r-encoding stake up
12700significantly less space than b-encodings. This version of rencode is a
12701complete rewrite in Cython to attempt to increase the performance over the
12702pure Python module.")
12703 (license license:bsd-3)))
12704
12705(define-public python2-rencode
12706 (package-with-python2 python-rencode))
12707
12708(define-public python-xenon
12709 (package
12710 (name "python-xenon")
12711 (version "0.5.4")
12712 (source
12713 (origin
12714 (method url-fetch)
12715 (uri (pypi-uri "xenon" version))
12716 (sha256
12717 (base32
12718 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12719 (build-system python-build-system)
12720 (native-inputs
12721 `(("python-pyyaml" ,python-pyyaml)
12722 ("python-radon" ,python-radon)
12723 ("python-requests" ,python-requests)
12724 ("python-flake8" ,python-flake8)
12725 ("python-tox" ,python-tox)))
12726 (arguments
12727 `(#:phases
12728 (modify-phases %standard-phases
12729 (add-before 'build 'patch-test-requirements
12730 (lambda _
12731 ;; Remove httpretty dependency for tests.
12732 (substitute* "setup.py"
12733 (("httpretty") ""))
12734 #t)))))
12735 (home-page "https://xenon.readthedocs.org/")
12736 (synopsis "Monitor code metrics for Python on your CI server")
12737 (description
12738 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12739Ideally, @code{xenon} is run every time code is committed. Through command
12740line options, various thresholds can be set for the complexity of code. It
12741will fail (i.e. it will exit with a non-zero exit code) when any of these
12742requirements is not met.")
12743 (license license:expat)))
12744
12745(define-public python2-xenon
12746 (package-with-python2 python-xenon))
12747
12748(define-public python-pysocks
12749 (package
12750 (name "python-pysocks")
12751 (version "1.6.8")
12752 (source
12753 (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "PySocks" version))
12756 (sha256
12757 (base32
12758 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12759 (build-system python-build-system)
12760 (arguments `(#:tests? #f))
12761 (home-page "https://github.com/Anorov/PySocks")
12762 (synopsis "SOCKS client module")
12763 (description "@code{pysocks} is an updated and semi-actively maintained
12764version of @code{SocksiPy} with bug fixes and extra features.")
12765 (license license:bsd-3)))
12766
12767(define-public python2-pysocks
12768 (package-with-python2 python-pysocks))
12769
12770(define-public python-pydiff
12771 (package
12772 (name "python-pydiff")
12773 (version "0.2")
12774 (source
12775 (origin
12776 (method url-fetch)
12777 (uri (pypi-uri "pydiff" version))
12778 (sha256
12779 (base32
12780 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12781 (build-system python-build-system)
12782 (home-page "https://github.com/myint/pydiff")
12783 (synopsis "Library to diff two Python files at the bytecode level")
12784 (description
12785 "@code{pydiff} makes it easy to look for actual code changes while
12786ignoring formatting changes.")
12787 (license license:expat)))
12788
12789(define-public python2-pydiff
12790 (package-with-python2 python-pydiff))
12791
12792(define-public python-tqdm
12793 (package
12794 (name "python-tqdm")
12795 (version "4.19.6")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "tqdm" version))
12800 (sha256
12801 (base32
12802 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12803 (build-system python-build-system)
12804 (native-inputs
12805 `(("python-flake8" ,python-flake8)
12806 ("python-nose" ,python-nose)
12807 ("python-coverage" ,python-coverage)))
12808 (home-page "https://github.com/tqdm/tqdm")
12809 (synopsis "Fast, extensible progress meter")
12810 (description
12811 "Make loops show a progress bar on the console by just wrapping any
12812iterable with @code{|tqdm(iterable)|}. Offers many options to define
12813design and layout.")
12814 (license (list license:mpl2.0 license:expat))))
12815
12816(define-public python2-tqdm
12817 (package-with-python2 python-tqdm))
12818
12819(define-public python-pkginfo
12820 (package
12821 (name "python-pkginfo")
12822 (version "1.4.2")
12823 (source
12824 (origin
12825 (method url-fetch)
12826 (uri (pypi-uri "pkginfo" version))
12827 (sha256
12828 (base32
12829 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12830 (build-system python-build-system)
12831 (arguments
12832 ;; The tests are broken upstream.
12833 '(#:tests? #f))
12834 (home-page
12835 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12836 (synopsis
12837 "Query metadatdata from sdists, bdists, and installed packages")
12838 (description
12839 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12840source distriubtion (an sdist) or a binary distribution (e.g., created by
12841running bdist_egg). It can also query the EGG-INFO directory of an installed
12842distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12843created by running @code{python setup.py develop}).")
12844 (license license:expat)))
12845
12846(define-public python2-pkginfo
12847 (package-with-python2 python-pkginfo))
12848
12849(define-public python-twine
12850 (package
12851 (name "python-twine")
12852 (version "1.9.1")
12853 (source
12854 (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "twine" version))
12857 (sha256
12858 (base32
12859 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12860 (build-system python-build-system)
12861 (propagated-inputs
12862 `(("python-tqdm" ,python-tqdm)
12863 ("python-pkginfo" ,python-pkginfo)
12864 ("python-requests" ,python-requests)
12865 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12866 (home-page "https://github.com/pypa/twine")
12867 (synopsis "Collection of utilities for interacting with PyPI")
12868 (description
12869 "@code{twine} currently supports registering projects and uploading
12870distributions. It authenticates the user over HTTPS, allows them to pre-sign
12871their files and supports any packaging format (including wheels).")
12872 (license license:asl2.0)))
12873
12874(define-public python2-twine
12875 (package-with-python2 python-twine))
12876
12877(define-public python-linecache2
12878 (package
12879 (name "python-linecache2")
12880 (version "1.0.0")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "linecache2" version))
12885 (sha256
12886 (base32
12887 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12888 (build-system python-build-system)
12889 (arguments
12890 `(;; The tests depend on unittest2, and our version is a bit too old.
12891 #:tests? #f))
12892 (native-inputs
12893 `(("python-pbr" ,python-pbr-minimal)))
12894 (home-page
12895 "https://github.com/testing-cabal/linecache2")
12896 (synopsis "Backports of the linecache module")
12897 (description
12898 "The linecache module allows one to get any line from any file, while
12899attempting to optimize internally, using a cache, the common case where many
12900lines are read from a single file.")
12901 (license license:psfl)))
12902
12903(define-public python2-linecache2
12904 (package-with-python2 python-linecache2))
12905
12906(define-public python-traceback2
12907 (package
12908 (name "python-traceback2")
12909 (version "1.4.0")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "traceback2" version))
12914 (sha256
12915 (base32
12916 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12917 (build-system python-build-system)
12918 (arguments
12919 `(;; python-traceback2 and python-unittest2 depend on one another.
12920 #:tests? #f))
12921 (native-inputs
12922 `(("python-pbr" ,python-pbr-minimal)))
12923 (propagated-inputs
12924 `(("python-linecache2" ,python-linecache2)))
12925 (home-page
12926 "https://github.com/testing-cabal/traceback2")
12927 (synopsis "Backports of the traceback module")
12928 (description
12929 "This module provides a standard interface to extract, format and print
12930stack traces of Python programs. It exactly mimics the behavior of the Python
12931interpreter when it prints a stack trace.")
12932 (license license:psfl)))
12933
12934(define-public python2-traceback2
12935 (package-with-python2 python-traceback2))
12936
12937(define-public python-ratelimiter
12938 (package
12939 (name "python-ratelimiter")
12940 (version "1.2.0")
12941 (source
12942 (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "ratelimiter" version))
12945 (sha256
12946 (base32
12947 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12948 (build-system python-build-system)
12949 (arguments
12950 '(#:tests? #f)) ; There are no tests in the pypi archive.
12951 (home-page "https://github.com/RazerM/ratelimiter")
12952 (synopsis "Simple rate limiting object")
12953 (description
12954 "The @code{ratelimiter} module ensures that an operation will not be
12955executed more than a given number of times during a given period.")
12956 (license license:asl2.0)))
12957
12958(define-public python2-ratelimiter
12959 (package-with-python2 python-ratelimiter))
12960
12961(define-public python-dukpy
12962 (package
12963 (name "python-dukpy")
12964 (version "0.3")
12965 (source
12966 (origin
12967 (method url-fetch)
12968 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12969 version ".tar.gz"))
12970 (file-name (string-append name "-" version ".tar.gz"))
12971 (sha256
12972 (base32
12973 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12974 (build-system python-build-system)
12975 (home-page "https://github.com/kovidgoyal/dukpy")
12976 (synopsis "Run JavaScript in python")
12977 (description
12978 "dukpy is a JavaScript runtime environment for Python using the duktape
12979embeddable JavaScript engine.")
12980 ;; Dukpy is licensed under MIT like the embedded duktape library,
12981 ;; with 'errors.c' as GPL3.
12982 (license (list license:expat license:gpl3))))
12983
12984(define-public python2-dukpy
12985 (package-with-python2 python-dukpy))
12986
12987(define-public python-jsonrpclib-pelix
12988 (package
12989 (name "python-jsonrpclib-pelix")
12990 (version "0.3.2")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "jsonrpclib-pelix" version))
12995 (sha256
12996 (base32
12997 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12998 (build-system python-build-system)
12999 (arguments
13000 `(#:tests? #f)) ; no tests in PyPI tarball
13001 (home-page "https://github.com/tcalmant/jsonrpclib/")
13002 (synopsis "JSON-RPC 2.0 client library for Python")
13003 (description
13004 "This library implements the JSON-RPC v2.0
13005specification (backwards-compatible) as a client library for Python. This
13006version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13007services.")
13008 (license license:asl2.0)))
13009
13010(define-public python2-jsonrpclib-pelix
13011 (package-with-python2 python-jsonrpclib-pelix))
13012
13013(define-public python-setuptools-scm-git-archive
13014 (package
13015 (name "python-setuptools-scm-git-archive")
13016 (version "1.0")
13017 (source
13018 (origin
13019 (method url-fetch)
13020 (uri (pypi-uri "setuptools_scm_git_archive" version))
13021 (sha256
13022 (base32
13023 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13024 (build-system python-build-system)
13025 (native-inputs
13026 `(("python-pytest" ,python-pytest)))
13027 (propagated-inputs
13028 `(("python-setuptools-scm" ,python-setuptools-scm)))
13029 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13030 (synopsis "Setuptools_scm plugin for git archives")
13031 (description
13032 "The setuptools_scm_git_archive package is a plugin to
13033setuptools_scm, which supports obtaining versions from git archives that
13034belong to tagged versions.")
13035 (license license:expat)))
13036
13037(define-public python2-setuptools-scm-git-archive
13038 (package-with-python2 python-setuptools-scm-git-archive))
13039
13040(define-public python-pyclipper
13041 (package
13042 (name "python-pyclipper")
13043 (version "1.1.0.post1")
13044 (source
13045 (origin
13046 (method url-fetch)
13047 (uri (pypi-uri "pyclipper" version ".zip"))
13048 (sha256
13049 (base32
13050 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13051 (modules '((guix build utils)))
13052 (snippet
13053 '(begin
13054 ;; This file is generated by Cython.
13055 (delete-file "pyclipper/pyclipper.cpp") #t))))
13056 (build-system python-build-system)
13057 (arguments
13058 `(#:phases
13059 (modify-phases %standard-phases
13060 (add-before 'build 'cythonize-sources
13061 (lambda _
13062 (with-directory-excursion "pyclipper"
13063 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13064 (propagated-inputs
13065 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13066 (native-inputs
13067 `(("python-cython" ,python-cython)
13068 ("python-pytest" ,python-pytest)
13069 ("python-pytest-runner" ,python-pytest-runner)
13070 ("python-unittest2" ,python-unittest2)
13071 ("unzip" ,unzip)))
13072 (home-page "https://github.com/greginvm/pyclipper")
13073 (synopsis "Wrapper for Angus Johnson's Clipper library")
13074 (description
13075 "Pyclipper is a Cython wrapper for the C++ translation of the
13076Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13077 (license license:expat)))
13078
13079(define-public python2-pyclipper
13080 (package-with-python2 python-pyclipper))
13081
13082(define-public python2-booleanoperations
13083 (package
13084 (name "python2-booleanoperations")
13085 (version "0.7.1")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "booleanOperations" version ".zip"))
13090 (sha256
13091 (base32
13092 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13093 (build-system python-build-system)
13094 (arguments
13095 `(#:python ,python-2))
13096 (native-inputs
13097 `(("unzip" ,unzip)
13098 ("python2-pytest" ,python2-pytest)
13099 ("python2-pytest-runner" ,python2-pytest-runner)))
13100 (propagated-inputs
13101 `(("python-fonttools" ,python2-fonttools)
13102 ("python-pyclipper" ,python2-pyclipper)
13103 ("python-ufolib" ,python2-ufolib)))
13104 (home-page "https://github.com/typemytype/booleanOperations")
13105 (synopsis "Boolean operations on paths")
13106 (description
13107 "BooleanOperations provides a Python library that enables
13108boolean operations on paths.")
13109 (license license:expat)))
13110
13111(define-public python-tempdir
13112 (package
13113 (name "python-tempdir")
13114 (version "0.7.1")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "tempdir" version))
13119 (sha256
13120 (base32
13121 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13122 (build-system python-build-system)
13123 (home-page "https://pypi.org/project/tempdir/")
13124 (arguments
13125 ;; the package has no tests
13126 '(#:tests? #f))
13127 (synopsis "Python library for managing temporary directories")
13128 (description
13129 "This library manages temporary directories that are automatically
13130deleted with all their contents when they are no longer needed. It is
13131particularly convenient for use in tests.")
13132 (license license:expat)))
13133
13134(define-public python2-tempdir
13135 (package-with-python2 python-tempdir))
13136
13137(define-public python-activepapers
13138 (package
13139 (name "python-activepapers")
13140 (version "0.2.2")
13141 (source
13142 (origin
13143 (method url-fetch)
13144 (uri (pypi-uri "ActivePapers.Py" version))
13145 (sha256
13146 (base32
13147 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13148 (build-system python-build-system)
13149 (arguments
13150 `(#:modules ((ice-9 ftw)
13151 (srfi srfi-1)
13152 (guix build utils)
13153 (guix build python-build-system))
13154
13155 #:phases
13156 (modify-phases %standard-phases
13157 (add-after 'unpack 'delete-python2-code
13158 (lambda _
13159 (for-each delete-file
13160 '("lib/activepapers/builtins2.py"
13161 "lib/activepapers/standardlib2.py"
13162 "lib/activepapers/utility2.py"))))
13163 (replace 'check
13164 (lambda _
13165 ;; Deactivate the test cases that download files
13166 (setenv "NO_NETWORK_ACCESS" "1")
13167 ;; For some strange reason, some tests fail if nosetests runs all
13168 ;; test modules in a single execution. They pass if each test
13169 ;; module is run individually.
13170 (for-each (lambda (filename)
13171 (invoke "nosetests"
13172 (string-append "tests/" filename)))
13173 (scandir "tests"
13174 (lambda (filename)
13175 (string-suffix? ".py" filename)))))))))
13176 (native-inputs
13177 `(("python-tempdir" ,python-tempdir)
13178 ("python-nose" ,python-nose)))
13179 (propagated-inputs
13180 `(("python-h5py" ,python-h5py)))
13181 (home-page "http://www.activepapers.org/")
13182 (synopsis "Executable papers for scientific computing")
13183 (description
13184 "ActivePapers is a tool for working with executable papers, which
13185combine data, code, and documentation in single-file packages,
13186suitable for publication as supplementary material or on repositories
13187such as figshare or Zenodo.")
13188 (properties `((python2-variant . ,(delay python2-activepapers))))
13189 (license license:bsd-3)))
13190
13191(define-public python2-activepapers
13192 (let ((base (package-with-python2
13193 (strip-python2-variant python-activepapers))))
13194 (package
13195 (inherit base)
13196 (arguments
13197 (substitute-keyword-arguments (package-arguments base)
13198 ((#:phases phases)
13199 `(modify-phases ,phases
13200 (delete 'delete-python2-code)
13201 (add-after 'unpack 'delete-python3-code
13202 (lambda _
13203 (for-each delete-file
13204 '("lib/activepapers/builtins3.py"
13205 "lib/activepapers/standardlib3.py"
13206 "lib/activepapers/utility3.py")))))))))))
13207
13208(define-public python-semver
13209 (package
13210 (name "python-semver")
13211 (version "2.7.9")
13212 (source
13213 (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "semver" version))
13216 (sha256
13217 (base32
13218 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13219 (build-system python-build-system)
13220 (arguments
13221 `(#:phases
13222 (modify-phases %standard-phases
13223 (add-after 'unpack 'patch-test-requirements
13224 (lambda _
13225 (substitute* "setup.py"
13226 ;; Our Python is new enough.
13227 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13228 #t)))))
13229 (native-inputs
13230 `(("python-tox" ,python-tox)
13231 ("python-virtualenv" ,python-virtualenv)))
13232 (home-page "https://github.com/k-bx/python-semver")
13233 (synopsis "Python helper for Semantic Versioning")
13234 (description "This package provides a Python library for
13235@url{Semantic Versioning, http://semver.org/}.")
13236 (license license:bsd-3)))
13237
13238(define-public python2-semver
13239 (package-with-python2 python-semver))
13240
13241(define-public python-pyro4
13242 (package
13243 (name "python-pyro4")
13244 (version "4.74")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "Pyro4" version))
13249 (sha256
13250 (base32
13251 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13252 (build-system python-build-system)
13253 (propagated-inputs
13254 `(("python-serpent" ,python-serpent)))
13255 (home-page "https://pyro4.readthedocs.io")
13256 (synopsis "Distributed object middleware for Python")
13257 (description
13258 "Pyro enables you to build applications in which objects can talk to each
13259other over the network. You can just use normal Python method calls to call
13260objects on other machines, also known as remote procedure calls (RPC).")
13261 (license license:expat)))
13262
13263(define-public python2-pyro
13264 (package
13265 (name "python2-pyro")
13266 (version "3.16")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "Pyro" version))
13271 (file-name (string-append "Pyro-" version ".tar.gz"))
13272 (sha256
13273 (base32
13274 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13275 (build-system python-build-system)
13276 (arguments
13277 ;; Pyro is not compatible with Python 3
13278 `(#:python ,python-2
13279 ;; Pyro has no test cases for automatic execution
13280 #:tests? #f))
13281 (home-page "http://pythonhosted.org/Pyro/")
13282 (synopsis "Distributed object manager for Python")
13283 (description "Pyro is a Distributed Object Technology system
13284written in Python that is designed to be easy to use. It resembles
13285Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13286which is a system and language independent Distributed Object Technology
13287and has much more to offer than Pyro or RMI. Pyro 3.x is no
13288longer maintained. New projects should use Pyro4 instead, which
13289is the new Pyro version that is actively developed.")
13290 (license license:expat)))
13291
13292(define-public python2-scientific
13293 (package
13294 (name "python2-scientific")
13295 (version "2.9.4")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (string-append "https://bitbucket.org/khinsen/"
13300 "scientificpython/downloads/ScientificPython-"
13301 version ".tar.gz"))
13302 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13303 (sha256
13304 (base32
13305 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13306 (build-system python-build-system)
13307 (inputs
13308 `(("netcdf" ,netcdf)))
13309 (propagated-inputs
13310 `(("python-numpy" ,python2-numpy-1.8)
13311 ("python-pyro" ,python2-pyro)))
13312 (arguments
13313 ;; ScientificPython is not compatible with Python 3
13314 `(#:python ,python-2
13315 #:tests? #f ; No test suite
13316 #:phases
13317 (modify-phases %standard-phases
13318 (replace 'build
13319 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13320 (invoke "python" "setup.py" "build"
13321 (string-append "--netcdf_prefix="
13322 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13323 (home-page "https://bitbucket.org/khinsen/scientificpython")
13324 (synopsis "Python modules for scientific computing")
13325 (description "ScientificPython is a collection of Python modules that are
13326useful for scientific computing. Most modules are rather general (Geometry,
13327physical units, automatic derivatives, ...) whereas others are more
13328domain-specific (e.g. netCDF and PDB support). The library is currently
13329not actively maintained and works only with Python 2 and NumPy < 1.9.")
13330 (license license:cecill-c)))
13331
13332(define-public python2-mmtk
13333 (package
13334 (name "python2-mmtk")
13335 (version "2.7.11")
13336 (source
13337 (origin
13338 (method url-fetch)
13339 (uri (string-append "https://bitbucket.org/khinsen/"
13340 "mmtk/downloads/MMTK-" version ".tar.gz"))
13341 (file-name (string-append "MMTK-" version ".tar.gz"))
13342 (sha256
13343 (base32
13344 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13345 (build-system python-build-system)
13346 (native-inputs
13347 `(("netcdf" ,netcdf)))
13348 (propagated-inputs
13349 `(("python-scientific" ,python2-scientific)
13350 ("python-tkinter" ,python-2 "tk")))
13351 (arguments
13352 `(#:python ,python-2
13353 #:tests? #f
13354 #:phases
13355 (modify-phases %standard-phases
13356 (add-before 'build 'includes-from-scientific
13357 (lambda* (#:key inputs #:allow-other-keys)
13358 (mkdir-p "Include/Scientific")
13359 (copy-recursively
13360 (string-append
13361 (assoc-ref inputs "python-scientific")
13362 "/include/python2.7/Scientific")
13363 "Include/Scientific"))))))
13364 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13365 (synopsis "Python library for molecular simulation")
13366 (description "MMTK is a library for molecular simulations with an emphasis
13367on biomolecules. It provides widely used methods such as Molecular Dynamics
13368and normal mode analysis, but also basic routines for implementing new methods
13369for simulation and analysis. The library is currently not actively maintained
13370and works only with Python 2 and NumPy < 1.9.")
13371 (license license:cecill-c)))
13372
13373(define-public python-phonenumbers
13374 (package
13375 (name "python-phonenumbers")
13376 (version "8.9.1")
13377 (source
13378 (origin
13379 (method url-fetch)
13380 (uri (pypi-uri "phonenumbers" version))
13381 (sha256
13382 (base32
13383 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13384 (build-system python-build-system)
13385 (home-page
13386 "https://github.com/daviddrysdale/python-phonenumbers")
13387 (synopsis
13388 "Python library for dealing with international phone numbers")
13389 (description
13390 "This package provides a Python port of Google's libphonenumber library.")
13391 (license license:asl2.0)))
13392
13393(define-public python2-phonenumbers
13394 (package-with-python2 python-phonenumbers))
13395
13396(define-public python-send2trash
13397 (package
13398 (name "python-send2trash")
d9b0216b 13399 (version "1.5.0")
44d10b1f 13400 (source
d9b0216b 13401 (origin (method git-fetch)
44d10b1f 13402 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13403 (uri (git-reference
13404 (url "https://github.com/hsoft/send2trash.git")
13405 (commit version)))
13406 (file-name (git-file-name name version))
44d10b1f
RW
13407 (sha256
13408 (base32
d9b0216b 13409 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13410 (build-system python-build-system)
13411 (arguments
13412 '(#:phases
13413 (modify-phases %standard-phases
13414 (add-before 'check 'pre-check
13415 (lambda _
13416 (mkdir-p "/tmp/foo")
13417 (setenv "HOME" "/tmp/foo")
13418 #t)))))
13419 (home-page "https://github.com/hsoft/send2trash")
13420 (synopsis "Send files to the user's @file{~/Trash} directory")
13421 (description "This package provides a Python library to send files to the
13422user's @file{~/Trash} directory.")
13423 (license license:bsd-3)))
13424
13425(define-public python2-send2trash
13426 (package
13427 (inherit (package-with-python2 python-send2trash))
13428 (arguments
13429 (substitute-keyword-arguments (package-arguments python-send2trash)
13430 ((#:phases phases)
13431 `(modify-phases ,phases
13432 (add-before 'check 'setenv
13433 (lambda _
13434 (setenv "PYTHONPATH"
13435 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13436 #t))))))
13437 (properties `((python2-variant . ,(delay python-send2trash))))))
13438
13439(define-public python-yapf
13440 (package
13441 (name "python-yapf")
13442 (version "0.24.0")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "yapf" version))
13447 (sha256
13448 (base32
13449 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13450 (build-system python-build-system)
13451 (home-page "https://github.com/google/yapf")
13452 (synopsis "Formatter for Python code")
13453 (description "YAPF is a formatter for Python code. It's based off of
13454@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13455takes the code and reformats it to the best formatting that conforms to the
13456style guide, even if the original code didn't violate the style guide.")
13457 (license license:asl2.0)))
13458
13459(define-public python2-yapf
13460 (package-with-python2 python-yapf))
13461
13462(define-public python-gyp
13463 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13464 (revision "0"))
13465 (package
13466 (name "python-gyp")
13467 ;; Google does not release versions,
13468 ;; based on second most recent commit date.
13469 (version (git-version "0.0.0" revision commit))
13470 (source
13471 (origin
13472 ;; Google does not release tarballs,
13473 ;; git checkout is needed.
13474 (method git-fetch)
13475 (uri (git-reference
13476 (url "https://chromium.googlesource.com/external/gyp")
13477 (commit commit)))
13478 (file-name (git-file-name name version))
13479 (sha256
13480 (base32
13481 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13482 (build-system python-build-system)
13483 (home-page "https://gyp.gsrc.io/")
13484 (synopsis "GYP is a Meta-Build system")
13485 (description
13486 "GYP builds build systems for large, cross platform applications.
13487It can be used to generate XCode projects, Visual Studio projects, Ninja build
13488files, and Makefiles.")
13489 (license license:bsd-3))))
13490
13491(define-public python2-gyp
13492 (package-with-python2 python-gyp))
13493
13494(define-public python-whatever
13495 (package
13496 (name "python-whatever")
13497 (version "0.5")
13498 (source
13499 (origin
13500 (method url-fetch)
13501 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13502 ".tar.gz"))
13503 (sha256
13504 (base32
13505 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13506 (file-name (string-append name "-" version ".tar.gz"))))
13507 (build-system python-build-system)
13508 (arguments
13509 `(#:phases
13510 (modify-phases %standard-phases
13511 (replace 'check
13512 (lambda _
13513 (invoke "py.test"))))))
13514 (native-inputs
13515 `(("python-pytest" ,python-pytest)))
13516 (home-page "http://github.com/Suor/whatever")
13517 (synopsis "Make anonymous functions by partial application of operators")
13518 (description "@code{whatever} provides an easy way to make anonymous
13519functions by partial application of operators.")
13520 (license license:bsd-3)))
13521
13522(define-public python2-whatever
13523 (package-with-python2 python-whatever))
13524
13525(define-public python-funcy
13526 (package
13527 (name "python-funcy")
9e396ab8 13528 (version "1.11")
44d10b1f
RW
13529 (source
13530 (origin
a85c6027
TGR
13531 (method git-fetch)
13532 (uri (git-reference
13533 (url "https://github.com/Suor/funcy.git")
13534 (commit version)))
44d10b1f 13535 (sha256
a85c6027
TGR
13536 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13537 (file-name (git-file-name name version))))
44d10b1f
RW
13538 (build-system python-build-system)
13539 (arguments
13540 `(#:phases
13541 (modify-phases %standard-phases
13542 (replace 'check
13543 (lambda _
13544 (invoke "py.test"))))))
13545 (native-inputs
13546 `(("python-pytest" ,python-pytest)
13547 ("python-whatever" ,python-whatever)))
13548 (home-page "http://github.com/Suor/funcy")
13549 (synopsis "Functional tools")
13550 (description "@code{funcy} is a library that provides functional tools.
13551Examples are:
13552@enumerate
13553@item merge - Merges collections of the same type
13554@item walk - Type-preserving map
13555@item select - Selects a part of a collection
13556@item take - Takes the first n items of a collection
13557@item first - Takes the first item of a collection
13558@item remove - Predicated-removes items of a collection
13559@item concat - Concatenates two collections
13560@item flatten - Flattens a collection with subcollections
13561@item distinct - Returns only distinct items
13562@item split - Predicated-splits a collection
13563@item split_at - Splits a collection at a given item
13564@item group_by - Groups items by group
13565@item pairwise - Pairs off adjacent items
13566@item partial - Partially-applies a function
13567@item curry - Curries a function
13568@item compose - Composes functions
13569@item complement - Complements a predicate
13570@item all_fn - \"all\" with predicate
13571@end enumerate")
13572 (license license:bsd-3)))
13573
13574(define-public python2-funcy
13575 (package-with-python2 python-funcy))
13576
13577(define-public python-isoweek
13578 (package
13579 (name "python-isoweek")
13580 (version "1.3.3")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "isoweek" version))
13585 (sha256
13586 (base32
13587 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13588 (build-system python-build-system)
13589 (home-page "https://github.com/gisle/isoweek")
13590 (synopsis "Objects representing a week")
13591 (description "The @code{isoweek} module provide the class Week that
13592implements the week definition of ISO 8601. This standard also defines
13593a notation for identifying weeks; yyyyWww (where the W is a literal).
13594Week instances stringify to this form.")
13595 (license license:bsd-3)))
13596
13597(define-public python2-isoweek
13598 (package-with-python2 python-isoweek))
13599
13600(define-public python-tokenize-rt
13601 (package
13602 (name "python-tokenize-rt")
13603 (version "2.0.1")
13604 (source
13605 (origin
13606 (method url-fetch)
13607 (uri (pypi-uri "tokenize-rt" version))
13608 (sha256
13609 (base32
13610 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13611 (build-system python-build-system)
13612 (home-page "https://github.com/asottile/tokenize-rt")
13613 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13614 (description
13615 "This Python library is a wrapper around @code{tokenize} from the Python
13616standard library. It provides two additional tokens @code{ESCAPED_NL} and
13617@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13618and @code{tokens_to_src} to roundtrip.")
13619 (license license:expat)))
13620
13621(define-public python-future-fstrings
13622 (package
13623 (name "python-future-fstrings")
13624 (version "0.4.1")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "future_fstrings" version))
13629 (sha256
13630 (base32
13631 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13632 (build-system python-build-system)
13633 (propagated-inputs
13634 `(("python-tokenize-rt" ,python-tokenize-rt)))
13635 (home-page "https://github.com/asottile/future-fstrings")
13636 (synopsis "Backport of fstrings to Python < 3.6")
13637 (description
13638 "This package provides a UTF-8 compatible encoding
13639@code{future_fstrings}, which performs source manipulation. It decodes the
13640source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13641@code{f} strings.")
13642 (license license:expat)))
13643
13644(define-public python-typing
13645 (package
13646 (name "python-typing")
13647 (version "3.6.6")
13648 (source
13649 (origin
13650 (method url-fetch)
13651 (uri (pypi-uri "typing" version))
13652 (sha256
13653 (base32
13654 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13655 (build-system python-build-system)
13656 (home-page "https://docs.python.org/3/library/typing.html")
13657 (synopsis "Type hints for Python")
13658 (description "This is a backport of the standard library @code{typing}
13659module to Python versions older than 3.5. Typing defines a standard notation
13660for Python function and variable type annotations. The notation can be used
13661for documenting code in a concise, standard format, and it has been designed
13662to also be used by static and runtime type checkers, static analyzers, IDEs
13663and other tools.")
13664 (license license:psfl)))
13665
13666(define-public python2-typing
13667 (package-with-python2 python-typing))
13668
f89d443b
VC
13669(define-public python-typing-extensions
13670 (package
13671 (name "python-typing-extensions")
13672 (version "3.7.2")
13673 (source
13674 (origin
13675 (method url-fetch)
13676 (uri (pypi-uri "typing_extensions" version))
13677 (sha256
13678 (base32
13679 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13680 (build-system python-build-system)
13681 (home-page
13682 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13683 (synopsis "Experimental type hints for Python")
13684 (description
13685 "The typing_extensions module contains additional @code{typing} hints not
13686yet present in the of the @code{typing} standard library.
13687Included are implementations of:
13688@enumerate
13689@item ClassVar
13690@item ContextManager
13691@item Counter
13692@item DefaultDict
13693@item Deque
13694@item NewType
13695@item NoReturn
13696@item overload
13697@item Protocol
13698@item runtime
13699@item Text
13700@item Type
13701@item TYPE_CHECKING
13702@item AsyncGenerator
13703@end enumerate\n")
13704 (license license:psfl)))
13705
44d10b1f
RW
13706(define-public bpython
13707 (package
13708 (name "bpython")
13709 (version "0.17.1")
13710 (source
13711 (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "bpython" version))
13714 (sha256
13715 (base32
13716 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13717 (build-system python-build-system)
13718 (arguments
13719 `(#:phases
13720 (modify-phases %standard-phases
13721 (add-after 'unpack 'remove-failing-test
13722 (lambda _
13723 ;; Remove failing test. FIXME: make it pass
13724 (delete-file "bpython/test/test_args.py")
13725 #t))
13726 (add-after 'wrap 'add-aliases
13727 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13728 (lambda* (#:key outputs #:allow-other-keys)
13729 (let ((out (assoc-ref outputs "out")))
13730 (for-each
13731 (lambda (old new)
13732 (symlink old (string-append out "/bin/" new)))
13733 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13734 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13735 #t)))))
13736 (propagated-inputs
13737 `(("python-pygments" ,python-pygments)
13738 ("python-requests" ,python-requests)
13739 ("python-babel" ,python-babel) ; optional, for internationalization
13740 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13741 ("python-greenlet" ,python-greenlet)
13742 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13743 ("python-six" ,python-six)))
13744 (native-inputs
13745 `(("python-sphinx" ,python-sphinx)
13746 ("python-mock" ,python-mock)))
13747 (home-page "https://bpython-interpreter.org/")
13748 (synopsis "Fancy interface to the Python interpreter")
13749 (description "Bpython is a fancy interface to the Python
13750interpreter. bpython's main features are
13751
13752@enumerate
13753@item in-line syntax highlighting,
13754@item readline-like autocomplete with suggestions displayed as you type,
13755@item expected parameter list for any Python function,
13756@item \"rewind\" function to pop the last line of code from memory and
13757 re-evaluate,
13758@item send the code you've entered off to a pastebin,
13759@item save the code you've entered to a file, and
13760@item auto-indentation.
13761@end enumerate")
13762 (license license:expat)))
13763
13764(define-public bpython2
13765 (let ((base (package-with-python2
13766 (strip-python2-variant bpython))))
13767 (package (inherit base)
13768 (name "bpython2")
13769 (arguments
13770 `(#:python ,python-2
13771 #:phases
13772 (modify-phases %standard-phases
13773 (add-after 'unpack 'remove-failing-test
13774 (lambda _
13775 ;; Remove failing test. FIXME: make it pass
13776 (delete-file "bpython/test/test_args.py")
13777 ;; Disable failing test-cases (renaming inhibits they are
13778 ;; discovered)
13779 (substitute* "bpython/test/test_curtsies_repl.py"
13780 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13781 (string-append a "xxx_off_" b))
13782 (("^(\\s*def )(test_complex\\W)" _ a b)
13783 (string-append a "xxx_off_" b)))
13784 #t))
13785 (add-before 'build 'rename-scripts
13786 ;; rename the scripts to bypthon2, bpdb2, etc.
13787 (lambda _
13788 (substitute* "setup.py"
13789 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13790 (string-append name "2" rest "\n"))
13791 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13792 (string-append name "2" (or sub "") rest "\n")))
13793 #t))))))))
13794
13795(define-public python-pyinotify
13796 (package
13797 (name "python-pyinotify")
13798 (version "0.9.6")
13799 (source (origin
13800 (method url-fetch)
13801 (uri (pypi-uri "pyinotify" version))
13802 (sha256
13803 (base32
13804 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13805 (build-system python-build-system)
13806 (arguments `(#:tests? #f)) ;no tests
13807 (home-page "https://github.com/seb-m/pyinotify")
13808 (synopsis "Python library for monitoring inotify events")
13809 (description
13810 "@code{pyinotify} provides a Python interface for monitoring
13811file system events on Linux.")
13812 (license license:expat)))
13813
13814(define-public python2-pyinotify
13815 (package-with-python2 python-pyinotify))
13816
13817;; Ada parser uses this version.
13818(define-public python2-quex-0.67.3
13819 (package
13820 (name "python2-quex")
13821 (version "0.67.3")
13822 (source
13823 (origin
13824 (method url-fetch)
13825 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13826 (version-major+minor version)
13827 "/quex-" version ".zip"))
13828 (sha256
13829 (base32
13830 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13831 (build-system python-build-system)
13832 (native-inputs
13833 `(("unzip" ,unzip)))
13834 (arguments
13835 `(#:python ,python-2
13836 #:tests? #f
13837 #:phases
13838 (modify-phases %standard-phases
13839 (delete 'configure)
13840 (delete 'build)
13841 (replace 'install
13842 (lambda* (#:key outputs #:allow-other-keys)
13843 (let* ((out (assoc-ref outputs "out"))
13844 (share/quex (string-append out "/share/quex"))
13845 (bin (string-append out "/bin")))
13846 (copy-recursively "." share/quex)
13847 (mkdir-p bin)
13848 (symlink (string-append share/quex "/quex-exe.py")
13849 (string-append bin "/quex"))
13850 #t))))))
13851 (native-search-paths
13852 (list (search-path-specification
13853 (variable "QUEX_PATH")
13854 (files '("share/quex")))))
13855 (home-page "http://quex.sourceforge.net/")
13856 (synopsis "Lexical analyzer generator in Python")
13857 (description "@code{quex} is a lexical analyzer generator in Python.")
13858 (license license:lgpl2.1+))) ; Non-military
13859
13860(define-public python2-quex
13861 (package (inherit python2-quex-0.67.3)
13862 (name "python2-quex")
13863 (version "0.68.1")
13864 (source
13865 (origin
13866 (method url-fetch)
13867 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13868 (sha256
13869 (base32
13870 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13871 (file-name (string-append name "-" version ".tar.gz"))))))
13872
13873(define-public python-more-itertools
13874 (package
13875 (name "python-more-itertools")
13876 (version "4.3.0")
13877 (source
13878 (origin
13879 (method url-fetch)
13880 (uri (pypi-uri "more-itertools" version))
13881 (sha256
13882 (base32
13883 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13884 (build-system python-build-system)
13885 (arguments
13886 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13887 (%current-target-system)))
13888 '("armhf" "i686"))
13889 '(#:phases
13890 (modify-phases %standard-phases
13891 ;; This is required for 32-bit hardware.
13892 ;; TODO: Try to remove this when upgrading.
13893 (add-after 'unpack 'patch-test
13894 (lambda _
13895 (substitute* "more_itertools/tests/test_more.py"
13896 (("10 \\*\\* 10") "9 ** 9"))
13897 #t))))
13898 '())))
13899 (propagated-inputs
13900 `(("python-six" ,python-six-bootstrap)))
13901 (home-page "https://github.com/erikrose/more-itertools")
13902 (synopsis "More routines for operating on iterables, beyond itertools")
13903 (description "Python's built-in @code{itertools} module implements a
13904number of iterator building blocks inspired by constructs from APL, Haskell,
13905and SML. @code{more-itertools} includes additional building blocks for
13906working with iterables.")
13907 (license license:expat)))
13908
13909(define-public python2-more-itertools
13910 (package-with-python2 python-more-itertools))
13911
13912(define-public python-latexcodec
13913 (package
13914 (name "python-latexcodec")
13915 (version "1.0.5")
13916 (source
13917 (origin
13918 (method url-fetch)
13919 (uri (pypi-uri "latexcodec" version))
13920 (sha256
13921 (base32
13922 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13923 (build-system python-build-system)
13924 (inputs
13925 `(("python-six" ,python-six)))
13926 (home-page "https://readthedocs.org/projects/latexcodec/")
13927 (synopsis "Work with LaTeX code in Python")
13928 (description "Lexer and codec to work with LaTeX code in Python.")
13929 (license license:expat)))
13930
13931(define-public python-pybtex
13932 (package
13933 (name "python-pybtex")
13934 (version "0.21")
13935 (source
13936 (origin
13937 (method url-fetch)
13938 (uri (pypi-uri "pybtex" version))
13939 (sha256
13940 (base32
13941 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13942 (build-system python-build-system)
13943 (native-inputs
13944 `(("python-nose" ,python-nose)))
13945 (inputs
13946 `(("python-latexcodec" ,python-latexcodec)
13947 ("python-pyyaml" ,python-pyyaml)
13948 ("python-six" ,python-six)))
13949 (arguments
13950 `(#:test-target "nosetests"))
13951 (home-page "https://pybtex.org/")
13952 (synopsis "BibTeX-compatible bibliography processor")
13953 (description "Pybtex is a BibTeX-compatible bibliography processor written
13954in Python. You can simply type pybtex instead of bibtex.")
13955 (license license:expat)))
13956
13957(define-public python-onetimepass
13958 (package
13959 (name "python-onetimepass")
13960 (version "1.0.1")
13961 (source
13962 (origin
13963 (method url-fetch)
13964 (uri (pypi-uri "onetimepass" version))
13965 (sha256
13966 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13967 (build-system python-build-system)
13968 (propagated-inputs `(("python-six" ,python-six)))
13969 (home-page "https://github.com/tadeck/onetimepass/")
13970 (synopsis "One-time password library")
13971 (description "Python one-time password library for HMAC-based (HOTP) and
13972time-based (TOTP) passwords.")
13973 (license license:expat)))
13974
13975(define-public python-parso
13976 (package
13977 (name "python-parso")
13978 (version "0.3.1")
13979 (source
13980 (origin
13981 (method url-fetch)
13982 (uri (pypi-uri "parso" version))
13983 (sha256
13984 (base32
13985 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13986 (native-inputs
13987 `(("python-pytest" ,python-pytest)))
13988 (build-system python-build-system)
13989 (home-page "https://github.com/davidhalter/parso")
13990 (synopsis "Python Parser")
13991 (description "Parso is a Python parser that supports error recovery and
13992round-trip parsing for different Python versions (in multiple Python versions).
13993Parso is also able to list multiple syntax errors in your Python file.")
13994 (license license:expat)))
13995
13996(define-public python2-parso
13997 (package-with-python2 python-parso))
13998
13999(define-public python-async-generator
14000 (package
14001 (name "python-async-generator")
94fcbf8d 14002 (version "1.10")
44d10b1f
RW
14003 (source
14004 (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "async_generator" version))
14007 (sha256
14008 (base32
94fcbf8d 14009 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
14010 (build-system python-build-system)
14011 (native-inputs
14012 `(("python-pytest" ,python-pytest)))
14013 (home-page "https://github.com/python-trio/async_generator")
14014 (synopsis "Async generators and context managers for Python 3.5+")
14015 (description "@code{async_generator} back-ports Python 3.6's native async
14016generators and Python 3.7's context managers into Python 3.5.")
14017 ;; Dual licensed.
14018 (license (list license:expat license:asl2.0))))
14019
14020(define-public python-async-timeout
14021 (package
14022 (name "python-async-timeout")
14023 (version "3.0.1")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 (uri (pypi-uri "async-timeout" version))
14028 (sha256
14029 (base32
14030 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
14031 (build-system python-build-system)
14032 (home-page "https://github.com/aio-libs/async_timeout/")
14033 (synopsis "Timeout context manager for asyncio programs")
14034 (description "@code{async-timeout} provides a timeout timeout context
14035manager compatible with @code{asyncio}.")
14036 (license license:asl2.0)))
14037
14038(define-public python-glob2
14039 (package
14040 (name "python-glob2")
14041 (version "0.6")
14042 (source (origin
14043 (method url-fetch)
14044 (uri (string-append
14045 "https://github.com/miracle2k/python-glob2/archive/"
14046 version
14047 ".tar.gz"))
14048 (sha256
14049 (base32
14050 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14051 (file-name (string-append name "-" version ".tar.gz"))))
14052 (build-system python-build-system)
14053 (home-page "https://github.com/miracle2k/python-glob2/")
14054 (synopsis "Extended Version of the python buildin glob module")
14055 (description "This is an extended version of the Python
14056@url{http://docs.python.org/library/glob.html, built-in glob module} which
14057adds:
14058
14059@itemize
14060@item The ability to capture the text matched by glob patterns, and return
14061those matches alongside the file names.
14062@item A recursive @code{**} globbing syntax, akin for example to the
14063@code{globstar} option of Bash.
14064@item The ability to replace the file system functions used, in order to glob
14065on virtual file systems.
14066@item Compatible with Python 2 and Python 3 (tested with 3.3).
14067@end itemize
14068
14069Glob2 currently based on the glob code from Python 3.3.1.")
14070 (license license:bsd-2)))
14071
14072(define-public python2-glob2
14073 (package-with-python2 python-glob2))
14074
14075(define-public python-gipc
14076 (package
14077 (name "python-gipc")
14078 (version "0.6.0")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "gipc" version ".zip"))
14083 (sha256
14084 (base32
14085 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14086 (build-system python-build-system)
14087 (native-inputs
14088 `(("unzip" ,unzip)))
14089 (propagated-inputs
14090 `(("python-gevent" ,python-gevent)))
14091 (home-page "http://gehrcke.de/gipc")
14092 (synopsis "Child process management in the context of gevent")
14093 (description "Usage of Python's multiprocessing package in a
14094gevent-powered application may raise problems. With @code{gipc},
14095process-based child processes can safely be created anywhere within a
14096gevent-powered application.")
14097 (license license:expat)))
14098
14099(define-public python2-gipc
14100 (package-with-python2 python-gipc))
14101
14102(define-public python-fusepy
14103 (package
14104 (name "python-fusepy")
14105 (version "2.0.4")
14106 (source
14107 (origin
14108 (method url-fetch)
14109 (uri (pypi-uri "fusepy" version))
14110 (sha256
14111 (base32
14112 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14113 (build-system python-build-system)
14114 (arguments
14115 `(#:phases
14116 (modify-phases %standard-phases
14117 (add-before 'build 'set-library-file-name
14118 (lambda* (#:key inputs #:allow-other-keys)
14119 (let ((fuse (assoc-ref inputs "fuse")))
14120 (substitute* "fuse.py"
14121 (("find_library\\('fuse'\\)")
14122 (string-append "'" fuse "/lib/libfuse.so'")))
14123 #t))))))
14124 (propagated-inputs
14125 `(("fuse" ,fuse)))
14126 (home-page "https://github.com/fusepy/fusepy")
14127 (synopsis "Simple ctypes bindings for FUSE")
14128 (description "Python module that provides a simple interface to FUSE and
14129MacFUSE. The binding is created using the standard @code{ctypes} library.")
14130 (license license:isc)))
14131
14132(define-public python2-fusepy
14133 (package-with-python2 python-fusepy))
14134
14135(define-public python2-gdrivefs
14136 (package
14137 (name "python2-gdrivefs")
14138 (version "0.14.9")
14139 (source
14140 (origin
14141 (method url-fetch)
14142 (uri (pypi-uri "gdrivefs" version))
14143 (sha256
14144 (base32
14145 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14146 (build-system python-build-system)
14147 (arguments
14148 `(#:python ,python-2
14149 #:phases
14150 (modify-phases %standard-phases
14151 (add-before 'build 'patch-setup-py
14152 (lambda _
14153 ;; Update requirements from dependency==version
14154 ;; to dependency>=version
14155 (substitute* "gdrivefs/resources/requirements.txt"
14156 (("==") ">="))
14157 #t)))))
14158 (native-inputs
14159 `(("python2-gipc" ,python2-gipc)
14160 ("python2-gevent" ,python2-gevent)
14161 ("python2-greenlet" ,python2-greenlet)
14162 ("python2-httplib2" ,python2-httplib2)
14163 ("python2-uritemplate" ,python2-uritemplate)
14164 ("python2-oauth2client" ,python2-oauth2client)
14165 ("python2-six" ,python2-six)))
14166 (propagated-inputs
14167 `(("python2-dateutil" ,python2-dateutil)
14168 ("python2-fusepy" ,python2-fusepy)
14169 ("python2-google-api-client" ,python2-google-api-client)))
14170 (home-page "https://github.com/dsoprea/GDriveFS")
14171 (synopsis "Mount Google Drive as a local file system")
14172 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14173under Python 2.7.")
14174 (license license:gpl2)))
14175
14176(define-public pybind11
14177 (package
14178 (name "pybind11")
14179 (version "2.2.4")
14180 (source (origin
14181 (method git-fetch)
14182 (uri (git-reference
14183 (url "https://github.com/pybind/pybind11.git")
14184 (commit (string-append "v" version))))
14185 (sha256
14186 (base32
14187 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14188 (file-name (git-file-name name version))))
14189 (build-system cmake-build-system)
14190 (native-inputs
14191 `(("python" ,python)
14192 ("python-pytest" ,python-pytest)))
14193 (arguments
14194 `(#:test-target "check"))
14195 (home-page "https://github.com/pybind/pybind11/")
14196 (synopsis "Seamless operability between C++11 and Python")
14197 (description "pybind11 is a lightweight header-only library that exposes
14198C++ types in Python and vice versa, mainly to create Python bindings of
14199existing C++ code. Its goals and syntax are similar to the excellent
14200Boost.Python library by David Abrahams: to minimize boilerplate code in
14201traditional extension modules by inferring type information using compile-time
14202introspection.")
14203 (license license:expat)))
14204
14205(define-public python-fasteners
14206 (package
14207 (name "python-fasteners")
14208 (version "0.14.1")
14209 (source
14210 (origin
14211 (method url-fetch)
14212 (uri (pypi-uri "fasteners" version))
14213 (sha256
14214 (base32
14215 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14216 (build-system python-build-system)
14217 (propagated-inputs
14218 `(("python-monotonic" ,python-monotonic)
14219 ("python-six" ,python-six)
14220 ("python-testtools" ,python-testtools)))
14221 (home-page "https://github.com/harlowja/fasteners")
14222 (synopsis "Python package that provides useful locks")
14223 (description
14224 "This package provides a Python program that provides following locks:
14225
14226@itemize
14227@item Locking decorator
14228@item Reader-writer locks
14229@item Inter-process locks
14230@item Generic helpers
14231@end itemize\n")
14232 (properties `((python2-variant . ,(delay python2-fasteners))))
14233 (license license:asl2.0)))
14234
14235(define-public python2-fasteners
14236 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14237 (package
14238 (inherit base)
14239 (propagated-inputs
14240 `(("python2-futures" ,python2-futures)
14241 ,@(package-propagated-inputs base))))))
14242
14243(define-public python-requests-file
14244 (package
14245 (name "python-requests-file")
14246 (version "1.4.3")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "requests-file" version))
14251 (sha256
14252 (base32
14253 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14254 (build-system python-build-system)
14255 (propagated-inputs
14256 `(("python-requests" ,python-requests)
14257 ("python-six" ,python-six)))
14258 (home-page
14259 "https://github.com/dashea/requests-file")
14260 (synopsis "File transport adapter for Requests")
14261 (description
14262 "Requests-File is a transport adapter for use with the Requests Python
14263library to allow local filesystem access via file:// URLs.")
14264 (license license:asl2.0)))
14265
14266(define-public python2-requests-file
14267 (package-with-python2 python-requests-file))
14268
14269(define-public python-tldextract
14270 (package
14271 (name "python-tldextract")
14272 (version "2.2.0")
14273 (source
14274 (origin
14275 (method url-fetch)
14276 (uri (pypi-uri "tldextract" version))
14277 (sha256
14278 (base32
14279 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14280 (build-system python-build-system)
14281 (native-inputs
14282 `(("python-pytest" ,python-pytest)
14283 ("python-responses" ,python-responses)))
14284 (propagated-inputs
14285 `(("python-idna" ,python-idna)
14286 ("python-requests" ,python-requests)
14287 ("python-requests-file" ,python-requests-file)))
14288 (home-page
14289 "https://github.com/john-kurkowski/tldextract")
14290 (synopsis
14291 "Separate the TLD from the registered domain and subdomains of a URL")
14292 (description
14293 "TLDExtract accurately separates the TLD from the registered domain and
14294subdomains of a URL, using the Public Suffix List. By default, this includes
14295the public ICANN TLDs and their exceptions. It can optionally support the
14296Public Suffix List's private domains as well.")
14297 (license license:bsd-3)))
14298
14299(define-public python2-tldextract
14300 (package-with-python2 python-tldextract))
14301
14302(define-public python-pynamecheap
14303 (package
14304 (name "python-pynamecheap")
14305 (version "0.0.3")
14306 (source
14307 (origin
14308 (method url-fetch)
14309 (uri (pypi-uri "PyNamecheap" version))
14310 (sha256
14311 (base32
14312 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14313 (build-system python-build-system)
14314 (propagated-inputs
14315 `(("python-requests" ,python-requests)))
14316 (home-page
14317 "https://github.com/Bemmu/PyNamecheap")
14318 (synopsis
14319 "Namecheap API client in Python")
14320 (description
14321 "PyNamecheap is a Namecheap API client in Python.")
14322 (license license:expat)))
14323
14324(define-public python2-pynamecheap
14325 (package-with-python2 python-pynamecheap))
14326
14327(define-public python-dns-lexicon
14328 (package
14329 (name "python-dns-lexicon")
14330 (version "2.4.0")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "dns-lexicon" version))
14335 (sha256
14336 (base32
14337 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14338 (build-system python-build-system)
14339 (arguments
14340 `(#:tests? #f)) ;requires internet access
14341 (propagated-inputs
14342 `(("python-future" ,python-future)
14343 ("python-pynamecheap" ,python-pynamecheap)
14344 ("python-requests" ,python-requests)
14345 ("python-tldextract" ,python-tldextract)
14346 ("python-urllib3" ,python-urllib3)))
14347 (home-page "https://github.com/AnalogJ/lexicon")
14348 (synopsis
14349 "Manipulate DNS records on various DNS providers")
14350 (description
14351 "Lexicon provides a way to manipulate DNS records on multiple DNS
14352providers in a standardized way. It has a CLI but it can also be used as a
14353Python library. It was designed to be used in automation, specifically with
14354Let's Encrypt.")
14355 (license license:expat)))
14356
14357(define-public python2-dns-lexicon
14358 (package-with-python2 python-dns-lexicon))
14359
14360(define-public python-commandlines
14361 (package
14362 (name "python-commandlines")
14363 (version "0.4.1")
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "commandlines" version))
14368 (sha256
14369 (base32
14370 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14371 (build-system python-build-system)
14372 (home-page "https://github.com/chrissimpkins/commandlines")
14373 (synopsis "Command line argument to object parsing library")
14374 (description
14375 "@code{Commandlines} is a Python library for command line application
14376development that supports command line argument parsing, command string
14377validation testing and application logic.")
14378 (license license:expat)))
14379
14380;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14381;; python-numba. They have a very unflexible relationship.
14382(define-public python-numba
14383 (package
14384 (name "python-numba")
7757e6d8 14385 (version "0.42.0")
44d10b1f
RW
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "numba" version))
14390 (sha256
14391 (base32
7757e6d8 14392 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
14393 (build-system python-build-system)
14394 (arguments
14395 `(#:modules ((guix build utils)
14396 (guix build python-build-system)
14397 (ice-9 ftw)
14398 (srfi srfi-1)
14399 (srfi srfi-26))
14400 #:phases
14401 (modify-phases %standard-phases
14402 (add-after 'unpack 'disable-proprietary-features
14403 (lambda _
14404 (setenv "NUMBA_DISABLE_HSA" "1")
14405 (setenv "NUMBA_DISABLE_CUDA" "1")
14406 #t))
14407 (add-after 'unpack 'remove-failing-tests
14408 (lambda _
14409 ;; FIXME: these tests fail for unknown reasons:
14410 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14411 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14412 (substitute* "numba/tests/test_dispatcher.py"
14413 (("def test(_non_writable_pycache)" _ m)
14414 (string-append "def guix_skip" m))
14415 (("def test(_non_creatable_pycache)" _ m)
14416 (string-append "def guix_skip" m))
14417 (("def test(_frozen)" _ m)
14418 (string-append "def guix_skip" m)))
14419
14420 ;; These tests fail because we don't run the tests from the build
14421 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14422 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14423 (substitute* "numba/tests/test_pycc.py"
14424 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14425 (string-append "def guix_skip" m)))
14426 #t))
14427 (replace 'check
14428 (lambda _
14429 (let ((cwd (getcwd)))
14430 (setenv "PYTHONPATH"
14431 (string-append cwd "/build/"
14432 (find (cut string-prefix? "lib" <>)
14433 (scandir (string-append cwd "/build")))
14434 ":"
14435 (getenv "PYTHONPATH")))
14436 ;; Something is wrong with the PYTHONPATH when running the
14437 ;; tests from the build directory, as it complains about not being
14438 ;; able to import certain modules.
14439 (with-directory-excursion "/tmp"
14440 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14441 #t)))))
14442 (propagated-inputs
14443 `(("python-llvmlite" ,python-llvmlite)
14444 ("python-numpy" ,python-numpy)
14445 ("python-singledispatch" ,python-singledispatch)))
14446 ;; Needed for tests.
14447 (inputs
14448 `(("python-jinja2" ,python-jinja2)
14449 ("python-pygments" ,python-pygments)))
14450 (home-page "https://numba.pydata.org")
14451 (synopsis "Compile Python code using LLVM")
14452 (description "Numba gives you the power to speed up your applications with
14453high performance functions written directly in Python. With a few
14454annotations, array-oriented and math-heavy Python code can be just-in-time
14455compiled to native machine instructions, similar in performance to C, C++ and
14456Fortran, without having to switch languages or Python interpreters.
14457
14458Numba works by generating optimized machine code using the LLVM compiler
14459infrastructure at import time, runtime, or statically (using the included pycc
14460tool).")
14461 (license license:bsd-3)))
14462
14463(define-public python-anndata
14464 (package
14465 (name "python-anndata")
14466 (version "0.6.9")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "anndata" version))
14471 (sha256
14472 (base32
14473 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14474 (build-system python-build-system)
14475 (propagated-inputs
14476 `(("python-h5py" ,python-h5py)
14477 ("python-natsort" ,python-natsort)
14478 ("python-pandas" ,python-pandas)
14479 ("python-scipy" ,python-scipy)))
14480 (home-page "https://github.com/theislab/anndata")
14481 (synopsis "Annotated data for data analysis pipelines")
14482 (description "Anndata is a package for simple (functional) high-level APIs
14483for data analysis pipelines. In this context, it provides an efficient,
14484scalable way of keeping track of data together with learned annotations and
14485reduces the code overhead typically encountered when using a mostly
14486object-oriented library such as @code{scikit-learn}.")
14487 (license license:bsd-3)))
14488
14489(define-public python-dill
14490 (package
14491 (name "python-dill")
14492 (version "0.2.8.2")
14493 (source
14494 (origin
14495 (method url-fetch)
14496 (uri (pypi-uri "dill" version))
14497 (sha256
14498 (base32
14499 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14500 (build-system python-build-system)
14501 ;; FIXME: The check phase fails with "don't know how to make test".
14502 (arguments '(#:tests? #f))
14503 (home-page "https://pypi.org/project/dill")
14504 (synopsis "Serialize all of Python")
14505 (description "Dill extends Python's @code{pickle} module for serializing
14506and de-serializing Python objects to the majority of the built-in Python
14507types. Dill provides the user the same interface as the @code{pickle} module,
14508and also includes some additional features. In addition to pickling Python
14509objects, @code{dill} provides the ability to save the state of an interpreter
14510session in a single command. Hence, it would be feasable to save a
14511interpreter session, close the interpreter, ship the pickled file to another
14512computer, open a new interpreter, unpickle the session and thus continue from
14513the saved state of the original interpreter session.")
14514 (license license:bsd-3)))
14515
14516(define-public python-multiprocess
14517 (package
14518 (name "python-multiprocess")
14519 (version "0.70.6.1")
14520 (source
14521 (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "multiprocess" version))
14524 (sha256
14525 (base32
14526 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14527 (build-system python-build-system)
14528 (propagated-inputs
14529 `(("python-dill" ,python-dill)))
14530 (home-page "https://pypi.org/project/multiprocess")
14531 (synopsis "Multiprocessing and multithreading in Python")
14532 (description
14533 "This package is a fork of the multiprocessing Python package, a package
14534which supports the spawning of processes using the API of the standard
14535library's @code{threading} module.")
14536 (license license:bsd-3)))
14537
14538(define-public python-toolz
14539 (package
14540 (name "python-toolz")
14541 (version "0.9.0")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 (uri (pypi-uri "toolz" version))
14546 (sha256
14547 (base32
14548 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14549 (build-system python-build-system)
14550 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14551 ;; unregistered loader type"
14552 (arguments '(#:tests? #f))
14553 (home-page "https://github.com/pytoolz/toolz/")
14554 (synopsis "List processing tools and functional utilities")
14555 (description
14556 "This package provides a set of utility functions for iterators,
14557functions, and dictionaries.")
14558 (license license:bsd-3)))
14559
14560(define-public python2-toolz
14561 (package-with-python2 python-toolz))
14562
14563(define-public python-cytoolz
14564 (package
14565 (name "python-cytoolz")
14566 (version "0.9.0.1")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (pypi-uri "cytoolz" version))
14571 (sha256
14572 (base32
14573 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14574 (build-system python-build-system)
14575 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14576 ;; 'exceptions'"
14577 (arguments '(#:tests? #f))
14578 (propagated-inputs
14579 `(("python-toolz" ,python-toolz)))
14580 (native-inputs
14581 `(("python-cython" ,python-cython)))
14582 (home-page "https://github.com/pytoolz/cytoolz")
14583 (synopsis "High performance functional utilities")
14584 (description
14585 "The cytoolz package implements the same API as provided by toolz. The
14586main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14587that is accessible to other projects developed in Cython.")
14588 (license license:bsd-3)))
14589
14590(define-public python-sortedcontainers
14591 (package
14592 (name "python-sortedcontainers")
14593 (version "2.0.4")
14594 (source
14595 (origin
14596 (method url-fetch)
14597 (uri (pypi-uri "sortedcontainers" version))
14598 (sha256
14599 (base32
14600 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14601 (build-system python-build-system)
14602 (native-inputs
14603 `(("python-tox" ,python-tox)))
14604 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14605 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14606 (description
14607 "This package provides a sorted collections library, written in
14608pure-Python.")
14609 (license license:asl2.0)))
14610
14611(define-public python-cloudpickle
14612 (package
14613 (name "python-cloudpickle")
14614 (version "0.6.1")
14615 (source
14616 (origin
14617 (method url-fetch)
14618 (uri (pypi-uri "cloudpickle" version))
14619 (sha256
14620 (base32
14621 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14622 (build-system python-build-system)
14623 ;; FIXME: there are 5 errors in 122 tests:
14624 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14625 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14626 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14627 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14628 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14629 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14630 (arguments '(#:tests? #f))
14631 (native-inputs
14632 `(("python-pytest" ,python-pytest)
14633 ("python-mock" ,python-mock)
14634 ("python-tornado" ,python-tornado)))
14635 (home-page "https://github.com/cloudpipe/cloudpickle")
14636 (synopsis "Extended pickling support for Python objects")
14637 (description
14638 "Cloudpickle makes it possible to serialize Python constructs not
14639supported by the default pickle module from the Python standard library. It
14640is especially useful for cluster computing where Python expressions are
14641shipped over the network to execute on remote hosts, possibly close to the
14642data.")
14643 (license license:bsd-3)))
14644
14645(define-public python2-cloudpickle
14646 (package-with-python2 python-cloudpickle))
14647
14648(define-public python-locket
14649 (package
14650 (name "python-locket")
14651 (version "0.2.0")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "locket" version))
14656 (sha256
14657 (base32
14658 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14659 (build-system python-build-system)
14660 (home-page "https://github.com/mwilliamson/locket.py")
14661 (synopsis "File-based locks for Python")
14662 (description
14663 "Locket implements a lock that can be used by multiple processes provided
14664they use the same path.")
14665 (license license:bsd-2)))
14666
14667(define-public python2-locket
14668 (package-with-python2 python-locket))
14669
14670(define-public python-blosc
14671 (package
14672 (name "python-blosc")
14673 (version "1.5.1")
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (pypi-uri "blosc" version))
14678 (sha256
14679 (base32
14680 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14681 (build-system python-build-system)
14682 ;; FIXME: all tests pass, but then this error is printed:
14683 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14684 (arguments '(#:tests? #f))
14685 (propagated-inputs
14686 `(("python-numpy" ,python-numpy)))
14687 (home-page "https://github.com/blosc/python-blosc")
14688 (synopsis "Python wrapper for the Blosc data compressor library")
14689 (description "Blosc is a high performance compressor optimized for binary
14690data. It has been designed to transmit data to the processor cache faster
14691than the traditional, non-compressed, direct memory fetch approach via a
14692@code{memcpy()} system call.
14693
14694Blosc works well for compressing numerical arrays that contains data with
14695relatively low entropy, like sparse data, time series, grids with
14696regular-spaced values, etc.
14697
14698This Python package wraps the Blosc library.")
14699 (license license:bsd-3)))
14700
14701(define-public python2-blosc
14702 (package-with-python2 python-blosc))
14703
14704(define-public python-partd
14705 (package
14706 (name "python-partd")
14707 (version "0.3.9")
14708 (source
14709 (origin
14710 (method url-fetch)
14711 (uri (pypi-uri "partd" version))
14712 (sha256
14713 (base32
14714 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14715 (build-system python-build-system)
14716 (propagated-inputs
14717 `(("python-blosc" ,python-blosc)
14718 ("python-locket" ,python-locket)
14719 ("python-numpy" ,python-numpy)
14720 ("python-pandas" ,python-pandas)
14721 ("python-pyzmq" ,python-pyzmq)
14722 ("python-toolz" ,python-toolz)))
14723 (home-page "https://github.com/dask/partd/")
14724 (synopsis "Appendable key-value storage")
14725 (description "Partd stores key-value pairs. Values are raw bytes. We
14726append on old values. Partd excels at shuffling operations.")
14727 (license license:bsd-3)))
14728
14729(define-public python2-partd
14730 (package-with-python2 python-partd))
14731
14732(define-public python-dask
14733 (package
14734 (name "python-dask")
755226e9 14735 (version "1.1.4")
44d10b1f
RW
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "dask" version))
14740 (sha256
14741 (base32
755226e9 14742 "1hrnfz4pzawikz9b622vjz2500n7hs25nz9msy1k8l4g7l2kr6ky"))))
44d10b1f
RW
14743 (build-system python-build-system)
14744 ;; A single test out of 5000+ fails. This test is marked as xfail when
14745 ;; pytest-xdist is used.
14746 (arguments
14747 `(#:phases
14748 (modify-phases %standard-phases
14749 (add-after 'unpack 'disable-broken-test
14750 (lambda _
14751 (substitute* "dask/tests/test_threaded.py"
14752 (("def test_interrupt\\(\\)" m)
14753 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14754 m)))
14755 (when (which "python2")
14756 ;; This test fails with recent Pandas:
14757 ;; <https://github.com/dask/dask/issues/3794>.
14758 (substitute* "dask/dataframe/tests/test_dataframe.py"
14759 (("def test_info\\(\\)" m)
14760 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14761 m))))
14762 #t))
14763 (replace 'check
14764 (lambda _ (invoke "pytest" "-vv"))))))
14765 (propagated-inputs
14766 `(("python-cloudpickle" ,python-cloudpickle)
14767 ("python-numpy" ,python-numpy)
14768 ("python-pandas" ,python-pandas)
14769 ("python-partd" ,python-partd)
14770 ("python-toolz" ,python-toolz)
14771 ("python-pyyaml" ,python-pyyaml)))
14772 (native-inputs
14773 `(("python-pytest" ,python-pytest)
14774 ("python-pytest-runner" ,python-pytest-runner)))
14775 (home-page "https://github.com/dask/dask/")
14776 (synopsis "Parallel computing with task scheduling")
14777 (description
14778 "Dask is a flexible parallel computing library for analytics. It
14779consists of two components: dynamic task scheduling optimized for computation,
14780and large data collections like parallel arrays, dataframes, and lists that
14781extend common interfaces like NumPy, Pandas, or Python iterators to
14782larger-than-memory or distributed environments. These parallel collections
14783run on top of the dynamic task schedulers. ")
14784 (license license:bsd-3)))
14785
14786(define-public python2-dask
14787 (package-with-python2 python-dask))
14788
14789(define-public python-ilinkedlist
14790 (package
14791 (name "python-ilinkedlist")
14792 (version "0.4.0")
14793 (source
14794 (origin
14795 (method url-fetch)
14796 (uri (pypi-uri "ilinkedlist" version))
14797 (sha256
14798 (base32
14799 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14800 (build-system python-build-system)
14801 (native-inputs `(("python-pytest" ,python-pytest)))
14802 (inputs `(("python" ,python)))
14803 (home-page "https://github.com/luther9/ilinkedlist-py")
14804 (synopsis "Immutable linked list library")
14805 (description
14806 "This is a implementation of immutable linked lists for Python. It
14807contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14808Since a linked list is treated as immutable, it is hashable, and its length
14809can be retrieved in constant time. Some of the terminology is inspired by
14810LISP. It is possible to create an improper list by creating a @code{Pair}
14811with a non-list @code{cdr}.")
14812 (license license:gpl3+)))
14813
14814(define-public python-readlike
14815 (package
14816 (name "python-readlike")
14817 (version "0.1.3")
14818 (source
14819 (origin
14820 (method url-fetch)
14821 (uri (pypi-uri "readlike" version))
14822 (sha256
14823 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14824 (build-system python-build-system)
14825 (home-page "https://github.com/jangler/readlike")
14826 (synopsis "GNU Readline-like line editing module")
14827 (description
14828 "This Python module provides line editing functions similar to the default
14829Emacs-style ones of GNU Readline. Unlike the Python standard library's
14830@code{readline} package, this one allows access to those capabilties in settings
14831outside of a standard command-line interface. It is especially well-suited to
14832interfacing with Urwid, due to a shared syntax for describing key inputs.
14833
14834Currently, all stateless Readline commands are implemented. Yanking and history
14835are not supported.")
14836 (license license:expat)))
14837
14838(define-public python2-readlike
14839 (package-with-python2 python-readlike))
14840
14841(define-public python-reparser
14842 (package
14843 (name "python-reparser")
14844 (version "1.4.3")
14845 (source
14846 (origin
14847 (method url-fetch)
14848 (uri (pypi-uri "ReParser" version))
14849 (sha256
14850 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14851 (build-system python-build-system)
14852 (home-page "https://github.com/xmikos/reparser")
14853 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14854 (description
14855 "This Python library provides a simple lexer/parser for inline markup based
14856on regular expressions.")
14857 (license license:expat)))
14858
14859(define-public python2-reparser
14860 (let ((reparser (package-with-python2
14861 (strip-python2-variant python-reparser))))
14862 (package (inherit reparser)
14863 (propagated-inputs
14864 `(("python2-enum34" ,python2-enum34)
14865 ,@(package-propagated-inputs reparser))))))
14866
14867(define-public python-precis-i18n
14868 (package
14869 (name "python-precis-i18n")
14870 (version "1.0.0")
14871 (source
14872 (origin
14873 (method url-fetch)
14874 (uri (pypi-uri "precis_i18n" version))
14875 (sha256
14876 (base32
14877 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14878 (build-system python-build-system)
14879 (home-page "https://github.com/byllyfish/precis_i18n")
14880 (synopsis "Implementation of the PRECIS framework")
14881 (description
14882 "This module implements the PRECIS Framework as described in RFC 8264,
14883RFC 8265 and RFC 8266.")
14884 (license license:expat)))
14885
d0446c4b
RW
14886(define-public python-absl-py
14887 (package
14888 (name "python-absl-py")
14889 (version "0.6.1")
14890 (source
14891 (origin
14892 (method url-fetch)
14893 (uri (pypi-uri "absl-py" version))
14894 (sha256
14895 (base32
14896 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14897 (build-system python-build-system)
14898 (propagated-inputs
14899 `(("python-six" ,python-six)))
14900 (home-page "https://github.com/abseil/abseil-py")
14901 (synopsis "Abseil Python common libraries")
14902 (description
14903 "This package provides the Abseil Python Common Libraries, a collection
14904of Python libraries for building Python applications.")
14905 (license license:asl2.0)))
14906
81bed4e9
RW
14907(define-public python-astor
14908 (package
14909 (name "python-astor")
14910 (version "0.7.1")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "astor" version))
14915 (sha256
14916 (base32
14917 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14918 (build-system python-build-system)
14919 ;; FIXME: There are two errors and two test failures.
14920 (arguments `(#:tests? #f))
14921 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14922 (synopsis "Read and write Python ASTs")
81bed4e9 14923 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14924source via the Abstract Syntax Tree.")
81bed4e9
RW
14925 (license license:bsd-3)))
14926
39ee82ff
RW
14927(define-public python2-astor
14928 (package-with-python2 python-astor))
14929
22e623ae
RW
14930(define-public python-grpcio
14931 (package
14932 (name "python-grpcio")
14933 (version "1.17.1")
14934 (source
14935 (origin
14936 (method url-fetch)
14937 (uri (pypi-uri "grpcio" version))
14938 (sha256
14939 (base32
14940 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14941 (build-system python-build-system)
14942 (propagated-inputs
14943 `(("python-six" ,python-six)))
14944 (home-page "https://grpc.io")
14945 (synopsis "HTTP/2-based RPC framework")
14946 (description "This package provides a Python library for communicating
14947with the HTTP/2-based RPC framework gRPC.")
14948 (license license:asl2.0)))
14949
79869f80
RW
14950(define-public python-astunparse
14951 (package
14952 (name "python-astunparse")
14953 (version "1.6.1")
14954 (source
14955 (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "astunparse" version))
14958 (sha256
14959 (base32
14960 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14961 (build-system python-build-system)
14962 (arguments '(#:tests? #f)) ; there are none
14963 (propagated-inputs
14964 `(("python-six" ,python-six)
14965 ("python-wheel" ,python-wheel)))
14966 (home-page "https://github.com/simonpercivall/astunparse")
14967 (synopsis "AST unparser for Python")
14968 (description "This package provides an AST unparser for Python. It is a
14969factored out version of @code{unparse} found in the Python source
14970distribution.")
14971 (license license:bsd-3)))
14972
2884aac0
RW
14973(define-public python-gast
14974 (package
14975 (name "python-gast")
14976 (version "0.2.0")
14977 (source
14978 (origin
14979 (method url-fetch)
14980 (uri (pypi-uri "gast" version))
14981 (sha256
14982 (base32
14983 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14984 (build-system python-build-system)
14985 (propagated-inputs
14986 `(("python-astunparse" ,python-astunparse)))
14987 (home-page "https://pypi.org/project/gast/")
14988 (synopsis "Generic Python AST that abstracts the underlying Python version")
14989 (description
14990 "GAST provides a compatibility layer between the AST of various Python
14991versions, as produced by @code{ast.parse} from the standard @code{ast}
14992module.")
14993 (license license:bsd-3)))
14994
44d10b1f
RW
14995(define-public python-wikidata
14996 (package
14997 (name "python-wikidata")
14998 (version "0.6.1")
14999 (source
15000 (origin
15001 (method url-fetch)
15002 (uri (pypi-uri "Wikidata" version))
15003 (sha256
15004 (base32
15005 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
15006 (build-system python-build-system)
15007 (propagated-inputs
15008 `(("python-babel" ,python-babel)))
15009 (home-page "https://github.com/dahlia/wikidata")
15010 (synopsis "Wikidata client library")
15011 (description
15012 "This package provides a Python interface to
15013@url{https://www.wikidata.org/, Wikidata}.")
15014 (properties '((upstream-name . "Wikidata")))
15015 (license license:gpl3+)))
15016
15017(define-public python-doctest-ignore-unicode
15018 (package
15019 (name "python-doctest-ignore-unicode")
15020 (version "0.1.2")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "doctest-ignore-unicode" version))
15025 (sha256
15026 (base32
15027 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
15028 (build-system python-build-system)
15029 (native-inputs
15030 `(("python-nose" ,python-nose)))
15031 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
15032 (synopsis "Ignore Unicode literal prefixes in doctests")
15033 (description
15034 "This package adds support for a flag to ignore Unicode literal prefixes
15035in doctests.")
15036 (license license:asl2.0)))
15037
15038(define-public python-attr
15039 (package
15040 (name "python-attr")
15041 (version "0.3.1")
15042 (source
15043 (origin
15044 (method url-fetch)
15045 (uri (pypi-uri "attr" version))
15046 (sha256
15047 (base32
15048 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
15049 (build-system python-build-system)
15050 (home-page "https://github.com/denis-ryzhkov/attr")
15051 (synopsis "Decorator for attributes of target function or class")
15052 (description "Simple decorator to set attributes of target function or
15053class in a @acronym{DRY, Don't Repeat Yourself} way.")
15054 (license license:expat)))
f98232a3
VC
15055
15056(define-public python-construct
15057 (package
15058 (name "python-construct")
15059 (version "2.9.45")
15060 (source
15061 (origin
15062 (method url-fetch)
15063 (uri (pypi-uri "construct" version))
15064 (sha256
15065 (base32
15066 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
15067 (build-system python-build-system)
15068 (arguments
15069 `(#:tests? #f)) ; No tests exist.
15070 (propagated-inputs
15071 `(("python-extras" ,python-extras)
15072 ("python-arrow" ,python-arrow)
15073 ("python-numpy" ,python-numpy)
15074 ("python-ruamel.yaml" ,python-ruamel.yaml)))
15075 (home-page "http://construct.readthedocs.io")
15076 (synopsis "Declarative and symmetrical parser and builder for binary data")
15077 (description
15078 "This package provides both simple, atomic constructs (such as
15079integers of various sizes), as well as composite ones which allow you
15080form hierarchical and sequential structures of increasing complexity.
15081It features bit and byte granularity, easy debugging and testing, an
15082easy-to-extend subclass system, and lots of primitive constructs to
15083make your work easier.")
15084 (license license:expat)))
b742c006
LF
15085
15086(define-public python-humanize
15087 (package
15088 (name "python-humanize")
15089 (version "0.5.1")
15090 (source
15091 (origin
15092 (method url-fetch)
15093 (uri (pypi-uri "humanize" version))
15094 (sha256
15095 (base32
15096 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15097 (arguments
15098 '(#:tests? #f)) ; tests not in pypi archive
15099 (build-system python-build-system)
15100 (home-page "https://github.com/jmoiron/humanize")
15101 (synopsis "Print numerical information in a human-readable form")
15102 (description "This package provides a Python module that displays numbers
15103and dates in \"human readable\" forms. For example, it would display
15104\"12345591313\" as \"12.3 billion\".")
15105 (license license:expat)))
d5bbf66d
LF
15106
15107(define-public python-txaio
15108 (package
15109 (name "python-txaio")
15110 (version "18.8.1")
15111 (source
15112 (origin
15113 (method url-fetch)
15114 (uri (pypi-uri "txaio" version))
15115 (sha256
15116 (base32
15117 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15118 (build-system python-build-system)
15119 (propagated-inputs
15120 `(("python-twisted" ,python-twisted)
15121 ("python-six" ,python-six)))
15122 (home-page "https://github.com/crossbario/txaio")
15123 (synopsis "Compatibility layer between Python asyncio and Twisted")
15124 (description "Txaio provides a compatibility layer between the Python
15125@code{asyncio} module and @code{Twisted}.")
15126 (license license:expat)))